signetai 0.41.0 → 0.42.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.
@@ -0,0 +1 @@
1
+ import{ba as be,o as je,s as A,g as U,b as T,Q as ee,bb as pt}from"./DRrAwi3T.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 Ne(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_1yrfkj?.base??"",Tt=globalThis.__sveltekit_1yrfkj?.assets??x??"",Pt="1772801138600",He="sveltekit:snapshot",We="sveltekit:scroll",Je="sveltekit:states",It="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",j={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={...j,"":j.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 jt(e){return e instanceof Se?e.text:"Internal Error"}let k,W,pe;const Nt=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());Nt?(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,N;const se=new Set,Fe=new Map;async function fn(e,t,n){globalThis.__sveltekit_1yrfkj?.data&&globalThis.__sveltekit_1yrfkj.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),Ne(We,$),ot(R),Ne(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=N;N=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(),N===l&&(N=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,N!==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,j.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],j.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=j.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===j.viewport&&a.observe(o),p.preload_code===j.eager&&ge(l))}}M.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=jt(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(N={},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:N,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.DsRNLJkb.js","../chunks/DRrAwi3T.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.BnOlCuNp.css","../nodes/1.B6wOV5Gv.js","../chunks/0S7mlcQl.js","../nodes/2.C-O8KSxS.js","../chunks/DmRdylYe.js","../chunks/PPVm8Dsz.js"])))=>i.map(i=>d[i]);
2
- import{_ as v}from"../chunks/PPVm8Dsz.js";import{a as Q,B as g,a5 as F,P as G,o as H,g as i,b as h,Q as K,q as l,i as b,d as N,h as d,l as S,s as p,m as E,C as P,J as O,c as U,r as W,z as C,u as x,t as X,e as Y,f as Z,a6 as $}from"../chunks/DRrAwi3T.js";const it={};var tt=C('<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=C("<!> <!>",1);function at(a,t){Q(t,!0);let r=g(t,"components",23,()=>[]),_=g(t,"data_0",3,null),y=g(t,"data_1",3,null);F(()=>t.stores.page.set(t.page)),G(()=>{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),K().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const I=x(()=>t.constructors[1]);var R=et(),k=l(R);{var L=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 A=E(),z=l(A);P(z,()=>i(I),(B,J)=>{O(J(B,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),M=>r()[1]=M,()=>r()?.[1])}),d(u,A)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},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}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(L):e(T,!1)})}var V=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(V,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.DsRNLJkb.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.B6wOV5Gv.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>v(()=>import("../nodes/2.C-O8KSxS.js"),__vite__mapDeps([6,7,8,1,2]),import.meta.url)],mt=[],ut={"/":[2]},D={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.decode])),lt=Object.fromEntries(Object.entries(D.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,D as hooks,it as matchers,dt as nodes,ct as root,mt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DsRNLJkb.js","../chunks/DRrAwi3T.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.BnOlCuNp.css","../nodes/1.BPoravSn.js","../chunks/FvpP5lkW.js","../nodes/2.C-O8KSxS.js","../chunks/DmRdylYe.js","../chunks/PPVm8Dsz.js"])))=>i.map(i=>d[i]);
2
+ import{_ as v}from"../chunks/PPVm8Dsz.js";import{a as Q,B as g,a5 as F,P as G,o as H,g as i,b as h,Q as K,q as l,i as b,d as N,h as d,l as S,s as p,m as E,C as P,J as O,c as U,r as W,z as C,u as x,t as X,e as Y,f as Z,a6 as $}from"../chunks/DRrAwi3T.js";const it={};var tt=C('<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=C("<!> <!>",1);function at(a,t){Q(t,!0);let r=g(t,"components",23,()=>[]),_=g(t,"data_0",3,null),y=g(t,"data_1",3,null);F(()=>t.stores.page.set(t.page)),G(()=>{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),K().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const I=x(()=>t.constructors[1]);var R=et(),k=l(R);{var L=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 A=E(),z=l(A);P(z,()=>i(I),(B,J)=>{O(J(B,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),M=>r()[1]=M,()=>r()?.[1])}),d(u,A)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},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}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(L):e(T,!1)})}var V=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(V,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.DsRNLJkb.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.BPoravSn.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>v(()=>import("../nodes/2.C-O8KSxS.js"),__vite__mapDeps([6,7,8,1,2]),import.meta.url)],mt=[],ut={"/":[2]},D={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.decode])),lt=Object.fromEntries(Object.entries(D.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,D 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/FvpP5lkW.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import{a as m,_ as u,q as g,e as l,h as d,l as v,z as _,c as a,r as s,d as x,f as o}from"../chunks/DRrAwi3T.js";import{s as $,p}from"../chunks/0S7mlcQl.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const c=k;var b=_("<h1> </h1> <p> </p>",1);function E(n,f){m(f,!1),u();var r=b(),t=g(r),h=a(t,!0);s(t);var e=x(t,2),i=a(e,!0);s(e),l(()=>{o(h,c.status),o(i,c.error?.message)}),d(n,r),v()}export{E as component};
1
+ import{a as m,_ as u,q as g,e as l,h as d,l as v,z as _,c as a,r as s,d as x,f as o}from"../chunks/DRrAwi3T.js";import{s as $,p}from"../chunks/FvpP5lkW.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const c=k;var b=_("<h1> </h1> <p> </p>",1);function E(n,f){m(f,!1),u();var r=b(),t=g(r),h=a(t,!0);s(t);var e=x(t,2),i=a(e,!0);s(e),l(()=>{o(h,c.status),o(i,c.error?.message)}),d(n,r),v()}export{E as component};
@@ -1 +1 @@
1
- {"version":"1772786845743"}
1
+ {"version":"1772801138600"}
@@ -17,10 +17,10 @@
17
17
  document.documentElement.dataset.theme = t;
18
18
  })();
19
19
  </script>
20
- <link href="/_app/immutable/entry/start.CPymmHy4.js" rel="modulepreload">
21
- <link href="/_app/immutable/chunks/0S7mlcQl.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/start.BtY0-wXO.js" rel="modulepreload">
21
+ <link href="/_app/immutable/chunks/FvpP5lkW.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/chunks/DRrAwi3T.js" rel="modulepreload">
23
- <link href="/_app/immutable/entry/app.BFiLnmB-.js" rel="modulepreload">
23
+ <link href="/_app/immutable/entry/app.L_D3FLzN.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
- __sveltekit_12jf386 = {
32
+ __sveltekit_1yrfkj = {
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.CPymmHy4.js"),
40
- import("/_app/immutable/entry/app.BFiLnmB-.js")
39
+ import("/_app/immutable/entry/start.BtY0-wXO.js"),
40
+ import("/_app/immutable/entry/app.L_D3FLzN.js")
41
41
  ]).then(([kit, app]) => {
42
42
  kit.start(app, element);
43
43
  });
package/dist/cli.js CHANGED
@@ -1657,7 +1657,7 @@ __export(exports_dist, {
1657
1657
  CONNECTOR_STATUSES: () => CONNECTOR_STATUSES,
1658
1658
  CONNECTOR_PROVIDERS: () => CONNECTOR_PROVIDERS
1659
1659
  });
1660
- import { createRequire as createRequire6 } from "node:module";
1660
+ import { createRequire as createRequire8 } from "node:module";
1661
1661
  import { existsSync as existsSync9, readdirSync } from "fs";
1662
1662
  import { join as join12, dirname as dirname7 } from "path";
1663
1663
  import { fileURLToPath as fileURLToPath7 } from "url";
@@ -1667,6 +1667,7 @@ import { homedir as homedir27 } from "os";
1667
1667
  import { join as join27 } from "path";
1668
1668
  import { existsSync as existsSync25, readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync7 } from "fs";
1669
1669
  import { join as join35 } from "path";
1670
+ import { createRequire as createRequire26 } from "node:module";
1670
1671
  import { existsSync as existsSync32, readFileSync as readFileSync25, readdirSync as readdirSync2, statSync } from "node:fs";
1671
1672
  import { join as join45 } from "node:path";
1672
1673
  import { existsSync as existsSync43, readFileSync as readFileSync33, statSync as statSync23 } from "node:fs";
@@ -2935,7 +2936,7 @@ class Signet {
2935
2936
  return DEFAULT_BASE_PATH7;
2936
2937
  }
2937
2938
  }
2938
- function cosineSimilarity(a, b) {
2939
+ function tsCosineSimilarity(a, b) {
2939
2940
  let dot = 0;
2940
2941
  let normA = 0;
2941
2942
  let normB = 0;
@@ -2948,6 +2949,12 @@ function cosineSimilarity(a, b) {
2948
2949
  const denom = Math.sqrt(normA) * Math.sqrt(normB);
2949
2950
  return denom > 0 ? dot / denom : 0;
2950
2951
  }
2952
+ function cosineSimilarity(a, b) {
2953
+ if (native7 !== null) {
2954
+ return native7.cosineSimilarity(a, b);
2955
+ }
2956
+ return tsCosineSimilarity(a, b);
2957
+ }
2951
2958
  function vectorSearch(db, queryVector, options) {
2952
2959
  const limit = options?.limit ?? 20;
2953
2960
  const results = [];
@@ -7423,7 +7430,7 @@ var __create2, __getProtoOf2, __defProp2, __getOwnPropNames2, __hasOwnProp2, __t
7423
7430
  if (canCache)
7424
7431
  cache.set(mod, to);
7425
7432
  return to;
7426
- }, __commonJS6 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require6, require_util7, require_sqlite_error7, require_file_uri_to_path7, require_bindings7, require_wrappers7, require_transaction7, require_pragma7, require_backup7, require_serialize7, require_function7, require_aggregate7, require_table7, require_inspect7, require_database7, require_lib6, require_identity7, require_visit7, require_directives7, require_anchors7, require_applyReviver7, require_toJS7, require_Node7, require_Alias7, require_Scalar7, require_createNode7, require_Collection7, require_stringifyComment7, require_foldFlowLines7, require_stringifyString7, require_stringify7, require_stringifyPair7, require_log7, require_merge7, require_addPairToJSMap7, require_Pair7, require_stringifyCollection7, require_YAMLMap7, require_map7, require_YAMLSeq7, require_seq7, require_string7, require_null7, require_bool8, require_stringifyNumber7, require_float8, require_int8, require_schema9, require_schema27, require_binary7, require_pairs7, require_omap7, require_bool27, require_float27, require_int27, require_set7, require_timestamp7, require_schema37, require_tags7, require_Schema7, require_stringifyDocument7, require_Document7, require_errors7, require_resolve_props7, require_util_contains_newline7, require_util_flow_indent_check7, require_util_map_includes7, require_resolve_block_map7, require_resolve_block_seq7, require_resolve_end7, require_resolve_flow_collection7, require_compose_collection7, require_resolve_block_scalar7, require_resolve_flow_scalar7, require_compose_scalar7, require_util_empty_scalar_position7, require_compose_node7, require_compose_doc7, require_composer7, require_cst_scalar7, require_cst_stringify7, require_cst_visit7, require_cst7, require_lexer7, require_line_counter7, require_parser7, require_public_api7, MIGRATIONS7, LATEST_SCHEMA_VERSION7, __filename27, __dirname27, composer7, Document7, Schema7, errors6, Alias7, identity7, Pair7, Scalar7, YAMLMap7, YAMLSeq7, cst7, lexer7, lineCounter7, parser7, publicApi7, visit7, $Composer7, $Document7, $Schema7, $YAMLError7, $YAMLParseError7, $YAMLWarning7, $Alias7, $isAlias7, $isCollection7, $isDocument7, $isMap7, $isNode7, $isPair7, $isScalar7, $isSeq7, $Pair7, $Scalar7, $YAMLMap7, $YAMLSeq7, $Lexer7, $LineCounter7, $Parser7, $parse7, $parseAllDocuments7, $parseDocument7, $stringify7, $visit7, $visitAsync7, DEFAULT_BASE_PATH7, SCHEMA_VERSION = 3, SPEC_VERSION = "1.0", SCHEMA_ID = "signet/v1", DEFAULT_EMBEDDING_DIMENSIONS = 768, DEFAULT_HYBRID_ALPHA = 0.7, DEFAULT_REPLAY_WINDOW_MS = 300000, PIPELINE_FLAGS, MEMORY_TYPES, EXTRACTION_STATUSES, JOB_STATUSES, HISTORY_EVENTS, DECISION_ACTIONS, UNIFIED_SCHEMA = `
7433
+ }, __commonJS6 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __require6, require_util7, require_sqlite_error7, require_file_uri_to_path7, require_bindings7, require_wrappers7, require_transaction7, require_pragma7, require_backup7, require_serialize7, require_function7, require_aggregate7, require_table7, require_inspect7, require_database7, require_lib6, require_identity7, require_visit7, require_directives7, require_anchors7, require_applyReviver7, require_toJS7, require_Node7, require_Alias7, require_Scalar7, require_createNode7, require_Collection7, require_stringifyComment7, require_foldFlowLines7, require_stringifyString7, require_stringify7, require_stringifyPair7, require_log7, require_merge7, require_addPairToJSMap7, require_Pair7, require_stringifyCollection7, require_YAMLMap7, require_map7, require_YAMLSeq7, require_seq7, require_string7, require_null7, require_bool8, require_stringifyNumber7, require_float8, require_int8, require_schema9, require_schema27, require_binary7, require_pairs7, require_omap7, require_bool27, require_float27, require_int27, require_set7, require_timestamp7, require_schema37, require_tags7, require_Schema7, require_stringifyDocument7, require_Document7, require_errors7, require_resolve_props7, require_util_contains_newline7, require_util_flow_indent_check7, require_util_map_includes7, require_resolve_block_map7, require_resolve_block_seq7, require_resolve_end7, require_resolve_flow_collection7, require_compose_collection7, require_resolve_block_scalar7, require_resolve_flow_scalar7, require_compose_scalar7, require_util_empty_scalar_position7, require_compose_node7, require_compose_doc7, require_composer7, require_cst_scalar7, require_cst_stringify7, require_cst_visit7, require_cst7, require_lexer7, require_line_counter7, require_parser7, require_public_api7, MIGRATIONS7, LATEST_SCHEMA_VERSION7, __filename27, __dirname27, composer7, Document7, Schema7, errors6, Alias7, identity7, Pair7, Scalar7, YAMLMap7, YAMLSeq7, cst7, lexer7, lineCounter7, parser7, publicApi7, visit7, $Composer7, $Document7, $Schema7, $YAMLError7, $YAMLParseError7, $YAMLWarning7, $Alias7, $isAlias7, $isCollection7, $isDocument7, $isMap7, $isNode7, $isPair7, $isScalar7, $isSeq7, $Pair7, $Scalar7, $YAMLMap7, $YAMLSeq7, $Lexer7, $LineCounter7, $Parser7, $parse7, $parseAllDocuments7, $parseDocument7, $stringify7, $visit7, $visitAsync7, DEFAULT_BASE_PATH7, SCHEMA_VERSION = 3, SPEC_VERSION = "1.0", SCHEMA_ID = "signet/v1", DEFAULT_EMBEDDING_DIMENSIONS = 768, DEFAULT_HYBRID_ALPHA = 0.7, DEFAULT_REPLAY_WINDOW_MS = 300000, PIPELINE_FLAGS, MEMORY_TYPES, EXTRACTION_STATUSES, JOB_STATUSES, HISTORY_EVENTS, DECISION_ACTIONS, native7 = null, UNIFIED_SCHEMA = `
7427
7434
  -- Schema version tracking
7428
7435
  CREATE TABLE IF NOT EXISTS schema_migrations (
7429
7436
  version INTEGER PRIMARY KEY,
@@ -7500,7 +7507,7 @@ var init_dist = __esm(() => {
7500
7507
  __defProp2 = Object.defineProperty;
7501
7508
  __getOwnPropNames2 = Object.getOwnPropertyNames;
7502
7509
  __hasOwnProp2 = Object.prototype.hasOwnProperty;
7503
- __require6 = /* @__PURE__ */ createRequire6(import.meta.url);
7510
+ __require6 = /* @__PURE__ */ createRequire8(import.meta.url);
7504
7511
  require_util7 = __commonJS6((exports) => {
7505
7512
  exports.getBooleanOption = (options, key) => {
7506
7513
  let value = false;
@@ -15158,6 +15165,10 @@ ${end.comment}` : end.comment;
15158
15165
  "split"
15159
15166
  ];
15160
15167
  DECISION_ACTIONS = ["add", "update", "delete", "none"];
15168
+ try {
15169
+ const esmRequire = createRequire26(import.meta.url);
15170
+ native7 = esmRequire("@signet/native");
15171
+ } catch {}
15161
15172
  IDENTITY_FILE_NAMES = [
15162
15173
  "AGENTS.md",
15163
15174
  "SOUL.md",
@@ -20567,6 +20578,7 @@ import { join, dirname } from "path";
20567
20578
  import { fileURLToPath } from "url";
20568
20579
  import { homedir as homedir2 } from "os";
20569
20580
  import { join as join2 } from "path";
20581
+ import { createRequire as createRequire22 } from "node:module";
20570
20582
  import {
20571
20583
  existsSync as existsSync5,
20572
20584
  lstatSync,
@@ -20580,11 +20592,12 @@ import { join as join6 } from "node:path";
20580
20592
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
20581
20593
  import { homedir } from "node:os";
20582
20594
  import { join as join7 } from "node:path";
20583
- import { createRequire as createRequire22 } from "node:module";
20595
+ import { createRequire as createRequire3 } from "node:module";
20584
20596
  import { join as join4, dirname as dirname2 } from "path";
20585
20597
  import { fileURLToPath as fileURLToPath2 } from "url";
20586
20598
  import { homedir as homedir22 } from "os";
20587
20599
  import { join as join22 } from "path";
20600
+ import { createRequire as createRequire222 } from "node:module";
20588
20601
  import { existsSync as existsSync4, readFileSync as readFileSync3, statSync as statSync2 } from "node:fs";
20589
20602
  import { join as join5 } from "node:path";
20590
20603
  var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -28825,6 +28838,11 @@ var $stringify = publicApi.stringify;
28825
28838
  var $visit = visit.visit;
28826
28839
  var $visitAsync = visit.visitAsync;
28827
28840
  var DEFAULT_BASE_PATH = join2(homedir2(), ".agents");
28841
+ var native = null;
28842
+ try {
28843
+ const esmRequire = createRequire22(import.meta.url);
28844
+ native = esmRequire("@signet/native");
28845
+ } catch {}
28828
28846
  var IDENTITY_FILES = {
28829
28847
  agents: {
28830
28848
  path: "AGENTS.md",
@@ -29198,7 +29216,7 @@ ${content}`);
29198
29216
  }
29199
29217
  }
29200
29218
  var __commonJS22 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
29201
- var __require22 = /* @__PURE__ */ createRequire22(import.meta.url);
29219
+ var __require22 = /* @__PURE__ */ createRequire3(import.meta.url);
29202
29220
  var require_util2 = __commonJS22((exports) => {
29203
29221
  exports.getBooleanOption = (options, key) => {
29204
29222
  let value = false;
@@ -37435,6 +37453,11 @@ var $stringify2 = publicApi2.stringify;
37435
37453
  var $visit2 = visit2.visit;
37436
37454
  var $visitAsync2 = visit2.visitAsync;
37437
37455
  var DEFAULT_BASE_PATH2 = join22(homedir22(), ".agents");
37456
+ var native2 = null;
37457
+ try {
37458
+ const esmRequire = createRequire222(import.meta.url);
37459
+ native2 = esmRequire("@signet/native");
37460
+ } catch {}
37438
37461
  var IDENTITY_FILES2 = {
37439
37462
  agents: {
37440
37463
  path: "AGENTS.md",
@@ -37951,11 +37974,12 @@ import { homedir as homedir3 } from "node:os";
37951
37974
  import { join as join42 } from "node:path";
37952
37975
  import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
37953
37976
  import { join as join32 } from "node:path";
37954
- import { createRequire as createRequire3 } from "node:module";
37977
+ import { createRequire as createRequire4 } from "node:module";
37955
37978
  import { join as join8, dirname as dirname3 } from "path";
37956
37979
  import { fileURLToPath as fileURLToPath3 } from "url";
37957
37980
  import { homedir as homedir23 } from "os";
37958
37981
  import { join as join23 } from "path";
37982
+ import { createRequire as createRequire23 } from "node:module";
37959
37983
  import {
37960
37984
  existsSync as existsSync52,
37961
37985
  lstatSync as lstatSync2,
@@ -37967,7 +37991,7 @@ import {
37967
37991
  } from "node:fs";
37968
37992
  import { join as join62 } from "node:path";
37969
37993
  var __commonJS3 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
37970
- var __require3 = /* @__PURE__ */ createRequire3(import.meta.url);
37994
+ var __require3 = /* @__PURE__ */ createRequire4(import.meta.url);
37971
37995
  var require_util3 = __commonJS3((exports) => {
37972
37996
  exports.getBooleanOption = (options, key) => {
37973
37997
  let value = false;
@@ -46204,6 +46228,11 @@ var $stringify3 = publicApi3.stringify;
46204
46228
  var $visit3 = visit3.visit;
46205
46229
  var $visitAsync3 = visit3.visitAsync;
46206
46230
  var DEFAULT_BASE_PATH3 = join23(homedir23(), ".agents");
46231
+ var native3 = null;
46232
+ try {
46233
+ const esmRequire = createRequire23(import.meta.url);
46234
+ native3 = esmRequire("@signet/native");
46235
+ } catch {}
46207
46236
  var IDENTITY_FILES3 = {
46208
46237
  agents: {
46209
46238
  path: "AGENTS.md",
@@ -46797,11 +46826,12 @@ class CodexConnector extends BaseConnector2 {
46797
46826
  // ../connector-openclaw/dist/index.js
46798
46827
  import { existsSync as existsSync6, readFileSync as readFileSync6 } from "node:fs";
46799
46828
  import { join as join33 } from "node:path";
46800
- import { createRequire as createRequire4 } from "node:module";
46829
+ import { createRequire as createRequire6 } from "node:module";
46801
46830
  import { join as join10, dirname as dirname5 } from "path";
46802
46831
  import { fileURLToPath as fileURLToPath5 } from "url";
46803
46832
  import { homedir as homedir25 } from "os";
46804
46833
  import { join as join25 } from "path";
46834
+ import { createRequire as createRequire24 } from "node:module";
46805
46835
  import {
46806
46836
  existsSync as existsSync53,
46807
46837
  lstatSync as lstatSync3,
@@ -46823,7 +46853,7 @@ import { homedir as homedir5, tmpdir } from "node:os";
46823
46853
  import { delimiter, join as join43, resolve } from "node:path";
46824
46854
  import { runInNewContext } from "node:vm";
46825
46855
  var __commonJS4 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
46826
- var __require4 = /* @__PURE__ */ createRequire4(import.meta.url);
46856
+ var __require4 = /* @__PURE__ */ createRequire6(import.meta.url);
46827
46857
  var require_util5 = __commonJS4((exports) => {
46828
46858
  exports.getBooleanOption = (options, key) => {
46829
46859
  let value = false;
@@ -55060,6 +55090,11 @@ var $stringify5 = publicApi5.stringify;
55060
55090
  var $visit5 = visit5.visit;
55061
55091
  var $visitAsync5 = visit5.visitAsync;
55062
55092
  var DEFAULT_BASE_PATH5 = join25(homedir25(), ".agents");
55093
+ var native5 = null;
55094
+ try {
55095
+ const esmRequire = createRequire24(import.meta.url);
55096
+ native5 = esmRequire("@signet/native");
55097
+ } catch {}
55063
55098
  var IDENTITY_FILES5 = {
55064
55099
  agents: {
55065
55100
  path: "AGENTS.md",
@@ -56050,11 +56085,12 @@ import { homedir as homedir6 } from "node:os";
56050
56085
  import { join as join72, relative } from "node:path";
56051
56086
  import { existsSync as existsSync8, readFileSync as readFileSync7 } from "node:fs";
56052
56087
  import { join as join34 } from "node:path";
56053
- import { createRequire as createRequire5 } from "node:module";
56088
+ import { createRequire as createRequire7 } from "node:module";
56054
56089
  import { join as join11, dirname as dirname6 } from "path";
56055
56090
  import { fileURLToPath as fileURLToPath6 } from "url";
56056
56091
  import { homedir as homedir26 } from "os";
56057
56092
  import { join as join26 } from "path";
56093
+ import { createRequire as createRequire25 } from "node:module";
56058
56094
  import {
56059
56095
  existsSync as existsSync54,
56060
56096
  lstatSync as lstatSync4,
@@ -56065,15 +56101,16 @@ import {
56065
56101
  unlinkSync as unlinkSync4
56066
56102
  } from "node:fs";
56067
56103
  import { join as join64 } from "node:path";
56068
- import { createRequire as createRequire23 } from "node:module";
56104
+ import { createRequire as createRequire32 } from "node:module";
56069
56105
  import { join as join44, dirname as dirname22 } from "path";
56070
56106
  import { fileURLToPath as fileURLToPath22 } from "url";
56071
56107
  import { homedir as homedir222 } from "os";
56072
56108
  import { join as join222 } from "path";
56109
+ import { createRequire as createRequire223 } from "node:module";
56073
56110
  import { existsSync as existsSync42, readFileSync as readFileSync32, statSync as statSync22 } from "node:fs";
56074
56111
  import { join as join52 } from "node:path";
56075
56112
  var __commonJS5 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
56076
- var __require5 = /* @__PURE__ */ createRequire5(import.meta.url);
56113
+ var __require5 = /* @__PURE__ */ createRequire7(import.meta.url);
56077
56114
  var require_util6 = __commonJS5((exports) => {
56078
56115
  exports.getBooleanOption = (options, key) => {
56079
56116
  let value = false;
@@ -64310,6 +64347,11 @@ var $stringify6 = publicApi6.stringify;
64310
64347
  var $visit6 = visit6.visit;
64311
64348
  var $visitAsync6 = visit6.visitAsync;
64312
64349
  var DEFAULT_BASE_PATH6 = join26(homedir26(), ".agents");
64350
+ var native6 = null;
64351
+ try {
64352
+ const esmRequire = createRequire25(import.meta.url);
64353
+ native6 = esmRequire("@signet/native");
64354
+ } catch {}
64313
64355
  var IDENTITY_FILES6 = {
64314
64356
  agents: {
64315
64357
  path: "AGENTS.md",
@@ -64683,7 +64725,7 @@ ${content}`);
64683
64725
  }
64684
64726
  }
64685
64727
  var __commonJS23 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
64686
- var __require23 = /* @__PURE__ */ createRequire23(import.meta.url);
64728
+ var __require23 = /* @__PURE__ */ createRequire32(import.meta.url);
64687
64729
  var require_util22 = __commonJS23((exports) => {
64688
64730
  exports.getBooleanOption = (options, key) => {
64689
64731
  let value = false;
@@ -72920,6 +72962,11 @@ var $stringify22 = publicApi22.stringify;
72920
72962
  var $visit22 = visit22.visit;
72921
72963
  var $visitAsync22 = visit22.visitAsync;
72922
72964
  var DEFAULT_BASE_PATH22 = join222(homedir222(), ".agents");
72965
+ var native22 = null;
72966
+ try {
72967
+ const esmRequire = createRequire223(import.meta.url);
72968
+ native22 = esmRequire("@signet/native");
72969
+ } catch {}
72923
72970
  var IDENTITY_FILES22 = {
72924
72971
  agents: {
72925
72972
  path: "AGENTS.md",
package/dist/daemon.js CHANGED
@@ -21923,6 +21923,7 @@ import { homedir } from "os";
21923
21923
  import { arch, platform } from "process";
21924
21924
  import { homedir as homedir2 } from "os";
21925
21925
  import { join as join22 } from "path";
21926
+ import { createRequire as createRequire2 } from "module";
21926
21927
  import { existsSync as existsSync8, readFileSync as readFileSync6 } from "fs";
21927
21928
  import { spawnSync } from "child_process";
21928
21929
  import { join as join9 } from "path";
@@ -30317,7 +30318,12 @@ var MEMORY_TYPES = [
30317
30318
  "system"
30318
30319
  ];
30319
30320
  var DECISION_ACTIONS = ["add", "update", "delete", "none"];
30320
- function cosineSimilarity(a, b) {
30321
+ var native = null;
30322
+ try {
30323
+ const esmRequire = createRequire2(import.meta.url);
30324
+ native = esmRequire("@signet/native");
30325
+ } catch {}
30326
+ function tsCosineSimilarity(a, b) {
30321
30327
  let dot = 0;
30322
30328
  let normA = 0;
30323
30329
  let normB = 0;
@@ -30330,6 +30336,12 @@ function cosineSimilarity(a, b) {
30330
30336
  const denom = Math.sqrt(normA) * Math.sqrt(normB);
30331
30337
  return denom > 0 ? dot / denom : 0;
30332
30338
  }
30339
+ function cosineSimilarity(a, b) {
30340
+ if (native !== null) {
30341
+ return native.cosineSimilarity(a, b);
30342
+ }
30343
+ return tsCosineSimilarity(a, b);
30344
+ }
30333
30345
  function vectorSearch(db, queryVector, options) {
30334
30346
  const limit = options?.limit ?? 20;
30335
30347
  const results = [];
@@ -34616,11 +34628,11 @@ var {Glob } = globalThis.Bun;
34616
34628
 
34617
34629
  // ../daemon/src/content-normalization.ts
34618
34630
  import { createHash } from "crypto";
34619
- import { createRequire as createRequire2 } from "module";
34620
- var native = null;
34631
+ import { createRequire as createRequire3 } from "module";
34632
+ var native2 = null;
34621
34633
  try {
34622
- const esmRequire = createRequire2(import.meta.url);
34623
- native = esmRequire("@signet/native");
34634
+ const esmRequire = createRequire3(import.meta.url);
34635
+ native2 = esmRequire("@signet/native");
34624
34636
  } catch {}
34625
34637
  var TRAILING_PUNCTUATION = /[.,!?;:]+$/;
34626
34638
  function tsNormalizeContentForStorage(content) {
@@ -34637,12 +34649,21 @@ function tsNormalizeAndHashContent(content) {
34637
34649
  const contentHash = createHash("sha256").update(hashBasis).digest("hex");
34638
34650
  return { storageContent, normalizedContent, hashBasis, contentHash };
34639
34651
  }
34640
- var normalizeContentForStorage = native !== null ? native.normalizeContentForStorage : tsNormalizeContentForStorage;
34641
- var deriveNormalizedContent = native !== null ? native.deriveNormalizedContent : tsDeriveNormalizedContent;
34642
- var normalizeAndHashContent = native !== null ? native.normalizeAndHashContent : tsNormalizeAndHashContent;
34652
+ var normalizeContentForStorage = native2 !== null ? native2.normalizeContentForStorage : tsNormalizeContentForStorage;
34653
+ var deriveNormalizedContent = native2 !== null ? native2.deriveNormalizedContent : tsDeriveNormalizedContent;
34654
+ var normalizeAndHashContent = native2 !== null ? native2.normalizeAndHashContent : tsNormalizeAndHashContent;
34643
34655
 
34644
34656
  // ../daemon/src/db-helpers.ts
34657
+ import { createRequire as createRequire5 } from "module";
34658
+ var native3 = null;
34659
+ try {
34660
+ const esmRequire = createRequire5(import.meta.url);
34661
+ native3 = esmRequire("@signet/native");
34662
+ } catch {}
34645
34663
  function vectorToBlob(vec) {
34664
+ if (native3 !== null) {
34665
+ return native3.vectorToBlob(vec);
34666
+ }
34646
34667
  const f32 = new Float32Array(vec);
34647
34668
  return Buffer.from(f32.buffer.slice(0));
34648
34669
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.41.0",
3
+ "version": "0.42.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{ba as be,o as je,s as A,g as U,b as T,Q as ee,bb as pt}from"./DRrAwi3T.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 Ne(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_12jf386?.base??"",Tt=globalThis.__sveltekit_12jf386?.assets??x??"",Pt="1772786845743",He="sveltekit:snapshot",We="sveltekit:scroll",Je="sveltekit:states",It="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",j={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={...j,"":j.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 jt(e){return e instanceof Se?e.text:"Internal Error"}let k,W,pe;const Nt=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());Nt?(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,N;const se=new Set,Fe=new Map;async function fn(e,t,n){globalThis.__sveltekit_12jf386?.data&&globalThis.__sveltekit_12jf386.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),Ne(We,$),ot(R),Ne(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=N;N=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(),N===l&&(N=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,N!==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,j.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],j.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=j.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===j.viewport&&a.observe(o),p.preload_code===j.eager&&ge(l))}}M.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=jt(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(N={},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:N,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 +0,0 @@
1
- import{l as o,a as r}from"../chunks/0S7mlcQl.js";export{o as load_css,r as start};