import{S as Z,i as y,s as $,L as x,d as N,j as v,k as C,M as ee,N as oe,O as te,c as b,b as P,e as I,w as O,f as Q,F as M,A as V,G as ne,t as R,a as G,r as k,D as B,l as w,I as F,v as L,E as j,P as T,Q as W,R as se,n as le}from"./index-BRw4aYKO.js";import{I as q}from"./Icon-CBehOuwm.js";const re=o=>({}),H=o=>({zoomIn:o[9],zoomOut:o[10],fitView:o[11],lock:o[12],unhideAll:o[8]});function ae(o){let e,s,l,c,u;return s=new q({props:{icon:"visibility_off"}}),{c(){e=I("button"),j(s.$$.fragment),b(e,"class","unhide svelte-10dric6")},m(n,t){P(n,e,t),B(s,e,null),l=!0,c||(u=w(e,"mousedown",F(o[8])),c=!0)},p:le,i(n){l||(C(s.$$.fragment,n),l=!0)},o(n){v(s.$$.fragment,n),l=!1},d(n){n&&N(e),V(s),c=!1,u()}}}function ie(o){let e,s=M(o[7]).size>0,l,c,u,n,t,i,A,d,g,z,_,m,h,S,D,f=s&&ae(o);return u=new q({props:{icon:"zoom_in"}}),i=new q({props:{icon:"zoom_out"}}),g=new q({props:{icon:"filter_center_focus"}}),m=new q({props:{icon:o[4]?"lock":"lock_open"}}),{c(){e=I("div"),f&&f.c(),l=L(),c=I("button"),j(u.$$.fragment),n=L(),t=I("button"),j(i.$$.fragment),A=L(),d=I("button"),j(g.$$.fragment),z=L(),_=I("button"),j(m.$$.fragment),b(c,"class","zoom-in svelte-10dric6"),b(t,"class","zoom-out svelte-10dric6"),b(d,"class","reset svelte-10dric6"),b(_,"class","lock svelte-10dric6"),b(e,"class","controls-wrapper svelte-10dric6"),R(e,"horizontal",o[0]),G(e,"--prop-controls-background-color",o[1]),G(e,"--prop-controls-text-color",o[2])},m(r,p){P(r,e,p),f&&f.m(e,null),k(e,l),k(e,c),B(u,c,null),k(e,n),k(e,t),B(i,t,null),k(e,A),k(e,d),B(g,d,null),k(e,z),k(e,_),B(m,_,null),h=!0,S||(D=[w(c,"pointerdown",F(o[9])),w(t,"mousedown",F(o[10])),w(t,"touchstart",o[10],{passive:!0}),w(d,"mousedown",F(o[11])),w(d,"touchstart",o[11],{passive:!0}),w(_,"mousedown",F(o[12])),w(_,"touchstart",o[12],{passive:!0})],S=!0)},p(r,p){s&&f.p(r,p);const E={};p&16&&(E.icon=r[4]?"lock":"lock_open"),m.$set(E),(!h||p&1)&&R(e,"horizontal",r[0]),p&2&&G(e,"--prop-controls-background-color",r[1]),p&4&&G(e,"--prop-controls-text-color",r[2])},i(r){h||(C(f),C(u.$$.fragment,r),C(i.$$.fragment,r),C(g.$$.fragment,r),C(m.$$.fragment,r),h=!0)},o(r){v(f),v(u.$$.fragment,r),v(i.$$.fragment,r),v(g.$$.fragment,r),v(m.$$.fragment,r),h=!1},d(r){r&&N(e),f&&f.d(),V(u),V(i),V(g),V(m),S=!1,ne(D)}}}function ce(o){let e,s,l;const c=o[15].default,u=x(c,o,o[14],H),n=u||ie(o);return{c(){e=I("nav"),n&&n.c(),b(e,"class",s="graph-controls "+o[3]+" svelte-10dric6"),b(e,"aria-label","navigation")},m(t,i){P(t,e,i),n&&n.m(e,null),l=!0},p(t,[i]){u?u.p&&(!l||i&16384)&&ee(u,c,t,t[14],l?te(c,t[14],i,re):oe(t[14]),H):n&&n.p&&(!l||i&23)&&n.p(t,l?i:-1),(!l||i&8&&s!==(s="graph-controls "+t[3]+" svelte-10dric6"))&&b(e,"class",s)},i(t){l||(C(n,t),l=!0)},o(t){v(n,t),l=!1},d(t){t&&N(e),n&&n.d(t)}}}function ue(o,e,s){let l,c,{$$slots:u={},$$scope:n}=e,{increment:t=.1}=e,{horizontal:i=!1}=e,{bgColor:A=null}=e,{iconColor:d=null}=e,{corner:g="SW"}=e;const z=O("transforms"),_=O("dimensions"),m=O("locked");Q(o,m,a=>s(4,l=a));const h=O("groups");Q(o,h,a=>s(16,c=a));const S=O("bounds"),{translation:D}=z,f=c.hidden.nodes,r=S.nodeBounds;function p(){f.set(new Set)}function E(){T(-1,_,z,t)}function J(){T(1,_,z,t)}function K(){W.set(!0);const{x:a,y:X,scale:Y}=se(M(_),M(r));D.set({x:a||0,y:X||0}),z.scale.set(Y||1),W.set(!1)}function U(){m.set(!l)}return o.$$set=a=>{"increment"in a&&s(13,t=a.increment),"horizontal"in a&&s(0,i=a.horizontal),"bgColor"in a&&s(1,A=a.bgColor),"iconColor"in a&&s(2,d=a.iconColor),"corner"in a&&s(3,g=a.corner),"$$scope"in a&&s(14,n=a.$$scope)},[i,A,d,g,l,m,h,f,p,E,J,K,U,t,n,u]}class _e extends Z{constructor(e){super(),y(this,e,ue,ce,$,{increment:13,horizontal:0,bgColor:1,iconColor:2,corner:3})}}export{_e as default};
