studiograph 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/routes/sync-api.js +6 -2
- package/dist/server/routes/sync-api.js.map +1 -1
- package/dist/web/_app/immutable/chunks/{CIrQ5Q_s.js → C7axjIkO.js} +1 -1
- package/dist/web/_app/immutable/chunks/{TSZNijCE.js → CIMAAqkt.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DsbgM2i-.js → CgeRpKxa.js} +1 -1
- package/dist/web/_app/immutable/chunks/{tXD97DTQ.js → CzGIS76D.js} +1 -1
- package/dist/web/_app/immutable/chunks/{D5ZViFW2.js → DcaJM5Zr.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BJ9jl0Ch.js → RaFtQ6Nr.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.CdnNX5l6.js → app.MspBiFtM.js} +2 -2
- package/dist/web/_app/immutable/entry/start.BMnf5AKO.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.tPvCEa21.js → 0.Ce8kXvq7.js} +1 -1
- package/dist/web/_app/immutable/nodes/{1.H1oiaH1s.js → 1.CL4Veu7q.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.CSeZ_u8Q.js → 2.Z0cN7pjd.js} +1 -1
- package/dist/web/_app/immutable/nodes/{3.BOsBh9Hj.js → 3.CHRkLKHQ.js} +3 -3
- package/dist/web/_app/immutable/nodes/{4.C-vpcKRQ.js → 4.0GYr-_DC.js} +1 -1
- package/dist/web/_app/immutable/nodes/{5.DFtxzpCw.js → 5.B1USZ_5d.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.4MBbXASN.js → 6.G72u2W15.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.4lLsPgUC.js → 7.C29v8Chj.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.DchLEkW3.js → 8.f-lZ1U9h.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/entry/start.iFC6OsOv.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as G,b as fe,m as p,al as te,Y as we,X as K,am as be,_ as Ie,af as $e,an as Ae,ai as ne,ao as xe,ap as Ce,Q as Ne,h as w,c as F,x as de,a as Q,aq as Oe,ar as ee,r as ke,a0 as He,s as se,d as z,e as R,C as Re,as as De,at as N,U as he,W as pe,au as X,av as Me,aw as Pe,V as Be,a2 as Fe,w as Ue,ax as ge,ay as Le,az as Ve,E as ze,aA as We,aB as qe,a9 as Ge,aC as Ye,K as d,L as b,a7 as re,k as ie,T as Je}from"./BeBar3OL.js";import{b as Xe,i as Ke}from"./Cs_ROD7H.js";import{B as Qe}from"./xBRYfpah.js";import{i as Ze}from"./tXD97DTQ.js";import{b as oe,u as ae,w as C,a as je}from"./DP09rP34.js";function Ct(e,t){return t}function et(e,t,n){for(var s=[],i=t.length,a,o=t.length,c=0;c<i;c++){let T=t[c];pe(T,()=>{if(a){if(a.pending.delete(T),a.done.add(T),a.pending.size===0){var h=e.outrogroups;Z(ee(a.done)),h.delete(a),h.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=s.length===0&&n!==null;if(u){var E=n,l=E.parentNode;Pe(l),l.append(E),e.items.clear()}Z(t,!u)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Z(e,t=!0){for(var n=0;n<e.length;n++)Be(e[n],t)}var le;function Nt(e,t,n,s,i,a=null){var o=e,c=new Map,u=(t&ge)!==0;if(u){var E=e;o=w?F(de(E)):E.appendChild(G())}w&&Q();var l=null,T=$e(()=>{var f=n();return Oe(f)?f:f==null?[]:ee(f)}),h,g=!0;function m(){r.fallback=l,tt(r,h,o,t,s),l!==null&&(h.length===0?(l.f&N)===0?he(l):(l.f^=N,V(l,null,o)):pe(l,()=>{l=null}))}var y=fe(()=>{h=p(T);var f=h.length;let x=!1;if(w){var M=ke(o)===He;M!==(f===0)&&(o=se(),F(o),z(!1),x=!0)}for(var $=new Set,k=we,P=Ie(),I=0;I<f;I+=1){w&&R.nodeType===Re&&R.data===De&&(o=R,x=!0,z(!1));var H=h[I],B=s(H,I),v=g?null:c.get(B);v?(v.v&&te(v.v,H),v.i&&te(v.i,I),P&&k.unskip_effect(v.e)):(v=nt(c,g?o:le??=G(),H,B,I,i,t,n),g||(v.e.f|=N),c.set(B,v)),$.add(B)}if(f===0&&a&&!l&&(g?l=K(()=>a(o)):(l=K(()=>a(le??=G())),l.f|=N)),f>$.size&&be(),w&&f>0&&F(se()),!g)if(P){for(const[Se,ve]of c)$.has(Se)||k.skip_effect(ve.e);k.oncommit(m),k.ondiscard(()=>{})}else m();x&&z(!0),p(T)}),r={effect:y,items:c,outrogroups:null,fallback:l};g=!1,w&&(o=R)}function U(e){for(;e!==null&&(e.f&Me)===0;)e=e.next;return e}function tt(e,t,n,s,i){var a=(s&Le)!==0,o=t.length,c=e.items,u=U(e.effect.first),E,l=null,T,h=[],g=[],m,y,r,f;if(a)for(f=0;f<o;f+=1)m=t[f],y=i(m,f),r=c.get(y).e,(r.f&N)===0&&(r.nodes?.a?.measure(),(T??=new Set).add(r));for(f=0;f<o;f+=1){if(m=t[f],y=i(m,f),r=c.get(y).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&N)!==0)if(r.f^=N,r===u)V(r,null,n);else{var x=l?l.next:u;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),O(e,l,r),O(e,r,x),V(r,x,n),l=r,h=[],g=[],u=U(l.next);continue}if((r.f&X)!==0&&(he(r),a&&(r.nodes?.a?.unfix(),(T??=new Set).delete(r))),r!==u){if(E!==void 0&&E.has(r)){if(h.length<g.length){var M=g[0],$;l=M.prev;var k=h[0],P=h[h.length-1];for($=0;$<h.length;$+=1)V(h[$],M,n);for($=0;$<g.length;$+=1)E.delete(g[$]);O(e,k.prev,P.next),O(e,l,k),O(e,P,M),u=M,l=P,f-=1,h=[],g=[]}else E.delete(r),V(r,u,n),O(e,r.prev,r.next),O(e,r,l===null?e.effect.first:l.next),O(e,l,r),l=r;continue}for(h=[],g=[];u!==null&&u!==r;)(E??=new Set).add(u),g.push(u),u=U(u.next);if(u===null)continue}(r.f&N)===0&&h.push(r),l=r,u=U(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(Z(ee(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||E!==void 0){var I=[];if(E!==void 0)for(r of E)(r.f&X)===0&&I.push(r);for(;u!==null;)(u.f&X)===0&&u!==e.fallback&&I.push(u),u=U(u.next);var H=I.length;if(H>0){var B=(s&ge)!==0&&o===0?n:null;if(a){for(f=0;f<H;f+=1)I[f].nodes?.a?.measure();for(f=0;f<H;f+=1)I[f].nodes?.a?.fix()}et(e,I,B)}}a&&Fe(()=>{if(T!==void 0)for(r of T)r.nodes?.a?.apply()})}function nt(e,t,n,s,i,a,o,c){var u=(o&xe)!==0?(o&Ce)===0?Ne(n,!1,!1):ne(n):null,E=(o&Ae)!==0?ne(i):null;return{v:u,i:E,e:K(()=>(a(t,u??n,E??i,c),()=>{e.delete(s)}))}}function V(e,t,n){if(e.nodes)for(var s=e.nodes.start,i=e.nodes.end,a=t&&(t.f&N)===0?t.nodes.start:n;s!==null;){var o=Ue(s);if(a.before(s),s===i)return;s=o}}function O(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ot(e,t,n,s,i,a){let o=w;w&&Q();var c=null;w&&R.nodeType===Ve&&(c=R,Q());var u=w?R:e,E=new Qe(u,!1);fe(()=>{const l=t()||null;var T=n||l==="svg"?qe:void 0;if(l===null){E.ensure(null,null);return}return E.ensure(l,h=>{if(l){if(c=w?c:We(l,T),Xe(c,c),s){w&&Ke(l)&&c.append(document.createComment(""));var g=w?de(c):c.appendChild(G());w&&(g===null?z(!1):F(g)),s(c,g)}Ge.nodes.end=c,h.before(c)}w&&F(h)}),()=>{}},ze),Ye(()=>{}),o&&(z(!0),F(u))}function st(){let e=b(null),t=b(null),n=b(null),s=b(null),i=b("entity"),a=b(null),o=b("general");function c(m,y){p(e)&&(p(e)!==m||p(n)!==y)&&oe(p(e)).catch(()=>{})}function u(m,y,r,f){c(m,r),d(e,m,!0),d(t,y,!0),d(n,r,!0),d(s,f??null,!0)}function E(){d(i,"entity")}function l(){d(i,"graph")}function T(){d(i,"settings")}function h(m,y,r){p(n)===r&&p(e)===m?(d(e,null),d(t,null),d(n,null)):(d(e,m,!0),d(t,y,!0),d(n,r,!0)),d(s,null)}function g(){p(e)&&oe(p(e)).catch(()=>{}),d(e,null),d(t,null),d(n,null),d(s,null)}return{get selectedRepo(){return p(e)},get selectedType(){return p(t)},get selectedId(){return p(n)},get selectedSubPath(){return p(s)},get activeView(){return p(i)},get entityPath(){return p(e)&&p(t)&&p(n)?`/${p(e)}/${p(t)}/${p(n)}`:null},get hoveredEntityId(){return p(a)},set hoveredEntityId(m){d(a,m,!0)},get settingsTab(){return p(o)},set settingsTab(m){d(o,m,!0)},select:u,deselect:g,selectOnGraph:h,showEntity:E,showGraph:l,showSettings:T}}const L=st();function kt(...e){return e.filter(Boolean).join(" ")}const rt=typeof document<"u";let ue=0;class it{#e=b(re([]));get toasts(){return p(this.#e)}set toasts(t){d(this.#e,t,!0)}#t=b(re([]));get heights(){return p(this.#t)}set heights(t){d(this.#t,t,!0)}#n=t=>{const n=this.toasts.findIndex(s=>s.id===t);return n===-1?null:n};addToast=t=>{rt&&this.toasts.unshift(t)};updateToast=({id:t,data:n,type:s,message:i})=>{const a=this.toasts.findIndex(c=>c.id===t),o=this.toasts[a];this.toasts[a]={...o,...n,id:t,title:i,type:s,updated:!0}};create=t=>{const{message:n,...s}=t,i=typeof t?.id=="number"||t.id&&t.id?.length>0?t.id:ue++,a=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,o=t.type===void 0?"default":t.type;return ie(()=>{this.toasts.find(u=>u.id===i)?this.updateToast({id:i,data:t,type:o,message:n,dismissible:a}):this.addToast({...s,id:i,title:n,dismissible:a,type:o})}),i};dismiss=t=>(ie(()=>{if(t===void 0){this.toasts=this.toasts.map(s=>({...s,dismiss:!0}));return}const n=this.toasts.findIndex(s=>s.id===t);this.toasts[n]&&(this.toasts[n]={...this.toasts[n],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const n=this.#n(t);if(n!==null)return this.toasts.splice(n,1),t};message=(t,n)=>this.create({...n,type:"default",message:t});error=(t,n)=>this.create({...n,type:"error",message:t});success=(t,n)=>this.create({...n,type:"success",message:t});info=(t,n)=>this.create({...n,type:"info",message:t});warning=(t,n)=>this.create({...n,type:"warning",message:t});loading=(t,n)=>this.create({...n,type:"loading",message:t});promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:typeof n.loading=="string"?n.loading:n.loading()}));const i=t instanceof Promise?t:t();let a=s!==void 0;return i.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){a=!1;const c=ot(o);this.create({id:s,type:"error",message:c})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?n.success(o):n.success;this.create({id:s,type:"success",message:c})}}).catch(o=>{if(n.error!==void 0){a=!1;const c=typeof n.error=="function"?n.error(o):n.error;this.create({id:s,type:"error",message:c})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),n.finally?.()}),s};custom=(t,n)=>{const s=n?.id||ue++;return this.create({component:t,id:s,...n}),s};removeHeight=t=>{this.heights=this.heights.filter(n=>n.toastId!==t)};setHeight=t=>{const n=this.#n(t.toastId);if(n===null){this.heights.push(t);return}this.heights[n]=t};reset=()=>{this.toasts=[],this.heights=[]}}function ot(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const A=new it;function at(e,t){return A.create({message:e,...t})}class Ht{#e=Je(()=>A.toasts.filter(t=>!t.dismiss));get toasts(){return p(this.#e)}}const lt=at,S=Object.assign(lt,{success:A.success,info:A.info,warning:A.warning,error:A.error,custom:A.custom,message:A.message,promise:A.promise,dismiss:A.dismiss,loading:A.loading,getActiveToasts:()=>A.toasts.filter(e=>!e.dismiss)}),ut=800;function ct(){let e=b(!1),t=b(null),n=b(null),s=null,i=null,a=!1;function o(h,g,m,y){s&&s.repo===h&&s.type===g&&s.id===m?(y.data!==void 0&&(s.payload.data=y.data),y.content!==void 0&&(s.payload.content=y.content)):s={repo:h,type:g,id:m,payload:{...y}},c()}function c(){i&&clearTimeout(i),i=setTimeout(u,ut)}async function u(){if(i=null,!a&&s){const{repo:h,type:g,id:m,payload:y}=s;s=null,a=!0,d(e,!0),d(n,null);try{if(await ae(h,g,m,y),d(t,new Date,!0),y.data?.name){const f=C.repos.find(x=>x.name===h)?.entities.find(x=>x.id===m);f&&(f.title=y.data.name)}}catch(r){d(n,r.message??"Save failed",!0);const f=r.status??r.statusCode;(!f||f>=500)&&(s={repo:h,type:g,id:m,payload:y})}finally{d(e,!1),a=!1,s&&u()}}}function E(){i&&(clearTimeout(i),i=null),s&&u()}async function l(h,g,m,y){d(e,!0),d(n,null);try{const r=await ae(h,g,m,y);return d(t,new Date,!0),r}catch(r){return d(n,r.message??"Save failed",!0),null}finally{d(e,!1)}}function T(){d(n,null),d(t,null),s=null,i&&(clearTimeout(i),i=null)}return{get saving(){return p(e)},get lastSaved(){return p(t)},get error(){return p(n)},get hasPending(){return!!(s||a)},scheduleAutoSave:o,flush:E,saveEntity:l,reset:T}}const ft=ct();let _=null,me=null,ye=null,Ee=[],Y=null,q=1e3,J=b(!1),Te=b(null);const D=new Map,W={},j={};function ce(e,t){D.delete(e);const n=t.entities.length,s=n===1?`${e} updated ${t.entities[0]}`:`${e} updated ${n} entities`;S(s)}function dt(e){for(const[t,n]of D)n.repo===e&&(clearTimeout(n.timer),D.delete(t))}function ht(e){const t=je.user?.displayName;if(e.type==="sync_progress"){const n=W[e.repo];if(n){const s=e.message.trim(),i=s.match(/^Syncing from source:\s*(.+)$/i);i&&(j[e.repo]=`Syncing ${i[1].trim()}…`);const a=j[e.repo]??`Syncing ${e.repo}…`;S.loading(a,{id:n,description:s,duration:36e5})}return}if(e.type==="entity_change"){if(t&&e.actor===t&&e.source==="api"){C.refreshEntities(e.repo);return}if(C.refreshEntities(e.repo),L.selectedRepo===e.repo&&L.selectedType===e.entityType&&L.selectedId===e.entityId){ft.hasPending?S(`${e.actor} also saved changes to this entity`):Ze();return}const s=D.get(e.actor);if(s)clearTimeout(s.timer),s.entities.includes(e.entityId)||s.entities.push(e.entityId),s.timer=setTimeout(()=>ce(e.actor,s),1e4);else{const i={entities:[e.entityId],repo:e.repo,timer:setTimeout(()=>ce(e.actor,i),1e4)};D.set(e.actor,i)}return}if(e.type==="session_commit"){if(t&&e.actor===t){d(Te,e.timestamp,!0);return}const n=e.entities.length,s=n===1?`${e.actor} saved changes to ${e.entities[0]}`:`${e.actor} saved ${n} changes in ${e.repo}`;S(s),C.refreshEntities(e.repo);return}if(e.type==="sync_complete"){if(dt(e.repo),!W[e.repo]){const n=e.created+e.updated+e.deleted,s=n===0?`Sync complete · no changes in ${e.repo}`:`Sync complete · ${n} ${n===1?"entity":"entities"} from ${e.source}`;S.success(s)}C.refreshEntities(e.repo);return}if(e.type==="collection_created"){S(`${e.actor} created collection ${e.repo}`),C.refreshEntities(e.repo);return}if(e.type==="collection_deleted"){S(`${e.actor} deleted collection ${e.repo}`);return}if(e.type==="repo_sync"){S(`${e.actor} pushed to ${e.repo}`),C.refreshEntities(e.repo);return}if(e.type==="presence"){me?.(e);return}if(e.type==="online"){ye?.(e);return}if(e.type==="access_granted"||e.type==="access_revoked"){e.type==="access_revoked"&&L.selectedRepo===e.repo&&L.deselect(),C.load();return}}function _e(){if(typeof window>"u"||_&&(_.readyState===WebSocket.OPEN||_.readyState===WebSocket.CONNECTING))return;const t=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;_=new WebSocket(t),_.binaryType="arraybuffer",_.onopen=()=>{d(J,!0),q=1e3,C.refreshAll();for(const n of Ee)n()},_.onmessage=n=>{if(!(n.data instanceof ArrayBuffer))try{const s=JSON.parse(n.data);if(s?.type==="ping"){_?.send(JSON.stringify({type:"pong"}));return}const i=s;i.type&&i.type!=="toast"&&ht(i)}catch{}},_.onclose=()=>{d(J,!1),_=null,Y=setTimeout(()=>{q=Math.min(q*2,1e4),_e()},q)},_.onerror=()=>{}}function pt(){Y&&(clearTimeout(Y),Y=null),_&&(_.close(),_=null),d(J,!1);for(const[,e]of D)clearTimeout(e.timer);D.clear()}function gt(e,t=4e3){S(e,{duration:t})}function mt(e,t){const n=crypto.randomUUID();return t?.loading?S.loading(e,{id:n,duration:36e5}):S(e,{id:n}),n}function yt(e,t,n){if(n?.loading){S.loading(t,{id:e});return}/failed|error/i.test(t)?S.error(t,{id:e,duration:n?.duration??6e3}):S.success(t,{id:e,duration:n?.duration??4e3})}function Et(e){const t=crypto.randomUUID();W[e]=t,S.loading(`Syncing ${e}…`,{id:t,duration:36e5})}function Tt(e,t,n){const s=W[e];s&&(delete W[e],delete j[e],n?S.error(t,{id:s,duration:6e3}):S.success(t,{id:s,duration:4e3}))}function _t(e){me=e}function St(e){ye=e}function vt(e){Ee.push(e)}function wt(e){_?.readyState===WebSocket.OPEN&&_.send(JSON.stringify(e))}const Rt={get connected(){return p(J)},get lastAutoSaved(){return p(Te)},get ws(){return _},connect:_e,disconnect:pt,showToast:gt,showPersistentToast:mt,updateToast:yt,startSyncToast:Et,finishSyncToast:Tt,send:wt,setPresenceHandler:_t,setOnlineHandler:St,addConnectHandler:vt};export{Ht as S,ft as a,Ot as b,kt as c,Nt as e,Ct as i,L as n,Rt as r,A as t};
|
|
1
|
+
import{q as G,b as fe,m as p,al as te,Y as we,X as K,am as be,_ as Ie,af as $e,an as Ae,ai as ne,ao as xe,ap as Ce,Q as Ne,h as w,c as F,x as de,a as Q,aq as Oe,ar as ee,r as ke,a0 as He,s as se,d as z,e as R,C as Re,as as De,at as N,U as he,W as pe,au as X,av as Me,aw as Pe,V as Be,a2 as Fe,w as Ue,ax as ge,ay as Le,az as Ve,E as ze,aA as We,aB as qe,a9 as Ge,aC as Ye,K as d,L as b,a7 as re,k as ie,T as Je}from"./BeBar3OL.js";import{b as Xe,i as Ke}from"./Cs_ROD7H.js";import{B as Qe}from"./xBRYfpah.js";import{i as Ze}from"./CzGIS76D.js";import{b as oe,u as ae,w as C,a as je}from"./DP09rP34.js";function Ct(e,t){return t}function et(e,t,n){for(var s=[],i=t.length,a,o=t.length,c=0;c<i;c++){let T=t[c];pe(T,()=>{if(a){if(a.pending.delete(T),a.done.add(T),a.pending.size===0){var h=e.outrogroups;Z(ee(a.done)),h.delete(a),h.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=s.length===0&&n!==null;if(u){var E=n,l=E.parentNode;Pe(l),l.append(E),e.items.clear()}Z(t,!u)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Z(e,t=!0){for(var n=0;n<e.length;n++)Be(e[n],t)}var le;function Nt(e,t,n,s,i,a=null){var o=e,c=new Map,u=(t&ge)!==0;if(u){var E=e;o=w?F(de(E)):E.appendChild(G())}w&&Q();var l=null,T=$e(()=>{var f=n();return Oe(f)?f:f==null?[]:ee(f)}),h,g=!0;function m(){r.fallback=l,tt(r,h,o,t,s),l!==null&&(h.length===0?(l.f&N)===0?he(l):(l.f^=N,V(l,null,o)):pe(l,()=>{l=null}))}var y=fe(()=>{h=p(T);var f=h.length;let x=!1;if(w){var M=ke(o)===He;M!==(f===0)&&(o=se(),F(o),z(!1),x=!0)}for(var $=new Set,k=we,P=Ie(),I=0;I<f;I+=1){w&&R.nodeType===Re&&R.data===De&&(o=R,x=!0,z(!1));var H=h[I],B=s(H,I),v=g?null:c.get(B);v?(v.v&&te(v.v,H),v.i&&te(v.i,I),P&&k.unskip_effect(v.e)):(v=nt(c,g?o:le??=G(),H,B,I,i,t,n),g||(v.e.f|=N),c.set(B,v)),$.add(B)}if(f===0&&a&&!l&&(g?l=K(()=>a(o)):(l=K(()=>a(le??=G())),l.f|=N)),f>$.size&&be(),w&&f>0&&F(se()),!g)if(P){for(const[Se,ve]of c)$.has(Se)||k.skip_effect(ve.e);k.oncommit(m),k.ondiscard(()=>{})}else m();x&&z(!0),p(T)}),r={effect:y,items:c,outrogroups:null,fallback:l};g=!1,w&&(o=R)}function U(e){for(;e!==null&&(e.f&Me)===0;)e=e.next;return e}function tt(e,t,n,s,i){var a=(s&Le)!==0,o=t.length,c=e.items,u=U(e.effect.first),E,l=null,T,h=[],g=[],m,y,r,f;if(a)for(f=0;f<o;f+=1)m=t[f],y=i(m,f),r=c.get(y).e,(r.f&N)===0&&(r.nodes?.a?.measure(),(T??=new Set).add(r));for(f=0;f<o;f+=1){if(m=t[f],y=i(m,f),r=c.get(y).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&N)!==0)if(r.f^=N,r===u)V(r,null,n);else{var x=l?l.next:u;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),O(e,l,r),O(e,r,x),V(r,x,n),l=r,h=[],g=[],u=U(l.next);continue}if((r.f&X)!==0&&(he(r),a&&(r.nodes?.a?.unfix(),(T??=new Set).delete(r))),r!==u){if(E!==void 0&&E.has(r)){if(h.length<g.length){var M=g[0],$;l=M.prev;var k=h[0],P=h[h.length-1];for($=0;$<h.length;$+=1)V(h[$],M,n);for($=0;$<g.length;$+=1)E.delete(g[$]);O(e,k.prev,P.next),O(e,l,k),O(e,P,M),u=M,l=P,f-=1,h=[],g=[]}else E.delete(r),V(r,u,n),O(e,r.prev,r.next),O(e,r,l===null?e.effect.first:l.next),O(e,l,r),l=r;continue}for(h=[],g=[];u!==null&&u!==r;)(E??=new Set).add(u),g.push(u),u=U(u.next);if(u===null)continue}(r.f&N)===0&&h.push(r),l=r,u=U(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(Z(ee(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||E!==void 0){var I=[];if(E!==void 0)for(r of E)(r.f&X)===0&&I.push(r);for(;u!==null;)(u.f&X)===0&&u!==e.fallback&&I.push(u),u=U(u.next);var H=I.length;if(H>0){var B=(s&ge)!==0&&o===0?n:null;if(a){for(f=0;f<H;f+=1)I[f].nodes?.a?.measure();for(f=0;f<H;f+=1)I[f].nodes?.a?.fix()}et(e,I,B)}}a&&Fe(()=>{if(T!==void 0)for(r of T)r.nodes?.a?.apply()})}function nt(e,t,n,s,i,a,o,c){var u=(o&xe)!==0?(o&Ce)===0?Ne(n,!1,!1):ne(n):null,E=(o&Ae)!==0?ne(i):null;return{v:u,i:E,e:K(()=>(a(t,u??n,E??i,c),()=>{e.delete(s)}))}}function V(e,t,n){if(e.nodes)for(var s=e.nodes.start,i=e.nodes.end,a=t&&(t.f&N)===0?t.nodes.start:n;s!==null;){var o=Ue(s);if(a.before(s),s===i)return;s=o}}function O(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ot(e,t,n,s,i,a){let o=w;w&&Q();var c=null;w&&R.nodeType===Ve&&(c=R,Q());var u=w?R:e,E=new Qe(u,!1);fe(()=>{const l=t()||null;var T=n||l==="svg"?qe:void 0;if(l===null){E.ensure(null,null);return}return E.ensure(l,h=>{if(l){if(c=w?c:We(l,T),Xe(c,c),s){w&&Ke(l)&&c.append(document.createComment(""));var g=w?de(c):c.appendChild(G());w&&(g===null?z(!1):F(g)),s(c,g)}Ge.nodes.end=c,h.before(c)}w&&F(h)}),()=>{}},ze),Ye(()=>{}),o&&(z(!0),F(u))}function st(){let e=b(null),t=b(null),n=b(null),s=b(null),i=b("entity"),a=b(null),o=b("general");function c(m,y){p(e)&&(p(e)!==m||p(n)!==y)&&oe(p(e)).catch(()=>{})}function u(m,y,r,f){c(m,r),d(e,m,!0),d(t,y,!0),d(n,r,!0),d(s,f??null,!0)}function E(){d(i,"entity")}function l(){d(i,"graph")}function T(){d(i,"settings")}function h(m,y,r){p(n)===r&&p(e)===m?(d(e,null),d(t,null),d(n,null)):(d(e,m,!0),d(t,y,!0),d(n,r,!0)),d(s,null)}function g(){p(e)&&oe(p(e)).catch(()=>{}),d(e,null),d(t,null),d(n,null),d(s,null)}return{get selectedRepo(){return p(e)},get selectedType(){return p(t)},get selectedId(){return p(n)},get selectedSubPath(){return p(s)},get activeView(){return p(i)},get entityPath(){return p(e)&&p(t)&&p(n)?`/${p(e)}/${p(t)}/${p(n)}`:null},get hoveredEntityId(){return p(a)},set hoveredEntityId(m){d(a,m,!0)},get settingsTab(){return p(o)},set settingsTab(m){d(o,m,!0)},select:u,deselect:g,selectOnGraph:h,showEntity:E,showGraph:l,showSettings:T}}const L=st();function kt(...e){return e.filter(Boolean).join(" ")}const rt=typeof document<"u";let ue=0;class it{#e=b(re([]));get toasts(){return p(this.#e)}set toasts(t){d(this.#e,t,!0)}#t=b(re([]));get heights(){return p(this.#t)}set heights(t){d(this.#t,t,!0)}#n=t=>{const n=this.toasts.findIndex(s=>s.id===t);return n===-1?null:n};addToast=t=>{rt&&this.toasts.unshift(t)};updateToast=({id:t,data:n,type:s,message:i})=>{const a=this.toasts.findIndex(c=>c.id===t),o=this.toasts[a];this.toasts[a]={...o,...n,id:t,title:i,type:s,updated:!0}};create=t=>{const{message:n,...s}=t,i=typeof t?.id=="number"||t.id&&t.id?.length>0?t.id:ue++,a=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,o=t.type===void 0?"default":t.type;return ie(()=>{this.toasts.find(u=>u.id===i)?this.updateToast({id:i,data:t,type:o,message:n,dismissible:a}):this.addToast({...s,id:i,title:n,dismissible:a,type:o})}),i};dismiss=t=>(ie(()=>{if(t===void 0){this.toasts=this.toasts.map(s=>({...s,dismiss:!0}));return}const n=this.toasts.findIndex(s=>s.id===t);this.toasts[n]&&(this.toasts[n]={...this.toasts[n],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const n=this.#n(t);if(n!==null)return this.toasts.splice(n,1),t};message=(t,n)=>this.create({...n,type:"default",message:t});error=(t,n)=>this.create({...n,type:"error",message:t});success=(t,n)=>this.create({...n,type:"success",message:t});info=(t,n)=>this.create({...n,type:"info",message:t});warning=(t,n)=>this.create({...n,type:"warning",message:t});loading=(t,n)=>this.create({...n,type:"loading",message:t});promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:typeof n.loading=="string"?n.loading:n.loading()}));const i=t instanceof Promise?t:t();let a=s!==void 0;return i.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){a=!1;const c=ot(o);this.create({id:s,type:"error",message:c})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?n.success(o):n.success;this.create({id:s,type:"success",message:c})}}).catch(o=>{if(n.error!==void 0){a=!1;const c=typeof n.error=="function"?n.error(o):n.error;this.create({id:s,type:"error",message:c})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),n.finally?.()}),s};custom=(t,n)=>{const s=n?.id||ue++;return this.create({component:t,id:s,...n}),s};removeHeight=t=>{this.heights=this.heights.filter(n=>n.toastId!==t)};setHeight=t=>{const n=this.#n(t.toastId);if(n===null){this.heights.push(t);return}this.heights[n]=t};reset=()=>{this.toasts=[],this.heights=[]}}function ot(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const A=new it;function at(e,t){return A.create({message:e,...t})}class Ht{#e=Je(()=>A.toasts.filter(t=>!t.dismiss));get toasts(){return p(this.#e)}}const lt=at,S=Object.assign(lt,{success:A.success,info:A.info,warning:A.warning,error:A.error,custom:A.custom,message:A.message,promise:A.promise,dismiss:A.dismiss,loading:A.loading,getActiveToasts:()=>A.toasts.filter(e=>!e.dismiss)}),ut=800;function ct(){let e=b(!1),t=b(null),n=b(null),s=null,i=null,a=!1;function o(h,g,m,y){s&&s.repo===h&&s.type===g&&s.id===m?(y.data!==void 0&&(s.payload.data=y.data),y.content!==void 0&&(s.payload.content=y.content)):s={repo:h,type:g,id:m,payload:{...y}},c()}function c(){i&&clearTimeout(i),i=setTimeout(u,ut)}async function u(){if(i=null,!a&&s){const{repo:h,type:g,id:m,payload:y}=s;s=null,a=!0,d(e,!0),d(n,null);try{if(await ae(h,g,m,y),d(t,new Date,!0),y.data?.name){const f=C.repos.find(x=>x.name===h)?.entities.find(x=>x.id===m);f&&(f.title=y.data.name)}}catch(r){d(n,r.message??"Save failed",!0);const f=r.status??r.statusCode;(!f||f>=500)&&(s={repo:h,type:g,id:m,payload:y})}finally{d(e,!1),a=!1,s&&u()}}}function E(){i&&(clearTimeout(i),i=null),s&&u()}async function l(h,g,m,y){d(e,!0),d(n,null);try{const r=await ae(h,g,m,y);return d(t,new Date,!0),r}catch(r){return d(n,r.message??"Save failed",!0),null}finally{d(e,!1)}}function T(){d(n,null),d(t,null),s=null,i&&(clearTimeout(i),i=null)}return{get saving(){return p(e)},get lastSaved(){return p(t)},get error(){return p(n)},get hasPending(){return!!(s||a)},scheduleAutoSave:o,flush:E,saveEntity:l,reset:T}}const ft=ct();let _=null,me=null,ye=null,Ee=[],Y=null,q=1e3,J=b(!1),Te=b(null);const D=new Map,W={},j={};function ce(e,t){D.delete(e);const n=t.entities.length,s=n===1?`${e} updated ${t.entities[0]}`:`${e} updated ${n} entities`;S(s)}function dt(e){for(const[t,n]of D)n.repo===e&&(clearTimeout(n.timer),D.delete(t))}function ht(e){const t=je.user?.displayName;if(e.type==="sync_progress"){const n=W[e.repo];if(n){const s=e.message.trim(),i=s.match(/^Syncing from source:\s*(.+)$/i);i&&(j[e.repo]=`Syncing ${i[1].trim()}…`);const a=j[e.repo]??`Syncing ${e.repo}…`;S.loading(a,{id:n,description:s,duration:36e5})}return}if(e.type==="entity_change"){if(t&&e.actor===t&&e.source==="api"){C.refreshEntities(e.repo);return}if(C.refreshEntities(e.repo),L.selectedRepo===e.repo&&L.selectedType===e.entityType&&L.selectedId===e.entityId){ft.hasPending?S(`${e.actor} also saved changes to this entity`):Ze();return}const s=D.get(e.actor);if(s)clearTimeout(s.timer),s.entities.includes(e.entityId)||s.entities.push(e.entityId),s.timer=setTimeout(()=>ce(e.actor,s),1e4);else{const i={entities:[e.entityId],repo:e.repo,timer:setTimeout(()=>ce(e.actor,i),1e4)};D.set(e.actor,i)}return}if(e.type==="session_commit"){if(t&&e.actor===t){d(Te,e.timestamp,!0);return}const n=e.entities.length,s=n===1?`${e.actor} saved changes to ${e.entities[0]}`:`${e.actor} saved ${n} changes in ${e.repo}`;S(s),C.refreshEntities(e.repo);return}if(e.type==="sync_complete"){if(dt(e.repo),!W[e.repo]){const n=e.created+e.updated+e.deleted,s=n===0?`Sync complete · no changes in ${e.repo}`:`Sync complete · ${n} ${n===1?"entity":"entities"} from ${e.source}`;S.success(s)}C.refreshEntities(e.repo);return}if(e.type==="collection_created"){S(`${e.actor} created collection ${e.repo}`),C.refreshEntities(e.repo);return}if(e.type==="collection_deleted"){S(`${e.actor} deleted collection ${e.repo}`);return}if(e.type==="repo_sync"){S(`${e.actor} pushed to ${e.repo}`),C.refreshEntities(e.repo);return}if(e.type==="presence"){me?.(e);return}if(e.type==="online"){ye?.(e);return}if(e.type==="access_granted"||e.type==="access_revoked"){e.type==="access_revoked"&&L.selectedRepo===e.repo&&L.deselect(),C.load();return}}function _e(){if(typeof window>"u"||_&&(_.readyState===WebSocket.OPEN||_.readyState===WebSocket.CONNECTING))return;const t=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;_=new WebSocket(t),_.binaryType="arraybuffer",_.onopen=()=>{d(J,!0),q=1e3,C.refreshAll();for(const n of Ee)n()},_.onmessage=n=>{if(!(n.data instanceof ArrayBuffer))try{const s=JSON.parse(n.data);if(s?.type==="ping"){_?.send(JSON.stringify({type:"pong"}));return}const i=s;i.type&&i.type!=="toast"&&ht(i)}catch{}},_.onclose=()=>{d(J,!1),_=null,Y=setTimeout(()=>{q=Math.min(q*2,1e4),_e()},q)},_.onerror=()=>{}}function pt(){Y&&(clearTimeout(Y),Y=null),_&&(_.close(),_=null),d(J,!1);for(const[,e]of D)clearTimeout(e.timer);D.clear()}function gt(e,t=4e3){S(e,{duration:t})}function mt(e,t){const n=crypto.randomUUID();return t?.loading?S.loading(e,{id:n,duration:36e5}):S(e,{id:n}),n}function yt(e,t,n){if(n?.loading){S.loading(t,{id:e});return}/failed|error/i.test(t)?S.error(t,{id:e,duration:n?.duration??6e3}):S.success(t,{id:e,duration:n?.duration??4e3})}function Et(e){const t=crypto.randomUUID();W[e]=t,S.loading(`Syncing ${e}…`,{id:t,duration:36e5})}function Tt(e,t,n){const s=W[e];s&&(delete W[e],delete j[e],n?S.error(t,{id:s,duration:6e3}):S.success(t,{id:s,duration:4e3}))}function _t(e){me=e}function St(e){ye=e}function vt(e){Ee.push(e)}function wt(e){_?.readyState===WebSocket.OPEN&&_.send(JSON.stringify(e))}const Rt={get connected(){return p(J)},get lastAutoSaved(){return p(Te)},get ws(){return _},connect:_e,disconnect:pt,showToast:gt,showPersistentToast:mt,updateToast:yt,startSyncToast:Et,finishSyncToast:Tt,send:wt,setPresenceHandler:_t,setOnlineHandler:St,addConnectHandler:vt};export{Ht as S,ft as a,Ot as b,kt as c,Nt as e,Ct as i,L as n,Rt as r,A as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{_ as m}from"../chunks/PPVm8Dsz.js";import{K as y,N,m as u,O as Q,P as Y,Q as q,y as z,u as F,j as H,R as J,S as U,f as E,D as W,A as X,L as p,B as Z,G as $,T as b,I as tt}from"../chunks/BeBar3OL.js";import{h as et,m as rt,u as st,a as h,c as P,f as T,t as at,s as ot}from"../chunks/Cs_ROD7H.js";import{p as O,i as R,b as A}from"../chunks/xBRYfpah.js";import{c as L}from"../chunks/DCGSm8Hl.js";function nt(a){return class extends it{constructor(t){super({component:a,...t})}}}class it{#e;#t;constructor(t){var s=new Map,n=(e,r)=>{var c=q(r,!1,!1);return s.set(e,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===N?!0:(u(s.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return y(s.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?et:rt)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=i.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Y(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(i,e)},this.#t.$destroy=()=>{st(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const n=(...i)=>s.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}const Et={};var ct=T('<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>'),mt=T("<!> <!>",1);function ut(a,t){z(t,!0);let s=O(t,"components",23,()=>[]),n=O(t,"data_0",3,null),i=O(t,"data_1",3,null);F(()=>t.stores.page.set(t.page)),H(()=>{t.stores,t.page,t.constructors,s(),t.form,n(),i(),t.stores.page.notify()});let e=p(!1),r=p(!1),c=p(null);J(()=>{const o=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),U().then(()=>{y(c,document.title||"untitled page",!0)}))});return y(e,!0),o});const j=b(()=>t.constructors[1]);var x=mt(),D=E(x);{var w=o=>{const _=b(()=>t.constructors[0]);var d=P(),v=E(d);L(v,()=>u(_),(l,f)=>{A(f(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(g,dt)=>{var I=P(),G=E(I);L(G,()=>u(j),(M,B)=>{A(B(M,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),K=>s()[1]=K,()=>s()?.[1])}),h(g,I)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),h(o,d)},k=o=>{const _=b(()=>t.constructors[0]);var d=P(),v=E(d);L(v,()=>u(_),(l,f)=>{A(f(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),h(o,d)};R(D,o=>{t.constructors[1]?o(w):o(k,!1)})}var C=W(D,2);{var S=o=>{var _=ct(),d=Z(_);{var v=l=>{var f=at();tt(()=>ot(f,u(c))),h(l,f)};R(d,l=>{u(r)&&l(v)})}$(_),h(o,_)};R(C,o=>{u(e)&&o(S)})}h(a,x),X()}const yt=nt(ut),pt=[()=>m(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Ce8kXvq7.js","../chunks/PPVm8Dsz.js","../chunks/Cs_ROD7H.js","../chunks/BeBar3OL.js","../chunks/DP09rP34.js","../chunks/xBRYfpah.js","../chunks/O0fx2ss6.js","../chunks/CzGIS76D.js","../chunks/RaFtQ6Nr.js","../chunks/DCGSm8Hl.js","../chunks/CQCkXCml.js","../assets/0.CupILLQs.css","../nodes/1.CL4Veu7q.js","../chunks/DiP47fAp.js","../nodes/2.Z0cN7pjd.js","../chunks/DcaJM5Zr.js","../chunks/BuOTIbJu.js","../assets/AppShell.Ch_ef9hJ.css","../chunks/CgeRpKxa.js","../assets/ChatPanel.CP-_8txt.css","../assets/2.DRHi7ABa.css","../nodes/3.CHRkLKHQ.js","../chunks/CIMAAqkt.js","../chunks/CqkleIqs.js","../assets/3.CtJi4Cy9.css","../nodes/4.0GYr-_DC.js","../assets/4.BhKgiXd2.css","../nodes/5.B1USZ_5d.js","../assets/5.CydFyZSu.css","../nodes/6.G72u2W15.js","../assets/6.kqeOo0OW.css","../nodes/7.C29v8Chj.js","../assets/7.CseIx7qQ.css","../nodes/8.f-lZ1U9h.js","../assets/8.BYpFDZHK.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as m}from"../chunks/PPVm8Dsz.js";import{K as y,N,m as u,O as Q,P as Y,Q as q,y as z,u as F,j as H,R as J,S as U,f as E,D as W,A as X,L as p,B as Z,G as $,T as b,I as tt}from"../chunks/BeBar3OL.js";import{h as et,m as rt,u as st,a as h,c as P,f as T,t as at,s as ot}from"../chunks/Cs_ROD7H.js";import{p as O,i as R,b as A}from"../chunks/xBRYfpah.js";import{c as L}from"../chunks/DCGSm8Hl.js";function nt(a){return class extends it{constructor(t){super({component:a,...t})}}}class it{#e;#t;constructor(t){var s=new Map,n=(e,r)=>{var c=q(r,!1,!1);return s.set(e,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===N?!0:(u(s.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return y(s.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?et:rt)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=i.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Y(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(i,e)},this.#t.$destroy=()=>{st(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const n=(...i)=>s.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}const Et={};var ct=T('<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>'),mt=T("<!> <!>",1);function ut(a,t){z(t,!0);let s=O(t,"components",23,()=>[]),n=O(t,"data_0",3,null),i=O(t,"data_1",3,null);F(()=>t.stores.page.set(t.page)),H(()=>{t.stores,t.page,t.constructors,s(),t.form,n(),i(),t.stores.page.notify()});let e=p(!1),r=p(!1),c=p(null);J(()=>{const o=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),U().then(()=>{y(c,document.title||"untitled page",!0)}))});return y(e,!0),o});const j=b(()=>t.constructors[1]);var x=mt(),D=E(x);{var w=o=>{const _=b(()=>t.constructors[0]);var d=P(),v=E(d);L(v,()=>u(_),(l,f)=>{A(f(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(g,dt)=>{var I=P(),G=E(I);L(G,()=>u(j),(M,B)=>{A(B(M,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),K=>s()[1]=K,()=>s()?.[1])}),h(g,I)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),h(o,d)},k=o=>{const _=b(()=>t.constructors[0]);var d=P(),v=E(d);L(v,()=>u(_),(l,f)=>{A(f(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),h(o,d)};R(D,o=>{t.constructors[1]?o(w):o(k,!1)})}var C=W(D,2);{var S=o=>{var _=ct(),d=Z(_);{var v=l=>{var f=at();tt(()=>ot(f,u(c))),h(l,f)};R(d,l=>{u(r)&&l(v)})}$(_),h(o,_)};R(C,o=>{u(e)&&o(S)})}h(a,x),X()}const yt=nt(ut),pt=[()=>m(()=>import("../nodes/0.Ce8kXvq7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),()=>m(()=>import("../nodes/1.CL4Veu7q.js"),__vite__mapDeps([12,2,3,10,13,7]),import.meta.url),()=>m(()=>import("../nodes/2.Z0cN7pjd.js"),__vite__mapDeps([14,2,3,10,5,13,15,4,8,7,9,16,17,18,19,20]),import.meta.url),()=>m(()=>import("../nodes/3.CHRkLKHQ.js"),__vite__mapDeps([21,4,3,5,2,1,8,7,9,15,16,10,13,17,18,19,22,23,24]),import.meta.url),()=>m(()=>import("../nodes/4.0GYr-_DC.js"),__vite__mapDeps([25,4,3,5,2,15,8,7,9,16,10,13,17,26]),import.meta.url),()=>m(()=>import("../nodes/5.B1USZ_5d.js"),__vite__mapDeps([27,2,3,5,15,4,8,7,9,16,10,13,17,18,19,1,28]),import.meta.url),()=>m(()=>import("../nodes/6.G72u2W15.js"),__vite__mapDeps([29,2,3,5,6,7,4,16,30]),import.meta.url),()=>m(()=>import("../nodes/7.C29v8Chj.js"),__vite__mapDeps([31,2,3,10,13,15,5,4,8,7,9,16,17,22,1,32]),import.meta.url),()=>m(()=>import("../nodes/8.f-lZ1U9h.js"),__vite__mapDeps([33,2,3,5,6,7,4,16,34]),import.meta.url)],bt=[],Pt={"/":[2],"/graph":[5],"/login":[6],"/settings":[7],"/setup":[8],"/[repo]/[type]/[id]":[3],"/[repo]/[type]/[id]/edit":[4]},V={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},_t=Object.fromEntries(Object.entries(V.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(V.transport).map(([a,t])=>[a,t.encode])),Rt=!1,At=(a,t)=>_t[a](t);export{At as decode,_t as decoders,Pt as dictionary,Ot as encoders,Rt as hash,V as hooks,Et as matchers,pt as nodes,yt as root,bt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/CzGIS76D.js";export{o as load_css,r as start};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/BVBRzmeQ.js","../chunks/Cs5oz2oJ.js","../chunks/B1y7Wy5O.js","../chunks/D2aTbzFm.js","../chunks/BXuvR8Ks.js","../chunks/0oxpWEgM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as jt}from"../chunks/PPVm8Dsz.js";import{a as s,f as rt,o as Jt,p as xt,g as qt,e as an,c as y,j as sn,t as Re,s as ie,q as Ut}from"../chunks/Cs_ROD7H.js";import{y as ht,B as it,G as $,I as nt,A as mt,bq as cn,z as He,br as Pe,L as B,a7 as Rt,j as ct,K as c,m as e,k as Gt,R as Ce,D as Mt,T as m,aF as Q,f as g,u as Xe,bs as De,bp as ln,J as un,$ as dn}from"../chunks/BeBar3OL.js";import{j as _t,s as bt,g as A,i as Se,e as U,d as Me,S as fn,a as re,w as We}from"../chunks/DP09rP34.js";import{h as hn}from"../chunks/O0fx2ss6.js";import{g as Ee}from"../chunks/tXD97DTQ.js";import{e as le,t as Z,c as yt,S as mn,b as gn,i as vn,n as wn,r as Fe}from"../chunks/BJ9jl0Ch.js";import{p as k,i as L,b as Je,s as kt,r as Ct}from"../chunks/xBRYfpah.js";import{c as Nt}from"../chunks/DCGSm8Hl.js";import"../chunks/CQCkXCml.js";const yn=Array(12).fill(0);var _n=rt('<div class="sonner-loading-bar"></div>'),bn=rt('<div><div class="sonner-spinner"></div></div>');function xn(n,t){ht(t,!0);var o=bn(),i=it(o);le(i,23,()=>yn,(r,u)=>`spinner-bar-${u}`,(r,u)=>{var a=_n();s(r,a)}),$(i),$(o),nt(r=>{bt(o,1,r),A(o,"data-visible",t.visible)},[()=>_t(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),s(n,o),mt()}const In=typeof window<"u"?window:void 0;function Tn(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}class Sn{#e;#t;constructor(t,o){this.#e=t,this.#t=Jt(o)}get current(){return this.#t(),this.#e()}}const En=/\(.+\)/,An=new Set(["all","print","screen","and","or","not","only"]);class kn extends Sn{constructor(t,o){let i=En.test(t)||t.split(/[\s,]+/).some(u=>An.has(u.trim()))?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,u=>xt(r,"change",u))}}let Bn=class{#e;#t;constructor(t={}){const{window:o=In,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Jt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?Tn(this.#e):null}};new Bn;class Pn{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return cn(this.#t)}get(){const t=He(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const o=He(this.#t);return o===void 0?t:o}set(t){return Pe(this.#t,t)}}const Mn=new Pn("<Toaster/>");function ae(n){return n.label!==void 0}function Cn(){let n=B(Rt(typeof document<"u"?document.hidden:!1));return ct(()=>xt(document,"visibilitychange",()=>{c(n,document.hidden,!0)})),{get current(){return e(n)}}}const Ve=4e3,Dn=14,Ln=45,On=200,zn=.05,Nn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Rn(n){const[t,o]=n.split("-"),i=[];return t&&i.push(t),o&&i.push(o),i}function je(n){return 1/(1.5+Math.abs(n)/20)}var Hn=rt("<div><!></div>"),Wn=rt('<button data-close-button=""><!></button>'),Fn=rt('<div data-icon=""><!> <!></div>'),Vn=rt('<div data-description=""><!></div>'),jn=rt('<button data-button="" data-cancel=""> </button>'),qn=rt('<button data-button=""> </button>'),Un=rt('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Kn=rt('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function Yn(n,t){ht(t,!0);const o=h=>{var w=y(),T=g(w);{var M=E=>{var K=Hn(),zt=it(K);U(zt,()=>t.loadingIcon),$(K),nt(Yt=>{bt(K,1,Yt),A(K,"data-visible",e(z)==="loading")},[()=>_t(yt(e(ot)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),s(E,K)},C=E=>{{let K=m(()=>yt(e(ot)?.loader,t.toast.classes?.loader)),zt=m(()=>e(z)==="loading");xn(E,{get class(){return e(K)},get visible(){return e(zt)}})}};L(T,E=>{t.loadingIcon?E(M):E(C,!1)})}s(h,w)};let i=k(t,"cancelButtonStyle",3,""),r=k(t,"actionButtonStyle",3,""),u=k(t,"descriptionClass",3,""),a=k(t,"unstyled",3,!1),_=k(t,"defaultRichColors",3,!1);const v={...Nn};let P=B(!1),O=B(!1),at=B(!1),j=B(!1),st=B(!1),R=B(0),tt=B(0),lt=t.toast.duration||t.duration||Ve,G=B(void 0),q=B(null),Ht=B(null);const de=m(()=>t.index===0),fe=m(()=>t.index+1<=t.visibleToasts),z=m(()=>t.toast.type),et=m(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Wt=m(()=>t.toast.class||""),Dt=m(()=>t.toast.descriptionClass||""),It=m(()=>Z.heights.findIndex(h=>h.toastId===t.toast.id)||0),Tt=m(()=>t.toast.closeButton??t.closeButton),Lt=m(()=>t.toast.duration??t.duration??Ve);let Bt=null;const pt=m(()=>t.position.split("-")),he=m(()=>Z.heights.reduce((h,w,T)=>T>=e(It)?h:h+w.height,0)),me=Cn(),ge=m(()=>t.toast.invert||t.invert),Kt=m(()=>e(z)==="loading"),ot=m(()=>({...v,...t.classes})),ve=m(()=>t.toast.title),we=m(()=>t.toast.description);let St=B(0),$t=B(0);const Ft=m(()=>Math.round(e(It)*Dn+e(he)));ct(()=>{e(ve),e(we);let h;t.expanded||t.expandByDefault?h=1:h=1-t.index*zn;const w=Gt(()=>e(G));if(w===void 0)return;w.style.setProperty("height","auto");const T=w.offsetHeight,M=w.getBoundingClientRect().height,C=Math.round(M/h+Number.EPSILON&100)/100;w.style.removeProperty("height");let E;Math.abs(C-T)<1?E=C:E=T,c(tt,E,!0),Z.setHeight({toastId:t.toast.id,height:E})});function l(){c(O,!0),c(R,e(Ft),!0),Z.removeHeight(t.toast.id),setTimeout(()=>{Z.remove(t.toast.id)},On)}let H;const gt=m(()=>t.toast.promise&&e(z)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function vt(){c(St,new Date().getTime(),!0),H=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),l()},lt)}function Ot(){if(e($t)<e(St)){const h=new Date().getTime()-e(St);lt=lt-h}c($t,new Date().getTime(),!0)}ct(()=>{t.toast.updated&&(clearTimeout(H),lt=e(Lt),vt())}),ct(()=>(e(gt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&me.current?Ot():vt()),()=>clearTimeout(H))),Ce(()=>{c(P,!0);const h=e(G)?.getBoundingClientRect().height;return c(tt,h,!0),Z.setHeight({toastId:t.toast.id,height:h}),()=>{Z.removeHeight(t.toast.id)}}),ct(()=>{t.toast.delete&&Gt(()=>{l(),t.toast.onDismiss?.(t.toast)})});const ye=h=>{if(e(Kt))return;c(R,e(Ft),!0);const w=h.target;w.setPointerCapture(h.pointerId),w.tagName!=="BUTTON"&&(c(at,!0),Bt={x:h.clientX,y:h.clientY})},ze=()=>{if(e(j)||!e(et))return;Bt=null;const h=Number(e(G)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),w=Number(e(G)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),T=new Date().getTime()-0,M=e(q)==="x"?h:w,C=Math.abs(M)/T;if(Math.abs(M)>=Ln||C>.11){c(R,e(Ft),!0),t.toast.onDismiss?.(t.toast),e(q)==="x"?c(Ht,h>0?"right":"left",!0):c(Ht,w>0?"down":"up",!0),l(),c(j,!0);return}else e(G)?.style.setProperty("--swipe-amount-x","0px"),e(G)?.style.setProperty("--swipe-amount-y","0px");c(st,!1),c(at,!1),c(q,null)},te=h=>{if(!Bt||!e(et)||(window.getSelection()?.toString().length??-1)>0)return;const T=h.clientY-Bt.y,M=h.clientX-Bt.x,C=t.swipeDirections??Rn(t.position);!e(q)&&(Math.abs(M)>1||Math.abs(T)>1)&&c(q,Math.abs(M)>Math.abs(T)?"x":"y",!0);let E={x:0,y:0};if(e(q)==="y"){if(C.includes("top")||C.includes("bottom"))if(C.includes("top")&&T<0||C.includes("bottom")&&T>0)E.y=T;else{const K=T*je(T);E.y=Math.abs(K)<Math.abs(T)?K:T}}else if(e(q)==="x"&&(C.includes("left")||C.includes("right")))if(C.includes("left")&&M<0||C.includes("right")&&M>0)E.x=M;else{const K=M*je(M);E.x=Math.abs(K)<Math.abs(M)?K:M}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&c(st,!0),e(G)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(G)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},wt=()=>{c(at,!1),c(q,null),Bt=null},Et=m(()=>t.toast.icon?t.toast.icon:e(z)==="success"?t.successIcon:e(z)==="error"?t.errorIcon:e(z)==="warning"?t.warningIcon:e(z)==="info"?t.infoIcon:e(z)==="loading"?t.loadingIcon:null);var f=Kn();A(f,"tabindex",0);let Vt;var ee=it(f);{var Ne=h=>{var w=Wn(),T=it(w);U(T,()=>t.closeIcon??Q),$(w),nt(M=>{A(w,"aria-label",t.closeButtonAriaLabel),A(w,"data-disabled",e(Kt)),bt(w,1,M)},[()=>_t(yt(e(ot)?.closeButton,t.toast?.classes?.closeButton))]),qt("click",w,()=>{e(Kt)||!e(et)||(l(),t.toast.onDismiss?.(t.toast))}),s(h,w)};L(ee,h=>{e(Tt)&&!t.toast.component&&e(z)!=="loading"&&t.closeIcon!==null&&h(Ne)})}var _e=Mt(ee,2);{var be=h=>{const w=m(()=>t.toast.component);var T=y(),M=g(T);Nt(M,()=>e(w),(C,E)=>{E(C,kt(()=>t.toast.componentProps,{closeToast:l}))}),s(h,T)},xe=h=>{var w=Un(),T=g(w);{var M=x=>{var S=Fn(),d=it(S);{var D=b=>{var I=y(),p=g(I);{var W=Pt=>{var oe=y(),Te=g(oe);Nt(Te,()=>t.toast.icon,(Y,J)=>{J(Y,{})}),s(Pt,oe)},ft=Pt=>{o(Pt)};L(p,Pt=>{t.toast.icon?Pt(W):Pt(ft,!1)})}s(b,I)};L(d,b=>{(t.toast.promise||e(z)==="loading")&&b(D)})}var V=Mt(d,2);{var N=b=>{var I=y(),p=g(I);{var W=Y=>{var J=y(),At=g(J);Nt(At,()=>t.toast.icon,(on,rn)=>{rn(on,{})}),s(Y,J)},ft=Y=>{var J=y(),At=g(J);U(At,()=>t.successIcon??Q),s(Y,J)},Pt=Y=>{var J=y(),At=g(J);U(At,()=>t.errorIcon??Q),s(Y,J)},oe=Y=>{var J=y(),At=g(J);U(At,()=>t.warningIcon??Q),s(Y,J)},Te=Y=>{var J=y(),At=g(J);U(At,()=>t.infoIcon??Q),s(Y,J)};L(p,Y=>{t.toast.icon?Y(W):e(z)==="success"?Y(ft,1):e(z)==="error"?Y(Pt,2):e(z)==="warning"?Y(oe,3):e(z)==="info"&&Y(Te,4)})}s(b,I)};L(V,b=>{t.toast.type!=="loading"&&b(N)})}$(S),nt(b=>bt(S,1,b),[()=>_t(yt(e(ot)?.icon,t.toast?.classes?.icon))]),s(x,S)};L(T,x=>{(e(z)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&x(M)})}var C=Mt(T,2),E=it(C),K=it(E);{var zt=x=>{var S=y(),d=g(S);{var D=N=>{const b=m(()=>t.toast.title);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.title)),s(N,b)};L(d,N=>{typeof t.toast.title!="string"?N(D):N(V,!1)})}s(x,S)};L(K,x=>{t.toast.title&&x(zt)})}$(E);var Yt=Mt(E,2);{var Ie=x=>{var S=Vn(),d=it(S);{var D=N=>{const b=m(()=>t.toast.description);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.description)),s(N,b)};L(d,N=>{typeof t.toast.description!="string"?N(D):N(V,!1)})}$(S),nt(N=>bt(S,1,N),[()=>_t(yt(u(),e(Dt),e(ot)?.description,t.toast.classes?.description))]),s(x,S)};L(Yt,x=>{t.toast.description&&x(Ie)})}$(C);var ne=Mt(C,2);{var ut=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=jn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.cancelButtonStyle??i()),bt(I,1,W),ie(p,t.toast.cancel.label)},[()=>_t(yt(e(ot)?.cancelButton,t.toast?.classes?.cancelButton))]),qt("click",I,W=>{ae(t.toast.cancel)&&e(et)&&(t.toast.cancel?.onClick?.(W),l())}),s(b,I)},N=m(()=>ae(t.toast.cancel));L(d,b=>{typeof t.toast.cancel=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(ne,x=>{t.toast.cancel&&x(ut)})}var X=Mt(ne,2);{var dt=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.action,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=qn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.actionButtonStyle??r()),bt(I,1,W),ie(p,t.toast.action.label)},[()=>_t(yt(e(ot)?.actionButton,t.toast?.classes?.actionButton))]),qt("click",I,W=>{ae(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&l())}),s(b,I)},N=m(()=>ae(t.toast.action));L(d,b=>{typeof t.toast.action=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(X,x=>{t.toast.action&&x(dt)})}nt((x,S)=>{bt(C,1,x),bt(E,1,S)},[()=>_t(yt(e(ot)?.content,t.toast?.classes?.content)),()=>_t(yt(e(ot)?.title,t.toast?.classes?.title))]),s(h,w)};L(_e,h=>{t.toast.component?h(be):h(xe,!1)})}$(f),Je(f,h=>c(G,h),()=>e(G)),nt((h,w,T)=>{bt(f,1,h),A(f,"aria-live",t.toast.important?"assertive":"polite"),A(f,"data-rich-colors",t.toast.richColors??_()),A(f,"data-styled",!(t.toast.component||t.toast.unstyled||a())),A(f,"data-mounted",e(P)),A(f,"data-promise",w),A(f,"data-swiped",e(st)),A(f,"data-removed",e(O)),A(f,"data-visible",e(fe)),A(f,"data-y-position",e(pt)[0]),A(f,"data-x-position",e(pt)[1]),A(f,"data-index",t.index),A(f,"data-front",e(de)),A(f,"data-swiping",e(at)),A(f,"data-dismissible",e(et)),A(f,"data-type",e(z)),A(f,"data-invert",e(ge)),A(f,"data-swipe-out",e(j)),A(f,"data-swipe-direction",e(Ht)),A(f,"data-expanded",T),Vt=Se(f,`${t.style} ${t.toast.style}`,Vt,{"--index":t.index,"--toasts-before":t.index,"--z-index":Z.toasts.length-t.index,"--offset":`${e(O)?e(R):e(Ft)}px`,"--initial-height":t.expandByDefault?"auto":`${e(tt)}px`})},[()=>_t(yt(t.class,e(Wt),e(ot)?.toast,t.toast?.classes?.toast,e(ot)?.[e(z)],t.toast?.classes?.[e(z)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(P))]),qt("pointermove",f,te),qt("pointerup",f,ze),qt("pointerdown",f,ye),an("dragend",f,wt),s(n,f),mt()}sn(["pointermove","pointerup","pointerdown","click"]);var Zn=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function Gn(n){var t=Zn();s(n,t)}var Xn=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function Jn(n){var t=Xn();s(n,t)}var Qn=Ut('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function pn(n){var t=Qn();s(n,t)}var $n=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function to(n){var t=$n();s(n,t)}var eo=Ut('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function no(n){var t=eo();s(n,t)}const oo=3,Qe="24px",pe="16px",io=4e3,ro=356,ao=14,Ae="dark",se="light";function so(n,t){const o={};return[n,t].forEach((i,r)=>{const u=r===1,a=u?"--mobile-offset":"--offset",_=u?pe:Qe;function v(P){["top","right","bottom","left"].forEach(O=>{o[`${a}-${O}`]=typeof P=="number"?`${P}px`:P})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(P=>{const O=i[P];O===void 0?o[`${a}-${P}`]=_:o[`${a}-${P}`]=typeof O=="number"?`${O}px`:O}):v(_)}),o}var co=rt("<ol></ol>"),lo=rt('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function uo(n,t){ht(t,!0);function o(l){return l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ae:se}let i=k(t,"invert",3,!1),r=k(t,"position",3,"bottom-right"),u=k(t,"hotkey",19,()=>["altKey","KeyT"]),a=k(t,"expand",3,!1),_=k(t,"closeButton",3,!1),v=k(t,"offset",3,Qe),P=k(t,"mobileOffset",3,pe),O=k(t,"theme",3,"light"),at=k(t,"richColors",3,!1),j=k(t,"duration",3,io),st=k(t,"visibleToasts",3,oo),R=k(t,"toastOptions",19,()=>({})),tt=k(t,"dir",7,"auto"),lt=k(t,"gap",3,ao),G=k(t,"pauseWhenPageIsHidden",3,!1),q=k(t,"containerAriaLabel",3,"Notifications"),Ht=k(t,"closeButtonAriaLabel",3,"Close toast"),de=Ct(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function fe(){if(tt()!=="auto")return tt();if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?(Gt(()=>tt(window.getComputedStyle(document.documentElement).direction??"ltr")),tt()):(Gt(()=>tt(l)),l)}const z=m(()=>Array.from(new Set([r(),...Z.toasts.filter(l=>l.position).map(l=>l.position)].filter(Boolean))));let et=B(!1),Wt=B(!1),Dt=B(Rt(o(O()))),It=B(void 0),Tt=B(null),Lt=B(!1);const Bt=m(()=>u().join("+").replace(/Key/g,"").replace(/Digit/g,""));ct(()=>{Z.toasts.length<=1&&c(et,!1)}),ct(()=>{const l=Z.toasts.filter(H=>H.dismiss&&!H.delete);if(l.length>0){const H=Z.toasts.map(gt=>l.find(Ot=>Ot.id===gt.id)?{...gt,delete:!0}:gt);Z.toasts=H}}),ct(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null),c(Lt,!1))}),Ce(()=>(Z.reset(),xt(document,"keydown",H=>{u().every(vt=>H[vt]||H.code===vt)&&(c(et,!0),e(It)?.focus()),H.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&c(et,!1)}))),ct(()=>{if(O()!=="system"&&c(Dt,O()),typeof window<"u"){O()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?c(Dt,Ae):c(Dt,se));const l=window.matchMedia("(prefers-color-scheme: dark)"),H=({matches:gt})=>{O()==="system"&&c(Dt,gt?Ae:se,!0)};"addEventListener"in l?l.addEventListener("change",H):l.addListener(H)}});const pt=l=>{t.onblur?.(l),e(Lt)&&!l.currentTarget.contains(l.relatedTarget)&&(c(Lt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null)))},he=l=>{t.onfocus?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&(e(Lt)||(c(Lt,!0),c(Tt,l.relatedTarget,!0)))},me=l=>{t.onpointerdown?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&c(Wt,!0)},ge=l=>{t.onmouseenter?.(l),c(et,!0)},Kt=l=>{t.onmouseleave?.(l),e(Wt)||c(et,!1)},ot=l=>{t.onmousemove?.(l),c(et,!0)},ve=l=>{t.ondragend?.(l),c(et,!1)},we=l=>{t.onpointerup?.(l),c(Wt,!1)};Mn.set(new mn);var St=lo();A(St,"tabindex",-1);var $t=it(St);{var Ft=l=>{var H=y(),gt=g(H);le(gt,18,()=>e(z),vt=>vt,(vt,Ot,ye,ze)=>{const te=m(()=>{const[f,Vt]=Ot.split("-");return{y:f,x:Vt}}),wt=m(()=>so(v(),P()));var Et=co();Me(Et,f=>({tabindex:-1,dir:f,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(Dt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:he,onmouseenter:ge,onmousemove:ot,onmouseleave:Kt,ondragend:ve,onpointerdown:me,onpointerup:we,...de,[fn]:{"--front-toast-height":`${Z.heights[0]?.height}px`,"--width":`${ro}px`,"--gap":`${lt()}px`,"--offset-top":e(wt)["--offset-top"],"--offset-right":e(wt)["--offset-right"],"--offset-bottom":e(wt)["--offset-bottom"],"--offset-left":e(wt)["--offset-left"],"--mobile-offset-top":e(wt)["--mobile-offset-top"],"--mobile-offset-right":e(wt)["--mobile-offset-right"],"--mobile-offset-bottom":e(wt)["--mobile-offset-bottom"],"--mobile-offset-left":e(wt)["--mobile-offset-left"]}}),[fe],void 0,void 0,"svelte-nbs0zk"),le(Et,23,()=>Z.toasts.filter(f=>!f.position&&e(ye)===0||f.position===Ot),f=>f.id,(f,Vt,ee,Ne)=>{{const _e=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.successIcon??Q),s(d,D)},S=d=>{Gn(d)};L(dt,d=>{t.successIcon?d(x):t.successIcon!==null&&d(S,1)})}s(ut,X)},be=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.errorIcon??Q),s(d,D)},S=d=>{Jn(d)};L(dt,d=>{t.errorIcon?d(x):t.errorIcon!==null&&d(S,1)})}s(ut,X)},xe=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.warningIcon??Q),s(d,D)},S=d=>{pn(d)};L(dt,d=>{t.warningIcon?d(x):t.warningIcon!==null&&d(S,1)})}s(ut,X)},h=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.infoIcon??Q),s(d,D)},S=d=>{to(d)};L(dt,d=>{t.infoIcon?d(x):t.infoIcon!==null&&d(S,1)})}s(ut,X)},w=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.closeIcon??Q),s(d,D)},S=d=>{no(d)};L(dt,d=>{t.closeIcon?d(x):t.closeIcon!==null&&d(S,1)})}s(ut,X)};let T=m(()=>R()?.duration??j()),M=m(()=>R()?.class??""),C=m(()=>R()?.descriptionClass||""),E=m(()=>R()?.style??""),K=m(()=>R().classes||{}),zt=m(()=>R().unstyled??!1),Yt=m(()=>R()?.cancelButtonStyle??""),Ie=m(()=>R()?.actionButtonStyle??""),ne=m(()=>R()?.closeButtonAriaLabel??Ht());Yn(f,{get index(){return e(ee)},get toast(){return e(Vt)},get defaultRichColors(){return at()},get duration(){return e(T)},get class(){return e(M)},get descriptionClass(){return e(C)},get invert(){return i()},get visibleToasts(){return st()},get closeButton(){return _()},get interacting(){return e(Wt)},get position(){return Ot},get style(){return e(E)},get classes(){return e(K)},get unstyled(){return e(zt)},get cancelButtonStyle(){return e(Yt)},get actionButtonStyle(){return e(Ie)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return a()},get expanded(){return e(et)},get pauseWhenPageIsHidden(){return G()},get loadingIcon(){return t.loadingIcon},successIcon:_e,errorIcon:be,warningIcon:xe,infoIcon:h,closeIcon:w,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),$(Et),Je(Et,f=>c(It,f),()=>e(It)),nt(()=>Et.dir=Et.dir),s(vt,Et)}),s(l,H)};L($t,l=>{Z.toasts.length>0&&l(Ft)})}$(St),nt(()=>A(St,"aria-label",`${q()??""} ${e(Bt)??""}`)),s(n,St),mt()}const $e=typeof window<"u"?window:void 0;function fo(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}let ho=class{#e;#t;constructor(t={}){const{window:o=$e,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Jt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?fo(this.#e):null}};new ho;function mo(n,t){switch(n){case"post":ct(t);break;case"pre":Xe(t);break}}function tn(n,t,o,i={}){const{lazy:r=!1}=i;let u=!r,a=Array.isArray(n)?[]:void 0;mo(t,()=>{const _=Array.isArray(n)?n.map(P=>P()):n();if(!u){u=!0,a=_;return}const v=Gt(()=>o(_,a));return a=_,v})}function Le(n,t,o){tn(n,"post",t,o)}function go(n,t,o){tn(n,"pre",t,o)}Le.pre=go;function vo(n,t){switch(n){case"local":return t.localStorage;case"session":return t.sessionStorage}}class en{#e;#t;#o;#n;#r;#i=B(0);constructor(t,o,i={}){const{storage:r="local",serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:a=!0,window:_=$e}=i;if(this.#e=o,this.#t=t,this.#o=u,_===void 0)return;const v=vo(r,_);this.#n=v;const P=v.getItem(t);P!==null?this.#e=this.#a(P):this.#s(o),a&&r==="local"&&(this.#r=Jt(()=>xt(_,"storage",this.#c)))}get current(){this.#r?.(),e(this.#i);const t=this.#a(this.#n?.getItem(this.#t))??this.#e,o=new WeakMap,i=r=>{if(r===null||r?.constructor.name==="Date"||typeof r!="object")return r;let u=o.get(r);return u||(u=new Proxy(r,{get:(a,_)=>(e(this.#i),i(Reflect.get(a,_))),set:(a,_,v)=>(c(this.#i,e(this.#i)+1),Reflect.set(a,_,v),this.#s(t),!0)}),o.set(r,u)),u};return i(t)}set current(t){this.#s(t),c(this.#i,e(this.#i)+1)}#c=t=>{t.key!==this.#t||t.newValue===null||(this.#e=this.#a(t.newValue),c(this.#i,e(this.#i)+1))};#a(t){try{return this.#o.deserialize(t)}catch(o){console.error(`Error when parsing "${t}" from persisted store "${this.#t}"`,o);return}}#s(t){try{t!=null&&this.#n?.setItem(this.#t,this.#o.serialize(t))}catch(o){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#n}`,o)}}}function qe(n){return n.filter(t=>t.length>0)}const nn={getItem:n=>null,setItem:(n,t)=>{}},ue=typeof document<"u";function wo(n){return typeof n=="function"}function yo(n){return n!==null&&typeof n=="object"}const Xt=Symbol("box"),Oe=Symbol("is-writable");function _o(n){return yo(n)&&Xt in n}function bo(n){return F.isBox(n)&&Oe in n}function F(n){let t=B(Rt(n));return{[Xt]:!0,[Oe]:!0,get current(){return e(t)},set current(o){c(t,o,!0)}}}function xo(n,t){const o=m(n);return t?{[Xt]:!0,[Oe]:!0,get current(){return e(o)},set current(i){t(i)}}:{[Xt]:!0,get current(){return n()}}}function Io(n){return F.isBox(n)?n:wo(n)?F.with(n):F(n)}function To(n){return Object.entries(n).reduce((t,[o,i])=>F.isBox(i)?(F.isWritableBox(i)?Object.defineProperty(t,o,{get(){return i.current},set(r){i.current=r}}):Object.defineProperty(t,o,{get(){return i.current}}),t):Object.assign(t,{[o]:i}),{})}function So(n){return F.isWritableBox(n)?{[Xt]:!0,get current(){return n.current}}:n}F.from=Io;F.with=xo;F.flatten=To;F.readonly=So;F.isBox=_o;F.isWritableBox=bo;function Eo(n,t){const o=RegExp(n,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(o)?i.replace(o,t):i}}const Ao=Eo(/[A-Z]/,n=>`-${n.toLowerCase()}`);function ko(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Ao(t)}: ${n[t]};`).join(`
|
|
2
|
+
import{_ as jt}from"../chunks/PPVm8Dsz.js";import{a as s,f as rt,o as Jt,p as xt,g as qt,e as an,c as y,j as sn,t as Re,s as ie,q as Ut}from"../chunks/Cs_ROD7H.js";import{y as ht,B as it,G as $,I as nt,A as mt,bq as cn,z as He,br as Pe,L as B,a7 as Rt,j as ct,K as c,m as e,k as Gt,R as Ce,D as Mt,T as m,aF as Q,f as g,u as Xe,bs as De,bp as ln,J as un,$ as dn}from"../chunks/BeBar3OL.js";import{j as _t,s as bt,g as A,i as Se,e as U,d as Me,S as fn,a as re,w as We}from"../chunks/DP09rP34.js";import{h as hn}from"../chunks/O0fx2ss6.js";import{g as Ee}from"../chunks/CzGIS76D.js";import{e as le,t as Z,c as yt,S as mn,b as gn,i as vn,n as wn,r as Fe}from"../chunks/RaFtQ6Nr.js";import{p as k,i as L,b as Je,s as kt,r as Ct}from"../chunks/xBRYfpah.js";import{c as Nt}from"../chunks/DCGSm8Hl.js";import"../chunks/CQCkXCml.js";const yn=Array(12).fill(0);var _n=rt('<div class="sonner-loading-bar"></div>'),bn=rt('<div><div class="sonner-spinner"></div></div>');function xn(n,t){ht(t,!0);var o=bn(),i=it(o);le(i,23,()=>yn,(r,u)=>`spinner-bar-${u}`,(r,u)=>{var a=_n();s(r,a)}),$(i),$(o),nt(r=>{bt(o,1,r),A(o,"data-visible",t.visible)},[()=>_t(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),s(n,o),mt()}const In=typeof window<"u"?window:void 0;function Tn(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}class Sn{#e;#t;constructor(t,o){this.#e=t,this.#t=Jt(o)}get current(){return this.#t(),this.#e()}}const En=/\(.+\)/,An=new Set(["all","print","screen","and","or","not","only"]);class kn extends Sn{constructor(t,o){let i=En.test(t)||t.split(/[\s,]+/).some(u=>An.has(u.trim()))?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,u=>xt(r,"change",u))}}let Bn=class{#e;#t;constructor(t={}){const{window:o=In,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Jt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?Tn(this.#e):null}};new Bn;class Pn{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return cn(this.#t)}get(){const t=He(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const o=He(this.#t);return o===void 0?t:o}set(t){return Pe(this.#t,t)}}const Mn=new Pn("<Toaster/>");function ae(n){return n.label!==void 0}function Cn(){let n=B(Rt(typeof document<"u"?document.hidden:!1));return ct(()=>xt(document,"visibilitychange",()=>{c(n,document.hidden,!0)})),{get current(){return e(n)}}}const Ve=4e3,Dn=14,Ln=45,On=200,zn=.05,Nn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Rn(n){const[t,o]=n.split("-"),i=[];return t&&i.push(t),o&&i.push(o),i}function je(n){return 1/(1.5+Math.abs(n)/20)}var Hn=rt("<div><!></div>"),Wn=rt('<button data-close-button=""><!></button>'),Fn=rt('<div data-icon=""><!> <!></div>'),Vn=rt('<div data-description=""><!></div>'),jn=rt('<button data-button="" data-cancel=""> </button>'),qn=rt('<button data-button=""> </button>'),Un=rt('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Kn=rt('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function Yn(n,t){ht(t,!0);const o=h=>{var w=y(),T=g(w);{var M=E=>{var K=Hn(),zt=it(K);U(zt,()=>t.loadingIcon),$(K),nt(Yt=>{bt(K,1,Yt),A(K,"data-visible",e(z)==="loading")},[()=>_t(yt(e(ot)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),s(E,K)},C=E=>{{let K=m(()=>yt(e(ot)?.loader,t.toast.classes?.loader)),zt=m(()=>e(z)==="loading");xn(E,{get class(){return e(K)},get visible(){return e(zt)}})}};L(T,E=>{t.loadingIcon?E(M):E(C,!1)})}s(h,w)};let i=k(t,"cancelButtonStyle",3,""),r=k(t,"actionButtonStyle",3,""),u=k(t,"descriptionClass",3,""),a=k(t,"unstyled",3,!1),_=k(t,"defaultRichColors",3,!1);const v={...Nn};let P=B(!1),O=B(!1),at=B(!1),j=B(!1),st=B(!1),R=B(0),tt=B(0),lt=t.toast.duration||t.duration||Ve,G=B(void 0),q=B(null),Ht=B(null);const de=m(()=>t.index===0),fe=m(()=>t.index+1<=t.visibleToasts),z=m(()=>t.toast.type),et=m(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Wt=m(()=>t.toast.class||""),Dt=m(()=>t.toast.descriptionClass||""),It=m(()=>Z.heights.findIndex(h=>h.toastId===t.toast.id)||0),Tt=m(()=>t.toast.closeButton??t.closeButton),Lt=m(()=>t.toast.duration??t.duration??Ve);let Bt=null;const pt=m(()=>t.position.split("-")),he=m(()=>Z.heights.reduce((h,w,T)=>T>=e(It)?h:h+w.height,0)),me=Cn(),ge=m(()=>t.toast.invert||t.invert),Kt=m(()=>e(z)==="loading"),ot=m(()=>({...v,...t.classes})),ve=m(()=>t.toast.title),we=m(()=>t.toast.description);let St=B(0),$t=B(0);const Ft=m(()=>Math.round(e(It)*Dn+e(he)));ct(()=>{e(ve),e(we);let h;t.expanded||t.expandByDefault?h=1:h=1-t.index*zn;const w=Gt(()=>e(G));if(w===void 0)return;w.style.setProperty("height","auto");const T=w.offsetHeight,M=w.getBoundingClientRect().height,C=Math.round(M/h+Number.EPSILON&100)/100;w.style.removeProperty("height");let E;Math.abs(C-T)<1?E=C:E=T,c(tt,E,!0),Z.setHeight({toastId:t.toast.id,height:E})});function l(){c(O,!0),c(R,e(Ft),!0),Z.removeHeight(t.toast.id),setTimeout(()=>{Z.remove(t.toast.id)},On)}let H;const gt=m(()=>t.toast.promise&&e(z)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function vt(){c(St,new Date().getTime(),!0),H=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),l()},lt)}function Ot(){if(e($t)<e(St)){const h=new Date().getTime()-e(St);lt=lt-h}c($t,new Date().getTime(),!0)}ct(()=>{t.toast.updated&&(clearTimeout(H),lt=e(Lt),vt())}),ct(()=>(e(gt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&me.current?Ot():vt()),()=>clearTimeout(H))),Ce(()=>{c(P,!0);const h=e(G)?.getBoundingClientRect().height;return c(tt,h,!0),Z.setHeight({toastId:t.toast.id,height:h}),()=>{Z.removeHeight(t.toast.id)}}),ct(()=>{t.toast.delete&&Gt(()=>{l(),t.toast.onDismiss?.(t.toast)})});const ye=h=>{if(e(Kt))return;c(R,e(Ft),!0);const w=h.target;w.setPointerCapture(h.pointerId),w.tagName!=="BUTTON"&&(c(at,!0),Bt={x:h.clientX,y:h.clientY})},ze=()=>{if(e(j)||!e(et))return;Bt=null;const h=Number(e(G)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),w=Number(e(G)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),T=new Date().getTime()-0,M=e(q)==="x"?h:w,C=Math.abs(M)/T;if(Math.abs(M)>=Ln||C>.11){c(R,e(Ft),!0),t.toast.onDismiss?.(t.toast),e(q)==="x"?c(Ht,h>0?"right":"left",!0):c(Ht,w>0?"down":"up",!0),l(),c(j,!0);return}else e(G)?.style.setProperty("--swipe-amount-x","0px"),e(G)?.style.setProperty("--swipe-amount-y","0px");c(st,!1),c(at,!1),c(q,null)},te=h=>{if(!Bt||!e(et)||(window.getSelection()?.toString().length??-1)>0)return;const T=h.clientY-Bt.y,M=h.clientX-Bt.x,C=t.swipeDirections??Rn(t.position);!e(q)&&(Math.abs(M)>1||Math.abs(T)>1)&&c(q,Math.abs(M)>Math.abs(T)?"x":"y",!0);let E={x:0,y:0};if(e(q)==="y"){if(C.includes("top")||C.includes("bottom"))if(C.includes("top")&&T<0||C.includes("bottom")&&T>0)E.y=T;else{const K=T*je(T);E.y=Math.abs(K)<Math.abs(T)?K:T}}else if(e(q)==="x"&&(C.includes("left")||C.includes("right")))if(C.includes("left")&&M<0||C.includes("right")&&M>0)E.x=M;else{const K=M*je(M);E.x=Math.abs(K)<Math.abs(M)?K:M}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&c(st,!0),e(G)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(G)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},wt=()=>{c(at,!1),c(q,null),Bt=null},Et=m(()=>t.toast.icon?t.toast.icon:e(z)==="success"?t.successIcon:e(z)==="error"?t.errorIcon:e(z)==="warning"?t.warningIcon:e(z)==="info"?t.infoIcon:e(z)==="loading"?t.loadingIcon:null);var f=Kn();A(f,"tabindex",0);let Vt;var ee=it(f);{var Ne=h=>{var w=Wn(),T=it(w);U(T,()=>t.closeIcon??Q),$(w),nt(M=>{A(w,"aria-label",t.closeButtonAriaLabel),A(w,"data-disabled",e(Kt)),bt(w,1,M)},[()=>_t(yt(e(ot)?.closeButton,t.toast?.classes?.closeButton))]),qt("click",w,()=>{e(Kt)||!e(et)||(l(),t.toast.onDismiss?.(t.toast))}),s(h,w)};L(ee,h=>{e(Tt)&&!t.toast.component&&e(z)!=="loading"&&t.closeIcon!==null&&h(Ne)})}var _e=Mt(ee,2);{var be=h=>{const w=m(()=>t.toast.component);var T=y(),M=g(T);Nt(M,()=>e(w),(C,E)=>{E(C,kt(()=>t.toast.componentProps,{closeToast:l}))}),s(h,T)},xe=h=>{var w=Un(),T=g(w);{var M=x=>{var S=Fn(),d=it(S);{var D=b=>{var I=y(),p=g(I);{var W=Pt=>{var oe=y(),Te=g(oe);Nt(Te,()=>t.toast.icon,(Y,J)=>{J(Y,{})}),s(Pt,oe)},ft=Pt=>{o(Pt)};L(p,Pt=>{t.toast.icon?Pt(W):Pt(ft,!1)})}s(b,I)};L(d,b=>{(t.toast.promise||e(z)==="loading")&&b(D)})}var V=Mt(d,2);{var N=b=>{var I=y(),p=g(I);{var W=Y=>{var J=y(),At=g(J);Nt(At,()=>t.toast.icon,(on,rn)=>{rn(on,{})}),s(Y,J)},ft=Y=>{var J=y(),At=g(J);U(At,()=>t.successIcon??Q),s(Y,J)},Pt=Y=>{var J=y(),At=g(J);U(At,()=>t.errorIcon??Q),s(Y,J)},oe=Y=>{var J=y(),At=g(J);U(At,()=>t.warningIcon??Q),s(Y,J)},Te=Y=>{var J=y(),At=g(J);U(At,()=>t.infoIcon??Q),s(Y,J)};L(p,Y=>{t.toast.icon?Y(W):e(z)==="success"?Y(ft,1):e(z)==="error"?Y(Pt,2):e(z)==="warning"?Y(oe,3):e(z)==="info"&&Y(Te,4)})}s(b,I)};L(V,b=>{t.toast.type!=="loading"&&b(N)})}$(S),nt(b=>bt(S,1,b),[()=>_t(yt(e(ot)?.icon,t.toast?.classes?.icon))]),s(x,S)};L(T,x=>{(e(z)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&x(M)})}var C=Mt(T,2),E=it(C),K=it(E);{var zt=x=>{var S=y(),d=g(S);{var D=N=>{const b=m(()=>t.toast.title);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.title)),s(N,b)};L(d,N=>{typeof t.toast.title!="string"?N(D):N(V,!1)})}s(x,S)};L(K,x=>{t.toast.title&&x(zt)})}$(E);var Yt=Mt(E,2);{var Ie=x=>{var S=Vn(),d=it(S);{var D=N=>{const b=m(()=>t.toast.description);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.description)),s(N,b)};L(d,N=>{typeof t.toast.description!="string"?N(D):N(V,!1)})}$(S),nt(N=>bt(S,1,N),[()=>_t(yt(u(),e(Dt),e(ot)?.description,t.toast.classes?.description))]),s(x,S)};L(Yt,x=>{t.toast.description&&x(Ie)})}$(C);var ne=Mt(C,2);{var ut=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=jn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.cancelButtonStyle??i()),bt(I,1,W),ie(p,t.toast.cancel.label)},[()=>_t(yt(e(ot)?.cancelButton,t.toast?.classes?.cancelButton))]),qt("click",I,W=>{ae(t.toast.cancel)&&e(et)&&(t.toast.cancel?.onClick?.(W),l())}),s(b,I)},N=m(()=>ae(t.toast.cancel));L(d,b=>{typeof t.toast.cancel=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(ne,x=>{t.toast.cancel&&x(ut)})}var X=Mt(ne,2);{var dt=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.action,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=qn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.actionButtonStyle??r()),bt(I,1,W),ie(p,t.toast.action.label)},[()=>_t(yt(e(ot)?.actionButton,t.toast?.classes?.actionButton))]),qt("click",I,W=>{ae(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&l())}),s(b,I)},N=m(()=>ae(t.toast.action));L(d,b=>{typeof t.toast.action=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(X,x=>{t.toast.action&&x(dt)})}nt((x,S)=>{bt(C,1,x),bt(E,1,S)},[()=>_t(yt(e(ot)?.content,t.toast?.classes?.content)),()=>_t(yt(e(ot)?.title,t.toast?.classes?.title))]),s(h,w)};L(_e,h=>{t.toast.component?h(be):h(xe,!1)})}$(f),Je(f,h=>c(G,h),()=>e(G)),nt((h,w,T)=>{bt(f,1,h),A(f,"aria-live",t.toast.important?"assertive":"polite"),A(f,"data-rich-colors",t.toast.richColors??_()),A(f,"data-styled",!(t.toast.component||t.toast.unstyled||a())),A(f,"data-mounted",e(P)),A(f,"data-promise",w),A(f,"data-swiped",e(st)),A(f,"data-removed",e(O)),A(f,"data-visible",e(fe)),A(f,"data-y-position",e(pt)[0]),A(f,"data-x-position",e(pt)[1]),A(f,"data-index",t.index),A(f,"data-front",e(de)),A(f,"data-swiping",e(at)),A(f,"data-dismissible",e(et)),A(f,"data-type",e(z)),A(f,"data-invert",e(ge)),A(f,"data-swipe-out",e(j)),A(f,"data-swipe-direction",e(Ht)),A(f,"data-expanded",T),Vt=Se(f,`${t.style} ${t.toast.style}`,Vt,{"--index":t.index,"--toasts-before":t.index,"--z-index":Z.toasts.length-t.index,"--offset":`${e(O)?e(R):e(Ft)}px`,"--initial-height":t.expandByDefault?"auto":`${e(tt)}px`})},[()=>_t(yt(t.class,e(Wt),e(ot)?.toast,t.toast?.classes?.toast,e(ot)?.[e(z)],t.toast?.classes?.[e(z)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(P))]),qt("pointermove",f,te),qt("pointerup",f,ze),qt("pointerdown",f,ye),an("dragend",f,wt),s(n,f),mt()}sn(["pointermove","pointerup","pointerdown","click"]);var Zn=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function Gn(n){var t=Zn();s(n,t)}var Xn=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function Jn(n){var t=Xn();s(n,t)}var Qn=Ut('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function pn(n){var t=Qn();s(n,t)}var $n=Ut('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function to(n){var t=$n();s(n,t)}var eo=Ut('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function no(n){var t=eo();s(n,t)}const oo=3,Qe="24px",pe="16px",io=4e3,ro=356,ao=14,Ae="dark",se="light";function so(n,t){const o={};return[n,t].forEach((i,r)=>{const u=r===1,a=u?"--mobile-offset":"--offset",_=u?pe:Qe;function v(P){["top","right","bottom","left"].forEach(O=>{o[`${a}-${O}`]=typeof P=="number"?`${P}px`:P})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(P=>{const O=i[P];O===void 0?o[`${a}-${P}`]=_:o[`${a}-${P}`]=typeof O=="number"?`${O}px`:O}):v(_)}),o}var co=rt("<ol></ol>"),lo=rt('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function uo(n,t){ht(t,!0);function o(l){return l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ae:se}let i=k(t,"invert",3,!1),r=k(t,"position",3,"bottom-right"),u=k(t,"hotkey",19,()=>["altKey","KeyT"]),a=k(t,"expand",3,!1),_=k(t,"closeButton",3,!1),v=k(t,"offset",3,Qe),P=k(t,"mobileOffset",3,pe),O=k(t,"theme",3,"light"),at=k(t,"richColors",3,!1),j=k(t,"duration",3,io),st=k(t,"visibleToasts",3,oo),R=k(t,"toastOptions",19,()=>({})),tt=k(t,"dir",7,"auto"),lt=k(t,"gap",3,ao),G=k(t,"pauseWhenPageIsHidden",3,!1),q=k(t,"containerAriaLabel",3,"Notifications"),Ht=k(t,"closeButtonAriaLabel",3,"Close toast"),de=Ct(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function fe(){if(tt()!=="auto")return tt();if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?(Gt(()=>tt(window.getComputedStyle(document.documentElement).direction??"ltr")),tt()):(Gt(()=>tt(l)),l)}const z=m(()=>Array.from(new Set([r(),...Z.toasts.filter(l=>l.position).map(l=>l.position)].filter(Boolean))));let et=B(!1),Wt=B(!1),Dt=B(Rt(o(O()))),It=B(void 0),Tt=B(null),Lt=B(!1);const Bt=m(()=>u().join("+").replace(/Key/g,"").replace(/Digit/g,""));ct(()=>{Z.toasts.length<=1&&c(et,!1)}),ct(()=>{const l=Z.toasts.filter(H=>H.dismiss&&!H.delete);if(l.length>0){const H=Z.toasts.map(gt=>l.find(Ot=>Ot.id===gt.id)?{...gt,delete:!0}:gt);Z.toasts=H}}),ct(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null),c(Lt,!1))}),Ce(()=>(Z.reset(),xt(document,"keydown",H=>{u().every(vt=>H[vt]||H.code===vt)&&(c(et,!0),e(It)?.focus()),H.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&c(et,!1)}))),ct(()=>{if(O()!=="system"&&c(Dt,O()),typeof window<"u"){O()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?c(Dt,Ae):c(Dt,se));const l=window.matchMedia("(prefers-color-scheme: dark)"),H=({matches:gt})=>{O()==="system"&&c(Dt,gt?Ae:se,!0)};"addEventListener"in l?l.addEventListener("change",H):l.addListener(H)}});const pt=l=>{t.onblur?.(l),e(Lt)&&!l.currentTarget.contains(l.relatedTarget)&&(c(Lt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null)))},he=l=>{t.onfocus?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&(e(Lt)||(c(Lt,!0),c(Tt,l.relatedTarget,!0)))},me=l=>{t.onpointerdown?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&c(Wt,!0)},ge=l=>{t.onmouseenter?.(l),c(et,!0)},Kt=l=>{t.onmouseleave?.(l),e(Wt)||c(et,!1)},ot=l=>{t.onmousemove?.(l),c(et,!0)},ve=l=>{t.ondragend?.(l),c(et,!1)},we=l=>{t.onpointerup?.(l),c(Wt,!1)};Mn.set(new mn);var St=lo();A(St,"tabindex",-1);var $t=it(St);{var Ft=l=>{var H=y(),gt=g(H);le(gt,18,()=>e(z),vt=>vt,(vt,Ot,ye,ze)=>{const te=m(()=>{const[f,Vt]=Ot.split("-");return{y:f,x:Vt}}),wt=m(()=>so(v(),P()));var Et=co();Me(Et,f=>({tabindex:-1,dir:f,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(Dt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:he,onmouseenter:ge,onmousemove:ot,onmouseleave:Kt,ondragend:ve,onpointerdown:me,onpointerup:we,...de,[fn]:{"--front-toast-height":`${Z.heights[0]?.height}px`,"--width":`${ro}px`,"--gap":`${lt()}px`,"--offset-top":e(wt)["--offset-top"],"--offset-right":e(wt)["--offset-right"],"--offset-bottom":e(wt)["--offset-bottom"],"--offset-left":e(wt)["--offset-left"],"--mobile-offset-top":e(wt)["--mobile-offset-top"],"--mobile-offset-right":e(wt)["--mobile-offset-right"],"--mobile-offset-bottom":e(wt)["--mobile-offset-bottom"],"--mobile-offset-left":e(wt)["--mobile-offset-left"]}}),[fe],void 0,void 0,"svelte-nbs0zk"),le(Et,23,()=>Z.toasts.filter(f=>!f.position&&e(ye)===0||f.position===Ot),f=>f.id,(f,Vt,ee,Ne)=>{{const _e=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.successIcon??Q),s(d,D)},S=d=>{Gn(d)};L(dt,d=>{t.successIcon?d(x):t.successIcon!==null&&d(S,1)})}s(ut,X)},be=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.errorIcon??Q),s(d,D)},S=d=>{Jn(d)};L(dt,d=>{t.errorIcon?d(x):t.errorIcon!==null&&d(S,1)})}s(ut,X)},xe=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.warningIcon??Q),s(d,D)},S=d=>{pn(d)};L(dt,d=>{t.warningIcon?d(x):t.warningIcon!==null&&d(S,1)})}s(ut,X)},h=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.infoIcon??Q),s(d,D)},S=d=>{to(d)};L(dt,d=>{t.infoIcon?d(x):t.infoIcon!==null&&d(S,1)})}s(ut,X)},w=ut=>{var X=y(),dt=g(X);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.closeIcon??Q),s(d,D)},S=d=>{no(d)};L(dt,d=>{t.closeIcon?d(x):t.closeIcon!==null&&d(S,1)})}s(ut,X)};let T=m(()=>R()?.duration??j()),M=m(()=>R()?.class??""),C=m(()=>R()?.descriptionClass||""),E=m(()=>R()?.style??""),K=m(()=>R().classes||{}),zt=m(()=>R().unstyled??!1),Yt=m(()=>R()?.cancelButtonStyle??""),Ie=m(()=>R()?.actionButtonStyle??""),ne=m(()=>R()?.closeButtonAriaLabel??Ht());Yn(f,{get index(){return e(ee)},get toast(){return e(Vt)},get defaultRichColors(){return at()},get duration(){return e(T)},get class(){return e(M)},get descriptionClass(){return e(C)},get invert(){return i()},get visibleToasts(){return st()},get closeButton(){return _()},get interacting(){return e(Wt)},get position(){return Ot},get style(){return e(E)},get classes(){return e(K)},get unstyled(){return e(zt)},get cancelButtonStyle(){return e(Yt)},get actionButtonStyle(){return e(Ie)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return a()},get expanded(){return e(et)},get pauseWhenPageIsHidden(){return G()},get loadingIcon(){return t.loadingIcon},successIcon:_e,errorIcon:be,warningIcon:xe,infoIcon:h,closeIcon:w,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),$(Et),Je(Et,f=>c(It,f),()=>e(It)),nt(()=>Et.dir=Et.dir),s(vt,Et)}),s(l,H)};L($t,l=>{Z.toasts.length>0&&l(Ft)})}$(St),nt(()=>A(St,"aria-label",`${q()??""} ${e(Bt)??""}`)),s(n,St),mt()}const $e=typeof window<"u"?window:void 0;function fo(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}let ho=class{#e;#t;constructor(t={}){const{window:o=$e,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Jt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?fo(this.#e):null}};new ho;function mo(n,t){switch(n){case"post":ct(t);break;case"pre":Xe(t);break}}function tn(n,t,o,i={}){const{lazy:r=!1}=i;let u=!r,a=Array.isArray(n)?[]:void 0;mo(t,()=>{const _=Array.isArray(n)?n.map(P=>P()):n();if(!u){u=!0,a=_;return}const v=Gt(()=>o(_,a));return a=_,v})}function Le(n,t,o){tn(n,"post",t,o)}function go(n,t,o){tn(n,"pre",t,o)}Le.pre=go;function vo(n,t){switch(n){case"local":return t.localStorage;case"session":return t.sessionStorage}}class en{#e;#t;#o;#n;#r;#i=B(0);constructor(t,o,i={}){const{storage:r="local",serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:a=!0,window:_=$e}=i;if(this.#e=o,this.#t=t,this.#o=u,_===void 0)return;const v=vo(r,_);this.#n=v;const P=v.getItem(t);P!==null?this.#e=this.#a(P):this.#s(o),a&&r==="local"&&(this.#r=Jt(()=>xt(_,"storage",this.#c)))}get current(){this.#r?.(),e(this.#i);const t=this.#a(this.#n?.getItem(this.#t))??this.#e,o=new WeakMap,i=r=>{if(r===null||r?.constructor.name==="Date"||typeof r!="object")return r;let u=o.get(r);return u||(u=new Proxy(r,{get:(a,_)=>(e(this.#i),i(Reflect.get(a,_))),set:(a,_,v)=>(c(this.#i,e(this.#i)+1),Reflect.set(a,_,v),this.#s(t),!0)}),o.set(r,u)),u};return i(t)}set current(t){this.#s(t),c(this.#i,e(this.#i)+1)}#c=t=>{t.key!==this.#t||t.newValue===null||(this.#e=this.#a(t.newValue),c(this.#i,e(this.#i)+1))};#a(t){try{return this.#o.deserialize(t)}catch(o){console.error(`Error when parsing "${t}" from persisted store "${this.#t}"`,o);return}}#s(t){try{t!=null&&this.#n?.setItem(this.#t,this.#o.serialize(t))}catch(o){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#n}`,o)}}}function qe(n){return n.filter(t=>t.length>0)}const nn={getItem:n=>null,setItem:(n,t)=>{}},ue=typeof document<"u";function wo(n){return typeof n=="function"}function yo(n){return n!==null&&typeof n=="object"}const Xt=Symbol("box"),Oe=Symbol("is-writable");function _o(n){return yo(n)&&Xt in n}function bo(n){return F.isBox(n)&&Oe in n}function F(n){let t=B(Rt(n));return{[Xt]:!0,[Oe]:!0,get current(){return e(t)},set current(o){c(t,o,!0)}}}function xo(n,t){const o=m(n);return t?{[Xt]:!0,[Oe]:!0,get current(){return e(o)},set current(i){t(i)}}:{[Xt]:!0,get current(){return n()}}}function Io(n){return F.isBox(n)?n:wo(n)?F.with(n):F(n)}function To(n){return Object.entries(n).reduce((t,[o,i])=>F.isBox(i)?(F.isWritableBox(i)?Object.defineProperty(t,o,{get(){return i.current},set(r){i.current=r}}):Object.defineProperty(t,o,{get(){return i.current}}),t):Object.assign(t,{[o]:i}),{})}function So(n){return F.isWritableBox(n)?{[Xt]:!0,get current(){return n.current}}:n}F.from=Io;F.with=xo;F.flatten=To;F.readonly=So;F.isBox=_o;F.isWritableBox=bo;function Eo(n,t){const o=RegExp(n,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(o)?i.replace(o,t):i}}const Ao=Eo(/[A-Z]/,n=>`-${n.toLowerCase()}`);function ko(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Ao(t)}: ${n[t]};`).join(`
|
|
3
3
|
`)}function Bo(n={}){return ko(n).replace(`
|
|
4
4
|
`," ")}const Po={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};Bo(Po);const Mo=typeof window<"u"?window:void 0;function Co(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}class Do{#e;#t;constructor(t={}){const{window:o=Mo,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Jt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?Co(this.#e):null}}new Do;const ke=F("mode-watcher-mode"),Be=F("mode-watcher-theme"),Lo=["dark","light","system"];function Ue(n){return typeof n!="string"?!1:Lo.includes(n)}class Oo{#e="system";#t=ue?localStorage:nn;#o=this.#t.getItem(ke.current);#n=Ue(this.#o)?this.#o:this.#e;#r=B(Rt(this.#i()));#i(t=this.#n){return new en(ke.current,t,{serializer:{serialize:o=>o,deserialize:o=>Ue(o)?o:this.#e}})}constructor(){De(()=>Le.pre(()=>ke.current,(t,o)=>{const i=e(this.#r).current;c(this.#r,this.#i(i),!0),o&&localStorage.removeItem(o)}))}get current(){return e(this.#r).current}set current(t){e(this.#r).current=t}}class zo{#e=void 0;#t=!0;#o=B(Rt(this.#e));#n=typeof window<"u"&&typeof window.matchMedia=="function"?new kn("prefers-color-scheme: light"):{current:!1};query(){ue&&c(this.#o,this.#n.current?"light":"dark",!0)}tracking(t){this.#t=t}constructor(){De(()=>{Xe(()=>{this.#t&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return e(this.#o)}}const Ke=new Oo,No=new zo;class Ro{#e=ue?localStorage:nn;#t=this.#e.getItem(Be.current);#o=this.#t===null||this.#t===void 0?"":this.#t;#n=B(Rt(this.#r()));#r(t=this.#o){return new en(Be.current,t,{serializer:{serialize:o=>typeof o!="string"?"":o,deserialize:o=>o}})}constructor(){De(()=>Le.pre(()=>Be.current,(t,o)=>{const i=e(this.#n).current;c(this.#n,this.#r(i),!0),o&&localStorage.removeItem(o)}))}get current(){return e(this.#n).current}set current(t){e(this.#n).current=t}}new Ro;let Ye,Ze,Ge=!1,Zt=null;function Ho(){return Zt||(Zt=document.createElement("style"),Zt.appendChild(document.createTextNode(`* {
|
|
5
5
|
-webkit-transition: none !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,f as h,s as a}from"../chunks/Cs_ROD7H.js";import"../chunks/CQCkXCml.js";import{y as g,f as l,I as v,A as d,B as e,G as o,D as _}from"../chunks/BeBar3OL.js";import{i as x}from"../chunks/DiP47fAp.js";import{s as $,p}from"../chunks/
|
|
1
|
+
import{a as u,f as h,s as a}from"../chunks/Cs_ROD7H.js";import"../chunks/CQCkXCml.js";import{y as g,f as l,I as v,A as d,B as e,G as o,D as _}from"../chunks/BeBar3OL.js";import{i as x}from"../chunks/DiP47fAp.js";import{s as $,p}from"../chunks/CzGIS76D.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function G(i,f){g(f,!1),x();var t=b(),r=l(t),n=e(r,!0);o(r);var s=_(r,2),c=e(s,!0);o(s),v(()=>{a(n,m.status),a(c,m.error?.message)}),u(i,t),d()}export{G as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,s as $,f as d}from"../chunks/Cs_ROD7H.js";import"../chunks/CQCkXCml.js";import{y as b,z as C,A,B as t,D as l,F as S,G as e,I as V}from"../chunks/BeBar3OL.js";import{i as m}from"../chunks/xBRYfpah.js";import{i as k}from"../chunks/DiP47fAp.js";import{A as P}from"../chunks/
|
|
1
|
+
import{a as v,s as $,f as d}from"../chunks/Cs_ROD7H.js";import"../chunks/CQCkXCml.js";import{y as b,z as C,A,B as t,D as l,F as S,G as e,I as V}from"../chunks/BeBar3OL.js";import{i as m}from"../chunks/xBRYfpah.js";import{i as k}from"../chunks/DiP47fAp.js";import{A as P}from"../chunks/DcaJM5Zr.js";import{V as z,C as B}from"../chunks/CgeRpKxa.js";import{w as p}from"../chunks/DP09rP34.js";import{n as D}from"../chunks/RaFtQ6Nr.js";var E=d('<h2 class="svelte-1uha8ag"> </h2>'),F=d('<div class="content-row svelte-1uha8ag"><div class="entity-area svelte-1uha8ag"><!> <div class="welcome svelte-1uha8ag"><!> <p class="svelte-1uha8ag">Select an entity from the sidebar to get started.</p></div></div> <!></div>');function M(c,f){b(f,!1);const h=C("chat");D.showEntity(),k(),P(c,{children:(g,G)=>{var o=F(),s=t(o),i=t(s);z(i,{activeView:"entity"});var n=l(i,2),_=t(n);{var u=a=>{var r=E(),y=t(r);e(r),V(()=>$(y,`Welcome to ${(p.name||"Studiograph")??""}`)),v(a,r)};m(_,a=>{p.nameLoaded&&a(u)})}S(2),e(n),e(s);var w=l(s,2);{var x=a=>{B(a,{})};m(w,a=>{h.open&&a(x)})}e(o),v(g,o)},$$slots:{default:!0}}),A()}export{M as component};
|