import{w as e,g as a}from"./CiWU5d2F.js";function o(t){try{return structuredClone(t)}catch{return JSON.parse(JSON.stringify(t))}}const i=e([]),c=e([]),I=e([]),S=e("conceptual"),b=e("entity_model"),x=e(null),C=e([]),L=e([]),T=e([]),E=e({}),w=e([]),D=e([]),H=e(null),O=e(null),R=e(!0),A=e([]),B=e([]),J=e(null),P=e({open:!1,entityId:null}),U=e({open:!1,selectedEntityIds:[]}),k=e({searchTerm:"",selectedDomains:[],selectedTags:[]}),v=e(new Set),N=e({}),_=e(null),f=e({open:!1,modelId:null});function q(t){f.set({open:!0,modelId:t})}function z(){f.set({open:!1,modelId:null})}const p=e({open:!1,entityLabel:"",entityId:"",sources:[]});function G(t,d,g){p.set({open:!0,entityLabel:t,entityId:d,sources:g})}function K(){p.set({open:!1,entityLabel:"",entityId:"",sources:[]})}const y=e({open:!1,entityLabel:"",entityIds:[]});function X(t,d){y.set({open:!0,entityLabel:t,entityIds:d})}function Y(){y.set({open:!1,entityLabel:"",entityIds:[]})}const m=50;let n=[],s=-1,l=!1,u=null;const M=e(!1),h=e(!1);function r(){M.set(s>0),h.set(s<n.length-1)}function j(){l||(u&&clearTimeout(u),u=setTimeout(()=>{const t={nodes:o(a(i)),edges:o(a(c))};s<n.length-1&&(n=n.slice(0,s+1)),n.push(t),n.length>m?n.shift():s++,r()},300))}function Q(){n=[{nodes:o(a(i)),edges:o(a(c))}],s=0,r()}function V(){if(s<=0)return;l=!0,s--;const t=n[s];i.set(o(t.nodes)),c.set(o(t.edges)),r(),l=!1}function W(){if(s>=n.length-1)return;l=!0,s++;const t=n[s];i.set(o(t.nodes)),c.set(o(t.edges)),r(),l=!1}export{O as A,z as B,p as C,Q as D,W as E,V as F,Y as G,K as H,R as I,y as J,f as K,A as a,B as b,x as c,c as d,J as e,w as f,v as g,P as h,k as i,U as j,N as k,I as l,b as m,i as n,X as o,j as p,T as q,L as r,E as s,D as t,C as u,S as v,q as w,G as x,_ as y,H as z};
