signetai 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{F as he,bx as mt,q as A,w as U,v as T,a0 as te,by as _t}from"./B8ZX7RRG.js";import{o as qe}from"./ZyuAFP8p.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!V.length;for(const c of r)c[1](),V.push(c,e);if(l){for(let c=0;c<V.length;c+=2)V[c][0](V[c+1]);V.length=0}}}function i(o){a(o(e))}function s(o,l=he){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Le(e)),Et(e,t));const G=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(G.size>0){const r=Le(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=Lt.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return Pt(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function He(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_hzn6i8?.base??"",Ot=globalThis.__sveltekit_hzn6i8?.assets??x??"",$t="1772363656849",We="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",F="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function z(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...N,"":N.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=z(o,"preload-code")),a===null&&(a=z(o,"preload-data")),t===null&&(t=z(o,"keepfocus")),n===null&&(n=z(o,"noscroll")),i===null&&(i=z(o,"reload")),s===null&&(s=z(o,"replacestate")),o=Qe(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function ze(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const jt=new Set([...tt]);[...jt];function qt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,W,me;const Vt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function zt(e){Object.assign(k,e)}const Fe={spanContext(){return Ft},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ft={traceId:"",spanId:"",traceFlags:0},Kt=new Set(["icon","shortcut icon","apple-touch-icon"]),C=He(Je)??{},J=He(We)??{},$={url:ze({}),page:ze({}),navigating:Se(null),updated:Nt()};function Te(e){C[e]=q()}function Bt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ke(){}let Pe,ve,re,P,ye,v;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Gt=new Set,M=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Be=!0,X=!1,B=!1,ot=!1,Ie=!1,st,y,R,j;const ie=new Set,Ge=new Map;async function gn(e,t,n){globalThis.__sveltekit_hzn6i8?.data&&globalThis.__sveltekit_hzn6i8.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),y=history.state?.[F],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[F]:y,[H]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await K({type:"enter",url:Xe(v.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Mt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Me(){Te(y),De(Je,C),it(R),De(We,J)}async function Ht(e,t,n,r){let a;t.invalidateAll&&be(),await K({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Ge.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),lt(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}se=!0}function le({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:je(k)}};s!==void 0&&(l.props.form=s);let c={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:k.data}),l}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Fe,current:Fe},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ut(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==ce(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,w,s);return I?le({url:n,params:r,branch:w.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else w.push(void 0);return le({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return Ht(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ne(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(c=>c(l)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Ke,block:d=Ke,event:p}){const f=j;j=l;const u=await fe(t,!1),h=e==="enter"?Ne(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const w=y,m=R;c(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,v.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,j!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await K({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(Mt(),Te(w),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[F]:y+=b,[H]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Bt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Gt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{M.delete(de)})};b.push(D),b.forEach(de=>{M.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),zt(g.props.page),E=_t?.()),ot=!0}else await ct(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Be){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Be=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&&lt(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=q()),M.forEach(b=>b(h.navigation)),$.navigating.set(W.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Ze(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=we(c,x,v.hash);if(f||u)return;const h=ne(c),w=p&&ce(_.url)===ce(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await fe(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=we(o,x,v.hash);if(c||d)continue;const p=ne(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&_e(l))}}M.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Me(),!X){const r=Ne(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Me()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=we(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(B=!0,Te(y),e(r),!o.replace_state)return;B=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await K({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,l=ne(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),K({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[F]){const n=t.state[F];if(j={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[H],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=q(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await K({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:j,event:t})}else if(!B){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{B&&(B=!1,history.replaceState({...history.state,[F]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Kt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){at=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(c,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=le({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await ct(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=q();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
1
+ import{F as he,bx as mt,q as A,w as U,v as T,a0 as te,by as _t}from"./B8ZX7RRG.js";import{o as qe}from"./ZyuAFP8p.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!V.length;for(const c of r)c[1](),V.push(c,e);if(l){for(let c=0;c<V.length;c+=2)V[c][0](V[c+1]);V.length=0}}}function i(o){a(o(e))}function s(o,l=he){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function wt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Le(e)),Et(e,t));const M=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&M.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(M.size>0){const r=Le(e,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=Lt.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return Pt(v,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function He(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_uavv4i?.base??"",Ot=globalThis.__sveltekit_uavv4i?.assets??x??"",$t="1772365079082",We="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...N,"":N.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),i===null&&(i=F(o,"reload")),s===null&&(s=F(o,"replacestate")),o=Qe(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function Fe(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const jt=new Set([...tt]);[...jt];function qt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,W,me;const Vt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Ft(e){Object.assign(k,e)}const Ke={spanContext(){return Kt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Kt={traceId:"",spanId:"",traceFlags:0},Bt=new Set(["icon","shortcut icon","apple-touch-icon"]),C=He(Je)??{},J=He(We)??{},$={url:Fe({}),page:Fe({}),navigating:Se(null),updated:Nt()};function Te(e){C[e]=q()}function Gt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Be(){}let Pe,we,re,P,ye,w;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Mt=new Set,z=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,Ie=!1,st,y,R,j;const ie=new Set,Me=new Map;async function gn(e,t,n){globalThis.__sveltekit_uavv4i?.data&&globalThis.__sveltekit_uavv4i.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,we=e.nodes[0],re=e.nodes[1],we(),re(),y=history.state?.[K],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[K]:y,[H]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await B({type:"enter",url:Xe(w.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function zt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function ze(){Te(y),De(Je,C),it(R),De(We,J)}async function Ht(e,t,n,r){let a;t.invalidateAll&&be(),await B({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Me.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new w.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),lt(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(i=>i(a))}se=!0}function le({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:je(k)}};s!==void 0&&(l.props.form=s);let c={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],v=_.branch[u];h?.data!==v?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:k.data}),l}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Ke,current:Ke},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:v}=ut(f,u,n);return o&&d(h.href),v},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==ce(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,v,s);return I?le({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else v.push(void 0);return le({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:we,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return Ht(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,w.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return wt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ne(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(c=>c(l)),s?null:o}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Be,block:d=Be,event:p}){const f=j;j=l;const u=await fe(t,!1),h=e==="enter"?Ne(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const v=y,m=R;c(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,w.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,j!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await B({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(zt(),Te(v),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[K]:y+=b,[H]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Gt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Mt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{z.delete(de)})};b.push(D),b.forEach(de=>{z.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),Ft(g.props.page),E=_t?.()),ot=!0}else await ct(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Ge){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Ge=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&&lt(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=q()),z.forEach(b=>b(h.navigation)),$.navigating.set(W.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Ze(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=ve(c,x,w.hash);if(f||u)return;const h=ne(c),v=p&&ce(_.url)===ce(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await fe(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=ve(o,x,w.hash);if(c||d)continue;const p=ne(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&_e(l))}}z.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!X){const r=Ne(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=ve(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(G=!0,Te(y),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await B({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,l=ne(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),B({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[K]){const n=t.state[K];if(j={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[H],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=q(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await B({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:j,event:t})}else if(!G){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[K]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Bt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){at=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(c,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=le({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await ct(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=q();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BZb-JVk3.js","../chunks/Bh4-TELa.js","../chunks/B8ZX7RRG.js","../chunks/DJzRqvC6.js","../chunks/BWZxlfU5.js","../assets/0.Br3oa4YO.css","../nodes/1.COwOBTBO.js","../chunks/5M8IHB6B.js","../chunks/BWl8aDS_.js","../chunks/Cu0mLVk0.js","../chunks/BMtDTa8K.js","../chunks/ZyuAFP8p.js","../nodes/2.BkZqDbjN.js","../chunks/QG0SFEzO.js","../chunks/VPfMKV-Y.js","../assets/2.rN8r_Hzv.css"])))=>i.map(i=>d[i]);
2
- import{p as y,i as x,c as P,b as E,_ as O}from"../chunks/VPfMKV-Y.js";import{v as b,Y as z,w as u,Z as B,_ as Z,$ as F,o as H,G as J,u as K,a0 as N,D as g,x as Q,B as U,q as R,t as W,A as X,C as w,z as $}from"../chunks/B8ZX7RRG.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/BWl8aDS_.js";import{a as _,c as j,f as D,t as at}from"../chunks/Bh4-TELa.js";import{o as nt}from"../chunks/ZyuAFP8p.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=F(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===z?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return b(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&B(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Z(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const bt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){H(t,!0);let s=y(t,"components",23,()=>[]),o=y(t,"data_0",3,null),c=y(t,"data_1",3,null);J(()=>t.stores.page.set(t.page)),K(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(b(r,!0),N().then(()=>{b(i,document.title||"untitled page",!0)}))});return b(e,!0),n});const I=w(()=>t.constructors[1]);var k=ut(),A=g(k);{var S=n=>{const m=w(()=>t.constructors[0]);var d=j(),h=g(d);P(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(v,lt)=>{var C=j(),G=g(C);P(G,()=>u(I),(M,Y)=>{E(Y(M,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),q=>s()[1]=q,()=>s()?.[1])}),_(v,C)},$$slots:{default:!0}}),v=>s()[0]=v,()=>s()?.[0])}),_(n,d)},T=n=>{const m=w(()=>t.constructors[0]);var d=j(),h=g(d);P(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),v=>s()[0]=v,()=>s()?.[0])}),_(n,d)};x(A,n=>{t.constructors[1]?n(S):n(T,!1)})}var V=Q(A,2);{var p=n=>{var m=it(),d=W(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};x(d,l=>{u(r)&&l(h)})}X(m),_(n,m)};x(V,n=>{u(e)&&n(p)})}_(a,k),U()}const yt=ot(mt),xt=[()=>O(()=>import("../nodes/0.BZb-JVk3.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.COwOBTBO.js"),__vite__mapDeps([6,1,2,7,8,9,10,11]),import.meta.url),()=>O(()=>import("../nodes/2.BkZqDbjN.js"),__vite__mapDeps([12,13,14,2,4,1,11,8,3,7,15]),import.meta.url)],Pt=[],Et={"/":[2]},L={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.encode])),Rt=!1,wt=(a,t)=>dt[a](t);export{wt as decode,dt as decoders,Et as dictionary,Ot as encoders,Rt as hash,L as hooks,bt as matchers,xt as nodes,yt as root,Pt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BZb-JVk3.js","../chunks/Bh4-TELa.js","../chunks/B8ZX7RRG.js","../chunks/DJzRqvC6.js","../chunks/BWZxlfU5.js","../assets/0.Br3oa4YO.css","../nodes/1.CqObsq5G.js","../chunks/5M8IHB6B.js","../chunks/BWl8aDS_.js","../chunks/Cu0mLVk0.js","../chunks/C8GVXJcx.js","../chunks/ZyuAFP8p.js","../nodes/2.BkZqDbjN.js","../chunks/QG0SFEzO.js","../chunks/VPfMKV-Y.js","../assets/2.rN8r_Hzv.css"])))=>i.map(i=>d[i]);
2
+ import{p as y,i as x,c as P,b as E,_ as O}from"../chunks/VPfMKV-Y.js";import{v as b,Y as z,w as u,Z as B,_ as Z,$ as F,o as H,G as J,u as K,a0 as N,D as g,x as Q,B as U,q as R,t as W,A as X,C as w,z as $}from"../chunks/B8ZX7RRG.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/BWl8aDS_.js";import{a as _,c as j,f as D,t as at}from"../chunks/Bh4-TELa.js";import{o as nt}from"../chunks/ZyuAFP8p.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=F(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===z?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return b(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&B(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Z(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const bt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){H(t,!0);let s=y(t,"components",23,()=>[]),o=y(t,"data_0",3,null),c=y(t,"data_1",3,null);J(()=>t.stores.page.set(t.page)),K(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(b(r,!0),N().then(()=>{b(i,document.title||"untitled page",!0)}))});return b(e,!0),n});const I=w(()=>t.constructors[1]);var k=ut(),A=g(k);{var S=n=>{const m=w(()=>t.constructors[0]);var d=j(),h=g(d);P(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(v,lt)=>{var C=j(),G=g(C);P(G,()=>u(I),(M,Y)=>{E(Y(M,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),q=>s()[1]=q,()=>s()?.[1])}),_(v,C)},$$slots:{default:!0}}),v=>s()[0]=v,()=>s()?.[0])}),_(n,d)},T=n=>{const m=w(()=>t.constructors[0]);var d=j(),h=g(d);P(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),v=>s()[0]=v,()=>s()?.[0])}),_(n,d)};x(A,n=>{t.constructors[1]?n(S):n(T,!1)})}var V=Q(A,2);{var p=n=>{var m=it(),d=W(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};x(d,l=>{u(r)&&l(h)})}X(m),_(n,m)};x(V,n=>{u(e)&&n(p)})}_(a,k),U()}const yt=ot(mt),xt=[()=>O(()=>import("../nodes/0.BZb-JVk3.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.CqObsq5G.js"),__vite__mapDeps([6,1,2,7,8,9,10,11]),import.meta.url),()=>O(()=>import("../nodes/2.BkZqDbjN.js"),__vite__mapDeps([12,13,14,2,4,1,11,8,3,7,15]),import.meta.url)],Pt=[],Et={"/":[2]},L={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.encode])),Rt=!1,wt=(a,t)=>dt[a](t);export{wt as decode,dt as decoders,Et as dictionary,Ot as encoders,Rt as hash,L as hooks,bt as matchers,xt as nodes,yt as root,Pt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/C8GVXJcx.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import{a as u,f as h}from"../chunks/Bh4-TELa.js";import"../chunks/5M8IHB6B.js";import{o as g,D as l,z as v,B as d,t as a,A as e,x}from"../chunks/B8ZX7RRG.js";import{s as o}from"../chunks/BWl8aDS_.js";import{i as _}from"../chunks/Cu0mLVk0.js";import{s as $,p}from"../chunks/BMtDTa8K.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function q(i,f){g(f,!1),_();var t=b(),r=l(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),v(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),d()}export{q as component};
1
+ import{a as u,f as h}from"../chunks/Bh4-TELa.js";import"../chunks/5M8IHB6B.js";import{o as g,D as l,z as v,B as d,t as a,A as e,x}from"../chunks/B8ZX7RRG.js";import{s as o}from"../chunks/BWl8aDS_.js";import{i as _}from"../chunks/Cu0mLVk0.js";import{s as $,p}from"../chunks/C8GVXJcx.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function q(i,f){g(f,!1),_();var t=b(),r=l(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),v(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),d()}export{q as component};
@@ -1 +1 @@
1
- {"version":"1772363656849"}
1
+ {"version":"1772365079082"}
@@ -17,11 +17,11 @@
17
17
  document.documentElement.dataset.theme = t;
18
18
  })();
19
19
  </script>
20
- <link href="/_app/immutable/entry/start.XQ1KTc1I.js" rel="modulepreload">
21
- <link href="/_app/immutable/chunks/BMtDTa8K.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/start.D0NYCoc5.js" rel="modulepreload">
21
+ <link href="/_app/immutable/chunks/C8GVXJcx.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/chunks/B8ZX7RRG.js" rel="modulepreload">
23
23
  <link href="/_app/immutable/chunks/ZyuAFP8p.js" rel="modulepreload">
24
- <link href="/_app/immutable/entry/app.Xvx7OqkW.js" rel="modulepreload">
24
+ <link href="/_app/immutable/entry/app.Cw0hxPMq.js" rel="modulepreload">
25
25
  <link href="/_app/immutable/chunks/VPfMKV-Y.js" rel="modulepreload">
26
26
  <link href="/_app/immutable/chunks/BWZxlfU5.js" rel="modulepreload">
27
27
  <link href="/_app/immutable/chunks/BWl8aDS_.js" rel="modulepreload">
@@ -32,15 +32,15 @@
32
32
  <div style="display: contents">
33
33
  <script>
34
34
  {
35
- __sveltekit_hzn6i8 = {
35
+ __sveltekit_uavv4i = {
36
36
  base: ""
37
37
  };
38
38
 
39
39
  const element = document.currentScript.parentElement;
40
40
 
41
41
  Promise.all([
42
- import("/_app/immutable/entry/start.XQ1KTc1I.js"),
43
- import("/_app/immutable/entry/app.Xvx7OqkW.js")
42
+ import("/_app/immutable/entry/start.D0NYCoc5.js"),
43
+ import("/_app/immutable/entry/app.Cw0hxPMq.js")
44
44
  ]).then(([kit, app]) => {
45
45
  kit.start(app, element);
46
46
  });
package/dist/daemon.js CHANGED
@@ -33528,6 +33528,11 @@ var DEFAULT_PIPELINE_V2 = {
33528
33528
  flushIntervalMs: 60000,
33529
33529
  flushBatchSize: 50,
33530
33530
  retentionDays: 90
33531
+ },
33532
+ embeddingTracker: {
33533
+ enabled: true,
33534
+ pollMs: 5000,
33535
+ batchSize: 8
33531
33536
  }
33532
33537
  };
33533
33538
  function clampPositive(raw2, min, max, fallback) {
@@ -33555,6 +33560,7 @@ function loadPipelineConfig(yaml) {
33555
33560
  const guardrailsRaw = raw2.guardrails;
33556
33561
  const telemetryRaw = raw2.telemetry;
33557
33562
  const continuityRaw = raw2.continuity;
33563
+ const embeddingTrackerRaw = raw2.embeddingTracker;
33558
33564
  const d = DEFAULT_PIPELINE_V2;
33559
33565
  function resolveBool(nested, flat, fallback) {
33560
33566
  if (typeof nested === "boolean")
@@ -33642,6 +33648,11 @@ function loadPipelineConfig(yaml) {
33642
33648
  flushIntervalMs: clampPositive(telemetryRaw?.flushIntervalMs, 5000, 600000, d.telemetry.flushIntervalMs),
33643
33649
  flushBatchSize: clampPositive(telemetryRaw?.flushBatchSize, 1, 500, d.telemetry.flushBatchSize),
33644
33650
  retentionDays: clampPositive(telemetryRaw?.retentionDays, 1, 365, d.telemetry.retentionDays)
33651
+ },
33652
+ embeddingTracker: {
33653
+ enabled: resolveBool(embeddingTrackerRaw?.enabled, undefined, d.embeddingTracker.enabled),
33654
+ pollMs: clampPositive(embeddingTrackerRaw?.pollMs, 1000, 60000, d.embeddingTracker.pollMs),
33655
+ batchSize: clampPositive(embeddingTrackerRaw?.batchSize, 1, 20, d.embeddingTracker.batchSize)
33645
33656
  }
33646
33657
  };
33647
33658
  }
@@ -33721,7 +33732,7 @@ import {
33721
33732
  realpathSync as realpathSync3
33722
33733
  } from "fs";
33723
33734
  import { spawn as spawn4 } from "child_process";
33724
- import { createHash as createHash2 } from "crypto";
33735
+ import { createHash as createHash3 } from "crypto";
33725
33736
  import { fileURLToPath as fileURLToPath2 } from "url";
33726
33737
 
33727
33738
  // ../daemon/src/db-accessor.ts
@@ -33955,25 +33966,9 @@ function closeDbAccessor() {
33955
33966
  }
33956
33967
  }
33957
33968
 
33958
- // ../daemon/src/llm.ts
33959
- init_logger();
33960
- var provider = null;
33961
- function initLlmProvider(instance) {
33962
- if (provider) {
33963
- logger.warn("llm", "Provider already initialised, skipping");
33964
- return;
33965
- }
33966
- provider = instance;
33967
- }
33968
- function getLlmProvider() {
33969
- if (!provider) {
33970
- throw new Error("LlmProvider not initialised \u2014 call initLlmProvider() first");
33971
- }
33972
- return provider;
33973
- }
33974
- function closeLlmProvider() {
33975
- provider = null;
33976
- }
33969
+ // ../daemon/src/embedding-tracker.ts
33970
+ import { randomUUID } from "crypto";
33971
+ import { createHash } from "crypto";
33977
33972
 
33978
33973
  // ../daemon/src/db-helpers.ts
33979
33974
  function vectorToBlob(vec) {
@@ -34050,6 +34045,143 @@ function syncVecDeleteBySourceExceptHash(db, sourceType, sourceId, keepContentHa
34050
34045
  } catch {}
34051
34046
  }
34052
34047
 
34048
+ // ../daemon/src/embedding-tracker.ts
34049
+ init_logger();
34050
+ function startEmbeddingTracker(accessor2, embeddingCfg, trackerCfg, fetchEmbeddingFn, checkProviderFn) {
34051
+ let running = true;
34052
+ let timer = null;
34053
+ let inFlightPromise = null;
34054
+ let processed = 0;
34055
+ let failed = 0;
34056
+ let skippedCycles = 0;
34057
+ let lastCycleAt = null;
34058
+ let lastQueueDepth = 0;
34059
+ async function tick() {
34060
+ if (!running)
34061
+ return;
34062
+ try {
34063
+ const health = await checkProviderFn(embeddingCfg);
34064
+ if (!health.available) {
34065
+ skippedCycles++;
34066
+ return;
34067
+ }
34068
+ const staleRows = accessor2.withReadDb((db) => {
34069
+ return db.prepare(`SELECT m.id, m.content, m.content_hash AS contentHash,
34070
+ m.embedding_model AS currentModel
34071
+ FROM memories m
34072
+ LEFT JOIN embeddings e
34073
+ ON e.source_type = 'memory' AND e.source_id = m.id
34074
+ WHERE m.is_deleted = 0
34075
+ AND (
34076
+ e.id IS NULL
34077
+ OR e.content_hash <> m.content_hash
34078
+ OR (m.embedding_model IS NOT NULL
34079
+ AND m.embedding_model <> ?)
34080
+ )
34081
+ ORDER BY m.updated_at DESC
34082
+ LIMIT ?`).all(embeddingCfg.model, trackerCfg.batchSize);
34083
+ });
34084
+ lastQueueDepth = staleRows.length;
34085
+ lastCycleAt = new Date().toISOString();
34086
+ if (staleRows.length === 0)
34087
+ return;
34088
+ const results = [];
34089
+ for (const row of staleRows) {
34090
+ if (!running)
34091
+ break;
34092
+ const vec = await fetchEmbeddingFn(row.content, embeddingCfg);
34093
+ if (vec !== null) {
34094
+ const hash = createHash("sha256").update(row.content).digest("hex");
34095
+ results.push({ row, vector: vec, contentHash: hash });
34096
+ } else {
34097
+ failed++;
34098
+ }
34099
+ }
34100
+ if (results.length === 0)
34101
+ return;
34102
+ accessor2.withWriteTx((db) => {
34103
+ for (const { row, vector, contentHash } of results) {
34104
+ syncVecDeleteBySourceExceptHash(db, "memory", row.id, contentHash);
34105
+ const embId = randomUUID();
34106
+ db.prepare(`INSERT INTO embeddings (id, source_type, source_id, content_hash, vector, created_at)
34107
+ VALUES (?, 'memory', ?, ?, ?, datetime('now'))
34108
+ ON CONFLICT(content_hash) DO UPDATE SET
34109
+ vector = excluded.vector,
34110
+ created_at = excluded.created_at`).run(embId, row.id, contentHash, vectorToBlob(vector));
34111
+ const actualRow = db.prepare("SELECT id FROM embeddings WHERE content_hash = ?").get(contentHash);
34112
+ if (actualRow) {
34113
+ syncVecInsert(db, actualRow.id, vector);
34114
+ }
34115
+ db.prepare("UPDATE memories SET embedding_model = ? WHERE id = ?").run(embeddingCfg.model, row.id);
34116
+ processed++;
34117
+ }
34118
+ });
34119
+ logger.debug("embedding-tracker", `Refreshed ${results.length} embeddings`);
34120
+ } catch (err) {
34121
+ logger.warn("embedding-tracker", "Cycle error", err instanceof Error ? err : new Error(String(err)));
34122
+ }
34123
+ }
34124
+ function schedule() {
34125
+ if (!running)
34126
+ return;
34127
+ timer = setTimeout(async () => {
34128
+ const p = tick();
34129
+ inFlightPromise = p;
34130
+ await p;
34131
+ inFlightPromise = null;
34132
+ schedule();
34133
+ }, trackerCfg.pollMs);
34134
+ }
34135
+ schedule();
34136
+ logger.info("embedding-tracker", `Started (poll=${trackerCfg.pollMs}ms, batch=${trackerCfg.batchSize})`);
34137
+ return {
34138
+ get running() {
34139
+ return running;
34140
+ },
34141
+ getStats() {
34142
+ return {
34143
+ running,
34144
+ processed,
34145
+ failed,
34146
+ skippedCycles,
34147
+ lastCycleAt,
34148
+ queueDepth: lastQueueDepth
34149
+ };
34150
+ },
34151
+ async stop() {
34152
+ running = false;
34153
+ if (timer !== null) {
34154
+ clearTimeout(timer);
34155
+ timer = null;
34156
+ }
34157
+ if (inFlightPromise) {
34158
+ await inFlightPromise;
34159
+ }
34160
+ logger.info("embedding-tracker", "Stopped");
34161
+ }
34162
+ };
34163
+ }
34164
+
34165
+ // ../daemon/src/llm.ts
34166
+ init_logger();
34167
+ var provider = null;
34168
+ function initLlmProvider(instance) {
34169
+ if (provider) {
34170
+ logger.warn("llm", "Provider already initialised, skipping");
34171
+ return;
34172
+ }
34173
+ provider = instance;
34174
+ }
34175
+ function getLlmProvider() {
34176
+ if (!provider) {
34177
+ throw new Error("LlmProvider not initialised \u2014 call initLlmProvider() first");
34178
+ }
34179
+ return provider;
34180
+ }
34181
+ function closeLlmProvider() {
34182
+ provider = null;
34183
+ }
34184
+
34053
34185
  // ../../node_modules/.bun/libsodium@0.8.2/node_modules/libsodium/dist/modules-esm/libsodium.mjs
34054
34186
  var A = {};
34055
34187
  (function() {
@@ -42285,7 +42417,7 @@ async function runShadowDecisions(facts, accessor2, provider2, cfg) {
42285
42417
  init_logger();
42286
42418
 
42287
42419
  // ../daemon/src/content-normalization.ts
42288
- import { createHash } from "crypto";
42420
+ import { createHash as createHash2 } from "crypto";
42289
42421
  var TRAILING_PUNCTUATION = /[.,!?;:]+$/;
42290
42422
  function normalizeContentForStorage(content) {
42291
42423
  return content.trim().replace(/\s+/g, " ");
@@ -42298,7 +42430,7 @@ function normalizeAndHashContent(content) {
42298
42430
  const storageContent = normalizeContentForStorage(content);
42299
42431
  const normalizedContent = deriveNormalizedContent(storageContent);
42300
42432
  const hashBasis = normalizedContent.length > 0 ? normalizedContent : storageContent.toLowerCase();
42301
- const contentHash = createHash("sha256").update(hashBasis).digest("hex");
42433
+ const contentHash = createHash2("sha256").update(hashBasis).digest("hex");
42302
42434
  return { storageContent, normalizedContent, hashBasis, contentHash };
42303
42435
  }
42304
42436
 
@@ -72487,6 +72619,7 @@ var providerTracker = createProviderTracker();
72487
72619
  var analyticsCollector = createAnalyticsCollector();
72488
72620
  var repairLimiter = createRateLimiter();
72489
72621
  var telemetryRef;
72622
+ var embeddingTrackerHandle = null;
72490
72623
  var heartbeatTimer;
72491
72624
  var checkpointPruneTimer;
72492
72625
  var projectionInFlight = new Map;
@@ -73594,7 +73727,7 @@ function loadForgetCandidatesByIds(requestedIds, limit) {
73594
73727
  }
73595
73728
  function buildForgetConfirmToken(memoryIds) {
73596
73729
  const canonical = [...new Set(memoryIds)].sort().join("|");
73597
- return createHash2("sha256").update(canonical).digest("hex").slice(0, 32);
73730
+ return createHash3("sha256").update(canonical).digest("hex").slice(0, 32);
73598
73731
  }
73599
73732
  function parseModifyPatch(payload) {
73600
73733
  const patch = {};
@@ -74691,7 +74824,8 @@ app.get("/api/embeddings", async (c2) => {
74691
74824
  app.get("/api/embeddings/status", async (c2) => {
74692
74825
  const config2 = loadMemoryConfig(AGENTS_DIR4);
74693
74826
  const status = await checkEmbeddingProvider(config2.embedding);
74694
- return c2.json(status);
74827
+ const tracker = embeddingTrackerHandle?.getStats() ?? null;
74828
+ return c2.json({ ...status, tracker });
74695
74829
  });
74696
74830
  app.get("/api/embeddings/health", async (c2) => {
74697
74831
  const cfg = loadMemoryConfig(AGENTS_DIR4);
@@ -76993,7 +77127,7 @@ async function syncClaudeMemoryFile(filePath) {
76993
77127
  return 0;
76994
77128
  const match2 = filePath.match(/projects\/([^/]+)\/memory/);
76995
77129
  const projectId = match2 ? match2[1] : "unknown";
76996
- const contentHash = createHash2("sha256").update(content).digest("hex").slice(0, 16);
77130
+ const contentHash = createHash3("sha256").update(content).digest("hex").slice(0, 16);
76997
77131
  const existingHash = ingestedMemoryFiles.get(filePath);
76998
77132
  if (existingHash === contentHash) {
76999
77133
  logger.debug("watcher", "Claude memory file unchanged, skipping", {
@@ -77008,7 +77142,7 @@ async function syncClaudeMemoryFile(filePath) {
77008
77142
  const chunk = chunks[i3];
77009
77143
  const sectionMatch = chunk.header.match(/^#+\s+(.+)$/);
77010
77144
  const sectionName = sectionMatch ? sectionMatch[1].toLowerCase() : "";
77011
- const chunkKey = `claude:${projectId}:${createHash2("sha256").update(chunk.text).digest("hex").slice(0, 16)}`;
77145
+ const chunkKey = `claude:${projectId}:${createHash3("sha256").update(chunk.text).digest("hex").slice(0, 16)}`;
77012
77146
  if (syncedClaudeMemories.has(chunkKey))
77013
77147
  continue;
77014
77148
  syncedClaudeMemories.add(chunkKey);
@@ -77204,7 +77338,7 @@ async function ingestMemoryMarkdown(filePath) {
77204
77338
  }
77205
77339
  if (!content.trim())
77206
77340
  return 0;
77207
- const hash2 = createHash2("sha256").update(content).digest("hex").slice(0, 16);
77341
+ const hash2 = createHash3("sha256").update(content).digest("hex").slice(0, 16);
77208
77342
  if (ingestedMemoryFiles.get(filePath) === hash2) {
77209
77343
  logger.debug("watcher", "Memory file unchanged, skipping", {
77210
77344
  path: filePath
@@ -77219,7 +77353,7 @@ async function ingestMemoryMarkdown(filePath) {
77219
77353
  let inserted = 0;
77220
77354
  for (let i3 = 0;i3 < chunks.length; i3++) {
77221
77355
  const chunk = chunks[i3];
77222
- const chunkKey = `openclaw:${filename}:${createHash2("sha256").update(chunk.text).digest("hex").slice(0, 16)}`;
77356
+ const chunkKey = `openclaw:${filename}:${createHash3("sha256").update(chunk.text).digest("hex").slice(0, 16)}`;
77223
77357
  try {
77224
77358
  const response = await fetch(`http://${HOST}:${PORT}/api/memory/remember`, {
77225
77359
  method: "POST",
@@ -77310,6 +77444,12 @@ async function cleanup() {
77310
77444
  } catch {}
77311
77445
  telemetryRef = undefined;
77312
77446
  }
77447
+ if (embeddingTrackerHandle) {
77448
+ try {
77449
+ await embeddingTrackerHandle.stop();
77450
+ } catch {}
77451
+ embeddingTrackerHandle = null;
77452
+ }
77313
77453
  try {
77314
77454
  flushPendingCheckpoints();
77315
77455
  } catch {}
@@ -77443,6 +77583,9 @@ async function main() {
77443
77583
  } else {
77444
77584
  startRetentionWorker(getDbAccessor(), DEFAULT_RETENTION);
77445
77585
  }
77586
+ if (memoryCfg.embedding.provider !== "none" && memoryCfg.pipelineV2.embeddingTracker.enabled) {
77587
+ embeddingTrackerHandle = startEmbeddingTracker(getDbAccessor(), memoryCfg.embedding, memoryCfg.pipelineV2.embeddingTracker, fetchEmbedding, checkEmbeddingProvider);
77588
+ }
77446
77589
  initCheckpointFlush(getDbAccessor());
77447
77590
  const schedulerHandle = startSchedulerWorker(getDbAccessor());
77448
77591
  checkpointPruneTimer = setInterval(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Portable AI agent identity - own your agent, bring it anywhere",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/BMtDTa8K.js";export{o as load_css,r as start};