signetai 0.48.1 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/_app/immutable/chunks/{Cq7QYdem.js → BBZlHmQX.js} +1 -1
- package/dashboard/_app/immutable/entry/{app.BcyCz0nL.js → app.C-wSMkto.js} +2 -2
- package/dashboard/_app/immutable/entry/start.6V2jt2mF.js +1 -0
- package/dashboard/_app/immutable/nodes/{1.ZBYO9MUv.js → 1.C74VJOLo.js} +1 -1
- package/dashboard/_app/version.json +1 -1
- package/dashboard/index.html +6 -6
- package/dist/cli.js +36 -22
- package/dist/daemon.js +174 -50
- package/package.json +1 -1
- package/dashboard/_app/immutable/entry/start.BJOvA4wt.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as be,o as Ne,g as A,l as U,k as T,R as ee,bc as pt}from"./DD0ItAbu.js";class ke{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 Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function de({href:e}){return e.split("#")[0]}function vt(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 wt(...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 yt(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 bt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&F.delete(Re(e)),bt(e,t));const F=new Map;function kt(e,t){const n=Re(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&&F.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=yt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Et(e,t,n){if(F.size>0){const r=Re(e,n),a=F.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);F.delete(r)}}return window.fetch(t,n)}function Re(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="${wt(...a)}"]`}return r}const St=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Rt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(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 he(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return he(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=St.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 he(l)}).join("")}).join("")}/?$`),params:t}}function xt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(xt)}function At(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 he(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({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}=Rt(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return At(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 Ge(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function je(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_15g7zb0?.base??"",Tt=globalThis.__sveltekit_15g7zb0?.assets??x??"",Pt="1773069244512",Me="sveltekit:snapshot",He="sveltekit:scroll",We="sveltekit:states",It="sveltekit:pageurl",z="sveltekit:history",M="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Je(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const De={...N,"":N.hover};function Ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ye(e)}}function me(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||ce(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===xe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function te(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=Ye(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:De[r??"off"],preload_data:De[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function qe(e){const t=be(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 Qe={v:()=>{}};function Ot(){const{set:e,subscribe:t}=be(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Tt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Pt;return s&&(e(!0),Qe.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ce(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const Ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ze];const Ct=new Set([...Ze]);[...Ct];function $t(e){return e.filter(t=>t!=null)}function Le(e){return e instanceof ke||e instanceof Se?e.status:500}function Nt(e){return e instanceof Se?e.text:"Internal Error"}let k,H,pe;const jt=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());jt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},pe={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)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},pe=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},Qe.v=()=>pe.current=!0);function Dt(e){Object.assign(k,e)}const Ve={spanContext(){return qt},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}},qt={traceId:"",spanId:"",traceFlags:0},Vt=new Set(["icon","shortcut icon","apple-touch-icon"]),$=Ge(He)??{},W=Ge(Me)??{},C={url:qe({}),page:qe({}),navigating:be(null),updated:Ot()};function Ae(e){$[e]=D()}function zt(e,t){let n=e+1;for(;$[n];)delete $[n],n+=1;for(n=t+1;W[n];)delete W[n],n+=1}function J(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function et(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ze(){}let Ue,_e,ne,P,ve,w;const re=[],ae=[];let L=null;function we(){L?.fork?.then(e=>e?.discard()),L=null}const Z=new Map,tt=new Set,Kt=new Set,G=new Set;let _={branch:[],error:null,url:null},nt=!1,oe=!1,Ke=!0,Y=!1,B=!1,rt=!1,Te=!1,at,y,R,j;const se=new Set,Be=new Map;async function fn(e,t,n){globalThis.__sveltekit_15g7zb0?.data&&globalThis.__sveltekit_15g7zb0.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Ue=Ut(e),P=document.documentElement,ve=t,_e=e.nodes[0],ne=e.nodes[1],_e(),ne(),y=history.state?.[z],R=history.state?.[M],y||(y=R=Date.now(),history.replaceState({...history.state,[z]:y,[M]:R},""));const r=$[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(ve,n)):(await K({type:"enter",url:Je(w.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Bt(){re.length=0,Te=!1}function ot(e){ae.some(t=>t?.snapshot)&&(W[e]=ae.map(t=>t?.snapshot?.capture()))}function st(e){W[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Fe(){Ae(y),je(He,$),ot(R),je(Me,W)}async function Ft(e,t,n,r){let a;t.invalidateAll&&we(),await K({type:"goto",url:Je(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Te=!0,a=[...Be.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&ee().then(ee).then(()=>{Be.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Gt(e){if(e.id!==L?.id){we();const t={};se.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&we(),n)),fork:null}}return L.promise}async function ge(e){const t=(await ue(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),at=new w.root({target:t,props:{...e.props,stores:C,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),st(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:$[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(i=>i(a))}oe=!0}function ie({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=gt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:$t(n).map(u=>u.node.component),page:$e(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 Pe({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:Ve,current:Ve},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:vt(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}=lt(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 lt(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=oe?Et(r,a.href,t):kt(r,t);return{resolved:a,promise:i}}function Mt(e,t,n,r,a,i){if(Te)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(re.some(o=>o(new URL(s))))return!0;return!1}function Ie(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Ht(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 Wt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return se.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!==le(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Ht(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Mt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,Pe({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:Ie(m[0]?{type:"skip"}:null,m[0]?E?.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 Ee)return{type:"redirect",location:g.location};if(se.has(i))return Wt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Le(g),S;if(g instanceof ke)S=g.body;else{if(await C.updated.check())return await et(),await J(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const I=await Jt(m,v,s);return I?ie({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:E,error:S,route:a}):await ft(n,{id:a.id},S,E)}else v.push(void 0);return ie({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Jt(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 Oe({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Pe({loader:_e,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ie(i)}),o={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ee)return Ft(new URL(s.location,location.href),{},0);throw s}}async function Yt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>lt(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})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!ce(e,x,w.hash)){const n=await Yt(e);if(!n)return;const r=Xt(n);for(const a of Ue){const i=a.exec(r);if(i)return{id:le(e),invalidating:t,route:a,params:_t(i),url:e}}}}function Xt(e){return mt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function le(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ce(_,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 Y||tt.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=ze,block:d=ze,event:p}){const f=j;j=l;const u=await ue(t,!1),h=e==="enter"?Ce(_,u,t,e):ut({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(),Y=!0,oe&&h.navigation.type!=="enter"&&C.navigating.set(H.current=h.navigation);let g=u&&await ct(u);if(!g){if(ce(t,x,w.hash))return await J(t,i);g=await ft(t,{id:null},await X(new Se(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 Oe({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await C.updated.check()&&(await et(),await J(t,i));if(Bt(),Ae(v),ot(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,Q={[z]:y+=b,[M]:R+=b,[We]:s};(i?history.replaceState:history.pushState).call(history,Q,"",t),i||zt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(oe){const b=(await Promise.all(Array.from(Kt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(b.length>0){let q=function(){b.forEach(fe=>{G.delete(fe)})};b.push(q),b.forEach(fe=>{G.add(fe)})}_=g.state,g.props.page&&(g.props.page.url=t);const Q=E&&await E;Q?S=Q.commit():(at.$set(g.props),Dt(g.props.page),S=pt?.()),rt=!0}else await it(g,ve,!1);const{activeElement:I}=document;await S,await ee(),await ee();let O=null;if(Ke){const b=n?n.scroll:a?D():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(dt(t)))?O.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==I&&document.activeElement!==document.body;!r&&!ht&&rn(t,!O),Ke=!0,g.props.page&&Object.assign(k,g.props.page),Y=!1,e==="popstate"&&st(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),G.forEach(b=>b(h.navigation)),C.navigating.set(H.current=null)}async function ft(e,t,n,r,a){return e.origin===xe&&e.pathname===location.pathname&&!nt?await Oe({status:r,error:n,url:e,route:t}):await J(e,a)}function Qt(){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&&(ge(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Xe(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=me(c,x,w.hash);if(f||u)return;const h=te(c),v=p&&le(_.url)===le(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await ue(p,!1);if(!m)return;Gt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ge(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=me(o,x,w.hash);if(c||d)continue;const p=te(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ge(l))}}G.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=Nt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Zt(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Fe(),!Y){const r=Ce(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};tt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fe()}),navigator.connection?.saveData||Qt(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Xe(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=me(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=te(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===de(location);if(a||o.reload&&(!p||!d)){ut({url:r,type:"link",event:t})?Y=!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,Ae(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(ce(s,x,!1))return;const o=t.target,l=te(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(!ye){if(t.state?.[z]){const n=t.state[z];if(j={},n===y)return;const r=$[n],a=t.state[We]??{},i=new URL(t.state[It]??location.href),s=t.state[M],o=_.url?de(location)===de(_.url):!1;if(s===R&&(rt||o)){a!==k.state&&(k.state=a),e(i),$[y]=D(),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),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{B&&(B=!1,history.replaceState({...history.state,[z]:++y,[M]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Vt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(H.current=null)});function e(t){_.url=k.url=t,C.page.set($e(k)),C.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){nt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await ue(c,!1)||{}),d=Ue.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=nn(g.uses)),Pe({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Ie(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=ie({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ee){await J(new URL(u.location,location.href));return}p=await Oe({status:Le(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await it(p,e,f)}function nn(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 ye=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=dt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;ye=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ye=!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 Ce(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:D()},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 $e(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 an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,sn as l,k as p,C as s};
|
|
1
|
+
import{bb as be,o as Ne,g as A,l as U,k as T,R as ee,bc as pt}from"./DD0ItAbu.js";class ke{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 Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function de({href:e}){return e.split("#")[0]}function vt(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 wt(...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 yt(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 bt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Re(e)),bt(e,t));const G=new Map;function kt(e,t){const n=Re(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=yt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Et(e,t,n){if(G.size>0){const r=Re(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 Re(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="${wt(...a)}"]`}return r}const St=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Rt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(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 he(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return he(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=St.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 he(l)}).join("")}).join("")}/?$`),params:t}}function xt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(xt)}function At(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 he(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({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}=Rt(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return At(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 Me(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function je(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_1ogvvbl?.base??"",Tt=globalThis.__sveltekit_1ogvvbl?.assets??x??"",Pt="1773076965872",He="sveltekit:snapshot",We="sveltekit:scroll",Je="sveltekit:states",It="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Ye(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const De={...N,"":N.hover};function ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=ze(e)}}function me(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||ce(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===xe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function te(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=ze(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:De[r??"off"],preload_data:De[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function qe(e){const t=be(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 Qe={v:()=>{}};function Ot(){const{set:e,subscribe:t}=be(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Tt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Pt;return s&&(e(!0),Qe.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ce(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const Ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ze];const Ct=new Set([...Ze]);[...Ct];function $t(e){return e.filter(t=>t!=null)}function Le(e){return e instanceof ke||e instanceof Se?e.status:500}function Nt(e){return e instanceof Se?e.text:"Internal Error"}let k,W,pe;const jt=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());jt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},pe={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)}},pe=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},Qe.v=()=>pe.current=!0);function Dt(e){Object.assign(k,e)}const Ve={spanContext(){return qt},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}},qt={traceId:"",spanId:"",traceFlags:0},Vt=new Set(["icon","shortcut icon","apple-touch-icon"]),$=Me(We)??{},J=Me(He)??{},C={url:qe({}),page:qe({}),navigating:be(null),updated:Ot()};function Ae(e){$[e]=D()}function Kt(e,t){let n=e+1;for(;$[n];)delete $[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 et(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ke(){}let Ue,_e,ne,P,ve,w;const re=[],ae=[];let L=null;function we(){L?.fork?.then(e=>e?.discard()),L=null}const Z=new Map,tt=new Set,Bt=new Set,M=new Set;let _={branch:[],error:null,url:null},nt=!1,oe=!1,Be=!0,z=!1,F=!1,rt=!1,Te=!1,at,y,R,j;const se=new Set,Fe=new Map;async function fn(e,t,n){globalThis.__sveltekit_1ogvvbl?.data&&globalThis.__sveltekit_1ogvvbl.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Ue=Ut(e),P=document.documentElement,ve=t,_e=e.nodes[0],ne=e.nodes[1],_e(),ne(),y=history.state?.[K],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[K]:y,[H]:R},""));const r=$[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(ve,n)):(await B({type:"enter",url:Ye(w.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Ft(){re.length=0,Te=!1}function ot(e){ae.some(t=>t?.snapshot)&&(J[e]=ae.map(t=>t?.snapshot?.capture()))}function st(e){J[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Ge(){Ae(y),je(We,$),ot(R),je(He,J)}async function Gt(e,t,n,r){let a;t.invalidateAll&&we(),await B({type:"goto",url:Ye(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Te=!0,a=[...Fe.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&ee().then(ee).then(()=>{Fe.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Mt(e){if(e.id!==L?.id){we();const t={};se.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&we(),n)),fork:null}}return L.promise}async function ge(e){const t=(await ue(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),at=new w.root({target:t,props:{...e.props,stores:C,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),st(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:$[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}oe=!0}function ie({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=gt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:$t(n).map(u=>u.node.component),page:$e(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 Pe({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:Ve,current:Ve},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:vt(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}=lt(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 lt(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=oe?Et(r,a.href,t):kt(r,t);return{resolved:a,promise:i}}function Ht(e,t,n,r,a,i){if(Te)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(re.some(o=>o(new URL(s))))return!0;return!1}function Ie(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Wt(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 Jt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return se.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!==le(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Wt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Ht(u,p,d,f,E.universal?.uses,r)?E:(u=!0,Pe({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:Ie(m[0]?{type:"skip"}:null,m[0]?E?.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 Ee)return{type:"redirect",location:g.location};if(se.has(i))return Jt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Le(g),S;if(g instanceof ke)S=g.body;else{if(await C.updated.check())return await et(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const I=await Yt(m,v,s);return I?ie({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:E,error:S,route:a}):await ft(n,{id:a.id},S,E)}else v.push(void 0);return ie({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Yt(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 Oe({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Pe({loader:_e,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ie(i)}),o={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ee)return Gt(new URL(s.location,location.href),{},0);throw s}}async function zt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>lt(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})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!ce(e,x,w.hash)){const n=await zt(e);if(!n)return;const r=Xt(n);for(const a of Ue){const i=a.exec(r);if(i)return{id:le(e),invalidating:t,route:a,params:_t(i),url:e}}}}function Xt(e){return mt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function le(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ce(_,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 z||tt.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=Ke,block:d=Ke,event:p}){const f=j;j=l;const u=await ue(t,!1),h=e==="enter"?Ce(_,u,t,e):ut({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(),z=!0,oe&&h.navigation.type!=="enter"&&C.navigating.set(W.current=h.navigation);let g=u&&await ct(u);if(!g){if(ce(t,x,w.hash))return await Y(t,i);g=await ft(t,{id:null},await X(new Se(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 Oe({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await C.updated.check()&&(await et(),await Y(t,i));if(Ft(),Ae(v),ot(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,Q={[K]:y+=b,[H]:R+=b,[Je]:s};(i?history.replaceState:history.pushState).call(history,Q,"",t),i||Kt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(oe){const b=(await Promise.all(Array.from(Bt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(b.length>0){let q=function(){b.forEach(fe=>{M.delete(fe)})};b.push(q),b.forEach(fe=>{M.add(fe)})}_=g.state,g.props.page&&(g.props.page.url=t);const Q=E&&await E;Q?S=Q.commit():(at.$set(g.props),Dt(g.props.page),S=pt?.()),rt=!0}else await it(g,ve,!1);const{activeElement:I}=document;await S,await ee(),await ee();let O=null;if(Be){const b=n?n.scroll:a?D():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(dt(t)))?O.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==I&&document.activeElement!==document.body;!r&&!ht&&rn(t,!O),Be=!0,g.props.page&&Object.assign(k,g.props.page),z=!1,e==="popstate"&&st(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(b=>b(h.navigation)),C.navigating.set(W.current=null)}async function ft(e,t,n,r,a){return e.origin===xe&&e.pathname===location.pathname&&!nt?await Oe({status:r,error:n,url:e,route:t}):await Y(e,a)}function Qt(){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&&(ge(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Xe(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=me(c,x,w.hash);if(f||u)return;const h=te(c),v=p&&le(_.url)===le(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await ue(p,!1);if(!m)return;Mt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ge(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=me(o,x,w.hash);if(c||d)continue;const p=te(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ge(l))}}M.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=Nt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Zt(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ge(),!z){const r=Ce(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};tt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ge()}),navigator.connection?.saveData||Qt(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Xe(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=me(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=te(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===de(location);if(a||o.reload&&(!p||!d)){ut({url:r,type:"link",event:t})?z=!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(F=!0,Ae(y),e(r),!o.replace_state)return;F=!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(ce(s,x,!1))return;const o=t.target,l=te(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(!ye){if(t.state?.[K]){const n=t.state[K];if(j={},n===y)return;const r=$[n],a=t.state[Je]??{},i=new URL(t.state[It]??location.href),s=t.state[H],o=_.url?de(location)===de(_.url):!1;if(s===R&&(rt||o)){a!==k.state&&(k.state=a),e(i),$[y]=D(),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(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[K]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Vt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(W.current=null)});function e(t){_.url=k.url=t,C.page.set($e(k)),C.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){nt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await ue(c,!1)||{}),d=Ue.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=nn(g.uses)),Pe({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Ie(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=ie({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ee){await Y(new URL(u.location,location.href));return}p=await Oe({status:Le(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await it(p,e,f)}function nn(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 ye=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=dt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;ye=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ye=!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 Ce(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:D()},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 $e(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 an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,sn as l,k as p,C as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.JInJb77P.js","../chunks/DD0ItAbu.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.BQmYtRoY.css","../nodes/1.
|
|
2
|
-
import{_ as v}from"../chunks/PPVm8Dsz.js";import{p as M,F as g,a7 as Q,Q as B,o as H,l as i,k as h,R as J,f as l,w as b,j as N,b as d,d as S,g as p,c as E,G as P,K as O,i as U,v as W,D as A,z as x,t as X,q as Y,u as Z,a8 as $}from"../chunks/DD0ItAbu.js";const it={};var tt=A('<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>'),et=A("<!> <!>",1);function at(a,t){M(t,!0);let r=g(t,"components",23,()=>[]),_=g(t,"data_0",3,null),y=g(t,"data_1",3,null);Q(()=>t.stores.page.set(t.page)),B(()=>{t.stores,t.page,t.constructors,r(),t.form,_(),y(),t.stores.page.notify()});let f=p(!1),j=p(!1),w=p(null);H(()=>{const e=t.stores.page.subscribe(()=>{i(f)&&(h(j,!0),J().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const L=x(()=>t.constructors[1]);var R=et(),k=l(R);{var T=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=l(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return _()},get form(){return t.form},get params(){return t.page.params},children:(u,st)=>{var D=E(),z=l(D);P(z,()=>i(L),(F,G)=>{O(G(F,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),K=>r()[1]=K,()=>r()?.[1])}),d(u,D)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},V=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=l(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(T):e(V,!1)})}var C=N(k,2);{var q=e=>{var s=tt(),o=U(s);{var m=n=>{var c=X();Y(()=>Z(c,i(w))),d(n,c)};b(o,n=>{i(j)&&n(m)})}W(s),d(e,s)};b(C,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.JInJb77P.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.JInJb77P.js","../chunks/DD0ItAbu.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.BQmYtRoY.css","../nodes/1.C74VJOLo.js","../chunks/BBZlHmQX.js","../nodes/2.BpzYeBtB.js","../chunks/DjvoUx3L.js","../chunks/Bdj9FDJv.js","../chunks/PPVm8Dsz.js","../assets/2.DxI1SNVc.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as v}from"../chunks/PPVm8Dsz.js";import{p as M,F as g,a7 as Q,Q as B,o as H,l as i,k as h,R as J,f as l,w as b,j as N,b as d,d as S,g as p,c as E,G as P,K as O,i as U,v as W,D as A,z as x,t as X,q as Y,u as Z,a8 as $}from"../chunks/DD0ItAbu.js";const it={};var tt=A('<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>'),et=A("<!> <!>",1);function at(a,t){M(t,!0);let r=g(t,"components",23,()=>[]),_=g(t,"data_0",3,null),y=g(t,"data_1",3,null);Q(()=>t.stores.page.set(t.page)),B(()=>{t.stores,t.page,t.constructors,r(),t.form,_(),y(),t.stores.page.notify()});let f=p(!1),j=p(!1),w=p(null);H(()=>{const e=t.stores.page.subscribe(()=>{i(f)&&(h(j,!0),J().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const L=x(()=>t.constructors[1]);var R=et(),k=l(R);{var T=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=l(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return _()},get form(){return t.form},get params(){return t.page.params},children:(u,st)=>{var D=E(),z=l(D);P(z,()=>i(L),(F,G)=>{O(G(F,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),K=>r()[1]=K,()=>r()?.[1])}),d(u,D)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},V=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=l(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(T):e(V,!1)})}var C=N(k,2);{var q=e=>{var s=tt(),o=U(s);{var m=n=>{var c=X();Y(()=>Z(c,i(w))),d(n,c)};b(o,n=>{i(j)&&n(m)})}W(s),d(e,s)};b(C,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.JInJb77P.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.C74VJOLo.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>v(()=>import("../nodes/2.BpzYeBtB.js"),__vite__mapDeps([6,7,8,9,1,2,10]),import.meta.url)],mt=[],ut={"/":[2]},I={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(I.transport).map(([a,t])=>[a,t.decode])),lt=Object.fromEntries(Object.entries(I.transport).map(([a,t])=>[a,t.encode])),_t=!1,ft=(a,t)=>rt[a](t);export{ft as decode,rt as decoders,ut as dictionary,lt as encoders,_t as hash,I as hooks,it as matchers,dt as nodes,ct as root,mt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/BBZlHmQX.js";export{o as load_css,r as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as m,Z as h,f as g,q as v,b as d,d as l,D as _,i as s,v as a,j as x,u as o}from"../chunks/DD0ItAbu.js";import{s as $,p}from"../chunks/
|
|
1
|
+
import{p as m,Z as h,f as g,q as v,b as d,d as l,D as _,i as s,v as a,j as x,u as o}from"../chunks/DD0ItAbu.js";import{s as $,p}from"../chunks/BBZlHmQX.js";const b={get error(){return p.error},get status(){return p.status}};$.updated.check;const n=b;var k=_("<h1> </h1> <p> </p>",1);function D(c,i){m(i,!1),h();var r=k(),t=g(r),u=s(t,!0);a(t);var e=x(t,2),f=s(e,!0);a(e),v(()=>{o(u,n.status),o(f,n.error?.message)}),d(c,r),l()}export{D as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1773076965872"}
|
package/dashboard/index.html
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
document.documentElement.dataset.theme = t;
|
|
18
18
|
})();
|
|
19
19
|
</script>
|
|
20
|
-
<link href="/_app/immutable/entry/start.
|
|
21
|
-
<link href="/_app/immutable/chunks/
|
|
20
|
+
<link href="/_app/immutable/entry/start.6V2jt2mF.js" rel="modulepreload">
|
|
21
|
+
<link href="/_app/immutable/chunks/BBZlHmQX.js" rel="modulepreload">
|
|
22
22
|
<link href="/_app/immutable/chunks/DD0ItAbu.js" rel="modulepreload">
|
|
23
|
-
<link href="/_app/immutable/entry/app.
|
|
23
|
+
<link href="/_app/immutable/entry/app.C-wSMkto.js" rel="modulepreload">
|
|
24
24
|
<link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
|
|
25
25
|
|
|
26
26
|
<link href="/_app/immutable/assets/vendor-ui.BHIBfuhK.css" rel="stylesheet">
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
<div style="display: contents">
|
|
30
30
|
<script>
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
__sveltekit_1ogvvbl = {
|
|
33
33
|
base: ""
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const element = document.currentScript.parentElement;
|
|
37
37
|
|
|
38
38
|
Promise.all([
|
|
39
|
-
import("/_app/immutable/entry/start.
|
|
40
|
-
import("/_app/immutable/entry/app.
|
|
39
|
+
import("/_app/immutable/entry/start.6V2jt2mF.js"),
|
|
40
|
+
import("/_app/immutable/entry/app.C-wSMkto.js")
|
|
41
41
|
]).then(([kit, app]) => {
|
|
42
42
|
kit.start(app, element);
|
|
43
43
|
});
|
package/dist/cli.js
CHANGED
|
@@ -3291,30 +3291,44 @@ function hybridSearch(db, queryVector, queryText, options) {
|
|
|
3291
3291
|
const minScore = options?.minScore ?? 0.1;
|
|
3292
3292
|
const vectorResults = queryVector ? vectorSearch(db, queryVector, { limit: topK, type: options?.type }) : [];
|
|
3293
3293
|
const keywordResults = keywordSearch(db, queryText, topK);
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3294
|
+
let scored;
|
|
3295
|
+
if (native5 !== null) {
|
|
3296
|
+
const narrowSource = (s) => {
|
|
3297
|
+
if (s === "vector" || s === "keyword" || s === "hybrid")
|
|
3298
|
+
return s;
|
|
3299
|
+
return "keyword";
|
|
3300
|
+
};
|
|
3301
|
+
scored = native5.mergeHybridScores(vectorResults.map((r) => r.id), vectorResults.map((r) => r.score), keywordResults.map((r) => r.id), keywordResults.map((r) => r.score), alpha, minScore).map((r) => ({
|
|
3302
|
+
id: r.id,
|
|
3303
|
+
score: r.score,
|
|
3304
|
+
source: narrowSource(r.source)
|
|
3305
|
+
}));
|
|
3306
|
+
} else {
|
|
3307
|
+
const vectorMap = new Map(vectorResults.map((r) => [r.id, r.score]));
|
|
3308
|
+
const keywordMap = new Map(keywordResults.map((r) => [r.id, r.score]));
|
|
3309
|
+
const allIds = new Set([...vectorMap.keys(), ...keywordMap.keys()]);
|
|
3310
|
+
scored = [];
|
|
3311
|
+
for (const id of allIds) {
|
|
3312
|
+
const vectorScore = vectorMap.get(id) ?? 0;
|
|
3313
|
+
const keywordScore = keywordMap.get(id) ?? 0;
|
|
3314
|
+
let score;
|
|
3315
|
+
let source;
|
|
3316
|
+
if (vectorScore > 0 && keywordScore > 0) {
|
|
3317
|
+
score = alpha * vectorScore + (1 - alpha) * keywordScore;
|
|
3318
|
+
source = "hybrid";
|
|
3319
|
+
} else if (vectorScore > 0) {
|
|
3320
|
+
score = vectorScore;
|
|
3321
|
+
source = "vector";
|
|
3322
|
+
} else {
|
|
3323
|
+
score = keywordScore;
|
|
3324
|
+
source = "keyword";
|
|
3325
|
+
}
|
|
3326
|
+
if (score >= minScore) {
|
|
3327
|
+
scored.push({ id, score, source });
|
|
3328
|
+
}
|
|
3315
3329
|
}
|
|
3330
|
+
scored.sort((a, b) => b.score - a.score);
|
|
3316
3331
|
}
|
|
3317
|
-
scored.sort((a, b) => b.score - a.score);
|
|
3318
3332
|
const topIds = scored.slice(0, limit).map((s) => s.id);
|
|
3319
3333
|
if (topIds.length === 0) {
|
|
3320
3334
|
return [];
|
package/dist/daemon.js
CHANGED
|
@@ -31702,8 +31702,17 @@ async function handleUserPromptSubmit(req) {
|
|
|
31702
31702
|
}
|
|
31703
31703
|
}
|
|
31704
31704
|
}
|
|
31705
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
31706
|
+
const now3 = new Date().toLocaleString("en-US", {
|
|
31707
|
+
timeZone: tz,
|
|
31708
|
+
dateStyle: "full",
|
|
31709
|
+
timeStyle: "short"
|
|
31710
|
+
});
|
|
31711
|
+
const metadataHeader = `# Current Date & Time
|
|
31712
|
+
${now3} (${tz})
|
|
31713
|
+
`;
|
|
31705
31714
|
if (keywordTerms.length < 1 || vectorQuery.length === 0 || !existsSync14(MEMORY_DB)) {
|
|
31706
|
-
return { inject:
|
|
31715
|
+
return { inject: metadataHeader, memoryCount: 0 };
|
|
31707
31716
|
}
|
|
31708
31717
|
try {
|
|
31709
31718
|
const cfg = loadMemoryConfig(AGENTS_DIR2);
|
|
@@ -31714,7 +31723,7 @@ async function handleUserPromptSubmit(req) {
|
|
|
31714
31723
|
importance_min: 0.3
|
|
31715
31724
|
}, cfg, fetchEmbedding);
|
|
31716
31725
|
if (recall.results.length === 0 || typeof recall.results[0]?.score !== "number" || recall.results[0].score < 0.4) {
|
|
31717
|
-
return { inject:
|
|
31726
|
+
return { inject: metadataHeader, memoryCount: 0 };
|
|
31718
31727
|
}
|
|
31719
31728
|
const budgetSelected = selectWithBudget(recall.results.map((result) => ({
|
|
31720
31729
|
...result,
|
|
@@ -31735,14 +31744,15 @@ async function handleUserPromptSubmit(req) {
|
|
|
31735
31744
|
}
|
|
31736
31745
|
}
|
|
31737
31746
|
if (selected.length === 0) {
|
|
31738
|
-
return { inject:
|
|
31747
|
+
return { inject: metadataHeader, memoryCount: 0 };
|
|
31739
31748
|
}
|
|
31740
31749
|
const queryTerms = keywordTerms.join(" ");
|
|
31741
31750
|
const lines = selected.map((s2) => {
|
|
31742
31751
|
const dateStr = formatMemoryDate(s2.created_at);
|
|
31743
31752
|
return `- ${s2.content} (${dateStr})`;
|
|
31744
31753
|
});
|
|
31745
|
-
let inject =
|
|
31754
|
+
let inject = `${metadataHeader}
|
|
31755
|
+
[signet:recall | query="${queryTerms}" | results=${selected.length} | engine=hybrid]
|
|
31746
31756
|
${lines.join(`
|
|
31747
31757
|
`)}`;
|
|
31748
31758
|
const selectedIds = selected.map((s2) => s2.id);
|
|
@@ -33720,6 +33730,56 @@ var init_session_tracker = __esm(() => {
|
|
|
33720
33730
|
// ../daemon/src/pipeline/provider.ts
|
|
33721
33731
|
import { existsSync as existsSync16 } from "fs";
|
|
33722
33732
|
import { homedir as homedir11 } from "os";
|
|
33733
|
+
import { spawn as nodeSpawn } from "child_process";
|
|
33734
|
+
function spawnHidden(cmd, options) {
|
|
33735
|
+
const proc = nodeSpawn(cmd[0], cmd.slice(1), {
|
|
33736
|
+
stdio: "pipe",
|
|
33737
|
+
windowsHide: true,
|
|
33738
|
+
env: options?.env
|
|
33739
|
+
});
|
|
33740
|
+
const stdout = new ReadableStream({
|
|
33741
|
+
start(controller) {
|
|
33742
|
+
proc.stdout?.on("data", (chunk) => controller.enqueue(new Uint8Array(chunk)));
|
|
33743
|
+
proc.stdout?.on("end", () => {
|
|
33744
|
+
try {
|
|
33745
|
+
controller.close();
|
|
33746
|
+
} catch {}
|
|
33747
|
+
});
|
|
33748
|
+
proc.stdout?.on("error", (err) => {
|
|
33749
|
+
try {
|
|
33750
|
+
controller.error(err);
|
|
33751
|
+
} catch {}
|
|
33752
|
+
});
|
|
33753
|
+
}
|
|
33754
|
+
});
|
|
33755
|
+
const stderr = new ReadableStream({
|
|
33756
|
+
start(controller) {
|
|
33757
|
+
proc.stderr?.on("data", (chunk) => controller.enqueue(new Uint8Array(chunk)));
|
|
33758
|
+
proc.stderr?.on("end", () => {
|
|
33759
|
+
try {
|
|
33760
|
+
controller.close();
|
|
33761
|
+
} catch {}
|
|
33762
|
+
});
|
|
33763
|
+
proc.stderr?.on("error", (err) => {
|
|
33764
|
+
try {
|
|
33765
|
+
controller.error(err);
|
|
33766
|
+
} catch {}
|
|
33767
|
+
});
|
|
33768
|
+
}
|
|
33769
|
+
});
|
|
33770
|
+
const exited = new Promise((resolve4) => {
|
|
33771
|
+
proc.on("close", (code) => resolve4(code ?? 1));
|
|
33772
|
+
proc.on("error", () => resolve4(1));
|
|
33773
|
+
});
|
|
33774
|
+
return {
|
|
33775
|
+
stdout,
|
|
33776
|
+
stderr,
|
|
33777
|
+
exited,
|
|
33778
|
+
kill(signal) {
|
|
33779
|
+
proc.kill(signal);
|
|
33780
|
+
}
|
|
33781
|
+
};
|
|
33782
|
+
}
|
|
33723
33783
|
async function generateWithTracking(provider3, prompt, opts) {
|
|
33724
33784
|
if (provider3.generateWithUsage) {
|
|
33725
33785
|
return provider3.generateWithUsage(prompt, opts);
|
|
@@ -33811,9 +33871,7 @@ function createClaudeCodeProvider(config) {
|
|
|
33811
33871
|
outputFormat
|
|
33812
33872
|
];
|
|
33813
33873
|
const { CLAUDECODE: _2, SIGNET_NO_HOOKS: __, ...cleanEnv } = process.env;
|
|
33814
|
-
const proc =
|
|
33815
|
-
stdout: "pipe",
|
|
33816
|
-
stderr: "pipe",
|
|
33874
|
+
const proc = spawnHidden(["claude", ...args], {
|
|
33817
33875
|
env: { ...cleanEnv, NO_COLOR: "1", SIGNET_NO_HOOKS: "1" }
|
|
33818
33876
|
});
|
|
33819
33877
|
let timedOut = false;
|
|
@@ -33883,9 +33941,7 @@ function createClaudeCodeProvider(config) {
|
|
|
33883
33941
|
},
|
|
33884
33942
|
async available() {
|
|
33885
33943
|
try {
|
|
33886
|
-
const proc =
|
|
33887
|
-
stdout: "pipe",
|
|
33888
|
-
stderr: "pipe",
|
|
33944
|
+
const proc = spawnHidden(["claude", "--version"], {
|
|
33889
33945
|
env: { ...process.env, SIGNET_NO_HOOKS: "1" }
|
|
33890
33946
|
});
|
|
33891
33947
|
const exitCode = await proc.exited;
|
|
@@ -33961,9 +34017,7 @@ function createCodexProvider(config) {
|
|
|
33961
34017
|
prompt
|
|
33962
34018
|
];
|
|
33963
34019
|
const { SIGNET_NO_HOOKS: _2, SIGNET_CODEX_BYPASS_WRAPPER: __, ...cleanEnv } = process.env;
|
|
33964
|
-
const proc =
|
|
33965
|
-
stdout: "pipe",
|
|
33966
|
-
stderr: "pipe",
|
|
34020
|
+
const proc = spawnHidden(["codex", ...args], {
|
|
33967
34021
|
env: {
|
|
33968
34022
|
...cleanEnv,
|
|
33969
34023
|
NO_COLOR: "1",
|
|
@@ -34004,9 +34058,7 @@ function createCodexProvider(config) {
|
|
|
34004
34058
|
},
|
|
34005
34059
|
async available() {
|
|
34006
34060
|
try {
|
|
34007
|
-
const proc =
|
|
34008
|
-
stdout: "pipe",
|
|
34009
|
-
stderr: "pipe",
|
|
34061
|
+
const proc = spawnHidden(["codex", "--version"], {
|
|
34010
34062
|
env: {
|
|
34011
34063
|
...process.env,
|
|
34012
34064
|
SIGNET_NO_HOOKS: "1",
|
|
@@ -43053,6 +43105,7 @@ __export(exports_spawn, {
|
|
|
43053
43105
|
spawnTask: () => spawnTask,
|
|
43054
43106
|
isHarnessAvailable: () => isHarnessAvailable
|
|
43055
43107
|
});
|
|
43108
|
+
import { spawn as nodeSpawn2 } from "child_process";
|
|
43056
43109
|
function buildCommand(harness, prompt, model) {
|
|
43057
43110
|
switch (harness) {
|
|
43058
43111
|
case "claude-code":
|
|
@@ -43090,27 +43143,61 @@ async function spawnTask(harness, prompt, workingDirectory, timeoutMs = DEFAULT_
|
|
|
43090
43143
|
cwd: workingDirectory
|
|
43091
43144
|
});
|
|
43092
43145
|
const { CLAUDECODE: _cc, SIGNET_NO_HOOKS: _2, ...baseEnv } = process.env;
|
|
43093
|
-
const
|
|
43146
|
+
const child = nodeSpawn2(resolvedBin, args, {
|
|
43094
43147
|
cwd: workingDirectory ?? undefined,
|
|
43095
|
-
|
|
43096
|
-
|
|
43148
|
+
stdio: "pipe",
|
|
43149
|
+
windowsHide: true,
|
|
43097
43150
|
env: { ...baseEnv, SIGNET_NO_HOOKS: "1" }
|
|
43098
43151
|
});
|
|
43152
|
+
const procStdout = new ReadableStream({
|
|
43153
|
+
start(controller) {
|
|
43154
|
+
child.stdout?.on("data", (chunk) => controller.enqueue(new Uint8Array(chunk)));
|
|
43155
|
+
child.stdout?.on("end", () => {
|
|
43156
|
+
try {
|
|
43157
|
+
controller.close();
|
|
43158
|
+
} catch {}
|
|
43159
|
+
});
|
|
43160
|
+
child.stdout?.on("error", (err) => {
|
|
43161
|
+
try {
|
|
43162
|
+
controller.error(err);
|
|
43163
|
+
} catch {}
|
|
43164
|
+
});
|
|
43165
|
+
}
|
|
43166
|
+
});
|
|
43167
|
+
const procStderr = new ReadableStream({
|
|
43168
|
+
start(controller) {
|
|
43169
|
+
child.stderr?.on("data", (chunk) => controller.enqueue(new Uint8Array(chunk)));
|
|
43170
|
+
child.stderr?.on("end", () => {
|
|
43171
|
+
try {
|
|
43172
|
+
controller.close();
|
|
43173
|
+
} catch {}
|
|
43174
|
+
});
|
|
43175
|
+
child.stderr?.on("error", (err) => {
|
|
43176
|
+
try {
|
|
43177
|
+
controller.error(err);
|
|
43178
|
+
} catch {}
|
|
43179
|
+
});
|
|
43180
|
+
}
|
|
43181
|
+
});
|
|
43182
|
+
const procExited = new Promise((resolve4) => {
|
|
43183
|
+
child.on("close", (code) => resolve4(code ?? 1));
|
|
43184
|
+
child.on("error", () => resolve4(1));
|
|
43185
|
+
});
|
|
43099
43186
|
let timedOut = false;
|
|
43100
43187
|
const timer = setTimeout(() => {
|
|
43101
43188
|
timedOut = true;
|
|
43102
|
-
|
|
43189
|
+
child.kill("SIGTERM");
|
|
43103
43190
|
setTimeout(() => {
|
|
43104
43191
|
try {
|
|
43105
|
-
|
|
43192
|
+
child.kill("SIGKILL");
|
|
43106
43193
|
} catch {}
|
|
43107
43194
|
}, 5000);
|
|
43108
43195
|
}, timeoutMs);
|
|
43109
43196
|
try {
|
|
43110
43197
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
43111
|
-
readProcessStream(
|
|
43112
|
-
readProcessStream(
|
|
43113
|
-
|
|
43198
|
+
readProcessStream(procStdout, hooks?.onStdoutChunk),
|
|
43199
|
+
readProcessStream(procStderr, hooks?.onStderrChunk),
|
|
43200
|
+
procExited
|
|
43114
43201
|
]);
|
|
43115
43202
|
clearTimeout(timer);
|
|
43116
43203
|
return {
|
|
@@ -50916,6 +51003,7 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
50916
51003
|
});
|
|
50917
51004
|
|
|
50918
51005
|
// ../daemon/src/umap-projection.ts
|
|
51006
|
+
import { createRequire as createRequire6 } from "module";
|
|
50919
51007
|
function squaredDistance(left, right) {
|
|
50920
51008
|
let distance = 0;
|
|
50921
51009
|
for (let index = 0;index < left.length; index += 1) {
|
|
@@ -51038,6 +51126,11 @@ function buildApproximateKnnEdges(projected, k2) {
|
|
|
51038
51126
|
return result;
|
|
51039
51127
|
}
|
|
51040
51128
|
function buildKnnEdges(projected, k2) {
|
|
51129
|
+
if (nativeKnn !== null) {
|
|
51130
|
+
const mutableCoords = projected.map((p2) => [...p2]);
|
|
51131
|
+
const edges = nativeKnn.buildKnnEdges(mutableCoords, k2, KNN_EXACT_THRESHOLD);
|
|
51132
|
+
return edges.map((e) => [e[0], e[1]]);
|
|
51133
|
+
}
|
|
51041
51134
|
if (projected.length <= KNN_EXACT_THRESHOLD)
|
|
51042
51135
|
return buildExactKnnEdges(projected, k2);
|
|
51043
51136
|
return buildApproximateKnnEdges(projected, k2);
|
|
@@ -51185,13 +51278,29 @@ function computeProjectionFromRows(rows, nComponents) {
|
|
|
51185
51278
|
edges: [[0, 1]]
|
|
51186
51279
|
};
|
|
51187
51280
|
}
|
|
51188
|
-
const vectors = rows.map((row) =>
|
|
51281
|
+
const vectors = rows.map((row) => {
|
|
51282
|
+
const full = blobToVector2(row.vector, row.dimensions);
|
|
51283
|
+
return full.length > UMAP_MAX_DIMENSIONS ? full.slice(0, UMAP_MAX_DIMENSIONS) : full;
|
|
51284
|
+
});
|
|
51189
51285
|
const nNeighbors = Math.min(15, Math.max(2, vectors.length - 1));
|
|
51190
51286
|
const umap = new import_umap_js.UMAP({ nComponents, nNeighbors, minDist: 0.1, spread: 1 });
|
|
51191
51287
|
const projected = umap.fit(vectors);
|
|
51192
|
-
|
|
51193
|
-
|
|
51194
|
-
|
|
51288
|
+
let xs;
|
|
51289
|
+
let ys;
|
|
51290
|
+
let zs;
|
|
51291
|
+
if (nativeKnn !== null) {
|
|
51292
|
+
const rawXs = projected.map((point) => point[0]);
|
|
51293
|
+
const rawYs = projected.map((point) => point[1]);
|
|
51294
|
+
const rawZs = nComponents === 3 ? projected.map((point) => point[2] ?? 0) : null;
|
|
51295
|
+
const norm = nativeKnn.normaliseAxes(rawXs, rawYs, rawZs, SCALE);
|
|
51296
|
+
xs = norm.xs;
|
|
51297
|
+
ys = norm.ys;
|
|
51298
|
+
zs = norm.zs ?? null;
|
|
51299
|
+
} else {
|
|
51300
|
+
xs = normaliseAxis(projected.map((point) => point[0]));
|
|
51301
|
+
ys = normaliseAxis(projected.map((point) => point[1]));
|
|
51302
|
+
zs = nComponents === 3 ? normaliseAxis(projected.map((point) => point[2] ?? 0)) : null;
|
|
51303
|
+
}
|
|
51195
51304
|
const nodes = buildNodesFromRows(rows, xs, ys, zs);
|
|
51196
51305
|
const edges = buildKnnEdges(projected, KNN_K);
|
|
51197
51306
|
return { nodes, edges };
|
|
@@ -51233,7 +51342,7 @@ function cacheProjection(db, nComponents, payload, embeddingCount) {
|
|
|
51233
51342
|
db.prepare("DELETE FROM umap_cache WHERE dimensions = ?").run(nComponents);
|
|
51234
51343
|
db.prepare("INSERT INTO umap_cache (dimensions, embedding_count, payload, created_at) VALUES (?, ?, ?, ?)").run(nComponents, embeddingCount, JSON.stringify(payload), new Date().toISOString());
|
|
51235
51344
|
}
|
|
51236
|
-
var import_umap_js, SCALE = 420, KNN_K = 4, KNN_EXACT_THRESHOLD = 450, KNN_APPROX_WINDOW_MULTIPLIER = 6, EMBEDDINGS_SELECT_SQL = `
|
|
51345
|
+
var import_umap_js, nativeKnn = null, SCALE = 420, KNN_K = 4, KNN_EXACT_THRESHOLD = 450, KNN_APPROX_WINDOW_MULTIPLIER = 6, UMAP_MAX_DIMENSIONS = 64, EMBEDDINGS_SELECT_SQL = `
|
|
51237
51346
|
SELECT m.id, m.content, m.who, m.importance, m.type, m.tags, m.pinned,
|
|
51238
51347
|
m.source_type, m.source_id, m.created_at,
|
|
51239
51348
|
e.vector, e.dimensions
|
|
@@ -51245,6 +51354,10 @@ var import_umap_js, SCALE = 420, KNN_K = 4, KNN_EXACT_THRESHOLD = 450, KNN_APPRO
|
|
|
51245
51354
|
`;
|
|
51246
51355
|
var init_umap_projection = __esm(() => {
|
|
51247
51356
|
import_umap_js = __toESM(require_dist2(), 1);
|
|
51357
|
+
try {
|
|
51358
|
+
const esmRequire = createRequire6(import.meta.url);
|
|
51359
|
+
nativeKnn = esmRequire("@signet/native");
|
|
51360
|
+
} catch {}
|
|
51248
51361
|
});
|
|
51249
51362
|
|
|
51250
51363
|
// ../daemon/src/watcher-ignore.ts
|
|
@@ -95195,7 +95308,8 @@ function startFileWatcher() {
|
|
|
95195
95308
|
if (SYNC_TRIGGER_FILES.some((f2) => path.endsWith(f2))) {
|
|
95196
95309
|
scheduleSyncHarnessConfigs();
|
|
95197
95310
|
}
|
|
95198
|
-
|
|
95311
|
+
const normalizedPath = path.replace(/\\/g, "/");
|
|
95312
|
+
if (normalizedPath.includes("/memory/") && normalizedPath.endsWith(".md") && !normalizedPath.endsWith("MEMORY.md")) {
|
|
95199
95313
|
ingestMemoryMarkdown(path).catch((e) => logger.error("watcher", "Ingestion failed", undefined, {
|
|
95200
95314
|
path,
|
|
95201
95315
|
error: String(e)
|
|
@@ -95212,7 +95326,8 @@ function startFileWatcher() {
|
|
|
95212
95326
|
watcher.on("add", (path) => {
|
|
95213
95327
|
logger.info("watcher", "File added", { path });
|
|
95214
95328
|
scheduleAutoCommit(path);
|
|
95215
|
-
|
|
95329
|
+
const normalizedAddPath = path.replace(/\\/g, "/");
|
|
95330
|
+
if (normalizedAddPath.includes("/memory/") && normalizedAddPath.endsWith(".md") && !normalizedAddPath.endsWith("MEMORY.md")) {
|
|
95216
95331
|
ingestMemoryMarkdown(path).catch((e) => logger.error("watcher", "Ingestion failed", undefined, {
|
|
95217
95332
|
path,
|
|
95218
95333
|
error: String(e)
|
|
@@ -95666,12 +95781,15 @@ async function main() {
|
|
|
95666
95781
|
}
|
|
95667
95782
|
} else if (effectiveExtractionProvider === "claude-code") {
|
|
95668
95783
|
try {
|
|
95669
|
-
const
|
|
95670
|
-
|
|
95671
|
-
|
|
95672
|
-
|
|
95784
|
+
const exitCode = await new Promise((resolve5) => {
|
|
95785
|
+
const proc = spawn6("claude", ["--version"], {
|
|
95786
|
+
stdio: "pipe",
|
|
95787
|
+
windowsHide: true,
|
|
95788
|
+
env: { ...process.env, SIGNET_NO_HOOKS: "1" }
|
|
95789
|
+
});
|
|
95790
|
+
proc.on("close", (code) => resolve5(code ?? 1));
|
|
95791
|
+
proc.on("error", () => resolve5(1));
|
|
95673
95792
|
});
|
|
95674
|
-
const exitCode = await proc.exited;
|
|
95675
95793
|
if (exitCode !== 0)
|
|
95676
95794
|
throw new Error("non-zero exit");
|
|
95677
95795
|
} catch {
|
|
@@ -95680,16 +95798,19 @@ async function main() {
|
|
|
95680
95798
|
}
|
|
95681
95799
|
} else if (effectiveExtractionProvider === "codex") {
|
|
95682
95800
|
try {
|
|
95683
|
-
const
|
|
95684
|
-
|
|
95685
|
-
|
|
95686
|
-
|
|
95687
|
-
|
|
95688
|
-
|
|
95689
|
-
|
|
95690
|
-
|
|
95801
|
+
const exitCode = await new Promise((resolve5) => {
|
|
95802
|
+
const proc = spawn6("codex", ["--version"], {
|
|
95803
|
+
stdio: "pipe",
|
|
95804
|
+
windowsHide: true,
|
|
95805
|
+
env: {
|
|
95806
|
+
...process.env,
|
|
95807
|
+
SIGNET_NO_HOOKS: "1",
|
|
95808
|
+
SIGNET_CODEX_BYPASS_WRAPPER: "1"
|
|
95809
|
+
}
|
|
95810
|
+
});
|
|
95811
|
+
proc.on("close", (code) => resolve5(code ?? 1));
|
|
95812
|
+
proc.on("error", () => resolve5(1));
|
|
95691
95813
|
});
|
|
95692
|
-
const exitCode = await proc.exited;
|
|
95693
95814
|
if (exitCode !== 0)
|
|
95694
95815
|
throw new Error("non-zero exit");
|
|
95695
95816
|
} catch {
|
|
@@ -95722,12 +95843,15 @@ async function main() {
|
|
|
95722
95843
|
}
|
|
95723
95844
|
} else if (effectiveSynthesisProvider === "claude-code") {
|
|
95724
95845
|
try {
|
|
95725
|
-
const
|
|
95726
|
-
|
|
95727
|
-
|
|
95728
|
-
|
|
95846
|
+
const exitCode = await new Promise((resolve5) => {
|
|
95847
|
+
const proc = spawn6("claude", ["--version"], {
|
|
95848
|
+
stdio: "pipe",
|
|
95849
|
+
windowsHide: true,
|
|
95850
|
+
env: { ...process.env, SIGNET_NO_HOOKS: "1" }
|
|
95851
|
+
});
|
|
95852
|
+
proc.on("close", (code) => resolve5(code ?? 1));
|
|
95853
|
+
proc.on("error", () => resolve5(1));
|
|
95729
95854
|
});
|
|
95730
|
-
const exitCode = await proc.exited;
|
|
95731
95855
|
if (exitCode !== 0)
|
|
95732
95856
|
throw new Error("non-zero exit");
|
|
95733
95857
|
} catch {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/Cq7QYdem.js";export{o as load_css,r as start};
|