From 43d5bb2038ff3e7582faf262f55852e61181ebdc Mon Sep 17 00:00:00 2001 From: Millun Atluri Date: Fri, 17 Nov 2023 13:36:50 +1100 Subject: [PATCH] Updated JS files --- installer/lib/installer.py | 2 +- .../frontend/web/dist/assets/App-cd19f6f7.js | 171 ++++++++++++++++++ .../frontend/web/dist/assets/App-ecb61195.js | 171 ------------------ .../dist/assets/MantineProvider-094ba0de.js | 1 + .../dist/assets/MantineProvider-1fe3e660.js | 1 - ...985.js => ThemeLocaleProvider-37ef62a0.js} | 4 +- .../assets/ThemeLocaleProvider-90f0fcd3.css | 9 + .../assets/ThemeLocaleProvider-f5f9aabf.css | 9 - .../web/dist/assets/index-2ad466e0.js | 157 ---------------- .../web/dist/assets/index-c553e366.js | 156 ++++++++++++++++ ...er-cyrillic-ext-wght-normal-1c3007b8.woff2 | Bin 27284 -> 0 bytes ...er-cyrillic-ext-wght-normal-848492d3.woff2 | Bin 0 -> 26692 bytes .../inter-cyrillic-wght-normal-262a1054.woff2 | Bin 0 -> 17076 bytes .../inter-cyrillic-wght-normal-eba94878.woff2 | Bin 17600 -> 0 bytes ...inter-greek-ext-wght-normal-81f77e51.woff2 | Bin 12732 -> 0 bytes ...inter-greek-ext-wght-normal-fe977ddb.woff2 | Bin 0 -> 11952 bytes .../inter-greek-wght-normal-89b4a3fe.woff2 | Bin 0 -> 22000 bytes .../inter-greek-wght-normal-d92c6cbc.woff2 | Bin 22480 -> 0 bytes ...inter-latin-ext-wght-normal-45606f83.woff2 | Bin 0 -> 56968 bytes ...inter-latin-ext-wght-normal-a2bfd9fe.woff2 | Bin 79940 -> 0 bytes .../inter-latin-wght-normal-450f3ba4.woff2 | Bin 0 -> 37924 bytes .../inter-latin-wght-normal-88df0b5a.woff2 | Bin 46704 -> 0 bytes ...nter-vietnamese-wght-normal-15df7612.woff2 | Bin 10540 -> 0 bytes ...nter-vietnamese-wght-normal-ac4e131c.woff2 | Bin 0 -> 8640 bytes invokeai/frontend/web/dist/index.html | 2 +- 25 files changed, 341 insertions(+), 342 deletions(-) create mode 100644 invokeai/frontend/web/dist/assets/App-cd19f6f7.js delete mode 100644 invokeai/frontend/web/dist/assets/App-ecb61195.js create mode 100644 invokeai/frontend/web/dist/assets/MantineProvider-094ba0de.js delete mode 100644 invokeai/frontend/web/dist/assets/MantineProvider-1fe3e660.js rename invokeai/frontend/web/dist/assets/{ThemeLocaleProvider-d0bb8985.js => ThemeLocaleProvider-37ef62a0.js} (94%) create mode 100644 invokeai/frontend/web/dist/assets/ThemeLocaleProvider-90f0fcd3.css delete mode 100644 invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css delete mode 100644 invokeai/frontend/web/dist/assets/index-2ad466e0.js create mode 100644 invokeai/frontend/web/dist/assets/index-c553e366.js delete mode 100644 invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-848492d3.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-262a1054.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-81f77e51.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-fe977ddb.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-greek-wght-normal-89b4a3fe.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-45606f83.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-latin-wght-normal-450f3ba4.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 delete mode 100644 invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 create mode 100644 invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-ac4e131c.woff2 diff --git a/installer/lib/installer.py b/installer/lib/installer.py index 0d30756fe8..7b928f3c9c 100644 --- a/installer/lib/installer.py +++ b/installer/lib/installer.py @@ -244,7 +244,7 @@ class InvokeAiInstance: "numpy~=1.24.0", # choose versions that won't be uninstalled during phase 2 "urllib3~=1.26.0", "requests~=2.28.0", - "torch~=2.1.0", + "torch==2.1.0", "torchmetrics==0.11.4", "torchvision>=0.14.1", "--force-reinstall", diff --git a/invokeai/frontend/web/dist/assets/App-cd19f6f7.js b/invokeai/frontend/web/dist/assets/App-cd19f6f7.js new file mode 100644 index 0000000000..c8e97d7480 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/App-cd19f6f7.js @@ -0,0 +1,171 @@ +import{a as Ou,b as mI,S as gI,c as vI,d as bI,e as N1,f as xI,i as $1,g as BA,h as yI,j as CI,k as HA,l as gx,m as WA,n as VA,o as Ew,p as wI,t as UA,q as GA,r as qA,s as KA,u as QA,v as l,w as a,x as vx,y as $h,z as XA,A as YA,B as JA,C as ZA,P as eD,D as bx,E as tD,F as nD,G as rD,H as oD,I as Oe,J as zr,K as Hn,L as Ee,M as jt,N as pr,O as rt,Q as pf,R as yo,T as Or,U as Qr,V as ar,W as bi,X as ll,Y as qt,Z as _s,_ as Yc,$ as xi,a0 as yi,a1 as og,a2 as xx,a3 as hf,a4 as mr,a5 as sD,a6 as B,a7 as Mw,a8 as aD,a9 as SI,aa as L1,ab as mf,ac as Ru,ad as iD,ae as kI,af as jI,ag as _I,ah as Ks,ai as lD,aj as de,ak as Ce,al as Tn,am as H,an as cD,ao as Ow,ap as uD,aq as dD,ar as fD,as as Ci,at as Te,au as N,av as vo,aw as ro,ax as _e,ay as Zl,az as J,aA as II,aB as pD,aC as hD,aD as mD,aE as gD,aF as rs,aG as yx,aH as wi,aI as oe,aJ as Uo,aK as gf,aL as vD,aM as bD,aN as Rw,aO as Cx,aP as Se,aQ as Qs,aR as xD,aS as PI,aT as EI,aU as Aw,aV as yD,aW as CD,aX as wD,aY as Si,aZ as wx,a_ as on,a$ as SD,b0 as kD,b1 as Fa,b2 as MI,b3 as OI,b4 as Bt,b5 as sg,b6 as jD,b7 as Dw,b8 as RI,b9 as _D,ba as ID,bb as PD,bc as ED,bd as MD,be as OD,bf as RD,bg as AI,bh as AD,bi as DD,bj as TD,bk as ND,bl as $D,bm as pu,bn as Sx,bo as LD,bp as zD,bq as FD,br as Cc,bs as BD,bt as HD,bu as WD,bv as VD,bw as Tw,bx as UD,by as GD,bz as Jc,bA as DI,bB as TI,bC as ag,bD as kx,bE as jx,bF as Ps,bG as NI,bH as qD,bI as Bl,bJ as _d,bK as Nw,bL as KD,bM as QD,bN as XD,bO as Ap,bP as Dp,bQ as pd,bR as Pv,bS as Rd,bT as Ad,bU as Dd,bV as Td,bW as $w,bX as Lh,bY as Ev,bZ as zh,b_ as Lw,b$ as z1,c0 as Mv,c1 as F1,c2 as zw,c3 as Wc,c4 as Ov,c5 as Fh,c6 as Fw,c7 as Hl,c8 as Bw,c9 as Wl,ca as Tp,cb as Bh,cc as Hw,cd as B1,ce as Hh,cf as Ww,cg as H1,ch as vf,ci as $I,cj as YD,ck as Vw,cl as _x,cm as Wh,cn as LI,co as Oo,cp as hd,cq as wc,cr as Ix,cs as zI,ct as Np,cu as Px,cv as JD,cw as FI,cx as Rv,cy as ig,cz as ZD,cA as BI,cB as W1,cC as V1,cD as HI,cE as e7,cF as U1,cG as t7,cH as G1,cI as n7,cJ as q1,cK as r7,cL as WI,cM as o7,cN as VI,cO as UI,cP as s7,cQ as GI,cR as Ex,cS as Mx,cT as Ox,cU as Rx,cV as lg,cW as Ax,cX as ti,cY as qI,cZ as KI,c_ as Dx,c$ as QI,d0 as a7,d1 as md,d2 as di,d3 as XI,d4 as YI,d5 as Uw,d6 as Tx,d7 as JI,d8 as Nx,d9 as $x,da as ZI,db as Rr,dc as i7,dd as Kr,de as l7,df as Au,dg as cg,dh as Lx,di as eP,dj as tP,dk as c7,dl as u7,dm as d7,dn as Vh,dp as nP,dq as rP,dr as f7,ds as p7,dt as h7,du as m7,dv as g7,dw as v7,dx as b7,dy as x7,dz as Gw,dA as zx,dB as y7,dC as C7,dD as bf,dE as w7,dF as S7,dG as ug,dH as k7,dI as j7,dJ as _7,dK as I7,dL as gr,dM as P7,dN as E7,dO as M7,dP as O7,dQ as R7,dR as A7,dS as Zn,dT as Wd,dU as qw,dV as na,dW as oP,dX as D7,dY as Fx,dZ as T7,d_ as Kw,d$ as N7,e0 as $7,e1 as L7,e2 as sP,e3 as z7,e4 as F7,e5 as B7,e6 as H7,e7 as W7,e8 as V7,e9 as aP,ea as U7,eb as G7,ec as Qw,ed as q7,ee as K7,ef as Q7,eg as X7,eh as Y7,ei as J7,ej as Z7,ek as iP,el as eT,em as tT,en as nT,eo as Xw,ep as $p,eq as Rs,er as rT,es as oT,et as sT,eu as aT,ev as iT,ew as lT,ex as Xs,ey as cT,ez as uT,eA as dT,eB as fT,eC as pT,eD as hT,eE as mT,eF as gT,eG as vT,eH as bT,eI as xT,eJ as yT,eK as CT,eL as wT,eM as ST,eN as kT,eO as jT,eP as _T,eQ as IT,eR as PT,eS as ET,eT as MT,eU as OT,eV as RT,eW as AT,eX as Yw,eY as lP,eZ as DT,e_ as Us,e$ as Vd,f0 as Mo,f1 as TT,f2 as NT,f3 as cP,f4 as uP,f5 as $T,f6 as Jw,f7 as LT,f8 as Zw,f9 as eS,fa as tS,fb as zT,fc as FT,fd as nS,fe as rS,ff as BT,fg as HT,fh as Uh,fi as WT,fj as oS,fk as sS,fl as VT,fm as UT,fn as dP,fo as GT,fp as qT,fq as fP,fr as KT,fs as QT,ft as aS,fu as XT,fv as iS,fw as YT,fx as JT,fy as pP,fz as hP,fA as xf,fB as mP,fC as Ol,fD as gP,fE as lS,fF as ZT,fG as eN,fH as vP,fI as tN,fJ as nN,fK as rN,fL as oN,fM as sN,fN as Bx,fO as K1,fP as aN,fQ as iN,fR as lN,fS as bP,fT as Hx,fU as xP,fV as Wx,fW as yP,fX as cN,fY as ri,fZ as uN,f_ as CP,f$ as Du,g0 as dN,g1 as Vx,g2 as wP,g3 as fN,g4 as pN,g5 as hN,g6 as mN,g7 as gN,g8 as vN,g9 as Id,ga as Vc,gb as cS,gc as bN,gd as xN,ge as yN,gf as CN,gg as wN,gh as SN,gi as kN,gj as uS,gk as jN,gl as _N,gm as IN,gn as PN,go as EN,gp as MN,gq as dS,gr as ON,gs as RN,gt as AN,gu as DN,gv as TN,gw as NN,gx as $N,gy as LN,gz as zN,gA as fS,gB as FN,gC as BN,gD as HN,gE as WN,gF as VN,gG as UN,gH as GN,gI as qN,gJ as KN,gK as QN,gL as XN,gM as YN,gN as JN,gO as yf,gP as ZN,gQ as e9,gR as t9,gS as n9,gT as r9,gU as o9,gV as s9,gW as a9,gX as pS,gY as Sh,gZ as i9,g_ as Gh,g$ as SP,h0 as qh,h1 as l9,h2 as c9,h3 as Zc,h4 as kP,h5 as jP,h6 as Ux,h7 as u9,h8 as d9,h9 as f9,ha as Q1,hb as _P,hc as p9,hd as h9,he as IP,hf as m9,hg as g9,hh as v9,hi as b9,hj as x9,hk as hS,hl as Sc,hm as y9,hn as C9,ho as w9,hp as S9,hq as k9,hr as mS,hs as j9,ht as _9,hu as I9,hv as P9,hw as E9,hx as M9,hy as O9,hz as R9,hA as Av,hB as Dv,hC as Tv,hD as Lp,hE as gS,hF as X1,hG as vS,hH as A9,hI as D9,hJ as PP,hK as T9,hL as N9,hM as $9,hN as L9,hO as z9,hP as F9,hQ as B9,hR as H9,hS as W9,hT as V9,hU as U9,hV as G9,hW as q9,hX as K9,hY as Q9,hZ as zp,h_ as Nv,h$ as X9,i0 as Y9,i1 as J9,i2 as Z9,i3 as e$,i4 as t$,i5 as n$,i6 as r$,i7 as o$,i8 as bS,i9 as xS,ia as s$,ib as a$,ic as i$,id as l$}from"./index-c553e366.js";import{u as EP,a as ki,b as c$,r as Ge,f as u$,g as yS,c as Xt,d as Nr}from"./MantineProvider-094ba0de.js";var d$=200;function f$(e,t,n,r){var o=-1,s=vI,i=!0,c=e.length,d=[],p=t.length;if(!c)return d;n&&(t=Ou(t,mI(n))),r?(s=bI,i=!1):t.length>=d$&&(s=N1,i=!1,t=new gI(t));e:for(;++o=120&&h.length>=120)?new gI(i&&h):void 0}h=e[0];var m=-1,g=c[0];e:for(;++m{r.has(s)&&n(o,s)})}function P$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}const MP=({id:e,x:t,y:n,width:r,height:o,style:s,color:i,strokeColor:c,strokeWidth:d,className:p,borderRadius:h,shapeRendering:m,onClick:g,selected:b})=>{const{background:y,backgroundColor:x}=s||{},C=i||y||x;return a.jsx("rect",{className:vx(["react-flow__minimap-node",{selected:b},p]),x:t,y:n,rx:h,ry:h,width:r,height:o,fill:C,stroke:c,strokeWidth:d,shapeRendering:m,onClick:g?S=>g(S,e):void 0})};MP.displayName="MiniMapNode";var E$=l.memo(MP);const M$=e=>e.nodeOrigin,O$=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),$v=e=>e instanceof Function?e:()=>e;function R$({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:s=E$,onClick:i}){const c=$h(O$,bx),d=$h(M$),p=$v(t),h=$v(e),m=$v(n),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return a.jsx(a.Fragment,{children:c.map(b=>{const{x:y,y:x}=XA(b,d).positionAbsolute;return a.jsx(s,{x:y,y:x,width:b.width,height:b.height,style:b.style,selected:b.selected,className:m(b),color:p(b),borderRadius:r,strokeColor:h(b),strokeWidth:o,shapeRendering:g,onClick:i,id:b.id},b.id)})})}var A$=l.memo(R$);const D$=200,T$=150,N$=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?rD(oD(t,e.nodeOrigin),n):n,rfId:e.rfId}},$$="react-flow__minimap-desc";function OP({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:i=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:p="none",maskStrokeWidth:h=1,position:m="bottom-right",onClick:g,onNodeClick:b,pannable:y=!1,zoomable:x=!1,ariaLabel:C="React Flow mini map",inversePan:S=!1,zoomStep:j=10,offsetScale:_=5}){const I=YA(),P=l.useRef(null),{boundingRect:M,viewBB:R,rfId:A}=$h(N$,bx),D=(e==null?void 0:e.width)??D$,O=(e==null?void 0:e.height)??T$,T=M.width/D,Y=M.height/O,z=Math.max(T,Y),W=z*D,Q=z*O,U=_*z,L=M.x-(W-M.width)/2-U,ee=M.y-(Q-M.height)/2-U,K=W+U*2,Z=Q+U*2,se=`${$$}-${A}`,fe=l.useRef(0);fe.current=z,l.useEffect(()=>{if(P.current){const V=JA(P.current),F=q=>{const{transform:ne,d3Selection:pe,d3Zoom:le}=I.getState();if(q.sourceEvent.type!=="wheel"||!pe||!le)return;const we=-q.sourceEvent.deltaY*(q.sourceEvent.deltaMode===1?.05:q.sourceEvent.deltaMode?1:.002)*j,ve=ne[2]*Math.pow(2,we);le.scaleTo(pe,ve)},X=q=>{const{transform:ne,d3Selection:pe,d3Zoom:le,translateExtent:we,width:ve,height:he}=I.getState();if(q.sourceEvent.type!=="mousemove"||!pe||!le)return;const Ne=fe.current*Math.max(1,ne[2])*(S?-1:1),De={x:ne[0]-q.sourceEvent.movementX*Ne,y:ne[1]-q.sourceEvent.movementY*Ne},qe=[[0,0],[ve,he]],Mt=tD.translate(De.x,De.y).scale(ne[2]),ot=le.constrain()(Mt,qe,we);le.transform(pe,ot)},ue=ZA().on("zoom",y?X:null).on("zoom.wheel",x?F:null);return V.call(ue),()=>{V.on("zoom",null)}}},[y,x,S,j]);const G=g?V=>{const F=nD(V);g(V,{x:F[0],y:F[1]})}:void 0,te=b?(V,F)=>{const X=I.getState().nodeInternals.get(F);b(V,X)}:void 0;return a.jsx(eD,{position:m,style:e,className:vx(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:a.jsxs("svg",{width:D,height:O,viewBox:`${L} ${ee} ${K} ${Z}`,role:"img","aria-labelledby":se,ref:P,onClick:G,children:[C&&a.jsx("title",{id:se,children:C}),a.jsx(A$,{onClick:te,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:c}),a.jsx("path",{className:"react-flow__minimap-mask",d:`M${L-U},${ee-U}h${K+U*2}v${Z+U*2}h${-K-U*2}z + M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}OP.displayName="MiniMap";var L$=l.memo(OP),Ys;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ys||(Ys={}));function z$({color:e,dimensions:t,lineWidth:n}){return a.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function F$({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const B$={[Ys.Dots]:"#91919a",[Ys.Lines]:"#eee",[Ys.Cross]:"#e2e2e2"},H$={[Ys.Dots]:1,[Ys.Lines]:1,[Ys.Cross]:6},W$=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function RP({id:e,variant:t=Ys.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:c,className:d}){const p=l.useRef(null),{transform:h,patternId:m}=$h(W$,bx),g=i||B$[t],b=r||H$[t],y=t===Ys.Dots,x=t===Ys.Cross,C=Array.isArray(n)?n:[n,n],S=[C[0]*h[2]||1,C[1]*h[2]||1],j=b*h[2],_=x?[j,j]:S,I=y?[j/s,j/s]:[_[0]/s,_[1]/s];return a.jsxs("svg",{className:vx(["react-flow__background",d]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:m+e,x:h[0]%S[0],y:h[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${I[0]},-${I[1]})`,children:y?a.jsx(F$,{color:g,radius:j/s}):a.jsx(z$,{dimensions:_,color:g,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}RP.displayName="Background";var V$=l.memo(RP);function U$(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var G$=U$();const AP=1/60*1e3,q$=typeof performance<"u"?()=>performance.now():()=>Date.now(),DP=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(q$()),AP);function K$(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,c={schedule:(d,p=!1,h=!1)=>{const m=h&&o,g=m?t:n;return p&&i.add(d),g.indexOf(d)===-1&&(g.push(d),m&&o&&(r=t.length)),d},cancel:d=>{const p=n.indexOf(d);p!==-1&&n.splice(p,1),i.delete(d)},process:d=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p(e[t]=K$(()=>Ud=!0),e),{}),X$=Cf.reduce((e,t)=>{const n=dg[t];return e[t]=(r,o=!1,s=!1)=>(Ud||Z$(),n.schedule(r,o,s)),e},{}),Y$=Cf.reduce((e,t)=>(e[t]=dg[t].cancel,e),{});Cf.reduce((e,t)=>(e[t]=()=>dg[t].process(eu),e),{});const J$=e=>dg[e].process(eu),TP=e=>{Ud=!1,eu.delta=Y1?AP:Math.max(Math.min(e-eu.timestamp,Q$),1),eu.timestamp=e,J1=!0,Cf.forEach(J$),J1=!1,Ud&&(Y1=!1,DP(TP))},Z$=()=>{Ud=!0,Y1=!0,J1||DP(TP)},wS=()=>eu;function fg(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=l.Children.toArray(e.path),i=Oe((c,d)=>a.jsx(zr,{ref:d,viewBox:t,...o,...c,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}var eL=Object.defineProperty,tL=(e,t,n)=>t in e?eL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Er=(e,t,n)=>(tL(e,typeof t!="symbol"?t+"":t,n),n);function SS(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var nL=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function kS(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function jS(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Z1=typeof window<"u"?l.useLayoutEffect:l.useEffect,Kh=e=>e,rL=class{constructor(){Er(this,"descendants",new Map),Er(this,"register",e=>{if(e!=null)return nL(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Er(this,"unregister",e=>{this.descendants.delete(e);const t=SS(Array.from(this.descendants.keys()));this.assignIndex(t)}),Er(this,"destroy",()=>{this.descendants.clear()}),Er(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Er(this,"count",()=>this.descendants.size),Er(this,"enabledCount",()=>this.enabledValues().length),Er(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Er(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Er(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Er(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Er(this,"first",()=>this.item(0)),Er(this,"firstEnabled",()=>this.enabledItem(0)),Er(this,"last",()=>this.item(this.descendants.size-1)),Er(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Er(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Er(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Er(this,"next",(e,t=!0)=>{const n=kS(e,this.count(),t);return this.item(n)}),Er(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=kS(r,this.enabledCount(),t);return this.enabledItem(o)}),Er(this,"prev",(e,t=!0)=>{const n=jS(e,this.count()-1,t);return this.item(n)}),Er(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=jS(r,this.enabledCount()-1,t);return this.enabledItem(o)}),Er(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=SS(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function oL(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function gn(...e){return t=>{e.forEach(n=>{oL(n,t)})}}function sL(...e){return l.useMemo(()=>gn(...e),e)}function aL(){const e=l.useRef(new rL);return Z1(()=>()=>e.current.destroy()),e.current}var[iL,NP]=Hn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function lL(e){const t=NP(),[n,r]=l.useState(-1),o=l.useRef(null);Z1(()=>()=>{o.current&&t.unregister(o.current)},[]),Z1(()=>{if(!o.current)return;const i=Number(o.current.dataset.index);n!=i&&!Number.isNaN(i)&&r(i)});const s=Kh(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:gn(s,o)}}function Gx(){return[Kh(iL),()=>Kh(NP()),()=>aL(),o=>lL(o)]}var[cL,pg]=Hn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[uL,qx]=Hn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[dL,dbe,fL,pL]=Gx(),Dc=Oe(function(t,n){const{getButtonProps:r}=qx(),o=r(t,n),i={display:"flex",alignItems:"center",width:"100%",outline:0,...pg().button};return a.jsx(Ee.button,{...o,className:jt("chakra-accordion__button",t.className),__css:i})});Dc.displayName="AccordionButton";function wf(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(g,b)=>g!==b}=e,s=pr(r),i=pr(o),[c,d]=l.useState(n),p=t!==void 0,h=p?t:c,m=pr(g=>{const y=typeof g=="function"?g(h):g;i(h,y)&&(p||d(y),s(y))},[p,s,h,i]);return[h,m]}function hL(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...i}=e;vL(e),bL(e);const c=fL(),[d,p]=l.useState(-1);l.useEffect(()=>()=>{p(-1)},[]);const[h,m]=wf({value:r,defaultValue(){return o?n??[]:n??-1},onChange:t});return{index:h,setIndex:m,htmlProps:i,getAccordionItemProps:b=>{let y=!1;return b!==null&&(y=Array.isArray(h)?h.includes(b):h===b),{isOpen:y,onChange:C=>{if(b!==null)if(o&&Array.isArray(h)){const S=C?h.concat(b):h.filter(j=>j!==b);m(S)}else C?m(b):s&&m(-1)}}},focusedIndex:d,setFocusedIndex:p,descendants:c}}var[mL,Kx]=Hn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function gL(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:i}=Kx(),c=l.useRef(null),d=l.useId(),p=r??d,h=`accordion-button-${p}`,m=`accordion-panel-${p}`;xL(e);const{register:g,index:b,descendants:y}=pL({disabled:t&&!n}),{isOpen:x,onChange:C}=s(b===-1?null:b);yL({isOpen:x,isDisabled:t});const S=()=>{C==null||C(!0)},j=()=>{C==null||C(!1)},_=l.useCallback(()=>{C==null||C(!x),i(b)},[b,i,x,C]),I=l.useCallback(A=>{const O={ArrowDown:()=>{const T=y.nextEnabled(b);T==null||T.node.focus()},ArrowUp:()=>{const T=y.prevEnabled(b);T==null||T.node.focus()},Home:()=>{const T=y.firstEnabled();T==null||T.node.focus()},End:()=>{const T=y.lastEnabled();T==null||T.node.focus()}}[A.key];O&&(A.preventDefault(),O(A))},[y,b]),P=l.useCallback(()=>{i(b)},[i,b]),M=l.useCallback(function(D={},O=null){return{...D,type:"button",ref:gn(g,c,O),id:h,disabled:!!t,"aria-expanded":!!x,"aria-controls":m,onClick:rt(D.onClick,_),onFocus:rt(D.onFocus,P),onKeyDown:rt(D.onKeyDown,I)}},[h,t,x,_,P,I,m,g]),R=l.useCallback(function(D={},O=null){return{...D,ref:O,role:"region",id:m,"aria-labelledby":h,hidden:!x}},[h,x,m]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:S,onClose:j,getButtonProps:M,getPanelProps:R,htmlProps:o}}function vL(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;pf({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function bL(e){pf({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function xL(e){pf({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function yL(e){pf({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Tc(e){const{isOpen:t,isDisabled:n}=qx(),{reduceMotion:r}=Kx(),o=jt("chakra-accordion__icon",e.className),s=pg(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return a.jsx(zr,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Tc.displayName="AccordionIcon";var Nc=Oe(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=gL(t),d={...pg().container,overflowAnchor:"none"},p=l.useMemo(()=>i,[i]);return a.jsx(uL,{value:p,children:a.jsx(Ee.div,{ref:n,...s,className:jt("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Nc.displayName="AccordionItem";var Uc={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dl={enter:{duration:.2,ease:Uc.easeOut},exit:{duration:.1,ease:Uc.easeIn}},si={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},CL=e=>e!=null&&parseInt(e.toString(),10)>0,_S={exit:{height:{duration:.2,ease:Uc.ease},opacity:{duration:.3,ease:Uc.ease}},enter:{height:{duration:.3,ease:Uc.ease},opacity:{duration:.4,ease:Uc.ease}}},wL={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:CL(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:si.exit(_S.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:si.enter(_S.enter,o)}}},Sf=l.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:c,className:d,transition:p,transitionEnd:h,...m}=e,[g,b]=l.useState(!1);l.useEffect(()=>{const j=setTimeout(()=>{b(!0)});return()=>clearTimeout(j)},[]),pf({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:i,animateOpacity:o,transition:g?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:y?"block":"none"}}},C=r?n:!0,S=n||r?"enter":"exit";return a.jsx(yo,{initial:!1,custom:x,children:C&&a.jsx(Or.div,{ref:t,...m,className:jt("chakra-collapse",d),style:{overflow:"hidden",display:"block",...c},custom:x,variants:wL,initial:r?"exit":!1,animate:S,exit:"exit"})})});Sf.displayName="Collapse";var SL={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:si.enter(Dl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:si.exit(Dl.exit,n),transitionEnd:t==null?void 0:t.exit}}},$P={initial:"exit",animate:"enter",exit:"exit",variants:SL},kL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:c,delay:d,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,g={transition:i,transitionEnd:c,delay:d};return a.jsx(yo,{custom:g,children:m&&a.jsx(Or.div,{ref:n,className:jt("chakra-fade",s),custom:g,...$P,animate:h,...p})})});kL.displayName="Fade";var jL={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:si.exit(Dl.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:si.enter(Dl.enter,n),transitionEnd:e==null?void 0:e.enter}}},LP={initial:"exit",animate:"enter",exit:"exit",variants:jL},_L=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:i=.95,className:c,transition:d,transitionEnd:p,delay:h,...m}=t,g=r?o&&r:!0,b=o||r?"enter":"exit",y={initialScale:i,reverse:s,transition:d,transitionEnd:p,delay:h};return a.jsx(yo,{custom:y,children:g&&a.jsx(Or.div,{ref:n,className:jt("chakra-offset-slide",c),...LP,animate:b,custom:y,...m})})});_L.displayName="ScaleFade";var IL={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,x:e,y:t,transition:(s=n==null?void 0:n.exit)!=null?s:si.exit(Dl.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:si.enter(Dl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var i;const c={x:t,y:e};return{opacity:0,transition:(i=n==null?void 0:n.exit)!=null?i:si.exit(Dl.exit,s),...o?{...c,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...c,...r==null?void 0:r.exit}}}}},eb={initial:"initial",animate:"enter",exit:"exit",variants:IL},PL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:i,offsetX:c=0,offsetY:d=8,transition:p,transitionEnd:h,delay:m,...g}=t,b=r?o&&r:!0,y=o||r?"enter":"exit",x={offsetX:c,offsetY:d,reverse:s,transition:p,transitionEnd:h,delay:m};return a.jsx(yo,{custom:x,children:b&&a.jsx(Or.div,{ref:n,className:jt("chakra-offset-slide",i),custom:x,...eb,animate:y,...g})})});PL.displayName="SlideFade";var $c=Oe(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:i}=Kx(),{getPanelProps:c,isOpen:d}=qx(),p=c(s,n),h=jt("chakra-accordion__panel",r),m=pg();i||delete p.hidden;const g=a.jsx(Ee.div,{...p,__css:m.panel,className:h});return i?g:a.jsx(Sf,{in:d,...o,children:g})});$c.displayName="AccordionPanel";var zP=Oe(function({children:t,reduceMotion:n,...r},o){const s=Qr("Accordion",r),i=ar(r),{htmlProps:c,descendants:d,...p}=hL(i),h=l.useMemo(()=>({...p,reduceMotion:!!n}),[p,n]);return a.jsx(dL,{value:d,children:a.jsx(mL,{value:h,children:a.jsx(cL,{value:s,children:a.jsx(Ee.div,{ref:o,...c,className:jt("chakra-accordion",r.className),__css:s.root,children:t})})})})});zP.displayName="Accordion";function hg(e){return l.Children.toArray(e).filter(t=>l.isValidElement(t))}var[EL,ML]=Hn({strict:!1,name:"ButtonGroupContext"}),OL={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},RL={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},zn=Oe(function(t,n){const{size:r,colorScheme:o,variant:s,className:i,spacing:c="0.5rem",isAttached:d,isDisabled:p,orientation:h="horizontal",...m}=t,g=jt("chakra-button__group",i),b=l.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:p}),[r,o,s,p]);let y={display:"inline-flex",...d?OL[h]:RL[h](c)};const x=h==="vertical";return a.jsx(EL,{value:b,children:a.jsx(Ee.div,{ref:n,role:"group",__css:y,className:g,"data-attached":d?"":void 0,"data-orientation":h,flexDir:x?"column":void 0,...m})})});zn.displayName="ButtonGroup";function AL(e){const[t,n]=l.useState(!e);return{ref:l.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}function tb(e){const{children:t,className:n,...r}=e,o=l.isValidElement(t)?l.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=jt("chakra-button__icon",n);return a.jsx(Ee.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}tb.displayName="ButtonIcon";function nb(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=a.jsx(bi,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:i,...c}=e,d=jt("chakra-button__spinner",s),p=n==="start"?"marginEnd":"marginStart",h=l.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[p]:t?r:0,fontSize:"1em",lineHeight:"normal",...i}),[i,t,p,r]);return a.jsx(Ee.div,{className:d,...c,__css:h,children:o})}nb.displayName="ButtonSpinner";var tl=Oe((e,t)=>{const n=ML(),r=ll("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:i,children:c,leftIcon:d,rightIcon:p,loadingText:h,iconSpacing:m="0.5rem",type:g,spinner:b,spinnerPlacement:y="start",className:x,as:C,...S}=ar(e),j=l.useMemo(()=>{const M={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:M}}},[r,n]),{ref:_,type:I}=AL(C),P={rightIcon:p,leftIcon:d,iconSpacing:m,children:c};return a.jsxs(Ee.button,{ref:sL(t,_),as:C,type:g??I,"data-active":qt(i),"data-loading":qt(s),__css:j,className:jt("chakra-button",x),...S,disabled:o||s,children:[s&&y==="start"&&a.jsx(nb,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:m,children:b}),s?h||a.jsx(Ee.span,{opacity:0,children:a.jsx(IS,{...P})}):a.jsx(IS,{...P}),s&&y==="end"&&a.jsx(nb,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:m,children:b})]})});tl.displayName="Button";function IS(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return a.jsxs(a.Fragment,{children:[t&&a.jsx(tb,{marginEnd:o,children:t}),r,n&&a.jsx(tb,{marginStart:o,children:n})]})}var _a=Oe((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...i}=e,c=n||r,d=l.isValidElement(c)?l.cloneElement(c,{"aria-hidden":!0,focusable:!1}):null;return a.jsx(tl,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...i,children:d})});_a.displayName="IconButton";var[fbe,DL]=Hn({name:"CheckboxGroupContext",strict:!1});function TL(e){const[t,n]=l.useState(e),[r,o]=l.useState(!1);return e!==t&&(o(!0),n(e)),r}function NL(e){return a.jsx(Ee.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:a.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function $L(e){return a.jsx(Ee.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:a.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function LL(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?$L:NL;return n||t?a.jsx(Ee.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:a.jsx(o,{...r})}):null}var[zL,FP]=Hn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[FL,kf]=Hn({strict:!1,name:"FormControlContext"});function BL(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...i}=e,c=l.useId(),d=t||`field-${c}`,p=`${d}-label`,h=`${d}-feedback`,m=`${d}-helptext`,[g,b]=l.useState(!1),[y,x]=l.useState(!1),[C,S]=l.useState(!1),j=l.useCallback((R={},A=null)=>({id:m,...R,ref:gn(A,D=>{D&&x(!0)})}),[m]),_=l.useCallback((R={},A=null)=>({...R,ref:A,"data-focus":qt(C),"data-disabled":qt(o),"data-invalid":qt(r),"data-readonly":qt(s),id:R.id!==void 0?R.id:p,htmlFor:R.htmlFor!==void 0?R.htmlFor:d}),[d,o,C,r,s,p]),I=l.useCallback((R={},A=null)=>({id:h,...R,ref:gn(A,D=>{D&&b(!0)}),"aria-live":"polite"}),[h]),P=l.useCallback((R={},A=null)=>({...R,...i,ref:A,role:"group"}),[i]),M=l.useCallback((R={},A=null)=>({...R,ref:A,role:"presentation","aria-hidden":!0,children:R.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!C,onFocus:()=>S(!0),onBlur:()=>S(!1),hasFeedbackText:g,setHasFeedbackText:b,hasHelpText:y,setHasHelpText:x,id:d,labelId:p,feedbackId:h,helpTextId:m,htmlProps:i,getHelpTextProps:j,getErrorMessageProps:I,getRootProps:P,getLabelProps:_,getRequiredIndicatorProps:M}}var Bn=Oe(function(t,n){const r=Qr("Form",t),o=ar(t),{getRootProps:s,htmlProps:i,...c}=BL(o),d=jt("chakra-form-control",t.className);return a.jsx(FL,{value:c,children:a.jsx(zL,{value:r,children:a.jsx(Ee.div,{...s({},n),className:d,__css:r.container})})})});Bn.displayName="FormControl";var BP=Oe(function(t,n){const r=kf(),o=FP(),s=jt("chakra-form__helper-text",t.className);return a.jsx(Ee.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});BP.displayName="FormHelperText";var vr=Oe(function(t,n){var r;const o=ll("FormLabel",t),s=ar(t),{className:i,children:c,requiredIndicator:d=a.jsx(HP,{}),optionalIndicator:p=null,...h}=s,m=kf(),g=(r=m==null?void 0:m.getLabelProps(h,n))!=null?r:{ref:n,...h};return a.jsxs(Ee.label,{...g,className:jt("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...o},children:[c,m!=null&&m.isRequired?d:p]})});vr.displayName="FormLabel";var HP=Oe(function(t,n){const r=kf(),o=FP();if(!(r!=null&&r.isRequired))return null;const s=jt("chakra-form__required-indicator",t.className);return a.jsx(Ee.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});HP.displayName="RequiredIndicator";function Qx(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=Xx(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":_s(n),"aria-required":_s(o),"aria-readonly":_s(r)}}function Xx(e){var t,n,r;const o=kf(),{id:s,disabled:i,readOnly:c,required:d,isRequired:p,isInvalid:h,isReadOnly:m,isDisabled:g,onFocus:b,onBlur:y,...x}=e,C=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&C.push(o.feedbackId),o!=null&&o.hasHelpText&&C.push(o.helpTextId),{...x,"aria-describedby":C.join(" ")||void 0,id:s??(o==null?void 0:o.id),isDisabled:(t=i??g)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=c??m)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=d??p)!=null?r:o==null?void 0:o.isRequired,isInvalid:h??(o==null?void 0:o.isInvalid),onFocus:rt(o==null?void 0:o.onFocus,b),onBlur:rt(o==null?void 0:o.onBlur,y)}}var Yx={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},WP=Ee("span",{baseStyle:Yx});WP.displayName="VisuallyHidden";var HL=Ee("input",{baseStyle:Yx});HL.displayName="VisuallyHiddenInput";const WL=()=>typeof document<"u";let PS=!1,jf=null,Vl=!1,rb=!1;const ob=new Set;function Jx(e,t){ob.forEach(n=>n(e,t))}const VL=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function UL(e){return!(e.metaKey||!VL&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ES(e){Vl=!0,UL(e)&&(jf="keyboard",Jx("keyboard",e))}function kc(e){if(jf="pointer",e.type==="mousedown"||e.type==="pointerdown"){Vl=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;Jx("pointer",e)}}function GL(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function qL(e){GL(e)&&(Vl=!0,jf="virtual")}function KL(e){e.target===window||e.target===document||(!Vl&&!rb&&(jf="virtual",Jx("virtual",e)),Vl=!1,rb=!1)}function QL(){Vl=!1,rb=!0}function MS(){return jf!=="pointer"}function XL(){if(!WL()||PS)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Vl=!0,e.apply(this,n)},document.addEventListener("keydown",ES,!0),document.addEventListener("keyup",ES,!0),document.addEventListener("click",qL,!0),window.addEventListener("focus",KL,!0),window.addEventListener("blur",QL,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",kc,!0),document.addEventListener("pointermove",kc,!0),document.addEventListener("pointerup",kc,!0)):(document.addEventListener("mousedown",kc,!0),document.addEventListener("mousemove",kc,!0),document.addEventListener("mouseup",kc,!0)),PS=!0}function VP(e){XL(),e(MS());const t=()=>e(MS());return ob.add(t),()=>{ob.delete(t)}}function YL(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function UP(e={}){const t=Xx(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:i,onBlur:c,onFocus:d,"aria-describedby":p}=t,{defaultChecked:h,isChecked:m,isFocusable:g,onChange:b,isIndeterminate:y,name:x,value:C,tabIndex:S=void 0,"aria-label":j,"aria-labelledby":_,"aria-invalid":I,...P}=e,M=YL(P,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),R=pr(b),A=pr(c),D=pr(d),[O,T]=l.useState(!1),[Y,z]=l.useState(!1),[W,Q]=l.useState(!1),[U,L]=l.useState(!1);l.useEffect(()=>VP(T),[]);const ee=l.useRef(null),[K,Z]=l.useState(!0),[se,fe]=l.useState(!!h),G=m!==void 0,te=G?m:se,V=l.useCallback(he=>{if(r||n){he.preventDefault();return}G||fe(te?he.target.checked:y?!0:he.target.checked),R==null||R(he)},[r,n,te,G,y,R]);Yc(()=>{ee.current&&(ee.current.indeterminate=!!y)},[y]),xi(()=>{n&&z(!1)},[n,z]),Yc(()=>{const he=ee.current;if(!(he!=null&&he.form))return;const Ne=()=>{fe(!!h)};return he.form.addEventListener("reset",Ne),()=>{var De;return(De=he.form)==null?void 0:De.removeEventListener("reset",Ne)}},[]);const F=n&&!g,X=l.useCallback(he=>{he.key===" "&&L(!0)},[L]),ue=l.useCallback(he=>{he.key===" "&&L(!1)},[L]);Yc(()=>{if(!ee.current)return;ee.current.checked!==te&&fe(ee.current.checked)},[ee.current]);const q=l.useCallback((he={},Ne=null)=>{const De=qe=>{Y&&qe.preventDefault(),L(!0)};return{...he,ref:Ne,"data-active":qt(U),"data-hover":qt(W),"data-checked":qt(te),"data-focus":qt(Y),"data-focus-visible":qt(Y&&O),"data-indeterminate":qt(y),"data-disabled":qt(n),"data-invalid":qt(s),"data-readonly":qt(r),"aria-hidden":!0,onMouseDown:rt(he.onMouseDown,De),onMouseUp:rt(he.onMouseUp,()=>L(!1)),onMouseEnter:rt(he.onMouseEnter,()=>Q(!0)),onMouseLeave:rt(he.onMouseLeave,()=>Q(!1))}},[U,te,n,Y,O,W,y,s,r]),ne=l.useCallback((he={},Ne=null)=>({...he,ref:Ne,"data-active":qt(U),"data-hover":qt(W),"data-checked":qt(te),"data-focus":qt(Y),"data-focus-visible":qt(Y&&O),"data-indeterminate":qt(y),"data-disabled":qt(n),"data-invalid":qt(s),"data-readonly":qt(r)}),[U,te,n,Y,O,W,y,s,r]),pe=l.useCallback((he={},Ne=null)=>({...M,...he,ref:gn(Ne,De=>{De&&Z(De.tagName==="LABEL")}),onClick:rt(he.onClick,()=>{var De;K||((De=ee.current)==null||De.click(),requestAnimationFrame(()=>{var qe;(qe=ee.current)==null||qe.focus({preventScroll:!0})}))}),"data-disabled":qt(n),"data-checked":qt(te),"data-invalid":qt(s)}),[M,n,te,s,K]),le=l.useCallback((he={},Ne=null)=>({...he,ref:gn(ee,Ne),type:"checkbox",name:x,value:C,id:i,tabIndex:S,onChange:rt(he.onChange,V),onBlur:rt(he.onBlur,A,()=>z(!1)),onFocus:rt(he.onFocus,D,()=>z(!0)),onKeyDown:rt(he.onKeyDown,X),onKeyUp:rt(he.onKeyUp,ue),required:o,checked:te,disabled:F,readOnly:r,"aria-label":j,"aria-labelledby":_,"aria-invalid":I?!!I:s,"aria-describedby":p,"aria-disabled":n,style:Yx}),[x,C,i,V,A,D,X,ue,o,te,F,r,j,_,I,s,p,n,S]),we=l.useCallback((he={},Ne=null)=>({...he,ref:Ne,onMouseDown:rt(he.onMouseDown,JL),"data-disabled":qt(n),"data-checked":qt(te),"data-invalid":qt(s)}),[te,n,s]);return{state:{isInvalid:s,isFocused:Y,isChecked:te,isActive:U,isHovered:W,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:pe,getCheckboxProps:q,getIndicatorProps:ne,getInputProps:le,getLabelProps:we,htmlProps:M}}function JL(e){e.preventDefault(),e.stopPropagation()}var ZL={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ez={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},tz=yi({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),nz=yi({from:{opacity:0},to:{opacity:1}}),rz=yi({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),_f=Oe(function(t,n){const r=DL(),o={...r,...t},s=Qr("Checkbox",o),i=ar(t),{spacing:c="0.5rem",className:d,children:p,iconColor:h,iconSize:m,icon:g=a.jsx(LL,{}),isChecked:b,isDisabled:y=r==null?void 0:r.isDisabled,onChange:x,inputProps:C,...S}=i;let j=b;r!=null&&r.value&&i.value&&(j=r.value.includes(i.value));let _=x;r!=null&&r.onChange&&i.value&&(_=og(r.onChange,x));const{state:I,getInputProps:P,getCheckboxProps:M,getLabelProps:R,getRootProps:A}=UP({...S,isDisabled:y,isChecked:j,onChange:_}),D=TL(I.isChecked),O=l.useMemo(()=>({animation:D?I.isIndeterminate?`${nz} 20ms linear, ${rz} 200ms linear`:`${tz} 200ms linear`:void 0,fontSize:m,color:h,...s.icon}),[h,m,D,I.isIndeterminate,s.icon]),T=l.cloneElement(g,{__css:O,isIndeterminate:I.isIndeterminate,isChecked:I.isChecked});return a.jsxs(Ee.label,{__css:{...ez,...s.container},className:jt("chakra-checkbox",d),...A(),children:[a.jsx("input",{className:"chakra-checkbox__input",...P(C,n)}),a.jsx(Ee.span,{__css:{...ZL,...s.control},className:"chakra-checkbox__control",...M(),children:T}),p&&a.jsx(Ee.span,{className:"chakra-checkbox__label",...R(),__css:{marginStart:c,...s.label},children:p})]})});_f.displayName="Checkbox";function oz(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function Zx(e,t){let n=oz(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function sb(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function Qh(e,t,n){return(e-t)*100/(n-t)}function GP(e,t,n){return(n-t)*e+t}function ab(e,t,n){const r=Math.round((e-t)/n)*n+t,o=sb(n);return Zx(r,o)}function tu(e,t,n){return e==null?e:(n{var O;return r==null?"":(O=Lv(r,s,n))!=null?O:""}),g=typeof o<"u",b=g?o:h,y=qP(Bi(b),s),x=n??y,C=l.useCallback(O=>{O!==b&&(g||m(O.toString()),p==null||p(O.toString(),Bi(O)))},[p,g,b]),S=l.useCallback(O=>{let T=O;return d&&(T=tu(T,i,c)),Zx(T,x)},[x,d,c,i]),j=l.useCallback((O=s)=>{let T;b===""?T=Bi(O):T=Bi(b)+O,T=S(T),C(T)},[S,s,C,b]),_=l.useCallback((O=s)=>{let T;b===""?T=Bi(-O):T=Bi(b)-O,T=S(T),C(T)},[S,s,C,b]),I=l.useCallback(()=>{var O;let T;r==null?T="":T=(O=Lv(r,s,n))!=null?O:i,C(T)},[r,n,s,C,i]),P=l.useCallback(O=>{var T;const Y=(T=Lv(O,s,x))!=null?T:i;C(Y)},[x,s,C,i]),M=Bi(b);return{isOutOfRange:M>c||M" `}),[iz,ey]=Hn({name:"EditableContext",errorMessage:"useEditableContext: context is undefined. Seems you forgot to wrap the editable components in ``"}),QP={fontSize:"inherit",fontWeight:"inherit",textAlign:"inherit",bg:"transparent"},If=Oe(function(t,n){const{getInputProps:r}=ey(),o=KP(),s=r(t,n),i=jt("chakra-editable__input",t.className);return a.jsx(Ee.input,{...s,__css:{outline:0,...QP,...o.input},className:i})});If.displayName="EditableInput";var Pf=Oe(function(t,n){const{getPreviewProps:r}=ey(),o=KP(),s=r(t,n),i=jt("chakra-editable__preview",t.className);return a.jsx(Ee.span,{...s,__css:{cursor:"text",display:"inline-block",...QP,...o.preview},className:i})});Pf.displayName="EditablePreview";function Tl(e,t,n,r){const o=pr(n);return l.useEffect(()=>{const s=typeof e=="function"?e():e??document;if(!(!n||!s))return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const s=typeof e=="function"?e():e??document;s==null||s.removeEventListener(t,o,r)}}function lz(e){return"current"in e}var XP=()=>typeof window<"u";function cz(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var uz=e=>XP()&&e.test(navigator.vendor),dz=e=>XP()&&e.test(cz()),fz=()=>dz(/mac|iphone|ipad|ipod/i),pz=()=>fz()&&uz(/apple/i);function YP(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,i;return(i=(s=t.current)==null?void 0:s.ownerDocument)!=null?i:document};Tl(o,"pointerdown",s=>{if(!pz()||!r)return;const i=s.target,d=(n??[t]).some(p=>{const h=lz(p)?p.current:p;return(h==null?void 0:h.contains(i))||h===i});o().activeElement!==i&&d&&(s.preventDefault(),i.focus())})}function OS(e,t){return e?e===t||e.contains(t):!1}function hz(e={}){const{onChange:t,onCancel:n,onSubmit:r,onBlur:o,value:s,isDisabled:i,defaultValue:c,startWithEditView:d,isPreviewFocusable:p=!0,submitOnBlur:h=!0,selectAllOnFocus:m=!0,placeholder:g,onEdit:b,finalFocusRef:y,...x}=e,C=pr(b),S=!!(d&&!i),[j,_]=l.useState(S),[I,P]=wf({defaultValue:c||"",value:s,onChange:t}),[M,R]=l.useState(I),A=l.useRef(null),D=l.useRef(null),O=l.useRef(null),T=l.useRef(null),Y=l.useRef(null);YP({ref:A,enabled:j,elements:[T,Y]});const z=!j&&!i;Yc(()=>{var q,ne;j&&((q=A.current)==null||q.focus(),m&&((ne=A.current)==null||ne.select()))},[]),xi(()=>{var q,ne,pe,le;if(!j){y?(q=y.current)==null||q.focus():(ne=O.current)==null||ne.focus();return}(pe=A.current)==null||pe.focus(),m&&((le=A.current)==null||le.select()),C==null||C()},[j,C,m]);const W=l.useCallback(()=>{z&&_(!0)},[z]),Q=l.useCallback(()=>{R(I)},[I]),U=l.useCallback(()=>{_(!1),P(M),n==null||n(M),o==null||o(M)},[n,o,P,M]),L=l.useCallback(()=>{_(!1),R(I),r==null||r(I),o==null||o(M)},[I,r,o,M]);l.useEffect(()=>{if(j)return;const q=A.current;(q==null?void 0:q.ownerDocument.activeElement)===q&&(q==null||q.blur())},[j]);const ee=l.useCallback(q=>{P(q.currentTarget.value)},[P]),K=l.useCallback(q=>{const ne=q.key,le={Escape:U,Enter:we=>{!we.shiftKey&&!we.metaKey&&L()}}[ne];le&&(q.preventDefault(),le(q))},[U,L]),Z=l.useCallback(q=>{const ne=q.key,le={Escape:U}[ne];le&&(q.preventDefault(),le(q))},[U]),se=I.length===0,fe=l.useCallback(q=>{var ne;if(!j)return;const pe=q.currentTarget.ownerDocument,le=(ne=q.relatedTarget)!=null?ne:pe.activeElement,we=OS(T.current,le),ve=OS(Y.current,le);!we&&!ve&&(h?L():U())},[h,L,U,j]),G=l.useCallback((q={},ne=null)=>{const pe=z&&p?0:void 0;return{...q,ref:gn(ne,D),children:se?g:I,hidden:j,"aria-disabled":_s(i),tabIndex:pe,onFocus:rt(q.onFocus,W,Q)}},[i,j,z,p,se,W,Q,g,I]),te=l.useCallback((q={},ne=null)=>({...q,hidden:!j,placeholder:g,ref:gn(ne,A),disabled:i,"aria-disabled":_s(i),value:I,onBlur:rt(q.onBlur,fe),onChange:rt(q.onChange,ee),onKeyDown:rt(q.onKeyDown,K),onFocus:rt(q.onFocus,Q)}),[i,j,fe,ee,K,Q,g,I]),V=l.useCallback((q={},ne=null)=>({...q,hidden:!j,placeholder:g,ref:gn(ne,A),disabled:i,"aria-disabled":_s(i),value:I,onBlur:rt(q.onBlur,fe),onChange:rt(q.onChange,ee),onKeyDown:rt(q.onKeyDown,Z),onFocus:rt(q.onFocus,Q)}),[i,j,fe,ee,Z,Q,g,I]),F=l.useCallback((q={},ne=null)=>({"aria-label":"Edit",...q,type:"button",onClick:rt(q.onClick,W),ref:gn(ne,O),disabled:i}),[W,i]),X=l.useCallback((q={},ne=null)=>({...q,"aria-label":"Submit",ref:gn(Y,ne),type:"button",onClick:rt(q.onClick,L),disabled:i}),[L,i]),ue=l.useCallback((q={},ne=null)=>({"aria-label":"Cancel",id:"cancel",...q,ref:gn(T,ne),type:"button",onClick:rt(q.onClick,U),disabled:i}),[U,i]);return{isEditing:j,isDisabled:i,isValueEmpty:se,value:I,onEdit:W,onCancel:U,onSubmit:L,getPreviewProps:G,getInputProps:te,getTextareaProps:V,getEditButtonProps:F,getSubmitButtonProps:X,getCancelButtonProps:ue,htmlProps:x}}var Ef=Oe(function(t,n){const r=Qr("Editable",t),o=ar(t),{htmlProps:s,...i}=hz(o),{isEditing:c,onSubmit:d,onCancel:p,onEdit:h}=i,m=jt("chakra-editable",t.className),g=xx(t.children,{isEditing:c,onSubmit:d,onCancel:p,onEdit:h});return a.jsx(iz,{value:i,children:a.jsx(az,{value:r,children:a.jsx(Ee.div,{ref:n,...s,className:m,children:g})})})});Ef.displayName="Editable";function JP(){const{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}=ey();return{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}}var ZP={exports:{}},mz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",gz=mz,vz=gz;function e5(){}function t5(){}t5.resetWarningCache=e5;var bz=function(){function e(r,o,s,i,c,d){if(d!==vz){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:t5,resetWarningCache:e5};return n.PropTypes=n,n};ZP.exports=bz();var xz=ZP.exports;const Jn=hf(xz);var ib="data-focus-lock",n5="data-focus-lock-disabled",yz="data-no-focus-lock",Cz="data-autofocus-inside",wz="data-no-autofocus";function Sz(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kz(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function r5(e,t){return kz(t||null,function(n){return e.forEach(function(r){return Sz(r,n)})})}var zv={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ca=function(){return Ca=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&s[s.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function lb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r=0}).sort(Lz)},zz=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],oy=zz.join(","),Fz="".concat(oy,", [data-focus-guard]"),C5=function(e,t){return Ba((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?Fz:oy)?[r]:[],C5(r))},[])},Bz=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?mg([e.contentDocument.body],t):[e]},mg=function(e,t){return e.reduce(function(n,r){var o,s=C5(r,t),i=(o=[]).concat.apply(o,s.map(function(c){return Bz(c,t)}));return n.concat(i,r.parentNode?Ba(r.parentNode.querySelectorAll(oy)).filter(function(c){return c===r}):[])},[])},Hz=function(e){var t=e.querySelectorAll("[".concat(Cz,"]"));return Ba(t).map(function(n){return mg([n])}).reduce(function(n,r){return n.concat(r)},[])},sy=function(e,t){return Ba(e).filter(function(n){return m5(t,n)}).filter(function(n){return Tz(n)})},AS=function(e,t){return t===void 0&&(t=new Map),Ba(e).filter(function(n){return g5(t,n)})},ub=function(e,t,n){return y5(sy(mg(e,n),t),!0,n)},DS=function(e,t){return y5(sy(mg(e),t),!1)},Wz=function(e,t){return sy(Hz(e),t)},nu=function(e,t){return e.shadowRoot?nu(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ba(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?nu(o,t):!1}return nu(n,t)})},Vz=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,c){return!t.has(c)})},w5=function(e){return e.parentNode?w5(e.parentNode):e},ay=function(e){var t=Xh(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(ib);return n.push.apply(n,o?Vz(Ba(w5(r).querySelectorAll("[".concat(ib,'="').concat(o,'"]:not([').concat(n5,'="disabled"])')))):[r]),n},[])},Uz=function(e){try{return e()}catch{return}},Gd=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Gd(t.shadowRoot):t instanceof HTMLIFrameElement&&Uz(function(){return t.contentWindow.document})?Gd(t.contentWindow.document):t}},Gz=function(e,t){return e===t},qz=function(e,t){return!!Ba(e.querySelectorAll("iframe")).some(function(n){return Gz(n,t)})},S5=function(e,t){return t===void 0&&(t=Gd(f5(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:ay(e).some(function(n){return nu(n,t)||qz(n,t)})},Kz=function(e){e===void 0&&(e=document);var t=Gd(e);return t?Ba(e.querySelectorAll("[".concat(yz,"]"))).some(function(n){return nu(n,t)}):!1},Qz=function(e,t){return t.filter(x5).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},iy=function(e,t){return x5(e)&&e.name?Qz(e,t):e},Xz=function(e){var t=new Set;return e.forEach(function(n){return t.add(iy(n,e))}),e.filter(function(n){return t.has(n)})},TS=function(e){return e[0]&&e.length>1?iy(e[0],e):e[0]},NS=function(e,t){return e.length>1?e.indexOf(iy(e[t],e)):t},k5="NEW_FOCUS",Yz=function(e,t,n,r){var o=e.length,s=e[0],i=e[o-1],c=ry(n);if(!(n&&e.indexOf(n)>=0)){var d=n!==void 0?t.indexOf(n):-1,p=r?t.indexOf(r):d,h=r?e.indexOf(r):-1,m=d-p,g=t.indexOf(s),b=t.indexOf(i),y=Xz(t),x=n!==void 0?y.indexOf(n):-1,C=x-(r?y.indexOf(r):d),S=NS(e,0),j=NS(e,o-1);if(d===-1||h===-1)return k5;if(!m&&h>=0)return h;if(d<=g&&c&&Math.abs(m)>1)return j;if(d>=b&&c&&Math.abs(m)>1)return S;if(m&&Math.abs(C)>1)return h;if(d<=g)return j;if(d>b)return S;if(m)return Math.abs(m)>1?h:(o+h+m)%o}},Jz=function(e){return function(t){var n,r=(n=v5(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Zz=function(e,t,n){var r=e.map(function(s){var i=s.node;return i}),o=AS(r.filter(Jz(n)));return o&&o.length?TS(o):TS(AS(t))},db=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&db(e.parentNode.host||e.parentNode,t),t},Fv=function(e,t){for(var n=db(e),r=db(t),o=0;o=0)return s}return!1},j5=function(e,t,n){var r=Xh(e),o=Xh(t),s=r[0],i=!1;return o.filter(Boolean).forEach(function(c){i=Fv(i||c,c)||i,n.filter(Boolean).forEach(function(d){var p=Fv(s,d);p&&(!i||nu(p,i)?i=p:i=Fv(p,i))})}),i},eF=function(e,t){return e.reduce(function(n,r){return n.concat(Wz(r,t))},[])},tF=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter($z)},nF=function(e,t){var n=Gd(Xh(e).length>0?document:f5(e).ownerDocument),r=ay(e).filter(Yh),o=j5(n||e,e,r),s=new Map,i=DS(r,s),c=ub(r,s).filter(function(b){var y=b.node;return Yh(y)});if(!(!c[0]&&(c=i,!c[0]))){var d=DS([o],s).map(function(b){var y=b.node;return y}),p=tF(d,c),h=p.map(function(b){var y=b.node;return y}),m=Yz(h,d,n,t);if(m===k5){var g=Zz(i,h,eF(r,s));if(g)return{node:g};console.warn("focus-lock: cannot find any node to move focus into");return}return m===void 0?m:p[m]}},rF=function(e){var t=ay(e).filter(Yh),n=j5(e,e,t),r=new Map,o=ub([n],r,!0),s=ub(t,r).filter(function(i){var c=i.node;return Yh(c)}).map(function(i){var c=i.node;return c});return o.map(function(i){var c=i.node,d=i.index;return{node:c,index:d,lockItem:s.indexOf(c)>=0,guard:ry(c)}})},oF=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Bv=0,Hv=!1,_5=function(e,t,n){n===void 0&&(n={});var r=nF(e,t);if(!Hv&&r){if(Bv>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Hv=!0,setTimeout(function(){Hv=!1},1);return}Bv++,oF(r.node,n.focusOptions),Bv--}};function ly(e){setTimeout(e,1)}var sF=function(){return document&&document.activeElement===document.body},aF=function(){return sF()||Kz()},ru=null,Gc=null,ou=null,qd=!1,iF=function(){return!0},lF=function(t){return(ru.whiteList||iF)(t)},cF=function(t,n){ou={observerNode:t,portaledElement:n}},uF=function(t){return ou&&ou.portaledElement===t};function $S(e,t,n,r){var o=null,s=e;do{var i=r[s];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(s!==e)return;o=null}else break}while((s+=n)!==t);o&&(o.node.tabIndex=0)}var dF=function(t){return t&&"current"in t?t.current:t},fF=function(t){return t?!!qd:qd==="meanwhile"},pF=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},hF=function(t,n){return n.some(function(r){return pF(t,r,r)})},Jh=function(){var t=!1;if(ru){var n=ru,r=n.observed,o=n.persistentFocus,s=n.autoFocus,i=n.shards,c=n.crossFrame,d=n.focusOptions,p=r||ou&&ou.portaledElement,h=document&&document.activeElement;if(p){var m=[p].concat(i.map(dF).filter(Boolean));if((!h||lF(h))&&(o||fF(c)||!aF()||!Gc&&s)&&(p&&!(S5(m)||h&&hF(h,m)||uF(h))&&(document&&!Gc&&h&&!s?(h.blur&&h.blur(),document.body.focus()):(t=_5(m,Gc,{focusOptions:d}),ou={})),qd=!1,Gc=document&&document.activeElement),document){var g=document&&document.activeElement,b=rF(m),y=b.map(function(x){var C=x.node;return C}).indexOf(g);y>-1&&(b.filter(function(x){var C=x.guard,S=x.node;return C&&S.dataset.focusAutoGuard}).forEach(function(x){var C=x.node;return C.removeAttribute("tabIndex")}),$S(y,b.length,1,b),$S(y,-1,-1,b))}}}return t},I5=function(t){Jh()&&t&&(t.stopPropagation(),t.preventDefault())},cy=function(){return ly(Jh)},mF=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||cF(r,n)},gF=function(){return null},P5=function(){qd="just",ly(function(){qd="meanwhile"})},vF=function(){document.addEventListener("focusin",I5),document.addEventListener("focusout",cy),window.addEventListener("blur",P5)},bF=function(){document.removeEventListener("focusin",I5),document.removeEventListener("focusout",cy),window.removeEventListener("blur",P5)};function xF(e){return e.filter(function(t){var n=t.disabled;return!n})}function yF(e){var t=e.slice(-1)[0];t&&!ru&&vF();var n=ru,r=n&&t&&t.id===n.id;ru=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(Gc=null,(!r||n.observed!==t.observed)&&t.onActivation(),Jh(),ly(Jh)):(bF(),Gc=null)}c5.assignSyncMedium(mF);u5.assignMedium(cy);_z.assignMedium(function(e){return e({moveFocusInside:_5,focusInside:S5})});const CF=Mz(xF,yF)(gF);var E5=l.forwardRef(function(t,n){return l.createElement(d5,mr({sideCar:CF,ref:n},t))}),M5=d5.propTypes||{};M5.sideCar;P$(M5,["sideCar"]);E5.propTypes={};const LS=E5;function O5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function uy(e){var t;if(!O5(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function wF(e){var t,n;return(n=(t=R5(e))==null?void 0:t.defaultView)!=null?n:window}function R5(e){return O5(e)?e.ownerDocument:document}function SF(e){return R5(e).activeElement}function kF(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function jF(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function A5(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:uy(e)&&kF(e)?e:A5(jF(e))}var D5=e=>e.hasAttribute("tabindex"),_F=e=>D5(e)&&e.tabIndex===-1;function IF(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function T5(e){return e.parentElement&&T5(e.parentElement)?!0:e.hidden}function PF(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function N5(e){if(!uy(e)||T5(e)||IF(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():PF(e)?!0:D5(e)}function EF(e){return e?uy(e)&&N5(e)&&!_F(e):!1}var MF=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],OF=MF.join(),RF=e=>e.offsetWidth>0&&e.offsetHeight>0;function $5(e){const t=Array.from(e.querySelectorAll(OF));return t.unshift(e),t.filter(n=>N5(n)&&RF(n))}var zS,AF=(zS=LS.default)!=null?zS:LS,L5=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:i,autoFocus:c,persistentFocus:d,lockFocusAcrossFrames:p}=e,h=l.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&$5(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),m=l.useCallback(()=>{var b;(b=n==null?void 0:n.current)==null||b.focus()},[n]),g=o&&!n;return a.jsx(AF,{crossFrame:p,persistentFocus:d,autoFocus:c,disabled:i,onActivation:h,onDeactivation:m,returnFocus:g,children:s})};L5.displayName="FocusLock";var DF=G$?l.useLayoutEffect:l.useEffect;function fb(e,t=[]){const n=l.useRef(e);return DF(()=>{n.current=e}),l.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function TF(e,t,n,r){const o=fb(t);return l.useEffect(()=>{var s;const i=(s=Mw(n))!=null?s:document;if(t)return i.addEventListener(e,o,r),()=>{i.removeEventListener(e,o,r)}},[e,n,r,o,t]),()=>{var s;((s=Mw(n))!=null?s:document).removeEventListener(e,o,r)}}function NF(e,t){const n=l.useId();return l.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function $F(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function ls(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=fb(n),i=fb(t),[c,d]=l.useState(e.defaultIsOpen||!1),[p,h]=$F(r,c),m=NF(o,"disclosure"),g=l.useCallback(()=>{p||d(!1),i==null||i()},[p,i]),b=l.useCallback(()=>{p||d(!0),s==null||s()},[p,s]),y=l.useCallback(()=>{(h?g:b)()},[h,b,g]);return{isOpen:!!h,onOpen:b,onClose:g,onToggle:y,isControlled:p,getButtonProps:(x={})=>({...x,"aria-expanded":h,"aria-controls":m,onClick:aD(x.onClick,y)}),getDisclosureProps:(x={})=>({...x,hidden:!h,id:m})}}var[LF,zF]=Hn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),z5=Oe(function(t,n){const r=Qr("Input",t),{children:o,className:s,...i}=ar(t),c=jt("chakra-input__group",s),d={},p=hg(o),h=r.field;p.forEach(g=>{var b,y;r&&(h&&g.type.id==="InputLeftElement"&&(d.paddingStart=(b=h.height)!=null?b:h.h),h&&g.type.id==="InputRightElement"&&(d.paddingEnd=(y=h.height)!=null?y:h.h),g.type.id==="InputRightAddon"&&(d.borderEndRadius=0),g.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const m=p.map(g=>{var b,y;const x=SI({size:((b=g.props)==null?void 0:b.size)||t.size,variant:((y=g.props)==null?void 0:y.variant)||t.variant});return g.type.id!=="Input"?l.cloneElement(g,x):l.cloneElement(g,Object.assign(x,d,g.props))});return a.jsx(Ee.div,{className:c,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...i,children:a.jsx(LF,{value:r,children:m})})});z5.displayName="InputGroup";var FF=Ee("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),gg=Oe(function(t,n){var r,o;const{placement:s="left",...i}=t,c=zF(),d=c.field,h={[s==="left"?"insetStart":"insetEnd"]:"0",width:(r=d==null?void 0:d.height)!=null?r:d==null?void 0:d.h,height:(o=d==null?void 0:d.height)!=null?o:d==null?void 0:d.h,fontSize:d==null?void 0:d.fontSize,...c.element};return a.jsx(FF,{ref:n,__css:h,...i})});gg.id="InputElement";gg.displayName="InputElement";var F5=Oe(function(t,n){const{className:r,...o}=t,s=jt("chakra-input__left-element",r);return a.jsx(gg,{ref:n,placement:"left",className:s,...o})});F5.id="InputLeftElement";F5.displayName="InputLeftElement";var dy=Oe(function(t,n){const{className:r,...o}=t,s=jt("chakra-input__right-element",r);return a.jsx(gg,{ref:n,placement:"right",className:s,...o})});dy.id="InputRightElement";dy.displayName="InputRightElement";var vg=Oe(function(t,n){const{htmlSize:r,...o}=t,s=Qr("Input",o),i=ar(o),c=Qx(i),d=jt("chakra-input",t.className);return a.jsx(Ee.input,{size:r,...c,__css:s.field,ref:n,className:d})});vg.displayName="Input";vg.id="Input";var bg=Oe(function(t,n){const r=ll("Link",t),{className:o,isExternal:s,...i}=ar(t);return a.jsx(Ee.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:jt("chakra-link",o),...i,__css:r})});bg.displayName="Link";var[BF,B5]=Hn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),fy=Oe(function(t,n){const r=Qr("List",t),{children:o,styleType:s="none",stylePosition:i,spacing:c,...d}=ar(t),p=hg(o),m=c?{["& > *:not(style) ~ *:not(style)"]:{mt:c}}:{};return a.jsx(BF,{value:r,children:a.jsx(Ee.ul,{ref:n,listStyleType:s,listStylePosition:i,role:"list",__css:{...r.container,...m},...d,children:p})})});fy.displayName="List";var H5=Oe((e,t)=>{const{as:n,...r}=e;return a.jsx(fy,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});H5.displayName="OrderedList";var Mf=Oe(function(t,n){const{as:r,...o}=t;return a.jsx(fy,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});Mf.displayName="UnorderedList";var ws=Oe(function(t,n){const r=B5();return a.jsx(Ee.li,{ref:n,...t,__css:r.item})});ws.displayName="ListItem";var HF=Oe(function(t,n){const r=B5();return a.jsx(zr,{ref:n,role:"presentation",...t,__css:r.icon})});HF.displayName="ListIcon";var nl=Oe(function(t,n){const{templateAreas:r,gap:o,rowGap:s,columnGap:i,column:c,row:d,autoFlow:p,autoRows:h,templateRows:m,autoColumns:g,templateColumns:b,...y}=t,x={display:"grid",gridTemplateAreas:r,gridGap:o,gridRowGap:s,gridColumnGap:i,gridAutoColumns:g,gridColumn:c,gridRow:d,gridAutoFlow:p,gridAutoRows:h,gridTemplateRows:m,gridTemplateColumns:b};return a.jsx(Ee.div,{ref:n,__css:x,...y})});nl.displayName="Grid";function W5(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):L1(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var ji=Ee("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});ji.displayName="Spacer";var V5=e=>a.jsx(Ee.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});V5.displayName="StackItem";function WF(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":W5(n,o=>r[o])}}var py=Oe((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:i="0.5rem",wrap:c,children:d,divider:p,className:h,shouldWrapChildren:m,...g}=e,b=n?"row":r??"column",y=l.useMemo(()=>WF({spacing:i,direction:b}),[i,b]),x=!!p,C=!m&&!x,S=l.useMemo(()=>{const _=hg(d);return C?_:_.map((I,P)=>{const M=typeof I.key<"u"?I.key:P,R=P+1===_.length,D=m?a.jsx(V5,{children:I},M):I;if(!x)return D;const O=l.cloneElement(p,{__css:y}),T=R?null:O;return a.jsxs(l.Fragment,{children:[D,T]},M)})},[p,y,x,C,m,d]),j=jt("chakra-stack",h);return a.jsx(Ee.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:b,flexWrap:c,gap:x?void 0:i,className:j,...g,children:S})});py.displayName="Stack";var U5=Oe((e,t)=>a.jsx(py,{align:"center",...e,direction:"column",ref:t}));U5.displayName="VStack";var xg=Oe((e,t)=>a.jsx(py,{align:"center",...e,direction:"row",ref:t}));xg.displayName="HStack";function FS(e){return W5(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Kd=Oe(function(t,n){const{area:r,colSpan:o,colStart:s,colEnd:i,rowEnd:c,rowSpan:d,rowStart:p,...h}=t,m=SI({gridArea:r,gridColumn:FS(o),gridRow:FS(d),gridColumnStart:s,gridColumnEnd:i,gridRowStart:p,gridRowEnd:c});return a.jsx(Ee.div,{ref:n,__css:m,...h})});Kd.displayName="GridItem";var Ha=Oe(function(t,n){const r=ll("Badge",t),{className:o,...s}=ar(t);return a.jsx(Ee.span,{ref:n,className:jt("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Ha.displayName="Badge";var no=Oe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:i,borderWidth:c,borderStyle:d,borderColor:p,...h}=ll("Divider",t),{className:m,orientation:g="horizontal",__css:b,...y}=ar(t),x={vertical:{borderLeftWidth:r||i||c||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||c||"1px",width:"100%"}};return a.jsx(Ee.hr,{ref:n,"aria-orientation":g,...y,__css:{...h,border:"0",borderColor:p,borderStyle:d,...x[g],...b},className:jt("chakra-divider",m)})});no.displayName="Divider";function VF(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function UF(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=l.useState([]),s=l.useRef(),i=()=>{s.current&&(clearTimeout(s.current),s.current=null)},c=()=>{i(),s.current=setTimeout(()=>{o([]),s.current=null},t)};l.useEffect(()=>i,[]);function d(p){return h=>{if(h.key==="Backspace"){const m=[...r];m.pop(),o(m);return}if(VF(h)){const m=r.concat(h.key);n(h)&&(h.preventDefault(),h.stopPropagation()),o(m),p(m.join("")),c()}}}return d}function GF(e,t,n,r){if(t==null)return r;if(!r)return e.find(i=>n(i).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(s=>n(s).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let s;return o.includes(r)?(s=o.indexOf(r)+1,s===o.length&&(s=0),o[s]):(s=e.indexOf(o[0]),e[s])}return r}function qF(){const e=l.useRef(new Map),t=e.current,n=l.useCallback((o,s,i,c)=>{e.current.set(i,{type:s,el:o,options:c}),o.addEventListener(s,i,c)},[]),r=l.useCallback((o,s,i,c)=>{o.removeEventListener(s,i,c),e.current.delete(i)},[]);return l.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function Wv(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function G5(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:i,onMouseUp:c,onClick:d,onKeyDown:p,onKeyUp:h,tabIndex:m,onMouseOver:g,onMouseLeave:b,...y}=e,[x,C]=l.useState(!0),[S,j]=l.useState(!1),_=qF(),I=L=>{L&&L.tagName!=="BUTTON"&&C(!1)},P=x?m:m||0,M=n&&!r,R=l.useCallback(L=>{if(n){L.stopPropagation(),L.preventDefault();return}L.currentTarget.focus(),d==null||d(L)},[n,d]),A=l.useCallback(L=>{S&&Wv(L)&&(L.preventDefault(),L.stopPropagation(),j(!1),_.remove(document,"keyup",A,!1))},[S,_]),D=l.useCallback(L=>{if(p==null||p(L),n||L.defaultPrevented||L.metaKey||!Wv(L.nativeEvent)||x)return;const ee=o&&L.key==="Enter";s&&L.key===" "&&(L.preventDefault(),j(!0)),ee&&(L.preventDefault(),L.currentTarget.click()),_.add(document,"keyup",A,!1)},[n,x,p,o,s,_,A]),O=l.useCallback(L=>{if(h==null||h(L),n||L.defaultPrevented||L.metaKey||!Wv(L.nativeEvent)||x)return;s&&L.key===" "&&(L.preventDefault(),j(!1),L.currentTarget.click())},[s,x,n,h]),T=l.useCallback(L=>{L.button===0&&(j(!1),_.remove(document,"mouseup",T,!1))},[_]),Y=l.useCallback(L=>{if(L.button!==0)return;if(n){L.stopPropagation(),L.preventDefault();return}x||j(!0),L.currentTarget.focus({preventScroll:!0}),_.add(document,"mouseup",T,!1),i==null||i(L)},[n,x,i,_,T]),z=l.useCallback(L=>{L.button===0&&(x||j(!1),c==null||c(L))},[c,x]),W=l.useCallback(L=>{if(n){L.preventDefault();return}g==null||g(L)},[n,g]),Q=l.useCallback(L=>{S&&(L.preventDefault(),j(!1)),b==null||b(L)},[S,b]),U=gn(t,I);return x?{...y,ref:U,type:"button","aria-disabled":M?void 0:n,disabled:M,onClick:R,onMouseDown:i,onMouseUp:c,onKeyUp:h,onKeyDown:p,onMouseOver:g,onMouseLeave:b}:{...y,ref:U,role:"button","data-active":qt(S),"aria-disabled":n?"true":void 0,tabIndex:M?void 0:P,onClick:R,onMouseDown:Y,onMouseUp:z,onKeyUp:O,onKeyDown:D,onMouseOver:W,onMouseLeave:Q}}function KF(e){const t=e.current;if(!t)return!1;const n=SF(t);return!n||t.contains(n)?!1:!!EF(n)}function q5(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;xi(()=>{if(!s||KF(e))return;const i=(o==null?void 0:o.current)||e.current;let c;if(i)return c=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(c)}},[s,e,o])}var QF={preventScroll:!0,shouldFocus:!1};function XF(e,t=QF){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,i=YF(e)?e.current:e,c=o&&s,d=l.useRef(c),p=l.useRef(s);Yc(()=>{!p.current&&s&&(d.current=c),p.current=s},[s,c]);const h=l.useCallback(()=>{if(!(!s||!i||!d.current)&&(d.current=!1,!i.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var m;(m=n.current)==null||m.focus({preventScroll:r})});else{const m=$5(i);m.length>0&&requestAnimationFrame(()=>{m[0].focus({preventScroll:r})})}},[s,r,i,n]);xi(()=>{h()},[h]),Tl(i,"transitionend",h)}function YF(e){return"current"in e}var jc=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Fr={arrowShadowColor:jc("--popper-arrow-shadow-color"),arrowSize:jc("--popper-arrow-size","8px"),arrowSizeHalf:jc("--popper-arrow-size-half"),arrowBg:jc("--popper-arrow-bg"),transformOrigin:jc("--popper-transform-origin"),arrowOffset:jc("--popper-arrow-offset")};function JF(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var ZF={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},eB=e=>ZF[e],BS={scroll:!0,resize:!0};function tB(e){let t;return typeof e=="object"?t={enabled:!0,options:{...BS,...e}}:t={enabled:e,options:BS},t}var nB={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},rB={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{HS(e)},effect:({state:e})=>()=>{HS(e)}},HS=e=>{e.elements.popper.style.setProperty(Fr.transformOrigin.var,eB(e.placement))},oB={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{sB(e)}},sB=e=>{var t;if(!e.placement)return;const n=aB(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Fr.arrowSize.varRef,height:Fr.arrowSize.varRef,zIndex:-1});const r={[Fr.arrowSizeHalf.var]:`calc(${Fr.arrowSize.varRef} / 2 - 1px)`,[Fr.arrowOffset.var]:`calc(${Fr.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},aB=e=>{if(e.startsWith("top"))return{property:"bottom",value:Fr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Fr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Fr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Fr.arrowOffset.varRef}},iB={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{WS(e)},effect:({state:e})=>()=>{WS(e)}},WS=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=JF(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:Fr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},lB={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},cB={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function uB(e,t="ltr"){var n,r;const o=((n=lB[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=cB[e])!=null?r:o}var Wo="top",Es="bottom",Ms="right",Vo="left",hy="auto",Of=[Wo,Es,Ms,Vo],hu="start",Qd="end",dB="clippingParents",K5="viewport",gd="popper",fB="reference",VS=Of.reduce(function(e,t){return e.concat([t+"-"+hu,t+"-"+Qd])},[]),Q5=[].concat(Of,[hy]).reduce(function(e,t){return e.concat([t,t+"-"+hu,t+"-"+Qd])},[]),pB="beforeRead",hB="read",mB="afterRead",gB="beforeMain",vB="main",bB="afterMain",xB="beforeWrite",yB="write",CB="afterWrite",wB=[pB,hB,mB,gB,vB,bB,xB,yB,CB];function Pa(e){return e?(e.nodeName||"").toLowerCase():null}function cs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ul(e){var t=cs(e).Element;return e instanceof t||e instanceof Element}function Is(e){var t=cs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function my(e){if(typeof ShadowRoot>"u")return!1;var t=cs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function SB(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Is(s)||!Pa(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var c=o[i];c===!1?s.removeAttribute(i):s.setAttribute(i,c===!0?"":c)}))})}function kB(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=i.reduce(function(d,p){return d[p]="",d},{});!Is(o)||!Pa(o)||(Object.assign(o.style,c),Object.keys(s).forEach(function(d){o.removeAttribute(d)}))})}}const jB={name:"applyStyles",enabled:!0,phase:"write",fn:SB,effect:kB,requires:["computeStyles"]};function Ia(e){return e.split("-")[0]}var Nl=Math.max,Zh=Math.min,mu=Math.round;function pb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function X5(){return!/^((?!chrome|android).)*safari/i.test(pb())}function gu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Is(e)&&(o=e.offsetWidth>0&&mu(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&mu(r.height)/e.offsetHeight||1);var i=Ul(e)?cs(e):window,c=i.visualViewport,d=!X5()&&n,p=(r.left+(d&&c?c.offsetLeft:0))/o,h=(r.top+(d&&c?c.offsetTop:0))/s,m=r.width/o,g=r.height/s;return{width:m,height:g,top:h,right:p+m,bottom:h+g,left:p,x:p,y:h}}function gy(e){var t=gu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Y5(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&my(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fi(e){return cs(e).getComputedStyle(e)}function _B(e){return["table","td","th"].indexOf(Pa(e))>=0}function cl(e){return((Ul(e)?e.ownerDocument:e.document)||window.document).documentElement}function yg(e){return Pa(e)==="html"?e:e.assignedSlot||e.parentNode||(my(e)?e.host:null)||cl(e)}function US(e){return!Is(e)||fi(e).position==="fixed"?null:e.offsetParent}function IB(e){var t=/firefox/i.test(pb()),n=/Trident/i.test(pb());if(n&&Is(e)){var r=fi(e);if(r.position==="fixed")return null}var o=yg(e);for(my(o)&&(o=o.host);Is(o)&&["html","body"].indexOf(Pa(o))<0;){var s=fi(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Rf(e){for(var t=cs(e),n=US(e);n&&_B(n)&&fi(n).position==="static";)n=US(n);return n&&(Pa(n)==="html"||Pa(n)==="body"&&fi(n).position==="static")?t:n||IB(e)||t}function vy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nd(e,t,n){return Nl(e,Zh(t,n))}function PB(e,t,n){var r=Nd(e,t,n);return r>n?n:r}function J5(){return{top:0,right:0,bottom:0,left:0}}function Z5(e){return Object.assign({},J5(),e)}function e3(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var EB=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Z5(typeof t!="number"?t:e3(t,Of))};function MB(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,c=Ia(n.placement),d=vy(c),p=[Vo,Ms].indexOf(c)>=0,h=p?"height":"width";if(!(!s||!i)){var m=EB(o.padding,n),g=gy(s),b=d==="y"?Wo:Vo,y=d==="y"?Es:Ms,x=n.rects.reference[h]+n.rects.reference[d]-i[d]-n.rects.popper[h],C=i[d]-n.rects.reference[d],S=Rf(s),j=S?d==="y"?S.clientHeight||0:S.clientWidth||0:0,_=x/2-C/2,I=m[b],P=j-g[h]-m[y],M=j/2-g[h]/2+_,R=Nd(I,M,P),A=d;n.modifiersData[r]=(t={},t[A]=R,t.centerOffset=R-M,t)}}function OB(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Y5(t.elements.popper,o)&&(t.elements.arrow=o))}const RB={name:"arrow",enabled:!0,phase:"main",fn:MB,effect:OB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vu(e){return e.split("-")[1]}var AB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function DB(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:mu(n*o)/o||0,y:mu(r*o)/o||0}}function GS(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,c=e.position,d=e.gpuAcceleration,p=e.adaptive,h=e.roundOffsets,m=e.isFixed,g=i.x,b=g===void 0?0:g,y=i.y,x=y===void 0?0:y,C=typeof h=="function"?h({x:b,y:x}):{x:b,y:x};b=C.x,x=C.y;var S=i.hasOwnProperty("x"),j=i.hasOwnProperty("y"),_=Vo,I=Wo,P=window;if(p){var M=Rf(n),R="clientHeight",A="clientWidth";if(M===cs(n)&&(M=cl(n),fi(M).position!=="static"&&c==="absolute"&&(R="scrollHeight",A="scrollWidth")),M=M,o===Wo||(o===Vo||o===Ms)&&s===Qd){I=Es;var D=m&&M===P&&P.visualViewport?P.visualViewport.height:M[R];x-=D-r.height,x*=d?1:-1}if(o===Vo||(o===Wo||o===Es)&&s===Qd){_=Ms;var O=m&&M===P&&P.visualViewport?P.visualViewport.width:M[A];b-=O-r.width,b*=d?1:-1}}var T=Object.assign({position:c},p&&AB),Y=h===!0?DB({x:b,y:x},cs(n)):{x:b,y:x};if(b=Y.x,x=Y.y,d){var z;return Object.assign({},T,(z={},z[I]=j?"0":"",z[_]=S?"0":"",z.transform=(P.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",z))}return Object.assign({},T,(t={},t[I]=j?x+"px":"",t[_]=S?b+"px":"",t.transform="",t))}function TB(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,c=n.roundOffsets,d=c===void 0?!0:c,p={placement:Ia(t.placement),variation:vu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,GS(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,GS(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const NB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:TB,data:{}};var Fp={passive:!0};function $B(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,c=i===void 0?!0:i,d=cs(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(h){h.addEventListener("scroll",n.update,Fp)}),c&&d.addEventListener("resize",n.update,Fp),function(){s&&p.forEach(function(h){h.removeEventListener("scroll",n.update,Fp)}),c&&d.removeEventListener("resize",n.update,Fp)}}const LB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$B,data:{}};var zB={left:"right",right:"left",bottom:"top",top:"bottom"};function kh(e){return e.replace(/left|right|bottom|top/g,function(t){return zB[t]})}var FB={start:"end",end:"start"};function qS(e){return e.replace(/start|end/g,function(t){return FB[t]})}function by(e){var t=cs(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xy(e){return gu(cl(e)).left+by(e).scrollLeft}function BB(e,t){var n=cs(e),r=cl(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,c=0,d=0;if(o){s=o.width,i=o.height;var p=X5();(p||!p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:s,height:i,x:c+xy(e),y:d}}function HB(e){var t,n=cl(e),r=by(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Nl(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Nl(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+xy(e),d=-r.scrollTop;return fi(o||n).direction==="rtl"&&(c+=Nl(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:c,y:d}}function yy(e){var t=fi(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function t3(e){return["html","body","#document"].indexOf(Pa(e))>=0?e.ownerDocument.body:Is(e)&&yy(e)?e:t3(yg(e))}function $d(e,t){var n;t===void 0&&(t=[]);var r=t3(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=cs(r),i=o?[s].concat(s.visualViewport||[],yy(r)?r:[]):r,c=t.concat(i);return o?c:c.concat($d(yg(i)))}function hb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function WB(e,t){var n=gu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function KS(e,t,n){return t===K5?hb(BB(e,n)):Ul(t)?WB(t,n):hb(HB(cl(e)))}function VB(e){var t=$d(yg(e)),n=["absolute","fixed"].indexOf(fi(e).position)>=0,r=n&&Is(e)?Rf(e):e;return Ul(r)?t.filter(function(o){return Ul(o)&&Y5(o,r)&&Pa(o)!=="body"}):[]}function UB(e,t,n,r){var o=t==="clippingParents"?VB(e):[].concat(t),s=[].concat(o,[n]),i=s[0],c=s.reduce(function(d,p){var h=KS(e,p,r);return d.top=Nl(h.top,d.top),d.right=Zh(h.right,d.right),d.bottom=Zh(h.bottom,d.bottom),d.left=Nl(h.left,d.left),d},KS(e,i,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function n3(e){var t=e.reference,n=e.element,r=e.placement,o=r?Ia(r):null,s=r?vu(r):null,i=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,d;switch(o){case Wo:d={x:i,y:t.y-n.height};break;case Es:d={x:i,y:t.y+t.height};break;case Ms:d={x:t.x+t.width,y:c};break;case Vo:d={x:t.x-n.width,y:c};break;default:d={x:t.x,y:t.y}}var p=o?vy(o):null;if(p!=null){var h=p==="y"?"height":"width";switch(s){case hu:d[p]=d[p]-(t[h]/2-n[h]/2);break;case Qd:d[p]=d[p]+(t[h]/2-n[h]/2);break}}return d}function Xd(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,c=n.boundary,d=c===void 0?dB:c,p=n.rootBoundary,h=p===void 0?K5:p,m=n.elementContext,g=m===void 0?gd:m,b=n.altBoundary,y=b===void 0?!1:b,x=n.padding,C=x===void 0?0:x,S=Z5(typeof C!="number"?C:e3(C,Of)),j=g===gd?fB:gd,_=e.rects.popper,I=e.elements[y?j:g],P=UB(Ul(I)?I:I.contextElement||cl(e.elements.popper),d,h,i),M=gu(e.elements.reference),R=n3({reference:M,element:_,strategy:"absolute",placement:o}),A=hb(Object.assign({},_,R)),D=g===gd?A:M,O={top:P.top-D.top+S.top,bottom:D.bottom-P.bottom+S.bottom,left:P.left-D.left+S.left,right:D.right-P.right+S.right},T=e.modifiersData.offset;if(g===gd&&T){var Y=T[o];Object.keys(O).forEach(function(z){var W=[Ms,Es].indexOf(z)>=0?1:-1,Q=[Wo,Es].indexOf(z)>=0?"y":"x";O[z]+=Y[Q]*W})}return O}function GB(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,c=n.flipVariations,d=n.allowedAutoPlacements,p=d===void 0?Q5:d,h=vu(r),m=h?c?VS:VS.filter(function(y){return vu(y)===h}):Of,g=m.filter(function(y){return p.indexOf(y)>=0});g.length===0&&(g=m);var b=g.reduce(function(y,x){return y[x]=Xd(e,{placement:x,boundary:o,rootBoundary:s,padding:i})[Ia(x)],y},{});return Object.keys(b).sort(function(y,x){return b[y]-b[x]})}function qB(e){if(Ia(e)===hy)return[];var t=kh(e);return[qS(e),t,qS(t)]}function KB(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!0:i,d=n.fallbackPlacements,p=n.padding,h=n.boundary,m=n.rootBoundary,g=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,x=n.allowedAutoPlacements,C=t.options.placement,S=Ia(C),j=S===C,_=d||(j||!y?[kh(C)]:qB(C)),I=[C].concat(_).reduce(function(te,V){return te.concat(Ia(V)===hy?GB(t,{placement:V,boundary:h,rootBoundary:m,padding:p,flipVariations:y,allowedAutoPlacements:x}):V)},[]),P=t.rects.reference,M=t.rects.popper,R=new Map,A=!0,D=I[0],O=0;O=0,Q=W?"width":"height",U=Xd(t,{placement:T,boundary:h,rootBoundary:m,altBoundary:g,padding:p}),L=W?z?Ms:Vo:z?Es:Wo;P[Q]>M[Q]&&(L=kh(L));var ee=kh(L),K=[];if(s&&K.push(U[Y]<=0),c&&K.push(U[L]<=0,U[ee]<=0),K.every(function(te){return te})){D=T,A=!1;break}R.set(T,K)}if(A)for(var Z=y?3:1,se=function(V){var F=I.find(function(X){var ue=R.get(X);if(ue)return ue.slice(0,V).every(function(q){return q})});if(F)return D=F,"break"},fe=Z;fe>0;fe--){var G=se(fe);if(G==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const QB={name:"flip",enabled:!0,phase:"main",fn:KB,requiresIfExists:["offset"],data:{_skip:!1}};function QS(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function XS(e){return[Wo,Ms,Es,Vo].some(function(t){return e[t]>=0})}function XB(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Xd(t,{elementContext:"reference"}),c=Xd(t,{altBoundary:!0}),d=QS(i,r),p=QS(c,o,s),h=XS(d),m=XS(p);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:p,isReferenceHidden:h,hasPopperEscaped:m},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const YB={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XB};function JB(e,t,n){var r=Ia(e),o=[Vo,Wo].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],c=s[1];return i=i||0,c=(c||0)*o,[Vo,Ms].indexOf(r)>=0?{x:c,y:i}:{x:i,y:c}}function ZB(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=Q5.reduce(function(h,m){return h[m]=JB(m,t.rects,s),h},{}),c=i[t.placement],d=c.x,p=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=i}const eH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ZB};function tH(e){var t=e.state,n=e.name;t.modifiersData[n]=n3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const nH={name:"popperOffsets",enabled:!0,phase:"read",fn:tH,data:{}};function rH(e){return e==="x"?"y":"x"}function oH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!1:i,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,m=n.padding,g=n.tether,b=g===void 0?!0:g,y=n.tetherOffset,x=y===void 0?0:y,C=Xd(t,{boundary:d,rootBoundary:p,padding:m,altBoundary:h}),S=Ia(t.placement),j=vu(t.placement),_=!j,I=vy(S),P=rH(I),M=t.modifiersData.popperOffsets,R=t.rects.reference,A=t.rects.popper,D=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(M){if(s){var z,W=I==="y"?Wo:Vo,Q=I==="y"?Es:Ms,U=I==="y"?"height":"width",L=M[I],ee=L+C[W],K=L-C[Q],Z=b?-A[U]/2:0,se=j===hu?R[U]:A[U],fe=j===hu?-A[U]:-R[U],G=t.elements.arrow,te=b&&G?gy(G):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:J5(),F=V[W],X=V[Q],ue=Nd(0,R[U],te[U]),q=_?R[U]/2-Z-ue-F-O.mainAxis:se-ue-F-O.mainAxis,ne=_?-R[U]/2+Z+ue+X+O.mainAxis:fe+ue+X+O.mainAxis,pe=t.elements.arrow&&Rf(t.elements.arrow),le=pe?I==="y"?pe.clientTop||0:pe.clientLeft||0:0,we=(z=T==null?void 0:T[I])!=null?z:0,ve=L+q-we-le,he=L+ne-we,Ne=Nd(b?Zh(ee,ve):ee,L,b?Nl(K,he):K);M[I]=Ne,Y[I]=Ne-L}if(c){var De,qe=I==="x"?Wo:Vo,Mt=I==="x"?Es:Ms,ot=M[P],an=P==="y"?"height":"width",pt=ot+C[qe],vt=ot-C[Mt],ke=[Wo,Vo].indexOf(S)!==-1,Be=(De=T==null?void 0:T[P])!=null?De:0,Ot=ke?pt:ot-R[an]-A[an]-Be+O.altAxis,Ht=ke?ot+R[an]+A[an]-Be-O.altAxis:vt,je=b&&ke?PB(Ot,ot,Ht):Nd(b?Ot:pt,ot,b?Ht:vt);M[P]=je,Y[P]=je-ot}t.modifiersData[r]=Y}}const sH={name:"preventOverflow",enabled:!0,phase:"main",fn:oH,requiresIfExists:["offset"]};function aH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function iH(e){return e===cs(e)||!Is(e)?by(e):aH(e)}function lH(e){var t=e.getBoundingClientRect(),n=mu(t.width)/e.offsetWidth||1,r=mu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function cH(e,t,n){n===void 0&&(n=!1);var r=Is(t),o=Is(t)&&lH(t),s=cl(t),i=gu(e,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!n)&&((Pa(t)!=="body"||yy(s))&&(c=iH(t)),Is(t)?(d=gu(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=xy(s))),{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function uH(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(c){if(!n.has(c)){var d=t.get(c);d&&o(d)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function dH(e){var t=uH(e);return wB.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function fH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function pH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var YS={placement:"bottom",modifiers:[],strategy:"absolute"};function JS(){for(var e=arguments.length,t=new Array(e),n=0;n{}),_=l.useCallback(()=>{var O;!t||!y.current||!x.current||((O=j.current)==null||O.call(j),C.current=gH(y.current,x.current,{placement:S,modifiers:[iB,oB,rB,{...nB,enabled:!!g},{name:"eventListeners",...tB(i)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:c??[0,d]}},{name:"flip",enabled:!!p,options:{padding:8}},{name:"preventOverflow",enabled:!!m,options:{boundary:h}},...n??[]],strategy:o}),C.current.forceUpdate(),j.current=C.current.destroy)},[S,t,n,g,i,s,c,d,p,m,h,o]);l.useEffect(()=>()=>{var O;!y.current&&!x.current&&((O=C.current)==null||O.destroy(),C.current=null)},[]);const I=l.useCallback(O=>{y.current=O,_()},[_]),P=l.useCallback((O={},T=null)=>({...O,ref:gn(I,T)}),[I]),M=l.useCallback(O=>{x.current=O,_()},[_]),R=l.useCallback((O={},T=null)=>({...O,ref:gn(M,T),style:{...O.style,position:o,minWidth:g?void 0:"max-content",inset:"0 auto auto 0"}}),[o,M,g]),A=l.useCallback((O={},T=null)=>{const{size:Y,shadowColor:z,bg:W,style:Q,...U}=O;return{...U,ref:T,"data-popper-arrow":"",style:vH(O)}},[]),D=l.useCallback((O={},T=null)=>({...O,ref:T,"data-popper-arrow-inner":""}),[]);return{update(){var O;(O=C.current)==null||O.update()},forceUpdate(){var O;(O=C.current)==null||O.forceUpdate()},transformOrigin:Fr.transformOrigin.varRef,referenceRef:I,popperRef:M,getPopperProps:R,getArrowProps:A,getArrowInnerProps:D,getReferenceProps:P}}function vH(e){const{size:t,shadowColor:n,bg:r,style:o}=e,s={...o,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),r&&(s["--popper-arrow-bg"]=r),s}function wy(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=pr(n),i=pr(t),[c,d]=l.useState(e.defaultIsOpen||!1),p=r!==void 0?r:c,h=r!==void 0,m=l.useId(),g=o??`disclosure-${m}`,b=l.useCallback(()=>{h||d(!1),i==null||i()},[h,i]),y=l.useCallback(()=>{h||d(!0),s==null||s()},[h,s]),x=l.useCallback(()=>{p?b():y()},[p,y,b]);function C(j={}){return{...j,"aria-expanded":p,"aria-controls":g,onClick(_){var I;(I=j.onClick)==null||I.call(j,_),x()}}}function S(j={}){return{...j,hidden:!p,id:g}}return{isOpen:p,onOpen:y,onClose:b,onToggle:x,isControlled:h,getButtonProps:C,getDisclosureProps:S}}function bH(e){const{ref:t,handler:n,enabled:r=!0}=e,o=pr(n),i=l.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;l.useEffect(()=>{if(!r)return;const c=m=>{Vv(m,t)&&(i.isPointerDown=!0)},d=m=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&Vv(m,t)&&(i.isPointerDown=!1,o(m))},p=m=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&Vv(m,t)&&(i.isPointerDown=!1,o(m))},h=r3(t.current);return h.addEventListener("mousedown",c,!0),h.addEventListener("mouseup",d,!0),h.addEventListener("touchstart",c,!0),h.addEventListener("touchend",p,!0),()=>{h.removeEventListener("mousedown",c,!0),h.removeEventListener("mouseup",d,!0),h.removeEventListener("touchstart",c,!0),h.removeEventListener("touchend",p,!0)}},[n,t,o,i,r])}function Vv(e,t){var n;const r=e.target;return r&&!r3(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function r3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function o3(e){const{isOpen:t,ref:n}=e,[r,o]=l.useState(t),[s,i]=l.useState(!1);return l.useEffect(()=>{s||(o(t),i(!0))},[t,s,r]),Tl(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var d;const p=wF(n.current),h=new p.CustomEvent("animationend",{bubbles:!0});(d=n.current)==null||d.dispatchEvent(h)}}}function Sy(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[xH,yH,CH,wH]=Gx(),[SH,Af]=Hn({strict:!1,name:"MenuContext"});function kH(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function s3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function ZS(e){return s3(e).activeElement===e}function jH(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:i,isOpen:c,defaultIsOpen:d,onClose:p,onOpen:h,placement:m="bottom-start",lazyBehavior:g="unmount",direction:b,computePositionOnMount:y=!1,...x}=e,C=l.useRef(null),S=l.useRef(null),j=CH(),_=l.useCallback(()=>{requestAnimationFrame(()=>{var G;(G=C.current)==null||G.focus({preventScroll:!1})})},[]),I=l.useCallback(()=>{const G=setTimeout(()=>{var te;if(o)(te=o.current)==null||te.focus();else{const V=j.firstEnabled();V&&z(V.index)}});ee.current.add(G)},[j,o]),P=l.useCallback(()=>{const G=setTimeout(()=>{const te=j.lastEnabled();te&&z(te.index)});ee.current.add(G)},[j]),M=l.useCallback(()=>{h==null||h(),s?I():_()},[s,I,_,h]),{isOpen:R,onOpen:A,onClose:D,onToggle:O}=wy({isOpen:c,defaultIsOpen:d,onClose:p,onOpen:M});bH({enabled:R&&r,ref:C,handler:G=>{var te;(te=S.current)!=null&&te.contains(G.target)||D()}});const T=Cy({...x,enabled:R||y,placement:m,direction:b}),[Y,z]=l.useState(-1);xi(()=>{R||z(-1)},[R]),q5(C,{focusRef:S,visible:R,shouldFocus:!0});const W=o3({isOpen:R,ref:C}),[Q,U]=kH(t,"menu-button","menu-list"),L=l.useCallback(()=>{A(),_()},[A,_]),ee=l.useRef(new Set([]));RH(()=>{ee.current.forEach(G=>clearTimeout(G)),ee.current.clear()});const K=l.useCallback(()=>{A(),I()},[I,A]),Z=l.useCallback(()=>{A(),P()},[A,P]),se=l.useCallback(()=>{var G,te;const V=s3(C.current),F=(G=C.current)==null?void 0:G.contains(V.activeElement);if(!(R&&!F))return;const ue=(te=j.item(Y))==null?void 0:te.node;ue==null||ue.focus()},[R,Y,j]),fe=l.useRef(null);return{openAndFocusMenu:L,openAndFocusFirstItem:K,openAndFocusLastItem:Z,onTransitionEnd:se,unstable__animationState:W,descendants:j,popper:T,buttonId:Q,menuId:U,forceUpdate:T.forceUpdate,orientation:"vertical",isOpen:R,onToggle:O,onOpen:A,onClose:D,menuRef:C,buttonRef:S,focusedIndex:Y,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:z,isLazy:i,lazyBehavior:g,initialFocusRef:o,rafId:fe}}function _H(e={},t=null){const n=Af(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:i}=n,c=l.useCallback(d=>{const p=d.key,m={Enter:s,ArrowDown:s,ArrowUp:i}[p];m&&(d.preventDefault(),d.stopPropagation(),m(d))},[s,i]);return{...e,ref:gn(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":qt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:rt(e.onClick,r),onKeyDown:rt(e.onKeyDown,c)}}function mb(e){var t;return MH(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function IH(e={},t=null){const n=Af();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:i,onClose:c,menuId:d,isLazy:p,lazyBehavior:h,unstable__animationState:m}=n,g=yH(),b=UF({preventDefault:S=>S.key!==" "&&mb(S.target)}),y=l.useCallback(S=>{if(!S.currentTarget.contains(S.target))return;const j=S.key,I={Tab:M=>M.preventDefault(),Escape:c,ArrowDown:()=>{const M=g.nextEnabled(r);M&&o(M.index)},ArrowUp:()=>{const M=g.prevEnabled(r);M&&o(M.index)}}[j];if(I){S.preventDefault(),I(S);return}const P=b(M=>{const R=GF(g.values(),M,A=>{var D,O;return(O=(D=A==null?void 0:A.node)==null?void 0:D.textContent)!=null?O:""},g.item(r));if(R){const A=g.indexOf(R.node);o(A)}});mb(S.target)&&P(S)},[g,r,b,c,o]),x=l.useRef(!1);i&&(x.current=!0);const C=Sy({wasSelected:x.current,enabled:p,mode:h,isSelected:m.present});return{...e,ref:gn(s,t),children:C?e.children:null,tabIndex:-1,role:"menu",id:d,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:rt(e.onKeyDown,y)}}function PH(e={}){const{popper:t,isOpen:n}=Af();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function EH(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:i,isDisabled:c,isFocusable:d,closeOnSelect:p,type:h,...m}=e,g=Af(),{setFocusedIndex:b,focusedIndex:y,closeOnSelect:x,onClose:C,menuRef:S,isOpen:j,menuId:_,rafId:I}=g,P=l.useRef(null),M=`${_}-menuitem-${l.useId()}`,{index:R,register:A}=wH({disabled:c&&!d}),D=l.useCallback(L=>{n==null||n(L),!c&&b(R)},[b,R,c,n]),O=l.useCallback(L=>{r==null||r(L),P.current&&!ZS(P.current)&&D(L)},[D,r]),T=l.useCallback(L=>{o==null||o(L),!c&&b(-1)},[b,c,o]),Y=l.useCallback(L=>{s==null||s(L),mb(L.currentTarget)&&(p??x)&&C()},[C,s,x,p]),z=l.useCallback(L=>{i==null||i(L),b(R)},[b,i,R]),W=R===y,Q=c&&!d;xi(()=>{j&&(W&&!Q&&P.current?(I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{var L;(L=P.current)==null||L.focus(),I.current=null})):S.current&&!ZS(S.current)&&S.current.focus({preventScroll:!0}))},[W,Q,S,j]);const U=G5({onClick:Y,onFocus:z,onMouseEnter:D,onMouseMove:O,onMouseLeave:T,ref:gn(A,P,t),isDisabled:c,isFocusable:d});return{...m,...U,type:h??U.type,id:M,role:"menuitem",tabIndex:W?0:-1}}function MH(e){var t;if(!OH(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function OH(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function RH(e,t=[]){return l.useEffect(()=>()=>e(),t)}var[AH,$u]=Hn({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Cg=e=>{const{children:t}=e,n=Qr("Menu",e),r=ar(e),{direction:o}=mf(),{descendants:s,...i}=jH({...r,direction:o}),c=l.useMemo(()=>i,[i]),{isOpen:d,onClose:p,forceUpdate:h}=c;return a.jsx(xH,{value:s,children:a.jsx(SH,{value:c,children:a.jsx(AH,{value:n,children:xx(t,{isOpen:d,onClose:p,forceUpdate:h})})})})};Cg.displayName="Menu";var a3=Oe((e,t)=>{const n=$u();return a.jsx(Ee.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});a3.displayName="MenuCommand";var DH=Oe((e,t)=>{const{type:n,...r}=e,o=$u(),s=r.as||n?n??void 0:"button",i=l.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return a.jsx(Ee.button,{ref:t,type:s,...r,__css:i})}),i3=e=>{const{className:t,children:n,...r}=e,o=$u(),s=l.Children.only(n),i=l.isValidElement(s)?l.cloneElement(s,{focusable:"false","aria-hidden":!0,className:jt("chakra-menu__icon",s.props.className)}):null,c=jt("chakra-menu__icon-wrapper",t);return a.jsx(Ee.span,{className:c,...r,__css:o.icon,children:i})};i3.displayName="MenuIcon";var Vn=Oe((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:i,...c}=e,d=EH(c,t),h=n||o?a.jsx("span",{style:{pointerEvents:"none",flex:1},children:i}):i;return a.jsxs(DH,{...d,className:jt("chakra-menu__menuitem",d.className),children:[n&&a.jsx(i3,{fontSize:"0.8em",marginEnd:r,children:n}),h,o&&a.jsx(a3,{marginStart:s,children:o})]})});Vn.displayName="MenuItem";var TH={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},NH=Ee(Or.div),Gl=Oe(function(t,n){var r,o;const{rootProps:s,motionProps:i,...c}=t,{isOpen:d,onTransitionEnd:p,unstable__animationState:h}=Af(),m=IH(c,n),g=PH(s),b=$u();return a.jsx(Ee.div,{...g,__css:{zIndex:(o=t.zIndex)!=null?o:(r=b.list)==null?void 0:r.zIndex},children:a.jsx(NH,{variants:TH,initial:!1,animate:d?"enter":"exit",__css:{outline:0,...b.list},...i,className:jt("chakra-menu__menu-list",m.className),...m,onUpdate:p,onAnimationComplete:og(h.onComplete,m.onAnimationComplete)})})});Gl.displayName="MenuList";var Yd=Oe((e,t)=>{const{title:n,children:r,className:o,...s}=e,i=jt("chakra-menu__group__title",o),c=$u();return a.jsxs("div",{ref:t,className:"chakra-menu__group",role:"group",children:[n&&a.jsx(Ee.p,{className:i,...s,__css:c.groupTitle,children:n}),r]})});Yd.displayName="MenuGroup";var $H=Oe((e,t)=>{const n=$u();return a.jsx(Ee.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),wg=Oe((e,t)=>{const{children:n,as:r,...o}=e,s=_H(o,t),i=r||$H;return a.jsx(i,{...s,className:jt("chakra-menu__menu-button",e.className),children:a.jsx(Ee.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});wg.displayName="MenuButton";var LH={slideInBottom:{...eb,custom:{offsetY:16,reverse:!0}},slideInRight:{...eb,custom:{offsetX:16,reverse:!0}},scale:{...LP,custom:{initialScale:.95,reverse:!0}},none:{}},zH=Ee(Or.section),FH=e=>LH[e||"none"],l3=l.forwardRef((e,t)=>{const{preset:n,motionProps:r=FH(n),...o}=e;return a.jsx(zH,{ref:t,...r,...o})});l3.displayName="ModalTransition";var BH=Object.defineProperty,HH=(e,t,n)=>t in e?BH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WH=(e,t,n)=>(HH(e,typeof t!="symbol"?t+"":t,n),n),VH=class{constructor(){WH(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},gb=new VH;function c3(e,t){const[n,r]=l.useState(0);return l.useEffect(()=>{const o=e.current;if(o){if(t){const s=gb.add(o);r(s)}return()=>{gb.remove(o),r(0)}}},[t,e]),n}var UH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_c=new WeakMap,Bp=new WeakMap,Hp={},Uv=0,u3=function(e){return e&&(e.host||u3(e.parentNode))},GH=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=u3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qH=function(e,t,n,r){var o=GH(t,Array.isArray(e)?e:[e]);Hp[n]||(Hp[n]=new WeakMap);var s=Hp[n],i=[],c=new Set,d=new Set(o),p=function(m){!m||c.has(m)||(c.add(m),p(m.parentNode))};o.forEach(p);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))h(g);else{var b=g.getAttribute(r),y=b!==null&&b!=="false",x=(_c.get(g)||0)+1,C=(s.get(g)||0)+1;_c.set(g,x),s.set(g,C),i.push(g),x===1&&y&&Bp.set(g,!0),C===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}})};return h(t),c.clear(),Uv++,function(){i.forEach(function(m){var g=_c.get(m)-1,b=s.get(m)-1;_c.set(m,g),s.set(m,b),g||(Bp.has(m)||m.removeAttribute(r),Bp.delete(m)),b||m.removeAttribute(n)}),Uv--,Uv||(_c=new WeakMap,_c=new WeakMap,Bp=new WeakMap,Hp={})}},KH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||UH(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),qH(r,o,n,"aria-hidden")):function(){return null}};function QH(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:i=!0,onOverlayClick:c,onEsc:d}=e,p=l.useRef(null),h=l.useRef(null),[m,g,b]=YH(r,"chakra-modal","chakra-modal--header","chakra-modal--body");XH(p,t&&i);const y=c3(p,t),x=l.useRef(null),C=l.useCallback(D=>{x.current=D.target},[]),S=l.useCallback(D=>{D.key==="Escape"&&(D.stopPropagation(),s&&(n==null||n()),d==null||d())},[s,n,d]),[j,_]=l.useState(!1),[I,P]=l.useState(!1),M=l.useCallback((D={},O=null)=>({role:"dialog",...D,ref:gn(O,p),id:m,tabIndex:-1,"aria-modal":!0,"aria-labelledby":j?g:void 0,"aria-describedby":I?b:void 0,onClick:rt(D.onClick,T=>T.stopPropagation())}),[b,I,m,g,j]),R=l.useCallback(D=>{D.stopPropagation(),x.current===D.target&&gb.isTopModal(p.current)&&(o&&(n==null||n()),c==null||c())},[n,o,c]),A=l.useCallback((D={},O=null)=>({...D,ref:gn(O,h),onClick:rt(D.onClick,R),onKeyDown:rt(D.onKeyDown,S),onMouseDown:rt(D.onMouseDown,C)}),[S,C,R]);return{isOpen:t,onClose:n,headerId:g,bodyId:b,setBodyMounted:P,setHeaderMounted:_,dialogRef:p,overlayRef:h,getDialogProps:M,getDialogContainerProps:A,index:y}}function XH(e,t){const n=e.current;l.useEffect(()=>{if(!(!e.current||!t))return KH(e.current)},[t,e,n])}function YH(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[JH,Lu]=Hn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ZH,ql]=Hn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),bu=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b,onCloseComplete:y}=t,x=Qr("Modal",t),S={...QH(t),autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b};return a.jsx(ZH,{value:S,children:a.jsx(JH,{value:x,children:a.jsx(yo,{onExitComplete:y,children:S.isOpen&&a.jsx(Ru,{...n,children:r})})})})};bu.displayName="Modal";var jh="right-scroll-bar-position",_h="width-before-scroll-bar",eW="with-scroll-bars-hidden",tW="--removed-body-scroll-bar-size",d3=i5(),Gv=function(){},Sg=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Gv,onWheelCapture:Gv,onTouchMoveCapture:Gv}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,d=e.className,p=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,b=e.noIsolation,y=e.inert,x=e.allowPinchZoom,C=e.as,S=C===void 0?"div":C,j=e.gapMode,_=o5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=g,P=r5([n,t]),M=Ca(Ca({},_),o);return l.createElement(l.Fragment,null,h&&l.createElement(I,{sideCar:d3,removeScrollBar:p,shards:m,noIsolation:b,inert:y,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:j}),i?l.cloneElement(l.Children.only(c),Ca(Ca({},M),{ref:P})):l.createElement(S,Ca({},M,{className:d,ref:P}),c))});Sg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sg.classNames={fullWidth:_h,zeroRight:jh};var ek,nW=function(){if(ek)return ek;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nW();return t&&e.setAttribute("nonce",t),e}function oW(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sW(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aW=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rW())&&(oW(t,n),sW(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iW=function(){var e=aW();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},f3=function(){var e=iW(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},lW={left:0,top:0,right:0,gap:0},qv=function(e){return parseInt(e||"",10)||0},cW=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qv(n),qv(r),qv(o)]},uW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lW;var t=cW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dW=f3(),fW=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),` + .`.concat(eW,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(c,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(i,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(c,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(jh,` { + right: `).concat(c,"px ").concat(r,`; + } + + .`).concat(_h,` { + margin-right: `).concat(c,"px ").concat(r,`; + } + + .`).concat(jh," .").concat(jh,` { + right: 0 `).concat(r,`; + } + + .`).concat(_h," .").concat(_h,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(tW,": ").concat(c,`px; + } +`)},pW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=l.useMemo(function(){return uW(o)},[o]);return l.createElement(dW,{styles:fW(s,!t,o,n?"":"!important")})},vb=!1;if(typeof window<"u")try{var Wp=Object.defineProperty({},"passive",{get:function(){return vb=!0,!0}});window.addEventListener("test",Wp,Wp),window.removeEventListener("test",Wp,Wp)}catch{vb=!1}var Ic=vb?{passive:!1}:!1,hW=function(e){return e.tagName==="TEXTAREA"},p3=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hW(e)&&n[t]==="visible")},mW=function(e){return p3(e,"overflowY")},gW=function(e){return p3(e,"overflowX")},tk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=h3(e,r);if(o){var s=m3(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},bW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},h3=function(e,t){return e==="v"?mW(t):gW(t)},m3=function(e,t){return e==="v"?vW(t):bW(t)},xW=function(e,t){return e==="h"&&t==="rtl"?-1:1},yW=function(e,t,n,r,o){var s=xW(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,d=t.contains(c),p=!1,h=i>0,m=0,g=0;do{var b=m3(e,c),y=b[0],x=b[1],C=b[2],S=x-C-s*y;(y||S)&&h3(e,c)&&(m+=S,g+=y),c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&g===0||!o&&-i>g))&&(p=!0),p},Vp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nk=function(e){return[e.deltaX,e.deltaY]},rk=function(e){return e&&"current"in e?e.current:e},CW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wW=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},SW=0,Pc=[];function kW(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(SW++)[0],s=l.useState(f3)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=lb([e.lockRef.current],(e.shards||[]).map(rk),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(x,C){if("touches"in x&&x.touches.length===2)return!i.current.allowPinchZoom;var S=Vp(x),j=n.current,_="deltaX"in x?x.deltaX:j[0]-S[0],I="deltaY"in x?x.deltaY:j[1]-S[1],P,M=x.target,R=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in x&&R==="h"&&M.type==="range")return!1;var A=tk(R,M);if(!A)return!0;if(A?P=R:(P=R==="v"?"h":"v",A=tk(R,M)),!A)return!1;if(!r.current&&"changedTouches"in x&&(_||I)&&(r.current=P),!P)return!0;var D=r.current||P;return yW(D,C,x,D==="h"?_:I,!0)},[]),d=l.useCallback(function(x){var C=x;if(!(!Pc.length||Pc[Pc.length-1]!==s)){var S="deltaY"in C?nk(C):Vp(C),j=t.current.filter(function(P){return P.name===C.type&&P.target===C.target&&CW(P.delta,S)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var _=(i.current.shards||[]).map(rk).filter(Boolean).filter(function(P){return P.contains(C.target)}),I=_.length>0?c(C,_[0]):!i.current.noIsolation;I&&C.cancelable&&C.preventDefault()}}},[]),p=l.useCallback(function(x,C,S,j){var _={name:x,delta:C,target:S,should:j};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),h=l.useCallback(function(x){n.current=Vp(x),r.current=void 0},[]),m=l.useCallback(function(x){p(x.type,nk(x),x.target,c(x,e.lockRef.current))},[]),g=l.useCallback(function(x){p(x.type,Vp(x),x.target,c(x,e.lockRef.current))},[]);l.useEffect(function(){return Pc.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Ic),document.addEventListener("touchmove",d,Ic),document.addEventListener("touchstart",h,Ic),function(){Pc=Pc.filter(function(x){return x!==s}),document.removeEventListener("wheel",d,Ic),document.removeEventListener("touchmove",d,Ic),document.removeEventListener("touchstart",h,Ic)}},[]);var b=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:wW(o)}):null,b?l.createElement(pW,{gapMode:e.gapMode}):null)}const jW=jz(d3,kW);var g3=l.forwardRef(function(e,t){return l.createElement(Sg,Ca({},e,{ref:t,sideCar:jW}))});g3.classNames=Sg.classNames;const _W=g3;function IW(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:c,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=ql(),[g,b]=iD();l.useEffect(()=>{!g&&b&&setTimeout(b)},[g,b]);const y=c3(r,m);return a.jsx(L5,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(_W,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var xu=Oe((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:c,getDialogContainerProps:d}=ql(),p=c(i,t),h=d(o),m=jt("chakra-modal__content",n),g=Lu(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:x}=ql();return a.jsx(IW,{children:a.jsx(Ee.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(l3,{preset:x,motionProps:s,className:m,...p,__css:b,children:r})})})});xu.displayName="ModalContent";function Df(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(bu,{...n,initialFocusRef:t})}var Tf=Oe((e,t)=>a.jsx(xu,{ref:t,role:"alertdialog",...e})),pi=Oe((e,t)=>{const{className:n,...r}=e,o=jt("chakra-modal__footer",n),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...Lu().footer};return a.jsx(Ee.footer,{ref:t,...r,__css:i,className:o})});pi.displayName="ModalFooter";var Ea=Oe((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=ql();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=jt("chakra-modal__header",n),d={flex:0,...Lu().header};return a.jsx(Ee.header,{ref:t,className:i,id:o,...r,__css:d})});Ea.displayName="ModalHeader";var PW=Ee(Or.div),Ma=Oe((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,i=jt("chakra-modal__overlay",n),d={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Lu().overlay},{motionPreset:p}=ql(),m=o||(p==="none"?{}:$P);return a.jsx(PW,{...m,__css:d,ref:t,className:i,...s})});Ma.displayName="ModalOverlay";var Oa=Oe((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=ql();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=jt("chakra-modal__body",n),c=Lu();return a.jsx(Ee.div,{ref:t,className:i,id:o,...r,__css:c.body})});Oa.displayName="ModalBody";var kg=Oe((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=ql(),i=jt("chakra-modal__close-btn",r),c=Lu();return a.jsx(kI,{ref:t,__css:c.closeButton,className:i,onClick:rt(n,d=>{d.stopPropagation(),s()}),...o})});kg.displayName="ModalCloseButton";var EW=e=>a.jsx(zr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),MW=e=>a.jsx(zr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function ok(e,t,n,r){l.useEffect(()=>{var o;if(!e.current||!r)return;const s=(o=e.current.ownerDocument.defaultView)!=null?o:window,i=Array.isArray(t)?t:[t],c=new s.MutationObserver(d=>{for(const p of d)p.type==="attributes"&&p.attributeName&&i.includes(p.attributeName)&&n(p)});return c.observe(e.current,{attributes:!0,attributeFilter:i}),()=>c.disconnect()})}function OW(e,t){const n=pr(e);l.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var RW=50,sk=300;function AW(e,t){const[n,r]=l.useState(!1),[o,s]=l.useState(null),[i,c]=l.useState(!0),d=l.useRef(null),p=()=>clearTimeout(d.current);OW(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?RW:null);const h=l.useCallback(()=>{i&&e(),d.current=setTimeout(()=>{c(!1),r(!0),s("increment")},sk)},[e,i]),m=l.useCallback(()=>{i&&t(),d.current=setTimeout(()=>{c(!1),r(!0),s("decrement")},sk)},[t,i]),g=l.useCallback(()=>{c(!0),r(!1),p()},[]);return l.useEffect(()=>()=>p(),[]),{up:h,down:m,stop:g,isSpinning:n}}var DW=/^[Ee0-9+\-.]$/;function TW(e){return DW.test(e)}function NW(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function $W(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:i=1,isReadOnly:c,isDisabled:d,isRequired:p,isInvalid:h,pattern:m="[0-9]*(.[0-9]+)?",inputMode:g="decimal",allowMouseWheel:b,id:y,onChange:x,precision:C,name:S,"aria-describedby":j,"aria-label":_,"aria-labelledby":I,onFocus:P,onBlur:M,onInvalid:R,getAriaValueText:A,isValidCharacter:D,format:O,parse:T,...Y}=e,z=pr(P),W=pr(M),Q=pr(R),U=pr(D??TW),L=pr(A),ee=sz(e),{update:K,increment:Z,decrement:se}=ee,[fe,G]=l.useState(!1),te=!(c||d),V=l.useRef(null),F=l.useRef(null),X=l.useRef(null),ue=l.useRef(null),q=l.useCallback(je=>je.split("").filter(U).join(""),[U]),ne=l.useCallback(je=>{var ht;return(ht=T==null?void 0:T(je))!=null?ht:je},[T]),pe=l.useCallback(je=>{var ht;return((ht=O==null?void 0:O(je))!=null?ht:je).toString()},[O]);xi(()=>{(ee.valueAsNumber>s||ee.valueAsNumber{if(!V.current)return;if(V.current.value!=ee.value){const ht=ne(V.current.value);ee.setValue(q(ht))}},[ne,q]);const le=l.useCallback((je=i)=>{te&&Z(je)},[Z,te,i]),we=l.useCallback((je=i)=>{te&&se(je)},[se,te,i]),ve=AW(le,we);ok(X,"disabled",ve.stop,ve.isSpinning),ok(ue,"disabled",ve.stop,ve.isSpinning);const he=l.useCallback(je=>{if(je.nativeEvent.isComposing)return;const At=ne(je.currentTarget.value);K(q(At)),F.current={start:je.currentTarget.selectionStart,end:je.currentTarget.selectionEnd}},[K,q,ne]),Ne=l.useCallback(je=>{var ht,At,_t;z==null||z(je),F.current&&(je.target.selectionStart=(At=F.current.start)!=null?At:(ht=je.currentTarget.value)==null?void 0:ht.length,je.currentTarget.selectionEnd=(_t=F.current.end)!=null?_t:je.currentTarget.selectionStart)},[z]),De=l.useCallback(je=>{if(je.nativeEvent.isComposing)return;NW(je,U)||je.preventDefault();const ht=qe(je)*i,At=je.key,Re={ArrowUp:()=>le(ht),ArrowDown:()=>we(ht),Home:()=>K(o),End:()=>K(s)}[At];Re&&(je.preventDefault(),Re(je))},[U,i,le,we,K,o,s]),qe=je=>{let ht=1;return(je.metaKey||je.ctrlKey)&&(ht=.1),je.shiftKey&&(ht=10),ht},Mt=l.useMemo(()=>{const je=L==null?void 0:L(ee.value);if(je!=null)return je;const ht=ee.value.toString();return ht||void 0},[ee.value,L]),ot=l.useCallback(()=>{let je=ee.value;if(ee.value==="")return;/^[eE]/.test(ee.value.toString())?ee.setValue(""):(ee.valueAsNumbers&&(je=s),ee.cast(je))},[ee,s,o]),an=l.useCallback(()=>{G(!1),n&&ot()},[n,G,ot]),pt=l.useCallback(()=>{t&&requestAnimationFrame(()=>{var je;(je=V.current)==null||je.focus()})},[t]),vt=l.useCallback(je=>{je.preventDefault(),ve.up(),pt()},[pt,ve]),ke=l.useCallback(je=>{je.preventDefault(),ve.down(),pt()},[pt,ve]);Tl(()=>V.current,"wheel",je=>{var ht,At;const Re=((At=(ht=V.current)==null?void 0:ht.ownerDocument)!=null?At:document).activeElement===V.current;if(!b||!Re)return;je.preventDefault();const Xe=qe(je)*i,_n=Math.sign(je.deltaY);_n===-1?le(Xe):_n===1&&we(Xe)},{passive:!1});const Be=l.useCallback((je={},ht=null)=>{const At=d||r&&ee.isAtMax;return{...je,ref:gn(ht,X),role:"button",tabIndex:-1,onPointerDown:rt(je.onPointerDown,_t=>{_t.button!==0||At||vt(_t)}),onPointerLeave:rt(je.onPointerLeave,ve.stop),onPointerUp:rt(je.onPointerUp,ve.stop),disabled:At,"aria-disabled":_s(At)}},[ee.isAtMax,r,vt,ve.stop,d]),Ot=l.useCallback((je={},ht=null)=>{const At=d||r&&ee.isAtMin;return{...je,ref:gn(ht,ue),role:"button",tabIndex:-1,onPointerDown:rt(je.onPointerDown,_t=>{_t.button!==0||At||ke(_t)}),onPointerLeave:rt(je.onPointerLeave,ve.stop),onPointerUp:rt(je.onPointerUp,ve.stop),disabled:At,"aria-disabled":_s(At)}},[ee.isAtMin,r,ke,ve.stop,d]),Ht=l.useCallback((je={},ht=null)=>{var At,_t,Re,Xe;return{name:S,inputMode:g,type:"text",pattern:m,"aria-labelledby":I,"aria-label":_,"aria-describedby":j,id:y,disabled:d,...je,readOnly:(At=je.readOnly)!=null?At:c,"aria-readonly":(_t=je.readOnly)!=null?_t:c,"aria-required":(Re=je.required)!=null?Re:p,required:(Xe=je.required)!=null?Xe:p,ref:gn(V,ht),value:pe(ee.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(ee.valueAsNumber)?void 0:ee.valueAsNumber,"aria-invalid":_s(h??ee.isOutOfRange),"aria-valuetext":Mt,autoComplete:"off",autoCorrect:"off",onChange:rt(je.onChange,he),onKeyDown:rt(je.onKeyDown,De),onFocus:rt(je.onFocus,Ne,()=>G(!0)),onBlur:rt(je.onBlur,W,an)}},[S,g,m,I,_,pe,j,y,d,p,c,h,ee.value,ee.valueAsNumber,ee.isOutOfRange,o,s,Mt,he,De,Ne,W,an]);return{value:pe(ee.value),valueAsNumber:ee.valueAsNumber,isFocused:fe,isDisabled:d,isReadOnly:c,getIncrementButtonProps:Be,getDecrementButtonProps:Ot,getInputProps:Ht,htmlProps:Y}}var[LW,jg]=Hn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[zW,ky]=Hn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),_g=Oe(function(t,n){const r=Qr("NumberInput",t),o=ar(t),s=Xx(o),{htmlProps:i,...c}=$W(s),d=l.useMemo(()=>c,[c]);return a.jsx(zW,{value:d,children:a.jsx(LW,{value:r,children:a.jsx(Ee.div,{...i,ref:n,className:jt("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});_g.displayName="NumberInput";var Ig=Oe(function(t,n){const r=jg();return a.jsx(Ee.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});Ig.displayName="NumberInputStepper";var Pg=Oe(function(t,n){const{getInputProps:r}=ky(),o=r(t,n),s=jg();return a.jsx(Ee.input,{...o,className:jt("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});Pg.displayName="NumberInputField";var v3=Ee("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Eg=Oe(function(t,n){var r;const o=jg(),{getDecrementButtonProps:s}=ky(),i=s(t,n);return a.jsx(v3,{...i,__css:o.stepper,children:(r=t.children)!=null?r:a.jsx(EW,{})})});Eg.displayName="NumberDecrementStepper";var Mg=Oe(function(t,n){var r;const{getIncrementButtonProps:o}=ky(),s=o(t,n),i=jg();return a.jsx(v3,{...s,__css:i.stepper,children:(r=t.children)!=null?r:a.jsx(MW,{})})});Mg.displayName="NumberIncrementStepper";var[FW,ec]=Hn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[BW,Og]=Hn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function Rg(e){const t=l.Children.only(e.children),{getTriggerProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}Rg.displayName="PopoverTrigger";var Ec={click:"click",hover:"hover"};function HW(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:i=!0,arrowSize:c,arrowShadowColor:d,trigger:p=Ec.click,openDelay:h=200,closeDelay:m=200,isLazy:g,lazyBehavior:b="unmount",computePositionOnMount:y,...x}=e,{isOpen:C,onClose:S,onOpen:j,onToggle:_}=wy(e),I=l.useRef(null),P=l.useRef(null),M=l.useRef(null),R=l.useRef(!1),A=l.useRef(!1);C&&(A.current=!0);const[D,O]=l.useState(!1),[T,Y]=l.useState(!1),z=l.useId(),W=o??z,[Q,U,L,ee]=["popover-trigger","popover-content","popover-header","popover-body"].map(he=>`${he}-${W}`),{referenceRef:K,getArrowProps:Z,getPopperProps:se,getArrowInnerProps:fe,forceUpdate:G}=Cy({...x,enabled:C||!!y}),te=o3({isOpen:C,ref:M});YP({enabled:C,ref:P}),q5(M,{focusRef:P,visible:C,shouldFocus:s&&p===Ec.click}),XF(M,{focusRef:r,visible:C,shouldFocus:i&&p===Ec.click});const V=Sy({wasSelected:A.current,enabled:g,mode:b,isSelected:te.present}),F=l.useCallback((he={},Ne=null)=>{const De={...he,style:{...he.style,transformOrigin:Fr.transformOrigin.varRef,[Fr.arrowSize.var]:c?`${c}px`:void 0,[Fr.arrowShadowColor.var]:d},ref:gn(M,Ne),children:V?he.children:null,id:U,tabIndex:-1,role:"dialog",onKeyDown:rt(he.onKeyDown,qe=>{n&&qe.key==="Escape"&&S()}),onBlur:rt(he.onBlur,qe=>{const Mt=ak(qe),ot=Kv(M.current,Mt),an=Kv(P.current,Mt);C&&t&&(!ot&&!an)&&S()}),"aria-labelledby":D?L:void 0,"aria-describedby":T?ee:void 0};return p===Ec.hover&&(De.role="tooltip",De.onMouseEnter=rt(he.onMouseEnter,()=>{R.current=!0}),De.onMouseLeave=rt(he.onMouseLeave,qe=>{qe.nativeEvent.relatedTarget!==null&&(R.current=!1,setTimeout(()=>S(),m))})),De},[V,U,D,L,T,ee,p,n,S,C,t,m,d,c]),X=l.useCallback((he={},Ne=null)=>se({...he,style:{visibility:C?"visible":"hidden",...he.style}},Ne),[C,se]),ue=l.useCallback((he,Ne=null)=>({...he,ref:gn(Ne,I,K)}),[I,K]),q=l.useRef(),ne=l.useRef(),pe=l.useCallback(he=>{I.current==null&&K(he)},[K]),le=l.useCallback((he={},Ne=null)=>{const De={...he,ref:gn(P,Ne,pe),id:Q,"aria-haspopup":"dialog","aria-expanded":C,"aria-controls":U};return p===Ec.click&&(De.onClick=rt(he.onClick,_)),p===Ec.hover&&(De.onFocus=rt(he.onFocus,()=>{q.current===void 0&&j()}),De.onBlur=rt(he.onBlur,qe=>{const Mt=ak(qe),ot=!Kv(M.current,Mt);C&&t&&ot&&S()}),De.onKeyDown=rt(he.onKeyDown,qe=>{qe.key==="Escape"&&S()}),De.onMouseEnter=rt(he.onMouseEnter,()=>{R.current=!0,q.current=window.setTimeout(()=>j(),h)}),De.onMouseLeave=rt(he.onMouseLeave,()=>{R.current=!1,q.current&&(clearTimeout(q.current),q.current=void 0),ne.current=window.setTimeout(()=>{R.current===!1&&S()},m)})),De},[Q,C,U,p,pe,_,j,t,S,h,m]);l.useEffect(()=>()=>{q.current&&clearTimeout(q.current),ne.current&&clearTimeout(ne.current)},[]);const we=l.useCallback((he={},Ne=null)=>({...he,id:L,ref:gn(Ne,De=>{O(!!De)})}),[L]),ve=l.useCallback((he={},Ne=null)=>({...he,id:ee,ref:gn(Ne,De=>{Y(!!De)})}),[ee]);return{forceUpdate:G,isOpen:C,onAnimationComplete:te.onComplete,onClose:S,getAnchorProps:ue,getArrowProps:Z,getArrowInnerProps:fe,getPopoverPositionerProps:X,getPopoverProps:F,getTriggerProps:le,getHeaderProps:we,getBodyProps:ve}}function Kv(e,t){return e===t||(e==null?void 0:e.contains(t))}function ak(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function Nf(e){const t=Qr("Popover",e),{children:n,...r}=ar(e),o=mf(),s=HW({...r,direction:o.direction});return a.jsx(FW,{value:s,children:a.jsx(BW,{value:t,children:xx(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}Nf.displayName="Popover";function b3(e){const t=l.Children.only(e.children),{getAnchorProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}b3.displayName="PopoverAnchor";var Qv=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function x3(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:s,boxShadow:i,shadowColor:c}=e,{getArrowProps:d,getArrowInnerProps:p}=ec(),h=Og(),m=(t=n??r)!=null?t:o,g=s??i;return a.jsx(Ee.div,{...d(),className:"chakra-popover__arrow-positioner",children:a.jsx(Ee.div,{className:jt("chakra-popover__arrow",e.className),...p(e),__css:{"--popper-arrow-shadow-color":Qv("colors",c),"--popper-arrow-bg":Qv("colors",m),"--popper-arrow-shadow":Qv("shadows",g),...h.arrow}})})}x3.displayName="PopoverArrow";var Ag=Oe(function(t,n){const{getBodyProps:r}=ec(),o=Og();return a.jsx(Ee.div,{...r(t,n),className:jt("chakra-popover__body",t.className),__css:o.body})});Ag.displayName="PopoverBody";var y3=Oe(function(t,n){const{onClose:r}=ec(),o=Og();return a.jsx(kI,{size:"sm",onClick:r,className:jt("chakra-popover__close-btn",t.className),__css:o.closeButton,ref:n,...t})});y3.displayName="PopoverCloseButton";function WW(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var VW={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},UW=Ee(Or.section),C3=Oe(function(t,n){const{variants:r=VW,...o}=t,{isOpen:s}=ec();return a.jsx(UW,{ref:n,variants:WW(r),initial:!1,animate:s?"enter":"exit",...o})});C3.displayName="PopoverTransition";var $f=Oe(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:i,getPopoverPositionerProps:c,onAnimationComplete:d}=ec(),p=Og(),h={position:"relative",display:"flex",flexDirection:"column",...p.content};return a.jsx(Ee.div,{...c(r),__css:p.popper,className:"chakra-popover__popper",children:a.jsx(C3,{...o,...i(s,n),onAnimationComplete:og(d,s.onAnimationComplete),className:jt("chakra-popover__content",t.className),__css:h})})});$f.displayName="PopoverContent";var bb=e=>a.jsx(Ee.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});bb.displayName="Circle";function GW(e,t,n){return(e-t)*100/(n-t)}var qW=yi({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),KW=yi({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),QW=yi({"0%":{left:"-40%"},"100%":{left:"100%"}}),XW=yi({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function w3(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:s,isIndeterminate:i,role:c="progressbar"}=e,d=GW(t,n,r);return{bind:{"data-indeterminate":i?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":i?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof s=="function"?s(t,d):o})(),role:c},percent:d,value:t}}var S3=e=>{const{size:t,isIndeterminate:n,...r}=e;return a.jsx(Ee.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${KW} 2s linear infinite`:void 0},...r})};S3.displayName="Shape";var xb=Oe((e,t)=>{var n;const{size:r="48px",max:o=100,min:s=0,valueText:i,getValueText:c,value:d,capIsRound:p,children:h,thickness:m="10px",color:g="#0078d4",trackColor:b="#edebe9",isIndeterminate:y,...x}=e,C=w3({min:s,max:o,value:d,valueText:i,getValueText:c,isIndeterminate:y}),S=y?void 0:((n=C.percent)!=null?n:0)*2.64,j=S==null?void 0:`${S} ${264-S}`,_=y?{css:{animation:`${qW} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:j,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},I={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:r};return a.jsxs(Ee.div,{ref:t,className:"chakra-progress",...C.bind,...x,__css:I,children:[a.jsxs(S3,{size:r,isIndeterminate:y,children:[a.jsx(bb,{stroke:b,strokeWidth:m,className:"chakra-progress__track"}),a.jsx(bb,{stroke:g,strokeWidth:m,className:"chakra-progress__indicator",strokeLinecap:p?"round":void 0,opacity:C.value===0&&!y?0:void 0,..._})]}),h]})});xb.displayName="CircularProgress";var[YW,JW]=Hn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),ZW=Oe((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:s,role:i,...c}=e,d=w3({value:o,min:n,max:r,isIndeterminate:s,role:i}),h={height:"100%",...JW().filledTrack};return a.jsx(Ee.div,{ref:t,style:{width:`${d.percent}%`,...c.style},...d.bind,...c,__css:h})}),k3=Oe((e,t)=>{var n;const{value:r,min:o=0,max:s=100,hasStripe:i,isAnimated:c,children:d,borderRadius:p,isIndeterminate:h,"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,title:y,role:x,...C}=ar(e),S=Qr("Progress",e),j=p??((n=S.track)==null?void 0:n.borderRadius),_={animation:`${XW} 1s linear infinite`},M={...!h&&i&&c&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${QW} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...S.track};return a.jsx(Ee.div,{ref:t,borderRadius:j,__css:R,...C,children:a.jsxs(YW,{value:S,children:[a.jsx(ZW,{"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,min:o,max:s,value:r,isIndeterminate:h,css:M,borderRadius:j,title:y,role:x}),d]})})});k3.displayName="Progress";function eV(e){return e&&L1(e)&&L1(e.target)}function tV(e={}){const{onChange:t,value:n,defaultValue:r,name:o,isDisabled:s,isFocusable:i,isNative:c,...d}=e,[p,h]=l.useState(r||""),m=typeof n<"u",g=m?n:p,b=l.useRef(null),y=l.useCallback(()=>{const P=b.current;if(!P)return;let M="input:not(:disabled):checked";const R=P.querySelector(M);if(R){R.focus();return}M="input:not(:disabled)";const A=P.querySelector(M);A==null||A.focus()},[]),C=`radio-${l.useId()}`,S=o||C,j=l.useCallback(P=>{const M=eV(P)?P.target.value:P;m||h(M),t==null||t(String(M))},[t,m]),_=l.useCallback((P={},M=null)=>({...P,ref:gn(M,b),role:"radiogroup"}),[]),I=l.useCallback((P={},M=null)=>({...P,ref:M,name:S,[c?"checked":"isChecked"]:g!=null?P.value===g:void 0,onChange(A){j(A)},"data-radiogroup":!0}),[c,S,j,g]);return{getRootProps:_,getRadioProps:I,name:S,ref:b,focus:y,setValue:h,value:g,onChange:j,isDisabled:s,isFocusable:i,htmlProps:d}}var[nV,j3]=Hn({name:"RadioGroupContext",strict:!1}),em=Oe((e,t)=>{const{colorScheme:n,size:r,variant:o,children:s,className:i,isDisabled:c,isFocusable:d,...p}=e,{value:h,onChange:m,getRootProps:g,name:b,htmlProps:y}=tV(p),x=l.useMemo(()=>({name:b,size:r,onChange:m,colorScheme:n,value:h,variant:o,isDisabled:c,isFocusable:d}),[b,r,m,n,h,o,c,d]);return a.jsx(nV,{value:x,children:a.jsx(Ee.div,{...g(y,t),className:jt("chakra-radio-group",i),children:s})})});em.displayName="RadioGroup";var rV={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function oV(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:o,isReadOnly:s,isRequired:i,onChange:c,isInvalid:d,name:p,value:h,id:m,"data-radiogroup":g,"aria-describedby":b,...y}=e,x=`radio-${l.useId()}`,C=kf(),j=!!j3()||!!g;let I=!!C&&!j?C.id:x;I=m??I;const P=o??(C==null?void 0:C.isDisabled),M=s??(C==null?void 0:C.isReadOnly),R=i??(C==null?void 0:C.isRequired),A=d??(C==null?void 0:C.isInvalid),[D,O]=l.useState(!1),[T,Y]=l.useState(!1),[z,W]=l.useState(!1),[Q,U]=l.useState(!1),[L,ee]=l.useState(!!t),K=typeof n<"u",Z=K?n:L;l.useEffect(()=>VP(O),[]);const se=l.useCallback(pe=>{if(M||P){pe.preventDefault();return}K||ee(pe.target.checked),c==null||c(pe)},[K,P,M,c]),fe=l.useCallback(pe=>{pe.key===" "&&U(!0)},[U]),G=l.useCallback(pe=>{pe.key===" "&&U(!1)},[U]),te=l.useCallback((pe={},le=null)=>({...pe,ref:le,"data-active":qt(Q),"data-hover":qt(z),"data-disabled":qt(P),"data-invalid":qt(A),"data-checked":qt(Z),"data-focus":qt(T),"data-focus-visible":qt(T&&D),"data-readonly":qt(M),"aria-hidden":!0,onMouseDown:rt(pe.onMouseDown,()=>U(!0)),onMouseUp:rt(pe.onMouseUp,()=>U(!1)),onMouseEnter:rt(pe.onMouseEnter,()=>W(!0)),onMouseLeave:rt(pe.onMouseLeave,()=>W(!1))}),[Q,z,P,A,Z,T,M,D]),{onFocus:V,onBlur:F}=C??{},X=l.useCallback((pe={},le=null)=>{const we=P&&!r;return{...pe,id:I,ref:le,type:"radio",name:p,value:h,onChange:rt(pe.onChange,se),onBlur:rt(F,pe.onBlur,()=>Y(!1)),onFocus:rt(V,pe.onFocus,()=>Y(!0)),onKeyDown:rt(pe.onKeyDown,fe),onKeyUp:rt(pe.onKeyUp,G),checked:Z,disabled:we,readOnly:M,required:R,"aria-invalid":_s(A),"aria-disabled":_s(we),"aria-required":_s(R),"data-readonly":qt(M),"aria-describedby":b,style:rV}},[P,r,I,p,h,se,F,V,fe,G,Z,M,R,A,b]);return{state:{isInvalid:A,isFocused:T,isChecked:Z,isActive:Q,isHovered:z,isDisabled:P,isReadOnly:M,isRequired:R},getCheckboxProps:te,getRadioProps:te,getInputProps:X,getLabelProps:(pe={},le=null)=>({...pe,ref:le,onMouseDown:rt(pe.onMouseDown,sV),"data-disabled":qt(P),"data-checked":qt(Z),"data-invalid":qt(A)}),getRootProps:(pe,le=null)=>({...pe,ref:le,"data-disabled":qt(P),"data-checked":qt(Z),"data-invalid":qt(A)}),htmlProps:y}}function sV(e){e.preventDefault(),e.stopPropagation()}function aV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var Za=Oe((e,t)=>{var n;const r=j3(),{onChange:o,value:s}=e,i=Qr("Radio",{...r,...e}),c=ar(e),{spacing:d="0.5rem",children:p,isDisabled:h=r==null?void 0:r.isDisabled,isFocusable:m=r==null?void 0:r.isFocusable,inputProps:g,...b}=c;let y=e.isChecked;(r==null?void 0:r.value)!=null&&s!=null&&(y=r.value===s);let x=o;r!=null&&r.onChange&&s!=null&&(x=og(r.onChange,o));const C=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:S,getCheckboxProps:j,getLabelProps:_,getRootProps:I,htmlProps:P}=oV({...b,isChecked:y,isFocusable:m,isDisabled:h,onChange:x,name:C}),[M,R]=aV(P,jI),A=j(R),D=S(g,t),O=_(),T=Object.assign({},M,I()),Y={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...i.container},z={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...i.control},W={userSelect:"none",marginStart:d,...i.label};return a.jsxs(Ee.label,{className:"chakra-radio",...T,__css:Y,children:[a.jsx("input",{className:"chakra-radio__input",...D}),a.jsx(Ee.span,{className:"chakra-radio__control",...A,__css:z}),p&&a.jsx(Ee.span,{className:"chakra-radio__label",...O,__css:W,children:p})]})});Za.displayName="Radio";var _3=Oe(function(t,n){const{children:r,placeholder:o,className:s,...i}=t;return a.jsxs(Ee.select,{...i,ref:n,className:jt("chakra-select",s),children:[o&&a.jsx("option",{value:"",children:o}),r]})});_3.displayName="SelectField";function iV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var I3=Oe((e,t)=>{var n;const r=Qr("Select",e),{rootProps:o,placeholder:s,icon:i,color:c,height:d,h:p,minH:h,minHeight:m,iconColor:g,iconSize:b,...y}=ar(e),[x,C]=iV(y,jI),S=Qx(C),j={width:"100%",height:"fit-content",position:"relative",color:c},_={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return a.jsxs(Ee.div,{className:"chakra-select__wrapper",__css:j,...x,...o,children:[a.jsx(_3,{ref:t,height:p??d,minH:h??m,placeholder:s,...S,__css:_,children:e.children}),a.jsx(P3,{"data-disabled":qt(S.disabled),...(g||c)&&{color:g||c},__css:r.icon,...b&&{fontSize:b},children:i})]})});I3.displayName="Select";var lV=e=>a.jsx("svg",{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),cV=Ee("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),P3=e=>{const{children:t=a.jsx(lV,{}),...n}=e,r=l.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return a.jsx(cV,{...n,className:"chakra-select__icon-wrapper",children:l.isValidElement(t)?r:null})};P3.displayName="SelectIcon";function uV(){const e=l.useRef(!0);return l.useEffect(()=>{e.current=!1},[]),e.current}function dV(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}var fV=Ee("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),yb=_I("skeleton-start-color"),Cb=_I("skeleton-end-color"),pV=yi({from:{opacity:0},to:{opacity:1}}),hV=yi({from:{borderColor:yb.reference,background:yb.reference},to:{borderColor:Cb.reference,background:Cb.reference}}),Dg=Oe((e,t)=>{const n={...e,fadeDuration:typeof e.fadeDuration=="number"?e.fadeDuration:.4,speed:typeof e.speed=="number"?e.speed:.8},r=ll("Skeleton",n),o=uV(),{startColor:s="",endColor:i="",isLoaded:c,fadeDuration:d,speed:p,className:h,fitContent:m,...g}=ar(n),[b,y]=Ks("colors",[s,i]),x=dV(c),C=jt("chakra-skeleton",h),S={...b&&{[yb.variable]:b},...y&&{[Cb.variable]:y}};if(c){const j=o||x?"none":`${pV} ${d}s`;return a.jsx(Ee.div,{ref:t,className:C,__css:{animation:j},...g})}return a.jsx(fV,{ref:t,className:C,...g,__css:{width:m?"fit-content":void 0,...r,...S,_dark:{...r._dark,...S},animation:`${p}s linear infinite alternate ${hV}`}})});Dg.displayName="Skeleton";var xs=e=>e?"":void 0,su=e=>e?!0:void 0,ul=(...e)=>e.filter(Boolean).join(" ");function au(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function mV(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Pd(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Ih={width:0,height:0},Up=e=>e||Ih;function E3(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,s=x=>{var C;const S=(C=r[x])!=null?C:Ih;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Pd({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${S.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${S.width/2}px)`}})}},i=t==="vertical"?r.reduce((x,C)=>Up(x).height>Up(C).height?x:C,Ih):r.reduce((x,C)=>Up(x).width>Up(C).width?x:C,Ih),c={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Pd({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},d={position:"absolute",...Pd({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},p=n.length===1,h=[0,o?100-n[0]:n[0]],m=p?h:n;let g=m[0];!p&&o&&(g=100-g);const b=Math.abs(m[m.length-1]-m[0]),y={...d,...Pd({orientation:t,vertical:o?{height:`${b}%`,top:`${g}%`}:{height:`${b}%`,bottom:`${g}%`},horizontal:o?{width:`${b}%`,right:`${g}%`}:{width:`${b}%`,left:`${g}%`}})};return{trackStyle:d,innerTrackStyle:y,rootStyle:c,getThumbStyle:s}}function M3(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function gV(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function vV(e){const t=xV(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function O3(e){return!!e.touches}function bV(e){return O3(e)&&e.touches.length>1}function xV(e){var t;return(t=e.view)!=null?t:window}function yV(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function CV(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function R3(e,t="page"){return O3(e)?yV(e,t):CV(e,t)}function wV(e){return t=>{const n=vV(t);(!n||n&&t.button===0)&&e(t)}}function SV(e,t=!1){function n(o){e(o,{point:R3(o)})}return t?wV(n):n}function Ph(e,t,n,r){return gV(e,t,SV(n,t==="pointerdown"),r)}var kV=Object.defineProperty,jV=(e,t,n)=>t in e?kV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ws=(e,t,n)=>(jV(e,typeof t!="symbol"?t+"":t,n),n),_V=class{constructor(e,t,n){Ws(this,"history",[]),Ws(this,"startEvent",null),Ws(this,"lastEvent",null),Ws(this,"lastEventInfo",null),Ws(this,"handlers",{}),Ws(this,"removeListeners",()=>{}),Ws(this,"threshold",3),Ws(this,"win"),Ws(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const c=Xv(this.lastEventInfo,this.history),d=this.startEvent!==null,p=MV(c.offset,{x:0,y:0})>=this.threshold;if(!d&&!p)return;const{timestamp:h}=wS();this.history.push({...c.point,timestamp:h});const{onStart:m,onMove:g}=this.handlers;d||(m==null||m(this.lastEvent,c),this.startEvent=this.lastEvent),g==null||g(this.lastEvent,c)}),Ws(this,"onPointerMove",(c,d)=>{this.lastEvent=c,this.lastEventInfo=d,X$.update(this.updatePoint,!0)}),Ws(this,"onPointerUp",(c,d)=>{const p=Xv(d,this.history),{onEnd:h,onSessionEnd:m}=this.handlers;m==null||m(c,p),this.end(),!(!h||!this.startEvent)&&(h==null||h(c,p))});var r;if(this.win=(r=e.view)!=null?r:window,bV(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:R3(e)},{timestamp:s}=wS();this.history=[{...o.point,timestamp:s}];const{onSessionStart:i}=t;i==null||i(e,Xv(o,this.history)),this.removeListeners=EV(Ph(this.win,"pointermove",this.onPointerMove),Ph(this.win,"pointerup",this.onPointerUp),Ph(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),Y$.update(this.updatePoint)}};function ik(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xv(e,t){return{point:e.point,delta:ik(e.point,t[t.length-1]),offset:ik(e.point,t[0]),velocity:PV(t,.1)}}var IV=e=>e*1e3;function PV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>IV(t)));)n--;if(!r)return{x:0,y:0};const s=(o.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function EV(...e){return t=>e.reduce((n,r)=>r(n),t)}function Yv(e,t){return Math.abs(e-t)}function lk(e){return"x"in e&&"y"in e}function MV(e,t){if(typeof e=="number"&&typeof t=="number")return Yv(e,t);if(lk(e)&&lk(t)){const n=Yv(e.x,t.x),r=Yv(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function A3(e){const t=l.useRef(null);return t.current=e,t}function D3(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:i,threshold:c}=t,d=!!(n||r||o||s||i),p=l.useRef(null),h=A3({onSessionStart:s,onSessionEnd:i,onStart:r,onMove:n,onEnd(m,g){p.current=null,o==null||o(m,g)}});l.useEffect(()=>{var m;(m=p.current)==null||m.updateHandlers(h.current)}),l.useEffect(()=>{const m=e.current;if(!m||!d)return;function g(b){p.current=new _V(b,h.current,c)}return Ph(m,"pointerdown",g)},[e,d,h,c]),l.useEffect(()=>()=>{var m;(m=p.current)==null||m.end(),p.current=null},[])}function OV(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[s]=o;let i,c;if("borderBoxSize"in s){const d=s.borderBoxSize,p=Array.isArray(d)?d[0]:d;i=p.inlineSize,c=p.blockSize}else i=e.offsetWidth,c=e.offsetHeight;t({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var RV=globalThis!=null&&globalThis.document?l.useLayoutEffect:l.useEffect;function AV(e,t){var n,r;if(!e||!e.parentElement)return;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,s=new o.MutationObserver(()=>{t()});return s.observe(e.parentElement,{childList:!0}),()=>{s.disconnect()}}function T3({getNodes:e,observeMutation:t=!0}){const[n,r]=l.useState([]),[o,s]=l.useState(0);return RV(()=>{const i=e(),c=i.map((d,p)=>OV(d,h=>{r(m=>[...m.slice(0,p),h,...m.slice(p+1)])}));if(t){const d=i[0];c.push(AV(d,()=>{s(p=>p+1)}))}return()=>{c.forEach(d=>{d==null||d()})}},[o]),n}function DV(e){return typeof e=="object"&&e!==null&&"current"in e}function TV(e){const[t]=T3({observeMutation:!1,getNodes(){return[DV(e)?e.current:e]}});return t}function NV(e){const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:s,isReversed:i,direction:c="ltr",orientation:d="horizontal",id:p,isDisabled:h,isReadOnly:m,onChangeStart:g,onChangeEnd:b,step:y=1,getAriaValueText:x,"aria-valuetext":C,"aria-label":S,"aria-labelledby":j,name:_,focusThumbOnChange:I=!0,minStepsBetweenThumbs:P=0,...M}=e,R=pr(g),A=pr(b),D=pr(x),O=M3({isReversed:i,direction:c,orientation:d}),[T,Y]=wf({value:o,defaultValue:s??[25,75],onChange:r});if(!Array.isArray(T))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof T}\``);const[z,W]=l.useState(!1),[Q,U]=l.useState(!1),[L,ee]=l.useState(-1),K=!(h||m),Z=l.useRef(T),se=T.map(Me=>tu(Me,t,n)),fe=P*y,G=$V(se,t,n,fe),te=l.useRef({eventSource:null,value:[],valueBounds:[]});te.current.value=se,te.current.valueBounds=G;const V=se.map(Me=>n-Me+t),X=(O?V:se).map(Me=>Qh(Me,t,n)),ue=d==="vertical",q=l.useRef(null),ne=l.useRef(null),pe=T3({getNodes(){const Me=ne.current,Ze=Me==null?void 0:Me.querySelectorAll("[role=slider]");return Ze?Array.from(Ze):[]}}),le=l.useId(),ve=mV(p??le),he=l.useCallback(Me=>{var Ze,Ye;if(!q.current)return;te.current.eventSource="pointer";const ut=q.current.getBoundingClientRect(),{clientX:Ut,clientY:xr}=(Ye=(Ze=Me.touches)==null?void 0:Ze[0])!=null?Ye:Me,yn=ue?ut.bottom-xr:Ut-ut.left,hn=ue?ut.height:ut.width;let oo=yn/hn;return O&&(oo=1-oo),GP(oo,t,n)},[ue,O,n,t]),Ne=(n-t)/10,De=y||(n-t)/100,qe=l.useMemo(()=>({setValueAtIndex(Me,Ze){if(!K)return;const Ye=te.current.valueBounds[Me];Ze=parseFloat(ab(Ze,Ye.min,De)),Ze=tu(Ze,Ye.min,Ye.max);const ut=[...te.current.value];ut[Me]=Ze,Y(ut)},setActiveIndex:ee,stepUp(Me,Ze=De){const Ye=te.current.value[Me],ut=O?Ye-Ze:Ye+Ze;qe.setValueAtIndex(Me,ut)},stepDown(Me,Ze=De){const Ye=te.current.value[Me],ut=O?Ye+Ze:Ye-Ze;qe.setValueAtIndex(Me,ut)},reset(){Y(Z.current)}}),[De,O,Y,K]),Mt=l.useCallback(Me=>{const Ze=Me.key,ut={ArrowRight:()=>qe.stepUp(L),ArrowUp:()=>qe.stepUp(L),ArrowLeft:()=>qe.stepDown(L),ArrowDown:()=>qe.stepDown(L),PageUp:()=>qe.stepUp(L,Ne),PageDown:()=>qe.stepDown(L,Ne),Home:()=>{const{min:Ut}=G[L];qe.setValueAtIndex(L,Ut)},End:()=>{const{max:Ut}=G[L];qe.setValueAtIndex(L,Ut)}}[Ze];ut&&(Me.preventDefault(),Me.stopPropagation(),ut(Me),te.current.eventSource="keyboard")},[qe,L,Ne,G]),{getThumbStyle:ot,rootStyle:an,trackStyle:pt,innerTrackStyle:vt}=l.useMemo(()=>E3({isReversed:O,orientation:d,thumbRects:pe,thumbPercents:X}),[O,d,X,pe]),ke=l.useCallback(Me=>{var Ze;const Ye=Me??L;if(Ye!==-1&&I){const ut=ve.getThumb(Ye),Ut=(Ze=ne.current)==null?void 0:Ze.ownerDocument.getElementById(ut);Ut&&setTimeout(()=>Ut.focus())}},[I,L,ve]);xi(()=>{te.current.eventSource==="keyboard"&&(A==null||A(te.current.value))},[se,A]);const Be=Me=>{const Ze=he(Me)||0,Ye=te.current.value.map(hn=>Math.abs(hn-Ze)),ut=Math.min(...Ye);let Ut=Ye.indexOf(ut);const xr=Ye.filter(hn=>hn===ut);xr.length>1&&Ze>te.current.value[Ut]&&(Ut=Ut+xr.length-1),ee(Ut),qe.setValueAtIndex(Ut,Ze),ke(Ut)},Ot=Me=>{if(L==-1)return;const Ze=he(Me)||0;ee(L),qe.setValueAtIndex(L,Ze),ke(L)};D3(ne,{onPanSessionStart(Me){K&&(W(!0),Be(Me),R==null||R(te.current.value))},onPanSessionEnd(){K&&(W(!1),A==null||A(te.current.value))},onPan(Me){K&&Ot(Me)}});const Ht=l.useCallback((Me={},Ze=null)=>({...Me,...M,id:ve.root,ref:gn(Ze,ne),tabIndex:-1,"aria-disabled":su(h),"data-focused":xs(Q),style:{...Me.style,...an}}),[M,h,Q,an,ve]),je=l.useCallback((Me={},Ze=null)=>({...Me,ref:gn(Ze,q),id:ve.track,"data-disabled":xs(h),style:{...Me.style,...pt}}),[h,pt,ve]),ht=l.useCallback((Me={},Ze=null)=>({...Me,ref:Ze,id:ve.innerTrack,style:{...Me.style,...vt}}),[vt,ve]),At=l.useCallback((Me,Ze=null)=>{var Ye;const{index:ut,...Ut}=Me,xr=se[ut];if(xr==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${ut}\`. The \`value\` or \`defaultValue\` length is : ${se.length}`);const yn=G[ut];return{...Ut,ref:Ze,role:"slider",tabIndex:K?0:void 0,id:ve.getThumb(ut),"data-active":xs(z&&L===ut),"aria-valuetext":(Ye=D==null?void 0:D(xr))!=null?Ye:C==null?void 0:C[ut],"aria-valuemin":yn.min,"aria-valuemax":yn.max,"aria-valuenow":xr,"aria-orientation":d,"aria-disabled":su(h),"aria-readonly":su(m),"aria-label":S==null?void 0:S[ut],"aria-labelledby":S!=null&&S[ut]||j==null?void 0:j[ut],style:{...Me.style,...ot(ut)},onKeyDown:au(Me.onKeyDown,Mt),onFocus:au(Me.onFocus,()=>{U(!0),ee(ut)}),onBlur:au(Me.onBlur,()=>{U(!1),ee(-1)})}},[ve,se,G,K,z,L,D,C,d,h,m,S,j,ot,Mt,U]),_t=l.useCallback((Me={},Ze=null)=>({...Me,ref:Ze,id:ve.output,htmlFor:se.map((Ye,ut)=>ve.getThumb(ut)).join(" "),"aria-live":"off"}),[ve,se]),Re=l.useCallback((Me,Ze=null)=>{const{value:Ye,...ut}=Me,Ut=!(Yen),xr=Ye>=se[0]&&Ye<=se[se.length-1];let yn=Qh(Ye,t,n);yn=O?100-yn:yn;const hn={position:"absolute",pointerEvents:"none",...Pd({orientation:d,vertical:{bottom:`${yn}%`},horizontal:{left:`${yn}%`}})};return{...ut,ref:Ze,id:ve.getMarker(Me.value),role:"presentation","aria-hidden":!0,"data-disabled":xs(h),"data-invalid":xs(!Ut),"data-highlighted":xs(xr),style:{...Me.style,...hn}}},[h,O,n,t,d,se,ve]),Xe=l.useCallback((Me,Ze=null)=>{const{index:Ye,...ut}=Me;return{...ut,ref:Ze,id:ve.getInput(Ye),type:"hidden",value:se[Ye],name:Array.isArray(_)?_[Ye]:`${_}-${Ye}`}},[_,se,ve]);return{state:{value:se,isFocused:Q,isDragging:z,getThumbPercent:Me=>X[Me],getThumbMinValue:Me=>G[Me].min,getThumbMaxValue:Me=>G[Me].max},actions:qe,getRootProps:Ht,getTrackProps:je,getInnerTrackProps:ht,getThumbProps:At,getMarkerProps:Re,getInputProps:Xe,getOutputProps:_t}}function $V(e,t,n,r){return e.map((o,s)=>{const i=s===0?t:e[s-1]+r,c=s===e.length-1?n:e[s+1]-r;return{min:i,max:c}})}var[LV,Tg]=Hn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[zV,Ng]=Hn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),N3=Oe(function(t,n){const r={orientation:"horizontal",...t},o=Qr("Slider",r),s=ar(r),{direction:i}=mf();s.direction=i;const{getRootProps:c,...d}=NV(s),p=l.useMemo(()=>({...d,name:r.name}),[d,r.name]);return a.jsx(LV,{value:p,children:a.jsx(zV,{value:o,children:a.jsx(Ee.div,{...c({},n),className:"chakra-slider",__css:o.container,children:r.children})})})});N3.displayName="RangeSlider";var wb=Oe(function(t,n){const{getThumbProps:r,getInputProps:o,name:s}=Tg(),i=Ng(),c=r(t,n);return a.jsxs(Ee.div,{...c,className:ul("chakra-slider__thumb",t.className),__css:i.thumb,children:[c.children,s&&a.jsx("input",{...o({index:t.index})})]})});wb.displayName="RangeSliderThumb";var $3=Oe(function(t,n){const{getTrackProps:r}=Tg(),o=Ng(),s=r(t,n);return a.jsx(Ee.div,{...s,className:ul("chakra-slider__track",t.className),__css:o.track,"data-testid":"chakra-range-slider-track"})});$3.displayName="RangeSliderTrack";var L3=Oe(function(t,n){const{getInnerTrackProps:r}=Tg(),o=Ng(),s=r(t,n);return a.jsx(Ee.div,{...s,className:"chakra-slider__filled-track",__css:o.filledTrack})});L3.displayName="RangeSliderFilledTrack";var Eh=Oe(function(t,n){const{getMarkerProps:r}=Tg(),o=Ng(),s=r(t,n);return a.jsx(Ee.div,{...s,className:ul("chakra-slider__marker",t.className),__css:o.mark})});Eh.displayName="RangeSliderMark";function FV(e){var t;const{min:n=0,max:r=100,onChange:o,value:s,defaultValue:i,isReversed:c,direction:d="ltr",orientation:p="horizontal",id:h,isDisabled:m,isReadOnly:g,onChangeStart:b,onChangeEnd:y,step:x=1,getAriaValueText:C,"aria-valuetext":S,"aria-label":j,"aria-labelledby":_,name:I,focusThumbOnChange:P=!0,...M}=e,R=pr(b),A=pr(y),D=pr(C),O=M3({isReversed:c,direction:d,orientation:p}),[T,Y]=wf({value:s,defaultValue:i??HV(n,r),onChange:o}),[z,W]=l.useState(!1),[Q,U]=l.useState(!1),L=!(m||g),ee=(r-n)/10,K=x||(r-n)/100,Z=tu(T,n,r),se=r-Z+n,G=Qh(O?se:Z,n,r),te=p==="vertical",V=A3({min:n,max:r,step:x,isDisabled:m,value:Z,isInteractive:L,isReversed:O,isVertical:te,eventSource:null,focusThumbOnChange:P,orientation:p}),F=l.useRef(null),X=l.useRef(null),ue=l.useRef(null),q=l.useId(),ne=h??q,[pe,le]=[`slider-thumb-${ne}`,`slider-track-${ne}`],we=l.useCallback(Re=>{var Xe,_n;if(!F.current)return;const Me=V.current;Me.eventSource="pointer";const Ze=F.current.getBoundingClientRect(),{clientX:Ye,clientY:ut}=(_n=(Xe=Re.touches)==null?void 0:Xe[0])!=null?_n:Re,Ut=te?Ze.bottom-ut:Ye-Ze.left,xr=te?Ze.height:Ze.width;let yn=Ut/xr;O&&(yn=1-yn);let hn=GP(yn,Me.min,Me.max);return Me.step&&(hn=parseFloat(ab(hn,Me.min,Me.step))),hn=tu(hn,Me.min,Me.max),hn},[te,O,V]),ve=l.useCallback(Re=>{const Xe=V.current;Xe.isInteractive&&(Re=parseFloat(ab(Re,Xe.min,K)),Re=tu(Re,Xe.min,Xe.max),Y(Re))},[K,Y,V]),he=l.useMemo(()=>({stepUp(Re=K){const Xe=O?Z-Re:Z+Re;ve(Xe)},stepDown(Re=K){const Xe=O?Z+Re:Z-Re;ve(Xe)},reset(){ve(i||0)},stepTo(Re){ve(Re)}}),[ve,O,Z,K,i]),Ne=l.useCallback(Re=>{const Xe=V.current,Me={ArrowRight:()=>he.stepUp(),ArrowUp:()=>he.stepUp(),ArrowLeft:()=>he.stepDown(),ArrowDown:()=>he.stepDown(),PageUp:()=>he.stepUp(ee),PageDown:()=>he.stepDown(ee),Home:()=>ve(Xe.min),End:()=>ve(Xe.max)}[Re.key];Me&&(Re.preventDefault(),Re.stopPropagation(),Me(Re),Xe.eventSource="keyboard")},[he,ve,ee,V]),De=(t=D==null?void 0:D(Z))!=null?t:S,qe=TV(X),{getThumbStyle:Mt,rootStyle:ot,trackStyle:an,innerTrackStyle:pt}=l.useMemo(()=>{const Re=V.current,Xe=qe??{width:0,height:0};return E3({isReversed:O,orientation:Re.orientation,thumbRects:[Xe],thumbPercents:[G]})},[O,qe,G,V]),vt=l.useCallback(()=>{V.current.focusThumbOnChange&&setTimeout(()=>{var Xe;return(Xe=X.current)==null?void 0:Xe.focus()})},[V]);xi(()=>{const Re=V.current;vt(),Re.eventSource==="keyboard"&&(A==null||A(Re.value))},[Z,A]);function ke(Re){const Xe=we(Re);Xe!=null&&Xe!==V.current.value&&Y(Xe)}D3(ue,{onPanSessionStart(Re){const Xe=V.current;Xe.isInteractive&&(W(!0),vt(),ke(Re),R==null||R(Xe.value))},onPanSessionEnd(){const Re=V.current;Re.isInteractive&&(W(!1),A==null||A(Re.value))},onPan(Re){V.current.isInteractive&&ke(Re)}});const Be=l.useCallback((Re={},Xe=null)=>({...Re,...M,ref:gn(Xe,ue),tabIndex:-1,"aria-disabled":su(m),"data-focused":xs(Q),style:{...Re.style,...ot}}),[M,m,Q,ot]),Ot=l.useCallback((Re={},Xe=null)=>({...Re,ref:gn(Xe,F),id:le,"data-disabled":xs(m),style:{...Re.style,...an}}),[m,le,an]),Ht=l.useCallback((Re={},Xe=null)=>({...Re,ref:Xe,style:{...Re.style,...pt}}),[pt]),je=l.useCallback((Re={},Xe=null)=>({...Re,ref:gn(Xe,X),role:"slider",tabIndex:L?0:void 0,id:pe,"data-active":xs(z),"aria-valuetext":De,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":Z,"aria-orientation":p,"aria-disabled":su(m),"aria-readonly":su(g),"aria-label":j,"aria-labelledby":j?void 0:_,style:{...Re.style,...Mt(0)},onKeyDown:au(Re.onKeyDown,Ne),onFocus:au(Re.onFocus,()=>U(!0)),onBlur:au(Re.onBlur,()=>U(!1))}),[L,pe,z,De,n,r,Z,p,m,g,j,_,Mt,Ne]),ht=l.useCallback((Re,Xe=null)=>{const _n=!(Re.valuer),Me=Z>=Re.value,Ze=Qh(Re.value,n,r),Ye={position:"absolute",pointerEvents:"none",...BV({orientation:p,vertical:{bottom:O?`${100-Ze}%`:`${Ze}%`},horizontal:{left:O?`${100-Ze}%`:`${Ze}%`}})};return{...Re,ref:Xe,role:"presentation","aria-hidden":!0,"data-disabled":xs(m),"data-invalid":xs(!_n),"data-highlighted":xs(Me),style:{...Re.style,...Ye}}},[m,O,r,n,p,Z]),At=l.useCallback((Re={},Xe=null)=>({...Re,ref:Xe,type:"hidden",value:Z,name:I}),[I,Z]);return{state:{value:Z,isFocused:Q,isDragging:z},actions:he,getRootProps:Be,getTrackProps:Ot,getInnerTrackProps:Ht,getThumbProps:je,getMarkerProps:ht,getInputProps:At}}function BV(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function HV(e,t){return t"}),[VV,Lg]=Hn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),jy=Oe((e,t)=>{var n;const r={...e,orientation:(n=e==null?void 0:e.orientation)!=null?n:"horizontal"},o=Qr("Slider",r),s=ar(r),{direction:i}=mf();s.direction=i;const{getInputProps:c,getRootProps:d,...p}=FV(s),h=d(),m=c({},t);return a.jsx(WV,{value:p,children:a.jsx(VV,{value:o,children:a.jsxs(Ee.div,{...h,className:ul("chakra-slider",r.className),__css:o.container,children:[r.children,a.jsx("input",{...m})]})})})});jy.displayName="Slider";var _y=Oe((e,t)=>{const{getThumbProps:n}=$g(),r=Lg(),o=n(e,t);return a.jsx(Ee.div,{...o,className:ul("chakra-slider__thumb",e.className),__css:r.thumb})});_y.displayName="SliderThumb";var Iy=Oe((e,t)=>{const{getTrackProps:n}=$g(),r=Lg(),o=n(e,t);return a.jsx(Ee.div,{...o,className:ul("chakra-slider__track",e.className),__css:r.track})});Iy.displayName="SliderTrack";var Py=Oe((e,t)=>{const{getInnerTrackProps:n}=$g(),r=Lg(),o=n(e,t);return a.jsx(Ee.div,{...o,className:ul("chakra-slider__filled-track",e.className),__css:r.filledTrack})});Py.displayName="SliderFilledTrack";var Lc=Oe((e,t)=>{const{getMarkerProps:n}=$g(),r=Lg(),o=n(e,t);return a.jsx(Ee.div,{...o,className:ul("chakra-slider__marker",e.className),__css:r.mark})});Lc.displayName="SliderMark";var[UV,z3]=Hn({name:"StatStylesContext",errorMessage:`useStatStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),F3=Oe(function(t,n){const r=Qr("Stat",t),o={position:"relative",flex:"1 1 0%",...r.container},{className:s,children:i,...c}=ar(t);return a.jsx(UV,{value:r,children:a.jsx(Ee.div,{ref:n,...c,className:jt("chakra-stat",s),__css:o,children:a.jsx("dl",{children:i})})})});F3.displayName="Stat";var B3=Oe(function(t,n){return a.jsx(Ee.div,{...t,ref:n,role:"group",className:jt("chakra-stat__group",t.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}})});B3.displayName="StatGroup";var H3=Oe(function(t,n){const r=z3();return a.jsx(Ee.dt,{ref:n,...t,className:jt("chakra-stat__label",t.className),__css:r.label})});H3.displayName="StatLabel";var W3=Oe(function(t,n){const r=z3();return a.jsx(Ee.dd,{ref:n,...t,className:jt("chakra-stat__number",t.className),__css:{...r.number,fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}})});W3.displayName="StatNumber";var Ey=Oe(function(t,n){const r=Qr("Switch",t),{spacing:o="0.5rem",children:s,...i}=ar(t),{getIndicatorProps:c,getInputProps:d,getCheckboxProps:p,getRootProps:h,getLabelProps:m}=UP(i),g=l.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),b=l.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=l.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return a.jsxs(Ee.label,{...h(),className:jt("chakra-switch",t.className),__css:g,children:[a.jsx("input",{className:"chakra-switch__input",...d({},n)}),a.jsx(Ee.span,{...p(),className:"chakra-switch__track",__css:b,children:a.jsx(Ee.span,{__css:r.thumb,className:"chakra-switch__thumb",...c()})}),s&&a.jsx(Ee.span,{className:"chakra-switch__label",...m(),__css:y,children:s})]})});Ey.displayName="Switch";var[GV,qV,KV,QV]=Gx();function XV(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:s,isLazy:i,lazyBehavior:c="unmount",orientation:d="horizontal",direction:p="ltr",...h}=e,[m,g]=l.useState(n??0),[b,y]=wf({defaultValue:n??0,value:o,onChange:r});l.useEffect(()=>{o!=null&&g(o)},[o]);const x=KV(),C=l.useId();return{id:`tabs-${(t=e.id)!=null?t:C}`,selectedIndex:b,focusedIndex:m,setSelectedIndex:y,setFocusedIndex:g,isManual:s,isLazy:i,lazyBehavior:c,orientation:d,descendants:x,direction:p,htmlProps:h}}var[YV,zg]=Hn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function JV(e){const{focusedIndex:t,orientation:n,direction:r}=zg(),o=qV(),s=l.useCallback(i=>{const c=()=>{var j;const _=o.nextEnabled(t);_&&((j=_.node)==null||j.focus())},d=()=>{var j;const _=o.prevEnabled(t);_&&((j=_.node)==null||j.focus())},p=()=>{var j;const _=o.firstEnabled();_&&((j=_.node)==null||j.focus())},h=()=>{var j;const _=o.lastEnabled();_&&((j=_.node)==null||j.focus())},m=n==="horizontal",g=n==="vertical",b=i.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",S={[y]:()=>m&&d(),[x]:()=>m&&c(),ArrowDown:()=>g&&c(),ArrowUp:()=>g&&d(),Home:p,End:h}[b];S&&(i.preventDefault(),S(i))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:rt(e.onKeyDown,s)}}function ZV(e){const{isDisabled:t=!1,isFocusable:n=!1,...r}=e,{setSelectedIndex:o,isManual:s,id:i,setFocusedIndex:c,selectedIndex:d}=zg(),{index:p,register:h}=QV({disabled:t&&!n}),m=p===d,g=()=>{o(p)},b=()=>{c(p),!s&&!(t&&n)&&o(p)},y=G5({...r,ref:gn(h,e.ref),isDisabled:t,isFocusable:n,onClick:rt(e.onClick,g)}),x="button";return{...y,id:V3(i,p),role:"tab",tabIndex:m?0:-1,type:x,"aria-selected":m,"aria-controls":U3(i,p),onFocus:t?void 0:rt(e.onFocus,b)}}var[eU,tU]=Hn({});function nU(e){const t=zg(),{id:n,selectedIndex:r}=t,s=hg(e.children).map((i,c)=>l.createElement(eU,{key:c,value:{isSelected:c===r,id:U3(n,c),tabId:V3(n,c),selectedIndex:r}},i));return{...e,children:s}}function rU(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=zg(),{isSelected:s,id:i,tabId:c}=tU(),d=l.useRef(!1);s&&(d.current=!0);const p=Sy({wasSelected:d.current,isSelected:s,enabled:r,mode:o});return{tabIndex:0,...n,children:p?t:null,role:"tabpanel","aria-labelledby":c,hidden:!s,id:i}}function V3(e,t){return`${e}--tab-${t}`}function U3(e,t){return`${e}--tabpanel-${t}`}var[oU,Fg]=Hn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),tc=Oe(function(t,n){const r=Qr("Tabs",t),{children:o,className:s,...i}=ar(t),{htmlProps:c,descendants:d,...p}=XV(i),h=l.useMemo(()=>p,[p]),{isFitted:m,...g}=c;return a.jsx(GV,{value:d,children:a.jsx(YV,{value:h,children:a.jsx(oU,{value:r,children:a.jsx(Ee.div,{className:jt("chakra-tabs",s),ref:n,...g,__css:r.root,children:o})})})})});tc.displayName="Tabs";var nc=Oe(function(t,n){const r=JV({...t,ref:n}),s={display:"flex",...Fg().tablist};return a.jsx(Ee.div,{...r,className:jt("chakra-tabs__tablist",t.className),__css:s})});nc.displayName="TabList";var Ho=Oe(function(t,n){const r=rU({...t,ref:n}),o=Fg();return a.jsx(Ee.div,{outline:"0",...r,className:jt("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});Ho.displayName="TabPanel";var zu=Oe(function(t,n){const r=nU(t),o=Fg();return a.jsx(Ee.div,{...r,width:"100%",ref:n,className:jt("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});zu.displayName="TabPanels";var xo=Oe(function(t,n){const r=Fg(),o=ZV({...t,ref:n}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return a.jsx(Ee.button,{...o,className:jt("chakra-tabs__tab",t.className),__css:s})});xo.displayName="Tab";function sU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var aU=["h","minH","height","minHeight"],G3=Oe((e,t)=>{const n=ll("Textarea",e),{className:r,rows:o,...s}=ar(e),i=Qx(s),c=o?sU(n,aU):n;return a.jsx(Ee.textarea,{ref:t,rows:o,...i,className:jt("chakra-textarea",r),__css:c})});G3.displayName="Textarea";var iU={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Sb=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Mh=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function lU(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:i=o,closeOnEsc:c=!0,onOpen:d,onClose:p,placement:h,id:m,isOpen:g,defaultIsOpen:b,arrowSize:y=10,arrowShadowColor:x,arrowPadding:C,modifiers:S,isDisabled:j,gutter:_,offset:I,direction:P,...M}=e,{isOpen:R,onOpen:A,onClose:D}=wy({isOpen:g,defaultIsOpen:b,onOpen:d,onClose:p}),{referenceRef:O,getPopperProps:T,getArrowInnerProps:Y,getArrowProps:z}=Cy({enabled:R,placement:h,arrowPadding:C,modifiers:S,gutter:_,offset:I,direction:P}),W=l.useId(),U=`tooltip-${m??W}`,L=l.useRef(null),ee=l.useRef(),K=l.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=void 0)},[]),Z=l.useRef(),se=l.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0)},[]),fe=l.useCallback(()=>{se(),D()},[D,se]),G=cU(L,fe),te=l.useCallback(()=>{if(!j&&!ee.current){R&&G();const le=Mh(L);ee.current=le.setTimeout(A,t)}},[G,j,R,A,t]),V=l.useCallback(()=>{K();const le=Mh(L);Z.current=le.setTimeout(fe,n)},[n,fe,K]),F=l.useCallback(()=>{R&&r&&V()},[r,V,R]),X=l.useCallback(()=>{R&&i&&V()},[i,V,R]),ue=l.useCallback(le=>{R&&le.key==="Escape"&&V()},[R,V]);Tl(()=>Sb(L),"keydown",c?ue:void 0),Tl(()=>{const le=L.current;if(!le)return null;const we=A5(le);return we.localName==="body"?Mh(L):we},"scroll",()=>{R&&s&&fe()},{passive:!0,capture:!0}),l.useEffect(()=>{j&&(K(),R&&D())},[j,R,D,K]),l.useEffect(()=>()=>{K(),se()},[K,se]),Tl(()=>L.current,"pointerleave",V);const q=l.useCallback((le={},we=null)=>({...le,ref:gn(L,we,O),onPointerEnter:rt(le.onPointerEnter,he=>{he.pointerType!=="touch"&&te()}),onClick:rt(le.onClick,F),onPointerDown:rt(le.onPointerDown,X),onFocus:rt(le.onFocus,te),onBlur:rt(le.onBlur,V),"aria-describedby":R?U:void 0}),[te,V,X,R,U,F,O]),ne=l.useCallback((le={},we=null)=>T({...le,style:{...le.style,[Fr.arrowSize.var]:y?`${y}px`:void 0,[Fr.arrowShadowColor.var]:x}},we),[T,y,x]),pe=l.useCallback((le={},we=null)=>{const ve={...le.style,position:"relative",transformOrigin:Fr.transformOrigin.varRef};return{ref:we,...M,...le,id:U,role:"tooltip",style:ve}},[M,U]);return{isOpen:R,show:te,hide:V,getTriggerProps:q,getTooltipProps:pe,getTooltipPositionerProps:ne,getArrowProps:z,getArrowInnerProps:Y}}var Jv="chakra-ui:close-tooltip";function cU(e,t){return l.useEffect(()=>{const n=Sb(e);return n.addEventListener(Jv,t),()=>n.removeEventListener(Jv,t)},[t,e]),()=>{const n=Sb(e),r=Mh(e);n.dispatchEvent(new r.CustomEvent(Jv))}}function uU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function dU(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var fU=Ee(Or.div),Fn=Oe((e,t)=>{var n,r;const o=ll("Tooltip",e),s=ar(e),i=mf(),{children:c,label:d,shouldWrapChildren:p,"aria-label":h,hasArrow:m,bg:g,portalProps:b,background:y,backgroundColor:x,bgColor:C,motionProps:S,...j}=s,_=(r=(n=y??x)!=null?n:g)!=null?r:C;if(_){o.bg=_;const T=lD(i,"colors",_);o[Fr.arrowBg.var]=T}const I=lU({...j,direction:i.direction}),P=typeof c=="string"||p;let M;if(P)M=a.jsx(Ee.span,{display:"inline-block",tabIndex:0,...I.getTriggerProps(),children:c});else{const T=l.Children.only(c);M=l.cloneElement(T,I.getTriggerProps(T.props,T.ref))}const R=!!h,A=I.getTooltipProps({},t),D=R?uU(A,["role","id"]):A,O=dU(A,["role","id"]);return d?a.jsxs(a.Fragment,{children:[M,a.jsx(yo,{children:I.isOpen&&a.jsx(Ru,{...b,children:a.jsx(Ee.div,{...I.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:a.jsxs(fU,{variants:iU,initial:"exit",animate:"enter",exit:"exit",...S,...D,__css:o,children:[d,R&&a.jsx(Ee.span,{srOnly:!0,...O,children:h}),m&&a.jsx(Ee.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:a.jsx(Ee.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):a.jsx(a.Fragment,{children:c})});Fn.displayName="Tooltip";function Bg(e,t={}){let n=l.useCallback(o=>t.keys?I$(e,t.keys,o):e.listen(o),[t.keys,e]),r=e.get.bind(e);return l.useSyncExternalStore(n,r,r)}const pU=de(Ce,({system:e})=>{const{consoleLogLevel:t,shouldLogToConsole:n}=e;return{consoleLogLevel:t,shouldLogToConsole:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),q3=e=>{const{consoleLogLevel:t,shouldLogToConsole:n}=H(pU);return l.useEffect(()=>{n?(localStorage.setItem("ROARR_LOG","true"),localStorage.setItem("ROARR_FILTER",`context.logLevel:>=${cD[t]}`)):localStorage.setItem("ROARR_LOG","false"),Ow.ROARR.write=uD.createLogWriter()},[t,n]),l.useEffect(()=>{const o={...dD};fD.set(Ow.Roarr.child(o))},[]),l.useMemo(()=>Ci(e),[e])};var hU=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Lf(e,t){var n=mU(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function mU(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=hU.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var gU=[".DS_Store","Thumbs.db"];function vU(e){return Tu(this,void 0,void 0,function(){return Nu(this,function(t){return tm(e)&&bU(e.dataTransfer)?[2,wU(e.dataTransfer,e.type)]:xU(e)?[2,yU(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,CU(e)]:[2,[]]})})}function bU(e){return tm(e)}function xU(e){return tm(e)&&tm(e.target)}function tm(e){return typeof e=="object"&&e!==null}function yU(e){return kb(e.target.files).map(function(t){return Lf(t)})}function CU(e){return Tu(this,void 0,void 0,function(){var t;return Nu(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Lf(r)})]}})})}function wU(e,t){return Tu(this,void 0,void 0,function(){var n,r;return Nu(this,function(o){switch(o.label){case 0:return e.items?(n=kb(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(SU))]):[3,2];case 1:return r=o.sent(),[2,ck(K3(r))];case 2:return[2,ck(kb(e.files).map(function(s){return Lf(s)}))]}})})}function ck(e){return e.filter(function(t){return gU.indexOf(t.name)===-1})}function kb(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,hk(n)];if(e.sizen)return[!1,hk(n)]}return[!0,null]}function El(e){return e!=null}function zU(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var p=J3(d,n),h=Jd(p,1),m=h[0],g=Z3(d,r,o),b=Jd(g,1),y=b[0],x=c?c(d):null;return m&&y&&!x})}function nm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Gp(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function gk(e){e.preventDefault()}function FU(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function BU(e){return e.indexOf("Edge/")!==-1}function HU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FU(e)||BU(e)}function ba(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),i=1;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sG(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}var My=l.forwardRef(function(e,t){var n=e.children,r=rm(e,KU),o=Oy(r),s=o.open,i=rm(o,QU);return l.useImperativeHandle(t,function(){return{open:s}},[s]),B.createElement(l.Fragment,null,n(wr(wr({},i),{},{open:s})))});My.displayName="Dropzone";var r6={disabled:!1,getFilesFromEvent:vU,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};My.defaultProps=r6;My.propTypes={children:Jn.func,accept:Jn.objectOf(Jn.arrayOf(Jn.string)),multiple:Jn.bool,preventDropOnDocument:Jn.bool,noClick:Jn.bool,noKeyboard:Jn.bool,noDrag:Jn.bool,noDragEventsBubbling:Jn.bool,minSize:Jn.number,maxSize:Jn.number,maxFiles:Jn.number,disabled:Jn.bool,getFilesFromEvent:Jn.func,onFileDialogCancel:Jn.func,onFileDialogOpen:Jn.func,useFsAccessApi:Jn.bool,autoFocus:Jn.bool,onDragEnter:Jn.func,onDragLeave:Jn.func,onDragOver:Jn.func,onDrop:Jn.func,onDropAccepted:Jn.func,onDropRejected:Jn.func,onError:Jn.func,validator:Jn.func};var Pb={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Oy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=wr(wr({},r6),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,c=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,g=t.onDrop,b=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,C=t.onFileDialogOpen,S=t.useFsAccessApi,j=t.autoFocus,_=t.preventDropOnDocument,I=t.noClick,P=t.noKeyboard,M=t.noDrag,R=t.noDragEventsBubbling,A=t.onError,D=t.validator,O=l.useMemo(function(){return UU(n)},[n]),T=l.useMemo(function(){return VU(n)},[n]),Y=l.useMemo(function(){return typeof C=="function"?C:bk},[C]),z=l.useMemo(function(){return typeof x=="function"?x:bk},[x]),W=l.useRef(null),Q=l.useRef(null),U=l.useReducer(aG,Pb),L=Zv(U,2),ee=L[0],K=L[1],Z=ee.isFocused,se=ee.isFileDialogActive,fe=l.useRef(typeof window<"u"&&window.isSecureContext&&S&&WU()),G=function(){!fe.current&&se&&setTimeout(function(){if(Q.current){var Be=Q.current.files;Be.length||(K({type:"closeDialog"}),z())}},300)};l.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[Q,se,z,fe]);var te=l.useRef([]),V=function(Be){W.current&&W.current.contains(Be.target)||(Be.preventDefault(),te.current=[])};l.useEffect(function(){return _&&(document.addEventListener("dragover",gk,!1),document.addEventListener("drop",V,!1)),function(){_&&(document.removeEventListener("dragover",gk),document.removeEventListener("drop",V))}},[W,_]),l.useEffect(function(){return!r&&j&&W.current&&W.current.focus(),function(){}},[W,j,r]);var F=l.useCallback(function(ke){A?A(ke):console.error(ke)},[A]),X=l.useCallback(function(ke){ke.preventDefault(),ke.persist(),ot(ke),te.current=[].concat(JU(te.current),[ke.target]),Gp(ke)&&Promise.resolve(o(ke)).then(function(Be){if(!(nm(ke)&&!R)){var Ot=Be.length,Ht=Ot>0&&zU({files:Be,accept:O,minSize:i,maxSize:s,multiple:c,maxFiles:d,validator:D}),je=Ot>0&&!Ht;K({isDragAccept:Ht,isDragReject:je,isDragActive:!0,type:"setDraggedFiles"}),p&&p(ke)}}).catch(function(Be){return F(Be)})},[o,p,F,R,O,i,s,c,d,D]),ue=l.useCallback(function(ke){ke.preventDefault(),ke.persist(),ot(ke);var Be=Gp(ke);if(Be&&ke.dataTransfer)try{ke.dataTransfer.dropEffect="copy"}catch{}return Be&&m&&m(ke),!1},[m,R]),q=l.useCallback(function(ke){ke.preventDefault(),ke.persist(),ot(ke);var Be=te.current.filter(function(Ht){return W.current&&W.current.contains(Ht)}),Ot=Be.indexOf(ke.target);Ot!==-1&&Be.splice(Ot,1),te.current=Be,!(Be.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Gp(ke)&&h&&h(ke))},[W,h,R]),ne=l.useCallback(function(ke,Be){var Ot=[],Ht=[];ke.forEach(function(je){var ht=J3(je,O),At=Zv(ht,2),_t=At[0],Re=At[1],Xe=Z3(je,i,s),_n=Zv(Xe,2),Me=_n[0],Ze=_n[1],Ye=D?D(je):null;if(_t&&Me&&!Ye)Ot.push(je);else{var ut=[Re,Ze];Ye&&(ut=ut.concat(Ye)),Ht.push({file:je,errors:ut.filter(function(Ut){return Ut})})}}),(!c&&Ot.length>1||c&&d>=1&&Ot.length>d)&&(Ot.forEach(function(je){Ht.push({file:je,errors:[LU]})}),Ot.splice(0)),K({acceptedFiles:Ot,fileRejections:Ht,type:"setFiles"}),g&&g(Ot,Ht,Be),Ht.length>0&&y&&y(Ht,Be),Ot.length>0&&b&&b(Ot,Be)},[K,c,O,i,s,d,g,b,y,D]),pe=l.useCallback(function(ke){ke.preventDefault(),ke.persist(),ot(ke),te.current=[],Gp(ke)&&Promise.resolve(o(ke)).then(function(Be){nm(ke)&&!R||ne(Be,ke)}).catch(function(Be){return F(Be)}),K({type:"reset"})},[o,ne,F,R]),le=l.useCallback(function(){if(fe.current){K({type:"openDialog"}),Y();var ke={multiple:c,types:T};window.showOpenFilePicker(ke).then(function(Be){return o(Be)}).then(function(Be){ne(Be,null),K({type:"closeDialog"})}).catch(function(Be){GU(Be)?(z(Be),K({type:"closeDialog"})):qU(Be)?(fe.current=!1,Q.current?(Q.current.value=null,Q.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):F(Be)});return}Q.current&&(K({type:"openDialog"}),Y(),Q.current.value=null,Q.current.click())},[K,Y,z,S,ne,F,T,c]),we=l.useCallback(function(ke){!W.current||!W.current.isEqualNode(ke.target)||(ke.key===" "||ke.key==="Enter"||ke.keyCode===32||ke.keyCode===13)&&(ke.preventDefault(),le())},[W,le]),ve=l.useCallback(function(){K({type:"focus"})},[]),he=l.useCallback(function(){K({type:"blur"})},[]),Ne=l.useCallback(function(){I||(HU()?setTimeout(le,0):le())},[I,le]),De=function(Be){return r?null:Be},qe=function(Be){return P?null:De(Be)},Mt=function(Be){return M?null:De(Be)},ot=function(Be){R&&Be.stopPropagation()},an=l.useMemo(function(){return function(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Be=ke.refKey,Ot=Be===void 0?"ref":Be,Ht=ke.role,je=ke.onKeyDown,ht=ke.onFocus,At=ke.onBlur,_t=ke.onClick,Re=ke.onDragEnter,Xe=ke.onDragOver,_n=ke.onDragLeave,Me=ke.onDrop,Ze=rm(ke,XU);return wr(wr(Ib({onKeyDown:qe(ba(je,we)),onFocus:qe(ba(ht,ve)),onBlur:qe(ba(At,he)),onClick:De(ba(_t,Ne)),onDragEnter:Mt(ba(Re,X)),onDragOver:Mt(ba(Xe,ue)),onDragLeave:Mt(ba(_n,q)),onDrop:Mt(ba(Me,pe)),role:typeof Ht=="string"&&Ht!==""?Ht:"presentation"},Ot,W),!r&&!P?{tabIndex:0}:{}),Ze)}},[W,we,ve,he,Ne,X,ue,q,pe,P,M,r]),pt=l.useCallback(function(ke){ke.stopPropagation()},[]),vt=l.useMemo(function(){return function(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Be=ke.refKey,Ot=Be===void 0?"ref":Be,Ht=ke.onChange,je=ke.onClick,ht=rm(ke,YU),At=Ib({accept:O,multiple:c,type:"file",style:{display:"none"},onChange:De(ba(Ht,pe)),onClick:De(ba(je,pt)),tabIndex:-1},Ot,Q);return wr(wr({},At),ht)}},[Q,n,c,pe,r]);return wr(wr({},ee),{},{isFocused:Z&&!r,getRootProps:an,getInputProps:vt,rootRef:W,inputRef:Q,open:De(le)})}function aG(e,t){switch(t.type){case"focus":return wr(wr({},e),{},{isFocused:!0});case"blur":return wr(wr({},e),{},{isFocused:!1});case"openDialog":return wr(wr({},Pb),{},{isFileDialogActive:!0});case"closeDialog":return wr(wr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return wr(wr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return wr(wr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return wr({},Pb);default:return e}}function bk(){}function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var pG=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,s=n.meta,i=n.mod,c=n.shift,d=n.ctrl,p=n.keys,h=t.key,m=t.code,g=t.ctrlKey,b=t.metaKey,y=t.shiftKey,x=t.altKey,C=Ui(m),S=h.toLowerCase();if(!r){if(o===!x&&S!=="alt"||c===!y&&S!=="shift")return!1;if(i){if(!b&&!g)return!1}else if(s===!b&&S!=="meta"&&S!=="os"||d===!g&&S!=="ctrl"&&S!=="control")return!1}return p&&p.length===1&&(p.includes(S)||p.includes(C))?!0:p?Oh(p):!p},hG=l.createContext(void 0),mG=function(){return l.useContext(hG)};function l6(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&l6(e[r],t[r])},!0):e===t}var gG=l.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),vG=function(){return l.useContext(gG)};function bG(e){var t=l.useRef(void 0);return l6(t.current,e)||(t.current=e),t.current}var xk=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},xG=typeof window<"u"?l.useLayoutEffect:l.useEffect;function It(e,t,n,r){var o=l.useRef(null),s=l.useRef(!1),i=n instanceof Array?r instanceof Array?void 0:r:n,c=Ry(e)?e.join(i==null?void 0:i.splitKey):e,d=n instanceof Array?n:r instanceof Array?r:void 0,p=l.useCallback(t,d??[]),h=l.useRef(p);d?h.current=p:h.current=t;var m=bG(i),g=vG(),b=g.enabledScopes,y=mG();return xG(function(){if(!((m==null?void 0:m.enabled)===!1||!fG(b,m==null?void 0:m.scopes))){var x=function(I,P){var M;if(P===void 0&&(P=!1),!(dG(I)&&!i6(I,m==null?void 0:m.enableOnFormTags))&&!(m!=null&&m.ignoreEventWhen!=null&&m.ignoreEventWhen(I))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){xk(I);return}(M=I.target)!=null&&M.isContentEditable&&!(m!=null&&m.enableOnContentEditable)||e1(c,m==null?void 0:m.splitKey).forEach(function(R){var A,D=t1(R,m==null?void 0:m.combinationKey);if(pG(I,D,m==null?void 0:m.ignoreModifiers)||(A=D.keys)!=null&&A.includes("*")){if(P&&s.current)return;if(cG(I,D,m==null?void 0:m.preventDefault),!uG(I,D,m==null?void 0:m.enabled)){xk(I);return}h.current(I,D),P||(s.current=!0)}})}},C=function(I){I.key!==void 0&&(s6(Ui(I.code)),((m==null?void 0:m.keydown)===void 0&&(m==null?void 0:m.keyup)!==!0||m!=null&&m.keydown)&&x(I))},S=function(I){I.key!==void 0&&(a6(Ui(I.code)),s.current=!1,m!=null&&m.keyup&&x(I,!0))},j=o.current||(i==null?void 0:i.document)||document;return j.addEventListener("keyup",S),j.addEventListener("keydown",C),y&&e1(c,m==null?void 0:m.splitKey).forEach(function(_){return y.addHotkey(t1(_,m==null?void 0:m.combinationKey,m==null?void 0:m.description))}),function(){j.removeEventListener("keyup",S),j.removeEventListener("keydown",C),y&&e1(c,m==null?void 0:m.splitKey).forEach(function(_){return y.removeHotkey(t1(_,m==null?void 0:m.combinationKey,m==null?void 0:m.description))})}}},[c,m,b]),o}const yG=e=>{const{isDragAccept:t,isDragReject:n,setIsHandlingUpload:r}=e;return It("esc",()=>{r(!1)}),a.jsxs(Te,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:"base.700",_dark:{bg:"base.900"},opacity:.7,alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"full",height:"full",alignItems:"center",justifyContent:"center",p:4},children:a.jsx(N,{sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",flexDir:"column",gap:4,borderWidth:3,borderRadius:"xl",borderStyle:"dashed",color:"base.100",borderColor:"base.100",_dark:{borderColor:"base.200"}},children:t?a.jsx(vo,{size:"lg",children:"Drop to Upload"}):a.jsxs(a.Fragment,{children:[a.jsx(vo,{size:"lg",children:"Invalid Upload"}),a.jsx(vo,{size:"md",children:"Must be single JPEG or PNG image"})]})})})]})},CG=l.memo(yG),wG=de([Ce,ro],({gallery:e},t)=>{let n={type:"TOAST"};t==="unifiedCanvas"&&(n={type:"SET_CANVAS_INITIAL_IMAGE"}),t==="img2img"&&(n={type:"SET_INITIAL_IMAGE"});const{autoAddBoardId:r}=e;return{autoAddBoardId:r,postUploadAction:n}},_e),SG=e=>{const{children:t}=e,{autoAddBoardId:n,postUploadAction:r}=H(wG),o=Zl(),{t:s}=J(),[i,c]=l.useState(!1),[d]=II(),p=l.useCallback(I=>{c(!0),o({title:s("toast.uploadFailed"),description:I.errors.map(P=>P.message).join(` +`),status:"error"})},[s,o]),h=l.useCallback(async I=>{d({file:I,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,d]),m=l.useCallback((I,P)=>{if(P.length>1){o({title:s("toast.uploadFailed"),description:s("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}P.forEach(M=>{p(M)}),I.forEach(M=>{h(M)})},[s,o,h,p]),g=l.useCallback(()=>{c(!0)},[]),{getRootProps:b,getInputProps:y,isDragAccept:x,isDragReject:C,isDragActive:S,inputRef:j}=Oy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:m,onDragOver:g,multiple:!1});l.useEffect(()=>{const I=async P=>{var M,R;j.current&&(M=P.clipboardData)!=null&&M.files&&(j.current.files=P.clipboardData.files,(R=j.current)==null||R.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",I),()=>{document.removeEventListener("paste",I)}},[j]);const _=l.useCallback(I=>{I.key},[]);return a.jsxs(Te,{...b({style:{}}),onKeyDown:_,children:[a.jsx("input",{...y()}),t,a.jsx(yo,{children:S&&i&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(CG,{isDragAccept:x,isDragReject:C,setIsHandlingUpload:c})},"image-upload-overlay")})]})},kG=l.memo(SG),jG=Oe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:c,...d}=e;return a.jsx(Fn,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(tl,{ref:t,colorScheme:c?"accent":"base",...d,children:n})})}),Rt=l.memo(jG);function _G(e){const t=l.createContext(null);return[({children:o,value:s})=>B.createElement(t.Provider,{value:s},o),()=>{const o=l.useContext(t);if(o===null)throw new Error(e);return o}]}function c6(e){return Array.isArray(e)?e:[e]}const IG=()=>{};function PG(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||IG:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function u6({data:e}){const t=[],n=[],r=e.reduce((o,s,i)=>(s.group?o[s.group]?o[s.group].push(i):o[s.group]=[i]:n.push(i),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function d6(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==B.Fragment:!1}function f6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tr===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const OG=pD({key:"mantine",prepend:!0});function RG(){return EP()||OG}var AG=Object.defineProperty,yk=Object.getOwnPropertySymbols,DG=Object.prototype.hasOwnProperty,TG=Object.prototype.propertyIsEnumerable,Ck=(e,t,n)=>t in e?AG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NG=(e,t)=>{for(var n in t||(t={}))DG.call(t,n)&&Ck(e,n,t[n]);if(yk)for(var n of yk(t))TG.call(t,n)&&Ck(e,n,t[n]);return e};const n1="ref";function $G(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(n1 in n))return{args:e,ref:t};t=n[n1];const r=NG({},n);return delete r[n1],{args:[r],ref:t}}const{cssFactory:LG}=(()=>{function e(n,r,o){const s=[],i=gD(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:c,args:d}=$G(i),p=hD(d,r.registered);return mD(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...i)=>e(r.registered,o,p6(i))}}return{cssFactory:t}})();function h6(){const e=RG();return MG(()=>LG({cache:e}),[e])}function zG({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((c,d)=>(Object.keys(d.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${d.classNames[p]}`:c[p]=`${c[p]} ${d.classNames[p]}`}),c),{});return Object.keys(t).reduce((c,d)=>(c[d]=e(t[d],i[d],r!=null&&r[d],Array.isArray(o)?o.filter(Boolean).map(p=>`${(s==null?void 0:s.key)||"mantine"}-${p}-${d}`).join(" "):o?`${(s==null?void 0:s.key)||"mantine"}-${o}-${d}`:null),c),{})}var FG=Object.defineProperty,wk=Object.getOwnPropertySymbols,BG=Object.prototype.hasOwnProperty,HG=Object.prototype.propertyIsEnumerable,Sk=(e,t,n)=>t in e?FG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r1=(e,t)=>{for(var n in t||(t={}))BG.call(t,n)&&Sk(e,n,t[n]);if(wk)for(var n of wk(t))HG.call(t,n)&&Sk(e,n,t[n]);return e};function Mb(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=r1(r1({},e[n]),t[n]):e[n]=r1({},t[n])}),e}function kk(e,t,n,r){const o=s=>typeof s=="function"?s(t,n||{},r):s||{};return Array.isArray(e)?e.map(s=>o(s.styles)).reduce((s,i)=>Mb(s,i),{}):o(e)}function WG({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((s,i)=>(i.variants&&r in i.variants&&Mb(s,i.variants[r](t,n,{variant:r,size:o})),i.sizes&&o in i.sizes&&Mb(s,i.sizes[o](t,n,{variant:r,size:o})),s),{})}function Co(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const s=ki(),i=c$(o==null?void 0:o.name),c=EP(),d={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:p,cx:h}=h6(),m=t(s,r,d),g=kk(o==null?void 0:o.styles,s,r,d),b=kk(i,s,r,d),y=WG({ctx:i,theme:s,params:r,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),x=Object.fromEntries(Object.keys(m).map(C=>{const S=h({[p(m[C])]:!(o!=null&&o.unstyled)},p(y[C]),p(b[C]),p(g[C]));return[C,S]}));return{classes:zG({cx:h,classes:x,context:i,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:c}),cx:h,theme:s}}return n}function jk(e){return`___ref-${e||""}`}var VG=Object.defineProperty,UG=Object.defineProperties,GG=Object.getOwnPropertyDescriptors,_k=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,KG=Object.prototype.propertyIsEnumerable,Ik=(e,t,n)=>t in e?VG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vd=(e,t)=>{for(var n in t||(t={}))qG.call(t,n)&&Ik(e,n,t[n]);if(_k)for(var n of _k(t))KG.call(t,n)&&Ik(e,n,t[n]);return e},bd=(e,t)=>UG(e,GG(t));const xd={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${Ge(10)})`},transitionProperty:"transform, opacity"},qp={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${Ge(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${Ge(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Ge(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Ge(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:bd(vd({},xd),{common:{transformOrigin:"center center"}}),"pop-bottom-left":bd(vd({},xd),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":bd(vd({},xd),{common:{transformOrigin:"bottom right"}}),"pop-top-left":bd(vd({},xd),{common:{transformOrigin:"top left"}}),"pop-top-right":bd(vd({},xd),{common:{transformOrigin:"top right"}})},Pk=["mousedown","touchstart"];function QG(e,t,n){const r=l.useRef();return l.useEffect(()=>{const o=s=>{const{target:i}=s??{};if(Array.isArray(n)){const c=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";n.every(p=>!!p&&!s.composedPath().includes(p))&&!c&&e()}else r.current&&!r.current.contains(i)&&e()};return(t||Pk).forEach(s=>document.addEventListener(s,o)),()=>{(t||Pk).forEach(s=>document.removeEventListener(s,o))}},[r,e,n]),r}function XG(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function YG(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function JG(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=l.useState(n?t:YG(e,t)),s=l.useRef();return l.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(e),o(s.current.matches),XG(s.current,i=>o(i.matches))},[e]),r}const m6=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Js(e,t){const n=l.useRef(!1);l.useEffect(()=>()=>{n.current=!1},[]),l.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function ZG({opened:e,shouldReturnFocus:t=!0}){const n=l.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return Js(()=>{let o=-1;const s=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),e?n.current=document.activeElement:t&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[e,t]),r}const eq=/input|select|textarea|button|object/,g6="a, input, select, textarea, button, object, [tabindex]";function tq(e){return e.style.display==="none"}function nq(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(tq(n))return!1;n=n.parentNode}return!0}function v6(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Ob(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(v6(e));return(eq.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&nq(e)}function b6(e){const t=v6(e);return(Number.isNaN(t)||t>=0)&&Ob(e)}function rq(e){return Array.from(e.querySelectorAll(g6)).filter(b6)}function oq(e,t){const n=rq(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();if(!(r===o.activeElement||e===o.activeElement))return;t.preventDefault();const i=n[t.shiftKey?n.length-1:0];i&&i.focus()}function Dy(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function sq(e,t="body > :not(script)"){const n=Dy(),r=Array.from(document.querySelectorAll(t)).map(o=>{var s;if((s=o==null?void 0:o.shadowRoot)!=null&&s.contains(e)||o.contains(e))return;const i=o.getAttribute("aria-hidden"),c=o.getAttribute("data-hidden"),d=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),i===null||i==="false"?o.setAttribute("aria-hidden","true"):!c&&!d&&o.setAttribute("data-hidden",i),{node:o,ariaHidden:c||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function aq(e=!0){const t=l.useRef(),n=l.useRef(null),r=s=>{let i=s.querySelector("[data-autofocus]");if(!i){const c=Array.from(s.querySelectorAll(g6));i=c.find(b6)||c.find(Ob)||null,!i&&Ob(s)&&(i=s)}i&&i.focus({preventScroll:!0})},o=l.useCallback(s=>{if(e){if(s===null){n.current&&(n.current(),n.current=null);return}n.current=sq(s),t.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&r(s)}),t.current=s):t.current=null)}},[e]);return l.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const s=i=>{i.key==="Tab"&&t.current&&oq(t.current,i)};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),n.current&&n.current()}},[e]),o}const iq=B["useId".toString()]||(()=>{});function lq(){const e=iq();return e?`mantine-${e.replace(/:/g,"")}`:""}function Ty(e){const t=lq(),[n,r]=l.useState(t);return m6(()=>{r(Dy())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function Ek(e,t,n){l.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function x6(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function cq(...e){return t=>{e.forEach(n=>x6(n,t))}}function zf(...e){return l.useCallback(cq(...e),e)}function Zd({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,s]=l.useState(t!==void 0?t:n),i=c=>{s(c),r==null||r(c)};return e!==void 0?[e,r,!0]:[o,i,!1]}function y6(e,t){return JG("(prefers-reduced-motion: reduce)",e,t)}const uq=e=>e<.5?2*e*e:-1+(4-2*e)*e,dq=({axis:e,target:t,parent:n,alignment:r,offset:o,isList:s})=>{if(!t||!n&&typeof document>"u")return 0;const i=!!n,d=(n||document.body).getBoundingClientRect(),p=t.getBoundingClientRect(),h=m=>p[m]-d[m];if(e==="y"){const m=h("top");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.height*(s?0:1)||!s?b:0}const g=i?d.height:window.innerHeight;if(r==="end"){const b=m+o-g+p.height;return b>=-p.height*(s?0:1)||!s?b:0}return r==="center"?m-g/2+p.height/2:0}if(e==="x"){const m=h("left");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.width||!s?b:0}const g=i?d.width:window.innerWidth;if(r==="end"){const b=m+o-g+p.width;return b>=-p.width||!s?b:0}return r==="center"?m-g/2+p.width/2:0}return 0},fq=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const n=e==="y"?"scrollTop":"scrollLeft";if(t)return t[n];const{body:r,documentElement:o}=document;return r[n]+o[n]},pq=({axis:e,parent:t,distance:n})=>{if(!t&&typeof document>"u")return;const r=e==="y"?"scrollTop":"scrollLeft";if(t)t[r]=n;else{const{body:o,documentElement:s}=document;o[r]=n,s[r]=n}};function C6({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=uq,offset:o=0,cancelable:s=!0,isList:i=!1}={}){const c=l.useRef(0),d=l.useRef(0),p=l.useRef(!1),h=l.useRef(null),m=l.useRef(null),g=y6(),b=()=>{c.current&&cancelAnimationFrame(c.current)},y=l.useCallback(({alignment:C="start"}={})=>{var S;p.current=!1,c.current&&b();const j=(S=fq({parent:h.current,axis:t}))!=null?S:0,_=dq({parent:h.current,target:m.current,axis:t,alignment:C,offset:o,isList:i})-(h.current?0:j);function I(){d.current===0&&(d.current=performance.now());const M=performance.now()-d.current,R=g||e===0?1:M/e,A=j+_*r(R);pq({parent:h.current,axis:t,distance:A}),!p.current&&R<1?c.current=requestAnimationFrame(I):(typeof n=="function"&&n(),d.current=0,c.current=0,b())}I()},[t,e,r,i,o,n,g]),x=()=>{s&&(p.current=!0)};return Ek("wheel",x,{passive:!0}),Ek("touchmove",x,{passive:!0}),l.useEffect(()=>b,[]),{scrollableRef:h,targetRef:m,scrollIntoView:y,cancel:b}}var Mk=Object.getOwnPropertySymbols,hq=Object.prototype.hasOwnProperty,mq=Object.prototype.propertyIsEnumerable,gq=(e,t)=>{var n={};for(var r in e)hq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mk)for(var r of Mk(e))t.indexOf(r)<0&&mq.call(e,r)&&(n[r]=e[r]);return n};function Hg(e){const t=e,{m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:C,c:S,opacity:j,ff:_,fz:I,fw:P,lts:M,ta:R,lh:A,fs:D,tt:O,td:T,w:Y,miw:z,maw:W,h:Q,mih:U,mah:L,bgsz:ee,bgp:K,bgr:Z,bga:se,pos:fe,top:G,left:te,bottom:V,right:F,inset:X,display:ue}=t,q=gq(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:u$({m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:C,c:S,opacity:j,ff:_,fz:I,fw:P,lts:M,ta:R,lh:A,fs:D,tt:O,td:T,w:Y,miw:z,maw:W,h:Q,mih:U,mah:L,bgsz:ee,bgp:K,bgr:Z,bga:se,pos:fe,top:G,left:te,bottom:V,right:F,inset:X,display:ue}),rest:q}}function vq(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>yS(Xt({size:r,sizes:t.breakpoints}))-yS(Xt({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function bq({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return vq(e,t).reduce((i,c)=>{if(c==="base"&&e.base!==void 0){const p=n(e.base,t);return Array.isArray(r)?(r.forEach(h=>{i[h]=p}),i):(i[r]=p,i)}const d=n(e[c],t);return Array.isArray(r)?(i[t.fn.largerThan(c)]={},r.forEach(p=>{i[t.fn.largerThan(c)][p]=d}),i):(i[t.fn.largerThan(c)]={[r]:d},i)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((s,i)=>(s[i]=o,s),{}):{[r]:o}}function xq(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function yq(e){return Ge(e)}function Cq(e){return e}function wq(e,t){return Xt({size:e,sizes:t.fontSizes})}const Sq=["-xs","-sm","-md","-lg","-xl"];function kq(e,t){return Sq.includes(e)?`calc(${Xt({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Xt({size:e,sizes:t.spacing})}const jq={identity:Cq,color:xq,size:yq,fontSize:wq,spacing:kq},_q={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var Iq=Object.defineProperty,Ok=Object.getOwnPropertySymbols,Pq=Object.prototype.hasOwnProperty,Eq=Object.prototype.propertyIsEnumerable,Rk=(e,t,n)=>t in e?Iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ak=(e,t)=>{for(var n in t||(t={}))Pq.call(t,n)&&Rk(e,n,t[n]);if(Ok)for(var n of Ok(t))Eq.call(t,n)&&Rk(e,n,t[n]);return e};function Dk(e,t,n=_q){return Object.keys(n).reduce((o,s)=>(s in e&&e[s]!==void 0&&o.push(bq({value:e[s],getValue:jq[n[s].type],property:n[s].property,theme:t})),o),[]).reduce((o,s)=>(Object.keys(s).forEach(i=>{typeof s[i]=="object"&&s[i]!==null&&i in o?o[i]=Ak(Ak({},o[i]),s[i]):o[i]=s[i]}),o),{})}function Tk(e,t){return typeof e=="function"?e(t):e}function Mq(e,t,n){const r=ki(),{css:o,cx:s}=h6();return Array.isArray(e)?s(n,o(Dk(t,r)),e.map(i=>o(Tk(i,r)))):s(n,o(Tk(e,r)),o(Dk(t,r)))}var Oq=Object.defineProperty,om=Object.getOwnPropertySymbols,w6=Object.prototype.hasOwnProperty,S6=Object.prototype.propertyIsEnumerable,Nk=(e,t,n)=>t in e?Oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rq=(e,t)=>{for(var n in t||(t={}))w6.call(t,n)&&Nk(e,n,t[n]);if(om)for(var n of om(t))S6.call(t,n)&&Nk(e,n,t[n]);return e},Aq=(e,t)=>{var n={};for(var r in e)w6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&om)for(var r of om(e))t.indexOf(r)<0&&S6.call(e,r)&&(n[r]=e[r]);return n};const k6=l.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:s,sx:i}=n,c=Aq(n,["className","component","style","sx"]);const{systemStyles:d,rest:p}=Hg(c),h=o||"div";return B.createElement(h,Rq({ref:t,className:Mq(i,d,r),style:s},p))});k6.displayName="@mantine/core/Box";const Go=k6;var Dq=Object.defineProperty,Tq=Object.defineProperties,Nq=Object.getOwnPropertyDescriptors,$k=Object.getOwnPropertySymbols,$q=Object.prototype.hasOwnProperty,Lq=Object.prototype.propertyIsEnumerable,Lk=(e,t,n)=>t in e?Dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zk=(e,t)=>{for(var n in t||(t={}))$q.call(t,n)&&Lk(e,n,t[n]);if($k)for(var n of $k(t))Lq.call(t,n)&&Lk(e,n,t[n]);return e},zq=(e,t)=>Tq(e,Nq(t)),Fq=Co(e=>({root:zq(zk(zk({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Bq=Fq;var Hq=Object.defineProperty,sm=Object.getOwnPropertySymbols,j6=Object.prototype.hasOwnProperty,_6=Object.prototype.propertyIsEnumerable,Fk=(e,t,n)=>t in e?Hq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wq=(e,t)=>{for(var n in t||(t={}))j6.call(t,n)&&Fk(e,n,t[n]);if(sm)for(var n of sm(t))_6.call(t,n)&&Fk(e,n,t[n]);return e},Vq=(e,t)=>{var n={};for(var r in e)j6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sm)for(var r of sm(e))t.indexOf(r)<0&&_6.call(e,r)&&(n[r]=e[r]);return n};const I6=l.forwardRef((e,t)=>{const n=Nr("UnstyledButton",{},e),{className:r,component:o="button",unstyled:s,variant:i}=n,c=Vq(n,["className","component","unstyled","variant"]),{classes:d,cx:p}=Bq(null,{name:"UnstyledButton",unstyled:s,variant:i});return B.createElement(Go,Wq({component:o,ref:t,className:p(d.root,r),type:o==="button"?"button":void 0},c))});I6.displayName="@mantine/core/UnstyledButton";const Uq=I6;var Gq=Object.defineProperty,qq=Object.defineProperties,Kq=Object.getOwnPropertyDescriptors,Bk=Object.getOwnPropertySymbols,Qq=Object.prototype.hasOwnProperty,Xq=Object.prototype.propertyIsEnumerable,Hk=(e,t,n)=>t in e?Gq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rb=(e,t)=>{for(var n in t||(t={}))Qq.call(t,n)&&Hk(e,n,t[n]);if(Bk)for(var n of Bk(t))Xq.call(t,n)&&Hk(e,n,t[n]);return e},Wk=(e,t)=>qq(e,Kq(t));const Yq=["subtle","filled","outline","light","default","transparent","gradient"],Kp={xs:Ge(18),sm:Ge(22),md:Ge(28),lg:Ge(34),xl:Ge(44)};function Jq({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:Yq.includes(e)?Rb({border:`${Ge(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Zq=Co((e,{radius:t,color:n,gradient:r},{variant:o,size:s})=>({root:Wk(Rb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Xt({size:s,sizes:Kp}),minHeight:Xt({size:s,sizes:Kp}),width:Xt({size:s,sizes:Kp}),minWidth:Xt({size:s,sizes:Kp})},Jq({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Wk(Rb({content:'""'},e.fn.cover(Ge(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const eK=Zq;var tK=Object.defineProperty,am=Object.getOwnPropertySymbols,P6=Object.prototype.hasOwnProperty,E6=Object.prototype.propertyIsEnumerable,Vk=(e,t,n)=>t in e?tK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uk=(e,t)=>{for(var n in t||(t={}))P6.call(t,n)&&Vk(e,n,t[n]);if(am)for(var n of am(t))E6.call(t,n)&&Vk(e,n,t[n]);return e},Gk=(e,t)=>{var n={};for(var r in e)P6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&am)for(var r of am(e))t.indexOf(r)<0&&E6.call(e,r)&&(n[r]=e[r]);return n};function nK(e){var t=e,{size:n,color:r}=t,o=Gk(t,["size","color"]);const s=o,{style:i}=s,c=Gk(s,["style"]);return B.createElement("svg",Uk({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:Uk({width:n},i)},c),B.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},B.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},B.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},B.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},B.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},B.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var rK=Object.defineProperty,im=Object.getOwnPropertySymbols,M6=Object.prototype.hasOwnProperty,O6=Object.prototype.propertyIsEnumerable,qk=(e,t,n)=>t in e?rK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kk=(e,t)=>{for(var n in t||(t={}))M6.call(t,n)&&qk(e,n,t[n]);if(im)for(var n of im(t))O6.call(t,n)&&qk(e,n,t[n]);return e},Qk=(e,t)=>{var n={};for(var r in e)M6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&im)for(var r of im(e))t.indexOf(r)<0&&O6.call(e,r)&&(n[r]=e[r]);return n};function oK(e){var t=e,{size:n,color:r}=t,o=Qk(t,["size","color"]);const s=o,{style:i}=s,c=Qk(s,["style"]);return B.createElement("svg",Kk({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:Kk({width:n,height:n},i)},c),B.createElement("g",{fill:"none",fillRule:"evenodd"},B.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},B.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),B.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},B.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var sK=Object.defineProperty,lm=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty,A6=Object.prototype.propertyIsEnumerable,Xk=(e,t,n)=>t in e?sK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yk=(e,t)=>{for(var n in t||(t={}))R6.call(t,n)&&Xk(e,n,t[n]);if(lm)for(var n of lm(t))A6.call(t,n)&&Xk(e,n,t[n]);return e},Jk=(e,t)=>{var n={};for(var r in e)R6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lm)for(var r of lm(e))t.indexOf(r)<0&&A6.call(e,r)&&(n[r]=e[r]);return n};function aK(e){var t=e,{size:n,color:r}=t,o=Jk(t,["size","color"]);const s=o,{style:i}=s,c=Jk(s,["style"]);return B.createElement("svg",Yk({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:Yk({width:n},i)},c),B.createElement("circle",{cx:"15",cy:"15",r:"15"},B.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},B.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),B.createElement("circle",{cx:"105",cy:"15",r:"15"},B.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),B.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var iK=Object.defineProperty,cm=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,T6=Object.prototype.propertyIsEnumerable,Zk=(e,t,n)=>t in e?iK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lK=(e,t)=>{for(var n in t||(t={}))D6.call(t,n)&&Zk(e,n,t[n]);if(cm)for(var n of cm(t))T6.call(t,n)&&Zk(e,n,t[n]);return e},cK=(e,t)=>{var n={};for(var r in e)D6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cm)for(var r of cm(e))t.indexOf(r)<0&&T6.call(e,r)&&(n[r]=e[r]);return n};const o1={bars:nK,oval:oK,dots:aK},uK={xs:Ge(18),sm:Ge(22),md:Ge(36),lg:Ge(44),xl:Ge(58)},dK={size:"md"};function N6(e){const t=Nr("Loader",dK,e),{size:n,color:r,variant:o}=t,s=cK(t,["size","color","variant"]),i=ki(),c=o in o1?o:i.loader;return B.createElement(Go,lK({role:"presentation",component:o1[c]||o1.bars,size:Xt({size:n,sizes:uK}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:r||i.primaryColor}).background},s))}N6.displayName="@mantine/core/Loader";var fK=Object.defineProperty,um=Object.getOwnPropertySymbols,$6=Object.prototype.hasOwnProperty,L6=Object.prototype.propertyIsEnumerable,e4=(e,t,n)=>t in e?fK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t4=(e,t)=>{for(var n in t||(t={}))$6.call(t,n)&&e4(e,n,t[n]);if(um)for(var n of um(t))L6.call(t,n)&&e4(e,n,t[n]);return e},pK=(e,t)=>{var n={};for(var r in e)$6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&um)for(var r of um(e))t.indexOf(r)<0&&L6.call(e,r)&&(n[r]=e[r]);return n};const hK={color:"gray",size:"md",variant:"subtle"},z6=l.forwardRef((e,t)=>{const n=Nr("ActionIcon",hK,e),{className:r,color:o,children:s,radius:i,size:c,variant:d,gradient:p,disabled:h,loaderProps:m,loading:g,unstyled:b,__staticSelector:y}=n,x=pK(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:C,cx:S,theme:j}=eK({radius:i,color:o,gradient:p},{name:["ActionIcon",y],unstyled:b,size:c,variant:d}),_=B.createElement(N6,t4({color:j.fn.variant({color:o,variant:d}).color,size:"100%","data-action-icon-loader":!0},m));return B.createElement(Uq,t4({className:S(C.root,r),ref:t,disabled:h,"data-disabled":h||void 0,"data-loading":g||void 0,unstyled:b},x),g?_:s)});z6.displayName="@mantine/core/ActionIcon";const mK=z6;var gK=Object.defineProperty,vK=Object.defineProperties,bK=Object.getOwnPropertyDescriptors,dm=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable,n4=(e,t,n)=>t in e?gK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xK=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&n4(e,n,t[n]);if(dm)for(var n of dm(t))B6.call(t,n)&&n4(e,n,t[n]);return e},yK=(e,t)=>vK(e,bK(t)),CK=(e,t)=>{var n={};for(var r in e)F6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dm)for(var r of dm(e))t.indexOf(r)<0&&B6.call(e,r)&&(n[r]=e[r]);return n};function H6(e){const t=Nr("Portal",{},e),{children:n,target:r,className:o,innerRef:s}=t,i=CK(t,["children","target","className","innerRef"]),c=ki(),[d,p]=l.useState(!1),h=l.useRef();return m6(()=>(p(!0),h.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(h.current),()=>{!r&&document.body.removeChild(h.current)}),[r]),d?rs.createPortal(B.createElement("div",yK(xK({className:o,dir:c.dir},i),{ref:s}),n),h.current):null}H6.displayName="@mantine/core/Portal";var wK=Object.defineProperty,fm=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,r4=(e,t,n)=>t in e?wK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SK=(e,t)=>{for(var n in t||(t={}))W6.call(t,n)&&r4(e,n,t[n]);if(fm)for(var n of fm(t))V6.call(t,n)&&r4(e,n,t[n]);return e},kK=(e,t)=>{var n={};for(var r in e)W6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fm)for(var r of fm(e))t.indexOf(r)<0&&V6.call(e,r)&&(n[r]=e[r]);return n};function U6(e){var t=e,{withinPortal:n=!0,children:r}=t,o=kK(t,["withinPortal","children"]);return n?B.createElement(H6,SK({},o),r):B.createElement(B.Fragment,null,r)}U6.displayName="@mantine/core/OptionalPortal";var jK=Object.defineProperty,pm=Object.getOwnPropertySymbols,G6=Object.prototype.hasOwnProperty,q6=Object.prototype.propertyIsEnumerable,o4=(e,t,n)=>t in e?jK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s4=(e,t)=>{for(var n in t||(t={}))G6.call(t,n)&&o4(e,n,t[n]);if(pm)for(var n of pm(t))q6.call(t,n)&&o4(e,n,t[n]);return e},_K=(e,t)=>{var n={};for(var r in e)G6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pm)for(var r of pm(e))t.indexOf(r)<0&&q6.call(e,r)&&(n[r]=e[r]);return n};function K6(e){const t=e,{width:n,height:r,style:o}=t,s=_K(t,["width","height","style"]);return B.createElement("svg",s4({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:s4({width:n,height:r},o)},s),B.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}K6.displayName="@mantine/core/CloseIcon";var IK=Object.defineProperty,hm=Object.getOwnPropertySymbols,Q6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,a4=(e,t,n)=>t in e?IK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PK=(e,t)=>{for(var n in t||(t={}))Q6.call(t,n)&&a4(e,n,t[n]);if(hm)for(var n of hm(t))X6.call(t,n)&&a4(e,n,t[n]);return e},EK=(e,t)=>{var n={};for(var r in e)Q6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hm)for(var r of hm(e))t.indexOf(r)<0&&X6.call(e,r)&&(n[r]=e[r]);return n};const MK={xs:Ge(12),sm:Ge(16),md:Ge(20),lg:Ge(28),xl:Ge(34)},OK={size:"sm"},Y6=l.forwardRef((e,t)=>{const n=Nr("CloseButton",OK,e),{iconSize:r,size:o,children:s}=n,i=EK(n,["iconSize","size","children"]),c=Ge(r||MK[o]);return B.createElement(mK,PK({ref:t,__staticSelector:"CloseButton",size:o},i),s||B.createElement(K6,{width:c,height:c}))});Y6.displayName="@mantine/core/CloseButton";const J6=Y6;var RK=Object.defineProperty,AK=Object.defineProperties,DK=Object.getOwnPropertyDescriptors,i4=Object.getOwnPropertySymbols,TK=Object.prototype.hasOwnProperty,NK=Object.prototype.propertyIsEnumerable,l4=(e,t,n)=>t in e?RK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qp=(e,t)=>{for(var n in t||(t={}))TK.call(t,n)&&l4(e,n,t[n]);if(i4)for(var n of i4(t))NK.call(t,n)&&l4(e,n,t[n]);return e},$K=(e,t)=>AK(e,DK(t));function LK({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function zK({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function FK(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function BK({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var HK=Co((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:s,underline:i,gradient:c,weight:d,transform:p,align:h,strikethrough:m,italic:g},{size:b})=>{const y=e.fn.variant({variant:"gradient",gradient:c});return{root:$K(Qp(Qp(Qp(Qp({},e.fn.fontStyles()),e.fn.focusStyles()),FK(n)),BK({theme:e,truncate:r})),{color:zK({color:t,theme:e}),fontFamily:s?"inherit":e.fontFamily,fontSize:s||b===void 0?"inherit":Xt({size:b,sizes:e.fontSizes}),lineHeight:s?"inherit":o?1:e.lineHeight,textDecoration:LK({underline:i,strikethrough:m}),WebkitTapHighlightColor:"transparent",fontWeight:s?"inherit":d,textTransform:p,textAlign:h,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const WK=HK;var VK=Object.defineProperty,mm=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,c4=(e,t,n)=>t in e?VK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UK=(e,t)=>{for(var n in t||(t={}))Z6.call(t,n)&&c4(e,n,t[n]);if(mm)for(var n of mm(t))eE.call(t,n)&&c4(e,n,t[n]);return e},GK=(e,t)=>{var n={};for(var r in e)Z6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mm)for(var r of mm(e))t.indexOf(r)<0&&eE.call(e,r)&&(n[r]=e[r]);return n};const qK={variant:"text"},tE=l.forwardRef((e,t)=>{const n=Nr("Text",qK,e),{className:r,size:o,weight:s,transform:i,color:c,align:d,variant:p,lineClamp:h,truncate:m,gradient:g,inline:b,inherit:y,underline:x,strikethrough:C,italic:S,classNames:j,styles:_,unstyled:I,span:P,__staticSelector:M}=n,R=GK(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:A,cx:D}=WK({color:c,lineClamp:h,truncate:m,inline:b,inherit:y,underline:x,strikethrough:C,italic:S,weight:s,transform:i,align:d,gradient:g},{unstyled:I,name:M||"Text",variant:p,size:o});return B.createElement(Go,UK({ref:t,className:D(A.root,{[A.gradient]:p==="gradient"},r),component:P?"span":"div"},R))});tE.displayName="@mantine/core/Text";const yu=tE,Xp={xs:Ge(1),sm:Ge(2),md:Ge(3),lg:Ge(4),xl:Ge(5)};function Yp(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var KK=Co((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:Ge(1),borderTop:`${Xt({size:n,sizes:Xp})} ${r} ${Yp(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Xt({size:n,sizes:Xp})} ${r} ${Yp(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:Ge(Xt({size:n,sizes:Xp})),borderTopColor:Yp(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:Ge(Xt({size:n,sizes:Xp})),borderLeftColor:Yp(e,t),borderLeftStyle:r}}));const QK=KK;var XK=Object.defineProperty,YK=Object.defineProperties,JK=Object.getOwnPropertyDescriptors,gm=Object.getOwnPropertySymbols,nE=Object.prototype.hasOwnProperty,rE=Object.prototype.propertyIsEnumerable,u4=(e,t,n)=>t in e?XK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d4=(e,t)=>{for(var n in t||(t={}))nE.call(t,n)&&u4(e,n,t[n]);if(gm)for(var n of gm(t))rE.call(t,n)&&u4(e,n,t[n]);return e},ZK=(e,t)=>YK(e,JK(t)),eQ=(e,t)=>{var n={};for(var r in e)nE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gm)for(var r of gm(e))t.indexOf(r)<0&&rE.call(e,r)&&(n[r]=e[r]);return n};const tQ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ab=l.forwardRef((e,t)=>{const n=Nr("Divider",tQ,e),{className:r,color:o,orientation:s,size:i,label:c,labelPosition:d,labelProps:p,variant:h,styles:m,classNames:g,unstyled:b}=n,y=eQ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:x,cx:C}=QK({color:o},{classNames:g,styles:m,unstyled:b,name:"Divider",variant:h,size:i}),S=s==="vertical",j=s==="horizontal",_=!!c&&j,I=!(p!=null&&p.color);return B.createElement(Go,d4({ref:t,className:C(x.root,{[x.vertical]:S,[x.horizontal]:j,[x.withLabel]:_},r),role:"separator"},y),_&&B.createElement(yu,ZK(d4({},p),{size:(p==null?void 0:p.size)||"xs",mt:Ge(2),className:C(x.label,x[d],{[x.labelDefaultStyles]:I})}),c))});Ab.displayName="@mantine/core/Divider";var nQ=Object.defineProperty,rQ=Object.defineProperties,oQ=Object.getOwnPropertyDescriptors,f4=Object.getOwnPropertySymbols,sQ=Object.prototype.hasOwnProperty,aQ=Object.prototype.propertyIsEnumerable,p4=(e,t,n)=>t in e?nQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h4=(e,t)=>{for(var n in t||(t={}))sQ.call(t,n)&&p4(e,n,t[n]);if(f4)for(var n of f4(t))aQ.call(t,n)&&p4(e,n,t[n]);return e},iQ=(e,t)=>rQ(e,oQ(t)),lQ=Co((e,t,{size:n})=>({item:iQ(h4({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:Xt({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":h4({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const cQ=lQ;var uQ=Object.defineProperty,m4=Object.getOwnPropertySymbols,dQ=Object.prototype.hasOwnProperty,fQ=Object.prototype.propertyIsEnumerable,g4=(e,t,n)=>t in e?uQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pQ=(e,t)=>{for(var n in t||(t={}))dQ.call(t,n)&&g4(e,n,t[n]);if(m4)for(var n of m4(t))fQ.call(t,n)&&g4(e,n,t[n]);return e};function Ny({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:s,__staticSelector:i,onItemHover:c,onItemSelect:d,itemsRefs:p,itemComponent:h,size:m,nothingFound:g,creatable:b,createLabel:y,unstyled:x,variant:C}){const{classes:S}=cQ(null,{classNames:n,styles:r,unstyled:x,name:i,variant:C,size:m}),j=[],_=[];let I=null;const P=(R,A)=>{const D=typeof o=="function"?o(R.value):!1;return B.createElement(h,pQ({key:R.value,className:S.item,"data-disabled":R.disabled||void 0,"data-hovered":!R.disabled&&t===A||void 0,"data-selected":!R.disabled&&D||void 0,selected:D,onMouseEnter:()=>c(A),id:`${s}-${A}`,role:"option",tabIndex:-1,"aria-selected":t===A,ref:O=>{p&&p.current&&(p.current[R.value]=O)},onMouseDown:R.disabled?null:O=>{O.preventDefault(),d(R)},disabled:R.disabled,variant:C},R))};let M=null;if(e.forEach((R,A)=>{R.creatable?I=A:R.group?(M!==R.group&&(M=R.group,_.push(B.createElement("div",{className:S.separator,key:`__mantine-divider-${A}`},B.createElement(Ab,{classNames:{label:S.separatorLabel},label:R.group})))),_.push(P(R,A))):j.push(P(R,A))}),b){const R=e[I];j.push(B.createElement("div",{key:Dy(),className:S.item,"data-hovered":t===I||void 0,onMouseEnter:()=>c(I),onMouseDown:A=>{A.preventDefault(),d(R)},tabIndex:-1,ref:A=>{p&&p.current&&(p.current[R.value]=A)}},y))}return _.length>0&&j.length>0&&j.unshift(B.createElement("div",{className:S.separator,key:"empty-group-separator"},B.createElement(Ab,null))),_.length>0||j.length>0?B.createElement(B.Fragment,null,_,j):B.createElement(yu,{size:m,unstyled:x,className:S.nothingFound},g)}Ny.displayName="@mantine/core/SelectItems";var hQ=Object.defineProperty,vm=Object.getOwnPropertySymbols,oE=Object.prototype.hasOwnProperty,sE=Object.prototype.propertyIsEnumerable,v4=(e,t,n)=>t in e?hQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mQ=(e,t)=>{for(var n in t||(t={}))oE.call(t,n)&&v4(e,n,t[n]);if(vm)for(var n of vm(t))sE.call(t,n)&&v4(e,n,t[n]);return e},gQ=(e,t)=>{var n={};for(var r in e)oE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vm)for(var r of vm(e))t.indexOf(r)<0&&sE.call(e,r)&&(n[r]=e[r]);return n};const $y=l.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,s=gQ(n,["label","value"]);return B.createElement("div",mQ({ref:t},s),r||o)});$y.displayName="@mantine/core/DefaultItem";function vQ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function aE(...e){return t=>e.forEach(n=>vQ(n,t))}function rc(...e){return l.useCallback(aE(...e),e)}const iE=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),s=o.find(xQ);if(s){const i=s.props.children,c=o.map(d=>d===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:d);return l.createElement(Db,mr({},r,{ref:t}),l.isValidElement(i)?l.cloneElement(i,void 0,c):null)}return l.createElement(Db,mr({},r,{ref:t}),n)});iE.displayName="Slot";const Db=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...yQ(r,n.props),ref:aE(t,n.ref)}):l.Children.count(n)>1?l.Children.only(null):null});Db.displayName="SlotClone";const bQ=({children:e})=>l.createElement(l.Fragment,null,e);function xQ(e){return l.isValidElement(e)&&e.type===bQ}function yQ(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{s(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}const CQ=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Ff=CQ.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:s,...i}=r,c=s?iE:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(c,mr({},i,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Tb=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function wQ(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Bf=e=>{const{present:t,children:n}=e,r=SQ(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=rc(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Bf.displayName="Presence";function SQ(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,d]=wQ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const p=Jp(r.current);s.current=c==="mounted"?p:"none"},[c]),Tb(()=>{const p=r.current,h=o.current;if(h!==e){const g=s.current,b=Jp(p);e?d("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(h&&g!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Tb(()=>{if(t){const p=m=>{const b=Jp(r.current).includes(m.animationName);m.target===t&&b&&rs.flushSync(()=>d("ANIMATION_END"))},h=m=>{m.target===t&&(s.current=Jp(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Jp(e){return(e==null?void 0:e.animationName)||"none"}function kQ(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),d=n.length;n=[...n,i];function p(m){const{scope:g,children:b,...y}=m,x=(g==null?void 0:g[e][d])||c,C=l.useMemo(()=>y,Object.values(y));return l.createElement(x.Provider,{value:C},b)}function h(m,g){const b=(g==null?void 0:g[e][d])||c,y=l.useContext(b);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return p.displayName=s+"Provider",[p,h]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const d=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,jQ(o,...t)]}function jQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((c,{useScope:d,scopeName:p})=>{const m=d(s)[`__scope${p}`];return{...c,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ml(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const _Q=l.createContext(void 0);function IQ(e){const t=l.useContext(_Q);return e||t||"ltr"}function PQ(e,[t,n]){return Math.min(n,Math.max(t,e))}function $l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function EQ(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const lE="ScrollArea",[cE,pbe]=kQ(lE),[MQ,As]=cE(lE),OQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[c,d]=l.useState(null),[p,h]=l.useState(null),[m,g]=l.useState(null),[b,y]=l.useState(null),[x,C]=l.useState(null),[S,j]=l.useState(0),[_,I]=l.useState(0),[P,M]=l.useState(!1),[R,A]=l.useState(!1),D=rc(t,T=>d(T)),O=IQ(o);return l.createElement(MQ,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:c,viewport:p,onViewportChange:h,content:m,onContentChange:g,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:P,onScrollbarXEnabledChange:M,scrollbarY:x,onScrollbarYChange:C,scrollbarYEnabled:R,onScrollbarYEnabledChange:A,onCornerWidthChange:j,onCornerHeightChange:I},l.createElement(Ff.div,mr({dir:O},i,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})))}),RQ="ScrollAreaViewport",AQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,s=As(RQ,n),i=l.useRef(null),c=rc(t,i,s.onViewportChange);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(Ff.div,mr({"data-radix-scroll-area-viewport":""},o,{ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style}}),l.createElement("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),_i="ScrollAreaScrollbar",DQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=As(_i,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return l.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),o.type==="hover"?l.createElement(TQ,mr({},r,{ref:t,forceMount:n})):o.type==="scroll"?l.createElement(NQ,mr({},r,{ref:t,forceMount:n})):o.type==="auto"?l.createElement(uE,mr({},r,{ref:t,forceMount:n})):o.type==="always"?l.createElement(Ly,mr({},r,{ref:t})):null}),TQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=As(_i,e.__scopeScrollArea),[s,i]=l.useState(!1);return l.useEffect(()=>{const c=o.scrollArea;let d=0;if(c){const p=()=>{window.clearTimeout(d),i(!0)},h=()=>{d=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",p),c.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",p),c.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),l.createElement(Bf,{present:n||s},l.createElement(uE,mr({"data-state":s?"visible":"hidden"},r,{ref:t})))}),NQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=As(_i,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Vg(()=>d("SCROLL_END"),100),[c,d]=EQ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return l.useEffect(()=>{if(c==="idle"){const p=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[c,o.scrollHideDelay,d]),l.useEffect(()=>{const p=o.viewport,h=s?"scrollLeft":"scrollTop";if(p){let m=p[h];const g=()=>{const b=p[h];m!==b&&(d("SCROLL"),i()),m=b};return p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[o.viewport,s,d,i]),l.createElement(Bf,{present:n||c!=="hidden"},l.createElement(Ly,mr({"data-state":c==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:$l(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:$l(e.onPointerLeave,()=>d("POINTER_LEAVE"))})))}),uE=l.forwardRef((e,t)=>{const n=As(_i,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=l.useState(!1),c=e.orientation==="horizontal",d=Vg(()=>{if(n.viewport){const p=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=As(_i,e.__scopeScrollArea),s=l.useRef(null),i=l.useRef(0),[c,d]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=hE(c.viewport,c.content),h={...r,sizes:c,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:g=>s.current=g,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:g=>i.current=g};function m(g,b){return VQ(g,i.current,c,b)}return n==="horizontal"?l.createElement($Q,mr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollLeft,b=b4(g,c,o.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=m(g,o.dir))}})):n==="vertical"?l.createElement(LQ,mr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollTop,b=b4(g,c);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=m(g))}})):null}),$Q=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=As(_i,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarXChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(fE,mr({"data-orientation":"horizontal"},o,{ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),gE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:bm(i.paddingLeft),paddingEnd:bm(i.paddingRight)}})}}))}),LQ=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=As(_i,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarYChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(fE,mr({"data-orientation":"vertical"},o,{ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),gE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:bm(i.paddingTop),paddingEnd:bm(i.paddingBottom)}})}}))}),[zQ,dE]=cE(_i),fE=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:h,onResize:m,...g}=e,b=As(_i,n),[y,x]=l.useState(null),C=rc(t,D=>x(D)),S=l.useRef(null),j=l.useRef(""),_=b.viewport,I=r.content-r.viewport,P=Ml(h),M=Ml(d),R=Vg(m,10);function A(D){if(S.current){const O=D.clientX-S.current.left,T=D.clientY-S.current.top;p({x:O,y:T})}}return l.useEffect(()=>{const D=O=>{const T=O.target;(y==null?void 0:y.contains(T))&&P(O,I)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[_,y,I,P]),l.useEffect(M,[r,M]),Cu(y,R),Cu(b.content,R),l.createElement(zQ,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:Ml(s),onThumbPointerUp:Ml(i),onThumbPositionChange:M,onThumbPointerDown:Ml(c)},l.createElement(Ff.div,mr({},g,{ref:C,style:{position:"absolute",...g.style},onPointerDown:$l(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),S.current=y.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",A(D))}),onPointerMove:$l(e.onPointerMove,A),onPointerUp:$l(e.onPointerUp,D=>{const O=D.target;O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=j.current,S.current=null})})))}),Nb="ScrollAreaThumb",FQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=dE(Nb,e.__scopeScrollArea);return l.createElement(Bf,{present:n||o.hasThumb},l.createElement(BQ,mr({ref:t},r)))}),BQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=As(Nb,n),i=dE(Nb,n),{onThumbPositionChange:c}=i,d=rc(t,m=>i.onThumbChange(m)),p=l.useRef(),h=Vg(()=>{p.current&&(p.current(),p.current=void 0)},100);return l.useEffect(()=>{const m=s.viewport;if(m){const g=()=>{if(h(),!p.current){const b=UQ(m,c);p.current=b,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[s.viewport,h,c]),l.createElement(Ff.div,mr({"data-state":i.hasThumb?"visible":"hidden"},o,{ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:$l(e.onPointerDownCapture,m=>{const b=m.target.getBoundingClientRect(),y=m.clientX-b.left,x=m.clientY-b.top;i.onThumbPointerDown({x:y,y:x})}),onPointerUp:$l(e.onPointerUp,i.onThumbPointerUp)}))}),pE="ScrollAreaCorner",HQ=l.forwardRef((e,t)=>{const n=As(pE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.createElement(WQ,mr({},e,{ref:t})):null}),WQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=As(pE,n),[s,i]=l.useState(0),[c,d]=l.useState(0),p=!!(s&&c);return Cu(o.scrollbarX,()=>{var h;const m=((h=o.scrollbarX)===null||h===void 0?void 0:h.offsetHeight)||0;o.onCornerHeightChange(m),d(m)}),Cu(o.scrollbarY,()=>{var h;const m=((h=o.scrollbarY)===null||h===void 0?void 0:h.offsetWidth)||0;o.onCornerWidthChange(m),i(m)}),p?l.createElement(Ff.div,mr({},r,{ref:t,style:{width:s,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function bm(e){return e?parseInt(e,10):0}function hE(e,t){const n=e/t;return isNaN(n)?0:n}function Wg(e){const t=hE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function VQ(e,t,n,r="ltr"){const o=Wg(n),s=o/2,i=t||s,c=o-i,d=n.scrollbar.paddingStart+i,p=n.scrollbar.size-n.scrollbar.paddingEnd-c,h=n.content-n.viewport,m=r==="ltr"?[0,h]:[h*-1,0];return mE([d,p],m)(e)}function b4(e,t,n="ltr"){const r=Wg(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,c=s-r,d=n==="ltr"?[0,i]:[i*-1,0],p=PQ(e,d);return mE([0,i],[0,c])(p)}function mE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function gE(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,c=n.top!==s.top;(i||c)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Vg(e,t){const n=Ml(e),r=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),l.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Cu(e,t){const n=Ml(t);Tb(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const GQ=OQ,qQ=AQ,x4=DQ,y4=FQ,KQ=HQ;var QQ=Co((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?Ge(t):void 0,paddingBottom:n?Ge(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${Ge(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${jk("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:Ge(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:Ge(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:jk("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:Ge(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:Ge(44),minHeight:Ge(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const XQ=QQ;var YQ=Object.defineProperty,JQ=Object.defineProperties,ZQ=Object.getOwnPropertyDescriptors,xm=Object.getOwnPropertySymbols,vE=Object.prototype.hasOwnProperty,bE=Object.prototype.propertyIsEnumerable,C4=(e,t,n)=>t in e?YQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$b=(e,t)=>{for(var n in t||(t={}))vE.call(t,n)&&C4(e,n,t[n]);if(xm)for(var n of xm(t))bE.call(t,n)&&C4(e,n,t[n]);return e},xE=(e,t)=>JQ(e,ZQ(t)),yE=(e,t)=>{var n={};for(var r in e)vE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xm)for(var r of xm(e))t.indexOf(r)<0&&bE.call(e,r)&&(n[r]=e[r]);return n};const CE={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},Ug=l.forwardRef((e,t)=>{const n=Nr("ScrollArea",CE,e),{children:r,className:o,classNames:s,styles:i,scrollbarSize:c,scrollHideDelay:d,type:p,dir:h,offsetScrollbars:m,viewportRef:g,onScrollPositionChange:b,unstyled:y,variant:x,viewportProps:C}=n,S=yE(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[j,_]=l.useState(!1),I=ki(),{classes:P,cx:M}=XQ({scrollbarSize:c,offsetScrollbars:m,scrollbarHovered:j,hidden:p==="never"},{name:"ScrollArea",classNames:s,styles:i,unstyled:y,variant:x});return B.createElement(GQ,{type:p==="never"?"always":p,scrollHideDelay:d,dir:h||I.dir,ref:t,asChild:!0},B.createElement(Go,$b({className:M(P.root,o)},S),B.createElement(qQ,xE($b({},C),{className:P.viewport,ref:g,onScroll:typeof b=="function"?({currentTarget:R})=>b({x:R.scrollLeft,y:R.scrollTop}):void 0}),r),B.createElement(x4,{orientation:"horizontal",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},B.createElement(y4,{className:P.thumb})),B.createElement(x4,{orientation:"vertical",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},B.createElement(y4,{className:P.thumb})),B.createElement(KQ,{className:P.corner})))}),wE=l.forwardRef((e,t)=>{const n=Nr("ScrollAreaAutosize",CE,e),{children:r,classNames:o,styles:s,scrollbarSize:i,scrollHideDelay:c,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,sx:y,variant:x,viewportProps:C}=n,S=yE(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return B.createElement(Go,xE($b({},S),{ref:t,sx:[{display:"flex"},...c6(y)]}),B.createElement(Go,{sx:{display:"flex",flexDirection:"column",flex:1}},B.createElement(Ug,{classNames:o,styles:s,scrollHideDelay:c,scrollbarSize:i,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,variant:x,viewportProps:C},r)))});wE.displayName="@mantine/core/ScrollAreaAutosize";Ug.displayName="@mantine/core/ScrollArea";Ug.Autosize=wE;const SE=Ug;var eX=Object.defineProperty,tX=Object.defineProperties,nX=Object.getOwnPropertyDescriptors,ym=Object.getOwnPropertySymbols,kE=Object.prototype.hasOwnProperty,jE=Object.prototype.propertyIsEnumerable,w4=(e,t,n)=>t in e?eX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S4=(e,t)=>{for(var n in t||(t={}))kE.call(t,n)&&w4(e,n,t[n]);if(ym)for(var n of ym(t))jE.call(t,n)&&w4(e,n,t[n]);return e},rX=(e,t)=>tX(e,nX(t)),oX=(e,t)=>{var n={};for(var r in e)kE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ym)for(var r of ym(e))t.indexOf(r)<0&&jE.call(e,r)&&(n[r]=e[r]);return n};const Gg=l.forwardRef((e,t)=>{var n=e,{style:r}=n,o=oX(n,["style"]);return B.createElement(SE,rX(S4({},o),{style:S4({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});Gg.displayName="@mantine/core/SelectScrollArea";var sX=Co(()=>({dropdown:{},itemsWrapper:{padding:Ge(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const aX=sX;function Fu(e){return e.split("-")[1]}function zy(e){return e==="y"?"height":"width"}function Zs(e){return e.split("-")[0]}function dl(e){return["top","bottom"].includes(Zs(e))?"x":"y"}function k4(e,t,n){let{reference:r,floating:o}=e;const s=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,c=dl(t),d=zy(c),p=r[d]/2-o[d]/2,h=c==="x";let m;switch(Zs(t)){case"top":m={x:s,y:r.y-o.height};break;case"bottom":m={x:s,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:i};break;case"left":m={x:r.x-o.width,y:i};break;default:m={x:r.x,y:r.y}}switch(Fu(t)){case"start":m[c]-=p*(n&&h?-1:1);break;case"end":m[c]+=p*(n&&h?-1:1)}return m}const iX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let p=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:m}=k4(p,r,d),g=r,b={},y=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c}=t,{element:d,padding:p=0}=hi(e,t)||{};if(d==null)return{};const h=Fy(p),m={x:n,y:r},g=dl(o),b=zy(g),y=await i.getDimensions(d),x=g==="y",C=x?"top":"left",S=x?"bottom":"right",j=x?"clientHeight":"clientWidth",_=s.reference[b]+s.reference[g]-m[g]-s.floating[b],I=m[g]-s.reference[g],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let M=P?P[j]:0;M&&await(i.isElement==null?void 0:i.isElement(P))||(M=c.floating[j]||s.floating[b]);const R=_/2-I/2,A=M/2-y[b]/2-1,D=rl(h[C],A),O=rl(h[S],A),T=D,Y=M-y[b]-O,z=M/2-y[b]/2+R,W=Lb(T,z,Y),Q=Fu(o)!=null&&z!=W&&s.reference[b]/2-(ze.concat(t,t+"-start",t+"-end"),[]);const cX={left:"right",right:"left",bottom:"top",top:"bottom"};function Cm(e){return e.replace(/left|right|bottom|top/g,t=>cX[t])}function uX(e,t,n){n===void 0&&(n=!1);const r=Fu(e),o=dl(e),s=zy(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Cm(i)),{main:i,cross:Cm(i)}}const dX={start:"end",end:"start"};function s1(e){return e.replace(/start|end/g,t=>dX[t])}const fX=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:s,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:y=!0,...x}=hi(e,t),C=Zs(r),S=Zs(i)===i,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=m||(S||!y?[Cm(i)]:function(T){const Y=Cm(T);return[s1(T),Y,s1(Y)]}(i));m||b==="none"||_.push(...function(T,Y,z,W){const Q=Fu(T);let U=function(L,ee,K){const Z=["left","right"],se=["right","left"],fe=["top","bottom"],G=["bottom","top"];switch(L){case"top":case"bottom":return K?ee?se:Z:ee?Z:se;case"left":case"right":return ee?fe:G;default:return[]}}(Zs(T),z==="start",W);return Q&&(U=U.map(L=>L+"-"+Q),Y&&(U=U.concat(U.map(s1)))),U}(i,y,b,j));const I=[i,..._],P=await By(t,x),M=[];let R=((n=o.flip)==null?void 0:n.overflows)||[];if(p&&M.push(P[C]),h){const{main:T,cross:Y}=uX(r,s,j);M.push(P[T],P[Y])}if(R=[...R,{placement:r,overflows:M}],!M.every(T=>T<=0)){var A,D;const T=(((A=o.flip)==null?void 0:A.index)||0)+1,Y=I[T];if(Y)return{data:{index:T,overflows:R},reset:{placement:Y}};let z=(D=R.filter(W=>W.overflows[0]<=0).sort((W,Q)=>W.overflows[1]-Q.overflows[1])[0])==null?void 0:D.placement;if(!z)switch(g){case"bestFit":{var O;const W=(O=R.map(Q=>[Q.placement,Q.overflows.filter(U=>U>0).reduce((U,L)=>U+L,0)]).sort((Q,U)=>Q[1]-U[1])[0])==null?void 0:O[0];W&&(z=W);break}case"initialPlacement":z=i}if(r!==z)return{reset:{placement:z}}}return{}}}};function _4(e){const t=rl(...e.map(r=>r.left)),n=rl(...e.map(r=>r.top));return{x:t,y:n,width:xa(...e.map(r=>r.right))-t,height:xa(...e.map(r=>r.bottom))-n}}const pX=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:s,strategy:i}=t,{padding:c=2,x:d,y:p}=hi(e,t),h=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),m=function(x){const C=x.slice().sort((_,I)=>_.y-I.y),S=[];let j=null;for(let _=0;_j.height/2?S.push([I]):S[S.length-1].push(I),j=I}return S.map(_=>wu(_4(_)))}(h),g=wu(_4(h)),b=Fy(c),y=await s.getElementRects({reference:{getBoundingClientRect:function(){if(m.length===2&&m[0].left>m[1].right&&d!=null&&p!=null)return m.find(x=>d>x.left-b.left&&dx.top-b.top&&p=2){if(dl(n)==="x"){const P=m[0],M=m[m.length-1],R=Zs(n)==="top",A=P.top,D=M.bottom,O=R?P.left:M.left,T=R?P.right:M.right;return{top:A,bottom:D,left:O,right:T,width:T-O,height:D-A,x:O,y:A}}const x=Zs(n)==="left",C=xa(...m.map(P=>P.right)),S=rl(...m.map(P=>P.left)),j=m.filter(P=>x?P.left===S:P.right===C),_=j[0].top,I=j[j.length-1].bottom;return{top:_,bottom:I,left:S,right:C,width:C-S,height:I-_,x:S,y:_}}return g}},floating:r.floating,strategy:i});return o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},hX=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(s,i){const{placement:c,platform:d,elements:p}=s,h=await(d.isRTL==null?void 0:d.isRTL(p.floating)),m=Zs(c),g=Fu(c),b=dl(c)==="x",y=["left","top"].includes(m)?-1:1,x=h&&b?-1:1,C=hi(i,s);let{mainAxis:S,crossAxis:j,alignmentAxis:_}=typeof C=="number"?{mainAxis:C,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...C};return g&&typeof _=="number"&&(j=g==="end"?-1*_:_),b?{x:j*x,y:S*y}:{x:S*y,y:j*x}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function _E(e){return e==="x"?"y":"x"}const mX=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:C=>{let{x:S,y:j}=C;return{x:S,y:j}}},...d}=hi(e,t),p={x:n,y:r},h=await By(t,d),m=dl(Zs(o)),g=_E(m);let b=p[m],y=p[g];if(s){const C=m==="y"?"bottom":"right";b=Lb(b+h[m==="y"?"top":"left"],b,b-h[C])}if(i){const C=g==="y"?"bottom":"right";y=Lb(y+h[g==="y"?"top":"left"],y,y-h[C])}const x=c.fn({...t,[m]:b,[g]:y});return{...x,data:{x:x.x-n,y:x.y-r}}}}},gX=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:d=!0,crossAxis:p=!0}=hi(e,t),h={x:n,y:r},m=dl(o),g=_E(m);let b=h[m],y=h[g];const x=hi(c,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const _=m==="y"?"height":"width",I=s.reference[m]-s.floating[_]+C.mainAxis,P=s.reference[m]+s.reference[_]-C.mainAxis;bP&&(b=P)}if(p){var S,j;const _=m==="y"?"width":"height",I=["top","left"].includes(Zs(o)),P=s.reference[g]-s.floating[_]+(I&&((S=i.offset)==null?void 0:S[g])||0)+(I?0:C.crossAxis),M=s.reference[g]+s.reference[_]+(I?0:((j=i.offset)==null?void 0:j[g])||0)-(I?C.crossAxis:0);yM&&(y=M)}return{[m]:b,[g]:y}}}},vX=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...c}=hi(e,t),d=await By(t,c),p=Zs(n),h=Fu(n),m=dl(n)==="x",{width:g,height:b}=r.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=p,y=h==="end"?"top":"bottom");const C=b-d[y],S=g-d[x],j=!t.middlewareData.shift;let _=C,I=S;if(m){const M=g-d.left-d.right;I=h||j?rl(S,M):M}else{const M=b-d.top-d.bottom;_=h||j?rl(C,M):M}if(j&&!h){const M=xa(d.left,0),R=xa(d.right,0),A=xa(d.top,0),D=xa(d.bottom,0);m?I=g-2*(M!==0||R!==0?M+R:xa(d.left,d.right)):_=b-2*(A!==0||D!==0?A+D:xa(d.top,d.bottom))}await i({...t,availableWidth:I,availableHeight:_});const P=await o.getDimensions(s.floating);return g!==P.width||b!==P.height?{reset:{rects:!0}}:{}}}};function ss(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ra(e){return ss(e).getComputedStyle(e)}function IE(e){return e instanceof ss(e).Node}function ol(e){return IE(e)?(e.nodeName||"").toLowerCase():"#document"}function ra(e){return e instanceof HTMLElement||e instanceof ss(e).HTMLElement}function I4(e){return typeof ShadowRoot<"u"&&(e instanceof ss(e).ShadowRoot||e instanceof ShadowRoot)}function ef(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ra(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bX(e){return["table","td","th"].includes(ol(e))}function zb(e){const t=Hy(),n=Ra(e);return n.transform!=="none"||n.perspective!=="none"||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Hy(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qg(e){return["html","body","#document"].includes(ol(e))}const Fb=Math.min,iu=Math.max,wm=Math.round,Zp=Math.floor,sl=e=>({x:e,y:e});function PE(e){const t=Ra(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ra(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=wm(n)!==s||wm(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function ai(e){return e instanceof Element||e instanceof ss(e).Element}function Wy(e){return ai(e)?e:e.contextElement}function lu(e){const t=Wy(e);if(!ra(t))return sl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=PE(t);let i=(s?wm(n.width):n.width)/r,c=(s?wm(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),c&&Number.isFinite(c)||(c=1),{x:i,y:c}}const xX=sl(0);function EE(e){const t=ss(e);return Hy()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:xX}function Kl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Wy(e);let i=sl(1);t&&(r?ai(r)&&(i=lu(r)):i=lu(e));const c=function(g,b,y){return b===void 0&&(b=!1),!(!y||b&&y!==ss(g))&&b}(s,n,r)?EE(s):sl(0);let d=(o.left+c.x)/i.x,p=(o.top+c.y)/i.y,h=o.width/i.x,m=o.height/i.y;if(s){const g=ss(s),b=r&&ai(r)?ss(r):r;let y=g.frameElement;for(;y&&r&&b!==g;){const x=lu(y),C=y.getBoundingClientRect(),S=getComputedStyle(y),j=C.left+(y.clientLeft+parseFloat(S.paddingLeft))*x.x,_=C.top+(y.clientTop+parseFloat(S.paddingTop))*x.y;d*=x.x,p*=x.y,h*=x.x,m*=x.y,d+=j,p+=_,y=ss(y).frameElement}}return wu({width:h,height:m,x:d,y:p})}function Kg(e){return ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ii(e){var t;return(t=(IE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ME(e){return Kl(ii(e)).left+Kg(e).scrollLeft}function Su(e){if(ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||I4(e)&&e.host||ii(e);return I4(t)?t.host:t}function OE(e){const t=Su(e);return qg(t)?e.ownerDocument?e.ownerDocument.body:e.body:ra(t)&&ef(t)?t:OE(t)}function Sm(e,t){var n;t===void 0&&(t=[]);const r=OE(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=ss(r);return o?t.concat(s,s.visualViewport||[],ef(r)?r:[]):t.concat(r,Sm(r))}function P4(e,t,n){let r;if(t==="viewport")r=function(o,s){const i=ss(o),c=ii(o),d=i.visualViewport;let p=c.clientWidth,h=c.clientHeight,m=0,g=0;if(d){p=d.width,h=d.height;const b=Hy();(!b||b&&s==="fixed")&&(m=d.offsetLeft,g=d.offsetTop)}return{width:p,height:h,x:m,y:g}}(e,n);else if(t==="document")r=function(o){const s=ii(o),i=Kg(o),c=o.ownerDocument.body,d=iu(s.scrollWidth,s.clientWidth,c.scrollWidth,c.clientWidth),p=iu(s.scrollHeight,s.clientHeight,c.scrollHeight,c.clientHeight);let h=-i.scrollLeft+ME(o);const m=-i.scrollTop;return Ra(c).direction==="rtl"&&(h+=iu(s.clientWidth,c.clientWidth)-d),{width:d,height:p,x:h,y:m}}(ii(e));else if(ai(t))r=function(o,s){const i=Kl(o,!0,s==="fixed"),c=i.top+o.clientTop,d=i.left+o.clientLeft,p=ra(o)?lu(o):sl(1);return{width:o.clientWidth*p.x,height:o.clientHeight*p.y,x:d*p.x,y:c*p.y}}(t,n);else{const o=EE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wu(r)}function RE(e,t){const n=Su(e);return!(n===t||!ai(n)||qg(n))&&(Ra(n).position==="fixed"||RE(n,t))}function yX(e,t,n){const r=ra(t),o=ii(t),s=n==="fixed",i=Kl(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=sl(0);if(r||!r&&!s)if((ol(t)!=="body"||ef(o))&&(c=Kg(t)),ra(t)){const p=Kl(t,!0,s,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&(d.x=ME(o));return{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function E4(e,t){return ra(e)&&Ra(e).position!=="fixed"?t?t(e):e.offsetParent:null}function M4(e,t){const n=ss(e);if(!ra(e))return n;let r=E4(e,t);for(;r&&bX(r)&&Ra(r).position==="static";)r=E4(r,t);return r&&(ol(r)==="html"||ol(r)==="body"&&Ra(r).position==="static"&&!zb(r))?n:r||function(o){let s=Su(o);for(;ra(s)&&!qg(s);){if(zb(s))return s;s=Su(s)}return null}(e)||n}const CX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=ra(n),s=ii(n);if(n===s)return t;let i={scrollLeft:0,scrollTop:0},c=sl(1);const d=sl(0);if((o||!o&&r!=="fixed")&&((ol(n)!=="body"||ef(s))&&(i=Kg(n)),ra(n))){const p=Kl(n);c=lu(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-i.scrollLeft*c.x+d.x,y:t.y*c.y-i.scrollTop*c.y+d.y}},getDocumentElement:ii,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?function(d,p){const h=p.get(d);if(h)return h;let m=Sm(d).filter(x=>ai(x)&&ol(x)!=="body"),g=null;const b=Ra(d).position==="fixed";let y=b?Su(d):d;for(;ai(y)&&!qg(y);){const x=Ra(y),C=zb(y);C||x.position!=="fixed"||(g=null),(b?!C&&!g:!C&&x.position==="static"&&g&&["absolute","fixed"].includes(g.position)||ef(y)&&!C&&RE(d,y))?m=m.filter(S=>S!==y):g=x,y=Su(y)}return p.set(d,m),m}(t,this._c):[].concat(n),r],i=s[0],c=s.reduce((d,p)=>{const h=P4(t,p,o);return d.top=iu(h.top,d.top),d.right=Fb(h.right,d.right),d.bottom=Fb(h.bottom,d.bottom),d.left=iu(h.left,d.left),d},P4(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:M4,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||M4,s=this.getDimensions;return{reference:yX(t,await o(n),r),floating:{x:0,y:0,...await s(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return PE(e)},getScale:lu,isElement:ai,isRTL:function(e){return getComputedStyle(e).direction==="rtl"}};function wX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,p=Wy(e),h=o||s?[...p?Sm(p):[],...Sm(t)]:[];h.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const m=p&&c?function(C,S){let j,_=null;const I=ii(C);function P(){clearTimeout(j),_&&_.disconnect(),_=null}return function M(R,A){R===void 0&&(R=!1),A===void 0&&(A=1),P();const{left:D,top:O,width:T,height:Y}=C.getBoundingClientRect();if(R||S(),!T||!Y)return;const z={rootMargin:-Zp(O)+"px "+-Zp(I.clientWidth-(D+T))+"px "+-Zp(I.clientHeight-(O+Y))+"px "+-Zp(D)+"px",threshold:iu(0,Fb(1,A))||1};let W=!0;function Q(U){const L=U[0].intersectionRatio;if(L!==A){if(!W)return M();L?M(!1,L):j=setTimeout(()=>{M(!1,1e-7)},100)}W=!1}try{_=new IntersectionObserver(Q,{...z,root:I.ownerDocument})}catch{_=new IntersectionObserver(Q,z)}_.observe(C)}(!0),P}(p,n):null;let g,b=-1,y=null;i&&(y=new ResizeObserver(C=>{let[S]=C;S&&S.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{y&&y.observe(t)})),n()}),p&&!d&&y.observe(p),y.observe(t));let x=d?Kl(e):null;return d&&function C(){const S=Kl(e);!x||S.x===x.x&&S.y===x.y&&S.width===x.width&&S.height===x.height||n(),x=S,g=requestAnimationFrame(C)}(),n(),()=>{h.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m&&m(),y&&y.disconnect(),y=null,d&&cancelAnimationFrame(g)}}const SX=(e,t,n)=>{const r=new Map,o={platform:CX,...n},s={...o.platform,_c:r};return iX(e,t,{...o,platform:s})},kX=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?j4({element:t.current,padding:n}).fn(o):{}:t?j4({element:t,padding:n}).fn(o):{}}}};var Rh=typeof document<"u"?l.useLayoutEffect:l.useEffect;function km(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!km(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!km(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function O4(e){const t=l.useRef(e);return Rh(()=>{t.current=e}),t}function jX(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:s,open:i}=e,[c,d]=l.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);km(p,r)||h(r);const m=l.useRef(null),g=l.useRef(null),b=l.useRef(c),y=O4(s),x=O4(o),[C,S]=l.useState(null),[j,_]=l.useState(null),I=l.useCallback(O=>{m.current!==O&&(m.current=O,S(O))},[]),P=l.useCallback(O=>{g.current!==O&&(g.current=O,_(O))},[]),M=l.useCallback(()=>{if(!m.current||!g.current)return;const O={placement:t,strategy:n,middleware:p};x.current&&(O.platform=x.current),SX(m.current,g.current,O).then(T=>{const Y={...T,isPositioned:!0};R.current&&!km(b.current,Y)&&(b.current=Y,rs.flushSync(()=>{d(Y)}))})},[p,t,n,x]);Rh(()=>{i===!1&&b.current.isPositioned&&(b.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[i]);const R=l.useRef(!1);Rh(()=>(R.current=!0,()=>{R.current=!1}),[]),Rh(()=>{if(C&&j){if(y.current)return y.current(C,j,M);M()}},[C,j,M,y]);const A=l.useMemo(()=>({reference:m,floating:g,setReference:I,setFloating:P}),[I,P]),D=l.useMemo(()=>({reference:C,floating:j}),[C,j]);return l.useMemo(()=>({...c,update:M,refs:A,elements:D,reference:I,floating:P}),[c,M,A,D,I,P])}var _X=typeof document<"u"?l.useLayoutEffect:l.useEffect;function IX(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const PX=l.createContext(null),EX=()=>l.useContext(PX);function MX(e){return(e==null?void 0:e.ownerDocument)||document}function OX(e){return MX(e).defaultView||window}function eh(e){return e?e instanceof OX(e).Element:!1}const RX=yx["useInsertionEffect".toString()],AX=RX||(e=>e());function DX(e){const t=l.useRef(()=>{});return AX(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;oIX())[0],[p,h]=l.useState(null),m=l.useCallback(S=>{const j=eh(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;o.refs.setReference(j)},[o.refs]),g=l.useCallback(S=>{(eh(S)||S===null)&&(i.current=S,h(S)),(eh(o.refs.reference.current)||o.refs.reference.current===null||S!==null&&!eh(S))&&o.refs.setReference(S)},[o.refs]),b=l.useMemo(()=>({...o.refs,setReference:g,setPositionReference:m,domReference:i}),[o.refs,g,m]),y=l.useMemo(()=>({...o.elements,domReference:p}),[o.elements,p]),x=DX(n),C=l.useMemo(()=>({...o,refs:b,elements:y,dataRef:c,nodeId:r,events:d,open:t,onOpenChange:x}),[o,r,d,t,x,b,y]);return _X(()=>{const S=s==null?void 0:s.nodesRef.current.find(j=>j.id===r);S&&(S.context=C)}),l.useMemo(()=>({...o,context:C,refs:b,reference:g,positionReference:m}),[o,b,C,g,m])}function NX({opened:e,floating:t,position:n,positionDependencies:r}){const[o,s]=l.useState(0);l.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return wX(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),Js(()=>{t.update()},r),Js(()=>{s(i=>i+1)},[e])}function $X(e){const t=[hX(e.offset)];return e.middlewares.shift&&t.push(mX({limiter:gX()})),e.middlewares.flip&&t.push(fX()),e.middlewares.inline&&t.push(pX()),t.push(kX({element:e.arrowRef,padding:e.arrowOffset})),t}function LX(e){const[t,n]=Zd({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var i;(i=e.onClose)==null||i.call(e),n(!1)},o=()=>{var i,c;t?((i=e.onClose)==null||i.call(e),n(!1)):((c=e.onOpen)==null||c.call(e),n(!0))},s=TX({placement:e.position,middleware:[...$X(e),...e.width==="target"?[vX({apply({rects:i}){var c,d;Object.assign((d=(c=s.refs.floating.current)==null?void 0:c.style)!=null?d:{},{width:`${i.reference.width}px`})}})]:[]]});return NX({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:s}),Js(()=>{var i;(i=e.onPositionChange)==null||i.call(e,s.placement)},[s.placement]),Js(()=>{var i,c;e.opened?(c=e.onOpen)==null||c.call(e):(i=e.onClose)==null||i.call(e)},[e.opened]),{floating:s,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const AE={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[zX,DE]=_G(AE.context);var FX=Object.defineProperty,BX=Object.defineProperties,HX=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,TE=Object.prototype.hasOwnProperty,NE=Object.prototype.propertyIsEnumerable,R4=(e,t,n)=>t in e?FX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,th=(e,t)=>{for(var n in t||(t={}))TE.call(t,n)&&R4(e,n,t[n]);if(jm)for(var n of jm(t))NE.call(t,n)&&R4(e,n,t[n]);return e},WX=(e,t)=>BX(e,HX(t)),VX=(e,t)=>{var n={};for(var r in e)TE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jm)for(var r of jm(e))t.indexOf(r)<0&&NE.call(e,r)&&(n[r]=e[r]);return n};const UX={refProp:"ref",popupType:"dialog"},$E=l.forwardRef((e,t)=>{const n=Nr("PopoverTarget",UX,e),{children:r,refProp:o,popupType:s}=n,i=VX(n,["children","refProp","popupType"]);if(!d6(r))throw new Error(AE.children);const c=i,d=DE(),p=zf(d.reference,r.ref,t),h=d.withRoles?{"aria-haspopup":s,"aria-expanded":d.opened,"aria-controls":d.getDropdownId(),id:d.getTargetId()}:{};return l.cloneElement(r,th(WX(th(th(th({},c),h),d.targetProps),{className:p6(d.targetProps.className,c.className,r.props.className),[o]:p}),d.controlled?null:{onClick:d.onToggle}))});$E.displayName="@mantine/core/PopoverTarget";var GX=Co((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${Ge(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${Ge(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const qX=GX;var KX=Object.defineProperty,A4=Object.getOwnPropertySymbols,QX=Object.prototype.hasOwnProperty,XX=Object.prototype.propertyIsEnumerable,D4=(e,t,n)=>t in e?KX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mc=(e,t)=>{for(var n in t||(t={}))QX.call(t,n)&&D4(e,n,t[n]);if(A4)for(var n of A4(t))XX.call(t,n)&&D4(e,n,t[n]);return e};const T4={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function YX({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in qp?Mc(Mc(Mc({transitionProperty:qp[e].transitionProperty},o),qp[e].common),qp[e][T4[t]]):null:Mc(Mc(Mc({transitionProperty:e.transitionProperty},o),e.common),e[T4[t]])}function JX({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:s,onEntered:i,onExited:c}){const d=ki(),p=y6(),h=d.respectReducedMotion?p:!1,[m,g]=l.useState(h?0:e),[b,y]=l.useState(r?"entered":"exited"),x=l.useRef(-1),C=S=>{const j=S?o:s,_=S?i:c;y(S?"pre-entering":"pre-exiting"),window.clearTimeout(x.current);const I=h?0:S?e:t;if(g(I),I===0)typeof j=="function"&&j(),typeof _=="function"&&_(),y(S?"entered":"exited");else{const P=window.setTimeout(()=>{typeof j=="function"&&j(),y(S?"entering":"exiting")},10);x.current=window.setTimeout(()=>{window.clearTimeout(P),typeof _=="function"&&_(),y(S?"entered":"exited")},I)}};return Js(()=>{C(r)},[r]),l.useEffect(()=>()=>window.clearTimeout(x.current),[]),{transitionDuration:m,transitionStatus:b,transitionTimingFunction:n||d.transitionTimingFunction}}function LE({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:s,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h}){const{transitionDuration:m,transitionStatus:g,transitionTimingFunction:b}=JX({mounted:o,exitDuration:r,duration:n,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h});return m===0?o?B.createElement(B.Fragment,null,s({})):e?s({display:"none"}):null:g==="exited"?e?s({display:"none"}):null:B.createElement(B.Fragment,null,s(YX({transition:t,duration:m,state:g,timingFunction:b})))}LE.displayName="@mantine/core/Transition";function zE({children:e,active:t=!0,refProp:n="ref"}){const r=aq(t),o=zf(r,e==null?void 0:e.ref);return d6(e)?l.cloneElement(e,{[n]:o}):e}zE.displayName="@mantine/core/FocusTrap";var ZX=Object.defineProperty,eY=Object.defineProperties,tY=Object.getOwnPropertyDescriptors,N4=Object.getOwnPropertySymbols,nY=Object.prototype.hasOwnProperty,rY=Object.prototype.propertyIsEnumerable,$4=(e,t,n)=>t in e?ZX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Li=(e,t)=>{for(var n in t||(t={}))nY.call(t,n)&&$4(e,n,t[n]);if(N4)for(var n of N4(t))rY.call(t,n)&&$4(e,n,t[n]);return e},nh=(e,t)=>eY(e,tY(t));function L4(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function z4(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const oY={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function sY({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:s,arrowY:i,dir:c}){const[d,p="center"]=e.split("-"),h={width:Ge(t),height:Ge(t),transform:"rotate(45deg)",position:"absolute",[oY[d]]:Ge(r)},m=Ge(-t/2);return d==="left"?nh(Li(Li({},h),L4(p,i,n,o)),{right:m,borderLeftColor:"transparent",borderBottomColor:"transparent"}):d==="right"?nh(Li(Li({},h),L4(p,i,n,o)),{left:m,borderRightColor:"transparent",borderTopColor:"transparent"}):d==="top"?nh(Li(Li({},h),z4(p,s,n,o,c)),{bottom:m,borderTopColor:"transparent",borderLeftColor:"transparent"}):d==="bottom"?nh(Li(Li({},h),z4(p,s,n,o,c)),{top:m,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var aY=Object.defineProperty,iY=Object.defineProperties,lY=Object.getOwnPropertyDescriptors,_m=Object.getOwnPropertySymbols,FE=Object.prototype.hasOwnProperty,BE=Object.prototype.propertyIsEnumerable,F4=(e,t,n)=>t in e?aY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cY=(e,t)=>{for(var n in t||(t={}))FE.call(t,n)&&F4(e,n,t[n]);if(_m)for(var n of _m(t))BE.call(t,n)&&F4(e,n,t[n]);return e},uY=(e,t)=>iY(e,lY(t)),dY=(e,t)=>{var n={};for(var r in e)FE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_m)for(var r of _m(e))t.indexOf(r)<0&&BE.call(e,r)&&(n[r]=e[r]);return n};const HE=l.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,visible:d,arrowX:p,arrowY:h}=n,m=dY(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=ki();return d?B.createElement("div",uY(cY({},m),{ref:t,style:sY({position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,dir:g.dir,arrowX:p,arrowY:h})})):null});HE.displayName="@mantine/core/FloatingArrow";var fY=Object.defineProperty,pY=Object.defineProperties,hY=Object.getOwnPropertyDescriptors,Im=Object.getOwnPropertySymbols,WE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,B4=(e,t,n)=>t in e?fY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oc=(e,t)=>{for(var n in t||(t={}))WE.call(t,n)&&B4(e,n,t[n]);if(Im)for(var n of Im(t))VE.call(t,n)&&B4(e,n,t[n]);return e},rh=(e,t)=>pY(e,hY(t)),mY=(e,t)=>{var n={};for(var r in e)WE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Im)for(var r of Im(e))t.indexOf(r)<0&&VE.call(e,r)&&(n[r]=e[r]);return n};const gY={};function UE(e){var t;const n=Nr("PopoverDropdown",gY,e),{style:r,className:o,children:s,onKeyDownCapture:i}=n,c=mY(n,["style","className","children","onKeyDownCapture"]),d=DE(),{classes:p,cx:h}=qX({radius:d.radius,shadow:d.shadow},{name:d.__staticSelector,classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),m=ZG({opened:d.opened,shouldReturnFocus:d.returnFocus}),g=d.withRoles?{"aria-labelledby":d.getTargetId(),id:d.getDropdownId(),role:"dialog"}:{};return d.disabled?null:B.createElement(U6,rh(Oc({},d.portalProps),{withinPortal:d.withinPortal}),B.createElement(LE,rh(Oc({mounted:d.opened},d.transitionProps),{transition:d.transitionProps.transition||"fade",duration:(t=d.transitionProps.duration)!=null?t:150,keepMounted:d.keepMounted,exitDuration:typeof d.transitionProps.exitDuration=="number"?d.transitionProps.exitDuration:d.transitionProps.duration}),b=>{var y,x;return B.createElement(zE,{active:d.trapFocus},B.createElement(Go,Oc(rh(Oc({},g),{tabIndex:-1,ref:d.floating,style:rh(Oc(Oc({},r),b),{zIndex:d.zIndex,top:(y=d.y)!=null?y:0,left:(x=d.x)!=null?x:0,width:d.width==="target"?void 0:Ge(d.width)}),className:h(p.dropdown,o),onKeyDownCapture:PG(d.onClose,{active:d.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":d.placement}),c),s,B.createElement(HE,{ref:d.arrowRef,arrowX:d.arrowX,arrowY:d.arrowY,visible:d.withArrow,position:d.placement,arrowSize:d.arrowSize,arrowRadius:d.arrowRadius,arrowOffset:d.arrowOffset,arrowPosition:d.arrowPosition,className:p.arrow})))}))}UE.displayName="@mantine/core/PopoverDropdown";function vY(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var H4=Object.getOwnPropertySymbols,bY=Object.prototype.hasOwnProperty,xY=Object.prototype.propertyIsEnumerable,yY=(e,t)=>{var n={};for(var r in e)bY.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&H4)for(var r of H4(e))t.indexOf(r)<0&&xY.call(e,r)&&(n[r]=e[r]);return n};const CY={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ay("popover"),__staticSelector:"Popover",width:"max-content"};function Bu(e){var t,n,r,o,s,i;const c=l.useRef(null),d=Nr("Popover",CY,e),{children:p,position:h,offset:m,onPositionChange:g,positionDependencies:b,opened:y,transitionProps:x,width:C,middlewares:S,withArrow:j,arrowSize:_,arrowOffset:I,arrowRadius:P,arrowPosition:M,unstyled:R,classNames:A,styles:D,closeOnClickOutside:O,withinPortal:T,portalProps:Y,closeOnEscape:z,clickOutsideEvents:W,trapFocus:Q,onClose:U,onOpen:L,onChange:ee,zIndex:K,radius:Z,shadow:se,id:fe,defaultOpened:G,__staticSelector:te,withRoles:V,disabled:F,returnFocus:X,variant:ue,keepMounted:q}=d,ne=yY(d,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[pe,le]=l.useState(null),[we,ve]=l.useState(null),he=Ty(fe),Ne=ki(),De=LX({middlewares:S,width:C,position:vY(Ne.dir,h),offset:typeof m=="number"?m+(j?_/2:0):m,arrowRef:c,arrowOffset:I,onPositionChange:g,positionDependencies:b,opened:y,defaultOpened:G,onChange:ee,onOpen:L,onClose:U});QG(()=>De.opened&&O&&De.onClose(),W,[pe,we]);const qe=l.useCallback(ot=>{le(ot),De.floating.reference(ot)},[De.floating.reference]),Mt=l.useCallback(ot=>{ve(ot),De.floating.floating(ot)},[De.floating.floating]);return B.createElement(zX,{value:{returnFocus:X,disabled:F,controlled:De.controlled,reference:qe,floating:Mt,x:De.floating.x,y:De.floating.y,arrowX:(r=(n=(t=De.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(i=(s=(o=De.floating)==null?void 0:o.middlewareData)==null?void 0:s.arrow)==null?void 0:i.y,opened:De.opened,arrowRef:c,transitionProps:x,width:C,withArrow:j,arrowSize:_,arrowOffset:I,arrowRadius:P,arrowPosition:M,placement:De.floating.placement,trapFocus:Q,withinPortal:T,portalProps:Y,zIndex:K,radius:Z,shadow:se,closeOnEscape:z,onClose:De.onClose,onToggle:De.onToggle,getTargetId:()=>`${he}-target`,getDropdownId:()=>`${he}-dropdown`,withRoles:V,targetProps:ne,__staticSelector:te,classNames:A,styles:D,unstyled:R,variant:ue,keepMounted:q}},p)}Bu.Target=$E;Bu.Dropdown=UE;Bu.displayName="@mantine/core/Popover";var wY=Object.defineProperty,Pm=Object.getOwnPropertySymbols,GE=Object.prototype.hasOwnProperty,qE=Object.prototype.propertyIsEnumerable,W4=(e,t,n)=>t in e?wY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SY=(e,t)=>{for(var n in t||(t={}))GE.call(t,n)&&W4(e,n,t[n]);if(Pm)for(var n of Pm(t))qE.call(t,n)&&W4(e,n,t[n]);return e},kY=(e,t)=>{var n={};for(var r in e)GE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pm)for(var r of Pm(e))t.indexOf(r)<0&&qE.call(e,r)&&(n[r]=e[r]);return n};function jY(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:s="column",id:i,innerRef:c,__staticSelector:d,styles:p,classNames:h,unstyled:m}=t,g=kY(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:b}=aX(null,{name:d,styles:p,classNames:h,unstyled:m});return B.createElement(Bu.Dropdown,SY({p:0,onMouseDown:y=>y.preventDefault()},g),B.createElement("div",{style:{maxHeight:Ge(o),display:"flex"}},B.createElement(Go,{component:r||"div",id:`${i}-items`,"aria-labelledby":`${i}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==Gg?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:c},B.createElement("div",{className:b.itemsWrapper,style:{flexDirection:s}},n))))}function Qi({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:s,__staticSelector:i,onDirectionChange:c,switchDirectionOnFlip:d,zIndex:p,dropdownPosition:h,positionDependencies:m=[],classNames:g,styles:b,unstyled:y,readOnly:x,variant:C}){return B.createElement(Bu,{unstyled:y,classNames:g,styles:b,width:"target",withRoles:!1,opened:e,middlewares:{flip:h==="flip",shift:!1},position:h==="flip"?"bottom":h,positionDependencies:m,zIndex:p,__staticSelector:i,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:x,onPositionChange:S=>d&&(c==null?void 0:c(S==="top"?"column-reverse":"column")),variant:C},s)}Qi.Target=Bu.Target;Qi.Dropdown=jY;var _Y=Object.defineProperty,IY=Object.defineProperties,PY=Object.getOwnPropertyDescriptors,Em=Object.getOwnPropertySymbols,KE=Object.prototype.hasOwnProperty,QE=Object.prototype.propertyIsEnumerable,V4=(e,t,n)=>t in e?_Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t)=>{for(var n in t||(t={}))KE.call(t,n)&&V4(e,n,t[n]);if(Em)for(var n of Em(t))QE.call(t,n)&&V4(e,n,t[n]);return e},EY=(e,t)=>IY(e,PY(t)),MY=(e,t)=>{var n={};for(var r in e)KE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Em)for(var r of Em(e))t.indexOf(r)<0&&QE.call(e,r)&&(n[r]=e[r]);return n};function XE(e,t,n){const r=Nr(e,t,n),{label:o,description:s,error:i,required:c,classNames:d,styles:p,className:h,unstyled:m,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:C,wrapperProps:S,id:j,size:_,style:I,inputContainer:P,inputWrapperOrder:M,withAsterisk:R,variant:A}=r,D=MY(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),O=Ty(j),{systemStyles:T,rest:Y}=Hg(D),z=oh({label:o,description:s,error:i,required:c,classNames:d,className:h,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:C,unstyled:m,styles:p,id:O,size:_,style:I,inputContainer:P,inputWrapperOrder:M,withAsterisk:R,variant:A},S);return EY(oh({},Y),{classNames:d,styles:p,unstyled:m,wrapperProps:oh(oh({},z),T),inputProps:{required:c,classNames:d,styles:p,unstyled:m,id:O,size:_,__staticSelector:g,error:i,variant:A}})}var OY=Co((e,t,{size:n})=>({label:{display:"inline-block",fontSize:Xt({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const RY=OY;var AY=Object.defineProperty,Mm=Object.getOwnPropertySymbols,YE=Object.prototype.hasOwnProperty,JE=Object.prototype.propertyIsEnumerable,U4=(e,t,n)=>t in e?AY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DY=(e,t)=>{for(var n in t||(t={}))YE.call(t,n)&&U4(e,n,t[n]);if(Mm)for(var n of Mm(t))JE.call(t,n)&&U4(e,n,t[n]);return e},TY=(e,t)=>{var n={};for(var r in e)YE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mm)for(var r of Mm(e))t.indexOf(r)<0&&JE.call(e,r)&&(n[r]=e[r]);return n};const NY={labelElement:"label",size:"sm"},Vy=l.forwardRef((e,t)=>{const n=Nr("InputLabel",NY,e),{labelElement:r,children:o,required:s,size:i,classNames:c,styles:d,unstyled:p,className:h,htmlFor:m,__staticSelector:g,variant:b,onMouseDown:y}=n,x=TY(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:C,cx:S}=RY(null,{name:["InputWrapper",g],classNames:c,styles:d,unstyled:p,variant:b,size:i});return B.createElement(Go,DY({component:r,ref:t,className:S(C.label,h),htmlFor:r==="label"?m:void 0,onMouseDown:j=>{y==null||y(j),!j.defaultPrevented&&j.detail>1&&j.preventDefault()}},x),o,s&&B.createElement("span",{className:C.required,"aria-hidden":!0}," *"))});Vy.displayName="@mantine/core/InputLabel";var $Y=Co((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${Ge(2)})`,lineHeight:1.2,display:"block"}}));const LY=$Y;var zY=Object.defineProperty,Om=Object.getOwnPropertySymbols,ZE=Object.prototype.hasOwnProperty,eM=Object.prototype.propertyIsEnumerable,G4=(e,t,n)=>t in e?zY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FY=(e,t)=>{for(var n in t||(t={}))ZE.call(t,n)&&G4(e,n,t[n]);if(Om)for(var n of Om(t))eM.call(t,n)&&G4(e,n,t[n]);return e},BY=(e,t)=>{var n={};for(var r in e)ZE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Om)for(var r of Om(e))t.indexOf(r)<0&&eM.call(e,r)&&(n[r]=e[r]);return n};const HY={size:"sm"},Uy=l.forwardRef((e,t)=>{const n=Nr("InputError",HY,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=BY(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=LY(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return B.createElement(yu,FY({className:b(g.error,o),ref:t},m),r)});Uy.displayName="@mantine/core/InputError";var WY=Co((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${Ge(2)})`,lineHeight:1.2,display:"block"}}));const VY=WY;var UY=Object.defineProperty,Rm=Object.getOwnPropertySymbols,tM=Object.prototype.hasOwnProperty,nM=Object.prototype.propertyIsEnumerable,q4=(e,t,n)=>t in e?UY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GY=(e,t)=>{for(var n in t||(t={}))tM.call(t,n)&&q4(e,n,t[n]);if(Rm)for(var n of Rm(t))nM.call(t,n)&&q4(e,n,t[n]);return e},qY=(e,t)=>{var n={};for(var r in e)tM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rm)for(var r of Rm(e))t.indexOf(r)<0&&nM.call(e,r)&&(n[r]=e[r]);return n};const KY={size:"sm"},Gy=l.forwardRef((e,t)=>{const n=Nr("InputDescription",KY,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=qY(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=VY(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return B.createElement(yu,GY({color:"dimmed",className:b(g.description,o),ref:t,unstyled:c},m),r)});Gy.displayName="@mantine/core/InputDescription";const rM=l.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),QY=rM.Provider,XY=()=>l.useContext(rM);function YY(e,{hasDescription:t,hasError:n}){const r=e.findIndex(d=>d==="input"),o=e[r-1],s=e[r+1];return{offsetBottom:t&&s==="description"||n&&s==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var JY=Object.defineProperty,ZY=Object.defineProperties,eJ=Object.getOwnPropertyDescriptors,K4=Object.getOwnPropertySymbols,tJ=Object.prototype.hasOwnProperty,nJ=Object.prototype.propertyIsEnumerable,Q4=(e,t,n)=>t in e?JY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rJ=(e,t)=>{for(var n in t||(t={}))tJ.call(t,n)&&Q4(e,n,t[n]);if(K4)for(var n of K4(t))nJ.call(t,n)&&Q4(e,n,t[n]);return e},oJ=(e,t)=>ZY(e,eJ(t)),sJ=Co(e=>({root:oJ(rJ({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const aJ=sJ;var iJ=Object.defineProperty,lJ=Object.defineProperties,cJ=Object.getOwnPropertyDescriptors,Am=Object.getOwnPropertySymbols,oM=Object.prototype.hasOwnProperty,sM=Object.prototype.propertyIsEnumerable,X4=(e,t,n)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zi=(e,t)=>{for(var n in t||(t={}))oM.call(t,n)&&X4(e,n,t[n]);if(Am)for(var n of Am(t))sM.call(t,n)&&X4(e,n,t[n]);return e},Y4=(e,t)=>lJ(e,cJ(t)),uJ=(e,t)=>{var n={};for(var r in e)oM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Am)for(var r of Am(e))t.indexOf(r)<0&&sM.call(e,r)&&(n[r]=e[r]);return n};const dJ={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},aM=l.forwardRef((e,t)=>{const n=Nr("InputWrapper",dJ,e),{className:r,label:o,children:s,required:i,id:c,error:d,description:p,labelElement:h,labelProps:m,descriptionProps:g,errorProps:b,classNames:y,styles:x,size:C,inputContainer:S,__staticSelector:j,unstyled:_,inputWrapperOrder:I,withAsterisk:P,variant:M}=n,R=uJ(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:A,cx:D}=aJ(null,{classNames:y,styles:x,name:["InputWrapper",j],unstyled:_,variant:M,size:C}),O={classNames:y,styles:x,unstyled:_,size:C,variant:M,__staticSelector:j},T=typeof P=="boolean"?P:i,Y=c?`${c}-error`:b==null?void 0:b.id,z=c?`${c}-description`:g==null?void 0:g.id,Q=`${!!d&&typeof d!="boolean"?Y:""} ${p?z:""}`,U=Q.trim().length>0?Q.trim():void 0,L=o&&B.createElement(Vy,zi(zi({key:"label",labelElement:h,id:c?`${c}-label`:void 0,htmlFor:c,required:T},O),m),o),ee=p&&B.createElement(Gy,Y4(zi(zi({key:"description"},g),O),{size:(g==null?void 0:g.size)||O.size,id:(g==null?void 0:g.id)||z}),p),K=B.createElement(l.Fragment,{key:"input"},S(s)),Z=typeof d!="boolean"&&d&&B.createElement(Uy,Y4(zi(zi({},b),O),{size:(b==null?void 0:b.size)||O.size,key:"error",id:(b==null?void 0:b.id)||Y}),d),se=I.map(fe=>{switch(fe){case"label":return L;case"input":return K;case"description":return ee;case"error":return Z;default:return null}});return B.createElement(QY,{value:zi({describedBy:U},YY(I,{hasDescription:!!ee,hasError:!!Z}))},B.createElement(Go,zi({className:D(A.root,r),ref:t},R),se))});aM.displayName="@mantine/core/InputWrapper";var fJ=Object.defineProperty,Dm=Object.getOwnPropertySymbols,iM=Object.prototype.hasOwnProperty,lM=Object.prototype.propertyIsEnumerable,J4=(e,t,n)=>t in e?fJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pJ=(e,t)=>{for(var n in t||(t={}))iM.call(t,n)&&J4(e,n,t[n]);if(Dm)for(var n of Dm(t))lM.call(t,n)&&J4(e,n,t[n]);return e},hJ=(e,t)=>{var n={};for(var r in e)iM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dm)for(var r of Dm(e))t.indexOf(r)<0&&lM.call(e,r)&&(n[r]=e[r]);return n};const mJ={},cM=l.forwardRef((e,t)=>{const n=Nr("InputPlaceholder",mJ,e),{sx:r}=n,o=hJ(n,["sx"]);return B.createElement(Go,pJ({component:"span",sx:[s=>s.fn.placeholderStyles(),...c6(r)],ref:t},o))});cM.displayName="@mantine/core/InputPlaceholder";var gJ=Object.defineProperty,vJ=Object.defineProperties,bJ=Object.getOwnPropertyDescriptors,Z4=Object.getOwnPropertySymbols,xJ=Object.prototype.hasOwnProperty,yJ=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?gJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sh=(e,t)=>{for(var n in t||(t={}))xJ.call(t,n)&&ej(e,n,t[n]);if(Z4)for(var n of Z4(t))yJ.call(t,n)&&ej(e,n,t[n]);return e},a1=(e,t)=>vJ(e,bJ(t));const bs={xs:Ge(30),sm:Ge(36),md:Ge(42),lg:Ge(50),xl:Ge(60)},CJ=["default","filled","unstyled"];function wJ({theme:e,variant:t}){return CJ.includes(t)?t==="default"?{border:`${Ge(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${Ge(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:Ge(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var SJ=Co((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:s,iconWidth:i,offsetBottom:c,offsetTop:d,pointer:p},{variant:h,size:m})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,b=h==="default"||h==="filled"?{minHeight:Xt({size:m,sizes:bs}),paddingLeft:`calc(${Xt({size:m,sizes:bs})} / 3)`,paddingRight:s?o||Xt({size:m,sizes:bs}):`calc(${Xt({size:m,sizes:bs})} / 3)`,borderRadius:e.fn.radius(n)}:h==="unstyled"&&s?{paddingRight:o||Xt({size:m,sizes:bs})}:null;return{wrapper:{position:"relative",marginTop:d?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:c?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:a1(sh(sh(a1(sh({},e.fn.fontStyles()),{height:t?h==="unstyled"?void 0:"auto":Xt({size:m,sizes:bs}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Xt({size:m,sizes:bs})} - ${Ge(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Xt({size:m,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:p?"pointer":void 0}),wJ({theme:e,variant:h})),b),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof i=="number"?Ge(i):Xt({size:m,sizes:bs})},"&::placeholder":a1(sh({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:i?Ge(i):Xt({size:m,sizes:bs}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Xt({size:m,sizes:bs})}}});const kJ=SJ;var jJ=Object.defineProperty,_J=Object.defineProperties,IJ=Object.getOwnPropertyDescriptors,Tm=Object.getOwnPropertySymbols,uM=Object.prototype.hasOwnProperty,dM=Object.prototype.propertyIsEnumerable,tj=(e,t,n)=>t in e?jJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t)=>{for(var n in t||(t={}))uM.call(t,n)&&tj(e,n,t[n]);if(Tm)for(var n of Tm(t))dM.call(t,n)&&tj(e,n,t[n]);return e},nj=(e,t)=>_J(e,IJ(t)),PJ=(e,t)=>{var n={};for(var r in e)uM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tm)for(var r of Tm(e))t.indexOf(r)<0&&dM.call(e,r)&&(n[r]=e[r]);return n};const EJ={size:"sm",variant:"default"},oc=l.forwardRef((e,t)=>{const n=Nr("Input",EJ,e),{className:r,error:o,required:s,disabled:i,variant:c,icon:d,style:p,rightSectionWidth:h,iconWidth:m,rightSection:g,rightSectionProps:b,radius:y,size:x,wrapperProps:C,classNames:S,styles:j,__staticSelector:_,multiline:I,sx:P,unstyled:M,pointer:R}=n,A=PJ(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:D,offsetTop:O,describedBy:T}=XY(),{classes:Y,cx:z}=kJ({radius:y,multiline:I,invalid:!!o,rightSectionWidth:h?Ge(h):void 0,iconWidth:m,withRightSection:!!g,offsetBottom:D,offsetTop:O,pointer:R},{classNames:S,styles:j,name:["Input",_],unstyled:M,variant:c,size:x}),{systemStyles:W,rest:Q}=Hg(A);return B.createElement(Go,ah(ah({className:z(Y.wrapper,r),sx:P,style:p},W),C),d&&B.createElement("div",{className:Y.icon},d),B.createElement(Go,nj(ah({component:"input"},Q),{ref:t,required:s,"aria-invalid":!!o,"aria-describedby":T,disabled:i,"data-disabled":i||void 0,"data-with-icon":!!d||void 0,"data-invalid":!!o||void 0,className:Y.input})),g&&B.createElement("div",nj(ah({},b),{className:Y.rightSection}),g))});oc.displayName="@mantine/core/Input";oc.Wrapper=aM;oc.Label=Vy;oc.Description=Gy;oc.Error=Uy;oc.Placeholder=cM;const ku=oc;var MJ=Object.defineProperty,Nm=Object.getOwnPropertySymbols,fM=Object.prototype.hasOwnProperty,pM=Object.prototype.propertyIsEnumerable,rj=(e,t,n)=>t in e?MJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oj=(e,t)=>{for(var n in t||(t={}))fM.call(t,n)&&rj(e,n,t[n]);if(Nm)for(var n of Nm(t))pM.call(t,n)&&rj(e,n,t[n]);return e},OJ=(e,t)=>{var n={};for(var r in e)fM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nm)for(var r of Nm(e))t.indexOf(r)<0&&pM.call(e,r)&&(n[r]=e[r]);return n};const RJ={multiple:!1},hM=l.forwardRef((e,t)=>{const n=Nr("FileButton",RJ,e),{onChange:r,children:o,multiple:s,accept:i,name:c,form:d,resetRef:p,disabled:h,capture:m,inputProps:g}=n,b=OJ(n,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),y=l.useRef(),x=()=>{!h&&y.current.click()},C=j=>{r(s?Array.from(j.currentTarget.files):j.currentTarget.files[0]||null)};return x6(p,()=>{y.current.value=""}),B.createElement(B.Fragment,null,o(oj({onClick:x},b)),B.createElement("input",oj({style:{display:"none"},type:"file",accept:i,multiple:s,onChange:C,ref:zf(t,y),name:c,form:d,capture:m},g)))});hM.displayName="@mantine/core/FileButton";const mM={xs:Ge(16),sm:Ge(22),md:Ge(26),lg:Ge(30),xl:Ge(36)},AJ={xs:Ge(10),sm:Ge(12),md:Ge(14),lg:Ge(16),xl:Ge(18)};var DJ=Co((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:s})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:s==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:Xt({size:o,sizes:mM}),paddingLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?Xt({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:Xt({size:o,sizes:AJ}),borderRadius:Xt({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${Ge(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const TJ=DJ;var NJ=Object.defineProperty,$m=Object.getOwnPropertySymbols,gM=Object.prototype.hasOwnProperty,vM=Object.prototype.propertyIsEnumerable,sj=(e,t,n)=>t in e?NJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$J=(e,t)=>{for(var n in t||(t={}))gM.call(t,n)&&sj(e,n,t[n]);if($m)for(var n of $m(t))vM.call(t,n)&&sj(e,n,t[n]);return e},LJ=(e,t)=>{var n={};for(var r in e)gM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$m)for(var r of $m(e))t.indexOf(r)<0&&vM.call(e,r)&&(n[r]=e[r]);return n};const zJ={xs:16,sm:22,md:24,lg:26,xl:30};function bM(e){var t=e,{label:n,classNames:r,styles:o,className:s,onRemove:i,disabled:c,readOnly:d,size:p,radius:h="sm",variant:m,unstyled:g}=t,b=LJ(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:x}=TJ({disabled:c,readOnly:d,radius:h},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:p,variant:m});return B.createElement("div",$J({className:x(y.defaultValue,s)},b),B.createElement("span",{className:y.defaultValueLabel},n),!c&&!d&&B.createElement(J6,{"aria-hidden":!0,onMouseDown:i,size:zJ[p],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}bM.displayName="@mantine/core/MultiSelect/DefaultValue";function FJ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,disableSelectedItemFiltering:i}){if(!t&&s.length===0)return e;if(!t){const d=[];for(let p=0;ph===e[p].value&&!e[p].disabled))&&d.push(e[p]);return d}const c=[];for(let d=0;dp===e[d].value&&!e[d].disabled),e[d])&&c.push(e[d]),!(c.length>=n));d+=1);return c}var BJ=Object.defineProperty,Lm=Object.getOwnPropertySymbols,xM=Object.prototype.hasOwnProperty,yM=Object.prototype.propertyIsEnumerable,aj=(e,t,n)=>t in e?BJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ij=(e,t)=>{for(var n in t||(t={}))xM.call(t,n)&&aj(e,n,t[n]);if(Lm)for(var n of Lm(t))yM.call(t,n)&&aj(e,n,t[n]);return e},HJ=(e,t)=>{var n={};for(var r in e)xM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lm)for(var r of Lm(e))t.indexOf(r)<0&&yM.call(e,r)&&(n[r]=e[r]);return n};const WJ={xs:Ge(14),sm:Ge(18),md:Ge(20),lg:Ge(24),xl:Ge(28)};function VJ(e){var t=e,{size:n,error:r,style:o}=t,s=HJ(t,["size","error","style"]);const i=ki(),c=Xt({size:n,sizes:WJ});return B.createElement("svg",ij({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:ij({color:r?i.colors.red[6]:i.colors.gray[6],width:c,height:c},o),"data-chevron":!0},s),B.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var UJ=Object.defineProperty,GJ=Object.defineProperties,qJ=Object.getOwnPropertyDescriptors,lj=Object.getOwnPropertySymbols,KJ=Object.prototype.hasOwnProperty,QJ=Object.prototype.propertyIsEnumerable,cj=(e,t,n)=>t in e?UJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,XJ=(e,t)=>{for(var n in t||(t={}))KJ.call(t,n)&&cj(e,n,t[n]);if(lj)for(var n of lj(t))QJ.call(t,n)&&cj(e,n,t[n]);return e},YJ=(e,t)=>GJ(e,qJ(t));function CM({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?B.createElement(J6,YJ(XJ({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:s=>s.preventDefault()})):B.createElement(VJ,{error:o,size:r})}CM.displayName="@mantine/core/SelectRightSection";var JJ=Object.defineProperty,ZJ=Object.defineProperties,eZ=Object.getOwnPropertyDescriptors,zm=Object.getOwnPropertySymbols,wM=Object.prototype.hasOwnProperty,SM=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?JJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i1=(e,t)=>{for(var n in t||(t={}))wM.call(t,n)&&uj(e,n,t[n]);if(zm)for(var n of zm(t))SM.call(t,n)&&uj(e,n,t[n]);return e},dj=(e,t)=>ZJ(e,eZ(t)),tZ=(e,t)=>{var n={};for(var r in e)wM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zm)for(var r of zm(e))t.indexOf(r)<0&&SM.call(e,r)&&(n[r]=e[r]);return n};function kM(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:s}=t,i=tZ(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const c=typeof n=="function"?n(s):n;return{rightSection:!i.readOnly&&!(i.disabled&&i.shouldClear)&&B.createElement(CM,i1({},i)),styles:dj(i1({},c),{rightSection:dj(i1({},c==null?void 0:c.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var nZ=Object.defineProperty,rZ=Object.defineProperties,oZ=Object.getOwnPropertyDescriptors,fj=Object.getOwnPropertySymbols,sZ=Object.prototype.hasOwnProperty,aZ=Object.prototype.propertyIsEnumerable,pj=(e,t,n)=>t in e?nZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iZ=(e,t)=>{for(var n in t||(t={}))sZ.call(t,n)&&pj(e,n,t[n]);if(fj)for(var n of fj(t))aZ.call(t,n)&&pj(e,n,t[n]);return e},lZ=(e,t)=>rZ(e,oZ(t)),cZ=Co((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${Xt({size:n,sizes:bs})} - ${Ge(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Xt({size:n,sizes:bs})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${Ge(2)}) calc(${e.spacing.xs} / 2)`},searchInput:lZ(iZ({},e.fn.fontStyles()),{flex:1,minWidth:Ge(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Xt({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Xt({size:n,sizes:mM}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const uZ=cZ;var dZ=Object.defineProperty,fZ=Object.defineProperties,pZ=Object.getOwnPropertyDescriptors,Fm=Object.getOwnPropertySymbols,jM=Object.prototype.hasOwnProperty,_M=Object.prototype.propertyIsEnumerable,hj=(e,t,n)=>t in e?dZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t)=>{for(var n in t||(t={}))jM.call(t,n)&&hj(e,n,t[n]);if(Fm)for(var n of Fm(t))_M.call(t,n)&&hj(e,n,t[n]);return e},mj=(e,t)=>fZ(e,pZ(t)),hZ=(e,t)=>{var n={};for(var r in e)jM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fm)for(var r of Fm(e))t.indexOf(r)<0&&_M.call(e,r)&&(n[r]=e[r]);return n};function mZ(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function gZ(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function gj(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const vZ={size:"sm",valueComponent:bM,itemComponent:$y,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:mZ,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:gZ,switchDirectionOnFlip:!1,zIndex:Ay("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},IM=l.forwardRef((e,t)=>{const n=Nr("MultiSelect",vZ,e),{className:r,style:o,required:s,label:i,description:c,size:d,error:p,classNames:h,styles:m,wrapperProps:g,value:b,defaultValue:y,data:x,onChange:C,valueComponent:S,itemComponent:j,id:_,transitionProps:I,maxDropdownHeight:P,shadow:M,nothingFound:R,onFocus:A,onBlur:D,searchable:O,placeholder:T,filter:Y,limit:z,clearSearchOnChange:W,clearable:Q,clearSearchOnBlur:U,variant:L,onSearchChange:ee,searchValue:K,disabled:Z,initiallyOpened:se,radius:fe,icon:G,rightSection:te,rightSectionWidth:V,creatable:F,getCreateLabel:X,shouldCreate:ue,onCreate:q,sx:ne,dropdownComponent:pe,onDropdownClose:le,onDropdownOpen:we,maxSelectedValues:ve,withinPortal:he,portalProps:Ne,switchDirectionOnFlip:De,zIndex:qe,selectOnBlur:Mt,name:ot,dropdownPosition:an,errorProps:pt,labelProps:vt,descriptionProps:ke,form:Be,positionDependencies:Ot,onKeyDown:Ht,unstyled:je,inputContainer:ht,inputWrapperOrder:At,readOnly:_t,withAsterisk:Re,clearButtonProps:Xe,hoverOnSearchChange:_n,disableSelectedItemFiltering:Me}=n,Ze=hZ(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Ye,cx:ut,theme:Ut}=uZ({invalid:!!p},{name:"MultiSelect",classNames:h,styles:m,unstyled:je,size:d,variant:L}),{systemStyles:xr,rest:yn}=Hg(Ze),hn=l.useRef(),oo=l.useRef({}),Dr=Ty(_),[nr,rr]=l.useState(se),[or,Xr]=l.useState(-1),[Xo,so]=l.useState("column"),[ao,$s]=Zd({value:K,defaultValue:"",finalValue:void 0,onChange:ee}),[Yr,ca]=l.useState(!1),{scrollIntoView:Ls,targetRef:Ua,scrollableRef:ua}=C6({duration:0,offset:5,cancelable:!1,isList:!0}),re=F&&typeof X=="function";let ie=null;const be=x.map(He=>typeof He=="string"?{label:He,value:He}:He),Pe=u6({data:be}),[xe,ft]=Zd({value:gj(b,x),defaultValue:gj(y,x),finalValue:[],onChange:C}),it=l.useRef(!!ve&&ve{if(!_t){const Ct=xe.filter(zt=>zt!==He);ft(Ct),ve&&Ct.length{$s(He.currentTarget.value),!Z&&!it.current&&O&&rr(!0)},wt=He=>{typeof A=="function"&&A(He),!Z&&!it.current&&O&&rr(!0)},We=FJ({data:Pe,searchable:O,searchValue:ao,limit:z,filter:Y,value:xe,disableSelectedItemFiltering:Me});re&&ue(ao,Pe)&&(ie=X(ao),We.push({label:ao,value:ao,creatable:!0}));const Ie=Math.min(or,We.length-1),et=(He,Ct,zt)=>{let Qt=He;for(;zt(Qt);)if(Qt=Ct(Qt),!We[Qt].disabled)return Qt;return He};Js(()=>{Xr(_n&&ao?0:-1)},[ao,_n]),Js(()=>{!Z&&xe.length>x.length&&rr(!1),ve&&xe.length=ve&&(it.current=!0,rr(!1))},[xe]);const Et=He=>{if(!_t)if(W&&$s(""),xe.includes(He.value))Kt(He.value);else{if(He.creatable&&typeof q=="function"){const Ct=q(He.value);typeof Ct<"u"&&Ct!==null&&ft(typeof Ct=="string"?[...xe,Ct]:[...xe,Ct.value])}else ft([...xe,He.value]);xe.length===ve-1&&(it.current=!0,rr(!1)),We.length===1&&rr(!1)}},Tt=He=>{typeof D=="function"&&D(He),Mt&&We[Ie]&&nr&&Et(We[Ie]),U&&$s(""),rr(!1)},Vt=He=>{if(Yr||(Ht==null||Ht(He),_t)||He.key!=="Backspace"&&ve&&it.current)return;const Ct=Xo==="column",zt=()=>{Xr(Nn=>{var Jt;const vn=et(Nn,fn=>fn+1,fn=>fn{Xr(Nn=>{var Jt;const vn=et(Nn,fn=>fn-1,fn=>fn>0);return nr&&(Ua.current=oo.current[(Jt=We[vn])==null?void 0:Jt.value],Ls({alignment:Ct?"start":"end"})),vn})};switch(He.key){case"ArrowUp":{He.preventDefault(),rr(!0),Ct?Qt():zt();break}case"ArrowDown":{He.preventDefault(),rr(!0),Ct?zt():Qt();break}case"Enter":{He.preventDefault(),We[Ie]&&nr?Et(We[Ie]):rr(!0);break}case" ":{O||(He.preventDefault(),We[Ie]&&nr?Et(We[Ie]):rr(!0));break}case"Backspace":{xe.length>0&&ao.length===0&&(ft(xe.slice(0,-1)),rr(!0),ve&&(it.current=!1));break}case"Home":{if(!O){He.preventDefault(),nr||rr(!0);const Nn=We.findIndex(Jt=>!Jt.disabled);Xr(Nn),Ls({alignment:Ct?"end":"start"})}break}case"End":{if(!O){He.preventDefault(),nr||rr(!0);const Nn=We.map(Jt=>!!Jt.disabled).lastIndexOf(!1);Xr(Nn),Ls({alignment:Ct?"end":"start"})}break}case"Escape":rr(!1)}},Zt=xe.map(He=>{let Ct=Pe.find(zt=>zt.value===He&&!zt.disabled);return!Ct&&re&&(Ct={value:He,label:He}),Ct}).filter(He=>!!He).map((He,Ct)=>B.createElement(S,mj(Rc({},He),{variant:L,disabled:Z,className:Ye.value,readOnly:_t,onRemove:zt=>{zt.preventDefault(),zt.stopPropagation(),Kt(He.value)},key:He.value,size:d,styles:m,classNames:h,radius:fe,index:Ct}))),ln=He=>xe.includes(He),sn=()=>{var He;$s(""),ft([]),(He=hn.current)==null||He.focus(),ve&&(it.current=!1)},Yt=!_t&&(We.length>0?nr:nr&&!!R);return Js(()=>{const He=Yt?we:le;typeof He=="function"&&He()},[Yt]),B.createElement(ku.Wrapper,Rc(Rc({required:s,id:Dr,label:i,error:p,description:c,size:d,className:r,style:o,classNames:h,styles:m,__staticSelector:"MultiSelect",sx:ne,errorProps:pt,descriptionProps:ke,labelProps:vt,inputContainer:ht,inputWrapperOrder:At,unstyled:je,withAsterisk:Re,variant:L},xr),g),B.createElement(Qi,{opened:Yt,transitionProps:I,shadow:"sm",withinPortal:he,portalProps:Ne,__staticSelector:"MultiSelect",onDirectionChange:so,switchDirectionOnFlip:De,zIndex:qe,dropdownPosition:an,positionDependencies:[...Ot,ao],classNames:h,styles:m,unstyled:je,variant:L},B.createElement(Qi.Target,null,B.createElement("div",{className:Ye.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":nr&&Yt?`${Dr}-items`:null,"aria-controls":Dr,"aria-expanded":nr,onMouseLeave:()=>Xr(-1),tabIndex:-1},B.createElement("input",{type:"hidden",name:ot,value:xe.join(","),form:Be,disabled:Z}),B.createElement(ku,Rc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:d,variant:L,disabled:Z,error:p,required:s,radius:fe,icon:G,unstyled:je,onMouseDown:He=>{var Ct;He.preventDefault(),!Z&&!it.current&&rr(!nr),(Ct=hn.current)==null||Ct.focus()},classNames:mj(Rc({},h),{input:ut({[Ye.input]:!O},h==null?void 0:h.input)})},kM({theme:Ut,rightSection:te,rightSectionWidth:V,styles:m,size:d,shouldClear:Q&&xe.length>0,onClear:sn,error:p,disabled:Z,clearButtonProps:Xe,readOnly:_t})),B.createElement("div",{className:Ye.values,"data-clearable":Q||void 0},Zt,B.createElement("input",Rc({ref:zf(t,hn),type:"search",id:Dr,className:ut(Ye.searchInput,{[Ye.searchInputPointer]:!O,[Ye.searchInputInputHidden]:!nr&&xe.length>0||!O&&xe.length>0,[Ye.searchInputEmpty]:xe.length===0}),onKeyDown:Vt,value:ao,onChange:mt,onFocus:wt,onBlur:Tt,readOnly:!O||it.current||_t,placeholder:xe.length===0?T:void 0,disabled:Z,"data-mantine-stop-propagation":nr,autoComplete:"off",onCompositionStart:()=>ca(!0),onCompositionEnd:()=>ca(!1)},yn)))))),B.createElement(Qi.Dropdown,{component:pe||Gg,maxHeight:P,direction:Xo,id:Dr,innerRef:ua,__staticSelector:"MultiSelect",classNames:h,styles:m},B.createElement(Ny,{data:We,hovered:Ie,classNames:h,styles:m,uuid:Dr,__staticSelector:"MultiSelect",onItemHover:Xr,onItemSelect:Et,itemsRefs:oo,itemComponent:j,size:d,nothingFound:R,isItemSelected:ln,creatable:F&&!!ie,createLabel:ie,unstyled:je,variant:L}))))});IM.displayName="@mantine/core/MultiSelect";var bZ=Object.defineProperty,xZ=Object.defineProperties,yZ=Object.getOwnPropertyDescriptors,Bm=Object.getOwnPropertySymbols,PM=Object.prototype.hasOwnProperty,EM=Object.prototype.propertyIsEnumerable,vj=(e,t,n)=>t in e?bZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l1=(e,t)=>{for(var n in t||(t={}))PM.call(t,n)&&vj(e,n,t[n]);if(Bm)for(var n of Bm(t))EM.call(t,n)&&vj(e,n,t[n]);return e},CZ=(e,t)=>xZ(e,yZ(t)),wZ=(e,t)=>{var n={};for(var r in e)PM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bm)for(var r of Bm(e))t.indexOf(r)<0&&EM.call(e,r)&&(n[r]=e[r]);return n};const SZ={type:"text",size:"sm",__staticSelector:"TextInput"},MM=l.forwardRef((e,t)=>{const n=XE("TextInput",SZ,e),{inputProps:r,wrapperProps:o}=n,s=wZ(n,["inputProps","wrapperProps"]);return B.createElement(ku.Wrapper,l1({},o),B.createElement(ku,CZ(l1(l1({},r),s),{ref:t})))});MM.displayName="@mantine/core/TextInput";function kZ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,filterDataOnExactSearchMatch:i}){if(!t)return e;const c=s!=null&&e.find(p=>p.value===s)||null;if(c&&!i&&(c==null?void 0:c.label)===r){if(n){if(n>=e.length)return e;const p=e.indexOf(c),h=p+n,m=h-e.length;return m>0?e.slice(p-m):e.slice(p,h)}return e}const d=[];for(let p=0;p=n));p+=1);return d}var jZ=Co(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const _Z=jZ;var IZ=Object.defineProperty,PZ=Object.defineProperties,EZ=Object.getOwnPropertyDescriptors,Hm=Object.getOwnPropertySymbols,OM=Object.prototype.hasOwnProperty,RM=Object.prototype.propertyIsEnumerable,bj=(e,t,n)=>t in e?IZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yd=(e,t)=>{for(var n in t||(t={}))OM.call(t,n)&&bj(e,n,t[n]);if(Hm)for(var n of Hm(t))RM.call(t,n)&&bj(e,n,t[n]);return e},c1=(e,t)=>PZ(e,EZ(t)),MZ=(e,t)=>{var n={};for(var r in e)OM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&RM.call(e,r)&&(n[r]=e[r]);return n};function OZ(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function RZ(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const AZ={required:!1,size:"sm",shadow:"sm",itemComponent:$y,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:OZ,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:RZ,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ay("popover"),positionDependencies:[],dropdownPosition:"flip"},qy=l.forwardRef((e,t)=>{const n=XE("Select",AZ,e),{inputProps:r,wrapperProps:o,shadow:s,data:i,value:c,defaultValue:d,onChange:p,itemComponent:h,onKeyDown:m,onBlur:g,onFocus:b,transitionProps:y,initiallyOpened:x,unstyled:C,classNames:S,styles:j,filter:_,maxDropdownHeight:I,searchable:P,clearable:M,nothingFound:R,limit:A,disabled:D,onSearchChange:O,searchValue:T,rightSection:Y,rightSectionWidth:z,creatable:W,getCreateLabel:Q,shouldCreate:U,selectOnBlur:L,onCreate:ee,dropdownComponent:K,onDropdownClose:Z,onDropdownOpen:se,withinPortal:fe,portalProps:G,switchDirectionOnFlip:te,zIndex:V,name:F,dropdownPosition:X,allowDeselect:ue,placeholder:q,filterDataOnExactSearchMatch:ne,form:pe,positionDependencies:le,readOnly:we,clearButtonProps:ve,hoverOnSearchChange:he}=n,Ne=MZ(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:De,cx:qe,theme:Mt}=_Z(),[ot,an]=l.useState(x),[pt,vt]=l.useState(-1),ke=l.useRef(),Be=l.useRef({}),[Ot,Ht]=l.useState("column"),je=Ot==="column",{scrollIntoView:ht,targetRef:At,scrollableRef:_t}=C6({duration:0,offset:5,cancelable:!1,isList:!0}),Re=ue===void 0?M:ue,Xe=ie=>{if(ot!==ie){an(ie);const be=ie?se:Z;typeof be=="function"&&be()}},_n=W&&typeof Q=="function";let Me=null;const Ze=i.map(ie=>typeof ie=="string"?{label:ie,value:ie}:ie),Ye=u6({data:Ze}),[ut,Ut,xr]=Zd({value:c,defaultValue:d,finalValue:null,onChange:p}),yn=Ye.find(ie=>ie.value===ut),[hn,oo]=Zd({value:T,defaultValue:(yn==null?void 0:yn.label)||"",finalValue:void 0,onChange:O}),Dr=ie=>{oo(ie),P&&typeof O=="function"&&O(ie)},nr=()=>{var ie;we||(Ut(null),xr||Dr(""),(ie=ke.current)==null||ie.focus())};l.useEffect(()=>{const ie=Ye.find(be=>be.value===ut);ie?Dr(ie.label):(!_n||!ut)&&Dr("")},[ut]),l.useEffect(()=>{yn&&(!P||!ot)&&Dr(yn.label)},[yn==null?void 0:yn.label]);const rr=ie=>{if(!we)if(Re&&(yn==null?void 0:yn.value)===ie.value)Ut(null),Xe(!1);else{if(ie.creatable&&typeof ee=="function"){const be=ee(ie.value);typeof be<"u"&&be!==null&&Ut(typeof be=="string"?be:be.value)}else Ut(ie.value);xr||Dr(ie.label),vt(-1),Xe(!1),ke.current.focus()}},or=kZ({data:Ye,searchable:P,limit:A,searchValue:hn,filter:_,filterDataOnExactSearchMatch:ne,value:ut});_n&&U(hn,or)&&(Me=Q(hn),or.push({label:hn,value:hn,creatable:!0}));const Xr=(ie,be,Pe)=>{let xe=ie;for(;Pe(xe);)if(xe=be(xe),!or[xe].disabled)return xe;return ie};Js(()=>{vt(he&&hn?0:-1)},[hn,he]);const Xo=ut?or.findIndex(ie=>ie.value===ut):0,so=!we&&(or.length>0?ot:ot&&!!R),ao=()=>{vt(ie=>{var be;const Pe=Xr(ie,xe=>xe-1,xe=>xe>0);return At.current=Be.current[(be=or[Pe])==null?void 0:be.value],so&&ht({alignment:je?"start":"end"}),Pe})},$s=()=>{vt(ie=>{var be;const Pe=Xr(ie,xe=>xe+1,xe=>xewindow.setTimeout(()=>{var ie;At.current=Be.current[(ie=or[Xo])==null?void 0:ie.value],ht({alignment:je?"end":"start"})},50);Js(()=>{so&&Yr()},[so]);const ca=ie=>{switch(typeof m=="function"&&m(ie),ie.key){case"ArrowUp":{ie.preventDefault(),ot?je?ao():$s():(vt(Xo),Xe(!0),Yr());break}case"ArrowDown":{ie.preventDefault(),ot?je?$s():ao():(vt(Xo),Xe(!0),Yr());break}case"Home":{if(!P){ie.preventDefault(),ot||Xe(!0);const be=or.findIndex(Pe=>!Pe.disabled);vt(be),so&&ht({alignment:je?"end":"start"})}break}case"End":{if(!P){ie.preventDefault(),ot||Xe(!0);const be=or.map(Pe=>!!Pe.disabled).lastIndexOf(!1);vt(be),so&&ht({alignment:je?"end":"start"})}break}case"Escape":{ie.preventDefault(),Xe(!1),vt(-1);break}case" ":{P||(ie.preventDefault(),or[pt]&&ot?rr(or[pt]):(Xe(!0),vt(Xo),Yr()));break}case"Enter":P||ie.preventDefault(),or[pt]&&ot&&(ie.preventDefault(),rr(or[pt]))}},Ls=ie=>{typeof g=="function"&&g(ie);const be=Ye.find(Pe=>Pe.value===ut);L&&or[pt]&&ot&&rr(or[pt]),Dr((be==null?void 0:be.label)||""),Xe(!1)},Ua=ie=>{typeof b=="function"&&b(ie),P&&Xe(!0)},ua=ie=>{we||(Dr(ie.currentTarget.value),M&&ie.currentTarget.value===""&&Ut(null),vt(-1),Xe(!0))},re=()=>{we||(Xe(!ot),ut&&!ot&&vt(Xo))};return B.createElement(ku.Wrapper,c1(yd({},o),{__staticSelector:"Select"}),B.createElement(Qi,{opened:so,transitionProps:y,shadow:s,withinPortal:fe,portalProps:G,__staticSelector:"Select",onDirectionChange:Ht,switchDirectionOnFlip:te,zIndex:V,dropdownPosition:X,positionDependencies:[...le,hn],classNames:S,styles:j,unstyled:C,variant:r.variant},B.createElement(Qi.Target,null,B.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":so?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":so,onMouseLeave:()=>vt(-1),tabIndex:-1},B.createElement("input",{type:"hidden",name:F,value:ut||"",form:pe,disabled:D}),B.createElement(ku,yd(c1(yd(yd({autoComplete:"off",type:"search"},r),Ne),{ref:zf(t,ke),onKeyDown:ca,__staticSelector:"Select",value:hn,placeholder:q,onChange:ua,"aria-autocomplete":"list","aria-controls":so?`${r.id}-items`:null,"aria-activedescendant":pt>=0?`${r.id}-${pt}`:null,onMouseDown:re,onBlur:Ls,onFocus:Ua,readOnly:!P||we,disabled:D,"data-mantine-stop-propagation":so,name:null,classNames:c1(yd({},S),{input:qe({[De.input]:!P},S==null?void 0:S.input)})}),kM({theme:Mt,rightSection:Y,rightSectionWidth:z,styles:j,size:r.size,shouldClear:M&&!!yn,onClear:nr,error:o.error,clearButtonProps:ve,disabled:D,readOnly:we}))))),B.createElement(Qi.Dropdown,{component:K||Gg,maxHeight:I,direction:Ot,id:r.id,innerRef:_t,__staticSelector:"Select",classNames:S,styles:j},B.createElement(Ny,{data:or,hovered:pt,classNames:S,styles:j,isItemSelected:ie=>ie===ut,uuid:r.id,__staticSelector:"Select",onItemHover:vt,onItemSelect:rr,itemsRefs:Be,itemComponent:h,size:r.size,nothingFound:R,creatable:_n&&!!Me,createLabel:Me,"aria-label":o.label,unstyled:C,variant:r.variant}))))});qy.displayName="@mantine/core/Select";const Hf=()=>{const[e,t,n,r,o,s,i,c,d,p,h,m,g,b,y,x,C,S,j,_,I,P,M,R,A,D,O,T,Y,z,W,Q,U,L,ee,K,Z,se,fe,G,te,V,F,X,ue,q,ne,pe,le,we,ve,he,Ne,De,qe,Mt,ot,an,pt,vt,ke,Be,Ot,Ht,je,ht,At,_t,Re,Xe,_n,Me,Ze,Ye,ut,Ut]=Ks("colors",["base.50","base.100","base.150","base.200","base.250","base.300","base.350","base.400","base.450","base.500","base.550","base.600","base.650","base.700","base.750","base.800","base.850","base.900","base.950","accent.50","accent.100","accent.150","accent.200","accent.250","accent.300","accent.350","accent.400","accent.450","accent.500","accent.550","accent.600","accent.650","accent.700","accent.750","accent.800","accent.850","accent.900","accent.950","baseAlpha.50","baseAlpha.100","baseAlpha.150","baseAlpha.200","baseAlpha.250","baseAlpha.300","baseAlpha.350","baseAlpha.400","baseAlpha.450","baseAlpha.500","baseAlpha.550","baseAlpha.600","baseAlpha.650","baseAlpha.700","baseAlpha.750","baseAlpha.800","baseAlpha.850","baseAlpha.900","baseAlpha.950","accentAlpha.50","accentAlpha.100","accentAlpha.150","accentAlpha.200","accentAlpha.250","accentAlpha.300","accentAlpha.350","accentAlpha.400","accentAlpha.450","accentAlpha.500","accentAlpha.550","accentAlpha.600","accentAlpha.650","accentAlpha.700","accentAlpha.750","accentAlpha.800","accentAlpha.850","accentAlpha.900","accentAlpha.950"]);return{base50:e,base100:t,base150:n,base200:r,base250:o,base300:s,base350:i,base400:c,base450:d,base500:p,base550:h,base600:m,base650:g,base700:b,base750:y,base800:x,base850:C,base900:S,base950:j,accent50:_,accent100:I,accent150:P,accent200:M,accent250:R,accent300:A,accent350:D,accent400:O,accent450:T,accent500:Y,accent550:z,accent600:W,accent650:Q,accent700:U,accent750:L,accent800:ee,accent850:K,accent900:Z,accent950:se,baseAlpha50:fe,baseAlpha100:G,baseAlpha150:te,baseAlpha200:V,baseAlpha250:F,baseAlpha300:X,baseAlpha350:ue,baseAlpha400:q,baseAlpha450:ne,baseAlpha500:pe,baseAlpha550:le,baseAlpha600:we,baseAlpha650:ve,baseAlpha700:he,baseAlpha750:Ne,baseAlpha800:De,baseAlpha850:qe,baseAlpha900:Mt,baseAlpha950:ot,accentAlpha50:an,accentAlpha100:pt,accentAlpha150:vt,accentAlpha200:ke,accentAlpha250:Be,accentAlpha300:Ot,accentAlpha350:Ht,accentAlpha400:je,accentAlpha450:ht,accentAlpha500:At,accentAlpha550:_t,accentAlpha600:Re,accentAlpha650:Xe,accentAlpha700:_n,accentAlpha750:Me,accentAlpha800:Ze,accentAlpha850:Ye,accentAlpha900:ut,accentAlpha950:Ut}},Ke=(e,t)=>n=>n==="light"?e:t,AM=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Hf(),{colorMode:x}=wi(),[C]=Ks("shadows",["dark-lg"]),[S,j,_]=Ks("space",[1,2,6]),[I]=Ks("radii",["base"]),[P]=Ks("lineHeights",["base"]);return l.useCallback(()=>({label:{color:Ke(c,r)(x)},separatorLabel:{color:Ke(s,s)(x),"::after":{borderTopColor:Ke(r,c)(x)}},input:{border:"unset",backgroundColor:Ke(e,p)(x),borderRadius:I,borderStyle:"solid",borderWidth:"2px",borderColor:Ke(n,d)(x),color:Ke(p,t)(x),minHeight:"unset",lineHeight:P,height:"auto",paddingRight:0,paddingLeft:0,paddingInlineStart:j,paddingInlineEnd:_,paddingTop:S,paddingBottom:S,fontWeight:600,"&:hover":{borderColor:Ke(r,i)(x)},"&:focus":{borderColor:Ke(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Ke(o,s)(x)},"&:focus-within":{borderColor:Ke(h,y)(x)},"&[data-disabled]":{backgroundColor:Ke(r,c)(x),color:Ke(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Ke(t,p)(x),color:Ke(p,t)(x),button:{color:Ke(p,t)(x)},"&:hover":{backgroundColor:Ke(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Ke(n,d)(x),borderColor:Ke(n,d)(x),boxShadow:C},item:{backgroundColor:Ke(n,d)(x),color:Ke(d,n)(x),padding:6,"&[data-hovered]":{color:Ke(p,t)(x),backgroundColor:Ke(r,c)(x)},"&[data-active]":{backgroundColor:Ke(r,c)(x),"&:hover":{color:Ke(p,t)(x),backgroundColor:Ke(r,c)(x)}},"&[data-selected]":{backgroundColor:Ke(g,y)(x),color:Ke(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Ke(b,b)(x),color:Ke("white",e)(x)}},"&[data-disabled]":{color:Ke(s,i)(x),cursor:"not-allowed"}},rightSection:{width:32,button:{color:Ke(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,C,x,P,I,S,j,_])},DM=Oe((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,onChange:s,label:i,disabled:c,...d}=e,p=oe(),[h,m]=l.useState(""),g=l.useCallback(C=>{C.shiftKey&&p(Uo(!0))},[p]),b=l.useCallback(C=>{C.shiftKey||p(Uo(!1))},[p]),y=l.useCallback(C=>{s&&s(C)},[s]),x=AM();return a.jsx(Fn,{label:r,placement:"top",hasArrow:!0,children:a.jsxs(Bn,{ref:t,isDisabled:c,position:"static","data-testid":`select-${i||e.placeholder}`,children:[i&&a.jsx(vr,{children:i}),a.jsx(qy,{ref:o,disabled:c,searchValue:h,onSearchChange:m,onChange:y,onKeyDown:g,onKeyUp:b,searchable:n,maxDropdownHeight:300,styles:x,...d})]})})});DM.displayName="IAIMantineSearchableSelect";const tr=l.memo(DM),DZ=de([Ce],({changeBoardModal:e})=>{const{isModalOpen:t,imagesToChange:n}=e;return{isModalOpen:t,imagesToChange:n}},_e),TZ=()=>{const e=oe(),[t,n]=l.useState(),{data:r,isFetching:o}=gf(),{imagesToChange:s,isModalOpen:i}=H(DZ),[c]=vD(),[d]=bD(),{t:p}=J(),h=l.useMemo(()=>{const x=[{label:p("boards.uncategorized"),value:"none"}];return(r??[]).forEach(C=>x.push({label:C.board_name,value:C.board_id})),x},[r,p]),m=l.useCallback(()=>{e(Rw()),e(Cx(!1))},[e]),g=l.useCallback(()=>{!s.length||!t||(t==="none"?d({imageDTOs:s}):c({imageDTOs:s,board_id:t}),n(null),e(Rw()))},[c,e,s,d,t]),b=l.useCallback(x=>n(x),[]),y=l.useRef(null);return a.jsx(Df,{isOpen:i,onClose:m,leastDestructiveRef:y,isCentered:!0,children:a.jsx(Ma,{children:a.jsxs(Tf,{children:[a.jsx(Ea,{fontSize:"lg",fontWeight:"bold",children:p("boards.changeBoard")}),a.jsx(Oa,{children:a.jsxs(N,{sx:{flexDir:"column",gap:4},children:[a.jsxs(Se,{children:["Moving ",`${s.length}`," image",`${s.length>1?"s":""}`," to board:"]}),a.jsx(tr,{placeholder:p(o?"boards.loading":"boards.selectBoard"),disabled:o,onChange:b,value:t,data:h})]})}),a.jsxs(pi,{children:[a.jsx(Rt,{ref:y,onClick:m,children:p("boards.cancel")}),a.jsx(Rt,{colorScheme:"accent",onClick:g,ml:3,children:p("boards.move")})]})]})})})},NZ=l.memo(TZ),TM=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:s,tooltip:i,helperText:c,...d}=e;return a.jsx(Fn,{label:i,hasArrow:!0,placement:"top",isDisabled:!i,children:a.jsx(Bn,{isDisabled:n,width:r,alignItems:"center",...o,children:a.jsxs(N,{sx:{flexDir:"column",w:"full"},children:[a.jsxs(N,{sx:{alignItems:"center",w:"full"},children:[t&&a.jsx(vr,{my:1,flexGrow:1,sx:{cursor:n?"not-allowed":"pointer",...s==null?void 0:s.sx,pe:4},...s,children:t}),a.jsx(Ey,{...d})]}),c&&a.jsx(BP,{children:a.jsx(Se,{variant:"subtext",children:c})})]})})})};TM.displayName="IAISwitch";const jr=l.memo(TM),$Z=e=>{const{t}=J(),{imageUsage:n,topMessage:r=t("gallery.currentlyInUse"),bottomMessage:o=t("gallery.featuresWillReset")}=e;return!n||!Qs(n)?null:a.jsxs(a.Fragment,{children:[a.jsx(Se,{children:r}),a.jsxs(Mf,{sx:{paddingInlineStart:6},children:[n.isInitialImage&&a.jsx(ws,{children:t("common.img2img")}),n.isCanvasImage&&a.jsx(ws,{children:t("common.unifiedCanvas")}),n.isControlImage&&a.jsx(ws,{children:t("common.controlNet")}),n.isNodesImage&&a.jsx(ws,{children:t("common.nodeEditor")})]}),a.jsx(Se,{children:o})]})},NM=l.memo($Z),LZ=de([Ce,xD],(e,t)=>{const{system:n,config:r,deleteImageModal:o}=e,{shouldConfirmOnDelete:s}=n,{canRestoreDeletedImagesFromBin:i}=r,{imagesToDelete:c,isModalOpen:d}=o,p=(c??[]).map(({image_name:m})=>PI(e,m)),h={isInitialImage:Qs(p,m=>m.isInitialImage),isCanvasImage:Qs(p,m=>m.isCanvasImage),isNodesImage:Qs(p,m=>m.isNodesImage),isControlImage:Qs(p,m=>m.isControlImage)};return{shouldConfirmOnDelete:s,canRestoreDeletedImagesFromBin:i,imagesToDelete:c,imagesUsage:t,isModalOpen:d,imageUsageSummary:h}},_e),zZ=()=>{const e=oe(),{t}=J(),{shouldConfirmOnDelete:n,canRestoreDeletedImagesFromBin:r,imagesToDelete:o,imagesUsage:s,isModalOpen:i,imageUsageSummary:c}=H(LZ),d=l.useCallback(g=>e(EI(!g.target.checked)),[e]),p=l.useCallback(()=>{e(Aw()),e(yD(!1))},[e]),h=l.useCallback(()=>{!o.length||!s.length||(e(Aw()),e(CD({imageDTOs:o,imagesUsage:s})))},[e,o,s]),m=l.useRef(null);return a.jsx(Df,{isOpen:i,onClose:p,leastDestructiveRef:m,isCentered:!0,children:a.jsx(Ma,{children:a.jsxs(Tf,{children:[a.jsx(Ea,{fontSize:"lg",fontWeight:"bold",children:t("gallery.deleteImage")}),a.jsx(Oa,{children:a.jsxs(N,{direction:"column",gap:3,children:[a.jsx(NM,{imageUsage:c}),a.jsx(no,{}),a.jsx(Se,{children:t(r?"gallery.deleteImageBin":"gallery.deleteImagePermanent")}),a.jsx(Se,{children:t("common.areYouSure")}),a.jsx(jr,{label:t("common.dontAskMeAgain"),isChecked:!n,onChange:d})]})}),a.jsxs(pi,{children:[a.jsx(Rt,{ref:m,onClick:p,children:"Cancel"}),a.jsx(Rt,{colorScheme:"error",onClick:h,ml:3,children:"Delete"})]})]})})})},FZ=l.memo(zZ),$M=Oe((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...i}=e;return a.jsx(Fn,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:a.jsx(_a,{ref:t,role:n,colorScheme:s?"accent":"base","data-testid":r,...i})})});$M.displayName="IAIIconButton";const tt=l.memo($M);var LM={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xj=B.createContext&&B.createContext(LM),Xi=globalThis&&globalThis.__assign||function(){return Xi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const t=H(i=>i.config.disabledTabs),n=H(i=>i.config.disabledFeatures),r=H(i=>i.config.disabledSDFeatures),o=l.useMemo(()=>n.includes(e)||r.includes(e)||t.includes(e),[n,r,t,e]),s=l.useMemo(()=>!(n.includes(e)||r.includes(e)||t.includes(e)),[n,r,t,e]);return{isFeatureDisabled:o,isFeatureEnabled:s}};function Pee(e){const{title:t,hotkey:n,description:r}=e;return a.jsxs(nl,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs(nl,{children:[a.jsx(Se,{fontWeight:600,children:t}),r&&a.jsx(Se,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),a.jsx(Te,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function Eee({children:e}){const{isOpen:t,onOpen:n,onClose:r}=ls(),{t:o}=J(),s=[{title:o("hotkeys.invoke.title"),desc:o("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:o("hotkeys.cancel.title"),desc:o("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:o("hotkeys.focusPrompt.title"),desc:o("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:o("hotkeys.toggleOptions.title"),desc:o("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:o("hotkeys.toggleGallery.title"),desc:o("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:o("hotkeys.maximizeWorkSpace.title"),desc:o("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:o("hotkeys.changeTabs.title"),desc:o("hotkeys.changeTabs.desc"),hotkey:"1-5"}],i=[{title:o("hotkeys.setPrompt.title"),desc:o("hotkeys.setPrompt.desc"),hotkey:"P"},{title:o("hotkeys.setSeed.title"),desc:o("hotkeys.setSeed.desc"),hotkey:"S"},{title:o("hotkeys.setParameters.title"),desc:o("hotkeys.setParameters.desc"),hotkey:"A"},{title:o("hotkeys.upscale.title"),desc:o("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:o("hotkeys.showInfo.title"),desc:o("hotkeys.showInfo.desc"),hotkey:"I"},{title:o("hotkeys.sendToImageToImage.title"),desc:o("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:o("hotkeys.deleteImage.title"),desc:o("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:o("hotkeys.closePanels.title"),desc:o("hotkeys.closePanels.desc"),hotkey:"Esc"}],c=[{title:o("hotkeys.previousImage.title"),desc:o("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextImage.title"),desc:o("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.increaseGalleryThumbSize.title"),desc:o("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:o("hotkeys.decreaseGalleryThumbSize.title"),desc:o("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],d=[{title:o("hotkeys.selectBrush.title"),desc:o("hotkeys.selectBrush.desc"),hotkey:"B"},{title:o("hotkeys.selectEraser.title"),desc:o("hotkeys.selectEraser.desc"),hotkey:"E"},{title:o("hotkeys.decreaseBrushSize.title"),desc:o("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:o("hotkeys.increaseBrushSize.title"),desc:o("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:o("hotkeys.decreaseBrushOpacity.title"),desc:o("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:o("hotkeys.increaseBrushOpacity.title"),desc:o("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:o("hotkeys.moveTool.title"),desc:o("hotkeys.moveTool.desc"),hotkey:"V"},{title:o("hotkeys.fillBoundingBox.title"),desc:o("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:o("hotkeys.eraseBoundingBox.title"),desc:o("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:o("hotkeys.colorPicker.title"),desc:o("hotkeys.colorPicker.desc"),hotkey:"C"},{title:o("hotkeys.toggleSnap.title"),desc:o("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:o("hotkeys.quickToggleMove.title"),desc:o("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:o("hotkeys.toggleLayer.title"),desc:o("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:o("hotkeys.clearMask.title"),desc:o("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:o("hotkeys.hideMask.title"),desc:o("hotkeys.hideMask.desc"),hotkey:"H"},{title:o("hotkeys.showHideBoundingBox.title"),desc:o("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:o("hotkeys.mergeVisible.title"),desc:o("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:o("hotkeys.saveToGallery.title"),desc:o("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:o("hotkeys.copyToClipboard.title"),desc:o("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:o("hotkeys.downloadImage.title"),desc:o("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:o("hotkeys.undoStroke.title"),desc:o("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:o("hotkeys.redoStroke.title"),desc:o("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:o("hotkeys.resetView.title"),desc:o("hotkeys.resetView.desc"),hotkey:"R"},{title:o("hotkeys.previousStagingImage.title"),desc:o("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextStagingImage.title"),desc:o("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.acceptStagingImage.title"),desc:o("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],p=[{title:o("hotkeys.addNodes.title"),desc:o("hotkeys.addNodes.desc"),hotkey:"Shift + A / Space"}],h=m=>a.jsx(N,{flexDir:"column",gap:4,children:m.map((g,b)=>a.jsxs(N,{flexDir:"column",px:2,gap:4,children:[a.jsx(Pee,{title:g.title,description:g.desc,hotkey:g.hotkey}),b{const{data:t}=wD(),n=l.useRef(null),r=eO(n);return a.jsxs(N,{alignItems:"center",gap:5,ps:1,ref:n,children:[a.jsx(Si,{src:wx,alt:"invoke-ai-logo",sx:{w:"32px",h:"32px",minW:"32px",minH:"32px",userSelect:"none"}}),a.jsxs(N,{sx:{gap:3,alignItems:"center"},children:[a.jsxs(Se,{sx:{fontSize:"xl",userSelect:"none"},children:["invoke ",a.jsx("strong",{children:"ai"})]}),a.jsx(yo,{children:e&&r&&t&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(Se,{sx:{fontWeight:600,marginTop:1,color:"base.300",fontSize:14},variant:"subtext",children:t.version})},"statusText")})]})]})},$ee=l.memo(Nee),tO=Oe((e,t)=>{const{tooltip:n,inputRef:r,label:o,disabled:s,required:i,...c}=e,d=AM();return a.jsx(Fn,{label:n,placement:"top",hasArrow:!0,children:a.jsxs(Bn,{ref:t,isRequired:i,isDisabled:s,position:"static","data-testid":`select-${o||e.placeholder}`,children:[a.jsx(vr,{children:o}),a.jsx(qy,{disabled:s,ref:r,styles:d,...c})]})})});tO.displayName="IAIMantineSelect";const Ar=l.memo(tO),Lee={ar:on.t("common.langArabic",{lng:"ar"}),nl:on.t("common.langDutch",{lng:"nl"}),en:on.t("common.langEnglish",{lng:"en"}),fr:on.t("common.langFrench",{lng:"fr"}),de:on.t("common.langGerman",{lng:"de"}),he:on.t("common.langHebrew",{lng:"he"}),it:on.t("common.langItalian",{lng:"it"}),ja:on.t("common.langJapanese",{lng:"ja"}),ko:on.t("common.langKorean",{lng:"ko"}),pl:on.t("common.langPolish",{lng:"pl"}),pt_BR:on.t("common.langBrPortuguese",{lng:"pt_BR"}),pt:on.t("common.langPortuguese",{lng:"pt"}),ru:on.t("common.langRussian",{lng:"ru"}),zh_CN:on.t("common.langSimplifiedChinese",{lng:"zh_CN"}),es:on.t("common.langSpanish",{lng:"es"}),uk:on.t("common.langUkranian",{lng:"ua"})},zee={CONNECTED:"common.statusConnected",DISCONNECTED:"common.statusDisconnected",PROCESSING:"common.statusProcessing",ERROR:"common.statusError",LOADING_MODEL:"common.statusLoadingModel"},nO=de(Ce,({system:e})=>e.language,_e);function Vs(e){const{t}=J(),{label:n,textProps:r,useBadge:o=!1,badgeLabel:s=t("settings.experimental"),badgeProps:i,...c}=e;return a.jsxs(N,{justifyContent:"space-between",py:1,children:[a.jsxs(N,{gap:2,alignItems:"center",children:[a.jsx(Se,{sx:{fontSize:14,_dark:{color:"base.300"}},...r,children:n}),o&&a.jsx(Ha,{size:"xs",sx:{px:2,color:"base.700",bg:"accent.200",_dark:{bg:"accent.500",color:"base.200"}},...i,children:s})]}),a.jsx(jr,{...c})]})}const Fee=e=>a.jsx(N,{sx:{flexDirection:"column",gap:2,p:4,borderRadius:"base",bg:"base.100",_dark:{bg:"base.900"}},children:e.children}),zc=l.memo(Fee);function Bee(){const{t:e}=J(),t=oe(),{data:n}=SD(void 0,{refetchOnMountOrArgChange:!0}),[r,{isLoading:o}]=kD(),{data:s}=Fa(),i=s&&(s.queue.in_progress>0||s.queue.pending>0),c=l.useCallback(()=>{i||r().unwrap().then(d=>{t(MI()),t(OI()),t(Bt({title:e("settings.intermediatesCleared",{count:d}),status:"info"}))}).catch(()=>{t(Bt({title:e("settings.intermediatesClearedFailed"),status:"error"}))})},[e,r,t,i]);return a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:e("settings.clearIntermediates")}),a.jsx(Rt,{tooltip:i?e("settings.clearIntermediatesDisabled"):void 0,colorScheme:"warning",onClick:c,isLoading:o,isDisabled:!n||i,children:e("settings.clearIntermediatesWithCount",{count:n??0})}),a.jsx(Se,{fontWeight:"bold",children:e("settings.clearIntermediatesDesc1")}),a.jsx(Se,{variant:"subtext",children:e("settings.clearIntermediatesDesc2")}),a.jsx(Se,{variant:"subtext",children:e("settings.clearIntermediatesDesc3")})]})}const Hee=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Hf(),{colorMode:x}=wi(),[C]=Ks("shadows",["dark-lg"]);return l.useCallback(()=>({label:{color:Ke(c,r)(x)},separatorLabel:{color:Ke(s,s)(x),"::after":{borderTopColor:Ke(r,c)(x)}},searchInput:{":placeholder":{color:Ke(r,c)(x)}},input:{backgroundColor:Ke(e,p)(x),borderWidth:"2px",borderColor:Ke(n,d)(x),color:Ke(p,t)(x),paddingRight:24,fontWeight:600,"&:hover":{borderColor:Ke(r,i)(x)},"&:focus":{borderColor:Ke(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Ke(o,s)(x)},"&:focus-within":{borderColor:Ke(h,y)(x)},"&[data-disabled]":{backgroundColor:Ke(r,c)(x),color:Ke(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Ke(n,d)(x),color:Ke(p,t)(x),button:{color:Ke(p,t)(x)},"&:hover":{backgroundColor:Ke(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Ke(n,d)(x),borderColor:Ke(n,d)(x),boxShadow:C},item:{backgroundColor:Ke(n,d)(x),color:Ke(d,n)(x),padding:6,"&[data-hovered]":{color:Ke(p,t)(x),backgroundColor:Ke(r,c)(x)},"&[data-active]":{backgroundColor:Ke(r,c)(x),"&:hover":{color:Ke(p,t)(x),backgroundColor:Ke(r,c)(x)}},"&[data-selected]":{backgroundColor:Ke(g,y)(x),color:Ke(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Ke(b,b)(x),color:Ke("white",e)(x)}},"&[data-disabled]":{color:Ke(s,i)(x),cursor:"not-allowed"}},rightSection:{width:24,padding:20,button:{color:Ke(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,C,x])},rO=Oe((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,label:s,disabled:i,...c}=e,d=oe(),p=l.useCallback(g=>{g.shiftKey&&d(Uo(!0))},[d]),h=l.useCallback(g=>{g.shiftKey||d(Uo(!1))},[d]),m=Hee();return a.jsx(Fn,{label:r,placement:"top",hasArrow:!0,isOpen:!0,children:a.jsxs(Bn,{ref:t,isDisabled:i,position:"static",children:[s&&a.jsx(vr,{children:s}),a.jsx(IM,{ref:o,disabled:i,onKeyDown:p,onKeyUp:h,searchable:n,maxDropdownHeight:300,styles:m,...c})]})})});rO.displayName="IAIMantineMultiSelect";const Wee=l.memo(rO),Vee=Ro(sg,(e,t)=>({value:t,label:e})).sort((e,t)=>e.label.localeCompare(t.label));function Uee(){const e=oe(),{t}=J(),n=H(o=>o.ui.favoriteSchedulers),r=l.useCallback(o=>{e(jD(o))},[e]);return a.jsx(Wee,{label:t("settings.favoriteSchedulers"),value:n,data:Vee,onChange:r,clearable:!0,searchable:!0,maxSelectedValues:99,placeholder:t("settings.favoriteSchedulersPlaceholder")})}const Gee=de([Ce],({system:e,ui:t})=>{const{shouldConfirmOnDelete:n,enableImageDebugging:r,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldEnableInformationalPopovers:p}=e,{shouldUseSliders:h,shouldShowProgressInViewer:m,shouldAutoChangeDimensions:g}=t;return{shouldConfirmOnDelete:n,enableImageDebugging:r,shouldUseSliders:h,shouldShowProgressInViewer:m,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldAutoChangeDimensions:g,shouldEnableInformationalPopovers:p}},{memoizeOptions:{resultEqualityCheck:Tn}}),qee=({children:e,config:t})=>{const n=oe(),{t:r}=J(),[o,s]=l.useState(3),i=(t==null?void 0:t.shouldShowDeveloperSettings)??!0,c=(t==null?void 0:t.shouldShowResetWebUiText)??!0,d=(t==null?void 0:t.shouldShowClearIntermediates)??!0,p=(t==null?void 0:t.shouldShowLocalizationToggle)??!0;l.useEffect(()=>{i||n(Dw(!1))},[i,n]);const{isNSFWCheckerAvailable:h,isWatermarkerAvailable:m}=RI(void 0,{selectFromResult:({data:ne})=>({isNSFWCheckerAvailable:(ne==null?void 0:ne.nsfw_methods.includes("nsfw_checker"))??!1,isWatermarkerAvailable:(ne==null?void 0:ne.watermarking_methods.includes("invisible_watermark"))??!1})}),{isOpen:g,onOpen:b,onClose:y}=ls(),{isOpen:x,onOpen:C,onClose:S}=ls(),{shouldConfirmOnDelete:j,enableImageDebugging:_,shouldUseSliders:I,shouldShowProgressInViewer:P,consoleLogLevel:M,shouldLogToConsole:R,shouldAntialiasProgressImage:A,shouldUseNSFWChecker:D,shouldUseWatermarker:O,shouldAutoChangeDimensions:T,shouldEnableInformationalPopovers:Y}=H(Gee),z=l.useCallback(()=>{Object.keys(window.localStorage).forEach(ne=>{(_D.includes(ne)||ne.startsWith(ID))&&localStorage.removeItem(ne)}),y(),C(),setInterval(()=>s(ne=>ne-1),1e3)},[y,C]);l.useEffect(()=>{o<=0&&window.location.reload()},[o]);const W=l.useCallback(ne=>{n(PD(ne))},[n]),Q=l.useCallback(ne=>{n(ED(ne))},[n]),U=l.useCallback(ne=>{n(Dw(ne.target.checked))},[n]),{colorMode:L,toggleColorMode:ee}=wi(),K=jn("localization").isFeatureEnabled,Z=H(nO),se=l.useCallback(ne=>{n(EI(ne.target.checked))},[n]),fe=l.useCallback(ne=>{n(MD(ne.target.checked))},[n]),G=l.useCallback(ne=>{n(OD(ne.target.checked))},[n]),te=l.useCallback(ne=>{n(RD(ne.target.checked))},[n]),V=l.useCallback(ne=>{n(AI(ne.target.checked))},[n]),F=l.useCallback(ne=>{n(AD(ne.target.checked))},[n]),X=l.useCallback(ne=>{n(DD(ne.target.checked))},[n]),ue=l.useCallback(ne=>{n(TD(ne.target.checked))},[n]),q=l.useCallback(ne=>{n(ND(ne.target.checked))},[n]);return a.jsxs(a.Fragment,{children:[l.cloneElement(e,{onClick:b}),a.jsxs(bu,{isOpen:g,onClose:y,size:"2xl",isCentered:!0,children:[a.jsx(Ma,{}),a.jsxs(xu,{children:[a.jsx(Ea,{bg:"none",children:r("common.settingsLabel")}),a.jsx(kg,{}),a.jsx(Oa,{children:a.jsxs(N,{sx:{gap:4,flexDirection:"column"},children:[a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:r("settings.general")}),a.jsx(Vs,{label:r("settings.confirmOnDelete"),isChecked:j,onChange:se})]}),a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:r("settings.generation")}),a.jsx(Uee,{}),a.jsx(Vs,{label:"Enable NSFW Checker",isDisabled:!h,isChecked:D,onChange:fe}),a.jsx(Vs,{label:"Enable Invisible Watermark",isDisabled:!m,isChecked:O,onChange:G})]}),a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:r("settings.ui")}),a.jsx(Vs,{label:r("common.darkMode"),isChecked:L==="dark",onChange:ee}),a.jsx(Vs,{label:r("settings.useSlidersForAll"),isChecked:I,onChange:te}),a.jsx(Vs,{label:r("settings.showProgressInViewer"),isChecked:P,onChange:V}),a.jsx(Vs,{label:r("settings.antialiasProgressImages"),isChecked:A,onChange:F}),a.jsx(Vs,{label:r("settings.autoChangeDimensions"),isChecked:T,onChange:X}),p&&a.jsx(Ar,{disabled:!K,label:r("common.languagePickerLabel"),value:Z,data:Object.entries(Lee).map(([ne,pe])=>({value:ne,label:pe})),onChange:Q}),a.jsx(Vs,{label:"Enable informational popovers",isChecked:Y,onChange:ue})]}),i&&a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:r("settings.developer")}),a.jsx(Vs,{label:r("settings.shouldLogToConsole"),isChecked:R,onChange:U}),a.jsx(Ar,{disabled:!R,label:r("settings.consoleLogLevel"),onChange:W,value:M,data:$D.concat()}),a.jsx(Vs,{label:r("settings.enableImageDebugging"),isChecked:_,onChange:q})]}),d&&a.jsx(Bee,{}),a.jsxs(zc,{children:[a.jsx(vo,{size:"sm",children:r("settings.resetWebUI")}),a.jsx(Rt,{colorScheme:"error",onClick:z,children:r("settings.resetWebUI")}),c&&a.jsxs(a.Fragment,{children:[a.jsx(Se,{variant:"subtext",children:r("settings.resetWebUIDesc1")}),a.jsx(Se,{variant:"subtext",children:r("settings.resetWebUIDesc2")})]})]})]})}),a.jsx(pi,{children:a.jsx(Rt,{onClick:y,children:r("common.close")})})]})]}),a.jsxs(bu,{closeOnOverlayClick:!1,isOpen:x,onClose:S,isCentered:!0,closeOnEsc:!1,children:[a.jsx(Ma,{backdropFilter:"blur(40px)"}),a.jsxs(xu,{children:[a.jsx(Ea,{}),a.jsx(Oa,{children:a.jsx(N,{justifyContent:"center",children:a.jsx(Se,{fontSize:"lg",children:a.jsxs(Se,{children:[r("settings.resetComplete")," Reloading in ",o,"..."]})})})}),a.jsx(pi,{})]})]})]})},Kee=l.memo(qee),Qee=de(Ce,({system:e})=>{const{isConnected:t,status:n}=e;return{isConnected:t,statusTranslationKey:zee[n]}},_e),Sj={ok:"green.400",working:"yellow.400",error:"red.400"},kj={ok:"green.600",working:"yellow.500",error:"red.500"},Xee=()=>{const{isConnected:e,statusTranslationKey:t}=H(Qee),{t:n}=J(),r=l.useRef(null),{data:o}=Fa(),s=l.useMemo(()=>e?o!=null&&o.queue.in_progress?"working":"ok":"error",[o==null?void 0:o.queue.in_progress,e]),i=eO(r);return a.jsxs(N,{ref:r,h:"full",px:2,alignItems:"center",gap:5,children:[a.jsx(yo,{children:i&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(Se,{sx:{fontSize:"sm",fontWeight:"600",pb:"1px",userSelect:"none",color:kj[s],_dark:{color:Sj[s]}},children:n(t)})},"statusText")}),a.jsx(zr,{as:ZZ,sx:{boxSize:"0.5rem",color:kj[s],_dark:{color:Sj[s]}}})]})},Yee=l.memo(Xee),Jee=()=>{const{t:e}=J(),t=jn("bugLink").isFeatureEnabled,n=jn("discordLink").isFeatureEnabled,r=jn("githubLink").isFeatureEnabled,o="http://github.com/invoke-ai/InvokeAI",s="https://discord.gg/ZmtBAhwWhy";return a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx($ee,{}),a.jsx(ji,{}),a.jsx(Yee,{}),a.jsxs(Cg,{children:[a.jsx(wg,{as:tt,variant:"link","aria-label":e("accessibility.menu"),icon:a.jsx(YZ,{}),sx:{boxSize:8}}),a.jsxs(Gl,{motionProps:pu,children:[a.jsxs(Yd,{title:e("common.communityLabel"),children:[r&&a.jsx(Vn,{as:"a",href:o,target:"_blank",icon:a.jsx(VZ,{}),children:e("common.githubLabel")}),t&&a.jsx(Vn,{as:"a",href:`${o}/issues`,target:"_blank",icon:a.jsx(JZ,{}),children:e("common.reportBugLabel")}),n&&a.jsx(Vn,{as:"a",href:s,target:"_blank",icon:a.jsx(WZ,{}),children:e("common.discordLabel")})]}),a.jsxs(Yd,{title:e("common.settingsLabel"),children:[a.jsx(Eee,{children:a.jsx(Vn,{as:"button",icon:a.jsx(pee,{}),children:e("common.hotkeysLabel")})}),a.jsx(Kee,{children:a.jsx(Vn,{as:"button",icon:a.jsx(WM,{}),children:e("common.settingsLabel")})})]})]})]})]})},Zee=l.memo(Jee);/*! + * OverlayScrollbars + * Version: 2.2.1 + * + * Copyright (c) Rene Haas | KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + */function Dn(e,t){if(e0(e))for(let n=0;nt(e[n],n,e));return e}function bo(e,t){const n=fl(t);if(sa(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?Pj(e,s,t):t.reduce((i,c)=>(i[c]=Pj(e,s,c),i),o)}return o}e&&Dn(us(t),o=>mte(e,o,t[o]))}const Gs=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const c=(h,m)=>{const g=s,b=h,y=m||(r?!r(g,b):g!==b);return(y||o)&&(s=b,i=g),[s,y,i]};return[t?h=>c(t(s,i),h):c,h=>[s,!!h,i]]},Wf=()=>typeof window<"u",oO=Wf()&&Node.ELEMENT_NODE,{toString:ete,hasOwnProperty:u1}=Object.prototype,Ii=e=>e===void 0,Zg=e=>e===null,tte=e=>Ii(e)||Zg(e)?`${e}`:ete.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Ji=e=>typeof e=="number",fl=e=>typeof e=="string",Qy=e=>typeof e=="boolean",oa=e=>typeof e=="function",sa=e=>Array.isArray(e),tf=e=>typeof e=="object"&&!sa(e)&&!Zg(e),e0=e=>{const t=!!e&&e.length,n=Ji(t)&&t>-1&&t%1==0;return sa(e)||!oa(e)&&n?t>0&&tf(e)?t-1 in e:!0:!1},Bb=e=>{if(!e||!tf(e)||tte(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=u1.call(e,n),i=o&&u1.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return Ii(t)||u1.call(e,t)},Wm=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===oO:!1},t0=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===oO:!1},Xy=(e,t,n)=>e.indexOf(t,n),Gn=(e,t,n)=>(!n&&!fl(t)&&e0(t)?Array.prototype.push.apply(e,t):e.push(t),e),Xl=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Gn(n,r)}):Dn(e,r=>{Gn(n,r)}),n)},Yy=e=>!!e&&e.length===0,Wa=(e,t,n)=>{Dn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},n0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),us=e=>e?Object.keys(e):[],kr=(e,t,n,r,o,s,i)=>{const c=[t,n,r,o,s,i];return(typeof e!="object"||Zg(e))&&!oa(e)&&(e={}),Dn(c,d=>{Dn(us(d),p=>{const h=d[p];if(e===h)return!0;const m=sa(h);if(h&&(Bb(h)||m)){const g=e[p];let b=g;m&&!sa(g)?b=[]:!m&&!Bb(g)&&(b={}),e[p]=kr(b,h)}else e[p]=h})}),e},Jy=e=>{for(const t in e)return!1;return!0},sO=(e,t,n,r)=>{if(Ii(r))return n?n[e]:t;n&&(fl(r)||Ji(r))&&(n[e]=r)},go=(e,t,n)=>{if(Ii(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},zo=(e,t)=>{e&&e.removeAttribute(t)},Ll=(e,t,n,r)=>{if(n){const o=go(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Xl(s).join(" ").trim();go(e,t,i)}},nte=(e,t,n)=>{const r=go(e,t)||"";return new Set(r.split(" ")).has(n)},ea=(e,t)=>sO("scrollLeft",0,e,t),li=(e,t)=>sO("scrollTop",0,e,t),Hb=Wf()&&Element.prototype,aO=(e,t)=>{const n=[],r=t?t0(t)?t:null:document;return r?Gn(n,r.querySelectorAll(e)):n},rte=(e,t)=>{const n=t?t0(t)?t:null:document;return n?n.querySelector(e):null},Vm=(e,t)=>t0(e)?(Hb.matches||Hb.msMatchesSelector).call(e,t):!1,Zy=e=>e?Xl(e.childNodes):[],mi=e=>e?e.parentElement:null,qc=(e,t)=>{if(t0(e)){const n=Hb.closest;if(n)return n.call(e,t);do{if(Vm(e,t))return e;e=mi(e)}while(e)}return null},ote=(e,t,n)=>{const r=e&&qc(e,t),o=e&&rte(n,r),s=qc(o,t)===r;return r&&o?r===e||o===e||s&&qc(qc(e,n),t)!==r:!1},e2=(e,t,n)=>{if(n&&e){let r=t,o;e0(n)?(o=document.createDocumentFragment(),Dn(n,s=>{s===r&&(r=s.previousSibling),o.appendChild(s)})):o=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(o,r||null)}},Ss=(e,t)=>{e2(e,null,t)},ste=(e,t)=>{e2(mi(e),e,t)},jj=(e,t)=>{e2(mi(e),e&&e.nextSibling,t)},Aa=e=>{if(e0(e))Dn(Xl(e),t=>Aa(t));else if(e){const t=mi(e);t&&t.removeChild(e)}},zl=e=>{const t=document.createElement("div");return e&&go(t,"class",e),t},iO=e=>{const t=zl();return t.innerHTML=e.trim(),Dn(Zy(t),n=>Aa(n))},Wb=e=>e.charAt(0).toUpperCase()+e.slice(1),ate=()=>zl().style,ite=["-webkit-","-moz-","-o-","-ms-"],lte=["WebKit","Moz","O","MS","webkit","moz","o","ms"],d1={},f1={},cte=e=>{let t=f1[e];if(n0(f1,e))return t;const n=Wb(e),r=ate();return Dn(ite,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,Wb(s)+n].find(c=>r[c]!==void 0))}),f1[e]=t||""},Vf=e=>{if(Wf()){let t=d1[e]||window[e];return n0(d1,e)||(Dn(lte,n=>(t=t||window[n+Wb(e)],!t)),d1[e]=t),t}},ute=Vf("MutationObserver"),_j=Vf("IntersectionObserver"),Kc=Vf("ResizeObserver"),lO=Vf("cancelAnimationFrame"),cO=Vf("requestAnimationFrame"),Um=Wf()&&window.setTimeout,Vb=Wf()&&window.clearTimeout,dte=/[^\x20\t\r\n\f]+/g,uO=(e,t,n)=>{const r=e&&e.classList;let o,s=0,i=!1;if(r&&t&&fl(t)){const c=t.match(dte)||[];for(i=c.length>0;o=c[s++];)i=!!n(r,o)&&i}return i},t2=(e,t)=>{uO(e,t,(n,r)=>n.remove(r))},ci=(e,t)=>(uO(e,t,(n,r)=>n.add(r)),t2.bind(0,e,t)),r0=(e,t,n,r)=>{if(e&&t){let o=!0;return Dn(n,s=>{const i=r?r(e[s]):e[s],c=r?r(t[s]):t[s];i!==c&&(o=!1)}),o}return!1},dO=(e,t)=>r0(e,t,["w","h"]),fO=(e,t)=>r0(e,t,["x","y"]),fte=(e,t)=>r0(e,t,["t","r","b","l"]),Ij=(e,t,n)=>r0(e,t,["width","height"],n&&(r=>Math.round(r))),ys=()=>{},Fc=e=>{let t;const n=e?Um:cO,r=e?Vb:lO;return[o=>{r(t),t=n(o,oa(e)?e():e)},()=>r(t)]},n2=(e,t)=>{let n,r,o,s=ys;const{v:i,g:c,p:d}=t||{},p=function(y){s(),Vb(n),n=r=void 0,s=ys,e.apply(this,y)},h=b=>d&&r?d(r,b):b,m=()=>{s!==ys&&p(h(o)||o)},g=function(){const y=Xl(arguments),x=oa(i)?i():i;if(Ji(x)&&x>=0){const S=oa(c)?c():c,j=Ji(S)&&S>=0,_=x>0?Um:cO,I=x>0?Vb:lO,M=h(y)||y,R=p.bind(0,M);s();const A=_(R,x);s=()=>I(A),j&&!n&&(n=Um(m,S)),r=o=M}else p(y)};return g.m=m,g},pte={opacity:1,zindex:1},ih=(e,t)=>{const n=t?parseFloat(e):parseInt(e,10);return n===n?n:0},hte=(e,t)=>!pte[e.toLowerCase()]&&Ji(t)?`${t}px`:t,Pj=(e,t,n)=>t!=null?t[n]||t.getPropertyValue(n):e.style[n],mte=(e,t,n)=>{try{const{style:r}=e;Ii(r[t])?r.setProperty(t,n):r[t]=hte(t,n)}catch{}},nf=e=>bo(e,"direction")==="rtl",Ej=(e,t,n)=>{const r=t?`${t}-`:"",o=n?`-${n}`:"",s=`${r}top${o}`,i=`${r}right${o}`,c=`${r}bottom${o}`,d=`${r}left${o}`,p=bo(e,[s,i,c,d]);return{t:ih(p[s],!0),r:ih(p[i],!0),b:ih(p[c],!0),l:ih(p[d],!0)}},{round:Mj}=Math,r2={w:0,h:0},rf=e=>e?{w:e.offsetWidth,h:e.offsetHeight}:r2,Ah=e=>e?{w:e.clientWidth,h:e.clientHeight}:r2,Gm=e=>e?{w:e.scrollWidth,h:e.scrollHeight}:r2,qm=e=>{const t=parseFloat(bo(e,"height"))||0,n=parseFloat(bo(e,"width"))||0;return{w:n-Mj(n),h:t-Mj(t)}},Sa=e=>e.getBoundingClientRect();let lh;const gte=()=>{if(Ii(lh)){lh=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get(){lh=!0}}))}catch{}}return lh},pO=e=>e.split(" "),vte=(e,t,n,r)=>{Dn(pO(t),o=>{e.removeEventListener(o,n,r)})},Gr=(e,t,n,r)=>{var o;const s=gte(),i=(o=s&&r&&r.S)!=null?o:s,c=r&&r.$||!1,d=r&&r.C||!1,p=[],h=s?{passive:i,capture:c}:c;return Dn(pO(t),m=>{const g=d?b=>{e.removeEventListener(m,g,c),n&&n(b)}:n;Gn(p,vte.bind(null,e,m,g,c)),e.addEventListener(m,g,h)}),Wa.bind(0,p)},hO=e=>e.stopPropagation(),mO=e=>e.preventDefault(),bte={x:0,y:0},p1=e=>{const t=e?Sa(e):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:bte},Oj=(e,t)=>{Dn(sa(t)?t:[t],e)},o2=e=>{const t=new Map,n=(s,i)=>{if(s){const c=t.get(s);Oj(d=>{c&&c[d?"delete":"clear"](d)},i)}else t.forEach(c=>{c.clear()}),t.clear()},r=(s,i)=>{if(fl(s)){const p=t.get(s)||new Set;return t.set(s,p),Oj(h=>{oa(h)&&p.add(h)},i),n.bind(0,s,i)}Qy(i)&&i&&n();const c=us(s),d=[];return Dn(c,p=>{const h=s[p];h&&Gn(d,r(p,h))}),Wa.bind(0,d)},o=(s,i)=>{const c=t.get(s);Dn(Xl(c),d=>{i&&!Yy(i)?d.apply(0,i):d()})};return r(e||{}),[r,n,o]},Rj=e=>JSON.stringify(e,(t,n)=>{if(oa(n))throw new Error;return n}),xte={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},gO=(e,t)=>{const n={},r=us(t).concat(us(e));return Dn(r,o=>{const s=e[o],i=t[o];if(tf(s)&&tf(i))kr(n[o]={},gO(s,i)),Jy(n[o])&&delete n[o];else if(n0(t,o)&&i!==s){let c=!0;if(sa(s)||sa(i))try{Rj(s)===Rj(i)&&(c=!1)}catch{}c&&(n[o]=i)}}),n},vO="os-environment",bO=`${vO}-flexbox-glue`,yte=`${bO}-max`,xO="os-scrollbar-hidden",h1="data-overlayscrollbars-initialize",qs="data-overlayscrollbars",yO=`${qs}-overflow-x`,CO=`${qs}-overflow-y`,cu="overflowVisible",Cte="scrollbarHidden",Aj="scrollbarPressed",Km="updating",Hi="data-overlayscrollbars-viewport",m1="arrange",wO="scrollbarHidden",uu=cu,Ub="data-overlayscrollbars-padding",wte=uu,Dj="data-overlayscrollbars-content",s2="os-size-observer",Ste=`${s2}-appear`,kte=`${s2}-listener`,jte="os-trinsic-observer",_te="os-no-css-vars",Ite="os-theme-none",Ko="os-scrollbar",Pte=`${Ko}-rtl`,Ete=`${Ko}-horizontal`,Mte=`${Ko}-vertical`,SO=`${Ko}-track`,a2=`${Ko}-handle`,Ote=`${Ko}-visible`,Rte=`${Ko}-cornerless`,Tj=`${Ko}-transitionless`,Nj=`${Ko}-interaction`,$j=`${Ko}-unusable`,Lj=`${Ko}-auto-hidden`,zj=`${Ko}-wheel`,Ate=`${SO}-interactive`,Dte=`${a2}-interactive`,kO={},Yl=()=>kO,Tte=e=>{const t=[];return Dn(sa(e)?e:[e],n=>{const r=us(n);Dn(r,o=>{Gn(t,kO[o]=n[o])})}),t},Nte="__osOptionsValidationPlugin",$te="__osSizeObserverPlugin",i2="__osScrollbarsHidingPlugin",Lte="__osClickScrollPlugin";let g1;const Fj=(e,t,n,r)=>{Ss(e,t);const o=Ah(t),s=rf(t),i=qm(n);return r&&Aa(t),{x:s.h-o.h+i.h,y:s.w-o.w+i.w}},zte=e=>{let t=!1;const n=ci(e,xO);try{t=bo(e,cte("scrollbar-width"))==="none"||window.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},Fte=(e,t)=>{const n="hidden";bo(e,{overflowX:n,overflowY:n,direction:"rtl"}),ea(e,0);const r=p1(e),o=p1(t);ea(e,-999);const s=p1(t);return{i:r.x===o.x,n:o.x!==s.x}},Bte=(e,t)=>{const n=ci(e,bO),r=Sa(e),o=Sa(t),s=Ij(o,r,!0),i=ci(e,yte),c=Sa(e),d=Sa(t),p=Ij(d,c,!0);return n(),i(),s&&p},Hte=()=>{const{body:e}=document,n=iO(`
`)[0],r=n.firstChild,[o,,s]=o2(),[i,c]=Gs({o:Fj(e,n,r),u:fO},Fj.bind(0,e,n,r,!0)),[d]=c(),p=zte(n),h={x:d.x===0,y:d.y===0},m={elements:{host:null,padding:!p,viewport:j=>p&&j===j.ownerDocument.body&&j,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},g=kr({},xte),b=kr.bind(0,{},g),y=kr.bind(0,{},m),x={k:d,A:h,I:p,L:bo(n,"zIndex")==="-1",B:Fte(n,r),V:Bte(n,r),Y:o.bind(0,"z"),j:o.bind(0,"r"),N:y,q:j=>kr(m,j)&&y(),F:b,G:j=>kr(g,j)&&b(),X:kr({},m),U:kr({},g)},C=window.addEventListener,S=n2(j=>s(j?"z":"r"),{v:33,g:99});if(zo(n,"style"),Aa(n),C("resize",S.bind(0,!1)),!p&&(!h.x||!h.y)){let j;C("resize",()=>{const _=Yl()[i2];j=j||_&&_.R(),j&&j(x,i,S.bind(0,!0))})}return x},Qo=()=>(g1||(g1=Hte()),g1),l2=(e,t)=>oa(t)?t.apply(0,e):t,Wte=(e,t,n,r)=>{const o=Ii(r)?n:r;return l2(e,o)||t.apply(0,e)},jO=(e,t,n,r)=>{const o=Ii(r)?n:r,s=l2(e,o);return!!s&&(Wm(s)?s:t.apply(0,e))},Vte=(e,t,n)=>{const{nativeScrollbarsOverlaid:r,body:o}=n||{},{A:s,I:i}=Qo(),{nativeScrollbarsOverlaid:c,body:d}=t,p=r??c,h=Ii(o)?d:o,m=(s.x||s.y)&&p,g=e&&(Zg(h)?!i:h);return!!m||!!g},c2=new WeakMap,Ute=(e,t)=>{c2.set(e,t)},Gte=e=>{c2.delete(e)},_O=e=>c2.get(e),Bj=(e,t)=>e?t.split(".").reduce((n,r)=>n&&n0(n,r)?n[r]:void 0,e):void 0,Gb=(e,t,n)=>r=>[Bj(e,r),n||Bj(t,r)!==void 0],IO=e=>{let t=e;return[()=>t,n=>{t=kr({},t,n)}]},ch="tabindex",uh=zl.bind(0,""),v1=e=>{Ss(mi(e),Zy(e)),Aa(e)},qte=e=>{const t=Qo(),{N:n,I:r}=t,o=Yl()[i2],s=o&&o.T,{elements:i}=n(),{host:c,padding:d,viewport:p,content:h}=i,m=Wm(e),g=m?{}:e,{elements:b}=g,{host:y,padding:x,viewport:C,content:S}=b||{},j=m?e:g.target,_=Vm(j,"textarea"),I=j.ownerDocument,P=I.documentElement,M=j===I.body,R=I.defaultView,A=Wte.bind(0,[j]),D=jO.bind(0,[j]),O=l2.bind(0,[j]),T=A.bind(0,uh,p),Y=D.bind(0,uh,h),z=T(C),W=z===j,Q=W&&M,U=!W&&Y(S),L=!W&&Wm(z)&&z===U,ee=L&&!!O(h),K=ee?T():z,Z=ee?U:Y(),fe=Q?P:L?K:z,G=_?A(uh,c,y):j,te=Q?fe:G,V=L?Z:U,F=I.activeElement,X=!W&&R.top===R&&F===j,ue={W:j,Z:te,J:fe,K:!W&&D(uh,d,x),tt:V,nt:!W&&!r&&s&&s(t),ot:Q?P:fe,st:Q?I:fe,et:R,ct:I,rt:_,it:M,lt:m,ut:W,dt:L,ft:(pt,vt)=>nte(fe,W?qs:Hi,W?vt:pt),_t:(pt,vt,ke)=>Ll(fe,W?qs:Hi,W?vt:pt,ke)},q=us(ue).reduce((pt,vt)=>{const ke=ue[vt];return Gn(pt,ke&&!mi(ke)?ke:!1)},[]),ne=pt=>pt?Xy(q,pt)>-1:null,{W:pe,Z:le,K:we,J:ve,tt:he,nt:Ne}=ue,De=[()=>{zo(le,qs),zo(le,h1),zo(pe,h1),M&&(zo(P,qs),zo(P,h1))}],qe=_&&ne(le);let Mt=_?pe:Zy([he,ve,we,le,pe].find(pt=>ne(pt)===!1));const ot=Q?pe:he||ve;return[ue,()=>{go(le,qs,W?"viewport":"host"),go(we,Ub,""),go(he,Dj,""),W||go(ve,Hi,"");const pt=M&&!W?ci(mi(j),xO):ys;if(qe&&(jj(pe,le),Gn(De,()=>{jj(le,pe),Aa(le)})),Ss(ot,Mt),Ss(le,we),Ss(we||le,!W&&ve),Ss(ve,he),Gn(De,()=>{pt(),zo(we,Ub),zo(he,Dj),zo(ve,yO),zo(ve,CO),zo(ve,Hi),ne(he)&&v1(he),ne(ve)&&v1(ve),ne(we)&&v1(we)}),r&&!W&&(Ll(ve,Hi,wO,!0),Gn(De,zo.bind(0,ve,Hi))),Ne&&(ste(ve,Ne),Gn(De,Aa.bind(0,Ne))),X){const vt=go(ve,ch);go(ve,ch,"-1"),ve.focus();const ke=()=>vt?go(ve,ch,vt):zo(ve,ch),Be=Gr(I,"pointerdown keydown",()=>{ke(),Be()});Gn(De,[ke,Be])}else F&&F.focus&&F.focus();Mt=0},Wa.bind(0,De)]},Kte=(e,t)=>{const{tt:n}=e,[r]=t;return o=>{const{V:s}=Qo(),{ht:i}=r(),{vt:c}=o,d=(n||!s)&&c;return d&&bo(n,{height:i?"":"100%"}),{gt:d,wt:d}}},Qte=(e,t)=>{const[n,r]=t,{Z:o,K:s,J:i,ut:c}=e,[d,p]=Gs({u:fte,o:Ej()},Ej.bind(0,o,"padding",""));return(h,m,g)=>{let[b,y]=p(g);const{I:x,V:C}=Qo(),{bt:S}=n(),{gt:j,wt:_,yt:I}=h,[P,M]=m("paddingAbsolute");(j||y||!C&&_)&&([b,y]=d(g));const A=!c&&(M||I||y);if(A){const D=!P||!s&&!x,O=b.r+b.l,T=b.t+b.b,Y={marginRight:D&&!S?-O:0,marginBottom:D?-T:0,marginLeft:D&&S?-O:0,top:D?-b.t:0,right:D?S?-b.r:"auto":0,left:D?S?"auto":-b.l:0,width:D?`calc(100% + ${O}px)`:""},z={paddingTop:D?b.t:0,paddingRight:D?b.r:0,paddingBottom:D?b.b:0,paddingLeft:D?b.l:0};bo(s||i,Y),bo(i,z),r({K:b,St:!D,P:s?z:kr({},Y,z)})}return{xt:A}}},{max:qb}=Math,Wi=qb.bind(0,0),PO="visible",Hj="hidden",Xte=42,dh={u:dO,o:{w:0,h:0}},Yte={u:fO,o:{x:Hj,y:Hj}},Jte=(e,t)=>{const n=window.devicePixelRatio%1!==0?1:0,r={w:Wi(e.w-t.w),h:Wi(e.h-t.h)};return{w:r.w>n?r.w:0,h:r.h>n?r.h:0}},fh=e=>e.indexOf(PO)===0,Zte=(e,t)=>{const[n,r]=t,{Z:o,K:s,J:i,nt:c,ut:d,_t:p,it:h,et:m}=e,{k:g,V:b,I:y,A:x}=Qo(),C=Yl()[i2],S=!d&&!y&&(x.x||x.y),j=h&&d,[_,I]=Gs(dh,qm.bind(0,i)),[P,M]=Gs(dh,Gm.bind(0,i)),[R,A]=Gs(dh),[D,O]=Gs(dh),[T]=Gs(Yte),Y=(ee,K)=>{if(bo(i,{height:""}),K){const{St:Z,K:se}=n(),{$t:fe,D:G}=ee,te=qm(o),V=Ah(o),F=bo(i,"boxSizing")==="content-box",X=Z||F?se.b+se.t:0,ue=!(x.x&&F);bo(i,{height:V.h+te.h+(fe.x&&ue?G.x:0)-X})}},z=(ee,K)=>{const Z=!y&&!ee?Xte:0,se=(ne,pe,le)=>{const we=bo(i,ne),he=(K?K[ne]:we)==="scroll";return[we,he,he&&!y?pe?Z:le:0,pe&&!!Z]},[fe,G,te,V]=se("overflowX",x.x,g.x),[F,X,ue,q]=se("overflowY",x.y,g.y);return{Ct:{x:fe,y:F},$t:{x:G,y:X},D:{x:te,y:ue},M:{x:V,y:q}}},W=(ee,K,Z,se)=>{const fe=(X,ue)=>{const q=fh(X),ne=ue&&q&&X.replace(`${PO}-`,"")||"";return[ue&&!q?X:"",fh(ne)?"hidden":ne]},[G,te]=fe(Z.x,K.x),[V,F]=fe(Z.y,K.y);return se.overflowX=te&&V?te:G,se.overflowY=F&&G?F:V,z(ee,se)},Q=(ee,K,Z,se)=>{const{D:fe,M:G}=ee,{x:te,y:V}=G,{x:F,y:X}=fe,{P:ue}=n(),q=K?"marginLeft":"marginRight",ne=K?"paddingLeft":"paddingRight",pe=ue[q],le=ue.marginBottom,we=ue[ne],ve=ue.paddingBottom;se.width=`calc(100% + ${X+-1*pe}px)`,se[q]=-X+pe,se.marginBottom=-F+le,Z&&(se[ne]=we+(V?X:0),se.paddingBottom=ve+(te?F:0))},[U,L]=C?C.H(S,b,i,c,n,z,Q):[()=>S,()=>[ys]];return(ee,K,Z)=>{const{gt:se,Ot:fe,wt:G,xt:te,vt:V,yt:F}=ee,{ht:X,bt:ue}=n(),[q,ne]=K("showNativeOverlaidScrollbars"),[pe,le]=K("overflow"),we=q&&x.x&&x.y,ve=!d&&!b&&(se||G||fe||ne||V),he=fh(pe.x),Ne=fh(pe.y),De=he||Ne;let qe=I(Z),Mt=M(Z),ot=A(Z),an=O(Z),pt;if(ne&&y&&p(wO,Cte,!we),ve&&(pt=z(we),Y(pt,X)),se||te||G||F||ne){De&&p(uu,cu,!1);const[Me,Ze]=L(we,ue,pt),[Ye,ut]=qe=_(Z),[Ut,xr]=Mt=P(Z),yn=Ah(i);let hn=Ut,oo=yn;Me(),(xr||ut||ne)&&Ze&&!we&&U(Ze,Ut,Ye,ue)&&(oo=Ah(i),hn=Gm(i));const Dr={w:Wi(qb(Ut.w,hn.w)+Ye.w),h:Wi(qb(Ut.h,hn.h)+Ye.h)},nr={w:Wi((j?m.innerWidth:oo.w+Wi(yn.w-Ut.w))+Ye.w),h:Wi((j?m.innerHeight+Ye.h:oo.h+Wi(yn.h-Ut.h))+Ye.h)};an=D(nr),ot=R(Jte(Dr,nr),Z)}const[vt,ke]=an,[Be,Ot]=ot,[Ht,je]=Mt,[ht,At]=qe,_t={x:Be.w>0,y:Be.h>0},Re=he&&Ne&&(_t.x||_t.y)||he&&_t.x&&!_t.y||Ne&&_t.y&&!_t.x;if(te||F||At||je||ke||Ot||le||ne||ve){const Me={marginRight:0,marginBottom:0,marginLeft:0,width:"",overflowY:"",overflowX:""},Ze=W(we,_t,pe,Me),Ye=U(Ze,Ht,ht,ue);d||Q(Ze,ue,Ye,Me),ve&&Y(Ze,X),d?(go(o,yO,Me.overflowX),go(o,CO,Me.overflowY)):bo(i,Me)}Ll(o,qs,cu,Re),Ll(s,Ub,wte,Re),d||Ll(i,Hi,uu,De);const[Xe,_n]=T(z(we).Ct);return r({Ct:Xe,zt:{x:vt.w,y:vt.h},Tt:{x:Be.w,y:Be.h},Et:_t}),{It:_n,At:ke,Lt:Ot}}},Wj=(e,t,n)=>{const r={},o=t||{},s=us(e).concat(us(o));return Dn(s,i=>{const c=e[i],d=o[i];r[i]=!!(n||c||d)}),r},ene=(e,t)=>{const{W:n,J:r,_t:o,ut:s}=e,{I:i,A:c,V:d}=Qo(),p=!i&&(c.x||c.y),h=[Kte(e,t),Qte(e,t),Zte(e,t)];return(m,g,b)=>{const y=Wj(kr({gt:!1,xt:!1,yt:!1,vt:!1,At:!1,Lt:!1,It:!1,Ot:!1,wt:!1},g),{},b),x=p||!d,C=x&&ea(r),S=x&&li(r);o("",Km,!0);let j=y;return Dn(h,_=>{j=Wj(j,_(j,m,!!b)||{},b)}),ea(r,C),li(r,S),o("",Km),s||(ea(n,0),li(n,0)),j}},tne=(e,t,n)=>{let r,o=!1;const s=()=>{o=!0},i=c=>{if(n){const d=n.reduce((p,h)=>{if(h){const[m,g]=h,b=g&&m&&(c?c(m):aO(m,e));b&&b.length&&g&&fl(g)&&Gn(p,[b,g.trim()],!0)}return p},[]);Dn(d,p=>Dn(p[0],h=>{const m=p[1],g=r.get(h)||[];if(e.contains(h)){const y=Gr(h,m,x=>{o?(y(),r.delete(h)):t(x)});r.set(h,Gn(g,y))}else Wa(g),r.delete(h)}))}};return n&&(r=new WeakMap,i()),[s,i]},Vj=(e,t,n,r)=>{let o=!1;const{Ht:s,Pt:i,Dt:c,Mt:d,Rt:p,kt:h}=r||{},m=n2(()=>{o&&n(!0)},{v:33,g:99}),[g,b]=tne(e,m,c),y=s||[],x=i||[],C=y.concat(x),S=(_,I)=>{const P=p||ys,M=h||ys,R=new Set,A=new Set;let D=!1,O=!1;if(Dn(_,T=>{const{attributeName:Y,target:z,type:W,oldValue:Q,addedNodes:U,removedNodes:L}=T,ee=W==="attributes",K=W==="childList",Z=e===z,se=ee&&fl(Y)?go(z,Y):0,fe=se!==0&&Q!==se,G=Xy(x,Y)>-1&&fe;if(t&&(K||!Z)){const te=!ee,V=ee&&fe,F=V&&d&&Vm(z,d),ue=(F?!P(z,Y,Q,se):te||V)&&!M(T,!!F,e,r);Dn(U,q=>R.add(q)),Dn(L,q=>R.add(q)),O=O||ue}!t&&Z&&fe&&!P(z,Y,Q,se)&&(A.add(Y),D=D||G)}),R.size>0&&b(T=>Xl(R).reduce((Y,z)=>(Gn(Y,aO(T,z)),Vm(z,T)?Gn(Y,z):Y),[])),t)return!I&&O&&n(!1),[!1];if(A.size>0||D){const T=[Xl(A),D];return!I&&n.apply(0,T),T}},j=new ute(_=>S(_));return j.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:C,subtree:t,childList:t,characterData:t}),o=!0,[()=>{o&&(g(),j.disconnect(),o=!1)},()=>{if(o){m.m();const _=j.takeRecords();return!Yy(_)&&S(_,!0)}}]},ph=3333333,hh=e=>e&&(e.height||e.width),EO=(e,t,n)=>{const{Bt:r=!1,Vt:o=!1}=n||{},s=Yl()[$te],{B:i}=Qo(),d=iO(`
`)[0],p=d.firstChild,h=nf.bind(0,e),[m]=Gs({o:void 0,_:!0,u:(x,C)=>!(!x||!hh(x)&&hh(C))}),g=x=>{const C=sa(x)&&x.length>0&&tf(x[0]),S=!C&&Qy(x[0]);let j=!1,_=!1,I=!0;if(C){const[P,,M]=m(x.pop().contentRect),R=hh(P),A=hh(M);j=!M||!R,_=!A&&R,I=!j}else S?[,I]=x:_=x===!0;if(r&&I){const P=S?x[0]:nf(d);ea(d,P?i.n?-ph:i.i?0:ph:ph),li(d,ph)}j||t({gt:!S,Yt:S?x:void 0,Vt:!!_})},b=[];let y=o?g:!1;return[()=>{Wa(b),Aa(d)},()=>{if(Kc){const x=new Kc(g);x.observe(p),Gn(b,()=>{x.disconnect()})}else if(s){const[x,C]=s.O(p,g,o);y=x,Gn(b,C)}if(r){const[x]=Gs({o:void 0},h);Gn(b,Gr(d,"scroll",C=>{const S=x(),[j,_,I]=S;_&&(t2(p,"ltr rtl"),j?ci(p,"rtl"):ci(p,"ltr"),g([!!j,_,I])),hO(C)}))}y&&(ci(d,Ste),Gn(b,Gr(d,"animationstart",y,{C:!!Kc}))),(Kc||s)&&Ss(e,d)}]},nne=e=>e.h===0||e.isIntersecting||e.intersectionRatio>0,rne=(e,t)=>{let n;const r=zl(jte),o=[],[s]=Gs({o:!1}),i=(d,p)=>{if(d){const h=s(nne(d)),[,m]=h;if(m)return!p&&t(h),[h]}},c=(d,p)=>{if(d&&d.length>0)return i(d.pop(),p)};return[()=>{Wa(o),Aa(r)},()=>{if(_j)n=new _j(d=>c(d),{root:e}),n.observe(r),Gn(o,()=>{n.disconnect()});else{const d=()=>{const m=rf(r);i(m)},[p,h]=EO(r,d);Gn(o,p),h(),d()}Ss(e,r)},()=>{if(n)return c(n.takeRecords(),!0)}]},Uj=`[${qs}]`,one=`[${Hi}]`,b1=["tabindex"],Gj=["wrap","cols","rows"],x1=["id","class","style","open"],sne=(e,t,n)=>{let r,o,s;const{Z:i,J:c,tt:d,rt:p,ut:h,ft:m,_t:g}=e,{V:b}=Qo(),[y]=Gs({u:dO,o:{w:0,h:0}},()=>{const W=m(uu,cu),Q=m(m1,""),U=Q&&ea(c),L=Q&&li(c);g(uu,cu),g(m1,""),g("",Km,!0);const ee=Gm(d),K=Gm(c),Z=qm(c);return g(uu,cu,W),g(m1,"",Q),g("",Km),ea(c,U),li(c,L),{w:K.w+ee.w+Z.w,h:K.h+ee.h+Z.h}}),x=p?Gj:x1.concat(Gj),C=n2(n,{v:()=>r,g:()=>o,p(W,Q){const[U]=W,[L]=Q;return[us(U).concat(us(L)).reduce((ee,K)=>(ee[K]=U[K]||L[K],ee),{})]}}),S=W=>{Dn(W||b1,Q=>{if(Xy(b1,Q)>-1){const U=go(i,Q);fl(U)?go(c,Q,U):zo(c,Q)}})},j=(W,Q)=>{const[U,L]=W,ee={vt:L};return t({ht:U}),!Q&&n(ee),ee},_=({gt:W,Yt:Q,Vt:U})=>{const L=!W||U?n:C;let ee=!1;if(Q){const[K,Z]=Q;ee=Z,t({bt:K})}L({gt:W,yt:ee})},I=(W,Q)=>{const[,U]=y(),L={wt:U};return U&&!Q&&(W?n:C)(L),L},P=(W,Q,U)=>{const L={Ot:Q};return Q?!U&&C(L):h||S(W),L},[M,R,A]=d||!b?rne(i,j):[ys,ys,ys],[D,O]=h?[ys,ys]:EO(i,_,{Vt:!0,Bt:!0}),[T,Y]=Vj(i,!1,P,{Pt:x1,Ht:x1.concat(b1)}),z=h&&Kc&&new Kc(_.bind(0,{gt:!0}));return z&&z.observe(i),S(),[()=>{M(),D(),s&&s[0](),z&&z.disconnect(),T()},()=>{O(),R()},()=>{const W={},Q=Y(),U=A(),L=s&&s[1]();return Q&&kr(W,P.apply(0,Gn(Q,!0))),U&&kr(W,j.apply(0,Gn(U,!0))),L&&kr(W,I.apply(0,Gn(L,!0))),W},W=>{const[Q]=W("update.ignoreMutation"),[U,L]=W("update.attributes"),[ee,K]=W("update.elementEvents"),[Z,se]=W("update.debounce"),fe=K||L,G=te=>oa(Q)&&Q(te);if(fe&&(s&&(s[1](),s[0]()),s=Vj(d||c,!0,I,{Ht:x.concat(U||[]),Dt:ee,Mt:Uj,kt:(te,V)=>{const{target:F,attributeName:X}=te;return(!V&&X&&!h?ote(F,Uj,one):!1)||!!qc(F,`.${Ko}`)||!!G(te)}})),se)if(C.m(),sa(Z)){const te=Z[0],V=Z[1];r=Ji(te)&&te,o=Ji(V)&&V}else Ji(Z)?(r=Z,o=!1):(r=!1,o=!1)}]},qj={x:0,y:0},ane=e=>({K:{t:0,r:0,b:0,l:0},St:!1,P:{marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},zt:qj,Tt:qj,Ct:{x:"hidden",y:"hidden"},Et:{x:!1,y:!1},ht:!1,bt:nf(e.Z)}),ine=(e,t)=>{const n=Gb(t,{}),[r,o,s]=o2(),[i,c,d]=qte(e),p=IO(ane(i)),[h,m]=p,g=ene(i,p),b=(_,I,P)=>{const R=us(_).some(A=>_[A])||!Jy(I)||P;return R&&s("u",[_,I,P]),R},[y,x,C,S]=sne(i,m,_=>b(g(n,_),{},!1)),j=h.bind(0);return j.jt=_=>r("u",_),j.Nt=()=>{const{W:_,J:I}=i,P=ea(_),M=li(_);x(),c(),ea(I,P),li(I,M)},j.qt=i,[(_,I)=>{const P=Gb(t,_,I);return S(P),b(g(P,C(),I),_,!!I)},j,()=>{o(),y(),d()}]},{round:Kj}=Math,lne=e=>{const{width:t,height:n}=Sa(e),{w:r,h:o}=rf(e);return{x:Kj(t)/r||1,y:Kj(n)/o||1}},cne=(e,t,n)=>{const r=t.scrollbars,{button:o,isPrimary:s,pointerType:i}=e,{pointers:c}=r;return o===0&&s&&r[n?"dragScroll":"clickScroll"]&&(c||[]).includes(i)},une=(e,t)=>Gr(e,"mousedown",Gr.bind(0,t,"click",hO,{C:!0,$:!0}),{$:!0}),Qj="pointerup pointerleave pointercancel lostpointercapture",dne=(e,t,n,r,o,s,i)=>{const{B:c}=Qo(),{Ft:d,Gt:p,Xt:h}=r,m=`scroll${i?"Left":"Top"}`,g=`client${i?"X":"Y"}`,b=i?"width":"height",y=i?"left":"top",x=i?"w":"h",C=i?"x":"y",S=(j,_)=>I=>{const{Tt:P}=s(),M=rf(p)[x]-rf(d)[x],A=_*I/M*P[C],O=nf(h)&&i?c.n||c.i?1:-1:1;o[m]=j+A*O};return Gr(p,"pointerdown",j=>{const _=qc(j.target,`.${a2}`)===d,I=_?d:p;if(Ll(t,qs,Aj,!0),cne(j,e,_)){const P=!_&&j.shiftKey,M=()=>Sa(d),R=()=>Sa(p),A=(K,Z)=>(K||M())[y]-(Z||R())[y],D=S(o[m]||0,1/lne(o)[C]),O=j[g],T=M(),Y=R(),z=T[b],W=A(T,Y)+z/2,Q=O-Y[y],U=_?0:Q-W,L=K=>{Wa(ee),I.releasePointerCapture(K.pointerId)},ee=[Ll.bind(0,t,qs,Aj),Gr(n,Qj,L),Gr(n,"selectstart",K=>mO(K),{S:!1}),Gr(p,Qj,L),Gr(p,"pointermove",K=>{const Z=K[g]-O;(_||P)&&D(U+Z)})];if(P)D(U);else if(!_){const K=Yl()[Lte];K&&Gn(ee,K.O(D,A,U,z,Q))}I.setPointerCapture(j.pointerId)}})},fne=(e,t)=>(n,r,o,s,i,c)=>{const{Xt:d}=n,[p,h]=Fc(333),m=!!i.scrollBy;let g=!0;return Wa.bind(0,[Gr(d,"pointerenter",()=>{r(Nj,!0)}),Gr(d,"pointerleave pointercancel",()=>{r(Nj)}),Gr(d,"wheel",b=>{const{deltaX:y,deltaY:x,deltaMode:C}=b;m&&g&&C===0&&mi(d)===s&&i.scrollBy({left:y,top:x,behavior:"smooth"}),g=!1,r(zj,!0),p(()=>{g=!0,r(zj)}),mO(b)},{S:!1,$:!0}),une(d,o),dne(e,s,o,n,i,t,c),h])},{min:Kb,max:Xj,abs:pne,round:hne}=Math,MO=(e,t,n,r)=>{if(r){const c=n?"x":"y",{Tt:d,zt:p}=r,h=p[c],m=d[c];return Xj(0,Kb(1,h/(h+m)))}const o=n?"width":"height",s=Sa(e)[o],i=Sa(t)[o];return Xj(0,Kb(1,s/i))},mne=(e,t,n,r,o,s)=>{const{B:i}=Qo(),c=s?"x":"y",d=s?"Left":"Top",{Tt:p}=r,h=hne(p[c]),m=pne(n[`scroll${d}`]),g=s&&o,b=i.i?m:h-m,x=Kb(1,(g?b:m)/h),C=MO(e,t,s);return 1/C*(1-C)*x},gne=(e,t,n)=>{const{N:r,L:o}=Qo(),{scrollbars:s}=r(),{slot:i}=s,{ct:c,W:d,Z:p,J:h,lt:m,ot:g,it:b,ut:y}=t,{scrollbars:x}=m?{}:e,{slot:C}=x||{},S=jO([d,p,h],()=>y&&b?d:p,i,C),j=(U,L,ee)=>{const K=ee?ci:t2;Dn(U,Z=>{K(Z.Xt,L)})},_=(U,L)=>{Dn(U,ee=>{const[K,Z]=L(ee);bo(K,Z)})},I=(U,L,ee)=>{_(U,K=>{const{Ft:Z,Gt:se}=K;return[Z,{[ee?"width":"height"]:`${(100*MO(Z,se,ee,L)).toFixed(3)}%`}]})},P=(U,L,ee)=>{const K=ee?"X":"Y";_(U,Z=>{const{Ft:se,Gt:fe,Xt:G}=Z,te=mne(se,fe,g,L,nf(G),ee);return[se,{transform:te===te?`translate${K}(${(100*te).toFixed(3)}%)`:""}]})},M=[],R=[],A=[],D=(U,L,ee)=>{const K=Qy(ee),Z=K?ee:!0,se=K?!ee:!0;Z&&j(R,U,L),se&&j(A,U,L)},O=U=>{I(R,U,!0),I(A,U)},T=U=>{P(R,U,!0),P(A,U)},Y=U=>{const L=U?Ete:Mte,ee=U?R:A,K=Yy(ee)?Tj:"",Z=zl(`${Ko} ${L} ${K}`),se=zl(SO),fe=zl(a2),G={Xt:Z,Gt:se,Ft:fe};return o||ci(Z,_te),Ss(Z,se),Ss(se,fe),Gn(ee,G),Gn(M,[Aa.bind(0,Z),n(G,D,c,p,g,U)]),G},z=Y.bind(0,!0),W=Y.bind(0,!1),Q=()=>{Ss(S,R[0].Xt),Ss(S,A[0].Xt),Um(()=>{D(Tj)},300)};return z(),W(),[{Ut:O,Wt:T,Zt:D,Jt:{Kt:R,Qt:z,tn:_.bind(0,R)},nn:{Kt:A,Qt:W,tn:_.bind(0,A)}},Q,Wa.bind(0,M)]},vne=(e,t,n,r)=>{let o,s,i,c,d,p=0;const h=IO({}),[m]=h,[g,b]=Fc(),[y,x]=Fc(),[C,S]=Fc(100),[j,_]=Fc(100),[I,P]=Fc(()=>p),[M,R,A]=gne(e,n.qt,fne(t,n)),{Z:D,J:O,ot:T,st:Y,ut:z,it:W}=n.qt,{Jt:Q,nn:U,Zt:L,Ut:ee,Wt:K}=M,{tn:Z}=Q,{tn:se}=U,fe=X=>{const{Xt:ue}=X,q=z&&!W&&mi(ue)===O&&ue;return[q,{transform:q?`translate(${ea(T)}px, ${li(T)}px)`:""}]},G=(X,ue)=>{if(P(),X)L(Lj);else{const q=()=>L(Lj,!0);p>0&&!ue?I(q):q()}},te=()=>{c=s,c&&G(!0)},V=[S,P,_,x,b,A,Gr(D,"pointerover",te,{C:!0}),Gr(D,"pointerenter",te),Gr(D,"pointerleave",()=>{c=!1,s&&G(!1)}),Gr(D,"pointermove",()=>{o&&g(()=>{S(),G(!0),j(()=>{o&&G(!1)})})}),Gr(Y,"scroll",X=>{y(()=>{K(n()),i&&G(!0),C(()=>{i&&!c&&G(!1)})}),r(X),z&&Z(fe),z&&se(fe)})],F=m.bind(0);return F.qt=M,F.Nt=R,[(X,ue,q)=>{const{At:ne,Lt:pe,It:le,yt:we}=q,{A:ve}=Qo(),he=Gb(t,X,ue),Ne=n(),{Tt:De,Ct:qe,bt:Mt}=Ne,[ot,an]=he("showNativeOverlaidScrollbars"),[pt,vt]=he("scrollbars.theme"),[ke,Be]=he("scrollbars.visibility"),[Ot,Ht]=he("scrollbars.autoHide"),[je]=he("scrollbars.autoHideDelay"),[ht,At]=he("scrollbars.dragScroll"),[_t,Re]=he("scrollbars.clickScroll"),Xe=ne||pe||we,_n=le||Be,Me=ot&&ve.x&&ve.y,Ze=(Ye,ut)=>{const Ut=ke==="visible"||ke==="auto"&&Ye==="scroll";return L(Ote,Ut,ut),Ut};if(p=je,an&&L(Ite,Me),vt&&(L(d),L(pt,!0),d=pt),Ht&&(o=Ot==="move",s=Ot==="leave",i=Ot!=="never",G(!i,!0)),At&&L(Dte,ht),Re&&L(Ate,_t),_n){const Ye=Ze(qe.x,!0),ut=Ze(qe.y,!1);L(Rte,!(Ye&&ut))}Xe&&(ee(Ne),K(Ne),L($j,!De.x,!0),L($j,!De.y,!1),L(Pte,Mt&&!W))},F,Wa.bind(0,V)]},OO=(e,t,n)=>{oa(e)&&e(t||void 0,n||void 0)},qi=(e,t,n)=>{const{F:r,N:o,Y:s,j:i}=Qo(),c=Yl(),d=Wm(e),p=d?e:e.target,h=_O(p);if(t&&!h){let m=!1;const g=z=>{const W=Yl()[Nte],Q=W&&W.O;return Q?Q(z,!0):z},b=kr({},r(),g(t)),[y,x,C]=o2(n),[S,j,_]=ine(e,b),[I,P,M]=vne(e,b,j,z=>C("scroll",[Y,z])),R=(z,W)=>S(z,!!W),A=R.bind(0,{},!0),D=s(A),O=i(A),T=z=>{Gte(p),D(),O(),M(),_(),m=!0,C("destroyed",[Y,!!z]),x()},Y={options(z,W){if(z){const Q=W?r():{},U=gO(b,kr(Q,g(z)));Jy(U)||(kr(b,U),R(U))}return kr({},b)},on:y,off:(z,W)=>{z&&W&&x(z,W)},state(){const{zt:z,Tt:W,Ct:Q,Et:U,K:L,St:ee,bt:K}=j();return kr({},{overflowEdge:z,overflowAmount:W,overflowStyle:Q,hasOverflow:U,padding:L,paddingAbsolute:ee,directionRTL:K,destroyed:m})},elements(){const{W:z,Z:W,K:Q,J:U,tt:L,ot:ee,st:K}=j.qt,{Jt:Z,nn:se}=P.qt,fe=te=>{const{Ft:V,Gt:F,Xt:X}=te;return{scrollbar:X,track:F,handle:V}},G=te=>{const{Kt:V,Qt:F}=te,X=fe(V[0]);return kr({},X,{clone:()=>{const ue=fe(F());return I({},!0,{}),ue}})};return kr({},{target:z,host:W,padding:Q||U,viewport:U,content:L||U,scrollOffsetElement:ee,scrollEventElement:K,scrollbarHorizontal:G(Z),scrollbarVertical:G(se)})},update:z=>R({},z),destroy:T.bind(0)};return j.jt((z,W,Q)=>{I(W,Q,z)}),Ute(p,Y),Dn(us(c),z=>OO(c[z],0,Y)),Vte(j.qt.it,o().cancel,!d&&e.cancel)?(T(!0),Y):(j.Nt(),P.Nt(),C("initialized",[Y]),j.jt((z,W,Q)=>{const{gt:U,yt:L,vt:ee,At:K,Lt:Z,It:se,wt:fe,Ot:G}=z;C("updated",[Y,{updateHints:{sizeChanged:U,directionChanged:L,heightIntrinsicChanged:ee,overflowEdgeChanged:K,overflowAmountChanged:Z,overflowStyleChanged:se,contentMutation:fe,hostMutation:G},changedOptions:W,force:Q}])}),Y.update(!0),Y)}return h};qi.plugin=e=>{Dn(Tte(e),t=>OO(t,qi))};qi.valid=e=>{const t=e&&e.elements,n=oa(t)&&t();return Bb(n)&&!!_O(n.target)};qi.env=()=>{const{k:e,A:t,I:n,B:r,V:o,L:s,X:i,U:c,N:d,q:p,F:h,G:m}=Qo();return kr({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:o,cssCustomProperties:s,staticDefaultInitialization:i,staticDefaultOptions:c,getDefaultInitialization:d,setDefaultInitialization:p,getDefaultOptions:h,setDefaultOptions:m})};const bne=()=>{if(typeof window>"u"){const p=()=>{};return[p,p]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",o=n.requestAnimationFrame,s=n.cancelAnimationFrame,i=r?n.requestIdleCallback:o,c=r?n.cancelIdleCallback:s,d=()=>{c(e),s(t)};return[(p,h)=>{d(),e=i(r?()=>{d(),t=o(p)}:p,typeof h=="object"?h:{timeout:2233})},d]},u2=e=>{const{options:t,events:n,defer:r}=e||{},[o,s]=l.useMemo(bne,[]),i=l.useRef(null),c=l.useRef(r),d=l.useRef(t),p=l.useRef(n);return l.useEffect(()=>{c.current=r},[r]),l.useEffect(()=>{const{current:h}=i;d.current=t,qi.valid(h)&&h.options(t||{},!0)},[t]),l.useEffect(()=>{const{current:h}=i;p.current=n,qi.valid(h)&&h.on(n||{},!0)},[n]),l.useEffect(()=>()=>{var h;s(),(h=i.current)==null||h.destroy()},[]),l.useMemo(()=>[h=>{const m=i.current;if(qi.valid(m))return;const g=c.current,b=d.current||{},y=p.current||{},x=()=>i.current=qi(h,b,y);g?o(x,g):x()},()=>i.current],[])},xne=(e,t)=>{const{element:n="div",options:r,events:o,defer:s,children:i,...c}=e,d=n,p=l.useRef(null),h=l.useRef(null),[m,g]=u2({options:r,events:o,defer:s});return l.useEffect(()=>{const{current:b}=p,{current:y}=h;return b&&y&&m({target:b,elements:{viewport:y,content:y}}),()=>{var x;return(x=g())==null?void 0:x.destroy()}},[m,n]),l.useImperativeHandle(t,()=>({osInstance:g,getElement:()=>p.current}),[]),B.createElement(d,{"data-overlayscrollbars-initialize":"",ref:p,...c},B.createElement("div",{ref:h},i))},o0=l.forwardRef(xne);var RO={exports:{}},AO={};const ts=Sx(LD),Cd=Sx(zD),yne=Sx(FD);(function(e){var t,n,r=Cc&&Cc.__generator||function(re,ie){var be,Pe,xe,ft,it={label:0,sent:function(){if(1&xe[0])throw xe[1];return xe[1]},trys:[],ops:[]};return ft={next:Kt(0),throw:Kt(1),return:Kt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function Kt(mt){return function(wt){return function(We){if(be)throw new TypeError("Generator is already executing.");for(;it;)try{if(be=1,Pe&&(xe=2&We[0]?Pe.return:We[0]?Pe.throw||((xe=Pe.return)&&xe.call(Pe),0):Pe.next)&&!(xe=xe.call(Pe,We[1])).done)return xe;switch(Pe=0,xe&&(We=[2&We[0],xe.value]),We[0]){case 0:case 1:xe=We;break;case 4:return it.label++,{value:We[1],done:!1};case 5:it.label++,Pe=We[1],We=[0];continue;case 7:We=it.ops.pop(),it.trys.pop();continue;default:if(!((xe=(xe=it.trys).length>0&&xe[xe.length-1])||We[0]!==6&&We[0]!==2)){it=0;continue}if(We[0]===3&&(!xe||We[1]>xe[0]&&We[1]=200&&re.status<=299},Y=function(re){return/ion\/(vnd\.api\+)?json/.test(re.get("content-type")||"")};function z(re){if(!(0,D.isPlainObject)(re))return re;for(var ie=C({},re),be=0,Pe=Object.entries(ie);be"u"&&it===O&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(sn,Yt){return P(ie,null,function(){var He,Ct,zt,Qt,Nn,Jt,vn,fn,Br,cr,Dt,$n,Wn,ur,Ir,Kn,Qn,bn,On,Ln,In,Pn,Je,Nt,kt,lt,St,Gt,bt,st,Le,Ae,ze,Ve,nt,Ft;return r(this,function($t){switch($t.label){case 0:return He=Yt.signal,Ct=Yt.getState,zt=Yt.extra,Qt=Yt.endpoint,Nn=Yt.forced,Jt=Yt.type,Br=(fn=typeof sn=="string"?{url:sn}:sn).url,Dt=(cr=fn.headers)===void 0?new Headers(Zt.headers):cr,Wn=($n=fn.params)===void 0?void 0:$n,Ir=(ur=fn.responseHandler)===void 0?Tt??"json":ur,Qn=(Kn=fn.validateStatus)===void 0?Vt??T:Kn,On=(bn=fn.timeout)===void 0?Et:bn,Ln=_(fn,["url","headers","params","responseHandler","validateStatus","timeout"]),In=C(S(C({},Zt),{signal:He}),Ln),Dt=new Headers(z(Dt)),Pn=In,[4,xe(Dt,{getState:Ct,extra:zt,endpoint:Qt,forced:Nn,type:Jt})];case 1:Pn.headers=$t.sent()||Dt,Je=function(Ue){return typeof Ue=="object"&&((0,D.isPlainObject)(Ue)||Array.isArray(Ue)||typeof Ue.toJSON=="function")},!In.headers.has("content-type")&&Je(In.body)&&In.headers.set("content-type",Ie),Je(In.body)&&wt(In.headers)&&(In.body=JSON.stringify(In.body,et)),Wn&&(Nt=~Br.indexOf("?")?"&":"?",kt=Kt?Kt(Wn):new URLSearchParams(z(Wn)),Br+=Nt+kt),Br=function(Ue,cn){if(!Ue)return cn;if(!cn)return Ue;if(function(Cn){return new RegExp("(^|:)//").test(Cn)}(cn))return cn;var En=Ue.endsWith("/")||!cn.startsWith("?")?"/":"";return Ue=function(Cn){return Cn.replace(/\/$/,"")}(Ue),""+Ue+En+function(Cn){return Cn.replace(/^\//,"")}(cn)}(be,Br),lt=new Request(Br,In),St=lt.clone(),vn={request:St},bt=!1,st=On&&setTimeout(function(){bt=!0,Yt.abort()},On),$t.label=2;case 2:return $t.trys.push([2,4,5,6]),[4,it(lt)];case 3:return Gt=$t.sent(),[3,6];case 4:return Le=$t.sent(),[2,{error:{status:bt?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Le)},meta:vn}];case 5:return st&&clearTimeout(st),[7];case 6:Ae=Gt.clone(),vn.response=Ae,Ve="",$t.label=7;case 7:return $t.trys.push([7,9,,10]),[4,Promise.all([ln(Gt,Ir).then(function(Ue){return ze=Ue},function(Ue){return nt=Ue}),Ae.text().then(function(Ue){return Ve=Ue},function(){})])];case 8:if($t.sent(),nt)throw nt;return[3,10];case 9:return Ft=$t.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Gt.status,data:Ve,error:String(Ft)},meta:vn}];case 10:return[2,Qn(Gt,ze)?{data:ze,meta:vn}:{error:{status:Gt.status,data:ze},meta:vn}]}})})};function ln(sn,Yt){return P(this,null,function(){var He;return r(this,function(Ct){switch(Ct.label){case 0:return typeof Yt=="function"?[2,Yt(sn)]:(Yt==="content-type"&&(Yt=wt(sn.headers)?"json":"text"),Yt!=="json"?[3,2]:[4,sn.text()]);case 1:return[2,(He=Ct.sent()).length?JSON.parse(He):null];case 2:return[2,sn.text()]}})})}}var Q=function(re,ie){ie===void 0&&(ie=void 0),this.value=re,this.meta=ie};function U(re,ie){return re===void 0&&(re=0),ie===void 0&&(ie=5),P(this,null,function(){var be,Pe;return r(this,function(xe){switch(xe.label){case 0:return be=Math.min(re,ie),Pe=~~((Math.random()+.4)*(300<=Ae)}var Ln=(0,qe.createAsyncThunk)(Wn+"/executeQuery",bn,{getPendingMeta:function(){var Je;return(Je={startedTimeStamp:Date.now()})[qe.SHOULD_AUTOBATCH]=!0,Je},condition:function(Je,Nt){var kt,lt,St,Gt=(0,Nt.getState)(),bt=(lt=(kt=Gt[Wn])==null?void 0:kt.queries)==null?void 0:lt[Je.queryCacheKey],st=bt==null?void 0:bt.fulfilledTimeStamp,Le=Je.originalArgs,Ae=bt==null?void 0:bt.originalArgs,ze=Ir[Je.endpointName];return!(!he(Je)&&((bt==null?void 0:bt.status)==="pending"||!On(Je,Gt)&&(!q(ze)||!((St=ze==null?void 0:ze.forceRefetch)!=null&&St.call(ze,{currentArg:Le,previousArg:Ae,endpointState:bt,state:Gt})))&&st))},dispatchConditionRejection:!0}),In=(0,qe.createAsyncThunk)(Wn+"/executeMutation",bn,{getPendingMeta:function(){var Je;return(Je={startedTimeStamp:Date.now()})[qe.SHOULD_AUTOBATCH]=!0,Je}});function Pn(Je){return function(Nt){var kt,lt;return((lt=(kt=Nt==null?void 0:Nt.meta)==null?void 0:kt.arg)==null?void 0:lt.endpointName)===Je}}return{queryThunk:Ln,mutationThunk:In,prefetch:function(Je,Nt,kt){return function(lt,St){var Gt=function(ze){return"force"in ze}(kt)&&kt.force,bt=function(ze){return"ifOlderThan"in ze}(kt)&&kt.ifOlderThan,st=function(ze){return ze===void 0&&(ze=!0),Qn.endpoints[Je].initiate(Nt,{forceRefetch:ze})},Le=Qn.endpoints[Je].select(Nt)(St());if(Gt)lt(st());else if(bt){var Ae=Le==null?void 0:Le.fulfilledTimeStamp;if(!Ae)return void lt(st());(Number(new Date)-Number(new Date(Ae)))/1e3>=bt&<(st())}else lt(st(!1))}},updateQueryData:function(Je,Nt,kt){return function(lt,St){var Gt,bt,st=Qn.endpoints[Je].select(Nt)(St()),Le={patches:[],inversePatches:[],undo:function(){return lt(Qn.util.patchQueryData(Je,Nt,Le.inversePatches))}};if(st.status===t.uninitialized)return Le;if("data"in st)if((0,De.isDraftable)(st.data)){var Ae=(0,De.produceWithPatches)(st.data,kt),ze=Ae[2];(Gt=Le.patches).push.apply(Gt,Ae[1]),(bt=Le.inversePatches).push.apply(bt,ze)}else{var Ve=kt(st.data);Le.patches.push({op:"replace",path:[],value:Ve}),Le.inversePatches.push({op:"replace",path:[],value:st.data})}return lt(Qn.util.patchQueryData(Je,Nt,Le.patches)),Le}},upsertQueryData:function(Je,Nt,kt){return function(lt){var St;return lt(Qn.endpoints[Je].initiate(Nt,((St={subscribe:!1,forceRefetch:!0})[ve]=function(){return{data:kt}},St)))}},patchQueryData:function(Je,Nt,kt){return function(lt){lt(Qn.internalActions.queryResultPatched({queryCacheKey:Kn({queryArgs:Nt,endpointDefinition:Ir[Je],endpointName:Je}),patches:kt}))}},buildMatchThunkActions:function(Je,Nt){return{matchPending:(0,Ne.isAllOf)((0,Ne.isPending)(Je),Pn(Nt)),matchFulfilled:(0,Ne.isAllOf)((0,Ne.isFulfilled)(Je),Pn(Nt)),matchRejected:(0,Ne.isAllOf)((0,Ne.isRejected)(Je),Pn(Nt))}}}}({baseQuery:Pe,reducerPath:xe,context:be,api:re,serializeQueryArgs:ft}),et=Ie.queryThunk,Et=Ie.mutationThunk,Tt=Ie.patchQueryData,Vt=Ie.updateQueryData,Zt=Ie.upsertQueryData,ln=Ie.prefetch,sn=Ie.buildMatchThunkActions,Yt=function(Dt){var $n=Dt.reducerPath,Wn=Dt.queryThunk,ur=Dt.mutationThunk,Ir=Dt.context,Kn=Ir.endpointDefinitions,Qn=Ir.apiUid,bn=Ir.extractRehydrationInfo,On=Ir.hasRehydrationInfo,Ln=Dt.assertTagType,In=Dt.config,Pn=(0,le.createAction)($n+"/resetApiState"),Je=(0,le.createSlice)({name:$n+"/queries",initialState:Ot,reducers:{removeQueryResult:{reducer:function(st,Le){delete st[Le.payload.queryCacheKey]},prepare:(0,le.prepareAutoBatched)()},queryResultPatched:function(st,Le){var Ae=Le.payload,ze=Ae.patches;vt(st,Ae.queryCacheKey,function(Ve){Ve.data=(0,pt.applyPatches)(Ve.data,ze.concat())})}},extraReducers:function(st){st.addCase(Wn.pending,function(Le,Ae){var ze,Ve=Ae.meta,nt=Ae.meta.arg,Ft=he(nt);(nt.subscribe||Ft)&&(Le[ze=nt.queryCacheKey]!=null||(Le[ze]={status:t.uninitialized,endpointName:nt.endpointName})),vt(Le,nt.queryCacheKey,function($t){$t.status=t.pending,$t.requestId=Ft&&$t.requestId?$t.requestId:Ve.requestId,nt.originalArgs!==void 0&&($t.originalArgs=nt.originalArgs),$t.startedTimeStamp=Ve.startedTimeStamp})}).addCase(Wn.fulfilled,function(Le,Ae){var ze=Ae.meta,Ve=Ae.payload;vt(Le,ze.arg.queryCacheKey,function(nt){var Ft;if(nt.requestId===ze.requestId||he(ze.arg)){var $t=Kn[ze.arg.endpointName].merge;if(nt.status=t.fulfilled,$t)if(nt.data!==void 0){var Ue=ze.fulfilledTimeStamp,cn=ze.arg,En=ze.baseQueryMeta,Cn=ze.requestId,Pr=(0,le.createNextState)(nt.data,function(ir){return $t(ir,Ve,{arg:cn.originalArgs,baseQueryMeta:En,fulfilledTimeStamp:Ue,requestId:Cn})});nt.data=Pr}else nt.data=Ve;else nt.data=(Ft=Kn[ze.arg.endpointName].structuralSharing)==null||Ft?A((0,an.isDraft)(nt.data)?(0,pt.original)(nt.data):nt.data,Ve):Ve;delete nt.error,nt.fulfilledTimeStamp=ze.fulfilledTimeStamp}})}).addCase(Wn.rejected,function(Le,Ae){var ze=Ae.meta,Ve=ze.condition,nt=ze.requestId,Ft=Ae.error,$t=Ae.payload;vt(Le,ze.arg.queryCacheKey,function(Ue){if(!Ve){if(Ue.requestId!==nt)return;Ue.status=t.rejected,Ue.error=$t??Ft}})}).addMatcher(On,function(Le,Ae){for(var ze=bn(Ae).queries,Ve=0,nt=Object.entries(ze);Ve"u"||navigator.onLine===void 0||navigator.onLine,focused:typeof document>"u"||document.visibilityState!=="hidden",middlewareRegistered:!1},In),reducers:{middlewareRegistered:function(st,Le){st.middlewareRegistered=st.middlewareRegistered!=="conflict"&&Qn===Le.payload||"conflict"}},extraReducers:function(st){st.addCase(fe,function(Le){Le.online=!0}).addCase(G,function(Le){Le.online=!1}).addCase(Z,function(Le){Le.focused=!0}).addCase(se,function(Le){Le.focused=!1}).addMatcher(On,function(Le){return C({},Le)})}}),bt=(0,le.combineReducers)({queries:Je.reducer,mutations:Nt.reducer,provided:kt.reducer,subscriptions:St.reducer,config:Gt.reducer});return{reducer:function(st,Le){return bt(Pn.match(Le)?void 0:st,Le)},actions:S(C(C(C(C(C({},Gt.actions),Je.actions),lt.actions),St.actions),Nt.actions),{unsubscribeMutationResult:Nt.actions.removeMutationResult,resetApiState:Pn})}}({context:be,queryThunk:et,mutationThunk:Et,reducerPath:xe,assertTagType:We,config:{refetchOnFocus:mt,refetchOnReconnect:wt,refetchOnMountOrArgChange:Kt,keepUnusedDataFor:it,reducerPath:xe}}),He=Yt.reducer,Ct=Yt.actions;Yr(re.util,{patchQueryData:Tt,updateQueryData:Vt,upsertQueryData:Zt,prefetch:ln,resetApiState:Ct.resetApiState}),Yr(re.internalActions,Ct);var zt=function(Dt){var $n=Dt.reducerPath,Wn=Dt.queryThunk,ur=Dt.api,Ir=Dt.context,Kn=Ir.apiUid,Qn={invalidateTags:(0,xr.createAction)($n+"/invalidateTags")},bn=[so,yn,oo,Dr,or,Xo];return{middleware:function(Ln){var In=!1,Pn=S(C({},Dt),{internalState:{currentSubscriptions:{}},refetchQuery:On}),Je=bn.map(function(lt){return lt(Pn)}),Nt=function(lt){var St=lt.api,Gt=lt.queryThunk,bt=lt.internalState,st=St.reducerPath+"/subscriptions",Le=null,Ae=!1,ze=St.internalActions,Ve=ze.updateSubscriptionOptions,nt=ze.unsubscribeQueryResult;return function(Ft,$t){var Ue,cn;if(Le||(Le=JSON.parse(JSON.stringify(bt.currentSubscriptions))),St.util.resetApiState.match(Ft))return Le=bt.currentSubscriptions={},[!0,!1];if(St.internalActions.internal_probeSubscription.match(Ft)){var En=Ft.payload;return[!1,!!((Ue=bt.currentSubscriptions[En.queryCacheKey])!=null&&Ue[En.requestId])]}var Cn=function(Sn,sr){var wo,xn,Xn,io,Hr,Ei,Xf,Yo,Ga;if(Ve.match(sr)){var da=sr.payload,qa=da.queryCacheKey,So=da.requestId;return(wo=Sn==null?void 0:Sn[qa])!=null&&wo[So]&&(Sn[qa][So]=da.options),!0}if(nt.match(sr)){var ko=sr.payload;return So=ko.requestId,Sn[qa=ko.queryCacheKey]&&delete Sn[qa][So],!0}if(St.internalActions.removeQueryResult.match(sr))return delete Sn[sr.payload.queryCacheKey],!0;if(Gt.pending.match(sr)){var jo=sr.meta;if(So=jo.requestId,(uo=jo.arg).subscribe)return(ds=(Xn=Sn[xn=uo.queryCacheKey])!=null?Xn:Sn[xn]={})[So]=(Hr=(io=uo.subscriptionOptions)!=null?io:ds[So])!=null?Hr:{},!0}if(Gt.rejected.match(sr)){var ds,Jo=sr.meta,uo=Jo.arg;if(So=Jo.requestId,Jo.condition&&uo.subscribe)return(ds=(Xf=Sn[Ei=uo.queryCacheKey])!=null?Xf:Sn[Ei]={})[So]=(Ga=(Yo=uo.subscriptionOptions)!=null?Yo:ds[So])!=null?Ga:{},!0}return!1}(bt.currentSubscriptions,Ft);if(Cn){Ae||($s(function(){var Sn=JSON.parse(JSON.stringify(bt.currentSubscriptions)),sr=(0,ao.produceWithPatches)(Le,function(){return Sn});$t.next(St.internalActions.subscriptionsUpdated(sr[1])),Le=Sn,Ae=!1}),Ae=!0);var Pr=!!((cn=Ft.type)!=null&&cn.startsWith(st)),ir=Gt.rejected.match(Ft)&&Ft.meta.condition&&!!Ft.meta.arg.subscribe;return[!Pr&&!ir,!1]}return[!0,!1]}}(Pn),kt=function(lt){var St=lt.reducerPath,Gt=lt.context,bt=lt.refetchQuery,st=lt.internalState,Le=lt.api.internalActions.removeQueryResult;function Ae(ze,Ve){var nt=ze.getState()[St],Ft=nt.queries,$t=st.currentSubscriptions;Gt.batch(function(){for(var Ue=0,cn=Object.keys($t);Ue{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=J(),o=H(j=>j.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:i}=BD((t==null?void 0:t.board_id)??Os.skipToken),c=l.useMemo(()=>de([Ce],j=>{const _=(s??[]).map(P=>PI(j,P));return{imageUsageSummary:{isInitialImage:Qs(_,P=>P.isInitialImage),isCanvasImage:Qs(_,P=>P.isCanvasImage),isNodesImage:Qs(_,P=>P.isNodesImage),isControlImage:Qs(_,P=>P.isControlImage)}}}),[s]),[d,{isLoading:p}]=HD(),[h,{isLoading:m}]=WD(),{imageUsageSummary:g}=H(c),b=l.useCallback(()=>{t&&(d(t.board_id),n(void 0))},[t,d,n]),y=l.useCallback(()=>{t&&(h(t.board_id),n(void 0))},[t,h,n]),x=l.useCallback(()=>{n(void 0)},[n]),C=l.useRef(null),S=l.useMemo(()=>m||p||i,[m,p,i]);return t?a.jsx(Df,{isOpen:!!t,onClose:x,leastDestructiveRef:C,isCentered:!0,children:a.jsx(Ma,{children:a.jsxs(Tf,{children:[a.jsxs(Ea,{fontSize:"lg",fontWeight:"bold",children:["Delete ",t.board_name]}),a.jsx(Oa,{children:a.jsxs(N,{direction:"column",gap:3,children:[i?a.jsx(Dg,{children:a.jsx(N,{sx:{w:"full",h:32}})}):a.jsx(NM,{imageUsage:g,topMessage:r("boards.topMessage"),bottomMessage:r("boards.bottomMessage")}),a.jsx(Se,{children:"Deleted boards cannot be restored."}),a.jsx(Se,{children:r(o?"gallery.deleteImageBin":"gallery.deleteImagePermanent")})]})}),a.jsx(pi,{children:a.jsxs(N,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[a.jsx(Rt,{ref:C,onClick:x,children:"Cancel"}),a.jsx(Rt,{colorScheme:"warning",isLoading:S,onClick:b,children:"Delete Board Only"}),a.jsx(Rt,{colorScheme:"error",isLoading:S,onClick:y,children:"Delete Board and Images"})]})})]})})}):null},wne=l.memo(Cne),Sne=()=>{const{t:e}=J(),[t,{isLoading:n}]=VD(),r=e("boards.myBoard"),o=l.useCallback(()=>{t(r)},[t,r]);return a.jsx(tt,{icon:a.jsx(Yi,{}),isLoading:n,tooltip:e("boards.addBoard"),"aria-label":e("boards.addBoard"),onClick:o,size:"sm","data-testid":"add-board-button"})},kne=l.memo(Sne);var DO=fg({displayName:"ExternalLinkIcon",path:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("path",{d:"M15 3h6v6"}),a.jsx("path",{d:"M10 14L21 3"})]})}),s0=fg({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),jne=fg({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),_ne=fg({displayName:"DeleteIcon",path:a.jsx("g",{fill:"currentColor",children:a.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});const Ine=de([Ce],({gallery:e})=>{const{boardSearchText:t}=e;return{boardSearchText:t}},_e),Pne=()=>{const e=oe(),{boardSearchText:t}=H(Ine),n=l.useRef(null),{t:r}=J(),o=l.useCallback(d=>{e(Tw(d))},[e]),s=l.useCallback(()=>{e(Tw(""))},[e]),i=l.useCallback(d=>{d.key==="Escape"&&s()},[s]),c=l.useCallback(d=>{o(d.target.value)},[o]);return l.useEffect(()=>{n.current&&n.current.focus()},[]),a.jsxs(z5,{children:[a.jsx(vg,{ref:n,placeholder:r("boards.searchBoard"),value:t,onKeyDown:i,onChange:c,"data-testid":"board-search-input"}),t&&t.length&&a.jsx(dy,{children:a.jsx(_a,{onClick:s,size:"xs",variant:"ghost","aria-label":r("boards.clearSearch"),opacity:.5,icon:a.jsx(jne,{boxSize:2})})})]})},Ene=l.memo(Pne);function TO(e){return UD(e)}function Mne(e){return GD(e)}const NO=(e,t)=>{var o,s;if(!e||!(t!=null&&t.data.current))return!1;const{actionType:n}=e,{payloadType:r}=t.data.current;if(e.id===t.data.current.id)return!1;switch(n){case"ADD_FIELD_TO_LINEAR":return r==="NODE_FIELD";case"SET_CURRENT_IMAGE":return r==="IMAGE_DTO";case"SET_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_CONTROL_ADAPTER_IMAGE":return r==="IMAGE_DTO";case"SET_CANVAS_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_NODES_IMAGE":return r==="IMAGE_DTO";case"SET_MULTI_NODES_IMAGE":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BATCH":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload,d=c.board_id??"none",p=e.context.boardId;return d!==p}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload,d=((o=c[0])==null?void 0:o.board_id)??"none",p=e.context.boardId;return d!==p}return!1}case"REMOVE_FROM_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload;return(c.board_id??"none")!=="none"}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload;return(((s=c[0])==null?void 0:s.board_id)??"none")!=="none"}return!1}default:return!1}},One=e=>{const{isOver:t,label:n="Drop"}=e,r=l.useRef(Jc()),{colorMode:o}=wi();return a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:Ke("base.700","base.900")(o),opacity:.7,borderRadius:"base",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:.5,insetInlineStart:.5,insetInlineEnd:.5,bottom:.5,opacity:1,borderWidth:2,borderColor:t?Ke("base.50","base.50")(o):Ke("base.200","base.300")(o),borderRadius:"lg",borderStyle:"dashed",transitionProperty:"common",transitionDuration:"0.1s",alignItems:"center",justifyContent:"center"},children:a.jsx(Te,{sx:{fontSize:"2xl",fontWeight:600,transform:t?"scale(1.1)":"scale(1)",color:t?Ke("base.50","base.50")(o):Ke("base.200","base.300")(o),transitionProperty:"common",transitionDuration:"0.1s"},children:n})})]})},r.current)},$O=l.memo(One),Rne=e=>{const{dropLabel:t,data:n,disabled:r}=e,o=l.useRef(Jc()),{isOver:s,setNodeRef:i,active:c}=TO({id:o.current,disabled:r,data:n});return a.jsx(Te,{ref:i,position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",pointerEvents:c?"auto":"none",children:a.jsx(yo,{children:NO(n,c)&&a.jsx($O,{isOver:s,label:t})})})},d2=l.memo(Rne),Ane=({isSelected:e,isHovered:t})=>a.jsx(Te,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e?1:.7,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:e?t?"hoverSelected.light":"selected.light":t?"hoverUnselected.light":void 0,_dark:{shadow:e?t?"hoverSelected.dark":"selected.dark":t?"hoverUnselected.dark":void 0}}}),f2=l.memo(Ane),Dne=()=>{const{t:e}=J();return a.jsx(N,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Ha,{variant:"solid",sx:{bg:"accent.400",_dark:{bg:"accent.500"}},children:e("common.auto")})})},LO=l.memo(Dne);function p2(e){const[t,n]=l.useState(!1),[r,o]=l.useState(!1),[s,i]=l.useState(!1),[c,d]=l.useState([0,0]),p=l.useRef(null),h=H(g=>g.ui.globalContextMenuCloseTrigger);l.useEffect(()=>{if(t)setTimeout(()=>{o(!0),setTimeout(()=>{i(!0)})});else{i(!1);const g=setTimeout(()=>{o(t)},1e3);return()=>clearTimeout(g)}},[t]),l.useEffect(()=>{n(!1),i(!1),o(!1)},[h]),TF("contextmenu",g=>{var b;(b=p.current)!=null&&b.contains(g.target)||g.target===p.current?(g.preventDefault(),n(!0),d([g.pageX,g.pageY])):n(!1)});const m=l.useCallback(()=>{var g,b;(b=(g=e.menuProps)==null?void 0:g.onClose)==null||b.call(g),n(!1)},[e.menuProps]);return a.jsxs(a.Fragment,{children:[e.children(p),r&&a.jsx(Ru,{...e.portalProps,children:a.jsxs(Cg,{isOpen:s,gutter:0,...e.menuProps,onClose:m,children:[a.jsx(wg,{"aria-hidden":!0,w:1,h:1,style:{position:"absolute",left:c[0],top:c[1],cursor:"default"},...e.menuButtonProps}),e.renderMenu()]})})]})}const a0=e=>{const{boardName:t}=gf(void 0,{selectFromResult:({data:n})=>{const r=n==null?void 0:n.find(s=>s.board_id===e);return{boardName:(r==null?void 0:r.board_name)||DI("boards.uncategorized")}}});return t},Tne=({board:e,setBoardToDelete:t})=>{const n=l.useCallback(()=>{t&&t(e)},[e,t]);return a.jsxs(a.Fragment,{children:[e.image_count>0&&a.jsx(a.Fragment,{}),a.jsx(Vn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(qo,{}),onClick:n,children:"Delete Board"})]})},Nne=l.memo(Tne),$ne=()=>a.jsx(a.Fragment,{}),Lne=l.memo($ne),zne=({board:e,board_id:t,setBoardToDelete:n,children:r})=>{const{t:o}=J(),s=oe(),i=l.useMemo(()=>de(Ce,({gallery:C})=>{const S=C.autoAddBoardId===t,j=C.autoAssignBoardOnClick;return{isAutoAdd:S,autoAssignBoardOnClick:j}},_e),[t]),{isAutoAdd:c,autoAssignBoardOnClick:d}=H(i),p=a0(t),h=jn("bulkDownload").isFeatureEnabled,[m]=TI(),g=l.useCallback(()=>{s(ag(t))},[t,s]),b=l.useCallback(async()=>{try{const C=await m({image_names:[],board_id:t}).unwrap();s(Bt({title:o("gallery.preparingDownload"),status:"success",...C.response?{description:C.response}:{}}))}catch{s(Bt({title:o("gallery.preparingDownloadFailed"),status:"error"}))}},[o,t,m,s]),y=l.useCallback(C=>{C.preventDefault()},[]),x=l.useCallback(()=>a.jsx(Gl,{sx:{visibility:"visible !important"},motionProps:pu,onContextMenu:y,children:a.jsxs(Yd,{title:p,children:[a.jsx(Vn,{icon:a.jsx(Yi,{}),isDisabled:c||d,onClick:g,children:o("boards.menuItemAutoAdd")}),h&&a.jsx(Vn,{icon:a.jsx(Wu,{}),onClickCapture:b,children:o("boards.downloadBoard")}),!e&&a.jsx(Lne,{}),e&&a.jsx(Nne,{board:e,setBoardToDelete:n})]})}),[d,e,p,b,g,c,h,n,y,o]);return a.jsx(p2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:x,children:r})},zO=l.memo(zne),Fne=({board:e,isSelected:t,setBoardToDelete:n})=>{const r=oe(),o=l.useMemo(()=>de(Ce,({gallery:D})=>{const O=e.board_id===D.autoAddBoardId,T=D.autoAssignBoardOnClick;return{isSelectedForAutoAdd:O,autoAssignBoardOnClick:T}},_e),[e.board_id]),{isSelectedForAutoAdd:s,autoAssignBoardOnClick:i}=H(o),[c,d]=l.useState(!1),p=l.useCallback(()=>{d(!0)},[]),h=l.useCallback(()=>{d(!1)},[]),{data:m}=kx(e.board_id),{data:g}=jx(e.board_id),b=l.useMemo(()=>{if(!((m==null?void 0:m.total)===void 0||(g==null?void 0:g.total)===void 0))return`${m.total} image${m.total===1?"":"s"}, ${g.total} asset${g.total===1?"":"s"}`},[g,m]),{currentData:y}=Ps(e.cover_image_name??Os.skipToken),{board_name:x,board_id:C}=e,[S,j]=l.useState(x),_=l.useCallback(()=>{r(NI({boardId:C})),i&&r(ag(C))},[C,i,r]),[I,{isLoading:P}]=qD(),M=l.useMemo(()=>({id:C,actionType:"ADD_TO_BOARD",context:{boardId:C}}),[C]),R=l.useCallback(async D=>{if(!D.trim()){j(x);return}if(D!==x)try{const{board_name:O}=await I({board_id:C,changes:{board_name:D}}).unwrap();j(O)}catch{j(x)}},[C,x,I]),A=l.useCallback(D=>{j(D)},[]);return a.jsx(Te,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:p,onMouseOut:h,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",w:"full",h:"full"},children:a.jsx(zO,{board:e,board_id:C,setBoardToDelete:n,children:D=>a.jsx(Fn,{label:b,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:D,onClick:_,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[y!=null&&y.thumbnail_url?a.jsx(Si,{src:y==null?void 0:y.thumbnail_url,draggable:!1,sx:{objectFit:"cover",w:"full",h:"full",maxH:"full",borderRadius:"base",borderBottomRadius:"lg"}}):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(zr,{boxSize:12,as:Iee,sx:{mt:-6,opacity:.7,color:"base.500",_dark:{color:"base.500"}}})}),s&&a.jsx(LO,{}),a.jsx(f2,{isSelected:t,isHovered:c}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:t?"accent.400":"base.500",color:t?"base.50":"base.100",_dark:{bg:t?"accent.500":"base.600",color:t?"base.50":"base.100"},lineHeight:"short",fontSize:"xs"},children:a.jsxs(Ef,{value:S,isDisabled:P,submitOnBlur:!0,onChange:A,onSubmit:R,sx:{w:"full"},children:[a.jsx(Pf,{sx:{p:0,fontWeight:t?700:500,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1}),a.jsx(If,{sx:{p:0,_focusVisible:{p:0,textAlign:"center",boxShadow:"none"}}})]})}),a.jsx(d2,{data:M,dropLabel:a.jsx(Se,{fontSize:"md",children:"Move"})})]})})})})})},Bne=l.memo(Fne),Hne=de(Ce,({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},_e),FO=l.memo(({isSelected:e})=>{const t=oe(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(Hne),o=a0("none"),s=l.useCallback(()=>{t(NI({boardId:"none"})),r&&t(ag("none"))},[t,r]),[i,c]=l.useState(!1),{data:d}=kx("none"),{data:p}=jx("none"),h=l.useMemo(()=>{if(!((d==null?void 0:d.total)===void 0||(p==null?void 0:p.total)===void 0))return`${d.total} image${d.total===1?"":"s"}, ${p.total} asset${p.total===1?"":"s"}`},[p,d]),m=l.useCallback(()=>{c(!0)},[]),g=l.useCallback(()=>{c(!1)},[]),b=l.useMemo(()=>({id:"no_board",actionType:"REMOVE_FROM_BOARD"}),[]);return a.jsx(Te,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:m,onMouseOut:g,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",borderRadius:"base",w:"full",h:"full"},children:a.jsx(zO,{board_id:"none",children:y=>a.jsx(Fn,{label:h,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:y,onClick:s,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(Si,{src:wx,alt:"invoke-ai-logo",sx:{opacity:.4,filter:"grayscale(1)",mt:-6,w:16,h:16,minW:16,minH:16,userSelect:"none"}})}),n==="none"&&a.jsx(LO,{}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:e?"accent.400":"base.500",color:e?"base.50":"base.100",_dark:{bg:e?"accent.500":"base.600",color:e?"base.50":"base.100"},lineHeight:"short",fontSize:"xs",fontWeight:e?700:500},children:o}),a.jsx(f2,{isSelected:e,isHovered:i}),a.jsx(d2,{data:b,dropLabel:a.jsx(Se,{fontSize:"md",children:"Move"})})]})})})})})});FO.displayName="HoverableBoard";const Wne=l.memo(FO),Vne=de([Ce],({gallery:e})=>{const{selectedBoardId:t,boardSearchText:n}=e;return{selectedBoardId:t,boardSearchText:n}},_e),Une=e=>{const{isOpen:t}=e,{selectedBoardId:n,boardSearchText:r}=H(Vne),{data:o}=gf(),s=r?o==null?void 0:o.filter(d=>d.board_name.toLowerCase().includes(r.toLowerCase())):o,[i,c]=l.useState();return a.jsxs(a.Fragment,{children:[a.jsx(Sf,{in:t,animateOpacity:!0,children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",gap:2,p:2,mt:2,borderRadius:"base"},children:[a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Ene,{}),a.jsx(kne,{})]}),a.jsx(o0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"move",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsxs(nl,{className:"list-container","data-testid":"boards-list",sx:{gridTemplateColumns:"repeat(auto-fill, minmax(108px, 1fr));",maxH:346},children:[a.jsx(Kd,{sx:{p:1.5},"data-testid":"no-board",children:a.jsx(Wne,{isSelected:n==="none"})}),s&&s.map((d,p)=>a.jsx(Kd,{sx:{p:1.5},"data-testid":`board-${p}`,children:a.jsx(Bne,{board:d,isSelected:n===d.board_id,setBoardToDelete:c})},d.board_id))]})})]})}),a.jsx(wne,{boardToDelete:i,setBoardToDelete:c})]})},Gne=l.memo(Une),qne=de([Ce],e=>{const{selectedBoardId:t}=e.gallery;return{selectedBoardId:t}},_e),Kne=e=>{const{isOpen:t,onToggle:n}=e,{selectedBoardId:r}=H(qne),o=a0(r),s=l.useMemo(()=>o.length>20?`${o.substring(0,20)}...`:o,[o]);return a.jsxs(N,{as:tl,onClick:n,size:"sm",sx:{position:"relative",gap:2,w:"full",justifyContent:"space-between",alignItems:"center",px:2},children:[a.jsx(Se,{noOfLines:1,sx:{fontWeight:600,w:"100%",textAlign:"center",color:"base.800",_dark:{color:"base.200"}},children:s}),a.jsx(s0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]})},Qne=l.memo(Kne),Xne=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return a.jsxs(Nf,{isLazy:o,...s,children:[a.jsx(Rg,{children:t}),a.jsxs($f,{shadow:"dark-lg",children:[r&&a.jsx(x3,{}),n]})]})},Uf=l.memo(Xne);function Yne(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}const BO=Oe((e,t)=>{const[n,r]=l.useState(!1),{label:o,value:s,min:i=1,max:c=100,step:d=1,onChange:p,tooltipSuffix:h="",withSliderMarks:m=!1,withInput:g=!1,isInteger:b=!1,inputWidth:y=16,withReset:x=!1,hideTooltip:C=!1,isCompact:S=!1,isDisabled:j=!1,sliderMarks:_,handleReset:I,sliderFormControlProps:P,sliderFormLabelProps:M,sliderMarkProps:R,sliderTrackProps:A,sliderThumbProps:D,sliderNumberInputProps:O,sliderNumberInputFieldProps:T,sliderNumberInputStepperProps:Y,sliderTooltipProps:z,sliderIAIIconButtonProps:W,...Q}=e,U=oe(),{t:L}=J(),[ee,K]=l.useState(String(s));l.useEffect(()=>{K(s)},[s]);const Z=l.useMemo(()=>O!=null&&O.min?O.min:i,[i,O==null?void 0:O.min]),se=l.useMemo(()=>O!=null&&O.max?O.max:c,[c,O==null?void 0:O.max]),fe=l.useCallback(le=>{p(le)},[p]),G=l.useCallback(le=>{le.target.value===""&&(le.target.value=String(Z));const we=Bl(b?Math.floor(Number(le.target.value)):Number(ee),Z,se),ve=_d(we,d);p(ve),K(ve)},[b,ee,Z,se,p,d]),te=l.useCallback(le=>{K(le)},[]),V=l.useCallback(()=>{I&&I()},[I]),F=l.useCallback(le=>{le.target instanceof HTMLDivElement&&le.target.focus()},[]),X=l.useCallback(le=>{le.shiftKey&&U(Uo(!0))},[U]),ue=l.useCallback(le=>{le.shiftKey||U(Uo(!1))},[U]),q=l.useCallback(()=>r(!0),[]),ne=l.useCallback(()=>r(!1),[]),pe=l.useCallback(()=>p(Number(ee)),[ee,p]);return a.jsxs(Bn,{ref:t,onClick:F,sx:S?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},isDisabled:j,...P,children:[o&&a.jsx(vr,{sx:g?{mb:-1.5}:{},...M,children:o}),a.jsxs(xg,{w:"100%",gap:2,alignItems:"center",children:[a.jsxs(jy,{"aria-label":o,value:s,min:i,max:c,step:d,onChange:fe,onMouseEnter:q,onMouseLeave:ne,focusThumbOnChange:!1,isDisabled:j,...Q,children:[m&&!_&&a.jsxs(a.Fragment,{children:[a.jsx(Lc,{value:i,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...R,children:i}),a.jsx(Lc,{value:c,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...R,children:c})]}),m&&_&&a.jsx(a.Fragment,{children:_.map((le,we)=>we===0?a.jsx(Lc,{value:le,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...R,children:le},le):we===_.length-1?a.jsx(Lc,{value:le,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...R,children:le},le):a.jsx(Lc,{value:le,sx:{transform:"translateX(-50%)"},...R,children:le},le))}),a.jsx(Iy,{...A,children:a.jsx(Py,{})}),a.jsx(Fn,{hasArrow:!0,placement:"top",isOpen:n,label:`${s}${h}`,hidden:C,...z,children:a.jsx(_y,{...D,zIndex:0})})]}),g&&a.jsxs(_g,{min:Z,max:se,step:d,value:ee,onChange:te,onBlur:G,focusInputOnChange:!1,...O,children:[a.jsx(Pg,{onKeyDown:X,onKeyUp:ue,minWidth:y,...T}),a.jsxs(Ig,{...Y,children:[a.jsx(Mg,{onClick:pe}),a.jsx(Eg,{onClick:pe})]})]}),x&&a.jsx(tt,{size:"sm","aria-label":L("accessibility.reset"),tooltip:L("accessibility.reset"),icon:a.jsx(Yne,{}),isDisabled:j,onClick:V,...W})]})]})});BO.displayName="IAISlider";const Pt=l.memo(BO),HO=l.forwardRef(({label:e,tooltip:t,description:n,disabled:r,...o},s)=>a.jsx(Fn,{label:t,placement:"top",hasArrow:!0,openDelay:500,children:a.jsx(Te,{ref:s,...o,children:a.jsxs(Te,{children:[a.jsx(yu,{children:e}),n&&a.jsx(yu,{size:"xs",color:"base.600",children:n})]})})}));HO.displayName="IAIMantineSelectItemWithTooltip";const pl=l.memo(HO),Jne=de([Ce],({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},_e),Zne=()=>{const e=oe(),{t}=J(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(Jne),o=l.useRef(null),{boards:s,hasBoards:i}=gf(void 0,{selectFromResult:({data:p})=>{const h=[{label:"None",value:"none"}];return p==null||p.forEach(({board_id:m,board_name:g})=>{h.push({label:g,value:m})}),{boards:h,hasBoards:h.length>1}}}),c=l.useCallback(p=>{p&&e(ag(p))},[e]),d=l.useCallback((p,h)=>{var m;return((m=h.label)==null?void 0:m.toLowerCase().includes(p.toLowerCase().trim()))||h.value.toLowerCase().includes(p.toLowerCase().trim())},[]);return a.jsx(tr,{label:t("boards.autoAddBoard"),inputRef:o,autoFocus:!0,placeholder:t("boards.selectBoard"),value:n,data:s,nothingFound:t("boards.noMatching"),itemComponent:pl,disabled:!i||r,filter:d,onChange:c})},ere=l.memo(Zne),tre=e=>{const{label:t,...n}=e,{colorMode:r}=wi();return a.jsx(_f,{colorScheme:"accent",...n,children:a.jsx(Se,{sx:{fontSize:"sm",color:Ke("base.800","base.200")(r)},children:t})})},Io=l.memo(tre),nre=de([Ce],e=>{const{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}=e.gallery;return{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}},_e),rre=()=>{const e=oe(),{t}=J(),{galleryImageMinimumWidth:n,shouldAutoSwitch:r,autoAssignBoardOnClick:o}=H(nre),s=l.useCallback(p=>{e(Nw(p))},[e]),i=l.useCallback(()=>{e(Nw(64))},[e]),c=l.useCallback(p=>{e(KD(p.target.checked))},[e]),d=l.useCallback(p=>e(QD(p.target.checked)),[e]);return a.jsx(Uf,{triggerComponent:a.jsx(tt,{tooltip:t("gallery.gallerySettings"),"aria-label":t("gallery.gallerySettings"),size:"sm",icon:a.jsx(ZM,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Pt,{value:n,onChange:s,min:45,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize"),withReset:!0,handleReset:i}),a.jsx(jr,{label:t("gallery.autoSwitchNewImages"),isChecked:r,onChange:c}),a.jsx(Io,{label:t("gallery.autoAssignBoardOnClick"),isChecked:o,onChange:d}),a.jsx(ere,{})]})})},ore=l.memo(rre),sre=e=>e.image?a.jsx(Dg,{sx:{w:`${e.image.width}px`,h:"auto",objectFit:"contain",aspectRatio:`${e.image.width}/${e.image.height}`}}):a.jsx(N,{sx:{opacity:.7,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(bi,{size:"xl"})}),qr=e=>{const{icon:t=Ql,boxSize:n=16,sx:r,...o}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...r},...o,children:[t&&a.jsx(zr,{as:t,boxSize:n,opacity:.7}),e.label&&a.jsx(Se,{textAlign:"center",children:e.label})]})},are=e=>{const{sx:t,...n}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...t},...n,children:[a.jsx(bi,{size:"xl"}),e.label&&a.jsx(Se,{textAlign:"center",children:e.label})]})},i0=0,hl=1,Vu=2,WO=4;function VO(e,t){return n=>e(t(n))}function ire(e,t){return t(e)}function UO(e,t){return n=>e(t,n)}function Yj(e,t){return()=>e(t)}function l0(e,t){return t(e),e}function br(...e){return e}function lre(e){e()}function Jj(e){return()=>e}function cre(...e){return()=>{e.map(lre)}}function h2(e){return e!==void 0}function Uu(){}function qn(e,t){return e(hl,t)}function dn(e,t){e(i0,t)}function m2(e){e(Vu)}function ks(e){return e(WO)}function Lt(e,t){return qn(e,UO(t,i0))}function gi(e,t){const n=e(hl,r=>{n(),t(r)});return n}function Mn(){const e=[];return(t,n)=>{switch(t){case Vu:e.splice(0,e.length);return;case hl:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case i0:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function at(e){let t=e;const n=Mn();return(r,o)=>{switch(r){case hl:o(t);break;case i0:t=o;break;case WO:return t}return n(r,o)}}function ure(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case hl:return s?n===s?void 0:(r(),n=s,t=qn(e,s),t):(r(),Uu);case Vu:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function as(e){return l0(Mn(),t=>Lt(e,t))}function Po(e,t){return l0(at(t),n=>Lt(e,n))}function dre(...e){return t=>e.reduceRight(ire,t)}function $e(e,...t){const n=dre(...t);return(r,o)=>{switch(r){case hl:return qn(e,n(o));case Vu:m2(e);return}}}function GO(e,t){return e===t}function hr(e=GO){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function tn(e){return t=>n=>{e(n)&&t(n)}}function yt(e){return t=>VO(t,e)}function ei(e){return t=>()=>t(e)}function ka(e,t){return n=>r=>n(t=e(t,r))}function _u(e){return t=>n=>{e>0?e--:t(n)}}function Ki(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Zj(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function mn(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);qn(s,d=>{const p=n;n=n|c,t[i]=d,p!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const c=()=>s([i].concat(t));n===o?c():r=c}}function e_(...e){return function(t,n){switch(t){case hl:return cre(...e.map(r=>qn(r,n)));case Vu:return;default:throw new Error(`unrecognized action ${t}`)}}}function en(e,t=GO){return $e(e,hr(t))}function to(...e){const t=Mn(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);qn(s,d=>{n[i]=d,r=r|c,r===o&&dn(t,n)})}),function(s,i){switch(s){case hl:return r===o&&i(n),qn(t,i);case Vu:return m2(t);default:throw new Error(`unrecognized action ${s}`)}}}function Un(e,t=[],{singleton:n}={singleton:!0}){return{id:fre(),constructor:e,dependencies:t,singleton:n}}const fre=()=>Symbol();function pre(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const c=o(s.map(d=>n(d)));return i&&t.set(r,c),c};return n(e)}function hre(e,t){const n={},r={};let o=0;const s=e.length;for(;o(C[S]=j=>{const _=x[t.methods[S]];dn(_,j)},C),{})}function h(x){return i.reduce((C,S)=>(C[S]=ure(x[t.events[S]]),C),{})}return{Component:B.forwardRef((x,C)=>{const{children:S,...j}=x,[_]=B.useState(()=>l0(pre(e),P=>d(P,j))),[I]=B.useState(Yj(h,_));return mh(()=>{for(const P of i)P in j&&qn(I[P],j[P]);return()=>{Object.values(I).map(m2)}},[j,I,_]),mh(()=>{d(_,j)}),B.useImperativeHandle(C,Jj(p(_))),B.createElement(c.Provider,{value:_},n?B.createElement(n,hre([...r,...o,...i],j),S):S)}),usePublisher:x=>B.useCallback(UO(dn,B.useContext(c)[x]),[x]),useEmitterValue:x=>{const S=B.useContext(c)[x],[j,_]=B.useState(Yj(ks,S));return mh(()=>qn(S,I=>{I!==j&&_(Jj(I))}),[S,j]),j},useEmitter:(x,C)=>{const j=B.useContext(c)[x];mh(()=>qn(j,C),[C,j])}}}const mre=typeof document<"u"?B.useLayoutEffect:B.useEffect,gre=mre;var is=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(is||{});const vre={0:"debug",1:"log",2:"warn",3:"error"},bre=()=>typeof globalThis>"u"?window:globalThis,ml=Un(()=>{const e=at(3);return{log:at((n,r,o=1)=>{var s;const i=(s=bre().VIRTUOSO_LOG_LEVEL)!=null?s:ks(e);o>=i&&console[vre[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function g2(e,t=!0){const n=B.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=B.useMemo(()=>new ResizeObserver(s=>{const i=s[0].target;i.offsetParent!==null&&e(i)}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function sc(e,t=!0){return g2(e,t).callbackRef}function xre(e,t,n,r,o,s,i){const c=B.useCallback(d=>{const p=yre(d.children,t,"offsetHeight",o);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const m=h.lastElementChild.dataset.viewportType==="window",g=i?i.scrollTop:m?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,b=i?i.scrollHeight:m?document.documentElement.scrollHeight:h.scrollHeight,y=i?i.offsetHeight:m?window.innerHeight:h.offsetHeight;r({scrollTop:Math.max(g,0),scrollHeight:b,viewportHeight:y}),s==null||s(Cre("row-gap",getComputedStyle(d).rowGap,o)),p!==null&&e(p)},[e,t,o,s,i,r]);return g2(c,n)}function yre(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i{const g=m.target,b=g===window||g===document,y=b?window.pageYOffset||document.documentElement.scrollTop:g.scrollTop,x=b?document.documentElement.scrollHeight:g.scrollHeight,C=b?window.innerHeight:g.offsetHeight,S=()=>{e({scrollTop:Math.max(y,0),scrollHeight:x,viewportHeight:C})};m.suppressFlushSync?S():XD.flushSync(S),i.current!==null&&(y===i.current||y<=0||y===x-C)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t]);B.useEffect(()=>{const m=o||s.current;return r(o||s.current),d({target:m,suppressFlushSync:!0}),m.addEventListener("scroll",d,{passive:!0}),()=>{r(null),m.removeEventListener("scroll",d)}},[s,d,n,r,o]);function p(m){const g=s.current;if(!g||"offsetHeight"in g&&g.offsetHeight===0)return;const b=m.behavior==="smooth";let y,x,C;g===window?(x=Math.max(al(document.documentElement,"height"),document.documentElement.scrollHeight),y=window.innerHeight,C=document.documentElement.scrollTop):(x=g.scrollHeight,y=al(g,"height"),C=g.scrollTop);const S=x-y;if(m.top=Math.ceil(Math.max(Math.min(S,m.top),0)),KO(y,x)||m.top===C){e({scrollTop:C,scrollHeight:x,viewportHeight:y}),b&&t(!0);return}b?(i.current=m.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,g.scrollTo(m)}function h(m){s.current.scrollBy(m)}return{scrollerRef:s,scrollByCallback:h,scrollToCallback:p}}const Do=Un(()=>{const e=Mn(),t=Mn(),n=at(0),r=Mn(),o=at(0),s=Mn(),i=Mn(),c=at(0),d=at(0),p=at(0),h=at(0),m=Mn(),g=Mn(),b=at(!1);return Lt($e(e,yt(({scrollTop:y})=>y)),t),Lt($e(e,yt(({scrollHeight:y})=>y)),i),Lt(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:c,fixedHeaderHeight:d,fixedFooterHeight:p,footerHeight:h,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:m,scrollBy:g,statefulScrollTop:o,deviation:n,scrollingInProgress:b}},[],{singleton:!0}),of={lvl:0};function XO(e,t,n,r=of,o=of){return{k:e,v:t,lvl:n,l:r,r:o}}function er(e){return e===of}function du(){return of}function Qb(e,t){if(er(e))return of;const{k:n,l:r,r:o}=e;if(t===n){if(er(r))return o;if(er(o))return r;{const[s,i]=YO(r);return Dh(Ur(e,{k:s,v:i,l:JO(r)}))}}else return tt&&(c=c.concat(Xb(s,t,n))),r>=t&&r<=n&&c.push({k:r,v:o}),r<=n&&(c=c.concat(Xb(i,t,n))),c}function Rl(e){return er(e)?[]:[...Rl(e.l),{k:e.k,v:e.v},...Rl(e.r)]}function YO(e){return er(e.r)?[e.k,e.v]:YO(e.r)}function JO(e){return er(e.r)?e.l:Dh(Ur(e,{r:JO(e.r)}))}function Ur(e,t){return XO(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function y1(e){return er(e)||e.lvl>e.r.lvl}function t_(e){return Yb(e8(e))}function Dh(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(y1(t))return e8(Ur(e,{lvl:r-1}));if(!er(t)&&!er(t.r))return Ur(t.r,{l:Ur(t,{r:t.r.l}),r:Ur(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(y1(e))return Yb(Ur(e,{lvl:r-1}));if(!er(n)&&!er(n.l)){const o=n.l,s=y1(o)?n.lvl-1:n.lvl;return Ur(o,{l:Ur(e,{r:o.l,lvl:r-1}),r:Yb(Ur(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function c0(e,t,n){if(er(e))return[];const r=aa(e,t)[0];return wre(Xb(e,r,n))}function ZO(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i({index:t,value:n}))}function Yb(e){const{r:t,lvl:n}=e;return!er(t)&&!er(t.r)&&t.lvl===n&&t.r.lvl===n?Ur(t,{l:Ur(e,{r:t.l}),lvl:n+1}):e}function e8(e){const{l:t}=e;return!er(t)&&t.lvl===e.lvl?Ur(t,{r:Ur(e,{l:t.r})}):e}function Qm(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],c=n(i,t);if(c===0)return s;if(c===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function t8(e,t,n){return e[Qm(e,t,n)]}function Sre(e,t,n,r){const o=Qm(e,t,r),s=Qm(e,n,r,o);return e.slice(o,s+1)}const v2=Un(()=>({recalcInProgress:at(!1)}),[],{singleton:!0});function kre(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function n_(e,t){let n=0,r=0;for(;n=h||o===g)&&(e=Qb(e,h)):(p=g!==o,d=!0),m>i&&i>=h&&g!==o&&(e=os(e,i+1,g));p&&(e=os(e,s,o))}return[e,n]}function _re(){return{offsetTree:[],sizeTree:du(),groupOffsetTree:du(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function b2({index:e},t){return t===e?0:t0&&(t=Math.max(t,t8(e,r,b2).offset)),ZO(Sre(e,t,n,Ire),Pre)}function Jb(e,t,n,r){let o=e,s=0,i=0,c=0,d=0;if(t!==0){d=Qm(o,t-1,b2),c=o[d].offset;const h=aa(n,t-1);s=h[0],i=h[1],o.length&&o[d].size===aa(n,t)[1]&&(d-=1),o=o.slice(0,d+1)}else o=[];for(const{start:p,value:h}of c0(n,t,1/0)){const m=p-s,g=m*i+c+m*r;o.push({offset:g,size:h,index:p}),s=p,c=g,i=h}return{offsetTree:o,lastIndex:s,lastOffset:c,lastSize:i}}function Mre(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,is.DEBUG);const s=e.sizeTree;let i=s,c=0;if(n.length>0&&er(s)&&t.length===2){const g=t[0].size,b=t[1].size;i=n.reduce((y,x)=>os(os(y,x,g),x+1,b),i)}else[i,c]=jre(i,t);if(i===s)return e;const{offsetTree:d,lastIndex:p,lastSize:h,lastOffset:m}=Jb(e.offsetTree,c,i,o);return{sizeTree:i,offsetTree:d,lastIndex:p,lastOffset:m,lastSize:h,groupOffsetTree:n.reduce((g,b)=>os(g,b,af(b,d,o)),du()),groupIndices:n}}function af(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=t8(t,e,b2),i=e-o,c=s*i+(i-1)*n+r;return c>0?c+n:c}function Ore(e){return typeof e.groupIndex<"u"}function n8(e,t,n){if(Ore(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=r8(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function r8(e,t){if(!u0(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function u0(e){return!er(e.groupOffsetTree)}function Rre(e){return Rl(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const Are={offsetHeight:"height",offsetWidth:"width"},Va=Un(([{log:e},{recalcInProgress:t}])=>{const n=Mn(),r=Mn(),o=Po(r,0),s=Mn(),i=Mn(),c=at(0),d=at([]),p=at(void 0),h=at(void 0),m=at((P,M)=>al(P,Are[M])),g=at(void 0),b=at(0),y=_re(),x=Po($e(n,mn(d,e,b),ka(Mre,y),hr()),y),C=Po($e(d,hr(),ka((P,M)=>({prev:P.current,current:M}),{prev:[],current:[]}),yt(({prev:P})=>P)),[]);Lt($e(d,tn(P=>P.length>0),mn(x,b),yt(([P,M,R])=>{const A=P.reduce((D,O,T)=>os(D,O,af(O,M.offsetTree,R)||T),du());return{...M,groupIndices:P,groupOffsetTree:A}})),x),Lt($e(r,mn(x),tn(([P,{lastIndex:M}])=>P[{startIndex:P,endIndex:M,size:R}])),n),Lt(p,h);const S=Po($e(p,yt(P=>P===void 0)),!0);Lt($e(h,tn(P=>P!==void 0&&er(ks(x).sizeTree)),yt(P=>[{startIndex:0,endIndex:0,size:P}])),n);const j=as($e(n,mn(x),ka(({sizes:P},[M,R])=>({changed:R!==P,sizes:R}),{changed:!1,sizes:y}),yt(P=>P.changed)));qn($e(c,ka((P,M)=>({diff:P.prev-M,prev:M}),{diff:0,prev:0}),yt(P=>P.diff)),P=>{const{groupIndices:M}=ks(x);if(P>0)dn(t,!0),dn(s,P+n_(P,M));else if(P<0){const R=ks(C);R.length>0&&(P-=n_(-P,R)),dn(i,P)}}),qn($e(c,mn(e)),([P,M])=>{P<0&&M("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},is.ERROR)});const _=as(s);Lt($e(s,mn(x),yt(([P,M])=>{const R=M.groupIndices.length>0,A=[],D=M.lastSize;if(R){const O=sf(M.sizeTree,0);let T=0,Y=0;for(;T{let ee=Q.ranges;return Q.prevSize!==0&&(ee=[...Q.ranges,{startIndex:Q.prevIndex,endIndex:U+P-1,size:Q.prevSize}]),{ranges:ee,prevIndex:U+P,prevSize:L}},{ranges:A,prevIndex:P,prevSize:0}).ranges}return Rl(M.sizeTree).reduce((O,{k:T,v:Y})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:T+P-1,size:O.prevSize}],prevIndex:T+P,prevSize:Y}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const I=as($e(i,mn(x,b),yt(([P,{offsetTree:M},R])=>{const A=-P;return af(A,M,R)})));return Lt($e(i,mn(x,b),yt(([P,M,R])=>{if(M.groupIndices.length>0){if(er(M.sizeTree))return M;let D=du();const O=ks(C);let T=0,Y=0,z=0;for(;T<-P;){z=O[Y];const Q=O[Y+1]-z-1;Y++,T+=Q+1}if(D=Rl(M.sizeTree).reduce((Q,{k:U,v:L})=>os(Q,Math.max(0,U+P),L),D),T!==-P){const Q=sf(M.sizeTree,z);D=os(D,0,Q);const U=aa(M.sizeTree,-P+1)[1];D=os(D,1,U)}return{...M,sizeTree:D,...Jb(M.offsetTree,0,D,R)}}else{const D=Rl(M.sizeTree).reduce((O,{k:T,v:Y})=>os(O,Math.max(0,T+P),Y),du());return{...M,sizeTree:D,...Jb(M.offsetTree,0,D,R)}}})),x),{data:g,totalCount:r,sizeRanges:n,groupIndices:d,defaultItemSize:h,fixedItemSize:p,unshiftWith:s,shiftWith:i,shiftWithOffset:I,beforeUnshiftWith:_,firstItemIndex:c,gap:b,sizes:x,listRefresh:j,statefulTotalCount:o,trackItemSizes:S,itemSize:m}},br(ml,v2),{singleton:!0}),Dre=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function o8(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Dre)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Gf=Un(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:c,headerHeight:d,footerHeight:p,fixedHeaderHeight:h,fixedFooterHeight:m},{log:g}])=>{const b=Mn(),y=at(0);let x=null,C=null,S=null;function j(){x&&(x(),x=null),S&&(S(),S=null),C&&(clearTimeout(C),C=null),dn(o,!1)}return Lt($e(b,mn(e,s,t,y,d,p,g),mn(r,h,m),yt(([[_,I,P,M,R,A,D,O],T,Y,z])=>{const W=o8(_),{align:Q,behavior:U,offset:L}=W,ee=M-1,K=n8(W,I,ee);let Z=af(K,I.offsetTree,T)+A;Q==="end"?(Z+=Y+aa(I.sizeTree,K)[1]-P+z,K===ee&&(Z+=D)):Q==="center"?Z+=(Y+aa(I.sizeTree,K)[1]-P+z)/2:Z-=R,L&&(Z+=L);const se=fe=>{j(),fe?(O("retrying to scroll to",{location:_},is.DEBUG),dn(b,_)):O("list did not change, scroll successful",{},is.DEBUG)};if(j(),U==="smooth"){let fe=!1;S=qn(n,G=>{fe=fe||G}),x=gi(c,()=>{se(fe)})}else x=gi($e(n,Tre(150)),se);return C=setTimeout(()=>{j()},1200),dn(o,!0),O("scrolling from index to",{index:K,top:Z,behavior:U},is.DEBUG),{top:Z,behavior:U}})),i),{scrollToIndex:b,topListHeight:y}},br(Va,Do,ml),{singleton:!0});function Tre(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const lf="up",Ld="down",Nre="none",$re={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Lre=0,qf=Un(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=at(!1),c=at(!0),d=Mn(),p=Mn(),h=at(4),m=at(Lre),g=Po($e(e_($e(en(t),_u(1),ei(!0)),$e(en(t),_u(1),ei(!1),Zj(100))),hr()),!1),b=Po($e(e_($e(s,ei(!0)),$e(s,ei(!1),Zj(200))),hr()),!1);Lt($e(to(en(t),en(m)),yt(([j,_])=>j<=_),hr()),c),Lt($e(c,Ki(50)),p);const y=as($e(to(e,en(n),en(r),en(o),en(h)),ka((j,[{scrollTop:_,scrollHeight:I},P,M,R,A])=>{const D=_+P-I>-A,O={viewportHeight:P,scrollTop:_,scrollHeight:I};if(D){let Y,z;return _>j.state.scrollTop?(Y="SCROLLED_DOWN",z=j.state.scrollTop-_):(Y="SIZE_DECREASED",z=j.state.scrollTop-_||j.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:Y,scrollTopDelta:z}}let T;return O.scrollHeight>j.state.scrollHeight?T="SIZE_INCREASED":Pj&&j.atBottom===_.atBottom))),x=Po($e(e,ka((j,{scrollTop:_,scrollHeight:I,viewportHeight:P})=>{if(KO(j.scrollHeight,I))return{scrollTop:_,scrollHeight:I,jump:0,changed:!1};{const M=I-(_+P)<1;return j.scrollTop!==_&&M?{scrollHeight:I,scrollTop:_,jump:j.scrollTop-_,changed:!0}:{scrollHeight:I,scrollTop:_,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),tn(j=>j.changed),yt(j=>j.jump)),0);Lt($e(y,yt(j=>j.atBottom)),i),Lt($e(i,Ki(50)),d);const C=at(Ld);Lt($e(e,yt(({scrollTop:j})=>j),hr(),ka((j,_)=>ks(b)?{direction:j.direction,prevScrollTop:_}:{direction:_j.direction)),C),Lt($e(e,Ki(50),ei(Nre)),C);const S=at(0);return Lt($e(g,tn(j=>!j),ei(0)),S),Lt($e(t,Ki(100),mn(g),tn(([j,_])=>!!_),ka(([j,_],[I])=>[_,I],[0,0]),yt(([j,_])=>_-j)),S),{isScrolling:g,isAtTop:c,isAtBottom:i,atBottomState:y,atTopStateChange:p,atBottomStateChange:d,scrollDirection:C,atBottomThreshold:h,atTopThreshold:m,scrollVelocity:S,lastJumpDueToItemResize:x}},br(Do)),gl=Un(([{log:e}])=>{const t=at(!1),n=as($e(t,tn(r=>r),hr()));return qn(t,r=>{r&&ks(e)("props updated",{},is.DEBUG)}),{propsReady:t,didMount:n}},br(ml),{singleton:!0});function x2(e,t){e==0?t():requestAnimationFrame(()=>x2(e-1,t))}function y2(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Kf=Un(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o},{didMount:s}])=>{const i=at(!0),c=at(0),d=at(!1);return Lt($e(s,mn(c),tn(([p,h])=>!!h),ei(!1)),i),qn($e(to(t,s),mn(i,e,n,d),tn(([[,p],h,{sizeTree:m},g,b])=>p&&(!er(m)||h2(g))&&!h&&!b),mn(c)),([,p])=>{dn(d,!0),x2(3,()=>{gi(r,()=>dn(i,!0)),dn(o,p)})}),{scrolledToInitialItem:i,initialTopMostItemIndex:c}},br(Va,Do,Gf,gl),{singleton:!0});function r_(e){return e?e==="smooth"?"smooth":"auto":!1}const zre=(e,t)=>typeof e=="function"?r_(e(t)):t&&r_(e),Fre=Un(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:c},{log:d},{scrollingInProgress:p}])=>{const h=at(!1),m=Mn();let g=null;function b(x){dn(o,{index:"LAST",align:"end",behavior:x})}qn($e(to($e(en(e),_u(1)),c),mn(en(h),n,s,p),yt(([[x,C],S,j,_,I])=>{let P=C&&_,M="auto";return P&&(M=zre(S,j||I),P=P&&!!M),{totalCount:x,shouldFollow:P,followOutputBehavior:M}}),tn(({shouldFollow:x})=>x)),({totalCount:x,followOutputBehavior:C})=>{g&&(g(),g=null),g=gi(t,()=>{ks(d)("following output to ",{totalCount:x},is.DEBUG),b(C),g=null})});function y(x){const C=gi(r,S=>{x&&!S.atBottom&&S.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(ks(d)("scrolling to bottom due to increased size",{},is.DEBUG),b("auto"))});setTimeout(C,100)}return qn($e(to(en(h),e,i),tn(([x,,C])=>x&&C),ka(({value:x},[,C])=>({refreshed:x===C,value:C}),{refreshed:!1,value:0}),tn(({refreshed:x})=>x),mn(h,e)),([,x])=>{y(x!==!1)}),qn(m,()=>{y(ks(h)!==!1)}),qn(to(en(h),r),([x,C])=>{x&&!C.atBottom&&C.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{followOutput:h,autoscrollToBottom:m}},br(Va,qf,Gf,Kf,gl,ml,Do));function Bre(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const s8=Un(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Mn(),i=Mn(),c=as($e(s,yt(Bre)));return Lt($e(c,yt(d=>d.totalCount)),e),Lt($e(c,yt(d=>d.groupIndices)),t),Lt($e(to(r,n,o),tn(([d,p])=>u0(p)),yt(([d,p,h])=>aa(p.groupOffsetTree,Math.max(d-h,0),"v")[0]),hr(),yt(d=>[d])),i),{groupCounts:s,topItemsIndexes:i}},br(Va,Do));function cf(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function a8(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Xm="top",Ym="bottom",o_="none";function s_(e,t,n){return typeof e=="number"?n===lf&&t===Xm||n===Ld&&t===Ym?e:0:n===lf?t===Xm?e.main:e.reverse:t===Ym?e.main:e.reverse}function a_(e,t){return typeof e=="number"?e:e[t]||0}const C2=Un(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Mn(),i=at(0),c=at(0),d=at(0),p=Po($e(to(en(e),en(t),en(r),en(s,cf),en(d),en(i),en(o),en(n),en(c)),yt(([h,m,g,[b,y],x,C,S,j,_])=>{const I=h-j,P=C+S,M=Math.max(g-I,0);let R=o_;const A=a_(_,Xm),D=a_(_,Ym);return b-=j,b+=g+S,y+=g+S,y-=j,b>h+P-A&&(R=lf),yh!=null),hr(cf)),[0,0]);return{listBoundary:s,overscan:d,topListHeight:i,increaseViewportBy:c,visibleRange:p}},br(Do),{singleton:!0});function Hre(e,t,n){if(u0(t)){const r=r8(e,t);return[{index:aa(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const i_={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function l_(e,t,n){if(e.length===0)return[];if(!u0(t))return e.map(p=>({...p,index:p.index+n,originalIndex:p.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=c0(t.groupOffsetTree,r,o);let c,d=0;for(const p of e){(!c||c.end0){p=e[0].offset;const x=e[e.length-1];h=x.offset+x.size}const m=n-d,g=c+m*i+(m-1)*r,b=p,y=g-h;return{items:l_(e,o,s),topItems:l_(t,o,s),topListHeight:t.reduce((x,C)=>C.size+x,0),offsetTop:p,offsetBottom:y,top:b,bottom:h,totalCount:n,firstItemIndex:s}}const ac=Un(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:c,topListHeight:d},{scrolledToInitialItem:p,initialTopMostItemIndex:h},{topListHeight:m},g,{didMount:b},{recalcInProgress:y}])=>{const x=at([]),C=Mn();Lt(s.topItemsIndexes,x);const S=Po($e(to(b,y,en(i,cf),en(t),en(e),en(h),p,en(x),en(r),en(o),n),tn(([P,M,,R,,,,,,,A])=>{const D=A&&A.length!==R;return P&&!M&&!D}),yt(([,,[P,M],R,A,D,O,T,Y,z,W])=>{const Q=A,{sizeTree:U,offsetTree:L}=Q;if(R===0||P===0&&M===0)return{...i_,totalCount:R};if(er(U))return Th(Hre(y2(D,R),Q,W),[],R,z,Q,Y);const ee=[];if(T.length>0){const G=T[0],te=T[T.length-1];let V=0;for(const F of c0(U,G,te)){const X=F.value,ue=Math.max(F.start,G),q=Math.min(F.end,te);for(let ne=ue;ne<=q;ne++)ee.push({index:ne,size:X,offset:V,data:W&&W[ne]}),V+=X}}if(!O)return Th([],ee,R,z,Q,Y);const K=T.length>0?T[T.length-1]+1:0,Z=Ere(L,P,M,K);if(Z.length===0)return null;const se=R-1,fe=l0([],G=>{for(const te of Z){const V=te.value;let F=V.offset,X=te.start;const ue=V.size;if(V.offset=M);ne++)G.push({index:ne,size:ue,offset:F,data:W&&W[ne]}),F+=ue+z}});return Th(fe,ee,R,z,Q,Y)}),tn(P=>P!==null),hr()),i_);Lt($e(n,tn(h2),yt(P=>P==null?void 0:P.length)),t),Lt($e(S,yt(P=>P.topListHeight)),m),Lt(m,d),Lt($e(S,yt(P=>[P.top,P.bottom])),c),Lt($e(S,yt(P=>P.items)),C);const j=as($e(S,tn(({items:P})=>P.length>0),mn(t,n),tn(([{items:P},M])=>P[P.length-1].originalIndex===M-1),yt(([,P,M])=>[P-1,M]),hr(cf),yt(([P])=>P))),_=as($e(S,Ki(200),tn(({items:P,topItems:M})=>P.length>0&&P[0].originalIndex===M.length),yt(({items:P})=>P[0].index),hr())),I=as($e(S,tn(({items:P})=>P.length>0),yt(({items:P})=>{let M=0,R=P.length-1;for(;P[M].type==="group"&&MM;)R--;return{startIndex:P[M].index,endIndex:P[R].index}}),hr(a8)));return{listState:S,topItemsIndexes:x,endReached:j,startReached:_,rangeChanged:I,itemsRendered:C,...g}},br(Va,s8,C2,Kf,Gf,qf,gl,v2),{singleton:!0}),Wre=Un(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{listState:s},{didMount:i}])=>{const c=at(0);return Lt($e(i,mn(c),tn(([,d])=>d!==0),mn(o,e,t,r,n),yt(([[,d],p,h,m,g,b=[]])=>{let y=0;if(h.groupIndices.length>0)for(const j of h.groupIndices){if(j-y>=d)break;y++}const x=d+y,C=y2(p,x),S=Array.from({length:x}).map((j,_)=>({index:_+C,size:0,offset:0,data:b[_+C]}));return Th(S,[],x,g,h,m)})),s),{initialItemCount:c}},br(Va,Kf,ac,gl),{singleton:!0}),i8=Un(([{scrollVelocity:e}])=>{const t=at(!1),n=Mn(),r=at(!1);return Lt($e(e,mn(r,t,n),tn(([o,s])=>!!s),yt(([o,s,i,c])=>{const{exit:d,enter:p}=s;if(i){if(d(o,c))return!1}else if(p(o,c))return!0;return i}),hr()),t),qn($e(to(t,e,n),mn(r)),([[o,s,i],c])=>o&&c&&c.change&&c.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},br(qf),{singleton:!0}),Vre=Un(([{topItemsIndexes:e}])=>{const t=at(0);return Lt($e(t,tn(n=>n>0),yt(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},br(ac)),l8=Un(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Mn(),i=Po($e(to(e,r,t,n,o),yt(([c,d,p,h,m])=>c+d+p+h+m.offsetBottom+m.bottom)),0);return Lt(en(i),s),{totalListHeight:i,totalListHeightChanged:s}},br(Do,ac),{singleton:!0});function c8(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Ure=c8(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Gre=Un(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:c},{listState:d},{beforeUnshiftWith:p,shiftWithOffset:h,sizes:m,gap:g},{log:b},{recalcInProgress:y}])=>{const x=as($e(d,mn(c),ka(([,S,j,_],[{items:I,totalCount:P,bottom:M,offsetBottom:R},A])=>{const D=M+R;let O=0;return j===P&&S.length>0&&I.length>0&&(I[0].originalIndex===0&&S[0].originalIndex===0||(O=D-_,O!==0&&(O+=A))),[O,I,P,D]},[0,[],0,0]),tn(([S])=>S!==0),mn(t,i,r,s,b,y),tn(([,S,j,_,,,I])=>!I&&!_&&S!==0&&j===lf),yt(([[S],,,,,j])=>(j("Upward scrolling compensation",{amount:S},is.DEBUG),S))));function C(S){S>0?(dn(e,{top:-S,behavior:"auto"}),dn(n,0)):(dn(n,0),dn(e,{top:-S,behavior:"auto"}))}return qn($e(x,mn(n,o)),([S,j,_])=>{_&&Ure()?dn(n,j-S):C(-S)}),qn($e(to(Po(o,!1),n,y),tn(([S,j,_])=>!S&&!_&&j!==0),yt(([S,j])=>j),Ki(1)),C),Lt($e(h,yt(S=>({top:-S}))),e),qn($e(p,mn(m,g),yt(([S,{lastSize:j,groupIndices:_,sizeTree:I},P])=>{function M(R){return R*(j+P)}if(_.length===0)return M(S);{let R=0;const A=sf(I,0);let D=0,O=0;for(;DS&&(R-=A,T=S-D+1),D+=T,R+=M(T),O++}return R}})),S=>{dn(n,S),requestAnimationFrame(()=>{dn(e,{top:S}),requestAnimationFrame(()=>{dn(n,0),dn(y,!1)})})}),{deviation:n}},br(Do,qf,ac,Va,ml,v2)),qre=Un(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=at(0);return qn($e(e,mn(r),tn(([,o])=>o!==0),yt(([,o])=>({top:o}))),o=>{gi($e(n,_u(1),tn(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{dn(t,o)})})}),{initialScrollTop:r}},br(gl,Do,ac),{singleton:!0}),Kre=Un(([{viewportHeight:e},{totalListHeight:t}])=>{const n=at(!1),r=Po($e(to(n,e,t),tn(([o])=>o),yt(([,o,s])=>Math.max(0,o-s)),Ki(0),hr()),0);return{alignToBottom:n,paddingTopAddition:r}},br(Do,l8),{singleton:!0}),w2=Un(([{scrollTo:e,scrollContainerState:t}])=>{const n=Mn(),r=Mn(),o=Mn(),s=at(!1),i=at(void 0);return Lt($e(to(n,r),yt(([{viewportHeight:c,scrollTop:d,scrollHeight:p},{offsetTop:h}])=>({scrollTop:Math.max(0,d-h),scrollHeight:p,viewportHeight:c}))),t),Lt($e(e,mn(r),yt(([c,{offsetTop:d}])=>({...c,top:c.top+d}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},br(Do)),Qre=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>er?{...i,behavior:o,align:s??"end"}:null,Xre=Un(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:c,scrollingInProgress:d},{scrollToIndex:p}])=>{const h=Mn();return Lt($e(h,mn(e,o,t,s,i,c,r),mn(n),yt(([[m,g,b,y,x,C,S,j],_])=>{const{done:I,behavior:P,align:M,calculateViewLocation:R=Qre,...A}=m,D=n8(m,g,y-1),O=af(D,g.offsetTree,_)+x+C,T=O+aa(g.sizeTree,D)[1],Y=j+C,z=j+b-S,W=R({itemTop:O,itemBottom:T,viewportTop:Y,viewportBottom:z,locationParams:{behavior:P,align:M,...A}});return W?I&&gi($e(d,tn(Q=>Q===!1),_u(ks(d)?1:2)),I):I&&I(),W}),tn(m=>m!==null)),p),{scrollIntoView:h}},br(Va,Do,Gf,ac,ml),{singleton:!0}),Yre=Un(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:s,windowScrollContainerState:i,windowViewportRect:c}])=>{const d=Mn(),p=at(void 0),h=at(null),m=at(null);return Lt(i,h),Lt(c,m),qn($e(d,mn(e,n,s,h,m)),([g,b,y,x,C,S])=>{const j=Rre(b.sizeTree);x&&C!==null&&S!==null&&(y=C.scrollTop-S.offsetTop),g({ranges:j,scrollTop:y})}),Lt($e(p,tn(h2),yt(Jre)),r),Lt($e(o,mn(p),tn(([,g])=>g!==void 0),hr(),yt(([,g])=>g.ranges)),t),{getState:d,restoreStateFrom:p}},br(Va,Do,Kf,gl,w2));function Jre(e){return{offset:e.scrollTop,index:0,align:"start"}}const Zre=Un(([e,t,n,r,o,s,i,c,d,p])=>({...e,...t,...n,...r,...o,...s,...i,...c,...d,...p}),br(C2,Wre,gl,i8,l8,qre,Kre,w2,Xre,ml)),eoe=Un(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:c,groupIndices:d,statefulTotalCount:p,gap:h,sizes:m},{initialTopMostItemIndex:g,scrolledToInitialItem:b},y,x,C,{listState:S,topItemsIndexes:j,..._},{scrollToIndex:I},P,{topItemCount:M},{groupCounts:R},A])=>(Lt(_.rangeChanged,A.scrollSeekRangeChanged),Lt($e(A.windowViewportRect,yt(D=>D.visibleHeight)),y.viewportHeight),{totalCount:e,data:i,firstItemIndex:c,sizeRanges:t,initialTopMostItemIndex:g,scrolledToInitialItem:b,topItemsIndexes:j,topItemCount:M,groupCounts:R,fixedItemHeight:n,defaultItemHeight:r,gap:h,...C,statefulTotalCount:p,listState:S,scrollToIndex:I,trackItemSizes:o,itemSize:s,groupIndices:d,..._,...A,...y,sizes:m,...x}),br(Va,Kf,Do,Yre,Fre,ac,Gf,Gre,Vre,s8,Zre)),C1="-webkit-sticky",c_="sticky",u8=c8(()=>{if(typeof document>"u")return c_;const e=document.createElement("div");return e.style.position=C1,e.style.position===C1?C1:c_});function d8(e,t){const n=B.useRef(null),r=B.useCallback(c=>{if(c===null||!c.offsetParent)return;const d=c.getBoundingClientRect(),p=d.width;let h,m;if(t){const g=t.getBoundingClientRect(),b=d.top-g.top;h=g.height-Math.max(0,b),m=b+t.scrollTop}else h=window.innerHeight-Math.max(0,d.top),m=d.top+window.pageYOffset;n.current={offsetTop:m,visibleHeight:h,visibleWidth:p},e(n.current)},[e,t]),{callbackRef:o,ref:s}=g2(r),i=B.useCallback(()=>{r(s.current)},[r,s]);return B.useEffect(()=>{if(t){t.addEventListener("scroll",i);const c=new ResizeObserver(i);return c.observe(t),()=>{t.removeEventListener("scroll",i),c.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const f8=B.createContext(void 0),p8=B.createContext(void 0);function h8(e){return e}const toe=Un(()=>{const e=at(d=>`Item ${d}`),t=at(null),n=at(d=>`Group ${d}`),r=at({}),o=at(h8),s=at("div"),i=at(Uu),c=(d,p=null)=>Po($e(r,yt(h=>h[d]),hr()),p);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:c("Footer"),HeaderComponent:c("Header"),TopItemListComponent:c("TopItemList"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),GroupComponent:c("Group","div"),ScrollerComponent:c("Scroller","div"),EmptyPlaceholder:c("EmptyPlaceholder"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder")}}),noe=Un(([e,t])=>({...e,...t}),br(eoe,toe)),roe=({height:e})=>B.createElement("div",{style:{height:e}}),ooe={position:u8(),zIndex:1,overflowAnchor:"none"},soe={overflowAnchor:"none"},u_=B.memo(function({showTopList:t=!1}){const n=kn("listState"),r=js("sizeRanges"),o=kn("useWindowScroll"),s=kn("customScrollParent"),i=js("windowScrollContainerState"),c=js("scrollContainerState"),d=s||o?i:c,p=kn("itemContent"),h=kn("context"),m=kn("groupContent"),g=kn("trackItemSizes"),b=kn("itemSize"),y=kn("log"),x=js("gap"),{callbackRef:C}=xre(r,b,g,t?Uu:d,y,x,s),[S,j]=B.useState(0);S2("deviation",W=>{S!==W&&j(W)});const _=kn("EmptyPlaceholder"),I=kn("ScrollSeekPlaceholder")||roe,P=kn("ListComponent"),M=kn("ItemComponent"),R=kn("GroupComponent"),A=kn("computeItemKey"),D=kn("isSeeking"),O=kn("groupIndices").length>0,T=kn("paddingTopAddition"),Y=kn("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+T,paddingBottom:n.offsetBottom,marginTop:S,...Y?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&_?B.createElement(_,Bo(_,h)):B.createElement(P,{...Bo(P,h),ref:C,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(W=>{const Q=W.originalIndex,U=A(Q+n.firstItemIndex,W.data,h);return D?B.createElement(I,{...Bo(I,h),key:U,index:W.index,height:W.size,type:W.type||"item",...W.type==="group"?{}:{groupIndex:W.groupIndex}}):W.type==="group"?B.createElement(R,{...Bo(R,h),key:U,"data-index":Q,"data-known-size":W.size,"data-item-index":W.index,style:ooe},m(W.index,h)):B.createElement(M,{...Bo(M,h),key:U,"data-index":Q,"data-known-size":W.size,"data-item-index":W.index,"data-item-group-index":W.groupIndex,item:W.data,style:soe},O?p(W.index,W.groupIndex,W.data,h):p(W.index,W.data,h))}))}),aoe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},d0={width:"100%",height:"100%",position:"absolute",top:0},ioe={width:"100%",position:u8(),top:0,zIndex:1};function Bo(e,t){if(typeof e!="string")return{context:t}}const loe=B.memo(function(){const t=kn("HeaderComponent"),n=js("headerHeight"),r=kn("headerFooterTag"),o=sc(i=>n(al(i,"height"))),s=kn("context");return t?B.createElement(r,{ref:o},B.createElement(t,Bo(t,s))):null}),coe=B.memo(function(){const t=kn("FooterComponent"),n=js("footerHeight"),r=kn("headerFooterTag"),o=sc(i=>n(al(i,"height"))),s=kn("context");return t?B.createElement(r,{ref:o},B.createElement(t,Bo(t,s))):null});function m8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:s,children:i,...c}){const d=e("scrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("scrollerRef"),g=n("context"),{scrollerRef:b,scrollByCallback:y,scrollToCallback:x}=QO(d,h,p,m);return t("scrollTo",x),t("scrollBy",y),B.createElement(p,{ref:b,style:{...aoe,...s},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...c,...Bo(p,g)},i)})}function g8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:s,children:i,...c}){const d=e("windowScrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("totalListHeight"),g=n("deviation"),b=n("customScrollParent"),y=n("context"),{scrollerRef:x,scrollByCallback:C,scrollToCallback:S}=QO(d,h,p,Uu,b);return gre(()=>(x.current=b||window,()=>{x.current=null}),[x,b]),t("windowScrollTo",S),t("scrollBy",C),B.createElement(p,{style:{position:"relative",...s,...m!==0?{height:m+g}:{}},"data-virtuoso-scroller":!0,...c,...Bo(p,y)},i)})}const uoe=({children:e})=>{const t=B.useContext(f8),n=js("viewportHeight"),r=js("fixedItemHeight"),o=sc(VO(n,s=>al(s,"height")));return B.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),B.createElement("div",{style:d0,ref:o,"data-viewport-type":"element"},e)},doe=({children:e})=>{const t=B.useContext(f8),n=js("windowViewportRect"),r=js("fixedItemHeight"),o=kn("customScrollParent"),s=d8(n,o);return B.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),B.createElement("div",{ref:s,style:d0,"data-viewport-type":"window"},e)},foe=({children:e})=>{const t=kn("TopItemListComponent"),n=kn("headerHeight"),r={...ioe,marginTop:`${n}px`},o=kn("context");return B.createElement(t||"div",{style:r,context:o},e)},poe=B.memo(function(t){const n=kn("useWindowScroll"),r=kn("topItemsIndexes").length>0,o=kn("customScrollParent"),s=o||n?goe:moe,i=o||n?doe:uoe;return B.createElement(s,{...t},r&&B.createElement(foe,null,B.createElement(u_,{showTopList:!0})),B.createElement(i,null,B.createElement(loe,null),B.createElement(u_,null),B.createElement(coe,null)))}),{Component:hoe,usePublisher:js,useEmitterValue:kn,useEmitter:S2}=qO(noe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},poe),moe=m8({usePublisher:js,useEmitterValue:kn,useEmitter:S2}),goe=g8({usePublisher:js,useEmitterValue:kn,useEmitter:S2}),voe=hoe,d_={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},boe={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:f_,ceil:p_,floor:Jm,min:w1,max:zd}=Math;function xoe(e){return{...boe,items:e}}function h_(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function yoe(e,t){return e&&e.column===t.column&&e.row===t.row}function gh(e,t){return e&&e.width===t.width&&e.height===t.height}const Coe=Un(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:c,scrollContainerState:d,footerHeight:p,headerHeight:h},m,g,{propsReady:b,didMount:y},{windowViewportRect:x,useWindowScroll:C,customScrollParent:S,windowScrollContainerState:j,windowScrollTo:_},I])=>{const P=at(0),M=at(0),R=at(d_),A=at({height:0,width:0}),D=at({height:0,width:0}),O=Mn(),T=Mn(),Y=at(0),z=at(null),W=at({row:0,column:0}),Q=Mn(),U=Mn(),L=at(!1),ee=at(0),K=at(!0),Z=at(!1);qn($e(y,mn(ee),tn(([F,X])=>!!X)),()=>{dn(K,!1),dn(M,0)}),qn($e(to(y,K,D,A,ee,Z),tn(([F,X,ue,q,,ne])=>F&&!X&&ue.height!==0&&q.height!==0&&!ne)),([,,,,F])=>{dn(Z,!0),x2(1,()=>{dn(O,F)}),gi($e(r),()=>{dn(n,[0,0]),dn(K,!0)})}),Lt($e(U,tn(F=>F!=null&&F.scrollTop>0),ei(0)),M),qn($e(y,mn(U),tn(([,F])=>F!=null)),([,F])=>{F&&(dn(A,F.viewport),dn(D,F==null?void 0:F.item),dn(W,F.gap),F.scrollTop>0&&(dn(L,!0),gi($e(r,_u(1)),X=>{dn(L,!1)}),dn(i,{top:F.scrollTop})))}),Lt($e(A,yt(({height:F})=>F)),o),Lt($e(to(en(A,gh),en(D,gh),en(W,(F,X)=>F&&F.column===X.column&&F.row===X.row),en(r)),yt(([F,X,ue,q])=>({viewport:F,item:X,gap:ue,scrollTop:q}))),Q),Lt($e(to(en(P),t,en(W,yoe),en(D,gh),en(A,gh),en(z),en(M),en(L),en(K),en(ee)),tn(([,,,,,,,F])=>!F),yt(([F,[X,ue],q,ne,pe,le,we,,ve,he])=>{const{row:Ne,column:De}=q,{height:qe,width:Mt}=ne,{width:ot}=pe;if(we===0&&(F===0||ot===0))return d_;if(Mt===0){const At=y2(he,F),_t=At===0?Math.max(we-1,0):At;return xoe(h_(At,_t,le))}const an=v8(ot,Mt,De);let pt,vt;ve?X===0&&ue===0&&we>0?(pt=0,vt=we-1):(pt=an*Jm((X+Ne)/(qe+Ne)),vt=an*p_((ue+Ne)/(qe+Ne))-1,vt=w1(F-1,zd(vt,an-1)),pt=w1(vt,zd(0,pt))):(pt=0,vt=-1);const ke=h_(pt,vt,le),{top:Be,bottom:Ot}=m_(pe,q,ne,ke),Ht=p_(F/an),ht=Ht*qe+(Ht-1)*Ne-Ot;return{items:ke,offsetTop:Be,offsetBottom:ht,top:Be,bottom:Ot,itemHeight:qe,itemWidth:Mt}})),R),Lt($e(z,tn(F=>F!==null),yt(F=>F.length)),P),Lt($e(to(A,D,R,W),tn(([F,X,{items:ue}])=>ue.length>0&&X.height!==0&&F.height!==0),yt(([F,X,{items:ue},q])=>{const{top:ne,bottom:pe}=m_(F,q,X,ue);return[ne,pe]}),hr(cf)),n);const se=at(!1);Lt($e(r,mn(se),yt(([F,X])=>X||F!==0)),se);const fe=as($e(en(R),tn(({items:F})=>F.length>0),mn(P,se),tn(([{items:F},X,ue])=>ue&&F[F.length-1].index===X-1),yt(([,F])=>F-1),hr())),G=as($e(en(R),tn(({items:F})=>F.length>0&&F[0].index===0),ei(0),hr())),te=as($e(en(R),mn(L),tn(([{items:F},X])=>F.length>0&&!X),yt(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),hr(a8),Ki(0)));Lt(te,g.scrollSeekRangeChanged),Lt($e(O,mn(A,D,P,W),yt(([F,X,ue,q,ne])=>{const pe=o8(F),{align:le,behavior:we,offset:ve}=pe;let he=pe.index;he==="LAST"&&(he=q-1),he=zd(0,he,w1(q-1,he));let Ne=Zb(X,ne,ue,he);return le==="end"?Ne=f_(Ne-X.height+ue.height):le==="center"&&(Ne=f_(Ne-X.height/2+ue.height/2)),ve&&(Ne+=ve),{top:Ne,behavior:we}})),i);const V=Po($e(R,yt(F=>F.offsetBottom+F.bottom)),0);return Lt($e(x,yt(F=>({width:F.visibleWidth,height:F.visibleHeight}))),A),{data:z,totalCount:P,viewportDimensions:A,itemDimensions:D,scrollTop:r,scrollHeight:T,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:c,windowViewportRect:x,windowScrollTo:_,useWindowScroll:C,customScrollParent:S,windowScrollContainerState:j,deviation:Y,scrollContainerState:d,footerHeight:p,headerHeight:h,initialItemCount:M,gap:W,restoreStateFrom:U,...g,initialTopMostItemIndex:ee,gridState:R,totalListHeight:V,...m,startReached:G,endReached:fe,rangeChanged:te,stateChanged:Q,propsReady:b,stateRestoreInProgress:L,...I}},br(C2,Do,qf,i8,gl,w2,ml));function m_(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Zb(e,t,n,r[0].index),i=Zb(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Zb(e,t,n,r){const o=v8(e.width,n.width,t.column),s=Jm(r/o),i=s*n.height+zd(0,s-1)*t.row;return i>0?i+t.row:i}function v8(e,t,n){return zd(1,Jm((e+n)/(Jm(t)+n)))}const woe=Un(()=>{const e=at(p=>`Item ${p}`),t=at({}),n=at(null),r=at("virtuoso-grid-item"),o=at("virtuoso-grid-list"),s=at(h8),i=at("div"),c=at(Uu),d=(p,h=null)=>Po($e(t,yt(m=>m[p]),hr()),h);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:c,FooterComponent:d("Footer"),HeaderComponent:d("Header"),ListComponent:d("List","div"),ItemComponent:d("Item","div"),ScrollerComponent:d("Scroller","div"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder","div")}}),Soe=Un(([e,t])=>({...e,...t}),br(Coe,woe)),koe=B.memo(function(){const t=Sr("gridState"),n=Sr("listClassName"),r=Sr("itemClassName"),o=Sr("itemContent"),s=Sr("computeItemKey"),i=Sr("isSeeking"),c=ta("scrollHeight"),d=Sr("ItemComponent"),p=Sr("ListComponent"),h=Sr("ScrollSeekPlaceholder"),m=Sr("context"),g=ta("itemDimensions"),b=ta("gap"),y=Sr("log"),x=Sr("stateRestoreInProgress"),C=sc(S=>{const j=S.parentElement.parentElement.scrollHeight;c(j);const _=S.firstChild;if(_){const{width:I,height:P}=_.getBoundingClientRect();g({width:I,height:P})}b({row:g_("row-gap",getComputedStyle(S).rowGap,y),column:g_("column-gap",getComputedStyle(S).columnGap,y)})});return x?null:B.createElement(p,{ref:C,className:n,...Bo(p,m),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(S=>{const j=s(S.index,S.data,m);return i?B.createElement(h,{key:j,...Bo(h,m),index:S.index,height:t.itemHeight,width:t.itemWidth}):B.createElement(d,{...Bo(d,m),className:r,"data-index":S.index,key:j},o(S.index,S.data,m))}))}),joe=B.memo(function(){const t=Sr("HeaderComponent"),n=ta("headerHeight"),r=Sr("headerFooterTag"),o=sc(i=>n(al(i,"height"))),s=Sr("context");return t?B.createElement(r,{ref:o},B.createElement(t,Bo(t,s))):null}),_oe=B.memo(function(){const t=Sr("FooterComponent"),n=ta("footerHeight"),r=Sr("headerFooterTag"),o=sc(i=>n(al(i,"height"))),s=Sr("context");return t?B.createElement(r,{ref:o},B.createElement(t,Bo(t,s))):null}),Ioe=({children:e})=>{const t=B.useContext(p8),n=ta("itemDimensions"),r=ta("viewportDimensions"),o=sc(s=>{r(s.getBoundingClientRect())});return B.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),B.createElement("div",{style:d0,ref:o},e)},Poe=({children:e})=>{const t=B.useContext(p8),n=ta("windowViewportRect"),r=ta("itemDimensions"),o=Sr("customScrollParent"),s=d8(n,o);return B.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),B.createElement("div",{ref:s,style:d0},e)},Eoe=B.memo(function({...t}){const n=Sr("useWindowScroll"),r=Sr("customScrollParent"),o=r||n?Roe:Ooe,s=r||n?Poe:Ioe;return B.createElement(o,{...t},B.createElement(s,null,B.createElement(joe,null),B.createElement(koe,null),B.createElement(_oe,null)))}),{Component:Moe,usePublisher:ta,useEmitterValue:Sr,useEmitter:b8}=qO(Soe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},Eoe),Ooe=m8({usePublisher:ta,useEmitterValue:Sr,useEmitter:b8}),Roe=g8({usePublisher:ta,useEmitterValue:Sr,useEmitter:b8});function g_(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,is.WARN),t==="normal"?0:parseInt(t??"0",10)}const Aoe=Moe,Doe=e=>{const t=H(s=>s.gallery.galleryView),{data:n}=kx(e),{data:r}=jx(e),o=l.useMemo(()=>t==="images"?n==null?void 0:n.total:r==null?void 0:r.total,[t,r,n]);return{totalImages:n,totalAssets:r,currentViewTotal:o}},Toe=({imageDTO:e})=>a.jsx(N,{sx:{pointerEvents:"none",flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,p:2,alignItems:"flex-start",gap:2},children:a.jsxs(Ha,{variant:"solid",colorScheme:"base",children:[e.width," × ",e.height]})}),Noe=l.memo(Toe),k2=({postUploadAction:e,isDisabled:t})=>{const n=H(d=>d.gallery.autoAddBoardId),[r]=II(),o=l.useCallback(d=>{const p=d[0];p&&r({file:p,image_category:"user",is_intermediate:!1,postUploadAction:e??{type:"TOAST"},board_id:n==="none"?void 0:n})},[n,e,r]),{getRootProps:s,getInputProps:i,open:c}=Oy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},onDropAccepted:o,disabled:t,noDrag:!0,multiple:!1});return{getUploadButtonProps:s,getUploadInputProps:i,openUploader:c}},$oe=de(Ce,({generation:e})=>e.model,_e),f0=()=>{const e=oe(),t=Zl(),{t:n}=J(),r=H($oe),o=l.useCallback(()=>{t({title:n("toast.parameterSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),s=l.useCallback(G=>{t({title:n("toast.parameterNotSet"),description:G,status:"warning",duration:2500,isClosable:!0})},[n,t]),i=l.useCallback(()=>{t({title:n("toast.parametersSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),c=l.useCallback(G=>{t({title:n("toast.parametersNotSet"),status:"warning",description:G,duration:2500,isClosable:!0})},[n,t]),d=l.useCallback((G,te,V,F)=>{if(Ap(G)||Dp(te)||pd(V)||Pv(F)){Ap(G)&&e(Rd(G)),Dp(te)&&e(Ad(te)),pd(V)&&e(Dd(V)),pd(F)&&e(Td(F)),o();return}s()},[e,o,s]),p=l.useCallback(G=>{if(!Ap(G)){s();return}e(Rd(G)),o()},[e,o,s]),h=l.useCallback(G=>{if(!Dp(G)){s();return}e(Ad(G)),o()},[e,o,s]),m=l.useCallback(G=>{if(!pd(G)){s();return}e(Dd(G)),o()},[e,o,s]),g=l.useCallback(G=>{if(!Pv(G)){s();return}e(Td(G)),o()},[e,o,s]),b=l.useCallback(G=>{if(!$w(G)){s();return}e(Lh(G)),o()},[e,o,s]),y=l.useCallback(G=>{if(!Ev(G)){s();return}e(zh(G)),o()},[e,o,s]),x=l.useCallback(G=>{if(!Lw(G)){s();return}e(z1(G)),o()},[e,o,s]),C=l.useCallback(G=>{if(!Mv(G)){s();return}e(F1(G)),o()},[e,o,s]),S=l.useCallback(G=>{if(!zw(G)&&!oi(G)){s();return}oi(G)?e(Wc(null)):e(Wc(G)),o()},[e,o,s]),j=l.useCallback(G=>{if(!Ov(G)){s();return}e(Fh(G)),o()},[e,o,s]),_=l.useCallback(G=>{if(!Fw(G)){s();return}e(Hl(G)),o()},[e,o,s]),I=l.useCallback(G=>{if(!Bw(G)){s();return}e(Wl(G)),o()},[e,o,s]),P=l.useCallback(G=>{if(!Tp(G)){s();return}e(Bh(G)),o()},[e,o,s]),M=l.useCallback(G=>{if(!Hw(G)){s();return}e(B1(G)),o()},[e,o,s]),R=l.useCallback(G=>{if(!Tp(G)){s();return}e(Hh(G)),o()},[e,o,s]),A=l.useCallback(G=>{if(!Ww(G)){s();return}e(H1(G)),o()},[e,o,s]),{data:D}=vf(void 0),O=l.useCallback(G=>{if(!$I(G.lora))return{lora:null,error:"Invalid LoRA model"};const{base_model:te,model_name:V}=G.lora,F=D?YD.getSelectors().selectById(D,`${te}/lora/${V}`):void 0;return F?(F==null?void 0:F.base_model)===(r==null?void 0:r.base_model)?{lora:F,error:null}:{lora:null,error:"LoRA incompatible with currently-selected model"}:{lora:null,error:"LoRA model is not installed"}},[D,r==null?void 0:r.base_model]),T=l.useCallback(G=>{const te=O(G);if(!te.lora){s(te.error);return}e(Vw({...te.lora,weight:G.weight})),o()},[O,e,o,s]),{data:Y}=_x(void 0),z=l.useCallback(G=>{if(!Wh(G.control_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:te,control_model:V,control_weight:F,begin_step_percent:X,end_step_percent:ue,control_mode:q,resize_mode:ne}=G,pe=Y?LI.getSelectors().selectById(Y,`${V.base_model}/controlnet/${V.model_name}`):void 0;if(!pe)return{controlnet:null,error:"ControlNet model is not installed"};if(!((pe==null?void 0:pe.base_model)===(r==null?void 0:r.base_model)))return{controlnet:null,error:"ControlNet incompatible with currently-selected model"};const we="none",ve=Oo.none.default;return{controlnet:{type:"controlnet",isEnabled:!0,model:pe,weight:typeof F=="number"?F:hd.weight,beginStepPct:X||hd.beginStepPct,endStepPct:ue||hd.endStepPct,controlMode:q||hd.controlMode,resizeMode:ne||hd.resizeMode,controlImage:(te==null?void 0:te.image_name)||null,processedControlImage:(te==null?void 0:te.image_name)||null,processorType:we,processorNode:ve,shouldAutoConfig:!0,id:Jc()},error:null}},[Y,r==null?void 0:r.base_model]),W=l.useCallback(G=>{const te=z(G);if(!te.controlnet){s(te.error);return}e(wc(te.controlnet)),o()},[z,e,o,s]),{data:Q}=Ix(void 0),U=l.useCallback(G=>{if(!Wh(G.t2i_adapter_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:te,t2i_adapter_model:V,weight:F,begin_step_percent:X,end_step_percent:ue,resize_mode:q}=G,ne=Q?zI.getSelectors().selectById(Q,`${V.base_model}/t2i_adapter/${V.model_name}`):void 0;if(!ne)return{controlnet:null,error:"ControlNet model is not installed"};if(!((ne==null?void 0:ne.base_model)===(r==null?void 0:r.base_model)))return{t2iAdapter:null,error:"ControlNet incompatible with currently-selected model"};const le="none",we=Oo.none.default;return{t2iAdapter:{type:"t2i_adapter",isEnabled:!0,model:ne,weight:typeof F=="number"?F:Np.weight,beginStepPct:X||Np.beginStepPct,endStepPct:ue||Np.endStepPct,resizeMode:q||Np.resizeMode,controlImage:(te==null?void 0:te.image_name)||null,processedControlImage:(te==null?void 0:te.image_name)||null,processorType:le,processorNode:we,shouldAutoConfig:!0,id:Jc()},error:null}},[r==null?void 0:r.base_model,Q]),L=l.useCallback(G=>{const te=U(G);if(!te.t2iAdapter){s(te.error);return}e(wc(te.t2iAdapter)),o()},[U,e,o,s]),{data:ee}=Px(void 0),K=l.useCallback(G=>{if(!JD(G==null?void 0:G.ip_adapter_model))return{ipAdapter:null,error:"Invalid IP Adapter model"};const{image:te,ip_adapter_model:V,weight:F,begin_step_percent:X,end_step_percent:ue}=G,q=ee?FI.getSelectors().selectById(ee,`${V.base_model}/ip_adapter/${V.model_name}`):void 0;return q?(q==null?void 0:q.base_model)===(r==null?void 0:r.base_model)?{ipAdapter:{id:Jc(),type:"ip_adapter",isEnabled:!0,controlImage:(te==null?void 0:te.image_name)??null,model:q,weight:F??Rv.weight,beginStepPct:X??Rv.beginStepPct,endStepPct:ue??Rv.endStepPct},error:null}:{ipAdapter:null,error:"IP Adapter incompatible with currently-selected model"}:{ipAdapter:null,error:"IP Adapter model is not installed"}},[ee,r==null?void 0:r.base_model]),Z=l.useCallback(G=>{const te=K(G);if(!te.ipAdapter){s(te.error);return}e(wc(te.ipAdapter)),o()},[K,e,o,s]),se=l.useCallback(G=>{e(ig(G))},[e]),fe=l.useCallback(G=>{if(!G){c();return}const{cfg_scale:te,height:V,model:F,positive_prompt:X,negative_prompt:ue,scheduler:q,vae:ne,seed:pe,steps:le,width:we,strength:ve,hrf_enabled:he,hrf_strength:Ne,hrf_method:De,positive_style_prompt:qe,negative_style_prompt:Mt,refiner_model:ot,refiner_cfg_scale:an,refiner_steps:pt,refiner_scheduler:vt,refiner_positive_aesthetic_score:ke,refiner_negative_aesthetic_score:Be,refiner_start:Ot,loras:Ht,controlnets:je,ipAdapters:ht,t2iAdapters:At}=G;Ev(te)&&e(zh(te)),Lw(F)&&e(z1(F)),Ap(X)&&e(Rd(X)),Dp(ue)&&e(Ad(ue)),Mv(q)&&e(F1(q)),(zw(ne)||oi(ne))&&(oi(ne)?e(Wc(null)):e(Wc(ne))),$w(pe)&&e(Lh(pe)),Ov(le)&&e(Fh(le)),Fw(we)&&e(Hl(we)),Bw(V)&&e(Wl(V)),Tp(ve)&&e(Bh(ve)),Hw(he)&&e(B1(he)),Tp(Ne)&&e(Hh(Ne)),Ww(De)&&e(H1(De)),pd(qe)&&e(Dd(qe)),Pv(Mt)&&e(Td(Mt)),ZD(ot)&&e(BI(ot)),Ov(pt)&&e(W1(pt)),Ev(an)&&e(V1(an)),Mv(vt)&&e(HI(vt)),e7(ke)&&e(U1(ke)),t7(Be)&&e(G1(Be)),n7(Ot)&&e(q1(Ot)),e(r7()),Ht==null||Ht.forEach(_t=>{const Re=O(_t);Re.lora&&e(Vw({...Re.lora,weight:_t.weight}))}),e(MI()),je==null||je.forEach(_t=>{const Re=z(_t);Re.controlnet&&e(wc(Re.controlnet))}),ht==null||ht.forEach(_t=>{const Re=K(_t);Re.ipAdapter&&e(wc(Re.ipAdapter))}),At==null||At.forEach(_t=>{const Re=U(_t);Re.t2iAdapter&&e(wc(Re.t2iAdapter))}),i()},[e,i,c,O,z,K,U]);return{recallBothPrompts:d,recallPositivePrompt:p,recallNegativePrompt:h,recallSDXLPositiveStylePrompt:m,recallSDXLNegativeStylePrompt:g,recallSeed:b,recallCfgScale:y,recallModel:x,recallScheduler:C,recallVaeModel:S,recallSteps:j,recallWidth:_,recallHeight:I,recallStrength:P,recallHrfEnabled:M,recallHrfStrength:R,recallHrfMethod:A,recallLoRA:T,recallControlNet:W,recallIPAdapter:Z,recallT2IAdapter:L,recallAllParameters:fe,sendToImageToImage:se}},Loe=()=>l.useCallback(async t=>new Promise(n=>{const r=new Image;r.onload=()=>{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const s=o.getContext("2d");s&&(s.drawImage(r,0,0),n(new Promise(i=>{o.toBlob(function(c){i(c)},"image/png")})))},r.crossOrigin=WI.get()?"use-credentials":"anonymous",r.src=t}),[]),x8=()=>{const e=Zl(),{t}=J(),n=Loe(),r=l.useMemo(()=>!!navigator.clipboard&&!!window.ClipboardItem,[]),o=l.useCallback(async s=>{r||e({title:t("toast.problemCopyingImage"),description:"Your browser doesn't support the Clipboard API.",status:"error",duration:2500,isClosable:!0});try{const i=await n(s);if(!i)throw new Error("Unable to create Blob");o7(i),e({title:t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})}catch(i){e({title:t("toast.problemCopyingImage"),description:String(i),status:"error",duration:2500,isClosable:!0})}},[n,r,t,e]);return{isClipboardAPIAvailable:r,copyImageToClipboard:o}};function zoe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"}}]})(e)}function Foe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M0 256L28.5 28c2-16 15.6-28 31.8-28H228.9c15 0 27.1 12.1 27.1 27.1c0 3.2-.6 6.5-1.7 9.5L208 160H347.3c20.2 0 36.7 16.4 36.7 36.7c0 7.4-2.2 14.6-6.4 20.7l-192.2 281c-5.9 8.6-15.6 13.7-25.9 13.7h-2.9c-15.7 0-28.5-12.8-28.5-28.5c0-2.3 .3-4.6 .9-6.9L176 288H32c-17.7 0-32-14.3-32-32z"}}]})(e)}function Boe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"}}]})(e)}function j2(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"}}]})(e)}function Hoe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"}}]})(e)}function Woe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24H280c13.3 0 24-10.7 24-24s-10.7-24-24-24H136z"}}]})(e)}function Voe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"}}]})(e)}function Uoe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}}]})(e)}function Goe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"}}]})(e)}function qoe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function _2(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}}]})(e)}function I2(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(e)}function y8(e){return Qe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"}}]})(e)}function Koe(e,t,n){var r=this,o=l.useRef(null),s=l.useRef(0),i=l.useRef(null),c=l.useRef([]),d=l.useRef(),p=l.useRef(),h=l.useRef(e),m=l.useRef(!0);l.useEffect(function(){h.current=e},[e]);var g=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var b=!!(n=n||{}).leading,y=!("trailing"in n)||!!n.trailing,x="maxWait"in n,C=x?Math.max(+n.maxWait||0,t):null;l.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var S=l.useMemo(function(){var j=function(A){var D=c.current,O=d.current;return c.current=d.current=null,s.current=A,p.current=h.current.apply(O,D)},_=function(A,D){g&&cancelAnimationFrame(i.current),i.current=g?requestAnimationFrame(A):setTimeout(A,D)},I=function(A){if(!m.current)return!1;var D=A-o.current;return!o.current||D>=t||D<0||x&&A-s.current>=C},P=function(A){return i.current=null,y&&c.current?j(A):(c.current=d.current=null,p.current)},M=function A(){var D=Date.now();if(I(D))return P(D);if(m.current){var O=t-(D-o.current),T=x?Math.min(O,C-(D-s.current)):O;_(A,T)}},R=function(){var A=Date.now(),D=I(A);if(c.current=[].slice.call(arguments),d.current=r,o.current=A,D){if(!i.current&&m.current)return s.current=o.current,_(M,t),b?j(o.current):p.current;if(x)return _(M,t),j(o.current)}return i.current||_(M,t),p.current};return R.cancel=function(){i.current&&(g?cancelAnimationFrame(i.current):clearTimeout(i.current)),s.current=0,c.current=o.current=d.current=i.current=null},R.isPending=function(){return!!i.current},R.flush=function(){return i.current?P(Date.now()):p.current},R},[b,x,t,C,y,g]);return S}function Qoe(e,t){return e===t}function v_(e){return typeof e=="function"?function(){return e}:e}function P2(e,t,n){var r,o,s=n&&n.equalityFn||Qoe,i=(r=l.useState(v_(e)),o=r[1],[r[0],l.useCallback(function(m){return o(v_(m))},[])]),c=i[0],d=i[1],p=Koe(l.useCallback(function(m){return d(m)},[d]),t,n),h=l.useRef(e);return s(h.current,e)||(p(e),h.current=e),[c,p]}const E2=e=>{const t=H(s=>s.config.metadataFetchDebounce),[n]=P2(e,t??0),{data:r,isLoading:o}=VI(n??UI);return{metadata:r,isLoading:o}},Xoe=s7.injectEndpoints({endpoints:e=>({getWorkflow:e.query({query:t=>`workflows/i/${t}`,providesTags:(t,n,r)=>[{type:"Workflow",id:r}],transformResponse:t=>{if(t){const n=GI.safeParse(t);if(n.success)return n.data;Ci("images").warn("Problem parsing workflow")}}})})}),{useGetWorkflowQuery:Yoe}=Xoe,M2=e=>{const t=H(s=>s.config.workflowFetchDebounce),[n]=P2(e,t??0),{data:r,isLoading:o}=Yoe(n??UI);return{workflow:r,isLoading:o}};Ex("gallery/requestedBoardImagesDeletion");const Joe=Ex("gallery/sentImageToCanvas"),C8=Ex("gallery/sentImageToImg2Img"),Zoe=e=>{const{imageDTO:t}=e,n=oe(),{t:r}=J(),o=Zl(),s=jn("unifiedCanvas").isFeatureEnabled,i=Bg(Mx),{metadata:c,isLoading:d}=E2(t==null?void 0:t.image_name),{workflow:p,isLoading:h}=M2(t==null?void 0:t.workflow_id),[m]=Ox(),[g]=Rx(),{isClipboardAPIAvailable:b,copyImageToClipboard:y}=x8(),x=l.useCallback(()=>{t&&n(lg([t]))},[n,t]),{recallBothPrompts:C,recallSeed:S,recallAllParameters:j}=f0(),_=l.useCallback(()=>{C(c==null?void 0:c.positive_prompt,c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt)},[c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt,C]),I=l.useCallback(()=>{S(c==null?void 0:c.seed)},[c==null?void 0:c.seed,S]),P=l.useCallback(()=>{p&&n(Ax(p))},[n,p]),M=l.useCallback(()=>{n(C8()),n(ig(t))},[n,t]),R=l.useCallback(()=>{n(Joe()),rs.flushSync(()=>{n(ti("unifiedCanvas"))}),n(qI(t)),o({title:r("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},[n,t,r,o]),A=l.useCallback(()=>{j(c)},[c,j]),D=l.useCallback(()=>{n(KI([t])),n(Cx(!0))},[n,t]),O=l.useCallback(()=>{y(t.image_url)},[y,t.image_url]),T=l.useCallback(()=>{t&&m({imageDTOs:[t]})},[m,t]),Y=l.useCallback(()=>{t&&g({imageDTOs:[t]})},[g,t]);return a.jsxs(a.Fragment,{children:[a.jsx(Vn,{as:"a",href:t.image_url,target:"_blank",icon:a.jsx(Ky,{}),children:r("common.openInNewTab")}),b&&a.jsx(Vn,{icon:a.jsx(Hu,{}),onClickCapture:O,children:r("parameters.copyImage")}),a.jsx(Vn,{as:"a",download:!0,href:t.image_url,target:"_blank",icon:a.jsx(Wu,{}),w:"100%",children:r("parameters.downloadImage")}),a.jsx(Vn,{icon:h?a.jsx(vh,{}):a.jsx(j2,{}),onClickCapture:P,isDisabled:h||!p,children:r("nodes.loadWorkflow")}),a.jsx(Vn,{icon:d?a.jsx(vh,{}):a.jsx(XM,{}),onClickCapture:_,isDisabled:d||(c==null?void 0:c.positive_prompt)===void 0&&(c==null?void 0:c.negative_prompt)===void 0,children:r("parameters.usePrompt")}),a.jsx(Vn,{icon:d?a.jsx(vh,{}):a.jsx(YM,{}),onClickCapture:I,isDisabled:d||(c==null?void 0:c.seed)===void 0,children:r("parameters.useSeed")}),a.jsx(Vn,{icon:d?a.jsx(vh,{}):a.jsx(FM,{}),onClickCapture:A,isDisabled:d||!c,children:r("parameters.useAll")}),a.jsx(Vn,{icon:a.jsx(yj,{}),onClickCapture:M,id:"send-to-img2img",children:r("parameters.sendToImg2Img")}),s&&a.jsx(Vn,{icon:a.jsx(yj,{}),onClickCapture:R,id:"send-to-canvas",children:r("parameters.sendToUnifiedCanvas")}),a.jsx(Vn,{icon:a.jsx(UM,{}),onClickCapture:D,children:"Change Board"}),t.starred?a.jsx(Vn,{icon:i?i.off.icon:a.jsx(I2,{}),onClickCapture:Y,children:i?i.off.text:"Unstar Image"}):a.jsx(Vn,{icon:i?i.on.icon:a.jsx(_2,{}),onClickCapture:T,children:i?i.on.text:"Star Image"}),a.jsx(Vn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(qo,{}),onClickCapture:x,children:r("gallery.deleteImage")})]})},w8=l.memo(Zoe),vh=()=>a.jsx(N,{w:"14px",alignItems:"center",justifyContent:"center",children:a.jsx(bi,{size:"xs"})}),ese=()=>{const{t:e}=J(),t=oe(),n=H(x=>x.gallery.selection),r=Bg(Mx),o=jn("bulkDownload").isFeatureEnabled,[s]=Ox(),[i]=Rx(),[c]=TI(),d=l.useCallback(()=>{t(KI(n)),t(Cx(!0))},[t,n]),p=l.useCallback(()=>{t(lg(n))},[t,n]),h=l.useCallback(()=>{s({imageDTOs:n})},[s,n]),m=l.useCallback(()=>{i({imageDTOs:n})},[i,n]),g=l.useCallback(async()=>{try{const x=await c({image_names:n.map(C=>C.image_name)}).unwrap();t(Bt({title:e("gallery.preparingDownload"),status:"success",...x.response?{description:x.response}:{}}))}catch{t(Bt({title:e("gallery.preparingDownloadFailed"),status:"error"}))}},[e,n,c,t]),b=l.useMemo(()=>n.every(x=>x.starred),[n]),y=l.useMemo(()=>n.every(x=>!x.starred),[n]);return a.jsxs(a.Fragment,{children:[b&&a.jsx(Vn,{icon:r?r.on.icon:a.jsx(_2,{}),onClickCapture:m,children:r?r.off.text:"Unstar All"}),(y||!b&&!y)&&a.jsx(Vn,{icon:r?r.on.icon:a.jsx(I2,{}),onClickCapture:h,children:r?r.on.text:"Star All"}),o&&a.jsx(Vn,{icon:a.jsx(Wu,{}),onClickCapture:g,children:e("gallery.downloadSelection")}),a.jsx(Vn,{icon:a.jsx(UM,{}),onClickCapture:d,children:"Change Board"}),a.jsx(Vn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(qo,{}),onClickCapture:p,children:"Delete Selection"})]})},tse=l.memo(ese),nse=de([Ce],({gallery:e})=>({selectionCount:e.selection.length}),_e),rse=({imageDTO:e,children:t})=>{const{selectionCount:n}=H(nse),r=l.useCallback(s=>{s.preventDefault()},[]),o=l.useCallback(()=>e?n>1?a.jsx(Gl,{sx:{visibility:"visible !important"},motionProps:pu,onContextMenu:r,children:a.jsx(tse,{})}):a.jsx(Gl,{sx:{visibility:"visible !important"},motionProps:pu,onContextMenu:r,children:a.jsx(w8,{imageDTO:e})}):null,[e,n,r]);return a.jsx(p2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:o,children:t})},ose=l.memo(rse),sse=e=>{const{data:t,disabled:n,...r}=e,o=l.useRef(Jc()),{attributes:s,listeners:i,setNodeRef:c}=Mne({id:o.current,disabled:n,data:t});return a.jsx(Te,{ref:c,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,...s,...i,...r})},ase=l.memo(sse),ise=a.jsx(zr,{as:Jg,sx:{boxSize:16}}),lse=a.jsx(qr,{icon:Ql}),cse=e=>{const{imageDTO:t,onError:n,onClick:r,withMetadataOverlay:o=!1,isDropDisabled:s=!1,isDragDisabled:i=!1,isUploadDisabled:c=!1,minSize:d=24,postUploadAction:p,imageSx:h,fitContainer:m=!1,droppableData:g,draggableData:b,dropLabel:y,isSelected:x=!1,thumbnail:C=!1,noContentFallback:S=lse,uploadElement:j=ise,useThumbailFallback:_,withHoverOverlay:I=!1,children:P,onMouseOver:M,onMouseOut:R,dataTestId:A}=e,{colorMode:D}=wi(),[O,T]=l.useState(!1),Y=l.useCallback(L=>{M&&M(L),T(!0)},[M]),z=l.useCallback(L=>{R&&R(L),T(!1)},[R]),{getUploadButtonProps:W,getUploadInputProps:Q}=k2({postUploadAction:p,isDisabled:c}),U=c?{}:{cursor:"pointer",bg:Ke("base.200","base.700")(D),_hover:{bg:Ke("base.300","base.650")(D),color:Ke("base.500","base.300")(D)}};return a.jsx(ose,{imageDTO:t,children:L=>a.jsxs(N,{ref:L,onMouseOver:Y,onMouseOut:z,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative",minW:d||void 0,minH:d||void 0,userSelect:"none",cursor:i||!t?"default":"pointer"},children:[t&&a.jsxs(N,{sx:{w:"full",h:"full",position:m?"absolute":"relative",alignItems:"center",justifyContent:"center"},children:[a.jsx(Si,{src:C?t.thumbnail_url:t.image_url,fallbackStrategy:"beforeLoadOrError",fallbackSrc:_?t.thumbnail_url:void 0,fallback:_?void 0:a.jsx(sre,{image:t}),onError:n,draggable:!1,sx:{w:t.width,objectFit:"contain",maxW:"full",maxH:"full",borderRadius:"base",...h},"data-testid":A}),o&&a.jsx(Noe,{imageDTO:t}),a.jsx(f2,{isSelected:x,isHovered:I?O:!1})]}),!t&&!c&&a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{minH:d,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",transitionProperty:"common",transitionDuration:"0.1s",color:Ke("base.500","base.500")(D),...U},...W(),children:[a.jsx("input",{...Q()}),j]})}),!t&&c&&S,t&&!i&&a.jsx(ase,{data:b,disabled:i||!t,onClick:r}),P,!s&&a.jsx(d2,{data:g,disabled:s,dropLabel:y})]})})},il=l.memo(cse),use=()=>a.jsx(Dg,{sx:{position:"relative",height:"full",width:"full","::before":{content:"''",display:"block",pt:"100%"}},children:a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineStart:0,height:"full",width:"full"}})}),dse=l.memo(use),fse=de([Ce,Dx],({gallery:e},t)=>{const n=e.selection;return{queryArgs:t,selection:n}},_e),pse=e=>{const t=oe(),{queryArgs:n,selection:r}=H(fse),{imageDTOs:o}=QI(n,{selectFromResult:p=>({imageDTOs:p.data?a7.selectAll(p.data):[]})}),s=jn("multiselect").isFeatureEnabled,i=l.useCallback(p=>{var h;if(e){if(!s){t(md([e]));return}if(p.shiftKey){const m=e.image_name,g=(h=r[r.length-1])==null?void 0:h.image_name,b=o.findIndex(x=>x.image_name===g),y=o.findIndex(x=>x.image_name===m);if(b>-1&&y>-1){const x=Math.min(b,y),C=Math.max(b,y),S=o.slice(x,C+1);t(md(r.concat(S)))}}else p.ctrlKey||p.metaKey?r.some(m=>m.image_name===e.image_name)&&r.length>1?t(md(r.filter(m=>m.image_name!==e.image_name))):t(md(r.concat(e))):t(md([e]))}},[t,e,o,r,s]),c=l.useMemo(()=>e?r.some(p=>p.image_name===e.image_name):!1,[e,r]),d=l.useMemo(()=>r.length,[r.length]);return{selection:r,selectionCount:d,isSelected:c,handleClick:i}},hse=e=>{const{onClick:t,tooltip:n,icon:r,styleOverrides:o}=e,s=di("drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-600))","drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-800))");return a.jsx(tt,{onClick:t,"aria-label":n,tooltip:n,icon:r,size:"sm",variant:"link",sx:{position:"absolute",top:1,insetInlineEnd:1,p:0,minW:0,svg:{transitionProperty:"common",transitionDuration:"normal",fill:"base.100",_hover:{fill:"base.50"},filter:s},...o},"data-testid":n})},fu=l.memo(hse),mse=e=>{const t=oe(),{imageName:n}=e,{currentData:r}=Ps(n),o=H(M=>M.hotkeys.shift),{t:s}=J(),{handleClick:i,isSelected:c,selection:d,selectionCount:p}=pse(r),h=Bg(Mx),m=l.useCallback(M=>{M.stopPropagation(),r&&t(lg([r]))},[t,r]),g=l.useMemo(()=>{if(p>1)return{id:"gallery-image",payloadType:"IMAGE_DTOS",payload:{imageDTOs:d}};if(r)return{id:"gallery-image",payloadType:"IMAGE_DTO",payload:{imageDTO:r}}},[r,d,p]),[b]=Ox(),[y]=Rx(),x=l.useCallback(()=>{r&&(r.starred&&y({imageDTOs:[r]}),r.starred||b({imageDTOs:[r]}))},[b,y,r]),[C,S]=l.useState(!1),j=l.useCallback(()=>{S(!0)},[]),_=l.useCallback(()=>{S(!1)},[]),I=l.useMemo(()=>{if(r!=null&&r.starred)return h?h.on.icon:a.jsx(I2,{size:"20"});if(!(r!=null&&r.starred)&&C)return h?h.off.icon:a.jsx(_2,{size:"20"})},[r==null?void 0:r.starred,C,h]),P=l.useMemo(()=>r!=null&&r.starred?h?h.off.text:"Unstar":r!=null&&r.starred?"":h?h.on.text:"Star",[r==null?void 0:r.starred,h]);return r?a.jsx(Te,{sx:{w:"full",h:"full",touchAction:"none"},"data-testid":`image-${r.image_name}`,children:a.jsx(N,{userSelect:"none",sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1"},children:a.jsx(il,{onClick:i,imageDTO:r,draggableData:g,isSelected:c,minSize:0,imageSx:{w:"full",h:"full"},isDropDisabled:!0,isUploadDisabled:!0,thumbnail:!0,withHoverOverlay:!0,onMouseOver:j,onMouseOut:_,children:a.jsxs(a.Fragment,{children:[a.jsx(fu,{onClick:x,icon:I,tooltip:P}),C&&o&&a.jsx(fu,{onClick:m,icon:a.jsx(qo,{}),tooltip:s("gallery.deleteImage"),styleOverrides:{bottom:2,top:"auto"}})]})})})}):a.jsx(dse,{})},gse=l.memo(mse),vse=Oe((e,t)=>a.jsx(Te,{className:"item-container",ref:t,p:1.5,"data-testid":"image-item-container",children:e.children})),bse=l.memo(vse),xse=Oe((e,t)=>{const n=H(r=>r.gallery.galleryImageMinimumWidth);return a.jsx(nl,{...e,className:"list-container",ref:t,sx:{gridTemplateColumns:`repeat(auto-fill, minmax(${n}px, 1fr));`},"data-testid":"image-list-container",children:e.children})}),yse=l.memo(xse),Cse={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},wse=()=>{const{t:e}=J(),t=l.useRef(null),[n,r]=l.useState(null),[o,s]=u2(Cse),i=H(S=>S.gallery.selectedBoardId),{currentViewTotal:c}=Doe(i),d=H(Dx),{currentData:p,isFetching:h,isSuccess:m,isError:g}=QI(d),[b]=XI(),y=l.useMemo(()=>!p||!c?!1:p.ids.length{y&&b({...d,offset:(p==null?void 0:p.ids.length)??0,limit:YI})},[y,b,d,p==null?void 0:p.ids.length]),C=l.useCallback((S,j)=>a.jsx(gse,{imageName:j},j),[]);return l.useEffect(()=>{const{current:S}=t;return n&&S&&o({target:S,elements:{viewport:n}}),()=>{var j;return(j=s())==null?void 0:j.destroy()}},[n,o,s]),p?m&&(p==null?void 0:p.ids.length)===0?a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(qr,{label:e("gallery.noImagesInGallery"),icon:Ql})}):m&&p?a.jsxs(a.Fragment,{children:[a.jsx(Te,{ref:t,"data-overlayscrollbars":"",h:"100%",children:a.jsx(Aoe,{style:{height:"100%"},data:p.ids,endReached:x,components:{Item:bse,List:yse},scrollerRef:r,itemContent:C})}),a.jsx(Rt,{onClick:x,isDisabled:!y,isLoading:h,loadingText:e("gallery.loading"),flexShrink:0,children:`Load More (${p.ids.length} of ${c})`})]}):g?a.jsx(Te,{sx:{w:"full",h:"full"},children:a.jsx(qr,{label:e("gallery.unableToLoad"),icon:oee})}):null:a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(qr,{label:e("gallery.loading"),icon:Ql})})},Sse=l.memo(wse),kse=de([Ce],e=>{const{galleryView:t}=e.gallery;return{galleryView:t}},_e),jse=()=>{const{t:e}=J(),t=l.useRef(null),n=l.useRef(null),{galleryView:r}=H(kse),o=oe(),{isOpen:s,onToggle:i}=ls({defaultIsOpen:!0}),c=l.useCallback(()=>{o(Uw("images"))},[o]),d=l.useCallback(()=>{o(Uw("assets"))},[o]);return a.jsxs(U5,{layerStyle:"first",sx:{flexDirection:"column",h:"full",w:"full",borderRadius:"base",p:2},children:[a.jsxs(Te,{sx:{w:"full"},children:[a.jsxs(N,{ref:t,sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[a.jsx(Qne,{isOpen:s,onToggle:i}),a.jsx(ore,{})]}),a.jsx(Te,{children:a.jsx(Gne,{isOpen:s})})]}),a.jsxs(N,{ref:n,direction:"column",gap:2,h:"full",w:"full",children:[a.jsx(N,{sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:a.jsx(tc,{index:r==="images"?0:1,variant:"unstyled",size:"sm",sx:{w:"full"},children:a.jsx(nc,{children:a.jsxs(zn,{isAttached:!0,sx:{w:"full"},children:[a.jsx(xo,{as:Rt,size:"sm",isChecked:r==="images",onClick:c,sx:{w:"full"},leftIcon:a.jsx(fee,{}),"data-testid":"images-tab",children:e("gallery.images")}),a.jsx(xo,{as:Rt,size:"sm",isChecked:r==="assets",onClick:d,sx:{w:"full"},leftIcon:a.jsx(kee,{}),"data-testid":"assets-tab",children:e("gallery.assets")})]})})})}),a.jsx(Sse,{})]})]})},_se=l.memo(jse),Ise=()=>{const e=H(p=>p.system.isConnected),{data:t}=Fa(),[n,{isLoading:r}]=Tx(),o=oe(),{t:s}=J(),i=l.useMemo(()=>t==null?void 0:t.queue.item_id,[t==null?void 0:t.queue.item_id]),c=l.useCallback(async()=>{if(i)try{await n(i).unwrap(),o(Bt({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Bt({title:s("queue.cancelFailed"),status:"error"}))}},[i,o,s,n]),d=l.useMemo(()=>!e||oi(i),[e,i]);return{cancelQueueItem:c,isLoading:r,currentQueueItemId:i,isDisabled:d}},Pse=({label:e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,asIconButton:i,isLoading:c,loadingText:d,sx:p})=>i?a.jsx(tt,{"aria-label":e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,sx:p,"data-testid":e}):a.jsx(Rt,{"aria-label":e,tooltip:t,leftIcon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,loadingText:d??e,flexGrow:1,sx:p,"data-testid":e,children:e}),ic=l.memo(Pse),Ese=({asIconButton:e,sx:t})=>{const{t:n}=J(),{cancelQueueItem:r,isLoading:o,isDisabled:s}=Ise();return a.jsx(ic,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.cancel"),tooltip:n("queue.cancelTooltip"),icon:a.jsx(ju,{}),onClick:r,colorScheme:"error",sx:t})},S8=l.memo(Ese),Mse=()=>{const{t:e}=J(),t=oe(),{data:n}=Fa(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=JI({fixedCacheKey:"clearQueue"}),i=l.useCallback(async()=>{if(n!=null&&n.queue.total)try{await o().unwrap(),t(Bt({title:e("queue.clearSucceeded"),status:"success"})),t(Nx(void 0)),t($x(void 0))}catch{t(Bt({title:e("queue.clearFailed"),status:"error"}))}},[n==null?void 0:n.queue.total,o,t,e]),c=l.useMemo(()=>!r||!(n!=null&&n.queue.total),[r,n==null?void 0:n.queue.total]);return{clearQueue:i,isLoading:s,queueStatus:n,isDisabled:c}},Ose=Oe((e,t)=>{const{t:n}=J(),{acceptButtonText:r=n("common.accept"),acceptCallback:o,cancelButtonText:s=n("common.cancel"),cancelCallback:i,children:c,title:d,triggerComponent:p}=e,{isOpen:h,onOpen:m,onClose:g}=ls(),b=l.useRef(null),y=l.useCallback(()=>{o(),g()},[o,g]),x=l.useCallback(()=>{i&&i(),g()},[i,g]);return a.jsxs(a.Fragment,{children:[l.cloneElement(p,{onClick:m,ref:t}),a.jsx(Df,{isOpen:h,leastDestructiveRef:b,onClose:g,isCentered:!0,children:a.jsx(Ma,{children:a.jsxs(Tf,{children:[a.jsx(Ea,{fontSize:"lg",fontWeight:"bold",children:d}),a.jsx(Oa,{children:c}),a.jsxs(pi,{children:[a.jsx(Rt,{ref:b,onClick:x,children:s}),a.jsx(Rt,{colorScheme:"error",onClick:y,ml:3,children:r})]})]})})})]})}),p0=l.memo(Ose),Rse=({asIconButton:e,sx:t})=>{const{t:n}=J(),{clearQueue:r,isLoading:o,isDisabled:s}=Mse();return a.jsxs(p0,{title:n("queue.clearTooltip"),acceptCallback:r,acceptButtonText:n("queue.clear"),triggerComponent:a.jsx(ic,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.clear"),tooltip:n("queue.clearTooltip"),icon:a.jsx(qo,{}),colorScheme:"error",sx:t}),children:[a.jsx(Se,{children:n("queue.clearQueueAlertDialog")}),a.jsx("br",{}),a.jsx(Se,{children:n("queue.clearQueueAlertDialog2")})]})},O2=l.memo(Rse),Ase=()=>{const e=oe(),{t}=J(),n=H(p=>p.system.isConnected),{data:r}=Fa(),[o,{isLoading:s}]=ZI({fixedCacheKey:"pauseProcessor"}),i=l.useMemo(()=>!!(r!=null&&r.processor.is_started),[r==null?void 0:r.processor.is_started]),c=l.useCallback(async()=>{if(i)try{await o().unwrap(),e(Bt({title:t("queue.pauseSucceeded"),status:"success"}))}catch{e(Bt({title:t("queue.pauseFailed"),status:"error"}))}},[i,o,e,t]),d=l.useMemo(()=>!n||!i,[n,i]);return{pauseProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},Dse=({asIconButton:e})=>{const{t}=J(),{pauseProcessor:n,isLoading:r,isDisabled:o}=Ase();return a.jsx(ic,{asIconButton:e,label:t("queue.pause"),tooltip:t("queue.pauseTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(bee,{}),onClick:n,colorScheme:"gold"})},k8=l.memo(Dse),Tse=de([Ce,ro],({controlAdapters:e,generation:t,system:n,nodes:r,dynamicPrompts:o},s)=>{const{initialImage:i,model:c}=t,{isConnected:d}=n,p=[];return d||p.push(on.t("parameters.invoke.systemDisconnected")),s==="img2img"&&!i&&p.push(on.t("parameters.invoke.noInitialImageSelected")),s==="nodes"?r.shouldValidateGraph&&(r.nodes.length||p.push(on.t("parameters.invoke.noNodesInGraph")),r.nodes.forEach(h=>{if(!Rr(h))return;const m=r.nodeTemplates[h.data.type];if(!m){p.push(on.t("parameters.invoke.missingNodeTemplate"));return}const g=i7([h],r.edges);Kr(h.data.inputs,b=>{const y=m.inputs[b.name],x=g.some(C=>C.target===h.id&&C.targetHandle===b.name);if(!y){p.push(on.t("parameters.invoke.missingFieldTemplate"));return}if(y.required&&b.value===void 0&&!x){p.push(on.t("parameters.invoke.missingInputForField",{nodeLabel:h.data.label||m.title,fieldLabel:b.label||y.title}));return}})})):(o.prompts.length===0&&p.push(on.t("parameters.invoke.noPrompts")),c||p.push(on.t("parameters.invoke.noModelSelected")),l7(e).forEach((h,m)=>{h.isEnabled&&(h.model?h.model.base_model!==(c==null?void 0:c.base_model)&&p.push(on.t("parameters.invoke.incompatibleBaseModelForControlAdapter",{number:m+1})):p.push(on.t("parameters.invoke.noModelForControlAdapter",{number:m+1})),(!h.controlImage||Au(h)&&!h.processedControlImage&&h.processorType!=="none")&&p.push(on.t("parameters.invoke.noControlImageForControlAdapter",{number:m+1})))})),{isReady:!p.length,reasons:p}},_e),R2=()=>{const{isReady:e,reasons:t}=H(Tse);return{isReady:e,reasons:t}},j8=()=>{const e=oe(),t=H(ro),{isReady:n}=R2(),[r,{isLoading:o}]=cg({fixedCacheKey:"enqueueBatch"}),s=l.useMemo(()=>!n,[n]);return{queueBack:l.useCallback(()=>{s||(e(Lx()),e(eP({tabName:t,prepend:!1})))},[e,s,t]),isLoading:o,isDisabled:s}},Nse=de([Ce],({gallery:e})=>{const{autoAddBoardId:t}=e;return{autoAddBoardId:t}},_e),$se=({prepend:e=!1})=>{const{t}=J(),{isReady:n,reasons:r}=R2(),{autoAddBoardId:o}=H(Nse),s=a0(o),[i,{isLoading:c}]=cg({fixedCacheKey:"enqueueBatch"}),d=l.useMemo(()=>t(c?"queue.enqueueing":n?e?"queue.queueFront":"queue.queueBack":"queue.notReady"),[c,n,e,t]);return a.jsxs(N,{flexDir:"column",gap:1,children:[a.jsx(Se,{fontWeight:600,children:d}),r.length>0&&a.jsx(Mf,{children:r.map((p,h)=>a.jsx(ws,{children:a.jsx(Se,{fontWeight:400,children:p})},`${p}.${h}`))}),a.jsx(I8,{}),a.jsxs(Se,{fontWeight:400,fontStyle:"oblique 10deg",children:[t("parameters.invoke.addingImagesTo")," ",a.jsx(Se,{as:"span",fontWeight:600,children:s||t("boards.uncategorized")})]})]})},_8=l.memo($se),I8=l.memo(()=>a.jsx(no,{opacity:.2,borderColor:"base.50",_dark:{borderColor:"base.900"}}));I8.displayName="StyledDivider";const Lse=()=>a.jsx(Te,{pos:"relative",w:4,h:4,children:a.jsx(Si,{src:wx,alt:"invoke-ai-logo",pos:"absolute",top:-.5,insetInlineStart:-.5,w:5,h:5,minW:5,minH:5,filter:"saturate(0)"})}),zse=l.memo(Lse),Fse=({asIconButton:e,sx:t})=>{const{t:n}=J(),{queueBack:r,isLoading:o,isDisabled:s}=j8();return a.jsx(ic,{asIconButton:e,colorScheme:"accent",label:n("parameters.invoke.invoke"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(_8,{}),sx:t,icon:e?a.jsx(zse,{}):void 0})},P8=l.memo(Fse),E8=()=>{const e=oe(),t=H(ro),{isReady:n}=R2(),[r,{isLoading:o}]=cg({fixedCacheKey:"enqueueBatch"}),s=jn("prependQueue").isFeatureEnabled,i=l.useMemo(()=>!n||!s,[n,s]);return{queueFront:l.useCallback(()=>{i||(e(Lx()),e(eP({tabName:t,prepend:!0})))},[e,i,t]),isLoading:o,isDisabled:i}},Bse=({asIconButton:e,sx:t})=>{const{t:n}=J(),{queueFront:r,isLoading:o,isDisabled:s}=E8();return a.jsx(ic,{asIconButton:e,colorScheme:"base",label:n("queue.queueFront"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(_8,{prepend:!0}),icon:a.jsx(Foe,{}),sx:t})},Hse=l.memo(Bse),Wse=()=>{const e=oe(),t=H(p=>p.system.isConnected),{data:n}=Fa(),{t:r}=J(),[o,{isLoading:s}]=tP({fixedCacheKey:"resumeProcessor"}),i=l.useMemo(()=>!!(n!=null&&n.processor.is_started),[n==null?void 0:n.processor.is_started]),c=l.useCallback(async()=>{if(!i)try{await o().unwrap(),e(Bt({title:r("queue.resumeSucceeded"),status:"success"}))}catch{e(Bt({title:r("queue.resumeFailed"),status:"error"}))}},[i,o,e,r]),d=l.useMemo(()=>!t||i,[t,i]);return{resumeProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},Vse=({asIconButton:e})=>{const{t}=J(),{resumeProcessor:n,isLoading:r,isDisabled:o}=Wse();return a.jsx(ic,{asIconButton:e,label:t("queue.resume"),tooltip:t("queue.resumeTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(xee,{}),onClick:n,colorScheme:"green"})},M8=l.memo(Vse),Use=de(Ce,({system:e})=>{var t;return{isConnected:e.isConnected,hasSteps:!!e.denoiseProgress,value:(((t=e.denoiseProgress)==null?void 0:t.percentage)??0)*100}},_e),Gse=()=>{const{t:e}=J(),{data:t}=Fa(),{hasSteps:n,value:r,isConnected:o}=H(Use);return a.jsx(k3,{value:r,"aria-label":e("accessibility.invokeProgressBar"),isIndeterminate:o&&!!(t!=null&&t.queue.in_progress)&&!n,h:"full",w:"full",borderRadius:2,colorScheme:"accent"})},qse=l.memo(Gse),Kse=()=>{const e=jn("pauseQueue").isFeatureEnabled,t=jn("resumeQueue").isFeatureEnabled,n=jn("prependQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,gap:2,flexDir:"column"},children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsxs(zn,{isAttached:!0,flexGrow:2,children:[a.jsx(P8,{}),n?a.jsx(Hse,{asIconButton:!0}):a.jsx(a.Fragment,{}),a.jsx(S8,{asIconButton:!0})]}),a.jsxs(zn,{isAttached:!0,children:[t?a.jsx(M8,{asIconButton:!0}):a.jsx(a.Fragment,{}),e?a.jsx(k8,{asIconButton:!0}):a.jsx(a.Fragment,{})]}),a.jsx(O2,{asIconButton:!0})]}),a.jsx(N,{h:3,w:"full",children:a.jsx(qse,{})}),a.jsx(R8,{})]})},O8=l.memo(Kse),R8=l.memo(()=>{const{t:e}=J(),t=oe(),{hasItems:n,pending:r}=Fa(void 0,{selectFromResult:({data:s})=>{if(!s)return{hasItems:!1,pending:0};const{pending:i,in_progress:c}=s.queue;return{hasItems:i+c>0,pending:i}}}),o=l.useCallback(()=>{t(ti("queue"))},[t]);return a.jsxs(N,{justifyContent:"space-between",alignItems:"center",pe:1,"data-testid":"queue-count",children:[a.jsx(ji,{}),a.jsx(tl,{onClick:o,size:"sm",variant:"link",fontWeight:400,opacity:.7,fontStyle:"oblique 10deg",children:n?e("queue.queuedCount",{pending:r}):e("queue.queueEmpty")})]})});R8.displayName="QueueCounts";const{createElement:Iu,createContext:Qse,forwardRef:A8,useCallback:Ja,useContext:D8,useEffect:ui,useImperativeHandle:T8,useLayoutEffect:Xse,useMemo:Yse,useRef:ns,useState:Fd}=yx,b_=yx["useId".toString()],Bd=Xse,Jse=typeof b_=="function"?b_:()=>null;let Zse=0;function A2(e=null){const t=Jse(),n=ns(e||t||null);return n.current===null&&(n.current=""+Zse++),n.current}const h0=Qse(null);h0.displayName="PanelGroupContext";function N8({children:e=null,className:t="",collapsedSize:n=0,collapsible:r=!1,defaultSize:o=null,forwardedRef:s,id:i=null,maxSize:c=null,minSize:d,onCollapse:p=null,onResize:h=null,order:m=null,style:g={},tagName:b="div"}){const y=D8(h0);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const x=A2(i),{collapsePanel:C,expandPanel:S,getPanelSize:j,getPanelStyle:_,registerPanel:I,resizePanel:P,units:M,unregisterPanel:R}=y;d==null&&(M==="percentages"?d=10:d=0);const A=ns({onCollapse:p,onResize:h});ui(()=>{A.current.onCollapse=p,A.current.onResize=h});const D=_(x,o),O=ns({size:x_(D)}),T=ns({callbacksRef:A,collapsedSize:n,collapsible:r,defaultSize:o,id:x,idWasAutoGenerated:i==null,maxSize:c,minSize:d,order:m});return Bd(()=>{O.current.size=x_(D),T.current.callbacksRef=A,T.current.collapsedSize=n,T.current.collapsible=r,T.current.defaultSize=o,T.current.id=x,T.current.idWasAutoGenerated=i==null,T.current.maxSize=c,T.current.minSize=d,T.current.order=m}),Bd(()=>(I(x,T),()=>{R(x)}),[m,x,I,R]),T8(s,()=>({collapse:()=>C(x),expand:()=>S(x),getCollapsed(){return O.current.size===0},getId(){return x},getSize(Y){return j(x,Y)},resize:(Y,z)=>P(x,Y,z)}),[C,S,j,x,P]),Iu(b,{children:e,className:t,"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-id":x,"data-panel-size":parseFloat(""+D.flexGrow).toFixed(1),id:`data-panel-id-${x}`,style:{...D,...g}})}const Zi=A8((e,t)=>Iu(N8,{...e,forwardedRef:t}));N8.displayName="Panel";Zi.displayName="forwardRef(Panel)";function x_(e){const{flexGrow:t}=e;return typeof t=="string"?parseFloat(t):t}const Jl=10;function Ed(e,t,n,r,o,s,i,c){const{id:d,panels:p,units:h}=t,m=h==="pixels"?Vi(d):NaN,{sizes:g}=c||{},b=g||s,y=Fo(p),x=b.concat();let C=0;{const _=o<0?r:n,I=y.findIndex(A=>A.current.id===_),P=y[I],M=b[I],R=ex(h,m,P,M,M+Math.abs(o),e);if(M===R)return b;R===0&&M>0&&i.set(_,M),o=o<0?M-R:R-M}let S=o<0?n:r,j=y.findIndex(_=>_.current.id===S);for(;;){const _=y[j],I=b[j],P=Math.abs(o)-Math.abs(C),M=ex(h,m,_,I,I-P,e);if(I!==M&&(M===0&&I>0&&i.set(_.current.id,I),C+=I-M,x[j]=M,C.toPrecision(Jl).localeCompare(Math.abs(o).toPrecision(Jl),void 0,{numeric:!0})>=0))break;if(o<0){if(--j<0)break}else if(++j>=y.length)break}return C===0?b:(S=o<0?r:n,j=y.findIndex(_=>_.current.id===S),x[j]=b[j]+C,x)}function Ac(e,t,n){t.forEach((r,o)=>{const s=e[o];if(!s)return;const{callbacksRef:i,collapsedSize:c,collapsible:d,id:p}=s.current,h=n[p];if(h!==r){n[p]=r;const{onCollapse:m,onResize:g}=i.current;g&&g(r,h),d&&m&&((h==null||h===c)&&r!==c?m(!1):h!==c&&r===c&&m(!0))}})}function eae({groupId:e,panels:t,units:n}){const r=n==="pixels"?Vi(e):NaN,o=Fo(t),s=Array(o.length);let i=0,c=100;for(let d=0;di.current.id===e);if(n<0)return[null,null];const r=n===t.length-1,o=r?t[n-1].current.id:e,s=r?e:t[n+1].current.id;return[o,s]}function Vi(e){const t=uf(e);if(t==null)return NaN;const n=t.getAttribute("data-panel-group-direction"),r=D2(e);return n==="horizontal"?t.offsetWidth-r.reduce((o,s)=>o+s.offsetWidth,0):t.offsetHeight-r.reduce((o,s)=>o+s.offsetHeight,0)}function $8(e,t,n){if(e.size===1)return"100";const o=Fo(e).findIndex(i=>i.current.id===t),s=n[o];return s==null?"0":s.toPrecision(Jl)}function tae(e){const t=document.querySelector(`[data-panel-id="${e}"]`);return t||null}function uf(e){const t=document.querySelector(`[data-panel-group-id="${e}"]`);return t||null}function m0(e){const t=document.querySelector(`[data-panel-resize-handle-id="${e}"]`);return t||null}function nae(e){return L8().findIndex(r=>r.getAttribute("data-panel-resize-handle-id")===e)??null}function L8(){return Array.from(document.querySelectorAll("[data-panel-resize-handle-id]"))}function D2(e){return Array.from(document.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`))}function T2(e,t,n){var d,p,h,m;const r=m0(t),o=D2(e),s=r?o.indexOf(r):-1,i=((p=(d=n[s])==null?void 0:d.current)==null?void 0:p.id)??null,c=((m=(h=n[s+1])==null?void 0:h.current)==null?void 0:m.id)??null;return[i,c]}function Fo(e){return Array.from(e.values()).sort((t,n)=>{const r=t.current.order,o=n.current.order;return r==null&&o==null?0:r==null?-1:o==null?1:r-o})}function ex(e,t,n,r,o,s=null){var h;let{collapsedSize:i,collapsible:c,maxSize:d,minSize:p}=n.current;if(e==="pixels"&&(i=i/t*100,d!=null&&(d=d/t*100),p=p/t*100),c){if(r>i){if(o<=p/2+i)return i}else if(!((h=s==null?void 0:s.type)==null?void 0:h.startsWith("key"))&&o100)&&(t.current.minSize=0),o!=null&&(o<0||e==="percentages"&&o>100)&&(t.current.maxSize=null),r!==null&&(r<0||e==="percentages"&&r>100?t.current.defaultSize=null:ro&&(t.current.defaultSize=o))}function k1({groupId:e,panels:t,nextSizes:n,prevSizes:r,units:o}){n=[...n];const s=Fo(t),i=o==="pixels"?Vi(e):NaN;let c=0;for(let d=0;d{const{direction:i,panels:c}=e.current,d=uf(t);z8(d!=null,`No group found for id "${t}"`);const{height:p,width:h}=d.getBoundingClientRect(),g=D2(t).map(b=>{const y=b.getAttribute("data-panel-resize-handle-id"),x=Fo(c),[C,S]=T2(t,y,x);if(C==null||S==null)return()=>{};let j=0,_=100,I=0,P=0;x.forEach(T=>{const{id:Y,maxSize:z,minSize:W}=T.current;Y===C?(j=W,_=z??100):(I+=W,P+=z??100)});const M=Math.min(_,100-I),R=Math.max(j,(x.length-1)*100-P),A=$8(c,C,o);b.setAttribute("aria-valuemax",""+Math.round(M)),b.setAttribute("aria-valuemin",""+Math.round(R)),b.setAttribute("aria-valuenow",""+Math.round(parseInt(A)));const D=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const Y=x.findIndex(z=>z.current.id===C);if(Y>=0){const z=x[Y],W=o[Y];if(W!=null){let Q=0;W.toPrecision(Jl)<=z.current.minSize.toPrecision(Jl)?Q=i==="horizontal"?h:p:Q=-(i==="horizontal"?h:p);const U=Ed(T,e.current,C,S,Q,o,s.current,null);o!==U&&r(U)}}break}}};b.addEventListener("keydown",D);const O=tae(C);return O!=null&&b.setAttribute("aria-controls",O.id),()=>{b.removeAttribute("aria-valuemax"),b.removeAttribute("aria-valuemin"),b.removeAttribute("aria-valuenow"),b.removeEventListener("keydown",D),O!=null&&b.removeAttribute("aria-controls")}});return()=>{g.forEach(b=>b())}},[e,t,n,s,r,o])}function sae({disabled:e,handleId:t,resizeHandler:n}){ui(()=>{if(e||n==null)return;const r=m0(t);if(r==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const i=L8(),c=nae(t);z8(c!==null);const d=s.shiftKey?c>0?c-1:i.length-1:c+1{r.removeEventListener("keydown",o)}},[e,t,n])}function j1(e,t){if(e.length!==t.length)return!1;for(let n=0;nR.current.id===I),M=r[P];if(M.current.collapsible){const R=h[P];(R===0||R.toPrecision(Jl)===M.current.minSize.toPrecision(Jl))&&(S=S<0?-M.current.minSize*y:M.current.minSize*y)}return S}else return F8(e,n,o,c,d)}function iae(e){return e.type==="keydown"}function tx(e){return e.type.startsWith("mouse")}function nx(e){return e.type.startsWith("touch")}let rx=null,Al=null;function B8(e){switch(e){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function lae(){Al!==null&&(document.head.removeChild(Al),rx=null,Al=null)}function _1(e){if(rx===e)return;rx=e;const t=B8(e);Al===null&&(Al=document.createElement("style"),document.head.appendChild(Al)),Al.innerHTML=`*{cursor: ${t}!important;}`}function cae(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function H8(e){return e.map(t=>{const{minSize:n,order:r}=t.current;return r?`${r}:${n}`:`${n}`}).sort((t,n)=>t.localeCompare(n)).join(",")}function W8(e,t){try{const n=t.getItem(`PanelGroup:sizes:${e}`);if(n){const r=JSON.parse(n);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function uae(e,t,n){const r=W8(e,n);if(r){const o=H8(t);return r[o]??null}return null}function dae(e,t,n,r){const o=H8(t),s=W8(e,r)||{};s[o]=n;try{r.setItem(`PanelGroup:sizes:${e}`,JSON.stringify(s))}catch(i){console.error(i)}}const I1={};function y_(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}const Md={getItem:e=>(y_(Md),Md.getItem(e)),setItem:(e,t)=>{y_(Md),Md.setItem(e,t)}};function V8({autoSaveId:e,children:t=null,className:n="",direction:r,disablePointerEventsDuringResize:o=!1,forwardedRef:s,id:i=null,onLayout:c,storage:d=Md,style:p={},tagName:h="div",units:m="percentages"}){const g=A2(i),[b,y]=Fd(null),[x,C]=Fd(new Map),S=ns(null);ns({didLogDefaultSizeWarning:!1,didLogIdAndOrderWarning:!1,didLogInvalidLayoutWarning:!1,prevPanelIds:[]});const j=ns({onLayout:c});ui(()=>{j.current.onLayout=c});const _=ns({}),[I,P]=Fd([]),M=ns(new Map),R=ns(0),A=ns({direction:r,id:g,panels:x,sizes:I,units:m});T8(s,()=>({getId:()=>g,getLayout:K=>{const{sizes:Z,units:se}=A.current;if((K??se)==="pixels"){const G=Vi(g);return Z.map(te=>te/100*G)}else return Z},setLayout:(K,Z)=>{const{id:se,panels:fe,sizes:G,units:te}=A.current;if((Z||te)==="pixels"){const ue=Vi(se);K=K.map(q=>q/ue*100)}const V=_.current,F=Fo(fe),X=k1({groupId:se,panels:fe,nextSizes:K,prevSizes:G,units:te});j1(G,X)||(P(X),Ac(F,X,V))}}),[g]),Bd(()=>{A.current.direction=r,A.current.id=g,A.current.panels=x,A.current.sizes=I,A.current.units=m}),oae({committedValuesRef:A,groupId:g,panels:x,setSizes:P,sizes:I,panelSizeBeforeCollapse:M}),ui(()=>{const{onLayout:K}=j.current,{panels:Z,sizes:se}=A.current;if(se.length>0){K&&K(se);const fe=_.current,G=Fo(Z);Ac(G,se,fe)}},[I]),Bd(()=>{const{id:K,sizes:Z,units:se}=A.current;if(Z.length===x.size)return;let fe=null;if(e){const G=Fo(x);fe=uae(e,G,d)}if(fe!=null){const G=k1({groupId:K,panels:x,nextSizes:fe,prevSizes:fe,units:se});P(G)}else{const G=eae({groupId:K,panels:x,units:se});P(G)}},[e,x,d]),ui(()=>{if(e){if(I.length===0||I.length!==x.size)return;const K=Fo(x);I1[e]||(I1[e]=cae(dae,100)),I1[e](e,K,I,d)}},[e,x,I,d]),Bd(()=>{if(m==="pixels"){const K=new ResizeObserver(()=>{const{panels:Z,sizes:se}=A.current,fe=k1({groupId:g,panels:Z,nextSizes:se,prevSizes:se,units:m});j1(se,fe)||P(fe)});return K.observe(uf(g)),()=>{K.disconnect()}}},[g,m]);const D=Ja((K,Z)=>{const{panels:se,units:fe}=A.current,te=Fo(se).findIndex(X=>X.current.id===K),V=I[te];if((Z??fe)==="pixels"){const X=Vi(g);return V/100*X}else return V},[g,I]),O=Ja((K,Z)=>{const{panels:se}=A.current;return se.size===0?{flexBasis:0,flexGrow:Z??void 0,flexShrink:1,overflow:"hidden"}:{flexBasis:0,flexGrow:$8(se,K,I),flexShrink:1,overflow:"hidden",pointerEvents:o&&b!==null?"none":void 0}},[b,o,I]),T=Ja((K,Z)=>{const{units:se}=A.current;rae(se,Z),C(fe=>{if(fe.has(K))return fe;const G=new Map(fe);return G.set(K,Z),G})},[]),Y=Ja(K=>se=>{se.preventDefault();const{direction:fe,panels:G,sizes:te}=A.current,V=Fo(G),[F,X]=T2(g,K,V);if(F==null||X==null)return;let ue=aae(se,g,K,V,fe,te,S.current);if(ue===0)return;const ne=uf(g).getBoundingClientRect(),pe=fe==="horizontal";document.dir==="rtl"&&pe&&(ue=-ue);const le=pe?ne.width:ne.height,we=ue/le*100,ve=Ed(se,A.current,F,X,we,te,M.current,S.current),he=!j1(te,ve);if((tx(se)||nx(se))&&R.current!=we&&_1(he?pe?"horizontal":"vertical":pe?ue<0?"horizontal-min":"horizontal-max":ue<0?"vertical-min":"vertical-max"),he){const Ne=_.current;P(ve),Ac(V,ve,Ne)}R.current=we},[g]),z=Ja(K=>{C(Z=>{if(!Z.has(K))return Z;const se=new Map(Z);return se.delete(K),se})},[]),W=Ja(K=>{const{panels:Z,sizes:se}=A.current,fe=Z.get(K);if(fe==null)return;const{collapsedSize:G,collapsible:te}=fe.current;if(!te)return;const V=Fo(Z),F=V.indexOf(fe);if(F<0)return;const X=se[F];if(X===G)return;M.current.set(K,X);const[ue,q]=S1(K,V);if(ue==null||q==null)return;const pe=F===V.length-1?X:G-X,le=Ed(null,A.current,ue,q,pe,se,M.current,null);if(se!==le){const we=_.current;P(le),Ac(V,le,we)}},[]),Q=Ja(K=>{const{panels:Z,sizes:se}=A.current,fe=Z.get(K);if(fe==null)return;const{collapsedSize:G,minSize:te}=fe.current,V=M.current.get(K)||te;if(!V)return;const F=Fo(Z),X=F.indexOf(fe);if(X<0||se[X]!==G)return;const[q,ne]=S1(K,F);if(q==null||ne==null)return;const le=X===F.length-1?G-V:V,we=Ed(null,A.current,q,ne,le,se,M.current,null);if(se!==we){const ve=_.current;P(we),Ac(F,we,ve)}},[]),U=Ja((K,Z,se)=>{const{id:fe,panels:G,sizes:te,units:V}=A.current;if((se||V)==="pixels"){const Mt=Vi(fe);Z=Z/Mt*100}const F=G.get(K);if(F==null)return;let{collapsedSize:X,collapsible:ue,maxSize:q,minSize:ne}=F.current;if(V==="pixels"){const Mt=Vi(fe);ne=ne/Mt*100,q!=null&&(q=q/Mt*100)}const pe=Fo(G),le=pe.indexOf(F);if(le<0)return;const we=te[le];if(we===Z)return;ue&&Z===X||(Z=Math.min(q??100,Math.max(ne,Z)));const[ve,he]=S1(K,pe);if(ve==null||he==null)return;const De=le===pe.length-1?we-Z:Z-we,qe=Ed(null,A.current,ve,he,De,te,M.current,null);if(te!==qe){const Mt=_.current;P(qe),Ac(pe,qe,Mt)}},[]),L=Yse(()=>({activeHandleId:b,collapsePanel:W,direction:r,expandPanel:Q,getPanelSize:D,getPanelStyle:O,groupId:g,registerPanel:T,registerResizeHandle:Y,resizePanel:U,startDragging:(K,Z)=>{if(y(K),tx(Z)||nx(Z)){const se=m0(K);S.current={dragHandleRect:se.getBoundingClientRect(),dragOffset:F8(Z,K,r),sizes:A.current.sizes}}},stopDragging:()=>{lae(),y(null),S.current=null},units:m,unregisterPanel:z}),[b,W,r,Q,D,O,g,T,Y,U,m,z]),ee={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Iu(h0.Provider,{children:Iu(h,{children:t,className:n,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g,"data-panel-group-units":m,style:{...ee,...p}}),value:L})}const g0=A8((e,t)=>Iu(V8,{...e,forwardedRef:t}));V8.displayName="PanelGroup";g0.displayName="forwardRef(PanelGroup)";function ox({children:e=null,className:t="",disabled:n=!1,id:r=null,onDragging:o,style:s={},tagName:i="div"}){const c=ns(null),d=ns({onDragging:o});ui(()=>{d.current.onDragging=o});const p=D8(h0);if(p===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{activeHandleId:h,direction:m,groupId:g,registerResizeHandle:b,startDragging:y,stopDragging:x}=p,C=A2(r),S=h===C,[j,_]=Fd(!1),[I,P]=Fd(null),M=Ja(()=>{c.current.blur(),x();const{onDragging:D}=d.current;D&&D(!1)},[x]);ui(()=>{if(n)P(null);else{const A=b(C);P(()=>A)}},[n,C,b]),ui(()=>{if(n||I==null||!S)return;const A=Y=>{I(Y)},D=Y=>{I(Y)},T=c.current.ownerDocument;return T.body.addEventListener("contextmenu",M),T.body.addEventListener("mousemove",A),T.body.addEventListener("touchmove",A),T.body.addEventListener("mouseleave",D),window.addEventListener("mouseup",M),window.addEventListener("touchend",M),()=>{T.body.removeEventListener("contextmenu",M),T.body.removeEventListener("mousemove",A),T.body.removeEventListener("touchmove",A),T.body.removeEventListener("mouseleave",D),window.removeEventListener("mouseup",M),window.removeEventListener("touchend",M)}},[m,n,S,I,M]),sae({disabled:n,handleId:C,resizeHandler:I});const R={cursor:B8(m),touchAction:"none",userSelect:"none"};return Iu(i,{children:e,className:t,"data-resize-handle-active":S?"pointer":j?"keyboard":void 0,"data-panel-group-direction":m,"data-panel-group-id":g,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":C,onBlur:()=>_(!1),onFocus:()=>_(!0),onMouseDown:A=>{y(C,A.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},onMouseUp:M,onTouchCancel:M,onTouchEnd:M,onTouchStart:A=>{y(C,A.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},ref:c,role:"separator",style:{...R,...s},tabIndex:0})}ox.displayName="PanelResizeHandle";const fae=e=>{const{direction:t="horizontal",collapsedDirection:n,isCollapsed:r=!1,...o}=e,s=di("base.100","base.850"),i=di("base.300","base.700");return t==="horizontal"?a.jsx(ox,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-horizontal",sx:{w:n?2.5:4,h:"full",justifyContent:n?n==="left"?"flex-start":"flex-end":"center",alignItems:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Te,{sx:{w:1,h:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})}):a.jsx(ox,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-vertical",sx:{w:"full",h:n?2.5:4,alignItems:n?n==="top"?"flex-start":"flex-end":"center",justifyContent:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Te,{sx:{h:1,w:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})})},Zm=l.memo(fae),N2=()=>{const e=oe(),t=H(o=>o.ui.panels),n=l.useCallback(o=>t[o]??"",[t]),r=l.useCallback((o,s)=>{e(c7({name:o,value:s}))},[e]);return{getItem:n,setItem:r}};const pae=e=>{const{label:t,data:n,fileName:r,withDownload:o=!0,withCopy:s=!0}=e,i=l.useMemo(()=>u7(n)?n:JSON.stringify(n,null,2),[n]),c=l.useCallback(()=>{navigator.clipboard.writeText(i)},[i]),d=l.useCallback(()=>{const h=new Blob([i]),m=document.createElement("a");m.href=URL.createObjectURL(h),m.download=`${r||t}.json`,document.body.appendChild(m),m.click(),m.remove()},[i,t,r]),{t:p}=J();return a.jsxs(N,{layerStyle:"second",sx:{borderRadius:"base",flexGrow:1,w:"full",h:"full",position:"relative"},children:[a.jsx(Te,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"auto",p:4,fontSize:"sm"},children:a.jsx(o0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsx("pre",{children:i})})}),a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineEnd:0,p:2},children:[o&&a.jsx(Fn,{label:`${p("gallery.download")} ${t} JSON`,children:a.jsx(_a,{"aria-label":`${p("gallery.download")} ${t} JSON`,icon:a.jsx(Wu,{}),variant:"ghost",opacity:.7,onClick:d})}),s&&a.jsx(Fn,{label:`${p("gallery.copy")} ${t} JSON`,children:a.jsx(_a,{"aria-label":`${p("gallery.copy")} ${t} JSON`,icon:a.jsx(Hu,{}),variant:"ghost",opacity:.7,onClick:c})})]})]})},el=l.memo(pae),hae=de(Ce,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(r=>r.id===t);return{data:n==null?void 0:n.data}},_e),mae=()=>{const{data:e}=H(hae);return e?a.jsx(el,{data:e,label:"Node Data"}):a.jsx(qr,{label:"No node selected",icon:null})},gae=l.memo(mae),vae=({children:e,maxHeight:t})=>a.jsx(N,{sx:{w:"full",h:"full",maxHeight:t,position:"relative"},children:a.jsx(Te,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(o0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:e})})}),lc=l.memo(vae),bae=({output:e})=>{const{image:t}=e,{data:n}=Ps(t.image_name);return a.jsx(il,{imageDTO:n})},xae=l.memo(bae),yae=de(Ce,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(s=>s.id===t),r=n?e.nodeTemplates[n.data.type]:void 0,o=e.nodeExecutionStates[t??"__UNKNOWN_NODE__"];return{node:n,template:r,nes:o}},_e),Cae=()=>{const{node:e,template:t,nes:n}=H(yae),{t:r}=J();return!e||!n||!Rr(e)?a.jsx(qr,{label:r("nodes.noNodeSelected"),icon:null}):n.outputs.length===0?a.jsx(qr,{label:r("nodes.noOutputRecorded"),icon:null}):a.jsx(Te,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(lc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:(t==null?void 0:t.outputType)==="image_output"?n.outputs.map((o,s)=>a.jsx(xae,{output:o},Sae(o,s))):a.jsx(el,{data:n.outputs,label:r("nodes.nodeOutputs")})})})})},wae=l.memo(Cae),Sae=(e,t)=>`${e.type}-${t}`,kae=de(Ce,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t);return{template:n?e.nodeTemplates[n.data.type]:void 0}},_e),jae=()=>{const{template:e}=H(kae),{t}=J();return e?a.jsx(el,{data:e,label:t("nodes.nodeTemplate")}):a.jsx(qr,{label:t("nodes.noNodeSelected"),icon:null})},_ae=l.memo(jae),$2=e=>{e.stopPropagation()},Iae=Oe((e,t)=>{const n=oe(),r=l.useCallback(s=>{s.shiftKey&&n(Uo(!0))},[n]),o=l.useCallback(s=>{s.shiftKey||n(Uo(!1))},[n]);return a.jsx(G3,{ref:t,onPaste:$2,onKeyDown:r,onKeyUp:o,...e})}),vi=l.memo(Iae),L2=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return o==null?void 0:o.data},_e),[e]);return H(t)},Pae=({nodeId:e})=>{const t=oe(),n=L2(e),{t:r}=J(),o=l.useCallback(s=>{t(d7({nodeId:e,notes:s.target.value}))},[t,e]);return Vh(n)?a.jsxs(Bn,{children:[a.jsx(vr,{children:r("nodes.notes")}),a.jsx(vi,{value:n==null?void 0:n.notes,onChange:o,rows:10})]}):null},Eae=l.memo(Pae),U8=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.label:!1},_e),[e]);return H(t)},G8=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=o?r.nodeTemplates[o.data.type]:void 0;return s==null?void 0:s.title},_e),[e]);return H(t)},Mae=({nodeId:e,title:t})=>{const n=oe(),r=U8(e),o=G8(e),{t:s}=J(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(nP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsxs(Ef,{as:N,value:i,onChange:p,onSubmit:d,w:"full",fontWeight:600,children:[a.jsx(Pf,{noOfLines:1}),a.jsx(If,{className:"nodrag",_focusVisible:{boxShadow:"none"}})]})})},Oae=l.memo(Mae),Rae=de(Ce,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t),r=n?e.nodeTemplates[n.data.type]:void 0;return{node:n,template:r}},_e),Aae=()=>{const{node:e,template:t}=H(Rae),{t:n}=J();return!t||!Rr(e)?a.jsx(qr,{label:n("nodes.noNodeSelected"),icon:null}):a.jsx(Tae,{node:e,template:t})},Dae=l.memo(Aae),Tae=e=>{const{t}=J(),{needsUpdate:n,updateNode:r}=rP(e.node.id);return a.jsx(Te,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(lc,{children:a.jsxs(N,{sx:{flexDir:"column",position:"relative",p:1,gap:2,w:"full"},children:[a.jsx(Oae,{nodeId:e.node.data.id}),a.jsxs(xg,{children:[a.jsxs(Bn,{children:[a.jsx(vr,{children:"Node Type"}),a.jsx(Se,{fontSize:"sm",fontWeight:600,children:e.template.title})]}),a.jsxs(N,{flexDir:"row",alignItems:"center",justifyContent:"space-between",w:"full",children:[a.jsxs(Bn,{isInvalid:n,children:[a.jsx(vr,{children:"Node Version"}),a.jsx(Se,{fontSize:"sm",fontWeight:600,children:e.node.data.version})]}),n&&a.jsx(tt,{"aria-label":t("nodes.updateNode"),tooltip:t("nodes.updateNode"),icon:a.jsx(Xg,{}),onClick:r})]})]}),a.jsx(Eae,{nodeId:e.node.data.id})]})})})},Nae=()=>a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(xo,{children:"Details"}),a.jsx(xo,{children:"Outputs"}),a.jsx(xo,{children:"Data"}),a.jsx(xo,{children:"Template"})]}),a.jsxs(zu,{children:[a.jsx(Ho,{children:a.jsx(Dae,{})}),a.jsx(Ho,{children:a.jsx(wae,{})}),a.jsx(Ho,{children:a.jsx(gae,{})}),a.jsx(Ho,{children:a.jsx(_ae,{})})]})]})}),$ae=l.memo(Nae),Lae={display:"flex",flexDirection:"row",alignItems:"center",gap:10},zae=e=>{const{label:t="",labelPos:n="top",isDisabled:r=!1,isInvalid:o,formControlProps:s,...i}=e,c=oe(),d=l.useCallback(h=>{h.shiftKey&&c(Uo(!0))},[c]),p=l.useCallback(h=>{h.shiftKey||c(Uo(!1))},[c]);return a.jsxs(Bn,{isInvalid:o,isDisabled:r,...s,style:n==="side"?Lae:void 0,children:[t!==""&&a.jsx(vr,{children:t}),a.jsx(vg,{...i,onPaste:$2,onKeyDown:d,onKeyUp:p})]})},Cs=l.memo(zae),Fae=de(Ce,({nodes:e})=>{const{author:t,name:n,description:r,tags:o,version:s,contact:i,notes:c}=e.workflow;return{name:n,author:t,description:r,tags:o,version:s,contact:i,notes:c}},_e),Bae=()=>{const{author:e,name:t,description:n,tags:r,version:o,contact:s,notes:i}=H(Fae),c=oe(),d=l.useCallback(C=>{c(f7(C.target.value))},[c]),p=l.useCallback(C=>{c(p7(C.target.value))},[c]),h=l.useCallback(C=>{c(h7(C.target.value))},[c]),m=l.useCallback(C=>{c(m7(C.target.value))},[c]),g=l.useCallback(C=>{c(g7(C.target.value))},[c]),b=l.useCallback(C=>{c(v7(C.target.value))},[c]),y=l.useCallback(C=>{c(b7(C.target.value))},[c]),{t:x}=J();return a.jsx(lc,{children:a.jsxs(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:[a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Cs,{label:x("nodes.workflowName"),value:t,onChange:d}),a.jsx(Cs,{label:x("nodes.workflowVersion"),value:o,onChange:m})]}),a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Cs,{label:x("nodes.workflowAuthor"),value:e,onChange:p}),a.jsx(Cs,{label:x("nodes.workflowContact"),value:s,onChange:h})]}),a.jsx(Cs,{label:x("nodes.workflowTags"),value:r,onChange:b}),a.jsxs(Bn,{as:N,sx:{flexDir:"column"},children:[a.jsx(vr,{children:x("nodes.workflowDescription")}),a.jsx(vi,{onChange:g,value:n,fontSize:"sm",sx:{resize:"none"}})]}),a.jsxs(Bn,{as:N,sx:{flexDir:"column",h:"full"},children:[a.jsx(vr,{children:x("nodes.workflowNotes")}),a.jsx(vi,{onChange:y,value:i,fontSize:"sm",sx:{h:"full",resize:"none"}})]})]})})},Hae=l.memo(Bae),q8=()=>{const e=H(r=>r.nodes),[t]=P2(e,300);return l.useMemo(()=>x7(t),[t])},Wae=()=>{const e=q8(),{t}=J();return a.jsx(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:a.jsx(el,{data:e,label:t("nodes.workflow")})})},Vae=l.memo(Wae),Uae=({isSelected:e,isHovered:t})=>{const n=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.light";if(e)return"nodeSelected.light";if(t)return"nodeHovered.light"},[t,e]),r=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.dark";if(e)return"nodeSelected.dark";if(t)return"nodeHovered.dark"},[t,e]);return a.jsx(Te,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e||t?1:.5,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:n,_dark:{shadow:r}}})},K8=l.memo(Uae),Q8=e=>{const t=oe(),n=l.useMemo(()=>de(Ce,({nodes:i})=>i.mouseOverNode===e,_e),[e]),r=H(n),o=l.useCallback(()=>{!r&&t(Gw(e))},[t,e,r]),s=l.useCallback(()=>{r&&t(Gw(null))},[t,r]);return{isMouseOverNode:r,handleMouseOver:o,handleMouseOut:s}},X8=(e,t)=>{const n=l.useMemo(()=>de(Ce,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return(i=s==null?void 0:s.data.inputs[t])==null?void 0:i.label},_e),[t,e]);return H(n)},Y8=(e,t,n)=>{const r=l.useMemo(()=>de(Ce,({nodes:s})=>{var d;const i=s.nodes.find(p=>p.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return(d=c==null?void 0:c[zx[n]][t])==null?void 0:d.title},_e),[t,n,e]);return H(r)},J8=(e,t)=>{const n=l.useMemo(()=>de(Ce,({nodes:o})=>{const s=o.nodes.find(i=>i.id===e);if(Rr(s))return s==null?void 0:s.data.inputs[t]},_e),[t,e]);return H(n)},v0=(e,t,n)=>{const r=l.useMemo(()=>de(Ce,({nodes:s})=>{const i=s.nodes.find(d=>d.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return c==null?void 0:c[zx[n]][t]},_e),[t,n,e]);return H(r)},Gae=({nodeId:e,fieldName:t,kind:n})=>{const r=J8(e,t),o=v0(e,t,n),s=y7(o),{t:i}=J(),c=l.useMemo(()=>C7(r)?r.label&&(o!=null&&o.title)?`${r.label} (${o.title})`:r.label&&!o?r.label:!r.label&&o?o.title:i("nodes.unknownField"):(o==null?void 0:o.title)||i("nodes.unknownField"),[r,o,i]);return a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(Se,{sx:{fontWeight:600},children:c}),o&&a.jsx(Se,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:o.description}),o&&a.jsxs(Se,{children:["Type: ",bf[o.type].title]}),s&&a.jsxs(Se,{children:["Input: ",w7(o.input)]})]})},z2=l.memo(Gae),qae=Oe((e,t)=>{const{nodeId:n,fieldName:r,kind:o,isMissingInput:s=!1,withTooltip:i=!1}=e,c=X8(n,r),d=Y8(n,r,o),{t:p}=J(),h=oe(),[m,g]=l.useState(c||d||p("nodes.unknownField")),b=l.useCallback(async x=>{x&&(x===c||x===d)||(g(x||d||p("nodes.unknownField")),h(S7({nodeId:n,fieldName:r,label:x})))},[c,d,h,n,r,p]),y=l.useCallback(x=>{g(x)},[]);return l.useEffect(()=>{g(c||d||p("nodes.unknownField"))},[c,d,p]),a.jsx(Fn,{label:i?a.jsx(z2,{nodeId:n,fieldName:r,kind:"input"}):void 0,openDelay:ug,placement:"top",hasArrow:!0,children:a.jsx(N,{ref:t,sx:{position:"relative",overflow:"hidden",alignItems:"center",justifyContent:"flex-start",gap:1,h:"full"},children:a.jsxs(Ef,{value:m,onChange:y,onSubmit:b,as:N,sx:{position:"relative",alignItems:"center",h:"full"},children:[a.jsx(Pf,{sx:{p:0,fontWeight:s?600:400,textAlign:"left",_hover:{fontWeight:"600 !important"}},noOfLines:1}),a.jsx(If,{className:"nodrag",sx:{p:0,w:"full",fontWeight:600,color:"base.900",_dark:{color:"base.100"},_focusVisible:{p:0,textAlign:"left",boxShadow:"none"}}}),a.jsx(eR,{})]})})})}),Z8=l.memo(qae),eR=l.memo(()=>{const{isEditing:e,getEditButtonProps:t}=JP(),n=l.useCallback(r=>{const{onClick:o}=t();o&&(o(r),r.preventDefault())},[t]);return e?null:a.jsx(N,{onClick:n,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,cursor:"text"})});eR.displayName="EditableControls";const Kae=e=>{const{nodeId:t,field:n}=e,r=oe(),o=l.useCallback(s=>{r(k7({nodeId:t,fieldName:n.name,value:s.target.checked}))},[r,n.name,t]);return a.jsx(Ey,{className:"nodrag",onChange:o,isChecked:n.value})},Qae=l.memo(Kae);function b0(){return(b0=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function sx(e){var t=l.useRef(e),n=l.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Pu=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:C.buttons>0)&&o.current?s(C_(o.current,C,c.current)):x(!1)},y=function(){return x(!1)};function x(C){var S=d.current,j=ax(o.current),_=C?j.addEventListener:j.removeEventListener;_(S?"touchmove":"mousemove",b),_(S?"touchend":"mouseup",y)}return[function(C){var S=C.nativeEvent,j=o.current;if(j&&(w_(S),!function(I,P){return P&&!Hd(I)}(S,d.current)&&j)){if(Hd(S)){d.current=!0;var _=S.changedTouches||[];_.length&&(c.current=_[0].identifier)}j.focus(),s(C_(j,S,c.current)),x(!0)}},function(C){var S=C.which||C.keyCode;S<37||S>40||(C.preventDefault(),i({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},x]},[i,s]),h=p[0],m=p[1],g=p[2];return l.useEffect(function(){return g},[g]),B.createElement("div",b0({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:m,tabIndex:0,role:"slider"}))}),x0=function(e){return e.filter(Boolean).join(" ")},B2=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,s=x0(["react-colorful__pointer",e.className]);return B.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},B.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Eo=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},nR=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Eo(e.h),s:Eo(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Eo(o/2),a:Eo(r,2)}},ix=function(e){var t=nR(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},P1=function(e){var t=nR(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Xae=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),c=r*(1-(t-s)*n),d=r*(1-(1-t+s)*n),p=s%6;return{r:Eo(255*[r,c,i,i,d,r][p]),g:Eo(255*[d,r,r,c,i,i][p]),b:Eo(255*[i,i,d,r,r,c][p]),a:Eo(o,2)}},Yae=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),c=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:Eo(60*(c<0?c+6:c)),s:Eo(s?i/s*100:0),v:Eo(s/255*100),a:o}},Jae=B.memo(function(e){var t=e.hue,n=e.onChange,r=x0(["react-colorful__hue",e.className]);return B.createElement("div",{className:r},B.createElement(F2,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Pu(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":Eo(t),"aria-valuemax":"360","aria-valuemin":"0"},B.createElement(B2,{className:"react-colorful__hue-pointer",left:t/360,color:ix({h:t,s:100,v:100,a:1})})))}),Zae=B.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:ix({h:t.h,s:100,v:100,a:1})};return B.createElement("div",{className:"react-colorful__saturation",style:r},B.createElement(F2,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Pu(t.s+100*o.left,0,100),v:Pu(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Eo(t.s)+"%, Brightness "+Eo(t.v)+"%"},B.createElement(B2,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:ix(t)})))}),rR=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function eie(e,t,n){var r=sx(n),o=l.useState(function(){return e.toHsva(t)}),s=o[0],i=o[1],c=l.useRef({color:t,hsva:s});l.useEffect(function(){if(!e.equal(t,c.current.color)){var p=e.toHsva(t);c.current={hsva:p,color:t},i(p)}},[t,e]),l.useEffect(function(){var p;rR(s,c.current.hsva)||e.equal(p=e.fromHsva(s),c.current.color)||(c.current={hsva:s,color:p},r(p))},[s,e,r]);var d=l.useCallback(function(p){i(function(h){return Object.assign({},h,p)})},[]);return[s,d]}var tie=typeof window<"u"?l.useLayoutEffect:l.useEffect,nie=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},S_=new Map,rie=function(e){tie(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!S_.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,S_.set(t,n);var r=nie();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},oie=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+P1(Object.assign({},n,{a:0}))+", "+P1(Object.assign({},n,{a:1}))+")"},s=x0(["react-colorful__alpha",t]),i=Eo(100*n.a);return B.createElement("div",{className:s},B.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),B.createElement(F2,{onMove:function(c){r({a:c.left})},onKey:function(c){r({a:Pu(n.a+c.left)})},"aria-label":"Alpha","aria-valuetext":i+"%","aria-valuenow":i,"aria-valuemin":"0","aria-valuemax":"100"},B.createElement(B2,{className:"react-colorful__alpha-pointer",left:n.a,color:P1(n)})))},sie=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,s=e.onChange,i=tR(e,["className","colorModel","color","onChange"]),c=l.useRef(null);rie(c);var d=eie(n,o,s),p=d[0],h=d[1],m=x0(["react-colorful",t]);return B.createElement("div",b0({},i,{ref:c,className:m}),B.createElement(Zae,{hsva:p,onChange:h}),B.createElement(Jae,{hue:p.h,onChange:h}),B.createElement(oie,{hsva:p,onChange:h,className:"react-colorful__last-control"}))},aie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Yae,fromHsva:Xae,equal:rR},oR=function(e){return B.createElement(sie,b0({},e,{colorModel:aie}))};const iie=e=>{const{nodeId:t,field:n}=e,r=oe(),o=l.useCallback(s=>{r(j7({nodeId:t,fieldName:n.name,value:s}))},[r,n.name,t]);return a.jsx(oR,{className:"nodrag",color:n.value,onChange:o})},lie=l.memo(iie),sR=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=_7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({controlNetModelId:e,errors:s.error.format()},"Failed to parse ControlNet model id");return}return s.data},cie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=oe(),{data:s}=_x(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/controlnet/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return Kr(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:gr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=sR(p);h&&o(I7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Ar,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},uie=l.memo(cie),die=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=oe(),s=l.useCallback(i=>{o(P7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return a.jsx(I3,{className:"nowheel nodrag",onChange:s,value:n.value,children:r.options.map(i=>a.jsx("option",{value:i,children:r.ui_choice_labels?r.ui_choice_labels[i]:i},i))})},fie=l.memo(die),pie=e=>{var p;const{nodeId:t,field:n}=e,r=oe(),{currentData:o}=Ps(((p=n.value)==null?void 0:p.image_name)??Os.skipToken),s=l.useCallback(()=>{r(E7({nodeId:t,fieldName:n.name,value:void 0}))},[r,n.name,t]),i=l.useMemo(()=>{if(o)return{id:`node-${t}-${n.name}`,payloadType:"IMAGE_DTO",payload:{imageDTO:o}}},[n.name,o,t]),c=l.useMemo(()=>({id:`node-${t}-${n.name}`,actionType:"SET_NODES_IMAGE",context:{nodeId:t,fieldName:n.name}}),[n.name,t]),d=l.useMemo(()=>({type:"SET_NODES_IMAGE",nodeId:t,fieldName:n.name}),[t,n.name]);return a.jsx(N,{className:"nodrag",sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(il,{imageDTO:o,droppableData:c,draggableData:i,postUploadAction:d,useThumbailFallback:!0,uploadElement:a.jsx(aR,{}),dropLabel:a.jsx(iR,{}),minSize:8,children:a.jsx(fu,{onClick:s,icon:o?a.jsx(Yg,{}):void 0,tooltip:"Reset Image"})})})},hie=l.memo(pie),aR=l.memo(()=>a.jsx(Se,{fontSize:16,fontWeight:600,children:"Drop or Upload"}));aR.displayName="UploadElement";const iR=l.memo(()=>a.jsx(Se,{fontSize:16,fontWeight:600,children:"Drop"}));iR.displayName="DropLabel";const mie=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=M7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({loraModelId:e,errors:s.error.format()},"Failed to parse LoRA model id");return}return s.data},gie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=oe(),{data:s}=vf(),{t:i}=J(),c=l.useMemo(()=>{if(!s)return[];const m=[];return Kr(s.entities,(g,b)=>{g&&m.push({value:b,label:g.model_name,group:gr[g.base_model]})}),m.sort((g,b)=>g.disabled&&!b.disabled?1:-1)},[s]),d=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/lora/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r==null?void 0:r.base_model,r==null?void 0:r.model_name]),p=l.useCallback(m=>{if(!m)return;const g=mie(m);g&&o(O7({nodeId:t,fieldName:n.name,value:g}))},[o,n.name,t]),h=l.useCallback((m,g)=>{var b;return((b=g.label)==null?void 0:b.toLowerCase().includes(m.toLowerCase().trim()))||g.value.toLowerCase().includes(m.toLowerCase().trim())},[]);return(s==null?void 0:s.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(Se,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:"No LoRAs Loaded"})}):a.jsx(tr,{className:"nowheel nodrag",value:(d==null?void 0:d.id)??null,placeholder:c.length>0?i("models.selectLoRA"):i("models.noLoRAsAvailable"),data:c,nothingFound:i("models.noMatchingLoRAs"),itemComponent:pl,disabled:c.length===0,filter:h,error:!d,onChange:p,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},vie=l.memo(gie),y0=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=R7.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data};function Gu(e){const{iconMode:t=!1,...n}=e,r=oe(),{t:o}=J(),[s,{isLoading:i}]=A7(),c=l.useCallback(()=>{s().unwrap().then(d=>{r(Bt(Zn({title:`${o("modelManager.modelsSynced")}`,status:"success"})))}).catch(d=>{d&&r(Bt(Zn({title:`${o("modelManager.modelSyncFailed")}`,status:"error"})))})},[r,s,o]);return t?a.jsx(tt,{icon:a.jsx(Xg,{}),tooltip:o("modelManager.syncModels"),"aria-label":o("modelManager.syncModels"),isLoading:i,onClick:c,size:"sm",...n}):a.jsx(Rt,{isLoading:i,onClick:c,minW:"max-content",...n,children:"Sync Models"})}const bie=e=>{var y,x;const{nodeId:t,field:n}=e,r=oe(),o=jn("syncModels").isFeatureEnabled,{t:s}=J(),{data:i,isLoading:c}=Wd(qw),{data:d,isLoading:p}=na(qw),h=l.useMemo(()=>c||p,[c,p]),m=l.useMemo(()=>{if(!d)return[];const C=[];return Kr(d.entities,(S,j)=>{S&&C.push({value:j,label:S.model_name,group:gr[S.base_model]})}),i&&Kr(i.entities,(S,j)=>{S&&C.push({value:j,label:S.model_name,group:gr[S.base_model]})}),C},[d,i]),g=l.useMemo(()=>{var C,S,j,_;return((d==null?void 0:d.entities[`${(C=n.value)==null?void 0:C.base_model}/main/${(S=n.value)==null?void 0:S.model_name}`])||(i==null?void 0:i.entities[`${(j=n.value)==null?void 0:j.base_model}/onnx/${(_=n.value)==null?void 0:_.model_name}`]))??null},[(y=n.value)==null?void 0:y.base_model,(x=n.value)==null?void 0:x.model_name,d==null?void 0:d.entities,i==null?void 0:i.entities]),b=l.useCallback(C=>{if(!C)return;const S=y0(C);S&&r(oP({nodeId:t,fieldName:n.name,value:S}))},[r,n.name,t]);return a.jsxs(N,{sx:{w:"full",alignItems:"center",gap:2},children:[h?a.jsx(Se,{variant:"subtext",children:"Loading..."}):a.jsx(tr,{className:"nowheel nodrag",tooltip:g==null?void 0:g.description,value:g==null?void 0:g.id,placeholder:m.length>0?s("models.selectModel"):s("models.noModelsAvailable"),data:m,error:!g,disabled:m.length===0,onChange:b,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),o&&a.jsx(Gu,{className:"nodrag",iconMode:!0})]})},xie=l.memo(bie),eg=/^-?(0\.)?\.?$/,lR=Oe((e,t)=>{const{label:n,isDisabled:r=!1,showStepper:o=!0,isInvalid:s,value:i,onChange:c,min:d,max:p,isInteger:h=!0,formControlProps:m,formLabelProps:g,numberInputFieldProps:b,numberInputStepperProps:y,tooltipProps:x,...C}=e,S=oe(),[j,_]=l.useState(String(i));l.useEffect(()=>{!j.match(eg)&&i!==Number(j)&&_(String(i))},[i,j]);const I=l.useCallback(A=>{_(A),A.match(eg)||c(h?Math.floor(Number(A)):Number(A))},[h,c]),P=l.useCallback(A=>{const D=Bl(h?Math.floor(Number(A.target.value)):Number(A.target.value),d,p);_(String(D)),c(D)},[h,p,d,c]),M=l.useCallback(A=>{A.shiftKey&&S(Uo(!0))},[S]),R=l.useCallback(A=>{A.shiftKey||S(Uo(!1))},[S]);return a.jsx(Fn,{...x,children:a.jsxs(Bn,{ref:t,isDisabled:r,isInvalid:s,...m,children:[n&&a.jsx(vr,{...g,children:n}),a.jsxs(_g,{value:j,min:d,max:p,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:P,...C,onPaste:$2,children:[a.jsx(Pg,{...b,onKeyDown:M,onKeyUp:R}),o&&a.jsxs(Ig,{children:[a.jsx(Mg,{...y}),a.jsx(Eg,{...y})]})]})]})})});lR.displayName="IAINumberInput";const ja=l.memo(lR),yie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=oe(),[s,i]=l.useState(String(n.value)),c=l.useMemo(()=>r.type==="integer",[r.type]),d=l.useCallback(p=>{i(p),p.match(eg)||o(D7({nodeId:t,fieldName:n.name,value:c?Math.floor(Number(p)):Number(p)}))},[o,n.name,c,t]);return l.useEffect(()=>{!s.match(eg)&&n.value!==Number(s)&&i(String(n.value))},[n.value,s]),a.jsxs(_g,{onChange:d,value:s,step:c?1:.1,precision:c?0:3,children:[a.jsx(Pg,{className:"nodrag"}),a.jsxs(Ig,{children:[a.jsx(Mg,{}),a.jsx(Eg,{})]})]})},Cie=l.memo(yie),wie=e=>{var m,g;const{nodeId:t,field:n}=e,r=oe(),{t:o}=J(),s=jn("syncModels").isFeatureEnabled,{data:i,isLoading:c}=na(Fx),d=l.useMemo(()=>{if(!i)return[];const b=[];return Kr(i.entities,(y,x)=>{y&&b.push({value:x,label:y.model_name,group:gr[y.base_model]})}),b},[i]),p=l.useMemo(()=>{var b,y;return(i==null?void 0:i.entities[`${(b=n.value)==null?void 0:b.base_model}/main/${(y=n.value)==null?void 0:y.model_name}`])??null},[(m=n.value)==null?void 0:m.base_model,(g=n.value)==null?void 0:g.model_name,i==null?void 0:i.entities]),h=l.useCallback(b=>{if(!b)return;const y=y0(b);y&&r(T7({nodeId:t,fieldName:n.name,value:y}))},[r,n.name,t]);return c?a.jsx(tr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(tr,{className:"nowheel nodrag",tooltip:p==null?void 0:p.description,value:p==null?void 0:p.id,placeholder:d.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:d,error:!p,disabled:d.length===0,onChange:h,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Gu,{className:"nodrag",iconMode:!0})]})},Sie=l.memo(wie),kie=e=>{var g,b;const{nodeId:t,field:n}=e,r=oe(),{t:o}=J(),s=jn("syncModels").isFeatureEnabled,{data:i}=Wd(Kw),{data:c,isLoading:d}=na(Kw),p=l.useMemo(()=>{if(!c)return[];const y=[];return Kr(c.entities,(x,C)=>{!x||x.base_model!=="sdxl"||y.push({value:C,label:x.model_name,group:gr[x.base_model]})}),i&&Kr(i.entities,(x,C)=>{!x||x.base_model!=="sdxl"||y.push({value:C,label:x.model_name,group:gr[x.base_model]})}),y},[c,i]),h=l.useMemo(()=>{var y,x,C,S;return((c==null?void 0:c.entities[`${(y=n.value)==null?void 0:y.base_model}/main/${(x=n.value)==null?void 0:x.model_name}`])||(i==null?void 0:i.entities[`${(C=n.value)==null?void 0:C.base_model}/onnx/${(S=n.value)==null?void 0:S.model_name}`]))??null},[(g=n.value)==null?void 0:g.base_model,(b=n.value)==null?void 0:b.model_name,c==null?void 0:c.entities,i==null?void 0:i.entities]),m=l.useCallback(y=>{if(!y)return;const x=y0(y);x&&r(oP({nodeId:t,fieldName:n.name,value:x}))},[r,n.name,t]);return d?a.jsx(tr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(tr,{className:"nowheel nodrag",tooltip:h==null?void 0:h.description,value:h==null?void 0:h.id,placeholder:p.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:p,error:!h,disabled:p.length===0,onChange:m,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Gu,{className:"nodrag",iconMode:!0})]})},jie=l.memo(kie),_ie=de([Ce],({ui:e})=>{const{favoriteSchedulers:t}=e;return{data:Ro(sg,(r,o)=>({value:o,label:r,group:t.includes(o)?"Favorites":void 0})).sort((r,o)=>r.label.localeCompare(o.label))}},_e),Iie=e=>{const{nodeId:t,field:n}=e,r=oe(),{data:o}=H(_ie),s=l.useCallback(i=>{i&&r(N7({nodeId:t,fieldName:n.name,value:i}))},[r,n.name,t]);return a.jsx(tr,{className:"nowheel nodrag",value:n.value,data:o,onChange:s})},Pie=l.memo(Iie),Eie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=oe(),s=l.useCallback(i=>{o($7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return r.ui_component==="textarea"?a.jsx(vi,{className:"nodrag",onChange:s,value:n.value,rows:5,resize:"none"}):a.jsx(Cs,{onChange:s,value:n.value})},Mie=l.memo(Eie),cR=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=L7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({vaeModelId:e,errors:s.error.format()},"Failed to parse VAE model id");return}return s.data},Oie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=oe(),{data:s}=sP(),i=l.useMemo(()=>{if(!s)return[];const p=[{value:"default",label:"Default",group:"Default"}];return Kr(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:gr[h.base_model]})}),p.sort((h,m)=>h.disabled&&!m.disabled?1:-1)},[s]),c=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r]),d=l.useCallback(p=>{if(!p)return;const h=cR(p);h&&o(z7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(tr,{className:"nowheel nodrag",itemComponent:pl,tooltip:c==null?void 0:c.description,value:(c==null?void 0:c.id)??"default",placeholder:"Default",data:i,onChange:d,disabled:i.length===0,error:!c,clearable:!0,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},Rie=l.memo(Oie),Aie=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=F7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({ipAdapterModelId:e,errors:s.error.format()},"Failed to parse IP-Adapter model id");return}return s.data},Die=e=>{const{nodeId:t,field:n}=e,r=n.value,o=oe(),{data:s}=Px(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/ip_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return Kr(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:gr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=Aie(p);h&&o(B7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Ar,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},Tie=l.memo(Die),Nie=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=H7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({t2iAdapterModelId:e,errors:s.error.format()},"Failed to parse T2I-Adapter model id");return}return s.data},$ie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=oe(),{data:s}=Ix(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/t2i_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return Kr(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:gr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=Nie(p);h&&o(W7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Ar,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},Lie=l.memo($ie),zie=e=>{var c;const{nodeId:t,field:n}=e,r=oe(),{data:o,hasBoards:s}=gf(void 0,{selectFromResult:({data:d})=>{const p=[{label:"None",value:"none"}];return d==null||d.forEach(({board_id:h,board_name:m})=>{p.push({label:m,value:h})}),{data:p,hasBoards:p.length>1}}}),i=l.useCallback(d=>{r(V7({nodeId:t,fieldName:n.name,value:d&&d!=="none"?{board_id:d}:void 0}))},[r,n.name,t]);return a.jsx(tr,{className:"nowheel nodrag",value:((c=n.value)==null?void 0:c.board_id)??"none",data:o,onChange:i,disabled:!s})},Fie=l.memo(zie),Bie=({nodeId:e,fieldName:t})=>{const n=J8(e,t),r=v0(e,t,"input");return(r==null?void 0:r.fieldKind)==="output"?a.jsxs(Te,{p:2,children:["Output field in input: ",n==null?void 0:n.type]}):(n==null?void 0:n.type)==="string"&&(r==null?void 0:r.type)==="string"||(n==null?void 0:n.type)==="StringPolymorphic"&&(r==null?void 0:r.type)==="StringPolymorphic"?a.jsx(Mie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="boolean"&&(r==null?void 0:r.type)==="boolean"||(n==null?void 0:n.type)==="BooleanPolymorphic"&&(r==null?void 0:r.type)==="BooleanPolymorphic"?a.jsx(Qae,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="integer"&&(r==null?void 0:r.type)==="integer"||(n==null?void 0:n.type)==="float"&&(r==null?void 0:r.type)==="float"||(n==null?void 0:n.type)==="FloatPolymorphic"&&(r==null?void 0:r.type)==="FloatPolymorphic"||(n==null?void 0:n.type)==="IntegerPolymorphic"&&(r==null?void 0:r.type)==="IntegerPolymorphic"?a.jsx(Cie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="enum"&&(r==null?void 0:r.type)==="enum"?a.jsx(fie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ImageField"&&(r==null?void 0:r.type)==="ImageField"||(n==null?void 0:n.type)==="ImagePolymorphic"&&(r==null?void 0:r.type)==="ImagePolymorphic"?a.jsx(hie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="BoardField"&&(r==null?void 0:r.type)==="BoardField"?a.jsx(Fie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="MainModelField"&&(r==null?void 0:r.type)==="MainModelField"?a.jsx(xie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLRefinerModelField"&&(r==null?void 0:r.type)==="SDXLRefinerModelField"?a.jsx(Sie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="VaeModelField"&&(r==null?void 0:r.type)==="VaeModelField"?a.jsx(Rie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="LoRAModelField"&&(r==null?void 0:r.type)==="LoRAModelField"?a.jsx(vie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ControlNetModelField"&&(r==null?void 0:r.type)==="ControlNetModelField"?a.jsx(uie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="IPAdapterModelField"&&(r==null?void 0:r.type)==="IPAdapterModelField"?a.jsx(Tie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="T2IAdapterModelField"&&(r==null?void 0:r.type)==="T2IAdapterModelField"?a.jsx(Lie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ColorField"&&(r==null?void 0:r.type)==="ColorField"?a.jsx(lie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLMainModelField"&&(r==null?void 0:r.type)==="SDXLMainModelField"?a.jsx(jie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="Scheduler"&&(r==null?void 0:r.type)==="Scheduler"?a.jsx(Pie,{nodeId:e,field:n,fieldTemplate:r}):n&&r?null:a.jsx(Te,{p:1,children:a.jsxs(Se,{sx:{fontSize:"sm",fontWeight:600,color:"error.400",_dark:{color:"error.300"}},children:["Unknown field type: ",n==null?void 0:n.type]})})},uR=l.memo(Bie),Hie=({nodeId:e,fieldName:t})=>{const n=oe(),{isMouseOverNode:r,handleMouseOut:o,handleMouseOver:s}=Q8(e),{t:i}=J(),c=l.useCallback(()=>{n(aP({nodeId:e,fieldName:t}))},[n,t,e]);return a.jsxs(N,{onMouseEnter:s,onMouseLeave:o,layerStyle:"second",sx:{position:"relative",borderRadius:"base",w:"full",p:2},children:[a.jsxs(Bn,{as:N,sx:{flexDir:"column",gap:1,flexShrink:1},children:[a.jsxs(vr,{sx:{display:"flex",alignItems:"center",mb:0},children:[a.jsx(Z8,{nodeId:e,fieldName:t,kind:"input"}),a.jsx(ji,{}),a.jsx(Fn,{label:a.jsx(z2,{nodeId:e,fieldName:t,kind:"input"}),openDelay:ug,placement:"top",hasArrow:!0,children:a.jsx(N,{h:"full",alignItems:"center",children:a.jsx(zr,{as:GM})})}),a.jsx(tt,{"aria-label":i("nodes.removeLinearView"),tooltip:i("nodes.removeLinearView"),variant:"ghost",size:"sm",onClick:c,icon:a.jsx(qo,{})})]}),a.jsx(uR,{nodeId:e,fieldName:t})]}),a.jsx(K8,{isSelected:!1,isHovered:r})]})},Wie=l.memo(Hie),Vie=de(Ce,({nodes:e})=>({fields:e.workflow.exposedFields}),_e),Uie=()=>{const{fields:e}=H(Vie),{t}=J();return a.jsx(Te,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(lc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:e.length?e.map(({nodeId:n,fieldName:r})=>a.jsx(Wie,{nodeId:n,fieldName:r},`${n}.${r}`)):a.jsx(qr,{label:t("nodes.noFieldsLinearview"),icon:null})})})})},Gie=l.memo(Uie),qie=()=>a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(xo,{children:"Linear"}),a.jsx(xo,{children:"Details"}),a.jsx(xo,{children:"JSON"})]}),a.jsxs(zu,{children:[a.jsx(Ho,{children:a.jsx(Gie,{})}),a.jsx(Ho,{children:a.jsx(Hae,{})}),a.jsx(Ho,{children:a.jsx(Vae,{})})]})]})}),Kie=l.memo(qie),Qie={paramNegativeConditioning:{placement:"right"},controlNet:{href:"https://support.invoke.ai/support/solutions/articles/151000105880"},lora:{href:"https://support.invoke.ai/support/solutions/articles/151000159072"},compositingCoherenceMode:{href:"https://support.invoke.ai/support/solutions/articles/151000158838"},infillMethod:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},scaleBeforeProcessing:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},paramIterations:{href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramPositiveConditioning:{href:"https://support.invoke.ai/support/solutions/articles/151000096606-tips-on-crafting-prompts",placement:"right"},paramScheduler:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramModel:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000096601-what-is-a-model-which-should-i-use-"},paramRatio:{gutter:16},controlNetControlMode:{placement:"right"},controlNetResizeMode:{placement:"right"},paramVAE:{placement:"right"},paramVAEPrecision:{placement:"right"}},Xie=1e3,Yie=[{name:"preventOverflow",options:{padding:10}}],dR=Oe(({feature:e,children:t,wrapperProps:n,...r},o)=>{const{t:s}=J(),i=H(g=>g.system.shouldEnableInformationalPopovers),c=l.useMemo(()=>Qie[e],[e]),d=l.useMemo(()=>U7(G7(c,["image","href","buttonLabel"]),r),[c,r]),p=l.useMemo(()=>s(`popovers.${e}.heading`),[e,s]),h=l.useMemo(()=>s(`popovers.${e}.paragraphs`,{returnObjects:!0})??[],[e,s]),m=l.useCallback(()=>{c!=null&&c.href&&window.open(c.href)},[c==null?void 0:c.href]);return i?a.jsxs(Nf,{isLazy:!0,closeOnBlur:!1,trigger:"hover",variant:"informational",openDelay:Xie,modifiers:Yie,placement:"top",...d,children:[a.jsx(Rg,{children:a.jsx(Te,{ref:o,w:"full",...n,children:t})}),a.jsx(Ru,{children:a.jsxs($f,{w:96,children:[a.jsx(y3,{}),a.jsx(Ag,{children:a.jsxs(N,{sx:{gap:2,flexDirection:"column",alignItems:"flex-start"},children:[p&&a.jsxs(a.Fragment,{children:[a.jsx(vo,{size:"sm",children:p}),a.jsx(no,{})]}),(c==null?void 0:c.image)&&a.jsxs(a.Fragment,{children:[a.jsx(Si,{sx:{objectFit:"contain",maxW:"60%",maxH:"60%",backgroundColor:"white"},src:c.image,alt:"Optional Image"}),a.jsx(no,{})]}),h.map(g=>a.jsx(Se,{children:g},g)),(c==null?void 0:c.href)&&a.jsxs(a.Fragment,{children:[a.jsx(no,{}),a.jsx(tl,{pt:1,onClick:m,leftIcon:a.jsx(Ky,{}),alignSelf:"flex-end",variant:"link",children:s("common.learnMore")??p})]})]})})]})})]}):a.jsx(Te,{ref:o,w:"full",...n,children:t})});dR.displayName="IAIInformationalPopover";const wn=l.memo(dR),Jie=de([Ce],e=>{const{initial:t,min:n,sliderMax:r,inputMax:o,fineStep:s,coarseStep:i}=e.config.sd.iterations,{iterations:c}=e.generation,{shouldUseSliders:d}=e.ui,p=e.hotkeys.shift?s:i;return{iterations:c,initial:t,min:n,sliderMax:r,inputMax:o,step:p,shouldUseSliders:d}},_e),Zie=({asSlider:e})=>{const{iterations:t,initial:n,min:r,sliderMax:o,inputMax:s,step:i,shouldUseSliders:c}=H(Jie),d=oe(),{t:p}=J(),h=l.useCallback(g=>{d(Qw(g))},[d]),m=l.useCallback(()=>{d(Qw(n))},[d,n]);return e||c?a.jsx(wn,{feature:"paramIterations",children:a.jsx(Pt,{label:p("parameters.iterations"),step:i,min:r,max:o,onChange:h,handleReset:m,value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s}})}):a.jsx(wn,{feature:"paramIterations",children:a.jsx(ja,{label:p("parameters.iterations"),step:i,min:r,max:s,onChange:h,value:t,numberInputFieldProps:{textAlign:"center"}})})},ia=l.memo(Zie),ele=()=>{const[e,t]=l.useState(!1),[n,r]=l.useState(!1),o=l.useRef(null),s=N2(),i=l.useCallback(()=>{o.current&&o.current.setLayout([50,50])},[]);return a.jsxs(N,{sx:{flexDir:"column",gap:2,height:"100%",width:"100%"},children:[a.jsx(O8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,pb:3,gap:2,flexDir:"column"},children:a.jsx(ia,{asSlider:!0})}),a.jsxs(g0,{ref:o,id:"workflow-panel-group",autoSaveId:"workflow-panel-group",direction:"vertical",style:{height:"100%",width:"100%"},storage:s,children:[a.jsx(Zi,{id:"workflow",collapsible:!0,onCollapse:t,minSize:25,children:a.jsx(Kie,{})}),a.jsx(Zm,{direction:"vertical",onDoubleClick:i,collapsedDirection:e?"top":n?"bottom":void 0}),a.jsx(Zi,{id:"inspector",collapsible:!0,onCollapse:r,minSize:25,children:a.jsx($ae,{})})]})]})},tle=l.memo(ele),k_=(e,t)=>{const n=l.useRef(null),[r,o]=l.useState(()=>{var p;return!!((p=n.current)!=null&&p.getCollapsed())}),s=l.useCallback(()=>{var p;(p=n.current)!=null&&p.getCollapsed()?rs.flushSync(()=>{var h;(h=n.current)==null||h.expand()}):rs.flushSync(()=>{var h;(h=n.current)==null||h.collapse()})},[]),i=l.useCallback(()=>{rs.flushSync(()=>{var p;(p=n.current)==null||p.expand()})},[]),c=l.useCallback(()=>{rs.flushSync(()=>{var p;(p=n.current)==null||p.collapse()})},[]),d=l.useCallback(()=>{rs.flushSync(()=>{var p;(p=n.current)==null||p.resize(e,t)})},[e,t]);return{ref:n,minSize:e,isCollapsed:r,setIsCollapsed:o,reset:d,toggle:s,expand:i,collapse:c}},nle=({isGalleryCollapsed:e,galleryPanelRef:t})=>{const{t:n}=J(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Ru,{children:a.jsx(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineEnd:"1.63rem",children:a.jsx(tt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":n("accessibility.showGalleryPanel"),onClick:r,icon:a.jsx(qoe,{}),sx:{p:0,px:3,h:48,borderEndRadius:0}})})}):null},rle=l.memo(nle),bh={borderStartRadius:0,flexGrow:1},ole=({isSidePanelCollapsed:e,sidePanelRef:t})=>{const{t:n}=J(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Ru,{children:a.jsxs(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineStart:"5.13rem",direction:"column",gap:2,h:48,children:[a.jsxs(zn,{isAttached:!0,orientation:"vertical",flexGrow:3,children:[a.jsx(tt,{tooltip:n("parameters.showOptionsPanel"),"aria-label":n("parameters.showOptionsPanel"),onClick:r,sx:bh,icon:a.jsx(JM,{})}),a.jsx(P8,{asIconButton:!0,sx:bh}),a.jsx(S8,{asIconButton:!0,sx:bh})]}),a.jsx(O2,{asIconButton:!0,sx:bh})]})}):null},sle=l.memo(ole),ale=e=>{const{label:t,activeLabel:n,children:r,defaultIsOpen:o=!1}=e,{isOpen:s,onToggle:i}=ls({defaultIsOpen:o}),{colorMode:c}=wi();return a.jsxs(Te,{children:[a.jsxs(N,{onClick:i,sx:{alignItems:"center",p:2,px:4,gap:2,borderTopRadius:"base",borderBottomRadius:s?0:"base",bg:Ke("base.250","base.750")(c),color:Ke("base.900","base.100")(c),_hover:{bg:Ke("base.300","base.700")(c)},fontSize:"sm",fontWeight:600,cursor:"pointer",transitionProperty:"common",transitionDuration:"normal",userSelect:"none"},"data-testid":`${t} collapsible`,children:[t,a.jsx(yo,{children:n&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(Se,{sx:{color:"accent.500",_dark:{color:"accent.300"}},children:n})},"statusText")}),a.jsx(ji,{}),a.jsx(s0,{sx:{w:"1rem",h:"1rem",transform:s?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]}),a.jsx(Sf,{in:s,animateOpacity:!0,style:{overflow:"unset"},children:a.jsx(Te,{sx:{p:4,pb:4,borderBottomRadius:"base",bg:"base.150",_dark:{bg:"base.800"}},children:r})})]})},Ao=l.memo(ale),ile=de(Ce,e=>{const{maxPrompts:t,combinatorial:n}=e.dynamicPrompts,{min:r,sliderMax:o,inputMax:s}=e.config.sd.dynamicPrompts.maxPrompts;return{maxPrompts:t,min:r,sliderMax:o,inputMax:s,isDisabled:!n}},_e),lle=()=>{const{maxPrompts:e,min:t,sliderMax:n,inputMax:r,isDisabled:o}=H(ile),s=oe(),{t:i}=J(),c=l.useCallback(p=>{s(q7(p))},[s]),d=l.useCallback(()=>{s(K7())},[s]);return a.jsx(wn,{feature:"dynamicPromptsMaxPrompts",children:a.jsx(Pt,{label:i("dynamicPrompts.maxPrompts"),isDisabled:o,min:t,max:n,value:e,onChange:c,sliderNumberInputProps:{max:r},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})})},cle=l.memo(lle),ule=de(Ce,e=>{const{isLoading:t,isError:n,prompts:r,parsingError:o}=e.dynamicPrompts;return{prompts:r,parsingError:o,isError:n,isLoading:t}},_e),dle={"&::marker":{color:"base.500",_dark:{color:"base.500"}}},fle=()=>{const{prompts:e,parsingError:t,isLoading:n,isError:r}=H(ule);return r?a.jsx(wn,{feature:"dynamicPrompts",children:a.jsx(N,{w:"full",h:"full",layerStyle:"second",alignItems:"center",justifyContent:"center",p:8,children:a.jsx(qr,{icon:Boe,label:"Problem generating prompts"})})}):a.jsx(wn,{feature:"dynamicPrompts",children:a.jsxs(Bn,{isInvalid:!!t,children:[a.jsxs(vr,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:["Prompts Preview (",e.length,")",t&&` - ${t}`]}),a.jsxs(N,{h:64,pos:"relative",layerStyle:"third",borderRadius:"base",p:2,children:[a.jsx(lc,{children:a.jsx(H5,{stylePosition:"inside",ms:0,children:e.map((o,s)=>a.jsx(ws,{fontSize:"sm",sx:dle,children:a.jsx(Se,{as:"span",children:o})},`${o}.${s}`))})}),n&&a.jsx(N,{pos:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,layerStyle:"second",opacity:.7,alignItems:"center",justifyContent:"center",children:a.jsx(bi,{})})]})]})})},ple=l.memo(fle),fR=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx(Te,{ref:r,...n,children:a.jsxs(Te,{children:[a.jsx(Se,{fontWeight:600,children:e}),t&&a.jsx(Se,{size:"xs",variant:"subtext",children:t})]})}));fR.displayName="IAIMantineSelectItemWithDescription";const hle=l.memo(fR),mle=()=>{const e=oe(),{t}=J(),n=H(s=>s.dynamicPrompts.seedBehaviour),r=l.useMemo(()=>[{value:"PER_ITERATION",label:t("dynamicPrompts.seedBehaviour.perIterationLabel"),description:t("dynamicPrompts.seedBehaviour.perIterationDesc")},{value:"PER_PROMPT",label:t("dynamicPrompts.seedBehaviour.perPromptLabel"),description:t("dynamicPrompts.seedBehaviour.perPromptDesc")}],[t]),o=l.useCallback(s=>{s&&e(Q7(s))},[e]);return a.jsx(wn,{feature:"dynamicPromptsSeedBehaviour",children:a.jsx(Ar,{label:t("dynamicPrompts.seedBehaviour.label"),value:n,data:r,itemComponent:hle,onChange:o})})},gle=l.memo(mle),vle=()=>{const{t:e}=J(),t=l.useMemo(()=>de(Ce,({dynamicPrompts:o})=>{const s=o.prompts.length;if(s>1)return e("dynamicPrompts.promptsWithCount_other",{count:s})}),[e]),n=H(t);return jn("dynamicPrompting").isFeatureEnabled?a.jsx(Ao,{label:e("dynamicPrompts.dynamicPrompts"),activeLabel:n,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(ple,{}),a.jsx(gle,{}),a.jsx(cle,{})]})}):null},qu=l.memo(vle),ble=e=>{const t=oe(),{lora:n}=e,r=l.useCallback(i=>{t(X7({id:n.id,weight:i}))},[t,n.id]),o=l.useCallback(()=>{t(Y7(n.id))},[t,n.id]),s=l.useCallback(()=>{t(J7(n.id))},[t,n.id]);return a.jsx(wn,{feature:"lora",children:a.jsxs(N,{sx:{gap:2.5,alignItems:"flex-end"},children:[a.jsx(Pt,{label:n.model_name,value:n.weight,onChange:r,min:-1,max:2,step:.01,withInput:!0,withReset:!0,handleReset:o,withSliderMarks:!0,sliderMarks:[-1,0,1,2],sliderNumberInputProps:{min:-50,max:50}}),a.jsx(tt,{size:"sm",onClick:s,tooltip:"Remove LoRA","aria-label":"Remove LoRA",icon:a.jsx(qo,{}),colorScheme:"error"})]})})},xle=l.memo(ble),yle=de(Ce,({lora:e})=>({lorasArray:Ro(e.loras)}),_e),Cle=()=>{const{lorasArray:e}=H(yle);return a.jsx(a.Fragment,{children:e.map((t,n)=>a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[n>0&&a.jsx(no,{pt:1}),a.jsx(xle,{lora:t})]},t.model_name))})},wle=l.memo(Cle),Sle=de(Ce,({lora:e})=>({loras:e.loras}),_e),kle=()=>{const e=oe(),{loras:t}=H(Sle),{data:n}=vf(),{t:r}=J(),o=H(d=>d.generation.model),s=l.useMemo(()=>{if(!n)return[];const d=[];return Kr(n.entities,(p,h)=>{if(!p||h in t)return;const m=(o==null?void 0:o.base_model)!==p.base_model;d.push({value:h,label:p.model_name,disabled:m,group:gr[p.base_model],tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.label&&!h.label?1:-1),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[t,n,o==null?void 0:o.base_model]),i=l.useCallback(d=>{if(!d)return;const p=n==null?void 0:n.entities[d];p&&e(Z7(p))},[e,n==null?void 0:n.entities]),c=l.useCallback((d,p)=>{var h;return((h=p.label)==null?void 0:h.toLowerCase().includes(d.toLowerCase().trim()))||p.value.toLowerCase().includes(d.toLowerCase().trim())},[]);return(n==null?void 0:n.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(Se,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:r("models.noLoRAsInstalled")})}):a.jsx(tr,{placeholder:s.length===0?"All LoRAs added":"Add LoRA",value:null,data:s,nothingFound:"No matching LoRAs",itemComponent:pl,disabled:s.length===0,filter:c,onChange:i,"data-testid":"add-lora"})},jle=l.memo(kle),_le=de(Ce,e=>{const t=iP(e.lora.loras);return{activeLabel:t>0?`${t} Active`:void 0}},_e),Ile=()=>{const{t:e}=J(),{activeLabel:t}=H(_le);return jn("lora").isFeatureEnabled?a.jsx(Ao,{label:e("modelManager.loraModels"),activeLabel:t,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(jle,{}),a.jsx(wle,{})]})}):null},Ku=l.memo(Ile),Ple=()=>{const e=oe(),t=H(o=>o.generation.shouldUseCpuNoise),{t:n}=J(),r=l.useCallback(o=>{e(eT(o.target.checked))},[e]);return a.jsx(wn,{feature:"noiseUseCPU",children:a.jsx(jr,{label:n("parameters.useCpuNoise"),isChecked:t,onChange:r})})},la=e=>e.generation,Ele=de(la,e=>{const{seamlessXAxis:t}=e;return{seamlessXAxis:t}},_e),Mle=()=>{const{t:e}=J(),{seamlessXAxis:t}=H(Ele),n=oe(),r=l.useCallback(o=>{n(tT(o.target.checked))},[n]);return a.jsx(jr,{label:e("parameters.seamlessXAxis"),"aria-label":e("parameters.seamlessXAxis"),isChecked:t,onChange:r})},Ole=l.memo(Mle),Rle=de(la,e=>{const{seamlessYAxis:t}=e;return{seamlessYAxis:t}},_e),Ale=()=>{const{t:e}=J(),{seamlessYAxis:t}=H(Rle),n=oe(),r=l.useCallback(o=>{n(nT(o.target.checked))},[n]);return a.jsx(jr,{label:e("parameters.seamlessYAxis"),"aria-label":e("parameters.seamlessYAxis"),isChecked:t,onChange:r})},Dle=l.memo(Ale),Tle=()=>{const{t:e}=J();return jn("seamless").isFeatureEnabled?a.jsxs(Bn,{children:[a.jsx(vr,{children:e("parameters.seamlessTiling")})," ",a.jsxs(N,{sx:{gap:5},children:[a.jsx(Te,{flexGrow:1,children:a.jsx(Ole,{})}),a.jsx(Te,{flexGrow:1,children:a.jsx(Dle,{})})]})]}):null},Nle=l.memo(Tle);function $le(){const e=H(d=>d.generation.clipSkip),{model:t}=H(d=>d.generation),n=oe(),{t:r}=J(),o=l.useCallback(d=>{n(Xw(d))},[n]),s=l.useCallback(()=>{n(Xw(0))},[n]),i=l.useMemo(()=>t?$p[t.base_model].maxClip:$p["sd-1"].maxClip,[t]),c=l.useMemo(()=>t?$p[t.base_model].markers:$p["sd-1"].markers,[t]);return(t==null?void 0:t.base_model)==="sdxl"?null:a.jsx(wn,{feature:"clipSkip",placement:"top",children:a.jsx(Pt,{label:r("parameters.clipSkip"),"aria-label":r("parameters.clipSkip"),min:0,max:i,step:1,value:e,onChange:o,withSliderMarks:!0,sliderMarks:c,withInput:!0,withReset:!0,handleReset:s})})}const Lle=de(Ce,e=>{const{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}=e.generation;return{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}},_e);function Qu(){const{clipSkip:e,model:t,seamlessXAxis:n,seamlessYAxis:r,shouldUseCpuNoise:o}=H(Lle),{t:s}=J(),i=l.useMemo(()=>{const c=[];return o||c.push(s("parameters.gpuNoise")),e>0&&t&&t.base_model!=="sdxl"&&c.push(s("parameters.clipSkipWithLayerCount",{layerCount:e})),n&&r?c.push(s("parameters.seamlessX&Y")):n?c.push(s("parameters.seamlessX")):r&&c.push(s("parameters.seamlessY")),c.join(", ")},[e,t,n,r,o,s]);return a.jsx(Ao,{label:s("common.advanced"),activeLabel:i,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(Nle,{}),a.jsx(no,{}),t&&(t==null?void 0:t.base_model)!=="sdxl"&&a.jsxs(a.Fragment,{children:[a.jsx($le,{}),a.jsx(no,{pt:2})]}),a.jsx(Ple,{})]})})}const Pi=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{var o;return((o=Rs(r,e))==null?void 0:o.isEnabled)??!1},_e),[e]);return H(t)},zle=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{var o;return(o=Rs(r,e))==null?void 0:o.model},_e),[e]);return H(t)},pR=e=>{const{data:t}=_x(),n=l.useMemo(()=>t?LI.getSelectors().selectAll(t):[],[t]),{data:r}=Ix(),o=l.useMemo(()=>r?zI.getSelectors().selectAll(r):[],[r]),{data:s}=Px(),i=l.useMemo(()=>s?FI.getSelectors().selectAll(s):[],[s]);return e==="controlnet"?n:e==="t2i_adapter"?o:e==="ip_adapter"?i:[]},hR=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{var o;return(o=Rs(r,e))==null?void 0:o.type},_e),[e]);return H(t)},Fle=de(Ce,({generation:e})=>{const{model:t}=e;return{mainModel:t}},_e),Ble=({id:e})=>{const t=Pi(e),n=hR(e),r=zle(e),o=oe(),{mainModel:s}=H(Fle),{t:i}=J(),c=pR(n),d=l.useMemo(()=>{if(!c)return[];const m=[];return c.forEach(g=>{if(!g)return;const b=(g==null?void 0:g.base_model)!==(s==null?void 0:s.base_model);m.push({value:g.id,label:g.model_name,group:gr[g.base_model],disabled:b,tooltip:b?`${i("controlnet.incompatibleBaseModel")} ${g.base_model}`:void 0})}),m.sort((g,b)=>g.disabled?1:b.disabled?-1:g.label.localeCompare(b.label)),m},[s==null?void 0:s.base_model,c,i]),p=l.useMemo(()=>c.find(m=>(m==null?void 0:m.id)===`${r==null?void 0:r.base_model}/${n}/${r==null?void 0:r.model_name}`),[n,r==null?void 0:r.base_model,r==null?void 0:r.model_name,c]),h=l.useCallback(m=>{if(!m)return;const g=sR(m);g&&o(rT({id:e,model:g}))},[o,e]);return a.jsx(tr,{itemComponent:pl,data:d,error:!p||(s==null?void 0:s.base_model)!==p.base_model,placeholder:i("controlnet.selectModel"),value:(p==null?void 0:p.id)??null,onChange:h,disabled:!t,tooltip:p==null?void 0:p.description})},Hle=l.memo(Ble),Wle=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{var o;return(o=Rs(r,e))==null?void 0:o.weight},_e),[e]);return H(t)},Vle=({id:e})=>{const t=Pi(e),n=Wle(e),r=oe(),{t:o}=J(),s=l.useCallback(i=>{r(oT({id:e,weight:i}))},[r,e]);return oi(n)?null:a.jsx(wn,{feature:"controlNetWeight",children:a.jsx(Pt,{isDisabled:!t,label:o("controlnet.weight"),value:n,onChange:s,min:0,max:2,step:.01,withSliderMarks:!0,sliderMarks:[0,1,2]})})},Ule=l.memo(Vle),Gle=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{var o;return(o=Rs(r,e))==null?void 0:o.controlImage},_e),[e]);return H(t)},qle=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);return o&&Au(o)?o.processedControlImage:void 0},_e),[e]);return H(t)},Kle=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);return o&&Au(o)?o.processorType:void 0},_e),[e]);return H(t)},Qle=de(Ce,({controlAdapters:e,gallery:t})=>{const{pendingControlImages:n}=e,{autoAddBoardId:r}=t;return{pendingControlImages:n,autoAddBoardId:r}},_e),Xle=({isSmall:e,id:t})=>{const n=Gle(t),r=qle(t),o=Kle(t),s=oe(),{t:i}=J(),{pendingControlImages:c,autoAddBoardId:d}=H(Qle),p=H(ro),[h,m]=l.useState(!1),{currentData:g}=Ps(n??Os.skipToken),{currentData:b}=Ps(r??Os.skipToken),[y]=sT(),[x]=aT(),[C]=iT(),S=l.useCallback(()=>{s(lT({id:t,controlImage:null}))},[t,s]),j=l.useCallback(async()=>{b&&(await y({imageDTO:b,is_intermediate:!1}).unwrap(),d!=="none"?x({imageDTO:b,board_id:d}):C({imageDTO:b}))},[b,y,d,x,C]),_=l.useCallback(()=>{g&&(p==="unifiedCanvas"?s(Xs({width:g.width,height:g.height})):(s(Hl(g.width)),s(Wl(g.height))))},[g,p,s]),I=l.useCallback(()=>{m(!0)},[]),P=l.useCallback(()=>{m(!1)},[]),M=l.useMemo(()=>{if(g)return{id:t,payloadType:"IMAGE_DTO",payload:{imageDTO:g}}},[g,t]),R=l.useMemo(()=>({id:t,actionType:"SET_CONTROL_ADAPTER_IMAGE",context:{id:t}}),[t]),A=l.useMemo(()=>({type:"SET_CONTROL_ADAPTER_IMAGE",id:t}),[t]),D=g&&b&&!h&&!c.includes(t)&&o!=="none";return a.jsxs(N,{onMouseEnter:I,onMouseLeave:P,sx:{position:"relative",w:"full",h:e?28:366,alignItems:"center",justifyContent:"center"},children:[a.jsx(il,{draggableData:M,droppableData:R,imageDTO:g,isDropDisabled:D,postUploadAction:A}),a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",opacity:D?1:0,transitionProperty:"common",transitionDuration:"normal",pointerEvents:"none"},children:a.jsx(il,{draggableData:M,droppableData:R,imageDTO:b,isUploadDisabled:!0})}),a.jsxs(a.Fragment,{children:[a.jsx(fu,{onClick:S,icon:g?a.jsx(Yg,{}):void 0,tooltip:i("controlnet.resetControlImage")}),a.jsx(fu,{onClick:j,icon:g?a.jsx(Qg,{size:16}):void 0,tooltip:i("controlnet.saveControlImage"),styleOverrides:{marginTop:6}}),a.jsx(fu,{onClick:_,icon:g?a.jsx(wee,{size:16}):void 0,tooltip:i("controlnet.setControlImageDimensions"),styleOverrides:{marginTop:12}})]}),c.includes(t)&&a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",alignItems:"center",justifyContent:"center",opacity:.8,borderRadius:"base",bg:"base.400",_dark:{bg:"base.900"}},children:a.jsx(bi,{size:"xl",sx:{color:"base.100",_dark:{color:"base.400"}}})})]})},j_=l.memo(Xle),Ds=()=>{const e=oe();return l.useCallback((n,r)=>{e(cT({id:n,params:r}))},[e])};function Ts(e){return a.jsx(N,{sx:{flexDirection:"column",gap:2,pb:2},children:e.children})}const __=Oo.canny_image_processor.default,Yle=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{low_threshold:o,high_threshold:s}=n,i=Ds(),{t:c}=J(),d=l.useCallback(g=>{i(t,{low_threshold:g})},[t,i]),p=l.useCallback(()=>{i(t,{low_threshold:__.low_threshold})},[t,i]),h=l.useCallback(g=>{i(t,{high_threshold:g})},[t,i]),m=l.useCallback(()=>{i(t,{high_threshold:__.high_threshold})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{isDisabled:!r,label:c("controlnet.lowThreshold"),value:o,onChange:d,handleReset:p,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0}),a.jsx(Pt,{isDisabled:!r,label:c("controlnet.highThreshold"),value:s,onChange:h,handleReset:m,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0})]})},Jle=l.memo(Yle),Zle=Oo.color_map_image_processor.default,ece=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{color_map_tile_size:o}=n,s=Ds(),{t:i}=J(),c=l.useCallback(p=>{s(t,{color_map_tile_size:p})},[t,s]),d=l.useCallback(()=>{s(t,{color_map_tile_size:Zle.color_map_tile_size})},[t,s]);return a.jsx(Ts,{children:a.jsx(Pt,{isDisabled:!r,label:i("controlnet.colorMapTileSize"),value:o,onChange:c,handleReset:d,withReset:!0,min:1,max:256,step:1,withInput:!0,withSliderMarks:!0,sliderNumberInputProps:{max:4096}})})},tce=l.memo(ece),wd=Oo.content_shuffle_image_processor.default,nce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,w:i,h:c,f:d}=n,p=Ds(),{t:h}=J(),m=l.useCallback(P=>{p(t,{detect_resolution:P})},[t,p]),g=l.useCallback(()=>{p(t,{detect_resolution:wd.detect_resolution})},[t,p]),b=l.useCallback(P=>{p(t,{image_resolution:P})},[t,p]),y=l.useCallback(()=>{p(t,{image_resolution:wd.image_resolution})},[t,p]),x=l.useCallback(P=>{p(t,{w:P})},[t,p]),C=l.useCallback(()=>{p(t,{w:wd.w})},[t,p]),S=l.useCallback(P=>{p(t,{h:P})},[t,p]),j=l.useCallback(()=>{p(t,{h:wd.h})},[t,p]),_=l.useCallback(P=>{p(t,{f:P})},[t,p]),I=l.useCallback(()=>{p(t,{f:wd.f})},[t,p]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:h("controlnet.detectResolution"),value:s,onChange:m,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:h("controlnet.imageResolution"),value:o,onChange:b,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:h("controlnet.w"),value:i,onChange:x,handleReset:C,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:h("controlnet.h"),value:c,onChange:S,handleReset:j,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:h("controlnet.f"),value:d,onChange:_,handleReset:I,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},rce=l.memo(nce),I_=Oo.hed_image_processor.default,oce=e=>{const{controlNetId:t,processorNode:{detect_resolution:n,image_resolution:r,scribble:o},isEnabled:s}=e,i=Ds(),{t:c}=J(),d=l.useCallback(b=>{i(t,{detect_resolution:b})},[t,i]),p=l.useCallback(b=>{i(t,{image_resolution:b})},[t,i]),h=l.useCallback(b=>{i(t,{scribble:b.target.checked})},[t,i]),m=l.useCallback(()=>{i(t,{detect_resolution:I_.detect_resolution})},[t,i]),g=l.useCallback(()=>{i(t,{image_resolution:I_.image_resolution})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:c("controlnet.detectResolution"),value:n,onChange:d,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(Pt,{label:c("controlnet.imageResolution"),value:r,onChange:p,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(jr,{label:c("controlnet.scribble"),isChecked:o,onChange:h,isDisabled:!s})]})},sce=l.memo(oce),P_=Oo.lineart_anime_image_processor.default,ace=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Ds(),{t:c}=J(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:P_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:P_.image_resolution})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},ice=l.memo(ace),E_=Oo.lineart_image_processor.default,lce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,coarse:i}=n,c=Ds(),{t:d}=J(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:E_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:E_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{coarse:y.target.checked})},[t,c]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(jr,{label:d("controlnet.coarse"),isChecked:i,onChange:b,isDisabled:!r})]})},cce=l.memo(lce),M_=Oo.mediapipe_face_processor.default,uce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{max_faces:o,min_confidence:s}=n,i=Ds(),{t:c}=J(),d=l.useCallback(g=>{i(t,{max_faces:g})},[t,i]),p=l.useCallback(g=>{i(t,{min_confidence:g})},[t,i]),h=l.useCallback(()=>{i(t,{max_faces:M_.max_faces})},[t,i]),m=l.useCallback(()=>{i(t,{min_confidence:M_.min_confidence})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:c("controlnet.maxFaces"),value:o,onChange:d,handleReset:h,withReset:!0,min:1,max:20,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:c("controlnet.minConfidence"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},dce=l.memo(uce),O_=Oo.midas_depth_image_processor.default,fce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{a_mult:o,bg_th:s}=n,i=Ds(),{t:c}=J(),d=l.useCallback(g=>{i(t,{a_mult:g})},[t,i]),p=l.useCallback(g=>{i(t,{bg_th:g})},[t,i]),h=l.useCallback(()=>{i(t,{a_mult:O_.a_mult})},[t,i]),m=l.useCallback(()=>{i(t,{bg_th:O_.bg_th})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:c("controlnet.amult"),value:o,onChange:d,handleReset:h,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:c("controlnet.bgth"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},pce=l.memo(fce),xh=Oo.mlsd_image_processor.default,hce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,thr_d:i,thr_v:c}=n,d=Ds(),{t:p}=J(),h=l.useCallback(j=>{d(t,{detect_resolution:j})},[t,d]),m=l.useCallback(j=>{d(t,{image_resolution:j})},[t,d]),g=l.useCallback(j=>{d(t,{thr_d:j})},[t,d]),b=l.useCallback(j=>{d(t,{thr_v:j})},[t,d]),y=l.useCallback(()=>{d(t,{detect_resolution:xh.detect_resolution})},[t,d]),x=l.useCallback(()=>{d(t,{image_resolution:xh.image_resolution})},[t,d]),C=l.useCallback(()=>{d(t,{thr_d:xh.thr_d})},[t,d]),S=l.useCallback(()=>{d(t,{thr_v:xh.thr_v})},[t,d]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:x,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:p("controlnet.w"),value:i,onChange:g,handleReset:C,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:p("controlnet.h"),value:c,onChange:b,handleReset:S,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},mce=l.memo(hce),R_=Oo.normalbae_image_processor.default,gce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Ds(),{t:c}=J(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:R_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:R_.image_resolution})},[t,i]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},vce=l.memo(gce),A_=Oo.openpose_image_processor.default,bce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,hand_and_face:i}=n,c=Ds(),{t:d}=J(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:A_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:A_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{hand_and_face:y.target.checked})},[t,c]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(jr,{label:d("controlnet.handAndFace"),isChecked:i,onChange:b,isDisabled:!r})]})},xce=l.memo(bce),D_=Oo.pidi_image_processor.default,yce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,scribble:i,safe:c}=n,d=Ds(),{t:p}=J(),h=l.useCallback(C=>{d(t,{detect_resolution:C})},[t,d]),m=l.useCallback(C=>{d(t,{image_resolution:C})},[t,d]),g=l.useCallback(()=>{d(t,{detect_resolution:D_.detect_resolution})},[t,d]),b=l.useCallback(()=>{d(t,{image_resolution:D_.image_resolution})},[t,d]),y=l.useCallback(C=>{d(t,{scribble:C.target.checked})},[t,d]),x=l.useCallback(C=>{d(t,{safe:C.target.checked})},[t,d]);return a.jsxs(Ts,{children:[a.jsx(Pt,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(Pt,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:b,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(jr,{label:p("controlnet.scribble"),isChecked:i,onChange:y}),a.jsx(jr,{label:p("controlnet.safe"),isChecked:c,onChange:x,isDisabled:!r})]})},Cce=l.memo(yce),wce=e=>null,Sce=l.memo(wce),mR=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);return o&&Au(o)?o.processorNode:void 0},_e),[e]);return H(t)},kce=({id:e})=>{const t=Pi(e),n=mR(e);return n?n.type==="canny_image_processor"?a.jsx(Jle,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="color_map_image_processor"?a.jsx(tce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="hed_image_processor"?a.jsx(sce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_image_processor"?a.jsx(cce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="content_shuffle_image_processor"?a.jsx(rce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_anime_image_processor"?a.jsx(ice,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mediapipe_face_processor"?a.jsx(dce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="midas_depth_image_processor"?a.jsx(pce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mlsd_image_processor"?a.jsx(mce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="normalbae_image_processor"?a.jsx(vce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="openpose_image_processor"?a.jsx(xce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="pidi_image_processor"?a.jsx(Cce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="zoe_depth_image_processor"?a.jsx(Sce,{controlNetId:e,processorNode:n,isEnabled:t}):null:null},jce=l.memo(kce),_ce=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);if(o&&Au(o))return o.shouldAutoConfig},_e),[e]);return H(t)},Ice=({id:e})=>{const t=Pi(e),n=_ce(e),r=oe(),{t:o}=J(),s=l.useCallback(()=>{r(uT({id:e}))},[e,r]);return oi(n)?null:a.jsx(jr,{label:o("controlnet.autoConfigure"),"aria-label":o("controlnet.autoConfigure"),isChecked:n,onChange:s,isDisabled:!t})},Pce=l.memo(Ice),Ece=e=>{const{id:t}=e,n=oe(),{t:r}=J(),o=l.useCallback(()=>{n(dT({id:t}))},[t,n]),s=l.useCallback(()=>{n(fT({id:t}))},[t,n]);return a.jsxs(N,{sx:{gap:2},children:[a.jsx(tt,{size:"sm",icon:a.jsx(Ql,{}),tooltip:r("controlnet.importImageFromCanvas"),"aria-label":r("controlnet.importImageFromCanvas"),onClick:o}),a.jsx(tt,{size:"sm",icon:a.jsx(QM,{}),tooltip:r("controlnet.importMaskFromCanvas"),"aria-label":r("controlnet.importMaskFromCanvas"),onClick:s})]})},Mce=l.memo(Ece),Oce=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);return o?{beginStepPct:o.beginStepPct,endStepPct:o.endStepPct}:void 0},_e),[e]);return H(t)},T_=e=>`${Math.round(e*100)}%`,Rce=({id:e})=>{const t=Pi(e),n=Oce(e),r=oe(),{t:o}=J(),s=l.useCallback(i=>{r(pT({id:e,beginStepPct:i[0]})),r(hT({id:e,endStepPct:i[1]}))},[r,e]);return n?a.jsx(wn,{feature:"controlNetBeginEnd",children:a.jsxs(Bn,{isDisabled:!t,children:[a.jsx(vr,{children:o("controlnet.beginEndStepPercent")}),a.jsx(xg,{w:"100%",gap:2,alignItems:"center",children:a.jsxs(N3,{"aria-label":["Begin Step %","End Step %!"],value:[n.beginStepPct,n.endStepPct],onChange:s,min:0,max:1,step:.01,minStepsBetweenThumbs:5,isDisabled:!t,children:[a.jsx($3,{children:a.jsx(L3,{})}),a.jsx(Fn,{label:T_(n.beginStepPct),placement:"top",hasArrow:!0,children:a.jsx(wb,{index:0})}),a.jsx(Fn,{label:T_(n.endStepPct),placement:"top",hasArrow:!0,children:a.jsx(wb,{index:1})}),a.jsx(Eh,{value:0,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},children:"0%"}),a.jsx(Eh,{value:.5,sx:{insetInlineStart:"50% !important",transform:"translateX(-50%)"},children:"50%"}),a.jsx(Eh,{value:1,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},children:"100%"})]})})]})}):null},Ace=l.memo(Rce),Dce=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);if(o&&mT(o))return o.controlMode},_e),[e]);return H(t)};function Tce({id:e}){const t=Pi(e),n=Dce(e),r=oe(),{t:o}=J(),s=[{label:o("controlnet.balanced"),value:"balanced"},{label:o("controlnet.prompt"),value:"more_prompt"},{label:o("controlnet.control"),value:"more_control"},{label:o("controlnet.megaControl"),value:"unbalanced"}],i=l.useCallback(c=>{r(gT({id:e,controlMode:c}))},[e,r]);return n?a.jsx(wn,{feature:"controlNetControlMode",children:a.jsx(Ar,{disabled:!t,label:o("controlnet.controlMode"),data:s,value:n,onChange:i})}):null}const Nce=e=>e.config,$ce=de(Nce,e=>Ro(Oo,n=>({value:n.type,label:n.label})).sort((n,r)=>n.value==="none"?-1:r.value==="none"?1:n.label.localeCompare(r.label)).filter(n=>!e.sd.disabledControlNetProcessors.includes(n.value)),_e),Lce=({id:e})=>{const t=Pi(e),n=mR(e),r=oe(),o=H($ce),{t:s}=J(),i=l.useCallback(c=>{r(vT({id:e,processorType:c}))},[e,r]);return n?a.jsx(tr,{label:s("controlnet.processor"),value:n.type??"canny_image_processor",data:o,onChange:i,disabled:!t}):null},zce=l.memo(Lce),Fce=e=>{const t=l.useMemo(()=>de(Ce,({controlAdapters:r})=>{const o=Rs(r,e);if(o&&Au(o))return o.resizeMode},_e),[e]);return H(t)};function Bce({id:e}){const t=Pi(e),n=Fce(e),r=oe(),{t:o}=J(),s=[{label:o("controlnet.resize"),value:"just_resize"},{label:o("controlnet.crop"),value:"crop_resize"},{label:o("controlnet.fill"),value:"fill_resize"}],i=l.useCallback(c=>{r(bT({id:e,resizeMode:c}))},[e,r]);return n?a.jsx(wn,{feature:"controlNetResizeMode",children:a.jsx(Ar,{disabled:!t,label:o("controlnet.resizeMode"),data:s,value:n,onChange:i})}):null}const Hce=e=>{const{id:t,number:n}=e,r=hR(t),o=oe(),{t:s}=J(),i=H(ro),c=Pi(t),[d,p]=Ree(!1),h=l.useCallback(()=>{o(xT({id:t}))},[t,o]),m=l.useCallback(()=>{o(yT(t))},[t,o]),g=l.useCallback(b=>{o(CT({id:t,isEnabled:b.target.checked}))},[t,o]);return r?a.jsxs(N,{sx:{flexDir:"column",gap:3,p:2,borderRadius:"base",position:"relative",bg:"base.250",_dark:{bg:"base.750"}},children:[a.jsx(N,{sx:{gap:2,alignItems:"center",justifyContent:"space-between"},children:a.jsx(jr,{label:s(`controlnet.${r}`,{number:n}),"aria-label":s("controlnet.toggleControlNet"),isChecked:c,onChange:g,formControlProps:{w:"full"},formLabelProps:{fontWeight:600}})}),a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Te,{sx:{w:"full",minW:0,transitionProperty:"common",transitionDuration:"0.1s"},children:a.jsx(Hle,{id:t})}),i==="unifiedCanvas"&&a.jsx(Mce,{id:t}),a.jsx(tt,{size:"sm",tooltip:s("controlnet.duplicate"),"aria-label":s("controlnet.duplicate"),onClick:m,icon:a.jsx(Hu,{})}),a.jsx(tt,{size:"sm",tooltip:s("controlnet.delete"),"aria-label":s("controlnet.delete"),colorScheme:"error",onClick:h,icon:a.jsx(qo,{})}),a.jsx(tt,{size:"sm",tooltip:s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),"aria-label":s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),onClick:p,variant:"ghost",sx:{_hover:{bg:"none"}},icon:a.jsx(s0,{sx:{boxSize:4,color:"base.700",transform:d?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal",_dark:{color:"base.300"}}})})]}),a.jsxs(N,{sx:{w:"full",flexDirection:"column",gap:3},children:[a.jsxs(N,{sx:{gap:4,w:"full",alignItems:"center"},children:[a.jsxs(N,{sx:{flexDir:"column",gap:3,h:28,w:"full",paddingInlineStart:1,paddingInlineEnd:d?1:0,pb:2,justifyContent:"space-between"},children:[a.jsx(Ule,{id:t}),a.jsx(Ace,{id:t})]}),!d&&a.jsx(N,{sx:{alignItems:"center",justifyContent:"center",h:28,w:28,aspectRatio:"1/1"},children:a.jsx(j_,{id:t,isSmall:!0})})]}),a.jsxs(N,{sx:{gap:2},children:[a.jsx(Tce,{id:t}),a.jsx(Bce,{id:t})]}),a.jsx(zce,{id:t})]}),d&&a.jsxs(a.Fragment,{children:[a.jsx(j_,{id:t}),a.jsx(Pce,{id:t}),a.jsx(jce,{id:t})]})]}):null},Wce=l.memo(Hce),E1=e=>{const t=H(c=>{var d;return(d=c.generation.model)==null?void 0:d.base_model}),n=oe(),r=pR(e),o=l.useMemo(()=>{const c=r.filter(d=>t?d.base_model===t:!0)[0];return c||r[0]},[t,r]),s=l.useMemo(()=>!o,[o]);return[l.useCallback(()=>{s||n(wT({type:e,overrides:{model:o}}))},[n,o,s,e]),s]},Vce=de([Ce],({controlAdapters:e})=>{const t=[];let n=!1;const r=ST(e).filter(h=>h.isEnabled).length,o=kT(e).length;r>0&&t.push(`${r} IP`),r>o&&(n=!0);const s=jT(e).filter(h=>h.isEnabled).length,i=_T(e).length;s>0&&t.push(`${s} ControlNet`),s>i&&(n=!0);const c=IT(e).filter(h=>h.isEnabled).length,d=PT(e).length;return c>0&&t.push(`${c} T2I`),c>d&&(n=!0),{controlAdapterIds:ET(e).map(String),activeLabel:t.join(", "),isError:n}},_e),Uce=()=>{const{t:e}=J(),{controlAdapterIds:t,activeLabel:n}=H(Vce),r=jn("controlNet").isFeatureDisabled,[o,s]=E1("controlnet"),[i,c]=E1("ip_adapter"),[d,p]=E1("t2i_adapter");return r?null:a.jsx(Ao,{label:e("controlnet.controlAdapter_other"),activeLabel:n,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsxs(zn,{size:"sm",w:"full",justifyContent:"space-between",children:[a.jsx(Rt,{tooltip:e("controlnet.addControlNet"),leftIcon:a.jsx(Yi,{}),onClick:o,"data-testid":"add controlnet",flexGrow:1,isDisabled:s,children:e("common.controlNet")}),a.jsx(Rt,{tooltip:e("controlnet.addIPAdapter"),leftIcon:a.jsx(Yi,{}),onClick:i,"data-testid":"add ip adapter",flexGrow:1,isDisabled:c,children:e("common.ipAdapter")}),a.jsx(Rt,{tooltip:e("controlnet.addT2IAdapter"),leftIcon:a.jsx(Yi,{}),onClick:d,"data-testid":"add t2i adapter",flexGrow:1,isDisabled:p,children:e("common.t2iAdapter")})]}),t.map((h,m)=>a.jsxs(l.Fragment,{children:[a.jsx(no,{}),a.jsx(Wce,{id:h,number:m+1})]},h))]})})},Xu=l.memo(Uce),Gce=e=>{const{onClick:t}=e,{t:n}=J();return a.jsx(tt,{size:"sm","aria-label":n("embedding.addEmbedding"),tooltip:n("embedding.addEmbedding"),icon:a.jsx(HM,{}),sx:{p:2,color:"base.500",_hover:{color:"base.600"},_active:{color:"base.700"},_dark:{color:"base.500",_hover:{color:"base.400"},_active:{color:"base.300"}}},variant:"link",onClick:t})},C0=l.memo(Gce),qce="28rem",Kce=e=>{const{onSelect:t,isOpen:n,onClose:r,children:o}=e,{data:s}=MT(),i=l.useRef(null),{t:c}=J(),d=H(g=>g.generation.model),p=l.useMemo(()=>{if(!s)return[];const g=[];return Kr(s.entities,(b,y)=>{if(!b)return;const x=(d==null?void 0:d.base_model)!==b.base_model;g.push({value:b.model_name,label:b.model_name,group:gr[b.base_model],disabled:x,tooltip:x?`${c("embedding.incompatibleModel")} ${b.base_model}`:void 0})}),g.sort((b,y)=>{var x;return b.label&&y.label?(x=b.label)!=null&&x.localeCompare(y.label)?-1:1:-1}),g.sort((b,y)=>b.disabled&&!y.disabled?1:-1)},[s,d==null?void 0:d.base_model,c]),h=l.useCallback(g=>{g&&t(g)},[t]),m=l.useCallback((g,b)=>{var y;return((y=b.label)==null?void 0:y.toLowerCase().includes(g.toLowerCase().trim()))||b.value.toLowerCase().includes(g.toLowerCase().trim())},[]);return a.jsxs(Nf,{initialFocusRef:i,isOpen:n,onClose:r,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(Rg,{children:o}),a.jsx($f,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Ag,{sx:{p:0,w:`calc(${qce} - 2rem )`},children:p.length===0?a.jsx(N,{sx:{justifyContent:"center",p:2,fontSize:"sm",color:"base.500",_dark:{color:"base.700"}},children:a.jsx(Se,{children:"No Embeddings Loaded"})}):a.jsx(tr,{inputRef:i,autoFocus:!0,placeholder:c("embedding.addEmbedding"),value:null,data:p,nothingFound:c("embedding.noMatchingEmbedding"),itemComponent:pl,disabled:p.length===0,onDropdownClose:r,filter:m,onChange:h})})})]})},w0=l.memo(Kce),Qce=()=>{const e=H(m=>m.generation.negativePrompt),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=ls(),s=oe(),{t:i}=J(),c=l.useCallback(m=>{s(Ad(m.target.value))},[s]),d=l.useCallback(m=>{m.key==="<"&&o()},[o]),p=l.useCallback(m=>{if(!t.current)return;const g=t.current.selectionStart;if(g===void 0)return;let b=e.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=e.slice(g),rs.flushSync(()=>{s(Ad(b))}),t.current.selectionEnd=y,r()},[s,r,e]),h=jn("embedding").isFeatureEnabled;return a.jsxs(Bn,{children:[a.jsx(w0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(wn,{feature:"paramNegativeConditioning",placement:"right",children:a.jsx(vi,{id:"negativePrompt",name:"negativePrompt",ref:t,value:e,placeholder:i("parameters.negativePromptPlaceholder"),onChange:c,resize:"vertical",fontSize:"sm",minH:16,...h&&{onKeyDown:d}})})}),!n&&h&&a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(C0,{onClick:o})})]})},gR=l.memo(Qce),Xce=de([Ce],({generation:e})=>({prompt:e.positivePrompt}),{memoizeOptions:{resultEqualityCheck:Tn}}),Yce=()=>{const e=oe(),{prompt:t}=H(Xce),n=l.useRef(null),{isOpen:r,onClose:o,onOpen:s}=ls(),{t:i}=J(),c=l.useCallback(m=>{e(Rd(m.target.value))},[e]);It("alt+a",()=>{var m;(m=n.current)==null||m.focus()},[]);const d=l.useCallback(m=>{if(!n.current)return;const g=n.current.selectionStart;if(g===void 0)return;let b=t.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=t.slice(g),rs.flushSync(()=>{e(Rd(b))}),n.current.selectionStart=y,n.current.selectionEnd=y,o()},[e,o,t]),p=jn("embedding").isFeatureEnabled,h=l.useCallback(m=>{p&&m.key==="<"&&s()},[s,p]);return a.jsxs(Te,{position:"relative",children:[a.jsx(Bn,{children:a.jsx(w0,{isOpen:r,onClose:o,onSelect:d,children:a.jsx(wn,{feature:"paramPositiveConditioning",placement:"right",children:a.jsx(vi,{id:"prompt",name:"prompt",ref:n,value:t,placeholder:i("parameters.positivePromptPlaceholder"),onChange:c,onKeyDown:h,resize:"vertical",minH:32})})})}),!r&&p&&a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(C0,{onClick:s})})]})},vR=l.memo(Yce);function Jce(){const e=H(o=>o.sdxl.shouldConcatSDXLStylePrompt),t=oe(),{t:n}=J(),r=l.useCallback(()=>{t(OT(!e))},[t,e]);return a.jsx(tt,{"aria-label":n("sdxl.concatPromptStyle"),tooltip:n("sdxl.concatPromptStyle"),variant:"outline",isChecked:e,onClick:r,icon:a.jsx(qM,{}),size:"xs",sx:{position:"absolute",insetInlineEnd:1,top:6,border:"none",color:e?"accent.500":"base.500",_hover:{bg:"none"}}})}const N_={position:"absolute",bg:"none",w:"full",minH:2,borderRadius:0,borderLeft:"none",borderRight:"none",zIndex:2,maskImage:"radial-gradient(circle at center, black, black 65%, black 30%, black 15%, transparent)"};function bR(){return a.jsxs(N,{children:[a.jsx(Te,{as:Or.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"1px",borderTop:"none",borderColor:"base.400",...N_,_dark:{borderColor:"accent.500"}}}),a.jsx(Te,{as:Or.div,initial:{opacity:0,scale:0},animate:{opacity:[0,1,1,1],scale:[0,.75,1.5,1],transition:{duration:.42,times:[0,.25,.5,1]}},exit:{opacity:0,scale:0},sx:{zIndex:3,position:"absolute",left:"48%",top:"3px",p:1,borderRadius:4,bg:"accent.400",color:"base.50",_dark:{bg:"accent.500"}},children:a.jsx(qM,{size:12})}),a.jsx(Te,{as:Or.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"17px",borderBottom:"none",borderColor:"base.400",...N_,_dark:{borderColor:"accent.500"}}})]})}const Zce=de([Ce],({sdxl:e})=>{const{negativeStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),eue=()=>{const e=oe(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=ls(),{t:s}=J(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(Zce),d=l.useCallback(g=>{e(Td(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),rs.flushSync(()=>{e(Td(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=jn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Te,{position:"relative",children:[a.jsx(yo,{children:c&&a.jsx(Te,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(bR,{})})}),a.jsx(Bn,{children:a.jsx(w0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(vi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.negStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",fontSize:"sm",minH:16})})}),!n&&h&&a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(C0,{onClick:o})})]})},tue=l.memo(eue),nue=de([Ce],({sdxl:e})=>{const{positiveStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),rue=()=>{const e=oe(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=ls(),{t:s}=J(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(nue),d=l.useCallback(g=>{e(Dd(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),rs.flushSync(()=>{e(Dd(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=jn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Te,{position:"relative",children:[a.jsx(yo,{children:c&&a.jsx(Te,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(bR,{})})}),a.jsx(Bn,{children:a.jsx(w0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(vi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.posStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",minH:16})})}),!n&&h&&a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(C0,{onClick:o})})]})},oue=l.memo(rue);function H2(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(vR,{}),a.jsx(Jce,{}),a.jsx(oue,{}),a.jsx(gR,{}),a.jsx(tue,{})]})}const vl=()=>{const{isRefinerAvailable:e}=na(Fx,{selectFromResult:({data:t})=>({isRefinerAvailable:t?t.ids.length>0:!1})});return e},sue=de([Ce],({sdxl:e,ui:t,hotkeys:n})=>{const{refinerCFGScale:r}=e,{shouldUseSliders:o}=t,{shift:s}=n;return{refinerCFGScale:r,shouldUseSliders:o,shift:s}},_e),aue=()=>{const{refinerCFGScale:e,shouldUseSliders:t,shift:n}=H(sue),r=vl(),o=oe(),{t:s}=J(),i=l.useCallback(d=>o(V1(d)),[o]),c=l.useCallback(()=>o(V1(7)),[o]);return t?a.jsx(Pt,{label:s("sdxl.cfgScale"),step:n?.1:.5,min:1,max:20,onChange:i,handleReset:c,value:e,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!r}):a.jsx(ja,{label:s("sdxl.cfgScale"),step:.5,min:1,max:200,onChange:i,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"},isDisabled:!r})},iue=l.memo(aue),lue=e=>{const t=Ci("models"),[n,r,o]=e.split("/"),s=RT.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data},cue=de(Ce,e=>({model:e.sdxl.refinerModel}),_e),uue=()=>{const e=oe(),t=jn("syncModels").isFeatureEnabled,{model:n}=H(cue),{t:r}=J(),{data:o,isLoading:s}=na(Fx),i=l.useMemo(()=>{if(!o)return[];const p=[];return Kr(o.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:gr[h.base_model]})}),p},[o]),c=l.useMemo(()=>(o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])??null,[o==null?void 0:o.entities,n]),d=l.useCallback(p=>{if(!p)return;const h=lue(p);h&&e(BI(h))},[e]);return s?a.jsx(tr,{label:r("sdxl.refinermodel"),placeholder:r("sdxl.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(tr,{tooltip:c==null?void 0:c.description,label:r("sdxl.refinermodel"),value:c==null?void 0:c.id,placeholder:i.length>0?r("sdxl.selectAModel"):r("sdxl.noModelsAvailable"),data:i,error:i.length===0,disabled:i.length===0,onChange:d,w:"100%"}),t&&a.jsx(Te,{mt:7,children:a.jsx(Gu,{iconMode:!0})})]})},due=l.memo(uue),fue=de([Ce],({sdxl:e,hotkeys:t})=>{const{refinerNegativeAestheticScore:n}=e,{shift:r}=t;return{refinerNegativeAestheticScore:n,shift:r}},_e),pue=()=>{const{refinerNegativeAestheticScore:e,shift:t}=H(fue),n=vl(),r=oe(),{t:o}=J(),s=l.useCallback(c=>r(G1(c)),[r]),i=l.useCallback(()=>r(G1(2.5)),[r]);return a.jsx(Pt,{label:o("sdxl.negAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},hue=l.memo(pue),mue=de([Ce],({sdxl:e,hotkeys:t})=>{const{refinerPositiveAestheticScore:n}=e,{shift:r}=t;return{refinerPositiveAestheticScore:n,shift:r}},_e),gue=()=>{const{refinerPositiveAestheticScore:e,shift:t}=H(mue),n=vl(),r=oe(),{t:o}=J(),s=l.useCallback(c=>r(U1(c)),[r]),i=l.useCallback(()=>r(U1(6)),[r]);return a.jsx(Pt,{label:o("sdxl.posAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},vue=l.memo(gue),bue=de(Ce,({ui:e,sdxl:t})=>{const{refinerScheduler:n}=t,{favoriteSchedulers:r}=e,o=Ro(sg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{refinerScheduler:n,data:o}},_e),xue=()=>{const e=oe(),{t}=J(),{refinerScheduler:n,data:r}=H(bue),o=vl(),s=l.useCallback(i=>{i&&e(HI(i))},[e]);return a.jsx(tr,{w:"100%",label:t("sdxl.scheduler"),value:n,data:r,onChange:s,disabled:!o})},yue=l.memo(xue),Cue=de([Ce],({sdxl:e})=>{const{refinerStart:t}=e;return{refinerStart:t}},_e),wue=()=>{const{refinerStart:e}=H(Cue),t=oe(),n=vl(),r=l.useCallback(i=>t(q1(i)),[t]),{t:o}=J(),s=l.useCallback(()=>t(q1(.8)),[t]);return a.jsx(Pt,{label:o("sdxl.refinerStart"),step:.01,min:0,max:1,onChange:r,handleReset:s,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Sue=l.memo(wue),kue=de([Ce],({sdxl:e,ui:t})=>{const{refinerSteps:n}=e,{shouldUseSliders:r}=t;return{refinerSteps:n,shouldUseSliders:r}},_e),jue=()=>{const{refinerSteps:e,shouldUseSliders:t}=H(kue),n=vl(),r=oe(),{t:o}=J(),s=l.useCallback(c=>{r(W1(c))},[r]),i=l.useCallback(()=>{r(W1(20))},[r]);return t?a.jsx(Pt,{label:o("sdxl.steps"),min:1,max:100,step:1,onChange:s,handleReset:i,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:500},isDisabled:!n}):a.jsx(ja,{label:o("sdxl.steps"),min:1,max:500,step:1,onChange:s,value:e,numberInputFieldProps:{textAlign:"center"},isDisabled:!n})},_ue=l.memo(jue);function Iue(){const e=H(s=>s.sdxl.shouldUseSDXLRefiner),t=vl(),n=oe(),{t:r}=J(),o=l.useCallback(s=>{n(AT(s.target.checked))},[n]);return a.jsx(jr,{label:r("sdxl.useRefiner"),isChecked:e,onChange:o,isDisabled:!t})}const Pue=de(Ce,e=>{const{shouldUseSDXLRefiner:t}=e.sdxl,{shouldUseSliders:n}=e.ui;return{activeLabel:t?"Enabled":void 0,shouldUseSliders:n}},_e),Eue=()=>{const{activeLabel:e,shouldUseSliders:t}=H(Pue),{t:n}=J();return vl()?a.jsx(Ao,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Iue,{}),a.jsx(due,{}),a.jsxs(N,{gap:2,flexDirection:t?"column":"row",children:[a.jsx(_ue,{}),a.jsx(iue,{})]}),a.jsx(yue,{}),a.jsx(vue,{}),a.jsx(hue,{}),a.jsx(Sue,{})]})}):a.jsx(Ao,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(Se,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:n("models.noRefinerModelsInstalled")})})})},W2=l.memo(Eue),Mue=de([Ce],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c}=t.sd.guidance,{cfgScale:d}=e,{shouldUseSliders:p}=n,{shift:h}=r;return{cfgScale:d,initial:o,min:s,sliderMax:i,inputMax:c,shouldUseSliders:p,shift:h}},_e),Oue=()=>{const{cfgScale:e,initial:t,min:n,sliderMax:r,inputMax:o,shouldUseSliders:s,shift:i}=H(Mue),c=oe(),{t:d}=J(),p=l.useCallback(m=>c(zh(m)),[c]),h=l.useCallback(()=>c(zh(t)),[c,t]);return s?a.jsx(wn,{feature:"paramCFGScale",children:a.jsx(Pt,{label:d("parameters.cfgScale"),step:i?.1:.5,min:n,max:r,onChange:p,handleReset:h,value:e,sliderNumberInputProps:{max:o},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1})}):a.jsx(wn,{feature:"paramCFGScale",children:a.jsx(ja,{label:d("parameters.cfgScale"),step:.5,min:n,max:o,onChange:p,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})})},Da=l.memo(Oue),Rue=de(Ce,e=>({model:e.generation.model}),_e),Aue=()=>{const e=oe(),{t}=J(),{model:n}=H(Rue),r=jn("syncModels").isFeatureEnabled,{data:o,isLoading:s}=na(Yw),{data:i,isLoading:c}=Wd(Yw),d=H(ro),p=l.useMemo(()=>{if(!o)return[];const g=[];return Kr(o.entities,(b,y)=>{b&&g.push({value:y,label:b.model_name,group:gr[b.base_model]})}),Kr(i==null?void 0:i.entities,(b,y)=>{!b||d==="unifiedCanvas"||d==="img2img"||g.push({value:y,label:b.model_name,group:gr[b.base_model]})}),g},[o,i,d]),h=l.useMemo(()=>((o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])||(i==null?void 0:i.entities[`${n==null?void 0:n.base_model}/onnx/${n==null?void 0:n.model_name}`]))??null,[o==null?void 0:o.entities,n,i==null?void 0:i.entities]),m=l.useCallback(g=>{if(!g)return;const b=y0(g);b&&e(z1(b))},[e]);return s||c?a.jsx(tr,{label:t("modelManager.model"),placeholder:"Loading...",disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:3,children:[a.jsx(wn,{feature:"paramModel",children:a.jsx(tr,{tooltip:h==null?void 0:h.description,label:t("modelManager.model"),value:h==null?void 0:h.id,placeholder:p.length>0?"Select a model":"No models available",data:p,error:p.length===0,disabled:p.length===0,onChange:m,w:"100%"})}),r&&a.jsx(Te,{mt:6,children:a.jsx(Gu,{iconMode:!0})})]})},Due=l.memo(Aue),Tue=de(Ce,({generation:e})=>{const{model:t,vae:n}=e;return{model:t,vae:n}},_e),Nue=()=>{const e=oe(),{t}=J(),{model:n,vae:r}=H(Tue),{data:o}=sP(),s=l.useMemo(()=>{if(!o)return[];const d=[{value:"default",label:"Default",group:"Default"}];return Kr(o.entities,(p,h)=>{if(!p)return;const m=(n==null?void 0:n.base_model)!==p.base_model;d.push({value:h,label:p.model_name,group:gr[p.base_model],disabled:m,tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[o,n==null?void 0:n.base_model]),i=l.useMemo(()=>(o==null?void 0:o.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[o==null?void 0:o.entities,r]),c=l.useCallback(d=>{if(!d||d==="default"){e(Wc(null));return}const p=cR(d);p&&e(Wc(p))},[e]);return a.jsx(wn,{feature:"paramVAE",children:a.jsx(tr,{itemComponent:pl,tooltip:i==null?void 0:i.description,label:t("modelManager.vae"),value:(i==null?void 0:i.id)??"default",placeholder:"Default",data:s,onChange:c,disabled:s.length===0,clearable:!0})})},$ue=l.memo(Nue),Lue=de([lP,la],(e,t)=>{const{scheduler:n}=t,{favoriteSchedulers:r}=e,o=Ro(sg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{scheduler:n,data:o}},_e),zue=()=>{const e=oe(),{t}=J(),{scheduler:n,data:r}=H(Lue),o=l.useCallback(s=>{s&&e(F1(s))},[e]);return a.jsx(wn,{feature:"paramScheduler",children:a.jsx(tr,{label:t("parameters.scheduler"),value:n,data:r,onChange:o})})},Fue=l.memo(zue),Bue=de(Ce,({generation:e})=>{const{vaePrecision:t}=e;return{vaePrecision:t}},_e),Hue=["fp16","fp32"],Wue=()=>{const{t:e}=J(),t=oe(),{vaePrecision:n}=H(Bue),r=l.useCallback(o=>{o&&t(DT(o))},[t]);return a.jsx(wn,{feature:"paramVAEPrecision",children:a.jsx(Ar,{label:e("modelManager.vaePrecision"),value:n,data:Hue,onChange:r})})},Vue=l.memo(Wue),Uue=()=>{const e=jn("vae").isFeatureEnabled;return a.jsxs(N,{gap:3,w:"full",flexWrap:e?"wrap":"nowrap",children:[a.jsx(Te,{w:"full",children:a.jsx(Due,{})}),a.jsx(Te,{w:"full",children:a.jsx(Fue,{})}),e&&a.jsxs(N,{w:"full",gap:3,children:[a.jsx($ue,{}),a.jsx(Vue,{})]})]})},Ta=l.memo(Uue),xR=[{name:on.t("parameters.aspectRatioFree"),value:null},{name:"2:3",value:2/3},{name:"16:9",value:16/9},{name:"1:1",value:1/1}],yR=xR.map(e=>e.value);function CR(){const e=H(s=>s.generation.aspectRatio),t=oe(),n=H(s=>s.generation.shouldFitToWidthHeight),r=H(ro),o=l.useCallback(s=>{t(Us(s.value)),t(Vd(!1))},[t]);return a.jsx(zn,{isAttached:!0,children:xR.map(s=>a.jsx(Rt,{size:"sm",isChecked:e===s.value,isDisabled:r==="img2img"?!n:!1,onClick:o.bind(null,s),children:s.name},s.name))})}const Gue=de([Ce],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.height,{model:d,height:p}=e,{aspectRatio:h}=e,m=t.shift?i:c;return{model:d,height:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},_e),que=e=>{const{model:t,height:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(Gue),d=oe(),{t:p}=J(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Wl(b)),c){const y=Mo(b*c,8);d(Hl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Wl(h)),c){const b=Mo(h*c,8);d(Hl(b))}},[d,h,c]);return a.jsx(Pt,{label:p("parameters.height"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},Kue=l.memo(que),Que=de([Ce],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.width,{model:d,width:p,aspectRatio:h}=e,m=t.shift?i:c;return{model:d,width:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},_e),Xue=e=>{const{model:t,width:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(Que),d=oe(),{t:p}=J(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Hl(b)),c){const y=Mo(b/c,8);d(Wl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Hl(h)),c){const b=Mo(h/c,8);d(Wl(b))}},[d,h,c]);return a.jsx(Pt,{label:p("parameters.width"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},Yue=l.memo(Xue),Jue=de([la,ro],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}=e;return{activeTabName:t,shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}},_e);function Eu(){const{t:e}=J(),t=oe(),{activeTabName:n,shouldFitToWidthHeight:r,shouldLockAspectRatio:o,width:s,height:i}=H(Jue),c=l.useCallback(()=>{o?(t(Vd(!1)),yR.includes(s/i)?t(Us(s/i)):t(Us(null))):(t(Vd(!0)),t(Us(s/i)))},[o,s,i,t]),d=l.useCallback(()=>{t(TT()),t(Us(null)),o&&t(Us(i/s))},[t,o,s,i]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.150",_dark:{bg:"base.750"}},children:[a.jsx(wn,{feature:"paramRatio",children:a.jsxs(Bn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(vr,{children:e("parameters.aspectRatio")}),a.jsx(ji,{}),a.jsx(CR,{}),a.jsx(tt,{tooltip:e("ui.swapSizes"),"aria-label":e("ui.swapSizes"),size:"sm",icon:a.jsx(y8,{}),fontSize:20,isDisabled:n==="img2img"?!r:!1,onClick:d}),a.jsx(tt,{tooltip:e("ui.lockRatio"),"aria-label":e("ui.lockRatio"),size:"sm",icon:a.jsx(KM,{}),isChecked:o,isDisabled:n==="img2img"?!r:!1,onClick:c})]})}),a.jsx(N,{gap:2,alignItems:"center",children:a.jsxs(N,{gap:2,flexDirection:"column",width:"full",children:[a.jsx(Yue,{isDisabled:n==="img2img"?!r:!1}),a.jsx(Kue,{isDisabled:n==="img2img"?!r:!1})]})})]})}const Zue=de([Ce],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c,fineStep:d,coarseStep:p}=t.sd.steps,{steps:h}=e,{shouldUseSliders:m}=n,g=r.shift?d:p;return{steps:h,initial:o,min:s,sliderMax:i,inputMax:c,step:g,shouldUseSliders:m}},_e),ede=()=>{const{steps:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s,shouldUseSliders:i}=H(Zue),c=oe(),{t:d}=J(),p=l.useCallback(g=>{c(Fh(g))},[c]),h=l.useCallback(()=>{c(Fh(t))},[c,t]),m=l.useCallback(()=>{c(Lx())},[c]);return i?a.jsx(wn,{feature:"paramSteps",children:a.jsx(Pt,{label:d("parameters.steps"),min:n,max:r,step:s,onChange:p,handleReset:h,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:o}})}):a.jsx(wn,{feature:"paramSteps",children:a.jsx(ja,{label:d("parameters.steps"),min:n,max:o,step:s,onChange:p,value:e,numberInputFieldProps:{textAlign:"center"},onBlur:m})})},Na=l.memo(ede);function wR(){const e=oe(),t=H(o=>o.generation.shouldFitToWidthHeight),n=l.useCallback(o=>{e(NT(o.target.checked))},[e]),{t:r}=J();return a.jsx(jr,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function tde(){const e=H(i=>i.generation.seed),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.shouldGenerateVariations),{t:r}=J(),o=oe(),s=l.useCallback(i=>o(Lh(i)),[o]);return a.jsx(ja,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:cP,max:uP,isDisabled:t,isInvalid:e<0&&n,onChange:s,value:e})}const nde=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function rde(){const e=oe(),t=H(o=>o.generation.shouldRandomizeSeed),{t:n}=J(),r=l.useCallback(()=>e(Lh(nde(cP,uP))),[e]);return a.jsx(tt,{size:"sm",isDisabled:t,"aria-label":n("parameters.shuffle"),tooltip:n("parameters.shuffle"),onClick:r,icon:a.jsx(yee,{})})}const ode=()=>{const e=oe(),{t}=J(),n=H(o=>o.generation.shouldRandomizeSeed),r=l.useCallback(o=>e($T(o.target.checked)),[e]);return a.jsx(jr,{label:t("common.random"),isChecked:n,onChange:r})},sde=l.memo(ode),ade=()=>a.jsx(wn,{feature:"paramSeed",children:a.jsxs(N,{sx:{gap:3,alignItems:"flex-end"},children:[a.jsx(tde,{}),a.jsx(rde,{}),a.jsx(sde,{})]})}),$a=l.memo(ade),SR=Oe((e,t)=>a.jsxs(N,{ref:t,sx:{flexDir:"column",gap:2,bg:"base.100",px:4,pt:2,pb:4,borderRadius:"base",_dark:{bg:"base.750"}},children:[a.jsx(Se,{fontSize:"sm",fontWeight:"bold",sx:{color:"base.600",_dark:{color:"base.300"}},children:e.label}),e.children]}));SR.displayName="SubSettingsWrapper";const Mu=l.memo(SR),ide=de([Ce],({sdxl:e})=>{const{sdxlImg2ImgDenoisingStrength:t}=e;return{sdxlImg2ImgDenoisingStrength:t}},_e),lde=()=>{const{sdxlImg2ImgDenoisingStrength:e}=H(ide),t=oe(),{t:n}=J(),r=l.useCallback(s=>t(Jw(s)),[t]),o=l.useCallback(()=>{t(Jw(.7))},[t]);return a.jsx(wn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(Pt,{label:n("sdxl.denoisingStrength"),step:.01,min:0,max:1,onChange:r,handleReset:o,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0})})})},kR=l.memo(lde),cde=de([lP,la],(e,t)=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},_e),ude=()=>{const{t:e}=J(),{shouldUseSliders:t,activeLabel:n}=H(cde);return a.jsx(Ao,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{})]}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]}),a.jsx(kR,{}),a.jsx(wR,{})]})})},dde=l.memo(ude),fde=()=>a.jsxs(a.Fragment,{children:[a.jsx(H2,{}),a.jsx(dde,{}),a.jsx(W2,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(Qu,{})]}),pde=l.memo(fde),V2=()=>{const{t:e}=J(),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.iterations),r=l.useMemo(()=>n===1?e("parameters.iterationsWithCount_one",{count:1}):e("parameters.iterationsWithCount_other",{count:n}),[n,e]),o=l.useMemo(()=>e(t?"parameters.randomSeed":"parameters.manualSeed"),[t,e]);return{iterationsAndSeedLabel:l.useMemo(()=>[r,o].join(", "),[r,o]),iterationsLabel:r,seedLabel:o}},hde=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=V2();return a.jsx(Ao,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsx(N,{sx:{flexDirection:"column",gap:3},children:t?a.jsxs(a.Fragment,{children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{})]}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]})})})},jR=l.memo(hde),mde=()=>a.jsxs(a.Fragment,{children:[a.jsx(H2,{}),a.jsx(jR,{}),a.jsx(W2,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(Qu,{})]}),gde=l.memo(mde),vde=[{label:"Unmasked",value:"unmasked"},{label:"Mask",value:"mask"},{label:"Mask Edge",value:"edge"}],bde=()=>{const e=oe(),t=H(o=>o.generation.canvasCoherenceMode),{t:n}=J(),r=l.useCallback(o=>{o&&e(LT(o))},[e]);return a.jsx(wn,{feature:"compositingCoherenceMode",children:a.jsx(Ar,{label:n("parameters.coherenceMode"),data:vde,value:t,onChange:r})})},xde=l.memo(bde),yde=()=>{const e=oe(),t=H(s=>s.generation.canvasCoherenceSteps),{t:n}=J(),r=l.useCallback(s=>{e(Zw(s))},[e]),o=l.useCallback(()=>{e(Zw(20))},[e]);return a.jsx(wn,{feature:"compositingCoherenceSteps",children:a.jsx(Pt,{label:n("parameters.coherenceSteps"),min:1,max:100,step:1,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Cde=l.memo(yde),wde=()=>{const e=oe(),t=H(s=>s.generation.canvasCoherenceStrength),{t:n}=J(),r=l.useCallback(s=>{e(eS(s))},[e]),o=l.useCallback(()=>{e(eS(.3))},[e]);return a.jsx(wn,{feature:"compositingStrength",children:a.jsx(Pt,{label:n("parameters.coherenceStrength"),min:0,max:1,step:.01,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Sde=l.memo(wde);function kde(){const e=oe(),t=H(s=>s.generation.maskBlur),{t:n}=J(),r=l.useCallback(s=>{e(tS(s))},[e]),o=l.useCallback(()=>{e(tS(16))},[e]);return a.jsx(wn,{feature:"compositingBlur",children:a.jsx(Pt,{label:n("parameters.maskBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})}const jde=[{label:"Box Blur",value:"box"},{label:"Gaussian Blur",value:"gaussian"}];function _de(){const e=H(o=>o.generation.maskBlurMethod),t=oe(),{t:n}=J(),r=l.useCallback(o=>{o&&t(zT(o))},[t]);return a.jsx(wn,{feature:"compositingBlurMethod",children:a.jsx(Ar,{value:e,onChange:r,label:n("parameters.maskBlurMethod"),data:jde})})}const Ide=()=>{const{t:e}=J();return a.jsx(Ao,{label:e("parameters.compositingSettingsHeader"),children:a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsxs(Mu,{label:e("parameters.coherencePassHeader"),children:[a.jsx(xde,{}),a.jsx(Cde,{}),a.jsx(Sde,{})]}),a.jsx(no,{}),a.jsxs(Mu,{label:e("parameters.maskAdjustmentsHeader"),children:[a.jsx(kde,{}),a.jsx(_de,{})]})]})})},_R=l.memo(Ide),Pde=de([Ce],({generation:e})=>{const{infillMethod:t}=e;return{infillMethod:t}},_e),Ede=()=>{const e=oe(),{infillMethod:t}=H(Pde),{data:n,isLoading:r}=RI(),o=n==null?void 0:n.infill_methods,{t:s}=J(),i=l.useCallback(c=>{e(FT(c))},[e]);return a.jsx(wn,{feature:"infillMethod",children:a.jsx(Ar,{disabled:(o==null?void 0:o.length)===0,placeholder:r?"Loading...":void 0,label:s("parameters.infillMethod"),value:t,data:o??[],onChange:i})})},Mde=l.memo(Ede),Ode=de([la],e=>{const{infillPatchmatchDownscaleSize:t,infillMethod:n}=e;return{infillPatchmatchDownscaleSize:t,infillMethod:n}},_e),Rde=()=>{const e=oe(),{infillPatchmatchDownscaleSize:t,infillMethod:n}=H(Ode),{t:r}=J(),o=l.useCallback(i=>{e(nS(i))},[e]),s=l.useCallback(()=>{e(nS(2))},[e]);return a.jsx(Pt,{isDisabled:n!=="patchmatch",label:r("parameters.patchmatchDownScaleSize"),min:1,max:10,value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},Ade=l.memo(Rde),Dde=de([la],e=>{const{infillTileSize:t,infillMethod:n}=e;return{infillTileSize:t,infillMethod:n}},_e),Tde=()=>{const e=oe(),{infillTileSize:t,infillMethod:n}=H(Dde),{t:r}=J(),o=l.useCallback(i=>{e(rS(i))},[e]),s=l.useCallback(()=>{e(rS(32))},[e]);return a.jsx(Pt,{isDisabled:n!=="tile",label:r("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},Nde=l.memo(Tde),$de=de([la],e=>{const{infillMethod:t}=e;return{infillMethod:t}},_e);function Lde(){const{infillMethod:e}=H($de);return a.jsxs(N,{children:[e==="tile"&&a.jsx(Nde,{}),e==="patchmatch"&&a.jsx(Ade,{})]})}const _r=e=>e.canvas,Ns=de([Ce],({canvas:e})=>e.batchIds.length>0||e.layerState.stagingArea.images.length>0),zde=de([_r],e=>{const{boundingBoxScaleMethod:t}=e;return{boundingBoxScale:t}},_e),Fde=()=>{const e=oe(),{boundingBoxScale:t}=H(zde),{t:n}=J(),r=l.useCallback(o=>{e(BT(o))},[e]);return a.jsx(wn,{feature:"scaleBeforeProcessing",children:a.jsx(tr,{label:n("parameters.scaleBeforeProcessing"),data:HT,value:t,onChange:r})})},Bde=l.memo(Fde),Hde=de([la,_r],(e,t)=>{const{scaledBoundingBoxDimensions:n,boundingBoxScaleMethod:r}=t,{model:o,aspectRatio:s}=e;return{model:o,scaledBoundingBoxDimensions:n,isManual:r==="manual",aspectRatio:s}},_e),Wde=()=>{const e=oe(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(Hde),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{let h=r.width;const m=Math.floor(p);o&&(h=Mo(m*o,64)),e(Uh({width:h,height:m}))},[o,e,r.width]),d=l.useCallback(()=>{let p=r.width;const h=Math.floor(s);o&&(p=Mo(h*o,64)),e(Uh({width:p,height:h}))},[o,e,s,r.width]);return a.jsx(Pt,{isDisabled:!n,label:i("parameters.scaledHeight"),min:64,max:1536,step:64,value:r.height,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},Vde=l.memo(Wde),Ude=de([_r,la],(e,t)=>{const{boundingBoxScaleMethod:n,scaledBoundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,scaledBoundingBoxDimensions:r,aspectRatio:s,isManual:n==="manual"}},_e),Gde=()=>{const e=oe(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(Ude),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{const h=Math.floor(p);let m=r.height;o&&(m=Mo(h/o,64)),e(Uh({width:h,height:m}))},[o,e,r.height]),d=l.useCallback(()=>{const p=Math.floor(s);let h=r.height;o&&(h=Mo(p/o,64)),e(Uh({width:p,height:h}))},[o,e,s,r.height]);return a.jsx(Pt,{isDisabled:!n,label:i("parameters.scaledWidth"),min:64,max:1536,step:64,value:r.width,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},qde=l.memo(Gde),Kde=()=>{const{t:e}=J();return a.jsx(Ao,{label:e("parameters.infillScalingHeader"),children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsxs(Mu,{children:[a.jsx(Mde,{}),a.jsx(Lde,{})]}),a.jsx(no,{}),a.jsxs(Mu,{children:[a.jsx(Bde,{}),a.jsx(qde,{}),a.jsx(Vde,{})]})]})})},IR=l.memo(Kde),Qde=de([Ce,Ns],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},_e),Xde=()=>{const e=oe(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(Qde),{t:s}=J(),i=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,c=l.useCallback(p=>{if(e(Xs({...n,height:Math.floor(p)})),o){const h=Mo(p*o,64);e(Xs({width:h,height:Math.floor(p)}))}},[o,n,e]),d=l.useCallback(()=>{if(e(Xs({...n,height:Math.floor(i)})),o){const p=Mo(i*o,64);e(Xs({width:p,height:Math.floor(i)}))}},[o,n,e,i]);return a.jsx(Pt,{label:s("parameters.boundingBoxHeight"),min:64,max:1536,step:64,value:n.height,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},Yde=l.memo(Xde),Jde=de([Ce,Ns],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},_e),Zde=()=>{const e=oe(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(Jde),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{if(e(Xs({...n,width:Math.floor(p)})),o){const h=Mo(p/o,64);e(Xs({width:Math.floor(p),height:h}))}},[o,n,e]),d=l.useCallback(()=>{if(e(Xs({...n,width:Math.floor(s)})),o){const p=Mo(s/o,64);e(Xs({width:Math.floor(s),height:p}))}},[o,n,e,s]);return a.jsx(Pt,{label:i("parameters.boundingBoxWidth"),min:64,max:1536,step:64,value:n.width,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},efe=l.memo(Zde),tfe=de([la,_r],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r}=e,{boundingBoxDimensions:o}=t;return{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,boundingBoxDimensions:o}});function tg(){const e=oe(),{t}=J(),{shouldLockAspectRatio:n,boundingBoxDimensions:r}=H(tfe),o=l.useCallback(()=>{n?(e(Vd(!1)),yR.includes(r.width/r.height)?e(Us(r.width/r.height)):e(Us(null))):(e(Vd(!0)),e(Us(r.width/r.height)))},[n,r,e]),s=l.useCallback(()=>{e(WT()),e(Us(null)),n&&e(Us(r.height/r.width))},[e,n,r]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.100",_dark:{bg:"base.750"}},children:[a.jsx(wn,{feature:"paramRatio",children:a.jsxs(Bn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(vr,{children:t("parameters.aspectRatio")}),a.jsx(ji,{}),a.jsx(CR,{}),a.jsx(tt,{tooltip:t("ui.swapSizes"),"aria-label":t("ui.swapSizes"),size:"sm",icon:a.jsx(y8,{}),fontSize:20,onClick:s}),a.jsx(tt,{tooltip:t("ui.lockRatio"),"aria-label":t("ui.lockRatio"),size:"sm",icon:a.jsx(KM,{}),isChecked:n,onClick:o})]})}),a.jsx(efe,{}),a.jsx(Yde,{})]})}const nfe=de(Ce,({ui:e,generation:t})=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},_e),rfe=()=>{const{t:e}=J(),{shouldUseSliders:t,activeLabel:n}=H(nfe);return a.jsx(Ao,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(tg,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{})]}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(tg,{})]}),a.jsx(kR,{})]})})},ofe=l.memo(rfe);function sfe(){return a.jsxs(a.Fragment,{children:[a.jsx(H2,{}),a.jsx(ofe,{}),a.jsx(W2,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(IR,{}),a.jsx(_R,{}),a.jsx(Qu,{})]})}function U2(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(vR,{}),a.jsx(gR,{})]})}function afe(){const e=H(i=>i.generation.horizontalSymmetrySteps),t=H(i=>i.generation.steps),n=oe(),{t:r}=J(),o=l.useCallback(i=>{n(oS(i))},[n]),s=l.useCallback(()=>{n(oS(0))},[n]);return a.jsx(Pt,{label:r("parameters.hSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function ife(){const e=H(i=>i.generation.verticalSymmetrySteps),t=H(i=>i.generation.steps),n=oe(),{t:r}=J(),o=l.useCallback(i=>{n(sS(i))},[n]),s=l.useCallback(()=>{n(sS(0))},[n]);return a.jsx(Pt,{label:r("parameters.vSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function lfe(){const e=H(r=>r.generation.shouldUseSymmetry),t=oe(),n=l.useCallback(r=>{t(VT(r.target.checked))},[t]);return a.jsx(jr,{label:"Enable Symmetry",isChecked:e,onChange:n})}const cfe=de(Ce,e=>({activeLabel:e.generation.shouldUseSymmetry?"Enabled":void 0}),_e),ufe=()=>{const{t:e}=J(),{activeLabel:t}=H(cfe);return jn("symmetry").isFeatureEnabled?a.jsx(Ao,{label:e("parameters.symmetry"),activeLabel:t,children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsx(lfe,{}),a.jsx(afe,{}),a.jsx(ife,{})]})}):null},G2=l.memo(ufe),dfe=de([Ce],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.img2imgStrength,{img2imgStrength:p}=e,h=t.shift?c:d;return{img2imgStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:h}},_e),ffe=()=>{const{img2imgStrength:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s}=H(dfe),i=oe(),{t:c}=J(),d=l.useCallback(h=>i(Bh(h)),[i]),p=l.useCallback(()=>{i(Bh(t))},[i,t]);return a.jsx(wn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(Pt,{label:`${c("parameters.denoisingStrength")}`,step:s,min:n,max:r,onChange:d,handleReset:p,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,sliderNumberInputProps:{max:o}})})})},PR=l.memo(ffe),pfe=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=V2();return a.jsx(Ao,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{})]}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(Eu,{})]}),a.jsx(PR,{}),a.jsx(wR,{})]})})},hfe=l.memo(pfe),mfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(U2,{}),a.jsx(hfe,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(G2,{}),a.jsx(Qu,{})]}),gfe=l.memo(mfe),vfe=de([Ce],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.hrfStrength,{hrfStrength:p,hrfEnabled:h}=e,m=t.shift?c:d;return{hrfStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:m,hrfEnabled:h}},_e),bfe=()=>{const{hrfStrength:e,initial:t,min:n,sliderMax:r,step:o,hrfEnabled:s}=H(vfe),i=oe(),{t:c}=J(),d=l.useCallback(()=>{i(Hh(t))},[i,t]),p=l.useCallback(h=>{i(Hh(h))},[i]);return a.jsx(Fn,{label:c("hrf.strengthTooltip"),placement:"right",hasArrow:!0,children:a.jsx(Pt,{label:c("parameters.denoisingStrength"),min:n,max:r,step:o,value:e,onChange:p,withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d,isDisabled:!s})})},xfe=l.memo(bfe);function yfe(){const e=oe(),{t}=J(),n=H(o=>o.generation.hrfEnabled),r=l.useCallback(o=>e(B1(o.target.checked)),[e]);return a.jsx(jr,{label:t("hrf.enableHrf"),isChecked:n,onChange:r,tooltip:t("hrf.enableHrfTooltip")})}const Cfe=de(Ce,({generation:e})=>{const{hrfMethod:t,hrfEnabled:n}=e;return{hrfMethod:t,hrfEnabled:n}},_e),wfe=["ESRGAN","bilinear"],Sfe=()=>{const e=oe(),{t}=J(),{hrfMethod:n,hrfEnabled:r}=H(Cfe),o=l.useCallback(s=>{s&&e(H1(s))},[e]);return a.jsx(Ar,{label:t("hrf.upscaleMethod"),value:n,data:wfe,onChange:o,disabled:!r})},kfe=l.memo(Sfe),jfe=de(Ce,e=>{const{hrfEnabled:t}=e.generation;return{hrfEnabled:t}},_e);function _fe(){const{t:e}=J(),t=jn("hrf").isFeatureEnabled,{hrfEnabled:n}=H(jfe),r=l.useMemo(()=>{if(n)return e("common.on")},[e,n]);return t?a.jsx(Ao,{label:e("hrf.hrf"),activeLabel:r,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(yfe,{}),a.jsx(xfe,{}),a.jsx(kfe,{})]})}):null}const Ife=()=>a.jsxs(a.Fragment,{children:[a.jsx(U2,{}),a.jsx(jR,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(G2,{}),a.jsx(_fe,{}),a.jsx(Qu,{})]}),Pfe=l.memo(Ife),Efe=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=V2();return a.jsx(Ao,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(tg,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ia,{}),a.jsx(Na,{}),a.jsx(Da,{})]}),a.jsx(Ta,{}),a.jsx(Te,{pt:2,children:a.jsx($a,{})}),a.jsx(tg,{})]}),a.jsx(PR,{})]})})},Mfe=l.memo(Efe),Ofe=()=>a.jsxs(a.Fragment,{children:[a.jsx(U2,{}),a.jsx(Mfe,{}),a.jsx(Xu,{}),a.jsx(Ku,{}),a.jsx(qu,{}),a.jsx(G2,{}),a.jsx(IR,{}),a.jsx(_R,{}),a.jsx(Qu,{})]}),Rfe=l.memo(Ofe),Afe=()=>{const e=H(ro),t=H(n=>n.generation.model);return e==="txt2img"?a.jsx(Nh,{children:t&&t.base_model==="sdxl"?a.jsx(gde,{}):a.jsx(Pfe,{})}):e==="img2img"?a.jsx(Nh,{children:t&&t.base_model==="sdxl"?a.jsx(pde,{}):a.jsx(gfe,{})}):e==="unifiedCanvas"?a.jsx(Nh,{children:t&&t.base_model==="sdxl"?a.jsx(sfe,{}):a.jsx(Rfe,{})}):null},Dfe=l.memo(Afe),Nh=l.memo(e=>a.jsxs(N,{sx:{w:"full",h:"full",flexDir:"column",gap:2},children:[a.jsx(O8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",h:"full",position:"relative",borderRadius:"base",p:2},children:a.jsx(N,{sx:{w:"full",h:"full",position:"relative"},children:a.jsx(Te,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(o0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:800,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:a.jsx(N,{sx:{gap:2,flexDirection:"column",h:"full",w:"full"},children:e.children})})})})})]}));Nh.displayName="ParametersPanelWrapper";const Tfe=de([Ce],e=>{const{initialImage:t}=e.generation;return{initialImage:t,isResetButtonDisabled:!t}},_e),Nfe=()=>{const{initialImage:e}=H(Tfe),{currentData:t}=Ps((e==null?void 0:e.imageName)??Os.skipToken),n=l.useMemo(()=>{if(t)return{id:"initial-image",payloadType:"IMAGE_DTO",payload:{imageDTO:t}}},[t]),r=l.useMemo(()=>({id:"initial-image",actionType:"SET_INITIAL_IMAGE"}),[]);return a.jsx(il,{imageDTO:t,droppableData:r,draggableData:n,isUploadDisabled:!0,fitContainer:!0,dropLabel:"Set as Initial Image",noContentFallback:a.jsx(qr,{label:"No initial image selected"}),dataTestId:"initial-image"})},$fe=l.memo(Nfe),Lfe=de([Ce],e=>{const{initialImage:t}=e.generation;return{isResetButtonDisabled:!t}},_e),zfe={type:"SET_INITIAL_IMAGE"},Ffe=()=>{const{isResetButtonDisabled:e}=H(Lfe),t=oe(),{getUploadButtonProps:n,getUploadInputProps:r}=k2({postUploadAction:zfe}),o=l.useCallback(()=>{t(UT())},[t]);return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",flexDirection:"column",height:"full",width:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",p:2,gap:4},children:[a.jsxs(N,{sx:{w:"full",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(Se,{sx:{ps:2,fontWeight:600,userSelect:"none",color:"base.700",_dark:{color:"base.200"}},children:"Initial Image"}),a.jsx(ji,{}),a.jsx(tt,{tooltip:"Upload Initial Image","aria-label":"Upload Initial Image",icon:a.jsx(Jg,{}),...n()}),a.jsx(tt,{tooltip:"Reset Initial Image","aria-label":"Reset Initial Image",icon:a.jsx(Yg,{}),onClick:o,isDisabled:e})]}),a.jsx($fe,{}),a.jsx("input",{...r()})]})},Bfe=l.memo(Ffe),Hfe=e=>{const{onClick:t,isDisabled:n}=e,{t:r}=J(),o=H(s=>s.system.isConnected);return a.jsx(tt,{onClick:t,icon:a.jsx(qo,{}),tooltip:`${r("gallery.deleteImage")} (Del)`,"aria-label":`${r("gallery.deleteImage")} (Del)`,isDisabled:n||!o,colorScheme:"error"})},ER=()=>{const[e,{isLoading:t}]=cg({fixedCacheKey:"enqueueBatch"}),[n,{isLoading:r}]=tP({fixedCacheKey:"resumeProcessor"}),[o,{isLoading:s}]=ZI({fixedCacheKey:"pauseProcessor"}),[i,{isLoading:c}]=Tx({fixedCacheKey:"cancelQueueItem"}),[d,{isLoading:p}]=JI({fixedCacheKey:"clearQueue"}),[h,{isLoading:m}]=dP({fixedCacheKey:"pruneQueue"});return t||r||s||c||p||m},Wfe=[{label:"RealESRGAN x2 Plus",value:"RealESRGAN_x2plus.pth",tooltip:"Attempts to retain sharpness, low smoothing",group:"x2 Upscalers"},{label:"RealESRGAN x4 Plus",value:"RealESRGAN_x4plus.pth",tooltip:"Best for photos and highly detailed images, medium smoothing",group:"x4 Upscalers"},{label:"RealESRGAN x4 Plus (anime 6B)",value:"RealESRGAN_x4plus_anime_6B.pth",tooltip:"Best for anime/manga, high smoothing",group:"x4 Upscalers"},{label:"ESRGAN SRx4",value:"ESRGAN_SRx4_DF2KOST_official-ff704c30.pth",tooltip:"Retains sharpness, low smoothing",group:"x4 Upscalers"}];function Vfe(){const e=H(r=>r.postprocessing.esrganModelName),t=oe(),n=l.useCallback(r=>t(GT(r)),[t]);return a.jsx(Ar,{label:"ESRGAN Model",value:e,itemComponent:pl,onChange:n,data:Wfe})}const Ufe=e=>{const{imageDTO:t}=e,n=oe(),r=ER(),{t:o}=J(),{isOpen:s,onOpen:i,onClose:c}=ls(),{isAllowedToUpscale:d,detail:p}=qT(t),h=l.useCallback(()=>{c(),!(!t||!d)&&n(fP({imageDTO:t}))},[n,t,d,c]);return a.jsx(Uf,{isOpen:s,onClose:c,triggerComponent:a.jsx(tt,{tooltip:o("parameters.upscale"),onClick:i,icon:a.jsx(VM,{}),"aria-label":o("parameters.upscale")}),children:a.jsxs(N,{sx:{flexDirection:"column",gap:4},children:[a.jsx(Vfe,{}),a.jsx(Rt,{tooltip:p,size:"sm",isDisabled:!t||r||!d,onClick:h,children:o("parameters.upscaleImage")})]})})},Gfe=l.memo(Ufe),qfe=de([Ce,ro],({gallery:e,system:t,ui:n,config:r},o)=>{const{isConnected:s,shouldConfirmOnDelete:i,denoiseProgress:c}=t,{shouldShowImageDetails:d,shouldHidePreview:p,shouldShowProgressInViewer:h}=n,{shouldFetchMetadataFromApi:m}=r,g=e.selection[e.selection.length-1];return{shouldConfirmOnDelete:i,isConnected:s,shouldDisableToolbarButtons:!!(c!=null&&c.progress_image)||!g,shouldShowImageDetails:d,activeTabName:o,shouldHidePreview:p,shouldShowProgressInViewer:h,lastSelectedImage:g,shouldFetchMetadataFromApi:m}},{memoizeOptions:{resultEqualityCheck:Tn}}),Kfe=()=>{const e=oe(),{isConnected:t,shouldDisableToolbarButtons:n,shouldShowImageDetails:r,lastSelectedImage:o,shouldShowProgressInViewer:s}=H(qfe),i=jn("upscaling").isFeatureEnabled,c=ER(),d=Zl(),{t:p}=J(),{recallBothPrompts:h,recallSeed:m,recallAllParameters:g}=f0(),{currentData:b}=Ps((o==null?void 0:o.image_name)??Os.skipToken),{metadata:y,isLoading:x}=E2(o==null?void 0:o.image_name),{workflow:C,isLoading:S}=M2(o==null?void 0:o.workflow_id),j=l.useCallback(()=>{C&&e(Ax(C))},[e,C]),_=l.useCallback(()=>{g(y)},[y,g]);It("a",_,[y]);const I=l.useCallback(()=>{m(y==null?void 0:y.seed)},[y==null?void 0:y.seed,m]);It("s",I,[b]);const P=l.useCallback(()=>{h(y==null?void 0:y.positive_prompt,y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt)},[y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt,h]);It("p",P,[b]),It("w",j,[C]);const M=l.useCallback(()=>{e(C8()),e(ig(b))},[e,b]);It("shift+i",M,[b]);const R=l.useCallback(()=>{b&&e(fP({imageDTO:b}))},[e,b]),A=l.useCallback(()=>{b&&e(lg([b]))},[e,b]);It("Shift+U",()=>{R()},{enabled:()=>!!(i&&!n&&t)},[i,b,n,t]);const D=l.useCallback(()=>e(KT(!r)),[e,r]);It("i",()=>{b?D():d({title:p("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[b,r,d]),It("delete",()=>{A()},[e,b]);const O=l.useCallback(()=>{e(AI(!s))},[e,s]);return a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(zn,{isAttached:!0,isDisabled:n,children:a.jsxs(Cg,{isLazy:!0,children:[a.jsx(wg,{as:tt,"aria-label":p("parameters.imageActions"),tooltip:p("parameters.imageActions"),isDisabled:!b,icon:a.jsx(Hoe,{})}),a.jsx(Gl,{motionProps:pu,children:b&&a.jsx(w8,{imageDTO:b})})]})}),a.jsxs(zn,{isAttached:!0,isDisabled:n,children:[a.jsx(tt,{isLoading:S,icon:a.jsx(j2,{}),tooltip:`${p("nodes.loadWorkflow")} (W)`,"aria-label":`${p("nodes.loadWorkflow")} (W)`,isDisabled:!C,onClick:j}),a.jsx(tt,{isLoading:x,icon:a.jsx(XM,{}),tooltip:`${p("parameters.usePrompt")} (P)`,"aria-label":`${p("parameters.usePrompt")} (P)`,isDisabled:!(y!=null&&y.positive_prompt),onClick:P}),a.jsx(tt,{isLoading:x,icon:a.jsx(YM,{}),tooltip:`${p("parameters.useSeed")} (S)`,"aria-label":`${p("parameters.useSeed")} (S)`,isDisabled:(y==null?void 0:y.seed)===null||(y==null?void 0:y.seed)===void 0,onClick:I}),a.jsx(tt,{isLoading:x,icon:a.jsx(FM,{}),tooltip:`${p("parameters.useAll")} (A)`,"aria-label":`${p("parameters.useAll")} (A)`,isDisabled:!y,onClick:_})]}),i&&a.jsx(zn,{isAttached:!0,isDisabled:c,children:i&&a.jsx(Gfe,{imageDTO:b})}),a.jsx(zn,{isAttached:!0,children:a.jsx(tt,{icon:a.jsx(HM,{}),tooltip:`${p("parameters.info")} (I)`,"aria-label":`${p("parameters.info")} (I)`,isChecked:r,onClick:D})}),a.jsx(zn,{isAttached:!0,children:a.jsx(tt,{"aria-label":p("settings.displayInProgress"),tooltip:p("settings.displayInProgress"),icon:a.jsx(dee,{}),isChecked:s,onClick:O})}),a.jsx(zn,{isAttached:!0,children:a.jsx(Hfe,{onClick:A})})]})})},Qfe=l.memo(Kfe),Xfe=de([Ce,Dx],(e,t)=>{var j,_;const{data:n,status:r}=QT.endpoints.listImages.select(t)(e),{data:o}=e.gallery.galleryView==="images"?aS.endpoints.getBoardImagesTotal.select(t.board_id??"none")(e):aS.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(e),s=e.gallery.selection[e.gallery.selection.length-1],i=r==="pending";if(!n||!s||(o==null?void 0:o.total)===0)return{isFetching:i,queryArgs:t,isOnFirstImage:!0,isOnLastImage:!0};const c={...t,offset:n.ids.length,limit:YI},d=XT.getSelectors(),p=d.selectAll(n),h=p.findIndex(I=>I.image_name===s.image_name),m=Bl(h+1,0,p.length-1),g=Bl(h-1,0,p.length-1),b=(j=p[m])==null?void 0:j.image_name,y=(_=p[g])==null?void 0:_.image_name,x=b?d.selectById(n,b):void 0,C=y?d.selectById(n,y):void 0,S=p.length;return{loadedImagesCount:p.length,currentImageIndex:h,areMoreImagesAvailable:((o==null?void 0:o.total)??0)>S,isFetching:r==="pending",nextImage:x,prevImage:C,queryArgs:c}},{memoizeOptions:{resultEqualityCheck:Tn}}),MR=()=>{const e=oe(),{nextImage:t,prevImage:n,areMoreImagesAvailable:r,isFetching:o,queryArgs:s,loadedImagesCount:i,currentImageIndex:c}=H(Xfe),d=l.useCallback(()=>{n&&e(iS(n))},[e,n]),p=l.useCallback(()=>{t&&e(iS(t))},[e,t]),[h]=XI(),m=l.useCallback(()=>{h(s)},[h,s]);return{handlePrevImage:d,handleNextImage:p,isOnFirstImage:c===0,isOnLastImage:c!==void 0&&c===i-1,nextImage:t,prevImage:n,areMoreImagesAvailable:r,handleLoadMoreImages:m,isFetching:o}};function Yfe(e){return Qe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Jfe=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:s=!1})=>{const{t:i}=J(),c=l.useCallback(()=>navigator.clipboard.writeText(t.toString()),[t]);return t?a.jsxs(N,{gap:2,children:[n&&a.jsx(Fn,{label:`Recall ${e}`,children:a.jsx(_a,{"aria-label":i("accessibility.useThisParameter"),icon:a.jsx(Yfe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),s&&a.jsx(Fn,{label:`Copy ${e}`,children:a.jsx(_a,{"aria-label":`Copy ${e}`,icon:a.jsx(Hu,{}),size:"xs",variant:"ghost",fontSize:14,onClick:c})}),a.jsxs(N,{direction:o?"column":"row",children:[a.jsxs(Se,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?a.jsxs(bg,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",a.jsx(DO,{mx:"2px"})]}):a.jsx(Se,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}):null},Lr=l.memo(Jfe),Zfe=e=>{var F;const{metadata:t}=e,{t:n}=J(),{recallPositivePrompt:r,recallNegativePrompt:o,recallSeed:s,recallCfgScale:i,recallModel:c,recallScheduler:d,recallVaeModel:p,recallSteps:h,recallWidth:m,recallHeight:g,recallStrength:b,recallHrfEnabled:y,recallHrfStrength:x,recallHrfMethod:C,recallLoRA:S,recallControlNet:j,recallIPAdapter:_,recallT2IAdapter:I}=f0(),P=l.useCallback(()=>{r(t==null?void 0:t.positive_prompt)},[t==null?void 0:t.positive_prompt,r]),M=l.useCallback(()=>{o(t==null?void 0:t.negative_prompt)},[t==null?void 0:t.negative_prompt,o]),R=l.useCallback(()=>{s(t==null?void 0:t.seed)},[t==null?void 0:t.seed,s]),A=l.useCallback(()=>{c(t==null?void 0:t.model)},[t==null?void 0:t.model,c]),D=l.useCallback(()=>{m(t==null?void 0:t.width)},[t==null?void 0:t.width,m]),O=l.useCallback(()=>{g(t==null?void 0:t.height)},[t==null?void 0:t.height,g]),T=l.useCallback(()=>{d(t==null?void 0:t.scheduler)},[t==null?void 0:t.scheduler,d]),Y=l.useCallback(()=>{p(t==null?void 0:t.vae)},[t==null?void 0:t.vae,p]),z=l.useCallback(()=>{h(t==null?void 0:t.steps)},[t==null?void 0:t.steps,h]),W=l.useCallback(()=>{i(t==null?void 0:t.cfg_scale)},[t==null?void 0:t.cfg_scale,i]),Q=l.useCallback(()=>{b(t==null?void 0:t.strength)},[t==null?void 0:t.strength,b]),U=l.useCallback(()=>{y(t==null?void 0:t.hrf_enabled)},[t==null?void 0:t.hrf_enabled,y]),L=l.useCallback(()=>{x(t==null?void 0:t.hrf_strength)},[t==null?void 0:t.hrf_strength,x]),ee=l.useCallback(()=>{C(t==null?void 0:t.hrf_method)},[t==null?void 0:t.hrf_method,C]),K=l.useCallback(X=>{S(X)},[S]),Z=l.useCallback(X=>{j(X)},[j]),se=l.useCallback(X=>{_(X)},[_]),fe=l.useCallback(X=>{I(X)},[I]),G=l.useMemo(()=>t!=null&&t.controlnets?t.controlnets.filter(X=>Wh(X.control_model)):[],[t==null?void 0:t.controlnets]),te=l.useMemo(()=>t!=null&&t.ipAdapters?t.ipAdapters.filter(X=>Wh(X.ip_adapter_model)):[],[t==null?void 0:t.ipAdapters]),V=l.useMemo(()=>t!=null&&t.t2iAdapters?t.t2iAdapters.filter(X=>YT(X.t2i_adapter_model)):[],[t==null?void 0:t.t2iAdapters]);return!t||Object.keys(t).length===0?null:(console.log(t),a.jsxs(a.Fragment,{children:[t.created_by&&a.jsx(Lr,{label:n("metadata.createdBy"),value:t.created_by}),t.generation_mode&&a.jsx(Lr,{label:n("metadata.generationMode"),value:t.generation_mode}),t.positive_prompt&&a.jsx(Lr,{label:n("metadata.positivePrompt"),labelPosition:"top",value:t.positive_prompt,onClick:P}),t.negative_prompt&&a.jsx(Lr,{label:n("metadata.negativePrompt"),labelPosition:"top",value:t.negative_prompt,onClick:M}),t.seed!==void 0&&t.seed!==null&&a.jsx(Lr,{label:n("metadata.seed"),value:t.seed,onClick:R}),t.model!==void 0&&t.model!==null&&t.model.model_name&&a.jsx(Lr,{label:n("metadata.model"),value:t.model.model_name,onClick:A}),t.width&&a.jsx(Lr,{label:n("metadata.width"),value:t.width,onClick:D}),t.height&&a.jsx(Lr,{label:n("metadata.height"),value:t.height,onClick:O}),t.scheduler&&a.jsx(Lr,{label:n("metadata.scheduler"),value:t.scheduler,onClick:T}),a.jsx(Lr,{label:n("metadata.vae"),value:((F=t.vae)==null?void 0:F.model_name)??"Default",onClick:Y}),t.steps&&a.jsx(Lr,{label:n("metadata.steps"),value:t.steps,onClick:z}),t.cfg_scale!==void 0&&t.cfg_scale!==null&&a.jsx(Lr,{label:n("metadata.cfgScale"),value:t.cfg_scale,onClick:W}),t.strength&&a.jsx(Lr,{label:n("metadata.strength"),value:t.strength,onClick:Q}),t.hrf_enabled&&a.jsx(Lr,{label:n("hrf.metadata.enabled"),value:t.hrf_enabled,onClick:U}),t.hrf_enabled&&t.hrf_strength&&a.jsx(Lr,{label:n("hrf.metadata.strength"),value:t.hrf_strength,onClick:L}),t.hrf_enabled&&t.hrf_method&&a.jsx(Lr,{label:n("hrf.metadata.method"),value:t.hrf_method,onClick:ee}),t.loras&&t.loras.map((X,ue)=>{if($I(X.lora))return a.jsx(Lr,{label:"LoRA",value:`${X.lora.model_name} - ${X.weight}`,onClick:K.bind(null,X)},ue)}),G.map((X,ue)=>{var q;return a.jsx(Lr,{label:"ControlNet",value:`${(q=X.control_model)==null?void 0:q.model_name} - ${X.control_weight}`,onClick:Z.bind(null,X)},ue)}),te.map((X,ue)=>{var q;return a.jsx(Lr,{label:"IP Adapter",value:`${(q=X.ip_adapter_model)==null?void 0:q.model_name} - ${X.weight}`,onClick:se.bind(null,X)},ue)}),V.map((X,ue)=>{var q;return a.jsx(Lr,{label:"T2I Adapter",value:`${(q=X.t2i_adapter_model)==null?void 0:q.model_name} - ${X.weight}`,onClick:fe.bind(null,X)},ue)})]}))},epe=l.memo(Zfe),tpe=({image:e})=>{const{t}=J(),{metadata:n}=E2(e.image_name),{workflow:r}=M2(e.workflow_id);return a.jsxs(N,{layerStyle:"first",sx:{padding:4,gap:1,flexDirection:"column",width:"full",height:"full",borderRadius:"base",position:"absolute",overflow:"hidden"},children:[a.jsxs(N,{gap:2,children:[a.jsx(Se,{fontWeight:"semibold",children:"File:"}),a.jsxs(bg,{href:e.image_url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.image_name,a.jsx(DO,{mx:"2px"})]})]}),a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(xo,{children:t("metadata.recallParameters")}),a.jsx(xo,{children:t("metadata.metadata")}),a.jsx(xo,{children:t("metadata.imageDetails")}),a.jsx(xo,{children:t("metadata.workflow")})]}),a.jsxs(zu,{children:[a.jsx(Ho,{children:n?a.jsx(lc,{children:a.jsx(epe,{metadata:n})}):a.jsx(qr,{label:t("metadata.noRecallParameters")})}),a.jsx(Ho,{children:n?a.jsx(el,{data:n,label:t("metadata.metadata")}):a.jsx(qr,{label:t("metadata.noMetaData")})}),a.jsx(Ho,{children:e?a.jsx(el,{data:e,label:t("metadata.imageDetails")}):a.jsx(qr,{label:t("metadata.noImageDetails")})}),a.jsx(Ho,{children:r?a.jsx(el,{data:r,label:t("metadata.workflow")}):a.jsx(qr,{label:t("nodes.noWorkflow")})})]})]})]})},npe=l.memo(tpe),M1={color:"base.100",pointerEvents:"auto"},rpe=()=>{const{t:e}=J(),{handlePrevImage:t,handleNextImage:n,isOnFirstImage:r,isOnLastImage:o,handleLoadMoreImages:s,areMoreImagesAvailable:i,isFetching:c}=MR();return a.jsxs(Te,{sx:{position:"relative",height:"100%",width:"100%"},children:[a.jsx(Te,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineStart:0},children:!r&&a.jsx(_a,{"aria-label":e("accessibility.previousImage"),icon:a.jsx(GZ,{size:64}),variant:"unstyled",onClick:t,boxSize:16,sx:M1})}),a.jsxs(Te,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineEnd:0},children:[!o&&a.jsx(_a,{"aria-label":e("accessibility.nextImage"),icon:a.jsx(qZ,{size:64}),variant:"unstyled",onClick:n,boxSize:16,sx:M1}),o&&i&&!c&&a.jsx(_a,{"aria-label":e("accessibility.loadMore"),icon:a.jsx(UZ,{size:64}),variant:"unstyled",onClick:s,boxSize:16,sx:M1}),o&&i&&c&&a.jsx(N,{sx:{w:16,h:16,alignItems:"center",justifyContent:"center"},children:a.jsx(bi,{opacity:.5,size:"xl"})})]})]})},OR=l.memo(rpe),ope=de([Ce,JT],({ui:e,system:t},n)=>{const{shouldShowImageDetails:r,shouldHidePreview:o,shouldShowProgressInViewer:s}=e,{denoiseProgress:i,shouldAntialiasProgressImage:c}=t;return{shouldShowImageDetails:r,shouldHidePreview:o,imageName:n==null?void 0:n.image_name,denoiseProgress:i,shouldShowProgressInViewer:s,shouldAntialiasProgressImage:c}},{memoizeOptions:{resultEqualityCheck:Tn}}),spe=()=>{const{shouldShowImageDetails:e,imageName:t,denoiseProgress:n,shouldShowProgressInViewer:r,shouldAntialiasProgressImage:o}=H(ope),{handlePrevImage:s,handleNextImage:i,isOnLastImage:c,handleLoadMoreImages:d,areMoreImagesAvailable:p,isFetching:h}=MR();It("left",()=>{s()},[s]),It("right",()=>{if(c&&p&&!h){d();return}c||i()},[c,p,d,h,i]);const{currentData:m}=Ps(t??Os.skipToken),g=l.useMemo(()=>{if(m)return{id:"current-image",payloadType:"IMAGE_DTO",payload:{imageDTO:m}}},[m]),b=l.useMemo(()=>({id:"current-image",actionType:"SET_CURRENT_IMAGE"}),[]),[y,x]=l.useState(!1),C=l.useRef(0),{t:S}=J(),j=l.useCallback(()=>{x(!0),window.clearTimeout(C.current)},[]),_=l.useCallback(()=>{C.current=window.setTimeout(()=>{x(!1)},500)},[]);return a.jsxs(N,{onMouseOver:j,onMouseOut:_,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative"},children:[n!=null&&n.progress_image&&r?a.jsx(Si,{src:n.progress_image.dataURL,width:n.progress_image.width,height:n.progress_image.height,draggable:!1,"data-testid":"progress-image",sx:{objectFit:"contain",maxWidth:"full",maxHeight:"full",height:"auto",position:"absolute",borderRadius:"base",imageRendering:o?"auto":"pixelated"}}):a.jsx(il,{imageDTO:m,droppableData:b,draggableData:g,isUploadDisabled:!0,fitContainer:!0,useThumbailFallback:!0,dropLabel:S("gallery.setCurrentImage"),noContentFallback:a.jsx(qr,{icon:Ql,label:"No image selected"}),dataTestId:"image-preview"}),e&&m&&a.jsx(Te,{sx:{position:"absolute",top:"0",width:"full",height:"full",borderRadius:"base"},children:a.jsx(npe,{image:m})}),a.jsx(yo,{children:!e&&m&&y&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:"0",width:"100%",height:"100%",pointerEvents:"none"},children:a.jsx(OR,{})},"nextPrevButtons")})]})},ape=l.memo(spe),ipe=()=>a.jsxs(N,{sx:{position:"relative",flexDirection:"column",height:"100%",width:"100%",rowGap:4,alignItems:"center",justifyContent:"center"},children:[a.jsx(Qfe,{}),a.jsx(ape,{})]}),lpe=l.memo(ipe),cpe=()=>a.jsx(Te,{layerStyle:"first",sx:{position:"relative",width:"100%",height:"100%",p:2,borderRadius:"base"},children:a.jsx(N,{sx:{width:"100%",height:"100%"},children:a.jsx(lpe,{})})}),RR=l.memo(cpe),upe=()=>{const e=l.useRef(null),t=l.useCallback(()=>{e.current&&e.current.setLayout([50,50])},[]),n=N2();return a.jsx(Te,{sx:{w:"full",h:"full"},children:a.jsxs(g0,{ref:e,autoSaveId:"imageTab.content",direction:"horizontal",style:{height:"100%",width:"100%"},storage:n,units:"percentages",children:[a.jsx(Zi,{id:"imageTab.content.initImage",order:0,defaultSize:50,minSize:25,style:{position:"relative"},children:a.jsx(Bfe,{})}),a.jsx(Zm,{onDoubleClick:t}),a.jsx(Zi,{id:"imageTab.content.selectedImage",order:1,defaultSize:50,minSize:25,children:a.jsx(RR,{})})]})})},dpe=l.memo(upe);var fpe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const $_=hf(fpe);function lx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var ppe=Object.defineProperty,L_=Object.getOwnPropertySymbols,hpe=Object.prototype.hasOwnProperty,mpe=Object.prototype.propertyIsEnumerable,z_=(e,t,n)=>t in e?ppe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gpe=(e,t)=>{for(var n in t||(t={}))hpe.call(t,n)&&z_(e,n,t[n]);if(L_)for(var n of L_(t))mpe.call(t,n)&&z_(e,n,t[n]);return e};function AR(e,t){if(t===null||typeof t!="object")return{};const n=gpe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const vpe="__MANTINE_FORM_INDEX__";function F_(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${vpe}`)):!1:!1}function B_(e,t,n){typeof n.value=="object"&&(n.value=Qc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Qc(e){if(typeof e!="object")return e;var t=0,n,r,o,s=Object.prototype.toString.call(e);if(s==="[object Object]"?o=Object.create(e.__proto__||null):s==="[object Array]"?o=Array(e.length):s==="[object Set]"?(o=new Set,e.forEach(function(i){o.add(Qc(i))})):s==="[object Map]"?(o=new Map,e.forEach(function(i,c){o.set(Qc(c),Qc(i))})):s==="[object Date]"?o=new Date(+e):s==="[object RegExp]"?o=new RegExp(e.source,e.flags):s==="[object DataView]"?o=new e.constructor(Qc(e.buffer)):s==="[object ArrayBuffer]"?o=e.slice(0):s.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function cx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,s)=>{const i=e[s],c=`${n===""?"":`${n}.`}${s}`,d=ni(c,t);let p=!1;return typeof i=="function"&&(o[c]=i(d,t,c)),typeof i=="object"&&Array.isArray(d)&&(p=!0,d.forEach((h,m)=>cx(i,t,`${c}.${m}`,o))),typeof i=="object"&&typeof d=="object"&&d!==null&&(p||cx(i,t,c,o)),o},r)}function ux(e,t){return H_(typeof e=="function"?e(t):cx(e,t))}function yh(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=ux(t,n),o=Object.keys(r.errors).find(s=>e.split(".").every((i,c)=>i===s.split(".")[c]));return{hasError:!!o,error:o?r.errors[o]:null}}function bpe(e,{from:t,to:n},r){const o=ni(e,r);if(!Array.isArray(o))return r;const s=[...o],i=o[t];return s.splice(t,1),s.splice(n,0,i),S0(e,s,r)}var xpe=Object.defineProperty,W_=Object.getOwnPropertySymbols,ype=Object.prototype.hasOwnProperty,Cpe=Object.prototype.propertyIsEnumerable,V_=(e,t,n)=>t in e?xpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wpe=(e,t)=>{for(var n in t||(t={}))ype.call(t,n)&&V_(e,n,t[n]);if(W_)for(var n of W_(t))Cpe.call(t,n)&&V_(e,n,t[n]);return e};function Spe(e,{from:t,to:n},r){const o=`${e}.${t}`,s=`${e}.${n}`,i=wpe({},r);return Object.keys(r).every(c=>{let d,p;if(c.startsWith(o)&&(d=c,p=c.replace(o,s)),c.startsWith(s)&&(d=c.replace(s,o),p=c),d&&p){const h=i[d],m=i[p];return m===void 0?delete i[d]:i[d]=m,h===void 0?delete i[p]:i[p]=h,!1}return!0}),i}function kpe(e,t,n){const r=ni(e,n);return Array.isArray(r)?S0(e,r.filter((o,s)=>s!==t),n):n}var jpe=Object.defineProperty,U_=Object.getOwnPropertySymbols,_pe=Object.prototype.hasOwnProperty,Ipe=Object.prototype.propertyIsEnumerable,G_=(e,t,n)=>t in e?jpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ppe=(e,t)=>{for(var n in t||(t={}))_pe.call(t,n)&&G_(e,n,t[n]);if(U_)for(var n of U_(t))Ipe.call(t,n)&&G_(e,n,t[n]);return e};function q_(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function K_(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let s=n;r===-1&&(s=AR(`${o}.${t}`,s));const i=Ppe({},s),c=new Set;return Object.entries(s).filter(([d])=>{if(!d.startsWith(`${o}.`))return!1;const p=q_(d,o);return Number.isNaN(p)?!1:p>=t}).forEach(([d,p])=>{const h=q_(d,o),m=d.replace(`${o}.${h}`,`${o}.${h+r}`);i[m]=p,c.add(m),c.has(d)||delete i[d]}),i}function Epe(e,t,n,r){const o=ni(e,r);if(!Array.isArray(o))return r;const s=[...o];return s.splice(typeof n=="number"?n:s.length,0,t),S0(e,s,r)}function Q_(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function Mpe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var Ope=Object.defineProperty,Rpe=Object.defineProperties,Ape=Object.getOwnPropertyDescriptors,X_=Object.getOwnPropertySymbols,Dpe=Object.prototype.hasOwnProperty,Tpe=Object.prototype.propertyIsEnumerable,Y_=(e,t,n)=>t in e?Ope(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fi=(e,t)=>{for(var n in t||(t={}))Dpe.call(t,n)&&Y_(e,n,t[n]);if(X_)for(var n of X_(t))Tpe.call(t,n)&&Y_(e,n,t[n]);return e},O1=(e,t)=>Rpe(e,Ape(t));function cc({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:s=!1,validateInputOnBlur:i=!1,transformValues:c=p=>p,validate:d}={}){const[p,h]=l.useState(r),[m,g]=l.useState(n),[b,y]=l.useState(e),[x,C]=l.useState(lx(t)),S=l.useRef(e),j=V=>{S.current=V},_=l.useCallback(()=>h({}),[]),I=V=>{const F=V?Fi(Fi({},b),V):b;j(F),g({})},P=l.useCallback(V=>C(F=>lx(typeof V=="function"?V(F):V)),[]),M=l.useCallback(()=>C({}),[]),R=l.useCallback(()=>{y(e),M(),j(e),g({}),_()},[]),A=l.useCallback((V,F)=>P(X=>O1(Fi({},X),{[V]:F})),[]),D=l.useCallback(V=>P(F=>{if(typeof V!="string")return F;const X=Fi({},F);return delete X[V],X}),[]),O=l.useCallback(V=>g(F=>{if(typeof V!="string")return F;const X=AR(V,F);return delete X[V],X}),[]),T=l.useCallback((V,F)=>{const X=F_(V,s);O(V),h(ue=>O1(Fi({},ue),{[V]:!0})),y(ue=>{const q=S0(V,F,ue);if(X){const ne=yh(V,d,q);ne.hasError?A(V,ne.error):D(V)}return q}),!X&&o&&A(V,null)},[]),Y=l.useCallback(V=>{y(F=>{const X=typeof V=="function"?V(F):V;return Fi(Fi({},F),X)}),o&&M()},[]),z=l.useCallback((V,F)=>{O(V),y(X=>bpe(V,F,X)),C(X=>Spe(V,F,X))},[]),W=l.useCallback((V,F)=>{O(V),y(X=>kpe(V,F,X)),C(X=>K_(V,F,X,-1))},[]),Q=l.useCallback((V,F,X)=>{O(V),y(ue=>Epe(V,F,X,ue)),C(ue=>K_(V,X,ue,1))},[]),U=l.useCallback(()=>{const V=ux(d,b);return C(V.errors),V},[b,d]),L=l.useCallback(V=>{const F=yh(V,d,b);return F.hasError?A(V,F.error):D(V),F},[b,d]),ee=(V,{type:F="input",withError:X=!0,withFocus:ue=!0}={})=>{const ne={onChange:Mpe(pe=>T(V,pe))};return X&&(ne.error=x[V]),F==="checkbox"?ne.checked=ni(V,b):ne.value=ni(V,b),ue&&(ne.onFocus=()=>h(pe=>O1(Fi({},pe),{[V]:!0})),ne.onBlur=()=>{if(F_(V,i)){const pe=yh(V,d,b);pe.hasError?A(V,pe.error):D(V)}}),ne},K=(V,F)=>X=>{X==null||X.preventDefault();const ue=U();ue.hasErrors?F==null||F(ue.errors,b,X):V==null||V(c(b),X)},Z=V=>c(V||b),se=l.useCallback(V=>{V.preventDefault(),R()},[]),fe=V=>{if(V){const X=ni(V,m);if(typeof X=="boolean")return X;const ue=ni(V,b),q=ni(V,S.current);return!$_(ue,q)}return Object.keys(m).length>0?Q_(m):!$_(b,S.current)},G=l.useCallback(V=>Q_(p,V),[p]),te=l.useCallback(V=>V?!yh(V,d,b).hasError:!ux(d,b).hasErrors,[b,d]);return{values:b,errors:x,setValues:Y,setErrors:P,setFieldValue:T,setFieldError:A,clearFieldError:D,clearErrors:M,reset:R,validate:U,validateField:L,reorderListItem:z,removeListItem:W,insertListItem:Q,getInputProps:ee,onSubmit:K,onReset:se,isDirty:fe,isTouched:G,setTouched:h,setDirty:g,resetTouched:_,resetDirty:I,isValid:te,getTransformedValues:Z}}function Mr(e){const{...t}=e,{base50:n,base100:r,base200:o,base300:s,base800:i,base700:c,base900:d,accent500:p,accent300:h}=Hf(),{colorMode:m}=wi(),g=l.useCallback(()=>({input:{color:Ke(d,r)(m),backgroundColor:Ke(n,d)(m),borderColor:Ke(o,i)(m),borderWidth:2,outline:"none",":focus":{borderColor:Ke(h,p)(m)}},label:{color:Ke(c,s)(m),fontWeight:"normal",marginBottom:4}}),[h,p,r,o,s,n,c,i,d,m]);return a.jsx(MM,{styles:g,...t})}const Npe=[{value:"sd-1",label:gr["sd-1"]},{value:"sd-2",label:gr["sd-2"]},{value:"sdxl",label:gr.sdxl},{value:"sdxl-refiner",label:gr["sdxl-refiner"]}];function Qf(e){const{...t}=e,{t:n}=J();return a.jsx(Ar,{label:n("modelManager.baseModel"),data:Npe,...t})}function TR(e){const{data:t}=pP(),{...n}=e;return a.jsx(Ar,{label:"Config File",placeholder:"Select A Config File",data:t||[],...n})}const $pe=[{value:"normal",label:"Normal"},{value:"inpaint",label:"Inpaint"},{value:"depth",label:"Depth"}];function k0(e){const{...t}=e,{t:n}=J();return a.jsx(Ar,{label:n("modelManager.variant"),data:$pe,...t})}function ng(e,t=!0){let n;t?n=new RegExp("[^\\\\/]+(?=\\.)"):n=new RegExp("[^\\\\/]+(?=[\\\\/]?$)");const r=e.match(n);return r?r[0]:""}function NR(e){const{t}=J(),n=oe(),{model_path:r}=e,o=cc({initialValues:{model_name:r?ng(r):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"checkpoint",error:void 0,vae:"",variant:"normal",config:"configs\\stable-diffusion\\v1-inference.yaml"}}),[s]=hP(),[i,c]=l.useState(!1),d=m=>{s({body:m}).unwrap().then(g=>{n(Bt(Zn({title:t("modelManager.modelAdded",{modelName:m.model_name}),status:"success"}))),o.reset(),r&&n(xf(null))}).catch(g=>{g&&n(Bt(Zn({title:t("toast.modelAddFailed"),status:"error"})))})},p=l.useCallback(m=>{if(o.values.model_name===""){const g=ng(m.currentTarget.value);g&&o.setFieldValue("model_name",g)}},[o]),h=l.useCallback(()=>c(m=>!m),[]);return a.jsx("form",{onSubmit:o.onSubmit(m=>d(m)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Mr,{label:t("modelManager.model"),required:!0,...o.getInputProps("model_name")}),a.jsx(Qf,{label:t("modelManager.baseModel"),...o.getInputProps("base_model")}),a.jsx(Mr,{label:t("modelManager.modelLocation"),required:!0,...o.getInputProps("path"),onBlur:p}),a.jsx(Mr,{label:t("modelManager.description"),...o.getInputProps("description")}),a.jsx(Mr,{label:t("modelManager.vaeLocation"),...o.getInputProps("vae")}),a.jsx(k0,{label:t("modelManager.variant"),...o.getInputProps("variant")}),a.jsxs(N,{flexDirection:"column",width:"100%",gap:2,children:[i?a.jsx(Mr,{required:!0,label:t("modelManager.customConfigFileLocation"),...o.getInputProps("config")}):a.jsx(TR,{required:!0,width:"100%",...o.getInputProps("config")}),a.jsx(Io,{isChecked:i,onChange:h,label:t("modelManager.useCustomConfig")}),a.jsx(Rt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})]})})}function $R(e){const{t}=J(),n=oe(),{model_path:r}=e,[o]=hP(),s=cc({initialValues:{model_name:r?ng(r,!1):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"diffusers",error:void 0,vae:"",variant:"normal"}}),i=d=>{o({body:d}).unwrap().then(p=>{n(Bt(Zn({title:t("modelManager.modelAdded",{modelName:d.model_name}),status:"success"}))),s.reset(),r&&n(xf(null))}).catch(p=>{p&&n(Bt(Zn({title:t("toast.modelAddFailed"),status:"error"})))})},c=l.useCallback(d=>{if(s.values.model_name===""){const p=ng(d.currentTarget.value,!1);p&&s.setFieldValue("model_name",p)}},[s]);return a.jsx("form",{onSubmit:s.onSubmit(d=>i(d)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Mr,{required:!0,label:t("modelManager.model"),...s.getInputProps("model_name")}),a.jsx(Qf,{label:t("modelManager.baseModel"),...s.getInputProps("base_model")}),a.jsx(Mr,{required:!0,label:t("modelManager.modelLocation"),placeholder:t("modelManager.modelLocationValidationMsg"),...s.getInputProps("path"),onBlur:c}),a.jsx(Mr,{label:t("modelManager.description"),...s.getInputProps("description")}),a.jsx(Mr,{label:t("modelManager.vaeLocation"),...s.getInputProps("vae")}),a.jsx(k0,{label:t("modelManager.variant"),...s.getInputProps("variant")}),a.jsx(Rt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})})}const LR=[{label:"Diffusers",value:"diffusers"},{label:"Checkpoint / Safetensors",value:"checkpoint"}];function Lpe(){const[e,t]=l.useState("diffusers"),{t:n}=J(),r=l.useCallback(o=>{o&&t(o)},[]);return a.jsxs(N,{flexDirection:"column",gap:4,width:"100%",children:[a.jsx(Ar,{label:n("modelManager.modelType"),value:e,data:LR,onChange:r}),a.jsxs(N,{sx:{p:4,borderRadius:4,bg:"base.300",_dark:{bg:"base.850"}},children:[e==="diffusers"&&a.jsx($R,{}),e==="checkpoint"&&a.jsx(NR,{})]})]})}const zpe=[{label:"None",value:"none"},{label:"v_prediction",value:"v_prediction"},{label:"epsilon",value:"epsilon"},{label:"sample",value:"sample"}];function Fpe(){const e=oe(),{t}=J(),[n,{isLoading:r}]=mP(),o=cc({initialValues:{location:"",prediction_type:void 0}}),s=i=>{const c={location:i.location,prediction_type:i.prediction_type==="none"?void 0:i.prediction_type};n({body:c}).unwrap().then(d=>{e(Bt(Zn({title:t("toast.modelAddedSimple"),status:"success"}))),o.reset()}).catch(d=>{d&&e(Bt(Zn({title:`${d.data.detail} `,status:"error"})))})};return a.jsx("form",{onSubmit:o.onSubmit(i=>s(i)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",width:"100%",gap:4,children:[a.jsx(Mr,{label:t("modelManager.modelLocation"),placeholder:t("modelManager.simpleModelDesc"),w:"100%",...o.getInputProps("location")}),a.jsx(Ar,{label:t("modelManager.predictionType"),data:zpe,defaultValue:"none",...o.getInputProps("prediction_type")}),a.jsx(Rt,{type:"submit",isLoading:r,children:t("modelManager.addModel")})]})})}function Bpe(){const[e,t]=l.useState("simple"),n=l.useCallback(()=>t("simple"),[]),r=l.useCallback(()=>t("advanced"),[]);return a.jsxs(N,{flexDirection:"column",width:"100%",overflow:"scroll",maxHeight:window.innerHeight-250,gap:4,children:[a.jsxs(zn,{isAttached:!0,children:[a.jsx(Rt,{size:"sm",isChecked:e=="simple",onClick:n,children:"Simple"}),a.jsx(Rt,{size:"sm",isChecked:e=="advanced",onClick:r,children:"Advanced"})]}),a.jsxs(N,{sx:{p:4,borderRadius:4,background:"base.200",_dark:{background:"base.800"}},children:[e==="simple"&&a.jsx(Fpe,{}),e==="advanced"&&a.jsx(Lpe,{})]})]})}function Hpe(e){const{...t}=e;return a.jsx(SE,{w:"100%",...t,children:e.children})}function Wpe(){const e=H(C=>C.modelmanager.searchFolder),[t,n]=l.useState(""),{data:r}=na(Ol),{foundModels:o,alreadyInstalled:s,filteredModels:i}=gP({search_path:e||""},{selectFromResult:({data:C})=>{const S=x$(r==null?void 0:r.entities),j=Ro(S,"path"),_=h$(C,j),I=k$(C,j);return{foundModels:C,alreadyInstalled:J_(I,t),filteredModels:J_(_,t)}}}),[c,{isLoading:d}]=mP(),p=oe(),{t:h}=J(),m=l.useCallback(C=>{const S=C.currentTarget.id.split("\\").splice(-1)[0];c({body:{location:C.currentTarget.id}}).unwrap().then(j=>{p(Bt(Zn({title:`Added Model: ${S}`,status:"success"})))}).catch(j=>{j&&p(Bt(Zn({title:h("toast.modelAddFailed"),status:"error"})))})},[p,c,h]),g=l.useCallback(C=>{n(C.target.value)},[]),b=l.useCallback(C=>p(xf(C)),[p]),y=({models:C,showActions:S=!0})=>C.map(j=>a.jsxs(N,{sx:{p:4,gap:4,alignItems:"center",borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{w:"100%",sx:{flexDirection:"column",minW:"25%"},children:[a.jsx(Se,{sx:{fontWeight:600},children:j.split("\\").slice(-1)[0]}),a.jsx(Se,{sx:{fontSize:"sm",color:"base.600",_dark:{color:"base.400"}},children:j})]}),S?a.jsxs(N,{gap:2,children:[a.jsx(Rt,{id:j,onClick:m,isLoading:d,children:h("modelManager.quickAdd")}),a.jsx(Rt,{onClick:b.bind(null,j),isLoading:d,children:h("modelManager.advanced")})]}):a.jsx(Se,{sx:{fontWeight:600,p:2,borderRadius:4,color:"accent.50",bg:"accent.400",_dark:{color:"accent.100",bg:"accent.600"}},children:"Installed"})]},j));return(()=>e?!o||o.length===0?a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",height:96,userSelect:"none",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(Se,{variant:"subtext",children:h("modelManager.noModels")})}):a.jsxs(N,{sx:{flexDirection:"column",gap:2,w:"100%",minW:"50%"},children:[a.jsx(Cs,{onChange:g,label:h("modelManager.search"),labelPos:"side"}),a.jsxs(N,{p:2,gap:2,children:[a.jsxs(Se,{sx:{fontWeight:600},children:["Models Found: ",o.length]}),a.jsxs(Se,{sx:{fontWeight:600,color:"accent.500",_dark:{color:"accent.200"}},children:["Not Installed: ",i.length]})]}),a.jsx(Hpe,{offsetScrollbars:!0,children:a.jsxs(N,{gap:2,flexDirection:"column",children:[y({models:i}),y({models:s,showActions:!1})]})})]}):null)()}const J_=(e,t)=>{const n=[];return Kr(e,r=>{if(!r)return null;r.includes(t)&&n.push(r)}),n};function Vpe(){const e=H(p=>p.modelmanager.advancedAddScanModel),{t}=J(),[n,r]=l.useState("diffusers"),[o,s]=l.useState(!0);l.useEffect(()=>{e&&[".ckpt",".safetensors",".pth",".pt"].some(p=>e.endsWith(p))?r("checkpoint"):r("diffusers")},[e,r,o]);const i=oe(),c=l.useCallback(()=>i(xf(null)),[i]),d=l.useCallback(p=>{p&&(r(p),s(p==="checkpoint"))},[]);return e?a.jsxs(Te,{as:Or.div,initial:{x:-100,opacity:0},animate:{x:0,opacity:1,transition:{duration:.2}},sx:{display:"flex",flexDirection:"column",minWidth:"40%",maxHeight:window.innerHeight-300,overflow:"scroll",p:4,gap:4,borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsx(Se,{size:"xl",fontWeight:600,children:o||n==="checkpoint"?"Add Checkpoint Model":"Add Diffusers Model"}),a.jsx(tt,{icon:a.jsx(ju,{}),"aria-label":t("modelManager.closeAdvanced"),onClick:c,size:"sm"})]}),a.jsx(Ar,{label:t("modelManager.modelType"),value:n,data:LR,onChange:d}),o?a.jsx(NR,{model_path:e},e):a.jsx($R,{model_path:e},e)]}):null}function Upe(){const e=oe(),{t}=J(),n=H(d=>d.modelmanager.searchFolder),{refetch:r}=gP({search_path:n||""}),o=cc({initialValues:{folder:""}}),s=l.useCallback(d=>{e(lS(d.folder))},[e]),i=l.useCallback(()=>{r()},[r]),c=l.useCallback(()=>{e(lS(null)),e(xf(null))},[e]);return a.jsx("form",{onSubmit:o.onSubmit(d=>s(d)),style:{width:"100%"},children:a.jsxs(N,{sx:{w:"100%",gap:2,borderRadius:4,alignItems:"center"},children:[a.jsxs(N,{w:"100%",alignItems:"center",gap:4,minH:12,children:[a.jsx(Se,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",minW:"max-content",_dark:{color:"base.300"}},children:"Folder"}),n?a.jsx(N,{sx:{w:"100%",p:2,px:4,bg:"base.300",borderRadius:4,fontSize:"sm",fontWeight:"bold",_dark:{bg:"base.700"}},children:n}):a.jsx(Cs,{w:"100%",size:"md",...o.getInputProps("folder")})]}),a.jsxs(N,{gap:2,children:[n?a.jsx(tt,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:a.jsx(Xg,{}),onClick:i,fontSize:18,size:"sm"}):a.jsx(tt,{"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),icon:a.jsx(See,{}),fontSize:18,size:"sm",type:"submit"}),a.jsx(tt,{"aria-label":t("modelManager.clearCheckpointFolder"),tooltip:t("modelManager.clearCheckpointFolder"),icon:a.jsx(qo,{}),size:"sm",onClick:c,isDisabled:!n,colorScheme:"red"})]})]})})}const Gpe=l.memo(Upe);function qpe(){return a.jsxs(N,{flexDirection:"column",w:"100%",gap:4,children:[a.jsx(Gpe,{}),a.jsxs(N,{gap:4,children:[a.jsx(N,{sx:{maxHeight:window.innerHeight-300,overflow:"scroll",gap:4,w:"100%"},children:a.jsx(Wpe,{})}),a.jsx(Vpe,{})]})]})}function Kpe(){const[e,t]=l.useState("add"),{t:n}=J(),r=l.useCallback(()=>t("add"),[]),o=l.useCallback(()=>t("scan"),[]);return a.jsxs(N,{flexDirection:"column",gap:4,children:[a.jsxs(zn,{isAttached:!0,children:[a.jsx(Rt,{onClick:r,isChecked:e=="add",size:"sm",width:"100%",children:n("modelManager.addModel")}),a.jsx(Rt,{onClick:o,isChecked:e=="scan",size:"sm",width:"100%",children:n("modelManager.scanForModels")})]}),e=="add"&&a.jsx(Bpe,{}),e=="scan"&&a.jsx(qpe,{})]})}const Qpe=[{label:"Stable Diffusion 1",value:"sd-1"},{label:"Stable Diffusion 2",value:"sd-2"}];function Xpe(){var X,ue;const{t:e}=J(),t=oe(),{data:n}=na(Ol),[r,{isLoading:o}]=ZT(),[s,i]=l.useState("sd-1"),c=CS(n==null?void 0:n.entities,(q,ne)=>(q==null?void 0:q.model_format)==="diffusers"&&(q==null?void 0:q.base_model)==="sd-1"),d=CS(n==null?void 0:n.entities,(q,ne)=>(q==null?void 0:q.model_format)==="diffusers"&&(q==null?void 0:q.base_model)==="sd-2"),p=l.useMemo(()=>({"sd-1":c,"sd-2":d}),[c,d]),[h,m]=l.useState(((X=Object.keys(p[s]))==null?void 0:X[0])??null),[g,b]=l.useState(((ue=Object.keys(p[s]))==null?void 0:ue[1])??null),[y,x]=l.useState(null),[C,S]=l.useState(""),[j,_]=l.useState(.5),[I,P]=l.useState("weighted_sum"),[M,R]=l.useState("root"),[A,D]=l.useState(""),[O,T]=l.useState(!1),Y=Object.keys(p[s]).filter(q=>q!==g&&q!==y),z=Object.keys(p[s]).filter(q=>q!==h&&q!==y),W=Object.keys(p[s]).filter(q=>q!==h&&q!==g),Q=l.useCallback(q=>{i(q),m(null),b(null)},[]),U=l.useCallback(q=>{m(q)},[]),L=l.useCallback(q=>{b(q)},[]),ee=l.useCallback(q=>{q?(x(q),P("weighted_sum")):(x(null),P("add_difference"))},[]),K=l.useCallback(q=>S(q.target.value),[]),Z=l.useCallback(q=>_(q),[]),se=l.useCallback(()=>_(.5),[]),fe=l.useCallback(q=>P(q),[]),G=l.useCallback(q=>R(q),[]),te=l.useCallback(q=>D(q.target.value),[]),V=l.useCallback(q=>T(q.target.checked),[]),F=l.useCallback(()=>{const q=[];let ne=[h,g,y];ne=ne.filter(le=>le!==null),ne.forEach(le=>{var ve;const we=(ve=le==null?void 0:le.split("/"))==null?void 0:ve[2];we&&q.push(we)});const pe={model_names:q,merged_model_name:C!==""?C:q.join("-"),alpha:j,interp:I,force:O,merge_dest_directory:M==="root"?void 0:A};r({base_model:s,body:{body:pe}}).unwrap().then(le=>{t(Bt(Zn({title:e("modelManager.modelsMerged"),status:"success"})))}).catch(le=>{le&&t(Bt(Zn({title:e("modelManager.modelsMergeFailed"),status:"error"})))})},[s,t,r,C,j,A,O,I,M,h,y,g,e]);return a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsxs(N,{sx:{flexDirection:"column",rowGap:1},children:[a.jsx(Se,{children:e("modelManager.modelMergeHeaderHelp1")}),a.jsx(Se,{fontSize:"sm",variant:"subtext",children:e("modelManager.modelMergeHeaderHelp2")})]}),a.jsxs(N,{columnGap:4,children:[a.jsx(Ar,{label:"Model Type",w:"100%",data:Qpe,value:s,onChange:Q}),a.jsx(tr,{label:e("modelManager.modelOne"),w:"100%",value:h,placeholder:e("modelManager.selectModel"),data:Y,onChange:U}),a.jsx(tr,{label:e("modelManager.modelTwo"),w:"100%",placeholder:e("modelManager.selectModel"),value:g,data:z,onChange:L}),a.jsx(tr,{label:e("modelManager.modelThree"),data:W,w:"100%",placeholder:e("modelManager.selectModel"),clearable:!0,onChange:ee})]}),a.jsx(Cs,{label:e("modelManager.mergedModelName"),value:C,onChange:K}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(Pt,{label:e("modelManager.alpha"),min:.01,max:.99,step:.01,value:j,onChange:Z,withInput:!0,withReset:!0,handleReset:se,withSliderMarks:!0}),a.jsx(Se,{variant:"subtext",fontSize:"sm",children:e("modelManager.modelMergeAlphaHelp")})]}),a.jsxs(N,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(Se,{fontWeight:500,fontSize:"sm",variant:"subtext",children:e("modelManager.interpolationType")}),a.jsx(em,{value:I,onChange:fe,children:a.jsx(N,{columnGap:4,children:y===null?a.jsxs(a.Fragment,{children:[a.jsx(Za,{value:"weighted_sum",children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.weightedSum")})}),a.jsx(Za,{value:"sigmoid",children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.sigmoid")})}),a.jsx(Za,{value:"inv_sigmoid",children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.inverseSigmoid")})})]}):a.jsx(Za,{value:"add_difference",children:a.jsx(Fn,{label:e("modelManager.modelMergeInterpAddDifferenceHelp"),children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.addDifference")})})})})})]}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.900"}},children:[a.jsxs(N,{columnGap:4,children:[a.jsx(Se,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:e("modelManager.mergedModelSaveLocation")}),a.jsx(em,{value:M,onChange:G,children:a.jsxs(N,{columnGap:4,children:[a.jsx(Za,{value:"root",children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.invokeAIFolder")})}),a.jsx(Za,{value:"custom",children:a.jsx(Se,{fontSize:"sm",children:e("modelManager.custom")})})]})})]}),M==="custom"&&a.jsx(Cs,{label:e("modelManager.mergedModelCustomSaveLocation"),value:A,onChange:te})]}),a.jsx(Io,{label:e("modelManager.ignoreMismatch"),isChecked:O,onChange:V,fontWeight:"500"}),a.jsx(Rt,{onClick:F,isLoading:o,isDisabled:h===null||g===null,children:e("modelManager.merge")})]})}function Ype(e){const{model:t}=e,n=oe(),{t:r}=J(),[o,{isLoading:s}]=eN(),[i,c]=l.useState("InvokeAIRoot"),[d,p]=l.useState("");l.useEffect(()=>{c("InvokeAIRoot")},[t]);const h=l.useCallback(()=>{c("InvokeAIRoot")},[]),m=l.useCallback(y=>{c(y)},[]),g=l.useCallback(y=>{p(y.target.value)},[]),b=l.useCallback(()=>{const y={base_model:t.base_model,model_name:t.model_name,convert_dest_directory:i==="Custom"?d:void 0};if(i==="Custom"&&d===""){n(Bt(Zn({title:r("modelManager.noCustomLocationProvided"),status:"error"})));return}n(Bt(Zn({title:`${r("modelManager.convertingModelBegin")}: ${t.model_name}`,status:"info"}))),o(y).unwrap().then(()=>{n(Bt(Zn({title:`${r("modelManager.modelConverted")}: ${t.model_name}`,status:"success"})))}).catch(()=>{n(Bt(Zn({title:`${r("modelManager.modelConversionFailed")}: ${t.model_name}`,status:"error"})))})},[o,d,n,t.base_model,t.model_name,i,r]);return a.jsxs(p0,{title:`${r("modelManager.convert")} ${t.model_name}`,acceptCallback:b,cancelCallback:h,acceptButtonText:`${r("modelManager.convert")}`,triggerComponent:a.jsxs(Rt,{size:"sm","aria-label":r("modelManager.convertToDiffusers"),className:" modal-close-btn",isLoading:s,children:["🧨 ",r("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsx(Se,{children:r("modelManager.convertToDiffusersHelpText1")}),a.jsxs(Mf,{children:[a.jsx(ws,{children:r("modelManager.convertToDiffusersHelpText2")}),a.jsx(ws,{children:r("modelManager.convertToDiffusersHelpText3")}),a.jsx(ws,{children:r("modelManager.convertToDiffusersHelpText4")}),a.jsx(ws,{children:r("modelManager.convertToDiffusersHelpText5")})]}),a.jsx(Se,{children:r("modelManager.convertToDiffusersHelpText6")})]}),a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsxs(N,{marginTop:4,flexDir:"column",gap:2,children:[a.jsx(Se,{fontWeight:"600",children:r("modelManager.convertToDiffusersSaveLocation")}),a.jsx(em,{value:i,onChange:m,children:a.jsxs(N,{gap:4,children:[a.jsx(Za,{value:"InvokeAIRoot",children:a.jsx(Fn,{label:"Save converted model in the InvokeAI root folder",children:r("modelManager.invokeRoot")})}),a.jsx(Za,{value:"Custom",children:a.jsx(Fn,{label:"Save converted model in a custom folder",children:r("modelManager.custom")})})]})})]}),i==="Custom"&&a.jsxs(N,{flexDirection:"column",rowGap:2,children:[a.jsx(Se,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:r("modelManager.customSaveLocation")}),a.jsx(Cs,{value:d,onChange:g,width:"full"})]})]})]})}function Jpe(e){const{model:t}=e,[n,{isLoading:r}]=vP(),{data:o}=pP(),[s,i]=l.useState(!1);l.useEffect(()=>{o!=null&&o.includes(t.config)||i(!0)},[o,t.config]);const c=oe(),{t:d}=J(),p=cc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"checkpoint",vae:t.vae?t.vae:"",config:t.config?t.config:"",variant:t.variant},validate:{path:g=>g.trim().length===0?"Must provide a path":null}}),h=l.useCallback(()=>i(g=>!g),[]),m=l.useCallback(g=>{const b={base_model:t.base_model,model_name:t.model_name,body:g};n(b).unwrap().then(y=>{p.setValues(y),c(Bt(Zn({title:d("modelManager.modelUpdated"),status:"success"})))}).catch(y=>{p.reset(),c(Bt(Zn({title:d("modelManager.modelUpdateFailed"),status:"error"})))})},[p,c,t.base_model,t.model_name,d,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(Se,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(Se,{fontSize:"sm",color:"base.400",children:[gr[t.base_model]," Model"]})]}),[""].includes(t.base_model)?a.jsx(Ha,{sx:{p:2,borderRadius:4,bg:"error.200",_dark:{bg:"error.400"}},children:"Conversion Not Supported"}):a.jsx(Ype,{model:t})]}),a.jsx(no,{}),a.jsx(N,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",children:a.jsx("form",{onSubmit:p.onSubmit(g=>m(g)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Mr,{label:d("modelManager.name"),...p.getInputProps("model_name")}),a.jsx(Mr,{label:d("modelManager.description"),...p.getInputProps("description")}),a.jsx(Qf,{required:!0,...p.getInputProps("base_model")}),a.jsx(k0,{required:!0,...p.getInputProps("variant")}),a.jsx(Mr,{required:!0,label:d("modelManager.modelLocation"),...p.getInputProps("path")}),a.jsx(Mr,{label:d("modelManager.vaeLocation"),...p.getInputProps("vae")}),a.jsxs(N,{flexDirection:"column",gap:2,children:[s?a.jsx(Mr,{required:!0,label:d("modelManager.config"),...p.getInputProps("config")}):a.jsx(TR,{required:!0,...p.getInputProps("config")}),a.jsx(Io,{isChecked:s,onChange:h,label:"Use Custom Config"})]}),a.jsx(Rt,{type:"submit",isLoading:r,children:d("modelManager.updateModel")})]})})})]})}function Zpe(e){const{model:t}=e,[n,{isLoading:r}]=vP(),o=oe(),{t:s}=J(),i=cc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"diffusers",vae:t.vae?t.vae:"",variant:t.variant},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Bt(Zn({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Bt(Zn({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[i,o,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(Se,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(Se,{fontSize:"sm",color:"base.400",children:[gr[t.base_model]," Model"]})]}),a.jsx(no,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Mr,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Mr,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(Qf,{required:!0,...i.getInputProps("base_model")}),a.jsx(k0,{required:!0,...i.getInputProps("variant")}),a.jsx(Mr,{required:!0,label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Mr,{label:s("modelManager.vaeLocation"),...i.getInputProps("vae")}),a.jsx(Rt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function ehe(e){const{model:t}=e,[n,{isLoading:r}]=tN(),o=oe(),{t:s}=J(),i=cc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"lora",path:t.path?t.path:"",description:t.description?t.description:"",model_format:t.model_format},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Bt(Zn({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Bt(Zn({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[o,i,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(Se,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(Se,{fontSize:"sm",color:"base.400",children:[gr[t.base_model]," Model ⋅"," ",nN[t.model_format]," format"]})]}),a.jsx(no,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Mr,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Mr,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(Qf,{...i.getInputProps("base_model")}),a.jsx(Mr,{label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Rt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function the(e){const{t}=J(),n=oe(),[r]=rN(),[o]=oN(),{model:s,isSelected:i,setSelectedModelId:c}=e,d=l.useCallback(()=>{c(s.id)},[s.id,c]),p=l.useCallback(()=>{const h={main:r,lora:o,onnx:r}[s.model_type];h(s).unwrap().then(m=>{n(Bt(Zn({title:`${t("modelManager.modelDeleted")}: ${s.model_name}`,status:"success"})))}).catch(m=>{m&&n(Bt(Zn({title:`${t("modelManager.modelDeleteFailed")}: ${s.model_name}`,status:"error"})))}),c(void 0)},[r,o,s,c,n,t]);return a.jsxs(N,{sx:{gap:2,alignItems:"center",w:"full"},children:[a.jsx(N,{as:Rt,isChecked:i,sx:{justifyContent:"start",p:2,borderRadius:"base",w:"full",alignItems:"center",bg:i?"accent.400":"base.100",color:i?"base.50":"base.800",_hover:{bg:i?"accent.500":"base.300",color:i?"base.50":"base.800"},_dark:{color:i?"base.50":"base.100",bg:i?"accent.600":"base.850",_hover:{color:i?"base.50":"base.100",bg:i?"accent.550":"base.700"}}},onClick:d,children:a.jsxs(N,{gap:4,alignItems:"center",children:[a.jsx(Ha,{minWidth:14,p:.5,fontSize:"sm",variant:"solid",children:sN[s.base_model]}),a.jsx(Fn,{label:s.description,hasArrow:!0,placement:"bottom",children:a.jsx(Se,{sx:{fontWeight:500},children:s.model_name})})]})}),a.jsx(p0,{title:t("modelManager.deleteModel"),acceptCallback:p,acceptButtonText:t("modelManager.delete"),triggerComponent:a.jsx(tt,{icon:a.jsx(_ne,{}),"aria-label":t("modelManager.deleteConfig"),colorScheme:"error"}),children:a.jsxs(N,{rowGap:4,flexDirection:"column",children:[a.jsx("p",{style:{fontWeight:"bold"},children:t("modelManager.deleteMsg1")}),a.jsx("p",{children:t("modelManager.deleteMsg2")})]})})]})}const nhe=e=>{const{selectedModelId:t,setSelectedModelId:n}=e,{t:r}=J(),[o,s]=l.useState(""),[i,c]=l.useState("all"),{filteredDiffusersModels:d,isLoadingDiffusersModels:p}=na(Ol,{selectFromResult:({data:_,isLoading:I})=>({filteredDiffusersModels:Sd(_,"main","diffusers",o),isLoadingDiffusersModels:I})}),{filteredCheckpointModels:h,isLoadingCheckpointModels:m}=na(Ol,{selectFromResult:({data:_,isLoading:I})=>({filteredCheckpointModels:Sd(_,"main","checkpoint",o),isLoadingCheckpointModels:I})}),{filteredLoraModels:g,isLoadingLoraModels:b}=vf(void 0,{selectFromResult:({data:_,isLoading:I})=>({filteredLoraModels:Sd(_,"lora",void 0,o),isLoadingLoraModels:I})}),{filteredOnnxModels:y,isLoadingOnnxModels:x}=Wd(Ol,{selectFromResult:({data:_,isLoading:I})=>({filteredOnnxModels:Sd(_,"onnx","onnx",o),isLoadingOnnxModels:I})}),{filteredOliveModels:C,isLoadingOliveModels:S}=Wd(Ol,{selectFromResult:({data:_,isLoading:I})=>({filteredOliveModels:Sd(_,"onnx","olive",o),isLoadingOliveModels:I})}),j=l.useCallback(_=>{s(_.target.value)},[]);return a.jsx(N,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:a.jsxs(N,{flexDirection:"column",gap:4,paddingInlineEnd:4,children:[a.jsxs(zn,{isAttached:!0,children:[a.jsx(Rt,{onClick:c.bind(null,"all"),isChecked:i==="all",size:"sm",children:r("modelManager.allModels")}),a.jsx(Rt,{size:"sm",onClick:c.bind(null,"diffusers"),isChecked:i==="diffusers",children:r("modelManager.diffusersModels")}),a.jsx(Rt,{size:"sm",onClick:c.bind(null,"checkpoint"),isChecked:i==="checkpoint",children:r("modelManager.checkpointModels")}),a.jsx(Rt,{size:"sm",onClick:c.bind(null,"onnx"),isChecked:i==="onnx",children:r("modelManager.onnxModels")}),a.jsx(Rt,{size:"sm",onClick:c.bind(null,"olive"),isChecked:i==="olive",children:r("modelManager.oliveModels")}),a.jsx(Rt,{size:"sm",onClick:c.bind(null,"lora"),isChecked:i==="lora",children:r("modelManager.loraModels")})]}),a.jsx(Cs,{onChange:j,label:r("modelManager.search"),labelPos:"side"}),a.jsxs(N,{flexDirection:"column",gap:4,maxHeight:window.innerHeight-280,overflow:"scroll",children:[p&&a.jsx(Hc,{loadingMessage:"Loading Diffusers..."}),["all","diffusers"].includes(i)&&!p&&d.length>0&&a.jsx(Bc,{title:"Diffusers",modelList:d,selected:{selectedModelId:t,setSelectedModelId:n}},"diffusers"),m&&a.jsx(Hc,{loadingMessage:"Loading Checkpoints..."}),["all","checkpoint"].includes(i)&&!m&&h.length>0&&a.jsx(Bc,{title:"Checkpoints",modelList:h,selected:{selectedModelId:t,setSelectedModelId:n}},"checkpoints"),b&&a.jsx(Hc,{loadingMessage:"Loading LoRAs..."}),["all","lora"].includes(i)&&!b&&g.length>0&&a.jsx(Bc,{title:"LoRAs",modelList:g,selected:{selectedModelId:t,setSelectedModelId:n}},"loras"),S&&a.jsx(Hc,{loadingMessage:"Loading Olives..."}),["all","olive"].includes(i)&&!S&&C.length>0&&a.jsx(Bc,{title:"Olives",modelList:C,selected:{selectedModelId:t,setSelectedModelId:n}},"olive"),x&&a.jsx(Hc,{loadingMessage:"Loading ONNX..."}),["all","onnx"].includes(i)&&!x&&y.length>0&&a.jsx(Bc,{title:"ONNX",modelList:y,selected:{selectedModelId:t,setSelectedModelId:n}},"onnx")]})]})})},rhe=l.memo(nhe),Sd=(e,t,n,r)=>{const o=[];return Kr(e==null?void 0:e.entities,s=>{if(!s)return;const i=s.model_name.toLowerCase().includes(r.toLowerCase()),c=n===void 0||s.model_format===n,d=s.model_type===t;i&&c&&d&&o.push(s)}),o},q2=l.memo(e=>a.jsx(N,{flexDirection:"column",gap:4,borderRadius:4,p:4,sx:{bg:"base.200",_dark:{bg:"base.800"}},children:e.children}));q2.displayName="StyledModelContainer";const Bc=l.memo(e=>{const{title:t,modelList:n,selected:r}=e;return a.jsx(q2,{children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Se,{variant:"subtext",fontSize:"sm",children:t}),n.map(o=>a.jsx(the,{model:o,isSelected:r.selectedModelId===o.id,setSelectedModelId:r.setSelectedModelId},o.id))]})})});Bc.displayName="ModelListWrapper";const Hc=l.memo(({loadingMessage:e})=>a.jsx(q2,{children:a.jsxs(N,{justifyContent:"center",alignItems:"center",flexDirection:"column",p:4,gap:8,children:[a.jsx(bi,{}),a.jsx(Se,{variant:"subtext",children:e||"Fetching..."})]})}));Hc.displayName="FetchingModelsLoader";function ohe(){const[e,t]=l.useState(),{mainModel:n}=na(Ol,{selectFromResult:({data:s})=>({mainModel:e?s==null?void 0:s.entities[e]:void 0})}),{loraModel:r}=vf(void 0,{selectFromResult:({data:s})=>({loraModel:e?s==null?void 0:s.entities[e]:void 0})}),o=n||r;return a.jsxs(N,{sx:{gap:8,w:"full",h:"full"},children:[a.jsx(rhe,{selectedModelId:e,setSelectedModelId:t}),a.jsx(she,{model:o})]})}const she=e=>{const{model:t}=e;return(t==null?void 0:t.model_format)==="checkpoint"?a.jsx(Jpe,{model:t},t.id):(t==null?void 0:t.model_format)==="diffusers"?a.jsx(Zpe,{model:t},t.id):(t==null?void 0:t.model_type)==="lora"?a.jsx(ehe,{model:t},t.id):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",maxH:96,userSelect:"none"},children:a.jsx(Se,{variant:"subtext",children:"No Model Selected"})})};function ahe(){const{t:e}=J();return a.jsxs(N,{sx:{w:"full",p:4,borderRadius:4,gap:4,justifyContent:"space-between",alignItems:"center",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(Se,{sx:{fontWeight:600},children:e("modelManager.syncModels")}),a.jsx(Se,{fontSize:"sm",sx:{_dark:{color:"base.400"}},children:e("modelManager.syncModelsDesc")})]}),a.jsx(Gu,{})]})}function ihe(){return a.jsx(N,{children:a.jsx(ahe,{})})}const Z_=[{id:"modelManager",label:on.t("modelManager.modelManager"),content:a.jsx(ohe,{})},{id:"importModels",label:on.t("modelManager.importModels"),content:a.jsx(Kpe,{})},{id:"mergeModels",label:on.t("modelManager.mergeModels"),content:a.jsx(Xpe,{})},{id:"settings",label:on.t("modelManager.settings"),content:a.jsx(ihe,{})}],lhe=()=>a.jsxs(tc,{isLazy:!0,variant:"line",layerStyle:"first",sx:{w:"full",h:"full",p:4,gap:4,borderRadius:"base"},children:[a.jsx(nc,{children:Z_.map(e=>a.jsx(xo,{sx:{borderTopRadius:"base"},children:e.label},e.id))}),a.jsx(zu,{sx:{w:"full",h:"full"},children:Z_.map(e=>a.jsx(Ho,{sx:{w:"full",h:"full"},children:e.content},e.id))})]}),che=l.memo(lhe),uhe=de([e=>e.nodes],e=>e.nodeTemplates),dhe=()=>{const e=H(uhe),t=Bx();return l.useCallback(n=>{var d;let r=window.innerWidth/2,o=window.innerHeight/2;const s=(d=document.querySelector("#workflow-editor"))==null?void 0:d.getBoundingClientRect();s&&(r=s.width/2-K1/2,o=s.height/2-K1/2);const i=t.project({x:r,y:o}),c=e[n];return aN(n,i,c)},[e,t])},zR=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx("div",{ref:r,...n,children:a.jsxs("div",{children:[a.jsx(Se,{fontWeight:600,children:e}),a.jsx(Se,{size:"xs",sx:{color:"base.600",_dark:{color:"base.500"}},children:t})]})}));zR.displayName="AddNodePopoverSelectItem";const fhe=(e,t)=>{const n=new RegExp(e.trim().replace(/[-[\]{}()*+!<=:?./\\^$|#,]/g,"").split(" ").join(".*"),"gi");return n.test(t.label)||n.test(t.description)||t.tags.some(r=>n.test(r))},phe=()=>{const e=oe(),t=dhe(),n=Zl(),{t:r}=J(),o=H(C=>C.nodes.currentConnectionFieldType),s=H(C=>{var S;return(S=C.nodes.connectionStartParams)==null?void 0:S.handleType}),i=de([Ce],({nodes:C})=>{const S=o?g$(C.nodeTemplates,_=>{const I=s=="source"?_.inputs:_.outputs;return Qs(I,P=>{const M=s=="source"?o:P.type,R=s=="target"?o:P.type;return Hx(M,R)})}):Ro(C.nodeTemplates),j=Ro(S,_=>({label:_.title,value:_.type,description:_.description,tags:_.tags}));return o===null&&(j.push({label:r("nodes.currentImage"),value:"current_image",description:r("nodes.currentImageDescription"),tags:["progress"]}),j.push({label:r("nodes.notes"),value:"notes",description:r("nodes.notesDescription"),tags:["notes"]})),j.sort((_,I)=>_.label.localeCompare(I.label)),{data:j,t:r}},_e),{data:c}=H(i),d=H(C=>C.nodes.isAddNodePopoverOpen),p=l.useRef(null),h=l.useCallback(C=>{const S=t(C);if(!S){const j=r("nodes.unknownNode",{nodeType:C});n({status:"error",title:j});return}e(iN(S))},[e,t,n,r]),m=l.useCallback(C=>{C&&h(C)},[h]),g=l.useCallback(()=>{e(lN())},[e]),b=l.useCallback(()=>{e(bP())},[e]),y=l.useCallback(C=>{C.preventDefault(),b(),setTimeout(()=>{var S;(S=p.current)==null||S.focus()},0)},[b]),x=l.useCallback(()=>{g()},[g]);return It(["shift+a","space"],y),It(["escape"],x),a.jsxs(Nf,{initialFocusRef:p,isOpen:d,onClose:g,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(b3,{children:a.jsx(N,{sx:{position:"absolute",top:"15%",insetInlineStart:"50%",pointerEvents:"none"}})}),a.jsx($f,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Ag,{sx:{p:0},children:a.jsx(tr,{inputRef:p,selectOnBlur:!1,placeholder:r("nodes.nodeSearch"),value:null,data:c,maxDropdownHeight:400,nothingFound:r("nodes.noMatchingNodes"),itemComponent:zR,filter:fhe,onChange:m,hoverOnSearchChange:!0,onDropdownClose:g,sx:{width:"32rem",input:{padding:"0.5rem"}}})})})]})},hhe=l.memo(phe),mhe=()=>{const e=Bx(),t=H(r=>r.nodes.shouldValidateGraph);return l.useCallback(({source:r,sourceHandle:o,target:s,targetHandle:i})=>{var b,y;const c=e.getEdges(),d=e.getNodes();if(!(r&&o&&s&&i))return!1;const p=e.getNode(r),h=e.getNode(s);if(!(p&&h&&p.data&&h.data))return!1;const m=(b=p.data.outputs[o])==null?void 0:b.type,g=(y=h.data.inputs[i])==null?void 0:y.type;return!m||!g||r===s?!1:t?c.find(x=>{x.target===s&&x.targetHandle===i&&x.source===r&&x.sourceHandle})||c.find(x=>x.target===s&&x.targetHandle===i)&&g!=="CollectionItem"||!Hx(m,g)?!1:xP(r,s,d,c):!0},[e,t])},df=e=>`var(--invokeai-colors-${e.split(".").join("-")})`,ghe=de(Ce,({nodes:e})=>{const{shouldAnimateEdges:t,currentConnectionFieldType:n,shouldColorEdges:r}=e,o=df(n&&r?bf[n].color:"base.500");let s="react-flow__custom_connection-path";return t&&(s=s.concat(" animated")),{stroke:o,className:s}}),vhe=({fromX:e,fromY:t,fromPosition:n,toX:r,toY:o,toPosition:s})=>{const{stroke:i,className:c}=H(ghe),d={sourceX:e,sourceY:t,sourcePosition:n,targetX:r,targetY:o,targetPosition:s},[p]=Wx(d);return a.jsx("g",{children:a.jsx("path",{fill:"none",stroke:i,strokeWidth:2,className:c,d:p,style:{opacity:.8}})})},bhe=l.memo(vhe),FR=(e,t,n,r,o)=>de(Ce,({nodes:s})=>{var g,b;const i=s.nodes.find(y=>y.id===e),c=s.nodes.find(y=>y.id===n),d=Rr(i)&&Rr(c),p=(i==null?void 0:i.selected)||(c==null?void 0:c.selected)||o,h=d?(b=(g=i==null?void 0:i.data)==null?void 0:g.outputs[t||""])==null?void 0:b.type:void 0,m=h&&s.shouldColorEdges?df(bf[h].color):df("base.500");return{isSelected:p,shouldAnimate:s.shouldAnimateEdges&&p,stroke:m}},_e),xhe=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,data:c,selected:d,source:p,target:h,sourceHandleId:m,targetHandleId:g})=>{const b=l.useMemo(()=>FR(p,m,h,g,d),[d,p,m,h,g]),{isSelected:y,shouldAnimate:x}=H(b),[C,S,j]=Wx({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s}),{base500:_}=Hf();return a.jsxs(a.Fragment,{children:[a.jsx(yP,{path:C,markerEnd:i,style:{strokeWidth:y?3:2,stroke:_,opacity:y?.8:.5,animation:x?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:x?5:"none"}}),(c==null?void 0:c.count)&&c.count>1&&a.jsx(cN,{children:a.jsx(N,{sx:{position:"absolute",transform:`translate(-50%, -50%) translate(${S}px,${j}px)`},className:"nodrag nopan",children:a.jsx(Ha,{variant:"solid",sx:{bg:"base.500",opacity:y?.8:.5,boxShadow:"base"},children:c.count})})})]})},yhe=l.memo(xhe),Che=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,selected:c,source:d,target:p,sourceHandleId:h,targetHandleId:m})=>{const g=l.useMemo(()=>FR(d,h,p,m,c),[d,h,p,m,c]),{isSelected:b,shouldAnimate:y,stroke:x}=H(g),[C]=Wx({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return a.jsx(yP,{path:C,markerEnd:i,style:{strokeWidth:b?3:2,stroke:x,opacity:b?.8:.5,animation:y?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:y?5:"none"}})},whe=l.memo(Che),She=e=>{const{nodeId:t,width:n,children:r,selected:o}=e,{isMouseOverNode:s,handleMouseOut:i,handleMouseOver:c}=Q8(t),d=l.useMemo(()=>de(Ce,({nodes:j})=>{var _;return((_=j.nodeExecutionStates[t])==null?void 0:_.status)===ri.IN_PROGRESS}),[t]),p=H(d),[h,m,g,b]=Ks("shadows",["nodeInProgress.light","nodeInProgress.dark","shadows.xl","shadows.base"]),y=oe(),x=di(h,m),C=H(j=>j.nodes.nodeOpacity),S=l.useCallback(j=>{!j.ctrlKey&&!j.altKey&&!j.metaKey&&!j.shiftKey&&y(uN(t)),y(CP())},[y,t]);return a.jsxs(Te,{onClick:S,onMouseEnter:c,onMouseLeave:i,className:Du,sx:{h:"full",position:"relative",borderRadius:"base",w:n??K1,transitionProperty:"common",transitionDuration:"0.1s",cursor:"grab",opacity:C},children:[a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",pointerEvents:"none",shadow:`${g}, ${b}, ${b}`,zIndex:-1}}),a.jsx(Te,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"md",pointerEvents:"none",transitionProperty:"common",transitionDuration:"0.1s",opacity:.7,shadow:p?x:void 0,zIndex:-1}}),r,a.jsx(K8,{isSelected:o,isHovered:s})]})},j0=l.memo(She),khe=de(Ce,({system:e,gallery:t})=>{var r;return{imageDTO:t.selection[t.selection.length-1],progressImage:(r=e.denoiseProgress)==null?void 0:r.progress_image}}),jhe=e=>{const{progressImage:t,imageDTO:n}=dN(khe);return t?a.jsx(R1,{nodeProps:e,children:a.jsx(Si,{src:t.dataURL,sx:{w:"full",h:"full",objectFit:"contain",borderRadius:"base"}})}):n?a.jsx(R1,{nodeProps:e,children:a.jsx(il,{imageDTO:n,isDragDisabled:!0,useThumbailFallback:!0})}):a.jsx(R1,{nodeProps:e,children:a.jsx(qr,{})})},_he=l.memo(jhe),R1=e=>{const[t,n]=l.useState(!1),r=l.useCallback(()=>{n(!0)},[]),o=l.useCallback(()=>{n(!1)},[]);return a.jsx(j0,{nodeId:e.nodeProps.id,selected:e.nodeProps.selected,width:384,children:a.jsxs(N,{onMouseEnter:r,onMouseLeave:o,className:Du,sx:{position:"relative",flexDirection:"column"},children:[a.jsx(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",alignItems:"center",justifyContent:"center",h:8},children:a.jsx(Se,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",_dark:{color:"base.200"}},children:"Current Image"})}),a.jsxs(N,{layerStyle:"nodeBody",sx:{w:"full",h:"full",borderBottomRadius:"base",p:2},children:[e.children,t&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:40,left:-2,right:-2,bottom:0,pointerEvents:"none"},children:a.jsx(OR,{})},"nextPrevButtons")]})]})})},K2=e=>{const t=e.filter(o=>!o.ui_hidden),n=t.filter(o=>!oi(o.ui_order)).sort((o,s)=>(o.ui_order??0)-(s.ui_order??0)),r=t.filter(o=>oi(o.ui_order));return n.concat(r).map(o=>o.name).filter(o=>o!=="is_intermediate")},Ihe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=Ro(s.inputs).filter(c=>(["any","direct"].includes(c.input)||Vx.includes(c.type))&&wP.includes(c.type));return K2(i)},_e),[e]);return H(t)},Phe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=Ro(s.inputs).filter(c=>c.input==="connection"&&!Vx.includes(c.type)||!wP.includes(c.type));return K2(i)},_e),[e]);return H(t)},Ehe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];return s?K2(Ro(s.outputs)):[]},_e),[e]);return H(t)},Q2=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?Qs(o.data.outputs,s=>fN.includes(s.type)&&o.data.type!=="image"):!1},_e),[e]);return H(t)},Mhe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.embedWorkflow:!1},_e),[e]);return H(t)},Ohe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=r.nodeTemplates[(o==null?void 0:o.data.type)??""];return s?s.withWorkflow:!1},_e),[e]);return H(t)},Rhe=({nodeId:e})=>{const t=oe(),n=Ohe(e),r=Mhe(e),o=l.useCallback(s=>{t(pN({nodeId:e,embedWorkflow:s.target.checked}))},[t,e]);return n?a.jsxs(Bn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(vr,{sx:{fontSize:"xs",mb:"1px"},children:"Workflow"}),a.jsx(_f,{className:"nopan",size:"sm",onChange:o,isChecked:r})]}):null},Ahe=l.memo(Rhe),Dhe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.isIntermediate:!1},_e),[e]);return H(t)},The=({nodeId:e})=>{const t=oe(),n=Q2(e),r=Dhe(e),o=l.useCallback(s=>{t(hN({nodeId:e,isIntermediate:!s.target.checked}))},[t,e]);return n?a.jsxs(Bn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(vr,{sx:{fontSize:"xs",mb:"1px"},children:"Save to Gallery"}),a.jsx(_f,{className:"nopan",size:"sm",onChange:o,isChecked:!r})]}):null},Nhe=l.memo(The),$he=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.useCache:!1},_e),[e]);return H(t)},Lhe=({nodeId:e})=>{const t=oe(),n=$he(e),r=l.useCallback(o=>{t(mN({nodeId:e,useCache:o.target.checked}))},[t,e]);return a.jsxs(Bn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(vr,{sx:{fontSize:"xs",mb:"1px"},children:"Use Cache"}),a.jsx(_f,{className:"nopan",size:"sm",onChange:r,isChecked:n})]})},zhe=l.memo(Lhe),Fhe=({nodeId:e})=>{const t=Q2(e),n=jn("invocationCache").isFeatureEnabled;return a.jsxs(N,{className:Du,layerStyle:"nodeFooter",sx:{w:"full",borderBottomRadius:"base",px:2,py:0,h:6,justifyContent:"space-between"},children:[n&&a.jsx(zhe,{nodeId:e}),t&&a.jsx(Ahe,{nodeId:e}),t&&a.jsx(Nhe,{nodeId:e})]})},Bhe=l.memo(Fhe),Hhe=({nodeId:e,isOpen:t})=>{const n=oe(),r=gN(),o=l.useCallback(()=>{n(vN({nodeId:e,isOpen:!t})),r(e)},[n,t,e,r]);return a.jsx(tt,{className:"nodrag",onClick:o,"aria-label":"Minimize",sx:{minW:8,w:8,h:8,color:"base.500",_dark:{color:"base.500"},_hover:{color:"base.700",_dark:{color:"base.300"}}},variant:"link",icon:a.jsx(s0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})})},X2=l.memo(Hhe),Whe=({nodeId:e,title:t})=>{const n=oe(),r=U8(e),o=G8(e),{t:s}=J(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(nP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{overflow:"hidden",w:"full",h:"full",alignItems:"center",justifyContent:"center",cursor:"text"},children:a.jsxs(Ef,{as:N,value:i,onChange:p,onSubmit:d,sx:{alignItems:"center",position:"relative",w:"full",h:"full"},children:[a.jsx(Pf,{fontSize:"sm",sx:{p:0,w:"full"},noOfLines:1}),a.jsx(If,{className:"nodrag",fontSize:"sm",sx:{p:0,fontWeight:700,_focusVisible:{p:0,boxShadow:"none"}}}),a.jsx(Vhe,{})]})})},BR=l.memo(Whe);function Vhe(){const{isEditing:e,getEditButtonProps:t}=JP(),n=l.useCallback(r=>{const{onClick:o}=t();o&&o(r)},[t]);return e?null:a.jsx(Te,{className:Du,onDoubleClick:n,sx:{position:"absolute",w:"full",h:"full",top:0,cursor:"grab"}})}const Uhe=({nodeId:e})=>{const t=L2(e),{base400:n,base600:r}=Hf(),o=di(n,r),s=l.useMemo(()=>({borderWidth:0,borderRadius:"3px",width:"1rem",height:"1rem",backgroundColor:o,zIndex:-1}),[o]);return Vh(t)?a.jsxs(a.Fragment,{children:[a.jsx(Id,{type:"target",id:`${t.id}-collapsed-target`,isConnectable:!1,position:Vc.Left,style:{...s,left:"-0.5rem"}}),Ro(t.inputs,i=>a.jsx(Id,{type:"target",id:i.name,isConnectable:!1,position:Vc.Left,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-input-handle`)),a.jsx(Id,{type:"source",id:`${t.id}-collapsed-source`,isConnectable:!1,position:Vc.Right,style:{...s,right:"-0.5rem"}}),Ro(t.outputs,i=>a.jsx(Id,{type:"source",id:i.name,isConnectable:!1,position:Vc.Right,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-output-handle`))]}):null},Ghe=l.memo(Uhe),qhe=e=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);return r.nodeTemplates[(o==null?void 0:o.data.type)??""]},_e),[e]);return H(t)},Khe=({nodeId:e})=>{const{needsUpdate:t}=rP(e);return a.jsx(Fn,{label:a.jsx(HR,{nodeId:e}),placement:"top",shouldWrapChildren:!0,children:a.jsx(zr,{as:GM,sx:{boxSize:4,w:8,color:t?"error.400":"base.400"}})})},Qhe=l.memo(Khe),HR=l.memo(({nodeId:e})=>{const t=L2(e),n=qhe(e),{t:r}=J(),o=l.useMemo(()=>t!=null&&t.label&&(n!=null&&n.title)?`${t.label} (${n.title})`:t!=null&&t.label&&!n?t.label:!(t!=null&&t.label)&&n?n.title:r("nodes.unknownNode"),[t,n,r]),s=l.useMemo(()=>!Vh(t)||!n?null:t.version?n.version?cS(t.version,n.version,"<")?a.jsxs(Se,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateNode"),")"]}):cS(t.version,n.version,">")?a.jsxs(Se,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateApp"),")"]}):a.jsxs(Se,{as:"span",children:[r("nodes.version")," ",t.version]}):a.jsxs(Se,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.unknownTemplate"),")"]}):a.jsx(Se,{as:"span",sx:{color:"error.500"},children:r("nodes.versionUnknown")}),[t,n,r]);return Vh(t)?a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(Se,{as:"span",sx:{fontWeight:600},children:o}),a.jsx(Se,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:n==null?void 0:n.description}),s,(t==null?void 0:t.notes)&&a.jsx(Se,{children:t.notes})]}):a.jsx(Se,{sx:{fontWeight:600},children:r("nodes.unknownNode")})});HR.displayName="TooltipContent";const A1=3,eI={circle:{transitionProperty:"none",transitionDuration:"0s"},".chakra-progress__track":{stroke:"transparent"}},Xhe=({nodeId:e})=>{const t=l.useMemo(()=>de(Ce,({nodes:r})=>r.nodeExecutionStates[e]),[e]),n=H(t);return n?a.jsx(Fn,{label:a.jsx(WR,{nodeExecutionState:n}),placement:"top",children:a.jsx(N,{className:Du,sx:{w:5,h:"full",alignItems:"center",justifyContent:"flex-end"},children:a.jsx(VR,{nodeExecutionState:n})})}):null},Yhe=l.memo(Xhe),WR=l.memo(({nodeExecutionState:e})=>{const{status:t,progress:n,progressImage:r}=e,{t:o}=J();return t===ri.PENDING?a.jsx(Se,{children:"Pending"}):t===ri.IN_PROGRESS?r?a.jsxs(N,{sx:{pos:"relative",pt:1.5,pb:.5},children:[a.jsx(Si,{src:r.dataURL,sx:{w:32,h:32,borderRadius:"base",objectFit:"contain"}}),n!==null&&a.jsxs(Ha,{variant:"solid",sx:{pos:"absolute",top:2.5,insetInlineEnd:1},children:[Math.round(n*100),"%"]})]}):n!==null?a.jsxs(Se,{children:[o("nodes.executionStateInProgress")," (",Math.round(n*100),"%)"]}):a.jsx(Se,{children:o("nodes.executionStateInProgress")}):t===ri.COMPLETED?a.jsx(Se,{children:o("nodes.executionStateCompleted")}):t===ri.FAILED?a.jsx(Se,{children:o("nodes.executionStateError")}):null});WR.displayName="TooltipLabel";const VR=l.memo(e=>{const{progress:t,status:n}=e.nodeExecutionState;return n===ri.PENDING?a.jsx(zr,{as:nee,sx:{boxSize:A1,color:"base.600",_dark:{color:"base.300"}}}):n===ri.IN_PROGRESS?t===null?a.jsx(xb,{isIndeterminate:!0,size:"14px",color:"base.500",thickness:14,sx:eI}):a.jsx(xb,{value:Math.round(t*100),size:"14px",color:"base.500",thickness:14,sx:eI}):n===ri.COMPLETED?a.jsx(zr,{as:BM,sx:{boxSize:A1,color:"ok.600",_dark:{color:"ok.300"}}}):n===ri.FAILED?a.jsx(zr,{as:see,sx:{boxSize:A1,color:"error.600",_dark:{color:"error.300"}}}):null});VR.displayName="StatusIcon";const Jhe=({nodeId:e,isOpen:t})=>a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",justifyContent:"space-between",h:8,textAlign:"center",fontWeight:500,color:"base.700",_dark:{color:"base.200"}},children:[a.jsx(X2,{nodeId:e,isOpen:t}),a.jsx(BR,{nodeId:e}),a.jsxs(N,{alignItems:"center",children:[a.jsx(Yhe,{nodeId:e}),a.jsx(Qhe,{nodeId:e})]}),!t&&a.jsx(Ghe,{nodeId:e})]}),Zhe=l.memo(Jhe),eme=(e,t,n,r)=>de(Ce,o=>{if(!r)return on.t("nodes.noFieldType");const{currentConnectionFieldType:s,connectionStartParams:i,nodes:c,edges:d}=o.nodes;if(!i||!s)return on.t("nodes.noConnectionInProgress");const{handleType:p,nodeId:h,handleId:m}=i;if(!p||!h||!m)return on.t("nodes.noConnectionData");const g=n==="target"?r:s,b=n==="source"?r:s;if(e===h)return on.t("nodes.cannotConnectToSelf");if(n===p)return n==="source"?on.t("nodes.cannotConnectOutputToOutput"):on.t("nodes.cannotConnectInputToInput");const y=n==="target"?e:h,x=n==="target"?t:m,C=n==="source"?e:h,S=n==="source"?t:m;return d.find(_=>{_.target===y&&_.targetHandle===x&&_.source===C&&_.sourceHandle})?on.t("nodes.cannotDuplicateConnection"):d.find(_=>_.target===y&&_.targetHandle===x)&&g!=="CollectionItem"?on.t("nodes.inputMayOnlyHaveOneConnection"):Hx(b,g)?xP(p==="source"?h:e,p==="source"?e:h,c,d)?null:on.t("nodes.connectionWouldCreateCycle"):on.t("nodes.fieldTypesMustMatch")}),tme=(e,t,n)=>{const r=l.useMemo(()=>de(Ce,({nodes:s})=>{var c;const i=s.nodes.find(d=>d.id===e);if(Rr(i))return(c=i==null?void 0:i.data[zx[n]][t])==null?void 0:c.type},_e),[t,n,e]);return H(r)},nme=de(Ce,({nodes:e})=>e.currentConnectionFieldType!==null&&e.connectionStartParams!==null),UR=({nodeId:e,fieldName:t,kind:n})=>{const r=tme(e,t,n),o=l.useMemo(()=>de(Ce,({nodes:g})=>!!g.edges.filter(b=>(n==="input"?b.target:b.source)===e&&(n==="input"?b.targetHandle:b.sourceHandle)===t).length),[t,n,e]),s=l.useMemo(()=>eme(e,t,n==="input"?"target":"source",r),[e,t,n,r]),i=l.useMemo(()=>de(Ce,({nodes:g})=>{var b,y,x;return((b=g.connectionStartParams)==null?void 0:b.nodeId)===e&&((y=g.connectionStartParams)==null?void 0:y.handleId)===t&&((x=g.connectionStartParams)==null?void 0:x.handleType)==={input:"target",output:"source"}[n]}),[t,n,e]),c=H(o),d=H(nme),p=H(i),h=H(s),m=l.useMemo(()=>!!(d&&h&&!p),[h,d,p]);return{isConnected:c,isConnectionInProgress:d,isConnectionStartField:p,connectionError:h,shouldDim:m}},rme=(e,t)=>{const n=l.useMemo(()=>de(Ce,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return((i=s==null?void 0:s.data.inputs[t])==null?void 0:i.value)!==void 0},_e),[t,e]);return H(n)},ome=(e,t)=>{const n=l.useMemo(()=>de(Ce,({nodes:o})=>{const s=o.nodes.find(d=>d.id===e);if(!Rr(s))return;const i=o.nodeTemplates[(s==null?void 0:s.data.type)??""],c=i==null?void 0:i.inputs[t];return c==null?void 0:c.input},_e),[t,e]);return H(n)},sme=({nodeId:e,fieldName:t,kind:n,children:r})=>{const o=oe(),s=X8(e,t),i=Y8(e,t,n),c=ome(e,t),{t:d}=J(),p=l.useCallback(S=>{S.preventDefault()},[]),h=l.useMemo(()=>de(Ce,({nodes:S})=>({isExposed:!!S.workflow.exposedFields.find(_=>_.nodeId===e&&_.fieldName===t)}),_e),[t,e]),m=l.useMemo(()=>["any","direct"].includes(c??"__UNKNOWN_INPUT__"),[c]),{isExposed:g}=H(h),b=l.useCallback(()=>{o(bN({nodeId:e,fieldName:t}))},[o,t,e]),y=l.useCallback(()=>{o(aP({nodeId:e,fieldName:t}))},[o,t,e]),x=l.useMemo(()=>{const S=[];return m&&!g&&S.push(a.jsx(Vn,{icon:a.jsx(Yi,{}),onClick:b,children:"Add to Linear View"},`${e}.${t}.expose-field`)),m&&g&&S.push(a.jsx(Vn,{icon:a.jsx(gee,{}),onClick:y,children:"Remove from Linear View"},`${e}.${t}.unexpose-field`)),S},[t,b,y,g,m,e]),C=l.useCallback(()=>x.length?a.jsx(Gl,{sx:{visibility:"visible !important"},motionProps:pu,onContextMenu:p,children:a.jsx(Yd,{title:s||i||d("nodes.unknownField"),children:x})}):null,[i,s,x,p,d]);return a.jsx(p2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:C,children:r})},ame=l.memo(sme),ime=e=>{const{fieldTemplate:t,handleType:n,isConnectionInProgress:r,isConnectionStartField:o,connectionError:s}=e,{name:i,type:c}=t,{color:d,title:p}=bf[c],h=l.useMemo(()=>{const g=xN.includes(c),b=Vx.includes(c),y=yN.includes(c),x=df(d),C={backgroundColor:g||b?"var(--invokeai-colors-base-900)":x,position:"absolute",width:"1rem",height:"1rem",borderWidth:g||b?4:0,borderStyle:"solid",borderColor:x,borderRadius:y?4:"100%",zIndex:1};return n==="target"?C.insetInlineStart="-1rem":C.insetInlineEnd="-1rem",r&&!o&&s&&(C.filter="opacity(0.4) grayscale(0.7)"),r&&s?o?C.cursor="grab":C.cursor="not-allowed":C.cursor="crosshair",C},[s,n,r,o,c,d]),m=l.useMemo(()=>r&&o?p:r&&s?s??p:p,[s,r,o,p]);return a.jsx(Fn,{label:m,placement:n==="target"?"start":"end",hasArrow:!0,openDelay:ug,children:a.jsx(Id,{type:n,id:i,position:n==="target"?Vc.Left:Vc.Right,style:h})})},GR=l.memo(ime),lme=({nodeId:e,fieldName:t})=>{const n=v0(e,t,"input"),r=rme(e,t),{isConnected:o,isConnectionInProgress:s,isConnectionStartField:i,connectionError:c,shouldDim:d}=UR({nodeId:e,fieldName:t,kind:"input"}),p=l.useMemo(()=>{if((n==null?void 0:n.fieldKind)!=="input"||!n.required)return!1;if(!o&&n.input==="connection"||!r&&!o&&n.input==="any")return!0},[n,o,r]);return(n==null?void 0:n.fieldKind)!=="input"?a.jsx(dx,{shouldDim:d,children:a.jsxs(Bn,{sx:{color:"error.400",textAlign:"left",fontSize:"sm"},children:["Unknown input: ",t]})}):a.jsxs(dx,{shouldDim:d,children:[a.jsxs(Bn,{isInvalid:p,isDisabled:o,sx:{alignItems:"stretch",justifyContent:"space-between",ps:n.input==="direct"?0:2,gap:2,h:"full",w:"full"},children:[a.jsx(ame,{nodeId:e,fieldName:t,kind:"input",children:h=>a.jsx(vr,{sx:{display:"flex",alignItems:"center",h:"full",mb:0,px:1,gap:2},children:a.jsx(Z8,{ref:h,nodeId:e,fieldName:t,kind:"input",isMissingInput:p,withTooltip:!0})})}),a.jsx(Te,{children:a.jsx(uR,{nodeId:e,fieldName:t})})]}),n.input!=="direct"&&a.jsx(GR,{fieldTemplate:n,handleType:"target",isConnectionInProgress:s,isConnectionStartField:i,connectionError:c})]})},tI=l.memo(lme),dx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",w:"full",h:"full"},children:t}));dx.displayName="InputFieldWrapper";const cme=({nodeId:e,fieldName:t})=>{const n=v0(e,t,"output"),{isConnected:r,isConnectionInProgress:o,isConnectionStartField:s,connectionError:i,shouldDim:c}=UR({nodeId:e,fieldName:t,kind:"output"});return(n==null?void 0:n.fieldKind)!=="output"?a.jsx(fx,{shouldDim:c,children:a.jsxs(Bn,{sx:{color:"error.400",textAlign:"right",fontSize:"sm"},children:["Unknown output: ",t]})}):a.jsxs(fx,{shouldDim:c,children:[a.jsx(Fn,{label:a.jsx(z2,{nodeId:e,fieldName:t,kind:"output"}),openDelay:ug,placement:"top",shouldWrapChildren:!0,hasArrow:!0,children:a.jsx(Bn,{isDisabled:r,pe:2,children:a.jsx(vr,{sx:{mb:0,fontWeight:500},children:n==null?void 0:n.title})})}),a.jsx(GR,{fieldTemplate:n,handleType:"source",isConnectionInProgress:o,isConnectionStartField:s,connectionError:i})]})},ume=l.memo(cme),fx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",justifyContent:"flex-end"},children:t}));fx.displayName="OutputFieldWrapper";const dme=e=>{const t=Q2(e),n=jn("invocationCache").isFeatureEnabled;return l.useMemo(()=>t||n,[t,n])},fme=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>{const s=Phe(e),i=Ihe(e),c=dme(e),d=Ehe(e);return a.jsxs(j0,{nodeId:e,selected:o,children:[a.jsx(Zhe,{nodeId:e,isOpen:t,label:n,selected:o,type:r}),t&&a.jsxs(a.Fragment,{children:[a.jsx(N,{layerStyle:"nodeBody",sx:{flexDirection:"column",w:"full",h:"full",py:2,gap:1,borderBottomRadius:c?0:"base"},children:a.jsxs(N,{sx:{flexDir:"column",px:2,w:"full",h:"full"},children:[a.jsxs(nl,{gridTemplateColumns:"1fr auto",gridAutoRows:"1fr",children:[s.map((p,h)=>a.jsx(Kd,{gridColumnStart:1,gridRowStart:h+1,children:a.jsx(tI,{nodeId:e,fieldName:p})},`${e}.${p}.input-field`)),d.map((p,h)=>a.jsx(Kd,{gridColumnStart:2,gridRowStart:h+1,children:a.jsx(ume,{nodeId:e,fieldName:p})},`${e}.${p}.output-field`))]}),i.map(p=>a.jsx(tI,{nodeId:e,fieldName:p},`${e}.${p}.input-field`))]})}),c&&a.jsx(Bhe,{nodeId:e})]})]})},pme=l.memo(fme),hme=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>a.jsxs(j0,{nodeId:e,selected:o,children:[a.jsxs(N,{className:Du,layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",h:8,fontWeight:600,fontSize:"sm"},children:[a.jsx(X2,{nodeId:e,isOpen:t}),a.jsx(Se,{sx:{w:"full",textAlign:"center",pe:8,color:"error.500",_dark:{color:"error.300"}},children:n?`${n} (${r})`:r})]}),t&&a.jsx(N,{layerStyle:"nodeBody",sx:{userSelect:"auto",flexDirection:"column",w:"full",h:"full",p:4,gap:1,borderBottomRadius:"base",fontSize:"sm"},children:a.jsxs(Te,{children:[a.jsx(Se,{as:"span",children:"Unknown node type: "}),a.jsx(Se,{as:"span",fontWeight:600,children:r})]})})]}),mme=l.memo(hme),gme=e=>{const{data:t,selected:n}=e,{id:r,type:o,isOpen:s,label:i}=t,c=l.useMemo(()=>de(Ce,({nodes:p})=>!!p.nodeTemplates[o]),[o]);return H(c)?a.jsx(pme,{nodeId:r,isOpen:s,label:i,type:o,selected:n}):a.jsx(mme,{nodeId:r,isOpen:s,label:i,type:o,selected:n})},vme=l.memo(gme),bme=e=>{const{id:t,data:n,selected:r}=e,{notes:o,isOpen:s}=n,i=oe(),c=l.useCallback(d=>{i(CN({nodeId:t,value:d.target.value}))},[i,t]);return a.jsxs(j0,{nodeId:t,selected:r,children:[a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:s?0:"base",alignItems:"center",justifyContent:"space-between",h:8},children:[a.jsx(X2,{nodeId:t,isOpen:s}),a.jsx(BR,{nodeId:t,title:"Notes"}),a.jsx(Te,{minW:8})]}),s&&a.jsx(a.Fragment,{children:a.jsx(N,{layerStyle:"nodeBody",className:"nopan",sx:{cursor:"auto",flexDirection:"column",borderBottomRadius:"base",w:"full",h:"full",p:2,gap:1},children:a.jsx(N,{className:"nopan",sx:{flexDir:"column",w:"full",h:"full"},children:a.jsx(vi,{value:o,onChange:c,rows:8,resize:"none",sx:{fontSize:"xs"}})})})})]})},xme=l.memo(bme),yme=["Delete","Backspace"],Cme={collapsed:yhe,default:whe},wme={invocation:vme,current_image:_he,notes:xme},Sme={hideAttribution:!0},kme=de(Ce,({nodes:e})=>{const{shouldSnapToGrid:t,selectionMode:n}=e;return{shouldSnapToGrid:t,selectionMode:n}},_e),jme=()=>{const e=oe(),t=H(O=>O.nodes.nodes),n=H(O=>O.nodes.edges),r=H(O=>O.nodes.viewport),{shouldSnapToGrid:o,selectionMode:s}=H(kme),i=l.useRef(null),c=l.useRef(),d=mhe(),[p]=Ks("radii",["base"]),h=l.useCallback(O=>{e(wN(O))},[e]),m=l.useCallback(O=>{e(SN(O))},[e]),g=l.useCallback((O,T)=>{e(kN(T))},[e]),b=l.useCallback(O=>{e(uS(O))},[e]),y=l.useCallback(()=>{e(jN({cursorPosition:c.current}))},[e]),x=l.useCallback(O=>{e(_N(O))},[e]),C=l.useCallback(O=>{e(IN(O))},[e]),S=l.useCallback(({nodes:O,edges:T})=>{e(PN(O?O.map(Y=>Y.id):[])),e(EN(T?T.map(Y=>Y.id):[]))},[e]),j=l.useCallback((O,T)=>{e(MN(T))},[e]),_=l.useCallback(()=>{e(CP())},[e]),I=l.useCallback(O=>{dS.set(O),O.fitView()},[]),P=l.useCallback(O=>{var Y,z;const T=(Y=i.current)==null?void 0:Y.getBoundingClientRect();if(T){const W=(z=dS.get())==null?void 0:z.project({x:O.clientX-T.left,y:O.clientY-T.top});c.current=W}},[]),M=l.useRef(),R=l.useCallback((O,T,Y)=>{M.current=O,e(ON(T.id)),e(RN())},[e]),A=l.useCallback((O,T)=>{e(uS(T))},[e]),D=l.useCallback((O,T,Y)=>{var z,W;!("touches"in O)&&((z=M.current)==null?void 0:z.clientX)===O.clientX&&((W=M.current)==null?void 0:W.clientY)===O.clientY&&e(AN(T)),M.current=void 0},[e]);return It(["Ctrl+c","Meta+c"],O=>{O.preventDefault(),e(DN())}),It(["Ctrl+a","Meta+a"],O=>{O.preventDefault(),e(TN())}),It(["Ctrl+v","Meta+v"],O=>{O.preventDefault(),e(NN({cursorPosition:c.current}))}),a.jsx($N,{id:"workflow-editor",ref:i,defaultViewport:r,nodeTypes:wme,edgeTypes:Cme,nodes:t,edges:n,onInit:I,onMouseMove:P,onNodesChange:h,onEdgesChange:m,onEdgesDelete:x,onEdgeUpdate:A,onEdgeUpdateStart:R,onEdgeUpdateEnd:D,onNodesDelete:C,onConnectStart:g,onConnect:b,onConnectEnd:y,onMoveEnd:j,connectionLineComponent:bhe,onSelectionChange:S,isValidConnection:d,minZoom:.1,snapToGrid:o,snapGrid:[25,25],connectionRadius:30,proOptions:Sme,style:{borderRadius:p},onPaneClick:_,deleteKeyCode:yme,selectionMode:s,children:a.jsx(V$,{})})},_me=de(Ce,e=>{const t=e.nodes.nodes,n=e.nodes.nodeTemplates;return t.some(o=>{const s=n[o.data.type];return LN(o,s)})},_e),Ime=()=>H(_me),Pme=()=>{const e=oe(),{t}=J(),n=Ime(),r=l.useCallback(()=>{e(bP())},[e]),o=l.useCallback(()=>{e(zN())},[e]);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:2},children:[a.jsx(tt,{tooltip:t("nodes.addNodeToolTip"),"aria-label":t("nodes.addNode"),icon:a.jsx(Yi,{}),onClick:r}),n&&a.jsx(Rt,{leftIcon:a.jsx(Xg,{}),onClick:o,children:t("nodes.updateAllNodes")})]})},Eme=l.memo(Pme),Mme=()=>{const e=oe(),t=q3("nodes"),{t:n}=J();return l.useCallback(o=>{if(!o)return;const s=new FileReader;s.onload=async()=>{const i=s.result;try{const c=JSON.parse(String(i)),d=GI.safeParse(c);if(!d.success){const{message:p}=FN(d.error,{prefix:n("nodes.workflowValidation")});t.error({error:BN(d.error)},p),e(Bt(Zn({title:n("nodes.unableToValidateWorkflow"),status:"error",duration:5e3}))),s.abort();return}e(Ax(d.data)),s.abort()}catch{e(Bt(Zn({title:n("nodes.unableToLoadWorkflow"),status:"error"})))}},s.readAsText(o)},[e,t,n])},Ome=l.memo(e=>e.error.issues[0]?a.jsx(Se,{children:fS(e.error.issues[0],{prefix:null}).toString()}):a.jsx(Mf,{children:e.error.issues.map((t,n)=>a.jsx(ws,{children:a.jsx(Se,{children:fS(t,{prefix:null}).toString()})},n))}));Ome.displayName="WorkflowValidationErrorContent";const Rme=()=>{const{t:e}=J(),t=l.useRef(null),n=Mme();return a.jsx(hM,{resetRef:t,accept:"application/json",onChange:n,children:r=>a.jsx(tt,{icon:a.jsx(Jg,{}),tooltip:e("nodes.loadWorkflow"),"aria-label":e("nodes.loadWorkflow"),...r})})},Ame=l.memo(Rme),Dme=()=>{const{t:e}=J(),t=oe(),{isOpen:n,onOpen:r,onClose:o}=ls(),s=l.useRef(null),i=H(d=>d.nodes.nodes.length),c=l.useCallback(()=>{t(HN()),t(Bt(Zn({title:e("toast.nodesCleared"),status:"success"}))),o()},[t,e,o]);return a.jsxs(a.Fragment,{children:[a.jsx(tt,{icon:a.jsx(qo,{}),tooltip:e("nodes.resetWorkflow"),"aria-label":e("nodes.resetWorkflow"),onClick:r,isDisabled:!i,colorScheme:"error"}),a.jsxs(Df,{isOpen:n,onClose:o,leastDestructiveRef:s,isCentered:!0,children:[a.jsx(Ma,{}),a.jsxs(Tf,{children:[a.jsx(Ea,{fontSize:"lg",fontWeight:"bold",children:e("nodes.resetWorkflow")}),a.jsx(Oa,{py:4,children:a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsx(Se,{children:e("nodes.resetWorkflowDesc")}),a.jsx(Se,{variant:"subtext",children:e("nodes.resetWorkflowDesc2")})]})}),a.jsxs(pi,{children:[a.jsx(tl,{ref:s,onClick:o,children:e("common.cancel")}),a.jsx(tl,{colorScheme:"error",ml:3,onClick:c,children:e("common.accept")})]})]})]})]})},Tme=l.memo(Dme),Nme=()=>{const{t:e}=J(),t=q8(),n=l.useCallback(()=>{const r=new Blob([JSON.stringify(t,null,2)]),o=document.createElement("a");o.href=URL.createObjectURL(r),o.download=`${t.name||"My Workflow"}.json`,document.body.appendChild(o),o.click(),o.remove()},[t]);return a.jsx(tt,{icon:a.jsx(Wu,{}),tooltip:e("nodes.downloadWorkflow"),"aria-label":e("nodes.downloadWorkflow"),onClick:n})},$me=l.memo(Nme),Lme=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:"50%",transform:"translate(-50%)"},children:[a.jsx($me,{}),a.jsx(Ame,{}),a.jsx(Tme,{})]}),zme=l.memo(Lme),Fme=()=>a.jsx(N,{sx:{gap:2,flexDir:"column"},children:Ro(bf,({title:e,description:t,color:n},r)=>a.jsx(Fn,{label:t,children:a.jsx(Ha,{sx:{userSelect:"none",color:parseInt(n.split(".")[1]??"0",10)<500?"base.800":"base.50",bg:n},textAlign:"center",children:e})},r))}),Bme=l.memo(Fme),Hme=()=>{const{t:e}=J(),t=oe(),n=l.useCallback(()=>{t(WN())},[t]);return a.jsx(Rt,{leftIcon:a.jsx(_ee,{}),tooltip:e("nodes.reloadNodeTemplates"),"aria-label":e("nodes.reloadNodeTemplates"),onClick:n,children:e("nodes.reloadNodeTemplates")})},Wme=l.memo(Hme),kd={fontWeight:600},Vme=de(Ce,({nodes:e})=>{const{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionMode:s}=e;return{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionModeIsChecked:s===VN.Full}},_e),Ume=Oe((e,t)=>{const{isOpen:n,onOpen:r,onClose:o}=ls(),s=oe(),{shouldAnimateEdges:i,shouldValidateGraph:c,shouldSnapToGrid:d,shouldColorEdges:p,selectionModeIsChecked:h}=H(Vme),m=l.useCallback(S=>{s(UN(S.target.checked))},[s]),g=l.useCallback(S=>{s(GN(S.target.checked))},[s]),b=l.useCallback(S=>{s(qN(S.target.checked))},[s]),y=l.useCallback(S=>{s(KN(S.target.checked))},[s]),x=l.useCallback(S=>{s(QN(S.target.checked))},[s]),{t:C}=J();return a.jsxs(a.Fragment,{children:[a.jsx(tt,{ref:t,"aria-label":C("nodes.workflowSettings"),tooltip:C("nodes.workflowSettings"),icon:a.jsx(WM,{}),onClick:r}),a.jsxs(bu,{isOpen:n,onClose:o,size:"2xl",isCentered:!0,children:[a.jsx(Ma,{}),a.jsxs(xu,{children:[a.jsx(Ea,{children:C("nodes.workflowSettings")}),a.jsx(kg,{}),a.jsx(Oa,{children:a.jsxs(N,{sx:{flexDirection:"column",gap:4,py:4},children:[a.jsx(vo,{size:"sm",children:"General"}),a.jsx(jr,{formLabelProps:kd,onChange:g,isChecked:i,label:C("nodes.animatedEdges"),helperText:C("nodes.animatedEdgesHelp")}),a.jsx(no,{}),a.jsx(jr,{formLabelProps:kd,isChecked:d,onChange:b,label:C("nodes.snapToGrid"),helperText:C("nodes.snapToGridHelp")}),a.jsx(no,{}),a.jsx(jr,{formLabelProps:kd,isChecked:p,onChange:y,label:C("nodes.colorCodeEdges"),helperText:C("nodes.colorCodeEdgesHelp")}),a.jsx(jr,{formLabelProps:kd,isChecked:h,onChange:x,label:C("nodes.fullyContainNodes"),helperText:C("nodes.fullyContainNodesHelp")}),a.jsx(vo,{size:"sm",pt:4,children:"Advanced"}),a.jsx(jr,{formLabelProps:kd,isChecked:c,onChange:m,label:C("nodes.validateConnections"),helperText:C("nodes.validateConnectionsHelp")}),a.jsx(Wme,{})]})})]})]})]})}),Gme=l.memo(Ume),qme=()=>{const e=H(t=>t.nodes.shouldShowFieldTypeLegend);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineEnd:2},children:[a.jsx(Gme,{}),e&&a.jsx(Bme,{})]})},Kme=l.memo(qme);function Qme(){const e=oe(),t=H(o=>o.nodes.nodeOpacity),{t:n}=J(),r=l.useCallback(o=>{e(XN(o))},[e]);return a.jsx(N,{alignItems:"center",children:a.jsxs(jy,{"aria-label":n("nodes.nodeOpacity"),value:t,min:.5,max:1,step:.01,onChange:r,orientation:"vertical",defaultValue:30,h:"calc(100% - 0.5rem)",children:[a.jsx(Iy,{children:a.jsx(Py,{})}),a.jsx(_y,{})]})})}const Xme=()=>{const{t:e}=J(),{zoomIn:t,zoomOut:n,fitView:r}=Bx(),o=oe(),s=H(h=>h.nodes.shouldShowMinimapPanel),i=l.useCallback(()=>{t()},[t]),c=l.useCallback(()=>{n()},[n]),d=l.useCallback(()=>{r()},[r]),p=l.useCallback(()=>{o(YN(!s))},[s,o]);return a.jsxs(zn,{isAttached:!0,orientation:"vertical",children:[a.jsx(tt,{tooltip:e("nodes.zoomInNodes"),"aria-label":e("nodes.zoomInNodes"),onClick:i,icon:a.jsx(Voe,{})}),a.jsx(tt,{tooltip:e("nodes.zoomOutNodes"),"aria-label":e("nodes.zoomOutNodes"),onClick:c,icon:a.jsx(Woe,{})}),a.jsx(tt,{tooltip:e("nodes.fitViewportNodes"),"aria-label":e("nodes.fitViewportNodes"),onClick:d,icon:a.jsx(VM,{})}),a.jsx(tt,{tooltip:e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),"aria-label":e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),isChecked:s,onClick:p,icon:a.jsx(mee,{})})]})},Yme=l.memo(Xme),Jme=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineStart:2},children:[a.jsx(Yme,{}),a.jsx(Qme,{})]}),Zme=l.memo(Jme),ege=Ee(L$),tge=()=>{const e=H(r=>r.nodes.shouldShowMinimapPanel),t=di("var(--invokeai-colors-accent-300)","var(--invokeai-colors-accent-600)"),n=di("var(--invokeai-colors-blackAlpha-300)","var(--invokeai-colors-blackAlpha-600)");return a.jsx(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineEnd:2},children:e&&a.jsx(ege,{pannable:!0,zoomable:!0,nodeBorderRadius:15,sx:{m:"0 !important",backgroundColor:"base.200 !important",borderRadius:"base",_dark:{backgroundColor:"base.500 !important"},svg:{borderRadius:"inherit"}},nodeColor:t,maskColor:n})})},nge=l.memo(tge),rge=()=>{const e=H(n=>n.nodes.isReady),{t}=J();return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center"},children:[a.jsx(yo,{children:e&&a.jsxs(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"relative",width:"100%",height:"100%"},children:[a.jsx(jme,{}),a.jsx(hhe,{}),a.jsx(Eme,{}),a.jsx(zme,{}),a.jsx(Kme,{}),a.jsx(Zme,{}),a.jsx(nge,{})]})}),a.jsx(yo,{children:!e&&a.jsx(Or.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"absolute",width:"100%",height:"100%"},children:a.jsx(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:a.jsx(qr,{label:t("nodes.loadingNodes"),icon:Uoe})})})})]})},oge=l.memo(rge),sge=()=>a.jsx(JN,{children:a.jsx(oge,{})}),age=l.memo(sge),ige=()=>{const{t:e}=J(),t=oe(),{data:n}=yf(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=ZN({fixedCacheKey:"clearInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.size)||!r,[n==null?void 0:n.size,r]);return{clearInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Bt({title:e("invocationCache.clearSucceeded"),status:"success"}))}catch{t(Bt({title:e("invocationCache.clearFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},lge=()=>{const{t:e}=J(),{clearInvocationCache:t,isDisabled:n,isLoading:r}=ige();return a.jsx(Rt,{isDisabled:n,isLoading:r,onClick:t,children:e("invocationCache.clear")})},cge=l.memo(lge),uge=()=>{const{t:e}=J(),t=oe(),{data:n}=yf(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=e9({fixedCacheKey:"disableInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{disableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Bt({title:e("invocationCache.disableSucceeded"),status:"success"}))}catch{t(Bt({title:e("invocationCache.disableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},dge=()=>{const{t:e}=J(),t=oe(),{data:n}=yf(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=t9({fixedCacheKey:"enableInvocationCache"}),i=l.useMemo(()=>(n==null?void 0:n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{enableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Bt({title:e("invocationCache.enableSucceeded"),status:"success"}))}catch{t(Bt({title:e("invocationCache.enableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},fge=()=>{const{t:e}=J(),{data:t}=yf(),{enableInvocationCache:n,isDisabled:r,isLoading:o}=dge(),{disableInvocationCache:s,isDisabled:i,isLoading:c}=uge();return t!=null&&t.enabled?a.jsx(Rt,{isDisabled:i,isLoading:c,onClick:s,children:e("invocationCache.disable")}):a.jsx(Rt,{isDisabled:r,isLoading:o,onClick:n,children:e("invocationCache.enable")})},pge=l.memo(fge),hge=({children:e,...t})=>a.jsx(B3,{alignItems:"center",justifyContent:"center",w:"full",h:"full",layerStyle:"second",borderRadius:"base",py:2,px:3,gap:6,flexWrap:"nowrap",...t,children:e}),qR=l.memo(hge),mge={'&[aria-disabled="true"]':{color:"base.400",_dark:{color:"base.500"}}},gge=({label:e,value:t,isDisabled:n=!1,...r})=>a.jsxs(F3,{flexGrow:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap","aria-disabled":n,sx:mge,...r,children:[a.jsx(H3,{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:e}),a.jsx(W3,{children:t})]}),ya=l.memo(gge),vge=()=>{const{t:e}=J(),{data:t}=yf(void 0);return a.jsxs(qR,{children:[a.jsx(ya,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.cacheSize"),value:(t==null?void 0:t.size)??0}),a.jsx(ya,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.hits"),value:(t==null?void 0:t.hits)??0}),a.jsx(ya,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.misses"),value:(t==null?void 0:t.misses)??0}),a.jsx(ya,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.maxCacheSize"),value:(t==null?void 0:t.max_size)??0}),a.jsxs(zn,{w:24,orientation:"vertical",size:"xs",children:[a.jsx(cge,{}),a.jsx(pge,{})]})]})},bge=l.memo(vge),KR=e=>{const t=H(c=>c.system.isConnected),[n,{isLoading:r}]=Tx(),o=oe(),{t:s}=J();return{cancelQueueItem:l.useCallback(async()=>{try{await n(e).unwrap(),o(Bt({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Bt({title:s("queue.cancelFailed"),status:"error"}))}},[o,e,s,n]),isLoading:r,isDisabled:!t}},QR=(e,t)=>Number(((Date.parse(t)-Date.parse(e))/1e3).toFixed(2)),nI={pending:{colorScheme:"cyan",translationKey:"queue.pending"},in_progress:{colorScheme:"yellow",translationKey:"queue.in_progress"},completed:{colorScheme:"green",translationKey:"queue.completed"},failed:{colorScheme:"red",translationKey:"queue.failed"},canceled:{colorScheme:"orange",translationKey:"queue.canceled"}},xge=({status:e})=>{const{t}=J();return a.jsx(Ha,{colorScheme:nI[e].colorScheme,children:t(nI[e].translationKey)})},yge=l.memo(xge),Cge=e=>{const t=H(d=>d.system.isConnected),{isCanceled:n}=n9({batch_id:e},{selectFromResult:({data:d})=>d?{isCanceled:(d==null?void 0:d.in_progress)===0&&(d==null?void 0:d.pending)===0}:{isCanceled:!0}}),[r,{isLoading:o}]=r9({fixedCacheKey:"cancelByBatchIds"}),s=oe(),{t:i}=J();return{cancelBatch:l.useCallback(async()=>{if(!n)try{await r({batch_ids:[e]}).unwrap(),s(Bt({title:i("queue.cancelBatchSucceeded"),status:"success"}))}catch{s(Bt({title:i("queue.cancelBatchFailed"),status:"error"}))}},[e,s,n,i,r]),isLoading:o,isCanceled:n,isDisabled:!t}},wge=({queueItemDTO:e})=>{const{session_id:t,batch_id:n,item_id:r}=e,{t:o}=J(),{cancelBatch:s,isLoading:i,isCanceled:c}=Cge(n),{cancelQueueItem:d,isLoading:p}=KR(r),{data:h}=o9(r),m=l.useMemo(()=>{if(!h)return o("common.loading");if(!h.completed_at||!h.started_at)return o(`queue.${h.status}`);const g=QR(h.started_at,h.completed_at);return h.status==="completed"?`${o("queue.completedIn")} ${g}${g===1?"":"s"}`:`${g}s`},[h,o]);return a.jsxs(N,{layerStyle:"third",flexDir:"column",p:2,pt:0,borderRadius:"base",gap:2,children:[a.jsxs(N,{layerStyle:"second",p:2,gap:2,justifyContent:"space-between",alignItems:"center",borderRadius:"base",h:20,children:[a.jsx(Ch,{label:o("queue.status"),data:m}),a.jsx(Ch,{label:o("queue.item"),data:r}),a.jsx(Ch,{label:o("queue.batch"),data:n}),a.jsx(Ch,{label:o("queue.session"),data:t}),a.jsxs(zn,{size:"xs",orientation:"vertical",children:[a.jsx(Rt,{onClick:d,isLoading:p,isDisabled:h?["canceled","completed","failed"].includes(h.status):!0,"aria-label":o("queue.cancelItem"),icon:a.jsx(ju,{}),colorScheme:"error",children:o("queue.cancelItem")}),a.jsx(Rt,{onClick:s,isLoading:i,isDisabled:c,"aria-label":o("queue.cancelBatch"),icon:a.jsx(ju,{}),colorScheme:"error",children:o("queue.cancelBatch")})]})]}),(h==null?void 0:h.error)&&a.jsxs(N,{layerStyle:"second",p:3,gap:1,justifyContent:"space-between",alignItems:"flex-start",borderRadius:"base",flexDir:"column",children:[a.jsx(vo,{size:"sm",color:"error.500",_dark:{color:"error.400"},children:"Error"}),a.jsx("pre",{children:h.error})]}),a.jsx(N,{layerStyle:"second",h:512,w:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",children:h?a.jsx(lc,{children:a.jsx(el,{label:"Queue Item",data:h})}):a.jsx(bi,{opacity:.5})})]})},Sge=l.memo(wge),Ch=({label:e,data:t})=>a.jsxs(N,{flexDir:"column",justifyContent:"flex-start",p:1,gap:1,overflow:"hidden",h:"full",w:"full",children:[a.jsx(vo,{size:"md",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e}),a.jsx(Se,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]}),wa={number:"3rem",statusBadge:"5.7rem",statusDot:2,time:"4rem",batchId:"5rem",fieldValues:"auto",actions:"auto"},rI={bg:"base.300",_dark:{bg:"base.750"}},kge={_hover:rI,"&[aria-selected='true']":rI},jge=({index:e,item:t,context:n})=>{const{t:r}=J(),o=l.useCallback(()=>{n.toggleQueueItem(t.item_id)},[n,t.item_id]),{cancelQueueItem:s,isLoading:i}=KR(t.item_id),c=l.useCallback(m=>{m.stopPropagation(),s()},[s]),d=l.useMemo(()=>n.openQueueItems.includes(t.item_id),[n.openQueueItems,t.item_id]),p=l.useMemo(()=>!t.completed_at||!t.started_at?void 0:`${QR(t.started_at,t.completed_at)}s`,[t]),h=l.useMemo(()=>["canceled","completed","failed"].includes(t.status),[t.status]);return a.jsxs(N,{flexDir:"column","aria-selected":d,fontSize:"sm",borderRadius:"base",justifyContent:"center",sx:kge,"data-testid":"queue-item",children:[a.jsxs(N,{minH:9,alignItems:"center",gap:4,p:1.5,cursor:"pointer",onClick:o,children:[a.jsx(N,{w:wa.number,justifyContent:"flex-end",alignItems:"center",flexShrink:0,children:a.jsx(Se,{variant:"subtext",children:e+1})}),a.jsx(N,{w:wa.statusBadge,alignItems:"center",flexShrink:0,children:a.jsx(yge,{status:t.status})}),a.jsx(N,{w:wa.time,alignItems:"center",flexShrink:0,children:p||"-"}),a.jsx(N,{w:wa.batchId,flexShrink:0,children:a.jsx(Se,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",alignItems:"center",children:t.batch_id})}),a.jsx(N,{alignItems:"center",overflow:"hidden",flexGrow:1,children:t.field_values&&a.jsx(N,{gap:2,w:"full",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:t.field_values.filter(m=>m.node_path!=="metadata_accumulator").map(({node_path:m,field_name:g,value:b})=>a.jsxs(Se,{as:"span",children:[a.jsxs(Se,{as:"span",fontWeight:600,children:[m,".",g]}),": ",b]},`${t.item_id}.${m}.${g}.${b}`))})}),a.jsx(N,{alignItems:"center",w:wa.actions,pe:3,children:a.jsx(zn,{size:"xs",variant:"ghost",children:a.jsx(tt,{onClick:c,isDisabled:h,isLoading:i,"aria-label":r("queue.cancelItem"),icon:a.jsx(ju,{})})})})]}),a.jsx(Sf,{in:d,transition:{enter:{duration:.1},exit:{duration:.1}},unmountOnExit:!0,children:a.jsx(Sge,{queueItemDTO:t})})]})},_ge=l.memo(jge),Ige=l.memo(Oe((e,t)=>a.jsx(N,{...e,ref:t,flexDirection:"column",gap:.5,children:e.children}))),Pge=l.memo(Ige),Ege=()=>a.jsxs(N,{alignItems:"center",gap:4,p:1,pb:2,textTransform:"uppercase",fontWeight:700,fontSize:"xs",letterSpacing:1,children:[a.jsx(N,{w:wa.number,justifyContent:"flex-end",alignItems:"center",children:a.jsx(Se,{variant:"subtext",children:"#"})}),a.jsx(N,{ps:.5,w:wa.statusBadge,alignItems:"center",children:a.jsx(Se,{variant:"subtext",children:"status"})}),a.jsx(N,{ps:.5,w:wa.time,alignItems:"center",children:a.jsx(Se,{variant:"subtext",children:"time"})}),a.jsx(N,{ps:.5,w:wa.batchId,alignItems:"center",children:a.jsx(Se,{variant:"subtext",children:"batch"})}),a.jsx(N,{ps:.5,w:wa.fieldValues,alignItems:"center",children:a.jsx(Se,{variant:"subtext",children:"batch field values"})})]}),Mge=l.memo(Ege),Oge={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},Rge=de(Ce,({queue:e})=>{const{listCursor:t,listPriority:n}=e;return{listCursor:t,listPriority:n}},_e),Age=(e,t)=>t.item_id,Dge={List:Pge},Tge=(e,t,n)=>a.jsx(_ge,{index:e,item:t,context:n}),Nge=()=>{const{listCursor:e,listPriority:t}=H(Rge),n=oe(),r=l.useRef(null),[o,s]=l.useState(null),[i,c]=u2(Oge),{t:d}=J();l.useEffect(()=>{const{current:S}=r;return o&&S&&i({target:S,elements:{viewport:o}}),()=>{var j;return(j=c())==null?void 0:j.destroy()}},[o,i,c]);const{data:p,isLoading:h}=s9({cursor:e,priority:t}),m=l.useMemo(()=>p?a9.getSelectors().selectAll(p):[],[p]),g=l.useCallback(()=>{if(!(p!=null&&p.has_more))return;const S=m[m.length-1];S&&(n(Nx(S.item_id)),n($x(S.priority)))},[n,p==null?void 0:p.has_more,m]),[b,y]=l.useState([]),x=l.useCallback(S=>{y(j=>j.includes(S)?j.filter(_=>_!==S):[...j,S])},[]),C=l.useMemo(()=>({openQueueItems:b,toggleQueueItem:x}),[b,x]);return h?a.jsx(are,{}):m.length?a.jsxs(N,{w:"full",h:"full",flexDir:"column",children:[a.jsx(Mge,{}),a.jsx(N,{ref:r,w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx(voe,{data:m,endReached:g,scrollerRef:s,itemContent:Tge,computeItemKey:Age,components:Dge,context:C})})]}):a.jsx(N,{w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx(vo,{color:"base.400",_dark:{color:"base.500"},children:d("queue.queueEmpty")})})},$ge=l.memo(Nge),Lge=()=>{const{data:e}=Fa(),{t}=J();return a.jsxs(qR,{"data-testid":"queue-status",children:[a.jsx(ya,{label:t("queue.in_progress"),value:(e==null?void 0:e.queue.in_progress)??0}),a.jsx(ya,{label:t("queue.pending"),value:(e==null?void 0:e.queue.pending)??0}),a.jsx(ya,{label:t("queue.completed"),value:(e==null?void 0:e.queue.completed)??0}),a.jsx(ya,{label:t("queue.failed"),value:(e==null?void 0:e.queue.failed)??0}),a.jsx(ya,{label:t("queue.canceled"),value:(e==null?void 0:e.queue.canceled)??0}),a.jsx(ya,{label:t("queue.total"),value:(e==null?void 0:e.queue.total)??0})]})},zge=l.memo(Lge);function Fge(e){return Qe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828l.645-1.937zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.734 1.734 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.734 1.734 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.734 1.734 0 0 0 3.407 2.31l.387-1.162zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L10.863.1z"}}]})(e)}const Bge=()=>{const e=oe(),{t}=J(),n=H(d=>d.system.isConnected),[r,{isLoading:o}]=dP({fixedCacheKey:"pruneQueue"}),{finishedCount:s}=Fa(void 0,{selectFromResult:({data:d})=>d?{finishedCount:d.queue.completed+d.queue.canceled+d.queue.failed}:{finishedCount:0}}),i=l.useCallback(async()=>{if(s)try{const d=await r().unwrap();e(Bt({title:t("queue.pruneSucceeded",{item_count:d.deleted}),status:"success"})),e(Nx(void 0)),e($x(void 0))}catch{e(Bt({title:t("queue.pruneFailed"),status:"error"}))}},[s,r,e,t]),c=l.useMemo(()=>!n||!s,[s,n]);return{pruneQueue:i,isLoading:o,finishedCount:s,isDisabled:c}},Hge=({asIconButton:e})=>{const{t}=J(),{pruneQueue:n,isLoading:r,finishedCount:o,isDisabled:s}=Bge();return a.jsx(ic,{isDisabled:s,isLoading:r,asIconButton:e,label:t("queue.prune"),tooltip:t("queue.pruneTooltip",{item_count:o}),icon:a.jsx(Fge,{}),onClick:n,colorScheme:"blue"})},Wge=l.memo(Hge),Vge=()=>{const e=jn("pauseQueue").isFeatureEnabled,t=jn("resumeQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"second",borderRadius:"base",p:2,gap:2,children:[e||t?a.jsxs(zn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[t?a.jsx(M8,{}):a.jsx(a.Fragment,{}),e?a.jsx(k8,{}):a.jsx(a.Fragment,{})]}):a.jsx(a.Fragment,{}),a.jsxs(zn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[a.jsx(Wge,{}),a.jsx(O2,{})]})]})},Uge=l.memo(Vge),Gge=()=>{const e=jn("invocationCache").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",borderRadius:"base",w:"full",h:"full",p:2,flexDir:"column",gap:2,children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsx(Uge,{}),a.jsx(zge,{}),e&&a.jsx(bge,{})]}),a.jsx(Te,{layerStyle:"second",p:2,borderRadius:"base",w:"full",h:"full",children:a.jsx($ge,{})})]})},qge=l.memo(Gge),Kge=()=>a.jsx(qge,{}),Qge=l.memo(Kge),Xge=()=>a.jsx(RR,{}),Yge=l.memo(Xge);var px={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=pS;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=pS;e.exports=r.Konva})(px,px.exports);var Jge=px.exports;const ff=hf(Jge);var XR={exports:{}};/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zge=function(t){var n={},r=l,o=Sh,s=Object.assign;function i(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,v=1;vae||k[$]!==E[ae]){var ge=` +`+k[$].replace(" at new "," at ");return u.displayName&&ge.includes("")&&(ge=ge.replace("",u.displayName)),ge}while(1<=$&&0<=ae);break}}}finally{Zt=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?Vt(u):""}var sn=Object.prototype.hasOwnProperty,Yt=[],He=-1;function Ct(u){return{current:u}}function zt(u){0>He||(u.current=Yt[He],Yt[He]=null,He--)}function Qt(u,f){He++,Yt[He]=u.current,u.current=f}var Nn={},Jt=Ct(Nn),vn=Ct(!1),fn=Nn;function Br(u,f){var v=u.type.contextTypes;if(!v)return Nn;var w=u.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===f)return w.__reactInternalMemoizedMaskedChildContext;var k={},E;for(E in v)k[E]=f[E];return w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=k),k}function cr(u){return u=u.childContextTypes,u!=null}function Dt(){zt(vn),zt(Jt)}function $n(u,f,v){if(Jt.current!==Nn)throw Error(i(168));Qt(Jt,f),Qt(vn,v)}function Wn(u,f,v){var w=u.stateNode;if(f=f.childContextTypes,typeof w.getChildContext!="function")return v;w=w.getChildContext();for(var k in w)if(!(k in f))throw Error(i(108,A(u)||"Unknown",k));return s({},v,w)}function ur(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Nn,fn=Jt.current,Qt(Jt,u),Qt(vn,vn.current),!0}function Ir(u,f,v){var w=u.stateNode;if(!w)throw Error(i(169));v?(u=Wn(u,f,fn),w.__reactInternalMemoizedMergedChildContext=u,zt(vn),zt(Jt),Qt(Jt,u)):zt(vn),Qt(vn,v)}var Kn=Math.clz32?Math.clz32:On,Qn=Math.log,bn=Math.LN2;function On(u){return u>>>=0,u===0?32:31-(Qn(u)/bn|0)|0}var Ln=64,In=4194304;function Pn(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Je(u,f){var v=u.pendingLanes;if(v===0)return 0;var w=0,k=u.suspendedLanes,E=u.pingedLanes,$=v&268435455;if($!==0){var ae=$&~k;ae!==0?w=Pn(ae):(E&=$,E!==0&&(w=Pn(E)))}else $=v&~k,$!==0?w=Pn($):E!==0&&(w=Pn(E));if(w===0)return 0;if(f!==0&&f!==w&&!(f&k)&&(k=w&-w,E=f&-f,k>=E||k===16&&(E&4194240)!==0))return f;if(w&4&&(w|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=w;0v;v++)f.push(u);return f}function bt(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-Kn(f),u[f]=v}function st(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var w=u.eventTimes;for(u=u.expirationTimes;0>=$,k-=$,Jo=1<<32-Kn(f)+k|v<Rn?(eo=rn,rn=null):eo=rn.sibling;var An=ct(me,rn,ye[Rn],dt);if(An===null){rn===null&&(rn=eo);break}u&&rn&&An.alternate===null&&f(me,rn),ce=E(An,ce,Rn),un===null?Wt=An:un.sibling=An,un=An,rn=eo}if(Rn===ye.length)return v(me,rn),dr&&xl(me,Rn),Wt;if(rn===null){for(;RnRn?(eo=rn,rn=null):eo=rn.sibling;var $i=ct(me,rn,An.value,dt);if($i===null){rn===null&&(rn=eo);break}u&&rn&&$i.alternate===null&&f(me,rn),ce=E($i,ce,Rn),un===null?Wt=$i:un.sibling=$i,un=$i,rn=eo}if(An.done)return v(me,rn),dr&&xl(me,Rn),Wt;if(rn===null){for(;!An.done;Rn++,An=ye.next())An=nn(me,An.value,dt),An!==null&&(ce=E(An,ce,Rn),un===null?Wt=An:un.sibling=An,un=An);return dr&&xl(me,Rn),Wt}for(rn=w(me,rn);!An.done;Rn++,An=ye.next())An=lr(rn,me,Rn,An.value,dt),An!==null&&(u&&An.alternate!==null&&rn.delete(An.key===null?Rn:An.key),ce=E(An,ce,Rn),un===null?Wt=An:un.sibling=An,un=An);return u&&rn.forEach(function(FA){return f(me,FA)}),dr&&xl(me,Rn),Wt}function Ya(me,ce,ye,dt){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case d:e:{for(var Wt=ye.key,un=ce;un!==null;){if(un.key===Wt){if(Wt=ye.type,Wt===h){if(un.tag===7){v(me,un.sibling),ce=k(un,ye.props.children),ce.return=me,me=ce;break e}}else if(un.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===_&&hC(Wt)===un.type){v(me,un.sibling),ce=k(un,ye.props),ce.ref=Ju(me,un,ye),ce.return=me,me=ce;break e}v(me,un);break}else f(me,un);un=un.sibling}ye.type===h?(ce=_l(ye.props.children,me.mode,dt,ye.key),ce.return=me,me=ce):(dt=Mp(ye.type,ye.key,ye.props,null,me.mode,dt),dt.ref=Ju(me,ce,ye),dt.return=me,me=dt)}return $(me);case p:e:{for(un=ye.key;ce!==null;){if(ce.key===un)if(ce.tag===4&&ce.stateNode.containerInfo===ye.containerInfo&&ce.stateNode.implementation===ye.implementation){v(me,ce.sibling),ce=k(ce,ye.children||[]),ce.return=me,me=ce;break e}else{v(me,ce);break}else f(me,ce);ce=ce.sibling}ce=Iv(ye,me.mode,dt),ce.return=me,me=ce}return $(me);case _:return un=ye._init,Ya(me,ce,un(ye._payload),dt)}if(Q(ye))return Yn(me,ce,ye,dt);if(M(ye))return Lo(me,ce,ye,dt);op(me,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ce!==null&&ce.tag===6?(v(me,ce.sibling),ce=k(ce,ye),ce.return=me,me=ce):(v(me,ce),ce=_v(ye,me.mode,dt),ce.return=me,me=ce),$(me)):v(me,ce)}return Ya}var hc=mC(!0),gC=mC(!1),Zu={},hs=Ct(Zu),ed=Ct(Zu),mc=Ct(Zu);function pa(u){if(u===Zu)throw Error(i(174));return u}function F0(u,f){Qt(mc,f),Qt(ed,u),Qt(hs,Zu),u=L(f),zt(hs),Qt(hs,u)}function gc(){zt(hs),zt(ed),zt(mc)}function vC(u){var f=pa(mc.current),v=pa(hs.current);f=ee(v,u.type,f),v!==f&&(Qt(ed,u),Qt(hs,f))}function B0(u){ed.current===u&&(zt(hs),zt(ed))}var yr=Ct(0);function sp(u){for(var f=u;f!==null;){if(f.tag===13){var v=f.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Yr(v)||ca(v)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var H0=[];function W0(){for(var u=0;uv?v:4,u(!0);var w=V0.transition;V0.transition={};try{u(!1),f()}finally{Ae=v,V0.transition=w}}function TC(){return ms().memoizedState}function pA(u,f,v){var w=Di(u);if(v={lane:w,action:v,hasEagerState:!1,eagerState:null,next:null},NC(u))$C(f,v);else if(v=aC(u,f,v,w),v!==null){var k=mo();gs(v,u,w,k),LC(v,f,w)}}function hA(u,f,v){var w=Di(u),k={lane:w,action:v,hasEagerState:!1,eagerState:null,next:null};if(NC(u))$C(f,k);else{var E=u.alternate;if(u.lanes===0&&(E===null||E.lanes===0)&&(E=f.lastRenderedReducer,E!==null))try{var $=f.lastRenderedState,ae=E($,v);if(k.hasEagerState=!0,k.eagerState=ae,xn(ae,$)){var ge=f.interleaved;ge===null?(k.next=k,N0(f)):(k.next=ge.next,ge.next=k),f.interleaved=k;return}}catch{}finally{}v=aC(u,f,k,w),v!==null&&(k=mo(),gs(v,u,w,k),LC(v,f,w))}}function NC(u){var f=u.alternate;return u===Cr||f!==null&&f===Cr}function $C(u,f){td=ip=!0;var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}function LC(u,f,v){if(v&4194240){var w=f.lanes;w&=u.pendingLanes,v|=w,f.lanes=v,Le(u,v)}}var up={readContext:ps,useCallback:fo,useContext:fo,useEffect:fo,useImperativeHandle:fo,useInsertionEffect:fo,useLayoutEffect:fo,useMemo:fo,useReducer:fo,useRef:fo,useState:fo,useDebugValue:fo,useDeferredValue:fo,useTransition:fo,useMutableSource:fo,useSyncExternalStore:fo,useId:fo,unstable_isNewReconciler:!1},mA={readContext:ps,useCallback:function(u,f){return ha().memoizedState=[u,f===void 0?null:f],u},useContext:ps,useEffect:IC,useImperativeHandle:function(u,f,v){return v=v!=null?v.concat([u]):null,lp(4194308,4,MC.bind(null,f,u),v)},useLayoutEffect:function(u,f){return lp(4194308,4,u,f)},useInsertionEffect:function(u,f){return lp(4,2,u,f)},useMemo:function(u,f){var v=ha();return f=f===void 0?null:f,u=u(),v.memoizedState=[u,f],u},useReducer:function(u,f,v){var w=ha();return f=v!==void 0?v(f):f,w.memoizedState=w.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},w.queue=u,u=u.dispatch=pA.bind(null,Cr,u),[w.memoizedState,u]},useRef:function(u){var f=ha();return u={current:u},f.memoizedState=u},useState:jC,useDebugValue:Y0,useDeferredValue:function(u){return ha().memoizedState=u},useTransition:function(){var u=jC(!1),f=u[0];return u=fA.bind(null,u[1]),ha().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,v){var w=Cr,k=ha();if(dr){if(v===void 0)throw Error(i(407));v=v()}else{if(v=f(),Zr===null)throw Error(i(349));Cl&30||yC(w,f,v)}k.memoizedState=v;var E={value:v,getSnapshot:f};return k.queue=E,IC(wC.bind(null,w,E,u),[u]),w.flags|=2048,od(9,CC.bind(null,w,E,v,f),void 0,null),v},useId:function(){var u=ha(),f=Zr.identifierPrefix;if(dr){var v=uo,w=Jo;v=(w&~(1<<32-Kn(w)-1)).toString(32)+v,f=":"+f+"R"+v,v=nd++,0bv&&(f.flags|=128,w=!0,id(k,!1),f.lanes=4194304)}else{if(!w)if(u=sp(E),u!==null){if(f.flags|=128,w=!0,u=u.updateQueue,u!==null&&(f.updateQueue=u,f.flags|=4),id(k,!0),k.tail===null&&k.tailMode==="hidden"&&!E.alternate&&!dr)return po(f),null}else 2*Ue()-k.renderingStartTime>bv&&v!==1073741824&&(f.flags|=128,w=!0,id(k,!1),f.lanes=4194304);k.isBackwards?(E.sibling=f.child,f.child=E):(u=k.last,u!==null?u.sibling=E:f.child=E,k.last=E)}return k.tail!==null?(f=k.tail,k.rendering=f,k.tail=f.sibling,k.renderingStartTime=Ue(),f.sibling=null,u=yr.current,Qt(yr,w?u&1|2:u&1),f):(po(f),null);case 22:case 23:return Sv(),v=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==v&&(f.flags|=8192),v&&f.mode&1?es&1073741824&&(po(f),pe&&f.subtreeFlags&6&&(f.flags|=8192)):po(f),null;case 24:return null;case 25:return null}throw Error(i(156,f.tag))}function SA(u,f){switch(P0(f),f.tag){case 1:return cr(f.type)&&Dt(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return gc(),zt(vn),zt(Jt),W0(),u=f.flags,u&65536&&!(u&128)?(f.flags=u&-65537|128,f):null;case 5:return B0(f),null;case 13:if(zt(yr),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(i(340));dc()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return zt(yr),null;case 4:return gc(),null;case 10:return D0(f.type._context),null;case 22:case 23:return Sv(),null;case 24:return null;default:return null}}var mp=!1,ho=!1,kA=typeof WeakSet=="function"?WeakSet:Set,gt=null;function bc(u,f){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(w){fr(u,f,w)}else v.current=null}function av(u,f,v){try{v()}catch(w){fr(u,f,w)}}var rw=!1;function jA(u,f){for(K(u.containerInfo),gt=f;gt!==null;)if(u=gt,f=u.child,(u.subtreeFlags&1028)!==0&&f!==null)f.return=u,gt=f;else for(;gt!==null;){u=gt;try{var v=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,k=v.memoizedState,E=u.stateNode,$=E.getSnapshotBeforeUpdate(u.elementType===u.type?w:Fs(u.type,w),k);E.__reactInternalSnapshotBeforeUpdate=$}break;case 3:pe&&hn(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ae){fr(u,u.return,ae)}if(f=u.sibling,f!==null){f.return=u.return,gt=f;break}gt=u.return}return v=rw,rw=!1,v}function ld(u,f,v){var w=f.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var k=w=w.next;do{if((k.tag&u)===u){var E=k.destroy;k.destroy=void 0,E!==void 0&&av(f,v,E)}k=k.next}while(k!==w)}}function gp(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&u)===u){var w=v.create;v.destroy=w()}v=v.next}while(v!==f)}}function iv(u){var f=u.ref;if(f!==null){var v=u.stateNode;switch(u.tag){case 5:u=U(v);break;default:u=v}typeof f=="function"?f(u):f.current=u}}function ow(u){var f=u.alternate;f!==null&&(u.alternate=null,ow(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&De(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function sw(u){return u.tag===5||u.tag===3||u.tag===4}function aw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||sw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function lv(u,f,v){var w=u.tag;if(w===5||w===6)u=u.stateNode,f?_n(v,u,f):ht(v,u);else if(w!==4&&(u=u.child,u!==null))for(lv(u,f,v),u=u.sibling;u!==null;)lv(u,f,v),u=u.sibling}function cv(u,f,v){var w=u.tag;if(w===5||w===6)u=u.stateNode,f?Xe(v,u,f):je(v,u);else if(w!==4&&(u=u.child,u!==null))for(cv(u,f,v),u=u.sibling;u!==null;)cv(u,f,v),u=u.sibling}var lo=null,Bs=!1;function ga(u,f,v){for(v=v.child;v!==null;)uv(u,f,v),v=v.sibling}function uv(u,f,v){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ir,v)}catch{}switch(v.tag){case 5:ho||bc(v,f);case 6:if(pe){var w=lo,k=Bs;lo=null,ga(u,f,v),lo=w,Bs=k,lo!==null&&(Bs?Ze(lo,v.stateNode):Me(lo,v.stateNode))}else ga(u,f,v);break;case 18:pe&&lo!==null&&(Bs?We(lo,v.stateNode):wt(lo,v.stateNode));break;case 4:pe?(w=lo,k=Bs,lo=v.stateNode.containerInfo,Bs=!0,ga(u,f,v),lo=w,Bs=k):(le&&(w=v.stateNode.containerInfo,k=Dr(w),or(w,k)),ga(u,f,v));break;case 0:case 11:case 14:case 15:if(!ho&&(w=v.updateQueue,w!==null&&(w=w.lastEffect,w!==null))){k=w=w.next;do{var E=k,$=E.destroy;E=E.tag,$!==void 0&&(E&2||E&4)&&av(v,f,$),k=k.next}while(k!==w)}ga(u,f,v);break;case 1:if(!ho&&(bc(v,f),w=v.stateNode,typeof w.componentWillUnmount=="function"))try{w.props=v.memoizedProps,w.state=v.memoizedState,w.componentWillUnmount()}catch(ae){fr(v,f,ae)}ga(u,f,v);break;case 21:ga(u,f,v);break;case 22:v.mode&1?(ho=(w=ho)||v.memoizedState!==null,ga(u,f,v),ho=w):ga(u,f,v);break;default:ga(u,f,v)}}function iw(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new kA),f.forEach(function(w){var k=DA.bind(null,u,w);v.has(w)||(v.add(w),w.then(k,k))})}}function Hs(u,f){var v=f.deletions;if(v!==null)for(var w=0;w";case bp:return":has("+(pv(u)||"")+")";case xp:return'[role="'+u.value+'"]';case Cp:return'"'+u.value+'"';case yp:return'[data-testname="'+u.value+'"]';default:throw Error(i(365))}}function pw(u,f){var v=[];u=[u,0];for(var w=0;wk&&(k=$),w&=~E}if(w=k,w=Ue()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*IA(w/1960))-w,10u?16:u,Ai===null)var w=!1;else{if(u=Ai,Ai=null,_p=0,pn&6)throw Error(i(331));var k=pn;for(pn|=4,gt=u.current;gt!==null;){var E=gt,$=E.child;if(gt.flags&16){var ae=E.deletions;if(ae!==null){for(var ge=0;geUe()-vv?Sl(u,0):gv|=v),$o(u,f)}function ww(u,f){f===0&&(u.mode&1?(f=In,In<<=1,!(In&130023424)&&(In=4194304)):f=1);var v=mo();u=fa(u,f),u!==null&&(bt(u,f,v),$o(u,v))}function AA(u){var f=u.memoizedState,v=0;f!==null&&(v=f.retryLane),ww(u,v)}function DA(u,f){var v=0;switch(u.tag){case 13:var w=u.stateNode,k=u.memoizedState;k!==null&&(v=k.retryLane);break;case 19:w=u.stateNode;break;default:throw Error(i(314))}w!==null&&w.delete(f),ww(u,v)}var Sw;Sw=function(u,f,v){if(u!==null)if(u.memoizedProps!==f.pendingProps||vn.current)To=!0;else{if(!(u.lanes&v)&&!(f.flags&128))return To=!1,CA(u,f,v);To=!!(u.flags&131072)}else To=!1,dr&&f.flags&1048576&&eC(f,So,f.index);switch(f.lanes=0,f.tag){case 2:var w=f.type;fp(u,f),u=f.pendingProps;var k=Br(f,Jt.current);pc(f,v),k=G0(null,f,w,u,k,v);var E=q0();return f.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,cr(w)?(E=!0,ur(f)):E=!1,f.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,$0(f),k.updater=rp,f.stateNode=k,k._reactInternals=f,z0(f,w,u,v),f=tv(null,f,w,!0,E,v)):(f.tag=0,dr&&E&&I0(f),_o(null,f,k,v),f=f.child),f;case 16:w=f.elementType;e:{switch(fp(u,f),u=f.pendingProps,k=w._init,w=k(w._payload),f.type=w,k=f.tag=NA(w),u=Fs(w,u),k){case 0:f=ev(null,f,w,u,v);break e;case 1:f=QC(null,f,w,u,v);break e;case 11:f=VC(null,f,w,u,v);break e;case 14:f=UC(null,f,w,Fs(w.type,u),v);break e}throw Error(i(306,w,""))}return f;case 0:return w=f.type,k=f.pendingProps,k=f.elementType===w?k:Fs(w,k),ev(u,f,w,k,v);case 1:return w=f.type,k=f.pendingProps,k=f.elementType===w?k:Fs(w,k),QC(u,f,w,k,v);case 3:e:{if(XC(f),u===null)throw Error(i(387));w=f.pendingProps,E=f.memoizedState,k=E.element,iC(u,f),np(f,w,null,v);var $=f.memoizedState;if(w=$.element,we&&E.isDehydrated)if(E={element:w,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},f.updateQueue.baseState=E,f.memoizedState=E,f.flags&256){k=vc(Error(i(423)),f),f=YC(u,f,w,v,k);break e}else if(w!==k){k=vc(Error(i(424)),f),f=YC(u,f,w,v,k);break e}else for(we&&(fs=ie(f.stateNode.containerInfo),Zo=f,dr=!0,zs=null,Yu=!1),v=gC(f,null,w,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(dc(),w===k){f=Qa(u,f,v);break e}_o(u,f,w,v)}f=f.child}return f;case 5:return vC(f),u===null&&M0(f),w=f.type,k=f.pendingProps,E=u!==null?u.memoizedProps:null,$=k.children,V(w,k)?$=null:E!==null&&V(w,E)&&(f.flags|=32),KC(u,f),_o(u,f,$,v),f.child;case 6:return u===null&&M0(f),null;case 13:return JC(u,f,v);case 4:return F0(f,f.stateNode.containerInfo),w=f.pendingProps,u===null?f.child=hc(f,null,w,v):_o(u,f,w,v),f.child;case 11:return w=f.type,k=f.pendingProps,k=f.elementType===w?k:Fs(w,k),VC(u,f,w,k,v);case 7:return _o(u,f,f.pendingProps,v),f.child;case 8:return _o(u,f,f.pendingProps.children,v),f.child;case 12:return _o(u,f,f.pendingProps.children,v),f.child;case 10:e:{if(w=f.type._context,k=f.pendingProps,E=f.memoizedProps,$=k.value,sC(f,w,$),E!==null)if(xn(E.value,$)){if(E.children===k.children&&!vn.current){f=Qa(u,f,v);break e}}else for(E=f.child,E!==null&&(E.return=f);E!==null;){var ae=E.dependencies;if(ae!==null){$=E.child;for(var ge=ae.firstContext;ge!==null;){if(ge.context===w){if(E.tag===1){ge=Ka(-1,v&-v),ge.tag=2;var Fe=E.updateQueue;if(Fe!==null){Fe=Fe.shared;var xt=Fe.pending;xt===null?ge.next=ge:(ge.next=xt.next,xt.next=ge),Fe.pending=ge}}E.lanes|=v,ge=E.alternate,ge!==null&&(ge.lanes|=v),T0(E.return,v,f),ae.lanes|=v;break}ge=ge.next}}else if(E.tag===10)$=E.type===f.type?null:E.child;else if(E.tag===18){if($=E.return,$===null)throw Error(i(341));$.lanes|=v,ae=$.alternate,ae!==null&&(ae.lanes|=v),T0($,v,f),$=E.sibling}else $=E.child;if($!==null)$.return=E;else for($=E;$!==null;){if($===f){$=null;break}if(E=$.sibling,E!==null){E.return=$.return,$=E;break}$=$.return}E=$}_o(u,f,k.children,v),f=f.child}return f;case 9:return k=f.type,w=f.pendingProps.children,pc(f,v),k=ps(k),w=w(k),f.flags|=1,_o(u,f,w,v),f.child;case 14:return w=f.type,k=Fs(w,f.pendingProps),k=Fs(w.type,k),UC(u,f,w,k,v);case 15:return GC(u,f,f.type,f.pendingProps,v);case 17:return w=f.type,k=f.pendingProps,k=f.elementType===w?k:Fs(w,k),fp(u,f),f.tag=1,cr(w)?(u=!0,ur(f)):u=!1,pc(f,v),fC(f,w,k),z0(f,w,k,v),tv(null,f,w,!0,u,v);case 19:return ew(u,f,v);case 22:return qC(u,f,v)}throw Error(i(156,f.tag))};function kw(u,f){return Ve(u,f)}function TA(u,f,v,w){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vs(u,f,v,w){return new TA(u,f,v,w)}function jv(u){return u=u.prototype,!(!u||!u.isReactComponent)}function NA(u){if(typeof u=="function")return jv(u)?1:0;if(u!=null){if(u=u.$$typeof,u===x)return 11;if(u===j)return 14}return 2}function Ni(u,f){var v=u.alternate;return v===null?(v=vs(u.tag,f,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=f,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,f=u.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function Mp(u,f,v,w,k,E){var $=2;if(w=u,typeof u=="function")jv(u)&&($=1);else if(typeof u=="string")$=5;else e:switch(u){case h:return _l(v.children,k,E,f);case m:$=8,k|=8;break;case g:return u=vs(12,v,f,k|2),u.elementType=g,u.lanes=E,u;case C:return u=vs(13,v,f,k),u.elementType=C,u.lanes=E,u;case S:return u=vs(19,v,f,k),u.elementType=S,u.lanes=E,u;case I:return Op(v,k,E,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case b:$=10;break e;case y:$=9;break e;case x:$=11;break e;case j:$=14;break e;case _:$=16,w=null;break e}throw Error(i(130,u==null?u:typeof u,""))}return f=vs($,v,f,k),f.elementType=u,f.type=w,f.lanes=E,f}function _l(u,f,v,w){return u=vs(7,u,w,f),u.lanes=v,u}function Op(u,f,v,w){return u=vs(22,u,w,f),u.elementType=I,u.lanes=v,u.stateNode={isHidden:!1},u}function _v(u,f,v){return u=vs(6,u,null,f),u.lanes=v,u}function Iv(u,f,v){return f=vs(4,u.children!==null?u.children:[],u.key,f),f.lanes=v,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function $A(u,f,v,w,k){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=w,this.onRecoverableError=k,we&&(this.mutableSourceEagerHydrationData=null)}function jw(u,f,v,w,k,E,$,ae,ge){return u=new $A(u,f,v,ae,ge),f===1?(f=1,E===!0&&(f|=8)):f=0,E=vs(3,null,null,f),u.current=E,E.stateNode=u,E.memoizedState={element:w,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},$0(E),u}function _w(u){if(!u)return Nn;u=u._reactInternals;e:{if(D(u)!==u||u.tag!==1)throw Error(i(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(cr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(i(171))}if(u.tag===1){var v=u.type;if(cr(v))return Wn(u,v,f)}return f}function Iw(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(i(188)):(u=Object.keys(u).join(","),Error(i(268,u)));return u=Y(f),u===null?null:u.stateNode}function Pw(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v=Fe&&E>=nn&&k<=xt&&$<=ct){u.splice(f,1);break}else if(w!==Fe||v.width!==ge.width||ct$){if(!(E!==nn||v.height!==ge.height||xtk)){Fe>w&&(ge.width+=Fe-w,ge.x=w),xtE&&(ge.height+=nn-E,ge.y=E),ct<$&&(ge.height=$-nn),u.splice(f,1);break}}}return u},n.findHostInstance=Iw,n.findHostInstanceWithNoPortals=function(u){return u=T(u),u=u!==null?W(u):null,u===null?null:u.stateNode},n.findHostInstanceWithWarning=function(u){return Iw(u)},n.flushControlled=function(u){var f=pn;pn|=1;var v=Tr.transition,w=Ae;try{Tr.transition=null,Ae=1,u()}finally{Ae=w,Tr.transition=v,pn=f,pn===0&&(yc(),Yo())}},n.flushPassiveEffects=jl,n.flushSync=gw,n.focusWithin=function(u,f){if(!ot)throw Error(i(363));for(u=dv(u),f=pw(u,f),f=Array.from(f),u=0;uv&&(v=$)),$ ")+` + +No matching component was found for: + `)+u.join(" > ")}return null},n.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return U(u.child.stateNode);default:return u.child.stateNode}},n.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:LA,findFiberByHostInstance:u.findFiberByHostInstance||zA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)u=!0;else{try{ir=f.inject(u),Sn=f}catch{}u=!!f.checkDCE}}return u},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(u,f,v,w){if(!ot)throw Error(i(363));u=hv(u,f);var k=Ht(u,v,w).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(u,f){var v=f._getVersion;v=v(f._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[f,v]:u.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(u,f){var v=Ae;try{return Ae=u,f()}finally{Ae=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(u,f,v,w){var k=f.current,E=mo(),$=Di(k);return v=_w(v),f.context===null?f.context=v:f.pendingContext=v,f=Ka(E,$),f.payload={element:u},w=w===void 0?null:w,w!==null&&(f.callback=w),u=Oi(k,f,$),u!==null&&(gs(u,k,$,E),tp(u,k,$)),$},n};XR.exports=Zge;var e0e=XR.exports;const t0e=hf(e0e);var YR={exports:{}},uc={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */uc.ConcurrentRoot=1;uc.ContinuousEventPriority=4;uc.DefaultEventPriority=16;uc.DiscreteEventPriority=1;uc.IdleEventPriority=536870912;uc.LegacyRoot=0;YR.exports=uc;var JR=YR.exports;const oI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let sI=!1,aI=!1;const Y2=".react-konva-event",n0e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,r0e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,o0e={};function _0(e,t,n=o0e){if(!sI&&"zIndex"in t&&(console.warn(r0e),sI=!0),!aI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(n0e),aI=!0)}for(var s in n)if(!oI[s]){var i=s.slice(0,2)==="on",c=n[s]!==t[s];if(i&&c){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e.off(d,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},g=!1;const b={};for(var s in t)if(!oI[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(b[d]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(g=!0,m[s]=t[s])}g&&(e.setAttrs(m),bl(e));for(var d in b)e.on(d+Y2,b[d])}function bl(e){if(!i9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const ZR={},s0e={};ff.Node.prototype._applyProps=_0;function a0e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),bl(e)}function i0e(e,t,n){let r=ff[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ff.Group);const o={},s={};for(var i in t){var c=i.slice(0,2)==="on";c?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return _0(d,s),d}function l0e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function c0e(e,t,n){return!1}function u0e(e){return e}function d0e(){return null}function f0e(){return null}function p0e(e,t,n,r){return s0e}function h0e(){}function m0e(e){}function g0e(e,t){return!1}function v0e(){return ZR}function b0e(){return ZR}const x0e=setTimeout,y0e=clearTimeout,C0e=-1;function w0e(e,t){return!1}const S0e=!1,k0e=!0,j0e=!0;function _0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function I0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function eA(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),bl(e)}function P0e(e,t,n){eA(e,t,n)}function E0e(e,t){t.destroy(),t.off(Y2),bl(e)}function M0e(e,t){t.destroy(),t.off(Y2),bl(e)}function O0e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function R0e(e,t,n){}function A0e(e,t,n,r,o){_0(e,o,r)}function D0e(e){e.hide(),bl(e)}function T0e(e){}function N0e(e,t){(t.visible==null||t.visible)&&e.show()}function $0e(e,t){}function L0e(e){}function z0e(){}const F0e=()=>JR.DefaultEventPriority,B0e=Object.freeze(Object.defineProperty({__proto__:null,appendChild:_0e,appendChildToContainer:I0e,appendInitialChild:a0e,cancelTimeout:y0e,clearContainer:L0e,commitMount:R0e,commitTextUpdate:O0e,commitUpdate:A0e,createInstance:i0e,createTextInstance:l0e,detachDeletedInstance:z0e,finalizeInitialChildren:c0e,getChildHostContext:b0e,getCurrentEventPriority:F0e,getPublicInstance:u0e,getRootHostContext:v0e,hideInstance:D0e,hideTextInstance:T0e,idlePriority:Sh.unstable_IdlePriority,insertBefore:eA,insertInContainerBefore:P0e,isPrimaryRenderer:S0e,noTimeout:C0e,now:Sh.unstable_now,prepareForCommit:d0e,preparePortalMount:f0e,prepareUpdate:p0e,removeChild:E0e,removeChildFromContainer:M0e,resetAfterCommit:h0e,resetTextContent:m0e,run:Sh.unstable_runWithPriority,scheduleTimeout:x0e,shouldDeprioritizeSubtree:g0e,shouldSetTextContent:w0e,supportsMutation:j0e,unhideInstance:N0e,unhideTextInstance:$0e,warnsIfNotActing:k0e},Symbol.toStringTag,{value:"Module"}));var H0e=Object.defineProperty,W0e=Object.defineProperties,V0e=Object.getOwnPropertyDescriptors,iI=Object.getOwnPropertySymbols,U0e=Object.prototype.hasOwnProperty,G0e=Object.prototype.propertyIsEnumerable,lI=(e,t,n)=>t in e?H0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cI=(e,t)=>{for(var n in t||(t={}))U0e.call(t,n)&&lI(e,n,t[n]);if(iI)for(var n of iI(t))G0e.call(t,n)&&lI(e,n,t[n]);return e},q0e=(e,t)=>W0e(e,V0e(t));function tA(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=tA(r,t,n);if(o)return o;r=t?null:r.sibling}}function nA(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const J2=nA(l.createContext(null));class rA extends l.Component{render(){return l.createElement(J2.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:uI,ReactCurrentDispatcher:dI}=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function K0e(){const e=l.useContext(J2);if(e===null)throw new Error("its-fine: useFiber must be called within a !");const t=l.useId();return l.useMemo(()=>{for(const r of[uI==null?void 0:uI.current,e,e==null?void 0:e.alternate]){if(!r)continue;const o=tA(r,!1,s=>{let i=s.memoizedState;for(;i;){if(i.memoizedState===t)return!0;i=i.next}});if(o)return o}},[e,t])}function Q0e(){var e,t;const n=K0e(),[r]=l.useState(()=>new Map);r.clear();let o=n;for(;o;){const s=(e=o.type)==null?void 0:e._context;s&&s!==J2&&!r.has(s)&&r.set(s,(t=dI==null?void 0:dI.current)==null?void 0:t.readContext(nA(s))),o=o.return}return r}function X0e(){const e=Q0e();return l.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>l.createElement(t,null,l.createElement(n.Provider,q0e(cI({},r),{value:e.get(n)}))),t=>l.createElement(rA,cI({},t))),[e])}function Y0e(e){const t=B.useRef({});return B.useLayoutEffect(()=>{t.current=e}),B.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const J0e=e=>{const t=B.useRef(),n=B.useRef(),r=B.useRef(),o=Y0e(e),s=X0e(),i=c=>{const{forwardedRef:d}=e;d&&(typeof d=="function"?d(c):d.current=c)};return B.useLayoutEffect(()=>(n.current=new ff.Stage({width:e.width,height:e.height,container:t.current}),i(n.current),r.current=Od.createContainer(n.current,JR.LegacyRoot,!1,null),Od.updateContainer(B.createElement(s,{},e.children),r.current),()=>{ff.isBrowser&&(i(null),Od.updateContainer(null,r.current,null),n.current.destroy())}),[]),B.useLayoutEffect(()=>{i(n.current),_0(n.current,e,o),Od.updateContainer(B.createElement(s,{},e.children),r.current,null)}),B.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},jd="Layer",La="Group",za="Rect",Il="Circle",rg="Line",oA="Image",Z0e="Text",eve="Transformer",Od=t0e(B0e);Od.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:B.version,rendererPackageName:"react-konva"});const tve=B.forwardRef((e,t)=>B.createElement(rA,{},B.createElement(J0e,{...e,forwardedRef:t}))),nve=de([_r,Ns],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Tn}}),rve=()=>{const e=oe(),{tool:t,isStaging:n,isMovingBoundingBox:r}=H(nve);return{handleDragStart:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Gh(!0))},[e,r,n,t]),handleDragMove:l.useCallback(o=>{if(!((t==="move"||n)&&!r))return;const s={x:o.target.x(),y:o.target.y()};e(SP(s))},[e,r,n,t]),handleDragEnd:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Gh(!1))},[e,r,n,t])}},ove=de([_r,ro,Ns],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isMaskEnabled:c,shouldSnapToGrid:d}=e;return{activeTabName:t,isCursorOnCanvas:!!r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isStaging:n,isMaskEnabled:c,shouldSnapToGrid:d}},{memoizeOptions:{resultEqualityCheck:Tn}}),sve=()=>{const e=oe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:s,shouldSnapToGrid:i}=H(ove),c=l.useRef(null),d=kP(),p=()=>e(jP());It(["shift+c"],()=>{p()},{enabled:()=>!o,preventDefault:!0},[]);const h=()=>e(Ux(!s));It(["h"],()=>{h()},{enabled:()=>!o,preventDefault:!0},[s]),It(["n"],()=>{e(qh(!i))},{enabled:!0,preventDefault:!0},[i]),It("esc",()=>{e(l9())},{enabled:()=>!0,preventDefault:!0}),It("shift+h",()=>{e(c9(!n))},{enabled:()=>!o,preventDefault:!0},[t,n]),It(["space"],m=>{m.repeat||(d==null||d.container().focus(),r!=="move"&&(c.current=r,e(Zc("move"))),r==="move"&&c.current&&c.current!=="move"&&(e(Zc(c.current)),c.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,c])},Z2=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},sA=()=>{const e=oe(),t=Q1(),n=kP();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=u9.pixelRatio,[s,i,c,d]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;s===void 0||i===void 0||c===void 0||d===void 0||e(d9({r:s,g:i,b:c,a:d}))},commitColorUnderCursor:()=>{e(f9())}}},ave=de([ro,_r,Ns],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),ive=e=>{const t=oe(),{tool:n,isStaging:r}=H(ave),{commitColorUnderCursor:o}=sA();return l.useCallback(s=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Gh(!0));return}if(n==="colorPicker"){o();return}const i=Z2(e.current);i&&(s.evt.preventDefault(),t(_P(!0)),t(p9([i.x,i.y])))},[e,n,r,t,o])},lve=de([ro,_r,Ns],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),cve=(e,t,n)=>{const r=oe(),{isDrawing:o,tool:s,isStaging:i}=H(lve),{updateColorUnderCursor:c}=sA();return l.useCallback(()=>{if(!e.current)return;const d=Z2(e.current);if(d){if(r(h9(d)),n.current=d,s==="colorPicker"){c();return}!o||s==="move"||i||(t.current=!0,r(IP([d.x,d.y])))}},[t,r,o,i,n,e,s,c])},uve=()=>{const e=oe();return l.useCallback(()=>{e(m9())},[e])},dve=de([ro,_r,Ns],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),fve=(e,t)=>{const n=oe(),{tool:r,isDrawing:o,isStaging:s}=H(dve);return l.useCallback(()=>{if(r==="move"||s){n(Gh(!1));return}if(!t.current&&o&&e.current){const i=Z2(e.current);if(!i)return;n(IP([i.x,i.y]))}else t.current=!1;n(_P(!1))},[t,n,o,s,e,r])},pve=de([_r],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Tn}}),hve=e=>{const t=oe(),{isMoveStageKeyHeld:n,stageScale:r}=H(pve);return l.useCallback(o=>{if(!e.current||n)return;o.evt.preventDefault();const s=e.current.getPointerPosition();if(!s)return;const i={x:(s.x-e.current.x())/r,y:(s.y-e.current.y())/r};let c=o.evt.deltaY;o.evt.ctrlKey&&(c=-c);const d=Bl(r*b9**c,v9,g9),p={x:s.x-i.x*d,y:s.y-i.y*d};t(x9(d)),t(SP(p))},[e,n,r,t])},mve=de(_r,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i,stageDimensions:r,stageScale:o}},{memoizeOptions:{resultEqualityCheck:Tn}}),gve=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(mve);return a.jsxs(La,{children:[a.jsx(za,{offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),a.jsx(za,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},vve=l.memo(gve),bve=de([_r],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Tn}}),xve=()=>{const{stageScale:e,stageCoordinates:t,stageDimensions:n}=H(bve),{colorMode:r}=wi(),[o,s]=l.useState([]),[i,c]=Ks("colors",["base.800","base.200"]),d=l.useCallback(p=>p/e,[e]);return l.useLayoutEffect(()=>{const{width:p,height:h}=n,{x:m,y:g}=t,b={x1:0,y1:0,x2:p,y2:h,offset:{x:d(m),y:d(g)}},y={x:Math.ceil(d(m)/64)*64,y:Math.ceil(d(g)/64)*64},x={x1:-y.x,y1:-y.y,x2:d(p)-y.x+64,y2:d(h)-y.y+64},S={x1:Math.min(b.x1,x.x1),y1:Math.min(b.y1,x.y1),x2:Math.max(b.x2,x.x2),y2:Math.max(b.y2,x.y2)},j=S.x2-S.x1,_=S.y2-S.y1,I=Math.round(j/64)+1,P=Math.round(_/64)+1,M=hS(0,I).map(A=>a.jsx(rg,{x:S.x1+A*64,y:S.y1,points:[0,0,0,_],stroke:r==="dark"?i:c,strokeWidth:1},`x_${A}`)),R=hS(0,P).map(A=>a.jsx(rg,{x:S.x1,y:S.y1+A*64,points:[0,0,j,0],stroke:r==="dark"?i:c,strokeWidth:1},`y_${A}`));s(M.concat(R))},[e,t,n,d,r,i,c]),a.jsx(La,{children:o})},yve=l.memo(xve),Cve=de([Ce],({system:e,canvas:t})=>{const{denoiseProgress:n}=e,{boundingBox:r}=t.layerState.stagingArea,{batchIds:o}=t;return{boundingBox:r,progressImage:n&&o.includes(n.batch_id)?n.progress_image:void 0}},{memoizeOptions:{resultEqualityCheck:Tn}}),wve=e=>{const{...t}=e,{progressImage:n,boundingBox:r}=H(Cve),[o,s]=l.useState(null);return l.useEffect(()=>{if(!n)return;const i=new Image;i.onload=()=>{s(i)},i.src=n.dataURL},[n]),n&&r&&o?a.jsx(oA,{x:r.x,y:r.y,width:r.width,height:r.height,image:o,listening:!1,...t}):null},Sve=l.memo(wve),Fl=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},kve=de(_r,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:Fl(t)}}),fI=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),jve=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(kve),[i,c]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(null),m=l.useCallback(()=>{p(d+1),setTimeout(m,500)},[d]);return l.useEffect(()=>{if(i)return;const g=new Image;g.onload=()=>{c(g)},g.src=fI(n)},[i,n]),l.useEffect(()=>{i&&(i.src=fI(n))},[i,n]),l.useEffect(()=>{const g=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(g)},[]),!i||!Sc(r.x)||!Sc(r.y)||!Sc(s)||!Sc(o.width)||!Sc(o.height)?null:a.jsx(za,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:Sc(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},_ve=l.memo(jve),Ive=de([_r],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Tn}}),Pve=e=>{const{...t}=e,{objects:n}=H(Ive);return a.jsx(La,{listening:!1,...t,children:n.filter(y9).map((r,o)=>a.jsx(rg,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})},Eve=l.memo(Pve);var Pl=l,Mve=function(t,n,r){const o=Pl.useRef("loading"),s=Pl.useRef(),[i,c]=Pl.useState(0),d=Pl.useRef(),p=Pl.useRef(),h=Pl.useRef();return(d.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,d.current=t,p.current=n,h.current=r),Pl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function g(){o.current="loaded",s.current=m,c(Math.random())}function b(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",g),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",g),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Ove=hf(Mve),Rve=({canvasImage:e})=>{const[t,n,r,o]=Ks("colors",["base.400","base.500","base.700","base.900"]),s=di(t,n),i=di(r,o),{t:c}=J();return a.jsxs(La,{children:[a.jsx(za,{x:e.x,y:e.y,width:e.width,height:e.height,fill:s}),a.jsx(Z0e,{x:e.x,y:e.y,width:e.width,height:e.height,align:"center",verticalAlign:"middle",fontFamily:'"Inter Variable", sans-serif',fontSize:e.width/16,fontStyle:"600",text:c("common.imageFailedToLoad"),fill:i})]})},Ave=l.memo(Rve),Dve=e=>{const{x:t,y:n,imageName:r}=e.canvasImage,{currentData:o,isError:s}=Ps(r??Os.skipToken),[i,c]=Ove((o==null?void 0:o.image_url)??"",WI.get()?"use-credentials":"anonymous");return s||c==="failed"?a.jsx(Ave,{canvasImage:e.canvasImage}):a.jsx(oA,{x:t,y:n,image:i,listening:!1})},aA=l.memo(Dve),Tve=de([_r],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Tn}}),Nve=()=>{const{objects:e}=H(Tve);return e?a.jsx(La,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(C9(t))return a.jsx(aA,{canvasImage:t},n);if(w9(t)){const r=a.jsx(rg,{points:t.points,stroke:t.color?Fl(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?a.jsx(La,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(S9(t))return a.jsx(za,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Fl(t.color)},n);if(k9(t))return a.jsx(za,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},$ve=l.memo(Nve),Lve=de([_r],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:o,boundingBoxDimensions:s}=e,{selectedImageIndex:i,images:c,boundingBox:d}=t.stagingArea;return{currentStagingAreaImage:c.length>0&&i!==void 0?c[i]:void 0,isOnFirstImage:i===0,isOnLastImage:i===c.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:(d==null?void 0:d.x)??o.x,y:(d==null?void 0:d.y)??o.y,width:(d==null?void 0:d.width)??s.width,height:(d==null?void 0:d.height)??s.height}},{memoizeOptions:{resultEqualityCheck:Tn}}),zve=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:c,height:d}=H(Lve);return a.jsxs(La,{...t,children:[r&&n&&a.jsx(aA,{canvasImage:n}),o&&a.jsxs(La,{children:[a.jsx(za,{x:s,y:i,width:c,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(za,{x:s,y:i,width:c,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Fve=l.memo(zve),Bve=de([_r],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentIndex:n,total:t.length,currentStagingAreaImage:t.length>0?t[n]:void 0,shouldShowStagingImage:o,shouldShowStagingOutline:r}},_e),Hve=()=>{const e=oe(),{currentStagingAreaImage:t,shouldShowStagingImage:n,currentIndex:r,total:o}=H(Bve),{t:s}=J(),i=l.useCallback(()=>{e(mS(!0))},[e]),c=l.useCallback(()=>{e(mS(!1))},[e]),d=l.useCallback(()=>e(j9()),[e]),p=l.useCallback(()=>e(_9()),[e]),h=l.useCallback(()=>e(I9()),[e]);It(["left"],d,{enabled:()=>!0,preventDefault:!0}),It(["right"],p,{enabled:()=>!0,preventDefault:!0}),It(["enter"],()=>h,{enabled:()=>!0,preventDefault:!0});const{data:m}=Ps((t==null?void 0:t.imageName)??Os.skipToken),g=l.useCallback(()=>{e(P9(!n))},[e,n]),b=l.useCallback(()=>{m&&e(E9({imageDTO:m}))},[e,m]),y=l.useCallback(()=>{e(M9())},[e]);return t?a.jsxs(N,{pos:"absolute",bottom:4,gap:2,w:"100%",align:"center",justify:"center",onMouseEnter:i,onMouseLeave:c,children:[a.jsxs(zn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(tt,{tooltip:`${s("unifiedCanvas.previous")} (Left)`,"aria-label":`${s("unifiedCanvas.previous")} (Left)`,icon:a.jsx(KZ,{}),onClick:d,colorScheme:"accent",isDisabled:!n}),a.jsx(Rt,{colorScheme:"base",pointerEvents:"none",isDisabled:!n,minW:20,children:`${r+1}/${o}`}),a.jsx(tt,{tooltip:`${s("unifiedCanvas.next")} (Right)`,"aria-label":`${s("unifiedCanvas.next")} (Right)`,icon:a.jsx(QZ,{}),onClick:p,colorScheme:"accent",isDisabled:!n})]}),a.jsxs(zn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(tt,{tooltip:`${s("unifiedCanvas.accept")} (Enter)`,"aria-label":`${s("unifiedCanvas.accept")} (Enter)`,icon:a.jsx(BM,{}),onClick:h,colorScheme:"accent"}),a.jsx(tt,{tooltip:s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"aria-label":s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"data-alert":!n,icon:n?a.jsx(lee,{}):a.jsx(iee,{}),onClick:g,colorScheme:"accent"}),a.jsx(tt,{tooltip:s("unifiedCanvas.saveToGallery"),"aria-label":s("unifiedCanvas.saveToGallery"),isDisabled:!m||!m.is_intermediate,icon:a.jsx(Qg,{}),onClick:b,colorScheme:"accent"}),a.jsx(tt,{tooltip:s("unifiedCanvas.discardAll"),"aria-label":s("unifiedCanvas.discardAll"),icon:a.jsx(ju,{}),onClick:y,colorScheme:"error",fontSize:20})]})]}):null},Wve=l.memo(Hve),Vve=()=>{const e=H(c=>c.canvas.layerState),t=H(c=>c.canvas.boundingBoxCoordinates),n=H(c=>c.canvas.boundingBoxDimensions),r=H(c=>c.canvas.isMaskEnabled),o=H(c=>c.canvas.shouldPreserveMaskedArea),[s,i]=l.useState();return l.useEffect(()=>{i(void 0)},[e,t,n,r,o]),Dee(async()=>{const c=await O9(e,t,n,r,o);if(!c)return;const{baseImageData:d,maskImageData:p}=c,h=R9(d,p);i(h)},1e3,[e,t,n,r,o]),s},Uve={txt2img:"Text to Image",img2img:"Image to Image",inpaint:"Inpaint",outpaint:"Inpaint"},Gve=()=>{const e=Vve();return a.jsxs(Te,{children:["Mode: ",e?Uve[e]:"..."]})},qve=l.memo(Gve),Xc=e=>Math.round(e*100)/100,Kve=de([_r],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Xc(n)}, ${Xc(r)})`}},{memoizeOptions:{resultEqualityCheck:Tn}});function Qve(){const{cursorCoordinatesString:e}=H(Kve),{t}=J();return a.jsx(Te,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const hx="var(--invokeai-colors-warning-500)",Xve=de([_r],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:s,height:i},scaledBoundingBoxDimensions:{width:c,height:d},boundingBoxCoordinates:{x:p,y:h},stageScale:m,shouldShowCanvasDebugInfo:g,layer:b,boundingBoxScaleMethod:y,shouldPreserveMaskedArea:x}=e;let C="inherit";return(y==="none"&&(s<512||i<512)||y==="manual"&&c*d<512*512)&&(C=hx),{activeLayerColor:b==="mask"?hx:"inherit",layer:b,boundingBoxColor:C,boundingBoxCoordinatesString:`(${Xc(p)}, ${Xc(h)})`,boundingBoxDimensionsString:`${s}×${i}`,scaledBoundingBoxDimensionsString:`${c}×${d}`,canvasCoordinatesString:`${Xc(r)}×${Xc(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(m*100),shouldShowCanvasDebugInfo:g,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none",shouldPreserveMaskedArea:x}},{memoizeOptions:{resultEqualityCheck:Tn}}),Yve=()=>{const{activeLayerColor:e,layer:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:s,shouldShowScaledBoundingBox:i,canvasCoordinatesString:c,canvasDimensionsString:d,canvasScaleString:p,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:m,shouldPreserveMaskedArea:g}=H(Xve),{t:b}=J();return a.jsxs(N,{sx:{flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,opacity:.65,display:"flex",fontSize:"sm",padding:1,px:2,minWidth:48,margin:1,borderRadius:"base",pointerEvents:"none",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(qve,{}),a.jsx(Te,{style:{color:e},children:`${b("unifiedCanvas.activeLayer")}: ${b(`unifiedCanvas.${t}`)}`}),a.jsx(Te,{children:`${b("unifiedCanvas.canvasScale")}: ${p}%`}),g&&a.jsxs(Te,{style:{color:hx},children:[b("unifiedCanvas.preserveMaskedArea"),": ",b("common.on")]}),m&&a.jsx(Te,{style:{color:n},children:`${b("unifiedCanvas.boundingBox")}: ${o}`}),i&&a.jsx(Te,{style:{color:n},children:`${b("unifiedCanvas.scaledBoundingBox")}: ${s}`}),h&&a.jsxs(a.Fragment,{children:[a.jsx(Te,{children:`${b("unifiedCanvas.boundingBoxPosition")}: ${r}`}),a.jsx(Te,{children:`${b("unifiedCanvas.canvasDimensions")}: ${d}`}),a.jsx(Te,{children:`${b("unifiedCanvas.canvasPosition")}: ${c}`}),a.jsx(Qve,{})]})]})},Jve=l.memo(Yve),Zve=de([Ce],({canvas:e,generation:t})=>{const{boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:o,isDrawing:s,isTransformingBoundingBox:i,isMovingBoundingBox:c,tool:d,shouldSnapToGrid:p}=e,{aspectRatio:h}=t;return{boundingBoxCoordinates:n,boundingBoxDimensions:r,isDrawing:s,isMovingBoundingBox:c,isTransformingBoundingBox:i,stageScale:o,shouldSnapToGrid:p,tool:d,hitStrokeWidth:20/o,aspectRatio:h}},{memoizeOptions:{resultEqualityCheck:Tn}}),e1e=e=>{const{...t}=e,n=oe(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:s,isMovingBoundingBox:i,isTransformingBoundingBox:c,stageScale:d,shouldSnapToGrid:p,tool:h,hitStrokeWidth:m,aspectRatio:g}=H(Zve),b=l.useRef(null),y=l.useRef(null),[x,C]=l.useState(!1);l.useEffect(()=>{var z;!b.current||!y.current||(b.current.nodes([y.current]),(z=b.current.getLayer())==null||z.batchDraw())},[]);const S=64*d;It("N",()=>{n(qh(!p))});const j=l.useCallback(z=>{if(!p){n(Av({x:Math.floor(z.target.x()),y:Math.floor(z.target.y())}));return}const W=z.target.x(),Q=z.target.y(),U=Mo(W,64),L=Mo(Q,64);z.target.x(U),z.target.y(L),n(Av({x:U,y:L}))},[n,p]),_=l.useCallback(()=>{if(!y.current)return;const z=y.current,W=z.scaleX(),Q=z.scaleY(),U=Math.round(z.width()*W),L=Math.round(z.height()*Q),ee=Math.round(z.x()),K=Math.round(z.y());if(g){const Z=Mo(U/g,64);n(Xs({width:U,height:Z}))}else n(Xs({width:U,height:L}));n(Av({x:p?_d(ee,64):ee,y:p?_d(K,64):K})),z.scaleX(1),z.scaleY(1)},[n,p,g]),I=l.useCallback((z,W,Q)=>{const U=z.x%S,L=z.y%S;return{x:_d(W.x,S)+U,y:_d(W.y,S)+L}},[S]),P=l.useCallback(()=>{n(Dv(!0))},[n]),M=l.useCallback(()=>{n(Dv(!1)),n(Tv(!1)),n(Lp(!1)),C(!1)},[n]),R=l.useCallback(()=>{n(Tv(!0))},[n]),A=l.useCallback(()=>{n(Dv(!1)),n(Tv(!1)),n(Lp(!1)),C(!1)},[n]),D=l.useCallback(()=>{C(!0)},[]),O=l.useCallback(()=>{!c&&!i&&C(!1)},[i,c]),T=l.useCallback(()=>{n(Lp(!0))},[n]),Y=l.useCallback(()=>{n(Lp(!1))},[n]);return a.jsxs(La,{...t,children:[a.jsx(za,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:T,onMouseOver:T,onMouseLeave:Y,onMouseOut:Y}),a.jsx(za,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:m,listening:!s&&h==="move",onDragStart:R,onDragEnd:A,onDragMove:j,onMouseDown:R,onMouseOut:O,onMouseOver:D,onMouseEnter:D,onMouseUp:A,onTransform:_,onTransformEnd:M,ref:y,stroke:x?"rgba(255,255,255,0.7)":"white",strokeWidth:(x?8:1)/d,width:o.width,x:r.x,y:r.y}),a.jsx(eve,{anchorCornerRadius:3,anchorDragBoundFunc:I,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:h==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!s&&h==="move",onDragStart:R,onDragEnd:A,onMouseDown:P,onMouseUp:M,onTransformEnd:M,ref:b,rotateEnabled:!1})]})},t1e=l.memo(e1e),n1e=de(_r,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:s,tool:i,layer:c,shouldShowBrush:d,isMovingBoundingBox:p,isTransformingBoundingBox:h,stageScale:m,stageDimensions:g,boundingBoxCoordinates:b,boundingBoxDimensions:y,shouldRestrictStrokesToBox:x}=e,C=x?{clipX:b.x,clipY:b.y,clipWidth:y.width,clipHeight:y.height}:{};return{cursorPosition:t,brushX:t?t.x:g.width/2,brushY:t?t.y:g.height/2,radius:n/2,colorPickerOuterRadius:gS/m,colorPickerInnerRadius:(gS-X1+1)/m,maskColorString:Fl({...o,a:.5}),brushColorString:Fl(s),colorPickerColorString:Fl(r),tool:i,layer:c,shouldShowBrush:d,shouldDrawBrushPreview:!(p||h||!t)&&d,strokeWidth:1.5/m,dotRadius:1.5/m,clip:C}},{memoizeOptions:{resultEqualityCheck:Tn}}),r1e=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:s,tool:i,layer:c,shouldDrawBrushPreview:d,dotRadius:p,strokeWidth:h,brushColorString:m,colorPickerColorString:g,colorPickerInnerRadius:b,colorPickerOuterRadius:y,clip:x}=H(n1e);return d?a.jsxs(La,{listening:!1,...x,...t,children:[i==="colorPicker"?a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:y,stroke:m,strokeWidth:X1,strokeScaleEnabled:!1}),a.jsx(Il,{x:n,y:r,radius:b,stroke:g,strokeWidth:X1,strokeScaleEnabled:!1})]}):a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:o,fill:c==="mask"?s:m,globalCompositeOperation:i==="eraser"?"destination-out":"source-out"}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),a.jsx(Il,{x:n,y:r,radius:p*2,fill:"rgba(255,255,255,0.4)",listening:!1}),a.jsx(Il,{x:n,y:r,radius:p,fill:"rgba(0,0,0,1)",listening:!1})]}):null},o1e=l.memo(r1e),s1e=de([_r,Ns],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:s,isMouseOverBoundingBox:i,isMovingBoundingBox:c,stageDimensions:d,stageCoordinates:p,tool:h,isMovingStage:m,shouldShowIntermediates:g,shouldShowGrid:b,shouldRestrictStrokesToBox:y,shouldAntialias:x}=e;let C="none";return h==="move"||t?m?C="grabbing":C="grab":s?C=void 0:y&&!i&&(C="default"),{isMaskEnabled:n,isModifyingBoundingBox:s||c,shouldShowBoundingBox:o,shouldShowGrid:b,stageCoordinates:p,stageCursor:C,stageDimensions:d,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:g,shouldAntialias:x}},_e),a1e=Ee(tve,{shouldForwardProp:e=>!["sx"].includes(e)}),i1e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:s,stageDimensions:i,stageScale:c,tool:d,isStaging:p,shouldShowIntermediates:h,shouldAntialias:m}=H(s1e);sve();const g=oe(),b=l.useRef(null),y=l.useRef(null),x=l.useRef(null),C=l.useCallback(z=>{A9(z),y.current=z},[]),S=l.useCallback(z=>{D9(z),x.current=z},[]),j=l.useRef({x:0,y:0}),_=l.useRef(!1),I=hve(y),P=ive(y),M=fve(y,_),R=cve(y,_,j),A=uve(),{handleDragStart:D,handleDragMove:O,handleDragEnd:T}=rve(),Y=l.useCallback(z=>z.evt.preventDefault(),[]);return l.useEffect(()=>{if(!b.current)return;const z=new ResizeObserver(U=>{for(const L of U)if(L.contentBoxSize){const{width:ee,height:K}=L.contentRect;g(vS({width:ee,height:K}))}});z.observe(b.current);const{width:W,height:Q}=b.current.getBoundingClientRect();return g(vS({width:W,height:Q})),()=>{z.disconnect()}},[g]),a.jsxs(N,{id:"canvas-container",ref:b,sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:[a.jsx(Te,{sx:{position:"absolute"},children:a.jsxs(a1e,{tabIndex:-1,ref:C,sx:{outline:"none",overflow:"hidden",cursor:s||void 0,canvas:{outline:"none"}},x:o.x,y:o.y,width:i.width,height:i.height,scale:{x:c,y:c},onTouchStart:P,onTouchMove:R,onTouchEnd:M,onMouseDown:P,onMouseLeave:A,onMouseMove:R,onMouseUp:M,onDragStart:D,onDragMove:O,onDragEnd:T,onContextMenu:Y,onWheel:I,draggable:(d==="move"||p)&&!t,children:[a.jsx(jd,{id:"grid",visible:r,children:a.jsx(yve,{})}),a.jsx(jd,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:m,children:a.jsx($ve,{})}),a.jsxs(jd,{id:"mask",visible:e&&!p,listening:!1,children:[a.jsx(Eve,{visible:!0,listening:!1}),a.jsx(_ve,{listening:!1})]}),a.jsx(jd,{children:a.jsx(vve,{})}),a.jsxs(jd,{id:"preview",imageSmoothingEnabled:m,children:[!p&&a.jsx(o1e,{visible:d!=="move",listening:!1}),a.jsx(Fve,{visible:p}),h&&a.jsx(Sve,{}),a.jsx(t1e,{visible:n&&!p})]})]})}),a.jsx(Jve,{}),a.jsx(Wve,{})]})},l1e=l.memo(i1e);function c1e(e,t,n=250){const[r,o]=l.useState(0);return l.useEffect(()=>{const s=setTimeout(()=>{r===1&&e(),o(0)},n);return r===2&&t(),()=>clearTimeout(s)},[r,e,t,n]),()=>o(s=>s+1)}const D1={width:6,height:6,borderColor:"base.100"},u1e={".react-colorful__hue-pointer":D1,".react-colorful__saturation-pointer":D1,".react-colorful__alpha-pointer":D1,gap:2,flexDir:"column"},wh="4.2rem",d1e=e=>{const{color:t,onChange:n,withNumberInput:r,...o}=e,s=l.useCallback(p=>n({...t,r:p}),[t,n]),i=l.useCallback(p=>n({...t,g:p}),[t,n]),c=l.useCallback(p=>n({...t,b:p}),[t,n]),d=l.useCallback(p=>n({...t,a:p}),[t,n]);return a.jsxs(N,{sx:u1e,children:[a.jsx(oR,{color:t,onChange:n,style:{width:"100%"},...o}),r&&a.jsxs(N,{children:[a.jsx(ja,{value:t.r,onChange:s,min:0,max:255,step:1,label:"Red",w:wh}),a.jsx(ja,{value:t.g,onChange:i,min:0,max:255,step:1,label:"Green",w:wh}),a.jsx(ja,{value:t.b,onChange:c,min:0,max:255,step:1,label:"Blue",w:wh}),a.jsx(ja,{value:t.a,onChange:d,step:.1,min:0,max:1,label:"Alpha",w:wh,isInteger:!1})]})]})},iA=l.memo(d1e),f1e=de([_r,Ns],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:s}=e;return{layer:r,maskColor:n,maskColorString:Fl(n),isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Tn}}),p1e=()=>{const e=oe(),{t}=J(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:i}=H(f1e);It(["q"],()=>{c()},{enabled:()=>!i,preventDefault:!0},[n]),It(["shift+c"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[]),It(["h"],()=>{p()},{enabled:()=>!i,preventDefault:!0},[o]);const c=l.useCallback(()=>{e(PP(n==="mask"?"base":"mask"))},[e,n]),d=l.useCallback(()=>{e(jP())},[e]),p=l.useCallback(()=>{e(Ux(!o))},[e,o]),h=l.useCallback(async()=>{e(T9())},[e]),m=l.useCallback(b=>{e(N9(b.target.checked))},[e]),g=l.useCallback(b=>{e($9(b))},[e]);return a.jsx(Uf,{triggerComponent:a.jsx(zn,{children:a.jsx(tt,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:a.jsx(QM,{}),isChecked:n==="mask",isDisabled:i})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Io,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:o,onChange:p}),a.jsx(Io,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:s,onChange:m}),a.jsx(Te,{sx:{paddingTop:2,paddingBottom:2},children:a.jsx(iA,{color:r,onChange:g})}),a.jsx(Rt,{size:"sm",leftIcon:a.jsx(Qg,{}),onClick:h,children:"Save Mask"}),a.jsxs(Rt,{size:"sm",leftIcon:a.jsx(qo,{}),onClick:d,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},h1e=l.memo(p1e),m1e=de([Ce,ro],({canvas:e},t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Tn}});function g1e(){const e=oe(),{canRedo:t,activeTabName:n}=H(m1e),{t:r}=J(),o=l.useCallback(()=>{e(L9())},[e]);return It(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{o()},{enabled:()=>t,preventDefault:!0},[n,t]),a.jsx(tt,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:a.jsx(Cee,{}),onClick:o,isDisabled:!t})}const v1e=()=>{const e=H(Ns),t=oe(),{t:n}=J(),r=l.useCallback(()=>t(z9()),[t]);return a.jsxs(p0,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:a.jsx(Rt,{size:"sm",leftIcon:a.jsx(qo,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),a.jsx("br",{}),a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},b1e=l.memo(v1e),x1e=de([_r],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}},{memoizeOptions:{resultEqualityCheck:Tn}}),y1e=()=>{const e=oe(),{t}=J(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:s,shouldShowGrid:i,shouldShowIntermediates:c,shouldSnapToGrid:d,shouldRestrictStrokesToBox:p,shouldAntialias:h}=H(x1e);It(["n"],()=>{e(qh(!d))},{enabled:!0,preventDefault:!0},[d]);const m=l.useCallback(I=>e(qh(I.target.checked)),[e]),g=l.useCallback(I=>e(F9(I.target.checked)),[e]),b=l.useCallback(I=>e(B9(I.target.checked)),[e]),y=l.useCallback(I=>e(H9(I.target.checked)),[e]),x=l.useCallback(I=>e(W9(I.target.checked)),[e]),C=l.useCallback(I=>e(V9(I.target.checked)),[e]),S=l.useCallback(I=>e(U9(I.target.checked)),[e]),j=l.useCallback(I=>e(G9(I.target.checked)),[e]),_=l.useCallback(I=>e(q9(I.target.checked)),[e]);return a.jsx(Uf,{isLazy:!1,triggerComponent:a.jsx(tt,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:a.jsx(ZM,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Io,{label:t("unifiedCanvas.showIntermediates"),isChecked:c,onChange:g}),a.jsx(Io,{label:t("unifiedCanvas.showGrid"),isChecked:i,onChange:b}),a.jsx(Io,{label:t("unifiedCanvas.snapToGrid"),isChecked:d,onChange:m}),a.jsx(Io,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:o,onChange:y}),a.jsx(Io,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:x}),a.jsx(Io,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:C}),a.jsx(Io,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:p,onChange:S}),a.jsx(Io,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:s,onChange:j}),a.jsx(Io,{label:t("unifiedCanvas.antialiasing"),isChecked:h,onChange:_}),a.jsx(b1e,{})]})})},C1e=l.memo(y1e),w1e=de([Ce,Ns],({canvas:e},t)=>{const{tool:n,brushColor:r,brushSize:o}=e;return{tool:n,isStaging:t,brushColor:r,brushSize:o}},{memoizeOptions:{resultEqualityCheck:Tn}}),S1e=()=>{const e=oe(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=H(w1e),{t:s}=J();It(["b"],()=>{i()},{enabled:()=>!o,preventDefault:!0},[]),It(["e"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[t]),It(["c"],()=>{d()},{enabled:()=>!o,preventDefault:!0},[t]),It(["shift+f"],()=>{p()},{enabled:()=>!o,preventDefault:!0}),It(["delete","backspace"],()=>{h()},{enabled:()=>!o,preventDefault:!0}),It(["BracketLeft"],()=>{r-5<=5?e(zp(Math.max(r-1,1))):e(zp(Math.max(r-5,1)))},{enabled:()=>!o,preventDefault:!0},[r]),It(["BracketRight"],()=>{e(zp(Math.min(r+5,500)))},{enabled:()=>!o,preventDefault:!0},[r]),It(["Shift+BracketLeft"],()=>{e(Nv({...n,a:Bl(n.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]),It(["Shift+BracketRight"],()=>{e(Nv({...n,a:Bl(n.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]);const i=l.useCallback(()=>{e(Zc("brush"))},[e]),c=l.useCallback(()=>{e(Zc("eraser"))},[e]),d=l.useCallback(()=>{e(Zc("colorPicker"))},[e]),p=l.useCallback(()=>{e(K9())},[e]),h=l.useCallback(()=>{e(Q9())},[e]),m=l.useCallback(b=>{e(zp(b))},[e]),g=l.useCallback(b=>{e(Nv(b))},[e]);return a.jsxs(zn,{isAttached:!0,children:[a.jsx(tt,{"aria-label":`${s("unifiedCanvas.brush")} (B)`,tooltip:`${s("unifiedCanvas.brush")} (B)`,icon:a.jsx(vee,{}),isChecked:t==="brush"&&!o,onClick:i,isDisabled:o}),a.jsx(tt,{"aria-label":`${s("unifiedCanvas.eraser")} (E)`,tooltip:`${s("unifiedCanvas.eraser")} (E)`,icon:a.jsx(ree,{}),isChecked:t==="eraser"&&!o,isDisabled:o,onClick:c}),a.jsx(tt,{"aria-label":`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:a.jsx(cee,{}),isDisabled:o,onClick:p}),a.jsx(tt,{"aria-label":`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:a.jsx(Yi,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:h}),a.jsx(tt,{"aria-label":`${s("unifiedCanvas.colorPicker")} (C)`,tooltip:`${s("unifiedCanvas.colorPicker")} (C)`,icon:a.jsx(aee,{}),isChecked:t==="colorPicker"&&!o,isDisabled:o,onClick:d}),a.jsx(Uf,{triggerComponent:a.jsx(tt,{"aria-label":s("unifiedCanvas.brushOptions"),tooltip:s("unifiedCanvas.brushOptions"),icon:a.jsx(JM,{})}),children:a.jsxs(N,{minWidth:60,direction:"column",gap:4,width:"100%",children:[a.jsx(N,{gap:4,justifyContent:"space-between",children:a.jsx(Pt,{label:s("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:m,sliderNumberInputProps:{max:500}})}),a.jsx(Te,{sx:{width:"100%",paddingTop:2,paddingBottom:2},children:a.jsx(iA,{withNumberInput:!0,color:n,onChange:g})})]})})]})},k1e=l.memo(S1e),j1e=de([Ce,ro],({canvas:e},t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Tn}});function _1e(){const e=oe(),{t}=J(),{canUndo:n,activeTabName:r}=H(j1e),o=l.useCallback(()=>{e(X9())},[e]);return It(["meta+z","ctrl+z"],()=>{o()},{enabled:()=>n,preventDefault:!0},[r,n]),a.jsx(tt,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:a.jsx(Yg,{}),onClick:o,isDisabled:!n})}const I1e=de([Ce,Ns],({canvas:e},t)=>{const{tool:n,shouldCropToBoundingBoxOnSave:r,layer:o,isMaskEnabled:s}=e;return{isStaging:t,isMaskEnabled:s,tool:n,layer:o,shouldCropToBoundingBoxOnSave:r}},{memoizeOptions:{resultEqualityCheck:Tn}}),P1e=()=>{const e=oe(),{isStaging:t,isMaskEnabled:n,layer:r,tool:o}=H(I1e),s=Q1(),{t:i}=J(),{isClipboardAPIAvailable:c}=x8(),{getUploadButtonProps:d,getUploadInputProps:p}=k2({postUploadAction:{type:"SET_CANVAS_INITIAL_IMAGE"}});It(["v"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[]),It(["r"],()=>{g()},{enabled:()=>!0,preventDefault:!0},[s]),It(["shift+m"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s]),It(["shift+s"],()=>{x()},{enabled:()=>!t,preventDefault:!0},[s]),It(["meta+c","ctrl+c"],()=>{C()},{enabled:()=>!t&&c,preventDefault:!0},[s,c]),It(["shift+d"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s]);const h=l.useCallback(()=>{e(Zc("move"))},[e]),m=c1e(()=>g(!1),()=>g(!0)),g=(_=!1)=>{const I=Q1();if(!I)return;const P=I.getClientRect({skipTransform:!0});e(n$({contentRect:P,shouldScaleTo1:_}))},b=l.useCallback(()=>{e(OI())},[e]),y=l.useCallback(()=>{e(Y9())},[e]),x=l.useCallback(()=>{e(J9())},[e]),C=l.useCallback(()=>{c&&e(Z9())},[e,c]),S=l.useCallback(()=>{e(e$())},[e]),j=l.useCallback(_=>{const I=_;e(PP(I)),I==="mask"&&!n&&e(Ux(!0))},[e,n]);return a.jsxs(N,{sx:{alignItems:"center",gap:2,flexWrap:"wrap"},children:[a.jsx(Te,{w:24,children:a.jsx(Ar,{tooltip:`${i("unifiedCanvas.layer")} (Q)`,value:r,data:t$,onChange:j,disabled:t})}),a.jsx(h1e,{}),a.jsx(k1e,{}),a.jsxs(zn,{isAttached:!0,children:[a.jsx(tt,{"aria-label":`${i("unifiedCanvas.move")} (V)`,tooltip:`${i("unifiedCanvas.move")} (V)`,icon:a.jsx(XZ,{}),isChecked:o==="move"||t,onClick:h}),a.jsx(tt,{"aria-label":`${i("unifiedCanvas.resetView")} (R)`,tooltip:`${i("unifiedCanvas.resetView")} (R)`,icon:a.jsx(eee,{}),onClick:m})]}),a.jsxs(zn,{isAttached:!0,children:[a.jsx(tt,{"aria-label":`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:a.jsx(hee,{}),onClick:y,isDisabled:t}),a.jsx(tt,{"aria-label":`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:a.jsx(Qg,{}),onClick:x,isDisabled:t}),c&&a.jsx(tt,{"aria-label":`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:a.jsx(Hu,{}),onClick:C,isDisabled:t}),a.jsx(tt,{"aria-label":`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:a.jsx(Wu,{}),onClick:S,isDisabled:t})]}),a.jsxs(zn,{isAttached:!0,children:[a.jsx(_1e,{}),a.jsx(g1e,{})]}),a.jsxs(zn,{isAttached:!0,children:[a.jsx(tt,{"aria-label":`${i("common.upload")}`,tooltip:`${i("common.upload")}`,icon:a.jsx(Jg,{}),isDisabled:t,...d()}),a.jsx("input",{...p()}),a.jsx(tt,{"aria-label":`${i("unifiedCanvas.clearCanvas")}`,tooltip:`${i("unifiedCanvas.clearCanvas")}`,icon:a.jsx(qo,{}),onClick:b,colorScheme:"error",isDisabled:t})]}),a.jsx(zn,{isAttached:!0,children:a.jsx(C1e,{})})]})},E1e=l.memo(P1e),pI={id:"canvas-intial-image",actionType:"SET_CANVAS_INITIAL_IMAGE"},M1e=()=>{const{isOver:e,setNodeRef:t,active:n}=TO({id:"unifiedCanvas",data:pI});return a.jsxs(N,{layerStyle:"first",ref:t,tabIndex:-1,sx:{flexDirection:"column",alignItems:"center",gap:4,p:2,borderRadius:"base",w:"full",h:"full"},children:[a.jsx(E1e,{}),a.jsx(l1e,{}),NO(pI,n)&&a.jsx($O,{isOver:e,label:"Set Canvas Initial Image"})]})},O1e=l.memo(M1e),R1e=()=>a.jsx(O1e,{}),A1e=l.memo(R1e),D1e=[{id:"txt2img",translationKey:"common.txt2img",icon:a.jsx(zr,{as:uee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Yge,{})},{id:"img2img",translationKey:"common.img2img",icon:a.jsx(zr,{as:Ql,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(dpe,{})},{id:"unifiedCanvas",translationKey:"common.unifiedCanvas",icon:a.jsx(zr,{as:Goe,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(A1e,{})},{id:"nodes",translationKey:"common.nodes",icon:a.jsx(zr,{as:j2,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(age,{})},{id:"modelManager",translationKey:"modelManager.modelManager",icon:a.jsx(zr,{as:tee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(che,{})},{id:"queue",translationKey:"queue.queue",icon:a.jsx(zr,{as:jee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Qge,{})}],T1e=de([Ce],({config:e})=>{const{disabledTabs:t}=e;return D1e.filter(r=>!t.includes(r.id))},{memoizeOptions:{resultEqualityCheck:Tn}}),N1e=448,$1e=448,L1e=360,z1e=["modelManager","queue"],F1e=["modelManager","queue"],B1e=()=>{const e=H(r$),t=H(ro),n=H(T1e),{t:r}=J(),o=oe(),s=l.useCallback(O=>{O.target instanceof HTMLElement&&O.target.blur()},[]),i=l.useMemo(()=>n.map(O=>a.jsx(Fn,{hasArrow:!0,label:String(r(O.translationKey)),placement:"end",children:a.jsxs(xo,{onClick:s,children:[a.jsx(WP,{children:String(r(O.translationKey))}),O.icon]})},O.id)),[n,r,s]),c=l.useMemo(()=>n.map(O=>a.jsx(Ho,{children:O.content},O.id)),[n]),d=l.useCallback(O=>{const T=n[O];T&&o(ti(T.id))},[o,n]),{minSize:p,isCollapsed:h,setIsCollapsed:m,ref:g,reset:b,expand:y,collapse:x,toggle:C}=k_(N1e,"pixels"),{ref:S,minSize:j,isCollapsed:_,setIsCollapsed:I,reset:P,expand:M,collapse:R,toggle:A}=k_(L1e,"pixels");It("f",()=>{_||h?(M(),y()):(x(),R())},[o,_,h]),It(["t","o"],()=>{C()},[o]),It("g",()=>{A()},[o]);const D=N2();return a.jsxs(tc,{variant:"appTabs",defaultIndex:e,index:e,onChange:d,sx:{flexGrow:1,gap:4},isLazy:!0,children:[a.jsxs(nc,{sx:{pt:2,gap:4,flexDir:"column"},children:[i,a.jsx(ji,{})]}),a.jsxs(g0,{id:"app",autoSaveId:"app",direction:"horizontal",style:{height:"100%",width:"100%"},storage:D,units:"pixels",children:[!F1e.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(Zi,{order:0,id:"side",ref:g,defaultSize:p,minSize:p,onCollapse:m,collapsible:!0,children:t==="nodes"?a.jsx(tle,{}):a.jsx(Dfe,{})}),a.jsx(Zm,{onDoubleClick:b,collapsedDirection:h?"left":void 0}),a.jsx(sle,{isSidePanelCollapsed:h,sidePanelRef:g})]}),a.jsx(Zi,{id:"main",order:1,minSize:$1e,children:a.jsx(zu,{style:{height:"100%",width:"100%"},children:c})}),!z1e.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(Zm,{onDoubleClick:P,collapsedDirection:_?"right":void 0}),a.jsx(Zi,{id:"gallery",ref:S,order:2,defaultSize:j,minSize:j,onCollapse:I,collapsible:!0,children:a.jsx(_se,{})}),a.jsx(rle,{isGalleryCollapsed:_,galleryPanelRef:S})]})]})]})},H1e=l.memo(B1e),W1e=l.createContext(null),T1={didCatch:!1,error:null};class V1e extends l.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=T1}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,s=new Array(o),i=0;i0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function G1e(e={}){let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");const n=new URL(`${t}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(const o of r){let s=e[o];if(s!==void 0){if(o==="labels"||o==="projects"){if(!Array.isArray(s))throw new TypeError(`The \`${o}\` option should be an array`);s=s.join(",")}n.searchParams.set(o,s)}}return n.toString()}const q1e=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),K1e=new Map(q1e),Q1e=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],mx=new WeakSet,X1e=e=>{mx.add(e);const t=e.toJSON();return mx.delete(e),t},Y1e=e=>K1e.get(e)??Error,lA=({from:e,seen:t,to:n,forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c})=>{if(!n)if(Array.isArray(e))n=[];else if(!c&&hI(e)){const p=Y1e(e.name);n=new p}else n={};if(t.push(e),s>=o)return n;if(i&&typeof e.toJSON=="function"&&!mx.has(e))return X1e(e);const d=p=>lA({from:p,seen:[...t],forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c});for(const[p,h]of Object.entries(e)){if(typeof Buffer=="function"&&Buffer.isBuffer(h)){n[p]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){n[p]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){n[p]=h;continue}if(!t.includes(e[p])){s++,n[p]=d(e[p]);continue}n[p]="[Circular]"}}for(const{property:p,enumerable:h}of Q1e)typeof e[p]<"u"&&e[p]!==null&&Object.defineProperty(n,p,{value:hI(e[p])?d(e[p]):e[p],enumerable:r?!0:h,configurable:!0,writable:!0});return n};function J1e(e,t={}){const{maxDepth:n=Number.POSITIVE_INFINITY,useToJSON:r=!0}=t;return typeof e=="object"&&e!==null?lA({from:e,seen:[],forceEnumerable:!0,maxDepth:n,depth:0,useToJSON:r,serialize:!0}):typeof e=="function"?`[Function: ${e.name??"anonymous"}]`:e}function hI(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}const Z1e=({error:e,resetErrorBoundary:t})=>{const n=o$(),r=l.useCallback(()=>{const s=JSON.stringify(J1e(e),null,2);navigator.clipboard.writeText(`\`\`\` +${s} +\`\`\``),n({title:"Error Copied"})},[e,n]),o=l.useMemo(()=>G1e({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx(N,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(vo,{children:"Something went wrong"}),a.jsx(N,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(Se,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs(N,{sx:{gap:4},children:[a.jsx(Rt,{leftIcon:a.jsx(zoe,{}),onClick:t,children:"Reset UI"}),a.jsx(Rt,{leftIcon:a.jsx(Hu,{}),onClick:r,children:"Copy Error"}),a.jsx(bg,{href:o,isExternal:!0,children:a.jsx(Rt,{leftIcon:a.jsx(Ky,{}),children:"Create Issue"})})]})]})})},ebe=l.memo(Z1e),tbe=de([Ce],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:Tn}}),nbe=()=>{const e=oe(),{shift:t,ctrl:n,meta:r}=H(tbe),{queueBack:o,isDisabled:s,isLoading:i}=j8();It(["ctrl+enter","meta+enter"],o,{enabled:()=>!s&&!i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s,i]);const{queueFront:c,isDisabled:d,isLoading:p}=E8();return It(["ctrl+shift+enter","meta+shift+enter"],c,{enabled:()=>!d&&!p,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[c,d,p]),It("*",()=>{Oh("shift")?!t&&e(Uo(!0)):t&&e(Uo(!1)),Oh("ctrl")?!n&&e(bS(!0)):n&&e(bS(!1)),Oh("meta")?!r&&e(xS(!0)):r&&e(xS(!1))},{keyup:!0,keydown:!0},[t,n,r]),It("1",()=>{e(ti("txt2img"))}),It("2",()=>{e(ti("img2img"))}),It("3",()=>{e(ti("unifiedCanvas"))}),It("4",()=>{e(ti("nodes"))}),It("5",()=>{e(ti("modelManager"))}),null},rbe=l.memo(nbe),obe=e=>{const t=oe(),{recallAllParameters:n}=f0(),r=Zl(),{currentData:o}=Ps((e==null?void 0:e.imageName)??Os.skipToken),{currentData:s}=VI((e==null?void 0:e.imageName)??Os.skipToken),i=l.useCallback(()=>{o&&(t(qI(o)),t(ti("unifiedCanvas")),r({title:DI("toast.sentToUnifiedCanvas"),status:"info",duration:2500,isClosable:!0}))},[t,r,o]),c=l.useCallback(()=>{o&&t(ig(o))},[t,o]),d=l.useCallback(()=>{s&&n(s.metadata)},[s]);return l.useEffect(()=>{e&&e.action==="sendToCanvas"&&i()},[e,i]),l.useEffect(()=>{e&&e.action==="sendToImg2Img"&&c()},[e,c]),l.useEffect(()=>{e&&e.action==="useAllParameters"&&d()},[e,d]),{handleSendToCanvas:i,handleSendToImg2Img:c,handleUseAllMetadata:d}},sbe=e=>(obe(e.selectedImage),null),abe=l.memo(sbe),ibe={},lbe=({config:e=ibe,selectedImage:t})=>{const n=H(nO),r=q3("system"),o=oe(),s=l.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);l.useEffect(()=>{on.changeLanguage(n)},[n]),l.useEffect(()=>{iP(e)&&(r.info({config:e},"Received config"),o(s$(e)))},[o,e,r]),l.useEffect(()=>{o(a$())},[o]);const i=Bg(l$);return a.jsxs(V1e,{onReset:s,FallbackComponent:ebe,children:[a.jsx(nl,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(kG,{children:a.jsxs(nl,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[i||a.jsx(Zee,{}),a.jsx(N,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(H1e,{})})]})})}),a.jsx(FZ,{}),a.jsx(NZ,{}),a.jsx(i$,{}),a.jsx(rbe,{}),a.jsx(abe,{selectedImage:t})]})},hbe=l.memo(lbe);export{hbe as default}; diff --git a/invokeai/frontend/web/dist/assets/App-ecb61195.js b/invokeai/frontend/web/dist/assets/App-ecb61195.js deleted file mode 100644 index a7380ad96d..0000000000 --- a/invokeai/frontend/web/dist/assets/App-ecb61195.js +++ /dev/null @@ -1,171 +0,0 @@ -import{a as Ou,b as bI,S as xI,c as yI,d as CI,e as G1,f as wI,i as q1,g as XR,h as SI,j as kI,k as YR,l as Ix,m as JR,n as ZR,o as zw,p as jI,t as eD,q as tD,r as nD,s as rD,u as oD,v as l,R as z,w as Px,x as Bh,y as sD,z as aD,A as iD,B as lD,P as cD,C as Ex,D as uD,E as dD,F as fD,G as pD,H as De,I as a,J as Gr,K as Un,L as Ae,M as kt,N as vr,O as ot,Q as wf,T as So,U as Ar,V as no,W as lr,X as Ci,Y as cl,Z as Vt,_ as Ms,$ as Yc,a0 as wi,a1 as Si,a2 as pg,a3 as Mx,a4 as Sf,a5 as K1,a6 as hD,a7 as Fw,a8 as mD,a9 as _I,aa as Q1,ab as kf,ac as Au,ad as gD,ae as II,af as PI,ag as EI,ah as ea,ai as vD,aj as me,ak as we,al as Nn,am as H,an as bD,ao as Bw,ap as xD,aq as yD,ar as CD,as as ki,at as Le,au as N,av as yo,aw as lo,ax as Ie,ay as Zl,az as J,aA as MI,aB as wD,aC as SD,aD as kD,aE as jD,aF as ls,aG as Ox,aH as ji,aI as le,aJ as Qo,aK as jf,aL as _D,aM as ID,aN as Hw,aO as Ax,aP as je,aQ as ta,aR as PD,aS as OI,aT as AI,aU as Ww,aV as ED,aW as MD,aX as OD,aY as _i,aZ as Rx,a_ as an,a$ as AD,b0 as RD,b1 as Ha,b2 as RI,b3 as DI,b4 as Ht,b5 as hg,b6 as DD,b7 as Vw,b8 as TI,b9 as TD,ba as ND,bb as $D,bc as LD,bd as zD,be as FD,bf as BD,bg as NI,bh as HD,bi as WD,bj as VD,bk as UD,bl as GD,bm as fu,bn as Dx,bo as qD,bp as KD,bq as QD,br as wc,bs as XD,bt as YD,bu as JD,bv as ZD,bw as Uw,bx as e7,by as t7,bz as Jc,bA as $I,bB as LI,bC as mg,bD as Tx,bE as Nx,bF as Rs,bG as zI,bH as n7,bI as Hl,bJ as Pd,bK as Gw,bL as r7,bM as o7,bN as s7,bO as Wp,bP as Vp,bQ as md,bR as Bv,bS as $d,bT as Ld,bU as zd,bV as Fd,bW as qw,bX as Hh,bY as Hv,bZ as Wh,b_ as Kw,b$ as X1,c0 as Wv,c1 as Y1,c2 as Qw,c3 as Vc,c4 as Vv,c5 as Vh,c6 as Xw,c7 as Wl,c8 as Yw,c9 as Vl,ca as Up,cb as Uh,cc as Jw,cd as J1,ce as Gh,cf as Zw,cg as Z1,ch as _f,ci as FI,cj as a7,ck as eS,cl as $x,cm as qh,cn as BI,co as Do,cp as gd,cq as Sc,cr as Lx,cs as HI,ct as Gp,cu as zx,cv as i7,cw as WI,cx as Uv,cy as gg,cz as l7,cA as VI,cB as eb,cC as tb,cD as UI,cE as c7,cF as nb,cG as u7,cH as rb,cI as d7,cJ as ob,cK as f7,cL as GI,cM as p7,cN as qI,cO as KI,cP as h7,cQ as QI,cR as Fx,cS as Bx,cT as Hx,cU as Wx,cV as vg,cW as Vx,cX as ni,cY as XI,cZ as YI,c_ as Ux,c$ as JI,d0 as m7,d1 as vd,d2 as di,d3 as ZI,d4 as eP,d5 as tS,d6 as Gx,d7 as tP,d8 as qx,d9 as Kx,da as nP,db as Rr,dc as g7,dd as to,de as v7,df as Ru,dg as bg,dh as Qx,di as rP,dj as oP,dk as b7,dl as x7,dm as y7,dn as Kh,dp as sP,dq as aP,dr as C7,ds as w7,dt as S7,du as k7,dv as j7,dw as _7,dx as I7,dy as P7,dz as nS,dA as Xx,dB as E7,dC as M7,dD as If,dE as O7,dF as A7,dG as xg,dH as R7,dI as D7,dJ as T7,dK as N7,dL as xr,dM as $7,dN as L7,dO as z7,dP as F7,dQ as B7,dR as H7,dS as rr,dT as Jd,dU as rS,dV as aa,dW as iP,dX as W7,dY as Yx,dZ as V7,d_ as oS,d$ as U7,e0 as G7,e1 as q7,e2 as lP,e3 as K7,e4 as Q7,e5 as X7,e6 as Y7,e7 as J7,e8 as Z7,e9 as cP,ea as eT,eb as tT,ec as sS,ed as nT,ee as rT,ef as oT,eg as sT,eh as aT,ei as iT,ej as lT,ek as uP,el as cT,em as uT,en as dT,eo as aS,ep as qp,eq as Fs,er as fT,es as pT,et as hT,eu as mT,ev as gT,ew as vT,ex as na,ey as bT,ez as xT,eA as yT,eB as CT,eC as wT,eD as ST,eE as kT,eF as jT,eG as _T,eH as IT,eI as PT,eJ as ET,eK as MT,eL as OT,eM as AT,eN as RT,eO as DT,eP as TT,eQ as NT,eR as $T,eS as LT,eT as zT,eU as FT,eV as BT,eW as HT,eX as iS,eY as dP,eZ as WT,e_ as Ys,e$ as Zd,f0 as Ro,f1 as VT,f2 as UT,f3 as fP,f4 as pP,f5 as GT,f6 as lS,f7 as qT,f8 as cS,f9 as uS,fa as dS,fb as KT,fc as QT,fd as fS,fe as pS,ff as XT,fg as YT,fh as Qh,fi as JT,fj as hS,fk as mS,fl as ZT,fm as eN,fn as hP,fo as tN,fp as nN,fq as mP,fr as rN,fs as oN,ft as gS,fu as sN,fv as vS,fw as aN,fx as iN,fy as gP,fz as vP,fA as Pf,fB as bP,fC as Al,fD as xP,fE as bS,fF as lN,fG as cN,fH as yP,fI as uN,fJ as dN,fK as fN,fL as pN,fM as hN,fN as Jx,fO as sb,fP as mN,fQ as gN,fR as vN,fS as CP,fT as Zx,fU as wP,fV as ey,fW as SP,fX as bN,fY as oi,fZ as xN,f_ as kP,f$ as Du,g0 as yN,g1 as ty,g2 as jP,g3 as CN,g4 as wN,g5 as SN,g6 as kN,g7 as jN,g8 as _N,g9 as Ed,ga as Uc,gb as xS,gc as IN,gd as PN,ge as EN,gf as MN,gg as ON,gh as AN,gi as RN,gj as yS,gk as DN,gl as TN,gm as NN,gn as $N,go as LN,gp as zN,gq as CS,gr as FN,gs as BN,gt as HN,gu as WN,gv as VN,gw as UN,gx as GN,gy as qN,gz as KN,gA as wS,gB as QN,gC as XN,gD as YN,gE as JN,gF as ZN,gG as e9,gH as t9,gI as n9,gJ as r9,gK as o9,gL as s9,gM as a9,gN as i9,gO as Ef,gP as l9,gQ as c9,gR as u9,gS as d9,gT as f9,gU as p9,gV as h9,gW as m9,gX as SS,gY as Ih,gZ as g9,g_ as Xh,g$ as _P,h0 as Yh,h1 as v9,h2 as b9,h3 as Zc,h4 as IP,h5 as PP,h6 as ny,h7 as x9,h8 as y9,h9 as C9,ha as ab,hb as EP,hc as w9,hd as S9,he as MP,hf as k9,hg as j9,hh as _9,hi as I9,hj as P9,hk as kS,hl as kc,hm as E9,hn as M9,ho as O9,hp as A9,hq as R9,hr as jS,hs as D9,ht as T9,hu as N9,hv as $9,hw as L9,hx as z9,hy as F9,hz as B9,hA as Gv,hB as qv,hC as Kv,hD as Kp,hE as _S,hF as ib,hG as IS,hH as H9,hI as W9,hJ as OP,hK as V9,hL as U9,hM as G9,hN as q9,hO as K9,hP as Q9,hQ as X9,hR as Y9,hS as J9,hT as Z9,hU as e$,hV as t$,hW as n$,hX as r$,hY as o$,hZ as Qp,h_ as Qv,h$ as s$,i0 as a$,i1 as i$,i2 as l$,i3 as c$,i4 as u$,i5 as d$,i6 as f$,i7 as p$,i8 as PS,i9 as ES,ia as h$,ib as m$,ic as g$,id as v$}from"./index-2ad466e0.js";import{u as AP,a as Ii,b as b$,r as qe,f as x$,g as MS,c as Xt,d as zr}from"./MantineProvider-1fe3e660.js";var y$=200;function C$(e,t,n,r){var o=-1,s=yI,i=!0,c=e.length,d=[],p=t.length;if(!c)return d;n&&(t=Ou(t,bI(n))),r?(s=CI,i=!1):t.length>=y$&&(s=G1,i=!1,t=new xI(t));e:for(;++o=120&&h.length>=120)?new xI(i&&h):void 0}h=e[0];var m=-1,g=c[0];e:for(;++m{r.has(s)&&n(o,s)})}function $$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}const RP=({id:e,x:t,y:n,width:r,height:o,style:s,color:i,strokeColor:c,strokeWidth:d,className:p,borderRadius:h,shapeRendering:m,onClick:g,selected:b})=>{const{background:y,backgroundColor:x}=s||{},w=i||y||x;return z.createElement("rect",{className:Px(["react-flow__minimap-node",{selected:b},p]),x:t,y:n,rx:h,ry:h,width:r,height:o,fill:w,stroke:c,strokeWidth:d,shapeRendering:m,onClick:g?S=>g(S,e):void 0})};RP.displayName="MiniMapNode";var L$=l.memo(RP);const z$=e=>e.nodeOrigin,F$=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),Xv=e=>e instanceof Function?e:()=>e;function B$({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:s=L$,onClick:i}){const c=Bh(F$,Ex),d=Bh(z$),p=Xv(t),h=Xv(e),m=Xv(n),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return z.createElement(z.Fragment,null,c.map(b=>{const{x:y,y:x}=sD(b,d).positionAbsolute;return z.createElement(s,{key:b.id,x:y,y:x,width:b.width,height:b.height,style:b.style,selected:b.selected,className:m(b),color:p(b),borderRadius:r,strokeColor:h(b),strokeWidth:o,shapeRendering:g,onClick:i,id:b.id})}))}var H$=l.memo(B$);const W$=200,V$=150,U$=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?fD(pD(t,e.nodeOrigin),n):n,rfId:e.rfId}},G$="react-flow__minimap-desc";function DP({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:i=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:p="none",maskStrokeWidth:h=1,position:m="bottom-right",onClick:g,onNodeClick:b,pannable:y=!1,zoomable:x=!1,ariaLabel:w="React Flow mini map",inversePan:S=!1,zoomStep:j=10,offsetScale:I=5}){const _=aD(),M=l.useRef(null),{boundingRect:E,viewBB:A,rfId:R}=Bh(U$,Ex),D=(e==null?void 0:e.width)??W$,O=(e==null?void 0:e.height)??V$,T=E.width/D,K=E.height/O,G=Math.max(T,K),Q=G*D,Z=G*O,te=I*G,V=E.x-(Q-E.width)/2-te,oe=E.y-(Z-E.height)/2-te,ne=Q+te*2,se=Z+te*2,re=`${G$}-${R}`,ae=l.useRef(0);ae.current=G,l.useEffect(()=>{if(M.current){const $=iD(M.current),F=W=>{const{transform:U,d3Selection:ee,d3Zoom:Y}=_.getState();if(W.sourceEvent.type!=="wheel"||!ee||!Y)return;const ge=-W.sourceEvent.deltaY*(W.sourceEvent.deltaMode===1?.05:W.sourceEvent.deltaMode?1:.002)*j,he=U[2]*Math.pow(2,ge);Y.scaleTo(ee,he)},q=W=>{const{transform:U,d3Selection:ee,d3Zoom:Y,translateExtent:ge,width:he,height:de}=_.getState();if(W.sourceEvent.type!=="mousemove"||!ee||!Y)return;const _e=ae.current*Math.max(1,U[2])*(S?-1:1),Pe={x:U[0]-W.sourceEvent.movementX*_e,y:U[1]-W.sourceEvent.movementY*_e},ze=[[0,0],[he,de]],ht=uD.translate(Pe.x,Pe.y).scale(U[2]),Je=Y.constrain()(ht,ze,ge);Y.transform(ee,Je)},pe=lD().on("zoom",y?q:null).on("zoom.wheel",x?F:null);return $.call(pe),()=>{$.on("zoom",null)}}},[y,x,S,j]);const B=g?$=>{const F=dD($);g($,{x:F[0],y:F[1]})}:void 0,X=b?($,F)=>{const q=_.getState().nodeInternals.get(F);b($,q)}:void 0;return z.createElement(cD,{position:m,style:e,className:Px(["react-flow__minimap",t]),"data-testid":"rf__minimap"},z.createElement("svg",{width:D,height:O,viewBox:`${V} ${oe} ${ne} ${se}`,role:"img","aria-labelledby":re,ref:M,onClick:B},w&&z.createElement("title",{id:re},w),z.createElement(H$,{onClick:X,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:c}),z.createElement("path",{className:"react-flow__minimap-mask",d:`M${V-te},${oe-te}h${ne+te*2}v${se+te*2}h${-ne-te*2}z - M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})))}DP.displayName="MiniMap";var q$=l.memo(DP),ra;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ra||(ra={}));function K$({color:e,dimensions:t,lineWidth:n}){return z.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Q$({color:e,radius:t}){return z.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const X$={[ra.Dots]:"#91919a",[ra.Lines]:"#eee",[ra.Cross]:"#e2e2e2"},Y$={[ra.Dots]:1,[ra.Lines]:1,[ra.Cross]:6},J$=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function TP({id:e,variant:t=ra.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:c,className:d}){const p=l.useRef(null),{transform:h,patternId:m}=Bh(J$,Ex),g=i||X$[t],b=r||Y$[t],y=t===ra.Dots,x=t===ra.Cross,w=Array.isArray(n)?n:[n,n],S=[w[0]*h[2]||1,w[1]*h[2]||1],j=b*h[2],I=x?[j,j]:S,_=y?[j/s,j/s]:[I[0]/s,I[1]/s];return z.createElement("svg",{className:Px(["react-flow__background",d]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},z.createElement("pattern",{id:m+e,x:h[0]%S[0],y:h[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`},y?z.createElement(Q$,{color:g,radius:j/s}):z.createElement(K$,{dimensions:I,color:g,lineWidth:o})),z.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`}))}TP.displayName="Background";var Z$=l.memo(TP);function eL(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var tL=eL();const NP=1/60*1e3,nL=typeof performance<"u"?()=>performance.now():()=>Date.now(),$P=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(nL()),NP);function rL(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,c={schedule:(d,p=!1,h=!1)=>{const m=h&&o,g=m?t:n;return p&&i.add(d),g.indexOf(d)===-1&&(g.push(d),m&&o&&(r=t.length)),d},cancel:d=>{const p=n.indexOf(d);p!==-1&&n.splice(p,1),i.delete(d)},process:d=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p(e[t]=rL(()=>ef=!0),e),{}),sL=Mf.reduce((e,t)=>{const n=yg[t];return e[t]=(r,o=!1,s=!1)=>(ef||lL(),n.schedule(r,o,s)),e},{}),aL=Mf.reduce((e,t)=>(e[t]=yg[t].cancel,e),{});Mf.reduce((e,t)=>(e[t]=()=>yg[t].process(eu),e),{});const iL=e=>yg[e].process(eu),LP=e=>{ef=!1,eu.delta=lb?NP:Math.max(Math.min(e-eu.timestamp,oL),1),eu.timestamp=e,cb=!0,Mf.forEach(iL),cb=!1,ef&&(lb=!1,$P(LP))},lL=()=>{ef=!0,lb=!0,cb||$P(LP)},AS=()=>eu;function Cg(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=l.Children.toArray(e.path),i=De((c,d)=>a.jsx(Gr,{ref:d,viewBox:t,...o,...c,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}var cL=Object.defineProperty,uL=(e,t,n)=>t in e?cL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mr=(e,t,n)=>(uL(e,typeof t!="symbol"?t+"":t,n),n);function RS(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var dL=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function DS(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function TS(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var ub=typeof window<"u"?l.useLayoutEffect:l.useEffect,Jh=e=>e,fL=class{constructor(){Mr(this,"descendants",new Map),Mr(this,"register",e=>{if(e!=null)return dL(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Mr(this,"unregister",e=>{this.descendants.delete(e);const t=RS(Array.from(this.descendants.keys()));this.assignIndex(t)}),Mr(this,"destroy",()=>{this.descendants.clear()}),Mr(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Mr(this,"count",()=>this.descendants.size),Mr(this,"enabledCount",()=>this.enabledValues().length),Mr(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Mr(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Mr(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Mr(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Mr(this,"first",()=>this.item(0)),Mr(this,"firstEnabled",()=>this.enabledItem(0)),Mr(this,"last",()=>this.item(this.descendants.size-1)),Mr(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Mr(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Mr(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Mr(this,"next",(e,t=!0)=>{const n=DS(e,this.count(),t);return this.item(n)}),Mr(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=DS(r,this.enabledCount(),t);return this.enabledItem(o)}),Mr(this,"prev",(e,t=!0)=>{const n=TS(e,this.count()-1,t);return this.item(n)}),Mr(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=TS(r,this.enabledCount()-1,t);return this.enabledItem(o)}),Mr(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=RS(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function pL(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function xn(...e){return t=>{e.forEach(n=>{pL(n,t)})}}function hL(...e){return l.useMemo(()=>xn(...e),e)}function mL(){const e=l.useRef(new fL);return ub(()=>()=>e.current.destroy()),e.current}var[gL,zP]=Un({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vL(e){const t=zP(),[n,r]=l.useState(-1),o=l.useRef(null);ub(()=>()=>{o.current&&t.unregister(o.current)},[]),ub(()=>{if(!o.current)return;const i=Number(o.current.dataset.index);n!=i&&!Number.isNaN(i)&&r(i)});const s=Jh(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:xn(s,o)}}function ry(){return[Jh(gL),()=>Jh(zP()),()=>mL(),o=>vL(o)]}var[bL,wg]=Un({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[xL,oy]=Un({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[yL,Dbe,CL,wL]=ry(),Nc=De(function(t,n){const{getButtonProps:r}=oy(),o=r(t,n),i={display:"flex",alignItems:"center",width:"100%",outline:0,...wg().button};return a.jsx(Ae.button,{...o,className:kt("chakra-accordion__button",t.className),__css:i})});Nc.displayName="AccordionButton";function Of(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(g,b)=>g!==b}=e,s=vr(r),i=vr(o),[c,d]=l.useState(n),p=t!==void 0,h=p?t:c,m=vr(g=>{const y=typeof g=="function"?g(h):g;i(h,y)&&(p||d(y),s(y))},[p,s,h,i]);return[h,m]}function SL(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...i}=e;_L(e),IL(e);const c=CL(),[d,p]=l.useState(-1);l.useEffect(()=>()=>{p(-1)},[]);const[h,m]=Of({value:r,defaultValue(){return o?n??[]:n??-1},onChange:t});return{index:h,setIndex:m,htmlProps:i,getAccordionItemProps:b=>{let y=!1;return b!==null&&(y=Array.isArray(h)?h.includes(b):h===b),{isOpen:y,onChange:w=>{if(b!==null)if(o&&Array.isArray(h)){const S=w?h.concat(b):h.filter(j=>j!==b);m(S)}else w?m(b):s&&m(-1)}}},focusedIndex:d,setFocusedIndex:p,descendants:c}}var[kL,sy]=Un({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function jL(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:i}=sy(),c=l.useRef(null),d=l.useId(),p=r??d,h=`accordion-button-${p}`,m=`accordion-panel-${p}`;PL(e);const{register:g,index:b,descendants:y}=wL({disabled:t&&!n}),{isOpen:x,onChange:w}=s(b===-1?null:b);EL({isOpen:x,isDisabled:t});const S=()=>{w==null||w(!0)},j=()=>{w==null||w(!1)},I=l.useCallback(()=>{w==null||w(!x),i(b)},[b,i,x,w]),_=l.useCallback(R=>{const O={ArrowDown:()=>{const T=y.nextEnabled(b);T==null||T.node.focus()},ArrowUp:()=>{const T=y.prevEnabled(b);T==null||T.node.focus()},Home:()=>{const T=y.firstEnabled();T==null||T.node.focus()},End:()=>{const T=y.lastEnabled();T==null||T.node.focus()}}[R.key];O&&(R.preventDefault(),O(R))},[y,b]),M=l.useCallback(()=>{i(b)},[i,b]),E=l.useCallback(function(D={},O=null){return{...D,type:"button",ref:xn(g,c,O),id:h,disabled:!!t,"aria-expanded":!!x,"aria-controls":m,onClick:ot(D.onClick,I),onFocus:ot(D.onFocus,M),onKeyDown:ot(D.onKeyDown,_)}},[h,t,x,I,M,_,m,g]),A=l.useCallback(function(D={},O=null){return{...D,ref:O,role:"region",id:m,"aria-labelledby":h,hidden:!x}},[h,x,m]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:S,onClose:j,getButtonProps:E,getPanelProps:A,htmlProps:o}}function _L(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;wf({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function IL(e){wf({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function PL(e){wf({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function EL(e){wf({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function $c(e){const{isOpen:t,isDisabled:n}=oy(),{reduceMotion:r}=sy(),o=kt("chakra-accordion__icon",e.className),s=wg(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return a.jsx(Gr,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}$c.displayName="AccordionIcon";var Lc=De(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=jL(t),d={...wg().container,overflowAnchor:"none"},p=l.useMemo(()=>i,[i]);return a.jsx(xL,{value:p,children:a.jsx(Ae.div,{ref:n,...s,className:kt("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Lc.displayName="AccordionItem";var Gc={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Tl={enter:{duration:.2,ease:Gc.easeOut},exit:{duration:.1,ease:Gc.easeIn}},ii={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},ML=e=>e!=null&&parseInt(e.toString(),10)>0,NS={exit:{height:{duration:.2,ease:Gc.ease},opacity:{duration:.3,ease:Gc.ease}},enter:{height:{duration:.3,ease:Gc.ease},opacity:{duration:.4,ease:Gc.ease}}},OL={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:ML(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(NS.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:ii.enter(NS.enter,o)}}},Af=l.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:c,className:d,transition:p,transitionEnd:h,...m}=e,[g,b]=l.useState(!1);l.useEffect(()=>{const j=setTimeout(()=>{b(!0)});return()=>clearTimeout(j)},[]),wf({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:i,animateOpacity:o,transition:g?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:y?"block":"none"}}},w=r?n:!0,S=n||r?"enter":"exit";return a.jsx(So,{initial:!1,custom:x,children:w&&a.jsx(Ar.div,{ref:t,...m,className:kt("chakra-collapse",d),style:{overflow:"hidden",display:"block",...c},custom:x,variants:OL,initial:r?"exit":!1,animate:S,exit:"exit"})})});Af.displayName="Collapse";var AL={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:ii.enter(Tl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:ii.exit(Tl.exit,n),transitionEnd:t==null?void 0:t.exit}}},FP={initial:"exit",animate:"enter",exit:"exit",variants:AL},RL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:c,delay:d,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,g={transition:i,transitionEnd:c,delay:d};return a.jsx(So,{custom:g,children:m&&a.jsx(Ar.div,{ref:n,className:kt("chakra-fade",s),custom:g,...FP,animate:h,...p})})});RL.displayName="Fade";var DL={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(Tl.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:ii.enter(Tl.enter,n),transitionEnd:e==null?void 0:e.enter}}},BP={initial:"exit",animate:"enter",exit:"exit",variants:DL},TL=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:i=.95,className:c,transition:d,transitionEnd:p,delay:h,...m}=t,g=r?o&&r:!0,b=o||r?"enter":"exit",y={initialScale:i,reverse:s,transition:d,transitionEnd:p,delay:h};return a.jsx(So,{custom:y,children:g&&a.jsx(Ar.div,{ref:n,className:kt("chakra-offset-slide",c),...BP,animate:b,custom:y,...m})})});TL.displayName="ScaleFade";var NL={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,x:e,y:t,transition:(s=n==null?void 0:n.exit)!=null?s:ii.exit(Tl.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:ii.enter(Tl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var i;const c={x:t,y:e};return{opacity:0,transition:(i=n==null?void 0:n.exit)!=null?i:ii.exit(Tl.exit,s),...o?{...c,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...c,...r==null?void 0:r.exit}}}}},Md={initial:"initial",animate:"enter",exit:"exit",variants:NL},$L=l.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:i,offsetX:c=0,offsetY:d=8,transition:p,transitionEnd:h,delay:m,...g}=t,b=r?o&&r:!0,y=o||r?"enter":"exit",x={offsetX:c,offsetY:d,reverse:s,transition:p,transitionEnd:h,delay:m};return a.jsx(So,{custom:x,children:b&&a.jsx(Ar.div,{ref:n,className:kt("chakra-offset-slide",i),custom:x,...Md,animate:y,...g})})});$L.displayName="SlideFade";var zc=De(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:i}=sy(),{getPanelProps:c,isOpen:d}=oy(),p=c(s,n),h=kt("chakra-accordion__panel",r),m=wg();i||delete p.hidden;const g=a.jsx(Ae.div,{...p,__css:m.panel,className:h});return i?g:a.jsx(Af,{in:d,...o,children:g})});zc.displayName="AccordionPanel";var HP=De(function({children:t,reduceMotion:n,...r},o){const s=no("Accordion",r),i=lr(r),{htmlProps:c,descendants:d,...p}=SL(i),h=l.useMemo(()=>({...p,reduceMotion:!!n}),[p,n]);return a.jsx(yL,{value:d,children:a.jsx(kL,{value:h,children:a.jsx(bL,{value:s,children:a.jsx(Ae.div,{ref:o,...c,className:kt("chakra-accordion",r.className),__css:s.root,children:t})})})})});HP.displayName="Accordion";function Sg(e){return l.Children.toArray(e).filter(t=>l.isValidElement(t))}var[LL,zL]=Un({strict:!1,name:"ButtonGroupContext"}),FL={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},BL={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Hn=De(function(t,n){const{size:r,colorScheme:o,variant:s,className:i,spacing:c="0.5rem",isAttached:d,isDisabled:p,orientation:h="horizontal",...m}=t,g=kt("chakra-button__group",i),b=l.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:p}),[r,o,s,p]);let y={display:"inline-flex",...d?FL[h]:BL[h](c)};const x=h==="vertical";return a.jsx(LL,{value:b,children:a.jsx(Ae.div,{ref:n,role:"group",__css:y,className:g,"data-attached":d?"":void 0,"data-orientation":h,flexDir:x?"column":void 0,...m})})});Hn.displayName="ButtonGroup";function HL(e){const[t,n]=l.useState(!e);return{ref:l.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}function db(e){const{children:t,className:n,...r}=e,o=l.isValidElement(t)?l.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=kt("chakra-button__icon",n);return a.jsx(Ae.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}db.displayName="ButtonIcon";function fb(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=a.jsx(Ci,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:i,...c}=e,d=kt("chakra-button__spinner",s),p=n==="start"?"marginEnd":"marginStart",h=l.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[p]:t?r:0,fontSize:"1em",lineHeight:"normal",...i}),[i,t,p,r]);return a.jsx(Ae.div,{className:d,...c,__css:h,children:o})}fb.displayName="ButtonSpinner";var nl=De((e,t)=>{const n=zL(),r=cl("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:i,children:c,leftIcon:d,rightIcon:p,loadingText:h,iconSpacing:m="0.5rem",type:g,spinner:b,spinnerPlacement:y="start",className:x,as:w,...S}=lr(e),j=l.useMemo(()=>{const E={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:E}}},[r,n]),{ref:I,type:_}=HL(w),M={rightIcon:p,leftIcon:d,iconSpacing:m,children:c};return a.jsxs(Ae.button,{ref:hL(t,I),as:w,type:g??_,"data-active":Vt(i),"data-loading":Vt(s),__css:j,className:kt("chakra-button",x),...S,disabled:o||s,children:[s&&y==="start"&&a.jsx(fb,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:m,children:b}),s?h||a.jsx(Ae.span,{opacity:0,children:a.jsx($S,{...M})}):a.jsx($S,{...M}),s&&y==="end"&&a.jsx(fb,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:m,children:b})]})});nl.displayName="Button";function $S(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return a.jsxs(a.Fragment,{children:[t&&a.jsx(db,{marginEnd:o,children:t}),r,n&&a.jsx(db,{marginStart:o,children:n})]})}var Ia=De((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...i}=e,c=n||r,d=l.isValidElement(c)?l.cloneElement(c,{"aria-hidden":!0,focusable:!1}):null;return a.jsx(nl,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...i,children:d})});Ia.displayName="IconButton";var[Tbe,WL]=Un({name:"CheckboxGroupContext",strict:!1});function VL(e){const[t,n]=l.useState(e),[r,o]=l.useState(!1);return e!==t&&(o(!0),n(e)),r}function UL(e){return a.jsx(Ae.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:a.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function GL(e){return a.jsx(Ae.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:a.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function qL(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?GL:UL;return n||t?a.jsx(Ae.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:a.jsx(o,{...r})}):null}var[KL,WP]=Un({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[QL,Rf]=Un({strict:!1,name:"FormControlContext"});function XL(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...i}=e,c=l.useId(),d=t||`field-${c}`,p=`${d}-label`,h=`${d}-feedback`,m=`${d}-helptext`,[g,b]=l.useState(!1),[y,x]=l.useState(!1),[w,S]=l.useState(!1),j=l.useCallback((A={},R=null)=>({id:m,...A,ref:xn(R,D=>{D&&x(!0)})}),[m]),I=l.useCallback((A={},R=null)=>({...A,ref:R,"data-focus":Vt(w),"data-disabled":Vt(o),"data-invalid":Vt(r),"data-readonly":Vt(s),id:A.id!==void 0?A.id:p,htmlFor:A.htmlFor!==void 0?A.htmlFor:d}),[d,o,w,r,s,p]),_=l.useCallback((A={},R=null)=>({id:h,...A,ref:xn(R,D=>{D&&b(!0)}),"aria-live":"polite"}),[h]),M=l.useCallback((A={},R=null)=>({...A,...i,ref:R,role:"group","data-focus":Vt(w),"data-disabled":Vt(o),"data-invalid":Vt(r),"data-readonly":Vt(s)}),[i,o,w,r,s]),E=l.useCallback((A={},R=null)=>({...A,ref:R,role:"presentation","aria-hidden":!0,children:A.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!w,onFocus:()=>S(!0),onBlur:()=>S(!1),hasFeedbackText:g,setHasFeedbackText:b,hasHelpText:y,setHasHelpText:x,id:d,labelId:p,feedbackId:h,helpTextId:m,htmlProps:i,getHelpTextProps:j,getErrorMessageProps:_,getRootProps:M,getLabelProps:I,getRequiredIndicatorProps:E}}var Vn=De(function(t,n){const r=no("Form",t),o=lr(t),{getRootProps:s,htmlProps:i,...c}=XL(o),d=kt("chakra-form-control",t.className);return a.jsx(QL,{value:c,children:a.jsx(KL,{value:r,children:a.jsx(Ae.div,{...s({},n),className:d,__css:r.container})})})});Vn.displayName="FormControl";var VP=De(function(t,n){const r=Rf(),o=WP(),s=kt("chakra-form__helper-text",t.className);return a.jsx(Ae.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});VP.displayName="FormHelperText";var yr=De(function(t,n){var r;const o=cl("FormLabel",t),s=lr(t),{className:i,children:c,requiredIndicator:d=a.jsx(UP,{}),optionalIndicator:p=null,...h}=s,m=Rf(),g=(r=m==null?void 0:m.getLabelProps(h,n))!=null?r:{ref:n,...h};return a.jsxs(Ae.label,{...g,className:kt("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...o},children:[c,m!=null&&m.isRequired?d:p]})});yr.displayName="FormLabel";var UP=De(function(t,n){const r=Rf(),o=WP();if(!(r!=null&&r.isRequired))return null;const s=kt("chakra-form__required-indicator",t.className);return a.jsx(Ae.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});UP.displayName="RequiredIndicator";function ay(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=iy(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":Ms(n),"aria-required":Ms(o),"aria-readonly":Ms(r)}}function iy(e){var t,n,r;const o=Rf(),{id:s,disabled:i,readOnly:c,required:d,isRequired:p,isInvalid:h,isReadOnly:m,isDisabled:g,onFocus:b,onBlur:y,...x}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&w.push(o.feedbackId),o!=null&&o.hasHelpText&&w.push(o.helpTextId),{...x,"aria-describedby":w.join(" ")||void 0,id:s??(o==null?void 0:o.id),isDisabled:(t=i??g)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=c??m)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=d??p)!=null?r:o==null?void 0:o.isRequired,isInvalid:h??(o==null?void 0:o.isInvalid),onFocus:ot(o==null?void 0:o.onFocus,b),onBlur:ot(o==null?void 0:o.onBlur,y)}}var ly={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},GP=Ae("span",{baseStyle:ly});GP.displayName="VisuallyHidden";var YL=Ae("input",{baseStyle:ly});YL.displayName="VisuallyHiddenInput";var JL=()=>typeof document<"u",LS=!1,Df=null,Ul=!1,pb=!1,hb=new Set;function cy(e,t){hb.forEach(n=>n(e,t))}var ZL=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function ez(e){return!(e.metaKey||!ZL&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zS(e){Ul=!0,ez(e)&&(Df="keyboard",cy("keyboard",e))}function jc(e){if(Df="pointer",e.type==="mousedown"||e.type==="pointerdown"){Ul=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;cy("pointer",e)}}function tz(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function nz(e){tz(e)&&(Ul=!0,Df="virtual")}function rz(e){e.target===window||e.target===document||(!Ul&&!pb&&(Df="virtual",cy("virtual",e)),Ul=!1,pb=!1)}function oz(){Ul=!1,pb=!0}function FS(){return Df!=="pointer"}function sz(){if(!JL()||LS)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Ul=!0,e.apply(this,n)},document.addEventListener("keydown",zS,!0),document.addEventListener("keyup",zS,!0),document.addEventListener("click",nz,!0),window.addEventListener("focus",rz,!0),window.addEventListener("blur",oz,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",jc,!0),document.addEventListener("pointermove",jc,!0),document.addEventListener("pointerup",jc,!0)):(document.addEventListener("mousedown",jc,!0),document.addEventListener("mousemove",jc,!0),document.addEventListener("mouseup",jc,!0)),LS=!0}function qP(e){sz(),e(FS());const t=()=>e(FS());return hb.add(t),()=>{hb.delete(t)}}function az(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function KP(e={}){const t=iy(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:i,onBlur:c,onFocus:d,"aria-describedby":p}=t,{defaultChecked:h,isChecked:m,isFocusable:g,onChange:b,isIndeterminate:y,name:x,value:w,tabIndex:S=void 0,"aria-label":j,"aria-labelledby":I,"aria-invalid":_,...M}=e,E=az(M,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),A=vr(b),R=vr(c),D=vr(d),[O,T]=l.useState(!1),[K,G]=l.useState(!1),[Q,Z]=l.useState(!1),[te,V]=l.useState(!1);l.useEffect(()=>qP(T),[]);const oe=l.useRef(null),[ne,se]=l.useState(!0),[re,ae]=l.useState(!!h),B=m!==void 0,X=B?m:re,$=l.useCallback(de=>{if(r||n){de.preventDefault();return}B||ae(X?de.target.checked:y?!0:de.target.checked),A==null||A(de)},[r,n,X,B,y,A]);Yc(()=>{oe.current&&(oe.current.indeterminate=!!y)},[y]),wi(()=>{n&&G(!1)},[n,G]),Yc(()=>{const de=oe.current;if(!(de!=null&&de.form))return;const _e=()=>{ae(!!h)};return de.form.addEventListener("reset",_e),()=>{var Pe;return(Pe=de.form)==null?void 0:Pe.removeEventListener("reset",_e)}},[]);const F=n&&!g,q=l.useCallback(de=>{de.key===" "&&V(!0)},[V]),pe=l.useCallback(de=>{de.key===" "&&V(!1)},[V]);Yc(()=>{if(!oe.current)return;oe.current.checked!==X&&ae(oe.current.checked)},[oe.current]);const W=l.useCallback((de={},_e=null)=>{const Pe=ze=>{K&&ze.preventDefault(),V(!0)};return{...de,ref:_e,"data-active":Vt(te),"data-hover":Vt(Q),"data-checked":Vt(X),"data-focus":Vt(K),"data-focus-visible":Vt(K&&O),"data-indeterminate":Vt(y),"data-disabled":Vt(n),"data-invalid":Vt(s),"data-readonly":Vt(r),"aria-hidden":!0,onMouseDown:ot(de.onMouseDown,Pe),onMouseUp:ot(de.onMouseUp,()=>V(!1)),onMouseEnter:ot(de.onMouseEnter,()=>Z(!0)),onMouseLeave:ot(de.onMouseLeave,()=>Z(!1))}},[te,X,n,K,O,Q,y,s,r]),U=l.useCallback((de={},_e=null)=>({...de,ref:_e,"data-active":Vt(te),"data-hover":Vt(Q),"data-checked":Vt(X),"data-focus":Vt(K),"data-focus-visible":Vt(K&&O),"data-indeterminate":Vt(y),"data-disabled":Vt(n),"data-invalid":Vt(s),"data-readonly":Vt(r)}),[te,X,n,K,O,Q,y,s,r]),ee=l.useCallback((de={},_e=null)=>({...E,...de,ref:xn(_e,Pe=>{Pe&&se(Pe.tagName==="LABEL")}),onClick:ot(de.onClick,()=>{var Pe;ne||((Pe=oe.current)==null||Pe.click(),requestAnimationFrame(()=>{var ze;(ze=oe.current)==null||ze.focus({preventScroll:!0})}))}),"data-disabled":Vt(n),"data-checked":Vt(X),"data-invalid":Vt(s)}),[E,n,X,s,ne]),Y=l.useCallback((de={},_e=null)=>({...de,ref:xn(oe,_e),type:"checkbox",name:x,value:w,id:i,tabIndex:S,onChange:ot(de.onChange,$),onBlur:ot(de.onBlur,R,()=>G(!1)),onFocus:ot(de.onFocus,D,()=>G(!0)),onKeyDown:ot(de.onKeyDown,q),onKeyUp:ot(de.onKeyUp,pe),required:o,checked:X,disabled:F,readOnly:r,"aria-label":j,"aria-labelledby":I,"aria-invalid":_?!!_:s,"aria-describedby":p,"aria-disabled":n,style:ly}),[x,w,i,$,R,D,q,pe,o,X,F,r,j,I,_,s,p,n,S]),ge=l.useCallback((de={},_e=null)=>({...de,ref:_e,onMouseDown:ot(de.onMouseDown,iz),"data-disabled":Vt(n),"data-checked":Vt(X),"data-invalid":Vt(s)}),[X,n,s]);return{state:{isInvalid:s,isFocused:K,isChecked:X,isActive:te,isHovered:Q,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:ee,getCheckboxProps:W,getIndicatorProps:U,getInputProps:Y,getLabelProps:ge,htmlProps:E}}function iz(e){e.preventDefault(),e.stopPropagation()}var lz={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},cz={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},uz=Si({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),dz=Si({from:{opacity:0},to:{opacity:1}}),fz=Si({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Tf=De(function(t,n){const r=WL(),o={...r,...t},s=no("Checkbox",o),i=lr(t),{spacing:c="0.5rem",className:d,children:p,iconColor:h,iconSize:m,icon:g=a.jsx(qL,{}),isChecked:b,isDisabled:y=r==null?void 0:r.isDisabled,onChange:x,inputProps:w,...S}=i;let j=b;r!=null&&r.value&&i.value&&(j=r.value.includes(i.value));let I=x;r!=null&&r.onChange&&i.value&&(I=pg(r.onChange,x));const{state:_,getInputProps:M,getCheckboxProps:E,getLabelProps:A,getRootProps:R}=KP({...S,isDisabled:y,isChecked:j,onChange:I}),D=VL(_.isChecked),O=l.useMemo(()=>({animation:D?_.isIndeterminate?`${dz} 20ms linear, ${fz} 200ms linear`:`${uz} 200ms linear`:void 0,fontSize:m,color:h,...s.icon}),[h,m,D,_.isIndeterminate,s.icon]),T=l.cloneElement(g,{__css:O,isIndeterminate:_.isIndeterminate,isChecked:_.isChecked});return a.jsxs(Ae.label,{__css:{...cz,...s.container},className:kt("chakra-checkbox",d),...R(),children:[a.jsx("input",{className:"chakra-checkbox__input",...M(w,n)}),a.jsx(Ae.span,{__css:{...lz,...s.control},className:"chakra-checkbox__control",...E(),children:T}),p&&a.jsx(Ae.span,{className:"chakra-checkbox__label",...A(),__css:{marginStart:c,...s.label},children:p})]})});Tf.displayName="Checkbox";function pz(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function uy(e,t){let n=pz(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function mb(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function Zh(e,t,n){return(e-t)*100/(n-t)}function QP(e,t,n){return(n-t)*e+t}function gb(e,t,n){const r=Math.round((e-t)/n)*n+t,o=mb(n);return uy(r,o)}function tu(e,t,n){return e==null?e:(n{var O;return r==null?"":(O=Yv(r,s,n))!=null?O:""}),g=typeof o<"u",b=g?o:h,y=XP(Vi(b),s),x=n??y,w=l.useCallback(O=>{O!==b&&(g||m(O.toString()),p==null||p(O.toString(),Vi(O)))},[p,g,b]),S=l.useCallback(O=>{let T=O;return d&&(T=tu(T,i,c)),uy(T,x)},[x,d,c,i]),j=l.useCallback((O=s)=>{let T;b===""?T=Vi(O):T=Vi(b)+O,T=S(T),w(T)},[S,s,w,b]),I=l.useCallback((O=s)=>{let T;b===""?T=Vi(-O):T=Vi(b)-O,T=S(T),w(T)},[S,s,w,b]),_=l.useCallback(()=>{var O;let T;r==null?T="":T=(O=Yv(r,s,n))!=null?O:i,w(T)},[r,n,s,w,i]),M=l.useCallback(O=>{var T;const K=(T=Yv(O,s,x))!=null?T:i;w(K)},[x,s,w,i]),E=Vi(b);return{isOutOfRange:E>c||E" `}),[gz,dy]=Un({name:"EditableContext",errorMessage:"useEditableContext: context is undefined. Seems you forgot to wrap the editable components in ``"}),JP={fontSize:"inherit",fontWeight:"inherit",textAlign:"inherit",bg:"transparent"},Nf=De(function(t,n){const{getInputProps:r}=dy(),o=YP(),s=r(t,n),i=kt("chakra-editable__input",t.className);return a.jsx(Ae.input,{...s,__css:{outline:0,...JP,...o.input},className:i})});Nf.displayName="EditableInput";var $f=De(function(t,n){const{getPreviewProps:r}=dy(),o=YP(),s=r(t,n),i=kt("chakra-editable__preview",t.className);return a.jsx(Ae.span,{...s,__css:{cursor:"text",display:"inline-block",...JP,...o.preview},className:i})});$f.displayName="EditablePreview";function Nl(e,t,n,r){const o=vr(n);return l.useEffect(()=>{const s=typeof e=="function"?e():e??document;if(!(!n||!s))return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const s=typeof e=="function"?e():e??document;s==null||s.removeEventListener(t,o,r)}}function vz(e){return"current"in e}var ZP=()=>typeof window<"u";function bz(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var xz=e=>ZP()&&e.test(navigator.vendor),yz=e=>ZP()&&e.test(bz()),Cz=()=>yz(/mac|iphone|ipad|ipod/i),wz=()=>Cz()&&xz(/apple/i);function e5(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,i;return(i=(s=t.current)==null?void 0:s.ownerDocument)!=null?i:document};Nl(o,"pointerdown",s=>{if(!wz()||!r)return;const i=s.target,d=(n??[t]).some(p=>{const h=vz(p)?p.current:p;return(h==null?void 0:h.contains(i))||h===i});o().activeElement!==i&&d&&(s.preventDefault(),i.focus())})}function BS(e,t){return e?e===t||e.contains(t):!1}function Sz(e={}){const{onChange:t,onCancel:n,onSubmit:r,onBlur:o,value:s,isDisabled:i,defaultValue:c,startWithEditView:d,isPreviewFocusable:p=!0,submitOnBlur:h=!0,selectAllOnFocus:m=!0,placeholder:g,onEdit:b,finalFocusRef:y,...x}=e,w=vr(b),S=!!(d&&!i),[j,I]=l.useState(S),[_,M]=Of({defaultValue:c||"",value:s,onChange:t}),[E,A]=l.useState(_),R=l.useRef(null),D=l.useRef(null),O=l.useRef(null),T=l.useRef(null),K=l.useRef(null);e5({ref:R,enabled:j,elements:[T,K]});const G=!j&&!i;Yc(()=>{var W,U;j&&((W=R.current)==null||W.focus(),m&&((U=R.current)==null||U.select()))},[]),wi(()=>{var W,U,ee,Y;if(!j){y?(W=y.current)==null||W.focus():(U=O.current)==null||U.focus();return}(ee=R.current)==null||ee.focus(),m&&((Y=R.current)==null||Y.select()),w==null||w()},[j,w,m]);const Q=l.useCallback(()=>{G&&I(!0)},[G]),Z=l.useCallback(()=>{A(_)},[_]),te=l.useCallback(()=>{I(!1),M(E),n==null||n(E),o==null||o(E)},[n,o,M,E]),V=l.useCallback(()=>{I(!1),A(_),r==null||r(_),o==null||o(E)},[_,r,o,E]);l.useEffect(()=>{if(j)return;const W=R.current;(W==null?void 0:W.ownerDocument.activeElement)===W&&(W==null||W.blur())},[j]);const oe=l.useCallback(W=>{M(W.currentTarget.value)},[M]),ne=l.useCallback(W=>{const U=W.key,Y={Escape:te,Enter:ge=>{!ge.shiftKey&&!ge.metaKey&&V()}}[U];Y&&(W.preventDefault(),Y(W))},[te,V]),se=l.useCallback(W=>{const U=W.key,Y={Escape:te}[U];Y&&(W.preventDefault(),Y(W))},[te]),re=_.length===0,ae=l.useCallback(W=>{var U;if(!j)return;const ee=W.currentTarget.ownerDocument,Y=(U=W.relatedTarget)!=null?U:ee.activeElement,ge=BS(T.current,Y),he=BS(K.current,Y);!ge&&!he&&(h?V():te())},[h,V,te,j]),B=l.useCallback((W={},U=null)=>{const ee=G&&p?0:void 0;return{...W,ref:xn(U,D),children:re?g:_,hidden:j,"aria-disabled":Ms(i),tabIndex:ee,onFocus:ot(W.onFocus,Q,Z)}},[i,j,G,p,re,Q,Z,g,_]),X=l.useCallback((W={},U=null)=>({...W,hidden:!j,placeholder:g,ref:xn(U,R),disabled:i,"aria-disabled":Ms(i),value:_,onBlur:ot(W.onBlur,ae),onChange:ot(W.onChange,oe),onKeyDown:ot(W.onKeyDown,ne),onFocus:ot(W.onFocus,Z)}),[i,j,ae,oe,ne,Z,g,_]),$=l.useCallback((W={},U=null)=>({...W,hidden:!j,placeholder:g,ref:xn(U,R),disabled:i,"aria-disabled":Ms(i),value:_,onBlur:ot(W.onBlur,ae),onChange:ot(W.onChange,oe),onKeyDown:ot(W.onKeyDown,se),onFocus:ot(W.onFocus,Z)}),[i,j,ae,oe,se,Z,g,_]),F=l.useCallback((W={},U=null)=>({"aria-label":"Edit",...W,type:"button",onClick:ot(W.onClick,Q),ref:xn(U,O),disabled:i}),[Q,i]),q=l.useCallback((W={},U=null)=>({...W,"aria-label":"Submit",ref:xn(K,U),type:"button",onClick:ot(W.onClick,V),disabled:i}),[V,i]),pe=l.useCallback((W={},U=null)=>({"aria-label":"Cancel",id:"cancel",...W,ref:xn(T,U),type:"button",onClick:ot(W.onClick,te),disabled:i}),[te,i]);return{isEditing:j,isDisabled:i,isValueEmpty:re,value:_,onEdit:Q,onCancel:te,onSubmit:V,getPreviewProps:B,getInputProps:X,getTextareaProps:$,getEditButtonProps:F,getSubmitButtonProps:q,getCancelButtonProps:pe,htmlProps:x}}var Lf=De(function(t,n){const r=no("Editable",t),o=lr(t),{htmlProps:s,...i}=Sz(o),{isEditing:c,onSubmit:d,onCancel:p,onEdit:h}=i,m=kt("chakra-editable",t.className),g=Mx(t.children,{isEditing:c,onSubmit:d,onCancel:p,onEdit:h});return a.jsx(gz,{value:i,children:a.jsx(mz,{value:r,children:a.jsx(Ae.div,{ref:n,...s,className:m,children:g})})})});Lf.displayName="Editable";function t5(){const{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}=dy();return{isEditing:e,getEditButtonProps:t,getCancelButtonProps:n,getSubmitButtonProps:r}}var n5={exports:{}},kz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jz=kz,_z=jz;function r5(){}function o5(){}o5.resetWarningCache=r5;var Iz=function(){function e(r,o,s,i,c,d){if(d!==_z){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o5,resetWarningCache:r5};return n.PropTypes=n,n};n5.exports=Iz();var Pz=n5.exports;const nr=Sf(Pz);var vb="data-focus-lock",s5="data-focus-lock-disabled",Ez="data-no-focus-lock",Mz="data-autofocus-inside",Oz="data-no-autofocus";function Az(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rz(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function a5(e,t){return Rz(t||null,function(n){return e.forEach(function(r){return Az(r,n)})})}var Jv={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},wa=function(){return wa=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(Kz)},Qz=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],my=Qz.join(","),Xz="".concat(my,", [data-focus-guard]"),k5=function(e,t){return Wa((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?Xz:my)?[r]:[],k5(r))},[])},Yz=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?kg([e.contentDocument.body],t):[e]},kg=function(e,t){return e.reduce(function(n,r){var o,s=k5(r,t),i=(o=[]).concat.apply(o,s.map(function(c){return Yz(c,t)}));return n.concat(i,r.parentNode?Wa(r.parentNode.querySelectorAll(my)).filter(function(c){return c===r}):[])},[])},Jz=function(e){var t=e.querySelectorAll("[".concat(Mz,"]"));return Wa(t).map(function(n){return kg([n])}).reduce(function(n,r){return n.concat(r)},[])},gy=function(e,t){return Wa(e).filter(function(n){return b5(t,n)}).filter(function(n){return Uz(n)})},HS=function(e,t){return t===void 0&&(t=new Map),Wa(e).filter(function(n){return x5(t,n)})},xb=function(e,t,n){return S5(gy(kg(e,n),t),!0,n)},WS=function(e,t){return S5(gy(kg(e),t),!1)},Zz=function(e,t){return gy(Jz(e),t)},nu=function(e,t){return e.shadowRoot?nu(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Wa(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?nu(o,t):!1}return nu(n,t)})},eF=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,c){return!t.has(c)})},j5=function(e){return e.parentNode?j5(e.parentNode):e},vy=function(e){var t=em(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(vb);return n.push.apply(n,o?eF(Wa(j5(r).querySelectorAll("[".concat(vb,'="').concat(o,'"]:not([').concat(s5,'="disabled"])')))):[r]),n},[])},tF=function(e){try{return e()}catch{return}},tf=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?tf(t.shadowRoot):t instanceof HTMLIFrameElement&&tF(function(){return t.contentWindow.document})?tf(t.contentWindow.document):t}},nF=function(e,t){return e===t},rF=function(e,t){return!!Wa(e.querySelectorAll("iframe")).some(function(n){return nF(n,t)})},_5=function(e,t){return t===void 0&&(t=tf(m5(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:vy(e).some(function(n){return nu(n,t)||rF(n,t)})},oF=function(e){e===void 0&&(e=document);var t=tf(e);return t?Wa(e.querySelectorAll("[".concat(Ez,"]"))).some(function(n){return nu(n,t)}):!1},sF=function(e,t){return t.filter(w5).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},by=function(e,t){return w5(e)&&e.name?sF(e,t):e},aF=function(e){var t=new Set;return e.forEach(function(n){return t.add(by(n,e))}),e.filter(function(n){return t.has(n)})},VS=function(e){return e[0]&&e.length>1?by(e[0],e):e[0]},US=function(e,t){return e.length>1?e.indexOf(by(e[t],e)):t},I5="NEW_FOCUS",iF=function(e,t,n,r){var o=e.length,s=e[0],i=e[o-1],c=hy(n);if(!(n&&e.indexOf(n)>=0)){var d=n!==void 0?t.indexOf(n):-1,p=r?t.indexOf(r):d,h=r?e.indexOf(r):-1,m=d-p,g=t.indexOf(s),b=t.indexOf(i),y=aF(t),x=n!==void 0?y.indexOf(n):-1,w=x-(r?y.indexOf(r):d),S=US(e,0),j=US(e,o-1);if(d===-1||h===-1)return I5;if(!m&&h>=0)return h;if(d<=g&&c&&Math.abs(m)>1)return j;if(d>=b&&c&&Math.abs(m)>1)return S;if(m&&Math.abs(w)>1)return h;if(d<=g)return j;if(d>b)return S;if(m)return Math.abs(m)>1?h:(o+h+m)%o}},lF=function(e){return function(t){var n,r=(n=y5(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},cF=function(e,t,n){var r=e.map(function(s){var i=s.node;return i}),o=HS(r.filter(lF(n)));return o&&o.length?VS(o):VS(HS(t))},yb=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&yb(e.parentNode.host||e.parentNode,t),t},Zv=function(e,t){for(var n=yb(e),r=yb(t),o=0;o=0)return s}return!1},P5=function(e,t,n){var r=em(e),o=em(t),s=r[0],i=!1;return o.filter(Boolean).forEach(function(c){i=Zv(i||c,c)||i,n.filter(Boolean).forEach(function(d){var p=Zv(s,d);p&&(!i||nu(p,i)?i=p:i=Zv(p,i))})}),i},uF=function(e,t){return e.reduce(function(n,r){return n.concat(Zz(r,t))},[])},dF=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qz)},fF=function(e,t){var n=tf(em(e).length>0?document:m5(e).ownerDocument),r=vy(e).filter(tm),o=P5(n||e,e,r),s=new Map,i=WS(r,s),c=xb(r,s).filter(function(b){var y=b.node;return tm(y)});if(!(!c[0]&&(c=i,!c[0]))){var d=WS([o],s).map(function(b){var y=b.node;return y}),p=dF(d,c),h=p.map(function(b){var y=b.node;return y}),m=iF(h,d,n,t);if(m===I5){var g=cF(i,h,uF(r,s));if(g)return{node:g};console.warn("focus-lock: cannot find any node to move focus into");return}return m===void 0?m:p[m]}},pF=function(e){var t=vy(e).filter(tm),n=P5(e,e,t),r=new Map,o=xb([n],r,!0),s=xb(t,r).filter(function(i){var c=i.node;return tm(c)}).map(function(i){var c=i.node;return c});return o.map(function(i){var c=i.node,d=i.index;return{node:c,index:d,lockItem:s.indexOf(c)>=0,guard:hy(c)}})},hF=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},e1=0,t1=!1,E5=function(e,t,n){n===void 0&&(n={});var r=fF(e,t);if(!t1&&r){if(e1>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),t1=!0,setTimeout(function(){t1=!1},1);return}e1++,hF(r.node,n.focusOptions),e1--}};function xy(e){setTimeout(e,1)}var mF=function(){return document&&document.activeElement===document.body},gF=function(){return mF()||oF()},ru=null,qc=null,ou=null,nf=!1,vF=function(){return!0},bF=function(t){return(ru.whiteList||vF)(t)},xF=function(t,n){ou={observerNode:t,portaledElement:n}},yF=function(t){return ou&&ou.portaledElement===t};function GS(e,t,n,r){var o=null,s=e;do{var i=r[s];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(s!==e)return;o=null}else break}while((s+=n)!==t);o&&(o.node.tabIndex=0)}var CF=function(t){return t&&"current"in t?t.current:t},wF=function(t){return t?!!nf:nf==="meanwhile"},SF=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},kF=function(t,n){return n.some(function(r){return SF(t,r,r)})},nm=function(){var t=!1;if(ru){var n=ru,r=n.observed,o=n.persistentFocus,s=n.autoFocus,i=n.shards,c=n.crossFrame,d=n.focusOptions,p=r||ou&&ou.portaledElement,h=document&&document.activeElement;if(p){var m=[p].concat(i.map(CF).filter(Boolean));if((!h||bF(h))&&(o||wF(c)||!gF()||!qc&&s)&&(p&&!(_5(m)||h&&kF(h,m)||yF(h))&&(document&&!qc&&h&&!s?(h.blur&&h.blur(),document.body.focus()):(t=E5(m,qc,{focusOptions:d}),ou={})),nf=!1,qc=document&&document.activeElement),document){var g=document&&document.activeElement,b=pF(m),y=b.map(function(x){var w=x.node;return w}).indexOf(g);y>-1&&(b.filter(function(x){var w=x.guard,S=x.node;return w&&S.dataset.focusAutoGuard}).forEach(function(x){var w=x.node;return w.removeAttribute("tabIndex")}),GS(y,b.length,1,b),GS(y,-1,-1,b))}}}return t},M5=function(t){nm()&&t&&(t.stopPropagation(),t.preventDefault())},yy=function(){return xy(nm)},jF=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||xF(r,n)},_F=function(){return null},O5=function(){nf="just",xy(function(){nf="meanwhile"})},IF=function(){document.addEventListener("focusin",M5),document.addEventListener("focusout",yy),window.addEventListener("blur",O5)},PF=function(){document.removeEventListener("focusin",M5),document.removeEventListener("focusout",yy),window.removeEventListener("blur",O5)};function EF(e){return e.filter(function(t){var n=t.disabled;return!n})}function MF(e){var t=e.slice(-1)[0];t&&!ru&&IF();var n=ru,r=n&&t&&t.id===n.id;ru=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(qc=null,(!r||n.observed!==t.observed)&&t.onActivation(),nm(),xy(nm)):(PF(),qc=null)}f5.assignSyncMedium(jF);p5.assignMedium(yy);Nz.assignMedium(function(e){return e({moveFocusInside:E5,focusInside:_5})});const OF=Fz(EF,MF)(_F);var A5=l.forwardRef(function(t,n){return l.createElement(h5,K1({sideCar:OF,ref:n},t))}),R5=h5.propTypes||{};R5.sideCar;$$(R5,["sideCar"]);A5.propTypes={};const qS=A5;function D5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Cy(e){var t;if(!D5(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function AF(e){var t,n;return(n=(t=T5(e))==null?void 0:t.defaultView)!=null?n:window}function T5(e){return D5(e)?e.ownerDocument:document}function RF(e){return T5(e).activeElement}function DF(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function TF(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function N5(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Cy(e)&&DF(e)?e:N5(TF(e))}var $5=e=>e.hasAttribute("tabindex"),NF=e=>$5(e)&&e.tabIndex===-1;function $F(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function L5(e){return e.parentElement&&L5(e.parentElement)?!0:e.hidden}function LF(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function z5(e){if(!Cy(e)||L5(e)||$F(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():LF(e)?!0:$5(e)}function zF(e){return e?Cy(e)&&z5(e)&&!NF(e):!1}var FF=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],BF=FF.join(),HF=e=>e.offsetWidth>0&&e.offsetHeight>0;function F5(e){const t=Array.from(e.querySelectorAll(BF));return t.unshift(e),t.filter(n=>z5(n)&&HF(n))}var KS,WF=(KS=qS.default)!=null?KS:qS,B5=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:i,autoFocus:c,persistentFocus:d,lockFocusAcrossFrames:p}=e,h=l.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&F5(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),m=l.useCallback(()=>{var b;(b=n==null?void 0:n.current)==null||b.focus()},[n]),g=o&&!n;return a.jsx(WF,{crossFrame:p,persistentFocus:d,autoFocus:c,disabled:i,onActivation:h,onDeactivation:m,returnFocus:g,children:s})};B5.displayName="FocusLock";var VF=tL?l.useLayoutEffect:l.useEffect;function Cb(e,t=[]){const n=l.useRef(e);return VF(()=>{n.current=e}),l.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function UF(e,t,n,r){const o=Cb(t);return l.useEffect(()=>{var s;const i=(s=Fw(n))!=null?s:document;if(t)return i.addEventListener(e,o,r),()=>{i.removeEventListener(e,o,r)}},[e,n,r,o,t]),()=>{var s;((s=Fw(n))!=null?s:document).removeEventListener(e,o,r)}}function GF(e,t){const n=l.useId();return l.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function qF(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function hs(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=Cb(n),i=Cb(t),[c,d]=l.useState(e.defaultIsOpen||!1),[p,h]=qF(r,c),m=GF(o,"disclosure"),g=l.useCallback(()=>{p||d(!1),i==null||i()},[p,i]),b=l.useCallback(()=>{p||d(!0),s==null||s()},[p,s]),y=l.useCallback(()=>{(h?g:b)()},[h,b,g]);return{isOpen:!!h,onOpen:b,onClose:g,onToggle:y,isControlled:p,getButtonProps:(x={})=>({...x,"aria-expanded":h,"aria-controls":m,onClick:mD(x.onClick,y)}),getDisclosureProps:(x={})=>({...x,hidden:!h,id:m})}}var[KF,QF]=Un({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),H5=De(function(t,n){const r=no("Input",t),{children:o,className:s,...i}=lr(t),c=kt("chakra-input__group",s),d={},p=Sg(o),h=r.field;p.forEach(g=>{var b,y;r&&(h&&g.type.id==="InputLeftElement"&&(d.paddingStart=(b=h.height)!=null?b:h.h),h&&g.type.id==="InputRightElement"&&(d.paddingEnd=(y=h.height)!=null?y:h.h),g.type.id==="InputRightAddon"&&(d.borderEndRadius=0),g.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const m=p.map(g=>{var b,y;const x=_I({size:((b=g.props)==null?void 0:b.size)||t.size,variant:((y=g.props)==null?void 0:y.variant)||t.variant});return g.type.id!=="Input"?l.cloneElement(g,x):l.cloneElement(g,Object.assign(x,d,g.props))});return a.jsx(Ae.div,{className:c,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...i,children:a.jsx(KF,{value:r,children:m})})});H5.displayName="InputGroup";var XF=Ae("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),jg=De(function(t,n){var r,o;const{placement:s="left",...i}=t,c=QF(),d=c.field,h={[s==="left"?"insetStart":"insetEnd"]:"0",width:(r=d==null?void 0:d.height)!=null?r:d==null?void 0:d.h,height:(o=d==null?void 0:d.height)!=null?o:d==null?void 0:d.h,fontSize:d==null?void 0:d.fontSize,...c.element};return a.jsx(XF,{ref:n,__css:h,...i})});jg.id="InputElement";jg.displayName="InputElement";var W5=De(function(t,n){const{className:r,...o}=t,s=kt("chakra-input__left-element",r);return a.jsx(jg,{ref:n,placement:"left",className:s,...o})});W5.id="InputLeftElement";W5.displayName="InputLeftElement";var wy=De(function(t,n){const{className:r,...o}=t,s=kt("chakra-input__right-element",r);return a.jsx(jg,{ref:n,placement:"right",className:s,...o})});wy.id="InputRightElement";wy.displayName="InputRightElement";var _g=De(function(t,n){const{htmlSize:r,...o}=t,s=no("Input",o),i=lr(o),c=ay(i),d=kt("chakra-input",t.className);return a.jsx(Ae.input,{size:r,...c,__css:s.field,ref:n,className:d})});_g.displayName="Input";_g.id="Input";var Ig=De(function(t,n){const r=cl("Link",t),{className:o,isExternal:s,...i}=lr(t);return a.jsx(Ae.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:kt("chakra-link",o),...i,__css:r})});Ig.displayName="Link";var[YF,V5]=Un({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Sy=De(function(t,n){const r=no("List",t),{children:o,styleType:s="none",stylePosition:i,spacing:c,...d}=lr(t),p=Sg(o),m=c?{["& > *:not(style) ~ *:not(style)"]:{mt:c}}:{};return a.jsx(YF,{value:r,children:a.jsx(Ae.ul,{ref:n,listStyleType:s,listStylePosition:i,role:"list",__css:{...r.container,...m},...d,children:p})})});Sy.displayName="List";var U5=De((e,t)=>{const{as:n,...r}=e;return a.jsx(Sy,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});U5.displayName="OrderedList";var zf=De(function(t,n){const{as:r,...o}=t;return a.jsx(Sy,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});zf.displayName="UnorderedList";var Ps=De(function(t,n){const r=V5();return a.jsx(Ae.li,{ref:n,...t,__css:r.item})});Ps.displayName="ListItem";var JF=De(function(t,n){const r=V5();return a.jsx(Gr,{ref:n,role:"presentation",...t,__css:r.icon})});JF.displayName="ListIcon";var rl=De(function(t,n){const{templateAreas:r,gap:o,rowGap:s,columnGap:i,column:c,row:d,autoFlow:p,autoRows:h,templateRows:m,autoColumns:g,templateColumns:b,...y}=t,x={display:"grid",gridTemplateAreas:r,gridGap:o,gridRowGap:s,gridColumnGap:i,gridAutoColumns:g,gridColumn:c,gridRow:d,gridAutoFlow:p,gridAutoRows:h,gridTemplateRows:m,gridTemplateColumns:b};return a.jsx(Ae.div,{ref:n,__css:x,...y})});rl.displayName="Grid";function G5(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Q1(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Pi=Ae("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Pi.displayName="Spacer";var q5=e=>a.jsx(Ae.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});q5.displayName="StackItem";function ZF(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":G5(n,o=>r[o])}}var ky=De((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:i="0.5rem",wrap:c,children:d,divider:p,className:h,shouldWrapChildren:m,...g}=e,b=n?"row":r??"column",y=l.useMemo(()=>ZF({spacing:i,direction:b}),[i,b]),x=!!p,w=!m&&!x,S=l.useMemo(()=>{const I=Sg(d);return w?I:I.map((_,M)=>{const E=typeof _.key<"u"?_.key:M,A=M+1===I.length,D=m?a.jsx(q5,{children:_},E):_;if(!x)return D;const O=l.cloneElement(p,{__css:y}),T=A?null:O;return a.jsxs(l.Fragment,{children:[D,T]},E)})},[p,y,x,w,m,d]),j=kt("chakra-stack",h);return a.jsx(Ae.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:b,flexWrap:c,gap:x?void 0:i,className:j,...g,children:S})});ky.displayName="Stack";var K5=De((e,t)=>a.jsx(ky,{align:"center",...e,direction:"column",ref:t}));K5.displayName="VStack";var Pg=De((e,t)=>a.jsx(ky,{align:"center",...e,direction:"row",ref:t}));Pg.displayName="HStack";function QS(e){return G5(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var rf=De(function(t,n){const{area:r,colSpan:o,colStart:s,colEnd:i,rowEnd:c,rowSpan:d,rowStart:p,...h}=t,m=_I({gridArea:r,gridColumn:QS(o),gridRow:QS(d),gridColumnStart:s,gridColumnEnd:i,gridRowStart:p,gridRowEnd:c});return a.jsx(Ae.div,{ref:n,__css:m,...h})});rf.displayName="GridItem";var Va=De(function(t,n){const r=cl("Badge",t),{className:o,...s}=lr(t);return a.jsx(Ae.span,{ref:n,className:kt("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Va.displayName="Badge";var io=De(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:i,borderWidth:c,borderStyle:d,borderColor:p,...h}=cl("Divider",t),{className:m,orientation:g="horizontal",__css:b,...y}=lr(t),x={vertical:{borderLeftWidth:r||i||c||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||c||"1px",width:"100%"}};return a.jsx(Ae.hr,{ref:n,"aria-orientation":g,...y,__css:{...h,border:"0",borderColor:p,borderStyle:d,...x[g],...b},className:kt("chakra-divider",m)})});io.displayName="Divider";function eB(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function tB(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=l.useState([]),s=l.useRef(),i=()=>{s.current&&(clearTimeout(s.current),s.current=null)},c=()=>{i(),s.current=setTimeout(()=>{o([]),s.current=null},t)};l.useEffect(()=>i,[]);function d(p){return h=>{if(h.key==="Backspace"){const m=[...r];m.pop(),o(m);return}if(eB(h)){const m=r.concat(h.key);n(h)&&(h.preventDefault(),h.stopPropagation()),o(m),p(m.join("")),c()}}}return d}function nB(e,t,n,r){if(t==null)return r;if(!r)return e.find(i=>n(i).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(s=>n(s).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let s;return o.includes(r)?(s=o.indexOf(r)+1,s===o.length&&(s=0),o[s]):(s=e.indexOf(o[0]),e[s])}return r}function rB(){const e=l.useRef(new Map),t=e.current,n=l.useCallback((o,s,i,c)=>{e.current.set(i,{type:s,el:o,options:c}),o.addEventListener(s,i,c)},[]),r=l.useCallback((o,s,i,c)=>{o.removeEventListener(s,i,c),e.current.delete(i)},[]);return l.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function n1(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Q5(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:i,onMouseUp:c,onClick:d,onKeyDown:p,onKeyUp:h,tabIndex:m,onMouseOver:g,onMouseLeave:b,...y}=e,[x,w]=l.useState(!0),[S,j]=l.useState(!1),I=rB(),_=V=>{V&&V.tagName!=="BUTTON"&&w(!1)},M=x?m:m||0,E=n&&!r,A=l.useCallback(V=>{if(n){V.stopPropagation(),V.preventDefault();return}V.currentTarget.focus(),d==null||d(V)},[n,d]),R=l.useCallback(V=>{S&&n1(V)&&(V.preventDefault(),V.stopPropagation(),j(!1),I.remove(document,"keyup",R,!1))},[S,I]),D=l.useCallback(V=>{if(p==null||p(V),n||V.defaultPrevented||V.metaKey||!n1(V.nativeEvent)||x)return;const oe=o&&V.key==="Enter";s&&V.key===" "&&(V.preventDefault(),j(!0)),oe&&(V.preventDefault(),V.currentTarget.click()),I.add(document,"keyup",R,!1)},[n,x,p,o,s,I,R]),O=l.useCallback(V=>{if(h==null||h(V),n||V.defaultPrevented||V.metaKey||!n1(V.nativeEvent)||x)return;s&&V.key===" "&&(V.preventDefault(),j(!1),V.currentTarget.click())},[s,x,n,h]),T=l.useCallback(V=>{V.button===0&&(j(!1),I.remove(document,"mouseup",T,!1))},[I]),K=l.useCallback(V=>{if(V.button!==0)return;if(n){V.stopPropagation(),V.preventDefault();return}x||j(!0),V.currentTarget.focus({preventScroll:!0}),I.add(document,"mouseup",T,!1),i==null||i(V)},[n,x,i,I,T]),G=l.useCallback(V=>{V.button===0&&(x||j(!1),c==null||c(V))},[c,x]),Q=l.useCallback(V=>{if(n){V.preventDefault();return}g==null||g(V)},[n,g]),Z=l.useCallback(V=>{S&&(V.preventDefault(),j(!1)),b==null||b(V)},[S,b]),te=xn(t,_);return x?{...y,ref:te,type:"button","aria-disabled":E?void 0:n,disabled:E,onClick:A,onMouseDown:i,onMouseUp:c,onKeyUp:h,onKeyDown:p,onMouseOver:g,onMouseLeave:b}:{...y,ref:te,role:"button","data-active":Vt(S),"aria-disabled":n?"true":void 0,tabIndex:E?void 0:M,onClick:A,onMouseDown:K,onMouseUp:G,onKeyUp:O,onKeyDown:D,onMouseOver:Q,onMouseLeave:Z}}function oB(e){const t=e.current;if(!t)return!1;const n=RF(t);return!n||t.contains(n)?!1:!!zF(n)}function X5(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;wi(()=>{if(!s||oB(e))return;const i=(o==null?void 0:o.current)||e.current;let c;if(i)return c=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(c)}},[s,e,o])}var sB={preventScroll:!0,shouldFocus:!1};function aB(e,t=sB){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,i=iB(e)?e.current:e,c=o&&s,d=l.useRef(c),p=l.useRef(s);Yc(()=>{!p.current&&s&&(d.current=c),p.current=s},[s,c]);const h=l.useCallback(()=>{if(!(!s||!i||!d.current)&&(d.current=!1,!i.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var m;(m=n.current)==null||m.focus({preventScroll:r})});else{const m=F5(i);m.length>0&&requestAnimationFrame(()=>{m[0].focus({preventScroll:r})})}},[s,r,i,n]);wi(()=>{h()},[h]),Nl(i,"transitionend",h)}function iB(e){return"current"in e}var _c=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),qr={arrowShadowColor:_c("--popper-arrow-shadow-color"),arrowSize:_c("--popper-arrow-size","8px"),arrowSizeHalf:_c("--popper-arrow-size-half"),arrowBg:_c("--popper-arrow-bg"),transformOrigin:_c("--popper-transform-origin"),arrowOffset:_c("--popper-arrow-offset")};function lB(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var cB={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},uB=e=>cB[e],XS={scroll:!0,resize:!0};function dB(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XS,...e}}:t={enabled:e,options:XS},t}var fB={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},pB={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{YS(e)},effect:({state:e})=>()=>{YS(e)}},YS=e=>{e.elements.popper.style.setProperty(qr.transformOrigin.var,uB(e.placement))},hB={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{mB(e)}},mB=e=>{var t;if(!e.placement)return;const n=gB(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:qr.arrowSize.varRef,height:qr.arrowSize.varRef,zIndex:-1});const r={[qr.arrowSizeHalf.var]:`calc(${qr.arrowSize.varRef} / 2 - 1px)`,[qr.arrowOffset.var]:`calc(${qr.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},gB=e=>{if(e.startsWith("top"))return{property:"bottom",value:qr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:qr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:qr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:qr.arrowOffset.varRef}},vB={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{JS(e)},effect:({state:e})=>()=>{JS(e)}},JS=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=lB(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:qr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},bB={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},xB={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function yB(e,t="ltr"){var n,r;const o=((n=bB[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=xB[e])!=null?r:o}var qo="top",Ds="bottom",Ts="right",Ko="left",jy="auto",Ff=[qo,Ds,Ts,Ko],pu="start",of="end",CB="clippingParents",Y5="viewport",bd="popper",wB="reference",ZS=Ff.reduce(function(e,t){return e.concat([t+"-"+pu,t+"-"+of])},[]),J5=[].concat(Ff,[jy]).reduce(function(e,t){return e.concat([t,t+"-"+pu,t+"-"+of])},[]),SB="beforeRead",kB="read",jB="afterRead",_B="beforeMain",IB="main",PB="afterMain",EB="beforeWrite",MB="write",OB="afterWrite",AB=[SB,kB,jB,_B,IB,PB,EB,MB,OB];function Ma(e){return e?(e.nodeName||"").toLowerCase():null}function ms(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Gl(e){var t=ms(e).Element;return e instanceof t||e instanceof Element}function Os(e){var t=ms(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _y(e){if(typeof ShadowRoot>"u")return!1;var t=ms(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function RB(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Os(s)||!Ma(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var c=o[i];c===!1?s.removeAttribute(i):s.setAttribute(i,c===!0?"":c)}))})}function DB(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=i.reduce(function(d,p){return d[p]="",d},{});!Os(o)||!Ma(o)||(Object.assign(o.style,c),Object.keys(s).forEach(function(d){o.removeAttribute(d)}))})}}const TB={name:"applyStyles",enabled:!0,phase:"write",fn:RB,effect:DB,requires:["computeStyles"]};function Pa(e){return e.split("-")[0]}var $l=Math.max,rm=Math.min,hu=Math.round;function wb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Z5(){return!/^((?!chrome|android).)*safari/i.test(wb())}function mu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Os(e)&&(o=e.offsetWidth>0&&hu(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&hu(r.height)/e.offsetHeight||1);var i=Gl(e)?ms(e):window,c=i.visualViewport,d=!Z5()&&n,p=(r.left+(d&&c?c.offsetLeft:0))/o,h=(r.top+(d&&c?c.offsetTop:0))/s,m=r.width/o,g=r.height/s;return{width:m,height:g,top:h,right:p+m,bottom:h+g,left:p,x:p,y:h}}function Iy(e){var t=mu(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function e3(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_y(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fi(e){return ms(e).getComputedStyle(e)}function NB(e){return["table","td","th"].indexOf(Ma(e))>=0}function ul(e){return((Gl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Eg(e){return Ma(e)==="html"?e:e.assignedSlot||e.parentNode||(_y(e)?e.host:null)||ul(e)}function ek(e){return!Os(e)||fi(e).position==="fixed"?null:e.offsetParent}function $B(e){var t=/firefox/i.test(wb()),n=/Trident/i.test(wb());if(n&&Os(e)){var r=fi(e);if(r.position==="fixed")return null}var o=Eg(e);for(_y(o)&&(o=o.host);Os(o)&&["html","body"].indexOf(Ma(o))<0;){var s=fi(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Bf(e){for(var t=ms(e),n=ek(e);n&&NB(n)&&fi(n).position==="static";)n=ek(n);return n&&(Ma(n)==="html"||Ma(n)==="body"&&fi(n).position==="static")?t:n||$B(e)||t}function Py(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bd(e,t,n){return $l(e,rm(t,n))}function LB(e,t,n){var r=Bd(e,t,n);return r>n?n:r}function t3(){return{top:0,right:0,bottom:0,left:0}}function n3(e){return Object.assign({},t3(),e)}function r3(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var zB=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,n3(typeof t!="number"?t:r3(t,Ff))};function FB(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,c=Pa(n.placement),d=Py(c),p=[Ko,Ts].indexOf(c)>=0,h=p?"height":"width";if(!(!s||!i)){var m=zB(o.padding,n),g=Iy(s),b=d==="y"?qo:Ko,y=d==="y"?Ds:Ts,x=n.rects.reference[h]+n.rects.reference[d]-i[d]-n.rects.popper[h],w=i[d]-n.rects.reference[d],S=Bf(s),j=S?d==="y"?S.clientHeight||0:S.clientWidth||0:0,I=x/2-w/2,_=m[b],M=j-g[h]-m[y],E=j/2-g[h]/2+I,A=Bd(_,E,M),R=d;n.modifiersData[r]=(t={},t[R]=A,t.centerOffset=A-E,t)}}function BB(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||e3(t.elements.popper,o)&&(t.elements.arrow=o))}const HB={name:"arrow",enabled:!0,phase:"main",fn:FB,effect:BB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gu(e){return e.split("-")[1]}var WB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function VB(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:hu(n*o)/o||0,y:hu(r*o)/o||0}}function tk(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,c=e.position,d=e.gpuAcceleration,p=e.adaptive,h=e.roundOffsets,m=e.isFixed,g=i.x,b=g===void 0?0:g,y=i.y,x=y===void 0?0:y,w=typeof h=="function"?h({x:b,y:x}):{x:b,y:x};b=w.x,x=w.y;var S=i.hasOwnProperty("x"),j=i.hasOwnProperty("y"),I=Ko,_=qo,M=window;if(p){var E=Bf(n),A="clientHeight",R="clientWidth";if(E===ms(n)&&(E=ul(n),fi(E).position!=="static"&&c==="absolute"&&(A="scrollHeight",R="scrollWidth")),E=E,o===qo||(o===Ko||o===Ts)&&s===of){_=Ds;var D=m&&E===M&&M.visualViewport?M.visualViewport.height:E[A];x-=D-r.height,x*=d?1:-1}if(o===Ko||(o===qo||o===Ds)&&s===of){I=Ts;var O=m&&E===M&&M.visualViewport?M.visualViewport.width:E[R];b-=O-r.width,b*=d?1:-1}}var T=Object.assign({position:c},p&&WB),K=h===!0?VB({x:b,y:x},ms(n)):{x:b,y:x};if(b=K.x,x=K.y,d){var G;return Object.assign({},T,(G={},G[_]=j?"0":"",G[I]=S?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",G))}return Object.assign({},T,(t={},t[_]=j?x+"px":"",t[I]=S?b+"px":"",t.transform="",t))}function UB(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,c=n.roundOffsets,d=c===void 0?!0:c,p={placement:Pa(t.placement),variation:gu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tk(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tk(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const GB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:UB,data:{}};var Xp={passive:!0};function qB(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,c=i===void 0?!0:i,d=ms(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(h){h.addEventListener("scroll",n.update,Xp)}),c&&d.addEventListener("resize",n.update,Xp),function(){s&&p.forEach(function(h){h.removeEventListener("scroll",n.update,Xp)}),c&&d.removeEventListener("resize",n.update,Xp)}}const KB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qB,data:{}};var QB={left:"right",right:"left",bottom:"top",top:"bottom"};function Ph(e){return e.replace(/left|right|bottom|top/g,function(t){return QB[t]})}var XB={start:"end",end:"start"};function nk(e){return e.replace(/start|end/g,function(t){return XB[t]})}function Ey(e){var t=ms(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function My(e){return mu(ul(e)).left+Ey(e).scrollLeft}function YB(e,t){var n=ms(e),r=ul(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,c=0,d=0;if(o){s=o.width,i=o.height;var p=Z5();(p||!p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:s,height:i,x:c+My(e),y:d}}function JB(e){var t,n=ul(e),r=Ey(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=$l(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=$l(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+My(e),d=-r.scrollTop;return fi(o||n).direction==="rtl"&&(c+=$l(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:c,y:d}}function Oy(e){var t=fi(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function o3(e){return["html","body","#document"].indexOf(Ma(e))>=0?e.ownerDocument.body:Os(e)&&Oy(e)?e:o3(Eg(e))}function Hd(e,t){var n;t===void 0&&(t=[]);var r=o3(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=ms(r),i=o?[s].concat(s.visualViewport||[],Oy(r)?r:[]):r,c=t.concat(i);return o?c:c.concat(Hd(Eg(i)))}function Sb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ZB(e,t){var n=mu(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rk(e,t,n){return t===Y5?Sb(YB(e,n)):Gl(t)?ZB(t,n):Sb(JB(ul(e)))}function eH(e){var t=Hd(Eg(e)),n=["absolute","fixed"].indexOf(fi(e).position)>=0,r=n&&Os(e)?Bf(e):e;return Gl(r)?t.filter(function(o){return Gl(o)&&e3(o,r)&&Ma(o)!=="body"}):[]}function tH(e,t,n,r){var o=t==="clippingParents"?eH(e):[].concat(t),s=[].concat(o,[n]),i=s[0],c=s.reduce(function(d,p){var h=rk(e,p,r);return d.top=$l(h.top,d.top),d.right=rm(h.right,d.right),d.bottom=rm(h.bottom,d.bottom),d.left=$l(h.left,d.left),d},rk(e,i,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function s3(e){var t=e.reference,n=e.element,r=e.placement,o=r?Pa(r):null,s=r?gu(r):null,i=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,d;switch(o){case qo:d={x:i,y:t.y-n.height};break;case Ds:d={x:i,y:t.y+t.height};break;case Ts:d={x:t.x+t.width,y:c};break;case Ko:d={x:t.x-n.width,y:c};break;default:d={x:t.x,y:t.y}}var p=o?Py(o):null;if(p!=null){var h=p==="y"?"height":"width";switch(s){case pu:d[p]=d[p]-(t[h]/2-n[h]/2);break;case of:d[p]=d[p]+(t[h]/2-n[h]/2);break}}return d}function sf(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,c=n.boundary,d=c===void 0?CB:c,p=n.rootBoundary,h=p===void 0?Y5:p,m=n.elementContext,g=m===void 0?bd:m,b=n.altBoundary,y=b===void 0?!1:b,x=n.padding,w=x===void 0?0:x,S=n3(typeof w!="number"?w:r3(w,Ff)),j=g===bd?wB:bd,I=e.rects.popper,_=e.elements[y?j:g],M=tH(Gl(_)?_:_.contextElement||ul(e.elements.popper),d,h,i),E=mu(e.elements.reference),A=s3({reference:E,element:I,strategy:"absolute",placement:o}),R=Sb(Object.assign({},I,A)),D=g===bd?R:E,O={top:M.top-D.top+S.top,bottom:D.bottom-M.bottom+S.bottom,left:M.left-D.left+S.left,right:D.right-M.right+S.right},T=e.modifiersData.offset;if(g===bd&&T){var K=T[o];Object.keys(O).forEach(function(G){var Q=[Ts,Ds].indexOf(G)>=0?1:-1,Z=[qo,Ds].indexOf(G)>=0?"y":"x";O[G]+=K[Z]*Q})}return O}function nH(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,c=n.flipVariations,d=n.allowedAutoPlacements,p=d===void 0?J5:d,h=gu(r),m=h?c?ZS:ZS.filter(function(y){return gu(y)===h}):Ff,g=m.filter(function(y){return p.indexOf(y)>=0});g.length===0&&(g=m);var b=g.reduce(function(y,x){return y[x]=sf(e,{placement:x,boundary:o,rootBoundary:s,padding:i})[Pa(x)],y},{});return Object.keys(b).sort(function(y,x){return b[y]-b[x]})}function rH(e){if(Pa(e)===jy)return[];var t=Ph(e);return[nk(e),t,nk(t)]}function oH(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!0:i,d=n.fallbackPlacements,p=n.padding,h=n.boundary,m=n.rootBoundary,g=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,x=n.allowedAutoPlacements,w=t.options.placement,S=Pa(w),j=S===w,I=d||(j||!y?[Ph(w)]:rH(w)),_=[w].concat(I).reduce(function(X,$){return X.concat(Pa($)===jy?nH(t,{placement:$,boundary:h,rootBoundary:m,padding:p,flipVariations:y,allowedAutoPlacements:x}):$)},[]),M=t.rects.reference,E=t.rects.popper,A=new Map,R=!0,D=_[0],O=0;O<_.length;O++){var T=_[O],K=Pa(T),G=gu(T)===pu,Q=[qo,Ds].indexOf(K)>=0,Z=Q?"width":"height",te=sf(t,{placement:T,boundary:h,rootBoundary:m,altBoundary:g,padding:p}),V=Q?G?Ts:Ko:G?Ds:qo;M[Z]>E[Z]&&(V=Ph(V));var oe=Ph(V),ne=[];if(s&&ne.push(te[K]<=0),c&&ne.push(te[V]<=0,te[oe]<=0),ne.every(function(X){return X})){D=T,R=!1;break}A.set(T,ne)}if(R)for(var se=y?3:1,re=function($){var F=_.find(function(q){var pe=A.get(q);if(pe)return pe.slice(0,$).every(function(W){return W})});if(F)return D=F,"break"},ae=se;ae>0;ae--){var B=re(ae);if(B==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const sH={name:"flip",enabled:!0,phase:"main",fn:oH,requiresIfExists:["offset"],data:{_skip:!1}};function ok(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sk(e){return[qo,Ts,Ds,Ko].some(function(t){return e[t]>=0})}function aH(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=sf(t,{elementContext:"reference"}),c=sf(t,{altBoundary:!0}),d=ok(i,r),p=ok(c,o,s),h=sk(d),m=sk(p);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:p,isReferenceHidden:h,hasPopperEscaped:m},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const iH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:aH};function lH(e,t,n){var r=Pa(e),o=[Ko,qo].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],c=s[1];return i=i||0,c=(c||0)*o,[Ko,Ts].indexOf(r)>=0?{x:c,y:i}:{x:i,y:c}}function cH(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=J5.reduce(function(h,m){return h[m]=lH(m,t.rects,s),h},{}),c=i[t.placement],d=c.x,p=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=i}const uH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cH};function dH(e){var t=e.state,n=e.name;t.modifiersData[n]=s3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const fH={name:"popperOffsets",enabled:!0,phase:"read",fn:dH,data:{}};function pH(e){return e==="x"?"y":"x"}function hH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,c=i===void 0?!1:i,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,m=n.padding,g=n.tether,b=g===void 0?!0:g,y=n.tetherOffset,x=y===void 0?0:y,w=sf(t,{boundary:d,rootBoundary:p,padding:m,altBoundary:h}),S=Pa(t.placement),j=gu(t.placement),I=!j,_=Py(S),M=pH(_),E=t.modifiersData.popperOffsets,A=t.rects.reference,R=t.rects.popper,D=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,O=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,K={x:0,y:0};if(E){if(s){var G,Q=_==="y"?qo:Ko,Z=_==="y"?Ds:Ts,te=_==="y"?"height":"width",V=E[_],oe=V+w[Q],ne=V-w[Z],se=b?-R[te]/2:0,re=j===pu?A[te]:R[te],ae=j===pu?-R[te]:-A[te],B=t.elements.arrow,X=b&&B?Iy(B):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:t3(),F=$[Q],q=$[Z],pe=Bd(0,A[te],X[te]),W=I?A[te]/2-se-pe-F-O.mainAxis:re-pe-F-O.mainAxis,U=I?-A[te]/2+se+pe+q+O.mainAxis:ae+pe+q+O.mainAxis,ee=t.elements.arrow&&Bf(t.elements.arrow),Y=ee?_==="y"?ee.clientTop||0:ee.clientLeft||0:0,ge=(G=T==null?void 0:T[_])!=null?G:0,he=V+W-ge-Y,de=V+U-ge,_e=Bd(b?rm(oe,he):oe,V,b?$l(ne,de):ne);E[_]=_e,K[_]=_e-V}if(c){var Pe,ze=_==="x"?qo:Ko,ht=_==="x"?Ds:Ts,Je=E[M],qt=M==="y"?"height":"width",Pt=Je+w[ze],jt=Je-w[ht],Se=[qo,Ko].indexOf(S)!==-1,Fe=(Pe=T==null?void 0:T[M])!=null?Pe:0,it=Se?Pt:Je-A[qt]-R[qt]-Fe+O.altAxis,At=Se?Je+A[qt]+R[qt]-Fe-O.altAxis:jt,ke=b&&Se?LB(it,Je,At):Bd(b?it:Pt,Je,b?At:jt);E[M]=ke,K[M]=ke-Je}t.modifiersData[r]=K}}const mH={name:"preventOverflow",enabled:!0,phase:"main",fn:hH,requiresIfExists:["offset"]};function gH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vH(e){return e===ms(e)||!Os(e)?Ey(e):gH(e)}function bH(e){var t=e.getBoundingClientRect(),n=hu(t.width)/e.offsetWidth||1,r=hu(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xH(e,t,n){n===void 0&&(n=!1);var r=Os(t),o=Os(t)&&bH(t),s=ul(t),i=mu(e,o,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!n)&&((Ma(t)!=="body"||Oy(s))&&(c=vH(t)),Os(t)?(d=mu(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=My(s))),{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function yH(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(c){if(!n.has(c)){var d=t.get(c);d&&o(d)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function CH(e){var t=yH(e);return AB.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function wH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function SH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var ak={placement:"bottom",modifiers:[],strategy:"absolute"};function ik(){for(var e=arguments.length,t=new Array(e),n=0;n{}),I=l.useCallback(()=>{var O;!t||!y.current||!x.current||((O=j.current)==null||O.call(j),w.current=_H(y.current,x.current,{placement:S,modifiers:[vB,hB,pB,{...fB,enabled:!!g},{name:"eventListeners",...dB(i)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:c??[0,d]}},{name:"flip",enabled:!!p,options:{padding:8}},{name:"preventOverflow",enabled:!!m,options:{boundary:h}},...n??[]],strategy:o}),w.current.forceUpdate(),j.current=w.current.destroy)},[S,t,n,g,i,s,c,d,p,m,h,o]);l.useEffect(()=>()=>{var O;!y.current&&!x.current&&((O=w.current)==null||O.destroy(),w.current=null)},[]);const _=l.useCallback(O=>{y.current=O,I()},[I]),M=l.useCallback((O={},T=null)=>({...O,ref:xn(_,T)}),[_]),E=l.useCallback(O=>{x.current=O,I()},[I]),A=l.useCallback((O={},T=null)=>({...O,ref:xn(E,T),style:{...O.style,position:o,minWidth:g?void 0:"max-content",inset:"0 auto auto 0"}}),[o,E,g]),R=l.useCallback((O={},T=null)=>{const{size:K,shadowColor:G,bg:Q,style:Z,...te}=O;return{...te,ref:T,"data-popper-arrow":"",style:IH(O)}},[]),D=l.useCallback((O={},T=null)=>({...O,ref:T,"data-popper-arrow-inner":""}),[]);return{update(){var O;(O=w.current)==null||O.update()},forceUpdate(){var O;(O=w.current)==null||O.forceUpdate()},transformOrigin:qr.transformOrigin.varRef,referenceRef:_,popperRef:E,getPopperProps:A,getArrowProps:R,getArrowInnerProps:D,getReferenceProps:M}}function IH(e){const{size:t,shadowColor:n,bg:r,style:o}=e,s={...o,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),r&&(s["--popper-arrow-bg"]=r),s}function Ry(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,s=vr(n),i=vr(t),[c,d]=l.useState(e.defaultIsOpen||!1),p=r!==void 0?r:c,h=r!==void 0,m=l.useId(),g=o??`disclosure-${m}`,b=l.useCallback(()=>{h||d(!1),i==null||i()},[h,i]),y=l.useCallback(()=>{h||d(!0),s==null||s()},[h,s]),x=l.useCallback(()=>{p?b():y()},[p,y,b]);function w(j={}){return{...j,"aria-expanded":p,"aria-controls":g,onClick(I){var _;(_=j.onClick)==null||_.call(j,I),x()}}}function S(j={}){return{...j,hidden:!p,id:g}}return{isOpen:p,onOpen:y,onClose:b,onToggle:x,isControlled:h,getButtonProps:w,getDisclosureProps:S}}function PH(e){const{ref:t,handler:n,enabled:r=!0}=e,o=vr(n),i=l.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;l.useEffect(()=>{if(!r)return;const c=m=>{r1(m,t)&&(i.isPointerDown=!0)},d=m=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&r1(m,t)&&(i.isPointerDown=!1,o(m))},p=m=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&r1(m,t)&&(i.isPointerDown=!1,o(m))},h=a3(t.current);return h.addEventListener("mousedown",c,!0),h.addEventListener("mouseup",d,!0),h.addEventListener("touchstart",c,!0),h.addEventListener("touchend",p,!0),()=>{h.removeEventListener("mousedown",c,!0),h.removeEventListener("mouseup",d,!0),h.removeEventListener("touchstart",c,!0),h.removeEventListener("touchend",p,!0)}},[n,t,o,i,r])}function r1(e,t){var n;const r=e.target;return r&&!a3(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function a3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function i3(e){const{isOpen:t,ref:n}=e,[r,o]=l.useState(t),[s,i]=l.useState(!1);return l.useEffect(()=>{s||(o(t),i(!0))},[t,s,r]),Nl(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var d;const p=AF(n.current),h=new p.CustomEvent("animationend",{bubbles:!0});(d=n.current)==null||d.dispatchEvent(h)}}}function Dy(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[EH,MH,OH,AH]=ry(),[RH,Hf]=Un({strict:!1,name:"MenuContext"});function DH(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function l3(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function lk(e){return l3(e).activeElement===e}function TH(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:i,isOpen:c,defaultIsOpen:d,onClose:p,onOpen:h,placement:m="bottom-start",lazyBehavior:g="unmount",direction:b,computePositionOnMount:y=!1,...x}=e,w=l.useRef(null),S=l.useRef(null),j=OH(),I=l.useCallback(()=>{requestAnimationFrame(()=>{var B;(B=w.current)==null||B.focus({preventScroll:!1})})},[]),_=l.useCallback(()=>{const B=setTimeout(()=>{var X;if(o)(X=o.current)==null||X.focus();else{const $=j.firstEnabled();$&&G($.index)}});oe.current.add(B)},[j,o]),M=l.useCallback(()=>{const B=setTimeout(()=>{const X=j.lastEnabled();X&&G(X.index)});oe.current.add(B)},[j]),E=l.useCallback(()=>{h==null||h(),s?_():I()},[s,_,I,h]),{isOpen:A,onOpen:R,onClose:D,onToggle:O}=Ry({isOpen:c,defaultIsOpen:d,onClose:p,onOpen:E});PH({enabled:A&&r,ref:w,handler:B=>{var X;(X=S.current)!=null&&X.contains(B.target)||D()}});const T=Ay({...x,enabled:A||y,placement:m,direction:b}),[K,G]=l.useState(-1);wi(()=>{A||G(-1)},[A]),X5(w,{focusRef:S,visible:A,shouldFocus:!0});const Q=i3({isOpen:A,ref:w}),[Z,te]=DH(t,"menu-button","menu-list"),V=l.useCallback(()=>{R(),I()},[R,I]),oe=l.useRef(new Set([]));l.useEffect(()=>{const B=oe.current;return()=>{B.forEach(X=>clearTimeout(X)),B.clear()}},[]);const ne=l.useCallback(()=>{R(),_()},[_,R]),se=l.useCallback(()=>{R(),M()},[R,M]),re=l.useCallback(()=>{var B,X;const $=l3(w.current),F=(B=w.current)==null?void 0:B.contains($.activeElement);if(!(A&&!F))return;const pe=(X=j.item(K))==null?void 0:X.node;pe==null||pe.focus({preventScroll:!0})},[A,K,j]),ae=l.useRef(null);return{openAndFocusMenu:V,openAndFocusFirstItem:ne,openAndFocusLastItem:se,onTransitionEnd:re,unstable__animationState:Q,descendants:j,popper:T,buttonId:Z,menuId:te,forceUpdate:T.forceUpdate,orientation:"vertical",isOpen:A,onToggle:O,onOpen:R,onClose:D,menuRef:w,buttonRef:S,focusedIndex:K,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:G,isLazy:i,lazyBehavior:g,initialFocusRef:o,rafId:ae}}function NH(e={},t=null){const n=Hf(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:i}=n,c=l.useCallback(d=>{const p=d.key,m={Enter:s,ArrowDown:s,ArrowUp:i}[p];m&&(d.preventDefault(),d.stopPropagation(),m(d))},[s,i]);return{...e,ref:xn(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":Vt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:ot(e.onClick,r),onKeyDown:ot(e.onKeyDown,c)}}function kb(e){var t;return FH(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function $H(e={},t=null){const n=Hf();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:i,onClose:c,menuId:d,isLazy:p,lazyBehavior:h,unstable__animationState:m}=n,g=MH(),b=tB({preventDefault:S=>S.key!==" "&&kb(S.target)}),y=l.useCallback(S=>{if(!S.currentTarget.contains(S.target))return;const j=S.key,_={Tab:E=>E.preventDefault(),Escape:c,ArrowDown:()=>{const E=g.nextEnabled(r);E&&o(E.index)},ArrowUp:()=>{const E=g.prevEnabled(r);E&&o(E.index)}}[j];if(_){S.preventDefault(),_(S);return}const M=b(E=>{const A=nB(g.values(),E,R=>{var D,O;return(O=(D=R==null?void 0:R.node)==null?void 0:D.textContent)!=null?O:""},g.item(r));if(A){const R=g.indexOf(A.node);o(R)}});kb(S.target)&&M(S)},[g,r,b,c,o]),x=l.useRef(!1);i&&(x.current=!0);const w=Dy({wasSelected:x.current,enabled:p,mode:h,isSelected:m.present});return{...e,ref:xn(s,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:d,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:ot(e.onKeyDown,y)}}function LH(e={}){const{popper:t,isOpen:n}=Hf();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function zH(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:i,isDisabled:c,isFocusable:d,closeOnSelect:p,type:h,...m}=e,g=Hf(),{setFocusedIndex:b,focusedIndex:y,closeOnSelect:x,onClose:w,menuRef:S,isOpen:j,menuId:I,rafId:_}=g,M=l.useRef(null),E=`${I}-menuitem-${l.useId()}`,{index:A,register:R}=AH({disabled:c&&!d}),D=l.useCallback(V=>{n==null||n(V),!c&&b(A)},[b,A,c,n]),O=l.useCallback(V=>{r==null||r(V),M.current&&!lk(M.current)&&D(V)},[D,r]),T=l.useCallback(V=>{o==null||o(V),!c&&b(-1)},[b,c,o]),K=l.useCallback(V=>{s==null||s(V),kb(V.currentTarget)&&(p??x)&&w()},[w,s,x,p]),G=l.useCallback(V=>{i==null||i(V),b(A)},[b,i,A]),Q=A===y,Z=c&&!d;wi(()=>{if(j)return Q&&!Z&&M.current?(_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{var V;(V=M.current)==null||V.focus({preventScroll:!0}),_.current=null})):S.current&&!lk(S.current)&&S.current.focus({preventScroll:!0}),()=>{_.current&&cancelAnimationFrame(_.current)}},[Q,Z,S,j]);const te=Q5({onClick:K,onFocus:G,onMouseEnter:D,onMouseMove:O,onMouseLeave:T,ref:xn(R,M,t),isDisabled:c,isFocusable:d});return{...m,...te,type:h??te.type,id:E,role:"menuitem",tabIndex:Q?0:-1}}function FH(e){var t;if(!BH(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function BH(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[HH,Tu]=Un({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Mg=e=>{const{children:t}=e,n=no("Menu",e),r=lr(e),{direction:o}=kf(),{descendants:s,...i}=TH({...r,direction:o}),c=l.useMemo(()=>i,[i]),{isOpen:d,onClose:p,forceUpdate:h}=c;return a.jsx(EH,{value:s,children:a.jsx(RH,{value:c,children:a.jsx(HH,{value:n,children:Mx(t,{isOpen:d,onClose:p,forceUpdate:h})})})})};Mg.displayName="Menu";var c3=De((e,t)=>{const n=Tu();return a.jsx(Ae.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});c3.displayName="MenuCommand";var WH=De((e,t)=>{const{type:n,...r}=e,o=Tu(),s=r.as||n?n??void 0:"button",i=l.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return a.jsx(Ae.button,{ref:t,type:s,...r,__css:i})}),u3=e=>{const{className:t,children:n,...r}=e,o=Tu(),s=l.Children.only(n),i=l.isValidElement(s)?l.cloneElement(s,{focusable:"false","aria-hidden":!0,className:kt("chakra-menu__icon",s.props.className)}):null,c=kt("chakra-menu__icon-wrapper",t);return a.jsx(Ae.span,{className:c,...r,__css:o.icon,children:i})};u3.displayName="MenuIcon";var Kn=De((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:i,...c}=e,d=zH(c,t),h=n||o?a.jsx("span",{style:{pointerEvents:"none",flex:1},children:i}):i;return a.jsxs(WH,{...d,className:kt("chakra-menu__menuitem",d.className),children:[n&&a.jsx(u3,{fontSize:"0.8em",marginEnd:r,children:n}),h,o&&a.jsx(c3,{marginStart:s,children:o})]})});Kn.displayName="MenuItem";var VH={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},UH=Ae(Ar.div),ql=De(function(t,n){var r,o;const{rootProps:s,motionProps:i,...c}=t,{isOpen:d,onTransitionEnd:p,unstable__animationState:h}=Hf(),m=$H(c,n),g=LH(s),b=Tu();return a.jsx(Ae.div,{...g,__css:{zIndex:(o=t.zIndex)!=null?o:(r=b.list)==null?void 0:r.zIndex},children:a.jsx(UH,{variants:VH,initial:!1,animate:d?"enter":"exit",__css:{outline:0,...b.list},...i,className:kt("chakra-menu__menu-list",m.className),...m,onUpdate:p,onAnimationComplete:pg(h.onComplete,m.onAnimationComplete)})})});ql.displayName="MenuList";var af=De((e,t)=>{const{title:n,children:r,className:o,...s}=e,i=kt("chakra-menu__group__title",o),c=Tu();return a.jsxs("div",{ref:t,className:"chakra-menu__group",role:"group",children:[n&&a.jsx(Ae.p,{className:i,...s,__css:c.groupTitle,children:n}),r]})});af.displayName="MenuGroup";var GH=De((e,t)=>{const n=Tu();return a.jsx(Ae.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),Og=De((e,t)=>{const{children:n,as:r,...o}=e,s=NH(o,t),i=r||GH;return a.jsx(i,{...s,className:kt("chakra-menu__menu-button",e.className),children:a.jsx(Ae.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});Og.displayName="MenuButton";var qH={slideInBottom:{...Md,custom:{offsetY:16,reverse:!0}},slideInRight:{...Md,custom:{offsetX:16,reverse:!0}},slideInTop:{...Md,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...Md,custom:{offsetX:-16,reverse:!0}},scale:{...BP,custom:{initialScale:.95,reverse:!0}},none:{}},KH=Ae(Ar.section),QH=e=>qH[e||"none"],d3=l.forwardRef((e,t)=>{const{preset:n,motionProps:r=QH(n),...o}=e;return a.jsx(KH,{ref:t,...r,...o})});d3.displayName="ModalTransition";var XH=Object.defineProperty,YH=(e,t,n)=>t in e?XH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JH=(e,t,n)=>(YH(e,typeof t!="symbol"?t+"":t,n),n),ZH=class{constructor(){JH(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},jb=new ZH;function f3(e,t){const[n,r]=l.useState(0);return l.useEffect(()=>{const o=e.current;if(o){if(t){const s=jb.add(o);r(s)}return()=>{jb.remove(o),r(0)}}},[t,e]),n}var eW=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ic=new WeakMap,Yp=new WeakMap,Jp={},o1=0,p3=function(e){return e&&(e.host||p3(e.parentNode))},tW=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=p3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nW=function(e,t,n,r){var o=tW(t,Array.isArray(e)?e:[e]);Jp[n]||(Jp[n]=new WeakMap);var s=Jp[n],i=[],c=new Set,d=new Set(o),p=function(m){!m||c.has(m)||(c.add(m),p(m.parentNode))};o.forEach(p);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))h(g);else{var b=g.getAttribute(r),y=b!==null&&b!=="false",x=(Ic.get(g)||0)+1,w=(s.get(g)||0)+1;Ic.set(g,x),s.set(g,w),i.push(g),x===1&&y&&Yp.set(g,!0),w===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}})};return h(t),c.clear(),o1++,function(){i.forEach(function(m){var g=Ic.get(m)-1,b=s.get(m)-1;Ic.set(m,g),s.set(m,b),g||(Yp.has(m)||m.removeAttribute(r),Yp.delete(m)),b||m.removeAttribute(n)}),o1--,o1||(Ic=new WeakMap,Ic=new WeakMap,Yp=new WeakMap,Jp={})}},rW=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||eW(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),nW(r,o,n,"aria-hidden")):function(){return null}};function oW(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:i=!0,onOverlayClick:c,onEsc:d}=e,p=l.useRef(null),h=l.useRef(null),[m,g,b]=aW(r,"chakra-modal","chakra-modal--header","chakra-modal--body");sW(p,t&&i);const y=f3(p,t),x=l.useRef(null),w=l.useCallback(D=>{x.current=D.target},[]),S=l.useCallback(D=>{D.key==="Escape"&&(D.stopPropagation(),s&&(n==null||n()),d==null||d())},[s,n,d]),[j,I]=l.useState(!1),[_,M]=l.useState(!1),E=l.useCallback((D={},O=null)=>({role:"dialog",...D,ref:xn(O,p),id:m,tabIndex:-1,"aria-modal":!0,"aria-labelledby":j?g:void 0,"aria-describedby":_?b:void 0,onClick:ot(D.onClick,T=>T.stopPropagation())}),[b,_,m,g,j]),A=l.useCallback(D=>{D.stopPropagation(),x.current===D.target&&jb.isTopModal(p.current)&&(o&&(n==null||n()),c==null||c())},[n,o,c]),R=l.useCallback((D={},O=null)=>({...D,ref:xn(O,h),onClick:ot(D.onClick,A),onKeyDown:ot(D.onKeyDown,S),onMouseDown:ot(D.onMouseDown,w)}),[S,w,A]);return{isOpen:t,onClose:n,headerId:g,bodyId:b,setBodyMounted:M,setHeaderMounted:I,dialogRef:p,overlayRef:h,getDialogProps:E,getDialogContainerProps:R,index:y}}function sW(e,t){const n=e.current;l.useEffect(()=>{if(!(!e.current||!t))return rW(e.current)},[t,e,n])}function aW(e,...t){const n=l.useId(),r=e||n;return l.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[iW,Nu]=Un({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[lW,Kl]=Un({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),vu=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b,onCloseComplete:y}=t,x=no("Modal",t),S={...oW(t),autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:c,returnFocusOnClose:d,blockScrollOnMount:p,allowPinchZoom:h,preserveScrollBarGap:m,motionPreset:g,lockFocusAcrossFrames:b};return a.jsx(lW,{value:S,children:a.jsx(iW,{value:x,children:a.jsx(So,{onExitComplete:y,children:S.isOpen&&a.jsx(Au,{...n,children:r})})})})};vu.displayName="Modal";var Eh="right-scroll-bar-position",Mh="width-before-scroll-bar",cW="with-scroll-bars-hidden",uW="--removed-body-scroll-bar-size",h3=u5(),s1=function(){},Ag=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:s1,onWheelCapture:s1,onTouchMoveCapture:s1}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,d=e.className,p=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,b=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,S=w===void 0?"div":w,j=e.gapMode,I=i5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=g,M=a5([n,t]),E=wa(wa({},I),o);return l.createElement(l.Fragment,null,h&&l.createElement(_,{sideCar:h3,removeScrollBar:p,shards:m,noIsolation:b,inert:y,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:j}),i?l.cloneElement(l.Children.only(c),wa(wa({},E),{ref:M})):l.createElement(S,wa({},E,{className:d,ref:M}),c))});Ag.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ag.classNames={fullWidth:Mh,zeroRight:Eh};var ck,dW=function(){if(ck)return ck;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dW();return t&&e.setAttribute("nonce",t),e}function pW(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hW(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mW=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fW())&&(pW(t,n),hW(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gW=function(){var e=mW();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},m3=function(){var e=gW(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},vW={left:0,top:0,right:0,gap:0},a1=function(e){return parseInt(e||"",10)||0},bW=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[a1(n),a1(r),a1(o)]},xW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vW;var t=bW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yW=m3(),CW=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),` - .`.concat(cW,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(c,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(s,`px; - padding-right: `).concat(i,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(c,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(Eh,` { - right: `).concat(c,"px ").concat(r,`; - } - - .`).concat(Mh,` { - margin-right: `).concat(c,"px ").concat(r,`; - } - - .`).concat(Eh," .").concat(Eh,` { - right: 0 `).concat(r,`; - } - - .`).concat(Mh," .").concat(Mh,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(uW,": ").concat(c,`px; - } -`)},wW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=l.useMemo(function(){return xW(o)},[o]);return l.createElement(yW,{styles:CW(s,!t,o,n?"":"!important")})},_b=!1;if(typeof window<"u")try{var Zp=Object.defineProperty({},"passive",{get:function(){return _b=!0,!0}});window.addEventListener("test",Zp,Zp),window.removeEventListener("test",Zp,Zp)}catch{_b=!1}var Pc=_b?{passive:!1}:!1,SW=function(e){return e.tagName==="TEXTAREA"},g3=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!SW(e)&&n[t]==="visible")},kW=function(e){return g3(e,"overflowY")},jW=function(e){return g3(e,"overflowX")},uk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=v3(e,r);if(o){var s=b3(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_W=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},IW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},v3=function(e,t){return e==="v"?kW(t):jW(t)},b3=function(e,t){return e==="v"?_W(t):IW(t)},PW=function(e,t){return e==="h"&&t==="rtl"?-1:1},EW=function(e,t,n,r,o){var s=PW(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,d=t.contains(c),p=!1,h=i>0,m=0,g=0;do{var b=b3(e,c),y=b[0],x=b[1],w=b[2],S=x-w-s*y;(y||S)&&v3(e,c)&&(m+=S,g+=y),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&(o&&Math.abs(m)<1||!o&&i>m)||!h&&(o&&Math.abs(g)<1||!o&&-i>g))&&(p=!0),p},eh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dk=function(e){return[e.deltaX,e.deltaY]},fk=function(e){return e&&"current"in e?e.current:e},MW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OW=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},AW=0,Ec=[];function RW(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(AW++)[0],s=l.useState(m3)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=Dz([e.lockRef.current],(e.shards||[]).map(fk),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(x,w){if("touches"in x&&x.touches.length===2)return!i.current.allowPinchZoom;var S=eh(x),j=n.current,I="deltaX"in x?x.deltaX:j[0]-S[0],_="deltaY"in x?x.deltaY:j[1]-S[1],M,E=x.target,A=Math.abs(I)>Math.abs(_)?"h":"v";if("touches"in x&&A==="h"&&E.type==="range")return!1;var R=uk(A,E);if(!R)return!0;if(R?M=A:(M=A==="v"?"h":"v",R=uk(A,E)),!R)return!1;if(!r.current&&"changedTouches"in x&&(I||_)&&(r.current=M),!M)return!0;var D=r.current||M;return EW(D,w,x,D==="h"?I:_,!0)},[]),d=l.useCallback(function(x){var w=x;if(!(!Ec.length||Ec[Ec.length-1]!==s)){var S="deltaY"in w?dk(w):eh(w),j=t.current.filter(function(M){return M.name===w.type&&(M.target===w.target||w.target===M.shadowParent)&&MW(M.delta,S)})[0];if(j&&j.should){w.cancelable&&w.preventDefault();return}if(!j){var I=(i.current.shards||[]).map(fk).filter(Boolean).filter(function(M){return M.contains(w.target)}),_=I.length>0?c(w,I[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),p=l.useCallback(function(x,w,S,j){var I={name:x,delta:w,target:S,should:j,shadowParent:DW(S)};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(_){return _!==I})},1)},[]),h=l.useCallback(function(x){n.current=eh(x),r.current=void 0},[]),m=l.useCallback(function(x){p(x.type,dk(x),x.target,c(x,e.lockRef.current))},[]),g=l.useCallback(function(x){p(x.type,eh(x),x.target,c(x,e.lockRef.current))},[]);l.useEffect(function(){return Ec.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Pc),document.addEventListener("touchmove",d,Pc),document.addEventListener("touchstart",h,Pc),function(){Ec=Ec.filter(function(x){return x!==s}),document.removeEventListener("wheel",d,Pc),document.removeEventListener("touchmove",d,Pc),document.removeEventListener("touchstart",h,Pc)}},[]);var b=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:OW(o)}):null,b?l.createElement(wW,{gapMode:e.gapMode}):null)}function DW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const TW=Tz(h3,RW);var x3=l.forwardRef(function(e,t){return l.createElement(Ag,wa({},e,{ref:t,sideCar:TW}))});x3.classNames=Ag.classNames;const NW=x3;function $W(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:c,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=Kl(),[g,b]=gD();l.useEffect(()=>{!g&&b&&setTimeout(b)},[g,b]);const y=f3(r,m);return a.jsx(B5,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(NW,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var bu=De((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:c,getDialogContainerProps:d}=Kl(),p=c(i,t),h=d(o),m=kt("chakra-modal__content",n),g=Nu(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:x}=Kl();return a.jsx($W,{children:a.jsx(Ae.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(d3,{preset:x,motionProps:s,className:m,...p,__css:b,children:r})})})});bu.displayName="ModalContent";function Wf(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(vu,{...n,initialFocusRef:t})}var Vf=De((e,t)=>a.jsx(bu,{ref:t,role:"alertdialog",...e})),pi=De((e,t)=>{const{className:n,...r}=e,o=kt("chakra-modal__footer",n),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...Nu().footer};return a.jsx(Ae.footer,{ref:t,...r,__css:i,className:o})});pi.displayName="ModalFooter";var Oa=De((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=Kl();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=kt("chakra-modal__header",n),d={flex:0,...Nu().header};return a.jsx(Ae.header,{ref:t,className:i,id:o,...r,__css:d})});Oa.displayName="ModalHeader";var LW=Ae(Ar.div),Aa=De((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,i=kt("chakra-modal__overlay",n),d={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Nu().overlay},{motionPreset:p}=Kl(),m=o||(p==="none"?{}:FP);return a.jsx(LW,{...m,__css:d,ref:t,className:i,...s})});Aa.displayName="ModalOverlay";var Ra=De((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=Kl();l.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=kt("chakra-modal__body",n),c=Nu();return a.jsx(Ae.div,{ref:t,className:i,id:o,...r,__css:c.body})});Ra.displayName="ModalBody";var Rg=De((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=Kl(),i=kt("chakra-modal__close-btn",r),c=Nu();return a.jsx(II,{ref:t,__css:c.closeButton,className:i,onClick:ot(n,d=>{d.stopPropagation(),s()}),...o})});Rg.displayName="ModalCloseButton";var zW=e=>a.jsx(Gr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),FW=e=>a.jsx(Gr,{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function pk(e,t,n,r){l.useEffect(()=>{var o;if(!e.current||!r)return;const s=(o=e.current.ownerDocument.defaultView)!=null?o:window,i=Array.isArray(t)?t:[t],c=new s.MutationObserver(d=>{for(const p of d)p.type==="attributes"&&p.attributeName&&i.includes(p.attributeName)&&n(p)});return c.observe(e.current,{attributes:!0,attributeFilter:i}),()=>c.disconnect()})}function BW(e,t){const n=vr(e);l.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var HW=50,hk=300;function WW(e,t){const[n,r]=l.useState(!1),[o,s]=l.useState(null),[i,c]=l.useState(!0),d=l.useRef(null),p=()=>clearTimeout(d.current);BW(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?HW:null);const h=l.useCallback(()=>{i&&e(),d.current=setTimeout(()=>{c(!1),r(!0),s("increment")},hk)},[e,i]),m=l.useCallback(()=>{i&&t(),d.current=setTimeout(()=>{c(!1),r(!0),s("decrement")},hk)},[t,i]),g=l.useCallback(()=>{c(!0),r(!1),p()},[]);return l.useEffect(()=>()=>p(),[]),{up:h,down:m,stop:g,isSpinning:n}}var VW=/^[Ee0-9+\-.]$/;function UW(e){return VW.test(e)}function GW(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function qW(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:i=1,isReadOnly:c,isDisabled:d,isRequired:p,isInvalid:h,pattern:m="[0-9]*(.[0-9]+)?",inputMode:g="decimal",allowMouseWheel:b,id:y,onChange:x,precision:w,name:S,"aria-describedby":j,"aria-label":I,"aria-labelledby":_,onFocus:M,onBlur:E,onInvalid:A,getAriaValueText:R,isValidCharacter:D,format:O,parse:T,...K}=e,G=vr(M),Q=vr(E),Z=vr(A),te=vr(D??UW),V=vr(R),oe=hz(e),{update:ne,increment:se,decrement:re}=oe,[ae,B]=l.useState(!1),X=!(c||d),$=l.useRef(null),F=l.useRef(null),q=l.useRef(null),pe=l.useRef(null),W=l.useCallback(ke=>ke.split("").filter(te).join(""),[te]),U=l.useCallback(ke=>{var lt;return(lt=T==null?void 0:T(ke))!=null?lt:ke},[T]),ee=l.useCallback(ke=>{var lt;return((lt=O==null?void 0:O(ke))!=null?lt:ke).toString()},[O]);wi(()=>{(oe.valueAsNumber>s||oe.valueAsNumber{if(!$.current)return;if($.current.value!=oe.value){const lt=U($.current.value);oe.setValue(W(lt))}},[U,W]);const Y=l.useCallback((ke=i)=>{X&&se(ke)},[se,X,i]),ge=l.useCallback((ke=i)=>{X&&re(ke)},[re,X,i]),he=WW(Y,ge);pk(q,"disabled",he.stop,he.isSpinning),pk(pe,"disabled",he.stop,he.isSpinning);const de=l.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Rt=U(ke.currentTarget.value);ne(W(Rt)),F.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[ne,W,U]),_e=l.useCallback(ke=>{var lt,Rt,zt;G==null||G(ke),F.current&&(ke.target.selectionStart=(Rt=F.current.start)!=null?Rt:(lt=ke.currentTarget.value)==null?void 0:lt.length,ke.currentTarget.selectionEnd=(zt=F.current.end)!=null?zt:ke.currentTarget.selectionStart)},[G]),Pe=l.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;GW(ke,te)||ke.preventDefault();const lt=ze(ke)*i,Rt=ke.key,Re={ArrowUp:()=>Y(lt),ArrowDown:()=>ge(lt),Home:()=>ne(o),End:()=>ne(s)}[Rt];Re&&(ke.preventDefault(),Re(ke))},[te,i,Y,ge,ne,o,s]),ze=ke=>{let lt=1;return(ke.metaKey||ke.ctrlKey)&&(lt=.1),ke.shiftKey&&(lt=10),lt},ht=l.useMemo(()=>{const ke=V==null?void 0:V(oe.value);if(ke!=null)return ke;const lt=oe.value.toString();return lt||void 0},[oe.value,V]),Je=l.useCallback(()=>{let ke=oe.value;if(oe.value==="")return;/^[eE]/.test(oe.value.toString())?oe.setValue(""):(oe.valueAsNumbers&&(ke=s),oe.cast(ke))},[oe,s,o]),qt=l.useCallback(()=>{B(!1),n&&Je()},[n,B,Je]),Pt=l.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=$.current)==null||ke.focus()})},[t]),jt=l.useCallback(ke=>{ke.preventDefault(),he.up(),Pt()},[Pt,he]),Se=l.useCallback(ke=>{ke.preventDefault(),he.down(),Pt()},[Pt,he]);Nl(()=>$.current,"wheel",ke=>{var lt,Rt;const Re=((Rt=(lt=$.current)==null?void 0:lt.ownerDocument)!=null?Rt:document).activeElement===$.current;if(!b||!Re)return;ke.preventDefault();const Qe=ze(ke)*i,En=Math.sign(ke.deltaY);En===-1?Y(Qe):En===1&&ge(Qe)},{passive:!1});const Fe=l.useCallback((ke={},lt=null)=>{const Rt=d||r&&oe.isAtMax;return{...ke,ref:xn(lt,q),role:"button",tabIndex:-1,onPointerDown:ot(ke.onPointerDown,zt=>{zt.button!==0||Rt||jt(zt)}),onPointerLeave:ot(ke.onPointerLeave,he.stop),onPointerUp:ot(ke.onPointerUp,he.stop),disabled:Rt,"aria-disabled":Ms(Rt)}},[oe.isAtMax,r,jt,he.stop,d]),it=l.useCallback((ke={},lt=null)=>{const Rt=d||r&&oe.isAtMin;return{...ke,ref:xn(lt,pe),role:"button",tabIndex:-1,onPointerDown:ot(ke.onPointerDown,zt=>{zt.button!==0||Rt||Se(zt)}),onPointerLeave:ot(ke.onPointerLeave,he.stop),onPointerUp:ot(ke.onPointerUp,he.stop),disabled:Rt,"aria-disabled":Ms(Rt)}},[oe.isAtMin,r,Se,he.stop,d]),At=l.useCallback((ke={},lt=null)=>{var Rt,zt,Re,Qe;return{name:S,inputMode:g,type:"text",pattern:m,"aria-labelledby":_,"aria-label":I,"aria-describedby":j,id:y,disabled:d,...ke,readOnly:(Rt=ke.readOnly)!=null?Rt:c,"aria-readonly":(zt=ke.readOnly)!=null?zt:c,"aria-required":(Re=ke.required)!=null?Re:p,required:(Qe=ke.required)!=null?Qe:p,ref:xn($,lt),value:ee(oe.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(oe.valueAsNumber)?void 0:oe.valueAsNumber,"aria-invalid":Ms(h??oe.isOutOfRange),"aria-valuetext":ht,autoComplete:"off",autoCorrect:"off",onChange:ot(ke.onChange,de),onKeyDown:ot(ke.onKeyDown,Pe),onFocus:ot(ke.onFocus,_e,()=>B(!0)),onBlur:ot(ke.onBlur,Q,qt)}},[S,g,m,_,I,ee,j,y,d,p,c,h,oe.value,oe.valueAsNumber,oe.isOutOfRange,o,s,ht,de,Pe,_e,Q,qt]);return{value:ee(oe.value),valueAsNumber:oe.valueAsNumber,isFocused:ae,isDisabled:d,isReadOnly:c,getIncrementButtonProps:Fe,getDecrementButtonProps:it,getInputProps:At,htmlProps:K}}var[KW,Dg]=Un({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[QW,Ty]=Un({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Tg=De(function(t,n){const r=no("NumberInput",t),o=lr(t),s=iy(o),{htmlProps:i,...c}=qW(s),d=l.useMemo(()=>c,[c]);return a.jsx(QW,{value:d,children:a.jsx(KW,{value:r,children:a.jsx(Ae.div,{...i,ref:n,className:kt("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});Tg.displayName="NumberInput";var Ng=De(function(t,n){const r=Dg();return a.jsx(Ae.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});Ng.displayName="NumberInputStepper";var $g=De(function(t,n){const{getInputProps:r}=Ty(),o=r(t,n),s=Dg();return a.jsx(Ae.input,{...o,className:kt("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});$g.displayName="NumberInputField";var y3=Ae("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Lg=De(function(t,n){var r;const o=Dg(),{getDecrementButtonProps:s}=Ty(),i=s(t,n);return a.jsx(y3,{...i,__css:o.stepper,children:(r=t.children)!=null?r:a.jsx(zW,{})})});Lg.displayName="NumberDecrementStepper";var zg=De(function(t,n){var r;const{getIncrementButtonProps:o}=Ty(),s=o(t,n),i=Dg();return a.jsx(y3,{...s,__css:i.stepper,children:(r=t.children)!=null?r:a.jsx(FW,{})})});zg.displayName="NumberIncrementStepper";var[XW,ec]=Un({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[YW,Fg]=Un({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `});function Bg(e){const t=l.Children.only(e.children),{getTriggerProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}Bg.displayName="PopoverTrigger";var Mc={click:"click",hover:"hover"};function JW(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:i=!0,arrowSize:c,arrowShadowColor:d,trigger:p=Mc.click,openDelay:h=200,closeDelay:m=200,isLazy:g,lazyBehavior:b="unmount",computePositionOnMount:y,...x}=e,{isOpen:w,onClose:S,onOpen:j,onToggle:I}=Ry(e),_=l.useRef(null),M=l.useRef(null),E=l.useRef(null),A=l.useRef(!1),R=l.useRef(!1);w&&(R.current=!0);const[D,O]=l.useState(!1),[T,K]=l.useState(!1),G=l.useId(),Q=o??G,[Z,te,V,oe]=["popover-trigger","popover-content","popover-header","popover-body"].map(de=>`${de}-${Q}`),{referenceRef:ne,getArrowProps:se,getPopperProps:re,getArrowInnerProps:ae,forceUpdate:B}=Ay({...x,enabled:w||!!y}),X=i3({isOpen:w,ref:E});e5({enabled:w,ref:M}),X5(E,{focusRef:M,visible:w,shouldFocus:s&&p===Mc.click}),aB(E,{focusRef:r,visible:w,shouldFocus:i&&p===Mc.click});const $=Dy({wasSelected:R.current,enabled:g,mode:b,isSelected:X.present}),F=l.useCallback((de={},_e=null)=>{const Pe={...de,style:{...de.style,transformOrigin:qr.transformOrigin.varRef,[qr.arrowSize.var]:c?`${c}px`:void 0,[qr.arrowShadowColor.var]:d},ref:xn(E,_e),children:$?de.children:null,id:te,tabIndex:-1,role:"dialog",onKeyDown:ot(de.onKeyDown,ze=>{n&&ze.key==="Escape"&&S()}),onBlur:ot(de.onBlur,ze=>{const ht=mk(ze),Je=i1(E.current,ht),qt=i1(M.current,ht);w&&t&&(!Je&&!qt)&&S()}),"aria-labelledby":D?V:void 0,"aria-describedby":T?oe:void 0};return p===Mc.hover&&(Pe.role="tooltip",Pe.onMouseEnter=ot(de.onMouseEnter,()=>{A.current=!0}),Pe.onMouseLeave=ot(de.onMouseLeave,ze=>{ze.nativeEvent.relatedTarget!==null&&(A.current=!1,setTimeout(()=>S(),m))})),Pe},[$,te,D,V,T,oe,p,n,S,w,t,m,d,c]),q=l.useCallback((de={},_e=null)=>re({...de,style:{visibility:w?"visible":"hidden",...de.style}},_e),[w,re]),pe=l.useCallback((de,_e=null)=>({...de,ref:xn(_e,_,ne)}),[_,ne]),W=l.useRef(),U=l.useRef(),ee=l.useCallback(de=>{_.current==null&&ne(de)},[ne]),Y=l.useCallback((de={},_e=null)=>{const Pe={...de,ref:xn(M,_e,ee),id:Z,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":te};return p===Mc.click&&(Pe.onClick=ot(de.onClick,I)),p===Mc.hover&&(Pe.onFocus=ot(de.onFocus,()=>{W.current===void 0&&j()}),Pe.onBlur=ot(de.onBlur,ze=>{const ht=mk(ze),Je=!i1(E.current,ht);w&&t&&Je&&S()}),Pe.onKeyDown=ot(de.onKeyDown,ze=>{ze.key==="Escape"&&S()}),Pe.onMouseEnter=ot(de.onMouseEnter,()=>{A.current=!0,W.current=window.setTimeout(()=>j(),h)}),Pe.onMouseLeave=ot(de.onMouseLeave,()=>{A.current=!1,W.current&&(clearTimeout(W.current),W.current=void 0),U.current=window.setTimeout(()=>{A.current===!1&&S()},m)})),Pe},[Z,w,te,p,ee,I,j,t,S,h,m]);l.useEffect(()=>()=>{W.current&&clearTimeout(W.current),U.current&&clearTimeout(U.current)},[]);const ge=l.useCallback((de={},_e=null)=>({...de,id:V,ref:xn(_e,Pe=>{O(!!Pe)})}),[V]),he=l.useCallback((de={},_e=null)=>({...de,id:oe,ref:xn(_e,Pe=>{K(!!Pe)})}),[oe]);return{forceUpdate:B,isOpen:w,onAnimationComplete:X.onComplete,onClose:S,getAnchorProps:pe,getArrowProps:se,getArrowInnerProps:ae,getPopoverPositionerProps:q,getPopoverProps:F,getTriggerProps:Y,getHeaderProps:ge,getBodyProps:he}}function i1(e,t){return e===t||(e==null?void 0:e.contains(t))}function mk(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function Uf(e){const t=no("Popover",e),{children:n,...r}=lr(e),o=kf(),s=JW({...r,direction:o.direction});return a.jsx(XW,{value:s,children:a.jsx(YW,{value:t,children:Mx(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}Uf.displayName="Popover";function C3(e){const t=l.Children.only(e.children),{getAnchorProps:n}=ec();return l.cloneElement(t,n(t.props,t.ref))}C3.displayName="PopoverAnchor";var l1=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function w3(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:s,boxShadow:i,shadowColor:c}=e,{getArrowProps:d,getArrowInnerProps:p}=ec(),h=Fg(),m=(t=n??r)!=null?t:o,g=s??i;return a.jsx(Ae.div,{...d(),className:"chakra-popover__arrow-positioner",children:a.jsx(Ae.div,{className:kt("chakra-popover__arrow",e.className),...p(e),__css:{"--popper-arrow-shadow-color":l1("colors",c),"--popper-arrow-bg":l1("colors",m),"--popper-arrow-shadow":l1("shadows",g),...h.arrow}})})}w3.displayName="PopoverArrow";var Hg=De(function(t,n){const{getBodyProps:r}=ec(),o=Fg();return a.jsx(Ae.div,{...r(t,n),className:kt("chakra-popover__body",t.className),__css:o.body})});Hg.displayName="PopoverBody";var S3=De(function(t,n){const{onClose:r}=ec(),o=Fg();return a.jsx(II,{size:"sm",onClick:r,className:kt("chakra-popover__close-btn",t.className),__css:o.closeButton,ref:n,...t})});S3.displayName="PopoverCloseButton";function ZW(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var eV={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},tV=Ae(Ar.section),k3=De(function(t,n){const{variants:r=eV,...o}=t,{isOpen:s}=ec();return a.jsx(tV,{ref:n,variants:ZW(r),initial:!1,animate:s?"enter":"exit",...o})});k3.displayName="PopoverTransition";var Gf=De(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:i,getPopoverPositionerProps:c,onAnimationComplete:d}=ec(),p=Fg(),h={position:"relative",display:"flex",flexDirection:"column",...p.content};return a.jsx(Ae.div,{...c(r),__css:p.popper,className:"chakra-popover__popper",children:a.jsx(k3,{...o,...i(s,n),onAnimationComplete:pg(d,s.onAnimationComplete),className:kt("chakra-popover__content",t.className),__css:h})})});Gf.displayName="PopoverContent";var Ib=e=>a.jsx(Ae.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});Ib.displayName="Circle";function nV(e,t,n){return(e-t)*100/(n-t)}var rV=Si({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),oV=Si({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),sV=Si({"0%":{left:"-40%"},"100%":{left:"100%"}}),aV=Si({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function j3(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:s,isIndeterminate:i,role:c="progressbar"}=e,d=nV(t,n,r);return{bind:{"data-indeterminate":i?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":i?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof s=="function"?s(t,d):o})(),role:c},percent:d,value:t}}var _3=e=>{const{size:t,isIndeterminate:n,...r}=e;return a.jsx(Ae.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${oV} 2s linear infinite`:void 0},...r})};_3.displayName="Shape";var Pb=De((e,t)=>{var n;const{size:r="48px",max:o=100,min:s=0,valueText:i,getValueText:c,value:d,capIsRound:p,children:h,thickness:m="10px",color:g="#0078d4",trackColor:b="#edebe9",isIndeterminate:y,...x}=e,w=j3({min:s,max:o,value:d,valueText:i,getValueText:c,isIndeterminate:y}),S=y?void 0:((n=w.percent)!=null?n:0)*2.64,j=S==null?void 0:`${S} ${264-S}`,I=y?{css:{animation:`${rV} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:j,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},_={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:r};return a.jsxs(Ae.div,{ref:t,className:"chakra-progress",...w.bind,...x,__css:_,children:[a.jsxs(_3,{size:r,isIndeterminate:y,children:[a.jsx(Ib,{stroke:b,strokeWidth:m,className:"chakra-progress__track"}),a.jsx(Ib,{stroke:g,strokeWidth:m,className:"chakra-progress__indicator",strokeLinecap:p?"round":void 0,opacity:w.value===0&&!y?0:void 0,...I})]}),h]})});Pb.displayName="CircularProgress";var[iV,lV]=Un({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),cV=De((e,t)=>{const{min:n,max:r,value:o,isIndeterminate:s,role:i,...c}=e,d=j3({value:o,min:n,max:r,isIndeterminate:s,role:i}),h={height:"100%",...lV().filledTrack};return a.jsx(Ae.div,{ref:t,style:{width:`${d.percent}%`,...c.style},...d.bind,...c,__css:h})}),I3=De((e,t)=>{var n;const{value:r,min:o=0,max:s=100,hasStripe:i,isAnimated:c,children:d,borderRadius:p,isIndeterminate:h,"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,title:y,role:x,...w}=lr(e),S=no("Progress",e),j=p??((n=S.track)==null?void 0:n.borderRadius),I={animation:`${aV} 1s linear infinite`},E={...!h&&i&&c&&I,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${sV} 1s ease infinite normal none running`}},A={overflow:"hidden",position:"relative",...S.track};return a.jsx(Ae.div,{ref:t,borderRadius:j,__css:A,...w,children:a.jsxs(iV,{value:S,children:[a.jsx(cV,{"aria-label":m,"aria-labelledby":g,"aria-valuetext":b,min:o,max:s,value:r,isIndeterminate:h,css:E,borderRadius:j,title:y,role:x}),d]})})});I3.displayName="Progress";function uV(e){return e&&Q1(e)&&Q1(e.target)}function dV(e={}){const{onChange:t,value:n,defaultValue:r,name:o,isDisabled:s,isFocusable:i,isNative:c,...d}=e,[p,h]=l.useState(r||""),m=typeof n<"u",g=m?n:p,b=l.useRef(null),y=l.useCallback(()=>{const M=b.current;if(!M)return;let E="input:not(:disabled):checked";const A=M.querySelector(E);if(A){A.focus();return}E="input:not(:disabled)";const R=M.querySelector(E);R==null||R.focus()},[]),w=`radio-${l.useId()}`,S=o||w,j=l.useCallback(M=>{const E=uV(M)?M.target.value:M;m||h(E),t==null||t(String(E))},[t,m]),I=l.useCallback((M={},E=null)=>({...M,ref:xn(E,b),role:"radiogroup"}),[]),_=l.useCallback((M={},E=null)=>({...M,ref:E,name:S,[c?"checked":"isChecked"]:g!=null?M.value===g:void 0,onChange(R){j(R)},"data-radiogroup":!0}),[c,S,j,g]);return{getRootProps:I,getRadioProps:_,name:S,ref:b,focus:y,setValue:h,value:g,onChange:j,isDisabled:s,isFocusable:i,htmlProps:d}}var[fV,P3]=Un({name:"RadioGroupContext",strict:!1}),om=De((e,t)=>{const{colorScheme:n,size:r,variant:o,children:s,className:i,isDisabled:c,isFocusable:d,...p}=e,{value:h,onChange:m,getRootProps:g,name:b,htmlProps:y}=dV(p),x=l.useMemo(()=>({name:b,size:r,onChange:m,colorScheme:n,value:h,variant:o,isDisabled:c,isFocusable:d}),[b,r,m,n,h,o,c,d]);return a.jsx(fV,{value:x,children:a.jsx(Ae.div,{...g(y,t),className:kt("chakra-radio-group",i),children:s})})});om.displayName="RadioGroup";var pV={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function hV(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:o,isReadOnly:s,isRequired:i,onChange:c,isInvalid:d,name:p,value:h,id:m,"data-radiogroup":g,"aria-describedby":b,...y}=e,x=`radio-${l.useId()}`,w=Rf(),j=!!P3()||!!g;let _=!!w&&!j?w.id:x;_=m??_;const M=o??(w==null?void 0:w.isDisabled),E=s??(w==null?void 0:w.isReadOnly),A=i??(w==null?void 0:w.isRequired),R=d??(w==null?void 0:w.isInvalid),[D,O]=l.useState(!1),[T,K]=l.useState(!1),[G,Q]=l.useState(!1),[Z,te]=l.useState(!1),[V,oe]=l.useState(!!t),ne=typeof n<"u",se=ne?n:V;l.useEffect(()=>qP(O),[]);const re=l.useCallback(ee=>{if(E||M){ee.preventDefault();return}ne||oe(ee.target.checked),c==null||c(ee)},[ne,M,E,c]),ae=l.useCallback(ee=>{ee.key===" "&&te(!0)},[te]),B=l.useCallback(ee=>{ee.key===" "&&te(!1)},[te]),X=l.useCallback((ee={},Y=null)=>({...ee,ref:Y,"data-active":Vt(Z),"data-hover":Vt(G),"data-disabled":Vt(M),"data-invalid":Vt(R),"data-checked":Vt(se),"data-focus":Vt(T),"data-focus-visible":Vt(T&&D),"data-readonly":Vt(E),"aria-hidden":!0,onMouseDown:ot(ee.onMouseDown,()=>te(!0)),onMouseUp:ot(ee.onMouseUp,()=>te(!1)),onMouseEnter:ot(ee.onMouseEnter,()=>Q(!0)),onMouseLeave:ot(ee.onMouseLeave,()=>Q(!1))}),[Z,G,M,R,se,T,E,D]),{onFocus:$,onBlur:F}=w??{},q=l.useCallback((ee={},Y=null)=>{const ge=M&&!r;return{...ee,id:_,ref:Y,type:"radio",name:p,value:h,onChange:ot(ee.onChange,re),onBlur:ot(F,ee.onBlur,()=>K(!1)),onFocus:ot($,ee.onFocus,()=>K(!0)),onKeyDown:ot(ee.onKeyDown,ae),onKeyUp:ot(ee.onKeyUp,B),checked:se,disabled:ge,readOnly:E,required:A,"aria-invalid":Ms(R),"aria-disabled":Ms(ge),"aria-required":Ms(A),"data-readonly":Vt(E),"aria-describedby":b,style:pV}},[M,r,_,p,h,re,F,$,ae,B,se,E,A,R,b]);return{state:{isInvalid:R,isFocused:T,isChecked:se,isActive:Z,isHovered:G,isDisabled:M,isReadOnly:E,isRequired:A},getCheckboxProps:X,getRadioProps:X,getInputProps:q,getLabelProps:(ee={},Y=null)=>({...ee,ref:Y,onMouseDown:ot(ee.onMouseDown,mV),"data-disabled":Vt(M),"data-checked":Vt(se),"data-invalid":Vt(R)}),getRootProps:(ee,Y=null)=>({...ee,ref:Y,"data-disabled":Vt(M),"data-checked":Vt(se),"data-invalid":Vt(R)}),htmlProps:y}}function mV(e){e.preventDefault(),e.stopPropagation()}function gV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var ei=De((e,t)=>{var n;const r=P3(),{onChange:o,value:s}=e,i=no("Radio",{...r,...e}),c=lr(e),{spacing:d="0.5rem",children:p,isDisabled:h=r==null?void 0:r.isDisabled,isFocusable:m=r==null?void 0:r.isFocusable,inputProps:g,...b}=c;let y=e.isChecked;(r==null?void 0:r.value)!=null&&s!=null&&(y=r.value===s);let x=o;r!=null&&r.onChange&&s!=null&&(x=pg(r.onChange,o));const w=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:S,getCheckboxProps:j,getLabelProps:I,getRootProps:_,htmlProps:M}=hV({...b,isChecked:y,isFocusable:m,isDisabled:h,onChange:x,name:w}),[E,A]=gV(M,PI),R=j(A),D=S(g,t),O=I(),T=Object.assign({},E,_()),K={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...i.container},G={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...i.control},Q={userSelect:"none",marginStart:d,...i.label};return a.jsxs(Ae.label,{className:"chakra-radio",...T,__css:K,children:[a.jsx("input",{className:"chakra-radio__input",...D}),a.jsx(Ae.span,{className:"chakra-radio__control",...R,__css:G}),p&&a.jsx(Ae.span,{className:"chakra-radio__label",...O,__css:Q,children:p})]})});ei.displayName="Radio";var E3=De(function(t,n){const{children:r,placeholder:o,className:s,...i}=t;return a.jsxs(Ae.select,{...i,ref:n,className:kt("chakra-select",s),children:[o&&a.jsx("option",{value:"",children:o}),r]})});E3.displayName="SelectField";function vV(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}var M3=De((e,t)=>{var n;const r=no("Select",e),{rootProps:o,placeholder:s,icon:i,color:c,height:d,h:p,minH:h,minHeight:m,iconColor:g,iconSize:b,...y}=lr(e),[x,w]=vV(y,PI),S=ay(w),j={width:"100%",height:"fit-content",position:"relative",color:c},I={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return a.jsxs(Ae.div,{className:"chakra-select__wrapper",__css:j,...x,...o,children:[a.jsx(E3,{ref:t,height:p??d,minH:h??m,placeholder:s,...S,__css:I,children:e.children}),a.jsx(O3,{"data-disabled":Vt(S.disabled),...(g||c)&&{color:g||c},__css:r.icon,...b&&{fontSize:b},children:i})]})});M3.displayName="Select";var bV=e=>a.jsx("svg",{viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xV=Ae("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),O3=e=>{const{children:t=a.jsx(bV,{}),...n}=e,r=l.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return a.jsx(xV,{...n,className:"chakra-select__icon-wrapper",children:l.isValidElement(t)?r:null})};O3.displayName="SelectIcon";function yV(){const e=l.useRef(!0);return l.useEffect(()=>{e.current=!1},[]),e.current}function CV(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}var wV=Ae("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),Eb=EI("skeleton-start-color"),Mb=EI("skeleton-end-color"),SV=Si({from:{opacity:0},to:{opacity:1}}),kV=Si({from:{borderColor:Eb.reference,background:Eb.reference},to:{borderColor:Mb.reference,background:Mb.reference}}),Wg=De((e,t)=>{const n={...e,fadeDuration:typeof e.fadeDuration=="number"?e.fadeDuration:.4,speed:typeof e.speed=="number"?e.speed:.8},r=cl("Skeleton",n),o=yV(),{startColor:s="",endColor:i="",isLoaded:c,fadeDuration:d,speed:p,className:h,fitContent:m,...g}=lr(n),[b,y]=ea("colors",[s,i]),x=CV(c),w=kt("chakra-skeleton",h),S={...b&&{[Eb.variable]:b},...y&&{[Mb.variable]:y}};if(c){const j=o||x?"none":`${SV} ${d}s`;return a.jsx(Ae.div,{ref:t,className:w,__css:{animation:j},...g})}return a.jsx(wV,{ref:t,className:w,...g,__css:{width:m?"fit-content":void 0,...r,...S,_dark:{...r._dark,...S},animation:`${p}s linear infinite alternate ${kV}`}})});Wg.displayName="Skeleton";var js=e=>e?"":void 0,su=e=>e?!0:void 0,dl=(...e)=>e.filter(Boolean).join(" ");function au(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function jV(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Od(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Oh={width:0,height:0},th=e=>e||Oh;function A3(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,s=x=>{var w;const S=(w=r[x])!=null?w:Oh;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Od({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${S.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${S.width/2}px)`}})}},i=t==="vertical"?r.reduce((x,w)=>th(x).height>th(w).height?x:w,Oh):r.reduce((x,w)=>th(x).width>th(w).width?x:w,Oh),c={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Od({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},d={position:"absolute",...Od({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},p=n.length===1,h=[0,o?100-n[0]:n[0]],m=p?h:n;let g=m[0];!p&&o&&(g=100-g);const b=Math.abs(m[m.length-1]-m[0]),y={...d,...Od({orientation:t,vertical:o?{height:`${b}%`,top:`${g}%`}:{height:`${b}%`,bottom:`${g}%`},horizontal:o?{width:`${b}%`,right:`${g}%`}:{width:`${b}%`,left:`${g}%`}})};return{trackStyle:d,innerTrackStyle:y,rootStyle:c,getThumbStyle:s}}function R3(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function _V(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function IV(e){const t=EV(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function D3(e){return!!e.touches}function PV(e){return D3(e)&&e.touches.length>1}function EV(e){var t;return(t=e.view)!=null?t:window}function MV(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function OV(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function T3(e,t="page"){return D3(e)?MV(e,t):OV(e,t)}function AV(e){return t=>{const n=IV(t);(!n||n&&t.button===0)&&e(t)}}function RV(e,t=!1){function n(o){e(o,{point:T3(o)})}return t?AV(n):n}function Ah(e,t,n,r){return _V(e,t,RV(n,t==="pointerdown"),r)}var DV=Object.defineProperty,TV=(e,t,n)=>t in e?DV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qs=(e,t,n)=>(TV(e,typeof t!="symbol"?t+"":t,n),n),NV=class{constructor(e,t,n){Qs(this,"history",[]),Qs(this,"startEvent",null),Qs(this,"lastEvent",null),Qs(this,"lastEventInfo",null),Qs(this,"handlers",{}),Qs(this,"removeListeners",()=>{}),Qs(this,"threshold",3),Qs(this,"win"),Qs(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const c=c1(this.lastEventInfo,this.history),d=this.startEvent!==null,p=FV(c.offset,{x:0,y:0})>=this.threshold;if(!d&&!p)return;const{timestamp:h}=AS();this.history.push({...c.point,timestamp:h});const{onStart:m,onMove:g}=this.handlers;d||(m==null||m(this.lastEvent,c),this.startEvent=this.lastEvent),g==null||g(this.lastEvent,c)}),Qs(this,"onPointerMove",(c,d)=>{this.lastEvent=c,this.lastEventInfo=d,sL.update(this.updatePoint,!0)}),Qs(this,"onPointerUp",(c,d)=>{const p=c1(d,this.history),{onEnd:h,onSessionEnd:m}=this.handlers;m==null||m(c,p),this.end(),!(!h||!this.startEvent)&&(h==null||h(c,p))});var r;if(this.win=(r=e.view)!=null?r:window,PV(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:T3(e)},{timestamp:s}=AS();this.history=[{...o.point,timestamp:s}];const{onSessionStart:i}=t;i==null||i(e,c1(o,this.history)),this.removeListeners=zV(Ah(this.win,"pointermove",this.onPointerMove),Ah(this.win,"pointerup",this.onPointerUp),Ah(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),aL.update(this.updatePoint)}};function gk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function c1(e,t){return{point:e.point,delta:gk(e.point,t[t.length-1]),offset:gk(e.point,t[0]),velocity:LV(t,.1)}}var $V=e=>e*1e3;function LV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>$V(t)));)n--;if(!r)return{x:0,y:0};const s=(o.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function zV(...e){return t=>e.reduce((n,r)=>r(n),t)}function u1(e,t){return Math.abs(e-t)}function vk(e){return"x"in e&&"y"in e}function FV(e,t){if(typeof e=="number"&&typeof t=="number")return u1(e,t);if(vk(e)&&vk(t)){const n=u1(e.x,t.x),r=u1(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function N3(e){const t=l.useRef(null);return t.current=e,t}function $3(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:i,threshold:c}=t,d=!!(n||r||o||s||i),p=l.useRef(null),h=N3({onSessionStart:s,onSessionEnd:i,onStart:r,onMove:n,onEnd(m,g){p.current=null,o==null||o(m,g)}});l.useEffect(()=>{var m;(m=p.current)==null||m.updateHandlers(h.current)}),l.useEffect(()=>{const m=e.current;if(!m||!d)return;function g(b){p.current=new NV(b,h.current,c)}return Ah(m,"pointerdown",g)},[e,d,h,c]),l.useEffect(()=>()=>{var m;(m=p.current)==null||m.end(),p.current=null},[])}function BV(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[s]=o;let i,c;if("borderBoxSize"in s){const d=s.borderBoxSize,p=Array.isArray(d)?d[0]:d;i=p.inlineSize,c=p.blockSize}else i=e.offsetWidth,c=e.offsetHeight;t({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var HV=globalThis!=null&&globalThis.document?l.useLayoutEffect:l.useEffect;function WV(e,t){var n,r;if(!e||!e.parentElement)return;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,s=new o.MutationObserver(()=>{t()});return s.observe(e.parentElement,{childList:!0}),()=>{s.disconnect()}}function L3({getNodes:e,observeMutation:t=!0}){const[n,r]=l.useState([]),[o,s]=l.useState(0);return HV(()=>{const i=e(),c=i.map((d,p)=>BV(d,h=>{r(m=>[...m.slice(0,p),h,...m.slice(p+1)])}));if(t){const d=i[0];c.push(WV(d,()=>{s(p=>p+1)}))}return()=>{c.forEach(d=>{d==null||d()})}},[o]),n}function VV(e){return typeof e=="object"&&e!==null&&"current"in e}function UV(e){const[t]=L3({observeMutation:!1,getNodes(){return[VV(e)?e.current:e]}});return t}function GV(e){const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:s,isReversed:i,direction:c="ltr",orientation:d="horizontal",id:p,isDisabled:h,isReadOnly:m,onChangeStart:g,onChangeEnd:b,step:y=1,getAriaValueText:x,"aria-valuetext":w,"aria-label":S,"aria-labelledby":j,name:I,focusThumbOnChange:_=!0,minStepsBetweenThumbs:M=0,...E}=e,A=vr(g),R=vr(b),D=vr(x),O=R3({isReversed:i,direction:c,orientation:d}),[T,K]=Of({value:o,defaultValue:s??[25,75],onChange:r});if(!Array.isArray(T))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof T}\``);const[G,Q]=l.useState(!1),[Z,te]=l.useState(!1),[V,oe]=l.useState(-1),ne=!(h||m),se=l.useRef(T),re=T.map(Te=>tu(Te,t,n)),ae=M*y,B=qV(re,t,n,ae),X=l.useRef({eventSource:null,value:[],valueBounds:[]});X.current.value=re,X.current.valueBounds=B;const $=re.map(Te=>n-Te+t),q=(O?$:re).map(Te=>Zh(Te,t,n)),pe=d==="vertical",W=l.useRef(null),U=l.useRef(null),ee=L3({getNodes(){const Te=U.current,ct=Te==null?void 0:Te.querySelectorAll("[role=slider]");return ct?Array.from(ct):[]}}),Y=l.useId(),he=jV(p??Y),de=l.useCallback(Te=>{var ct,ft;if(!W.current)return;X.current.eventSource="pointer";const tt=W.current.getBoundingClientRect(),{clientX:en,clientY:ar}=(ft=(ct=Te.touches)==null?void 0:ct[0])!=null?ft:Te,vn=pe?tt.bottom-ar:en-tt.left,fn=pe?tt.height:tt.width;let Tr=vn/fn;return O&&(Tr=1-Tr),QP(Tr,t,n)},[pe,O,n,t]),_e=(n-t)/10,Pe=y||(n-t)/100,ze=l.useMemo(()=>({setValueAtIndex(Te,ct){if(!ne)return;const ft=X.current.valueBounds[Te];ct=parseFloat(gb(ct,ft.min,Pe)),ct=tu(ct,ft.min,ft.max);const tt=[...X.current.value];tt[Te]=ct,K(tt)},setActiveIndex:oe,stepUp(Te,ct=Pe){const ft=X.current.value[Te],tt=O?ft-ct:ft+ct;ze.setValueAtIndex(Te,tt)},stepDown(Te,ct=Pe){const ft=X.current.value[Te],tt=O?ft+ct:ft-ct;ze.setValueAtIndex(Te,tt)},reset(){K(se.current)}}),[Pe,O,K,ne]),ht=l.useCallback(Te=>{const ct=Te.key,tt={ArrowRight:()=>ze.stepUp(V),ArrowUp:()=>ze.stepUp(V),ArrowLeft:()=>ze.stepDown(V),ArrowDown:()=>ze.stepDown(V),PageUp:()=>ze.stepUp(V,_e),PageDown:()=>ze.stepDown(V,_e),Home:()=>{const{min:en}=B[V];ze.setValueAtIndex(V,en)},End:()=>{const{max:en}=B[V];ze.setValueAtIndex(V,en)}}[ct];tt&&(Te.preventDefault(),Te.stopPropagation(),tt(Te),X.current.eventSource="keyboard")},[ze,V,_e,B]),{getThumbStyle:Je,rootStyle:qt,trackStyle:Pt,innerTrackStyle:jt}=l.useMemo(()=>A3({isReversed:O,orientation:d,thumbRects:ee,thumbPercents:q}),[O,d,q,ee]),Se=l.useCallback(Te=>{var ct;const ft=Te??V;if(ft!==-1&&_){const tt=he.getThumb(ft),en=(ct=U.current)==null?void 0:ct.ownerDocument.getElementById(tt);en&&setTimeout(()=>en.focus())}},[_,V,he]);wi(()=>{X.current.eventSource==="keyboard"&&(R==null||R(X.current.value))},[re,R]);const Fe=Te=>{const ct=de(Te)||0,ft=X.current.value.map(fn=>Math.abs(fn-ct)),tt=Math.min(...ft);let en=ft.indexOf(tt);const ar=ft.filter(fn=>fn===tt);ar.length>1&&ct>X.current.value[en]&&(en=en+ar.length-1),oe(en),ze.setValueAtIndex(en,ct),Se(en)},it=Te=>{if(V==-1)return;const ct=de(Te)||0;oe(V),ze.setValueAtIndex(V,ct),Se(V)};$3(U,{onPanSessionStart(Te){ne&&(Q(!0),Fe(Te),A==null||A(X.current.value))},onPanSessionEnd(){ne&&(Q(!1),R==null||R(X.current.value))},onPan(Te){ne&&it(Te)}});const At=l.useCallback((Te={},ct=null)=>({...Te,...E,id:he.root,ref:xn(ct,U),tabIndex:-1,"aria-disabled":su(h),"data-focused":js(Z),style:{...Te.style,...qt}}),[E,h,Z,qt,he]),ke=l.useCallback((Te={},ct=null)=>({...Te,ref:xn(ct,W),id:he.track,"data-disabled":js(h),style:{...Te.style,...Pt}}),[h,Pt,he]),lt=l.useCallback((Te={},ct=null)=>({...Te,ref:ct,id:he.innerTrack,style:{...Te.style,...jt}}),[jt,he]),Rt=l.useCallback((Te,ct=null)=>{var ft;const{index:tt,...en}=Te,ar=re[tt];if(ar==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${re.length}`);const vn=B[tt];return{...en,ref:ct,role:"slider",tabIndex:ne?0:void 0,id:he.getThumb(tt),"data-active":js(G&&V===tt),"aria-valuetext":(ft=D==null?void 0:D(ar))!=null?ft:w==null?void 0:w[tt],"aria-valuemin":vn.min,"aria-valuemax":vn.max,"aria-valuenow":ar,"aria-orientation":d,"aria-disabled":su(h),"aria-readonly":su(m),"aria-label":S==null?void 0:S[tt],"aria-labelledby":S!=null&&S[tt]||j==null?void 0:j[tt],style:{...Te.style,...Je(tt)},onKeyDown:au(Te.onKeyDown,ht),onFocus:au(Te.onFocus,()=>{te(!0),oe(tt)}),onBlur:au(Te.onBlur,()=>{te(!1),oe(-1)})}},[he,re,B,ne,G,V,D,w,d,h,m,S,j,Je,ht,te]),zt=l.useCallback((Te={},ct=null)=>({...Te,ref:ct,id:he.output,htmlFor:re.map((ft,tt)=>he.getThumb(tt)).join(" "),"aria-live":"off"}),[he,re]),Re=l.useCallback((Te,ct=null)=>{const{value:ft,...tt}=Te,en=!(ftn),ar=ft>=re[0]&&ft<=re[re.length-1];let vn=Zh(ft,t,n);vn=O?100-vn:vn;const fn={position:"absolute",pointerEvents:"none",...Od({orientation:d,vertical:{bottom:`${vn}%`},horizontal:{left:`${vn}%`}})};return{...tt,ref:ct,id:he.getMarker(Te.value),role:"presentation","aria-hidden":!0,"data-disabled":js(h),"data-invalid":js(!en),"data-highlighted":js(ar),style:{...Te.style,...fn}}},[h,O,n,t,d,re,he]),Qe=l.useCallback((Te,ct=null)=>{const{index:ft,...tt}=Te;return{...tt,ref:ct,id:he.getInput(ft),type:"hidden",value:re[ft],name:Array.isArray(I)?I[ft]:`${I}-${ft}`}},[I,re,he]);return{state:{value:re,isFocused:Z,isDragging:G,getThumbPercent:Te=>q[Te],getThumbMinValue:Te=>B[Te].min,getThumbMaxValue:Te=>B[Te].max},actions:ze,getRootProps:At,getTrackProps:ke,getInnerTrackProps:lt,getThumbProps:Rt,getMarkerProps:Re,getInputProps:Qe,getOutputProps:zt}}function qV(e,t,n,r){return e.map((o,s)=>{const i=s===0?t:e[s-1]+r,c=s===e.length-1?n:e[s+1]-r;return{min:i,max:c}})}var[KV,Vg]=Un({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[QV,Ug]=Un({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),z3=De(function(t,n){const r={orientation:"horizontal",...t},o=no("Slider",r),s=lr(r),{direction:i}=kf();s.direction=i;const{getRootProps:c,...d}=GV(s),p=l.useMemo(()=>({...d,name:r.name}),[d,r.name]);return a.jsx(KV,{value:p,children:a.jsx(QV,{value:o,children:a.jsx(Ae.div,{...c({},n),className:"chakra-slider",__css:o.container,children:r.children})})})});z3.displayName="RangeSlider";var Ob=De(function(t,n){const{getThumbProps:r,getInputProps:o,name:s}=Vg(),i=Ug(),c=r(t,n);return a.jsxs(Ae.div,{...c,className:dl("chakra-slider__thumb",t.className),__css:i.thumb,children:[c.children,s&&a.jsx("input",{...o({index:t.index})})]})});Ob.displayName="RangeSliderThumb";var F3=De(function(t,n){const{getTrackProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:dl("chakra-slider__track",t.className),__css:o.track,"data-testid":"chakra-range-slider-track"})});F3.displayName="RangeSliderTrack";var B3=De(function(t,n){const{getInnerTrackProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:"chakra-slider__filled-track",__css:o.filledTrack})});B3.displayName="RangeSliderFilledTrack";var Rh=De(function(t,n){const{getMarkerProps:r}=Vg(),o=Ug(),s=r(t,n);return a.jsx(Ae.div,{...s,className:dl("chakra-slider__marker",t.className),__css:o.mark})});Rh.displayName="RangeSliderMark";function XV(e){var t;const{min:n=0,max:r=100,onChange:o,value:s,defaultValue:i,isReversed:c,direction:d="ltr",orientation:p="horizontal",id:h,isDisabled:m,isReadOnly:g,onChangeStart:b,onChangeEnd:y,step:x=1,getAriaValueText:w,"aria-valuetext":S,"aria-label":j,"aria-labelledby":I,name:_,focusThumbOnChange:M=!0,...E}=e,A=vr(b),R=vr(y),D=vr(w),O=R3({isReversed:c,direction:d,orientation:p}),[T,K]=Of({value:s,defaultValue:i??JV(n,r),onChange:o}),[G,Q]=l.useState(!1),[Z,te]=l.useState(!1),V=!(m||g),oe=(r-n)/10,ne=x||(r-n)/100,se=tu(T,n,r),re=r-se+n,B=Zh(O?re:se,n,r),X=p==="vertical",$=N3({min:n,max:r,step:x,isDisabled:m,value:se,isInteractive:V,isReversed:O,isVertical:X,eventSource:null,focusThumbOnChange:M,orientation:p}),F=l.useRef(null),q=l.useRef(null),pe=l.useRef(null),W=l.useId(),U=h??W,[ee,Y]=[`slider-thumb-${U}`,`slider-track-${U}`],ge=l.useCallback(Re=>{var Qe,En;if(!F.current)return;const Te=$.current;Te.eventSource="pointer";const ct=F.current.getBoundingClientRect(),{clientX:ft,clientY:tt}=(En=(Qe=Re.touches)==null?void 0:Qe[0])!=null?En:Re,en=X?ct.bottom-tt:ft-ct.left,ar=X?ct.height:ct.width;let vn=en/ar;O&&(vn=1-vn);let fn=QP(vn,Te.min,Te.max);return Te.step&&(fn=parseFloat(gb(fn,Te.min,Te.step))),fn=tu(fn,Te.min,Te.max),fn},[X,O,$]),he=l.useCallback(Re=>{const Qe=$.current;Qe.isInteractive&&(Re=parseFloat(gb(Re,Qe.min,ne)),Re=tu(Re,Qe.min,Qe.max),K(Re))},[ne,K,$]),de=l.useMemo(()=>({stepUp(Re=ne){const Qe=O?se-Re:se+Re;he(Qe)},stepDown(Re=ne){const Qe=O?se+Re:se-Re;he(Qe)},reset(){he(i||0)},stepTo(Re){he(Re)}}),[he,O,se,ne,i]),_e=l.useCallback(Re=>{const Qe=$.current,Te={ArrowRight:()=>de.stepUp(),ArrowUp:()=>de.stepUp(),ArrowLeft:()=>de.stepDown(),ArrowDown:()=>de.stepDown(),PageUp:()=>de.stepUp(oe),PageDown:()=>de.stepDown(oe),Home:()=>he(Qe.min),End:()=>he(Qe.max)}[Re.key];Te&&(Re.preventDefault(),Re.stopPropagation(),Te(Re),Qe.eventSource="keyboard")},[de,he,oe,$]),Pe=(t=D==null?void 0:D(se))!=null?t:S,ze=UV(q),{getThumbStyle:ht,rootStyle:Je,trackStyle:qt,innerTrackStyle:Pt}=l.useMemo(()=>{const Re=$.current,Qe=ze??{width:0,height:0};return A3({isReversed:O,orientation:Re.orientation,thumbRects:[Qe],thumbPercents:[B]})},[O,ze,B,$]),jt=l.useCallback(()=>{$.current.focusThumbOnChange&&setTimeout(()=>{var Qe;return(Qe=q.current)==null?void 0:Qe.focus()})},[$]);wi(()=>{const Re=$.current;jt(),Re.eventSource==="keyboard"&&(R==null||R(Re.value))},[se,R]);function Se(Re){const Qe=ge(Re);Qe!=null&&Qe!==$.current.value&&K(Qe)}$3(pe,{onPanSessionStart(Re){const Qe=$.current;Qe.isInteractive&&(Q(!0),jt(),Se(Re),A==null||A(Qe.value))},onPanSessionEnd(){const Re=$.current;Re.isInteractive&&(Q(!1),R==null||R(Re.value))},onPan(Re){$.current.isInteractive&&Se(Re)}});const Fe=l.useCallback((Re={},Qe=null)=>({...Re,...E,ref:xn(Qe,pe),tabIndex:-1,"aria-disabled":su(m),"data-focused":js(Z),style:{...Re.style,...Je}}),[E,m,Z,Je]),it=l.useCallback((Re={},Qe=null)=>({...Re,ref:xn(Qe,F),id:Y,"data-disabled":js(m),style:{...Re.style,...qt}}),[m,Y,qt]),At=l.useCallback((Re={},Qe=null)=>({...Re,ref:Qe,style:{...Re.style,...Pt}}),[Pt]),ke=l.useCallback((Re={},Qe=null)=>({...Re,ref:xn(Qe,q),role:"slider",tabIndex:V?0:void 0,id:ee,"data-active":js(G),"aria-valuetext":Pe,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":se,"aria-orientation":p,"aria-disabled":su(m),"aria-readonly":su(g),"aria-label":j,"aria-labelledby":j?void 0:I,style:{...Re.style,...ht(0)},onKeyDown:au(Re.onKeyDown,_e),onFocus:au(Re.onFocus,()=>te(!0)),onBlur:au(Re.onBlur,()=>te(!1))}),[V,ee,G,Pe,n,r,se,p,m,g,j,I,ht,_e]),lt=l.useCallback((Re,Qe=null)=>{const En=!(Re.valuer),Te=se>=Re.value,ct=Zh(Re.value,n,r),ft={position:"absolute",pointerEvents:"none",...YV({orientation:p,vertical:{bottom:O?`${100-ct}%`:`${ct}%`},horizontal:{left:O?`${100-ct}%`:`${ct}%`}})};return{...Re,ref:Qe,role:"presentation","aria-hidden":!0,"data-disabled":js(m),"data-invalid":js(!En),"data-highlighted":js(Te),style:{...Re.style,...ft}}},[m,O,r,n,p,se]),Rt=l.useCallback((Re={},Qe=null)=>({...Re,ref:Qe,type:"hidden",value:se,name:_}),[_,se]);return{state:{value:se,isFocused:Z,isDragging:G},actions:de,getRootProps:Fe,getTrackProps:it,getInnerTrackProps:At,getThumbProps:ke,getMarkerProps:lt,getInputProps:Rt}}function YV(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function JV(e,t){return t"}),[eU,qg]=Un({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),Ny=De((e,t)=>{var n;const r={...e,orientation:(n=e==null?void 0:e.orientation)!=null?n:"horizontal"},o=no("Slider",r),s=lr(r),{direction:i}=kf();s.direction=i;const{getInputProps:c,getRootProps:d,...p}=XV(s),h=d(),m=c({},t);return a.jsx(ZV,{value:p,children:a.jsx(eU,{value:o,children:a.jsxs(Ae.div,{...h,className:dl("chakra-slider",r.className),__css:o.container,children:[r.children,a.jsx("input",{...m})]})})})});Ny.displayName="Slider";var $y=De((e,t)=>{const{getThumbProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__thumb",e.className),__css:r.thumb})});$y.displayName="SliderThumb";var Ly=De((e,t)=>{const{getTrackProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__track",e.className),__css:r.track})});Ly.displayName="SliderTrack";var zy=De((e,t)=>{const{getInnerTrackProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__filled-track",e.className),__css:r.filledTrack})});zy.displayName="SliderFilledTrack";var Fc=De((e,t)=>{const{getMarkerProps:n}=Gg(),r=qg(),o=n(e,t);return a.jsx(Ae.div,{...o,className:dl("chakra-slider__marker",e.className),__css:r.mark})});Fc.displayName="SliderMark";var[tU,H3]=Un({name:"StatStylesContext",errorMessage:`useStatStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),W3=De(function(t,n){const r=no("Stat",t),o={position:"relative",flex:"1 1 0%",...r.container},{className:s,children:i,...c}=lr(t);return a.jsx(tU,{value:r,children:a.jsx(Ae.div,{ref:n,...c,className:kt("chakra-stat",s),__css:o,children:a.jsx("dl",{children:i})})})});W3.displayName="Stat";var V3=De(function(t,n){return a.jsx(Ae.div,{...t,ref:n,role:"group",className:kt("chakra-stat__group",t.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}})});V3.displayName="StatGroup";var U3=De(function(t,n){const r=H3();return a.jsx(Ae.dt,{ref:n,...t,className:kt("chakra-stat__label",t.className),__css:r.label})});U3.displayName="StatLabel";var G3=De(function(t,n){const r=H3();return a.jsx(Ae.dd,{ref:n,...t,className:kt("chakra-stat__number",t.className),__css:{...r.number,fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}})});G3.displayName="StatNumber";var Fy=De(function(t,n){const r=no("Switch",t),{spacing:o="0.5rem",children:s,...i}=lr(t),{getIndicatorProps:c,getInputProps:d,getCheckboxProps:p,getRootProps:h,getLabelProps:m}=KP(i),g=l.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),b=l.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=l.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return a.jsxs(Ae.label,{...h(),className:kt("chakra-switch",t.className),__css:g,children:[a.jsx("input",{className:"chakra-switch__input",...d({},n)}),a.jsx(Ae.span,{...p(),className:"chakra-switch__track",__css:b,children:a.jsx(Ae.span,{__css:r.thumb,className:"chakra-switch__thumb",...c()})}),s&&a.jsx(Ae.span,{className:"chakra-switch__label",...m(),__css:y,children:s})]})});Fy.displayName="Switch";var[nU,rU,oU,sU]=ry();function aU(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:s,isLazy:i,lazyBehavior:c="unmount",orientation:d="horizontal",direction:p="ltr",...h}=e,[m,g]=l.useState(n??0),[b,y]=Of({defaultValue:n??0,value:o,onChange:r});l.useEffect(()=>{o!=null&&g(o)},[o]);const x=oU(),w=l.useId();return{id:`tabs-${(t=e.id)!=null?t:w}`,selectedIndex:b,focusedIndex:m,setSelectedIndex:y,setFocusedIndex:g,isManual:s,isLazy:i,lazyBehavior:c,orientation:d,descendants:x,direction:p,htmlProps:h}}var[iU,Kg]=Un({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lU(e){const{focusedIndex:t,orientation:n,direction:r}=Kg(),o=rU(),s=l.useCallback(i=>{const c=()=>{var j;const I=o.nextEnabled(t);I&&((j=I.node)==null||j.focus())},d=()=>{var j;const I=o.prevEnabled(t);I&&((j=I.node)==null||j.focus())},p=()=>{var j;const I=o.firstEnabled();I&&((j=I.node)==null||j.focus())},h=()=>{var j;const I=o.lastEnabled();I&&((j=I.node)==null||j.focus())},m=n==="horizontal",g=n==="vertical",b=i.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",S={[y]:()=>m&&d(),[x]:()=>m&&c(),ArrowDown:()=>g&&c(),ArrowUp:()=>g&&d(),Home:p,End:h}[b];S&&(i.preventDefault(),S(i))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ot(e.onKeyDown,s)}}function cU(e){const{isDisabled:t=!1,isFocusable:n=!1,...r}=e,{setSelectedIndex:o,isManual:s,id:i,setFocusedIndex:c,selectedIndex:d}=Kg(),{index:p,register:h}=sU({disabled:t&&!n}),m=p===d,g=()=>{o(p)},b=()=>{c(p),!s&&!(t&&n)&&o(p)},y=Q5({...r,ref:xn(h,e.ref),isDisabled:t,isFocusable:n,onClick:ot(e.onClick,g)}),x="button";return{...y,id:q3(i,p),role:"tab",tabIndex:m?0:-1,type:x,"aria-selected":m,"aria-controls":K3(i,p),onFocus:t?void 0:ot(e.onFocus,b)}}var[uU,dU]=Un({});function fU(e){const t=Kg(),{id:n,selectedIndex:r}=t,s=Sg(e.children).map((i,c)=>l.createElement(uU,{key:c,value:{isSelected:c===r,id:K3(n,c),tabId:q3(n,c),selectedIndex:r}},i));return{...e,children:s}}function pU(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Kg(),{isSelected:s,id:i,tabId:c}=dU(),d=l.useRef(!1);s&&(d.current=!0);const p=Dy({wasSelected:d.current,isSelected:s,enabled:r,mode:o});return{tabIndex:0,...n,children:p?t:null,role:"tabpanel","aria-labelledby":c,hidden:!s,id:i}}function q3(e,t){return`${e}--tab-${t}`}function K3(e,t){return`${e}--tabpanel-${t}`}var[hU,Qg]=Un({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),tc=De(function(t,n){const r=no("Tabs",t),{children:o,className:s,...i}=lr(t),{htmlProps:c,descendants:d,...p}=aU(i),h=l.useMemo(()=>p,[p]),{isFitted:m,...g}=c,b={position:"relative",...r.root};return a.jsx(nU,{value:d,children:a.jsx(iU,{value:h,children:a.jsx(hU,{value:r,children:a.jsx(Ae.div,{className:kt("chakra-tabs",s),ref:n,...g,__css:b,children:o})})})})});tc.displayName="Tabs";var nc=De(function(t,n){const r=lU({...t,ref:n}),s={display:"flex",...Qg().tablist};return a.jsx(Ae.div,{...r,className:kt("chakra-tabs__tablist",t.className),__css:s})});nc.displayName="TabList";var Go=De(function(t,n){const r=pU({...t,ref:n}),o=Qg();return a.jsx(Ae.div,{outline:"0",...r,className:kt("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});Go.displayName="TabPanel";var $u=De(function(t,n){const r=fU(t),o=Qg();return a.jsx(Ae.div,{...r,width:"100%",ref:n,className:kt("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});$u.displayName="TabPanels";var wo=De(function(t,n){const r=Qg(),o=cU({...t,ref:n}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return a.jsx(Ae.button,{...o,className:kt("chakra-tabs__tab",t.className),__css:s})});wo.displayName="Tab";function mU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var gU=["h","minH","height","minHeight"],Q3=De((e,t)=>{const n=cl("Textarea",e),{className:r,rows:o,...s}=lr(e),i=ay(s),c=o?mU(n,gU):n;return a.jsx(Ae.textarea,{ref:t,rows:o,...i,className:kt("chakra-textarea",r),__css:c})});Q3.displayName="Textarea";var vU={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Ab=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Dh=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function bU(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:i=o,closeOnEsc:c=!0,onOpen:d,onClose:p,placement:h,id:m,isOpen:g,defaultIsOpen:b,arrowSize:y=10,arrowShadowColor:x,arrowPadding:w,modifiers:S,isDisabled:j,gutter:I,offset:_,direction:M,...E}=e,{isOpen:A,onOpen:R,onClose:D}=Ry({isOpen:g,defaultIsOpen:b,onOpen:d,onClose:p}),{referenceRef:O,getPopperProps:T,getArrowInnerProps:K,getArrowProps:G}=Ay({enabled:A,placement:h,arrowPadding:w,modifiers:S,gutter:I,offset:_,direction:M}),Q=l.useId(),te=`tooltip-${m??Q}`,V=l.useRef(null),oe=l.useRef(),ne=l.useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=void 0)},[]),se=l.useRef(),re=l.useCallback(()=>{se.current&&(clearTimeout(se.current),se.current=void 0)},[]),ae=l.useCallback(()=>{re(),D()},[D,re]),B=xU(V,ae),X=l.useCallback(()=>{if(!j&&!oe.current){A&&B();const Y=Dh(V);oe.current=Y.setTimeout(R,t)}},[B,j,A,R,t]),$=l.useCallback(()=>{ne();const Y=Dh(V);se.current=Y.setTimeout(ae,n)},[n,ae,ne]),F=l.useCallback(()=>{A&&r&&$()},[r,$,A]),q=l.useCallback(()=>{A&&i&&$()},[i,$,A]),pe=l.useCallback(Y=>{A&&Y.key==="Escape"&&$()},[A,$]);Nl(()=>Ab(V),"keydown",c?pe:void 0),Nl(()=>{if(!s)return null;const Y=V.current;if(!Y)return null;const ge=N5(Y);return ge.localName==="body"?Dh(V):ge},"scroll",()=>{A&&s&&ae()},{passive:!0,capture:!0}),l.useEffect(()=>{j&&(ne(),A&&D())},[j,A,D,ne]),l.useEffect(()=>()=>{ne(),re()},[ne,re]),Nl(()=>V.current,"pointerleave",$);const W=l.useCallback((Y={},ge=null)=>({...Y,ref:xn(V,ge,O),onPointerEnter:ot(Y.onPointerEnter,de=>{de.pointerType!=="touch"&&X()}),onClick:ot(Y.onClick,F),onPointerDown:ot(Y.onPointerDown,q),onFocus:ot(Y.onFocus,X),onBlur:ot(Y.onBlur,$),"aria-describedby":A?te:void 0}),[X,$,q,A,te,F,O]),U=l.useCallback((Y={},ge=null)=>T({...Y,style:{...Y.style,[qr.arrowSize.var]:y?`${y}px`:void 0,[qr.arrowShadowColor.var]:x}},ge),[T,y,x]),ee=l.useCallback((Y={},ge=null)=>{const he={...Y.style,position:"relative",transformOrigin:qr.transformOrigin.varRef};return{ref:ge,...E,...Y,id:te,role:"tooltip",style:he}},[E,te]);return{isOpen:A,show:X,hide:$,getTriggerProps:W,getTooltipProps:ee,getTooltipPositionerProps:U,getArrowProps:G,getArrowInnerProps:K}}var d1="chakra-ui:close-tooltip";function xU(e,t){return l.useEffect(()=>{const n=Ab(e);return n.addEventListener(d1,t),()=>n.removeEventListener(d1,t)},[t,e]),()=>{const n=Ab(e),r=Dh(e);n.dispatchEvent(new r.CustomEvent(d1))}}function yU(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function CU(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var wU=Ae(Ar.div),Wn=De((e,t)=>{var n,r;const o=cl("Tooltip",e),s=lr(e),i=kf(),{children:c,label:d,shouldWrapChildren:p,"aria-label":h,hasArrow:m,bg:g,portalProps:b,background:y,backgroundColor:x,bgColor:w,motionProps:S,...j}=s,I=(r=(n=y??x)!=null?n:g)!=null?r:w;if(I){o.bg=I;const T=vD(i,"colors",I);o[qr.arrowBg.var]=T}const _=bU({...j,direction:i.direction}),M=typeof c=="string"||p;let E;if(M)E=a.jsx(Ae.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps(),children:c});else{const T=l.Children.only(c);E=l.cloneElement(T,_.getTriggerProps(T.props,T.ref))}const A=!!h,R=_.getTooltipProps({},t),D=A?yU(R,["role","id"]):R,O=CU(R,["role","id"]);return d?a.jsxs(a.Fragment,{children:[E,a.jsx(So,{children:_.isOpen&&a.jsx(Au,{...b,children:a.jsx(Ae.div,{..._.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:a.jsxs(wU,{variants:vU,initial:"exit",animate:"enter",exit:"exit",...S,...D,__css:o,children:[d,A&&a.jsx(Ae.span,{srOnly:!0,...O,children:h}),m&&a.jsx(Ae.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:a.jsx(Ae.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):a.jsx(a.Fragment,{children:c})});Wn.displayName="Tooltip";function Xg(e,t={}){let n=l.useCallback(o=>t.keys?N$(e,t.keys,o):e.listen(o),[t.keys,e]),r=e.get.bind(e);return l.useSyncExternalStore(n,r,r)}const SU=me(we,({system:e})=>{const{consoleLogLevel:t,shouldLogToConsole:n}=e;return{consoleLogLevel:t,shouldLogToConsole:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),X3=e=>{const{consoleLogLevel:t,shouldLogToConsole:n}=H(SU);return l.useEffect(()=>{n?(localStorage.setItem("ROARR_LOG","true"),localStorage.setItem("ROARR_FILTER",`context.logLevel:>=${bD[t]}`)):localStorage.setItem("ROARR_LOG","false"),Bw.ROARR.write=xD.createLogWriter()},[t,n]),l.useEffect(()=>{const o={...yD};CD.set(Bw.Roarr.child(o))},[]),l.useMemo(()=>ki(e),[e])};function Lu(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(h){try{p(r.next(h))}catch(m){i(m)}}function d(h){try{p(r.throw(h))}catch(m){i(m)}}function p(h){h.done?s(h.value):o(h.value).then(c,d)}p((r=r.apply(e,t||[])).next())})}function zu(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(p){return function(h){return d([p,h])}}function d(p){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,p[0]&&(n=0)),n;)try{if(r=1,o&&(s=p[0]&2?o.return:p[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,p[1])).done)return s;switch(o=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,o=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function xk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function jU(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=kU.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var _U=[".DS_Store","Thumbs.db"];function IU(e){return Lu(this,void 0,void 0,function(){return zu(this,function(t){return sm(e)&&PU(e.dataTransfer)?[2,AU(e.dataTransfer,e.type)]:EU(e)?[2,MU(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,OU(e)]:[2,[]]})})}function PU(e){return sm(e)}function EU(e){return sm(e)&&sm(e.target)}function sm(e){return typeof e=="object"&&e!==null}function MU(e){return Rb(e.target.files).map(function(t){return qf(t)})}function OU(e){return Lu(this,void 0,void 0,function(){var t;return zu(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return qf(r)})]}})})}function AU(e,t){return Lu(this,void 0,void 0,function(){var n,r;return zu(this,function(o){switch(o.label){case 0:return e.items?(n=Rb(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RU))]):[3,2];case 1:return r=o.sent(),[2,yk(Y3(r))];case 2:return[2,yk(Rb(e.files).map(function(s){return qf(s)}))]}})})}function yk(e){return e.filter(function(t){return _U.indexOf(t.name)===-1})}function Rb(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,jk(n)];if(e.sizen)return[!1,jk(n)]}return[!0,null]}function Ml(e){return e!=null}function QU(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var p=t6(d,n),h=lf(p,1),m=h[0],g=n6(d,r,o),b=lf(g,1),y=b[0],x=c?c(d):null;return m&&y&&!x})}function am(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function nh(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ik(e){e.preventDefault()}function XU(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YU(e){return e.indexOf("Edge/")!==-1}function JU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return XU(e)||YU(e)}function ya(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),i=1;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mG(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}var By=l.forwardRef(function(e,t){var n=e.children,r=im(e,oG),o=Hy(r),s=o.open,i=im(o,sG);return l.useImperativeHandle(t,function(){return{open:s}},[s]),z.createElement(l.Fragment,null,n(kr(kr({},i),{},{open:s})))});By.displayName="Dropzone";var a6={disabled:!1,getFilesFromEvent:IU,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};By.defaultProps=a6;By.propTypes={children:nr.func,accept:nr.objectOf(nr.arrayOf(nr.string)),multiple:nr.bool,preventDropOnDocument:nr.bool,noClick:nr.bool,noKeyboard:nr.bool,noDrag:nr.bool,noDragEventsBubbling:nr.bool,minSize:nr.number,maxSize:nr.number,maxFiles:nr.number,disabled:nr.bool,getFilesFromEvent:nr.func,onFileDialogCancel:nr.func,onFileDialogOpen:nr.func,useFsAccessApi:nr.bool,autoFocus:nr.bool,onDragEnter:nr.func,onDragLeave:nr.func,onDragOver:nr.func,onDrop:nr.func,onDropAccepted:nr.func,onDropRejected:nr.func,onError:nr.func,validator:nr.func};var $b={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Hy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=kr(kr({},a6),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,c=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,g=t.onDrop,b=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,S=t.useFsAccessApi,j=t.autoFocus,I=t.preventDropOnDocument,_=t.noClick,M=t.noKeyboard,E=t.noDrag,A=t.noDragEventsBubbling,R=t.onError,D=t.validator,O=l.useMemo(function(){return tG(n)},[n]),T=l.useMemo(function(){return eG(n)},[n]),K=l.useMemo(function(){return typeof w=="function"?w:Ek},[w]),G=l.useMemo(function(){return typeof x=="function"?x:Ek},[x]),Q=l.useRef(null),Z=l.useRef(null),te=l.useReducer(gG,$b),V=f1(te,2),oe=V[0],ne=V[1],se=oe.isFocused,re=oe.isFileDialogActive,ae=l.useRef(typeof window<"u"&&window.isSecureContext&&S&&ZU()),B=function(){!ae.current&&re&&setTimeout(function(){if(Z.current){var Fe=Z.current.files;Fe.length||(ne({type:"closeDialog"}),G())}},300)};l.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[Z,re,G,ae]);var X=l.useRef([]),$=function(Fe){Q.current&&Q.current.contains(Fe.target)||(Fe.preventDefault(),X.current=[])};l.useEffect(function(){return I&&(document.addEventListener("dragover",Ik,!1),document.addEventListener("drop",$,!1)),function(){I&&(document.removeEventListener("dragover",Ik),document.removeEventListener("drop",$))}},[Q,I]),l.useEffect(function(){return!r&&j&&Q.current&&Q.current.focus(),function(){}},[Q,j,r]);var F=l.useCallback(function(Se){R?R(Se):console.error(Se)},[R]),q=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se),X.current=[].concat(lG(X.current),[Se.target]),nh(Se)&&Promise.resolve(o(Se)).then(function(Fe){if(!(am(Se)&&!A)){var it=Fe.length,At=it>0&&QU({files:Fe,accept:O,minSize:i,maxSize:s,multiple:c,maxFiles:d,validator:D}),ke=it>0&&!At;ne({isDragAccept:At,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),p&&p(Se)}}).catch(function(Fe){return F(Fe)})},[o,p,F,A,O,i,s,c,d,D]),pe=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se);var Fe=nh(Se);if(Fe&&Se.dataTransfer)try{Se.dataTransfer.dropEffect="copy"}catch{}return Fe&&m&&m(Se),!1},[m,A]),W=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se);var Fe=X.current.filter(function(At){return Q.current&&Q.current.contains(At)}),it=Fe.indexOf(Se.target);it!==-1&&Fe.splice(it,1),X.current=Fe,!(Fe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),nh(Se)&&h&&h(Se))},[Q,h,A]),U=l.useCallback(function(Se,Fe){var it=[],At=[];Se.forEach(function(ke){var lt=t6(ke,O),Rt=f1(lt,2),zt=Rt[0],Re=Rt[1],Qe=n6(ke,i,s),En=f1(Qe,2),Te=En[0],ct=En[1],ft=D?D(ke):null;if(zt&&Te&&!ft)it.push(ke);else{var tt=[Re,ct];ft&&(tt=tt.concat(ft)),At.push({file:ke,errors:tt.filter(function(en){return en})})}}),(!c&&it.length>1||c&&d>=1&&it.length>d)&&(it.forEach(function(ke){At.push({file:ke,errors:[KU]})}),it.splice(0)),ne({acceptedFiles:it,fileRejections:At,type:"setFiles"}),g&&g(it,At,Fe),At.length>0&&y&&y(At,Fe),it.length>0&&b&&b(it,Fe)},[ne,c,O,i,s,d,g,b,y,D]),ee=l.useCallback(function(Se){Se.preventDefault(),Se.persist(),Je(Se),X.current=[],nh(Se)&&Promise.resolve(o(Se)).then(function(Fe){am(Se)&&!A||U(Fe,Se)}).catch(function(Fe){return F(Fe)}),ne({type:"reset"})},[o,U,F,A]),Y=l.useCallback(function(){if(ae.current){ne({type:"openDialog"}),K();var Se={multiple:c,types:T};window.showOpenFilePicker(Se).then(function(Fe){return o(Fe)}).then(function(Fe){U(Fe,null),ne({type:"closeDialog"})}).catch(function(Fe){nG(Fe)?(G(Fe),ne({type:"closeDialog"})):rG(Fe)?(ae.current=!1,Z.current?(Z.current.value=null,Z.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):F(Fe)});return}Z.current&&(ne({type:"openDialog"}),K(),Z.current.value=null,Z.current.click())},[ne,K,G,S,U,F,T,c]),ge=l.useCallback(function(Se){!Q.current||!Q.current.isEqualNode(Se.target)||(Se.key===" "||Se.key==="Enter"||Se.keyCode===32||Se.keyCode===13)&&(Se.preventDefault(),Y())},[Q,Y]),he=l.useCallback(function(){ne({type:"focus"})},[]),de=l.useCallback(function(){ne({type:"blur"})},[]),_e=l.useCallback(function(){_||(JU()?setTimeout(Y,0):Y())},[_,Y]),Pe=function(Fe){return r?null:Fe},ze=function(Fe){return M?null:Pe(Fe)},ht=function(Fe){return E?null:Pe(Fe)},Je=function(Fe){A&&Fe.stopPropagation()},qt=l.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=Se.refKey,it=Fe===void 0?"ref":Fe,At=Se.role,ke=Se.onKeyDown,lt=Se.onFocus,Rt=Se.onBlur,zt=Se.onClick,Re=Se.onDragEnter,Qe=Se.onDragOver,En=Se.onDragLeave,Te=Se.onDrop,ct=im(Se,aG);return kr(kr(Nb({onKeyDown:ze(ya(ke,ge)),onFocus:ze(ya(lt,he)),onBlur:ze(ya(Rt,de)),onClick:Pe(ya(zt,_e)),onDragEnter:ht(ya(Re,q)),onDragOver:ht(ya(Qe,pe)),onDragLeave:ht(ya(En,W)),onDrop:ht(ya(Te,ee)),role:typeof At=="string"&&At!==""?At:"presentation"},it,Q),!r&&!M?{tabIndex:0}:{}),ct)}},[Q,ge,he,de,_e,q,pe,W,ee,M,E,r]),Pt=l.useCallback(function(Se){Se.stopPropagation()},[]),jt=l.useMemo(function(){return function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=Se.refKey,it=Fe===void 0?"ref":Fe,At=Se.onChange,ke=Se.onClick,lt=im(Se,iG),Rt=Nb({accept:O,multiple:c,type:"file",style:{display:"none"},onChange:Pe(ya(At,ee)),onClick:Pe(ya(ke,Pt)),tabIndex:-1},it,Z);return kr(kr({},Rt),lt)}},[Z,n,c,ee,r]);return kr(kr({},oe),{},{isFocused:se&&!r,getRootProps:qt,getInputProps:jt,rootRef:Q,inputRef:Z,open:Pe(Y)})}function gG(e,t){switch(t.type){case"focus":return kr(kr({},e),{},{isFocused:!0});case"blur":return kr(kr({},e),{},{isFocused:!1});case"openDialog":return kr(kr({},$b),{},{isFileDialogActive:!0});case"closeDialog":return kr(kr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kr(kr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return kr(kr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return kr({},$b);default:return e}}function Ek(){}function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var SG=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,s=n.meta,i=n.mod,c=n.shift,d=n.ctrl,p=n.keys,h=t.key,m=t.code,g=t.ctrlKey,b=t.metaKey,y=t.shiftKey,x=t.altKey,w=qi(m),S=h.toLowerCase();if(!r){if(o===!x&&S!=="alt"||c===!y&&S!=="shift")return!1;if(i){if(!b&&!g)return!1}else if(s===!b&&S!=="meta"&&S!=="os"||d===!g&&S!=="ctrl"&&S!=="control")return!1}return p&&p.length===1&&(p.includes(S)||p.includes(w))?!0:p?Th(p):!p},kG=l.createContext(void 0),jG=function(){return l.useContext(kG)};function d6(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&d6(e[r],t[r])},!0):e===t}var _G=l.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),IG=function(){return l.useContext(_G)};function PG(e){var t=l.useRef(void 0);return d6(t.current,e)||(t.current=e),t.current}var Mk=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},EG=typeof window<"u"?l.useLayoutEffect:l.useEffect;function _t(e,t,n,r){var o=l.useRef(null),s=l.useRef(!1),i=n instanceof Array?r instanceof Array?void 0:r:n,c=Wy(e)?e.join(i==null?void 0:i.splitKey):e,d=n instanceof Array?n:r instanceof Array?r:void 0,p=l.useCallback(t,d??[]),h=l.useRef(p);d?h.current=p:h.current=t;var m=PG(i),g=IG(),b=g.enabledScopes,y=jG();return EG(function(){if(!((m==null?void 0:m.enabled)===!1||!wG(b,m==null?void 0:m.scopes))){var x=function(_,M){var E;if(M===void 0&&(M=!1),!(CG(_)&&!u6(_,m==null?void 0:m.enableOnFormTags))&&!(m!=null&&m.ignoreEventWhen!=null&&m.ignoreEventWhen(_))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){Mk(_);return}(E=_.target)!=null&&E.isContentEditable&&!(m!=null&&m.enableOnContentEditable)||p1(c,m==null?void 0:m.splitKey).forEach(function(A){var R,D=h1(A,m==null?void 0:m.combinationKey);if(SG(_,D,m==null?void 0:m.ignoreModifiers)||(R=D.keys)!=null&&R.includes("*")){if(M&&s.current)return;if(xG(_,D,m==null?void 0:m.preventDefault),!yG(_,D,m==null?void 0:m.enabled)){Mk(_);return}h.current(_,D),M||(s.current=!0)}})}},w=function(_){_.key!==void 0&&(l6(qi(_.code)),((m==null?void 0:m.keydown)===void 0&&(m==null?void 0:m.keyup)!==!0||m!=null&&m.keydown)&&x(_))},S=function(_){_.key!==void 0&&(c6(qi(_.code)),s.current=!1,m!=null&&m.keyup&&x(_,!0))},j=o.current||(i==null?void 0:i.document)||document;return j.addEventListener("keyup",S),j.addEventListener("keydown",w),y&&p1(c,m==null?void 0:m.splitKey).forEach(function(I){return y.addHotkey(h1(I,m==null?void 0:m.combinationKey,m==null?void 0:m.description))}),function(){j.removeEventListener("keyup",S),j.removeEventListener("keydown",w),y&&p1(c,m==null?void 0:m.splitKey).forEach(function(I){return y.removeHotkey(h1(I,m==null?void 0:m.combinationKey,m==null?void 0:m.description))})}}},[c,m,b]),o}const MG=e=>{const{isDragAccept:t,isDragReject:n,setIsHandlingUpload:r}=e;return _t("esc",()=>{r(!1)}),a.jsxs(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"100vw",height:"100vh",zIndex:999,backdropFilter:"blur(20px)"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:"base.700",_dark:{bg:"base.900"},opacity:.7,alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,width:"full",height:"full",alignItems:"center",justifyContent:"center",p:4},children:a.jsx(N,{sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",flexDir:"column",gap:4,borderWidth:3,borderRadius:"xl",borderStyle:"dashed",color:"base.100",borderColor:"base.100",_dark:{borderColor:"base.200"}},children:t?a.jsx(yo,{size:"lg",children:"Drop to Upload"}):a.jsxs(a.Fragment,{children:[a.jsx(yo,{size:"lg",children:"Invalid Upload"}),a.jsx(yo,{size:"md",children:"Must be single JPEG or PNG image"})]})})})]})},OG=l.memo(MG),AG=me([we,lo],({gallery:e},t)=>{let n={type:"TOAST"};t==="unifiedCanvas"&&(n={type:"SET_CANVAS_INITIAL_IMAGE"}),t==="img2img"&&(n={type:"SET_INITIAL_IMAGE"});const{autoAddBoardId:r}=e;return{autoAddBoardId:r,postUploadAction:n}},Ie),RG=e=>{const{children:t}=e,{autoAddBoardId:n,postUploadAction:r}=H(AG),o=Zl(),{t:s}=J(),[i,c]=l.useState(!1),[d]=MI(),p=l.useCallback(_=>{c(!0),o({title:s("toast.uploadFailed"),description:_.errors.map(M=>M.message).join(` -`),status:"error"})},[s,o]),h=l.useCallback(async _=>{d({file:_,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,d]),m=l.useCallback((_,M)=>{if(M.length>1){o({title:s("toast.uploadFailed"),description:s("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}M.forEach(E=>{p(E)}),_.forEach(E=>{h(E)})},[s,o,h,p]),g=l.useCallback(()=>{c(!0)},[]),{getRootProps:b,getInputProps:y,isDragAccept:x,isDragReject:w,isDragActive:S,inputRef:j}=Hy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:m,onDragOver:g,multiple:!1});l.useEffect(()=>{const _=async M=>{var E,A;j.current&&(E=M.clipboardData)!=null&&E.files&&(j.current.files=M.clipboardData.files,(A=j.current)==null||A.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[j]);const I=l.useCallback(_=>{_.key},[]);return a.jsxs(Le,{...b({style:{}}),onKeyDown:I,children:[a.jsx("input",{...y()}),t,a.jsx(So,{children:S&&i&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(OG,{isDragAccept:x,isDragReject:w,setIsHandlingUpload:c})},"image-upload-overlay")})]})},DG=l.memo(RG),TG=De((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:c,...d}=e;return a.jsx(Wn,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(nl,{ref:t,colorScheme:c?"accent":"base",...d,children:n})})}),Dt=l.memo(TG);function NG(e){const t=l.createContext(null);return[({children:o,value:s})=>z.createElement(t.Provider,{value:s},o),()=>{const o=l.useContext(t);if(o===null)throw new Error(e);return o}]}function f6(e){return Array.isArray(e)?e:[e]}const $G=()=>{};function LG(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||$G:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function p6({data:e}){const t=[],n=[],r=e.reduce((o,s,i)=>(s.group?o[s.group]?o[s.group].push(i):o[s.group]=[i]:n.push(i),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function h6(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==z.Fragment:!1}function m6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tr===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const BG=wD({key:"mantine",prepend:!0});function HG(){return AP()||BG}var WG=Object.defineProperty,Ok=Object.getOwnPropertySymbols,VG=Object.prototype.hasOwnProperty,UG=Object.prototype.propertyIsEnumerable,Ak=(e,t,n)=>t in e?WG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GG=(e,t)=>{for(var n in t||(t={}))VG.call(t,n)&&Ak(e,n,t[n]);if(Ok)for(var n of Ok(t))UG.call(t,n)&&Ak(e,n,t[n]);return e};const m1="ref";function qG(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(m1 in n))return{args:e,ref:t};t=n[m1];const r=GG({},n);return delete r[m1],{args:[r],ref:t}}const{cssFactory:KG}=(()=>{function e(n,r,o){const s=[],i=jD(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:c,args:d}=qG(i),p=SD(d,r.registered);return kD(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...i)=>e(r.registered,o,g6(i))}}return{cssFactory:t}})();function v6(){const e=HG();return FG(()=>KG({cache:e}),[e])}function QG({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((c,d)=>(Object.keys(d.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${d.classNames[p]}`:c[p]=`${c[p]} ${d.classNames[p]}`}),c),{});return Object.keys(t).reduce((c,d)=>(c[d]=e(t[d],i[d],r!=null&&r[d],Array.isArray(o)?o.filter(Boolean).map(p=>`${(s==null?void 0:s.key)||"mantine"}-${p}-${d}`).join(" "):o?`${(s==null?void 0:s.key)||"mantine"}-${o}-${d}`:null),c),{})}var XG=Object.defineProperty,Rk=Object.getOwnPropertySymbols,YG=Object.prototype.hasOwnProperty,JG=Object.prototype.propertyIsEnumerable,Dk=(e,t,n)=>t in e?XG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g1=(e,t)=>{for(var n in t||(t={}))YG.call(t,n)&&Dk(e,n,t[n]);if(Rk)for(var n of Rk(t))JG.call(t,n)&&Dk(e,n,t[n]);return e};function zb(e,t){return t&&Object.keys(t).forEach(n=>{e[n]?e[n]=g1(g1({},e[n]),t[n]):e[n]=g1({},t[n])}),e}function Tk(e,t,n,r){const o=s=>typeof s=="function"?s(t,n||{},r):s||{};return Array.isArray(e)?e.map(s=>o(s.styles)).reduce((s,i)=>zb(s,i),{}):o(e)}function ZG({ctx:e,theme:t,params:n,variant:r,size:o}){return e.reduce((s,i)=>(i.variants&&r in i.variants&&zb(s,i.variants[r](t,n,{variant:r,size:o})),i.sizes&&o in i.sizes&&zb(s,i.sizes[o](t,n,{variant:r,size:o})),s),{})}function ko(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const s=Ii(),i=b$(o==null?void 0:o.name),c=AP(),d={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:p,cx:h}=v6(),m=t(s,r,d),g=Tk(o==null?void 0:o.styles,s,r,d),b=Tk(i,s,r,d),y=ZG({ctx:i,theme:s,params:r,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),x=Object.fromEntries(Object.keys(m).map(w=>{const S=h({[p(m[w])]:!(o!=null&&o.unstyled)},p(y[w]),p(b[w]),p(g[w]));return[w,S]}));return{classes:QG({cx:h,classes:x,context:i,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:c}),cx:h,theme:s}}return n}function Nk(e){return`___ref-${e||""}`}var eq=Object.defineProperty,tq=Object.defineProperties,nq=Object.getOwnPropertyDescriptors,$k=Object.getOwnPropertySymbols,rq=Object.prototype.hasOwnProperty,oq=Object.prototype.propertyIsEnumerable,Lk=(e,t,n)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xd=(e,t)=>{for(var n in t||(t={}))rq.call(t,n)&&Lk(e,n,t[n]);if($k)for(var n of $k(t))oq.call(t,n)&&Lk(e,n,t[n]);return e},yd=(e,t)=>tq(e,nq(t));const Cd={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${qe(10)})`},transitionProperty:"transform, opacity"},rh={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${qe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${qe(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:yd(xd({},Cd),{common:{transformOrigin:"center center"}}),"pop-bottom-left":yd(xd({},Cd),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":yd(xd({},Cd),{common:{transformOrigin:"bottom right"}}),"pop-top-left":yd(xd({},Cd),{common:{transformOrigin:"top left"}}),"pop-top-right":yd(xd({},Cd),{common:{transformOrigin:"top right"}})},zk=["mousedown","touchstart"];function sq(e,t,n){const r=l.useRef();return l.useEffect(()=>{const o=s=>{const{target:i}=s??{};if(Array.isArray(n)){const c=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";n.every(p=>!!p&&!s.composedPath().includes(p))&&!c&&e()}else r.current&&!r.current.contains(i)&&e()};return(t||zk).forEach(s=>document.addEventListener(s,o)),()=>{(t||zk).forEach(s=>document.removeEventListener(s,o))}},[r,e,n]),r}function aq(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function iq(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function lq(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=l.useState(n?t:iq(e,t)),s=l.useRef();return l.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(e),o(s.current.matches),aq(s.current,i=>o(i.matches))},[e]),r}const b6=typeof document<"u"?l.useLayoutEffect:l.useEffect;function oa(e,t){const n=l.useRef(!1);l.useEffect(()=>()=>{n.current=!1},[]),l.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function cq({opened:e,shouldReturnFocus:t=!0}){const n=l.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return oa(()=>{let o=-1;const s=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),e?n.current=document.activeElement:t&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[e,t]),r}const uq=/input|select|textarea|button|object/,x6="a, input, select, textarea, button, object, [tabindex]";function dq(e){return e.style.display==="none"}function fq(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(dq(n))return!1;n=n.parentNode}return!0}function y6(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Fb(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(y6(e));return(uq.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&fq(e)}function C6(e){const t=y6(e);return(Number.isNaN(t)||t>=0)&&Fb(e)}function pq(e){return Array.from(e.querySelectorAll(x6)).filter(C6)}function hq(e,t){const n=pq(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();if(!(r===o.activeElement||e===o.activeElement))return;t.preventDefault();const i=n[t.shiftKey?n.length-1:0];i&&i.focus()}function Uy(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function mq(e,t="body > :not(script)"){const n=Uy(),r=Array.from(document.querySelectorAll(t)).map(o=>{var s;if((s=o==null?void 0:o.shadowRoot)!=null&&s.contains(e)||o.contains(e))return;const i=o.getAttribute("aria-hidden"),c=o.getAttribute("data-hidden"),d=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),i===null||i==="false"?o.setAttribute("aria-hidden","true"):!c&&!d&&o.setAttribute("data-hidden",i),{node:o,ariaHidden:c||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function gq(e=!0){const t=l.useRef(),n=l.useRef(null),r=s=>{let i=s.querySelector("[data-autofocus]");if(!i){const c=Array.from(s.querySelectorAll(x6));i=c.find(C6)||c.find(Fb)||null,!i&&Fb(s)&&(i=s)}i&&i.focus({preventScroll:!0})},o=l.useCallback(s=>{if(e){if(s===null){n.current&&(n.current(),n.current=null);return}n.current=mq(s),t.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&r(s)}),t.current=s):t.current=null)}},[e]);return l.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const s=i=>{i.key==="Tab"&&t.current&&hq(t.current,i)};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),n.current&&n.current()}},[e]),o}const vq=z["useId".toString()]||(()=>{});function bq(){const e=vq();return e?`mantine-${e.replace(/:/g,"")}`:""}function Gy(e){const t=bq(),[n,r]=l.useState(t);return b6(()=>{r(Uy())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function Fk(e,t,n){l.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function w6(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function xq(...e){return t=>{e.forEach(n=>w6(n,t))}}function Kf(...e){return l.useCallback(xq(...e),e)}function cf({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,s]=l.useState(t!==void 0?t:n),i=c=>{s(c),r==null||r(c)};return e!==void 0?[e,r,!0]:[o,i,!1]}function S6(e,t){return lq("(prefers-reduced-motion: reduce)",e,t)}const yq=e=>e<.5?2*e*e:-1+(4-2*e)*e,Cq=({axis:e,target:t,parent:n,alignment:r,offset:o,isList:s})=>{if(!t||!n&&typeof document>"u")return 0;const i=!!n,d=(n||document.body).getBoundingClientRect(),p=t.getBoundingClientRect(),h=m=>p[m]-d[m];if(e==="y"){const m=h("top");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.height*(s?0:1)||!s?b:0}const g=i?d.height:window.innerHeight;if(r==="end"){const b=m+o-g+p.height;return b>=-p.height*(s?0:1)||!s?b:0}return r==="center"?m-g/2+p.height/2:0}if(e==="x"){const m=h("left");if(m===0)return 0;if(r==="start"){const b=m-o;return b<=p.width||!s?b:0}const g=i?d.width:window.innerWidth;if(r==="end"){const b=m+o-g+p.width;return b>=-p.width||!s?b:0}return r==="center"?m-g/2+p.width/2:0}return 0},wq=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const n=e==="y"?"scrollTop":"scrollLeft";if(t)return t[n];const{body:r,documentElement:o}=document;return r[n]+o[n]},Sq=({axis:e,parent:t,distance:n})=>{if(!t&&typeof document>"u")return;const r=e==="y"?"scrollTop":"scrollLeft";if(t)t[r]=n;else{const{body:o,documentElement:s}=document;o[r]=n,s[r]=n}};function k6({duration:e=1250,axis:t="y",onScrollFinish:n,easing:r=yq,offset:o=0,cancelable:s=!0,isList:i=!1}={}){const c=l.useRef(0),d=l.useRef(0),p=l.useRef(!1),h=l.useRef(null),m=l.useRef(null),g=S6(),b=()=>{c.current&&cancelAnimationFrame(c.current)},y=l.useCallback(({alignment:w="start"}={})=>{var S;p.current=!1,c.current&&b();const j=(S=wq({parent:h.current,axis:t}))!=null?S:0,I=Cq({parent:h.current,target:m.current,axis:t,alignment:w,offset:o,isList:i})-(h.current?0:j);function _(){d.current===0&&(d.current=performance.now());const E=performance.now()-d.current,A=g||e===0?1:E/e,R=j+I*r(A);Sq({parent:h.current,axis:t,distance:R}),!p.current&&A<1?c.current=requestAnimationFrame(_):(typeof n=="function"&&n(),d.current=0,c.current=0,b())}_()},[t,e,r,i,o,n,g]),x=()=>{s&&(p.current=!0)};return Fk("wheel",x,{passive:!0}),Fk("touchmove",x,{passive:!0}),l.useEffect(()=>b,[]),{scrollableRef:h,targetRef:m,scrollIntoView:y,cancel:b}}var Bk=Object.getOwnPropertySymbols,kq=Object.prototype.hasOwnProperty,jq=Object.prototype.propertyIsEnumerable,_q=(e,t)=>{var n={};for(var r in e)kq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bk)for(var r of Bk(e))t.indexOf(r)<0&&jq.call(e,r)&&(n[r]=e[r]);return n};function Yg(e){const t=e,{m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:w,c:S,opacity:j,ff:I,fz:_,fw:M,lts:E,ta:A,lh:R,fs:D,tt:O,td:T,w:K,miw:G,maw:Q,h:Z,mih:te,mah:V,bgsz:oe,bgp:ne,bgr:se,bga:re,pos:ae,top:B,left:X,bottom:$,right:F,inset:q,display:pe}=t,W=_q(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:x$({m:n,mx:r,my:o,mt:s,mb:i,ml:c,mr:d,p,px:h,py:m,pt:g,pb:b,pl:y,pr:x,bg:w,c:S,opacity:j,ff:I,fz:_,fw:M,lts:E,ta:A,lh:R,fs:D,tt:O,td:T,w:K,miw:G,maw:Q,h:Z,mih:te,mah:V,bgsz:oe,bgp:ne,bgr:se,bga:re,pos:ae,top:B,left:X,bottom:$,right:F,inset:q,display:pe}),rest:W}}function Iq(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>MS(Xt({size:r,sizes:t.breakpoints}))-MS(Xt({size:o,sizes:t.breakpoints})));return"base"in e?["base",...n]:n}function Pq({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return Iq(e,t).reduce((i,c)=>{if(c==="base"&&e.base!==void 0){const p=n(e.base,t);return Array.isArray(r)?(r.forEach(h=>{i[h]=p}),i):(i[r]=p,i)}const d=n(e[c],t);return Array.isArray(r)?(i[t.fn.largerThan(c)]={},r.forEach(p=>{i[t.fn.largerThan(c)][p]=d}),i):(i[t.fn.largerThan(c)]={[r]:d},i)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((s,i)=>(s[i]=o,s),{}):{[r]:o}}function Eq(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function Mq(e){return qe(e)}function Oq(e){return e}function Aq(e,t){return Xt({size:e,sizes:t.fontSizes})}const Rq=["-xs","-sm","-md","-lg","-xl"];function Dq(e,t){return Rq.includes(e)?`calc(${Xt({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Xt({size:e,sizes:t.spacing})}const Tq={identity:Oq,color:Eq,size:Mq,fontSize:Aq,spacing:Dq},Nq={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var $q=Object.defineProperty,Hk=Object.getOwnPropertySymbols,Lq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,Wk=(e,t,n)=>t in e?$q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vk=(e,t)=>{for(var n in t||(t={}))Lq.call(t,n)&&Wk(e,n,t[n]);if(Hk)for(var n of Hk(t))zq.call(t,n)&&Wk(e,n,t[n]);return e};function Uk(e,t,n=Nq){return Object.keys(n).reduce((o,s)=>(s in e&&e[s]!==void 0&&o.push(Pq({value:e[s],getValue:Tq[n[s].type],property:n[s].property,theme:t})),o),[]).reduce((o,s)=>(Object.keys(s).forEach(i=>{typeof s[i]=="object"&&s[i]!==null&&i in o?o[i]=Vk(Vk({},o[i]),s[i]):o[i]=s[i]}),o),{})}function Gk(e,t){return typeof e=="function"?e(t):e}function Fq(e,t,n){const r=Ii(),{css:o,cx:s}=v6();return Array.isArray(e)?s(n,o(Uk(t,r)),e.map(i=>o(Gk(i,r)))):s(n,o(Gk(e,r)),o(Uk(t,r)))}var Bq=Object.defineProperty,lm=Object.getOwnPropertySymbols,j6=Object.prototype.hasOwnProperty,_6=Object.prototype.propertyIsEnumerable,qk=(e,t,n)=>t in e?Bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hq=(e,t)=>{for(var n in t||(t={}))j6.call(t,n)&&qk(e,n,t[n]);if(lm)for(var n of lm(t))_6.call(t,n)&&qk(e,n,t[n]);return e},Wq=(e,t)=>{var n={};for(var r in e)j6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lm)for(var r of lm(e))t.indexOf(r)<0&&_6.call(e,r)&&(n[r]=e[r]);return n};const I6=l.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:s,sx:i}=n,c=Wq(n,["className","component","style","sx"]);const{systemStyles:d,rest:p}=Yg(c),h=o||"div";return z.createElement(h,Hq({ref:t,className:Fq(i,d,r),style:s},p))});I6.displayName="@mantine/core/Box";const Xo=I6;var Vq=Object.defineProperty,Uq=Object.defineProperties,Gq=Object.getOwnPropertyDescriptors,Kk=Object.getOwnPropertySymbols,qq=Object.prototype.hasOwnProperty,Kq=Object.prototype.propertyIsEnumerable,Qk=(e,t,n)=>t in e?Vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xk=(e,t)=>{for(var n in t||(t={}))qq.call(t,n)&&Qk(e,n,t[n]);if(Kk)for(var n of Kk(t))Kq.call(t,n)&&Qk(e,n,t[n]);return e},Qq=(e,t)=>Uq(e,Gq(t)),Xq=ko(e=>({root:Qq(Xk(Xk({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Yq=Xq;var Jq=Object.defineProperty,cm=Object.getOwnPropertySymbols,P6=Object.prototype.hasOwnProperty,E6=Object.prototype.propertyIsEnumerable,Yk=(e,t,n)=>t in e?Jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t)=>{for(var n in t||(t={}))P6.call(t,n)&&Yk(e,n,t[n]);if(cm)for(var n of cm(t))E6.call(t,n)&&Yk(e,n,t[n]);return e},eK=(e,t)=>{var n={};for(var r in e)P6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cm)for(var r of cm(e))t.indexOf(r)<0&&E6.call(e,r)&&(n[r]=e[r]);return n};const M6=l.forwardRef((e,t)=>{const n=zr("UnstyledButton",{},e),{className:r,component:o="button",unstyled:s,variant:i}=n,c=eK(n,["className","component","unstyled","variant"]),{classes:d,cx:p}=Yq(null,{name:"UnstyledButton",unstyled:s,variant:i});return z.createElement(Xo,Zq({component:o,ref:t,className:p(d.root,r),type:o==="button"?"button":void 0},c))});M6.displayName="@mantine/core/UnstyledButton";const tK=M6;var nK=Object.defineProperty,rK=Object.defineProperties,oK=Object.getOwnPropertyDescriptors,Jk=Object.getOwnPropertySymbols,sK=Object.prototype.hasOwnProperty,aK=Object.prototype.propertyIsEnumerable,Zk=(e,t,n)=>t in e?nK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bb=(e,t)=>{for(var n in t||(t={}))sK.call(t,n)&&Zk(e,n,t[n]);if(Jk)for(var n of Jk(t))aK.call(t,n)&&Zk(e,n,t[n]);return e},e4=(e,t)=>rK(e,oK(t));const iK=["subtle","filled","outline","light","default","transparent","gradient"],oh={xs:qe(18),sm:qe(22),md:qe(28),lg:qe(34),xl:qe(44)};function lK({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:iK.includes(e)?Bb({border:`${qe(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var cK=ko((e,{radius:t,color:n,gradient:r},{variant:o,size:s})=>({root:e4(Bb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Xt({size:s,sizes:oh}),minHeight:Xt({size:s,sizes:oh}),width:Xt({size:s,sizes:oh}),minWidth:Xt({size:s,sizes:oh})},lK({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":e4(Bb({content:'""'},e.fn.cover(qe(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const uK=cK;var dK=Object.defineProperty,um=Object.getOwnPropertySymbols,O6=Object.prototype.hasOwnProperty,A6=Object.prototype.propertyIsEnumerable,t4=(e,t,n)=>t in e?dK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,n4=(e,t)=>{for(var n in t||(t={}))O6.call(t,n)&&t4(e,n,t[n]);if(um)for(var n of um(t))A6.call(t,n)&&t4(e,n,t[n]);return e},r4=(e,t)=>{var n={};for(var r in e)O6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&um)for(var r of um(e))t.indexOf(r)<0&&A6.call(e,r)&&(n[r]=e[r]);return n};function fK(e){var t=e,{size:n,color:r}=t,o=r4(t,["size","color"]);const s=o,{style:i}=s,c=r4(s,["style"]);return z.createElement("svg",n4({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:n4({width:n},i)},c),z.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},z.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var pK=Object.defineProperty,dm=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty,D6=Object.prototype.propertyIsEnumerable,o4=(e,t,n)=>t in e?pK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s4=(e,t)=>{for(var n in t||(t={}))R6.call(t,n)&&o4(e,n,t[n]);if(dm)for(var n of dm(t))D6.call(t,n)&&o4(e,n,t[n]);return e},a4=(e,t)=>{var n={};for(var r in e)R6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dm)for(var r of dm(e))t.indexOf(r)<0&&D6.call(e,r)&&(n[r]=e[r]);return n};function hK(e){var t=e,{size:n,color:r}=t,o=a4(t,["size","color"]);const s=o,{style:i}=s,c=a4(s,["style"]);return z.createElement("svg",s4({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:s4({width:n,height:n},i)},c),z.createElement("g",{fill:"none",fillRule:"evenodd"},z.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},z.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),z.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},z.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var mK=Object.defineProperty,fm=Object.getOwnPropertySymbols,T6=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable,i4=(e,t,n)=>t in e?mK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l4=(e,t)=>{for(var n in t||(t={}))T6.call(t,n)&&i4(e,n,t[n]);if(fm)for(var n of fm(t))N6.call(t,n)&&i4(e,n,t[n]);return e},c4=(e,t)=>{var n={};for(var r in e)T6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fm)for(var r of fm(e))t.indexOf(r)<0&&N6.call(e,r)&&(n[r]=e[r]);return n};function gK(e){var t=e,{size:n,color:r}=t,o=c4(t,["size","color"]);const s=o,{style:i}=s,c=c4(s,["style"]);return z.createElement("svg",l4({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:l4({width:n},i)},c),z.createElement("circle",{cx:"15",cy:"15",r:"15"},z.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},z.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),z.createElement("circle",{cx:"105",cy:"15",r:"15"},z.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),z.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var vK=Object.defineProperty,pm=Object.getOwnPropertySymbols,$6=Object.prototype.hasOwnProperty,L6=Object.prototype.propertyIsEnumerable,u4=(e,t,n)=>t in e?vK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bK=(e,t)=>{for(var n in t||(t={}))$6.call(t,n)&&u4(e,n,t[n]);if(pm)for(var n of pm(t))L6.call(t,n)&&u4(e,n,t[n]);return e},xK=(e,t)=>{var n={};for(var r in e)$6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pm)for(var r of pm(e))t.indexOf(r)<0&&L6.call(e,r)&&(n[r]=e[r]);return n};const v1={bars:fK,oval:hK,dots:gK},yK={xs:qe(18),sm:qe(22),md:qe(36),lg:qe(44),xl:qe(58)},CK={size:"md"};function z6(e){const t=zr("Loader",CK,e),{size:n,color:r,variant:o}=t,s=xK(t,["size","color","variant"]),i=Ii(),c=o in v1?o:i.loader;return z.createElement(Xo,bK({role:"presentation",component:v1[c]||v1.bars,size:Xt({size:n,sizes:yK}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:r||i.primaryColor}).background},s))}z6.displayName="@mantine/core/Loader";var wK=Object.defineProperty,hm=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable,d4=(e,t,n)=>t in e?wK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f4=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&d4(e,n,t[n]);if(hm)for(var n of hm(t))B6.call(t,n)&&d4(e,n,t[n]);return e},SK=(e,t)=>{var n={};for(var r in e)F6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hm)for(var r of hm(e))t.indexOf(r)<0&&B6.call(e,r)&&(n[r]=e[r]);return n};const kK={color:"gray",size:"md",variant:"subtle"},H6=l.forwardRef((e,t)=>{const n=zr("ActionIcon",kK,e),{className:r,color:o,children:s,radius:i,size:c,variant:d,gradient:p,disabled:h,loaderProps:m,loading:g,unstyled:b,__staticSelector:y}=n,x=SK(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:w,cx:S,theme:j}=uK({radius:i,color:o,gradient:p},{name:["ActionIcon",y],unstyled:b,size:c,variant:d}),I=z.createElement(z6,f4({color:j.fn.variant({color:o,variant:d}).color,size:"100%","data-action-icon-loader":!0},m));return z.createElement(tK,f4({className:S(w.root,r),ref:t,disabled:h,"data-disabled":h||void 0,"data-loading":g||void 0,unstyled:b},x),g?I:s)});H6.displayName="@mantine/core/ActionIcon";const jK=H6;var _K=Object.defineProperty,IK=Object.defineProperties,PK=Object.getOwnPropertyDescriptors,mm=Object.getOwnPropertySymbols,W6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,p4=(e,t,n)=>t in e?_K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EK=(e,t)=>{for(var n in t||(t={}))W6.call(t,n)&&p4(e,n,t[n]);if(mm)for(var n of mm(t))V6.call(t,n)&&p4(e,n,t[n]);return e},MK=(e,t)=>IK(e,PK(t)),OK=(e,t)=>{var n={};for(var r in e)W6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mm)for(var r of mm(e))t.indexOf(r)<0&&V6.call(e,r)&&(n[r]=e[r]);return n};function U6(e){const t=zr("Portal",{},e),{children:n,target:r,className:o,innerRef:s}=t,i=OK(t,["children","target","className","innerRef"]),c=Ii(),[d,p]=l.useState(!1),h=l.useRef();return b6(()=>(p(!0),h.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(h.current),()=>{!r&&document.body.removeChild(h.current)}),[r]),d?ls.createPortal(z.createElement("div",MK(EK({className:o,dir:c.dir},i),{ref:s}),n),h.current):null}U6.displayName="@mantine/core/Portal";var AK=Object.defineProperty,gm=Object.getOwnPropertySymbols,G6=Object.prototype.hasOwnProperty,q6=Object.prototype.propertyIsEnumerable,h4=(e,t,n)=>t in e?AK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RK=(e,t)=>{for(var n in t||(t={}))G6.call(t,n)&&h4(e,n,t[n]);if(gm)for(var n of gm(t))q6.call(t,n)&&h4(e,n,t[n]);return e},DK=(e,t)=>{var n={};for(var r in e)G6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gm)for(var r of gm(e))t.indexOf(r)<0&&q6.call(e,r)&&(n[r]=e[r]);return n};function K6(e){var t=e,{withinPortal:n=!0,children:r}=t,o=DK(t,["withinPortal","children"]);return n?z.createElement(U6,RK({},o),r):z.createElement(z.Fragment,null,r)}K6.displayName="@mantine/core/OptionalPortal";var TK=Object.defineProperty,vm=Object.getOwnPropertySymbols,Q6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,m4=(e,t,n)=>t in e?TK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g4=(e,t)=>{for(var n in t||(t={}))Q6.call(t,n)&&m4(e,n,t[n]);if(vm)for(var n of vm(t))X6.call(t,n)&&m4(e,n,t[n]);return e},NK=(e,t)=>{var n={};for(var r in e)Q6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vm)for(var r of vm(e))t.indexOf(r)<0&&X6.call(e,r)&&(n[r]=e[r]);return n};function Y6(e){const t=e,{width:n,height:r,style:o}=t,s=NK(t,["width","height","style"]);return z.createElement("svg",g4({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:g4({width:n,height:r},o)},s),z.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}Y6.displayName="@mantine/core/CloseIcon";var $K=Object.defineProperty,bm=Object.getOwnPropertySymbols,J6=Object.prototype.hasOwnProperty,Z6=Object.prototype.propertyIsEnumerable,v4=(e,t,n)=>t in e?$K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LK=(e,t)=>{for(var n in t||(t={}))J6.call(t,n)&&v4(e,n,t[n]);if(bm)for(var n of bm(t))Z6.call(t,n)&&v4(e,n,t[n]);return e},zK=(e,t)=>{var n={};for(var r in e)J6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bm)for(var r of bm(e))t.indexOf(r)<0&&Z6.call(e,r)&&(n[r]=e[r]);return n};const FK={xs:qe(12),sm:qe(16),md:qe(20),lg:qe(28),xl:qe(34)},BK={size:"sm"},eE=l.forwardRef((e,t)=>{const n=zr("CloseButton",BK,e),{iconSize:r,size:o,children:s}=n,i=zK(n,["iconSize","size","children"]),c=qe(r||FK[o]);return z.createElement(jK,LK({ref:t,__staticSelector:"CloseButton",size:o},i),s||z.createElement(Y6,{width:c,height:c}))});eE.displayName="@mantine/core/CloseButton";const tE=eE;var HK=Object.defineProperty,WK=Object.defineProperties,VK=Object.getOwnPropertyDescriptors,b4=Object.getOwnPropertySymbols,UK=Object.prototype.hasOwnProperty,GK=Object.prototype.propertyIsEnumerable,x4=(e,t,n)=>t in e?HK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sh=(e,t)=>{for(var n in t||(t={}))UK.call(t,n)&&x4(e,n,t[n]);if(b4)for(var n of b4(t))GK.call(t,n)&&x4(e,n,t[n]);return e},qK=(e,t)=>WK(e,VK(t));function KK({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function QK({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function XK(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function YK({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var JK=ko((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:s,underline:i,gradient:c,weight:d,transform:p,align:h,strikethrough:m,italic:g},{size:b})=>{const y=e.fn.variant({variant:"gradient",gradient:c});return{root:qK(sh(sh(sh(sh({},e.fn.fontStyles()),e.fn.focusStyles()),XK(n)),YK({theme:e,truncate:r})),{color:QK({color:t,theme:e}),fontFamily:s?"inherit":e.fontFamily,fontSize:s||b===void 0?"inherit":Xt({size:b,sizes:e.fontSizes}),lineHeight:s?"inherit":o?1:e.lineHeight,textDecoration:KK({underline:i,strikethrough:m}),WebkitTapHighlightColor:"transparent",fontWeight:s?"inherit":d,textTransform:p,textAlign:h,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const ZK=JK;var eQ=Object.defineProperty,xm=Object.getOwnPropertySymbols,nE=Object.prototype.hasOwnProperty,rE=Object.prototype.propertyIsEnumerable,y4=(e,t,n)=>t in e?eQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tQ=(e,t)=>{for(var n in t||(t={}))nE.call(t,n)&&y4(e,n,t[n]);if(xm)for(var n of xm(t))rE.call(t,n)&&y4(e,n,t[n]);return e},nQ=(e,t)=>{var n={};for(var r in e)nE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xm)for(var r of xm(e))t.indexOf(r)<0&&rE.call(e,r)&&(n[r]=e[r]);return n};const rQ={variant:"text"},oE=l.forwardRef((e,t)=>{const n=zr("Text",rQ,e),{className:r,size:o,weight:s,transform:i,color:c,align:d,variant:p,lineClamp:h,truncate:m,gradient:g,inline:b,inherit:y,underline:x,strikethrough:w,italic:S,classNames:j,styles:I,unstyled:_,span:M,__staticSelector:E}=n,A=nQ(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:D}=ZK({color:c,lineClamp:h,truncate:m,inline:b,inherit:y,underline:x,strikethrough:w,italic:S,weight:s,transform:i,align:d,gradient:g},{unstyled:_,name:E||"Text",variant:p,size:o});return z.createElement(Xo,tQ({ref:t,className:D(R.root,{[R.gradient]:p==="gradient"},r),component:M?"span":"div"},A))});oE.displayName="@mantine/core/Text";const xu=oE,ah={xs:qe(1),sm:qe(2),md:qe(3),lg:qe(4),xl:qe(5)};function ih(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var oQ=ko((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:qe(1),borderTop:`${Xt({size:n,sizes:ah})} ${r} ${ih(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Xt({size:n,sizes:ah})} ${r} ${ih(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:qe(Xt({size:n,sizes:ah})),borderTopColor:ih(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:qe(Xt({size:n,sizes:ah})),borderLeftColor:ih(e,t),borderLeftStyle:r}}));const sQ=oQ;var aQ=Object.defineProperty,iQ=Object.defineProperties,lQ=Object.getOwnPropertyDescriptors,ym=Object.getOwnPropertySymbols,sE=Object.prototype.hasOwnProperty,aE=Object.prototype.propertyIsEnumerable,C4=(e,t,n)=>t in e?aQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w4=(e,t)=>{for(var n in t||(t={}))sE.call(t,n)&&C4(e,n,t[n]);if(ym)for(var n of ym(t))aE.call(t,n)&&C4(e,n,t[n]);return e},cQ=(e,t)=>iQ(e,lQ(t)),uQ=(e,t)=>{var n={};for(var r in e)sE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ym)for(var r of ym(e))t.indexOf(r)<0&&aE.call(e,r)&&(n[r]=e[r]);return n};const dQ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Hb=l.forwardRef((e,t)=>{const n=zr("Divider",dQ,e),{className:r,color:o,orientation:s,size:i,label:c,labelPosition:d,labelProps:p,variant:h,styles:m,classNames:g,unstyled:b}=n,y=uQ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:x,cx:w}=sQ({color:o},{classNames:g,styles:m,unstyled:b,name:"Divider",variant:h,size:i}),S=s==="vertical",j=s==="horizontal",I=!!c&&j,_=!(p!=null&&p.color);return z.createElement(Xo,w4({ref:t,className:w(x.root,{[x.vertical]:S,[x.horizontal]:j,[x.withLabel]:I},r),role:"separator"},y),I&&z.createElement(xu,cQ(w4({},p),{size:(p==null?void 0:p.size)||"xs",mt:qe(2),className:w(x.label,x[d],{[x.labelDefaultStyles]:_})}),c))});Hb.displayName="@mantine/core/Divider";var fQ=Object.defineProperty,pQ=Object.defineProperties,hQ=Object.getOwnPropertyDescriptors,S4=Object.getOwnPropertySymbols,mQ=Object.prototype.hasOwnProperty,gQ=Object.prototype.propertyIsEnumerable,k4=(e,t,n)=>t in e?fQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j4=(e,t)=>{for(var n in t||(t={}))mQ.call(t,n)&&k4(e,n,t[n]);if(S4)for(var n of S4(t))gQ.call(t,n)&&k4(e,n,t[n]);return e},vQ=(e,t)=>pQ(e,hQ(t)),bQ=ko((e,t,{size:n})=>({item:vQ(j4({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:Xt({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":j4({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Xt({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Xt({size:n,sizes:e.spacing})} / 1.5) ${Xt({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const xQ=bQ;var yQ=Object.defineProperty,_4=Object.getOwnPropertySymbols,CQ=Object.prototype.hasOwnProperty,wQ=Object.prototype.propertyIsEnumerable,I4=(e,t,n)=>t in e?yQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SQ=(e,t)=>{for(var n in t||(t={}))CQ.call(t,n)&&I4(e,n,t[n]);if(_4)for(var n of _4(t))wQ.call(t,n)&&I4(e,n,t[n]);return e};function qy({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:s,__staticSelector:i,onItemHover:c,onItemSelect:d,itemsRefs:p,itemComponent:h,size:m,nothingFound:g,creatable:b,createLabel:y,unstyled:x,variant:w}){const{classes:S}=xQ(null,{classNames:n,styles:r,unstyled:x,name:i,variant:w,size:m}),j=[],I=[];let _=null;const M=(A,R)=>{const D=typeof o=="function"?o(A.value):!1;return z.createElement(h,SQ({key:A.value,className:S.item,"data-disabled":A.disabled||void 0,"data-hovered":!A.disabled&&t===R||void 0,"data-selected":!A.disabled&&D||void 0,selected:D,onMouseEnter:()=>c(R),id:`${s}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:O=>{p&&p.current&&(p.current[A.value]=O)},onMouseDown:A.disabled?null:O=>{O.preventDefault(),d(A)},disabled:A.disabled,variant:w},A))};let E=null;if(e.forEach((A,R)=>{A.creatable?_=R:A.group?(E!==A.group&&(E=A.group,I.push(z.createElement("div",{className:S.separator,key:`__mantine-divider-${R}`},z.createElement(Hb,{classNames:{label:S.separatorLabel},label:A.group})))),I.push(M(A,R))):j.push(M(A,R))}),b){const A=e[_];j.push(z.createElement("div",{key:Uy(),className:S.item,"data-hovered":t===_||void 0,onMouseEnter:()=>c(_),onMouseDown:R=>{R.preventDefault(),d(A)},tabIndex:-1,ref:R=>{p&&p.current&&(p.current[A.value]=R)}},y))}return I.length>0&&j.length>0&&j.unshift(z.createElement("div",{className:S.separator,key:"empty-group-separator"},z.createElement(Hb,null))),I.length>0||j.length>0?z.createElement(z.Fragment,null,I,j):z.createElement(xu,{size:m,unstyled:x,className:S.nothingFound},g)}qy.displayName="@mantine/core/SelectItems";var kQ=Object.defineProperty,Cm=Object.getOwnPropertySymbols,iE=Object.prototype.hasOwnProperty,lE=Object.prototype.propertyIsEnumerable,P4=(e,t,n)=>t in e?kQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jQ=(e,t)=>{for(var n in t||(t={}))iE.call(t,n)&&P4(e,n,t[n]);if(Cm)for(var n of Cm(t))lE.call(t,n)&&P4(e,n,t[n]);return e},_Q=(e,t)=>{var n={};for(var r in e)iE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cm)for(var r of Cm(e))t.indexOf(r)<0&&lE.call(e,r)&&(n[r]=e[r]);return n};const Ky=l.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,s=_Q(n,["label","value"]);return z.createElement("div",jQ({ref:t},s),r||o)});Ky.displayName="@mantine/core/DefaultItem";function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>IQ(n,t))}function rc(...e){return l.useCallback(cE(...e),e)}const uE=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),s=o.find(EQ);if(s){const i=s.props.children,c=o.map(d=>d===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:d);return l.createElement(Vb,wm({},r,{ref:t}),l.isValidElement(i)?l.cloneElement(i,void 0,c):null)}return l.createElement(Vb,wm({},r,{ref:t}),n)});uE.displayName="Slot";const Vb=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...MQ(r,n.props),ref:cE(t,n.ref)}):l.Children.count(n)>1?l.Children.only(null):null});Vb.displayName="SlotClone";const PQ=({children:e})=>l.createElement(l.Fragment,null,e);function EQ(e){return l.isValidElement(e)&&e.type===PQ}function MQ(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{s(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}const OQ=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Qf=OQ.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:s,...i}=r,c=s?uE:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(c,Wb({},i,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ub=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function AQ(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Xf=e=>{const{present:t,children:n}=e,r=RQ(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=rc(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Xf.displayName="Presence";function RQ(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,d]=AQ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const p=lh(r.current);s.current=c==="mounted"?p:"none"},[c]),Ub(()=>{const p=r.current,h=o.current;if(h!==e){const g=s.current,b=lh(p);e?d("MOUNT"):b==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(h&&g!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Ub(()=>{if(t){const p=m=>{const b=lh(r.current).includes(m.animationName);m.target===t&&b&&ls.flushSync(()=>d("ANIMATION_END"))},h=m=>{m.target===t&&(s.current=lh(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function lh(e){return(e==null?void 0:e.animationName)||"none"}function DQ(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),d=n.length;n=[...n,i];function p(m){const{scope:g,children:b,...y}=m,x=(g==null?void 0:g[e][d])||c,w=l.useMemo(()=>y,Object.values(y));return l.createElement(x.Provider,{value:w},b)}function h(m,g){const b=(g==null?void 0:g[e][d])||c,y=l.useContext(b);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return p.displayName=s+"Provider",[p,h]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const d=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,TQ(o,...t)]}function TQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((c,{useScope:d,scopeName:p})=>{const m=d(s)[`__scope${p}`];return{...c,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ol(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const NQ=l.createContext(void 0);function $Q(e){const t=l.useContext(NQ);return e||t||"ltr"}function LQ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ll(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function zQ(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const dE="ScrollArea",[fE,Nbe]=DQ(dE),[FQ,Bs]=fE(dE),BQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[c,d]=l.useState(null),[p,h]=l.useState(null),[m,g]=l.useState(null),[b,y]=l.useState(null),[x,w]=l.useState(null),[S,j]=l.useState(0),[I,_]=l.useState(0),[M,E]=l.useState(!1),[A,R]=l.useState(!1),D=rc(t,T=>d(T)),O=$Q(o);return l.createElement(FQ,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:c,viewport:p,onViewportChange:h,content:m,onContentChange:g,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:M,onScrollbarXEnabledChange:E,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:A,onScrollbarYEnabledChange:R,onCornerWidthChange:j,onCornerHeightChange:_},l.createElement(Qf.div,Kr({dir:O},i,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":I+"px",...e.style}})))}),HQ="ScrollAreaViewport",WQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,s=Bs(HQ,n),i=l.useRef(null),c=rc(t,i,s.onViewportChange);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(Qf.div,Kr({"data-radix-scroll-area-viewport":""},o,{ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style}}),l.createElement("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ei="ScrollAreaScrollbar",VQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return l.useEffect(()=>(c?s(!0):i(!0),()=>{c?s(!1):i(!1)}),[c,s,i]),o.type==="hover"?l.createElement(UQ,Kr({},r,{ref:t,forceMount:n})):o.type==="scroll"?l.createElement(GQ,Kr({},r,{ref:t,forceMount:n})):o.type==="auto"?l.createElement(pE,Kr({},r,{ref:t,forceMount:n})):o.type==="always"?l.createElement(Qy,Kr({},r,{ref:t})):null}),UQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),[s,i]=l.useState(!1);return l.useEffect(()=>{const c=o.scrollArea;let d=0;if(c){const p=()=>{window.clearTimeout(d),i(!0)},h=()=>{d=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",p),c.addEventListener("pointerleave",h),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",p),c.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),l.createElement(Xf,{present:n||s},l.createElement(pE,Kr({"data-state":s?"visible":"hidden"},r,{ref:t})))}),GQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bs(Ei,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Zg(()=>d("SCROLL_END"),100),[c,d]=zQ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return l.useEffect(()=>{if(c==="idle"){const p=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[c,o.scrollHideDelay,d]),l.useEffect(()=>{const p=o.viewport,h=s?"scrollLeft":"scrollTop";if(p){let m=p[h];const g=()=>{const b=p[h];m!==b&&(d("SCROLL"),i()),m=b};return p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[o.viewport,s,d,i]),l.createElement(Xf,{present:n||c!=="hidden"},l.createElement(Qy,Kr({"data-state":c==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Ll(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ll(e.onPointerLeave,()=>d("POINTER_LEAVE"))})))}),pE=l.forwardRef((e,t)=>{const n=Bs(Ei,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=l.useState(!1),c=e.orientation==="horizontal",d=Zg(()=>{if(n.viewport){const p=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Bs(Ei,e.__scopeScrollArea),s=l.useRef(null),i=l.useRef(0),[c,d]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=vE(c.viewport,c.content),h={...r,sizes:c,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:g=>s.current=g,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:g=>i.current=g};function m(g,b){return eX(g,i.current,c,b)}return n==="horizontal"?l.createElement(qQ,Kr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollLeft,b=E4(g,c,o.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=m(g,o.dir))}})):n==="vertical"?l.createElement(KQ,Kr({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const g=o.viewport.scrollTop,b=E4(g,c);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=m(g))}})):null}),qQ=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Bs(Ei,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarXChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(mE,Kr({"data-orientation":"horizontal"},o,{ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Jg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),xE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Sm(i.paddingLeft),paddingEnd:Sm(i.paddingRight)}})}}))}),KQ=l.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Bs(Ei,e.__scopeScrollArea),[i,c]=l.useState(),d=l.useRef(null),p=rc(t,d,s.onScrollbarYChange);return l.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),l.createElement(mE,Kr({"data-orientation":"vertical"},o,{ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Jg(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(s.viewport){const g=s.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),xE(g,m)&&h.preventDefault()}},onResize:()=>{d.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Sm(i.paddingTop),paddingEnd:Sm(i.paddingBottom)}})}}))}),[QQ,hE]=fE(Ei),mE=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:h,onResize:m,...g}=e,b=Bs(Ei,n),[y,x]=l.useState(null),w=rc(t,D=>x(D)),S=l.useRef(null),j=l.useRef(""),I=b.viewport,_=r.content-r.viewport,M=Ol(h),E=Ol(d),A=Zg(m,10);function R(D){if(S.current){const O=D.clientX-S.current.left,T=D.clientY-S.current.top;p({x:O,y:T})}}return l.useEffect(()=>{const D=O=>{const T=O.target;(y==null?void 0:y.contains(T))&&M(O,_)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[I,y,_,M]),l.useEffect(E,[r,E]),yu(y,A),yu(b.content,A),l.createElement(QQ,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:Ol(s),onThumbPointerUp:Ol(i),onThumbPositionChange:E,onThumbPointerDown:Ol(c)},l.createElement(Qf.div,Kr({},g,{ref:w,style:{position:"absolute",...g.style},onPointerDown:Ll(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),S.current=y.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(D))}),onPointerMove:Ll(e.onPointerMove,R),onPointerUp:Ll(e.onPointerUp,D=>{const O=D.target;O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=j.current,S.current=null})})))}),Gb="ScrollAreaThumb",XQ=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hE(Gb,e.__scopeScrollArea);return l.createElement(Xf,{present:n||o.hasThumb},l.createElement(YQ,Kr({ref:t},r)))}),YQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Bs(Gb,n),i=hE(Gb,n),{onThumbPositionChange:c}=i,d=rc(t,m=>i.onThumbChange(m)),p=l.useRef(),h=Zg(()=>{p.current&&(p.current(),p.current=void 0)},100);return l.useEffect(()=>{const m=s.viewport;if(m){const g=()=>{if(h(),!p.current){const b=tX(m,c);p.current=b,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[s.viewport,h,c]),l.createElement(Qf.div,Kr({"data-state":i.hasThumb?"visible":"hidden"},o,{ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ll(e.onPointerDownCapture,m=>{const b=m.target.getBoundingClientRect(),y=m.clientX-b.left,x=m.clientY-b.top;i.onThumbPointerDown({x:y,y:x})}),onPointerUp:Ll(e.onPointerUp,i.onThumbPointerUp)}))}),gE="ScrollAreaCorner",JQ=l.forwardRef((e,t)=>{const n=Bs(gE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.createElement(ZQ,Kr({},e,{ref:t})):null}),ZQ=l.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Bs(gE,n),[s,i]=l.useState(0),[c,d]=l.useState(0),p=!!(s&&c);return yu(o.scrollbarX,()=>{var h;const m=((h=o.scrollbarX)===null||h===void 0?void 0:h.offsetHeight)||0;o.onCornerHeightChange(m),d(m)}),yu(o.scrollbarY,()=>{var h;const m=((h=o.scrollbarY)===null||h===void 0?void 0:h.offsetWidth)||0;o.onCornerWidthChange(m),i(m)}),p?l.createElement(Qf.div,Kr({},r,{ref:t,style:{width:s,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Sm(e){return e?parseInt(e,10):0}function vE(e,t){const n=e/t;return isNaN(n)?0:n}function Jg(e){const t=vE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function eX(e,t,n,r="ltr"){const o=Jg(n),s=o/2,i=t||s,c=o-i,d=n.scrollbar.paddingStart+i,p=n.scrollbar.size-n.scrollbar.paddingEnd-c,h=n.content-n.viewport,m=r==="ltr"?[0,h]:[h*-1,0];return bE([d,p],m)(e)}function E4(e,t,n="ltr"){const r=Jg(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,c=s-r,d=n==="ltr"?[0,i]:[i*-1,0],p=LQ(e,d);return bE([0,i],[0,c])(p)}function bE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function xE(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,c=n.top!==s.top;(i||c)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Zg(e,t){const n=Ol(e),r=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),l.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function yu(e,t){const n=Ol(t);Ub(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const nX=BQ,rX=WQ,M4=VQ,O4=XQ,oX=JQ;var sX=ko((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?qe(t):void 0,paddingBottom:n?qe(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${qe(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Nk("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:qe(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:qe(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Nk("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:qe(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:qe(44),minHeight:qe(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const aX=sX;var iX=Object.defineProperty,lX=Object.defineProperties,cX=Object.getOwnPropertyDescriptors,km=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,A4=(e,t,n)=>t in e?iX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qb=(e,t)=>{for(var n in t||(t={}))yE.call(t,n)&&A4(e,n,t[n]);if(km)for(var n of km(t))CE.call(t,n)&&A4(e,n,t[n]);return e},wE=(e,t)=>lX(e,cX(t)),SE=(e,t)=>{var n={};for(var r in e)yE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&km)for(var r of km(e))t.indexOf(r)<0&&CE.call(e,r)&&(n[r]=e[r]);return n};const kE={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},e0=l.forwardRef((e,t)=>{const n=zr("ScrollArea",kE,e),{children:r,className:o,classNames:s,styles:i,scrollbarSize:c,scrollHideDelay:d,type:p,dir:h,offsetScrollbars:m,viewportRef:g,onScrollPositionChange:b,unstyled:y,variant:x,viewportProps:w}=n,S=SE(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[j,I]=l.useState(!1),_=Ii(),{classes:M,cx:E}=aX({scrollbarSize:c,offsetScrollbars:m,scrollbarHovered:j,hidden:p==="never"},{name:"ScrollArea",classNames:s,styles:i,unstyled:y,variant:x});return z.createElement(nX,{type:p==="never"?"always":p,scrollHideDelay:d,dir:h||_.dir,ref:t,asChild:!0},z.createElement(Xo,qb({className:E(M.root,o)},S),z.createElement(rX,wE(qb({},w),{className:M.viewport,ref:g,onScroll:typeof b=="function"?({currentTarget:A})=>b({x:A.scrollLeft,y:A.scrollTop}):void 0}),r),z.createElement(M4,{orientation:"horizontal",className:M.scrollbar,forceMount:!0,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},z.createElement(O4,{className:M.thumb})),z.createElement(M4,{orientation:"vertical",className:M.scrollbar,forceMount:!0,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},z.createElement(O4,{className:M.thumb})),z.createElement(oX,{className:M.corner})))}),jE=l.forwardRef((e,t)=>{const n=zr("ScrollAreaAutosize",kE,e),{children:r,classNames:o,styles:s,scrollbarSize:i,scrollHideDelay:c,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,sx:y,variant:x,viewportProps:w}=n,S=SE(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return z.createElement(Xo,wE(qb({},S),{ref:t,sx:[{display:"flex"},...f6(y)]}),z.createElement(Xo,{sx:{display:"flex",flexDirection:"column",flex:1}},z.createElement(e0,{classNames:o,styles:s,scrollHideDelay:c,scrollbarSize:i,type:d,dir:p,offsetScrollbars:h,viewportRef:m,onScrollPositionChange:g,unstyled:b,variant:x,viewportProps:w},r)))});jE.displayName="@mantine/core/ScrollAreaAutosize";e0.displayName="@mantine/core/ScrollArea";e0.Autosize=jE;const _E=e0;var uX=Object.defineProperty,dX=Object.defineProperties,fX=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,PE=Object.prototype.propertyIsEnumerable,R4=(e,t,n)=>t in e?uX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D4=(e,t)=>{for(var n in t||(t={}))IE.call(t,n)&&R4(e,n,t[n]);if(jm)for(var n of jm(t))PE.call(t,n)&&R4(e,n,t[n]);return e},pX=(e,t)=>dX(e,fX(t)),hX=(e,t)=>{var n={};for(var r in e)IE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jm)for(var r of jm(e))t.indexOf(r)<0&&PE.call(e,r)&&(n[r]=e[r]);return n};const t0=l.forwardRef((e,t)=>{var n=e,{style:r}=n,o=hX(n,["style"]);return z.createElement(_E,pX(D4({},o),{style:D4({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});t0.displayName="@mantine/core/SelectScrollArea";var mX=ko(()=>({dropdown:{},itemsWrapper:{padding:qe(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const gX=mX,ia=Math.min,xo=Math.max,_m=Math.round,ch=Math.floor,ol=e=>({x:e,y:e}),vX={left:"right",right:"left",bottom:"top",top:"bottom"},bX={start:"end",end:"start"};function Kb(e,t,n){return xo(e,ia(t,n))}function hi(e,t){return typeof e=="function"?e(t):e}function la(e){return e.split("-")[0]}function Fu(e){return e.split("-")[1]}function Xy(e){return e==="x"?"y":"x"}function Yy(e){return e==="y"?"height":"width"}function oc(e){return["top","bottom"].includes(la(e))?"y":"x"}function Jy(e){return Xy(oc(e))}function xX(e,t,n){n===void 0&&(n=!1);const r=Fu(e),o=Jy(e),s=Yy(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Im(i)),[i,Im(i)]}function yX(e){const t=Im(e);return[Qb(e),t,Qb(t)]}function Qb(e){return e.replace(/start|end/g,t=>bX[t])}function CX(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function wX(e,t,n,r){const o=Fu(e);let s=CX(la(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Qb)))),s}function Im(e){return e.replace(/left|right|bottom|top/g,t=>vX[t])}function SX(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zy(e){return typeof e!="number"?SX(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T4(e,t,n){let{reference:r,floating:o}=e;const s=oc(t),i=Jy(t),c=Yy(i),d=la(t),p=s==="y",h=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,g=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:h,y:r.y-o.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-o.width,y:m};break;default:b={x:r.x,y:r.y}}switch(Fu(t)){case"start":b[i]-=g*(n&&p?-1:1);break;case"end":b[i]+=g*(n&&p?-1:1);break}return b}const kX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let p=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:m}=T4(p,r,d),g=r,b={},y=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:d}=t,{element:p,padding:h=0}=hi(e,t)||{};if(p==null)return{};const m=Zy(h),g={x:n,y:r},b=Jy(o),y=Yy(b),x=await i.getDimensions(p),w=b==="y",S=w?"top":"left",j=w?"bottom":"right",I=w?"clientHeight":"clientWidth",_=s.reference[y]+s.reference[b]-g[b]-s.floating[y],M=g[b]-s.reference[b],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let A=E?E[I]:0;(!A||!await(i.isElement==null?void 0:i.isElement(E)))&&(A=c.floating[I]||s.floating[y]);const R=_/2-M/2,D=A/2-x[y]/2-1,O=ia(m[S],D),T=ia(m[j],D),K=O,G=A-x[y]-T,Q=A/2-x[y]/2+R,Z=Kb(K,Q,G),te=!d.arrow&&Fu(o)!=null&&Q!=Z&&s.reference[y]/2-(QK<=0)){var D,O;const K=(((D=s.flip)==null?void 0:D.index)||0)+1,G=M[K];if(G)return{data:{index:K,overflows:R},reset:{placement:G}};let Q=(O=R.filter(Z=>Z.overflows[0]<=0).sort((Z,te)=>Z.overflows[1]-te.overflows[1])[0])==null?void 0:O.placement;if(!Q)switch(b){case"bestFit":{var T;const Z=(T=R.map(te=>[te.placement,te.overflows.filter(V=>V>0).reduce((V,oe)=>V+oe,0)]).sort((te,V)=>te[1]-V[1])[0])==null?void 0:T[0];Z&&(Q=Z);break}case"initialPlacement":Q=c;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}};function EE(e){const t=ia(...e.map(s=>s.left)),n=ia(...e.map(s=>s.top)),r=xo(...e.map(s=>s.right)),o=xo(...e.map(s=>s.bottom));return{x:t,y:n,width:r-t,height:o-n}}function _X(e){const t=e.slice().sort((o,s)=>o.y-s.y),n=[];let r=null;for(let o=0;or.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(o=>Cu(EE(o)))}const IX=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:s,strategy:i}=t,{padding:c=2,x:d,y:p}=hi(e,t),h=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),m=_X(h),g=Cu(EE(h)),b=Zy(c);function y(){if(m.length===2&&m[0].left>m[1].right&&d!=null&&p!=null)return m.find(w=>d>w.left-b.left&&dw.top-b.top&&p=2){if(oc(n)==="y"){const O=m[0],T=m[m.length-1],K=la(n)==="top",G=O.top,Q=T.bottom,Z=K?O.left:T.left,te=K?O.right:T.right,V=te-Z,oe=Q-G;return{top:G,bottom:Q,left:Z,right:te,width:V,height:oe,x:Z,y:G}}const w=la(n)==="left",S=xo(...m.map(O=>O.right)),j=ia(...m.map(O=>O.left)),I=m.filter(O=>w?O.left===j:O.right===S),_=I[0].top,M=I[I.length-1].bottom,E=j,A=S,R=A-E,D=M-_;return{top:_,bottom:M,left:E,right:A,width:R,height:D,x:E,y:_}}return g}const x=await s.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:i});return o.reference.x!==x.reference.x||o.reference.y!==x.reference.y||o.reference.width!==x.reference.width||o.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}};async function PX(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=la(n),c=Fu(n),d=oc(n)==="y",p=["left","top"].includes(i)?-1:1,h=s&&d?-1:1,m=hi(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),d?{x:b*h,y:g*p}:{x:g*p,y:b*h}}const EX=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await PX(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},MX=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:w=>{let{x:S,y:j}=w;return{x:S,y:j}}},...d}=hi(e,t),p={x:n,y:r},h=await e2(t,d),m=oc(la(o)),g=Xy(m);let b=p[g],y=p[m];if(s){const w=g==="y"?"top":"left",S=g==="y"?"bottom":"right",j=b+h[w],I=b-h[S];b=Kb(j,b,I)}if(i){const w=m==="y"?"top":"left",S=m==="y"?"bottom":"right",j=y+h[w],I=y-h[S];y=Kb(j,y,I)}const x=c.fn({...t,[g]:b,[m]:y});return{...x,data:{x:x.x-n,y:x.y-r}}}}},OX=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:d=!0,crossAxis:p=!0}=hi(e,t),h={x:n,y:r},m=oc(o),g=Xy(m);let b=h[g],y=h[m];const x=hi(c,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const I=g==="y"?"height":"width",_=s.reference[g]-s.floating[I]+w.mainAxis,M=s.reference[g]+s.reference[I]-w.mainAxis;b<_?b=_:b>M&&(b=M)}if(p){var S,j;const I=g==="y"?"width":"height",_=["top","left"].includes(la(o)),M=s.reference[m]-s.floating[I]+(_&&((S=i.offset)==null?void 0:S[m])||0)+(_?0:w.crossAxis),E=s.reference[m]+s.reference[I]+(_?0:((j=i.offset)==null?void 0:j[m])||0)-(_?w.crossAxis:0);yE&&(y=E)}return{[g]:b,[m]:y}}}},AX=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...c}=hi(e,t),d=await e2(t,c),p=la(n),h=Fu(n),m=oc(n)==="y",{width:g,height:b}=r.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=p,y=h==="end"?"top":"bottom");const w=b-d[y],S=g-d[x],j=!t.middlewareData.shift;let I=w,_=S;if(m){const E=g-d.left-d.right;_=h||j?ia(S,E):E}else{const E=b-d.top-d.bottom;I=h||j?ia(w,E):E}if(j&&!h){const E=xo(d.left,0),A=xo(d.right,0),R=xo(d.top,0),D=xo(d.bottom,0);m?_=g-2*(E!==0||A!==0?E+A:xo(d.left,d.right)):I=b-2*(R!==0||D!==0?R+D:xo(d.top,d.bottom))}await i({...t,availableWidth:_,availableHeight:I});const M=await o.getDimensions(s.floating);return g!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}};function sl(e){return ME(e)?(e.nodeName||"").toLowerCase():"#document"}function ds(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mi(e){var t;return(t=(ME(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ME(e){return e instanceof Node||e instanceof ds(e).Node}function mi(e){return e instanceof Element||e instanceof ds(e).Element}function Da(e){return e instanceof HTMLElement||e instanceof ds(e).HTMLElement}function $4(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ds(e).ShadowRoot}function Yf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ns(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function RX(e){return["table","td","th"].includes(sl(e))}function t2(e){const t=n2(),n=Ns(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function DX(e){let t=wu(e);for(;Da(t)&&!n0(t);){if(t2(t))return t;t=wu(t)}return null}function n2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function n0(e){return["html","body","#document"].includes(sl(e))}function Ns(e){return ds(e).getComputedStyle(e)}function r0(e){return mi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wu(e){if(sl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$4(e)&&e.host||Mi(e);return $4(t)?t.host:t}function OE(e){const t=wu(e);return n0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Da(t)&&Yf(t)?t:OE(t)}function uf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=OE(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ds(o);return s?t.concat(i,i.visualViewport||[],Yf(o)?o:[],i.frameElement&&n?uf(i.frameElement):[]):t.concat(o,uf(o,[],n))}function AE(e){const t=Ns(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Da(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=_m(n)!==s||_m(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function r2(e){return mi(e)?e:e.contextElement}function iu(e){const t=r2(e);if(!Da(t))return ol(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=AE(t);let i=(s?_m(n.width):n.width)/r,c=(s?_m(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const TX=ol(0);function RE(e){const t=ds(e);return!n2()||!t.visualViewport?TX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NX(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ds(e)?!1:t}function Ql(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=r2(e);let i=ol(1);t&&(r?mi(r)&&(i=iu(r)):i=iu(e));const c=NX(s,n,r)?RE(s):ol(0);let d=(o.left+c.x)/i.x,p=(o.top+c.y)/i.y,h=o.width/i.x,m=o.height/i.y;if(s){const g=ds(s),b=r&&mi(r)?ds(r):r;let y=g.frameElement;for(;y&&r&&b!==g;){const x=iu(y),w=y.getBoundingClientRect(),S=Ns(y),j=w.left+(y.clientLeft+parseFloat(S.paddingLeft))*x.x,I=w.top+(y.clientTop+parseFloat(S.paddingTop))*x.y;d*=x.x,p*=x.y,h*=x.x,m*=x.y,d+=j,p+=I,y=ds(y).frameElement}}return Cu({width:h,height:m,x:d,y:p})}function $X(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Da(n),s=Mi(n);if(n===s)return t;let i={scrollLeft:0,scrollTop:0},c=ol(1);const d=ol(0);if((o||!o&&r!=="fixed")&&((sl(n)!=="body"||Yf(s))&&(i=r0(n)),Da(n))){const p=Ql(n);c=iu(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-i.scrollLeft*c.x+d.x,y:t.y*c.y-i.scrollTop*c.y+d.y}}function LX(e){return Array.from(e.getClientRects())}function DE(e){return Ql(Mi(e)).left+r0(e).scrollLeft}function zX(e){const t=Mi(e),n=r0(e),r=e.ownerDocument.body,o=xo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+DE(e);const c=-n.scrollTop;return Ns(r).direction==="rtl"&&(i+=xo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function FX(e,t){const n=ds(e),r=Mi(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,d=0;if(o){s=o.width,i=o.height;const p=n2();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:s,height:i,x:c,y:d}}function BX(e,t){const n=Ql(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Da(e)?iu(e):ol(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,d=o*s.x,p=r*s.y;return{width:i,height:c,x:d,y:p}}function L4(e,t,n){let r;if(t==="viewport")r=FX(e,n);else if(t==="document")r=zX(Mi(e));else if(mi(t))r=BX(t,n);else{const o=RE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Cu(r)}function TE(e,t){const n=wu(e);return n===t||!mi(n)||n0(n)?!1:Ns(n).position==="fixed"||TE(n,t)}function HX(e,t){const n=t.get(e);if(n)return n;let r=uf(e,[],!1).filter(c=>mi(c)&&sl(c)!=="body"),o=null;const s=Ns(e).position==="fixed";let i=s?wu(e):e;for(;mi(i)&&!n0(i);){const c=Ns(i),d=t2(i);!d&&c.position==="fixed"&&(o=null),(s?!d&&!o:!d&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Yf(i)&&!d&&TE(e,i))?r=r.filter(h=>h!==i):o=c,i=wu(i)}return t.set(e,r),r}function WX(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?HX(t,this._c):[].concat(n),r],c=i[0],d=i.reduce((p,h)=>{const m=L4(t,h,o);return p.top=xo(m.top,p.top),p.right=ia(m.right,p.right),p.bottom=ia(m.bottom,p.bottom),p.left=xo(m.left,p.left),p},L4(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function VX(e){return AE(e)}function UX(e,t,n){const r=Da(t),o=Mi(t),s=n==="fixed",i=Ql(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=ol(0);if(r||!r&&!s)if((sl(t)!=="body"||Yf(o))&&(c=r0(t)),r){const p=Ql(t,!0,s,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else o&&(d.x=DE(o));return{x:i.left+c.scrollLeft-d.x,y:i.top+c.scrollTop-d.y,width:i.width,height:i.height}}function z4(e,t){return!Da(e)||Ns(e).position==="fixed"?null:t?t(e):e.offsetParent}function NE(e,t){const n=ds(e);if(!Da(e))return n;let r=z4(e,t);for(;r&&RX(r)&&Ns(r).position==="static";)r=z4(r,t);return r&&(sl(r)==="html"||sl(r)==="body"&&Ns(r).position==="static"&&!t2(r))?n:r||DX(e)||n}const GX=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||NE,s=this.getDimensions;return{reference:UX(t,await o(n),r),floating:{x:0,y:0,...await s(n)}}};function qX(e){return Ns(e).direction==="rtl"}const KX={convertOffsetParentRelativeRectToViewportRelativeRect:$X,getDocumentElement:Mi,getClippingRect:WX,getOffsetParent:NE,getElementRects:GX,getClientRects:LX,getDimensions:VX,getScale:iu,isElement:mi,isRTL:qX};function QX(e,t){let n=null,r;const o=Mi(e);function s(){clearTimeout(r),n&&n.disconnect(),n=null}function i(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const{left:p,top:h,width:m,height:g}=e.getBoundingClientRect();if(c||t(),!m||!g)return;const b=ch(h),y=ch(o.clientWidth-(p+m)),x=ch(o.clientHeight-(h+g)),w=ch(p),j={rootMargin:-b+"px "+-y+"px "+-x+"px "+-w+"px",threshold:xo(0,ia(1,d))||1};let I=!0;function _(M){const E=M[0].intersectionRatio;if(E!==d){if(!I)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},100)}I=!1}try{n=new IntersectionObserver(_,{...j,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,j)}n.observe(e)}return i(!0),s}function XX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,p=r2(e),h=o||s?[...p?uf(p):[],...uf(t)]:[];h.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const m=p&&c?QX(p,n):null;let g=-1,b=null;i&&(b=new ResizeObserver(S=>{let[j]=S;j&&j.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{b&&b.observe(t)})),n()}),p&&!d&&b.observe(p),b.observe(t));let y,x=d?Ql(e):null;d&&w();function w(){const S=Ql(e);x&&(S.x!==x.x||S.y!==x.y||S.width!==x.width||S.height!==x.height)&&n(),x=S,y=requestAnimationFrame(w)}return n(),()=>{h.forEach(S=>{o&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),m&&m(),b&&b.disconnect(),b=null,d&&cancelAnimationFrame(y)}}const YX=(e,t,n)=>{const r=new Map,o={platform:KX,...n},s={...o.platform,_c:r};return kX(e,t,{...o,platform:s})},JX=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?N4({element:t.current,padding:n}).fn(o):{}:t?N4({element:t,padding:n}).fn(o):{}}}};var Nh=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Pm(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Pm(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function F4(e){const t=l.useRef(e);return Nh(()=>{t.current=e}),t}function ZX(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:s,open:i}=e,[c,d]=l.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);Pm(p,r)||h(r);const m=l.useRef(null),g=l.useRef(null),b=l.useRef(c),y=F4(s),x=F4(o),[w,S]=l.useState(null),[j,I]=l.useState(null),_=l.useCallback(O=>{m.current!==O&&(m.current=O,S(O))},[]),M=l.useCallback(O=>{g.current!==O&&(g.current=O,I(O))},[]),E=l.useCallback(()=>{if(!m.current||!g.current)return;const O={placement:t,strategy:n,middleware:p};x.current&&(O.platform=x.current),YX(m.current,g.current,O).then(T=>{const K={...T,isPositioned:!0};A.current&&!Pm(b.current,K)&&(b.current=K,ls.flushSync(()=>{d(K)}))})},[p,t,n,x]);Nh(()=>{i===!1&&b.current.isPositioned&&(b.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[i]);const A=l.useRef(!1);Nh(()=>(A.current=!0,()=>{A.current=!1}),[]),Nh(()=>{if(w&&j){if(y.current)return y.current(w,j,E);E()}},[w,j,E,y]);const R=l.useMemo(()=>({reference:m,floating:g,setReference:_,setFloating:M}),[_,M]),D=l.useMemo(()=>({reference:w,floating:j}),[w,j]);return l.useMemo(()=>({...c,update:E,refs:R,elements:D,reference:_,floating:M}),[c,E,R,D,_,M])}var eY=typeof document<"u"?l.useLayoutEffect:l.useEffect;function tY(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const nY=l.createContext(null),rY=()=>l.useContext(nY);function oY(e){return(e==null?void 0:e.ownerDocument)||document}function sY(e){return oY(e).defaultView||window}function uh(e){return e?e instanceof sY(e).Element:!1}const aY=Ox["useInsertionEffect".toString()],iY=aY||(e=>e());function lY(e){const t=l.useRef(()=>{});return iY(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;otY())[0],[p,h]=l.useState(null),m=l.useCallback(S=>{const j=uh(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;o.refs.setReference(j)},[o.refs]),g=l.useCallback(S=>{(uh(S)||S===null)&&(i.current=S,h(S)),(uh(o.refs.reference.current)||o.refs.reference.current===null||S!==null&&!uh(S))&&o.refs.setReference(S)},[o.refs]),b=l.useMemo(()=>({...o.refs,setReference:g,setPositionReference:m,domReference:i}),[o.refs,g,m]),y=l.useMemo(()=>({...o.elements,domReference:p}),[o.elements,p]),x=lY(n),w=l.useMemo(()=>({...o,refs:b,elements:y,dataRef:c,nodeId:r,events:d,open:t,onOpenChange:x}),[o,r,d,t,x,b,y]);return eY(()=>{const S=s==null?void 0:s.nodesRef.current.find(j=>j.id===r);S&&(S.context=w)}),l.useMemo(()=>({...o,context:w,refs:b,reference:g,positionReference:m}),[o,b,w,g,m])}function uY({opened:e,floating:t,position:n,positionDependencies:r}){const[o,s]=l.useState(0);l.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return XX(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),oa(()=>{t.update()},r),oa(()=>{s(i=>i+1)},[e])}function dY(e){const t=[EX(e.offset)];return e.middlewares.shift&&t.push(MX({limiter:OX()})),e.middlewares.flip&&t.push(jX()),e.middlewares.inline&&t.push(IX()),t.push(JX({element:e.arrowRef,padding:e.arrowOffset})),t}function fY(e){const[t,n]=cf({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var i;(i=e.onClose)==null||i.call(e),n(!1)},o=()=>{var i,c;t?((i=e.onClose)==null||i.call(e),n(!1)):((c=e.onOpen)==null||c.call(e),n(!0))},s=cY({placement:e.position,middleware:[...dY(e),...e.width==="target"?[AX({apply({rects:i}){var c,d;Object.assign((d=(c=s.refs.floating.current)==null?void 0:c.style)!=null?d:{},{width:`${i.reference.width}px`})}})]:[]]});return uY({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:s}),oa(()=>{var i;(i=e.onPositionChange)==null||i.call(e,s.placement)},[s.placement]),oa(()=>{var i,c;e.opened?(c=e.onOpen)==null||c.call(e):(i=e.onClose)==null||i.call(e)},[e.opened]),{floating:s,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const $E={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[pY,LE]=NG($E.context);var hY=Object.defineProperty,mY=Object.defineProperties,gY=Object.getOwnPropertyDescriptors,Em=Object.getOwnPropertySymbols,zE=Object.prototype.hasOwnProperty,FE=Object.prototype.propertyIsEnumerable,B4=(e,t,n)=>t in e?hY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dh=(e,t)=>{for(var n in t||(t={}))zE.call(t,n)&&B4(e,n,t[n]);if(Em)for(var n of Em(t))FE.call(t,n)&&B4(e,n,t[n]);return e},vY=(e,t)=>mY(e,gY(t)),bY=(e,t)=>{var n={};for(var r in e)zE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Em)for(var r of Em(e))t.indexOf(r)<0&&FE.call(e,r)&&(n[r]=e[r]);return n};const xY={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},BE=l.forwardRef((e,t)=>{const n=zr("PopoverTarget",xY,e),{children:r,refProp:o,popupType:s,shouldOverrideDefaultTargetId:i}=n,c=bY(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!h6(r))throw new Error($E.children);const d=c,p=LE(),h=Kf(p.reference,r.ref,t),m=p.withRoles?{"aria-haspopup":s,"aria-expanded":p.opened,"aria-controls":p.getDropdownId(),id:i?p.getTargetId():r.props.id}:{};return l.cloneElement(r,dh(vY(dh(dh(dh({},d),m),p.targetProps),{className:g6(p.targetProps.className,d.className,r.props.className),[o]:h}),p.controlled?null:{onClick:p.onToggle}))});BE.displayName="@mantine/core/PopoverTarget";var yY=ko((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const CY=yY;var wY=Object.defineProperty,H4=Object.getOwnPropertySymbols,SY=Object.prototype.hasOwnProperty,kY=Object.prototype.propertyIsEnumerable,W4=(e,t,n)=>t in e?wY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oc=(e,t)=>{for(var n in t||(t={}))SY.call(t,n)&&W4(e,n,t[n]);if(H4)for(var n of H4(t))kY.call(t,n)&&W4(e,n,t[n]);return e};const V4={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function jY({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in rh?Oc(Oc(Oc({transitionProperty:rh[e].transitionProperty},o),rh[e].common),rh[e][V4[t]]):null:Oc(Oc(Oc({transitionProperty:e.transitionProperty},o),e.common),e[V4[t]])}function _Y({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:s,onEntered:i,onExited:c}){const d=Ii(),p=S6(),h=d.respectReducedMotion?p:!1,[m,g]=l.useState(h?0:e),[b,y]=l.useState(r?"entered":"exited"),x=l.useRef(-1),w=S=>{const j=S?o:s,I=S?i:c;y(S?"pre-entering":"pre-exiting"),window.clearTimeout(x.current);const _=h?0:S?e:t;if(g(_),_===0)typeof j=="function"&&j(),typeof I=="function"&&I(),y(S?"entered":"exited");else{const M=window.setTimeout(()=>{typeof j=="function"&&j(),y(S?"entering":"exiting")},10);x.current=window.setTimeout(()=>{window.clearTimeout(M),typeof I=="function"&&I(),y(S?"entered":"exited")},_)}};return oa(()=>{w(r)},[r]),l.useEffect(()=>()=>window.clearTimeout(x.current),[]),{transitionDuration:m,transitionStatus:b,transitionTimingFunction:n||d.transitionTimingFunction}}function HE({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:s,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h}){const{transitionDuration:m,transitionStatus:g,transitionTimingFunction:b}=_Y({mounted:o,exitDuration:r,duration:n,timingFunction:i,onExit:c,onEntered:d,onEnter:p,onExited:h});return m===0?o?z.createElement(z.Fragment,null,s({})):e?s({display:"none"}):null:g==="exited"?e?s({display:"none"}):null:z.createElement(z.Fragment,null,s(jY({transition:t,duration:m,state:g,timingFunction:b})))}HE.displayName="@mantine/core/Transition";function WE({children:e,active:t=!0,refProp:n="ref"}){const r=gq(t),o=Kf(r,e==null?void 0:e.ref);return h6(e)?l.cloneElement(e,{[n]:o}):e}WE.displayName="@mantine/core/FocusTrap";var IY=Object.defineProperty,PY=Object.defineProperties,EY=Object.getOwnPropertyDescriptors,U4=Object.getOwnPropertySymbols,MY=Object.prototype.hasOwnProperty,OY=Object.prototype.propertyIsEnumerable,G4=(e,t,n)=>t in e?IY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bi=(e,t)=>{for(var n in t||(t={}))MY.call(t,n)&&G4(e,n,t[n]);if(U4)for(var n of U4(t))OY.call(t,n)&&G4(e,n,t[n]);return e},fh=(e,t)=>PY(e,EY(t));function q4(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function K4(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const AY={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function RY({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:s,arrowY:i,dir:c}){const[d,p="center"]=e.split("-"),h={width:qe(t),height:qe(t),transform:"rotate(45deg)",position:"absolute",[AY[d]]:qe(r)},m=qe(-t/2);return d==="left"?fh(Bi(Bi({},h),q4(p,i,n,o)),{right:m,borderLeftColor:"transparent",borderBottomColor:"transparent"}):d==="right"?fh(Bi(Bi({},h),q4(p,i,n,o)),{left:m,borderRightColor:"transparent",borderTopColor:"transparent"}):d==="top"?fh(Bi(Bi({},h),K4(p,s,n,o,c)),{bottom:m,borderTopColor:"transparent",borderLeftColor:"transparent"}):d==="bottom"?fh(Bi(Bi({},h),K4(p,s,n,o,c)),{top:m,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var DY=Object.defineProperty,TY=Object.defineProperties,NY=Object.getOwnPropertyDescriptors,Mm=Object.getOwnPropertySymbols,VE=Object.prototype.hasOwnProperty,UE=Object.prototype.propertyIsEnumerable,Q4=(e,t,n)=>t in e?DY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$Y=(e,t)=>{for(var n in t||(t={}))VE.call(t,n)&&Q4(e,n,t[n]);if(Mm)for(var n of Mm(t))UE.call(t,n)&&Q4(e,n,t[n]);return e},LY=(e,t)=>TY(e,NY(t)),zY=(e,t)=>{var n={};for(var r in e)VE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mm)for(var r of Mm(e))t.indexOf(r)<0&&UE.call(e,r)&&(n[r]=e[r]);return n};const GE=l.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,visible:d,arrowX:p,arrowY:h}=n,m=zY(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=Ii();return d?z.createElement("div",LY($Y({},m),{ref:t,style:RY({position:r,arrowSize:o,arrowOffset:s,arrowRadius:i,arrowPosition:c,dir:g.dir,arrowX:p,arrowY:h})})):null});GE.displayName="@mantine/core/FloatingArrow";var FY=Object.defineProperty,BY=Object.defineProperties,HY=Object.getOwnPropertyDescriptors,Om=Object.getOwnPropertySymbols,qE=Object.prototype.hasOwnProperty,KE=Object.prototype.propertyIsEnumerable,X4=(e,t,n)=>t in e?FY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ac=(e,t)=>{for(var n in t||(t={}))qE.call(t,n)&&X4(e,n,t[n]);if(Om)for(var n of Om(t))KE.call(t,n)&&X4(e,n,t[n]);return e},ph=(e,t)=>BY(e,HY(t)),WY=(e,t)=>{var n={};for(var r in e)qE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Om)for(var r of Om(e))t.indexOf(r)<0&&KE.call(e,r)&&(n[r]=e[r]);return n};const VY={};function QE(e){var t;const n=zr("PopoverDropdown",VY,e),{style:r,className:o,children:s,onKeyDownCapture:i}=n,c=WY(n,["style","className","children","onKeyDownCapture"]),d=LE(),{classes:p,cx:h}=CY({radius:d.radius,shadow:d.shadow},{name:d.__staticSelector,classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),m=cq({opened:d.opened,shouldReturnFocus:d.returnFocus}),g=d.withRoles?{"aria-labelledby":d.getTargetId(),id:d.getDropdownId(),role:"dialog"}:{};return d.disabled?null:z.createElement(K6,ph(Ac({},d.portalProps),{withinPortal:d.withinPortal}),z.createElement(HE,ph(Ac({mounted:d.opened},d.transitionProps),{transition:d.transitionProps.transition||"fade",duration:(t=d.transitionProps.duration)!=null?t:150,keepMounted:d.keepMounted,exitDuration:typeof d.transitionProps.exitDuration=="number"?d.transitionProps.exitDuration:d.transitionProps.duration}),b=>{var y,x;return z.createElement(WE,{active:d.trapFocus},z.createElement(Xo,Ac(ph(Ac({},g),{tabIndex:-1,ref:d.floating,style:ph(Ac(Ac({},r),b),{zIndex:d.zIndex,top:(y=d.y)!=null?y:0,left:(x=d.x)!=null?x:0,width:d.width==="target"?void 0:qe(d.width)}),className:h(p.dropdown,o),onKeyDownCapture:LG(d.onClose,{active:d.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":d.placement}),c),s,z.createElement(GE,{ref:d.arrowRef,arrowX:d.arrowX,arrowY:d.arrowY,visible:d.withArrow,position:d.placement,arrowSize:d.arrowSize,arrowRadius:d.arrowRadius,arrowOffset:d.arrowOffset,arrowPosition:d.arrowPosition,className:p.arrow})))}))}QE.displayName="@mantine/core/PopoverDropdown";function UY(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var Y4=Object.getOwnPropertySymbols,GY=Object.prototype.hasOwnProperty,qY=Object.prototype.propertyIsEnumerable,KY=(e,t)=>{var n={};for(var r in e)GY.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Y4)for(var r of Y4(e))t.indexOf(r)<0&&qY.call(e,r)&&(n[r]=e[r]);return n};const QY={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Vy("popover"),__staticSelector:"Popover",width:"max-content"};function Bu(e){var t,n,r,o,s,i;const c=l.useRef(null),d=zr("Popover",QY,e),{children:p,position:h,offset:m,onPositionChange:g,positionDependencies:b,opened:y,transitionProps:x,width:w,middlewares:S,withArrow:j,arrowSize:I,arrowOffset:_,arrowRadius:M,arrowPosition:E,unstyled:A,classNames:R,styles:D,closeOnClickOutside:O,withinPortal:T,portalProps:K,closeOnEscape:G,clickOutsideEvents:Q,trapFocus:Z,onClose:te,onOpen:V,onChange:oe,zIndex:ne,radius:se,shadow:re,id:ae,defaultOpened:B,__staticSelector:X,withRoles:$,disabled:F,returnFocus:q,variant:pe,keepMounted:W}=d,U=KY(d,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[ee,Y]=l.useState(null),[ge,he]=l.useState(null),de=Gy(ae),_e=Ii(),Pe=fY({middlewares:S,width:w,position:UY(_e.dir,h),offset:typeof m=="number"?m+(j?I/2:0):m,arrowRef:c,arrowOffset:_,onPositionChange:g,positionDependencies:b,opened:y,defaultOpened:B,onChange:oe,onOpen:V,onClose:te});sq(()=>Pe.opened&&O&&Pe.onClose(),Q,[ee,ge]);const ze=l.useCallback(Je=>{Y(Je),Pe.floating.reference(Je)},[Pe.floating.reference]),ht=l.useCallback(Je=>{he(Je),Pe.floating.floating(Je)},[Pe.floating.floating]);return z.createElement(pY,{value:{returnFocus:q,disabled:F,controlled:Pe.controlled,reference:ze,floating:ht,x:Pe.floating.x,y:Pe.floating.y,arrowX:(r=(n=(t=Pe.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(i=(s=(o=Pe.floating)==null?void 0:o.middlewareData)==null?void 0:s.arrow)==null?void 0:i.y,opened:Pe.opened,arrowRef:c,transitionProps:x,width:w,withArrow:j,arrowSize:I,arrowOffset:_,arrowRadius:M,arrowPosition:E,placement:Pe.floating.placement,trapFocus:Z,withinPortal:T,portalProps:K,zIndex:ne,radius:se,shadow:re,closeOnEscape:G,onClose:Pe.onClose,onToggle:Pe.onToggle,getTargetId:()=>`${de}-target`,getDropdownId:()=>`${de}-dropdown`,withRoles:$,targetProps:U,__staticSelector:X,classNames:R,styles:D,unstyled:A,variant:pe,keepMounted:W}},p)}Bu.Target=BE;Bu.Dropdown=QE;Bu.displayName="@mantine/core/Popover";var XY=Object.defineProperty,Am=Object.getOwnPropertySymbols,XE=Object.prototype.hasOwnProperty,YE=Object.prototype.propertyIsEnumerable,J4=(e,t,n)=>t in e?XY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YY=(e,t)=>{for(var n in t||(t={}))XE.call(t,n)&&J4(e,n,t[n]);if(Am)for(var n of Am(t))YE.call(t,n)&&J4(e,n,t[n]);return e},JY=(e,t)=>{var n={};for(var r in e)XE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Am)for(var r of Am(e))t.indexOf(r)<0&&YE.call(e,r)&&(n[r]=e[r]);return n};function ZY(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:s="column",id:i,innerRef:c,__staticSelector:d,styles:p,classNames:h,unstyled:m}=t,g=JY(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:b}=gX(null,{name:d,styles:p,classNames:h,unstyled:m});return z.createElement(Bu.Dropdown,YY({p:0,onMouseDown:y=>y.preventDefault()},g),z.createElement("div",{style:{maxHeight:qe(o),display:"flex"}},z.createElement(Xo,{component:r||"div",id:`${i}-items`,"aria-labelledby":`${i}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==t0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:c},z.createElement("div",{className:b.itemsWrapper,style:{flexDirection:s}},n))))}function Yi({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:s,__staticSelector:i,onDirectionChange:c,switchDirectionOnFlip:d,zIndex:p,dropdownPosition:h,positionDependencies:m=[],classNames:g,styles:b,unstyled:y,readOnly:x,variant:w}){return z.createElement(Bu,{unstyled:y,classNames:g,styles:b,width:"target",withRoles:!1,opened:e,middlewares:{flip:h==="flip",shift:!1},position:h==="flip"?"bottom":h,positionDependencies:m,zIndex:p,__staticSelector:i,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:x,onPositionChange:S=>d&&(c==null?void 0:c(S==="top"?"column-reverse":"column")),variant:w},s)}Yi.Target=Bu.Target;Yi.Dropdown=ZY;var eJ=Object.defineProperty,tJ=Object.defineProperties,nJ=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,JE=Object.prototype.hasOwnProperty,ZE=Object.prototype.propertyIsEnumerable,Z4=(e,t,n)=>t in e?eJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t)=>{for(var n in t||(t={}))JE.call(t,n)&&Z4(e,n,t[n]);if(Rm)for(var n of Rm(t))ZE.call(t,n)&&Z4(e,n,t[n]);return e},rJ=(e,t)=>tJ(e,nJ(t)),oJ=(e,t)=>{var n={};for(var r in e)JE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rm)for(var r of Rm(e))t.indexOf(r)<0&&ZE.call(e,r)&&(n[r]=e[r]);return n};function eM(e,t,n){const r=zr(e,t,n),{label:o,description:s,error:i,required:c,classNames:d,styles:p,className:h,unstyled:m,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:w,wrapperProps:S,id:j,size:I,style:_,inputContainer:M,inputWrapperOrder:E,withAsterisk:A,variant:R}=r,D=oJ(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),O=Gy(j),{systemStyles:T,rest:K}=Yg(D),G=hh({label:o,description:s,error:i,required:c,classNames:d,className:h,__staticSelector:g,sx:b,errorProps:y,labelProps:x,descriptionProps:w,unstyled:m,styles:p,id:O,size:I,style:_,inputContainer:M,inputWrapperOrder:E,withAsterisk:A,variant:R},S);return rJ(hh({},K),{classNames:d,styles:p,unstyled:m,wrapperProps:hh(hh({},G),T),inputProps:{required:c,classNames:d,styles:p,unstyled:m,id:O,size:I,__staticSelector:g,error:i,variant:R}})}var sJ=ko((e,t,{size:n})=>({label:{display:"inline-block",fontSize:Xt({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const aJ=sJ;var iJ=Object.defineProperty,Dm=Object.getOwnPropertySymbols,tM=Object.prototype.hasOwnProperty,nM=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lJ=(e,t)=>{for(var n in t||(t={}))tM.call(t,n)&&ej(e,n,t[n]);if(Dm)for(var n of Dm(t))nM.call(t,n)&&ej(e,n,t[n]);return e},cJ=(e,t)=>{var n={};for(var r in e)tM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dm)for(var r of Dm(e))t.indexOf(r)<0&&nM.call(e,r)&&(n[r]=e[r]);return n};const uJ={labelElement:"label",size:"sm"},o2=l.forwardRef((e,t)=>{const n=zr("InputLabel",uJ,e),{labelElement:r,children:o,required:s,size:i,classNames:c,styles:d,unstyled:p,className:h,htmlFor:m,__staticSelector:g,variant:b,onMouseDown:y}=n,x=cJ(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:w,cx:S}=aJ(null,{name:["InputWrapper",g],classNames:c,styles:d,unstyled:p,variant:b,size:i});return z.createElement(Xo,lJ({component:r,ref:t,className:S(w.label,h),htmlFor:r==="label"?m:void 0,onMouseDown:j=>{y==null||y(j),!j.defaultPrevented&&j.detail>1&&j.preventDefault()}},x),o,s&&z.createElement("span",{className:w.required,"aria-hidden":!0}," *"))});o2.displayName="@mantine/core/InputLabel";var dJ=ko((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${qe(2)})`,lineHeight:1.2,display:"block"}}));const fJ=dJ;var pJ=Object.defineProperty,Tm=Object.getOwnPropertySymbols,rM=Object.prototype.hasOwnProperty,oM=Object.prototype.propertyIsEnumerable,tj=(e,t,n)=>t in e?pJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hJ=(e,t)=>{for(var n in t||(t={}))rM.call(t,n)&&tj(e,n,t[n]);if(Tm)for(var n of Tm(t))oM.call(t,n)&&tj(e,n,t[n]);return e},mJ=(e,t)=>{var n={};for(var r in e)rM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tm)for(var r of Tm(e))t.indexOf(r)<0&&oM.call(e,r)&&(n[r]=e[r]);return n};const gJ={size:"sm"},s2=l.forwardRef((e,t)=>{const n=zr("InputError",gJ,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=mJ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=fJ(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return z.createElement(xu,hJ({className:b(g.error,o),ref:t},m),r)});s2.displayName="@mantine/core/InputError";var vJ=ko((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Xt({size:n,sizes:e.fontSizes})} - ${qe(2)})`,lineHeight:1.2,display:"block"}}));const bJ=vJ;var xJ=Object.defineProperty,Nm=Object.getOwnPropertySymbols,sM=Object.prototype.hasOwnProperty,aM=Object.prototype.propertyIsEnumerable,nj=(e,t,n)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yJ=(e,t)=>{for(var n in t||(t={}))sM.call(t,n)&&nj(e,n,t[n]);if(Nm)for(var n of Nm(t))aM.call(t,n)&&nj(e,n,t[n]);return e},CJ=(e,t)=>{var n={};for(var r in e)sM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nm)for(var r of Nm(e))t.indexOf(r)<0&&aM.call(e,r)&&(n[r]=e[r]);return n};const wJ={size:"sm"},a2=l.forwardRef((e,t)=>{const n=zr("InputDescription",wJ,e),{children:r,className:o,classNames:s,styles:i,unstyled:c,size:d,__staticSelector:p,variant:h}=n,m=CJ(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:b}=bJ(null,{name:["InputWrapper",p],classNames:s,styles:i,unstyled:c,variant:h,size:d});return z.createElement(xu,yJ({color:"dimmed",className:b(g.description,o),ref:t,unstyled:c},m),r)});a2.displayName="@mantine/core/InputDescription";const iM=l.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),SJ=iM.Provider,kJ=()=>l.useContext(iM);function jJ(e,{hasDescription:t,hasError:n}){const r=e.findIndex(d=>d==="input"),o=e[r-1],s=e[r+1];return{offsetBottom:t&&s==="description"||n&&s==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var _J=Object.defineProperty,IJ=Object.defineProperties,PJ=Object.getOwnPropertyDescriptors,rj=Object.getOwnPropertySymbols,EJ=Object.prototype.hasOwnProperty,MJ=Object.prototype.propertyIsEnumerable,oj=(e,t,n)=>t in e?_J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OJ=(e,t)=>{for(var n in t||(t={}))EJ.call(t,n)&&oj(e,n,t[n]);if(rj)for(var n of rj(t))MJ.call(t,n)&&oj(e,n,t[n]);return e},AJ=(e,t)=>IJ(e,PJ(t)),RJ=ko(e=>({root:AJ(OJ({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const DJ=RJ;var TJ=Object.defineProperty,NJ=Object.defineProperties,$J=Object.getOwnPropertyDescriptors,$m=Object.getOwnPropertySymbols,lM=Object.prototype.hasOwnProperty,cM=Object.prototype.propertyIsEnumerable,sj=(e,t,n)=>t in e?TJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hi=(e,t)=>{for(var n in t||(t={}))lM.call(t,n)&&sj(e,n,t[n]);if($m)for(var n of $m(t))cM.call(t,n)&&sj(e,n,t[n]);return e},aj=(e,t)=>NJ(e,$J(t)),LJ=(e,t)=>{var n={};for(var r in e)lM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$m)for(var r of $m(e))t.indexOf(r)<0&&cM.call(e,r)&&(n[r]=e[r]);return n};const zJ={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},uM=l.forwardRef((e,t)=>{const n=zr("InputWrapper",zJ,e),{className:r,label:o,children:s,required:i,id:c,error:d,description:p,labelElement:h,labelProps:m,descriptionProps:g,errorProps:b,classNames:y,styles:x,size:w,inputContainer:S,__staticSelector:j,unstyled:I,inputWrapperOrder:_,withAsterisk:M,variant:E}=n,A=LJ(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:D}=DJ(null,{classNames:y,styles:x,name:["InputWrapper",j],unstyled:I,variant:E,size:w}),O={classNames:y,styles:x,unstyled:I,size:w,variant:E,__staticSelector:j},T=typeof M=="boolean"?M:i,K=c?`${c}-error`:b==null?void 0:b.id,G=c?`${c}-description`:g==null?void 0:g.id,Z=`${!!d&&typeof d!="boolean"?K:""} ${p?G:""}`,te=Z.trim().length>0?Z.trim():void 0,V=o&&z.createElement(o2,Hi(Hi({key:"label",labelElement:h,id:c?`${c}-label`:void 0,htmlFor:c,required:T},O),m),o),oe=p&&z.createElement(a2,aj(Hi(Hi({key:"description"},g),O),{size:(g==null?void 0:g.size)||O.size,id:(g==null?void 0:g.id)||G}),p),ne=z.createElement(l.Fragment,{key:"input"},S(s)),se=typeof d!="boolean"&&d&&z.createElement(s2,aj(Hi(Hi({},b),O),{size:(b==null?void 0:b.size)||O.size,key:"error",id:(b==null?void 0:b.id)||K}),d),re=_.map(ae=>{switch(ae){case"label":return V;case"input":return ne;case"description":return oe;case"error":return se;default:return null}});return z.createElement(SJ,{value:Hi({describedBy:te},jJ(_,{hasDescription:!!oe,hasError:!!se}))},z.createElement(Xo,Hi({className:D(R.root,r),ref:t},A),re))});uM.displayName="@mantine/core/InputWrapper";var FJ=Object.defineProperty,Lm=Object.getOwnPropertySymbols,dM=Object.prototype.hasOwnProperty,fM=Object.prototype.propertyIsEnumerable,ij=(e,t,n)=>t in e?FJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BJ=(e,t)=>{for(var n in t||(t={}))dM.call(t,n)&&ij(e,n,t[n]);if(Lm)for(var n of Lm(t))fM.call(t,n)&&ij(e,n,t[n]);return e},HJ=(e,t)=>{var n={};for(var r in e)dM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lm)for(var r of Lm(e))t.indexOf(r)<0&&fM.call(e,r)&&(n[r]=e[r]);return n};const WJ={},pM=l.forwardRef((e,t)=>{const n=zr("InputPlaceholder",WJ,e),{sx:r}=n,o=HJ(n,["sx"]);return z.createElement(Xo,BJ({component:"span",sx:[s=>s.fn.placeholderStyles(),...f6(r)],ref:t},o))});pM.displayName="@mantine/core/InputPlaceholder";var VJ=Object.defineProperty,UJ=Object.defineProperties,GJ=Object.getOwnPropertyDescriptors,lj=Object.getOwnPropertySymbols,qJ=Object.prototype.hasOwnProperty,KJ=Object.prototype.propertyIsEnumerable,cj=(e,t,n)=>t in e?VJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))qJ.call(t,n)&&cj(e,n,t[n]);if(lj)for(var n of lj(t))KJ.call(t,n)&&cj(e,n,t[n]);return e},b1=(e,t)=>UJ(e,GJ(t));const ks={xs:qe(30),sm:qe(36),md:qe(42),lg:qe(50),xl:qe(60)},QJ=["default","filled","unstyled"];function XJ({theme:e,variant:t}){return QJ.includes(t)?t==="default"?{border:`${qe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${qe(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:qe(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var YJ=ko((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:s,iconWidth:i,offsetBottom:c,offsetTop:d,pointer:p},{variant:h,size:m})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,b=h==="default"||h==="filled"?{minHeight:Xt({size:m,sizes:ks}),paddingLeft:`calc(${Xt({size:m,sizes:ks})} / 3)`,paddingRight:s?o||Xt({size:m,sizes:ks}):`calc(${Xt({size:m,sizes:ks})} / 3)`,borderRadius:e.fn.radius(n)}:h==="unstyled"&&s?{paddingRight:o||Xt({size:m,sizes:ks})}:null;return{wrapper:{position:"relative",marginTop:d?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:c?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:b1(mh(mh(b1(mh({},e.fn.fontStyles()),{height:t?h==="unstyled"?void 0:"auto":Xt({size:m,sizes:ks}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Xt({size:m,sizes:ks})} - ${qe(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Xt({size:m,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:p?"pointer":void 0}),XJ({theme:e,variant:h})),b),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof i=="number"?qe(i):Xt({size:m,sizes:ks})},"&::placeholder":b1(mh({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:i?qe(i):Xt({size:m,sizes:ks}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Xt({size:m,sizes:ks})}}});const JJ=YJ;var ZJ=Object.defineProperty,eZ=Object.defineProperties,tZ=Object.getOwnPropertyDescriptors,zm=Object.getOwnPropertySymbols,hM=Object.prototype.hasOwnProperty,mM=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?ZJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gh=(e,t)=>{for(var n in t||(t={}))hM.call(t,n)&&uj(e,n,t[n]);if(zm)for(var n of zm(t))mM.call(t,n)&&uj(e,n,t[n]);return e},dj=(e,t)=>eZ(e,tZ(t)),nZ=(e,t)=>{var n={};for(var r in e)hM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zm)for(var r of zm(e))t.indexOf(r)<0&&mM.call(e,r)&&(n[r]=e[r]);return n};const rZ={size:"sm",variant:"default"},sc=l.forwardRef((e,t)=>{const n=zr("Input",rZ,e),{className:r,error:o,required:s,disabled:i,variant:c,icon:d,style:p,rightSectionWidth:h,iconWidth:m,rightSection:g,rightSectionProps:b,radius:y,size:x,wrapperProps:w,classNames:S,styles:j,__staticSelector:I,multiline:_,sx:M,unstyled:E,pointer:A}=n,R=nZ(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:D,offsetTop:O,describedBy:T}=kJ(),{classes:K,cx:G}=JJ({radius:y,multiline:_,invalid:!!o,rightSectionWidth:h?qe(h):void 0,iconWidth:m,withRightSection:!!g,offsetBottom:D,offsetTop:O,pointer:A},{classNames:S,styles:j,name:["Input",I],unstyled:E,variant:c,size:x}),{systemStyles:Q,rest:Z}=Yg(R);return z.createElement(Xo,gh(gh({className:G(K.wrapper,r),sx:M,style:p},Q),w),d&&z.createElement("div",{className:K.icon},d),z.createElement(Xo,dj(gh({component:"input"},Z),{ref:t,required:s,"aria-invalid":!!o,"aria-describedby":T,disabled:i,"data-disabled":i||void 0,"data-with-icon":!!d||void 0,"data-invalid":!!o||void 0,className:K.input})),g&&z.createElement("div",dj(gh({},b),{className:K.rightSection}),g))});sc.displayName="@mantine/core/Input";sc.Wrapper=uM;sc.Label=o2;sc.Description=a2;sc.Error=s2;sc.Placeholder=pM;const Su=sc;var oZ=Object.defineProperty,Fm=Object.getOwnPropertySymbols,gM=Object.prototype.hasOwnProperty,vM=Object.prototype.propertyIsEnumerable,fj=(e,t,n)=>t in e?oZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pj=(e,t)=>{for(var n in t||(t={}))gM.call(t,n)&&fj(e,n,t[n]);if(Fm)for(var n of Fm(t))vM.call(t,n)&&fj(e,n,t[n]);return e},sZ=(e,t)=>{var n={};for(var r in e)gM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fm)for(var r of Fm(e))t.indexOf(r)<0&&vM.call(e,r)&&(n[r]=e[r]);return n};const aZ={multiple:!1},bM=l.forwardRef((e,t)=>{const n=zr("FileButton",aZ,e),{onChange:r,children:o,multiple:s,accept:i,name:c,form:d,resetRef:p,disabled:h,capture:m,inputProps:g}=n,b=sZ(n,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),y=l.useRef(),x=()=>{!h&&y.current.click()},w=j=>{r(s?Array.from(j.currentTarget.files):j.currentTarget.files[0]||null)};return w6(p,()=>{y.current.value=""}),z.createElement(z.Fragment,null,o(pj({onClick:x},b)),z.createElement("input",pj({style:{display:"none"},type:"file",accept:i,multiple:s,onChange:w,ref:Kf(t,y),name:c,form:d,capture:m},g)))});bM.displayName="@mantine/core/FileButton";const xM={xs:qe(16),sm:qe(22),md:qe(26),lg:qe(30),xl:qe(36)},iZ={xs:qe(10),sm:qe(12),md:qe(14),lg:qe(16),xl:qe(18)};var lZ=ko((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:s})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:s==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:Xt({size:o,sizes:xM}),paddingLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?Xt({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:Xt({size:o,sizes:iZ}),borderRadius:Xt({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${qe(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${Xt({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const cZ=lZ;var uZ=Object.defineProperty,Bm=Object.getOwnPropertySymbols,yM=Object.prototype.hasOwnProperty,CM=Object.prototype.propertyIsEnumerable,hj=(e,t,n)=>t in e?uZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dZ=(e,t)=>{for(var n in t||(t={}))yM.call(t,n)&&hj(e,n,t[n]);if(Bm)for(var n of Bm(t))CM.call(t,n)&&hj(e,n,t[n]);return e},fZ=(e,t)=>{var n={};for(var r in e)yM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bm)for(var r of Bm(e))t.indexOf(r)<0&&CM.call(e,r)&&(n[r]=e[r]);return n};const pZ={xs:16,sm:22,md:24,lg:26,xl:30};function wM(e){var t=e,{label:n,classNames:r,styles:o,className:s,onRemove:i,disabled:c,readOnly:d,size:p,radius:h="sm",variant:m,unstyled:g}=t,b=fZ(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:x}=cZ({disabled:c,readOnly:d,radius:h},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:p,variant:m});return z.createElement("div",dZ({className:x(y.defaultValue,s)},b),z.createElement("span",{className:y.defaultValueLabel},n),!c&&!d&&z.createElement(tE,{"aria-hidden":!0,onMouseDown:i,size:pZ[p],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}wM.displayName="@mantine/core/MultiSelect/DefaultValue";function hZ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,disableSelectedItemFiltering:i}){if(!t&&s.length===0)return e;if(!t){const d=[];for(let p=0;ph===e[p].value&&!e[p].disabled))&&d.push(e[p]);return d}const c=[];for(let d=0;dp===e[d].value&&!e[d].disabled),e[d])&&c.push(e[d]),!(c.length>=n));d+=1);return c}var mZ=Object.defineProperty,Hm=Object.getOwnPropertySymbols,SM=Object.prototype.hasOwnProperty,kM=Object.prototype.propertyIsEnumerable,mj=(e,t,n)=>t in e?mZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gj=(e,t)=>{for(var n in t||(t={}))SM.call(t,n)&&mj(e,n,t[n]);if(Hm)for(var n of Hm(t))kM.call(t,n)&&mj(e,n,t[n]);return e},gZ=(e,t)=>{var n={};for(var r in e)SM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&kM.call(e,r)&&(n[r]=e[r]);return n};const vZ={xs:qe(14),sm:qe(18),md:qe(20),lg:qe(24),xl:qe(28)};function bZ(e){var t=e,{size:n,error:r,style:o}=t,s=gZ(t,["size","error","style"]);const i=Ii(),c=Xt({size:n,sizes:vZ});return z.createElement("svg",gj({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:gj({color:r?i.colors.red[6]:i.colors.gray[6],width:c,height:c},o),"data-chevron":!0},s),z.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var xZ=Object.defineProperty,yZ=Object.defineProperties,CZ=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,wZ=Object.prototype.hasOwnProperty,SZ=Object.prototype.propertyIsEnumerable,bj=(e,t,n)=>t in e?xZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kZ=(e,t)=>{for(var n in t||(t={}))wZ.call(t,n)&&bj(e,n,t[n]);if(vj)for(var n of vj(t))SZ.call(t,n)&&bj(e,n,t[n]);return e},jZ=(e,t)=>yZ(e,CZ(t));function jM({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?z.createElement(tE,jZ(kZ({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:s=>s.preventDefault()})):z.createElement(bZ,{error:o,size:r})}jM.displayName="@mantine/core/SelectRightSection";var _Z=Object.defineProperty,IZ=Object.defineProperties,PZ=Object.getOwnPropertyDescriptors,Wm=Object.getOwnPropertySymbols,_M=Object.prototype.hasOwnProperty,IM=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?_Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x1=(e,t)=>{for(var n in t||(t={}))_M.call(t,n)&&xj(e,n,t[n]);if(Wm)for(var n of Wm(t))IM.call(t,n)&&xj(e,n,t[n]);return e},yj=(e,t)=>IZ(e,PZ(t)),EZ=(e,t)=>{var n={};for(var r in e)_M.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&IM.call(e,r)&&(n[r]=e[r]);return n};function PM(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:s}=t,i=EZ(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const c=typeof n=="function"?n(s):n;return{rightSection:!i.readOnly&&!(i.disabled&&i.shouldClear)&&z.createElement(jM,x1({},i)),styles:yj(x1({},c),{rightSection:yj(x1({},c==null?void 0:c.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var MZ=Object.defineProperty,OZ=Object.defineProperties,AZ=Object.getOwnPropertyDescriptors,Cj=Object.getOwnPropertySymbols,RZ=Object.prototype.hasOwnProperty,DZ=Object.prototype.propertyIsEnumerable,wj=(e,t,n)=>t in e?MZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TZ=(e,t)=>{for(var n in t||(t={}))RZ.call(t,n)&&wj(e,n,t[n]);if(Cj)for(var n of Cj(t))DZ.call(t,n)&&wj(e,n,t[n]);return e},NZ=(e,t)=>OZ(e,AZ(t)),$Z=ko((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${Xt({size:n,sizes:ks})} - ${qe(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Xt({size:n,sizes:ks})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${qe(2)}) calc(${e.spacing.xs} / 2)`},searchInput:NZ(TZ({},e.fn.fontStyles()),{flex:1,minWidth:qe(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Xt({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Xt({size:n,sizes:xM}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const LZ=$Z;var zZ=Object.defineProperty,FZ=Object.defineProperties,BZ=Object.getOwnPropertyDescriptors,Vm=Object.getOwnPropertySymbols,EM=Object.prototype.hasOwnProperty,MM=Object.prototype.propertyIsEnumerable,Sj=(e,t,n)=>t in e?zZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rc=(e,t)=>{for(var n in t||(t={}))EM.call(t,n)&&Sj(e,n,t[n]);if(Vm)for(var n of Vm(t))MM.call(t,n)&&Sj(e,n,t[n]);return e},kj=(e,t)=>FZ(e,BZ(t)),HZ=(e,t)=>{var n={};for(var r in e)EM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vm)for(var r of Vm(e))t.indexOf(r)<0&&MM.call(e,r)&&(n[r]=e[r]);return n};function WZ(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function VZ(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function jj(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const UZ={size:"sm",valueComponent:wM,itemComponent:Ky,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:WZ,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:VZ,switchDirectionOnFlip:!1,zIndex:Vy("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},OM=l.forwardRef((e,t)=>{const n=zr("MultiSelect",UZ,e),{className:r,style:o,required:s,label:i,description:c,size:d,error:p,classNames:h,styles:m,wrapperProps:g,value:b,defaultValue:y,data:x,onChange:w,valueComponent:S,itemComponent:j,id:I,transitionProps:_,maxDropdownHeight:M,shadow:E,nothingFound:A,onFocus:R,onBlur:D,searchable:O,placeholder:T,filter:K,limit:G,clearSearchOnChange:Q,clearable:Z,clearSearchOnBlur:te,variant:V,onSearchChange:oe,searchValue:ne,disabled:se,initiallyOpened:re,radius:ae,icon:B,rightSection:X,rightSectionWidth:$,creatable:F,getCreateLabel:q,shouldCreate:pe,onCreate:W,sx:U,dropdownComponent:ee,onDropdownClose:Y,onDropdownOpen:ge,maxSelectedValues:he,withinPortal:de,portalProps:_e,switchDirectionOnFlip:Pe,zIndex:ze,selectOnBlur:ht,name:Je,dropdownPosition:qt,errorProps:Pt,labelProps:jt,descriptionProps:Se,form:Fe,positionDependencies:it,onKeyDown:At,unstyled:ke,inputContainer:lt,inputWrapperOrder:Rt,readOnly:zt,withAsterisk:Re,clearButtonProps:Qe,hoverOnSearchChange:En,disableSelectedItemFiltering:Te}=n,ct=HZ(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:ft,cx:tt,theme:en}=LZ({invalid:!!p},{name:"MultiSelect",classNames:h,styles:m,unstyled:ke,size:d,variant:V}),{systemStyles:ar,rest:vn}=Yg(ct),fn=l.useRef(),Tr=l.useRef({}),ir=Gy(I),[$n,Jn]=l.useState(re),[Mn,Fr]=l.useState(-1),[co,Nr]=l.useState("column"),[$r,Lo]=cf({value:ne,defaultValue:"",finalValue:void 0,onChange:oe}),[Br,ts]=l.useState(!1),{scrollIntoView:gs,targetRef:Ga,scrollableRef:fa}=k6({duration:0,offset:5,cancelable:!1,isList:!0}),ie=F&&typeof q=="function";let ue=null;const xe=x.map(Ve=>typeof Ve=="string"?{label:Ve,value:Ve}:Ve),Me=p6({data:xe}),[ye,pt]=cf({value:jj(b,x),defaultValue:jj(y,x),finalValue:[],onChange:w}),at=l.useRef(!!he&&he{if(!zt){const Ct=ye.filter(Ft=>Ft!==Ve);pt(Ct),he&&Ct.length{Lo(Ve.currentTarget.value),!se&&!at.current&&O&&Jn(!0)},wt=Ve=>{typeof R=="function"&&R(Ve),!se&&!at.current&&O&&Jn(!0)},Ge=hZ({data:Me,searchable:O,searchValue:$r,limit:G,filter:K,value:ye,disableSelectedItemFiltering:Te});ie&&pe($r,Me)&&(ue=q($r),Ge.push({label:$r,value:$r,creatable:!0}));const Ee=Math.min(Mn,Ge.length-1),et=(Ve,Ct,Ft)=>{let Qt=Ve;for(;Ft(Qt);)if(Qt=Ct(Qt),!Ge[Qt].disabled)return Qt;return Ve};oa(()=>{Fr(En&&$r?0:-1)},[$r,En]),oa(()=>{!se&&ye.length>x.length&&Jn(!1),he&&ye.length=he&&(at.current=!0,Jn(!1))},[ye]);const Et=Ve=>{if(!zt)if(Q&&Lo(""),ye.includes(Ve.value))Kt(Ve.value);else{if(Ve.creatable&&typeof W=="function"){const Ct=W(Ve.value);typeof Ct<"u"&&Ct!==null&&pt(typeof Ct=="string"?[...ye,Ct]:[...ye,Ct.value])}else pt([...ye,Ve.value]);ye.length===he-1&&(at.current=!0,Jn(!1)),Ge.length===1&&Jn(!1)}},$t=Ve=>{typeof D=="function"&&D(Ve),ht&&Ge[Ee]&&$n&&Et(Ge[Ee]),te&&Lo(""),Jn(!1)},Ut=Ve=>{if(Br||(At==null||At(Ve),zt)||Ve.key!=="Backspace"&&he&&at.current)return;const Ct=co==="column",Ft=()=>{Fr(Ln=>{var Jt;const yn=et(Ln,hn=>hn+1,hn=>hn{Fr(Ln=>{var Jt;const yn=et(Ln,hn=>hn-1,hn=>hn>0);return $n&&(Ga.current=Tr.current[(Jt=Ge[yn])==null?void 0:Jt.value],gs({alignment:Ct?"start":"end"})),yn})};switch(Ve.key){case"ArrowUp":{Ve.preventDefault(),Jn(!0),Ct?Qt():Ft();break}case"ArrowDown":{Ve.preventDefault(),Jn(!0),Ct?Ft():Qt();break}case"Enter":{Ve.preventDefault(),Ge[Ee]&&$n?Et(Ge[Ee]):Jn(!0);break}case" ":{O||(Ve.preventDefault(),Ge[Ee]&&$n?Et(Ge[Ee]):Jn(!0));break}case"Backspace":{ye.length>0&&$r.length===0&&(pt(ye.slice(0,-1)),Jn(!0),he&&(at.current=!1));break}case"Home":{if(!O){Ve.preventDefault(),$n||Jn(!0);const Ln=Ge.findIndex(Jt=>!Jt.disabled);Fr(Ln),gs({alignment:Ct?"end":"start"})}break}case"End":{if(!O){Ve.preventDefault(),$n||Jn(!0);const Ln=Ge.map(Jt=>!!Jt.disabled).lastIndexOf(!1);Fr(Ln),gs({alignment:Ct?"end":"start"})}break}case"Escape":Jn(!1)}},tn=ye.map(Ve=>{let Ct=Me.find(Ft=>Ft.value===Ve&&!Ft.disabled);return!Ct&&ie&&(Ct={value:Ve,label:Ve}),Ct}).filter(Ve=>!!Ve).map((Ve,Ct)=>z.createElement(S,kj(Rc({},Ve),{variant:V,disabled:se,className:ft.value,readOnly:zt,onRemove:Ft=>{Ft.preventDefault(),Ft.stopPropagation(),Kt(Ve.value)},key:Ve.value,size:d,styles:m,classNames:h,radius:ae,index:Ct}))),cn=Ve=>ye.includes(Ve),ln=()=>{var Ve;Lo(""),pt([]),(Ve=fn.current)==null||Ve.focus(),he&&(at.current=!1)},Yt=!zt&&(Ge.length>0?$n:$n&&!!A);return oa(()=>{const Ve=Yt?ge:Y;typeof Ve=="function"&&Ve()},[Yt]),z.createElement(Su.Wrapper,Rc(Rc({required:s,id:ir,label:i,error:p,description:c,size:d,className:r,style:o,classNames:h,styles:m,__staticSelector:"MultiSelect",sx:U,errorProps:Pt,descriptionProps:Se,labelProps:jt,inputContainer:lt,inputWrapperOrder:Rt,unstyled:ke,withAsterisk:Re,variant:V},ar),g),z.createElement(Yi,{opened:Yt,transitionProps:_,shadow:"sm",withinPortal:de,portalProps:_e,__staticSelector:"MultiSelect",onDirectionChange:Nr,switchDirectionOnFlip:Pe,zIndex:ze,dropdownPosition:qt,positionDependencies:[...it,$r],classNames:h,styles:m,unstyled:ke,variant:V},z.createElement(Yi.Target,null,z.createElement("div",{className:ft.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":$n&&Yt?`${ir}-items`:null,"aria-controls":ir,"aria-expanded":$n,onMouseLeave:()=>Fr(-1),tabIndex:-1},z.createElement("input",{type:"hidden",name:Je,value:ye.join(","),form:Fe,disabled:se}),z.createElement(Su,Rc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:d,variant:V,disabled:se,error:p,required:s,radius:ae,icon:B,unstyled:ke,onMouseDown:Ve=>{var Ct;Ve.preventDefault(),!se&&!at.current&&Jn(!$n),(Ct=fn.current)==null||Ct.focus()},classNames:kj(Rc({},h),{input:tt({[ft.input]:!O},h==null?void 0:h.input)})},PM({theme:en,rightSection:X,rightSectionWidth:$,styles:m,size:d,shouldClear:Z&&ye.length>0,onClear:ln,error:p,disabled:se,clearButtonProps:Qe,readOnly:zt})),z.createElement("div",{className:ft.values,"data-clearable":Z||void 0},tn,z.createElement("input",Rc({ref:Kf(t,fn),type:"search",id:ir,className:tt(ft.searchInput,{[ft.searchInputPointer]:!O,[ft.searchInputInputHidden]:!$n&&ye.length>0||!O&&ye.length>0,[ft.searchInputEmpty]:ye.length===0}),onKeyDown:Ut,value:$r,onChange:gt,onFocus:wt,onBlur:$t,readOnly:!O||at.current||zt,placeholder:ye.length===0?T:void 0,disabled:se,"data-mantine-stop-propagation":$n,autoComplete:"off",onCompositionStart:()=>ts(!0),onCompositionEnd:()=>ts(!1)},vn)))))),z.createElement(Yi.Dropdown,{component:ee||t0,maxHeight:M,direction:co,id:ir,innerRef:fa,__staticSelector:"MultiSelect",classNames:h,styles:m},z.createElement(qy,{data:Ge,hovered:Ee,classNames:h,styles:m,uuid:ir,__staticSelector:"MultiSelect",onItemHover:Fr,onItemSelect:Et,itemsRefs:Tr,itemComponent:j,size:d,nothingFound:A,isItemSelected:cn,creatable:F&&!!ue,createLabel:ue,unstyled:ke,variant:V}))))});OM.displayName="@mantine/core/MultiSelect";var GZ=Object.defineProperty,qZ=Object.defineProperties,KZ=Object.getOwnPropertyDescriptors,Um=Object.getOwnPropertySymbols,AM=Object.prototype.hasOwnProperty,RM=Object.prototype.propertyIsEnumerable,_j=(e,t,n)=>t in e?GZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y1=(e,t)=>{for(var n in t||(t={}))AM.call(t,n)&&_j(e,n,t[n]);if(Um)for(var n of Um(t))RM.call(t,n)&&_j(e,n,t[n]);return e},QZ=(e,t)=>qZ(e,KZ(t)),XZ=(e,t)=>{var n={};for(var r in e)AM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&RM.call(e,r)&&(n[r]=e[r]);return n};const YZ={type:"text",size:"sm",__staticSelector:"TextInput"},DM=l.forwardRef((e,t)=>{const n=eM("TextInput",YZ,e),{inputProps:r,wrapperProps:o}=n,s=XZ(n,["inputProps","wrapperProps"]);return z.createElement(Su.Wrapper,y1({},o),z.createElement(Su,QZ(y1(y1({},r),s),{ref:t})))});DM.displayName="@mantine/core/TextInput";function JZ({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:s,filterDataOnExactSearchMatch:i}){if(!t)return e;const c=s!=null&&e.find(p=>p.value===s)||null;if(c&&!i&&(c==null?void 0:c.label)===r){if(n){if(n>=e.length)return e;const p=e.indexOf(c),h=p+n,m=h-e.length;return m>0?e.slice(p-m):e.slice(p,h)}return e}const d=[];for(let p=0;p=n));p+=1);return d}var ZZ=ko(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const eee=ZZ;var tee=Object.defineProperty,nee=Object.defineProperties,ree=Object.getOwnPropertyDescriptors,Gm=Object.getOwnPropertySymbols,TM=Object.prototype.hasOwnProperty,NM=Object.prototype.propertyIsEnumerable,Ij=(e,t,n)=>t in e?tee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wd=(e,t)=>{for(var n in t||(t={}))TM.call(t,n)&&Ij(e,n,t[n]);if(Gm)for(var n of Gm(t))NM.call(t,n)&&Ij(e,n,t[n]);return e},C1=(e,t)=>nee(e,ree(t)),oee=(e,t)=>{var n={};for(var r in e)TM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&NM.call(e,r)&&(n[r]=e[r]);return n};function see(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function aee(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const iee={required:!1,size:"sm",shadow:"sm",itemComponent:Ky,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:see,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:aee,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Vy("popover"),positionDependencies:[],dropdownPosition:"flip"},i2=l.forwardRef((e,t)=>{const n=eM("Select",iee,e),{inputProps:r,wrapperProps:o,shadow:s,data:i,value:c,defaultValue:d,onChange:p,itemComponent:h,onKeyDown:m,onBlur:g,onFocus:b,transitionProps:y,initiallyOpened:x,unstyled:w,classNames:S,styles:j,filter:I,maxDropdownHeight:_,searchable:M,clearable:E,nothingFound:A,limit:R,disabled:D,onSearchChange:O,searchValue:T,rightSection:K,rightSectionWidth:G,creatable:Q,getCreateLabel:Z,shouldCreate:te,selectOnBlur:V,onCreate:oe,dropdownComponent:ne,onDropdownClose:se,onDropdownOpen:re,withinPortal:ae,portalProps:B,switchDirectionOnFlip:X,zIndex:$,name:F,dropdownPosition:q,allowDeselect:pe,placeholder:W,filterDataOnExactSearchMatch:U,form:ee,positionDependencies:Y,readOnly:ge,clearButtonProps:he,hoverOnSearchChange:de}=n,_e=oee(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:Pe,cx:ze,theme:ht}=eee(),[Je,qt]=l.useState(x),[Pt,jt]=l.useState(-1),Se=l.useRef(),Fe=l.useRef({}),[it,At]=l.useState("column"),ke=it==="column",{scrollIntoView:lt,targetRef:Rt,scrollableRef:zt}=k6({duration:0,offset:5,cancelable:!1,isList:!0}),Re=pe===void 0?E:pe,Qe=ue=>{if(Je!==ue){qt(ue);const xe=ue?re:se;typeof xe=="function"&&xe()}},En=Q&&typeof Z=="function";let Te=null;const ct=i.map(ue=>typeof ue=="string"?{label:ue,value:ue}:ue),ft=p6({data:ct}),[tt,en,ar]=cf({value:c,defaultValue:d,finalValue:null,onChange:p}),vn=ft.find(ue=>ue.value===tt),[fn,Tr]=cf({value:T,defaultValue:(vn==null?void 0:vn.label)||"",finalValue:void 0,onChange:O}),ir=ue=>{Tr(ue),M&&typeof O=="function"&&O(ue)},$n=()=>{var ue;ge||(en(null),ar||ir(""),(ue=Se.current)==null||ue.focus())};l.useEffect(()=>{const ue=ft.find(xe=>xe.value===tt);ue?ir(ue.label):(!En||!tt)&&ir("")},[tt]),l.useEffect(()=>{vn&&(!M||!Je)&&ir(vn.label)},[vn==null?void 0:vn.label]);const Jn=ue=>{if(!ge)if(Re&&(vn==null?void 0:vn.value)===ue.value)en(null),Qe(!1);else{if(ue.creatable&&typeof oe=="function"){const xe=oe(ue.value);typeof xe<"u"&&xe!==null&&en(typeof xe=="string"?xe:xe.value)}else en(ue.value);ar||ir(ue.label),jt(-1),Qe(!1),Se.current.focus()}},Mn=JZ({data:ft,searchable:M,limit:R,searchValue:fn,filter:I,filterDataOnExactSearchMatch:U,value:tt});En&&te(fn,Mn)&&(Te=Z(fn),Mn.push({label:fn,value:fn,creatable:!0}));const Fr=(ue,xe,Me)=>{let ye=ue;for(;Me(ye);)if(ye=xe(ye),!Mn[ye].disabled)return ye;return ue};oa(()=>{jt(de&&fn?0:-1)},[fn,de]);const co=tt?Mn.findIndex(ue=>ue.value===tt):0,Nr=!ge&&(Mn.length>0?Je:Je&&!!A),$r=()=>{jt(ue=>{var xe;const Me=Fr(ue,ye=>ye-1,ye=>ye>0);return Rt.current=Fe.current[(xe=Mn[Me])==null?void 0:xe.value],Nr&<({alignment:ke?"start":"end"}),Me})},Lo=()=>{jt(ue=>{var xe;const Me=Fr(ue,ye=>ye+1,ye=>yewindow.setTimeout(()=>{var ue;Rt.current=Fe.current[(ue=Mn[co])==null?void 0:ue.value],lt({alignment:ke?"end":"start"})},50);oa(()=>{Nr&&Br()},[Nr]);const ts=ue=>{switch(typeof m=="function"&&m(ue),ue.key){case"ArrowUp":{ue.preventDefault(),Je?ke?$r():Lo():(jt(co),Qe(!0),Br());break}case"ArrowDown":{ue.preventDefault(),Je?ke?Lo():$r():(jt(co),Qe(!0),Br());break}case"Home":{if(!M){ue.preventDefault(),Je||Qe(!0);const xe=Mn.findIndex(Me=>!Me.disabled);jt(xe),Nr&<({alignment:ke?"end":"start"})}break}case"End":{if(!M){ue.preventDefault(),Je||Qe(!0);const xe=Mn.map(Me=>!!Me.disabled).lastIndexOf(!1);jt(xe),Nr&<({alignment:ke?"end":"start"})}break}case"Escape":{ue.preventDefault(),Qe(!1),jt(-1);break}case" ":{M||(ue.preventDefault(),Mn[Pt]&&Je?Jn(Mn[Pt]):(Qe(!0),jt(co),Br()));break}case"Enter":M||ue.preventDefault(),Mn[Pt]&&Je&&(ue.preventDefault(),Jn(Mn[Pt]))}},gs=ue=>{typeof g=="function"&&g(ue);const xe=ft.find(Me=>Me.value===tt);V&&Mn[Pt]&&Je&&Jn(Mn[Pt]),ir((xe==null?void 0:xe.label)||""),Qe(!1)},Ga=ue=>{typeof b=="function"&&b(ue),M&&Qe(!0)},fa=ue=>{ge||(ir(ue.currentTarget.value),E&&ue.currentTarget.value===""&&en(null),jt(-1),Qe(!0))},ie=()=>{ge||(Qe(!Je),tt&&!Je&&jt(co))};return z.createElement(Su.Wrapper,C1(wd({},o),{__staticSelector:"Select"}),z.createElement(Yi,{opened:Nr,transitionProps:y,shadow:s,withinPortal:ae,portalProps:B,__staticSelector:"Select",onDirectionChange:At,switchDirectionOnFlip:X,zIndex:$,dropdownPosition:q,positionDependencies:[...Y,fn],classNames:S,styles:j,unstyled:w,variant:r.variant},z.createElement(Yi.Target,null,z.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Nr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":Nr,onMouseLeave:()=>jt(-1),tabIndex:-1},z.createElement("input",{type:"hidden",name:F,value:tt||"",form:ee,disabled:D}),z.createElement(Su,wd(C1(wd(wd({autoComplete:"off",type:"search"},r),_e),{ref:Kf(t,Se),onKeyDown:ts,__staticSelector:"Select",value:fn,placeholder:W,onChange:fa,"aria-autocomplete":"list","aria-controls":Nr?`${r.id}-items`:null,"aria-activedescendant":Pt>=0?`${r.id}-${Pt}`:null,onMouseDown:ie,onBlur:gs,onFocus:Ga,readOnly:!M||ge,disabled:D,"data-mantine-stop-propagation":Nr,name:null,classNames:C1(wd({},S),{input:ze({[Pe.input]:!M},S==null?void 0:S.input)})}),PM({theme:ht,rightSection:K,rightSectionWidth:G,styles:j,size:r.size,shouldClear:E&&!!vn,onClear:$n,error:o.error,clearButtonProps:he,disabled:D,readOnly:ge}))))),z.createElement(Yi.Dropdown,{component:ne||t0,maxHeight:_,direction:it,id:r.id,innerRef:zt,__staticSelector:"Select",classNames:S,styles:j},z.createElement(qy,{data:Mn,hovered:Pt,classNames:S,styles:j,isItemSelected:ue=>ue===tt,uuid:r.id,__staticSelector:"Select",onItemHover:jt,onItemSelect:Jn,itemsRefs:Fe,itemComponent:h,size:r.size,nothingFound:A,creatable:En&&!!Te,createLabel:Te,"aria-label":o.label,unstyled:w,variant:r.variant}))))});i2.displayName="@mantine/core/Select";const Jf=()=>{const[e,t,n,r,o,s,i,c,d,p,h,m,g,b,y,x,w,S,j,I,_,M,E,A,R,D,O,T,K,G,Q,Z,te,V,oe,ne,se,re,ae,B,X,$,F,q,pe,W,U,ee,Y,ge,he,de,_e,Pe,ze,ht,Je,qt,Pt,jt,Se,Fe,it,At,ke,lt,Rt,zt,Re,Qe,En,Te,ct,ft,tt,en]=ea("colors",["base.50","base.100","base.150","base.200","base.250","base.300","base.350","base.400","base.450","base.500","base.550","base.600","base.650","base.700","base.750","base.800","base.850","base.900","base.950","accent.50","accent.100","accent.150","accent.200","accent.250","accent.300","accent.350","accent.400","accent.450","accent.500","accent.550","accent.600","accent.650","accent.700","accent.750","accent.800","accent.850","accent.900","accent.950","baseAlpha.50","baseAlpha.100","baseAlpha.150","baseAlpha.200","baseAlpha.250","baseAlpha.300","baseAlpha.350","baseAlpha.400","baseAlpha.450","baseAlpha.500","baseAlpha.550","baseAlpha.600","baseAlpha.650","baseAlpha.700","baseAlpha.750","baseAlpha.800","baseAlpha.850","baseAlpha.900","baseAlpha.950","accentAlpha.50","accentAlpha.100","accentAlpha.150","accentAlpha.200","accentAlpha.250","accentAlpha.300","accentAlpha.350","accentAlpha.400","accentAlpha.450","accentAlpha.500","accentAlpha.550","accentAlpha.600","accentAlpha.650","accentAlpha.700","accentAlpha.750","accentAlpha.800","accentAlpha.850","accentAlpha.900","accentAlpha.950"]);return{base50:e,base100:t,base150:n,base200:r,base250:o,base300:s,base350:i,base400:c,base450:d,base500:p,base550:h,base600:m,base650:g,base700:b,base750:y,base800:x,base850:w,base900:S,base950:j,accent50:I,accent100:_,accent150:M,accent200:E,accent250:A,accent300:R,accent350:D,accent400:O,accent450:T,accent500:K,accent550:G,accent600:Q,accent650:Z,accent700:te,accent750:V,accent800:oe,accent850:ne,accent900:se,accent950:re,baseAlpha50:ae,baseAlpha100:B,baseAlpha150:X,baseAlpha200:$,baseAlpha250:F,baseAlpha300:q,baseAlpha350:pe,baseAlpha400:W,baseAlpha450:U,baseAlpha500:ee,baseAlpha550:Y,baseAlpha600:ge,baseAlpha650:he,baseAlpha700:de,baseAlpha750:_e,baseAlpha800:Pe,baseAlpha850:ze,baseAlpha900:ht,baseAlpha950:Je,accentAlpha50:qt,accentAlpha100:Pt,accentAlpha150:jt,accentAlpha200:Se,accentAlpha250:Fe,accentAlpha300:it,accentAlpha350:At,accentAlpha400:ke,accentAlpha450:lt,accentAlpha500:Rt,accentAlpha550:zt,accentAlpha600:Re,accentAlpha650:Qe,accentAlpha700:En,accentAlpha750:Te,accentAlpha800:ct,accentAlpha850:ft,accentAlpha900:tt,accentAlpha950:en}},Xe=(e,t)=>n=>n==="light"?e:t,$M=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Jf(),{colorMode:x}=ji(),[w]=ea("shadows",["dark-lg"]),[S,j,I]=ea("space",[1,2,6]),[_]=ea("radii",["base"]),[M]=ea("lineHeights",["base"]);return l.useCallback(()=>({label:{color:Xe(c,r)(x)},separatorLabel:{color:Xe(s,s)(x),"::after":{borderTopColor:Xe(r,c)(x)}},input:{border:"unset",backgroundColor:Xe(e,p)(x),borderRadius:_,borderStyle:"solid",borderWidth:"2px",borderColor:Xe(n,d)(x),color:Xe(p,t)(x),minHeight:"unset",lineHeight:M,height:"auto",paddingRight:0,paddingLeft:0,paddingInlineStart:j,paddingInlineEnd:I,paddingTop:S,paddingBottom:S,fontWeight:600,"&:hover":{borderColor:Xe(r,i)(x)},"&:focus":{borderColor:Xe(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Xe(o,s)(x)},"&:focus-within":{borderColor:Xe(h,y)(x)},"&[data-disabled]":{backgroundColor:Xe(r,c)(x),color:Xe(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Xe(t,p)(x),color:Xe(p,t)(x),button:{color:Xe(p,t)(x)},"&:hover":{backgroundColor:Xe(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Xe(n,d)(x),borderColor:Xe(n,d)(x),boxShadow:w},item:{backgroundColor:Xe(n,d)(x),color:Xe(d,n)(x),padding:6,"&[data-hovered]":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)},"&[data-active]":{backgroundColor:Xe(r,c)(x),"&:hover":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)}},"&[data-selected]":{backgroundColor:Xe(g,y)(x),color:Xe(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Xe(b,b)(x),color:Xe("white",e)(x)}},"&[data-disabled]":{color:Xe(s,i)(x),cursor:"not-allowed"}},rightSection:{width:32,button:{color:Xe(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,w,x,M,_,S,j,I])},LM=De((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,onChange:s,label:i,disabled:c,...d}=e,p=le(),[h,m]=l.useState(""),g=l.useCallback(w=>{w.shiftKey&&p(Qo(!0))},[p]),b=l.useCallback(w=>{w.shiftKey||p(Qo(!1))},[p]),y=l.useCallback(w=>{s&&s(w)},[s]),x=$M();return a.jsx(Wn,{label:r,placement:"top",hasArrow:!0,children:a.jsxs(Vn,{ref:t,isDisabled:c,position:"static","data-testid":`select-${i||e.placeholder}`,children:[i&&a.jsx(yr,{children:i}),a.jsx(i2,{ref:o,disabled:c,searchValue:h,onSearchChange:m,onChange:y,onKeyDown:g,onKeyUp:b,searchable:n,maxDropdownHeight:300,styles:x,...d})]})})});LM.displayName="IAIMantineSearchableSelect";const sr=l.memo(LM),lee=me([we],({changeBoardModal:e})=>{const{isModalOpen:t,imagesToChange:n}=e;return{isModalOpen:t,imagesToChange:n}},Ie),cee=()=>{const e=le(),[t,n]=l.useState(),{data:r,isFetching:o}=jf(),{imagesToChange:s,isModalOpen:i}=H(lee),[c]=_D(),[d]=ID(),{t:p}=J(),h=l.useMemo(()=>{const x=[{label:p("boards.uncategorized"),value:"none"}];return(r??[]).forEach(w=>x.push({label:w.board_name,value:w.board_id})),x},[r,p]),m=l.useCallback(()=>{e(Hw()),e(Ax(!1))},[e]),g=l.useCallback(()=>{!s.length||!t||(t==="none"?d({imageDTOs:s}):c({imageDTOs:s,board_id:t}),n(null),e(Hw()))},[c,e,s,d,t]),b=l.useCallback(x=>n(x),[]),y=l.useRef(null);return a.jsx(Wf,{isOpen:i,onClose:m,leastDestructiveRef:y,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:p("boards.changeBoard")}),a.jsx(Ra,{children:a.jsxs(N,{sx:{flexDir:"column",gap:4},children:[a.jsxs(je,{children:["Moving ",`${s.length}`," image",`${s.length>1?"s":""}`," to board:"]}),a.jsx(sr,{placeholder:p(o?"boards.loading":"boards.selectBoard"),disabled:o,onChange:b,value:t,data:h})]})}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:y,onClick:m,children:p("boards.cancel")}),a.jsx(Dt,{colorScheme:"accent",onClick:g,ml:3,children:p("boards.move")})]})]})})})},uee=l.memo(cee),zM=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:o,formLabelProps:s,tooltip:i,helperText:c,...d}=e;return a.jsx(Wn,{label:i,hasArrow:!0,placement:"top",isDisabled:!i,children:a.jsx(Vn,{isDisabled:n,width:r,alignItems:"center",...o,children:a.jsxs(N,{sx:{flexDir:"column",w:"full"},children:[a.jsxs(N,{sx:{alignItems:"center",w:"full"},children:[t&&a.jsx(yr,{my:1,flexGrow:1,sx:{cursor:n?"not-allowed":"pointer",...s==null?void 0:s.sx,pe:4},...s,children:t}),a.jsx(Fy,{...d})]}),c&&a.jsx(VP,{children:a.jsx(je,{variant:"subtext",children:c})})]})})})};zM.displayName="IAISwitch";const _r=l.memo(zM),dee=e=>{const{t}=J(),{imageUsage:n,topMessage:r=t("gallery.currentlyInUse"),bottomMessage:o=t("gallery.featuresWillReset")}=e;return!n||!ta(n)?null:a.jsxs(a.Fragment,{children:[a.jsx(je,{children:r}),a.jsxs(zf,{sx:{paddingInlineStart:6},children:[n.isInitialImage&&a.jsx(Ps,{children:t("common.img2img")}),n.isCanvasImage&&a.jsx(Ps,{children:t("common.unifiedCanvas")}),n.isControlImage&&a.jsx(Ps,{children:t("common.controlNet")}),n.isNodesImage&&a.jsx(Ps,{children:t("common.nodeEditor")})]}),a.jsx(je,{children:o})]})},FM=l.memo(dee),fee=me([we,PD],(e,t)=>{const{system:n,config:r,deleteImageModal:o}=e,{shouldConfirmOnDelete:s}=n,{canRestoreDeletedImagesFromBin:i}=r,{imagesToDelete:c,isModalOpen:d}=o,p=(c??[]).map(({image_name:m})=>OI(e,m)),h={isInitialImage:ta(p,m=>m.isInitialImage),isCanvasImage:ta(p,m=>m.isCanvasImage),isNodesImage:ta(p,m=>m.isNodesImage),isControlImage:ta(p,m=>m.isControlImage)};return{shouldConfirmOnDelete:s,canRestoreDeletedImagesFromBin:i,imagesToDelete:c,imagesUsage:t,isModalOpen:d,imageUsageSummary:h}},Ie),pee=()=>{const e=le(),{t}=J(),{shouldConfirmOnDelete:n,canRestoreDeletedImagesFromBin:r,imagesToDelete:o,imagesUsage:s,isModalOpen:i,imageUsageSummary:c}=H(fee),d=l.useCallback(g=>e(AI(!g.target.checked)),[e]),p=l.useCallback(()=>{e(Ww()),e(ED(!1))},[e]),h=l.useCallback(()=>{!o.length||!s.length||(e(Ww()),e(MD({imageDTOs:o,imagesUsage:s})))},[e,o,s]),m=l.useRef(null);return a.jsx(Wf,{isOpen:i,onClose:p,leastDestructiveRef:m,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:t("gallery.deleteImage")}),a.jsx(Ra,{children:a.jsxs(N,{direction:"column",gap:3,children:[a.jsx(FM,{imageUsage:c}),a.jsx(io,{}),a.jsx(je,{children:t(r?"gallery.deleteImageBin":"gallery.deleteImagePermanent")}),a.jsx(je,{children:t("common.areYouSure")}),a.jsx(_r,{label:t("common.dontAskMeAgain"),isChecked:!n,onChange:d})]})}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:m,onClick:p,children:"Cancel"}),a.jsx(Dt,{colorScheme:"error",onClick:h,ml:3,children:"Delete"})]})]})})})},hee=l.memo(pee),BM=De((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...i}=e;return a.jsx(Wn,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:a.jsx(Ia,{ref:t,role:n,colorScheme:s?"accent":"base","data-testid":r,...i})})});BM.displayName="IAIIconButton";const rt=l.memo(BM);var HM={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Pj=z.createContext&&z.createContext(HM),Ji=globalThis&&globalThis.__assign||function(){return Ji=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const t=H(i=>i.config.disabledTabs),n=H(i=>i.config.disabledFeatures),r=H(i=>i.config.disabledSDFeatures),o=l.useMemo(()=>n.includes(e)||r.includes(e)||t.includes(e),[n,r,t,e]),s=l.useMemo(()=>!(n.includes(e)||r.includes(e)||t.includes(e)),[n,r,t,e]);return{isFeatureDisabled:o,isFeatureEnabled:s}};function nte(e){const{title:t,hotkey:n,description:r}=e;return a.jsxs(rl,{sx:{gridTemplateColumns:"auto max-content",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs(rl,{children:[a.jsx(je,{fontWeight:600,children:t}),r&&a.jsx(je,{sx:{fontSize:"sm"},variant:"subtext",children:r})]}),a.jsx(Le,{sx:{fontSize:"sm",fontWeight:600,px:2,py:1},children:n})]})}function rte({children:e}){const{isOpen:t,onOpen:n,onClose:r}=hs(),{t:o}=J(),s=[{title:o("hotkeys.invoke.title"),desc:o("hotkeys.invoke.desc"),hotkey:"Ctrl+Enter"},{title:o("hotkeys.cancel.title"),desc:o("hotkeys.cancel.desc"),hotkey:"Shift+X"},{title:o("hotkeys.focusPrompt.title"),desc:o("hotkeys.focusPrompt.desc"),hotkey:"Alt+A"},{title:o("hotkeys.toggleOptions.title"),desc:o("hotkeys.toggleOptions.desc"),hotkey:"O"},{title:o("hotkeys.toggleGallery.title"),desc:o("hotkeys.toggleGallery.desc"),hotkey:"G"},{title:o("hotkeys.maximizeWorkSpace.title"),desc:o("hotkeys.maximizeWorkSpace.desc"),hotkey:"F"},{title:o("hotkeys.changeTabs.title"),desc:o("hotkeys.changeTabs.desc"),hotkey:"1-5"}],i=[{title:o("hotkeys.setPrompt.title"),desc:o("hotkeys.setPrompt.desc"),hotkey:"P"},{title:o("hotkeys.setSeed.title"),desc:o("hotkeys.setSeed.desc"),hotkey:"S"},{title:o("hotkeys.setParameters.title"),desc:o("hotkeys.setParameters.desc"),hotkey:"A"},{title:o("hotkeys.upscale.title"),desc:o("hotkeys.upscale.desc"),hotkey:"Shift+U"},{title:o("hotkeys.showInfo.title"),desc:o("hotkeys.showInfo.desc"),hotkey:"I"},{title:o("hotkeys.sendToImageToImage.title"),desc:o("hotkeys.sendToImageToImage.desc"),hotkey:"Shift+I"},{title:o("hotkeys.deleteImage.title"),desc:o("hotkeys.deleteImage.desc"),hotkey:"Del"},{title:o("hotkeys.closePanels.title"),desc:o("hotkeys.closePanels.desc"),hotkey:"Esc"}],c=[{title:o("hotkeys.previousImage.title"),desc:o("hotkeys.previousImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextImage.title"),desc:o("hotkeys.nextImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.increaseGalleryThumbSize.title"),desc:o("hotkeys.increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:o("hotkeys.decreaseGalleryThumbSize.title"),desc:o("hotkeys.decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],d=[{title:o("hotkeys.selectBrush.title"),desc:o("hotkeys.selectBrush.desc"),hotkey:"B"},{title:o("hotkeys.selectEraser.title"),desc:o("hotkeys.selectEraser.desc"),hotkey:"E"},{title:o("hotkeys.decreaseBrushSize.title"),desc:o("hotkeys.decreaseBrushSize.desc"),hotkey:"["},{title:o("hotkeys.increaseBrushSize.title"),desc:o("hotkeys.increaseBrushSize.desc"),hotkey:"]"},{title:o("hotkeys.decreaseBrushOpacity.title"),desc:o("hotkeys.decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:o("hotkeys.increaseBrushOpacity.title"),desc:o("hotkeys.increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:o("hotkeys.moveTool.title"),desc:o("hotkeys.moveTool.desc"),hotkey:"V"},{title:o("hotkeys.fillBoundingBox.title"),desc:o("hotkeys.fillBoundingBox.desc"),hotkey:"Shift + F"},{title:o("hotkeys.eraseBoundingBox.title"),desc:o("hotkeys.eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:o("hotkeys.colorPicker.title"),desc:o("hotkeys.colorPicker.desc"),hotkey:"C"},{title:o("hotkeys.toggleSnap.title"),desc:o("hotkeys.toggleSnap.desc"),hotkey:"N"},{title:o("hotkeys.quickToggleMove.title"),desc:o("hotkeys.quickToggleMove.desc"),hotkey:"Hold Space"},{title:o("hotkeys.toggleLayer.title"),desc:o("hotkeys.toggleLayer.desc"),hotkey:"Q"},{title:o("hotkeys.clearMask.title"),desc:o("hotkeys.clearMask.desc"),hotkey:"Shift+C"},{title:o("hotkeys.hideMask.title"),desc:o("hotkeys.hideMask.desc"),hotkey:"H"},{title:o("hotkeys.showHideBoundingBox.title"),desc:o("hotkeys.showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:o("hotkeys.mergeVisible.title"),desc:o("hotkeys.mergeVisible.desc"),hotkey:"Shift+M"},{title:o("hotkeys.saveToGallery.title"),desc:o("hotkeys.saveToGallery.desc"),hotkey:"Shift+S"},{title:o("hotkeys.copyToClipboard.title"),desc:o("hotkeys.copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:o("hotkeys.downloadImage.title"),desc:o("hotkeys.downloadImage.desc"),hotkey:"Shift+D"},{title:o("hotkeys.undoStroke.title"),desc:o("hotkeys.undoStroke.desc"),hotkey:"Ctrl+Z"},{title:o("hotkeys.redoStroke.title"),desc:o("hotkeys.redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:o("hotkeys.resetView.title"),desc:o("hotkeys.resetView.desc"),hotkey:"R"},{title:o("hotkeys.previousStagingImage.title"),desc:o("hotkeys.previousStagingImage.desc"),hotkey:"Arrow Left"},{title:o("hotkeys.nextStagingImage.title"),desc:o("hotkeys.nextStagingImage.desc"),hotkey:"Arrow Right"},{title:o("hotkeys.acceptStagingImage.title"),desc:o("hotkeys.acceptStagingImage.desc"),hotkey:"Enter"}],p=[{title:o("hotkeys.addNodes.title"),desc:o("hotkeys.addNodes.desc"),hotkey:"Shift + A / Space"}],h=m=>a.jsx(N,{flexDir:"column",gap:4,children:m.map((g,b)=>a.jsxs(N,{flexDir:"column",px:2,gap:4,children:[a.jsx(nte,{title:g.title,description:g.desc,hotkey:g.hotkey}),b{const{data:t}=OD(),n=l.useRef(null),r=oO(n);return a.jsxs(N,{alignItems:"center",gap:5,ps:1,ref:n,children:[a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",sx:{w:"32px",h:"32px",minW:"32px",minH:"32px",userSelect:"none"}}),a.jsxs(N,{sx:{gap:3,alignItems:"center"},children:[a.jsxs(je,{sx:{fontSize:"xl",userSelect:"none"},children:["invoke ",a.jsx("strong",{children:"ai"})]}),a.jsx(So,{children:e&&r&&t&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(je,{sx:{fontWeight:600,marginTop:1,color:"base.300",fontSize:14},variant:"subtext",children:t.version})},"statusText")})]})]})},dte=l.memo(ute),sO=De((e,t)=>{const{tooltip:n,inputRef:r,label:o,disabled:s,required:i,...c}=e,d=$M();return a.jsx(Wn,{label:n,placement:"top",hasArrow:!0,children:a.jsxs(Vn,{ref:t,isRequired:i,isDisabled:s,position:"static","data-testid":`select-${o||e.placeholder}`,children:[a.jsx(yr,{children:o}),a.jsx(i2,{disabled:s,ref:r,styles:d,...c})]})})});sO.displayName="IAIMantineSelect";const Dr=l.memo(sO),fte={ar:an.t("common.langArabic",{lng:"ar"}),nl:an.t("common.langDutch",{lng:"nl"}),en:an.t("common.langEnglish",{lng:"en"}),fr:an.t("common.langFrench",{lng:"fr"}),de:an.t("common.langGerman",{lng:"de"}),he:an.t("common.langHebrew",{lng:"he"}),it:an.t("common.langItalian",{lng:"it"}),ja:an.t("common.langJapanese",{lng:"ja"}),ko:an.t("common.langKorean",{lng:"ko"}),pl:an.t("common.langPolish",{lng:"pl"}),pt_BR:an.t("common.langBrPortuguese",{lng:"pt_BR"}),pt:an.t("common.langPortuguese",{lng:"pt"}),ru:an.t("common.langRussian",{lng:"ru"}),zh_CN:an.t("common.langSimplifiedChinese",{lng:"zh_CN"}),es:an.t("common.langSpanish",{lng:"es"}),uk:an.t("common.langUkranian",{lng:"ua"})},pte={CONNECTED:"common.statusConnected",DISCONNECTED:"common.statusDisconnected",PROCESSING:"common.statusProcessing",ERROR:"common.statusError",LOADING_MODEL:"common.statusLoadingModel"},aO=me(we,({system:e})=>e.language,Ie);function Xs(e){const{t}=J(),{label:n,textProps:r,useBadge:o=!1,badgeLabel:s=t("settings.experimental"),badgeProps:i,...c}=e;return a.jsxs(N,{justifyContent:"space-between",py:1,children:[a.jsxs(N,{gap:2,alignItems:"center",children:[a.jsx(je,{sx:{fontSize:14,_dark:{color:"base.300"}},...r,children:n}),o&&a.jsx(Va,{size:"xs",sx:{px:2,color:"base.700",bg:"accent.200",_dark:{bg:"accent.500",color:"base.200"}},...i,children:s})]}),a.jsx(_r,{...c})]})}const hte=e=>a.jsx(N,{sx:{flexDirection:"column",gap:2,p:4,borderRadius:"base",bg:"base.100",_dark:{bg:"base.900"}},children:e.children}),Bc=l.memo(hte);function mte(){const{t:e}=J(),t=le(),{data:n}=AD(void 0,{refetchOnMountOrArgChange:!0}),[r,{isLoading:o}]=RD(),{data:s}=Ha(),i=s&&(s.queue.in_progress>0||s.queue.pending>0),c=l.useCallback(()=>{i||r().unwrap().then(d=>{t(RI()),t(DI()),t(Ht({title:e("settings.intermediatesCleared",{count:d}),status:"info"}))}).catch(()=>{t(Ht({title:e("settings.intermediatesClearedFailed"),status:"error"}))})},[e,r,t,i]);return a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:e("settings.clearIntermediates")}),a.jsx(Dt,{tooltip:i?e("settings.clearIntermediatesDisabled"):void 0,colorScheme:"warning",onClick:c,isLoading:o,isDisabled:!n||i,children:e("settings.clearIntermediatesWithCount",{count:n??0})}),a.jsx(je,{fontWeight:"bold",children:e("settings.clearIntermediatesDesc1")}),a.jsx(je,{variant:"subtext",children:e("settings.clearIntermediatesDesc2")}),a.jsx(je,{variant:"subtext",children:e("settings.clearIntermediatesDesc3")})]})}const gte=()=>{const{base50:e,base100:t,base200:n,base300:r,base400:o,base500:s,base600:i,base700:c,base800:d,base900:p,accent200:h,accent300:m,accent400:g,accent500:b,accent600:y}=Jf(),{colorMode:x}=ji(),[w]=ea("shadows",["dark-lg"]);return l.useCallback(()=>({label:{color:Xe(c,r)(x)},separatorLabel:{color:Xe(s,s)(x),"::after":{borderTopColor:Xe(r,c)(x)}},searchInput:{":placeholder":{color:Xe(r,c)(x)}},input:{backgroundColor:Xe(e,p)(x),borderWidth:"2px",borderColor:Xe(n,d)(x),color:Xe(p,t)(x),paddingRight:24,fontWeight:600,"&:hover":{borderColor:Xe(r,i)(x)},"&:focus":{borderColor:Xe(m,y)(x)},"&:is(:focus, :hover)":{borderColor:Xe(o,s)(x)},"&:focus-within":{borderColor:Xe(h,y)(x)},"&[data-disabled]":{backgroundColor:Xe(r,c)(x),color:Xe(i,o)(x),cursor:"not-allowed"}},value:{backgroundColor:Xe(n,d)(x),color:Xe(p,t)(x),button:{color:Xe(p,t)(x)},"&:hover":{backgroundColor:Xe(r,c)(x),cursor:"pointer"}},dropdown:{backgroundColor:Xe(n,d)(x),borderColor:Xe(n,d)(x),boxShadow:w},item:{backgroundColor:Xe(n,d)(x),color:Xe(d,n)(x),padding:6,"&[data-hovered]":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)},"&[data-active]":{backgroundColor:Xe(r,c)(x),"&:hover":{color:Xe(p,t)(x),backgroundColor:Xe(r,c)(x)}},"&[data-selected]":{backgroundColor:Xe(g,y)(x),color:Xe(e,t)(x),fontWeight:600,"&:hover":{backgroundColor:Xe(b,b)(x),color:Xe("white",e)(x)}},"&[data-disabled]":{color:Xe(s,i)(x),cursor:"not-allowed"}},rightSection:{width:24,padding:20,button:{color:Xe(p,t)(x)}}}),[h,m,g,b,y,t,n,r,o,e,s,i,c,d,p,w,x])},iO=De((e,t)=>{const{searchable:n=!0,tooltip:r,inputRef:o,label:s,disabled:i,...c}=e,d=le(),p=l.useCallback(g=>{g.shiftKey&&d(Qo(!0))},[d]),h=l.useCallback(g=>{g.shiftKey||d(Qo(!1))},[d]),m=gte();return a.jsx(Wn,{label:r,placement:"top",hasArrow:!0,isOpen:!0,children:a.jsxs(Vn,{ref:t,isDisabled:i,position:"static",children:[s&&a.jsx(yr,{children:s}),a.jsx(OM,{ref:o,disabled:i,onKeyDown:p,onKeyUp:h,searchable:n,maxDropdownHeight:300,styles:m,...c})]})})});iO.displayName="IAIMantineMultiSelect";const vte=l.memo(iO),bte=To(hg,(e,t)=>({value:t,label:e})).sort((e,t)=>e.label.localeCompare(t.label));function xte(){const e=le(),{t}=J(),n=H(o=>o.ui.favoriteSchedulers),r=l.useCallback(o=>{e(DD(o))},[e]);return a.jsx(vte,{label:t("settings.favoriteSchedulers"),value:n,data:bte,onChange:r,clearable:!0,searchable:!0,maxSelectedValues:99,placeholder:t("settings.favoriteSchedulersPlaceholder")})}const yte=me([we],({system:e,ui:t})=>{const{shouldConfirmOnDelete:n,enableImageDebugging:r,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldEnableInformationalPopovers:p}=e,{shouldUseSliders:h,shouldShowProgressInViewer:m,shouldAutoChangeDimensions:g}=t;return{shouldConfirmOnDelete:n,enableImageDebugging:r,shouldUseSliders:h,shouldShowProgressInViewer:m,consoleLogLevel:o,shouldLogToConsole:s,shouldAntialiasProgressImage:i,shouldUseNSFWChecker:c,shouldUseWatermarker:d,shouldAutoChangeDimensions:g,shouldEnableInformationalPopovers:p}},{memoizeOptions:{resultEqualityCheck:Nn}}),Cte=({children:e,config:t})=>{const n=le(),{t:r}=J(),[o,s]=l.useState(3),i=(t==null?void 0:t.shouldShowDeveloperSettings)??!0,c=(t==null?void 0:t.shouldShowResetWebUiText)??!0,d=(t==null?void 0:t.shouldShowClearIntermediates)??!0,p=(t==null?void 0:t.shouldShowLocalizationToggle)??!0;l.useEffect(()=>{i||n(Vw(!1))},[i,n]);const{isNSFWCheckerAvailable:h,isWatermarkerAvailable:m}=TI(void 0,{selectFromResult:({data:U})=>({isNSFWCheckerAvailable:(U==null?void 0:U.nsfw_methods.includes("nsfw_checker"))??!1,isWatermarkerAvailable:(U==null?void 0:U.watermarking_methods.includes("invisible_watermark"))??!1})}),{isOpen:g,onOpen:b,onClose:y}=hs(),{isOpen:x,onOpen:w,onClose:S}=hs(),{shouldConfirmOnDelete:j,enableImageDebugging:I,shouldUseSliders:_,shouldShowProgressInViewer:M,consoleLogLevel:E,shouldLogToConsole:A,shouldAntialiasProgressImage:R,shouldUseNSFWChecker:D,shouldUseWatermarker:O,shouldAutoChangeDimensions:T,shouldEnableInformationalPopovers:K}=H(yte),G=l.useCallback(()=>{Object.keys(window.localStorage).forEach(U=>{(TD.includes(U)||U.startsWith(ND))&&localStorage.removeItem(U)}),y(),w(),setInterval(()=>s(U=>U-1),1e3)},[y,w]);l.useEffect(()=>{o<=0&&window.location.reload()},[o]);const Q=l.useCallback(U=>{n($D(U))},[n]),Z=l.useCallback(U=>{n(LD(U))},[n]),te=l.useCallback(U=>{n(Vw(U.target.checked))},[n]),{colorMode:V,toggleColorMode:oe}=ji(),ne=Pn("localization").isFeatureEnabled,se=H(aO),re=l.useCallback(U=>{n(AI(U.target.checked))},[n]),ae=l.useCallback(U=>{n(zD(U.target.checked))},[n]),B=l.useCallback(U=>{n(FD(U.target.checked))},[n]),X=l.useCallback(U=>{n(BD(U.target.checked))},[n]),$=l.useCallback(U=>{n(NI(U.target.checked))},[n]),F=l.useCallback(U=>{n(HD(U.target.checked))},[n]),q=l.useCallback(U=>{n(WD(U.target.checked))},[n]),pe=l.useCallback(U=>{n(VD(U.target.checked))},[n]),W=l.useCallback(U=>{n(UD(U.target.checked))},[n]);return a.jsxs(a.Fragment,{children:[l.cloneElement(e,{onClick:b}),a.jsxs(vu,{isOpen:g,onClose:y,size:"2xl",isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(bu,{children:[a.jsx(Oa,{bg:"none",children:r("common.settingsLabel")}),a.jsx(Rg,{}),a.jsx(Ra,{children:a.jsxs(N,{sx:{gap:4,flexDirection:"column"},children:[a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.general")}),a.jsx(Xs,{label:r("settings.confirmOnDelete"),isChecked:j,onChange:re})]}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.generation")}),a.jsx(xte,{}),a.jsx(Xs,{label:"Enable NSFW Checker",isDisabled:!h,isChecked:D,onChange:ae}),a.jsx(Xs,{label:"Enable Invisible Watermark",isDisabled:!m,isChecked:O,onChange:B})]}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.ui")}),a.jsx(Xs,{label:r("common.darkMode"),isChecked:V==="dark",onChange:oe}),a.jsx(Xs,{label:r("settings.useSlidersForAll"),isChecked:_,onChange:X}),a.jsx(Xs,{label:r("settings.showProgressInViewer"),isChecked:M,onChange:$}),a.jsx(Xs,{label:r("settings.antialiasProgressImages"),isChecked:R,onChange:F}),a.jsx(Xs,{label:r("settings.autoChangeDimensions"),isChecked:T,onChange:q}),p&&a.jsx(Dr,{disabled:!ne,label:r("common.languagePickerLabel"),value:se,data:Object.entries(fte).map(([U,ee])=>({value:U,label:ee})),onChange:Z}),a.jsx(Xs,{label:"Enable informational popovers",isChecked:K,onChange:pe})]}),i&&a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.developer")}),a.jsx(Xs,{label:r("settings.shouldLogToConsole"),isChecked:A,onChange:te}),a.jsx(Dr,{disabled:!A,label:r("settings.consoleLogLevel"),onChange:Q,value:E,data:GD.concat()}),a.jsx(Xs,{label:r("settings.enableImageDebugging"),isChecked:I,onChange:W})]}),d&&a.jsx(mte,{}),a.jsxs(Bc,{children:[a.jsx(yo,{size:"sm",children:r("settings.resetWebUI")}),a.jsx(Dt,{colorScheme:"error",onClick:G,children:r("settings.resetWebUI")}),c&&a.jsxs(a.Fragment,{children:[a.jsx(je,{variant:"subtext",children:r("settings.resetWebUIDesc1")}),a.jsx(je,{variant:"subtext",children:r("settings.resetWebUIDesc2")})]})]})]})}),a.jsx(pi,{children:a.jsx(Dt,{onClick:y,children:r("common.close")})})]})]}),a.jsxs(vu,{closeOnOverlayClick:!1,isOpen:x,onClose:S,isCentered:!0,closeOnEsc:!1,children:[a.jsx(Aa,{backdropFilter:"blur(40px)"}),a.jsxs(bu,{children:[a.jsx(Oa,{}),a.jsx(Ra,{children:a.jsx(N,{justifyContent:"center",children:a.jsx(je,{fontSize:"lg",children:a.jsxs(je,{children:[r("settings.resetComplete")," Reloading in ",o,"..."]})})})}),a.jsx(pi,{})]})]})]})},wte=l.memo(Cte),Ste=me(we,({system:e})=>{const{isConnected:t,status:n}=e;return{isConnected:t,statusTranslationKey:pte[n]}},Ie),Aj={ok:"green.400",working:"yellow.400",error:"red.400"},Rj={ok:"green.600",working:"yellow.500",error:"red.500"},kte=()=>{const{isConnected:e,statusTranslationKey:t}=H(Ste),{t:n}=J(),r=l.useRef(null),{data:o}=Ha(),s=l.useMemo(()=>e?o!=null&&o.queue.in_progress?"working":"ok":"error",[o==null?void 0:o.queue.in_progress,e]),i=oO(r);return a.jsxs(N,{ref:r,h:"full",px:2,alignItems:"center",gap:5,children:[a.jsx(So,{children:i&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.15}},exit:{opacity:0,transition:{delay:.8}},children:a.jsx(je,{sx:{fontSize:"sm",fontWeight:"600",pb:"1px",userSelect:"none",color:Rj[s],_dark:{color:Aj[s]}},children:n(t)})},"statusText")}),a.jsx(Gr,{as:Iee,sx:{boxSize:"0.5rem",color:Rj[s],_dark:{color:Aj[s]}}})]})},jte=l.memo(kte),_te=()=>{const{t:e}=J(),t=Pn("bugLink").isFeatureEnabled,n=Pn("discordLink").isFeatureEnabled,r=Pn("githubLink").isFeatureEnabled,o="http://github.com/invoke-ai/InvokeAI",s="https://discord.gg/ZmtBAhwWhy";return a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(dte,{}),a.jsx(Pi,{}),a.jsx(jte,{}),a.jsxs(Mg,{children:[a.jsx(Og,{as:rt,variant:"link","aria-label":e("accessibility.menu"),icon:a.jsx(jee,{}),sx:{boxSize:8}}),a.jsxs(ql,{motionProps:fu,children:[a.jsxs(af,{title:e("common.communityLabel"),children:[r&&a.jsx(Kn,{as:"a",href:o,target:"_blank",icon:a.jsx(bee,{}),children:e("common.githubLabel")}),t&&a.jsx(Kn,{as:"a",href:`${o}/issues`,target:"_blank",icon:a.jsx(_ee,{}),children:e("common.reportBugLabel")}),n&&a.jsx(Kn,{as:"a",href:s,target:"_blank",icon:a.jsx(vee,{}),children:e("common.discordLabel")})]}),a.jsxs(af,{title:e("common.settingsLabel"),children:[a.jsx(rte,{children:a.jsx(Kn,{as:"button",icon:a.jsx(Bee,{}),children:e("common.hotkeysLabel")})}),a.jsx(wte,{children:a.jsx(Kn,{as:"button",icon:a.jsx(qM,{}),children:e("common.settingsLabel")})})]})]})]})]})},Ite=l.memo(_te);/*! - * OverlayScrollbars - * Version: 2.4.4 - * - * Copyright (c) Rene Haas | KingSora. - * https://github.com/KingSora - * - * Released under the MIT license. - */const Js=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const c=(h,m)=>{const g=s,b=h,y=m||(r?!r(g,b):g!==b);return(y||o)&&(s=b,i=g),[s,y,i]};return[t?h=>c(t(s,i),h):c,h=>[s,!!h,i]]},c2=typeof window<"u",lO=c2&&Node.ELEMENT_NODE,{toString:Pte,hasOwnProperty:w1}=Object.prototype,Ete=/^\[object (.+)\]$/,fl=e=>e===void 0,l0=e=>e===null,Mte=e=>fl(e)||l0(e)?`${e}`:Pte.call(e).replace(Ete,"$1").toLowerCase(),Ea=e=>typeof e=="number",Zf=e=>typeof e=="string",cO=e=>typeof e=="boolean",Ta=e=>typeof e=="function",$s=e=>Array.isArray(e),df=e=>typeof e=="object"&&!$s(e)&&!l0(e),c0=e=>{const t=!!e&&e.length,n=Ea(t)&&t>-1&&t%1==0;return $s(e)||!Ta(e)&&n?t>0&&df(e)?t-1 in e:!0:!1},qm=e=>{if(!e||!df(e)||Mte(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=w1.call(e,n),i=o&&w1.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return fl(t)||w1.call(e,t)},Wd=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===lO:!1},u0=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===lO:!1};function Xn(e,t){if(c0(e))for(let n=0;nt(e[n],n,e));return e}const d0=(e,t)=>e.indexOf(t)>=0,Qi=(e,t)=>e.concat(t),Qn=(e,t,n)=>(!n&&!Zf(t)&&c0(t)?Array.prototype.push.apply(e,t):e.push(t),e),Vu=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Qn(n,r)}):Xn(e,r=>{Qn(n,r)}),n)},Km=e=>!!e&&!e.length,Dj=e=>Vu(new Set(e)),Ls=(e,t,n)=>{Xn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},f0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),gi=e=>e?Object.keys(e):[],Bn=(e,t,n,r,o,s,i)=>{const c=[t,n,r,o,s,i];return(typeof e!="object"||l0(e))&&!Ta(e)&&(e={}),Xn(c,d=>{Xn(d,(p,h)=>{const m=d[h];if(e===m)return!0;const g=$s(m);if(m&&qm(m)){const b=e[h];let y=b;g&&!$s(b)?y=[]:!g&&!qm(b)&&(y={}),e[h]=Bn(y,m)}else e[h]=g?m.slice():m})}),e},uO=(e,t)=>Xn(Bn({},e),(n,r,o)=>{n===void 0?delete o[r]:t&&n&&qm(n)&&(o[r]=uO(n,t))}),u2=e=>{for(const t in e)return!1;return!0},Mo=(e,t,n)=>{if(fl(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},dO=(e,t)=>new Set((Mo(e,t)||"").split(" ")),Wo=(e,t)=>{e&&e.removeAttribute(t)},zl=(e,t,n,r)=>{if(n){const o=dO(e,t);o[r?"add":"delete"](n);const s=Vu(o).join(" ").trim();Mo(e,t,s)}},Ote=(e,t,n)=>dO(e,t).has(n),Xb=c2&&Element.prototype,fO=(e,t)=>{const n=[],r=t?u0(t)&&t:document;return r?Qn(n,r.querySelectorAll(e)):n},Ate=(e,t)=>{const n=t?u0(t)&&t:document;return n?n.querySelector(e):null},Qm=(e,t)=>u0(e)?(Xb.matches||Xb.msMatchesSelector).call(e,t):!1,Yb=e=>e?Vu(e.childNodes):[],li=e=>e&&e.parentElement,Kc=(e,t)=>{if(u0(e)){const n=Xb.closest;if(n)return n.call(e,t);do{if(Qm(e,t))return e;e=li(e)}while(e)}},Rte=(e,t,n)=>{const r=Kc(e,t),o=e&&Ate(n,r),s=Kc(o,t)===r;return r&&o?r===e||o===e||s&&Kc(Kc(e,n),t)!==r:!1},As=()=>{},ci=e=>{if(c0(e))Xn(Vu(e),t=>ci(t));else if(e){const t=li(e);t&&t.removeChild(e)}},d2=(e,t,n)=>{if(n&&e){let r=t,o;return c0(n)?(o=document.createDocumentFragment(),Xn(n,s=>{s===r&&(r=s.previousSibling),o.appendChild(s)})):o=n,t&&(r?r!==t&&(r=r.nextSibling):r=e.firstChild),e.insertBefore(o,r||null),()=>ci(n)}return As},_s=(e,t)=>d2(e,null,t),Dte=(e,t)=>d2(li(e),e,t),Tj=(e,t)=>d2(li(e),e&&e.nextSibling,t),Fl=e=>{const t=document.createElement("div");return Mo(t,"class",e),t},pO=e=>{const t=Fl();return t.innerHTML=e.trim(),Xn(Yb(t),n=>ci(n))},Yo=c2?window:{},Vd=Math.max,Tte=Math.min,ff=Math.round,hO=Yo.cancelAnimationFrame,mO=Yo.requestAnimationFrame,Xm=Yo.setTimeout,Jb=Yo.clearTimeout,Zb=e=>e.charAt(0).toUpperCase()+e.slice(1),Nte=()=>Fl().style,$te=["-webkit-","-moz-","-o-","-ms-"],Lte=["WebKit","Moz","O","MS","webkit","moz","o","ms"],S1={},k1={},zte=e=>{let t=k1[e];if(f0(k1,e))return t;const n=Zb(e),r=Nte();return Xn($te,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,Zb(s)+n].find(c=>r[c]!==void 0))}),k1[e]=t||""},p0=e=>{let t=S1[e]||Yo[e];return f0(S1,e)||(Xn(Lte,n=>(t=t||Yo[n+Zb(e)],!t)),S1[e]=t),t},Fte=p0("MutationObserver"),Nj=p0("IntersectionObserver"),Ym=p0("ResizeObserver"),ex=p0("ScrollTimeline"),Gt=(e,...t)=>e.bind(0,...t),El=e=>{let t;const n=e?Xm:mO,r=e?Jb:hO;return[o=>{r(t),t=n(o,Ta(e)?e():e)},()=>r(t)]},gO=(e,t)=>{let n,r,o,s=As;const{v:i,p:c,g:d}=t||{},p=function(y){s(),Jb(n),n=r=void 0,s=As,e.apply(this,y)},h=b=>d&&r?d(r,b):b,m=()=>{s!==As&&p(h(o)||o)},g=function(){const y=Vu(arguments),x=Ta(i)?i():i;if(Ea(x)&&x>=0){const S=Ta(c)?c():c,j=Ea(S)&&S>=0,I=x>0?Xm:mO,_=x>0?Jb:hO,E=h(y)||y,A=p.bind(0,E);s();const R=I(A,x);s=()=>_(R),j&&!n&&(n=Xm(m,S)),r=o=E}else p(y)};return g.m=m,g},Bte=/[^\x20\t\r\n\f]+/g,vO=(e,t,n)=>{const r=e&&e.classList;let o,s=0,i=!1;if(r&&t&&Zf(t)){const c=t.match(Bte)||[];for(i=c.length>0;o=c[s++];)i=!!n(r,o)&&i}return i},f2=(e,t)=>{vO(e,t,(n,r)=>n.remove(r))},al=(e,t)=>(vO(e,t,(n,r)=>n.add(r)),Gt(f2,e,t)),Hte={opacity:1,zIndex:1},vh=(e,t)=>{const n=e||"",r=t?parseFloat(n):parseInt(n,10);return r===r?r:0},Wte=(e,t)=>!Hte[e]&&Ea(t)?`${t}px`:t,$j=(e,t,n)=>String((t!=null?t[n]||t.getPropertyValue(n):e.style[n])||""),Vte=(e,t,n)=>{try{const{style:r}=e;fl(r[t])?r.setProperty(t,n):r[t]=Wte(t,n)}catch{}};function Co(e,t){const n=Zf(t);if($s(t)||n){let o=n?"":{};if(e){const s=Yo.getComputedStyle(e,null);o=n?$j(e,s,t):t.reduce((i,c)=>(i[c]=$j(e,s,c),i),o)}return o}e&&Xn(t,(o,s)=>Vte(e,s,t[s]))}const pf=e=>Co(e,"direction")==="rtl",Lj=(e,t,n)=>{const r=t?`${t}-`:"",o=n?`-${n}`:"",s=`${r}top${o}`,i=`${r}right${o}`,c=`${r}bottom${o}`,d=`${r}left${o}`,p=Co(e,[s,i,c,d]);return{t:vh(p[s],!0),r:vh(p[i],!0),b:vh(p[c],!0),l:vh(p[d],!0)}},Dc=(e,t)=>`translate${df(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,bO="paddingTop",p2="paddingRight",h2="paddingLeft",Jm="paddingBottom",Zm="marginLeft",eg="marginRight",Ud="marginBottom",Ad="overflowX",Rd="overflowY",vi="width",bi="height",ju="hidden",Ute={w:0,h:0},h0=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:Ute,Gte=e=>h0("inner",e||Yo),Gd=Gt(h0,"offset"),$h=Gt(h0,"client"),tg=Gt(h0,"scroll"),ng=e=>{const t=parseFloat(Co(e,vi))||0,n=parseFloat(Co(e,bi))||0;return{w:t-ff(t),h:n-ff(n)}},ka=e=>e.getBoundingClientRect(),tx=e=>!!(e&&(e[bi]||e[vi])),xO=(e,t)=>{const n=tx(e);return!tx(t)&&n},m0=(e,t,n,r)=>{if(e&&t){let o=!0;return Xn(n,s=>{const i=r?r(e[s]):e[s],c=r?r(t[s]):t[s];i!==c&&(o=!1)}),o}return!1},yO=(e,t)=>m0(e,t,["w","h"]),CO=(e,t)=>m0(e,t,["x","y"]),qte=(e,t)=>m0(e,t,["t","r","b","l"]),zj=(e,t,n)=>m0(e,t,[vi,bi],n&&(r=>ff(r)));let bh;const Fj="passive",Kte=()=>{if(fl(bh)){bh=!1;try{Yo.addEventListener(Fj,As,Object.defineProperty({},Fj,{get(){bh=!0}}))}catch{}}return bh},wO=e=>e.split(" "),Bj=(e,t,n,r)=>{Xn(wO(t),o=>{e.removeEventListener(o,n,r)})},Ur=(e,t,n,r)=>{var o;const s=Kte(),i=(o=s&&r&&r.S)!=null?o:s,c=r&&r.$||!1,d=r&&r.O||!1,p=s?{passive:i,capture:c}:c;return Gt(Ls,wO(t).map(h=>{const m=d?g=>{Bj(e,h,m,c),n(g)}:n;return e.addEventListener(h,m,p),Gt(Bj,e,h,m,c)}))},SO=e=>e.stopPropagation(),Hj=e=>e.preventDefault(),Qte={x:0,y:0},j1=e=>{const t=e&&ka(e);return t?{x:t.left+Yo.pageYOffset,y:t.top+Yo.pageXOffset}:Qte},kO=(e,t,n)=>n?n.n?-e:n.i?t-e:e:e,Xte=(e,t)=>[t&&t.i?e:0,kO(e,e,t)],Yl=(e,t)=>{const{x:n,y:r}=Ea(t)?{x:t,y:t}:t||{};Ea(n)&&(e.scrollLeft=n),Ea(r)&&(e.scrollTop=r)},g0=e=>({x:e.scrollLeft,y:e.scrollTop}),Wj=(e,t)=>{Xn($s(t)?t:[t],e)},nx=e=>{const t=new Map,n=(s,i)=>{if(s){const c=t.get(s);Wj(d=>{c&&c[d?"delete":"clear"](d)},i)}else t.forEach(c=>{c.clear()}),t.clear()},r=(s,i)=>{if(Zf(s)){const p=t.get(s)||new Set;return t.set(s,p),Wj(h=>{Ta(h)&&p.add(h)},i),Gt(n,s,i)}cO(i)&&i&&n();const c=gi(s),d=[];return Xn(c,p=>{const h=s[p];h&&Qn(d,r(p,h))}),Gt(Ls,d)},o=(s,i)=>{Xn(Vu(t.get(s)),c=>{i&&!Km(i)?c.apply(0,i):c()})};return r(e||{}),[r,n,o]},Vj=e=>JSON.stringify(e,(t,n)=>{if(Ta(n))throw 0;return n}),Uj=(e,t)=>e?`${t}`.split(".").reduce((n,r)=>n&&f0(n,r)?n[r]:void 0,e):void 0,Yte={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},jO=(e,t)=>{const n={},r=Qi(gi(t),gi(e));return Xn(r,o=>{const s=e[o],i=t[o];if(df(s)&&df(i))Bn(n[o]={},jO(s,i)),u2(n[o])&&delete n[o];else if(f0(t,o)&&i!==s){let c=!0;if($s(s)||$s(i))try{Vj(s)===Vj(i)&&(c=!1)}catch{}c&&(n[o]=i)}}),n},Jte=(e,t,n)=>r=>[Uj(e,r),n||Uj(t,r)!==void 0],ep="data-overlayscrollbars",_O="os-environment",IO=`${_O}-flexbox-glue`,Zte=`${IO}-max`,PO="os-scrollbar-hidden",_1=`${ep}-initialize`,Zs=ep,EO=`${Zs}-overflow-x`,MO=`${Zs}-overflow-y`,lu="overflowVisible",ene="scrollbarHidden",Gj="scrollbarPressed",rg="updating",Ui=`${ep}-viewport`,I1="arrange",OO="scrollbarHidden",cu=lu,rx=`${ep}-padding`,tne=cu,qj=`${ep}-content`,m2="os-size-observer",nne=`${m2}-appear`,rne=`${m2}-listener`,one="os-trinsic-observer",sne="os-no-css-vars",ane="os-theme-none",es="os-scrollbar",ine=`${es}-rtl`,lne=`${es}-horizontal`,cne=`${es}-vertical`,AO=`${es}-track`,g2=`${es}-handle`,une=`${es}-visible`,dne=`${es}-cornerless`,Kj=`${es}-transitionless`,Qj=`${es}-interaction`,Xj=`${es}-unusable`,ox=`${es}-auto-hide`,Yj=`${ox}-hidden`,Jj=`${es}-wheel`,fne=`${AO}-interactive`,pne=`${g2}-interactive`,RO={},DO={},hne=e=>{Xn(e,t=>Xn(t,(n,r)=>{RO[r]=t[r]}))},TO=(e,t,n)=>gi(e).map(r=>{const{static:o,instance:s}=e[r],[i,c,d]=n||[],p=n?s:o;if(p){const h=n?p(i,c,t):p(t);return(d||DO)[r]=h}}),Uu=e=>DO[e],mne="__osOptionsValidationPlugin",gne="__osSizeObserverPlugin",v2="__osScrollbarsHidingPlugin",vne="__osClickScrollPlugin";let P1;const Zj=(e,t,n,r)=>{_s(e,t);const o=$h(t),s=Gd(t),i=ng(n);return r&&ci(t),{x:s.h-o.h+i.h,y:s.w-o.w+i.w}},bne=e=>{let t=!1;const n=al(e,PO);try{t=Co(e,zte("scrollbar-width"))==="none"||Yo.getComputedStyle(e,"::-webkit-scrollbar").getPropertyValue("display")==="none"}catch{}return n(),t},xne=(e,t)=>{Co(e,{[Ad]:ju,[Rd]:ju,direction:"rtl"}),Yl(e,{x:0});const n=j1(e),r=j1(t);Yl(e,{x:-999});const o=j1(t);return{i:n.x===r.x,n:r.x!==o.x}},yne=(e,t)=>{const n=al(e,IO),r=ka(e),o=ka(t),s=zj(o,r,!0),i=al(e,Zte),c=ka(e),d=ka(t),p=zj(d,c,!0);return n(),i(),s&&p},Cne=()=>{const{body:e}=document,n=pO(`
`)[0],r=n.firstChild,[o,,s]=nx(),[i,c]=Js({o:Zj(e,n,r),u:CO},Gt(Zj,e,n,r,!0)),[d]=c(),p=bne(n),h={x:d.x===0,y:d.y===0},m={elements:{host:null,padding:!p,viewport:w=>p&&w===w.ownerDocument.body&&w,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},g=Bn({},Yte),b=Gt(Bn,{},g),y=Gt(Bn,{},m),x={L:d,I:h,H:p,A:Co(n,"zIndex")==="-1",P:!!ex,V:xne(n,r),U:yne(n,r),B:Gt(o,"r"),j:y,N:w=>Bn(m,w)&&y(),G:b,q:w=>Bn(g,w)&&b(),F:Bn({},m),W:Bn({},g)};return Wo(n,"style"),ci(n),Yo.addEventListener("resize",()=>{let w;if(!p&&(!h.x||!h.y)){const S=Uu(v2);w=!!(S?S.R():As)(x,i)}s("r",[w])}),x},Jo=()=>(P1||(P1=Cne()),P1),b2=(e,t)=>Ta(t)?t.apply(0,e):t,wne=(e,t,n,r)=>{const o=fl(r)?n:r;return b2(e,o)||t.apply(0,e)},NO=(e,t,n,r)=>{const o=fl(r)?n:r,s=b2(e,o);return!!s&&(Wd(s)?s:t.apply(0,e))},Sne=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{I:o,H:s,j:i}=Jo(),{nativeScrollbarsOverlaid:c,body:d}=i().cancel,p=n??c,h=fl(r)?d:r,m=(o.x||o.y)&&p,g=e&&(l0(h)?!s:h);return!!m||!!g},x2=new WeakMap,kne=(e,t)=>{x2.set(e,t)},jne=e=>{x2.delete(e)},$O=e=>x2.get(e),_ne=(e,t,n)=>{let r=!1;const o=n?new WeakMap:!1,s=()=>{r=!0},i=c=>{if(o&&n){const d=n.map(p=>{const[h,m]=p||[];return[m&&h?(c||fO)(h,e):[],m]});Xn(d,p=>Xn(p[0],h=>{const m=p[1],g=o.get(h)||[];if(e.contains(h)&&m){const y=Ur(h,m.trim(),x=>{r?(y(),o.delete(h)):t(x)});o.set(h,Qn(g,y))}else Ls(g),o.delete(h)}))}};return i(),[s,i]},e_=(e,t,n,r)=>{let o=!1;const{X:s,Y:i,J:c,K:d,Z:p,tt:h}=r||{},m=gO(()=>o&&n(!0),{v:33,p:99}),[g,b]=_ne(e,m,c),y=s||[],x=i||[],w=Qi(y,x),S=(I,_)=>{if(!Km(_)){const M=p||As,E=h||As,A=[],R=[];let D=!1,O=!1;if(Xn(_,T=>{const{attributeName:K,target:G,type:Q,oldValue:Z,addedNodes:te,removedNodes:V}=T,oe=Q==="attributes",ne=Q==="childList",se=e===G,re=oe&&K,ae=re?Mo(G,K||""):null,B=re&&Z!==ae,X=d0(x,K)&&B;if(t&&(ne||!se)){const $=oe&&B,F=$&&d&&Qm(G,d),pe=(F?!M(G,K,Z,ae):!oe||$)&&!E(T,!!F,e,r);Xn(te,W=>Qn(A,W)),Xn(V,W=>Qn(A,W)),O=O||pe}!t&&se&&B&&!M(G,K,Z,ae)&&(Qn(R,K),D=D||X)}),b(T=>Dj(A).reduce((K,G)=>(Qn(K,fO(T,G)),Qm(G,T)?Qn(K,G):K),[])),t)return!I&&O&&n(!1),[!1];if(!Km(R)||D){const T=[Dj(R),D];return!I&&n.apply(0,T),T}}},j=new Fte(Gt(S,!1));return[()=>(j.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:w,subtree:t,childList:t,characterData:t}),o=!0,()=>{o&&(g(),j.disconnect(),o=!1)}),()=>{if(o)return m.m(),S(!0,j.takeRecords())}]},LO=(e,t,n)=>{const{nt:o,ot:s}=n||{},i=Uu(gne),{V:c}=Jo(),d=Gt(pf,e),[p]=Js({o:!1,_:!0});return()=>{const h=[],g=pO(`
`)[0],b=g.firstChild,y=x=>{const w=x instanceof ResizeObserverEntry,S=!w&&$s(x);let j=!1,I=!1,_=!0;if(w){const[M,,E]=p(x.contentRect),A=tx(M),R=xO(M,E);I=!E||R,j=!I&&!A,_=!j}else S?[,_]=x:I=x===!0;if(o&&_){const M=S?x[0]:pf(g);Yl(g,{x:kO(3333333,3333333,M&&c),y:3333333})}j||t({st:S?x:void 0,et:!S,ot:I})};if(Ym){const x=new Ym(w=>y(w.pop()));x.observe(b),Qn(h,()=>{x.disconnect()})}else if(i){const[x,w]=i(b,y,s);Qn(h,Qi([al(g,nne),Ur(g,"animationstart",x)],w))}else return As;if(o){const[x]=Js({o:void 0},d);Qn(h,Ur(g,"scroll",w=>{const S=x(),[j,I,_]=S;I&&(f2(b,"ltr rtl"),al(b,j?"rtl":"ltr"),y([!!j,I,_])),SO(w)}))}return Gt(Ls,Qn(h,_s(e,g)))}},Ine=(e,t)=>{let n;const r=d=>d.h===0||d.isIntersecting||d.intersectionRatio>0,o=Fl(one),[s]=Js({o:!1}),i=(d,p)=>{if(d){const h=s(r(d)),[,m]=h;return m&&!p&&t(h)&&[h]}},c=(d,p)=>i(p.pop(),d);return[()=>{const d=[];if(Nj)n=new Nj(Gt(c,!1),{root:e}),n.observe(o),Qn(d,()=>{n.disconnect()});else{const p=()=>{const h=Gd(o);i(h)};Qn(d,LO(o,p)()),p()}return Gt(Ls,Qn(d,_s(e,o)))},()=>n&&c(!0,n.takeRecords())]},Pne=(e,t)=>{let n,r,o,s,i;const{H:c}=Jo(),d=`[${Zs}]`,p=`[${Ui}]`,h=["tabindex"],m=["wrap","cols","rows"],g=["id","class","style","open"],b={ct:!1,rt:pf(e.lt)},{lt:y,it:x,ut:w,ft:S,_t:j,dt:I,vt:_}=e,{U:M,B:E}=Jo(),[A]=Js({u:yO,o:{w:0,h:0}},()=>{const re=I(cu,lu),ae=I(I1,""),B=ae&&g0(x);_(cu,lu),_(I1,""),_("",rg,!0);const X=tg(w),$=tg(x),F=ng(x);return _(cu,lu,re),_(I1,"",ae),_("",rg),Yl(x,B),{w:$.w+X.w+F.w,h:$.h+X.h+F.h}}),R=S?m:Qi(g,m),D=gO(t,{v:()=>n,p:()=>r,g(re,ae){const[B]=re,[X]=ae;return[Qi(gi(B),gi(X)).reduce(($,F)=>($[F]=B[F]||X[F],$),{})]}}),O=re=>{Xn(re||h,ae=>{if(d0(h,ae)){const B=Mo(y,ae);Zf(B)?Mo(x,ae,B):Wo(x,ae)}})},T=(re,ae)=>{const[B,X]=re,$={ht:X};return Bn(b,{ct:B}),!ae&&t($),$},K=({et:re,st:ae,ot:B})=>{const $=!(re&&!B&&!ae)&&c?D:t,[F,q]=ae||[];ae&&Bn(b,{rt:F}),$({et:re||B,ot:B,gt:q})},G=(re,ae)=>{const[,B]=A(),X={bt:B};return B&&!ae&&(re?t:D)(X),X},Q=(re,ae,B)=>{const X={wt:ae};return ae&&!B?D(X):j||O(re),X},[Z,te]=w||!M?Ine(y,T):[],V=!j&&LO(y,K,{ot:!0,nt:!0}),[oe,ne]=e_(y,!1,Q,{Y:g,X:Qi(g,h)}),se=j&&Ym&&new Ym(re=>{const ae=re[re.length-1].contentRect;K({et:!0,ot:xO(ae,i)}),i=ae});return[()=>{O(),se&&se.observe(y);const re=V&&V(),ae=Z&&Z(),B=oe(),X=E($=>{const[,F]=A();D({yt:$,bt:F})});return()=>{se&&se.disconnect(),re&&re(),ae&&ae(),s&&s(),B(),X()}},({St:re,$t:ae,xt:B})=>{const X={},[$]=re("update.ignoreMutation"),[F,q]=re("update.attributes"),[pe,W]=re("update.elementEvents"),[U,ee]=re("update.debounce"),Y=W||q,ge=ae||B,he=de=>Ta($)&&$(de);if(Y){o&&o(),s&&s();const[de,_e]=e_(w||x,!0,G,{X:Qi(R,F||[]),J:pe,K:d,tt:(Pe,ze)=>{const{target:ht,attributeName:Je}=Pe;return(!ze&&Je&&!j?Rte(ht,d,p):!1)||!!Kc(ht,`.${es}`)||!!he(Pe)}});s=de(),o=_e}if(ee)if(D.m(),$s(U)){const de=U[0],_e=U[1];n=Ea(de)&&de,r=Ea(_e)&&_e}else Ea(U)?(n=U,r=!1):(n=!1,r=!1);if(ge){const de=ne(),_e=te&&te(),Pe=o&&o();de&&Bn(X,Q(de[0],de[1],ge)),_e&&Bn(X,T(_e[0],ge)),Pe&&Bn(X,G(Pe[0],ge))}return X},b]},sx=(e,t,n)=>Vd(e,Tte(t,n)),Ene=(e,t,n)=>{const r=ff(t),[o,s]=Xte(r,n),i=(s-e)/s,c=e/o,d=e/s,p=n?n.n?i:n.i?c:d:d;return sx(0,1,p)},zO=(e,t,n,r)=>{if(r){const c=n?"x":"y",{Ot:d,Ct:p}=r,h=p[c],m=d[c];return sx(0,1,h/(h+m))}const o=n?vi:bi,s=ka(e)[o],i=ka(t)[o];return sx(0,1,s/i)},t_=(e,t,n,r)=>{const o=zO(e,t,r);return 1/o*(1-o)*n},Mne=(e,t,n)=>{const{j:r,A:o}=Jo(),{scrollbars:s}=r(),{slot:i}=s,{Ht:c,lt:d,it:p,zt:h,It:m,At:g,_t:b}=t,{scrollbars:y}=h?{}:e,{slot:x}=y||{},w=new Map,S=U=>ex&&new ex({source:m,axis:U}),j=S("x"),I=S("y"),_=NO([c,d,p],()=>b&&g?c:d,i,x),M=U=>b&&!g&&li(U)===p,E=U=>{w.forEach((ee,Y)=>{(U?d0($s(U)?U:[U],Y):!0)&&((ee||[]).forEach(he=>{he&&he.cancel()}),w.delete(Y))})},A=(U,ee,Y)=>{const ge=Y?al:f2;Xn(U,he=>{ge(he.Et,ee)})},R=(U,ee)=>{Xn(U,Y=>{const[ge,he]=ee(Y);Co(ge,he)})},D=U=>{const ee=U||0;return isFinite(ee)?ee:0},O=U=>`${(D(U)*100).toFixed(3)}%`,T=U=>`${D(U)}px`,K=(U,ee,Y)=>{R(U,ge=>{const{Tt:he,kt:de}=ge;return[he,{[Y?vi:bi]:O(zO(he,de,Y,ee))}]})},G=(U,ee,Y)=>{R(U,ge=>{const{Tt:he,kt:de,Et:_e}=ge,{V:Pe}=Jo(),ze=Y?"x":"y",ht=Y?"Left":"Top",{Ot:Je}=ee,qt=pf(_e),Pt=t_(he,de,Ene(m[`scroll${ht}`],Je[ze],Y&&qt&&Pe),Y);return[he,{transform:Dc(O(Pt),Y)}]})},Q=U=>{const{Et:ee}=U,Y=M(ee)&&ee,{x:ge,y:he}=g0(m);return[Y,{transform:Y?Dc({x:T(ge),y:T(he)}):""}]},Z=(U,ee,Y,ge)=>ee&&U.animate(Y,{timeline:ee,composite:ge}),te=(U,ee,Y,ge)=>Z(U,ee,{transform:[Dc(T(0),ge),Dc(T(Vd(0,Y-.5)),ge)]},"add"),V=[],oe=[],ne=[],se=(U,ee,Y)=>{const ge=cO(Y),he=ge?Y:!0,de=ge?!Y:!0;he&&A(oe,U,ee),de&&A(ne,U,ee)},re=U=>{K(oe,U,!0),K(ne,U)},ae=U=>{!j&&!I&&(G(oe,U,!0),G(ne,U))},B=()=>{const U=(ee,{Et:Y,kt:ge,Tt:he})=>{const de=ee&&pf(Y),_e=Gt(t_,he,ge),Pe=_e(de?1:0,ee),ze=_e(de?0:1,ee);E(he),w.set(he,[Z(he,ee?j:I,Bn({transform:[Dc(O(Pe),ee),Dc(O(ze),ee)]},de?{clear:["left"]}:{}))])};oe.forEach(Gt(U,!0)),ne.forEach(Gt(U,!1))},X=()=>{!I&&!I&&(b&&R(oe,Q),b&&R(ne,Q))},$=({Ot:U})=>{Qi(ne,oe).forEach(({Et:ee})=>{E(ee),M(ee)&&w.set(ee,[te(ee,j,U.x,!0),te(ee,I,U.y)])})},F=U=>{const ee=U?lne:cne,Y=U?oe:ne,ge=Km(Y)?Kj:"",he=Fl(`${es} ${ee} ${ge}`),de=Fl(AO),_e=Fl(g2),Pe={Et:he,kt:de,Tt:_e};return o||al(he,sne),Qn(Y,Pe),Qn(V,[_s(he,de),_s(de,_e),Gt(ci,he),E,n(Pe,se,U)]),Pe},q=Gt(F,!0),pe=Gt(F,!1),W=()=>(_s(_,oe[0].Et),_s(_,ne[0].Et),Xm(()=>{se(Kj)},300),Gt(Ls,V));return q(),pe(),[{Dt:re,Mt:ae,Rt:B,Lt:$,Pt:X,Vt:se,Ut:{P:j,Bt:oe,jt:q,Nt:Gt(R,oe)},Gt:{P:I,Bt:ne,jt:pe,Nt:Gt(R,ne)}},W]},One=(e,t,n)=>{const{lt:r,It:o,qt:s}=t,i=(c,d)=>{const{Tt:p,kt:h}=c,m=`scroll${d?"Left":"Top"}`,g=`client${d?"X":"Y"}`,b=d?vi:bi,y=d?"left":"top",x=d?"w":"h",w=d?"x":"y",S="pointerup pointerleave pointercancel lostpointercapture",j=(I,_)=>M=>{const{Ot:E}=n,A=Gd(h)[x]-Gd(p)[x],D=_*M/A*E[w];o[m]=I+D};return Ur(h,"pointerdown",I=>{const _=Kc(I.target,`.${g2}`)===p,M=_?p:h,E=e.scrollbars,{button:A,isPrimary:R,pointerType:D}=I,{pointers:O}=E,T=A===0&&R&&E[_?"dragScroll":"clickScroll"]&&(O||[]).includes(D);if(zl(r,Zs,Gj,!0),T){const K=!_&&I.shiftKey,G=Gt(ka,p),Q=Gt(ka,h),Z=(q,pe)=>(q||G())[y]-(pe||Q())[y],te=ff(ka(o)[b])/Gd(o)[x]||1,V=j(o[m]||0,1/te),oe=I[g],ne=G(),se=Q(),re=ne[b],ae=Z(ne,se)+re/2,B=oe-se[y],X=_?0:B-ae,$=q=>{Ls(F),M.releasePointerCapture(q.pointerId)},F=[Gt(zl,r,Zs,Gj),Ur(s,S,$),Ur(s,"selectstart",q=>Hj(q),{S:!1}),Ur(h,S,$),Ur(h,"pointermove",q=>{const pe=q[g]-oe;(_||K)&&V(X+pe)})];if(K)V(X);else if(!_){const q=Uu(vne);q&&Qn(F,q(V,Z,X,re,B))}M.setPointerCapture(I.pointerId)}})};return(c,d,p)=>{const{Et:h}=c,[m,g]=El(333),b=!!o.scrollBy;let y=!0;return Gt(Ls,[Ur(h,"pointerenter",()=>{d(Qj,!0)}),Ur(h,"pointerleave pointercancel",()=>{d(Qj,!1)}),Ur(h,"wheel",x=>{const{deltaX:w,deltaY:S,deltaMode:j}=x;b&&y&&j===0&&li(h)===r&&o.scrollBy({left:w,top:S,behavior:"smooth"}),y=!1,d(Jj,!0),m(()=>{y=!0,d(Jj)}),Hj(x)},{S:!1,$:!0}),Ur(h,"mousedown",Gt(Ur,s,"click",SO,{O:!0,$:!0}),{$:!0}),i(c,p),g])}},Ane=(e,t,n,r,o,s)=>{let i,c,d,p,h,m=As,g=0;const[b,y]=El(),[x,w]=El(),[S,j]=El(100),[I,_]=El(100),[M,E]=El(100),[A,R]=El(()=>g),[D,O]=Mne(e,o,One(t,o,r)),{lt:T,Ft:K,At:G}=o,{Vt:Q,Dt:Z,Mt:te,Rt:V,Lt:oe,Pt:ne}=D,se=$=>{Q(ox,$,!0),Q(ox,$,!1)},re=($,F)=>{if(R(),$)Q(Yj);else{const q=Gt(Q,Yj,!0);g>0&&!F?A(q):q()}},ae=$=>$.pointerType==="mouse",B=$=>{ae($)&&(p=c,p&&re(!0))},X=[j,R,_,E,w,y,()=>m(),Ur(T,"pointerover",B,{O:!0}),Ur(T,"pointerenter",B),Ur(T,"pointerleave",$=>{ae($)&&(p=!1,c&&re(!1))}),Ur(T,"pointermove",$=>{ae($)&&i&&b(()=>{j(),re(!0),I(()=>{i&&re(!1)})})}),Ur(K,"scroll",$=>{x(()=>{te(r),d&&re(!0),S(()=>{d&&!p&&re(!1)})}),s($),ne()})];return[()=>Gt(Ls,Qn(X,O())),({St:$,xt:F,Wt:q,Xt:pe})=>{const{Yt:W,Jt:U,Kt:ee}=pe||{},{gt:Y,ot:ge}=q||{},{rt:he}=n,{I:de}=Jo(),{Ot:_e,Zt:Pe,Qt:ze}=r,[ht,Je]=$("showNativeOverlaidScrollbars"),[qt,Pt]=$("scrollbars.theme"),[jt,Se]=$("scrollbars.visibility"),[Fe,it]=$("scrollbars.autoHide"),[At,ke]=$("scrollbars.autoHideSuspend"),[lt]=$("scrollbars.autoHideDelay"),[Rt,zt]=$("scrollbars.dragScroll"),[Re,Qe]=$("scrollbars.clickScroll"),En=ge&&!F,Te=ze.x||ze.y,ct=W||U||Y||F,ft=ee||Se,tt=ht&&de.x&&de.y,en=(ar,vn)=>{const fn=jt==="visible"||jt==="auto"&&ar==="scroll";return Q(une,fn,vn),fn};if(g=lt,En&&(At&&Te?(se(!1),m(),M(()=>{m=Ur(K,"scroll",Gt(se,!0),{O:!0})})):se(!0)),Je&&Q(ane,tt),Pt&&(Q(h),Q(qt,!0),h=qt),ke&&!At&&se(!0),it&&(i=Fe==="move",c=Fe==="leave",d=Fe!=="never",re(!d,!0)),zt&&Q(pne,Rt),Qe&&Q(fne,Re),ft){const ar=en(Pe.x,!0),vn=en(Pe.y,!1);Q(dne,!(ar&&vn))}ct&&(Z(r),te(r),V(r),ne(),oe(r),Q(Xj,!_e.x,!0),Q(Xj,!_e.y,!1),Q(ine,he&&!G))},{},D]},Rne=e=>{const t=Jo(),{j:n,H:r}=t,o=Uu(v2),s=o&&o.C,{elements:i}=n(),{host:c,padding:d,viewport:p,content:h}=i,m=Wd(e),g=m?{}:e,{elements:b}=g,{host:y,padding:x,viewport:w,content:S}=b||{},j=m?e:g.target,I=Qm(j,"textarea"),_=j.ownerDocument,M=_.documentElement,E=j===_.body,A=_.defaultView,R=Gt(wne,[j]),D=Gt(NO,[j]),O=Gt(b2,[j]),T=Gt(Fl,""),K=Gt(R,T,p),G=Gt(D,T,h),Q=K(w),Z=Q===j,te=Z&&E,V=!Z&&G(S),oe=!Z&&Wd(Q)&&Q===V,ne=oe&&!!O(h),se=ne?K():Q,re=ne?V:G(),B=te?M:oe?se:Q,X=I?R(T,c,y):j,$=te?B:X,F=oe?re:V,q=_.activeElement,pe=!Z&&A.top===A&&q===j,W={Ht:j,lt:$,it:B,tn:!Z&&D(T,d,x),ut:F,nn:!Z&&!r&&s&&s(t),It:te?M:B,Ft:te?_:B,sn:A,qt:_,ft:I,At:E,zt:m,_t:Z,en:oe,dt:(Se,Fe)=>Ote(B,Z?Zs:Ui,Z?Fe:Se),vt:(Se,Fe,it)=>zl(B,Z?Zs:Ui,Z?Fe:Se,it)},U=gi(W).reduce((Se,Fe)=>{const it=W[Fe];return Qn(Se,it&&Wd(it)&&!li(it)?it:!1)},[]),ee=Se=>Se?d0(U,Se):null,{Ht:Y,lt:ge,tn:he,it:de,ut:_e,nn:Pe}=W,ze=[()=>{Wo(ge,Zs),Wo(ge,_1),Wo(Y,_1),E&&(Wo(M,Zs),Wo(M,_1))}],ht=I&&ee(ge);let Je=I?Y:Yb([_e,de,he,ge,Y].find(Se=>ee(Se)===!1));const qt=te?Y:_e||de,Pt=Gt(Ls,ze);return[W,()=>{Mo(ge,Zs,Z?"viewport":"host"),Mo(he,rx,""),Mo(_e,qj,""),Z||Mo(de,Ui,"");const Se=E&&!Z?al(li(j),PO):As,Fe=it=>{_s(li(it),Yb(it)),ci(it)};if(ht&&(Tj(Y,ge),Qn(ze,()=>{Tj(ge,Y),ci(ge)})),_s(qt,Je),_s(ge,he),_s(he||ge,!Z&&de),_s(de,_e),Qn(ze,()=>{Se(),Wo(he,rx),Wo(_e,qj),Wo(de,EO),Wo(de,MO),Wo(de,Ui),ee(_e)&&Fe(_e),ee(de)&&Fe(de),ee(he)&&Fe(he)}),r&&!Z&&(zl(de,Ui,OO,!0),Qn(ze,Gt(Wo,de,Ui))),Pe&&(Dte(de,Pe),Qn(ze,Gt(ci,Pe))),pe){const it="tabindex",At=Mo(de,it);Mo(de,it,"-1"),de.focus();const ke=()=>At?Mo(de,it,At):Wo(de,it),lt=Ur(_,"pointerdown keydown",()=>{ke(),lt()});Qn(ze,[ke,lt])}else q&&q.focus&&q.focus();return Je=0,Pt},Pt]},Dne=({ut:e})=>({Wt:t,cn:n,xt:r})=>{const{U:o}=Jo(),{ht:s}=t||{},{ct:i}=n;(e||!o)&&(s||r)&&Co(e,{[bi]:i?"":"100%"})},Tne=({lt:e,tn:t,it:n,_t:r},o)=>{const[s,i]=Js({u:qte,o:Lj()},Gt(Lj,e,"padding",""));return({St:c,Wt:d,cn:p,xt:h})=>{let[m,g]=i(h);const{H:b,U:y}=Jo(),{et:x,bt:w,gt:S}=d||{},{rt:j}=p,[I,_]=c("paddingAbsolute");(x||g||(h||!y&&w))&&([m,g]=s(h));const E=!r&&(_||S||g);if(E){const A=!I||!t&&!b,R=m.r+m.l,D=m.t+m.b,O={[eg]:A&&!j?-R:0,[Ud]:A?-D:0,[Zm]:A&&j?-R:0,top:A?-m.t:0,right:A?j?-m.r:"auto":0,left:A?j?"auto":-m.l:0,[vi]:A?`calc(100% + ${R}px)`:""},T={[bO]:A?m.t:0,[p2]:A?m.r:0,[Jm]:A?m.b:0,[h2]:A?m.l:0};Co(t||n,O),Co(n,T),Bn(o,{tn:m,rn:!A,k:t?T:Bn({},O,T)})}return{ln:E}}},Nne=({lt:e,tn:t,it:n,nn:r,_t:o,vt:s,At:i,sn:c},d)=>{const p=Gt(Vd,0),h="visible",m=42,g={u:yO,o:{w:0,h:0}},b={u:CO,o:{x:ju,y:ju}},y=(ae,B)=>{const X=Yo.devicePixelRatio%1!==0?1:0,$={w:p(ae.w-B.w),h:p(ae.h-B.h)};return{w:$.w>X?$.w:0,h:$.h>X?$.h:0}},x=ae=>ae.indexOf(h)===0,{L:w,U:S,H:j,I}=Jo(),_=Uu(v2),M=!o&&!j&&(I.x||I.y),E=i&&o,[A,R]=Js(g,Gt(ng,n)),[D,O]=Js(g,Gt(tg,n)),[T,K]=Js(g),[G,Q]=Js(g),[Z]=Js(b),te=(ae,B)=>{if(Co(n,{[bi]:""}),B){const{rn:X,tn:$}=d,{an:F,D:q}=ae,pe=ng(e),W=$h(e),U=Co(n,"boxSizing")==="content-box",ee=X||U?$.b+$.t:0,Y=!(I.x&&U);Co(n,{[bi]:W.h+pe.h+(F.x&&Y?q.x:0)-ee})}},V=(ae,B)=>{const X=!j&&!ae?m:0,$=(he,de,_e)=>{const Pe=Co(n,he),ht=(B?B[he]:Pe)==="scroll";return[Pe,ht,ht&&!j?de?X:_e:0,de&&!!X]},[F,q,pe,W]=$(Ad,I.x,w.x),[U,ee,Y,ge]=$(Rd,I.y,w.y);return{Zt:{x:F,y:U},an:{x:q,y:ee},D:{x:pe,y:Y},M:{x:W,y:ge}}},oe=(ae,B,X,$)=>{const F=(ee,Y)=>{const ge=x(ee),he=Y&&ge&&ee.replace(`${h}-`,"")||"";return[Y&&!ge?ee:"",x(he)?"hidden":he]},[q,pe]=F(X.x,B.x),[W,U]=F(X.y,B.y);return $[Ad]=pe&&W?pe:q,$[Rd]=U&&q?U:W,V(ae,$)},ne=(ae,B,X,$)=>{const{D:F,M:q}=ae,{x:pe,y:W}=q,{x:U,y:ee}=F,{k:Y}=d,ge=B?Zm:eg,he=B?h2:p2,de=Y[ge],_e=Y[Ud],Pe=Y[he],ze=Y[Jm];$[vi]=`calc(100% + ${ee+de*-1}px)`,$[ge]=-ee+de,$[Ud]=-U+_e,X&&($[he]=Pe+(W?ee:0),$[Jm]=ze+(pe?U:0))},[se,re]=_?_.T(M,S,n,r,d,V,ne):[()=>M,()=>[As]];return({St:ae,Wt:B,cn:X,xt:$},{ln:F})=>{const{et:q,wt:pe,bt:W,ht:U,gt:ee,yt:Y}=B||{},{ct:ge,rt:he}=X,[de,_e]=ae("showNativeOverlaidScrollbars"),[Pe,ze]=ae("overflow"),ht=de&&I.x&&I.y,Je=!o&&!S&&(q||W||pe||_e||U),qt=q||F||W||ee||Y||_e,Pt=x(Pe.x),jt=x(Pe.y),Se=Pt||jt;let Fe=R($),it=O($),At=K($),ke=Q($),lt;if(_e&&j&&s(OO,ene,!ht),Je&&(lt=V(ht),te(lt,ge)),qt){Se&&s(cu,lu,!1);const[Tr,ir]=re(ht,he,lt),[$n,Jn]=Fe=A($),[Mn,Fr]=it=D($),co=$h(n);let Nr=Mn,$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i,S),!d&&Yl(s,0),x},o,t,r]},Lne=(e,t,n,r)=>{const[o,s,i,c,d]=$ne(e),[p,h,m]=Pne(c,S=>{w({},S)}),[g,b,,y]=Ane(e,t,m,i,c,r),x=S=>gi(S).some(j=>!!S[j]),w=(S,j)=>{const{un:I,xt:_,$t:M,fn:E}=S,A=I||{},R=!!_,D={St:Jte(t,A,R),un:A,xt:R};if(E)return b(D),!1;const O=j||h(Bn({},D,{$t:M})),T=s(Bn({},D,{cn:m,Wt:O}));b(Bn({},D,{Wt:O,Xt:T}));const K=x(O),G=x(T),Q=K||G||!u2(A)||R;return Q&&n(S,{Wt:O,Xt:T}),Q};return[()=>{const{Ht:S,it:j,qt:I,At:_}=c,M=_?I.documentElement:S,E=g0(M),A=[p(),o(),g()];return Yl(j,E),Gt(Ls,A)},w,()=>({_n:m,dn:i}),{vn:c,hn:y},d]},ai=(e,t,n)=>{const{G:r}=Jo(),o=Wd(e),s=o?e:e.target,i=$O(s);if(t&&!i){let c=!1;const d=[],p={},h=O=>{const T=uO(O,!0),K=Uu(mne);return K?K(T,!0):T},m=Bn({},r(),h(t)),[g,b,y]=nx(),[x,w,S]=nx(n),j=(O,T)=>{S(O,T),y(O,T)},[I,_,M,E,A]=Lne(e,m,({un:O,xt:T},{Wt:K,Xt:G})=>{const{et:Q,gt:Z,ht:te,bt:V,wt:oe,ot:ne}=K,{Yt:se,Jt:re,Kt:ae}=G;j("updated",[D,{updateHints:{sizeChanged:!!Q,directionChanged:!!Z,heightIntrinsicChanged:!!te,overflowEdgeChanged:!!se,overflowAmountChanged:!!re,overflowStyleChanged:!!ae,contentMutation:!!V,hostMutation:!!oe,appear:!!ne},changedOptions:O||{},force:!!T}])},O=>j("scroll",[D,O])),R=O=>{jne(s),Ls(d),c=!0,j("destroyed",[D,O]),b(),w()},D={options(O,T){if(O){const K=T?r():{},G=jO(m,Bn(K,h(O)));u2(G)||(Bn(m,G),_({un:G}))}return Bn({},m)},on:x,off:(O,T)=>{O&&T&&w(O,T)},state(){const{_n:O,dn:T}=M(),{rt:K}=O,{Ct:G,Ot:Q,Zt:Z,Qt:te,tn:V,rn:oe}=T;return Bn({},{overflowEdge:G,overflowAmount:Q,overflowStyle:Z,hasOverflow:te,padding:V,paddingAbsolute:oe,directionRTL:K,destroyed:c})},elements(){const{Ht:O,lt:T,tn:K,it:G,ut:Q,It:Z,Ft:te}=E.vn,{Ut:V,Gt:oe}=E.hn,ne=re=>{const{Tt:ae,kt:B,Et:X}=re;return{scrollbar:X,track:B,handle:ae}},se=re=>{const{Bt:ae,jt:B}=re,X=ne(ae[0]);return Bn({},X,{clone:()=>{const $=ne(B());return _({fn:!0}),$}})};return Bn({},{target:O,host:T,padding:K||G,viewport:G,content:Q||G,scrollOffsetElement:Z,scrollEventElement:te,scrollbarHorizontal:se(V),scrollbarVertical:se(oe)})},update:O=>_({xt:O,$t:!0}),destroy:Gt(R,!1),plugin:O=>p[gi(O)[0]]};return Qn(d,[A]),kne(s,D),TO(RO,ai,[D,g,p]),Sne(E.vn.At,!o&&e.cancel)?(R(!0),D):(Qn(d,I()),j("initialized",[D]),D.update(!0),D)}return i};ai.plugin=e=>{const t=$s(e),n=t?e:[e],r=n.map(o=>TO(o,ai)[0]);return hne(n),t?r:r[0]};ai.valid=e=>{const t=e&&e.elements,n=Ta(t)&&t();return qm(n)&&!!$O(n.target)};ai.env=()=>{const{L:e,I:t,H:n,V:r,U:o,A:s,P:i,F:c,W:d,j:p,N:h,G:m,q:g}=Jo();return Bn({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:r,flexboxGlue:o,cssCustomProperties:s,scrollTimeline:i,staticDefaultInitialization:c,staticDefaultOptions:d,getDefaultInitialization:p,setDefaultInitialization:h,getDefaultOptions:m,setDefaultOptions:g})};const zne=()=>{if(typeof window>"u"){const p=()=>{};return[p,p]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",o=n.requestAnimationFrame,s=n.cancelAnimationFrame,i=r?n.requestIdleCallback:o,c=r?n.cancelIdleCallback:s,d=()=>{c(e),s(t)};return[(p,h)=>{d(),e=i(r?()=>{d(),t=o(p)}:p,typeof h=="object"?h:{timeout:2233})},d]},y2=e=>{const{options:t,events:n,defer:r}=e||{},[o,s]=l.useMemo(zne,[]),i=l.useRef(null),c=l.useRef(r),d=l.useRef(t),p=l.useRef(n);return l.useEffect(()=>{c.current=r},[r]),l.useEffect(()=>{const{current:h}=i;d.current=t,ai.valid(h)&&h.options(t||{},!0)},[t]),l.useEffect(()=>{const{current:h}=i;p.current=n,ai.valid(h)&&h.on(n||{},!0)},[n]),l.useEffect(()=>()=>{var h;s(),(h=i.current)==null||h.destroy()},[]),l.useMemo(()=>[h=>{const m=i.current;if(ai.valid(m))return;const g=c.current,b=d.current||{},y=p.current||{},x=()=>i.current=ai(h,b,y);g?o(x,g):x()},()=>i.current],[])},Fne=(e,t)=>{const{element:n="div",options:r,events:o,defer:s,children:i,...c}=e,d=n,p=l.useRef(null),h=l.useRef(null),[m,g]=y2({options:r,events:o,defer:s});return l.useEffect(()=>{const{current:b}=p,{current:y}=h;return b&&y&&m({target:b,elements:{viewport:y,content:y}}),()=>{var x;return(x=g())==null?void 0:x.destroy()}},[m,n]),l.useImperativeHandle(t,()=>({osInstance:g,getElement:()=>p.current}),[]),z.createElement(d,{"data-overlayscrollbars-initialize":"",ref:p,...c},z.createElement("div",{"data-overlayscrollbars-contents":"",ref:h},i))},v0=l.forwardRef(Fne);var FO={exports:{}},BO={};const as=Dx(qD),Sd=Dx(KD),Bne=Dx(QD);(function(e){var t,n,r=wc&&wc.__generator||function(ie,ue){var xe,Me,ye,pt,at={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return pt={next:Kt(0),throw:Kt(1),return:Kt(2)},typeof Symbol=="function"&&(pt[Symbol.iterator]=function(){return this}),pt;function Kt(gt){return function(wt){return function(Ge){if(xe)throw new TypeError("Generator is already executing.");for(;at;)try{if(xe=1,Me&&(ye=2&Ge[0]?Me.return:Ge[0]?Me.throw||((ye=Me.return)&&ye.call(Me),0):Me.next)&&!(ye=ye.call(Me,Ge[1])).done)return ye;switch(Me=0,ye&&(Ge=[2&Ge[0],ye.value]),Ge[0]){case 0:case 1:ye=Ge;break;case 4:return at.label++,{value:Ge[1],done:!1};case 5:at.label++,Me=Ge[1],Ge=[0];continue;case 7:Ge=at.ops.pop(),at.trys.pop();continue;default:if(!((ye=(ye=at.trys).length>0&&ye[ye.length-1])||Ge[0]!==6&&Ge[0]!==2)){at=0;continue}if(Ge[0]===3&&(!ye||Ge[1]>ye[0]&&Ge[1]=200&&ie.status<=299},K=function(ie){return/ion\/(vnd\.api\+)?json/.test(ie.get("content-type")||"")};function G(ie){if(!(0,D.isPlainObject)(ie))return ie;for(var ue=w({},ie),xe=0,Me=Object.entries(ue);xe"u"&&at===O&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(ln,Yt){return M(ue,null,function(){var Ve,Ct,Ft,Qt,Ln,Jt,yn,hn,Hr,pr,Tt,zn,Gn,hr,Pr,er,qn,Cn,An,Rn,jn,Fn,Zt,vt,Mt,nt,mt,St,Bt,Ue,Be,Oe,$e,Ne,Ke,Nt;return r(this,function(Ot){switch(Ot.label){case 0:return Ve=Yt.signal,Ct=Yt.getState,Ft=Yt.extra,Qt=Yt.endpoint,Ln=Yt.forced,Jt=Yt.type,Hr=(hn=typeof ln=="string"?{url:ln}:ln).url,Tt=(pr=hn.headers)===void 0?new Headers(tn.headers):pr,Gn=(zn=hn.params)===void 0?void 0:zn,Pr=(hr=hn.responseHandler)===void 0?$t??"json":hr,qn=(er=hn.validateStatus)===void 0?Ut??T:er,An=(Cn=hn.timeout)===void 0?Et:Cn,Rn=I(hn,["url","headers","params","responseHandler","validateStatus","timeout"]),jn=w(S(w({},tn),{signal:Ve}),Rn),Tt=new Headers(G(Tt)),Fn=jn,[4,ye(Tt,{getState:Ct,extra:Ft,endpoint:Qt,forced:Ln,type:Jt})];case 1:Fn.headers=Ot.sent()||Tt,Zt=function(Ze){return typeof Ze=="object"&&((0,D.isPlainObject)(Ze)||Array.isArray(Ze)||typeof Ze.toJSON=="function")},!jn.headers.has("content-type")&&Zt(jn.body)&&jn.headers.set("content-type",Ee),Zt(jn.body)&&wt(jn.headers)&&(jn.body=JSON.stringify(jn.body,et)),Gn&&(vt=~Hr.indexOf("?")?"&":"?",Mt=Kt?Kt(Gn):new URLSearchParams(G(Gn)),Hr+=vt+Mt),Hr=function(Ze,un){if(!Ze)return un;if(!un)return Ze;if(function(Sn){return new RegExp("(^|:)//").test(Sn)}(un))return un;var wn=Ze.endsWith("/")||!un.startsWith("?")?"/":"";return Ze=function(Sn){return Sn.replace(/\/$/,"")}(Ze),""+Ze+wn+function(Sn){return Sn.replace(/^\//,"")}(un)}(xe,Hr),nt=new Request(Hr,jn),mt=new Request(Hr,jn),yn={request:mt},Bt=!1,Ue=An&&setTimeout(function(){Bt=!0,Yt.abort()},An),Ot.label=2;case 2:return Ot.trys.push([2,4,5,6]),[4,at(nt)];case 3:return St=Ot.sent(),[3,6];case 4:return Be=Ot.sent(),[2,{error:{status:Bt?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Be)},meta:yn}];case 5:return Ue&&clearTimeout(Ue),[7];case 6:Oe=St.clone(),yn.response=Oe,Ne="",Ot.label=7;case 7:return Ot.trys.push([7,9,,10]),[4,Promise.all([cn(St,Pr).then(function(Ze){return $e=Ze},function(Ze){return Ke=Ze}),Oe.text().then(function(Ze){return Ne=Ze},function(){})])];case 8:if(Ot.sent(),Ke)throw Ke;return[3,10];case 9:return Nt=Ot.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:St.status,data:Ne,error:String(Nt)},meta:yn}];case 10:return[2,qn(St,$e)?{data:$e,meta:yn}:{error:{status:St.status,data:$e},meta:yn}]}})})};function cn(ln,Yt){return M(this,null,function(){var Ve;return r(this,function(Ct){switch(Ct.label){case 0:return typeof Yt=="function"?[2,Yt(ln)]:(Yt==="content-type"&&(Yt=wt(ln.headers)?"json":"text"),Yt!=="json"?[3,2]:[4,ln.text()]);case 1:return[2,(Ve=Ct.sent()).length?JSON.parse(Ve):null];case 2:return[2,ln.text()]}})})}}var Z=function(ie,ue){ue===void 0&&(ue=void 0),this.value=ie,this.meta=ue};function te(ie,ue){return ie===void 0&&(ie=0),ue===void 0&&(ue=5),M(this,null,function(){var xe,Me;return r(this,function(ye){switch(ye.label){case 0:return xe=Math.min(ie,ue),Me=~~((Math.random()+.4)*(300<=$e)}var jn=(0,ze.createAsyncThunk)(Gn+"/executeQuery",An,{getPendingMeta:function(){var vt;return(vt={startedTimeStamp:Date.now()})[ze.SHOULD_AUTOBATCH]=!0,vt},condition:function(vt,Mt){var nt,mt,St,Bt=(0,Mt.getState)(),Ue=(mt=(nt=Bt[Gn])==null?void 0:nt.queries)==null?void 0:mt[vt.queryCacheKey],Be=Ue==null?void 0:Ue.fulfilledTimeStamp,Oe=vt.originalArgs,$e=Ue==null?void 0:Ue.originalArgs,Ne=Pr[vt.endpointName];return!(!de(vt)&&((Ue==null?void 0:Ue.status)==="pending"||!Rn(vt,Bt)&&(!W(Ne)||!((St=Ne==null?void 0:Ne.forceRefetch)!=null&&St.call(Ne,{currentArg:Oe,previousArg:$e,endpointState:Ue,state:Bt})))&&Be))},dispatchConditionRejection:!0}),Fn=(0,ze.createAsyncThunk)(Gn+"/executeMutation",An,{getPendingMeta:function(){var vt;return(vt={startedTimeStamp:Date.now()})[ze.SHOULD_AUTOBATCH]=!0,vt}});function Zt(vt){return function(Mt){var nt,mt;return((mt=(nt=Mt==null?void 0:Mt.meta)==null?void 0:nt.arg)==null?void 0:mt.endpointName)===vt}}return{queryThunk:jn,mutationThunk:Fn,prefetch:function(vt,Mt,nt){return function(mt,St){var Bt=function(Ne){return"force"in Ne}(nt)&&nt.force,Ue=function(Ne){return"ifOlderThan"in Ne}(nt)&&nt.ifOlderThan,Be=function(Ne){return Ne===void 0&&(Ne=!0),qn.endpoints[vt].initiate(Mt,{forceRefetch:Ne})},Oe=qn.endpoints[vt].select(Mt)(St());if(Bt)mt(Be());else if(Ue){var $e=Oe==null?void 0:Oe.fulfilledTimeStamp;if(!$e)return void mt(Be());(Number(new Date)-Number(new Date($e)))/1e3>=Ue&&mt(Be())}else mt(Be(!1))}},updateQueryData:function(vt,Mt,nt,mt){return mt===void 0&&(mt=!0),function(St,Bt){var Ue,Be,Oe,$e=qn.endpoints[vt].select(Mt)(Bt()),Ne={patches:[],inversePatches:[],undo:function(){return St(qn.util.patchQueryData(vt,Mt,Ne.inversePatches,mt))}};if($e.status===t.uninitialized)return Ne;if("data"in $e)if((0,Pe.isDraftable)($e.data)){var Ke=(0,Pe.produceWithPatches)($e.data,nt),Nt=Ke[0],Ot=Ke[2];(Ue=Ne.patches).push.apply(Ue,Ke[1]),(Be=Ne.inversePatches).push.apply(Be,Ot),Oe=Nt}else Oe=nt($e.data),Ne.patches.push({op:"replace",path:[],value:Oe}),Ne.inversePatches.push({op:"replace",path:[],value:$e.data});return St(qn.util.patchQueryData(vt,Mt,Ne.patches,mt)),Ne}},upsertQueryData:function(vt,Mt,nt){return function(mt){var St;return mt(qn.endpoints[vt].initiate(Mt,((St={subscribe:!1,forceRefetch:!0})[he]=function(){return{data:nt}},St)))}},patchQueryData:function(vt,Mt,nt,mt){return function(St,Bt){var Ue=Pr[vt],Be=er({queryArgs:Mt,endpointDefinition:Ue,endpointName:vt});if(St(qn.internalActions.queryResultPatched({queryCacheKey:Be,patches:nt})),mt){var Oe=qn.endpoints[vt].select(Mt)(Bt()),$e=U(Ue.providesTags,Oe.data,void 0,Mt,{},Cn);St(qn.internalActions.updateProvidedBy({queryCacheKey:Be,providedTags:$e}))}}},buildMatchThunkActions:function(vt,Mt){return{matchPending:(0,_e.isAllOf)((0,_e.isPending)(vt),Zt(Mt)),matchFulfilled:(0,_e.isAllOf)((0,_e.isFulfilled)(vt),Zt(Mt)),matchRejected:(0,_e.isAllOf)((0,_e.isRejected)(vt),Zt(Mt))}}}}({baseQuery:Me,reducerPath:ye,context:xe,api:ie,serializeQueryArgs:pt,assertTagType:Ge}),et=Ee.queryThunk,Et=Ee.mutationThunk,$t=Ee.patchQueryData,Ut=Ee.updateQueryData,tn=Ee.upsertQueryData,cn=Ee.prefetch,ln=Ee.buildMatchThunkActions,Yt=function(Tt){var zn=Tt.reducerPath,Gn=Tt.queryThunk,hr=Tt.mutationThunk,Pr=Tt.context,er=Pr.endpointDefinitions,qn=Pr.apiUid,Cn=Pr.extractRehydrationInfo,An=Pr.hasRehydrationInfo,Rn=Tt.assertTagType,jn=Tt.config,Fn=(0,Y.createAction)(zn+"/resetApiState"),Zt=(0,Y.createSlice)({name:zn+"/queries",initialState:it,reducers:{removeQueryResult:{reducer:function(Ue,Be){delete Ue[Be.payload.queryCacheKey]},prepare:(0,Y.prepareAutoBatched)()},queryResultPatched:{reducer:function(Ue,Be){var Oe=Be.payload,$e=Oe.patches;jt(Ue,Oe.queryCacheKey,function(Ne){Ne.data=(0,Pt.applyPatches)(Ne.data,$e.concat())})},prepare:(0,Y.prepareAutoBatched)()}},extraReducers:function(Ue){Ue.addCase(Gn.pending,function(Be,Oe){var $e,Ne=Oe.meta,Ke=Oe.meta.arg,Nt=de(Ke);(Ke.subscribe||Nt)&&(Be[$e=Ke.queryCacheKey]!=null||(Be[$e]={status:t.uninitialized,endpointName:Ke.endpointName})),jt(Be,Ke.queryCacheKey,function(Ot){Ot.status=t.pending,Ot.requestId=Nt&&Ot.requestId?Ot.requestId:Ne.requestId,Ke.originalArgs!==void 0&&(Ot.originalArgs=Ke.originalArgs),Ot.startedTimeStamp=Ne.startedTimeStamp})}).addCase(Gn.fulfilled,function(Be,Oe){var $e=Oe.meta,Ne=Oe.payload;jt(Be,$e.arg.queryCacheKey,function(Ke){var Nt;if(Ke.requestId===$e.requestId||de($e.arg)){var Ot=er[$e.arg.endpointName].merge;if(Ke.status=t.fulfilled,Ot)if(Ke.data!==void 0){var Ze=$e.fulfilledTimeStamp,un=$e.arg,wn=$e.baseQueryMeta,Sn=$e.requestId,Er=(0,Y.createNextState)(Ke.data,function(cr){return Ot(cr,Ne,{arg:un.originalArgs,baseQueryMeta:wn,fulfilledTimeStamp:Ze,requestId:Sn})});Ke.data=Er}else Ke.data=Ne;else Ke.data=(Nt=er[$e.arg.endpointName].structuralSharing)==null||Nt?R((0,qt.isDraft)(Ke.data)?(0,Pt.original)(Ke.data):Ke.data,Ne):Ne;delete Ke.error,Ke.fulfilledTimeStamp=$e.fulfilledTimeStamp}})}).addCase(Gn.rejected,function(Be,Oe){var $e=Oe.meta,Ne=$e.condition,Ke=$e.requestId,Nt=Oe.error,Ot=Oe.payload;jt(Be,$e.arg.queryCacheKey,function(Ze){if(!Ne){if(Ze.requestId!==Ke)return;Ze.status=t.rejected,Ze.error=Ot??Nt}})}).addMatcher(An,function(Be,Oe){for(var $e=Cn(Oe).queries,Ne=0,Ke=Object.entries($e);Ne"u"||navigator.onLine===void 0||navigator.onLine,focused:typeof document>"u"||document.visibilityState!=="hidden",middlewareRegistered:!1},jn),reducers:{middlewareRegistered:function(Ue,Be){Ue.middlewareRegistered=Ue.middlewareRegistered!=="conflict"&&qn===Be.payload||"conflict"}},extraReducers:function(Ue){Ue.addCase(ae,function(Be){Be.online=!0}).addCase(B,function(Be){Be.online=!1}).addCase(se,function(Be){Be.focused=!0}).addCase(re,function(Be){Be.focused=!1}).addMatcher(An,function(Be){return w({},Be)})}}),Bt=(0,Y.combineReducers)({queries:Zt.reducer,mutations:vt.reducer,provided:Mt.reducer,subscriptions:mt.reducer,config:St.reducer});return{reducer:function(Ue,Be){return Bt(Fn.match(Be)?void 0:Ue,Be)},actions:S(w(w(w(w(w(w({},St.actions),Zt.actions),nt.actions),mt.actions),vt.actions),Mt.actions),{unsubscribeMutationResult:vt.actions.removeMutationResult,resetApiState:Fn})}}({context:xe,queryThunk:et,mutationThunk:Et,reducerPath:ye,assertTagType:Ge,config:{refetchOnFocus:gt,refetchOnReconnect:wt,refetchOnMountOrArgChange:Kt,keepUnusedDataFor:at,reducerPath:ye}}),Ve=Yt.reducer,Ct=Yt.actions;Br(ie.util,{patchQueryData:$t,updateQueryData:Ut,upsertQueryData:tn,prefetch:cn,resetApiState:Ct.resetApiState}),Br(ie.internalActions,Ct);var Ft=function(Tt){var zn=Tt.reducerPath,Gn=Tt.queryThunk,hr=Tt.api,Pr=Tt.context,er=Pr.apiUid,qn={invalidateTags:(0,ar.createAction)(zn+"/invalidateTags")},Cn=[Nr,vn,Tr,ir,Mn,co];return{middleware:function(Rn){var jn=!1,Fn=S(w({},Tt),{internalState:{currentSubscriptions:{}},refetchQuery:An}),Zt=Cn.map(function(nt){return nt(Fn)}),vt=function(nt){var mt=nt.api,St=nt.queryThunk,Bt=nt.internalState,Ue=mt.reducerPath+"/subscriptions",Be=null,Oe=!1,$e=mt.internalActions,Ne=$e.updateSubscriptionOptions,Ke=$e.unsubscribeQueryResult;return function(Nt,Ot){var Ze,un;if(Be||(Be=JSON.parse(JSON.stringify(Bt.currentSubscriptions))),mt.util.resetApiState.match(Nt))return Be=Bt.currentSubscriptions={},[!0,!1];if(mt.internalActions.internal_probeSubscription.match(Nt)){var wn=Nt.payload;return[!1,!!((Ze=Bt.currentSubscriptions[wn.queryCacheKey])!=null&&Ze[wn.requestId])]}var Sn=function(_n,ur){var po,dr,mn,Qr,Xr,Ai,ap,ns,qa;if(Ne.match(ur)){var pa=ur.payload,Ka=pa.queryCacheKey,jo=pa.requestId;return(po=_n==null?void 0:_n[Ka])!=null&&po[jo]&&(_n[Ka][jo]=pa.options),!0}if(Ke.match(ur)){var _o=ur.payload;return jo=_o.requestId,_n[Ka=_o.queryCacheKey]&&delete _n[Ka][jo],!0}if(mt.internalActions.removeQueryResult.match(ur))return delete _n[ur.payload.queryCacheKey],!0;if(St.pending.match(ur)){var Io=ur.meta;if(jo=Io.requestId,(ho=Io.arg).subscribe)return(vs=(mn=_n[dr=ho.queryCacheKey])!=null?mn:_n[dr]={})[jo]=(Xr=(Qr=ho.subscriptionOptions)!=null?Qr:vs[jo])!=null?Xr:{},!0}if(St.rejected.match(ur)){var vs,rs=ur.meta,ho=rs.arg;if(jo=rs.requestId,rs.condition&&ho.subscribe)return(vs=(ap=_n[Ai=ho.queryCacheKey])!=null?ap:_n[Ai]={})[jo]=(qa=(ns=ho.subscriptionOptions)!=null?ns:vs[jo])!=null?qa:{},!0}return!1}(Bt.currentSubscriptions,Nt);if(Sn){Oe||(Lo(function(){var _n=JSON.parse(JSON.stringify(Bt.currentSubscriptions)),ur=(0,$r.produceWithPatches)(Be,function(){return _n});Ot.next(mt.internalActions.subscriptionsUpdated(ur[1])),Be=_n,Oe=!1}),Oe=!0);var Er=!!((un=Nt.type)!=null&&un.startsWith(Ue)),cr=St.rejected.match(Nt)&&Nt.meta.condition&&!!Nt.meta.arg.subscribe;return[!Er&&!cr,!1]}return[!0,!1]}}(Fn),Mt=function(nt){var mt=nt.reducerPath,St=nt.context,Bt=nt.refetchQuery,Ue=nt.internalState,Be=nt.api.internalActions.removeQueryResult;function Oe($e,Ne){var Ke=$e.getState()[mt],Nt=Ke.queries,Ot=Ue.currentSubscriptions;St.batch(function(){for(var Ze=0,un=Object.keys(Ot);Ze{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=J(),o=H(j=>j.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:i}=XD((t==null?void 0:t.board_id)??zs.skipToken),c=l.useMemo(()=>me([we],j=>{const I=(s??[]).map(M=>OI(j,M));return{imageUsageSummary:{isInitialImage:ta(I,M=>M.isInitialImage),isCanvasImage:ta(I,M=>M.isCanvasImage),isNodesImage:ta(I,M=>M.isNodesImage),isControlImage:ta(I,M=>M.isControlImage)}}}),[s]),[d,{isLoading:p}]=YD(),[h,{isLoading:m}]=JD(),{imageUsageSummary:g}=H(c),b=l.useCallback(()=>{t&&(d(t.board_id),n(void 0))},[t,d,n]),y=l.useCallback(()=>{t&&(h(t.board_id),n(void 0))},[t,h,n]),x=l.useCallback(()=>{n(void 0)},[n]),w=l.useRef(null),S=l.useMemo(()=>m||p||i,[m,p,i]);return t?a.jsx(Wf,{isOpen:!!t,onClose:x,leastDestructiveRef:w,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsxs(Oa,{fontSize:"lg",fontWeight:"bold",children:["Delete ",t.board_name]}),a.jsx(Ra,{children:a.jsxs(N,{direction:"column",gap:3,children:[i?a.jsx(Wg,{children:a.jsx(N,{sx:{w:"full",h:32}})}):a.jsx(FM,{imageUsage:g,topMessage:r("boards.topMessage"),bottomMessage:r("boards.bottomMessage")}),a.jsx(je,{children:"Deleted boards cannot be restored."}),a.jsx(je,{children:r(o?"gallery.deleteImageBin":"gallery.deleteImagePermanent")})]})}),a.jsx(pi,{children:a.jsxs(N,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[a.jsx(Dt,{ref:w,onClick:x,children:"Cancel"}),a.jsx(Dt,{colorScheme:"warning",isLoading:S,onClick:b,children:"Delete Board Only"}),a.jsx(Dt,{colorScheme:"error",isLoading:S,onClick:y,children:"Delete Board and Images"})]})})]})})}):null},Wne=l.memo(Hne),Vne=()=>{const{t:e}=J(),[t,{isLoading:n}]=ZD(),r=e("boards.myBoard"),o=l.useCallback(()=>{t(r)},[t,r]);return a.jsx(rt,{icon:a.jsx(Zi,{}),isLoading:n,tooltip:e("boards.addBoard"),"aria-label":e("boards.addBoard"),onClick:o,size:"sm","data-testid":"add-board-button"})},Une=l.memo(Vne);var HO=Cg({displayName:"ExternalLinkIcon",path:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("path",{d:"M15 3h6v6"}),a.jsx("path",{d:"M10 14L21 3"})]})}),b0=Cg({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Gne=Cg({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),qne=Cg({displayName:"DeleteIcon",path:a.jsx("g",{fill:"currentColor",children:a.jsx("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});const Kne=me([we],({gallery:e})=>{const{boardSearchText:t}=e;return{boardSearchText:t}},Ie),Qne=()=>{const e=le(),{boardSearchText:t}=H(Kne),n=l.useRef(null),{t:r}=J(),o=l.useCallback(d=>{e(Uw(d))},[e]),s=l.useCallback(()=>{e(Uw(""))},[e]),i=l.useCallback(d=>{d.key==="Escape"&&s()},[s]),c=l.useCallback(d=>{o(d.target.value)},[o]);return l.useEffect(()=>{n.current&&n.current.focus()},[]),a.jsxs(H5,{children:[a.jsx(_g,{ref:n,placeholder:r("boards.searchBoard"),value:t,onKeyDown:i,onChange:c,"data-testid":"board-search-input"}),t&&t.length&&a.jsx(wy,{children:a.jsx(Ia,{onClick:s,size:"xs",variant:"ghost","aria-label":r("boards.clearSearch"),opacity:.5,icon:a.jsx(Gne,{boxSize:2})})})]})},Xne=l.memo(Qne);function WO(e){return e7(e)}function Yne(e){return t7(e)}const VO=(e,t)=>{var o,s;if(!e||!(t!=null&&t.data.current))return!1;const{actionType:n}=e,{payloadType:r}=t.data.current;if(e.id===t.data.current.id)return!1;switch(n){case"ADD_FIELD_TO_LINEAR":return r==="NODE_FIELD";case"SET_CURRENT_IMAGE":return r==="IMAGE_DTO";case"SET_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_CONTROL_ADAPTER_IMAGE":return r==="IMAGE_DTO";case"SET_CANVAS_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_NODES_IMAGE":return r==="IMAGE_DTO";case"SET_MULTI_NODES_IMAGE":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BATCH":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload,d=c.board_id??"none",p=e.context.boardId;return d!==p}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload,d=((o=c[0])==null?void 0:o.board_id)??"none",p=e.context.boardId;return d!==p}return!1}case"REMOVE_FROM_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:c}=t.data.current.payload;return(c.board_id??"none")!=="none"}if(r==="IMAGE_DTOS"){const{imageDTOs:c}=t.data.current.payload;return(((s=c[0])==null?void 0:s.board_id)??"none")!=="none"}return!1}default:return!1}},Jne=e=>{const{isOver:t,label:n="Drop"}=e,r=l.useRef(Jc()),{colorMode:o}=ji();return a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full"},children:[a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:Xe("base.700","base.900")(o),opacity:.7,borderRadius:"base",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(N,{sx:{position:"absolute",top:.5,insetInlineStart:.5,insetInlineEnd:.5,bottom:.5,opacity:1,borderWidth:2,borderColor:t?Xe("base.50","base.50")(o):Xe("base.200","base.300")(o),borderRadius:"lg",borderStyle:"dashed",transitionProperty:"common",transitionDuration:"0.1s",alignItems:"center",justifyContent:"center"},children:a.jsx(Le,{sx:{fontSize:"2xl",fontWeight:600,transform:t?"scale(1.1)":"scale(1)",color:t?Xe("base.50","base.50")(o):Xe("base.200","base.300")(o),transitionProperty:"common",transitionDuration:"0.1s"},children:n})})]})},r.current)},UO=l.memo(Jne),Zne=e=>{const{dropLabel:t,data:n,disabled:r}=e,o=l.useRef(Jc()),{isOver:s,setNodeRef:i,active:c}=WO({id:o.current,disabled:r,data:n});return a.jsx(Le,{ref:i,position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",pointerEvents:c?"auto":"none",children:a.jsx(So,{children:VO(n,c)&&a.jsx(UO,{isOver:s,label:t})})})},C2=l.memo(Zne),ere=({isSelected:e,isHovered:t})=>a.jsx(Le,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e?1:.7,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:e?t?"hoverSelected.light":"selected.light":t?"hoverUnselected.light":void 0,_dark:{shadow:e?t?"hoverSelected.dark":"selected.dark":t?"hoverUnselected.dark":void 0}}}),w2=l.memo(ere),tre=()=>{const{t:e}=J();return a.jsx(N,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Va,{variant:"solid",sx:{bg:"accent.400",_dark:{bg:"accent.500"}},children:e("common.auto")})})},GO=l.memo(tre);function S2(e){const[t,n]=l.useState(!1),[r,o]=l.useState(!1),[s,i]=l.useState(!1),[c,d]=l.useState([0,0]),p=l.useRef(null),h=H(g=>g.ui.globalContextMenuCloseTrigger);l.useEffect(()=>{if(t)setTimeout(()=>{o(!0),setTimeout(()=>{i(!0)})});else{i(!1);const g=setTimeout(()=>{o(t)},1e3);return()=>clearTimeout(g)}},[t]),l.useEffect(()=>{n(!1),i(!1),o(!1)},[h]),UF("contextmenu",g=>{var b;(b=p.current)!=null&&b.contains(g.target)||g.target===p.current?(g.preventDefault(),n(!0),d([g.pageX,g.pageY])):n(!1)});const m=l.useCallback(()=>{var g,b;(b=(g=e.menuProps)==null?void 0:g.onClose)==null||b.call(g),n(!1)},[e.menuProps]);return a.jsxs(a.Fragment,{children:[e.children(p),r&&a.jsx(Au,{...e.portalProps,children:a.jsxs(Mg,{isOpen:s,gutter:0,...e.menuProps,onClose:m,children:[a.jsx(Og,{"aria-hidden":!0,w:1,h:1,style:{position:"absolute",left:c[0],top:c[1],cursor:"default"},...e.menuButtonProps}),e.renderMenu()]})})]})}const x0=e=>{const{boardName:t}=jf(void 0,{selectFromResult:({data:n})=>{const r=n==null?void 0:n.find(s=>s.board_id===e);return{boardName:(r==null?void 0:r.board_name)||$I("boards.uncategorized")}}});return t},nre=({board:e,setBoardToDelete:t})=>{const n=l.useCallback(()=>{t&&t(e)},[e,t]);return a.jsxs(a.Fragment,{children:[e.image_count>0&&a.jsx(a.Fragment,{}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClick:n,children:"Delete Board"})]})},rre=l.memo(nre),ore=()=>a.jsx(a.Fragment,{}),sre=l.memo(ore),are=({board:e,board_id:t,setBoardToDelete:n,children:r})=>{const{t:o}=J(),s=le(),i=l.useMemo(()=>me(we,({gallery:w})=>{const S=w.autoAddBoardId===t,j=w.autoAssignBoardOnClick;return{isAutoAdd:S,autoAssignBoardOnClick:j}},Ie),[t]),{isAutoAdd:c,autoAssignBoardOnClick:d}=H(i),p=x0(t),h=Pn("bulkDownload").isFeatureEnabled,[m]=LI(),g=l.useCallback(()=>{s(mg(t))},[t,s]),b=l.useCallback(async()=>{try{const w=await m({image_names:[],board_id:t}).unwrap();s(Ht({title:o("gallery.preparingDownload"),status:"success",...w.response?{description:w.response}:{}}))}catch{s(Ht({title:o("gallery.preparingDownloadFailed"),status:"error"}))}},[o,t,m,s]),y=l.useCallback(w=>{w.preventDefault()},[]),x=l.useCallback(()=>a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:y,children:a.jsxs(af,{title:p,children:[a.jsx(Kn,{icon:a.jsx(Zi,{}),isDisabled:c||d,onClick:g,children:o("boards.menuItemAutoAdd")}),h&&a.jsx(Kn,{icon:a.jsx(Wu,{}),onClickCapture:b,children:o("boards.downloadBoard")}),!e&&a.jsx(sre,{}),e&&a.jsx(rre,{board:e,setBoardToDelete:n})]})}),[d,e,p,b,g,c,h,n,y,o]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:x,children:r})},qO=l.memo(are),ire=({board:e,isSelected:t,setBoardToDelete:n})=>{const r=le(),o=l.useMemo(()=>me(we,({gallery:D})=>{const O=e.board_id===D.autoAddBoardId,T=D.autoAssignBoardOnClick;return{isSelectedForAutoAdd:O,autoAssignBoardOnClick:T}},Ie),[e.board_id]),{isSelectedForAutoAdd:s,autoAssignBoardOnClick:i}=H(o),[c,d]=l.useState(!1),p=l.useCallback(()=>{d(!0)},[]),h=l.useCallback(()=>{d(!1)},[]),{data:m}=Tx(e.board_id),{data:g}=Nx(e.board_id),b=l.useMemo(()=>{if(!((m==null?void 0:m.total)===void 0||(g==null?void 0:g.total)===void 0))return`${m.total} image${m.total===1?"":"s"}, ${g.total} asset${g.total===1?"":"s"}`},[g,m]),{currentData:y}=Rs(e.cover_image_name??zs.skipToken),{board_name:x,board_id:w}=e,[S,j]=l.useState(x),I=l.useCallback(()=>{r(zI({boardId:w})),i&&r(mg(w))},[w,i,r]),[_,{isLoading:M}]=n7(),E=l.useMemo(()=>({id:w,actionType:"ADD_TO_BOARD",context:{boardId:w}}),[w]),A=l.useCallback(async D=>{if(!D.trim()){j(x);return}if(D!==x)try{const{board_name:O}=await _({board_id:w,changes:{board_name:D}}).unwrap();j(O)}catch{j(x)}},[w,x,_]),R=l.useCallback(D=>{j(D)},[]);return a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:p,onMouseOut:h,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",w:"full",h:"full"},children:a.jsx(qO,{board:e,board_id:w,setBoardToDelete:n,children:D=>a.jsx(Wn,{label:b,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:D,onClick:I,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[y!=null&&y.thumbnail_url?a.jsx(_i,{src:y==null?void 0:y.thumbnail_url,draggable:!1,sx:{objectFit:"cover",w:"full",h:"full",maxH:"full",borderRadius:"base",borderBottomRadius:"lg"}}):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(Gr,{boxSize:12,as:tte,sx:{mt:-6,opacity:.7,color:"base.500",_dark:{color:"base.500"}}})}),s&&a.jsx(GO,{}),a.jsx(w2,{isSelected:t,isHovered:c}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:t?"accent.400":"base.500",color:t?"base.50":"base.100",_dark:{bg:t?"accent.500":"base.600",color:t?"base.50":"base.100"},lineHeight:"short",fontSize:"xs"},children:a.jsxs(Lf,{value:S,isDisabled:M,submitOnBlur:!0,onChange:R,onSubmit:A,sx:{w:"full"},children:[a.jsx($f,{sx:{p:0,fontWeight:t?700:500,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1}),a.jsx(Nf,{sx:{p:0,_focusVisible:{p:0,textAlign:"center",boxShadow:"none"}}})]})}),a.jsx(C2,{data:E,dropLabel:a.jsx(je,{fontSize:"md",children:"Move"})})]})})})})})},lre=l.memo(ire),cre=me(we,({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},Ie),KO=l.memo(({isSelected:e})=>{const t=le(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(cre),o=x0("none"),s=l.useCallback(()=>{t(zI({boardId:"none"})),r&&t(mg("none"))},[t,r]),[i,c]=l.useState(!1),{data:d}=Tx("none"),{data:p}=Nx("none"),h=l.useMemo(()=>{if(!((d==null?void 0:d.total)===void 0||(p==null?void 0:p.total)===void 0))return`${d.total} image${d.total===1?"":"s"}, ${p.total} asset${p.total===1?"":"s"}`},[p,d]),m=l.useCallback(()=>{c(!0)},[]),g=l.useCallback(()=>{c(!1)},[]),b=l.useMemo(()=>({id:"no_board",actionType:"REMOVE_FROM_BOARD"}),[]);return a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none",userSelect:"none"},children:a.jsx(N,{onMouseOver:m,onMouseOut:g,sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1",borderRadius:"base",w:"full",h:"full"},children:a.jsx(qO,{board_id:"none",children:y=>a.jsx(Wn,{label:h,openDelay:1e3,hasArrow:!0,children:a.jsxs(N,{ref:y,onClick:s,sx:{w:"full",h:"full",position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",cursor:"pointer",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center"},children:a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",sx:{opacity:.4,filter:"grayscale(1)",mt:-6,w:16,h:16,minW:16,minH:16,userSelect:"none"}})}),n==="none"&&a.jsx(GO,{}),a.jsx(N,{sx:{position:"absolute",bottom:0,left:0,p:1,justifyContent:"center",alignItems:"center",w:"full",maxW:"full",borderBottomRadius:"base",bg:e?"accent.400":"base.500",color:e?"base.50":"base.100",_dark:{bg:e?"accent.500":"base.600",color:e?"base.50":"base.100"},lineHeight:"short",fontSize:"xs",fontWeight:e?700:500},children:o}),a.jsx(w2,{isSelected:e,isHovered:i}),a.jsx(C2,{data:b,dropLabel:a.jsx(je,{fontSize:"md",children:"Move"})})]})})})})})});KO.displayName="HoverableBoard";const ure=l.memo(KO),dre=me([we],({gallery:e})=>{const{selectedBoardId:t,boardSearchText:n}=e;return{selectedBoardId:t,boardSearchText:n}},Ie),fre=e=>{const{isOpen:t}=e,{selectedBoardId:n,boardSearchText:r}=H(dre),{data:o}=jf(),s=r?o==null?void 0:o.filter(d=>d.board_name.toLowerCase().includes(r.toLowerCase())):o,[i,c]=l.useState();return a.jsxs(a.Fragment,{children:[a.jsx(Af,{in:t,animateOpacity:!0,children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",gap:2,p:2,mt:2,borderRadius:"base"},children:[a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Xne,{}),a.jsx(Une,{})]}),a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"move",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsxs(rl,{className:"list-container","data-testid":"boards-list",sx:{gridTemplateColumns:"repeat(auto-fill, minmax(108px, 1fr));",maxH:346},children:[a.jsx(rf,{sx:{p:1.5},"data-testid":"no-board",children:a.jsx(ure,{isSelected:n==="none"})}),s&&s.map((d,p)=>a.jsx(rf,{sx:{p:1.5},"data-testid":`board-${p}`,children:a.jsx(lre,{board:d,isSelected:n===d.board_id,setBoardToDelete:c})},d.board_id))]})})]})}),a.jsx(Wne,{boardToDelete:i,setBoardToDelete:c})]})},pre=l.memo(fre),hre=me([we],e=>{const{selectedBoardId:t}=e.gallery;return{selectedBoardId:t}},Ie),mre=e=>{const{isOpen:t,onToggle:n}=e,{selectedBoardId:r}=H(hre),o=x0(r),s=l.useMemo(()=>o.length>20?`${o.substring(0,20)}...`:o,[o]);return a.jsxs(N,{as:nl,onClick:n,size:"sm",sx:{position:"relative",gap:2,w:"full",justifyContent:"space-between",alignItems:"center",px:2},children:[a.jsx(je,{noOfLines:1,sx:{fontWeight:600,w:"100%",textAlign:"center",color:"base.800",_dark:{color:"base.200"}},children:s}),a.jsx(b0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]})},gre=l.memo(mre),vre=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return a.jsxs(Uf,{isLazy:o,...s,children:[a.jsx(Bg,{children:t}),a.jsxs(Gf,{shadow:"dark-lg",children:[r&&a.jsx(w3,{}),n]})]})},tp=l.memo(vre);function bre(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}const QO=De((e,t)=>{const[n,r]=l.useState(!1),{label:o,value:s,min:i=1,max:c=100,step:d=1,onChange:p,tooltipSuffix:h="",withSliderMarks:m=!1,withInput:g=!1,isInteger:b=!1,inputWidth:y=16,withReset:x=!1,hideTooltip:w=!1,isCompact:S=!1,isDisabled:j=!1,sliderMarks:I,handleReset:_,sliderFormControlProps:M,sliderFormLabelProps:E,sliderMarkProps:A,sliderTrackProps:R,sliderThumbProps:D,sliderNumberInputProps:O,sliderNumberInputFieldProps:T,sliderNumberInputStepperProps:K,sliderTooltipProps:G,sliderIAIIconButtonProps:Q,...Z}=e,te=le(),{t:V}=J(),[oe,ne]=l.useState(String(s));l.useEffect(()=>{ne(s)},[s]);const se=l.useMemo(()=>O!=null&&O.min?O.min:i,[i,O==null?void 0:O.min]),re=l.useMemo(()=>O!=null&&O.max?O.max:c,[c,O==null?void 0:O.max]),ae=l.useCallback(Y=>{p(Y)},[p]),B=l.useCallback(Y=>{Y.target.value===""&&(Y.target.value=String(se));const ge=Hl(b?Math.floor(Number(Y.target.value)):Number(oe),se,re),he=Pd(ge,d);p(he),ne(he)},[b,oe,se,re,p,d]),X=l.useCallback(Y=>{ne(Y)},[]),$=l.useCallback(()=>{_&&_()},[_]),F=l.useCallback(Y=>{Y.target instanceof HTMLDivElement&&Y.target.focus()},[]),q=l.useCallback(Y=>{Y.shiftKey&&te(Qo(!0))},[te]),pe=l.useCallback(Y=>{Y.shiftKey||te(Qo(!1))},[te]),W=l.useCallback(()=>r(!0),[]),U=l.useCallback(()=>r(!1),[]),ee=l.useCallback(()=>p(Number(oe)),[oe,p]);return a.jsxs(Vn,{ref:t,onClick:F,sx:S?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:4,margin:0,padding:0}:{},isDisabled:j,...M,children:[o&&a.jsx(yr,{sx:g?{mb:-1.5}:{},...E,children:o}),a.jsxs(Pg,{w:"100%",gap:2,alignItems:"center",children:[a.jsxs(Ny,{"aria-label":o,value:s,min:i,max:c,step:d,onChange:ae,onMouseEnter:W,onMouseLeave:U,focusThumbOnChange:!1,isDisabled:j,...Z,children:[m&&!I&&a.jsxs(a.Fragment,{children:[a.jsx(Fc,{value:i,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...A,children:i}),a.jsx(Fc,{value:c,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...A,children:c})]}),m&&I&&a.jsx(a.Fragment,{children:I.map((Y,ge)=>ge===0?a.jsx(Fc,{value:Y,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},...A,children:Y},Y):ge===I.length-1?a.jsx(Fc,{value:Y,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},...A,children:Y},Y):a.jsx(Fc,{value:Y,sx:{transform:"translateX(-50%)"},...A,children:Y},Y))}),a.jsx(Ly,{...R,children:a.jsx(zy,{})}),a.jsx(Wn,{hasArrow:!0,placement:"top",isOpen:n,label:`${s}${h}`,hidden:w,...G,children:a.jsx($y,{...D,zIndex:0})})]}),g&&a.jsxs(Tg,{min:se,max:re,step:d,value:oe,onChange:X,onBlur:B,focusInputOnChange:!1,...O,children:[a.jsx($g,{onKeyDown:q,onKeyUp:pe,minWidth:y,...T}),a.jsxs(Ng,{...K,children:[a.jsx(zg,{onClick:ee}),a.jsx(Lg,{onClick:ee})]})]}),x&&a.jsx(rt,{size:"sm","aria-label":V("accessibility.reset"),tooltip:V("accessibility.reset"),icon:a.jsx(bre,{}),isDisabled:j,onClick:$,...Q})]})]})});QO.displayName="IAISlider";const It=l.memo(QO),XO=l.forwardRef(({label:e,tooltip:t,description:n,disabled:r,...o},s)=>a.jsx(Wn,{label:t,placement:"top",hasArrow:!0,openDelay:500,children:a.jsx(Le,{ref:s,...o,children:a.jsxs(Le,{children:[a.jsx(xu,{children:e}),n&&a.jsx(xu,{size:"xs",color:"base.600",children:n})]})})}));XO.displayName="IAIMantineSelectItemWithTooltip";const pl=l.memo(XO),xre=me([we],({gallery:e})=>{const{autoAddBoardId:t,autoAssignBoardOnClick:n}=e;return{autoAddBoardId:t,autoAssignBoardOnClick:n}},Ie),yre=()=>{const e=le(),{t}=J(),{autoAddBoardId:n,autoAssignBoardOnClick:r}=H(xre),o=l.useRef(null),{boards:s,hasBoards:i}=jf(void 0,{selectFromResult:({data:p})=>{const h=[{label:"None",value:"none"}];return p==null||p.forEach(({board_id:m,board_name:g})=>{h.push({label:g,value:m})}),{boards:h,hasBoards:h.length>1}}}),c=l.useCallback(p=>{p&&e(mg(p))},[e]),d=l.useCallback((p,h)=>{var m;return((m=h.label)==null?void 0:m.toLowerCase().includes(p.toLowerCase().trim()))||h.value.toLowerCase().includes(p.toLowerCase().trim())},[]);return a.jsx(sr,{label:t("boards.autoAddBoard"),inputRef:o,autoFocus:!0,placeholder:t("boards.selectBoard"),value:n,data:s,nothingFound:t("boards.noMatching"),itemComponent:pl,disabled:!i||r,filter:d,onChange:c})},Cre=l.memo(yre),wre=e=>{const{label:t,...n}=e,{colorMode:r}=ji();return a.jsx(Tf,{colorScheme:"accent",...n,children:a.jsx(je,{sx:{fontSize:"sm",color:Xe("base.800","base.200")(r)},children:t})})},Eo=l.memo(wre),Sre=me([we],e=>{const{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}=e.gallery;return{galleryImageMinimumWidth:t,shouldAutoSwitch:n,autoAssignBoardOnClick:r}},Ie),kre=()=>{const e=le(),{t}=J(),{galleryImageMinimumWidth:n,shouldAutoSwitch:r,autoAssignBoardOnClick:o}=H(Sre),s=l.useCallback(p=>{e(Gw(p))},[e]),i=l.useCallback(()=>{e(Gw(64))},[e]),c=l.useCallback(p=>{e(r7(p.target.checked))},[e]),d=l.useCallback(p=>e(o7(p.target.checked)),[e]);return a.jsx(tp,{triggerComponent:a.jsx(rt,{tooltip:t("gallery.gallerySettings"),"aria-label":t("gallery.gallerySettings"),size:"sm",icon:a.jsx(rO,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(It,{value:n,onChange:s,min:45,max:256,hideTooltip:!0,label:t("gallery.galleryImageSize"),withReset:!0,handleReset:i}),a.jsx(_r,{label:t("gallery.autoSwitchNewImages"),isChecked:r,onChange:c}),a.jsx(Eo,{label:t("gallery.autoAssignBoardOnClick"),isChecked:o,onChange:d}),a.jsx(Cre,{})]})})},jre=l.memo(kre),_re=e=>e.image?a.jsx(Wg,{sx:{w:`${e.image.width}px`,h:"auto",objectFit:"contain",aspectRatio:`${e.image.width}/${e.image.height}`}}):a.jsx(N,{sx:{opacity:.7,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(Ci,{size:"xl"})}),eo=e=>{const{icon:t=Xl,boxSize:n=16,sx:r,...o}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...r},...o,children:[t&&a.jsx(Gr,{as:t,boxSize:n,opacity:.7}),e.label&&a.jsx(je,{textAlign:"center",children:e.label})]})},Ire=e=>{const{sx:t,...n}=e;return a.jsxs(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",flexDir:"column",gap:2,userSelect:"none",opacity:.7,color:"base.700",_dark:{color:"base.500"},...t},...n,children:[a.jsx(Ci,{size:"xl"}),e.label&&a.jsx(je,{textAlign:"center",children:e.label})]})},y0=0,hl=1,Gu=2,YO=4;function JO(e,t){return n=>e(t(n))}function Pre(e,t){return t(e)}function ZO(e,t){return n=>e(t,n)}function n_(e,t){return()=>e(t)}function C0(e,t){return t(e),e}function Cr(...e){return e}function Ere(e){e()}function r_(e){return()=>e}function Mre(...e){return()=>{e.map(Ere)}}function k2(e){return e!==void 0}function qu(){}function Zn(e,t){return e(hl,t)}function pn(e,t){e(y0,t)}function j2(e){e(Gu)}function us(e){return e(YO)}function Lt(e,t){return Zn(e,ZO(t,y0))}function xi(e,t){const n=e(hl,r=>{n(),t(r)});return n}function On(){const e=[];return(t,n)=>{switch(t){case Gu:e.splice(0,e.length);return;case hl:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case y0:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function st(e){let t=e;const n=On();return(r,o)=>{switch(r){case hl:o(t);break;case y0:t=o;break;case YO:return t}return n(r,o)}}function Ore(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case hl:return s?n===s?void 0:(r(),n=s,t=Zn(e,s),t):(r(),qu);case Gu:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function fs(e){return C0(On(),t=>Lt(e,t))}function Oo(e,t){return C0(st(t),n=>Lt(e,n))}function Are(...e){return t=>e.reduceRight(Pre,t)}function He(e,...t){const n=Are(...t);return(r,o)=>{switch(r){case hl:return Zn(e,n(o));case Gu:j2(e);return}}}function e8(e,t){return e===t}function br(e=e8){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function rn(e){return t=>n=>{e(n)&&t(n)}}function yt(e){return t=>JO(t,e)}function ti(e){return t=>()=>t(e)}function ja(e,t){return n=>r=>n(t=e(t,r))}function _u(e){return t=>n=>{e>0?e--:t(n)}}function Xi(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function o_(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function bn(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);Zn(s,d=>{const p=n;n=n|c,t[i]=d,p!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const c=()=>s([i].concat(t));n===o?c():r=c}}function s_(...e){return function(t,n){switch(t){case hl:return Mre(...e.map(r=>Zn(r,n)));case Gu:return;default:throw new Error(`unrecognized action ${t}`)}}}function nn(e,t=e8){return He(e,br(t))}function ao(...e){const t=On(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const c=Math.pow(2,i);Zn(s,d=>{n[i]=d,r=r|c,r===o&&pn(t,n)})}),function(s,i){switch(s){case hl:return r===o&&i(n),Zn(t,i);case Gu:return j2(t);default:throw new Error(`unrecognized action ${s}`)}}}function Yn(e,t=[],{singleton:n}={singleton:!0}){return{id:Rre(),constructor:e,dependencies:t,singleton:n}}const Rre=()=>Symbol();function Dre(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const c=o(s.map(d=>n(d)));return i&&t.set(r,c),c};return n(e)}function Tre(e,t){const n={},r={};let o=0;const s=e.length;for(;o(w[S]=j=>{const I=x[t.methods[S]];pn(I,j)},w),{})}function h(x){return i.reduce((w,S)=>(w[S]=Ore(x[t.events[S]]),w),{})}return{Component:z.forwardRef((x,w)=>{const{children:S,...j}=x,[I]=z.useState(()=>C0(Dre(e),M=>d(M,j))),[_]=z.useState(n_(h,I));return xh(()=>{for(const M of i)M in j&&Zn(_[M],j[M]);return()=>{Object.values(_).map(j2)}},[j,_,I]),xh(()=>{d(I,j)}),z.useImperativeHandle(w,r_(p(I))),z.createElement(c.Provider,{value:I},n?z.createElement(n,Tre([...r,...o,...i],j),S):S)}),usePublisher:x=>z.useCallback(ZO(pn,z.useContext(c)[x]),[x]),useEmitterValue:x=>{const S=z.useContext(c)[x],[j,I]=z.useState(n_(us,S));return xh(()=>Zn(S,_=>{_!==j&&I(r_(_))}),[S,j]),j},useEmitter:(x,w)=>{const j=z.useContext(c)[x];xh(()=>Zn(j,w),[w,j])}}}const Nre=typeof document<"u"?z.useLayoutEffect:z.useEffect,$re=Nre;var ps=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(ps||{});const Lre={0:"debug",1:"log",2:"warn",3:"error"},zre=()=>typeof globalThis>"u"?window:globalThis,ml=Yn(()=>{const e=st(3);return{log:st((n,r,o=1)=>{var s;const i=(s=zre().VIRTUOSO_LOG_LEVEL)!=null?s:us(e);o>=i&&console[Lre[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function _2(e,t=!0){const n=z.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=z.useMemo(()=>new ResizeObserver(s=>{const i=s[0].target;i.offsetParent!==null&&e(i)}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function ac(e,t=!0){return _2(e,t).callbackRef}function Fre(e,t,n,r,o,s,i){const c=z.useCallback(d=>{const p=Bre(d.children,t,"offsetHeight",o);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const m=h.lastElementChild.dataset.viewportType==="window",g=i?i.scrollTop:m?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,b=i?i.scrollHeight:m?document.documentElement.scrollHeight:h.scrollHeight,y=i?i.offsetHeight:m?window.innerHeight:h.offsetHeight;r({scrollTop:Math.max(g,0),scrollHeight:b,viewportHeight:y}),s==null||s(Hre("row-gap",getComputedStyle(d).rowGap,o)),p!==null&&e(p)},[e,t,o,s,i,r]);return _2(c,n)}function Bre(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i{const g=m.target,b=g===window||g===document,y=b?window.pageYOffset||document.documentElement.scrollTop:g.scrollTop,x=b?document.documentElement.scrollHeight:g.scrollHeight,w=b?window.innerHeight:g.offsetHeight,S=()=>{e({scrollTop:Math.max(y,0),scrollHeight:x,viewportHeight:w})};m.suppressFlushSync?S():s7.flushSync(S),i.current!==null&&(y===i.current||y<=0||y===x-w)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t]);z.useEffect(()=>{const m=o||s.current;return r(o||s.current),d({target:m,suppressFlushSync:!0}),m.addEventListener("scroll",d,{passive:!0}),()=>{r(null),m.removeEventListener("scroll",d)}},[s,d,n,r,o]);function p(m){const g=s.current;if(!g||"offsetHeight"in g&&g.offsetHeight===0)return;const b=m.behavior==="smooth";let y,x,w;g===window?(x=Math.max(il(document.documentElement,"height"),document.documentElement.scrollHeight),y=window.innerHeight,w=document.documentElement.scrollTop):(x=g.scrollHeight,y=il(g,"height"),w=g.scrollTop);const S=x-y;if(m.top=Math.ceil(Math.max(Math.min(S,m.top),0)),n8(y,x)||m.top===w){e({scrollTop:w,scrollHeight:x,viewportHeight:y}),b&&t(!0);return}b?(i.current=m.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,g.scrollTo(m)}function h(m){s.current.scrollBy(m)}return{scrollerRef:s,scrollByCallback:h,scrollToCallback:p}}const $o=Yn(()=>{const e=On(),t=On(),n=st(0),r=On(),o=st(0),s=On(),i=On(),c=st(0),d=st(0),p=st(0),h=st(0),m=On(),g=On(),b=st(!1);return Lt(He(e,yt(({scrollTop:y})=>y)),t),Lt(He(e,yt(({scrollHeight:y})=>y)),i),Lt(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:c,fixedHeaderHeight:d,fixedFooterHeight:p,footerHeight:h,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:m,scrollBy:g,statefulScrollTop:o,deviation:n,scrollingInProgress:b}},[],{singleton:!0}),hf={lvl:0};function o8(e,t,n,r=hf,o=hf){return{k:e,v:t,lvl:n,l:r,r:o}}function or(e){return e===hf}function uu(){return hf}function ax(e,t){if(or(e))return hf;const{k:n,l:r,r:o}=e;if(t===n){if(or(r))return o;if(or(o))return r;{const[s,i]=s8(r);return Lh(Zr(e,{k:s,v:i,l:a8(r)}))}}else return tt&&(c=c.concat(ix(s,t,n))),r>=t&&r<=n&&c.push({k:r,v:o}),r<=n&&(c=c.concat(ix(i,t,n))),c}function Rl(e){return or(e)?[]:[...Rl(e.l),{k:e.k,v:e.v},...Rl(e.r)]}function s8(e){return or(e.r)?[e.k,e.v]:s8(e.r)}function a8(e){return or(e.r)?e.l:Lh(Zr(e,{r:a8(e.r)}))}function Zr(e,t){return o8(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function E1(e){return or(e)||e.lvl>e.r.lvl}function a_(e){return lx(l8(e))}function Lh(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(E1(t))return l8(Zr(e,{lvl:r-1}));if(!or(t)&&!or(t.r))return Zr(t.r,{l:Zr(t,{r:t.r.l}),r:Zr(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(E1(e))return lx(Zr(e,{lvl:r-1}));if(!or(n)&&!or(n.l)){const o=n.l,s=E1(o)?n.lvl-1:n.lvl;return Zr(o,{l:Zr(e,{r:o.l,lvl:r-1}),r:lx(Zr(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function w0(e,t,n){if(or(e))return[];const r=ca(e,t)[0];return Wre(ix(e,r,n))}function i8(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i({index:t,value:n}))}function lx(e){const{r:t,lvl:n}=e;return!or(t)&&!or(t.r)&&t.lvl===n&&t.r.lvl===n?Zr(t,{l:Zr(e,{r:t.l}),lvl:n+1}):e}function l8(e){const{l:t}=e;return!or(t)&&t.lvl===e.lvl?Zr(t,{r:Zr(e,{l:t.r})}):e}function og(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],c=n(i,t);if(c===0)return s;if(c===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function c8(e,t,n){return e[og(e,t,n)]}function Vre(e,t,n,r){const o=og(e,t,r),s=og(e,n,r,o);return e.slice(o,s+1)}const I2=Yn(()=>({recalcInProgress:st(!1)}),[],{singleton:!0});function Ure(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function i_(e,t){let n=0,r=0;for(;n=h||o===g)&&(e=ax(e,h)):(p=g!==o,d=!0),m>i&&i>=h&&g!==o&&(e=cs(e,i+1,g));p&&(e=cs(e,s,o))}return[e,n]}function qre(){return{offsetTree:[],sizeTree:uu(),groupOffsetTree:uu(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function P2({index:e},t){return t===e?0:t0&&(t=Math.max(t,c8(e,r,P2).offset)),i8(Vre(e,t,n,Kre),Qre)}function cx(e,t,n,r){let o=e,s=0,i=0,c=0,d=0;if(t!==0){d=og(o,t-1,P2),c=o[d].offset;const h=ca(n,t-1);s=h[0],i=h[1],o.length&&o[d].size===ca(n,t)[1]&&(d-=1),o=o.slice(0,d+1)}else o=[];for(const{start:p,value:h}of w0(n,t,1/0)){const m=p-s,g=m*i+c+m*r;o.push({offset:g,size:h,index:p}),s=p,c=g,i=h}return{offsetTree:o,lastIndex:s,lastOffset:c,lastSize:i}}function Yre(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,ps.DEBUG);const s=e.sizeTree;let i=s,c=0;if(n.length>0&&or(s)&&t.length===2){const g=t[0].size,b=t[1].size;i=n.reduce((y,x)=>cs(cs(y,x,g),x+1,b),i)}else[i,c]=Gre(i,t);if(i===s)return e;const{offsetTree:d,lastIndex:p,lastSize:h,lastOffset:m}=cx(e.offsetTree,c,i,o);return{sizeTree:i,offsetTree:d,lastIndex:p,lastOffset:m,lastSize:h,groupOffsetTree:n.reduce((g,b)=>cs(g,b,gf(b,d,o)),uu()),groupIndices:n}}function gf(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=c8(t,e,P2),i=e-o,c=s*i+(i-1)*n+r;return c>0?c+n:c}function Jre(e){return typeof e.groupIndex<"u"}function u8(e,t,n){if(Jre(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=d8(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function d8(e,t){if(!S0(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function S0(e){return!or(e.groupOffsetTree)}function Zre(e){return Rl(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const eoe={offsetHeight:"height",offsetWidth:"width"},Ua=Yn(([{log:e},{recalcInProgress:t}])=>{const n=On(),r=On(),o=Oo(r,0),s=On(),i=On(),c=st(0),d=st([]),p=st(void 0),h=st(void 0),m=st((M,E)=>il(M,eoe[E])),g=st(void 0),b=st(0),y=qre(),x=Oo(He(n,bn(d,e,b),ja(Yre,y),br()),y),w=Oo(He(d,br(),ja((M,E)=>({prev:M.current,current:E}),{prev:[],current:[]}),yt(({prev:M})=>M)),[]);Lt(He(d,rn(M=>M.length>0),bn(x,b),yt(([M,E,A])=>{const R=M.reduce((D,O,T)=>cs(D,O,gf(O,E.offsetTree,A)||T),uu());return{...E,groupIndices:M,groupOffsetTree:R}})),x),Lt(He(r,bn(x),rn(([M,{lastIndex:E}])=>M[{startIndex:M,endIndex:E,size:A}])),n),Lt(p,h);const S=Oo(He(p,yt(M=>M===void 0)),!0);Lt(He(h,rn(M=>M!==void 0&&or(us(x).sizeTree)),yt(M=>[{startIndex:0,endIndex:0,size:M}])),n);const j=fs(He(n,bn(x),ja(({sizes:M},[E,A])=>({changed:A!==M,sizes:A}),{changed:!1,sizes:y}),yt(M=>M.changed)));Zn(He(c,ja((M,E)=>({diff:M.prev-E,prev:E}),{diff:0,prev:0}),yt(M=>M.diff)),M=>{const{groupIndices:E}=us(x);if(M>0)pn(t,!0),pn(s,M+i_(M,E));else if(M<0){const A=us(w);A.length>0&&(M-=i_(-M,A)),pn(i,M)}}),Zn(He(c,bn(e)),([M,E])=>{M<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},ps.ERROR)});const I=fs(s);Lt(He(s,bn(x),yt(([M,E])=>{const A=E.groupIndices.length>0,R=[],D=E.lastSize;if(A){const O=mf(E.sizeTree,0);let T=0,K=0;for(;T{let oe=Z.ranges;return Z.prevSize!==0&&(oe=[...Z.ranges,{startIndex:Z.prevIndex,endIndex:te+M-1,size:Z.prevSize}]),{ranges:oe,prevIndex:te+M,prevSize:V}},{ranges:R,prevIndex:M,prevSize:0}).ranges}return Rl(E.sizeTree).reduce((O,{k:T,v:K})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:T+M-1,size:O.prevSize}],prevIndex:T+M,prevSize:K}),{ranges:[],prevIndex:0,prevSize:D}).ranges})),n);const _=fs(He(i,bn(x,b),yt(([M,{offsetTree:E},A])=>{const R=-M;return gf(R,E,A)})));return Lt(He(i,bn(x,b),yt(([M,E,A])=>{if(E.groupIndices.length>0){if(or(E.sizeTree))return E;let D=uu();const O=us(w);let T=0,K=0,G=0;for(;T<-M;){G=O[K];const Z=O[K+1]-G-1;K++,T+=Z+1}if(D=Rl(E.sizeTree).reduce((Z,{k:te,v:V})=>cs(Z,Math.max(0,te+M),V),D),T!==-M){const Z=mf(E.sizeTree,G);D=cs(D,0,Z);const te=ca(E.sizeTree,-M+1)[1];D=cs(D,1,te)}return{...E,sizeTree:D,...cx(E.offsetTree,0,D,A)}}else{const D=Rl(E.sizeTree).reduce((O,{k:T,v:K})=>cs(O,Math.max(0,T+M),K),uu());return{...E,sizeTree:D,...cx(E.offsetTree,0,D,A)}}})),x),{data:g,totalCount:r,sizeRanges:n,groupIndices:d,defaultItemSize:h,fixedItemSize:p,unshiftWith:s,shiftWith:i,shiftWithOffset:_,beforeUnshiftWith:I,firstItemIndex:c,gap:b,sizes:x,listRefresh:j,statefulTotalCount:o,trackItemSizes:S,itemSize:m}},Cr(ml,I2),{singleton:!0}),toe=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function f8(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!toe)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const np=Yn(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:c,headerHeight:d,footerHeight:p,fixedHeaderHeight:h,fixedFooterHeight:m},{log:g}])=>{const b=On(),y=st(0);let x=null,w=null,S=null;function j(){x&&(x(),x=null),S&&(S(),S=null),w&&(clearTimeout(w),w=null),pn(o,!1)}return Lt(He(b,bn(e,s,t,y,d,p,g),bn(r,h,m),yt(([[I,_,M,E,A,R,D,O],T,K,G])=>{const Q=f8(I),{align:Z,behavior:te,offset:V}=Q,oe=E-1,ne=u8(Q,_,oe);let se=gf(ne,_.offsetTree,T)+R;Z==="end"?(se+=K+ca(_.sizeTree,ne)[1]-M+G,ne===oe&&(se+=D)):Z==="center"?se+=(K+ca(_.sizeTree,ne)[1]-M+G)/2:se-=A,V&&(se+=V);const re=ae=>{j(),ae?(O("retrying to scroll to",{location:I},ps.DEBUG),pn(b,I)):O("list did not change, scroll successful",{},ps.DEBUG)};if(j(),te==="smooth"){let ae=!1;S=Zn(n,B=>{ae=ae||B}),x=xi(c,()=>{re(ae)})}else x=xi(He(n,noe(150)),re);return w=setTimeout(()=>{j()},1200),pn(o,!0),O("scrolling from index to",{index:ne,top:se,behavior:te},ps.DEBUG),{top:se,behavior:te}})),i),{scrollToIndex:b,topListHeight:y}},Cr(Ua,$o,ml),{singleton:!0});function noe(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const vf="up",qd="down",roe="none",ooe={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},soe=0,rp=Yn(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=st(!1),c=st(!0),d=On(),p=On(),h=st(4),m=st(soe),g=Oo(He(s_(He(nn(t),_u(1),ti(!0)),He(nn(t),_u(1),ti(!1),o_(100))),br()),!1),b=Oo(He(s_(He(s,ti(!0)),He(s,ti(!1),o_(200))),br()),!1);Lt(He(ao(nn(t),nn(m)),yt(([j,I])=>j<=I),br()),c),Lt(He(c,Xi(50)),p);const y=fs(He(ao(e,nn(n),nn(r),nn(o),nn(h)),ja((j,[{scrollTop:I,scrollHeight:_},M,E,A,R])=>{const D=I+M-_>-R,O={viewportHeight:M,scrollTop:I,scrollHeight:_};if(D){let K,G;return I>j.state.scrollTop?(K="SCROLLED_DOWN",G=j.state.scrollTop-I):(K="SIZE_DECREASED",G=j.state.scrollTop-I||j.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:K,scrollTopDelta:G}}let T;return O.scrollHeight>j.state.scrollHeight?T="SIZE_INCREASED":Mj&&j.atBottom===I.atBottom))),x=Oo(He(e,ja((j,{scrollTop:I,scrollHeight:_,viewportHeight:M})=>{if(n8(j.scrollHeight,_))return{scrollTop:I,scrollHeight:_,jump:0,changed:!1};{const E=_-(I+M)<1;return j.scrollTop!==I&&E?{scrollHeight:_,scrollTop:I,jump:j.scrollTop-I,changed:!0}:{scrollHeight:_,scrollTop:I,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),rn(j=>j.changed),yt(j=>j.jump)),0);Lt(He(y,yt(j=>j.atBottom)),i),Lt(He(i,Xi(50)),d);const w=st(qd);Lt(He(e,yt(({scrollTop:j})=>j),br(),ja((j,I)=>us(b)?{direction:j.direction,prevScrollTop:I}:{direction:Ij.direction)),w),Lt(He(e,Xi(50),ti(roe)),w);const S=st(0);return Lt(He(g,rn(j=>!j),ti(0)),S),Lt(He(t,Xi(100),bn(g),rn(([j,I])=>!!I),ja(([j,I],[_])=>[I,_],[0,0]),yt(([j,I])=>I-j)),S),{isScrolling:g,isAtTop:c,isAtBottom:i,atBottomState:y,atTopStateChange:p,atBottomStateChange:d,scrollDirection:w,atBottomThreshold:h,atTopThreshold:m,scrollVelocity:S,lastJumpDueToItemResize:x}},Cr($o)),gl=Yn(([{log:e}])=>{const t=st(!1),n=fs(He(t,rn(r=>r),br()));return Zn(t,r=>{r&&us(e)("props updated",{},ps.DEBUG)}),{propsReady:t,didMount:n}},Cr(ml),{singleton:!0});function E2(e,t){e==0?t():requestAnimationFrame(()=>E2(e-1,t))}function M2(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const op=Yn(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o},{didMount:s}])=>{const i=st(!0),c=st(0),d=st(!1);return Lt(He(s,bn(c),rn(([p,h])=>!!h),ti(!1)),i),Zn(He(ao(t,s),bn(i,e,n,d),rn(([[,p],h,{sizeTree:m},g,b])=>p&&(!or(m)||k2(g))&&!h&&!b),bn(c)),([,p])=>{pn(d,!0),E2(3,()=>{xi(r,()=>pn(i,!0)),pn(o,p)})}),{scrolledToInitialItem:i,initialTopMostItemIndex:c}},Cr(Ua,$o,np,gl),{singleton:!0});function l_(e){return e?e==="smooth"?"smooth":"auto":!1}const aoe=(e,t)=>typeof e=="function"?l_(e(t)):t&&l_(e),ioe=Yn(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:c},{log:d},{scrollingInProgress:p}])=>{const h=st(!1),m=On();let g=null;function b(x){pn(o,{index:"LAST",align:"end",behavior:x})}Zn(He(ao(He(nn(e),_u(1)),c),bn(nn(h),n,s,p),yt(([[x,w],S,j,I,_])=>{let M=w&&I,E="auto";return M&&(E=aoe(S,j||_),M=M&&!!E),{totalCount:x,shouldFollow:M,followOutputBehavior:E}}),rn(({shouldFollow:x})=>x)),({totalCount:x,followOutputBehavior:w})=>{g&&(g(),g=null),g=xi(t,()=>{us(d)("following output to ",{totalCount:x},ps.DEBUG),b(w),g=null})});function y(x){const w=xi(r,S=>{x&&!S.atBottom&&S.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(us(d)("scrolling to bottom due to increased size",{},ps.DEBUG),b("auto"))});setTimeout(w,100)}return Zn(He(ao(nn(h),e,i),rn(([x,,w])=>x&&w),ja(({value:x},[,w])=>({refreshed:x===w,value:w}),{refreshed:!1,value:0}),rn(({refreshed:x})=>x),bn(h,e)),([,x])=>{y(x!==!1)}),Zn(m,()=>{y(us(h)!==!1)}),Zn(ao(nn(h),r),([x,w])=>{x&&!w.atBottom&&w.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")}),{followOutput:h,autoscrollToBottom:m}},Cr(Ua,rp,np,op,gl,ml,$o));function loe(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const p8=Yn(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=On(),i=On(),c=fs(He(s,yt(loe)));return Lt(He(c,yt(d=>d.totalCount)),e),Lt(He(c,yt(d=>d.groupIndices)),t),Lt(He(ao(r,n,o),rn(([d,p])=>S0(p)),yt(([d,p,h])=>ca(p.groupOffsetTree,Math.max(d-h,0),"v")[0]),br(),yt(d=>[d])),i),{groupCounts:s,topItemsIndexes:i}},Cr(Ua,$o));function bf(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function h8(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const sg="top",ag="bottom",c_="none";function u_(e,t,n){return typeof e=="number"?n===vf&&t===sg||n===qd&&t===ag?e:0:n===vf?t===sg?e.main:e.reverse:t===ag?e.main:e.reverse}function d_(e,t){return typeof e=="number"?e:e[t]||0}const O2=Yn(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=On(),i=st(0),c=st(0),d=st(0),p=Oo(He(ao(nn(e),nn(t),nn(r),nn(s,bf),nn(d),nn(i),nn(o),nn(n),nn(c)),yt(([h,m,g,[b,y],x,w,S,j,I])=>{const _=h-j,M=w+S,E=Math.max(g-_,0);let A=c_;const R=d_(I,sg),D=d_(I,ag);return b-=j,b+=g+S,y+=g+S,y-=j,b>h+M-R&&(A=vf),yh!=null),br(bf)),[0,0]);return{listBoundary:s,overscan:d,topListHeight:i,increaseViewportBy:c,visibleRange:p}},Cr($o),{singleton:!0});function coe(e,t,n){if(S0(t)){const r=d8(e,t);return[{index:ca(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const M1={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function f_(e,t,n){if(e.length===0)return[];if(!S0(t))return e.map(p=>({...p,index:p.index+n,originalIndex:p.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=w0(t.groupOffsetTree,r,o);let c,d=0;for(const p of e){(!c||c.end0){p=e[0].offset;const x=e[e.length-1];h=x.offset+x.size}const m=n-d,g=c+m*i+(m-1)*r,b=p,y=g-h;return{items:f_(e,o,s),topItems:f_(t,o,s),topListHeight:t.reduce((x,w)=>w.size+x,0),offsetTop:p,offsetBottom:y,top:b,bottom:h,totalCount:n,firstItemIndex:s}}function m8(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const h of n.groupIndices){if(h-i>=e)break;i++}const c=e+i,d=M2(t,c),p=Array.from({length:c}).map((h,m)=>({index:m+d,size:0,offset:0,data:s[m+d]}));return zh(p,[],c,o,n,r)}const ic=Yn(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:c,topListHeight:d},{scrolledToInitialItem:p,initialTopMostItemIndex:h},{topListHeight:m},g,{didMount:b},{recalcInProgress:y}])=>{const x=st([]),w=st(0),S=On();Lt(s.topItemsIndexes,x);const j=Oo(He(ao(b,y,nn(i,bf),nn(t),nn(e),nn(h),p,nn(x),nn(r),nn(o),n),rn(([E,A,,R,,,,,,,D])=>{const O=D&&D.length!==R;return E&&!A&&!O}),yt(([,,[E,A],R,D,O,T,K,G,Q,Z])=>{const te=D,{sizeTree:V,offsetTree:oe}=te,ne=us(w);if(R===0)return{...M1,totalCount:R};if(E===0&&A===0)return ne===0?{...M1,totalCount:R}:m8(ne,O,D,G,Q,Z||[]);if(or(V))return ne>0?null:zh(coe(M2(O,R),te,Z),[],R,Q,te,G);const se=[];if(K.length>0){const $=K[0],F=K[K.length-1];let q=0;for(const pe of w0(V,$,F)){const W=pe.value,U=Math.max(pe.start,$),ee=Math.min(pe.end,F);for(let Y=U;Y<=ee;Y++)se.push({index:Y,size:W,offset:q,data:Z&&Z[Y]}),q+=W}}if(!T)return zh([],se,R,Q,te,G);const re=K.length>0?K[K.length-1]+1:0,ae=Xre(oe,E,A,re);if(ae.length===0)return null;const B=R-1,X=C0([],$=>{for(const F of ae){const q=F.value;let pe=q.offset,W=F.start;const U=q.size;if(q.offset=A);Y++)$.push({index:Y,size:U,offset:pe,data:Z&&Z[Y]}),pe+=U+Q}});return zh(X,se,R,Q,te,G)}),rn(E=>E!==null),br()),M1);Lt(He(n,rn(k2),yt(E=>E==null?void 0:E.length)),t),Lt(He(j,yt(E=>E.topListHeight)),m),Lt(m,d),Lt(He(j,yt(E=>[E.top,E.bottom])),c),Lt(He(j,yt(E=>E.items)),S);const I=fs(He(j,rn(({items:E})=>E.length>0),bn(t,n),rn(([{items:E},A])=>E[E.length-1].originalIndex===A-1),yt(([,E,A])=>[E-1,A]),br(bf),yt(([E])=>E))),_=fs(He(j,Xi(200),rn(({items:E,topItems:A})=>E.length>0&&E[0].originalIndex===A.length),yt(({items:E})=>E[0].index),br())),M=fs(He(j,rn(({items:E})=>E.length>0),yt(({items:E})=>{let A=0,R=E.length-1;for(;E[A].type==="group"&&AA;)R--;return{startIndex:E[A].index,endIndex:E[R].index}}),br(h8)));return{listState:j,topItemsIndexes:x,endReached:I,startReached:_,rangeChanged:M,itemsRendered:S,initialItemCount:w,...g}},Cr(Ua,p8,O2,op,np,rp,gl,I2),{singleton:!0}),uoe=Yn(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:c}])=>(Lt(He(c,bn(s),rn(([,d])=>d!==0),bn(o,e,t,r,n),yt(([[,d],p,h,m,g,b=[]])=>m8(d,p,h,m,g,b))),i),{}),Cr(Ua,op,ic,gl),{singleton:!0}),g8=Yn(([{scrollVelocity:e}])=>{const t=st(!1),n=On(),r=st(!1);return Lt(He(e,bn(r,t,n),rn(([o,s])=>!!s),yt(([o,s,i,c])=>{const{exit:d,enter:p}=s;if(i){if(d(o,c))return!1}else if(p(o,c))return!0;return i}),br()),t),Zn(He(ao(t,e,n),bn(r)),([[o,s,i],c])=>o&&c&&c.change&&c.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Cr(rp),{singleton:!0}),doe=Yn(([{topItemsIndexes:e}])=>{const t=st(0);return Lt(He(t,rn(n=>n>0),yt(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Cr(ic)),v8=Yn(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=On(),i=Oo(He(ao(e,r,t,n,o),yt(([c,d,p,h,m])=>c+d+p+h+m.offsetBottom+m.bottom)),0);return Lt(nn(i),s),{totalListHeight:i,totalListHeightChanged:s}},Cr($o,ic),{singleton:!0});function b8(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const foe=b8(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),poe=Yn(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:c},{listState:d},{beforeUnshiftWith:p,shiftWithOffset:h,sizes:m,gap:g},{log:b},{recalcInProgress:y}])=>{const x=fs(He(d,bn(c),ja(([,S,j,I],[{items:_,totalCount:M,bottom:E,offsetBottom:A},R])=>{const D=E+A;let O=0;return j===M&&S.length>0&&_.length>0&&(_[0].originalIndex===0&&S[0].originalIndex===0||(O=D-I,O!==0&&(O+=R))),[O,_,M,D]},[0,[],0,0]),rn(([S])=>S!==0),bn(t,i,r,s,b,y),rn(([,S,j,I,,,_])=>!_&&!I&&S!==0&&j===vf),yt(([[S],,,,,j])=>(j("Upward scrolling compensation",{amount:S},ps.DEBUG),S))));function w(S){S>0?(pn(e,{top:-S,behavior:"auto"}),pn(n,0)):(pn(n,0),pn(e,{top:-S,behavior:"auto"}))}return Zn(He(x,bn(n,o)),([S,j,I])=>{I&&foe()?pn(n,j-S):w(-S)}),Zn(He(ao(Oo(o,!1),n,y),rn(([S,j,I])=>!S&&!I&&j!==0),yt(([S,j])=>j),Xi(1)),w),Lt(He(h,yt(S=>({top:-S}))),e),Zn(He(p,bn(m,g),yt(([S,{lastSize:j,groupIndices:I,sizeTree:_},M])=>{function E(A){return A*(j+M)}if(I.length===0)return E(S);{let A=0;const R=mf(_,0);let D=0,O=0;for(;DS&&(A-=R,T=S-D+1),D+=T,A+=E(T),O++}return A}})),S=>{pn(n,S),requestAnimationFrame(()=>{pn(e,{top:S}),requestAnimationFrame(()=>{pn(n,0),pn(y,!1)})})}),{deviation:n}},Cr($o,rp,ic,Ua,ml,I2)),hoe=Yn(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=st(0);return Zn(He(e,bn(r),rn(([,o])=>o!==0),yt(([,o])=>({top:o}))),o=>{xi(He(n,_u(1),rn(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{pn(t,o)})})}),{initialScrollTop:r}},Cr(gl,$o,ic),{singleton:!0}),moe=Yn(([{viewportHeight:e},{totalListHeight:t}])=>{const n=st(!1),r=Oo(He(ao(n,e,t),rn(([o])=>o),yt(([,o,s])=>Math.max(0,o-s)),Xi(0),br()),0);return{alignToBottom:n,paddingTopAddition:r}},Cr($o,v8),{singleton:!0}),A2=Yn(([{scrollTo:e,scrollContainerState:t}])=>{const n=On(),r=On(),o=On(),s=st(!1),i=st(void 0);return Lt(He(ao(n,r),yt(([{viewportHeight:c,scrollTop:d,scrollHeight:p},{offsetTop:h}])=>({scrollTop:Math.max(0,d-h),scrollHeight:p,viewportHeight:c}))),t),Lt(He(e,bn(r),yt(([c,{offsetTop:d}])=>({...c,top:c.top+d}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Cr($o)),goe=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>er?{...i,behavior:o,align:s??"end"}:null,voe=Yn(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:c,scrollingInProgress:d},{scrollToIndex:p}])=>{const h=On();return Lt(He(h,bn(e,o,t,s,i,c,r),bn(n),yt(([[m,g,b,y,x,w,S,j],I])=>{const{done:_,behavior:M,align:E,calculateViewLocation:A=goe,...R}=m,D=u8(m,g,y-1),O=gf(D,g.offsetTree,I)+x+w,T=O+ca(g.sizeTree,D)[1],K=j+w,G=j+b-S,Q=A({itemTop:O,itemBottom:T,viewportTop:K,viewportBottom:G,locationParams:{behavior:M,align:E,...R}});return Q?_&&xi(He(d,rn(Z=>Z===!1),_u(us(d)?1:2)),_):_&&_(),Q}),rn(m=>m!==null)),p),{scrollIntoView:h}},Cr(Ua,$o,np,ic,ml),{singleton:!0}),boe=Yn(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:s,windowScrollContainerState:i,windowViewportRect:c}])=>{const d=On(),p=st(void 0),h=st(null),m=st(null);return Lt(i,h),Lt(c,m),Zn(He(d,bn(e,n,s,h,m)),([g,b,y,x,w,S])=>{const j=Zre(b.sizeTree);x&&w!==null&&S!==null&&(y=w.scrollTop-S.offsetTop),g({ranges:j,scrollTop:y})}),Lt(He(p,rn(k2),yt(xoe)),r),Lt(He(o,bn(p),rn(([,g])=>g!==void 0),br(),yt(([,g])=>g.ranges)),t),{getState:d,restoreStateFrom:p}},Cr(Ua,$o,op,gl,A2));function xoe(e){return{offset:e.scrollTop,index:0,align:"start"}}const yoe=Yn(([e,t,n,r,o,s,i,c,d,p])=>({...e,...t,...n,...r,...o,...s,...i,...c,...d,...p}),Cr(O2,uoe,gl,g8,v8,hoe,moe,A2,voe,ml)),Coe=Yn(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:c,groupIndices:d,statefulTotalCount:p,gap:h,sizes:m},{initialTopMostItemIndex:g,scrolledToInitialItem:b},y,x,w,{listState:S,topItemsIndexes:j,...I},{scrollToIndex:_},M,{topItemCount:E},{groupCounts:A},R])=>(Lt(I.rangeChanged,R.scrollSeekRangeChanged),Lt(He(R.windowViewportRect,yt(D=>D.visibleHeight)),y.viewportHeight),{totalCount:e,data:i,firstItemIndex:c,sizeRanges:t,initialTopMostItemIndex:g,scrolledToInitialItem:b,topItemsIndexes:j,topItemCount:E,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:h,...w,statefulTotalCount:p,listState:S,scrollToIndex:_,trackItemSizes:o,itemSize:s,groupIndices:d,...I,...R,...y,sizes:m,...x}),Cr(Ua,op,$o,boe,ioe,ic,np,poe,doe,p8,yoe)),O1="-webkit-sticky",p_="sticky",x8=b8(()=>{if(typeof document>"u")return p_;const e=document.createElement("div");return e.style.position=O1,e.style.position===O1?O1:p_});function y8(e,t){const n=z.useRef(null),r=z.useCallback(c=>{if(c===null||!c.offsetParent)return;const d=c.getBoundingClientRect(),p=d.width;let h,m;if(t){const g=t.getBoundingClientRect(),b=d.top-g.top;h=g.height-Math.max(0,b),m=b+t.scrollTop}else h=window.innerHeight-Math.max(0,d.top),m=d.top+window.pageYOffset;n.current={offsetTop:m,visibleHeight:h,visibleWidth:p},e(n.current)},[e,t]),{callbackRef:o,ref:s}=_2(r),i=z.useCallback(()=>{r(s.current)},[r,s]);return z.useEffect(()=>{if(t){t.addEventListener("scroll",i);const c=new ResizeObserver(i);return c.observe(t),()=>{t.removeEventListener("scroll",i),c.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const C8=z.createContext(void 0),w8=z.createContext(void 0);function S8(e){return e}const woe=Yn(()=>{const e=st(d=>`Item ${d}`),t=st(null),n=st(d=>`Group ${d}`),r=st({}),o=st(S8),s=st("div"),i=st(qu),c=(d,p=null)=>Oo(He(r,yt(h=>h[d]),br()),p);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:c("Footer"),HeaderComponent:c("Header"),TopItemListComponent:c("TopItemList"),ListComponent:c("List","div"),ItemComponent:c("Item","div"),GroupComponent:c("Group","div"),ScrollerComponent:c("Scroller","div"),EmptyPlaceholder:c("EmptyPlaceholder"),ScrollSeekPlaceholder:c("ScrollSeekPlaceholder")}}),Soe=Yn(([e,t])=>({...e,...t}),Cr(Coe,woe)),koe=({height:e})=>z.createElement("div",{style:{height:e}}),joe={position:x8(),zIndex:1,overflowAnchor:"none"},_oe={overflowAnchor:"none"},h_=z.memo(function({showTopList:t=!1}){const n=In("listState"),r=Es("sizeRanges"),o=In("useWindowScroll"),s=In("customScrollParent"),i=Es("windowScrollContainerState"),c=Es("scrollContainerState"),d=s||o?i:c,p=In("itemContent"),h=In("context"),m=In("groupContent"),g=In("trackItemSizes"),b=In("itemSize"),y=In("log"),x=Es("gap"),{callbackRef:w}=Fre(r,b,g,t?qu:d,y,x,s),[S,j]=z.useState(0);R2("deviation",Q=>{S!==Q&&j(Q)});const I=In("EmptyPlaceholder"),_=In("ScrollSeekPlaceholder")||koe,M=In("ListComponent"),E=In("ItemComponent"),A=In("GroupComponent"),R=In("computeItemKey"),D=In("isSeeking"),O=In("groupIndices").length>0,T=In("paddingTopAddition"),K=In("scrolledToInitialItem"),G=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+T,paddingBottom:n.offsetBottom,marginTop:S,...K?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&I?z.createElement(I,Uo(I,h)):z.createElement(M,{...Uo(M,h),ref:w,style:G,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(Q=>{const Z=Q.originalIndex,te=R(Z+n.firstItemIndex,Q.data,h);return D?z.createElement(_,{...Uo(_,h),key:te,index:Q.index,height:Q.size,type:Q.type||"item",...Q.type==="group"?{}:{groupIndex:Q.groupIndex}}):Q.type==="group"?z.createElement(A,{...Uo(A,h),key:te,"data-index":Z,"data-known-size":Q.size,"data-item-index":Q.index,style:joe},m(Q.index,h)):z.createElement(E,{...Uo(E,h),...Eoe(E,Q.data),key:te,"data-index":Z,"data-known-size":Q.size,"data-item-index":Q.index,"data-item-group-index":Q.groupIndex,style:_oe},O?p(Q.index,Q.groupIndex,Q.data,h):p(Q.index,Q.data,h))}))}),Ioe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},k0={width:"100%",height:"100%",position:"absolute",top:0},Poe={width:"100%",position:x8(),top:0,zIndex:1};function Uo(e,t){if(typeof e!="string")return{context:t}}function Eoe(e,t){return{item:typeof e=="string"?void 0:t}}const Moe=z.memo(function(){const t=In("HeaderComponent"),n=Es("headerHeight"),r=In("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=In("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),Ooe=z.memo(function(){const t=In("FooterComponent"),n=Es("footerHeight"),r=In("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=In("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null});function k8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return z.memo(function({style:s,children:i,...c}){const d=e("scrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("scrollerRef"),g=n("context"),{scrollerRef:b,scrollByCallback:y,scrollToCallback:x}=r8(d,h,p,m);return t("scrollTo",x),t("scrollBy",y),z.createElement(p,{ref:b,style:{...Ioe,...s},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...c,...Uo(p,g)},i)})}function j8({usePublisher:e,useEmitter:t,useEmitterValue:n}){return z.memo(function({style:s,children:i,...c}){const d=e("windowScrollContainerState"),p=n("ScrollerComponent"),h=e("smoothScrollTargetReached"),m=n("totalListHeight"),g=n("deviation"),b=n("customScrollParent"),y=n("context"),{scrollerRef:x,scrollByCallback:w,scrollToCallback:S}=r8(d,h,p,qu,b);return $re(()=>(x.current=b||window,()=>{x.current=null}),[x,b]),t("windowScrollTo",S),t("scrollBy",w),z.createElement(p,{style:{position:"relative",...s,...m!==0?{height:m+g}:{}},"data-virtuoso-scroller":!0,...c,...Uo(p,y)},i)})}const Aoe=({children:e})=>{const t=z.useContext(C8),n=Es("viewportHeight"),r=Es("fixedItemHeight"),o=ac(JO(n,s=>il(s,"height")));return z.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),z.createElement("div",{style:k0,ref:o,"data-viewport-type":"element"},e)},Roe=({children:e})=>{const t=z.useContext(C8),n=Es("windowViewportRect"),r=Es("fixedItemHeight"),o=In("customScrollParent"),s=y8(n,o);return z.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),z.createElement("div",{ref:s,style:k0,"data-viewport-type":"window"},e)},Doe=({children:e})=>{const t=In("TopItemListComponent"),n=In("headerHeight"),r={...Poe,marginTop:`${n}px`},o=In("context");return z.createElement(t||"div",{style:r,context:o},e)},Toe=z.memo(function(t){const n=In("useWindowScroll"),r=In("topItemsIndexes").length>0,o=In("customScrollParent"),s=o||n?Loe:$oe,i=o||n?Roe:Aoe;return z.createElement(s,{...t},r&&z.createElement(Doe,null,z.createElement(h_,{showTopList:!0})),z.createElement(i,null,z.createElement(Moe,null),z.createElement(h_,null),z.createElement(Ooe,null)))}),{Component:Noe,usePublisher:Es,useEmitterValue:In,useEmitter:R2}=t8(Soe,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Toe),$oe=k8({usePublisher:Es,useEmitterValue:In,useEmitter:R2}),Loe=j8({usePublisher:Es,useEmitterValue:In,useEmitter:R2}),zoe=Noe,m_={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Foe={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:g_,ceil:v_,floor:ig,min:A1,max:Kd}=Math;function Boe(e){return{...Foe,items:e}}function b_(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function Hoe(e,t){return e&&e.column===t.column&&e.row===t.row}function yh(e,t){return e&&e.width===t.width&&e.height===t.height}const Woe=Yn(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:c,scrollContainerState:d,footerHeight:p,headerHeight:h},m,g,{propsReady:b,didMount:y},{windowViewportRect:x,useWindowScroll:w,customScrollParent:S,windowScrollContainerState:j,windowScrollTo:I},_])=>{const M=st(0),E=st(0),A=st(m_),R=st({height:0,width:0}),D=st({height:0,width:0}),O=On(),T=On(),K=st(0),G=st(null),Q=st({row:0,column:0}),Z=On(),te=On(),V=st(!1),oe=st(0),ne=st(!0),se=st(!1);Zn(He(y,bn(oe),rn(([F,q])=>!!q)),()=>{pn(ne,!1),pn(E,0)}),Zn(He(ao(y,ne,D,R,oe,se),rn(([F,q,pe,W,,U])=>F&&!q&&pe.height!==0&&W.height!==0&&!U)),([,,,,F])=>{pn(se,!0),E2(1,()=>{pn(O,F)}),xi(He(r),()=>{pn(n,[0,0]),pn(ne,!0)})}),Lt(He(te,rn(F=>F!=null&&F.scrollTop>0),ti(0)),E),Zn(He(y,bn(te),rn(([,F])=>F!=null)),([,F])=>{F&&(pn(R,F.viewport),pn(D,F==null?void 0:F.item),pn(Q,F.gap),F.scrollTop>0&&(pn(V,!0),xi(He(r,_u(1)),q=>{pn(V,!1)}),pn(i,{top:F.scrollTop})))}),Lt(He(R,yt(({height:F})=>F)),o),Lt(He(ao(nn(R,yh),nn(D,yh),nn(Q,(F,q)=>F&&F.column===q.column&&F.row===q.row),nn(r)),yt(([F,q,pe,W])=>({viewport:F,item:q,gap:pe,scrollTop:W}))),Z),Lt(He(ao(nn(M),t,nn(Q,Hoe),nn(D,yh),nn(R,yh),nn(G),nn(E),nn(V),nn(ne),nn(oe)),rn(([,,,,,,,F])=>!F),yt(([F,[q,pe],W,U,ee,Y,ge,,he,de])=>{const{row:_e,column:Pe}=W,{height:ze,width:ht}=U,{width:Je}=ee;if(ge===0&&(F===0||Je===0))return m_;if(ht===0){const Rt=M2(de,F),zt=Rt===0?Math.max(ge-1,0):Rt;return Boe(b_(Rt,zt,Y))}const qt=_8(Je,ht,Pe);let Pt,jt;he?q===0&&pe===0&&ge>0?(Pt=0,jt=ge-1):(Pt=qt*ig((q+_e)/(ze+_e)),jt=qt*v_((pe+_e)/(ze+_e))-1,jt=A1(F-1,Kd(jt,qt-1)),Pt=A1(jt,Kd(0,Pt))):(Pt=0,jt=-1);const Se=b_(Pt,jt,Y),{top:Fe,bottom:it}=x_(ee,W,U,Se),At=v_(F/qt),lt=At*ze+(At-1)*_e-it;return{items:Se,offsetTop:Fe,offsetBottom:lt,top:Fe,bottom:it,itemHeight:ze,itemWidth:ht}})),A),Lt(He(G,rn(F=>F!==null),yt(F=>F.length)),M),Lt(He(ao(R,D,A,Q),rn(([F,q,{items:pe}])=>pe.length>0&&q.height!==0&&F.height!==0),yt(([F,q,{items:pe},W])=>{const{top:U,bottom:ee}=x_(F,W,q,pe);return[U,ee]}),br(bf)),n);const re=st(!1);Lt(He(r,bn(re),yt(([F,q])=>q||F!==0)),re);const ae=fs(He(nn(A),rn(({items:F})=>F.length>0),bn(M,re),rn(([{items:F},q,pe])=>pe&&F[F.length-1].index===q-1),yt(([,F])=>F-1),br())),B=fs(He(nn(A),rn(({items:F})=>F.length>0&&F[0].index===0),ti(0),br())),X=fs(He(nn(A),bn(V),rn(([{items:F},q])=>F.length>0&&!q),yt(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),br(h8),Xi(0)));Lt(X,g.scrollSeekRangeChanged),Lt(He(O,bn(R,D,M,Q),yt(([F,q,pe,W,U])=>{const ee=f8(F),{align:Y,behavior:ge,offset:he}=ee;let de=ee.index;de==="LAST"&&(de=W-1),de=Kd(0,de,A1(W-1,de));let _e=ux(q,U,pe,de);return Y==="end"?_e=g_(_e-q.height+pe.height):Y==="center"&&(_e=g_(_e-q.height/2+pe.height/2)),he&&(_e+=he),{top:_e,behavior:ge}})),i);const $=Oo(He(A,yt(F=>F.offsetBottom+F.bottom)),0);return Lt(He(x,yt(F=>({width:F.visibleWidth,height:F.visibleHeight}))),R),{data:G,totalCount:M,viewportDimensions:R,itemDimensions:D,scrollTop:r,scrollHeight:T,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:c,windowViewportRect:x,windowScrollTo:I,useWindowScroll:w,customScrollParent:S,windowScrollContainerState:j,deviation:K,scrollContainerState:d,footerHeight:p,headerHeight:h,initialItemCount:E,gap:Q,restoreStateFrom:te,...g,initialTopMostItemIndex:oe,gridState:A,totalListHeight:$,...m,startReached:B,endReached:ae,rangeChanged:X,stateChanged:Z,propsReady:b,stateRestoreInProgress:V,..._}},Cr(O2,$o,rp,g8,gl,A2,ml));function x_(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=ux(e,t,n,r[0].index),i=ux(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function ux(e,t,n,r){const o=_8(e.width,n.width,t.column),s=ig(r/o),i=s*n.height+Kd(0,s-1)*t.row;return i>0?i+t.row:i}function _8(e,t,n){return Kd(1,ig((e+n)/(ig(t)+n)))}const Voe=Yn(()=>{const e=st(p=>`Item ${p}`),t=st({}),n=st(null),r=st("virtuoso-grid-item"),o=st("virtuoso-grid-list"),s=st(S8),i=st("div"),c=st(qu),d=(p,h=null)=>Oo(He(t,yt(m=>m[p]),br()),h);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:c,FooterComponent:d("Footer"),HeaderComponent:d("Header"),ListComponent:d("List","div"),ItemComponent:d("Item","div"),ScrollerComponent:d("Scroller","div"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder","div")}}),Uoe=Yn(([e,t])=>({...e,...t}),Cr(Woe,Voe)),Goe=z.memo(function(){const t=jr("gridState"),n=jr("listClassName"),r=jr("itemClassName"),o=jr("itemContent"),s=jr("computeItemKey"),i=jr("isSeeking"),c=sa("scrollHeight"),d=jr("ItemComponent"),p=jr("ListComponent"),h=jr("ScrollSeekPlaceholder"),m=jr("context"),g=sa("itemDimensions"),b=sa("gap"),y=jr("log"),x=jr("stateRestoreInProgress"),w=ac(S=>{const j=S.parentElement.parentElement.scrollHeight;c(j);const I=S.firstChild;if(I){const{width:_,height:M}=I.getBoundingClientRect();g({width:_,height:M})}b({row:y_("row-gap",getComputedStyle(S).rowGap,y),column:y_("column-gap",getComputedStyle(S).columnGap,y)})});return x?null:z.createElement(p,{ref:w,className:n,...Uo(p,m),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(S=>{const j=s(S.index,S.data,m);return i?z.createElement(h,{key:j,...Uo(h,m),index:S.index,height:t.itemHeight,width:t.itemWidth}):z.createElement(d,{...Uo(d,m),className:r,"data-index":S.index,key:j},o(S.index,S.data,m))}))}),qoe=z.memo(function(){const t=jr("HeaderComponent"),n=sa("headerHeight"),r=jr("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=jr("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),Koe=z.memo(function(){const t=jr("FooterComponent"),n=sa("footerHeight"),r=jr("headerFooterTag"),o=ac(i=>n(il(i,"height"))),s=jr("context");return t?z.createElement(r,{ref:o},z.createElement(t,Uo(t,s))):null}),Qoe=({children:e})=>{const t=z.useContext(w8),n=sa("itemDimensions"),r=sa("viewportDimensions"),o=ac(s=>{r(s.getBoundingClientRect())});return z.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),z.createElement("div",{style:k0,ref:o},e)},Xoe=({children:e})=>{const t=z.useContext(w8),n=sa("windowViewportRect"),r=sa("itemDimensions"),o=jr("customScrollParent"),s=y8(n,o);return z.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),z.createElement("div",{ref:s,style:k0},e)},Yoe=z.memo(function({...t}){const n=jr("useWindowScroll"),r=jr("customScrollParent"),o=r||n?ese:Zoe,s=r||n?Xoe:Qoe;return z.createElement(o,{...t},z.createElement(s,null,z.createElement(qoe,null),z.createElement(Goe,null),z.createElement(Koe,null)))}),{Component:Joe,usePublisher:sa,useEmitterValue:jr,useEmitter:I8}=t8(Uoe,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},Yoe),Zoe=k8({usePublisher:sa,useEmitterValue:jr,useEmitter:I8}),ese=j8({usePublisher:sa,useEmitterValue:jr,useEmitter:I8});function y_(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ps.WARN),t==="normal"?0:parseInt(t??"0",10)}const tse=Joe,nse=e=>{const t=H(s=>s.gallery.galleryView),{data:n}=Tx(e),{data:r}=Nx(e),o=l.useMemo(()=>t==="images"?n==null?void 0:n.total:r==null?void 0:r.total,[t,r,n]);return{totalImages:n,totalAssets:r,currentViewTotal:o}},rse=({imageDTO:e})=>a.jsx(N,{sx:{pointerEvents:"none",flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,p:2,alignItems:"flex-start",gap:2},children:a.jsxs(Va,{variant:"solid",colorScheme:"base",children:[e.width," × ",e.height]})}),ose=l.memo(rse),D2=({postUploadAction:e,isDisabled:t})=>{const n=H(d=>d.gallery.autoAddBoardId),[r]=MI(),o=l.useCallback(d=>{const p=d[0];p&&r({file:p,image_category:"user",is_intermediate:!1,postUploadAction:e??{type:"TOAST"},board_id:n==="none"?void 0:n})},[n,e,r]),{getRootProps:s,getInputProps:i,open:c}=Hy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},onDropAccepted:o,disabled:t,noDrag:!0,multiple:!1});return{getUploadButtonProps:s,getUploadInputProps:i,openUploader:c}},sse=me(we,({generation:e})=>e.model,Ie),j0=()=>{const e=le(),t=Zl(),{t:n}=J(),r=H(sse),o=l.useCallback(()=>{t({title:n("toast.parameterSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),s=l.useCallback(B=>{t({title:n("toast.parameterNotSet"),description:B,status:"warning",duration:2500,isClosable:!0})},[n,t]),i=l.useCallback(()=>{t({title:n("toast.parametersSet"),status:"info",duration:2500,isClosable:!0})},[n,t]),c=l.useCallback(B=>{t({title:n("toast.parametersNotSet"),status:"warning",description:B,duration:2500,isClosable:!0})},[n,t]),d=l.useCallback((B,X,$,F)=>{if(Wp(B)||Vp(X)||md($)||Bv(F)){Wp(B)&&e($d(B)),Vp(X)&&e(Ld(X)),md($)&&e(zd($)),md(F)&&e(Fd(F)),o();return}s()},[e,o,s]),p=l.useCallback(B=>{if(!Wp(B)){s();return}e($d(B)),o()},[e,o,s]),h=l.useCallback(B=>{if(!Vp(B)){s();return}e(Ld(B)),o()},[e,o,s]),m=l.useCallback(B=>{if(!md(B)){s();return}e(zd(B)),o()},[e,o,s]),g=l.useCallback(B=>{if(!Bv(B)){s();return}e(Fd(B)),o()},[e,o,s]),b=l.useCallback(B=>{if(!qw(B)){s();return}e(Hh(B)),o()},[e,o,s]),y=l.useCallback(B=>{if(!Hv(B)){s();return}e(Wh(B)),o()},[e,o,s]),x=l.useCallback(B=>{if(!Kw(B)){s();return}e(X1(B)),o()},[e,o,s]),w=l.useCallback(B=>{if(!Wv(B)){s();return}e(Y1(B)),o()},[e,o,s]),S=l.useCallback(B=>{if(!Qw(B)&&!si(B)){s();return}si(B)?e(Vc(null)):e(Vc(B)),o()},[e,o,s]),j=l.useCallback(B=>{if(!Vv(B)){s();return}e(Vh(B)),o()},[e,o,s]),I=l.useCallback(B=>{if(!Xw(B)){s();return}e(Wl(B)),o()},[e,o,s]),_=l.useCallback(B=>{if(!Yw(B)){s();return}e(Vl(B)),o()},[e,o,s]),M=l.useCallback(B=>{if(!Up(B)){s();return}e(Uh(B)),o()},[e,o,s]),E=l.useCallback(B=>{if(!Jw(B)){s();return}e(J1(B)),o()},[e,o,s]),A=l.useCallback(B=>{if(!Up(B)){s();return}e(Gh(B)),o()},[e,o,s]),R=l.useCallback(B=>{if(!Zw(B)){s();return}e(Z1(B)),o()},[e,o,s]),{data:D}=_f(void 0),O=l.useCallback(B=>{if(!FI(B.lora))return{lora:null,error:"Invalid LoRA model"};const{base_model:X,model_name:$}=B.lora,F=D?a7.getSelectors().selectById(D,`${X}/lora/${$}`):void 0;return F?(F==null?void 0:F.base_model)===(r==null?void 0:r.base_model)?{lora:F,error:null}:{lora:null,error:"LoRA incompatible with currently-selected model"}:{lora:null,error:"LoRA model is not installed"}},[D,r==null?void 0:r.base_model]),T=l.useCallback(B=>{const X=O(B);if(!X.lora){s(X.error);return}e(eS({...X.lora,weight:B.weight})),o()},[O,e,o,s]),{data:K}=$x(void 0),G=l.useCallback(B=>{if(!qh(B.control_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:X,control_model:$,control_weight:F,begin_step_percent:q,end_step_percent:pe,control_mode:W,resize_mode:U}=B,ee=K?BI.getSelectors().selectById(K,`${$.base_model}/controlnet/${$.model_name}`):void 0;if(!ee)return{controlnet:null,error:"ControlNet model is not installed"};if(!((ee==null?void 0:ee.base_model)===(r==null?void 0:r.base_model)))return{controlnet:null,error:"ControlNet incompatible with currently-selected model"};const ge="none",he=Do.none.default;return{controlnet:{type:"controlnet",isEnabled:!0,model:ee,weight:typeof F=="number"?F:gd.weight,beginStepPct:q||gd.beginStepPct,endStepPct:pe||gd.endStepPct,controlMode:W||gd.controlMode,resizeMode:U||gd.resizeMode,controlImage:(X==null?void 0:X.image_name)||null,processedControlImage:(X==null?void 0:X.image_name)||null,processorType:ge,processorNode:he,shouldAutoConfig:!0,id:Jc()},error:null}},[K,r==null?void 0:r.base_model]),Q=l.useCallback(B=>{const X=G(B);if(!X.controlnet){s(X.error);return}e(Sc(X.controlnet)),o()},[G,e,o,s]),{data:Z}=Lx(void 0),te=l.useCallback(B=>{if(!qh(B.t2i_adapter_model))return{controlnet:null,error:"Invalid ControlNet model"};const{image:X,t2i_adapter_model:$,weight:F,begin_step_percent:q,end_step_percent:pe,resize_mode:W}=B,U=Z?HI.getSelectors().selectById(Z,`${$.base_model}/t2i_adapter/${$.model_name}`):void 0;if(!U)return{controlnet:null,error:"ControlNet model is not installed"};if(!((U==null?void 0:U.base_model)===(r==null?void 0:r.base_model)))return{t2iAdapter:null,error:"ControlNet incompatible with currently-selected model"};const Y="none",ge=Do.none.default;return{t2iAdapter:{type:"t2i_adapter",isEnabled:!0,model:U,weight:typeof F=="number"?F:Gp.weight,beginStepPct:q||Gp.beginStepPct,endStepPct:pe||Gp.endStepPct,resizeMode:W||Gp.resizeMode,controlImage:(X==null?void 0:X.image_name)||null,processedControlImage:(X==null?void 0:X.image_name)||null,processorType:Y,processorNode:ge,shouldAutoConfig:!0,id:Jc()},error:null}},[r==null?void 0:r.base_model,Z]),V=l.useCallback(B=>{const X=te(B);if(!X.t2iAdapter){s(X.error);return}e(Sc(X.t2iAdapter)),o()},[te,e,o,s]),{data:oe}=zx(void 0),ne=l.useCallback(B=>{if(!i7(B==null?void 0:B.ip_adapter_model))return{ipAdapter:null,error:"Invalid IP Adapter model"};const{image:X,ip_adapter_model:$,weight:F,begin_step_percent:q,end_step_percent:pe}=B,W=oe?WI.getSelectors().selectById(oe,`${$.base_model}/ip_adapter/${$.model_name}`):void 0;return W?(W==null?void 0:W.base_model)===(r==null?void 0:r.base_model)?{ipAdapter:{id:Jc(),type:"ip_adapter",isEnabled:!0,controlImage:(X==null?void 0:X.image_name)??null,model:W,weight:F??Uv.weight,beginStepPct:q??Uv.beginStepPct,endStepPct:pe??Uv.endStepPct},error:null}:{ipAdapter:null,error:"IP Adapter incompatible with currently-selected model"}:{ipAdapter:null,error:"IP Adapter model is not installed"}},[oe,r==null?void 0:r.base_model]),se=l.useCallback(B=>{const X=ne(B);if(!X.ipAdapter){s(X.error);return}e(Sc(X.ipAdapter)),o()},[ne,e,o,s]),re=l.useCallback(B=>{e(gg(B))},[e]),ae=l.useCallback(B=>{if(!B){c();return}const{cfg_scale:X,height:$,model:F,positive_prompt:q,negative_prompt:pe,scheduler:W,vae:U,seed:ee,steps:Y,width:ge,strength:he,hrf_enabled:de,hrf_strength:_e,hrf_method:Pe,positive_style_prompt:ze,negative_style_prompt:ht,refiner_model:Je,refiner_cfg_scale:qt,refiner_steps:Pt,refiner_scheduler:jt,refiner_positive_aesthetic_score:Se,refiner_negative_aesthetic_score:Fe,refiner_start:it,loras:At,controlnets:ke,ipAdapters:lt,t2iAdapters:Rt}=B;Hv(X)&&e(Wh(X)),Kw(F)&&e(X1(F)),Wp(q)&&e($d(q)),Vp(pe)&&e(Ld(pe)),Wv(W)&&e(Y1(W)),(Qw(U)||si(U))&&(si(U)?e(Vc(null)):e(Vc(U))),qw(ee)&&e(Hh(ee)),Vv(Y)&&e(Vh(Y)),Xw(ge)&&e(Wl(ge)),Yw($)&&e(Vl($)),Up(he)&&e(Uh(he)),Jw(de)&&e(J1(de)),Up(_e)&&e(Gh(_e)),Zw(Pe)&&e(Z1(Pe)),md(ze)&&e(zd(ze)),Bv(ht)&&e(Fd(ht)),l7(Je)&&e(VI(Je)),Vv(Pt)&&e(eb(Pt)),Hv(qt)&&e(tb(qt)),Wv(jt)&&e(UI(jt)),c7(Se)&&e(nb(Se)),u7(Fe)&&e(rb(Fe)),d7(it)&&e(ob(it)),e(f7()),At==null||At.forEach(zt=>{const Re=O(zt);Re.lora&&e(eS({...Re.lora,weight:zt.weight}))}),e(RI()),ke==null||ke.forEach(zt=>{const Re=G(zt);Re.controlnet&&e(Sc(Re.controlnet))}),lt==null||lt.forEach(zt=>{const Re=ne(zt);Re.ipAdapter&&e(Sc(Re.ipAdapter))}),Rt==null||Rt.forEach(zt=>{const Re=te(zt);Re.t2iAdapter&&e(Sc(Re.t2iAdapter))}),i()},[e,i,c,O,G,ne,te]);return{recallBothPrompts:d,recallPositivePrompt:p,recallNegativePrompt:h,recallSDXLPositiveStylePrompt:m,recallSDXLNegativeStylePrompt:g,recallSeed:b,recallCfgScale:y,recallModel:x,recallScheduler:w,recallVaeModel:S,recallSteps:j,recallWidth:I,recallHeight:_,recallStrength:M,recallHrfEnabled:E,recallHrfStrength:A,recallHrfMethod:R,recallLoRA:T,recallControlNet:Q,recallIPAdapter:se,recallT2IAdapter:V,recallAllParameters:ae,sendToImageToImage:re}},ase=()=>l.useCallback(async t=>new Promise(n=>{const r=new Image;r.onload=()=>{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const s=o.getContext("2d");s&&(s.drawImage(r,0,0),n(new Promise(i=>{o.toBlob(function(c){i(c)},"image/png")})))},r.crossOrigin=GI.get()?"use-credentials":"anonymous",r.src=t}),[]),P8=()=>{const e=Zl(),{t}=J(),n=ase(),r=l.useMemo(()=>!!navigator.clipboard&&!!window.ClipboardItem,[]),o=l.useCallback(async s=>{r||e({title:t("toast.problemCopyingImage"),description:"Your browser doesn't support the Clipboard API.",status:"error",duration:2500,isClosable:!0});try{const i=await n(s);if(!i)throw new Error("Unable to create Blob");p7(i),e({title:t("toast.imageCopied"),status:"success",duration:2500,isClosable:!0})}catch(i){e({title:t("toast.problemCopyingImage"),description:String(i),status:"error",duration:2500,isClosable:!0})}},[n,r,t,e]);return{isClipboardAPIAvailable:r,copyImageToClipboard:o}};function ise(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"}}]})(e)}function lse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M0 256L28.5 28c2-16 15.6-28 31.8-28H228.9c15 0 27.1 12.1 27.1 27.1c0 3.2-.6 6.5-1.7 9.5L208 160H347.3c20.2 0 36.7 16.4 36.7 36.7c0 7.4-2.2 14.6-6.4 20.7l-192.2 281c-5.9 8.6-15.6 13.7-25.9 13.7h-2.9c-15.7 0-28.5-12.8-28.5-28.5c0-2.3 .3-4.6 .9-6.9L176 288H32c-17.7 0-32-14.3-32-32z"}}]})(e)}function cse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"}}]})(e)}function T2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"}}]})(e)}function use(e){return Ye({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"}}]})(e)}function dse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24H280c13.3 0 24-10.7 24-24s-10.7-24-24-24H136z"}}]})(e)}function fse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"}}]})(e)}function pse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}}]})(e)}function hse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"}}]})(e)}function mse(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function N2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}}]})(e)}function $2(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(e)}function E8(e){return Ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"}}]})(e)}function gse(e,t,n){var r=this,o=l.useRef(null),s=l.useRef(0),i=l.useRef(null),c=l.useRef([]),d=l.useRef(),p=l.useRef(),h=l.useRef(e),m=l.useRef(!0);h.current=e;var g=typeof window<"u",b=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var y=!!(n=n||{}).leading,x=!("trailing"in n)||!!n.trailing,w="maxWait"in n,S="debounceOnServer"in n&&!!n.debounceOnServer,j=w?Math.max(+n.maxWait||0,t):null;l.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var I=l.useMemo(function(){var _=function(O){var T=c.current,K=d.current;return c.current=d.current=null,s.current=O,p.current=h.current.apply(K,T)},M=function(O,T){b&&cancelAnimationFrame(i.current),i.current=b?requestAnimationFrame(O):setTimeout(O,T)},E=function(O){if(!m.current)return!1;var T=O-o.current;return!o.current||T>=t||T<0||w&&O-s.current>=j},A=function(O){return i.current=null,x&&c.current?_(O):(c.current=d.current=null,p.current)},R=function O(){var T=Date.now();if(E(T))return A(T);if(m.current){var K=t-(T-o.current),G=w?Math.min(K,j-(T-s.current)):K;M(O,G)}},D=function(){if(g||S){var O=Date.now(),T=E(O);if(c.current=[].slice.call(arguments),d.current=r,o.current=O,T){if(!i.current&&m.current)return s.current=o.current,M(R,t),y?_(o.current):p.current;if(w)return M(R,t),_(o.current)}return i.current||M(R,t),p.current}};return D.cancel=function(){i.current&&(b?cancelAnimationFrame(i.current):clearTimeout(i.current)),s.current=0,c.current=o.current=d.current=i.current=null},D.isPending=function(){return!!i.current},D.flush=function(){return i.current?A(Date.now()):p.current},D},[y,w,t,j,x,b,g,S]);return I}function vse(e,t){return e===t}function bse(e,t){return t}function L2(e,t,n){var r=n&&n.equalityFn||vse,o=l.useReducer(bse,e),s=o[0],i=o[1],c=gse(l.useCallback(function(p){return i(p)},[i]),t,n),d=l.useRef(e);return r(d.current,e)||(c(e),d.current=e),[s,c]}const z2=e=>{const t=H(s=>s.config.metadataFetchDebounce),[n]=L2(e,t??0),{data:r,isLoading:o}=qI(n??KI);return{metadata:r,isLoading:o}},xse=h7.injectEndpoints({endpoints:e=>({getWorkflow:e.query({query:t=>`workflows/i/${t}`,providesTags:(t,n,r)=>[{type:"Workflow",id:r}],transformResponse:t=>{if(t){const n=QI.safeParse(t);if(n.success)return n.data;ki("images").warn("Problem parsing workflow")}}})})}),{useGetWorkflowQuery:yse}=xse,F2=e=>{const t=H(s=>s.config.workflowFetchDebounce),[n]=L2(e,t??0),{data:r,isLoading:o}=yse(n??KI);return{workflow:r,isLoading:o}};Fx("gallery/requestedBoardImagesDeletion");const Cse=Fx("gallery/sentImageToCanvas"),M8=Fx("gallery/sentImageToImg2Img"),wse=e=>{const{imageDTO:t}=e,n=le(),{t:r}=J(),o=Zl(),s=Pn("unifiedCanvas").isFeatureEnabled,i=Xg(Bx),{metadata:c,isLoading:d}=z2(t==null?void 0:t.image_name),{workflow:p,isLoading:h}=F2(t==null?void 0:t.workflow_id),[m]=Hx(),[g]=Wx(),{isClipboardAPIAvailable:b,copyImageToClipboard:y}=P8(),x=l.useCallback(()=>{t&&n(vg([t]))},[n,t]),{recallBothPrompts:w,recallSeed:S,recallAllParameters:j}=j0(),I=l.useCallback(()=>{w(c==null?void 0:c.positive_prompt,c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt)},[c==null?void 0:c.negative_prompt,c==null?void 0:c.positive_prompt,c==null?void 0:c.positive_style_prompt,c==null?void 0:c.negative_style_prompt,w]),_=l.useCallback(()=>{S(c==null?void 0:c.seed)},[c==null?void 0:c.seed,S]),M=l.useCallback(()=>{p&&n(Vx(p))},[n,p]),E=l.useCallback(()=>{n(M8()),n(gg(t))},[n,t]),A=l.useCallback(()=>{n(Cse()),ls.flushSync(()=>{n(ni("unifiedCanvas"))}),n(XI(t)),o({title:r("toast.sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},[n,t,r,o]),R=l.useCallback(()=>{j(c)},[c,j]),D=l.useCallback(()=>{n(YI([t])),n(Ax(!0))},[n,t]),O=l.useCallback(()=>{y(t.image_url)},[y,t.image_url]),T=l.useCallback(()=>{t&&m({imageDTOs:[t]})},[m,t]),K=l.useCallback(()=>{t&&g({imageDTOs:[t]})},[g,t]);return a.jsxs(a.Fragment,{children:[a.jsx(Kn,{as:"a",href:t.image_url,target:"_blank",icon:a.jsx(l2,{}),children:r("common.openInNewTab")}),b&&a.jsx(Kn,{icon:a.jsx(Hu,{}),onClickCapture:O,children:r("parameters.copyImage")}),a.jsx(Kn,{as:"a",download:!0,href:t.image_url,target:"_blank",icon:a.jsx(Wu,{}),w:"100%",children:r("parameters.downloadImage")}),a.jsx(Kn,{icon:h?a.jsx(Ch,{}):a.jsx(T2,{}),onClickCapture:M,isDisabled:h||!p,children:r("nodes.loadWorkflow")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(eO,{}),onClickCapture:I,isDisabled:d||(c==null?void 0:c.positive_prompt)===void 0&&(c==null?void 0:c.negative_prompt)===void 0,children:r("parameters.usePrompt")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(tO,{}),onClickCapture:_,isDisabled:d||(c==null?void 0:c.seed)===void 0,children:r("parameters.useSeed")}),a.jsx(Kn,{icon:d?a.jsx(Ch,{}):a.jsx(VM,{}),onClickCapture:R,isDisabled:d||!c,children:r("parameters.useAll")}),a.jsx(Kn,{icon:a.jsx(Ej,{}),onClickCapture:E,id:"send-to-img2img",children:r("parameters.sendToImg2Img")}),s&&a.jsx(Kn,{icon:a.jsx(Ej,{}),onClickCapture:A,id:"send-to-canvas",children:r("parameters.sendToUnifiedCanvas")}),a.jsx(Kn,{icon:a.jsx(QM,{}),onClickCapture:D,children:"Change Board"}),t.starred?a.jsx(Kn,{icon:i?i.off.icon:a.jsx($2,{}),onClickCapture:K,children:i?i.off.text:"Unstar Image"}):a.jsx(Kn,{icon:i?i.on.icon:a.jsx(N2,{}),onClickCapture:T,children:i?i.on.text:"Star Image"}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClickCapture:x,children:r("gallery.deleteImage")})]})},O8=l.memo(wse),Ch=()=>a.jsx(N,{w:"14px",alignItems:"center",justifyContent:"center",children:a.jsx(Ci,{size:"xs"})}),Sse=()=>{const{t:e}=J(),t=le(),n=H(x=>x.gallery.selection),r=Xg(Bx),o=Pn("bulkDownload").isFeatureEnabled,[s]=Hx(),[i]=Wx(),[c]=LI(),d=l.useCallback(()=>{t(YI(n)),t(Ax(!0))},[t,n]),p=l.useCallback(()=>{t(vg(n))},[t,n]),h=l.useCallback(()=>{s({imageDTOs:n})},[s,n]),m=l.useCallback(()=>{i({imageDTOs:n})},[i,n]),g=l.useCallback(async()=>{try{const x=await c({image_names:n.map(w=>w.image_name)}).unwrap();t(Ht({title:e("gallery.preparingDownload"),status:"success",...x.response?{description:x.response}:{}}))}catch{t(Ht({title:e("gallery.preparingDownloadFailed"),status:"error"}))}},[e,n,c,t]),b=l.useMemo(()=>n.every(x=>x.starred),[n]),y=l.useMemo(()=>n.every(x=>!x.starred),[n]);return a.jsxs(a.Fragment,{children:[b&&a.jsx(Kn,{icon:r?r.on.icon:a.jsx(N2,{}),onClickCapture:m,children:r?r.off.text:"Unstar All"}),(y||!b&&!y)&&a.jsx(Kn,{icon:r?r.on.icon:a.jsx($2,{}),onClickCapture:h,children:r?r.on.text:"Star All"}),o&&a.jsx(Kn,{icon:a.jsx(Wu,{}),onClickCapture:g,children:e("gallery.downloadSelection")}),a.jsx(Kn,{icon:a.jsx(QM,{}),onClickCapture:d,children:"Change Board"}),a.jsx(Kn,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(Zo,{}),onClickCapture:p,children:"Delete Selection"})]})},kse=l.memo(Sse),jse=me([we],({gallery:e})=>({selectionCount:e.selection.length}),Ie),_se=({imageDTO:e,children:t})=>{const{selectionCount:n}=H(jse),r=l.useCallback(s=>{s.preventDefault()},[]),o=l.useCallback(()=>e?n>1?a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:r,children:a.jsx(kse,{})}):a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:r,children:a.jsx(O8,{imageDTO:e})}):null,[e,n,r]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:o,children:t})},Ise=l.memo(_se),Pse=e=>{const{data:t,disabled:n,...r}=e,o=l.useRef(Jc()),{attributes:s,listeners:i,setNodeRef:c}=Yne({id:o.current,disabled:n,data:t});return a.jsx(Le,{ref:c,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,...s,...i,...r})},Ese=l.memo(Pse),Mse=a.jsx(Gr,{as:i0,sx:{boxSize:16}}),Ose=a.jsx(eo,{icon:Xl}),Ase=e=>{const{imageDTO:t,onError:n,onClick:r,withMetadataOverlay:o=!1,isDropDisabled:s=!1,isDragDisabled:i=!1,isUploadDisabled:c=!1,minSize:d=24,postUploadAction:p,imageSx:h,fitContainer:m=!1,droppableData:g,draggableData:b,dropLabel:y,isSelected:x=!1,thumbnail:w=!1,noContentFallback:S=Ose,uploadElement:j=Mse,useThumbailFallback:I,withHoverOverlay:_=!1,children:M,onMouseOver:E,onMouseOut:A,dataTestId:R}=e,{colorMode:D}=ji(),[O,T]=l.useState(!1),K=l.useCallback(V=>{E&&E(V),T(!0)},[E]),G=l.useCallback(V=>{A&&A(V),T(!1)},[A]),{getUploadButtonProps:Q,getUploadInputProps:Z}=D2({postUploadAction:p,isDisabled:c}),te=c?{}:{cursor:"pointer",bg:Xe("base.200","base.700")(D),_hover:{bg:Xe("base.300","base.650")(D),color:Xe("base.500","base.300")(D)}};return a.jsx(Ise,{imageDTO:t,children:V=>a.jsxs(N,{ref:V,onMouseOver:K,onMouseOut:G,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative",minW:d||void 0,minH:d||void 0,userSelect:"none",cursor:i||!t?"default":"pointer"},children:[t&&a.jsxs(N,{sx:{w:"full",h:"full",position:m?"absolute":"relative",alignItems:"center",justifyContent:"center"},children:[a.jsx(_i,{src:w?t.thumbnail_url:t.image_url,fallbackStrategy:"beforeLoadOrError",fallbackSrc:I?t.thumbnail_url:void 0,fallback:I?void 0:a.jsx(_re,{image:t}),onError:n,draggable:!1,sx:{w:t.width,objectFit:"contain",maxW:"full",maxH:"full",borderRadius:"base",...h},"data-testid":R}),o&&a.jsx(ose,{imageDTO:t}),a.jsx(w2,{isSelected:x,isHovered:_?O:!1})]}),!t&&!c&&a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{minH:d,w:"full",h:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",transitionProperty:"common",transitionDuration:"0.1s",color:Xe("base.500","base.500")(D),...te},...Q(),children:[a.jsx("input",{...Z()}),j]})}),!t&&c&&S,t&&!i&&a.jsx(Ese,{data:b,disabled:i||!t,onClick:r}),M,!s&&a.jsx(C2,{data:g,disabled:s,dropLabel:y})]})})},ll=l.memo(Ase),Rse=()=>a.jsx(Wg,{sx:{position:"relative",height:"full",width:"full","::before":{content:"''",display:"block",pt:"100%"}},children:a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,height:"full",width:"full"}})}),Dse=l.memo(Rse),Tse=me([we,Ux],({gallery:e},t)=>{const n=e.selection;return{queryArgs:t,selection:n}},Ie),Nse=e=>{const t=le(),{queryArgs:n,selection:r}=H(Tse),{imageDTOs:o}=JI(n,{selectFromResult:p=>({imageDTOs:p.data?m7.selectAll(p.data):[]})}),s=Pn("multiselect").isFeatureEnabled,i=l.useCallback(p=>{var h;if(e){if(!s){t(vd([e]));return}if(p.shiftKey){const m=e.image_name,g=(h=r[r.length-1])==null?void 0:h.image_name,b=o.findIndex(x=>x.image_name===g),y=o.findIndex(x=>x.image_name===m);if(b>-1&&y>-1){const x=Math.min(b,y),w=Math.max(b,y),S=o.slice(x,w+1);t(vd(r.concat(S)))}}else p.ctrlKey||p.metaKey?r.some(m=>m.image_name===e.image_name)&&r.length>1?t(vd(r.filter(m=>m.image_name!==e.image_name))):t(vd(r.concat(e))):t(vd([e]))}},[t,e,o,r,s]),c=l.useMemo(()=>e?r.some(p=>p.image_name===e.image_name):!1,[e,r]),d=l.useMemo(()=>r.length,[r.length]);return{selection:r,selectionCount:d,isSelected:c,handleClick:i}},$se=e=>{const{onClick:t,tooltip:n,icon:r,styleOverrides:o}=e,s=di("drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-600))","drop-shadow(0px 0px 0.1rem var(--invokeai-colors-base-800))");return a.jsx(rt,{onClick:t,"aria-label":n,tooltip:n,icon:r,size:"sm",variant:"link",sx:{position:"absolute",top:1,insetInlineEnd:1,p:0,minW:0,svg:{transitionProperty:"common",transitionDuration:"normal",fill:"base.100",_hover:{fill:"base.50"},filter:s},...o},"data-testid":n})},du=l.memo($se),Lse=e=>{const t=le(),{imageName:n}=e,{currentData:r}=Rs(n),o=H(E=>E.hotkeys.shift),{t:s}=J(),{handleClick:i,isSelected:c,selection:d,selectionCount:p}=Nse(r),h=Xg(Bx),m=l.useCallback(E=>{E.stopPropagation(),r&&t(vg([r]))},[t,r]),g=l.useMemo(()=>{if(p>1)return{id:"gallery-image",payloadType:"IMAGE_DTOS",payload:{imageDTOs:d}};if(r)return{id:"gallery-image",payloadType:"IMAGE_DTO",payload:{imageDTO:r}}},[r,d,p]),[b]=Hx(),[y]=Wx(),x=l.useCallback(()=>{r&&(r.starred&&y({imageDTOs:[r]}),r.starred||b({imageDTOs:[r]}))},[b,y,r]),[w,S]=l.useState(!1),j=l.useCallback(()=>{S(!0)},[]),I=l.useCallback(()=>{S(!1)},[]),_=l.useMemo(()=>{if(r!=null&&r.starred)return h?h.on.icon:a.jsx($2,{size:"20"});if(!(r!=null&&r.starred)&&w)return h?h.off.icon:a.jsx(N2,{size:"20"})},[r==null?void 0:r.starred,w,h]),M=l.useMemo(()=>r!=null&&r.starred?h?h.off.text:"Unstar":r!=null&&r.starred?"":h?h.on.text:"Star",[r==null?void 0:r.starred,h]);return r?a.jsx(Le,{sx:{w:"full",h:"full",touchAction:"none"},"data-testid":`image-${r.image_name}`,children:a.jsx(N,{userSelect:"none",sx:{position:"relative",justifyContent:"center",alignItems:"center",aspectRatio:"1/1"},children:a.jsx(ll,{onClick:i,imageDTO:r,draggableData:g,isSelected:c,minSize:0,imageSx:{w:"full",h:"full"},isDropDisabled:!0,isUploadDisabled:!0,thumbnail:!0,withHoverOverlay:!0,onMouseOver:j,onMouseOut:I,children:a.jsxs(a.Fragment,{children:[a.jsx(du,{onClick:x,icon:_,tooltip:M}),w&&o&&a.jsx(du,{onClick:m,icon:a.jsx(Zo,{}),tooltip:s("gallery.deleteImage"),styleOverrides:{bottom:2,top:"auto"}})]})})})}):a.jsx(Dse,{})},zse=l.memo(Lse),Fse=De((e,t)=>a.jsx(Le,{className:"item-container",ref:t,p:1.5,"data-testid":"image-item-container",children:e.children})),Bse=l.memo(Fse),Hse=De((e,t)=>{const n=H(r=>r.gallery.galleryImageMinimumWidth);return a.jsx(rl,{...e,className:"list-container",ref:t,sx:{gridTemplateColumns:`repeat(auto-fill, minmax(${n}px, 1fr));`},"data-testid":"image-list-container",children:e.children})}),Wse=l.memo(Hse),Vse={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},Use=()=>{const{t:e}=J(),t=l.useRef(null),[n,r]=l.useState(null),[o,s]=y2(Vse),i=H(S=>S.gallery.selectedBoardId),{currentViewTotal:c}=nse(i),d=H(Ux),{currentData:p,isFetching:h,isSuccess:m,isError:g}=JI(d),[b]=ZI(),y=l.useMemo(()=>!p||!c?!1:p.ids.length{y&&b({...d,offset:(p==null?void 0:p.ids.length)??0,limit:eP})},[y,b,d,p==null?void 0:p.ids.length]),w=l.useCallback((S,j)=>a.jsx(zse,{imageName:j},j),[]);return l.useEffect(()=>{const{current:S}=t;return n&&S&&o({target:S,elements:{viewport:n}}),()=>{var j;return(j=s())==null?void 0:j.destroy()}},[n,o,s]),p?m&&(p==null?void 0:p.ids.length)===0?a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(eo,{label:e("gallery.noImagesInGallery"),icon:Xl})}):m&&p?a.jsxs(a.Fragment,{children:[a.jsx(Le,{ref:t,"data-overlayscrollbars":"",h:"100%",children:a.jsx(tse,{style:{height:"100%"},data:p.ids,endReached:x,components:{Item:Bse,List:Wse},scrollerRef:r,itemContent:w})}),a.jsx(Dt,{onClick:x,isDisabled:!y,isLoading:h,loadingText:e("gallery.loading"),flexShrink:0,children:`Load More (${p.ids.length} of ${c})`})]}):g?a.jsx(Le,{sx:{w:"full",h:"full"},children:a.jsx(eo,{label:e("gallery.unableToLoad"),icon:Aee})}):null:a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(eo,{label:e("gallery.loading"),icon:Xl})})},Gse=l.memo(Use),qse=me([we],e=>{const{galleryView:t}=e.gallery;return{galleryView:t}},Ie),Kse=()=>{const{t:e}=J(),t=l.useRef(null),n=l.useRef(null),{galleryView:r}=H(qse),o=le(),{isOpen:s,onToggle:i}=hs({defaultIsOpen:!0}),c=l.useCallback(()=>{o(tS("images"))},[o]),d=l.useCallback(()=>{o(tS("assets"))},[o]);return a.jsxs(K5,{layerStyle:"first",sx:{flexDirection:"column",h:"full",w:"full",borderRadius:"base",p:2},children:[a.jsxs(Le,{sx:{w:"full"},children:[a.jsxs(N,{ref:t,sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[a.jsx(gre,{isOpen:s,onToggle:i}),a.jsx(jre,{})]}),a.jsx(Le,{children:a.jsx(pre,{isOpen:s})})]}),a.jsxs(N,{ref:n,direction:"column",gap:2,h:"full",w:"full",children:[a.jsx(N,{sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:a.jsx(tc,{index:r==="images"?0:1,variant:"unstyled",size:"sm",sx:{w:"full"},children:a.jsx(nc,{children:a.jsxs(Hn,{isAttached:!0,sx:{w:"full"},children:[a.jsx(wo,{as:Dt,size:"sm",isChecked:r==="images",onClick:c,sx:{w:"full"},leftIcon:a.jsx(Fee,{}),"data-testid":"images-tab",children:e("gallery.images")}),a.jsx(wo,{as:Dt,size:"sm",isChecked:r==="assets",onClick:d,sx:{w:"full"},leftIcon:a.jsx(Jee,{}),"data-testid":"assets-tab",children:e("gallery.assets")})]})})})}),a.jsx(Gse,{})]})]})},Qse=l.memo(Kse),Xse=()=>{const e=H(p=>p.system.isConnected),{data:t}=Ha(),[n,{isLoading:r}]=Gx(),o=le(),{t:s}=J(),i=l.useMemo(()=>t==null?void 0:t.queue.item_id,[t==null?void 0:t.queue.item_id]),c=l.useCallback(async()=>{if(i)try{await n(i).unwrap(),o(Ht({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Ht({title:s("queue.cancelFailed"),status:"error"}))}},[i,o,s,n]),d=l.useMemo(()=>!e||si(i),[e,i]);return{cancelQueueItem:c,isLoading:r,currentQueueItemId:i,isDisabled:d}},Yse=({label:e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,asIconButton:i,isLoading:c,loadingText:d,sx:p})=>i?a.jsx(rt,{"aria-label":e,tooltip:t,icon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,sx:p,"data-testid":e}):a.jsx(Dt,{"aria-label":e,tooltip:t,leftIcon:n,onClick:r,isDisabled:o,colorScheme:s,isLoading:c,loadingText:d??e,flexGrow:1,sx:p,"data-testid":e,children:e}),lc=l.memo(Yse),Jse=({asIconButton:e,sx:t})=>{const{t:n}=J(),{cancelQueueItem:r,isLoading:o,isDisabled:s}=Xse();return a.jsx(lc,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.cancel"),tooltip:n("queue.cancelTooltip"),icon:a.jsx(ku,{}),onClick:r,colorScheme:"error",sx:t})},A8=l.memo(Jse),Zse=()=>{const{t:e}=J(),t=le(),{data:n}=Ha(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=tP({fixedCacheKey:"clearQueue"}),i=l.useCallback(async()=>{if(n!=null&&n.queue.total)try{await o().unwrap(),t(Ht({title:e("queue.clearSucceeded"),status:"success"})),t(qx(void 0)),t(Kx(void 0))}catch{t(Ht({title:e("queue.clearFailed"),status:"error"}))}},[n==null?void 0:n.queue.total,o,t,e]),c=l.useMemo(()=>!r||!(n!=null&&n.queue.total),[r,n==null?void 0:n.queue.total]);return{clearQueue:i,isLoading:s,queueStatus:n,isDisabled:c}},eae=De((e,t)=>{const{t:n}=J(),{acceptButtonText:r=n("common.accept"),acceptCallback:o,cancelButtonText:s=n("common.cancel"),cancelCallback:i,children:c,title:d,triggerComponent:p}=e,{isOpen:h,onOpen:m,onClose:g}=hs(),b=l.useRef(null),y=l.useCallback(()=>{o(),g()},[o,g]),x=l.useCallback(()=>{i&&i(),g()},[i,g]);return a.jsxs(a.Fragment,{children:[l.cloneElement(p,{onClick:m,ref:t}),a.jsx(Wf,{isOpen:h,leastDestructiveRef:b,onClose:g,isCentered:!0,children:a.jsx(Aa,{children:a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:d}),a.jsx(Ra,{children:c}),a.jsxs(pi,{children:[a.jsx(Dt,{ref:b,onClick:x,children:s}),a.jsx(Dt,{colorScheme:"error",onClick:y,ml:3,children:r})]})]})})})]})}),_0=l.memo(eae),tae=({asIconButton:e,sx:t})=>{const{t:n}=J(),{clearQueue:r,isLoading:o,isDisabled:s}=Zse();return a.jsxs(_0,{title:n("queue.clearTooltip"),acceptCallback:r,acceptButtonText:n("queue.clear"),triggerComponent:a.jsx(lc,{isDisabled:s,isLoading:o,asIconButton:e,label:n("queue.clear"),tooltip:n("queue.clearTooltip"),icon:a.jsx(Zo,{}),colorScheme:"error",sx:t}),children:[a.jsx(je,{children:n("queue.clearQueueAlertDialog")}),a.jsx("br",{}),a.jsx(je,{children:n("queue.clearQueueAlertDialog2")})]})},B2=l.memo(tae),nae=()=>{const e=le(),{t}=J(),n=H(p=>p.system.isConnected),{data:r}=Ha(),[o,{isLoading:s}]=nP({fixedCacheKey:"pauseProcessor"}),i=l.useMemo(()=>!!(r!=null&&r.processor.is_started),[r==null?void 0:r.processor.is_started]),c=l.useCallback(async()=>{if(i)try{await o().unwrap(),e(Ht({title:t("queue.pauseSucceeded"),status:"success"}))}catch{e(Ht({title:t("queue.pauseFailed"),status:"error"}))}},[i,o,e,t]),d=l.useMemo(()=>!n||!i,[n,i]);return{pauseProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},rae=({asIconButton:e})=>{const{t}=J(),{pauseProcessor:n,isLoading:r,isDisabled:o}=nae();return a.jsx(lc,{asIconButton:e,label:t("queue.pause"),tooltip:t("queue.pauseTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(Gee,{}),onClick:n,colorScheme:"gold"})},R8=l.memo(rae),oae=me([we,lo],({controlAdapters:e,generation:t,system:n,nodes:r,dynamicPrompts:o},s)=>{const{initialImage:i,model:c}=t,{isConnected:d}=n,p=[];return d||p.push(an.t("parameters.invoke.systemDisconnected")),s==="img2img"&&!i&&p.push(an.t("parameters.invoke.noInitialImageSelected")),s==="nodes"?r.shouldValidateGraph&&(r.nodes.length||p.push(an.t("parameters.invoke.noNodesInGraph")),r.nodes.forEach(h=>{if(!Rr(h))return;const m=r.nodeTemplates[h.data.type];if(!m){p.push(an.t("parameters.invoke.missingNodeTemplate"));return}const g=g7([h],r.edges);to(h.data.inputs,b=>{const y=m.inputs[b.name],x=g.some(w=>w.target===h.id&&w.targetHandle===b.name);if(!y){p.push(an.t("parameters.invoke.missingFieldTemplate"));return}if(y.required&&b.value===void 0&&!x){p.push(an.t("parameters.invoke.missingInputForField",{nodeLabel:h.data.label||m.title,fieldLabel:b.label||y.title}));return}})})):(o.prompts.length===0&&p.push(an.t("parameters.invoke.noPrompts")),c||p.push(an.t("parameters.invoke.noModelSelected")),v7(e).forEach((h,m)=>{h.isEnabled&&(h.model?h.model.base_model!==(c==null?void 0:c.base_model)&&p.push(an.t("parameters.invoke.incompatibleBaseModelForControlAdapter",{number:m+1})):p.push(an.t("parameters.invoke.noModelForControlAdapter",{number:m+1})),(!h.controlImage||Ru(h)&&!h.processedControlImage&&h.processorType!=="none")&&p.push(an.t("parameters.invoke.noControlImageForControlAdapter",{number:m+1})))})),{isReady:!p.length,reasons:p}},Ie),H2=()=>{const{isReady:e,reasons:t}=H(oae);return{isReady:e,reasons:t}},D8=()=>{const e=le(),t=H(lo),{isReady:n}=H2(),[r,{isLoading:o}]=bg({fixedCacheKey:"enqueueBatch"}),s=l.useMemo(()=>!n,[n]);return{queueBack:l.useCallback(()=>{s||(e(Qx()),e(rP({tabName:t,prepend:!1})))},[e,s,t]),isLoading:o,isDisabled:s}},sae=me([we],({gallery:e})=>{const{autoAddBoardId:t}=e;return{autoAddBoardId:t}},Ie),aae=({prepend:e=!1})=>{const{t}=J(),{isReady:n,reasons:r}=H2(),{autoAddBoardId:o}=H(sae),s=x0(o),[i,{isLoading:c}]=bg({fixedCacheKey:"enqueueBatch"}),d=l.useMemo(()=>t(c?"queue.enqueueing":n?e?"queue.queueFront":"queue.queueBack":"queue.notReady"),[c,n,e,t]);return a.jsxs(N,{flexDir:"column",gap:1,children:[a.jsx(je,{fontWeight:600,children:d}),r.length>0&&a.jsx(zf,{children:r.map((p,h)=>a.jsx(Ps,{children:a.jsx(je,{fontWeight:400,children:p})},`${p}.${h}`))}),a.jsx(N8,{}),a.jsxs(je,{fontWeight:400,fontStyle:"oblique 10deg",children:[t("parameters.invoke.addingImagesTo")," ",a.jsx(je,{as:"span",fontWeight:600,children:s||t("boards.uncategorized")})]})]})},T8=l.memo(aae),N8=l.memo(()=>a.jsx(io,{opacity:.2,borderColor:"base.50",_dark:{borderColor:"base.900"}}));N8.displayName="StyledDivider";const iae=()=>a.jsx(Le,{pos:"relative",w:4,h:4,children:a.jsx(_i,{src:Rx,alt:"invoke-ai-logo",pos:"absolute",top:-.5,insetInlineStart:-.5,w:5,h:5,minW:5,minH:5,filter:"saturate(0)"})}),lae=l.memo(iae),cae=({asIconButton:e,sx:t})=>{const{t:n}=J(),{queueBack:r,isLoading:o,isDisabled:s}=D8();return a.jsx(lc,{asIconButton:e,colorScheme:"accent",label:n("parameters.invoke.invoke"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(T8,{}),sx:t,icon:e?a.jsx(lae,{}):void 0})},$8=l.memo(cae),L8=()=>{const e=le(),t=H(lo),{isReady:n}=H2(),[r,{isLoading:o}]=bg({fixedCacheKey:"enqueueBatch"}),s=Pn("prependQueue").isFeatureEnabled,i=l.useMemo(()=>!n||!s,[n,s]);return{queueFront:l.useCallback(()=>{i||(e(Qx()),e(rP({tabName:t,prepend:!0})))},[e,i,t]),isLoading:o,isDisabled:i}},uae=({asIconButton:e,sx:t})=>{const{t:n}=J(),{queueFront:r,isLoading:o,isDisabled:s}=L8();return a.jsx(lc,{asIconButton:e,colorScheme:"base",label:n("queue.queueFront"),isDisabled:s,isLoading:o,onClick:r,tooltip:a.jsx(T8,{prepend:!0}),icon:a.jsx(lse,{}),sx:t})},dae=l.memo(uae),fae=()=>{const e=le(),t=H(p=>p.system.isConnected),{data:n}=Ha(),{t:r}=J(),[o,{isLoading:s}]=oP({fixedCacheKey:"resumeProcessor"}),i=l.useMemo(()=>!!(n!=null&&n.processor.is_started),[n==null?void 0:n.processor.is_started]),c=l.useCallback(async()=>{if(!i)try{await o().unwrap(),e(Ht({title:r("queue.resumeSucceeded"),status:"success"}))}catch{e(Ht({title:r("queue.resumeFailed"),status:"error"}))}},[i,o,e,r]),d=l.useMemo(()=>!t||i,[t,i]);return{resumeProcessor:c,isLoading:s,isStarted:i,isDisabled:d}},pae=({asIconButton:e})=>{const{t}=J(),{resumeProcessor:n,isLoading:r,isDisabled:o}=fae();return a.jsx(lc,{asIconButton:e,label:t("queue.resume"),tooltip:t("queue.resumeTooltip"),isDisabled:o,isLoading:r,icon:a.jsx(qee,{}),onClick:n,colorScheme:"green"})},z8=l.memo(pae),hae=me(we,({system:e})=>{var t;return{isConnected:e.isConnected,hasSteps:!!e.denoiseProgress,value:(((t=e.denoiseProgress)==null?void 0:t.percentage)??0)*100}},Ie),mae=()=>{const{t:e}=J(),{data:t}=Ha(),{hasSteps:n,value:r,isConnected:o}=H(hae);return a.jsx(I3,{value:r,"aria-label":e("accessibility.invokeProgressBar"),isIndeterminate:o&&!!(t!=null&&t.queue.in_progress)&&!n,h:"full",w:"full",borderRadius:2,colorScheme:"accent"})},gae=l.memo(mae),vae=()=>{const e=Pn("pauseQueue").isFeatureEnabled,t=Pn("resumeQueue").isFeatureEnabled,n=Pn("prependQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,gap:2,flexDir:"column"},children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsxs(Hn,{isAttached:!0,flexGrow:2,children:[a.jsx($8,{}),n?a.jsx(dae,{asIconButton:!0}):a.jsx(a.Fragment,{}),a.jsx(A8,{asIconButton:!0})]}),a.jsxs(Hn,{isAttached:!0,children:[t?a.jsx(z8,{asIconButton:!0}):a.jsx(a.Fragment,{}),e?a.jsx(R8,{asIconButton:!0}):a.jsx(a.Fragment,{})]}),a.jsx(B2,{asIconButton:!0})]}),a.jsx(N,{h:3,w:"full",children:a.jsx(gae,{})}),a.jsx(B8,{})]})},F8=l.memo(vae),B8=l.memo(()=>{const{t:e}=J(),t=le(),{hasItems:n,pending:r}=Ha(void 0,{selectFromResult:({data:s})=>{if(!s)return{hasItems:!1,pending:0};const{pending:i,in_progress:c}=s.queue;return{hasItems:i+c>0,pending:i}}}),o=l.useCallback(()=>{t(ni("queue"))},[t]);return a.jsxs(N,{justifyContent:"space-between",alignItems:"center",pe:1,"data-testid":"queue-count",children:[a.jsx(Pi,{}),a.jsx(nl,{onClick:o,size:"sm",variant:"link",fontWeight:400,opacity:.7,fontStyle:"oblique 10deg",children:n?e("queue.queuedCount",{pending:r}):e("queue.queueEmpty")})]})});B8.displayName="QueueCounts";const{createElement:Iu,createContext:bae,forwardRef:H8,useCallback:Za,useContext:W8,useEffect:ui,useImperativeHandle:V8,useLayoutEffect:xae,useMemo:yae,useRef:is,useState:Qd}=Ox,C_=Ox["useId".toString()],Xd=xae,Cae=typeof C_=="function"?C_:()=>null;let wae=0;function W2(e=null){const t=Cae(),n=is(e||t||null);return n.current===null&&(n.current=""+wae++),n.current}const I0=bae(null);I0.displayName="PanelGroupContext";function U8({children:e=null,className:t="",collapsedSize:n=0,collapsible:r=!1,defaultSize:o=null,forwardedRef:s,id:i=null,maxSize:c=null,minSize:d,onCollapse:p=null,onResize:h=null,order:m=null,style:g={},tagName:b="div"}){const y=W8(I0);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const x=W2(i),{collapsePanel:w,expandPanel:S,getPanelSize:j,getPanelStyle:I,registerPanel:_,resizePanel:M,units:E,unregisterPanel:A}=y;d==null&&(E==="percentages"?d=10:d=0);const R=is({onCollapse:p,onResize:h});ui(()=>{R.current.onCollapse=p,R.current.onResize=h});const D=I(x,o),O=is({size:w_(D)}),T=is({callbacksRef:R,collapsedSize:n,collapsible:r,defaultSize:o,id:x,idWasAutoGenerated:i==null,maxSize:c,minSize:d,order:m});return Xd(()=>{O.current.size=w_(D),T.current.callbacksRef=R,T.current.collapsedSize=n,T.current.collapsible=r,T.current.defaultSize=o,T.current.id=x,T.current.idWasAutoGenerated=i==null,T.current.maxSize=c,T.current.minSize=d,T.current.order=m}),Xd(()=>(_(x,T),()=>{A(x)}),[m,x,_,A]),V8(s,()=>({collapse:()=>w(x),expand:()=>S(x),getCollapsed(){return O.current.size===0},getId(){return x},getSize(K){return j(x,K)},resize:(K,G)=>M(x,K,G)}),[w,S,j,x,M]),Iu(b,{children:e,className:t,"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-id":x,"data-panel-size":parseFloat(""+D.flexGrow).toFixed(1),id:`data-panel-id-${x}`,style:{...D,...g}})}const el=H8((e,t)=>Iu(U8,{...e,forwardedRef:t}));U8.displayName="Panel";el.displayName="forwardRef(Panel)";function w_(e){const{flexGrow:t}=e;return typeof t=="string"?parseFloat(t):t}const Jl=10;function Dd(e,t,n,r,o,s,i,c){const{id:d,panels:p,units:h}=t,m=h==="pixels"?Gi(d):NaN,{sizes:g}=c||{},b=g||s,y=Vo(p),x=b.concat();let w=0;{const I=o<0?r:n,_=y.findIndex(R=>R.current.id===I),M=y[_],E=b[_],A=dx(h,m,M,E,E+Math.abs(o),e);if(E===A)return b;A===0&&E>0&&i.set(I,E),o=o<0?E-A:A-E}let S=o<0?n:r,j=y.findIndex(I=>I.current.id===S);for(;;){const I=y[j],_=b[j],M=Math.abs(o)-Math.abs(w),E=dx(h,m,I,_,_-M,e);if(_!==E&&(E===0&&_>0&&i.set(I.current.id,_),w+=_-E,x[j]=E,w.toPrecision(Jl).localeCompare(Math.abs(o).toPrecision(Jl),void 0,{numeric:!0})>=0))break;if(o<0){if(--j<0)break}else if(++j>=y.length)break}return w===0?b:(S=o<0?r:n,j=y.findIndex(I=>I.current.id===S),x[j]=b[j]+w,x)}function Tc(e,t,n){t.forEach((r,o)=>{const s=e[o];if(!s)return;const{callbacksRef:i,collapsedSize:c,collapsible:d,id:p}=s.current,h=n[p];if(h!==r){n[p]=r;const{onCollapse:m,onResize:g}=i.current;g&&g(r,h),d&&m&&((h==null||h===c)&&r!==c?m(!1):h!==c&&r===c&&m(!0))}})}function Sae({groupId:e,panels:t,units:n}){const r=n==="pixels"?Gi(e):NaN,o=Vo(t),s=Array(o.length);let i=0,c=100;for(let d=0;di.current.id===e);if(n<0)return[null,null];const r=n===t.length-1,o=r?t[n-1].current.id:e,s=r?e:t[n+1].current.id;return[o,s]}function Gi(e){const t=xf(e);if(t==null)return NaN;const n=t.getAttribute("data-panel-group-direction"),r=V2(e);return n==="horizontal"?t.offsetWidth-r.reduce((o,s)=>o+s.offsetWidth,0):t.offsetHeight-r.reduce((o,s)=>o+s.offsetHeight,0)}function G8(e,t,n){if(e.size===1)return"100";const o=Vo(e).findIndex(i=>i.current.id===t),s=n[o];return s==null?"0":s.toPrecision(Jl)}function kae(e){const t=document.querySelector(`[data-panel-id="${e}"]`);return t||null}function xf(e){const t=document.querySelector(`[data-panel-group-id="${e}"]`);return t||null}function P0(e){const t=document.querySelector(`[data-panel-resize-handle-id="${e}"]`);return t||null}function jae(e){return q8().findIndex(r=>r.getAttribute("data-panel-resize-handle-id")===e)??null}function q8(){return Array.from(document.querySelectorAll("[data-panel-resize-handle-id]"))}function V2(e){return Array.from(document.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`))}function U2(e,t,n){var d,p,h,m;const r=P0(t),o=V2(e),s=r?o.indexOf(r):-1,i=((p=(d=n[s])==null?void 0:d.current)==null?void 0:p.id)??null,c=((m=(h=n[s+1])==null?void 0:h.current)==null?void 0:m.id)??null;return[i,c]}function Vo(e){return Array.from(e.values()).sort((t,n)=>{const r=t.current.order,o=n.current.order;return r==null&&o==null?0:r==null?-1:o==null?1:r-o})}function dx(e,t,n,r,o,s=null){var h;let{collapsedSize:i,collapsible:c,maxSize:d,minSize:p}=n.current;if(e==="pixels"&&(i=i/t*100,d!=null&&(d=d/t*100),p=p/t*100),c){if(r>i){if(o<=p/2+i)return i}else if(!((h=s==null?void 0:s.type)==null?void 0:h.startsWith("key"))&&o100)&&(t.current.minSize=0),o!=null&&(o<0||e==="percentages"&&o>100)&&(t.current.maxSize=null),r!==null&&(r<0||e==="percentages"&&r>100?t.current.defaultSize=null:ro&&(t.current.defaultSize=o))}function D1({groupId:e,panels:t,nextSizes:n,prevSizes:r,units:o}){n=[...n];const s=Vo(t),i=o==="pixels"?Gi(e):NaN;let c=0;for(let d=0;d{const{direction:i,panels:c}=e.current,d=xf(t);K8(d!=null,`No group found for id "${t}"`);const{height:p,width:h}=d.getBoundingClientRect(),g=V2(t).map(b=>{const y=b.getAttribute("data-panel-resize-handle-id"),x=Vo(c),[w,S]=U2(t,y,x);if(w==null||S==null)return()=>{};let j=0,I=100,_=0,M=0;x.forEach(T=>{const{id:K,maxSize:G,minSize:Q}=T.current;K===w?(j=Q,I=G??100):(_+=Q,M+=G??100)});const E=Math.min(I,100-_),A=Math.max(j,(x.length-1)*100-M),R=G8(c,w,o);b.setAttribute("aria-valuemax",""+Math.round(E)),b.setAttribute("aria-valuemin",""+Math.round(A)),b.setAttribute("aria-valuenow",""+Math.round(parseInt(R)));const D=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const K=x.findIndex(G=>G.current.id===w);if(K>=0){const G=x[K],Q=o[K];if(Q!=null){let Z=0;Q.toPrecision(Jl)<=G.current.minSize.toPrecision(Jl)?Z=i==="horizontal"?h:p:Z=-(i==="horizontal"?h:p);const te=Dd(T,e.current,w,S,Z,o,s.current,null);o!==te&&r(te)}}break}}};b.addEventListener("keydown",D);const O=kae(w);return O!=null&&b.setAttribute("aria-controls",O.id),()=>{b.removeAttribute("aria-valuemax"),b.removeAttribute("aria-valuemin"),b.removeAttribute("aria-valuenow"),b.removeEventListener("keydown",D),O!=null&&b.removeAttribute("aria-controls")}});return()=>{g.forEach(b=>b())}},[e,t,n,s,r,o])}function Pae({disabled:e,handleId:t,resizeHandler:n}){ui(()=>{if(e||n==null)return;const r=P0(t);if(r==null)return;const o=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),n(s);break}case"F6":{s.preventDefault();const i=q8(),c=jae(t);K8(c!==null);const d=s.shiftKey?c>0?c-1:i.length-1:c+1{r.removeEventListener("keydown",o)}},[e,t,n])}function T1(e,t){if(e.length!==t.length)return!1;for(let n=0;nA.current.id===_),E=r[M];if(E.current.collapsible){const A=h[M];(A===0||A.toPrecision(Jl)===E.current.minSize.toPrecision(Jl))&&(S=S<0?-E.current.minSize*y:E.current.minSize*y)}return S}else return Q8(e,n,o,c,d)}function Mae(e){return e.type==="keydown"}function fx(e){return e.type.startsWith("mouse")}function px(e){return e.type.startsWith("touch")}let hx=null,Dl=null;function X8(e){switch(e){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function Oae(){Dl!==null&&(document.head.removeChild(Dl),hx=null,Dl=null)}function N1(e){if(hx===e)return;hx=e;const t=X8(e);Dl===null&&(Dl=document.createElement("style"),document.head.appendChild(Dl)),Dl.innerHTML=`*{cursor: ${t}!important;}`}function Aae(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Y8(e){return e.map(t=>{const{minSize:n,order:r}=t.current;return r?`${r}:${n}`:`${n}`}).sort((t,n)=>t.localeCompare(n)).join(",")}function J8(e,t){try{const n=t.getItem(`PanelGroup:sizes:${e}`);if(n){const r=JSON.parse(n);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Rae(e,t,n){const r=J8(e,n);if(r){const o=Y8(t);return r[o]??null}return null}function Dae(e,t,n,r){const o=Y8(t),s=J8(e,r)||{};s[o]=n;try{r.setItem(`PanelGroup:sizes:${e}`,JSON.stringify(s))}catch(i){console.error(i)}}const $1={};function S_(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}const Td={getItem:e=>(S_(Td),Td.getItem(e)),setItem:(e,t)=>{S_(Td),Td.setItem(e,t)}};function Z8({autoSaveId:e,children:t=null,className:n="",direction:r,disablePointerEventsDuringResize:o=!1,forwardedRef:s,id:i=null,onLayout:c,storage:d=Td,style:p={},tagName:h="div",units:m="percentages"}){const g=W2(i),[b,y]=Qd(null),[x,w]=Qd(new Map),S=is(null);is({didLogDefaultSizeWarning:!1,didLogIdAndOrderWarning:!1,didLogInvalidLayoutWarning:!1,prevPanelIds:[]});const j=is({onLayout:c});ui(()=>{j.current.onLayout=c});const I=is({}),[_,M]=Qd([]),E=is(new Map),A=is(0),R=is({direction:r,id:g,panels:x,sizes:_,units:m});V8(s,()=>({getId:()=>g,getLayout:ne=>{const{sizes:se,units:re}=R.current;if((ne??re)==="pixels"){const B=Gi(g);return se.map(X=>X/100*B)}else return se},setLayout:(ne,se)=>{const{id:re,panels:ae,sizes:B,units:X}=R.current;if((se||X)==="pixels"){const pe=Gi(re);ne=ne.map(W=>W/pe*100)}const $=I.current,F=Vo(ae),q=D1({groupId:re,panels:ae,nextSizes:ne,prevSizes:B,units:X});T1(B,q)||(M(q),Tc(F,q,$))}}),[g]),Xd(()=>{R.current.direction=r,R.current.id=g,R.current.panels=x,R.current.sizes=_,R.current.units=m}),Iae({committedValuesRef:R,groupId:g,panels:x,setSizes:M,sizes:_,panelSizeBeforeCollapse:E}),ui(()=>{const{onLayout:ne}=j.current,{panels:se,sizes:re}=R.current;if(re.length>0){ne&&ne(re);const ae=I.current,B=Vo(se);Tc(B,re,ae)}},[_]),Xd(()=>{const{id:ne,sizes:se,units:re}=R.current;if(se.length===x.size)return;let ae=null;if(e){const B=Vo(x);ae=Rae(e,B,d)}if(ae!=null){const B=D1({groupId:ne,panels:x,nextSizes:ae,prevSizes:ae,units:re});M(B)}else{const B=Sae({groupId:ne,panels:x,units:re});M(B)}},[e,x,d]),ui(()=>{if(e){if(_.length===0||_.length!==x.size)return;const ne=Vo(x);$1[e]||($1[e]=Aae(Dae,100)),$1[e](e,ne,_,d)}},[e,x,_,d]),Xd(()=>{if(m==="pixels"){const ne=new ResizeObserver(()=>{const{panels:se,sizes:re}=R.current,ae=D1({groupId:g,panels:se,nextSizes:re,prevSizes:re,units:m});T1(re,ae)||M(ae)});return ne.observe(xf(g)),()=>{ne.disconnect()}}},[g,m]);const D=Za((ne,se)=>{const{panels:re,units:ae}=R.current,X=Vo(re).findIndex(q=>q.current.id===ne),$=_[X];if((se??ae)==="pixels"){const q=Gi(g);return $/100*q}else return $},[g,_]),O=Za((ne,se)=>{const{panels:re}=R.current;return re.size===0?{flexBasis:0,flexGrow:se??void 0,flexShrink:1,overflow:"hidden"}:{flexBasis:0,flexGrow:G8(re,ne,_),flexShrink:1,overflow:"hidden",pointerEvents:o&&b!==null?"none":void 0}},[b,o,_]),T=Za((ne,se)=>{const{units:re}=R.current;_ae(re,se),w(ae=>{if(ae.has(ne))return ae;const B=new Map(ae);return B.set(ne,se),B})},[]),K=Za(ne=>re=>{re.preventDefault();const{direction:ae,panels:B,sizes:X}=R.current,$=Vo(B),[F,q]=U2(g,ne,$);if(F==null||q==null)return;let pe=Eae(re,g,ne,$,ae,X,S.current);if(pe===0)return;const U=xf(g).getBoundingClientRect(),ee=ae==="horizontal";document.dir==="rtl"&&ee&&(pe=-pe);const Y=ee?U.width:U.height,ge=pe/Y*100,he=Dd(re,R.current,F,q,ge,X,E.current,S.current),de=!T1(X,he);if((fx(re)||px(re))&&A.current!=ge&&N1(de?ee?"horizontal":"vertical":ee?pe<0?"horizontal-min":"horizontal-max":pe<0?"vertical-min":"vertical-max"),de){const _e=I.current;M(he),Tc($,he,_e)}A.current=ge},[g]),G=Za(ne=>{w(se=>{if(!se.has(ne))return se;const re=new Map(se);return re.delete(ne),re})},[]),Q=Za(ne=>{const{panels:se,sizes:re}=R.current,ae=se.get(ne);if(ae==null)return;const{collapsedSize:B,collapsible:X}=ae.current;if(!X)return;const $=Vo(se),F=$.indexOf(ae);if(F<0)return;const q=re[F];if(q===B)return;E.current.set(ne,q);const[pe,W]=R1(ne,$);if(pe==null||W==null)return;const ee=F===$.length-1?q:B-q,Y=Dd(null,R.current,pe,W,ee,re,E.current,null);if(re!==Y){const ge=I.current;M(Y),Tc($,Y,ge)}},[]),Z=Za(ne=>{const{panels:se,sizes:re}=R.current,ae=se.get(ne);if(ae==null)return;const{collapsedSize:B,minSize:X}=ae.current,$=E.current.get(ne)||X;if(!$)return;const F=Vo(se),q=F.indexOf(ae);if(q<0||re[q]!==B)return;const[W,U]=R1(ne,F);if(W==null||U==null)return;const Y=q===F.length-1?B-$:$,ge=Dd(null,R.current,W,U,Y,re,E.current,null);if(re!==ge){const he=I.current;M(ge),Tc(F,ge,he)}},[]),te=Za((ne,se,re)=>{const{id:ae,panels:B,sizes:X,units:$}=R.current;if((re||$)==="pixels"){const ht=Gi(ae);se=se/ht*100}const F=B.get(ne);if(F==null)return;let{collapsedSize:q,collapsible:pe,maxSize:W,minSize:U}=F.current;if($==="pixels"){const ht=Gi(ae);U=U/ht*100,W!=null&&(W=W/ht*100)}const ee=Vo(B),Y=ee.indexOf(F);if(Y<0)return;const ge=X[Y];if(ge===se)return;pe&&se===q||(se=Math.min(W??100,Math.max(U,se)));const[he,de]=R1(ne,ee);if(he==null||de==null)return;const Pe=Y===ee.length-1?ge-se:se-ge,ze=Dd(null,R.current,he,de,Pe,X,E.current,null);if(X!==ze){const ht=I.current;M(ze),Tc(ee,ze,ht)}},[]),V=yae(()=>({activeHandleId:b,collapsePanel:Q,direction:r,expandPanel:Z,getPanelSize:D,getPanelStyle:O,groupId:g,registerPanel:T,registerResizeHandle:K,resizePanel:te,startDragging:(ne,se)=>{if(y(ne),fx(se)||px(se)){const re=P0(ne);S.current={dragHandleRect:re.getBoundingClientRect(),dragOffset:Q8(se,ne,r),sizes:R.current.sizes}}},stopDragging:()=>{Oae(),y(null),S.current=null},units:m,unregisterPanel:G}),[b,Q,r,Z,D,O,g,T,K,te,m,G]),oe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Iu(I0.Provider,{children:Iu(h,{children:t,className:n,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":g,"data-panel-group-units":m,style:{...oe,...p}}),value:V})}const E0=H8((e,t)=>Iu(Z8,{...e,forwardedRef:t}));Z8.displayName="PanelGroup";E0.displayName="forwardRef(PanelGroup)";function mx({children:e=null,className:t="",disabled:n=!1,id:r=null,onDragging:o,style:s={},tagName:i="div"}){const c=is(null),d=is({onDragging:o});ui(()=>{d.current.onDragging=o});const p=W8(I0);if(p===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{activeHandleId:h,direction:m,groupId:g,registerResizeHandle:b,startDragging:y,stopDragging:x}=p,w=W2(r),S=h===w,[j,I]=Qd(!1),[_,M]=Qd(null),E=Za(()=>{c.current.blur(),x();const{onDragging:D}=d.current;D&&D(!1)},[x]);ui(()=>{if(n)M(null);else{const R=b(w);M(()=>R)}},[n,w,b]),ui(()=>{if(n||_==null||!S)return;const R=K=>{_(K)},D=K=>{_(K)},T=c.current.ownerDocument;return T.body.addEventListener("contextmenu",E),T.body.addEventListener("mousemove",R),T.body.addEventListener("touchmove",R),T.body.addEventListener("mouseleave",D),window.addEventListener("mouseup",E),window.addEventListener("touchend",E),()=>{T.body.removeEventListener("contextmenu",E),T.body.removeEventListener("mousemove",R),T.body.removeEventListener("touchmove",R),T.body.removeEventListener("mouseleave",D),window.removeEventListener("mouseup",E),window.removeEventListener("touchend",E)}},[m,n,S,_,E]),Pae({disabled:n,handleId:w,resizeHandler:_});const A={cursor:X8(m),touchAction:"none",userSelect:"none"};return Iu(i,{children:e,className:t,"data-resize-handle-active":S?"pointer":j?"keyboard":void 0,"data-panel-group-direction":m,"data-panel-group-id":g,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":w,onBlur:()=>I(!1),onFocus:()=>I(!0),onMouseDown:R=>{y(w,R.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},onMouseUp:E,onTouchCancel:E,onTouchEnd:E,onTouchStart:R=>{y(w,R.nativeEvent);const{onDragging:D}=d.current;D&&D(!0)},ref:c,role:"separator",style:{...A,...s},tabIndex:0})}mx.displayName="PanelResizeHandle";const Tae=e=>{const{direction:t="horizontal",collapsedDirection:n,isCollapsed:r=!1,...o}=e,s=di("base.100","base.850"),i=di("base.300","base.700");return t==="horizontal"?a.jsx(mx,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-horizontal",sx:{w:n?2.5:4,h:"full",justifyContent:n?n==="left"?"flex-start":"flex-end":"center",alignItems:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Le,{sx:{w:1,h:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})}):a.jsx(mx,{style:{visibility:r?"hidden":"visible",width:r?0:"auto"},children:a.jsx(N,{className:"resize-handle-vertical",sx:{w:"full",h:n?2.5:4,alignItems:n?n==="top"?"flex-start":"flex-end":"center",justifyContent:"center",div:{bg:s},_hover:{div:{bg:i}}},...o,children:a.jsx(Le,{sx:{h:1,w:"calc(100% - 1rem)",borderRadius:"base",transitionProperty:"common",transitionDuration:"normal"}})})})},lg=l.memo(Tae),G2=()=>{const e=le(),t=H(o=>o.ui.panels),n=l.useCallback(o=>t[o]??"",[t]),r=l.useCallback((o,s)=>{e(b7({name:o,value:s}))},[e]);return{getItem:n,setItem:r}};const Nae=e=>{const{label:t,data:n,fileName:r,withDownload:o=!0,withCopy:s=!0}=e,i=l.useMemo(()=>x7(n)?n:JSON.stringify(n,null,2),[n]),c=l.useCallback(()=>{navigator.clipboard.writeText(i)},[i]),d=l.useCallback(()=>{const h=new Blob([i]),m=document.createElement("a");m.href=URL.createObjectURL(h),m.download=`${r||t}.json`,document.body.appendChild(m),m.click(),m.remove()},[i,t,r]),{t:p}=J();return a.jsxs(N,{layerStyle:"second",sx:{borderRadius:"base",flexGrow:1,w:"full",h:"full",position:"relative"},children:[a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"auto",p:4,fontSize:"sm"},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"}},children:a.jsx("pre",{children:i})})}),a.jsxs(N,{sx:{position:"absolute",top:0,insetInlineEnd:0,p:2},children:[o&&a.jsx(Wn,{label:`${p("gallery.download")} ${t} JSON`,children:a.jsx(Ia,{"aria-label":`${p("gallery.download")} ${t} JSON`,icon:a.jsx(Wu,{}),variant:"ghost",opacity:.7,onClick:d})}),s&&a.jsx(Wn,{label:`${p("gallery.copy")} ${t} JSON`,children:a.jsx(Ia,{"aria-label":`${p("gallery.copy")} ${t} JSON`,icon:a.jsx(Hu,{}),variant:"ghost",opacity:.7,onClick:c})})]})]})},tl=l.memo(Nae),$ae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(r=>r.id===t);return{data:n==null?void 0:n.data}},Ie),Lae=()=>{const{data:e}=H($ae);return e?a.jsx(tl,{data:e,label:"Node Data"}):a.jsx(eo,{label:"No node selected",icon:null})},zae=l.memo(Lae),Fae=({children:e,maxHeight:t})=>a.jsx(N,{sx:{w:"full",h:"full",maxHeight:t,position:"relative"},children:a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:e})})}),cc=l.memo(Fae),Bae=({output:e})=>{const{image:t}=e,{data:n}=Rs(t.image_name);return a.jsx(ll,{imageDTO:n})},Hae=l.memo(Bae),Wae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(s=>s.id===t),r=n?e.nodeTemplates[n.data.type]:void 0,o=e.nodeExecutionStates[t??"__UNKNOWN_NODE__"];return{node:n,template:r,nes:o}},Ie),Vae=()=>{const{node:e,template:t,nes:n}=H(Wae),{t:r}=J();return!e||!n||!Rr(e)?a.jsx(eo,{label:r("nodes.noNodeSelected"),icon:null}):n.outputs.length===0?a.jsx(eo,{label:r("nodes.noOutputRecorded"),icon:null}):a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:(t==null?void 0:t.outputType)==="image_output"?n.outputs.map((o,s)=>a.jsx(Hae,{output:o},Gae(o,s))):a.jsx(tl,{data:n.outputs,label:r("nodes.nodeOutputs")})})})})},Uae=l.memo(Vae),Gae=(e,t)=>`${e.type}-${t}`,qae=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t);return{template:n?e.nodeTemplates[n.data.type]:void 0}},Ie),Kae=()=>{const{template:e}=H(qae),{t}=J();return e?a.jsx(tl,{data:e,label:t("nodes.nodeTemplate")}):a.jsx(eo,{label:t("nodes.noNodeSelected"),icon:null})},Qae=l.memo(Kae),q2=e=>{e.stopPropagation()},Xae=De((e,t)=>{const n=le(),r=l.useCallback(s=>{s.shiftKey&&n(Qo(!0))},[n]),o=l.useCallback(s=>{s.shiftKey||n(Qo(!1))},[n]);return a.jsx(Q3,{ref:t,onPaste:q2,onKeyDown:r,onKeyUp:o,...e})}),yi=l.memo(Xae),K2=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return o==null?void 0:o.data},Ie),[e]);return H(t)},Yae=({nodeId:e})=>{const t=le(),n=K2(e),{t:r}=J(),o=l.useCallback(s=>{t(y7({nodeId:e,notes:s.target.value}))},[t,e]);return Kh(n)?a.jsxs(Vn,{children:[a.jsx(yr,{children:r("nodes.notes")}),a.jsx(yi,{value:n==null?void 0:n.notes,onChange:o,rows:10})]}):null},Jae=l.memo(Yae),eA=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.label:!1},Ie),[e]);return H(t)},tA=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=o?r.nodeTemplates[o.data.type]:void 0;return s==null?void 0:s.title},Ie),[e]);return H(t)},Zae=({nodeId:e,title:t})=>{const n=le(),r=eA(e),o=tA(e),{t:s}=J(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(sP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsxs(Lf,{as:N,value:i,onChange:p,onSubmit:d,w:"full",fontWeight:600,children:[a.jsx($f,{noOfLines:1}),a.jsx(Nf,{className:"nodrag",_focusVisible:{boxShadow:"none"}})]})})},eie=l.memo(Zae),tie=me(we,({nodes:e})=>{const t=e.selectedNodes[e.selectedNodes.length-1],n=e.nodes.find(o=>o.id===t),r=n?e.nodeTemplates[n.data.type]:void 0;return{node:n,template:r}},Ie),nie=()=>{const{node:e,template:t}=H(tie),{t:n}=J();return!t||!Rr(e)?a.jsx(eo,{label:n("nodes.noNodeSelected"),icon:null}):a.jsx(oie,{node:e,template:t})},rie=l.memo(nie),oie=e=>{const{t}=J(),{needsUpdate:n,updateNode:r}=aP(e.node.id);return a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsxs(N,{sx:{flexDir:"column",position:"relative",p:1,gap:2,w:"full"},children:[a.jsx(eie,{nodeId:e.node.data.id}),a.jsxs(Pg,{children:[a.jsxs(Vn,{children:[a.jsx(yr,{children:"Node Type"}),a.jsx(je,{fontSize:"sm",fontWeight:600,children:e.template.title})]}),a.jsxs(N,{flexDir:"row",alignItems:"center",justifyContent:"space-between",w:"full",children:[a.jsxs(Vn,{isInvalid:n,children:[a.jsx(yr,{children:"Node Version"}),a.jsx(je,{fontSize:"sm",fontWeight:600,children:e.node.data.version})]}),n&&a.jsx(rt,{"aria-label":t("nodes.updateNode"),tooltip:t("nodes.updateNode"),icon:a.jsx(s0,{}),onClick:r})]})]}),a.jsx(Jae,{nodeId:e.node.data.id})]})})})},sie=()=>a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:"Details"}),a.jsx(wo,{children:"Outputs"}),a.jsx(wo,{children:"Data"}),a.jsx(wo,{children:"Template"})]}),a.jsxs($u,{children:[a.jsx(Go,{children:a.jsx(rie,{})}),a.jsx(Go,{children:a.jsx(Uae,{})}),a.jsx(Go,{children:a.jsx(zae,{})}),a.jsx(Go,{children:a.jsx(Qae,{})})]})]})}),aie=l.memo(sie),iie={display:"flex",flexDirection:"row",alignItems:"center",gap:10},lie=e=>{const{label:t="",labelPos:n="top",isDisabled:r=!1,isInvalid:o,formControlProps:s,...i}=e,c=le(),d=l.useCallback(h=>{h.shiftKey&&c(Qo(!0))},[c]),p=l.useCallback(h=>{h.shiftKey||c(Qo(!1))},[c]);return a.jsxs(Vn,{isInvalid:o,isDisabled:r,...s,style:n==="side"?iie:void 0,children:[t!==""&&a.jsx(yr,{children:t}),a.jsx(_g,{...i,onPaste:q2,onKeyDown:d,onKeyUp:p})]})},Is=l.memo(lie),cie=me(we,({nodes:e})=>{const{author:t,name:n,description:r,tags:o,version:s,contact:i,notes:c}=e.workflow;return{name:n,author:t,description:r,tags:o,version:s,contact:i,notes:c}},Ie),uie=()=>{const{author:e,name:t,description:n,tags:r,version:o,contact:s,notes:i}=H(cie),c=le(),d=l.useCallback(w=>{c(C7(w.target.value))},[c]),p=l.useCallback(w=>{c(w7(w.target.value))},[c]),h=l.useCallback(w=>{c(S7(w.target.value))},[c]),m=l.useCallback(w=>{c(k7(w.target.value))},[c]),g=l.useCallback(w=>{c(j7(w.target.value))},[c]),b=l.useCallback(w=>{c(_7(w.target.value))},[c]),y=l.useCallback(w=>{c(I7(w.target.value))},[c]),{t:x}=J();return a.jsx(cc,{children:a.jsxs(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:[a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Is,{label:x("nodes.workflowName"),value:t,onChange:d}),a.jsx(Is,{label:x("nodes.workflowVersion"),value:o,onChange:m})]}),a.jsxs(N,{sx:{gap:2,w:"full"},children:[a.jsx(Is,{label:x("nodes.workflowAuthor"),value:e,onChange:p}),a.jsx(Is,{label:x("nodes.workflowContact"),value:s,onChange:h})]}),a.jsx(Is,{label:x("nodes.workflowTags"),value:r,onChange:b}),a.jsxs(Vn,{as:N,sx:{flexDir:"column"},children:[a.jsx(yr,{children:x("nodes.workflowDescription")}),a.jsx(yi,{onChange:g,value:n,fontSize:"sm",sx:{resize:"none"}})]}),a.jsxs(Vn,{as:N,sx:{flexDir:"column",h:"full"},children:[a.jsx(yr,{children:x("nodes.workflowNotes")}),a.jsx(yi,{onChange:y,value:i,fontSize:"sm",sx:{h:"full",resize:"none"}})]})]})})},die=l.memo(uie),nA=()=>{const e=H(r=>r.nodes),[t]=L2(e,300);return l.useMemo(()=>P7(t),[t])},fie=()=>{const e=nA(),{t}=J();return a.jsx(N,{sx:{flexDir:"column",alignItems:"flex-start",gap:2,h:"full"},children:a.jsx(tl,{data:e,label:t("nodes.workflow")})})},pie=l.memo(fie),hie=({isSelected:e,isHovered:t})=>{const n=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.light";if(e)return"nodeSelected.light";if(t)return"nodeHovered.light"},[t,e]),r=l.useMemo(()=>{if(e&&t)return"nodeHoveredSelected.dark";if(e)return"nodeSelected.dark";if(t)return"nodeHovered.dark"},[t,e]);return a.jsx(Le,{className:"selection-box",sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",opacity:e||t?1:.5,transitionProperty:"common",transitionDuration:"0.1s",pointerEvents:"none",shadow:n,_dark:{shadow:r}}})},rA=l.memo(hie),oA=e=>{const t=le(),n=l.useMemo(()=>me(we,({nodes:i})=>i.mouseOverNode===e,Ie),[e]),r=H(n),o=l.useCallback(()=>{!r&&t(nS(e))},[t,e,r]),s=l.useCallback(()=>{r&&t(nS(null))},[t,r]);return{isMouseOverNode:r,handleMouseOver:o,handleMouseOut:s}},sA=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return(i=s==null?void 0:s.data.inputs[t])==null?void 0:i.label},Ie),[t,e]);return H(n)},aA=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{var d;const i=s.nodes.find(p=>p.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return(d=c==null?void 0:c[Xx[n]][t])==null?void 0:d.title},Ie),[t,n,e]);return H(r)},iA=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{const s=o.nodes.find(i=>i.id===e);if(Rr(s))return s==null?void 0:s.data.inputs[t]},Ie),[t,e]);return H(n)},M0=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{const i=s.nodes.find(d=>d.id===e);if(!Rr(i))return;const c=s.nodeTemplates[(i==null?void 0:i.data.type)??""];return c==null?void 0:c[Xx[n]][t]},Ie),[t,n,e]);return H(r)},mie=({nodeId:e,fieldName:t,kind:n})=>{const r=iA(e,t),o=M0(e,t,n),s=E7(o),{t:i}=J(),c=l.useMemo(()=>M7(r)?r.label&&(o!=null&&o.title)?`${r.label} (${o.title})`:r.label&&!o?r.label:!r.label&&o?o.title:i("nodes.unknownField"):(o==null?void 0:o.title)||i("nodes.unknownField"),[r,o,i]);return a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(je,{sx:{fontWeight:600},children:c}),o&&a.jsx(je,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:o.description}),o&&a.jsxs(je,{children:["Type: ",If[o.type].title]}),s&&a.jsxs(je,{children:["Input: ",O7(o.input)]})]})},Q2=l.memo(mie),gie=De((e,t)=>{const{nodeId:n,fieldName:r,kind:o,isMissingInput:s=!1,withTooltip:i=!1}=e,c=sA(n,r),d=aA(n,r,o),{t:p}=J(),h=le(),[m,g]=l.useState(c||d||p("nodes.unknownField")),b=l.useCallback(async x=>{x&&(x===c||x===d)||(g(x||d||p("nodes.unknownField")),h(A7({nodeId:n,fieldName:r,label:x})))},[c,d,h,n,r,p]),y=l.useCallback(x=>{g(x)},[]);return l.useEffect(()=>{g(c||d||p("nodes.unknownField"))},[c,d,p]),a.jsx(Wn,{label:i?a.jsx(Q2,{nodeId:n,fieldName:r,kind:"input"}):void 0,openDelay:xg,placement:"top",hasArrow:!0,children:a.jsx(N,{ref:t,sx:{position:"relative",overflow:"hidden",alignItems:"center",justifyContent:"flex-start",gap:1,h:"full"},children:a.jsxs(Lf,{value:m,onChange:y,onSubmit:b,as:N,sx:{position:"relative",alignItems:"center",h:"full"},children:[a.jsx($f,{sx:{p:0,fontWeight:s?600:400,textAlign:"left",_hover:{fontWeight:"600 !important"}},noOfLines:1}),a.jsx(Nf,{className:"nodrag",sx:{p:0,w:"full",fontWeight:600,color:"base.900",_dark:{color:"base.100"},_focusVisible:{p:0,textAlign:"left",boxShadow:"none"}}}),a.jsx(cA,{})]})})})}),lA=l.memo(gie),cA=l.memo(()=>{const{isEditing:e,getEditButtonProps:t}=t5(),n=l.useCallback(r=>{const{onClick:o}=t();o&&(o(r),r.preventDefault())},[t]);return e?null:a.jsx(N,{onClick:n,position:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,cursor:"text"})});cA.displayName="EditableControls";const vie=e=>{const{nodeId:t,field:n}=e,r=le(),o=l.useCallback(s=>{r(R7({nodeId:t,fieldName:n.name,value:s.target.checked}))},[r,n.name,t]);return a.jsx(Fy,{className:"nodrag",onChange:o,isChecked:n.value})},bie=l.memo(vie);function O0(){return(O0=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function gx(e){var t=l.useRef(e),n=l.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Pu=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:w.buttons>0)&&o.current?s(k_(o.current,w,c.current)):x(!1)},y=function(){return x(!1)};function x(w){var S=d.current,j=vx(o.current),I=w?j.addEventListener:j.removeEventListener;I(S?"touchmove":"mousemove",b),I(S?"touchend":"mouseup",y)}return[function(w){var S=w.nativeEvent,j=o.current;if(j&&(j_(S),!function(_,M){return M&&!Yd(_)}(S,d.current)&&j)){if(Yd(S)){d.current=!0;var I=S.changedTouches||[];I.length&&(c.current=I[0].identifier)}j.focus(),s(k_(j,S,c.current)),x(!0)}},function(w){var S=w.which||w.keyCode;S<37||S>40||(w.preventDefault(),i({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},x]},[i,s]),h=p[0],m=p[1],g=p[2];return l.useEffect(function(){return g},[g]),z.createElement("div",O0({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:m,tabIndex:0,role:"slider"}))}),A0=function(e){return e.filter(Boolean).join(" ")},Y2=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,s=A0(["react-colorful__pointer",e.className]);return z.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},z.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Ao=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},dA=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Ao(e.h),s:Ao(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Ao(o/2),a:Ao(r,2)}},bx=function(e){var t=dA(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},L1=function(e){var t=dA(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},xie=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),c=r*(1-(t-s)*n),d=r*(1-(1-t+s)*n),p=s%6;return{r:Ao(255*[r,c,i,i,d,r][p]),g:Ao(255*[d,r,r,c,i,i][p]),b:Ao(255*[i,i,d,r,r,c][p]),a:Ao(o,2)}},yie=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),c=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:Ao(60*(c<0?c+6:c)),s:Ao(s?i/s*100:0),v:Ao(s/255*100),a:o}},Cie=z.memo(function(e){var t=e.hue,n=e.onChange,r=A0(["react-colorful__hue",e.className]);return z.createElement("div",{className:r},z.createElement(X2,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Pu(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":Ao(t),"aria-valuemax":"360","aria-valuemin":"0"},z.createElement(Y2,{className:"react-colorful__hue-pointer",left:t/360,color:bx({h:t,s:100,v:100,a:1})})))}),wie=z.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:bx({h:t.h,s:100,v:100,a:1})};return z.createElement("div",{className:"react-colorful__saturation",style:r},z.createElement(X2,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Pu(t.s+100*o.left,0,100),v:Pu(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Ao(t.s)+"%, Brightness "+Ao(t.v)+"%"},z.createElement(Y2,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:bx(t)})))}),fA=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Sie(e,t,n){var r=gx(n),o=l.useState(function(){return e.toHsva(t)}),s=o[0],i=o[1],c=l.useRef({color:t,hsva:s});l.useEffect(function(){if(!e.equal(t,c.current.color)){var p=e.toHsva(t);c.current={hsva:p,color:t},i(p)}},[t,e]),l.useEffect(function(){var p;fA(s,c.current.hsva)||e.equal(p=e.fromHsva(s),c.current.color)||(c.current={hsva:s,color:p},r(p))},[s,e,r]);var d=l.useCallback(function(p){i(function(h){return Object.assign({},h,p)})},[]);return[s,d]}var kie=typeof window<"u"?l.useLayoutEffect:l.useEffect,jie=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},__=new Map,_ie=function(e){kie(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!__.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,__.set(t,n);var r=jie();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Iie=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+L1(Object.assign({},n,{a:0}))+", "+L1(Object.assign({},n,{a:1}))+")"},s=A0(["react-colorful__alpha",t]),i=Ao(100*n.a);return z.createElement("div",{className:s},z.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),z.createElement(X2,{onMove:function(c){r({a:c.left})},onKey:function(c){r({a:Pu(n.a+c.left)})},"aria-label":"Alpha","aria-valuetext":i+"%","aria-valuenow":i,"aria-valuemin":"0","aria-valuemax":"100"},z.createElement(Y2,{className:"react-colorful__alpha-pointer",left:n.a,color:L1(n)})))},Pie=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,s=e.onChange,i=uA(e,["className","colorModel","color","onChange"]),c=l.useRef(null);_ie(c);var d=Sie(n,o,s),p=d[0],h=d[1],m=A0(["react-colorful",t]);return z.createElement("div",O0({},i,{ref:c,className:m}),z.createElement(wie,{hsva:p,onChange:h}),z.createElement(Cie,{hue:p.h,onChange:h}),z.createElement(Iie,{hsva:p,onChange:h,className:"react-colorful__last-control"}))},Eie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:yie,fromHsva:xie,equal:fA},pA=function(e){return z.createElement(Pie,O0({},e,{colorModel:Eie}))};const Mie=e=>{const{nodeId:t,field:n}=e,r=le(),o=l.useCallback(s=>{r(D7({nodeId:t,fieldName:n.name,value:s}))},[r,n.name,t]);return a.jsx(pA,{className:"nodrag",color:n.value,onChange:o})},Oie=l.memo(Mie),hA=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=T7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({controlNetModelId:e,errors:s.error.format()},"Failed to parse ControlNet model id");return}return s.data},Aie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=$x(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/controlnet/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=hA(p);h&&o(N7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},Rie=l.memo(Aie),Die=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),s=l.useCallback(i=>{o($7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return a.jsx(M3,{className:"nowheel nodrag",onChange:s,value:n.value,children:r.options.map(i=>a.jsx("option",{value:i,children:r.ui_choice_labels?r.ui_choice_labels[i]:i},i))})},Tie=l.memo(Die),Nie=e=>{var p;const{nodeId:t,field:n}=e,r=le(),{currentData:o}=Rs(((p=n.value)==null?void 0:p.image_name)??zs.skipToken),s=l.useCallback(()=>{r(L7({nodeId:t,fieldName:n.name,value:void 0}))},[r,n.name,t]),i=l.useMemo(()=>{if(o)return{id:`node-${t}-${n.name}`,payloadType:"IMAGE_DTO",payload:{imageDTO:o}}},[n.name,o,t]),c=l.useMemo(()=>({id:`node-${t}-${n.name}`,actionType:"SET_NODES_IMAGE",context:{nodeId:t,fieldName:n.name}}),[n.name,t]),d=l.useMemo(()=>({type:"SET_NODES_IMAGE",nodeId:t,fieldName:n.name}),[t,n.name]);return a.jsx(N,{className:"nodrag",sx:{w:"full",h:"full",alignItems:"center",justifyContent:"center"},children:a.jsx(ll,{imageDTO:o,droppableData:c,draggableData:i,postUploadAction:d,useThumbailFallback:!0,uploadElement:a.jsx(mA,{}),dropLabel:a.jsx(gA,{}),minSize:8,children:a.jsx(du,{onClick:s,icon:o?a.jsx(a0,{}):void 0,tooltip:"Reset Image"})})})},$ie=l.memo(Nie),mA=l.memo(()=>a.jsx(je,{fontSize:16,fontWeight:600,children:"Drop or Upload"}));mA.displayName="UploadElement";const gA=l.memo(()=>a.jsx(je,{fontSize:16,fontWeight:600,children:"Drop"}));gA.displayName="DropLabel";const Lie=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=z7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({loraModelId:e,errors:s.error.format()},"Failed to parse LoRA model id");return}return s.data},zie=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=_f(),{t:i}=J(),c=l.useMemo(()=>{if(!s)return[];const m=[];return to(s.entities,(g,b)=>{g&&m.push({value:b,label:g.model_name,group:xr[g.base_model]})}),m.sort((g,b)=>g.disabled&&!b.disabled?1:-1)},[s]),d=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/lora/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r==null?void 0:r.base_model,r==null?void 0:r.model_name]),p=l.useCallback(m=>{if(!m)return;const g=Lie(m);g&&o(F7({nodeId:t,fieldName:n.name,value:g}))},[o,n.name,t]),h=l.useCallback((m,g)=>{var b;return((b=g.label)==null?void 0:b.toLowerCase().includes(m.toLowerCase().trim()))||g.value.toLowerCase().includes(m.toLowerCase().trim())},[]);return(s==null?void 0:s.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:"No LoRAs Loaded"})}):a.jsx(sr,{className:"nowheel nodrag",value:(d==null?void 0:d.id)??null,placeholder:c.length>0?i("models.selectLoRA"):i("models.noLoRAsAvailable"),data:c,nothingFound:i("models.noMatchingLoRAs"),itemComponent:pl,disabled:c.length===0,filter:h,error:!d,onChange:p,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},Fie=l.memo(zie),R0=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=B7.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data};function Ku(e){const{iconMode:t=!1,...n}=e,r=le(),{t:o}=J(),[s,{isLoading:i}]=H7(),c=l.useCallback(()=>{s().unwrap().then(d=>{r(Ht(rr({title:`${o("modelManager.modelsSynced")}`,status:"success"})))}).catch(d=>{d&&r(Ht(rr({title:`${o("modelManager.modelSyncFailed")}`,status:"error"})))})},[r,s,o]);return t?a.jsx(rt,{icon:a.jsx(s0,{}),tooltip:o("modelManager.syncModels"),"aria-label":o("modelManager.syncModels"),isLoading:i,onClick:c,size:"sm",...n}):a.jsx(Dt,{isLoading:i,onClick:c,minW:"max-content",...n,children:"Sync Models"})}const Bie=e=>{var y,x;const{nodeId:t,field:n}=e,r=le(),o=Pn("syncModels").isFeatureEnabled,{t:s}=J(),{data:i,isLoading:c}=Jd(rS),{data:d,isLoading:p}=aa(rS),h=l.useMemo(()=>c||p,[c,p]),m=l.useMemo(()=>{if(!d)return[];const w=[];return to(d.entities,(S,j)=>{S&&w.push({value:j,label:S.model_name,group:xr[S.base_model]})}),i&&to(i.entities,(S,j)=>{S&&w.push({value:j,label:S.model_name,group:xr[S.base_model]})}),w},[d,i]),g=l.useMemo(()=>{var w,S,j,I;return((d==null?void 0:d.entities[`${(w=n.value)==null?void 0:w.base_model}/main/${(S=n.value)==null?void 0:S.model_name}`])||(i==null?void 0:i.entities[`${(j=n.value)==null?void 0:j.base_model}/onnx/${(I=n.value)==null?void 0:I.model_name}`]))??null},[(y=n.value)==null?void 0:y.base_model,(x=n.value)==null?void 0:x.model_name,d==null?void 0:d.entities,i==null?void 0:i.entities]),b=l.useCallback(w=>{if(!w)return;const S=R0(w);S&&r(iP({nodeId:t,fieldName:n.name,value:S}))},[r,n.name,t]);return a.jsxs(N,{sx:{w:"full",alignItems:"center",gap:2},children:[h?a.jsx(je,{variant:"subtext",children:"Loading..."}):a.jsx(sr,{className:"nowheel nodrag",tooltip:g==null?void 0:g.description,value:g==null?void 0:g.id,placeholder:m.length>0?s("models.selectModel"):s("models.noModelsAvailable"),data:m,error:!g,disabled:m.length===0,onChange:b,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),o&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Hie=l.memo(Bie),cg=/^-?(0\.)?\.?$/,vA=De((e,t)=>{const{label:n,isDisabled:r=!1,showStepper:o=!0,isInvalid:s,value:i,onChange:c,min:d,max:p,isInteger:h=!0,formControlProps:m,formLabelProps:g,numberInputFieldProps:b,numberInputStepperProps:y,tooltipProps:x,...w}=e,S=le(),[j,I]=l.useState(String(i));l.useEffect(()=>{!j.match(cg)&&i!==Number(j)&&I(String(i))},[i,j]);const _=l.useCallback(R=>{I(R),R.match(cg)||c(h?Math.floor(Number(R)):Number(R))},[h,c]),M=l.useCallback(R=>{const D=Hl(h?Math.floor(Number(R.target.value)):Number(R.target.value),d,p);I(String(D)),c(D)},[h,p,d,c]),E=l.useCallback(R=>{R.shiftKey&&S(Qo(!0))},[S]),A=l.useCallback(R=>{R.shiftKey||S(Qo(!1))},[S]);return a.jsx(Wn,{...x,children:a.jsxs(Vn,{ref:t,isDisabled:r,isInvalid:s,...m,children:[n&&a.jsx(yr,{...g,children:n}),a.jsxs(Tg,{value:j,min:d,max:p,keepWithinRange:!0,clampValueOnBlur:!1,onChange:_,onBlur:M,...w,onPaste:q2,children:[a.jsx($g,{...b,onKeyDown:E,onKeyUp:A}),o&&a.jsxs(Ng,{children:[a.jsx(zg,{...y}),a.jsx(Lg,{...y})]})]})]})})});vA.displayName="IAINumberInput";const _a=l.memo(vA),Wie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),[s,i]=l.useState(String(n.value)),c=l.useMemo(()=>r.type==="integer",[r.type]),d=l.useCallback(p=>{i(p),p.match(cg)||o(W7({nodeId:t,fieldName:n.name,value:c?Math.floor(Number(p)):Number(p)}))},[o,n.name,c,t]);return l.useEffect(()=>{!s.match(cg)&&n.value!==Number(s)&&i(String(n.value))},[n.value,s]),a.jsxs(Tg,{onChange:d,value:s,step:c?1:.1,precision:c?0:3,children:[a.jsx($g,{className:"nodrag"}),a.jsxs(Ng,{children:[a.jsx(zg,{}),a.jsx(Lg,{})]})]})},Vie=l.memo(Wie),Uie=e=>{var m,g;const{nodeId:t,field:n}=e,r=le(),{t:o}=J(),s=Pn("syncModels").isFeatureEnabled,{data:i,isLoading:c}=aa(Yx),d=l.useMemo(()=>{if(!i)return[];const b=[];return to(i.entities,(y,x)=>{y&&b.push({value:x,label:y.model_name,group:xr[y.base_model]})}),b},[i]),p=l.useMemo(()=>{var b,y;return(i==null?void 0:i.entities[`${(b=n.value)==null?void 0:b.base_model}/main/${(y=n.value)==null?void 0:y.model_name}`])??null},[(m=n.value)==null?void 0:m.base_model,(g=n.value)==null?void 0:g.model_name,i==null?void 0:i.entities]),h=l.useCallback(b=>{if(!b)return;const y=R0(b);y&&r(V7({nodeId:t,fieldName:n.name,value:y}))},[r,n.name,t]);return c?a.jsx(sr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{className:"nowheel nodrag",tooltip:p==null?void 0:p.description,value:p==null?void 0:p.id,placeholder:d.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:d,error:!p,disabled:d.length===0,onChange:h,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Gie=l.memo(Uie),qie=e=>{var g,b;const{nodeId:t,field:n}=e,r=le(),{t:o}=J(),s=Pn("syncModels").isFeatureEnabled,{data:i}=Jd(oS),{data:c,isLoading:d}=aa(oS),p=l.useMemo(()=>{if(!c)return[];const y=[];return to(c.entities,(x,w)=>{!x||x.base_model!=="sdxl"||y.push({value:w,label:x.model_name,group:xr[x.base_model]})}),i&&to(i.entities,(x,w)=>{!x||x.base_model!=="sdxl"||y.push({value:w,label:x.model_name,group:xr[x.base_model]})}),y},[c,i]),h=l.useMemo(()=>{var y,x,w,S;return((c==null?void 0:c.entities[`${(y=n.value)==null?void 0:y.base_model}/main/${(x=n.value)==null?void 0:x.model_name}`])||(i==null?void 0:i.entities[`${(w=n.value)==null?void 0:w.base_model}/onnx/${(S=n.value)==null?void 0:S.model_name}`]))??null},[(g=n.value)==null?void 0:g.base_model,(b=n.value)==null?void 0:b.model_name,c==null?void 0:c.entities,i==null?void 0:i.entities]),m=l.useCallback(y=>{if(!y)return;const x=R0(y);x&&r(iP({nodeId:t,fieldName:n.name,value:x}))},[r,n.name,t]);return d?a.jsx(sr,{label:o("modelManager.model"),placeholder:o("models.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{className:"nowheel nodrag",tooltip:h==null?void 0:h.description,value:h==null?void 0:h.id,placeholder:p.length>0?o("models.selectModel"):o("models.noModelsAvailable"),data:p,error:!h,disabled:p.length===0,onChange:m,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}}),s&&a.jsx(Ku,{className:"nodrag",iconMode:!0})]})},Kie=l.memo(qie),Qie=me([we],({ui:e})=>{const{favoriteSchedulers:t}=e;return{data:To(hg,(r,o)=>({value:o,label:r,group:t.includes(o)?"Favorites":void 0})).sort((r,o)=>r.label.localeCompare(o.label))}},Ie),Xie=e=>{const{nodeId:t,field:n}=e,r=le(),{data:o}=H(Qie),s=l.useCallback(i=>{i&&r(U7({nodeId:t,fieldName:n.name,value:i}))},[r,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",value:n.value,data:o,onChange:s})},Yie=l.memo(Xie),Jie=e=>{const{nodeId:t,field:n,fieldTemplate:r}=e,o=le(),s=l.useCallback(i=>{o(G7({nodeId:t,fieldName:n.name,value:i.target.value}))},[o,n.name,t]);return r.ui_component==="textarea"?a.jsx(yi,{className:"nodrag",onChange:s,value:n.value,rows:5,resize:"none"}):a.jsx(Is,{onChange:s,value:n.value})},Zie=l.memo(Jie),bA=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=q7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({vaeModelId:e,errors:s.error.format()},"Failed to parse VAE model id");return}return s.data},ele=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=lP(),i=l.useMemo(()=>{if(!s)return[];const p=[{value:"default",label:"Default",group:"Default"}];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p.sort((h,m)=>h.disabled&&!m.disabled?1:-1)},[s]),c=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[s==null?void 0:s.entities,r]),d=l.useCallback(p=>{if(!p)return;const h=bA(p);h&&o(K7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",itemComponent:pl,tooltip:c==null?void 0:c.description,value:(c==null?void 0:c.id)??"default",placeholder:"Default",data:i,onChange:d,disabled:i.length===0,error:!c,clearable:!0,sx:{width:"100%",".mantine-Select-dropdown":{width:"16rem !important"}}})},tle=l.memo(ele),nle=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=Q7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({ipAdapterModelId:e,errors:s.error.format()},"Failed to parse IP-Adapter model id");return}return s.data},rle=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=zx(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/ip_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=nle(p);h&&o(X7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},ole=l.memo(rle),sle=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=Y7.safeParse({base_model:n,model_name:o});if(!s.success){t.error({t2iAdapterModelId:e,errors:s.error.format()},"Failed to parse T2I-Adapter model id");return}return s.data},ale=e=>{const{nodeId:t,field:n}=e,r=n.value,o=le(),{data:s}=Lx(),i=l.useMemo(()=>(s==null?void 0:s.entities[`${r==null?void 0:r.base_model}/t2i_adapter/${r==null?void 0:r.model_name}`])??null,[r==null?void 0:r.base_model,r==null?void 0:r.model_name,s==null?void 0:s.entities]),c=l.useMemo(()=>{if(!s)return[];const p=[];return to(s.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[s]),d=l.useCallback(p=>{if(!p)return;const h=sle(p);h&&o(J7({nodeId:t,fieldName:n.name,value:h}))},[o,n.name,t]);return a.jsx(Dr,{className:"nowheel nodrag",tooltip:i==null?void 0:i.description,value:(i==null?void 0:i.id)??null,placeholder:"Pick one",error:!i,data:c,onChange:d,sx:{width:"100%"}})},ile=l.memo(ale),lle=e=>{var c;const{nodeId:t,field:n}=e,r=le(),{data:o,hasBoards:s}=jf(void 0,{selectFromResult:({data:d})=>{const p=[{label:"None",value:"none"}];return d==null||d.forEach(({board_id:h,board_name:m})=>{p.push({label:m,value:h})}),{data:p,hasBoards:p.length>1}}}),i=l.useCallback(d=>{r(Z7({nodeId:t,fieldName:n.name,value:d&&d!=="none"?{board_id:d}:void 0}))},[r,n.name,t]);return a.jsx(sr,{className:"nowheel nodrag",value:((c=n.value)==null?void 0:c.board_id)??"none",data:o,onChange:i,disabled:!s})},cle=l.memo(lle),ule=({nodeId:e,fieldName:t})=>{const n=iA(e,t),r=M0(e,t,"input");return(r==null?void 0:r.fieldKind)==="output"?a.jsxs(Le,{p:2,children:["Output field in input: ",n==null?void 0:n.type]}):(n==null?void 0:n.type)==="string"&&(r==null?void 0:r.type)==="string"||(n==null?void 0:n.type)==="StringPolymorphic"&&(r==null?void 0:r.type)==="StringPolymorphic"?a.jsx(Zie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="boolean"&&(r==null?void 0:r.type)==="boolean"||(n==null?void 0:n.type)==="BooleanPolymorphic"&&(r==null?void 0:r.type)==="BooleanPolymorphic"?a.jsx(bie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="integer"&&(r==null?void 0:r.type)==="integer"||(n==null?void 0:n.type)==="float"&&(r==null?void 0:r.type)==="float"||(n==null?void 0:n.type)==="FloatPolymorphic"&&(r==null?void 0:r.type)==="FloatPolymorphic"||(n==null?void 0:n.type)==="IntegerPolymorphic"&&(r==null?void 0:r.type)==="IntegerPolymorphic"?a.jsx(Vie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="enum"&&(r==null?void 0:r.type)==="enum"?a.jsx(Tie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ImageField"&&(r==null?void 0:r.type)==="ImageField"||(n==null?void 0:n.type)==="ImagePolymorphic"&&(r==null?void 0:r.type)==="ImagePolymorphic"?a.jsx($ie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="BoardField"&&(r==null?void 0:r.type)==="BoardField"?a.jsx(cle,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="MainModelField"&&(r==null?void 0:r.type)==="MainModelField"?a.jsx(Hie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLRefinerModelField"&&(r==null?void 0:r.type)==="SDXLRefinerModelField"?a.jsx(Gie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="VaeModelField"&&(r==null?void 0:r.type)==="VaeModelField"?a.jsx(tle,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="LoRAModelField"&&(r==null?void 0:r.type)==="LoRAModelField"?a.jsx(Fie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ControlNetModelField"&&(r==null?void 0:r.type)==="ControlNetModelField"?a.jsx(Rie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="IPAdapterModelField"&&(r==null?void 0:r.type)==="IPAdapterModelField"?a.jsx(ole,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="T2IAdapterModelField"&&(r==null?void 0:r.type)==="T2IAdapterModelField"?a.jsx(ile,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="ColorField"&&(r==null?void 0:r.type)==="ColorField"?a.jsx(Oie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="SDXLMainModelField"&&(r==null?void 0:r.type)==="SDXLMainModelField"?a.jsx(Kie,{nodeId:e,field:n,fieldTemplate:r}):(n==null?void 0:n.type)==="Scheduler"&&(r==null?void 0:r.type)==="Scheduler"?a.jsx(Yie,{nodeId:e,field:n,fieldTemplate:r}):n&&r?null:a.jsx(Le,{p:1,children:a.jsxs(je,{sx:{fontSize:"sm",fontWeight:600,color:"error.400",_dark:{color:"error.300"}},children:["Unknown field type: ",n==null?void 0:n.type]})})},xA=l.memo(ule),dle=({nodeId:e,fieldName:t})=>{const n=le(),{isMouseOverNode:r,handleMouseOut:o,handleMouseOver:s}=oA(e),{t:i}=J(),c=l.useCallback(()=>{n(cP({nodeId:e,fieldName:t}))},[n,t,e]);return a.jsxs(N,{onMouseEnter:s,onMouseLeave:o,layerStyle:"second",sx:{position:"relative",borderRadius:"base",w:"full",p:2},children:[a.jsxs(Vn,{as:N,sx:{flexDir:"column",gap:1,flexShrink:1},children:[a.jsxs(yr,{sx:{display:"flex",alignItems:"center",mb:0},children:[a.jsx(lA,{nodeId:e,fieldName:t,kind:"input"}),a.jsx(Pi,{}),a.jsx(Wn,{label:a.jsx(Q2,{nodeId:e,fieldName:t,kind:"input"}),openDelay:xg,placement:"top",hasArrow:!0,children:a.jsx(N,{h:"full",alignItems:"center",children:a.jsx(Gr,{as:XM})})}),a.jsx(rt,{"aria-label":i("nodes.removeLinearView"),tooltip:i("nodes.removeLinearView"),variant:"ghost",size:"sm",onClick:c,icon:a.jsx(Zo,{})})]}),a.jsx(xA,{nodeId:e,fieldName:t})]}),a.jsx(rA,{isSelected:!1,isHovered:r})]})},fle=l.memo(dle),ple=me(we,({nodes:e})=>({fields:e.workflow.exposedFields}),Ie),hle=()=>{const{fields:e}=H(ple),{t}=J();return a.jsx(Le,{sx:{position:"relative",w:"full",h:"full"},children:a.jsx(cc,{children:a.jsx(N,{sx:{position:"relative",flexDir:"column",alignItems:"flex-start",p:1,gap:2,h:"full",w:"full"},children:e.length?e.map(({nodeId:n,fieldName:r})=>a.jsx(fle,{nodeId:n,fieldName:r},`${n}.${r}`)):a.jsx(eo,{label:t("nodes.noFieldsLinearview"),icon:null})})})})},mle=l.memo(hle),gle=()=>a.jsx(N,{layerStyle:"first",sx:{flexDir:"column",w:"full",h:"full",borderRadius:"base",p:2,gap:2},children:a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:"Linear"}),a.jsx(wo,{children:"Details"}),a.jsx(wo,{children:"JSON"})]}),a.jsxs($u,{children:[a.jsx(Go,{children:a.jsx(mle,{})}),a.jsx(Go,{children:a.jsx(die,{})}),a.jsx(Go,{children:a.jsx(pie,{})})]})]})}),vle=l.memo(gle),ble={paramNegativeConditioning:{placement:"right"},controlNet:{href:"https://support.invoke.ai/support/solutions/articles/151000105880"},lora:{href:"https://support.invoke.ai/support/solutions/articles/151000159072"},compositingCoherenceMode:{href:"https://support.invoke.ai/support/solutions/articles/151000158838"},infillMethod:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},scaleBeforeProcessing:{href:"https://support.invoke.ai/support/solutions/articles/151000158841"},paramIterations:{href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramPositiveConditioning:{href:"https://support.invoke.ai/support/solutions/articles/151000096606-tips-on-crafting-prompts",placement:"right"},paramScheduler:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000159073"},paramModel:{placement:"right",href:"https://support.invoke.ai/support/solutions/articles/151000096601-what-is-a-model-which-should-i-use-"},paramRatio:{gutter:16},controlNetControlMode:{placement:"right"},controlNetResizeMode:{placement:"right"},paramVAE:{placement:"right"},paramVAEPrecision:{placement:"right"}},xle=1e3,yle=[{name:"preventOverflow",options:{padding:10}}],yA=De(({feature:e,children:t,wrapperProps:n,...r},o)=>{const{t:s}=J(),i=H(g=>g.system.shouldEnableInformationalPopovers),c=l.useMemo(()=>ble[e],[e]),d=l.useMemo(()=>eT(tT(c,["image","href","buttonLabel"]),r),[c,r]),p=l.useMemo(()=>s(`popovers.${e}.heading`),[e,s]),h=l.useMemo(()=>s(`popovers.${e}.paragraphs`,{returnObjects:!0})??[],[e,s]),m=l.useCallback(()=>{c!=null&&c.href&&window.open(c.href)},[c==null?void 0:c.href]);return i?a.jsxs(Uf,{isLazy:!0,closeOnBlur:!1,trigger:"hover",variant:"informational",openDelay:xle,modifiers:yle,placement:"top",...d,children:[a.jsx(Bg,{children:a.jsx(Le,{ref:o,w:"full",...n,children:t})}),a.jsx(Au,{children:a.jsxs(Gf,{w:96,children:[a.jsx(S3,{}),a.jsx(Hg,{children:a.jsxs(N,{sx:{gap:2,flexDirection:"column",alignItems:"flex-start"},children:[p&&a.jsxs(a.Fragment,{children:[a.jsx(yo,{size:"sm",children:p}),a.jsx(io,{})]}),(c==null?void 0:c.image)&&a.jsxs(a.Fragment,{children:[a.jsx(_i,{sx:{objectFit:"contain",maxW:"60%",maxH:"60%",backgroundColor:"white"},src:c.image,alt:"Optional Image"}),a.jsx(io,{})]}),h.map(g=>a.jsx(je,{children:g},g)),(c==null?void 0:c.href)&&a.jsxs(a.Fragment,{children:[a.jsx(io,{}),a.jsx(nl,{pt:1,onClick:m,leftIcon:a.jsx(l2,{}),alignSelf:"flex-end",variant:"link",children:s("common.learnMore")??p})]})]})})]})})]}):a.jsx(Le,{ref:o,w:"full",...n,children:t})});yA.displayName="IAIInformationalPopover";const kn=l.memo(yA),Cle=me([we],e=>{const{initial:t,min:n,sliderMax:r,inputMax:o,fineStep:s,coarseStep:i}=e.config.sd.iterations,{iterations:c}=e.generation,{shouldUseSliders:d}=e.ui,p=e.hotkeys.shift?s:i;return{iterations:c,initial:t,min:n,sliderMax:r,inputMax:o,step:p,shouldUseSliders:d}},Ie),wle=({asSlider:e})=>{const{iterations:t,initial:n,min:r,sliderMax:o,inputMax:s,step:i,shouldUseSliders:c}=H(Cle),d=le(),{t:p}=J(),h=l.useCallback(g=>{d(sS(g))},[d]),m=l.useCallback(()=>{d(sS(n))},[d,n]);return e||c?a.jsx(kn,{feature:"paramIterations",children:a.jsx(It,{label:p("parameters.iterations"),step:i,min:r,max:o,onChange:h,handleReset:m,value:t,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s}})}):a.jsx(kn,{feature:"paramIterations",children:a.jsx(_a,{label:p("parameters.iterations"),step:i,min:r,max:s,onChange:h,value:t,numberInputFieldProps:{textAlign:"center"}})})},ua=l.memo(wle),Sle=()=>{const[e,t]=l.useState(!1),[n,r]=l.useState(!1),o=l.useRef(null),s=G2(),i=l.useCallback(()=>{o.current&&o.current.setLayout([50,50])},[]);return a.jsxs(N,{sx:{flexDir:"column",gap:2,height:"100%",width:"100%"},children:[a.jsx(F8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",position:"relative",borderRadius:"base",p:2,pb:3,gap:2,flexDir:"column"},children:a.jsx(ua,{asSlider:!0})}),a.jsxs(E0,{ref:o,id:"workflow-panel-group",autoSaveId:"workflow-panel-group",direction:"vertical",style:{height:"100%",width:"100%"},storage:s,children:[a.jsx(el,{id:"workflow",collapsible:!0,onCollapse:t,minSize:25,children:a.jsx(vle,{})}),a.jsx(lg,{direction:"vertical",onDoubleClick:i,collapsedDirection:e?"top":n?"bottom":void 0}),a.jsx(el,{id:"inspector",collapsible:!0,onCollapse:r,minSize:25,children:a.jsx(aie,{})})]})]})},kle=l.memo(Sle),I_=(e,t)=>{const n=l.useRef(null),[r,o]=l.useState(()=>{var p;return!!((p=n.current)!=null&&p.getCollapsed())}),s=l.useCallback(()=>{var p;(p=n.current)!=null&&p.getCollapsed()?ls.flushSync(()=>{var h;(h=n.current)==null||h.expand()}):ls.flushSync(()=>{var h;(h=n.current)==null||h.collapse()})},[]),i=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.expand()})},[]),c=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.collapse()})},[]),d=l.useCallback(()=>{ls.flushSync(()=>{var p;(p=n.current)==null||p.resize(e,t)})},[e,t]);return{ref:n,minSize:e,isCollapsed:r,setIsCollapsed:o,reset:d,toggle:s,expand:i,collapse:c}},jle=({isGalleryCollapsed:e,galleryPanelRef:t})=>{const{t:n}=J(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Au,{children:a.jsx(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineEnd:"1.63rem",children:a.jsx(rt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":n("accessibility.showGalleryPanel"),onClick:r,icon:a.jsx(mse,{}),sx:{p:0,px:3,h:48,borderEndRadius:0}})})}):null},_le=l.memo(jle),wh={borderStartRadius:0,flexGrow:1},Ile=({isSidePanelCollapsed:e,sidePanelRef:t})=>{const{t:n}=J(),r=l.useCallback(()=>{var o;(o=t.current)==null||o.expand()},[t]);return e?a.jsx(Au,{children:a.jsxs(N,{pos:"absolute",transform:"translate(0, -50%)",minW:8,top:"50%",insetInlineStart:"5.13rem",direction:"column",gap:2,h:48,children:[a.jsxs(Hn,{isAttached:!0,orientation:"vertical",flexGrow:3,children:[a.jsx(rt,{tooltip:n("parameters.showOptionsPanel"),"aria-label":n("parameters.showOptionsPanel"),onClick:r,sx:wh,icon:a.jsx(nO,{})}),a.jsx($8,{asIconButton:!0,sx:wh}),a.jsx(A8,{asIconButton:!0,sx:wh})]}),a.jsx(B2,{asIconButton:!0,sx:wh})]})}):null},Ple=l.memo(Ile),Ele=e=>{const{label:t,activeLabel:n,children:r,defaultIsOpen:o=!1}=e,{isOpen:s,onToggle:i}=hs({defaultIsOpen:o}),{colorMode:c}=ji();return a.jsxs(Le,{children:[a.jsxs(N,{onClick:i,sx:{alignItems:"center",p:2,px:4,gap:2,borderTopRadius:"base",borderBottomRadius:s?0:"base",bg:Xe("base.250","base.750")(c),color:Xe("base.900","base.100")(c),_hover:{bg:Xe("base.300","base.700")(c)},fontSize:"sm",fontWeight:600,cursor:"pointer",transitionProperty:"common",transitionDuration:"normal",userSelect:"none"},"data-testid":`${t} collapsible`,children:[t,a.jsx(So,{children:n&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(je,{sx:{color:"accent.500",_dark:{color:"accent.300"}},children:n})},"statusText")}),a.jsx(Pi,{}),a.jsx(b0,{sx:{w:"1rem",h:"1rem",transform:s?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})]}),a.jsx(Af,{in:s,animateOpacity:!0,style:{overflow:"unset"},children:a.jsx(Le,{sx:{p:4,pb:4,borderBottomRadius:"base",bg:"base.150",_dark:{bg:"base.800"}},children:r})})]})},No=l.memo(Ele),Mle=me(we,e=>{const{maxPrompts:t,combinatorial:n}=e.dynamicPrompts,{min:r,sliderMax:o,inputMax:s}=e.config.sd.dynamicPrompts.maxPrompts;return{maxPrompts:t,min:r,sliderMax:o,inputMax:s,isDisabled:!n}},Ie),Ole=()=>{const{maxPrompts:e,min:t,sliderMax:n,inputMax:r,isDisabled:o}=H(Mle),s=le(),{t:i}=J(),c=l.useCallback(p=>{s(nT(p))},[s]),d=l.useCallback(()=>{s(rT())},[s]);return a.jsx(kn,{feature:"dynamicPromptsMaxPrompts",children:a.jsx(It,{label:i("dynamicPrompts.maxPrompts"),isDisabled:o,min:t,max:n,value:e,onChange:c,sliderNumberInputProps:{max:r},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})})},Ale=l.memo(Ole),Rle=me(we,e=>{const{isLoading:t,isError:n,prompts:r,parsingError:o}=e.dynamicPrompts;return{prompts:r,parsingError:o,isError:n,isLoading:t}},Ie),Dle={"&::marker":{color:"base.500",_dark:{color:"base.500"}}},Tle=()=>{const{prompts:e,parsingError:t,isLoading:n,isError:r}=H(Rle);return r?a.jsx(kn,{feature:"dynamicPrompts",children:a.jsx(N,{w:"full",h:"full",layerStyle:"second",alignItems:"center",justifyContent:"center",p:8,children:a.jsx(eo,{icon:cse,label:"Problem generating prompts"})})}):a.jsx(kn,{feature:"dynamicPrompts",children:a.jsxs(Vn,{isInvalid:!!t,children:[a.jsxs(yr,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:["Prompts Preview (",e.length,")",t&&` - ${t}`]}),a.jsxs(N,{h:64,pos:"relative",layerStyle:"third",borderRadius:"base",p:2,children:[a.jsx(cc,{children:a.jsx(U5,{stylePosition:"inside",ms:0,children:e.map((o,s)=>a.jsx(Ps,{fontSize:"sm",sx:Dle,children:a.jsx(je,{as:"span",children:o})},`${o}.${s}`))})}),n&&a.jsx(N,{pos:"absolute",w:"full",h:"full",top:0,insetInlineStart:0,layerStyle:"second",opacity:.7,alignItems:"center",justifyContent:"center",children:a.jsx(Ci,{})})]})]})})},Nle=l.memo(Tle),CA=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx(Le,{ref:r,...n,children:a.jsxs(Le,{children:[a.jsx(je,{fontWeight:600,children:e}),t&&a.jsx(je,{size:"xs",variant:"subtext",children:t})]})}));CA.displayName="IAIMantineSelectItemWithDescription";const $le=l.memo(CA),Lle=()=>{const e=le(),{t}=J(),n=H(s=>s.dynamicPrompts.seedBehaviour),r=l.useMemo(()=>[{value:"PER_ITERATION",label:t("dynamicPrompts.seedBehaviour.perIterationLabel"),description:t("dynamicPrompts.seedBehaviour.perIterationDesc")},{value:"PER_PROMPT",label:t("dynamicPrompts.seedBehaviour.perPromptLabel"),description:t("dynamicPrompts.seedBehaviour.perPromptDesc")}],[t]),o=l.useCallback(s=>{s&&e(oT(s))},[e]);return a.jsx(kn,{feature:"dynamicPromptsSeedBehaviour",children:a.jsx(Dr,{label:t("dynamicPrompts.seedBehaviour.label"),value:n,data:r,itemComponent:$le,onChange:o})})},zle=l.memo(Lle),Fle=()=>{const{t:e}=J(),t=l.useMemo(()=>me(we,({dynamicPrompts:o})=>{const s=o.prompts.length;if(s>1)return e("dynamicPrompts.promptsWithCount_other",{count:s})}),[e]),n=H(t);return Pn("dynamicPrompting").isFeatureEnabled?a.jsx(No,{label:e("dynamicPrompts.dynamicPrompts"),activeLabel:n,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Nle,{}),a.jsx(zle,{}),a.jsx(Ale,{})]})}):null},Qu=l.memo(Fle),Ble=e=>{const t=le(),{lora:n}=e,r=l.useCallback(i=>{t(sT({id:n.id,weight:i}))},[t,n.id]),o=l.useCallback(()=>{t(aT(n.id))},[t,n.id]),s=l.useCallback(()=>{t(iT(n.id))},[t,n.id]);return a.jsx(kn,{feature:"lora",children:a.jsxs(N,{sx:{gap:2.5,alignItems:"flex-end"},children:[a.jsx(It,{label:n.model_name,value:n.weight,onChange:r,min:-1,max:2,step:.01,withInput:!0,withReset:!0,handleReset:o,withSliderMarks:!0,sliderMarks:[-1,0,1,2],sliderNumberInputProps:{min:-50,max:50}}),a.jsx(rt,{size:"sm",onClick:s,tooltip:"Remove LoRA","aria-label":"Remove LoRA",icon:a.jsx(Zo,{}),colorScheme:"error"})]})})},Hle=l.memo(Ble),Wle=me(we,({lora:e})=>({lorasArray:To(e.loras)}),Ie),Vle=()=>{const{lorasArray:e}=H(Wle);return a.jsx(a.Fragment,{children:e.map((t,n)=>a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[n>0&&a.jsx(io,{pt:1}),a.jsx(Hle,{lora:t})]},t.model_name))})},Ule=l.memo(Vle),Gle=me(we,({lora:e})=>({loras:e.loras}),Ie),qle=()=>{const e=le(),{loras:t}=H(Gle),{data:n}=_f(),{t:r}=J(),o=H(d=>d.generation.model),s=l.useMemo(()=>{if(!n)return[];const d=[];return to(n.entities,(p,h)=>{if(!p||h in t)return;const m=(o==null?void 0:o.base_model)!==p.base_model;d.push({value:h,label:p.model_name,disabled:m,group:xr[p.base_model],tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.label&&!h.label?1:-1),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[t,n,o==null?void 0:o.base_model]),i=l.useCallback(d=>{if(!d)return;const p=n==null?void 0:n.entities[d];p&&e(lT(p))},[e,n==null?void 0:n.entities]),c=l.useCallback((d,p)=>{var h;return((h=p.label)==null?void 0:h.toLowerCase().includes(d.toLowerCase().trim()))||p.value.toLowerCase().includes(d.toLowerCase().trim())},[]);return(n==null?void 0:n.ids.length)===0?a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:r("models.noLoRAsInstalled")})}):a.jsx(sr,{placeholder:s.length===0?"All LoRAs added":"Add LoRA",value:null,data:s,nothingFound:"No matching LoRAs",itemComponent:pl,disabled:s.length===0,filter:c,onChange:i,"data-testid":"add-lora"})},Kle=l.memo(qle),Qle=me(we,e=>{const t=uP(e.lora.loras);return{activeLabel:t>0?`${t} Active`:void 0}},Ie),Xle=()=>{const{t:e}=J(),{activeLabel:t}=H(Qle);return Pn("lora").isFeatureEnabled?a.jsx(No,{label:e("modelManager.loraModels"),activeLabel:t,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(Kle,{}),a.jsx(Ule,{})]})}):null},Xu=l.memo(Xle),Yle=()=>{const e=le(),t=H(o=>o.generation.shouldUseCpuNoise),{t:n}=J(),r=l.useCallback(o=>{e(cT(o.target.checked))},[e]);return a.jsx(kn,{feature:"noiseUseCPU",children:a.jsx(_r,{label:n("parameters.useCpuNoise"),isChecked:t,onChange:r})})},da=e=>e.generation,Jle=me(da,e=>{const{seamlessXAxis:t}=e;return{seamlessXAxis:t}},Ie),Zle=()=>{const{t:e}=J(),{seamlessXAxis:t}=H(Jle),n=le(),r=l.useCallback(o=>{n(uT(o.target.checked))},[n]);return a.jsx(_r,{label:e("parameters.seamlessXAxis"),"aria-label":e("parameters.seamlessXAxis"),isChecked:t,onChange:r})},ece=l.memo(Zle),tce=me(da,e=>{const{seamlessYAxis:t}=e;return{seamlessYAxis:t}},Ie),nce=()=>{const{t:e}=J(),{seamlessYAxis:t}=H(tce),n=le(),r=l.useCallback(o=>{n(dT(o.target.checked))},[n]);return a.jsx(_r,{label:e("parameters.seamlessYAxis"),"aria-label":e("parameters.seamlessYAxis"),isChecked:t,onChange:r})},rce=l.memo(nce),oce=()=>{const{t:e}=J();return Pn("seamless").isFeatureEnabled?a.jsxs(Vn,{children:[a.jsx(yr,{children:e("parameters.seamlessTiling")})," ",a.jsxs(N,{sx:{gap:5},children:[a.jsx(Le,{flexGrow:1,children:a.jsx(ece,{})}),a.jsx(Le,{flexGrow:1,children:a.jsx(rce,{})})]})]}):null},sce=l.memo(oce);function ace(){const e=H(d=>d.generation.clipSkip),{model:t}=H(d=>d.generation),n=le(),{t:r}=J(),o=l.useCallback(d=>{n(aS(d))},[n]),s=l.useCallback(()=>{n(aS(0))},[n]),i=l.useMemo(()=>t?qp[t.base_model].maxClip:qp["sd-1"].maxClip,[t]),c=l.useMemo(()=>t?qp[t.base_model].markers:qp["sd-1"].markers,[t]);return(t==null?void 0:t.base_model)==="sdxl"?null:a.jsx(kn,{feature:"clipSkip",placement:"top",children:a.jsx(It,{label:r("parameters.clipSkip"),"aria-label":r("parameters.clipSkip"),min:0,max:i,step:1,value:e,onChange:o,withSliderMarks:!0,sliderMarks:c,withInput:!0,withReset:!0,handleReset:s})})}const ice=me(we,e=>{const{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}=e.generation;return{clipSkip:t,model:n,seamlessXAxis:r,seamlessYAxis:o,shouldUseCpuNoise:s}},Ie);function Yu(){const{clipSkip:e,model:t,seamlessXAxis:n,seamlessYAxis:r,shouldUseCpuNoise:o}=H(ice),{t:s}=J(),i=l.useMemo(()=>{const c=[];return o||c.push(s("parameters.gpuNoise")),e>0&&t&&t.base_model!=="sdxl"&&c.push(s("parameters.clipSkipWithLayerCount",{layerCount:e})),n&&r?c.push(s("parameters.seamlessX&Y")):n?c.push(s("parameters.seamlessX")):r&&c.push(s("parameters.seamlessY")),c.join(", ")},[e,t,n,r,o,s]);return a.jsx(No,{label:s("common.advanced"),activeLabel:i,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(sce,{}),a.jsx(io,{}),t&&(t==null?void 0:t.base_model)!=="sdxl"&&a.jsxs(a.Fragment,{children:[a.jsx(ace,{}),a.jsx(io,{pt:2})]}),a.jsx(Yle,{})]})})}const Oi=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return((o=Fs(r,e))==null?void 0:o.isEnabled)??!1},Ie),[e]);return H(t)},lce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.model},Ie),[e]);return H(t)},wA=e=>{const{data:t}=$x(),n=l.useMemo(()=>t?BI.getSelectors().selectAll(t):[],[t]),{data:r}=Lx(),o=l.useMemo(()=>r?HI.getSelectors().selectAll(r):[],[r]),{data:s}=zx(),i=l.useMemo(()=>s?WI.getSelectors().selectAll(s):[],[s]);return e==="controlnet"?n:e==="t2i_adapter"?o:e==="ip_adapter"?i:[]},SA=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.type},Ie),[e]);return H(t)},cce=me(we,({generation:e})=>{const{model:t}=e;return{mainModel:t}},Ie),uce=({id:e})=>{const t=Oi(e),n=SA(e),r=lce(e),o=le(),{mainModel:s}=H(cce),{t:i}=J(),c=wA(n),d=l.useMemo(()=>{if(!c)return[];const m=[];return c.forEach(g=>{if(!g)return;const b=(g==null?void 0:g.base_model)!==(s==null?void 0:s.base_model);m.push({value:g.id,label:g.model_name,group:xr[g.base_model],disabled:b,tooltip:b?`${i("controlnet.incompatibleBaseModel")} ${g.base_model}`:void 0})}),m.sort((g,b)=>g.disabled?1:b.disabled?-1:g.label.localeCompare(b.label)),m},[s==null?void 0:s.base_model,c,i]),p=l.useMemo(()=>c.find(m=>(m==null?void 0:m.id)===`${r==null?void 0:r.base_model}/${n}/${r==null?void 0:r.model_name}`),[n,r==null?void 0:r.base_model,r==null?void 0:r.model_name,c]),h=l.useCallback(m=>{if(!m)return;const g=hA(m);g&&o(fT({id:e,model:g}))},[o,e]);return a.jsx(sr,{itemComponent:pl,data:d,error:!p||(s==null?void 0:s.base_model)!==p.base_model,placeholder:i("controlnet.selectModel"),value:(p==null?void 0:p.id)??null,onChange:h,disabled:!t,tooltip:p==null?void 0:p.description})},dce=l.memo(uce),fce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.weight},Ie),[e]);return H(t)},pce=({id:e})=>{const t=Oi(e),n=fce(e),r=le(),{t:o}=J(),s=l.useCallback(i=>{r(pT({id:e,weight:i}))},[r,e]);return si(n)?null:a.jsx(kn,{feature:"controlNetWeight",children:a.jsx(It,{isDisabled:!t,label:o("controlnet.weight"),value:n,onChange:s,min:0,max:2,step:.01,withSliderMarks:!0,sliderMarks:[0,1,2]})})},hce=l.memo(pce),mce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{var o;return(o=Fs(r,e))==null?void 0:o.controlImage},Ie),[e]);return H(t)},gce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processedControlImage:void 0},Ie),[e]);return H(t)},vce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processorType:void 0},Ie),[e]);return H(t)},bce=me(we,({controlAdapters:e,gallery:t})=>{const{pendingControlImages:n}=e,{autoAddBoardId:r}=t;return{pendingControlImages:n,autoAddBoardId:r}},Ie),xce=({isSmall:e,id:t})=>{const n=mce(t),r=gce(t),o=vce(t),s=le(),{t:i}=J(),{pendingControlImages:c,autoAddBoardId:d}=H(bce),p=H(lo),[h,m]=l.useState(!1),{currentData:g}=Rs(n??zs.skipToken),{currentData:b}=Rs(r??zs.skipToken),[y]=hT(),[x]=mT(),[w]=gT(),S=l.useCallback(()=>{s(vT({id:t,controlImage:null}))},[t,s]),j=l.useCallback(async()=>{b&&(await y({imageDTO:b,is_intermediate:!1}).unwrap(),d!=="none"?x({imageDTO:b,board_id:d}):w({imageDTO:b}))},[b,y,d,x,w]),I=l.useCallback(()=>{g&&(p==="unifiedCanvas"?s(na({width:g.width,height:g.height})):(s(Wl(g.width)),s(Vl(g.height))))},[g,p,s]),_=l.useCallback(()=>{m(!0)},[]),M=l.useCallback(()=>{m(!1)},[]),E=l.useMemo(()=>{if(g)return{id:t,payloadType:"IMAGE_DTO",payload:{imageDTO:g}}},[g,t]),A=l.useMemo(()=>({id:t,actionType:"SET_CONTROL_ADAPTER_IMAGE",context:{id:t}}),[t]),R=l.useMemo(()=>({type:"SET_CONTROL_ADAPTER_IMAGE",id:t}),[t]),D=g&&b&&!h&&!c.includes(t)&&o!=="none";return a.jsxs(N,{onMouseEnter:_,onMouseLeave:M,sx:{position:"relative",w:"full",h:e?28:366,alignItems:"center",justifyContent:"center"},children:[a.jsx(ll,{draggableData:E,droppableData:A,imageDTO:g,isDropDisabled:D,postUploadAction:R}),a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",opacity:D?1:0,transitionProperty:"common",transitionDuration:"normal",pointerEvents:"none"},children:a.jsx(ll,{draggableData:E,droppableData:A,imageDTO:b,isUploadDisabled:!0})}),a.jsxs(a.Fragment,{children:[a.jsx(du,{onClick:S,icon:g?a.jsx(a0,{}):void 0,tooltip:i("controlnet.resetControlImage")}),a.jsx(du,{onClick:j,icon:g?a.jsx(o0,{size:16}):void 0,tooltip:i("controlnet.saveControlImage"),styleOverrides:{marginTop:6}}),a.jsx(du,{onClick:I,icon:g?a.jsx(Xee,{size:16}):void 0,tooltip:i("controlnet.setControlImageDimensions"),styleOverrides:{marginTop:12}})]}),c.includes(t)&&a.jsx(N,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",alignItems:"center",justifyContent:"center",opacity:.8,borderRadius:"base",bg:"base.400",_dark:{bg:"base.900"}},children:a.jsx(Ci,{size:"xl",sx:{color:"base.100",_dark:{color:"base.400"}}})})]})},P_=l.memo(xce),Hs=()=>{const e=le();return l.useCallback((n,r)=>{e(bT({id:n,params:r}))},[e])};function Ws(e){return a.jsx(N,{sx:{flexDirection:"column",gap:2,pb:2},children:e.children})}const E_=Do.canny_image_processor.default,yce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{low_threshold:o,high_threshold:s}=n,i=Hs(),{t:c}=J(),d=l.useCallback(g=>{i(t,{low_threshold:g})},[t,i]),p=l.useCallback(()=>{i(t,{low_threshold:E_.low_threshold})},[t,i]),h=l.useCallback(g=>{i(t,{high_threshold:g})},[t,i]),m=l.useCallback(()=>{i(t,{high_threshold:E_.high_threshold})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{isDisabled:!r,label:c("controlnet.lowThreshold"),value:o,onChange:d,handleReset:p,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0}),a.jsx(It,{isDisabled:!r,label:c("controlnet.highThreshold"),value:s,onChange:h,handleReset:m,withReset:!0,min:0,max:255,withInput:!0,withSliderMarks:!0})]})},Cce=l.memo(yce),wce=Do.color_map_image_processor.default,Sce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{color_map_tile_size:o}=n,s=Hs(),{t:i}=J(),c=l.useCallback(p=>{s(t,{color_map_tile_size:p})},[t,s]),d=l.useCallback(()=>{s(t,{color_map_tile_size:wce.color_map_tile_size})},[t,s]);return a.jsx(Ws,{children:a.jsx(It,{isDisabled:!r,label:i("controlnet.colorMapTileSize"),value:o,onChange:c,handleReset:d,withReset:!0,min:1,max:256,step:1,withInput:!0,withSliderMarks:!0,sliderNumberInputProps:{max:4096}})})},kce=l.memo(Sce),kd=Do.content_shuffle_image_processor.default,jce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,w:i,h:c,f:d}=n,p=Hs(),{t:h}=J(),m=l.useCallback(M=>{p(t,{detect_resolution:M})},[t,p]),g=l.useCallback(()=>{p(t,{detect_resolution:kd.detect_resolution})},[t,p]),b=l.useCallback(M=>{p(t,{image_resolution:M})},[t,p]),y=l.useCallback(()=>{p(t,{image_resolution:kd.image_resolution})},[t,p]),x=l.useCallback(M=>{p(t,{w:M})},[t,p]),w=l.useCallback(()=>{p(t,{w:kd.w})},[t,p]),S=l.useCallback(M=>{p(t,{h:M})},[t,p]),j=l.useCallback(()=>{p(t,{h:kd.h})},[t,p]),I=l.useCallback(M=>{p(t,{f:M})},[t,p]),_=l.useCallback(()=>{p(t,{f:kd.f})},[t,p]);return a.jsxs(Ws,{children:[a.jsx(It,{label:h("controlnet.detectResolution"),value:s,onChange:m,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.imageResolution"),value:o,onChange:b,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.w"),value:i,onChange:x,handleReset:w,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.h"),value:c,onChange:S,handleReset:j,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:h("controlnet.f"),value:d,onChange:I,handleReset:_,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},_ce=l.memo(jce),M_=Do.hed_image_processor.default,Ice=e=>{const{controlNetId:t,processorNode:{detect_resolution:n,image_resolution:r,scribble:o},isEnabled:s}=e,i=Hs(),{t:c}=J(),d=l.useCallback(b=>{i(t,{detect_resolution:b})},[t,i]),p=l.useCallback(b=>{i(t,{image_resolution:b})},[t,i]),h=l.useCallback(b=>{i(t,{scribble:b.target.checked})},[t,i]),m=l.useCallback(()=>{i(t,{detect_resolution:M_.detect_resolution})},[t,i]),g=l.useCallback(()=>{i(t,{image_resolution:M_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:n,onChange:d,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(It,{label:c("controlnet.imageResolution"),value:r,onChange:p,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!s}),a.jsx(_r,{label:c("controlnet.scribble"),isChecked:o,onChange:h,isDisabled:!s})]})},Pce=l.memo(Ice),O_=Do.lineart_anime_image_processor.default,Ece=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Hs(),{t:c}=J(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:O_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:O_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Mce=l.memo(Ece),A_=Do.lineart_image_processor.default,Oce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,coarse:i}=n,c=Hs(),{t:d}=J(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:A_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:A_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{coarse:y.target.checked})},[t,c]);return a.jsxs(Ws,{children:[a.jsx(It,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:d("controlnet.coarse"),isChecked:i,onChange:b,isDisabled:!r})]})},Ace=l.memo(Oce),R_=Do.mediapipe_face_processor.default,Rce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{max_faces:o,min_confidence:s}=n,i=Hs(),{t:c}=J(),d=l.useCallback(g=>{i(t,{max_faces:g})},[t,i]),p=l.useCallback(g=>{i(t,{min_confidence:g})},[t,i]),h=l.useCallback(()=>{i(t,{max_faces:R_.max_faces})},[t,i]),m=l.useCallback(()=>{i(t,{min_confidence:R_.min_confidence})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.maxFaces"),value:o,onChange:d,handleReset:h,withReset:!0,min:1,max:20,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.minConfidence"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Dce=l.memo(Rce),D_=Do.midas_depth_image_processor.default,Tce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{a_mult:o,bg_th:s}=n,i=Hs(),{t:c}=J(),d=l.useCallback(g=>{i(t,{a_mult:g})},[t,i]),p=l.useCallback(g=>{i(t,{bg_th:g})},[t,i]),h=l.useCallback(()=>{i(t,{a_mult:D_.a_mult})},[t,i]),m=l.useCallback(()=>{i(t,{bg_th:D_.bg_th})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.amult"),value:o,onChange:d,handleReset:h,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.bgth"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:20,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Nce=l.memo(Tce),Sh=Do.mlsd_image_processor.default,$ce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,thr_d:i,thr_v:c}=n,d=Hs(),{t:p}=J(),h=l.useCallback(j=>{d(t,{detect_resolution:j})},[t,d]),m=l.useCallback(j=>{d(t,{image_resolution:j})},[t,d]),g=l.useCallback(j=>{d(t,{thr_d:j})},[t,d]),b=l.useCallback(j=>{d(t,{thr_v:j})},[t,d]),y=l.useCallback(()=>{d(t,{detect_resolution:Sh.detect_resolution})},[t,d]),x=l.useCallback(()=>{d(t,{image_resolution:Sh.image_resolution})},[t,d]),w=l.useCallback(()=>{d(t,{thr_d:Sh.thr_d})},[t,d]),S=l.useCallback(()=>{d(t,{thr_v:Sh.thr_v})},[t,d]);return a.jsxs(Ws,{children:[a.jsx(It,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:y,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:x,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.w"),value:i,onChange:g,handleReset:w,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.h"),value:c,onChange:b,handleReset:S,withReset:!0,min:0,max:1,step:.01,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Lce=l.memo($ce),T_=Do.normalbae_image_processor.default,zce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s}=n,i=Hs(),{t:c}=J(),d=l.useCallback(g=>{i(t,{detect_resolution:g})},[t,i]),p=l.useCallback(g=>{i(t,{image_resolution:g})},[t,i]),h=l.useCallback(()=>{i(t,{detect_resolution:T_.detect_resolution})},[t,i]),m=l.useCallback(()=>{i(t,{image_resolution:T_.image_resolution})},[t,i]);return a.jsxs(Ws,{children:[a.jsx(It,{label:c("controlnet.detectResolution"),value:s,onChange:d,handleReset:h,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:c("controlnet.imageResolution"),value:o,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r})]})},Fce=l.memo(zce),N_=Do.openpose_image_processor.default,Bce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,hand_and_face:i}=n,c=Hs(),{t:d}=J(),p=l.useCallback(y=>{c(t,{detect_resolution:y})},[t,c]),h=l.useCallback(y=>{c(t,{image_resolution:y})},[t,c]),m=l.useCallback(()=>{c(t,{detect_resolution:N_.detect_resolution})},[t,c]),g=l.useCallback(()=>{c(t,{image_resolution:N_.image_resolution})},[t,c]),b=l.useCallback(y=>{c(t,{hand_and_face:y.target.checked})},[t,c]);return a.jsxs(Ws,{children:[a.jsx(It,{label:d("controlnet.detectResolution"),value:s,onChange:p,handleReset:m,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:d("controlnet.imageResolution"),value:o,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:d("controlnet.handAndFace"),isChecked:i,onChange:b,isDisabled:!r})]})},Hce=l.memo(Bce),$_=Do.pidi_image_processor.default,Wce=e=>{const{controlNetId:t,processorNode:n,isEnabled:r}=e,{image_resolution:o,detect_resolution:s,scribble:i,safe:c}=n,d=Hs(),{t:p}=J(),h=l.useCallback(w=>{d(t,{detect_resolution:w})},[t,d]),m=l.useCallback(w=>{d(t,{image_resolution:w})},[t,d]),g=l.useCallback(()=>{d(t,{detect_resolution:$_.detect_resolution})},[t,d]),b=l.useCallback(()=>{d(t,{image_resolution:$_.image_resolution})},[t,d]),y=l.useCallback(w=>{d(t,{scribble:w.target.checked})},[t,d]),x=l.useCallback(w=>{d(t,{safe:w.target.checked})},[t,d]);return a.jsxs(Ws,{children:[a.jsx(It,{label:p("controlnet.detectResolution"),value:s,onChange:h,handleReset:g,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(It,{label:p("controlnet.imageResolution"),value:o,onChange:m,handleReset:b,withReset:!0,min:0,max:4096,withInput:!0,withSliderMarks:!0,isDisabled:!r}),a.jsx(_r,{label:p("controlnet.scribble"),isChecked:i,onChange:y}),a.jsx(_r,{label:p("controlnet.safe"),isChecked:c,onChange:x,isDisabled:!r})]})},Vce=l.memo(Wce),Uce=e=>null,Gce=l.memo(Uce),kA=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o&&Ru(o)?o.processorNode:void 0},Ie),[e]);return H(t)},qce=({id:e})=>{const t=Oi(e),n=kA(e);return n?n.type==="canny_image_processor"?a.jsx(Cce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="color_map_image_processor"?a.jsx(kce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="hed_image_processor"?a.jsx(Pce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_image_processor"?a.jsx(Ace,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="content_shuffle_image_processor"?a.jsx(_ce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="lineart_anime_image_processor"?a.jsx(Mce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mediapipe_face_processor"?a.jsx(Dce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="midas_depth_image_processor"?a.jsx(Nce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="mlsd_image_processor"?a.jsx(Lce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="normalbae_image_processor"?a.jsx(Fce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="openpose_image_processor"?a.jsx(Hce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="pidi_image_processor"?a.jsx(Vce,{controlNetId:e,processorNode:n,isEnabled:t}):n.type==="zoe_depth_image_processor"?a.jsx(Gce,{controlNetId:e,processorNode:n,isEnabled:t}):null:null},Kce=l.memo(qce),Qce=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&Ru(o))return o.shouldAutoConfig},Ie),[e]);return H(t)},Xce=({id:e})=>{const t=Oi(e),n=Qce(e),r=le(),{t:o}=J(),s=l.useCallback(()=>{r(xT({id:e}))},[e,r]);return si(n)?null:a.jsx(_r,{label:o("controlnet.autoConfigure"),"aria-label":o("controlnet.autoConfigure"),isChecked:n,onChange:s,isDisabled:!t})},Yce=l.memo(Xce),Jce=e=>{const{id:t}=e,n=le(),{t:r}=J(),o=l.useCallback(()=>{n(yT({id:t}))},[t,n]),s=l.useCallback(()=>{n(CT({id:t}))},[t,n]);return a.jsxs(N,{sx:{gap:2},children:[a.jsx(rt,{size:"sm",icon:a.jsx(Xl,{}),tooltip:r("controlnet.importImageFromCanvas"),"aria-label":r("controlnet.importImageFromCanvas"),onClick:o}),a.jsx(rt,{size:"sm",icon:a.jsx(ZM,{}),tooltip:r("controlnet.importMaskFromCanvas"),"aria-label":r("controlnet.importMaskFromCanvas"),onClick:s})]})},Zce=l.memo(Jce),eue=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);return o?{beginStepPct:o.beginStepPct,endStepPct:o.endStepPct}:void 0},Ie),[e]);return H(t)},L_=e=>`${Math.round(e*100)}%`,tue=({id:e})=>{const t=Oi(e),n=eue(e),r=le(),{t:o}=J(),s=l.useCallback(i=>{r(wT({id:e,beginStepPct:i[0]})),r(ST({id:e,endStepPct:i[1]}))},[r,e]);return n?a.jsx(kn,{feature:"controlNetBeginEnd",children:a.jsxs(Vn,{isDisabled:!t,children:[a.jsx(yr,{children:o("controlnet.beginEndStepPercent")}),a.jsx(Pg,{w:"100%",gap:2,alignItems:"center",children:a.jsxs(z3,{"aria-label":["Begin Step %","End Step %!"],value:[n.beginStepPct,n.endStepPct],onChange:s,min:0,max:1,step:.01,minStepsBetweenThumbs:5,isDisabled:!t,children:[a.jsx(F3,{children:a.jsx(B3,{})}),a.jsx(Wn,{label:L_(n.beginStepPct),placement:"top",hasArrow:!0,children:a.jsx(Ob,{index:0})}),a.jsx(Wn,{label:L_(n.endStepPct),placement:"top",hasArrow:!0,children:a.jsx(Ob,{index:1})}),a.jsx(Rh,{value:0,sx:{insetInlineStart:"0 !important",insetInlineEnd:"unset !important"},children:"0%"}),a.jsx(Rh,{value:.5,sx:{insetInlineStart:"50% !important",transform:"translateX(-50%)"},children:"50%"}),a.jsx(Rh,{value:1,sx:{insetInlineStart:"unset !important",insetInlineEnd:"0 !important"},children:"100%"})]})})]})}):null},nue=l.memo(tue),rue=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&kT(o))return o.controlMode},Ie),[e]);return H(t)};function oue({id:e}){const t=Oi(e),n=rue(e),r=le(),{t:o}=J(),s=[{label:o("controlnet.balanced"),value:"balanced"},{label:o("controlnet.prompt"),value:"more_prompt"},{label:o("controlnet.control"),value:"more_control"},{label:o("controlnet.megaControl"),value:"unbalanced"}],i=l.useCallback(c=>{r(jT({id:e,controlMode:c}))},[e,r]);return n?a.jsx(kn,{feature:"controlNetControlMode",children:a.jsx(Dr,{disabled:!t,label:o("controlnet.controlMode"),data:s,value:n,onChange:i})}):null}const sue=e=>e.config,aue=me(sue,e=>To(Do,n=>({value:n.type,label:n.label})).sort((n,r)=>n.value==="none"?-1:r.value==="none"?1:n.label.localeCompare(r.label)).filter(n=>!e.sd.disabledControlNetProcessors.includes(n.value)),Ie),iue=({id:e})=>{const t=Oi(e),n=kA(e),r=le(),o=H(aue),{t:s}=J(),i=l.useCallback(c=>{r(_T({id:e,processorType:c}))},[e,r]);return n?a.jsx(sr,{label:s("controlnet.processor"),value:n.type??"canny_image_processor",data:o,onChange:i,disabled:!t}):null},lue=l.memo(iue),cue=e=>{const t=l.useMemo(()=>me(we,({controlAdapters:r})=>{const o=Fs(r,e);if(o&&Ru(o))return o.resizeMode},Ie),[e]);return H(t)};function uue({id:e}){const t=Oi(e),n=cue(e),r=le(),{t:o}=J(),s=[{label:o("controlnet.resize"),value:"just_resize"},{label:o("controlnet.crop"),value:"crop_resize"},{label:o("controlnet.fill"),value:"fill_resize"}],i=l.useCallback(c=>{r(IT({id:e,resizeMode:c}))},[e,r]);return n?a.jsx(kn,{feature:"controlNetResizeMode",children:a.jsx(Dr,{disabled:!t,label:o("controlnet.resizeMode"),data:s,value:n,onChange:i})}):null}const due=e=>{const{id:t,number:n}=e,r=SA(t),o=le(),{t:s}=J(),i=H(lo),c=Oi(t),[d,p]=ate(!1),h=l.useCallback(()=>{o(PT({id:t}))},[t,o]),m=l.useCallback(()=>{o(ET(t))},[t,o]),g=l.useCallback(b=>{o(MT({id:t,isEnabled:b.target.checked}))},[t,o]);return r?a.jsxs(N,{sx:{flexDir:"column",gap:3,p:2,borderRadius:"base",position:"relative",bg:"base.250",_dark:{bg:"base.750"}},children:[a.jsx(N,{sx:{gap:2,alignItems:"center",justifyContent:"space-between"},children:a.jsx(_r,{label:s(`controlnet.${r}`,{number:n}),"aria-label":s("controlnet.toggleControlNet"),isChecked:c,onChange:g,formControlProps:{w:"full"},formLabelProps:{fontWeight:600}})}),a.jsxs(N,{sx:{gap:2,alignItems:"center"},children:[a.jsx(Le,{sx:{w:"full",minW:0,transitionProperty:"common",transitionDuration:"0.1s"},children:a.jsx(dce,{id:t})}),i==="unifiedCanvas"&&a.jsx(Zce,{id:t}),a.jsx(rt,{size:"sm",tooltip:s("controlnet.duplicate"),"aria-label":s("controlnet.duplicate"),onClick:m,icon:a.jsx(Hu,{})}),a.jsx(rt,{size:"sm",tooltip:s("controlnet.delete"),"aria-label":s("controlnet.delete"),colorScheme:"error",onClick:h,icon:a.jsx(Zo,{})}),a.jsx(rt,{size:"sm",tooltip:s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),"aria-label":s(d?"controlnet.hideAdvanced":"controlnet.showAdvanced"),onClick:p,variant:"ghost",sx:{_hover:{bg:"none"}},icon:a.jsx(b0,{sx:{boxSize:4,color:"base.700",transform:d?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal",_dark:{color:"base.300"}}})})]}),a.jsxs(N,{sx:{w:"full",flexDirection:"column",gap:3},children:[a.jsxs(N,{sx:{gap:4,w:"full",alignItems:"center"},children:[a.jsxs(N,{sx:{flexDir:"column",gap:3,h:28,w:"full",paddingInlineStart:1,paddingInlineEnd:d?1:0,pb:2,justifyContent:"space-between"},children:[a.jsx(hce,{id:t}),a.jsx(nue,{id:t})]}),!d&&a.jsx(N,{sx:{alignItems:"center",justifyContent:"center",h:28,w:28,aspectRatio:"1/1"},children:a.jsx(P_,{id:t,isSmall:!0})})]}),a.jsxs(N,{sx:{gap:2},children:[a.jsx(oue,{id:t}),a.jsx(uue,{id:t})]}),a.jsx(lue,{id:t})]}),d&&a.jsxs(a.Fragment,{children:[a.jsx(P_,{id:t}),a.jsx(Yce,{id:t}),a.jsx(Kce,{id:t})]})]}):null},fue=l.memo(due),z1=e=>{const t=H(c=>{var d;return(d=c.generation.model)==null?void 0:d.base_model}),n=le(),r=wA(e),o=l.useMemo(()=>{const c=r.filter(d=>t?d.base_model===t:!0)[0];return c||r[0]},[t,r]),s=l.useMemo(()=>!o,[o]);return[l.useCallback(()=>{s||n(OT({type:e,overrides:{model:o}}))},[n,o,s,e]),s]},pue=me([we],({controlAdapters:e})=>{const t=[];let n=!1;const r=AT(e).filter(h=>h.isEnabled).length,o=RT(e).length;r>0&&t.push(`${r} IP`),r>o&&(n=!0);const s=DT(e).filter(h=>h.isEnabled).length,i=TT(e).length;s>0&&t.push(`${s} ControlNet`),s>i&&(n=!0);const c=NT(e).filter(h=>h.isEnabled).length,d=$T(e).length;return c>0&&t.push(`${c} T2I`),c>d&&(n=!0),{controlAdapterIds:LT(e).map(String),activeLabel:t.join(", "),isError:n}},Ie),hue=()=>{const{t:e}=J(),{controlAdapterIds:t,activeLabel:n}=H(pue),r=Pn("controlNet").isFeatureDisabled,[o,s]=z1("controlnet"),[i,c]=z1("ip_adapter"),[d,p]=z1("t2i_adapter");return r?null:a.jsx(No,{label:e("controlnet.controlAdapter_other"),activeLabel:n,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsxs(Hn,{size:"sm",w:"full",justifyContent:"space-between",children:[a.jsx(Dt,{tooltip:e("controlnet.addControlNet"),leftIcon:a.jsx(Zi,{}),onClick:o,"data-testid":"add controlnet",flexGrow:1,isDisabled:s,children:e("common.controlNet")}),a.jsx(Dt,{tooltip:e("controlnet.addIPAdapter"),leftIcon:a.jsx(Zi,{}),onClick:i,"data-testid":"add ip adapter",flexGrow:1,isDisabled:c,children:e("common.ipAdapter")}),a.jsx(Dt,{tooltip:e("controlnet.addT2IAdapter"),leftIcon:a.jsx(Zi,{}),onClick:d,"data-testid":"add t2i adapter",flexGrow:1,isDisabled:p,children:e("common.t2iAdapter")})]}),t.map((h,m)=>a.jsxs(l.Fragment,{children:[a.jsx(io,{}),a.jsx(fue,{id:h,number:m+1})]},h))]})})},Ju=l.memo(hue),mue=e=>{const{onClick:t}=e,{t:n}=J();return a.jsx(rt,{size:"sm","aria-label":n("embedding.addEmbedding"),tooltip:n("embedding.addEmbedding"),icon:a.jsx(GM,{}),sx:{p:2,color:"base.500",_hover:{color:"base.600"},_active:{color:"base.700"},_dark:{color:"base.500",_hover:{color:"base.400"},_active:{color:"base.300"}}},variant:"link",onClick:t})},D0=l.memo(mue),gue="28rem",vue=e=>{const{onSelect:t,isOpen:n,onClose:r,children:o}=e,{data:s}=zT(),i=l.useRef(null),{t:c}=J(),d=H(g=>g.generation.model),p=l.useMemo(()=>{if(!s)return[];const g=[];return to(s.entities,(b,y)=>{if(!b)return;const x=(d==null?void 0:d.base_model)!==b.base_model;g.push({value:b.model_name,label:b.model_name,group:xr[b.base_model],disabled:x,tooltip:x?`${c("embedding.incompatibleModel")} ${b.base_model}`:void 0})}),g.sort((b,y)=>{var x;return b.label&&y.label?(x=b.label)!=null&&x.localeCompare(y.label)?-1:1:-1}),g.sort((b,y)=>b.disabled&&!y.disabled?1:-1)},[s,d==null?void 0:d.base_model,c]),h=l.useCallback(g=>{g&&t(g)},[t]),m=l.useCallback((g,b)=>{var y;return((y=b.label)==null?void 0:y.toLowerCase().includes(g.toLowerCase().trim()))||b.value.toLowerCase().includes(g.toLowerCase().trim())},[]);return a.jsxs(Uf,{initialFocusRef:i,isOpen:n,onClose:r,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(Bg,{children:o}),a.jsx(Gf,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Hg,{sx:{p:0,w:`calc(${gue} - 2rem )`},children:p.length===0?a.jsx(N,{sx:{justifyContent:"center",p:2,fontSize:"sm",color:"base.500",_dark:{color:"base.700"}},children:a.jsx(je,{children:"No Embeddings Loaded"})}):a.jsx(sr,{inputRef:i,autoFocus:!0,placeholder:c("embedding.addEmbedding"),value:null,data:p,nothingFound:c("embedding.noMatchingEmbedding"),itemComponent:pl,disabled:p.length===0,onDropdownClose:r,filter:m,onChange:h})})})]})},T0=l.memo(vue),bue=()=>{const e=H(m=>m.generation.negativePrompt),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),s=le(),{t:i}=J(),c=l.useCallback(m=>{s(Ld(m.target.value))},[s]),d=l.useCallback(m=>{m.key==="<"&&o()},[o]),p=l.useCallback(m=>{if(!t.current)return;const g=t.current.selectionStart;if(g===void 0)return;let b=e.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=e.slice(g),ls.flushSync(()=>{s(Ld(b))}),t.current.selectionEnd=y,r()},[s,r,e]),h=Pn("embedding").isFeatureEnabled;return a.jsxs(Vn,{children:[a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(kn,{feature:"paramNegativeConditioning",placement:"right",children:a.jsx(yi,{id:"negativePrompt",name:"negativePrompt",ref:t,value:e,placeholder:i("parameters.negativePromptPlaceholder"),onChange:c,resize:"vertical",fontSize:"sm",minH:16,...h&&{onKeyDown:d}})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},jA=l.memo(bue),xue=me([we],({generation:e})=>({prompt:e.positivePrompt}),{memoizeOptions:{resultEqualityCheck:Nn}}),yue=()=>{const e=le(),{prompt:t}=H(xue),n=l.useRef(null),{isOpen:r,onClose:o,onOpen:s}=hs(),{t:i}=J(),c=l.useCallback(m=>{e($d(m.target.value))},[e]);_t("alt+a",()=>{var m;(m=n.current)==null||m.focus()},[]);const d=l.useCallback(m=>{if(!n.current)return;const g=n.current.selectionStart;if(g===void 0)return;let b=t.slice(0,g);b[b.length-1]!=="<"&&(b+="<"),b+=`${m}>`;const y=b.length;b+=t.slice(g),ls.flushSync(()=>{e($d(b))}),n.current.selectionStart=y,n.current.selectionEnd=y,o()},[e,o,t]),p=Pn("embedding").isFeatureEnabled,h=l.useCallback(m=>{p&&m.key==="<"&&s()},[s,p]);return a.jsxs(Le,{position:"relative",children:[a.jsx(Vn,{children:a.jsx(T0,{isOpen:r,onClose:o,onSelect:d,children:a.jsx(kn,{feature:"paramPositiveConditioning",placement:"right",children:a.jsx(yi,{id:"prompt",name:"prompt",ref:n,value:t,placeholder:i("parameters.positivePromptPlaceholder"),onChange:c,onKeyDown:h,resize:"vertical",minH:32})})})}),!r&&p&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:s})})]})},_A=l.memo(yue);function Cue(){const e=H(o=>o.sdxl.shouldConcatSDXLStylePrompt),t=le(),{t:n}=J(),r=l.useCallback(()=>{t(FT(!e))},[t,e]);return a.jsx(rt,{"aria-label":n("sdxl.concatPromptStyle"),tooltip:n("sdxl.concatPromptStyle"),variant:"outline",isChecked:e,onClick:r,icon:a.jsx(YM,{}),size:"xs",sx:{position:"absolute",insetInlineEnd:1,top:6,border:"none",color:e?"accent.500":"base.500",_hover:{bg:"none"}}})}const z_={position:"absolute",bg:"none",w:"full",minH:2,borderRadius:0,borderLeft:"none",borderRight:"none",zIndex:2,maskImage:"radial-gradient(circle at center, black, black 65%, black 30%, black 15%, transparent)"};function IA(){return a.jsxs(N,{children:[a.jsx(Le,{as:Ar.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"1px",borderTop:"none",borderColor:"base.400",...z_,_dark:{borderColor:"accent.500"}}}),a.jsx(Le,{as:Ar.div,initial:{opacity:0,scale:0},animate:{opacity:[0,1,1,1],scale:[0,.75,1.5,1],transition:{duration:.42,times:[0,.25,.5,1]}},exit:{opacity:0,scale:0},sx:{zIndex:3,position:"absolute",left:"48%",top:"3px",p:1,borderRadius:4,bg:"accent.400",color:"base.50",_dark:{bg:"accent.500"}},children:a.jsx(YM,{size:12})}),a.jsx(Le,{as:Ar.div,initial:{scaleX:0,borderWidth:0,display:"none"},animate:{display:["block","block","block","none"],scaleX:[0,.25,.5,1],borderWidth:[0,3,3,0],transition:{duration:.37,times:[0,.25,.5,1]}},sx:{top:"17px",borderBottom:"none",borderColor:"base.400",...z_,_dark:{borderColor:"accent.500"}}})]})}const wue=me([we],({sdxl:e})=>{const{negativeStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Sue=()=>{const e=le(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),{t:s}=J(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(wue),d=l.useCallback(g=>{e(Fd(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),ls.flushSync(()=>{e(Fd(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=Pn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Le,{position:"relative",children:[a.jsx(So,{children:c&&a.jsx(Le,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(IA,{})})}),a.jsx(Vn,{children:a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(yi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.negStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",fontSize:"sm",minH:16})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},kue=l.memo(Sue),jue=me([we],({sdxl:e})=>{const{positiveStylePrompt:t,shouldConcatSDXLStylePrompt:n}=e;return{prompt:t,shouldConcatSDXLStylePrompt:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),_ue=()=>{const e=le(),t=l.useRef(null),{isOpen:n,onClose:r,onOpen:o}=hs(),{t:s}=J(),{prompt:i,shouldConcatSDXLStylePrompt:c}=H(jue),d=l.useCallback(g=>{e(zd(g.target.value))},[e]),p=l.useCallback(g=>{if(!t.current)return;const b=t.current.selectionStart;if(b===void 0)return;let y=i.slice(0,b);y[y.length-1]!=="<"&&(y+="<"),y+=`${g}>`;const x=y.length;y+=i.slice(b),ls.flushSync(()=>{e(zd(y))}),t.current.selectionStart=x,t.current.selectionEnd=x,r()},[e,r,i]),h=Pn("embedding").isFeatureEnabled,m=l.useCallback(g=>{h&&g.key==="<"&&o()},[o,h]);return a.jsxs(Le,{position:"relative",children:[a.jsx(So,{children:c&&a.jsx(Le,{sx:{position:"absolute",left:"3",w:"94%",top:"-17px"},children:a.jsx(IA,{})})}),a.jsx(Vn,{children:a.jsx(T0,{isOpen:n,onClose:r,onSelect:p,children:a.jsx(yi,{id:"prompt",name:"prompt",ref:t,value:i,placeholder:s("sdxl.posStylePrompt"),onChange:d,onKeyDown:m,resize:"vertical",minH:16})})}),!n&&h&&a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0},children:a.jsx(D0,{onClick:o})})]})},Iue=l.memo(_ue);function J2(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(_A,{}),a.jsx(Cue,{}),a.jsx(Iue,{}),a.jsx(jA,{}),a.jsx(kue,{})]})}const vl=()=>{const{isRefinerAvailable:e}=aa(Yx,{selectFromResult:({data:t})=>({isRefinerAvailable:t?t.ids.length>0:!1})});return e},Pue=me([we],({sdxl:e,ui:t,hotkeys:n})=>{const{refinerCFGScale:r}=e,{shouldUseSliders:o}=t,{shift:s}=n;return{refinerCFGScale:r,shouldUseSliders:o,shift:s}},Ie),Eue=()=>{const{refinerCFGScale:e,shouldUseSliders:t,shift:n}=H(Pue),r=vl(),o=le(),{t:s}=J(),i=l.useCallback(d=>o(tb(d)),[o]),c=l.useCallback(()=>o(tb(7)),[o]);return t?a.jsx(It,{label:s("sdxl.cfgScale"),step:n?.1:.5,min:1,max:20,onChange:i,handleReset:c,value:e,sliderNumberInputProps:{max:200},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!r}):a.jsx(_a,{label:s("sdxl.cfgScale"),step:.5,min:1,max:200,onChange:i,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"},isDisabled:!r})},Mue=l.memo(Eue),Oue=e=>{const t=ki("models"),[n,r,o]=e.split("/"),s=BT.safeParse({base_model:n,model_name:o,model_type:r});if(!s.success){t.error({mainModelId:e,errors:s.error.format()},"Failed to parse main model id");return}return s.data},Aue=me(we,e=>({model:e.sdxl.refinerModel}),Ie),Rue=()=>{const e=le(),t=Pn("syncModels").isFeatureEnabled,{model:n}=H(Aue),{t:r}=J(),{data:o,isLoading:s}=aa(Yx),i=l.useMemo(()=>{if(!o)return[];const p=[];return to(o.entities,(h,m)=>{h&&p.push({value:m,label:h.model_name,group:xr[h.base_model]})}),p},[o]),c=l.useMemo(()=>(o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])??null,[o==null?void 0:o.entities,n]),d=l.useCallback(p=>{if(!p)return;const h=Oue(p);h&&e(VI(h))},[e]);return s?a.jsx(sr,{label:r("sdxl.refinermodel"),placeholder:r("sdxl.loading"),disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:2,children:[a.jsx(sr,{tooltip:c==null?void 0:c.description,label:r("sdxl.refinermodel"),value:c==null?void 0:c.id,placeholder:i.length>0?r("sdxl.selectAModel"):r("sdxl.noModelsAvailable"),data:i,error:i.length===0,disabled:i.length===0,onChange:d,w:"100%"}),t&&a.jsx(Le,{mt:7,children:a.jsx(Ku,{iconMode:!0})})]})},Due=l.memo(Rue),Tue=me([we],({sdxl:e,hotkeys:t})=>{const{refinerNegativeAestheticScore:n}=e,{shift:r}=t;return{refinerNegativeAestheticScore:n,shift:r}},Ie),Nue=()=>{const{refinerNegativeAestheticScore:e,shift:t}=H(Tue),n=vl(),r=le(),{t:o}=J(),s=l.useCallback(c=>r(rb(c)),[r]),i=l.useCallback(()=>r(rb(2.5)),[r]);return a.jsx(It,{label:o("sdxl.negAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},$ue=l.memo(Nue),Lue=me([we],({sdxl:e,hotkeys:t})=>{const{refinerPositiveAestheticScore:n}=e,{shift:r}=t;return{refinerPositiveAestheticScore:n,shift:r}},Ie),zue=()=>{const{refinerPositiveAestheticScore:e,shift:t}=H(Lue),n=vl(),r=le(),{t:o}=J(),s=l.useCallback(c=>r(nb(c)),[r]),i=l.useCallback(()=>r(nb(6)),[r]);return a.jsx(It,{label:o("sdxl.posAestheticScore"),step:t?.1:.5,min:1,max:10,onChange:s,handleReset:i,value:e,sliderNumberInputProps:{max:10},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Fue=l.memo(zue),Bue=me(we,({ui:e,sdxl:t})=>{const{refinerScheduler:n}=t,{favoriteSchedulers:r}=e,o=To(hg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{refinerScheduler:n,data:o}},Ie),Hue=()=>{const e=le(),{t}=J(),{refinerScheduler:n,data:r}=H(Bue),o=vl(),s=l.useCallback(i=>{i&&e(UI(i))},[e]);return a.jsx(sr,{w:"100%",label:t("sdxl.scheduler"),value:n,data:r,onChange:s,disabled:!o})},Wue=l.memo(Hue),Vue=me([we],({sdxl:e})=>{const{refinerStart:t}=e;return{refinerStart:t}},Ie),Uue=()=>{const{refinerStart:e}=H(Vue),t=le(),n=vl(),r=l.useCallback(i=>t(ob(i)),[t]),{t:o}=J(),s=l.useCallback(()=>t(ob(.8)),[t]);return a.jsx(It,{label:o("sdxl.refinerStart"),step:.01,min:0,max:1,onChange:r,handleReset:s,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1,isDisabled:!n})},Gue=l.memo(Uue),que=me([we],({sdxl:e,ui:t})=>{const{refinerSteps:n}=e,{shouldUseSliders:r}=t;return{refinerSteps:n,shouldUseSliders:r}},Ie),Kue=()=>{const{refinerSteps:e,shouldUseSliders:t}=H(que),n=vl(),r=le(),{t:o}=J(),s=l.useCallback(c=>{r(eb(c))},[r]),i=l.useCallback(()=>{r(eb(20))},[r]);return t?a.jsx(It,{label:o("sdxl.steps"),min:1,max:100,step:1,onChange:s,handleReset:i,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:500},isDisabled:!n}):a.jsx(_a,{label:o("sdxl.steps"),min:1,max:500,step:1,onChange:s,value:e,numberInputFieldProps:{textAlign:"center"},isDisabled:!n})},Que=l.memo(Kue);function Xue(){const e=H(s=>s.sdxl.shouldUseSDXLRefiner),t=vl(),n=le(),{t:r}=J(),o=l.useCallback(s=>{n(HT(s.target.checked))},[n]);return a.jsx(_r,{label:r("sdxl.useRefiner"),isChecked:e,onChange:o,isDisabled:!t})}const Yue=me(we,e=>{const{shouldUseSDXLRefiner:t}=e.sdxl,{shouldUseSliders:n}=e.ui;return{activeLabel:t?"Enabled":void 0,shouldUseSliders:n}},Ie),Jue=()=>{const{activeLabel:e,shouldUseSliders:t}=H(Yue),{t:n}=J();return vl()?a.jsx(No,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(Xue,{}),a.jsx(Due,{}),a.jsxs(N,{gap:2,flexDirection:t?"column":"row",children:[a.jsx(Que,{}),a.jsx(Mue,{})]}),a.jsx(Wue,{}),a.jsx(Fue,{}),a.jsx($ue,{}),a.jsx(Gue,{})]})}):a.jsx(No,{label:n("sdxl.refiner"),activeLabel:e,children:a.jsx(N,{sx:{justifyContent:"center",p:2},children:a.jsx(je,{sx:{fontSize:"sm",color:"base.500",_dark:"base.700"},children:n("models.noRefinerModelsInstalled")})})})},Z2=l.memo(Jue),Zue=me([we],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c}=t.sd.guidance,{cfgScale:d}=e,{shouldUseSliders:p}=n,{shift:h}=r;return{cfgScale:d,initial:o,min:s,sliderMax:i,inputMax:c,shouldUseSliders:p,shift:h}},Ie),ede=()=>{const{cfgScale:e,initial:t,min:n,sliderMax:r,inputMax:o,shouldUseSliders:s,shift:i}=H(Zue),c=le(),{t:d}=J(),p=l.useCallback(m=>c(Wh(m)),[c]),h=l.useCallback(()=>c(Wh(t)),[c,t]);return s?a.jsx(kn,{feature:"paramCFGScale",children:a.jsx(It,{label:d("parameters.cfgScale"),step:i?.1:.5,min:n,max:r,onChange:p,handleReset:h,value:e,sliderNumberInputProps:{max:o},withInput:!0,withReset:!0,withSliderMarks:!0,isInteger:!1})}):a.jsx(kn,{feature:"paramCFGScale",children:a.jsx(_a,{label:d("parameters.cfgScale"),step:.5,min:n,max:o,onChange:p,value:e,isInteger:!1,numberInputFieldProps:{textAlign:"center"}})})},Na=l.memo(ede),tde=me(we,e=>({model:e.generation.model}),Ie),nde=()=>{const e=le(),{t}=J(),{model:n}=H(tde),r=Pn("syncModels").isFeatureEnabled,{data:o,isLoading:s}=aa(iS),{data:i,isLoading:c}=Jd(iS),d=H(lo),p=l.useMemo(()=>{if(!o)return[];const g=[];return to(o.entities,(b,y)=>{b&&g.push({value:y,label:b.model_name,group:xr[b.base_model]})}),to(i==null?void 0:i.entities,(b,y)=>{!b||d==="unifiedCanvas"||d==="img2img"||g.push({value:y,label:b.model_name,group:xr[b.base_model]})}),g},[o,i,d]),h=l.useMemo(()=>((o==null?void 0:o.entities[`${n==null?void 0:n.base_model}/main/${n==null?void 0:n.model_name}`])||(i==null?void 0:i.entities[`${n==null?void 0:n.base_model}/onnx/${n==null?void 0:n.model_name}`]))??null,[o==null?void 0:o.entities,n,i==null?void 0:i.entities]),m=l.useCallback(g=>{if(!g)return;const b=R0(g);b&&e(X1(b))},[e]);return s||c?a.jsx(sr,{label:t("modelManager.model"),placeholder:"Loading...",disabled:!0,data:[]}):a.jsxs(N,{w:"100%",alignItems:"center",gap:3,children:[a.jsx(kn,{feature:"paramModel",children:a.jsx(sr,{tooltip:h==null?void 0:h.description,label:t("modelManager.model"),value:h==null?void 0:h.id,placeholder:p.length>0?"Select a model":"No models available",data:p,error:p.length===0,disabled:p.length===0,onChange:m,w:"100%"})}),r&&a.jsx(Le,{mt:6,children:a.jsx(Ku,{iconMode:!0})})]})},rde=l.memo(nde),ode=me(we,({generation:e})=>{const{model:t,vae:n}=e;return{model:t,vae:n}},Ie),sde=()=>{const e=le(),{t}=J(),{model:n,vae:r}=H(ode),{data:o}=lP(),s=l.useMemo(()=>{if(!o)return[];const d=[{value:"default",label:"Default",group:"Default"}];return to(o.entities,(p,h)=>{if(!p)return;const m=(n==null?void 0:n.base_model)!==p.base_model;d.push({value:h,label:p.model_name,group:xr[p.base_model],disabled:m,tooltip:m?`Incompatible base model: ${p.base_model}`:void 0})}),d.sort((p,h)=>p.disabled&&!h.disabled?1:-1)},[o,n==null?void 0:n.base_model]),i=l.useMemo(()=>(o==null?void 0:o.entities[`${r==null?void 0:r.base_model}/vae/${r==null?void 0:r.model_name}`])??null,[o==null?void 0:o.entities,r]),c=l.useCallback(d=>{if(!d||d==="default"){e(Vc(null));return}const p=bA(d);p&&e(Vc(p))},[e]);return a.jsx(kn,{feature:"paramVAE",children:a.jsx(sr,{itemComponent:pl,tooltip:i==null?void 0:i.description,label:t("modelManager.vae"),value:(i==null?void 0:i.id)??"default",placeholder:"Default",data:s,onChange:c,disabled:s.length===0,clearable:!0})})},ade=l.memo(sde),ide=me([dP,da],(e,t)=>{const{scheduler:n}=t,{favoriteSchedulers:r}=e,o=To(hg,(s,i)=>({value:i,label:s,group:r.includes(i)?"Favorites":void 0})).sort((s,i)=>s.label.localeCompare(i.label));return{scheduler:n,data:o}},Ie),lde=()=>{const e=le(),{t}=J(),{scheduler:n,data:r}=H(ide),o=l.useCallback(s=>{s&&e(Y1(s))},[e]);return a.jsx(kn,{feature:"paramScheduler",children:a.jsx(sr,{label:t("parameters.scheduler"),value:n,data:r,onChange:o})})},cde=l.memo(lde),ude=me(we,({generation:e})=>{const{vaePrecision:t}=e;return{vaePrecision:t}},Ie),dde=["fp16","fp32"],fde=()=>{const{t:e}=J(),t=le(),{vaePrecision:n}=H(ude),r=l.useCallback(o=>{o&&t(WT(o))},[t]);return a.jsx(kn,{feature:"paramVAEPrecision",children:a.jsx(Dr,{label:e("modelManager.vaePrecision"),value:n,data:dde,onChange:r})})},pde=l.memo(fde),hde=()=>{const e=Pn("vae").isFeatureEnabled;return a.jsxs(N,{gap:3,w:"full",flexWrap:e?"wrap":"nowrap",children:[a.jsx(Le,{w:"full",children:a.jsx(rde,{})}),a.jsx(Le,{w:"full",children:a.jsx(cde,{})}),e&&a.jsxs(N,{w:"full",gap:3,children:[a.jsx(ade,{}),a.jsx(pde,{})]})]})},$a=l.memo(hde),PA=[{name:an.t("parameters.aspectRatioFree"),value:null},{name:"2:3",value:2/3},{name:"16:9",value:16/9},{name:"1:1",value:1/1}],EA=PA.map(e=>e.value);function MA(){const e=H(s=>s.generation.aspectRatio),t=le(),n=H(s=>s.generation.shouldFitToWidthHeight),r=H(lo),o=l.useCallback(s=>{t(Ys(s.value)),t(Zd(!1))},[t]);return a.jsx(Hn,{isAttached:!0,children:PA.map(s=>a.jsx(Dt,{size:"sm",isChecked:e===s.value,isDisabled:r==="img2img"?!n:!1,onClick:o.bind(null,s),children:s.name},s.name))})}const mde=me([we],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.height,{model:d,height:p}=e,{aspectRatio:h}=e,m=t.shift?i:c;return{model:d,height:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},Ie),gde=e=>{const{model:t,height:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(mde),d=le(),{t:p}=J(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Vl(b)),c){const y=Ro(b*c,8);d(Wl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Vl(h)),c){const b=Ro(h*c,8);d(Wl(b))}},[d,h,c]);return a.jsx(It,{label:p("parameters.height"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},vde=l.memo(gde),bde=me([we],({generation:e,hotkeys:t,config:n})=>{const{min:r,sliderMax:o,inputMax:s,fineStep:i,coarseStep:c}=n.sd.width,{model:d,width:p,aspectRatio:h}=e,m=t.shift?i:c;return{model:d,width:p,min:r,sliderMax:o,inputMax:s,step:m,aspectRatio:h}},Ie),xde=e=>{const{model:t,width:n,min:r,sliderMax:o,inputMax:s,step:i,aspectRatio:c}=H(bde),d=le(),{t:p}=J(),h=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,m=l.useCallback(b=>{if(d(Wl(b)),c){const y=Ro(b/c,8);d(Vl(y))}},[d,c]),g=l.useCallback(()=>{if(d(Wl(h)),c){const b=Ro(h/c,8);d(Vl(b))}},[d,h,c]);return a.jsx(It,{label:p("parameters.width"),value:n,min:r,step:i,max:o,onChange:m,handleReset:g,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:s},...e})},yde=l.memo(xde),Cde=me([da,lo],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}=e;return{activeTabName:t,shouldFitToWidthHeight:n,shouldLockAspectRatio:r,width:o,height:s}},Ie);function Eu(){const{t:e}=J(),t=le(),{activeTabName:n,shouldFitToWidthHeight:r,shouldLockAspectRatio:o,width:s,height:i}=H(Cde),c=l.useCallback(()=>{o?(t(Zd(!1)),EA.includes(s/i)?t(Ys(s/i)):t(Ys(null))):(t(Zd(!0)),t(Ys(s/i)))},[o,s,i,t]),d=l.useCallback(()=>{t(VT()),t(Ys(null)),o&&t(Ys(i/s))},[t,o,s,i]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.150",_dark:{bg:"base.750"}},children:[a.jsx(kn,{feature:"paramRatio",children:a.jsxs(Vn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(yr,{children:e("parameters.aspectRatio")}),a.jsx(Pi,{}),a.jsx(MA,{}),a.jsx(rt,{tooltip:e("ui.swapSizes"),"aria-label":e("ui.swapSizes"),size:"sm",icon:a.jsx(E8,{}),fontSize:20,isDisabled:n==="img2img"?!r:!1,onClick:d}),a.jsx(rt,{tooltip:e("ui.lockRatio"),"aria-label":e("ui.lockRatio"),size:"sm",icon:a.jsx(JM,{}),isChecked:o,isDisabled:n==="img2img"?!r:!1,onClick:c})]})}),a.jsx(N,{gap:2,alignItems:"center",children:a.jsxs(N,{gap:2,flexDirection:"column",width:"full",children:[a.jsx(yde,{isDisabled:n==="img2img"?!r:!1}),a.jsx(vde,{isDisabled:n==="img2img"?!r:!1})]})})]})}const wde=me([we],({generation:e,config:t,ui:n,hotkeys:r})=>{const{initial:o,min:s,sliderMax:i,inputMax:c,fineStep:d,coarseStep:p}=t.sd.steps,{steps:h}=e,{shouldUseSliders:m}=n,g=r.shift?d:p;return{steps:h,initial:o,min:s,sliderMax:i,inputMax:c,step:g,shouldUseSliders:m}},Ie),Sde=()=>{const{steps:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s,shouldUseSliders:i}=H(wde),c=le(),{t:d}=J(),p=l.useCallback(g=>{c(Vh(g))},[c]),h=l.useCallback(()=>{c(Vh(t))},[c,t]),m=l.useCallback(()=>{c(Qx())},[c]);return i?a.jsx(kn,{feature:"paramSteps",children:a.jsx(It,{label:d("parameters.steps"),min:n,max:r,step:s,onChange:p,handleReset:h,value:e,withInput:!0,withReset:!0,withSliderMarks:!0,sliderNumberInputProps:{max:o}})}):a.jsx(kn,{feature:"paramSteps",children:a.jsx(_a,{label:d("parameters.steps"),min:n,max:o,step:s,onChange:p,value:e,numberInputFieldProps:{textAlign:"center"},onBlur:m})})},La=l.memo(Sde);function OA(){const e=le(),t=H(o=>o.generation.shouldFitToWidthHeight),n=l.useCallback(o=>{e(UT(o.target.checked))},[e]),{t:r}=J();return a.jsx(_r,{label:r("parameters.imageFit"),isChecked:t,onChange:n})}function kde(){const e=H(i=>i.generation.seed),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.shouldGenerateVariations),{t:r}=J(),o=le(),s=l.useCallback(i=>o(Hh(i)),[o]);return a.jsx(_a,{label:r("parameters.seed"),step:1,precision:0,flexGrow:1,min:fP,max:pP,isDisabled:t,isInvalid:e<0&&n,onChange:s,value:e})}const jde=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function _de(){const e=le(),t=H(o=>o.generation.shouldRandomizeSeed),{t:n}=J(),r=l.useCallback(()=>e(Hh(jde(fP,pP))),[e]);return a.jsx(rt,{size:"sm",isDisabled:t,"aria-label":n("parameters.shuffle"),tooltip:n("parameters.shuffle"),onClick:r,icon:a.jsx(Kee,{})})}const Ide=()=>{const e=le(),{t}=J(),n=H(o=>o.generation.shouldRandomizeSeed),r=l.useCallback(o=>e(GT(o.target.checked)),[e]);return a.jsx(_r,{label:t("common.random"),isChecked:n,onChange:r})},Pde=l.memo(Ide),Ede=()=>a.jsx(kn,{feature:"paramSeed",children:a.jsxs(N,{sx:{gap:3,alignItems:"flex-end"},children:[a.jsx(kde,{}),a.jsx(_de,{}),a.jsx(Pde,{})]})}),za=l.memo(Ede),AA=De((e,t)=>a.jsxs(N,{ref:t,sx:{flexDir:"column",gap:2,bg:"base.100",px:4,pt:2,pb:4,borderRadius:"base",_dark:{bg:"base.750"}},children:[a.jsx(je,{fontSize:"sm",fontWeight:"bold",sx:{color:"base.600",_dark:{color:"base.300"}},children:e.label}),e.children]}));AA.displayName="SubSettingsWrapper";const Mu=l.memo(AA),Mde=me([we],({sdxl:e})=>{const{sdxlImg2ImgDenoisingStrength:t}=e;return{sdxlImg2ImgDenoisingStrength:t}},Ie),Ode=()=>{const{sdxlImg2ImgDenoisingStrength:e}=H(Mde),t=le(),{t:n}=J(),r=l.useCallback(s=>t(lS(s)),[t]),o=l.useCallback(()=>{t(lS(.7))},[t]);return a.jsx(kn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(It,{label:n("sdxl.denoisingStrength"),step:.01,min:0,max:1,onChange:r,handleReset:o,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0})})})},RA=l.memo(Ode),Ade=me([dP,da],(e,t)=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},Ie),Rde=()=>{const{t:e}=J(),{shouldUseSliders:t,activeLabel:n}=H(Ade);return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}),a.jsx(RA,{}),a.jsx(OA,{})]})})},Dde=l.memo(Rde),Tde=()=>a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(Dde,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(Yu,{})]}),Nde=l.memo(Tde),eC=()=>{const{t:e}=J(),t=H(i=>i.generation.shouldRandomizeSeed),n=H(i=>i.generation.iterations),r=l.useMemo(()=>n===1?e("parameters.iterationsWithCount_one",{count:1}):e("parameters.iterationsWithCount_other",{count:n}),[n,e]),o=l.useMemo(()=>e(t?"parameters.randomSeed":"parameters.manualSeed"),[t,e]);return{iterationsAndSeedLabel:l.useMemo(()=>[r,o].join(", "),[r,o]),iterationsLabel:r,seedLabel:o}},$de=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsx(N,{sx:{flexDirection:"column",gap:3},children:t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]})})})},DA=l.memo($de),Lde=()=>a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(DA,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(Yu,{})]}),zde=l.memo(Lde),Fde=[{label:"Unmasked",value:"unmasked"},{label:"Mask",value:"mask"},{label:"Mask Edge",value:"edge"}],Bde=()=>{const e=le(),t=H(o=>o.generation.canvasCoherenceMode),{t:n}=J(),r=l.useCallback(o=>{o&&e(qT(o))},[e]);return a.jsx(kn,{feature:"compositingCoherenceMode",children:a.jsx(Dr,{label:n("parameters.coherenceMode"),data:Fde,value:t,onChange:r})})},Hde=l.memo(Bde),Wde=()=>{const e=le(),t=H(s=>s.generation.canvasCoherenceSteps),{t:n}=J(),r=l.useCallback(s=>{e(cS(s))},[e]),o=l.useCallback(()=>{e(cS(20))},[e]);return a.jsx(kn,{feature:"compositingCoherenceSteps",children:a.jsx(It,{label:n("parameters.coherenceSteps"),min:1,max:100,step:1,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Vde=l.memo(Wde),Ude=()=>{const e=le(),t=H(s=>s.generation.canvasCoherenceStrength),{t:n}=J(),r=l.useCallback(s=>{e(uS(s))},[e]),o=l.useCallback(()=>{e(uS(.3))},[e]);return a.jsx(kn,{feature:"compositingStrength",children:a.jsx(It,{label:n("parameters.coherenceStrength"),min:0,max:1,step:.01,sliderNumberInputProps:{max:999},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})},Gde=l.memo(Ude);function qde(){const e=le(),t=H(s=>s.generation.maskBlur),{t:n}=J(),r=l.useCallback(s=>{e(dS(s))},[e]),o=l.useCallback(()=>{e(dS(16))},[e]);return a.jsx(kn,{feature:"compositingBlur",children:a.jsx(It,{label:n("parameters.maskBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:t,onChange:r,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:o})})}const Kde=[{label:"Box Blur",value:"box"},{label:"Gaussian Blur",value:"gaussian"}];function Qde(){const e=H(o=>o.generation.maskBlurMethod),t=le(),{t:n}=J(),r=l.useCallback(o=>{o&&t(KT(o))},[t]);return a.jsx(kn,{feature:"compositingBlurMethod",children:a.jsx(Dr,{value:e,onChange:r,label:n("parameters.maskBlurMethod"),data:Kde})})}const Xde=()=>{const{t:e}=J();return a.jsx(No,{label:e("parameters.compositingSettingsHeader"),children:a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsxs(Mu,{label:e("parameters.coherencePassHeader"),children:[a.jsx(Hde,{}),a.jsx(Vde,{}),a.jsx(Gde,{})]}),a.jsx(io,{}),a.jsxs(Mu,{label:e("parameters.maskAdjustmentsHeader"),children:[a.jsx(qde,{}),a.jsx(Qde,{})]})]})})},TA=l.memo(Xde),Yde=me([we],({generation:e})=>{const{infillMethod:t}=e;return{infillMethod:t}},Ie),Jde=()=>{const e=le(),{infillMethod:t}=H(Yde),{data:n,isLoading:r}=TI(),o=n==null?void 0:n.infill_methods,{t:s}=J(),i=l.useCallback(c=>{e(QT(c))},[e]);return a.jsx(kn,{feature:"infillMethod",children:a.jsx(Dr,{disabled:(o==null?void 0:o.length)===0,placeholder:r?"Loading...":void 0,label:s("parameters.infillMethod"),value:t,data:o??[],onChange:i})})},Zde=l.memo(Jde),efe=me([da],e=>{const{infillPatchmatchDownscaleSize:t,infillMethod:n}=e;return{infillPatchmatchDownscaleSize:t,infillMethod:n}},Ie),tfe=()=>{const e=le(),{infillPatchmatchDownscaleSize:t,infillMethod:n}=H(efe),{t:r}=J(),o=l.useCallback(i=>{e(fS(i))},[e]),s=l.useCallback(()=>{e(fS(2))},[e]);return a.jsx(It,{isDisabled:n!=="patchmatch",label:r("parameters.patchmatchDownScaleSize"),min:1,max:10,value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},nfe=l.memo(tfe),rfe=me([da],e=>{const{infillTileSize:t,infillMethod:n}=e;return{infillTileSize:t,infillMethod:n}},Ie),ofe=()=>{const e=le(),{infillTileSize:t,infillMethod:n}=H(rfe),{t:r}=J(),o=l.useCallback(i=>{e(pS(i))},[e]),s=l.useCallback(()=>{e(pS(32))},[e]);return a.jsx(It,{isDisabled:n!=="tile",label:r("parameters.tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:o,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})},sfe=l.memo(ofe),afe=me([da],e=>{const{infillMethod:t}=e;return{infillMethod:t}},Ie);function ife(){const{infillMethod:e}=H(afe);return a.jsxs(N,{children:[e==="tile"&&a.jsx(sfe,{}),e==="patchmatch"&&a.jsx(nfe,{})]})}const Ir=e=>e.canvas,Vs=me([we],({canvas:e})=>e.batchIds.length>0||e.layerState.stagingArea.images.length>0),lfe=me([Ir],e=>{const{boundingBoxScaleMethod:t}=e;return{boundingBoxScale:t}},Ie),cfe=()=>{const e=le(),{boundingBoxScale:t}=H(lfe),{t:n}=J(),r=l.useCallback(o=>{e(XT(o))},[e]);return a.jsx(kn,{feature:"scaleBeforeProcessing",children:a.jsx(sr,{label:n("parameters.scaleBeforeProcessing"),data:YT,value:t,onChange:r})})},ufe=l.memo(cfe),dfe=me([da,Ir],(e,t)=>{const{scaledBoundingBoxDimensions:n,boundingBoxScaleMethod:r}=t,{model:o,aspectRatio:s}=e;return{model:o,scaledBoundingBoxDimensions:n,isManual:r==="manual",aspectRatio:s}},Ie),ffe=()=>{const e=le(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(dfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{let h=r.width;const m=Math.floor(p);o&&(h=Ro(m*o,64)),e(Qh({width:h,height:m}))},[o,e,r.width]),d=l.useCallback(()=>{let p=r.width;const h=Math.floor(s);o&&(p=Ro(h*o,64)),e(Qh({width:p,height:h}))},[o,e,s,r.width]);return a.jsx(It,{isDisabled:!n,label:i("parameters.scaledHeight"),min:64,max:1536,step:64,value:r.height,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},pfe=l.memo(ffe),hfe=me([Ir,da],(e,t)=>{const{boundingBoxScaleMethod:n,scaledBoundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,scaledBoundingBoxDimensions:r,aspectRatio:s,isManual:n==="manual"}},Ie),mfe=()=>{const e=le(),{model:t,isManual:n,scaledBoundingBoxDimensions:r,aspectRatio:o}=H(hfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{const h=Math.floor(p);let m=r.height;o&&(m=Ro(h/o,64)),e(Qh({width:h,height:m}))},[o,e,r.height]),d=l.useCallback(()=>{const p=Math.floor(s);let h=r.height;o&&(h=Ro(p/o,64)),e(Qh({width:p,height:h}))},[o,e,s,r.height]);return a.jsx(It,{isDisabled:!n,label:i("parameters.scaledWidth"),min:64,max:1536,step:64,value:r.width,onChange:c,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},gfe=l.memo(mfe),vfe=()=>{const{t:e}=J();return a.jsx(No,{label:e("parameters.infillScalingHeader"),children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsxs(Mu,{children:[a.jsx(Zde,{}),a.jsx(ife,{})]}),a.jsx(io,{}),a.jsxs(Mu,{children:[a.jsx(ufe,{}),a.jsx(gfe,{}),a.jsx(pfe,{})]})]})})},NA=l.memo(vfe),bfe=me([we,Vs],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},Ie),xfe=()=>{const e=le(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(bfe),{t:s}=J(),i=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,c=l.useCallback(p=>{if(e(na({...n,height:Math.floor(p)})),o){const h=Ro(p*o,64);e(na({width:h,height:Math.floor(p)}))}},[o,n,e]),d=l.useCallback(()=>{if(e(na({...n,height:Math.floor(i)})),o){const p=Ro(i*o,64);e(na({width:p,height:Math.floor(i)}))}},[o,n,e,i]);return a.jsx(It,{label:s("parameters.boundingBoxHeight"),min:64,max:1536,step:64,value:n.height,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},yfe=l.memo(xfe),Cfe=me([we,Vs],({canvas:e,generation:t},n)=>{const{boundingBoxDimensions:r}=e,{model:o,aspectRatio:s}=t;return{model:o,boundingBoxDimensions:r,isStaging:n,aspectRatio:s}},Ie),wfe=()=>{const e=le(),{model:t,boundingBoxDimensions:n,isStaging:r,aspectRatio:o}=H(Cfe),s=["sdxl","sdxl-refiner"].includes(t==null?void 0:t.base_model)?1024:512,{t:i}=J(),c=l.useCallback(p=>{if(e(na({...n,width:Math.floor(p)})),o){const h=Ro(p/o,64);e(na({width:Math.floor(p),height:h}))}},[o,n,e]),d=l.useCallback(()=>{if(e(na({...n,width:Math.floor(s)})),o){const p=Ro(s/o,64);e(na({width:Math.floor(s),height:p}))}},[o,n,e,s]);return a.jsx(It,{label:i("parameters.boundingBoxWidth"),min:64,max:1536,step:64,value:n.width,onChange:c,isDisabled:r,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d})},Sfe=l.memo(wfe),kfe=me([da,Ir],(e,t)=>{const{shouldFitToWidthHeight:n,shouldLockAspectRatio:r}=e,{boundingBoxDimensions:o}=t;return{shouldFitToWidthHeight:n,shouldLockAspectRatio:r,boundingBoxDimensions:o}});function ug(){const e=le(),{t}=J(),{shouldLockAspectRatio:n,boundingBoxDimensions:r}=H(kfe),o=l.useCallback(()=>{n?(e(Zd(!1)),EA.includes(r.width/r.height)?e(Ys(r.width/r.height)):e(Ys(null))):(e(Zd(!0)),e(Ys(r.width/r.height)))},[n,r,e]),s=l.useCallback(()=>{e(JT()),e(Ys(null)),n&&e(Ys(r.height/r.width))},[e,n,r]);return a.jsxs(N,{sx:{gap:2,p:4,borderRadius:4,flexDirection:"column",w:"full",bg:"base.100",_dark:{bg:"base.750"}},children:[a.jsx(kn,{feature:"paramRatio",children:a.jsxs(Vn,{as:N,flexDir:"row",alignItems:"center",gap:2,children:[a.jsx(yr,{children:t("parameters.aspectRatio")}),a.jsx(Pi,{}),a.jsx(MA,{}),a.jsx(rt,{tooltip:t("ui.swapSizes"),"aria-label":t("ui.swapSizes"),size:"sm",icon:a.jsx(E8,{}),fontSize:20,onClick:s}),a.jsx(rt,{tooltip:t("ui.lockRatio"),"aria-label":t("ui.lockRatio"),size:"sm",icon:a.jsx(JM,{}),isChecked:n,onClick:o})]})}),a.jsx(Sfe,{}),a.jsx(yfe,{})]})}const jfe=me(we,({ui:e,generation:t})=>{const{shouldUseSliders:n}=e,{shouldRandomizeSeed:r}=t;return{shouldUseSliders:n,activeLabel:r?void 0:"Manual Seed"}},Ie),_fe=()=>{const{t:e}=J(),{shouldUseSliders:t,activeLabel:n}=H(jfe);return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}),a.jsx(RA,{})]})})},Ife=l.memo(_fe);function Pfe(){return a.jsxs(a.Fragment,{children:[a.jsx(J2,{}),a.jsx(Ife,{}),a.jsx(Z2,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(NA,{}),a.jsx(TA,{}),a.jsx(Yu,{})]})}function tC(){return a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(_A,{}),a.jsx(jA,{})]})}function Efe(){const e=H(i=>i.generation.horizontalSymmetrySteps),t=H(i=>i.generation.steps),n=le(),{t:r}=J(),o=l.useCallback(i=>{n(hS(i))},[n]),s=l.useCallback(()=>{n(hS(0))},[n]);return a.jsx(It,{label:r("parameters.hSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function Mfe(){const e=H(i=>i.generation.verticalSymmetrySteps),t=H(i=>i.generation.steps),n=le(),{t:r}=J(),o=l.useCallback(i=>{n(mS(i))},[n]),s=l.useCallback(()=>{n(mS(0))},[n]);return a.jsx(It,{label:r("parameters.vSymmetryStep"),value:e,onChange:o,min:0,max:t,step:1,withInput:!0,withSliderMarks:!0,withReset:!0,handleReset:s})}function Ofe(){const e=H(r=>r.generation.shouldUseSymmetry),t=le(),n=l.useCallback(r=>{t(ZT(r.target.checked))},[t]);return a.jsx(_r,{label:"Enable Symmetry",isChecked:e,onChange:n})}const Afe=me(we,e=>({activeLabel:e.generation.shouldUseSymmetry?"Enabled":void 0}),Ie),Rfe=()=>{const{t:e}=J(),{activeLabel:t}=H(Afe);return Pn("symmetry").isFeatureEnabled?a.jsx(No,{label:e("parameters.symmetry"),activeLabel:t,children:a.jsxs(N,{sx:{gap:2,flexDirection:"column"},children:[a.jsx(Ofe,{}),a.jsx(Efe,{}),a.jsx(Mfe,{})]})}):null},nC=l.memo(Rfe),Dfe=me([we],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.img2imgStrength,{img2imgStrength:p}=e,h=t.shift?c:d;return{img2imgStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:h}},Ie),Tfe=()=>{const{img2imgStrength:e,initial:t,min:n,sliderMax:r,inputMax:o,step:s}=H(Dfe),i=le(),{t:c}=J(),d=l.useCallback(h=>i(Uh(h)),[i]),p=l.useCallback(()=>{i(Uh(t))},[i,t]);return a.jsx(kn,{feature:"paramDenoisingStrength",children:a.jsx(Mu,{children:a.jsx(It,{label:`${c("parameters.denoisingStrength")}`,step:s,min:n,max:r,onChange:d,handleReset:p,value:e,isInteger:!1,withInput:!0,withSliderMarks:!0,withReset:!0,sliderNumberInputProps:{max:o}})})})},$A=l.memo(Tfe),Nfe=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(Eu,{})]}),a.jsx($A,{}),a.jsx(OA,{})]})})},$fe=l.memo(Nfe),Lfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx($fe,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(Yu,{})]}),zfe=l.memo(Lfe),Ffe=me([we],({generation:e,hotkeys:t,config:n})=>{const{initial:r,min:o,sliderMax:s,inputMax:i,fineStep:c,coarseStep:d}=n.sd.hrfStrength,{hrfStrength:p,hrfEnabled:h}=e,m=t.shift?c:d;return{hrfStrength:p,initial:r,min:o,sliderMax:s,inputMax:i,step:m,hrfEnabled:h}},Ie),Bfe=()=>{const{hrfStrength:e,initial:t,min:n,sliderMax:r,step:o,hrfEnabled:s}=H(Ffe),i=le(),{t:c}=J(),d=l.useCallback(()=>{i(Gh(t))},[i,t]),p=l.useCallback(h=>{i(Gh(h))},[i]);return a.jsx(Wn,{label:c("hrf.strengthTooltip"),placement:"right",hasArrow:!0,children:a.jsx(It,{label:c("parameters.denoisingStrength"),min:n,max:r,step:o,value:e,onChange:p,withSliderMarks:!0,withInput:!0,withReset:!0,handleReset:d,isDisabled:!s})})},Hfe=l.memo(Bfe);function Wfe(){const e=le(),{t}=J(),n=H(o=>o.generation.hrfEnabled),r=l.useCallback(o=>e(J1(o.target.checked)),[e]);return a.jsx(_r,{label:t("hrf.enableHrf"),isChecked:n,onChange:r,tooltip:t("hrf.enableHrfTooltip")})}const Vfe=me(we,({generation:e})=>{const{hrfMethod:t,hrfEnabled:n}=e;return{hrfMethod:t,hrfEnabled:n}},Ie),Ufe=["ESRGAN","bilinear"],Gfe=()=>{const e=le(),{t}=J(),{hrfMethod:n,hrfEnabled:r}=H(Vfe),o=l.useCallback(s=>{s&&e(Z1(s))},[e]);return a.jsx(Dr,{label:t("hrf.upscaleMethod"),value:n,data:Ufe,onChange:o,disabled:!r})},qfe=l.memo(Gfe),Kfe=me(we,e=>{const{hrfEnabled:t}=e.generation;return{hrfEnabled:t}},Ie);function Qfe(){const{t:e}=J(),t=Pn("hrf").isFeatureEnabled,{hrfEnabled:n}=H(Kfe),r=l.useMemo(()=>{if(n)return e("common.on")},[e,n]);return t?a.jsx(No,{label:e("hrf.hrf"),activeLabel:r,children:a.jsxs(N,{sx:{flexDir:"column",gap:2},children:[a.jsx(Wfe,{}),a.jsx(Hfe,{}),a.jsx(qfe,{})]})}):null}const Xfe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx(DA,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(Qfe,{}),a.jsx(Yu,{})]}),Yfe=l.memo(Xfe),Jfe=()=>{const{t:e}=J(),t=H(r=>r.ui.shouldUseSliders),{iterationsAndSeedLabel:n}=eC();return a.jsx(No,{label:e("parameters.general"),activeLabel:n,defaultIsOpen:!0,children:a.jsxs(N,{sx:{flexDirection:"column",gap:3},children:[t?a.jsxs(a.Fragment,{children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}):a.jsxs(a.Fragment,{children:[a.jsxs(N,{gap:3,children:[a.jsx(ua,{}),a.jsx(La,{}),a.jsx(Na,{})]}),a.jsx($a,{}),a.jsx(Le,{pt:2,children:a.jsx(za,{})}),a.jsx(ug,{})]}),a.jsx($A,{})]})})},Zfe=l.memo(Jfe),epe=()=>a.jsxs(a.Fragment,{children:[a.jsx(tC,{}),a.jsx(Zfe,{}),a.jsx(Ju,{}),a.jsx(Xu,{}),a.jsx(Qu,{}),a.jsx(nC,{}),a.jsx(NA,{}),a.jsx(TA,{}),a.jsx(Yu,{})]}),tpe=l.memo(epe),npe=()=>{const e=H(lo),t=H(n=>n.generation.model);return e==="txt2img"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx(zde,{}):a.jsx(Yfe,{})}):e==="img2img"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx(Nde,{}):a.jsx(zfe,{})}):e==="unifiedCanvas"?a.jsx(Fh,{children:t&&t.base_model==="sdxl"?a.jsx(Pfe,{}):a.jsx(tpe,{})}):null},rpe=l.memo(npe),Fh=l.memo(e=>a.jsxs(N,{sx:{w:"full",h:"full",flexDir:"column",gap:2},children:[a.jsx(F8,{}),a.jsx(N,{layerStyle:"first",sx:{w:"full",h:"full",position:"relative",borderRadius:"base",p:2},children:a.jsx(N,{sx:{w:"full",h:"full",position:"relative"},children:a.jsx(Le,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:a.jsx(v0,{defer:!0,style:{height:"100%",width:"100%"},options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:800,theme:"os-theme-dark"},overflow:{x:"hidden"}},children:a.jsx(N,{sx:{gap:2,flexDirection:"column",h:"full",w:"full"},children:e.children})})})})})]}));Fh.displayName="ParametersPanelWrapper";const ope=me([we],e=>{const{initialImage:t}=e.generation;return{initialImage:t,isResetButtonDisabled:!t}},Ie),spe=()=>{const{initialImage:e}=H(ope),{currentData:t}=Rs((e==null?void 0:e.imageName)??zs.skipToken),n=l.useMemo(()=>{if(t)return{id:"initial-image",payloadType:"IMAGE_DTO",payload:{imageDTO:t}}},[t]),r=l.useMemo(()=>({id:"initial-image",actionType:"SET_INITIAL_IMAGE"}),[]);return a.jsx(ll,{imageDTO:t,droppableData:r,draggableData:n,isUploadDisabled:!0,fitContainer:!0,dropLabel:"Set as Initial Image",noContentFallback:a.jsx(eo,{label:"No initial image selected"}),dataTestId:"initial-image"})},ape=l.memo(spe),ipe=me([we],e=>{const{initialImage:t}=e.generation;return{isResetButtonDisabled:!t}},Ie),lpe={type:"SET_INITIAL_IMAGE"},cpe=()=>{const{isResetButtonDisabled:e}=H(ipe),t=le(),{getUploadButtonProps:n,getUploadInputProps:r}=D2({postUploadAction:lpe}),o=l.useCallback(()=>{t(eN())},[t]);return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",flexDirection:"column",height:"full",width:"full",alignItems:"center",justifyContent:"center",borderRadius:"base",p:2,gap:4},children:[a.jsxs(N,{sx:{w:"full",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(je,{sx:{ps:2,fontWeight:600,userSelect:"none",color:"base.700",_dark:{color:"base.200"}},children:"Initial Image"}),a.jsx(Pi,{}),a.jsx(rt,{tooltip:"Upload Initial Image","aria-label":"Upload Initial Image",icon:a.jsx(i0,{}),...n()}),a.jsx(rt,{tooltip:"Reset Initial Image","aria-label":"Reset Initial Image",icon:a.jsx(a0,{}),onClick:o,isDisabled:e})]}),a.jsx(ape,{}),a.jsx("input",{...r()})]})},upe=l.memo(cpe),dpe=e=>{const{onClick:t,isDisabled:n}=e,{t:r}=J(),o=H(s=>s.system.isConnected);return a.jsx(rt,{onClick:t,icon:a.jsx(Zo,{}),tooltip:`${r("gallery.deleteImage")} (Del)`,"aria-label":`${r("gallery.deleteImage")} (Del)`,isDisabled:n||!o,colorScheme:"error"})},LA=()=>{const[e,{isLoading:t}]=bg({fixedCacheKey:"enqueueBatch"}),[n,{isLoading:r}]=oP({fixedCacheKey:"resumeProcessor"}),[o,{isLoading:s}]=nP({fixedCacheKey:"pauseProcessor"}),[i,{isLoading:c}]=Gx({fixedCacheKey:"cancelQueueItem"}),[d,{isLoading:p}]=tP({fixedCacheKey:"clearQueue"}),[h,{isLoading:m}]=hP({fixedCacheKey:"pruneQueue"});return t||r||s||c||p||m},fpe=[{label:"RealESRGAN x2 Plus",value:"RealESRGAN_x2plus.pth",tooltip:"Attempts to retain sharpness, low smoothing",group:"x2 Upscalers"},{label:"RealESRGAN x4 Plus",value:"RealESRGAN_x4plus.pth",tooltip:"Best for photos and highly detailed images, medium smoothing",group:"x4 Upscalers"},{label:"RealESRGAN x4 Plus (anime 6B)",value:"RealESRGAN_x4plus_anime_6B.pth",tooltip:"Best for anime/manga, high smoothing",group:"x4 Upscalers"},{label:"ESRGAN SRx4",value:"ESRGAN_SRx4_DF2KOST_official-ff704c30.pth",tooltip:"Retains sharpness, low smoothing",group:"x4 Upscalers"}];function ppe(){const e=H(r=>r.postprocessing.esrganModelName),t=le(),n=l.useCallback(r=>t(tN(r)),[t]);return a.jsx(Dr,{label:"ESRGAN Model",value:e,itemComponent:pl,onChange:n,data:fpe})}const hpe=e=>{const{imageDTO:t}=e,n=le(),r=LA(),{t:o}=J(),{isOpen:s,onOpen:i,onClose:c}=hs(),{isAllowedToUpscale:d,detail:p}=nN(t),h=l.useCallback(()=>{c(),!(!t||!d)&&n(mP({imageDTO:t}))},[n,t,d,c]);return a.jsx(tp,{isOpen:s,onClose:c,triggerComponent:a.jsx(rt,{tooltip:o("parameters.upscale"),onClick:i,icon:a.jsx(KM,{}),"aria-label":o("parameters.upscale")}),children:a.jsxs(N,{sx:{flexDirection:"column",gap:4},children:[a.jsx(ppe,{}),a.jsx(Dt,{tooltip:p,size:"sm",isDisabled:!t||r||!d,onClick:h,children:o("parameters.upscaleImage")})]})})},mpe=l.memo(hpe),gpe=me([we,lo],({gallery:e,system:t,ui:n,config:r},o)=>{const{isConnected:s,shouldConfirmOnDelete:i,denoiseProgress:c}=t,{shouldShowImageDetails:d,shouldHidePreview:p,shouldShowProgressInViewer:h}=n,{shouldFetchMetadataFromApi:m}=r,g=e.selection[e.selection.length-1];return{shouldConfirmOnDelete:i,isConnected:s,shouldDisableToolbarButtons:!!(c!=null&&c.progress_image)||!g,shouldShowImageDetails:d,activeTabName:o,shouldHidePreview:p,shouldShowProgressInViewer:h,lastSelectedImage:g,shouldFetchMetadataFromApi:m}},{memoizeOptions:{resultEqualityCheck:Nn}}),vpe=()=>{const e=le(),{isConnected:t,shouldDisableToolbarButtons:n,shouldShowImageDetails:r,lastSelectedImage:o,shouldShowProgressInViewer:s}=H(gpe),i=Pn("upscaling").isFeatureEnabled,c=LA(),d=Zl(),{t:p}=J(),{recallBothPrompts:h,recallSeed:m,recallAllParameters:g}=j0(),{currentData:b}=Rs((o==null?void 0:o.image_name)??zs.skipToken),{metadata:y,isLoading:x}=z2(o==null?void 0:o.image_name),{workflow:w,isLoading:S}=F2(o==null?void 0:o.workflow_id),j=l.useCallback(()=>{w&&e(Vx(w))},[e,w]),I=l.useCallback(()=>{g(y)},[y,g]);_t("a",I,[y]);const _=l.useCallback(()=>{m(y==null?void 0:y.seed)},[y==null?void 0:y.seed,m]);_t("s",_,[b]);const M=l.useCallback(()=>{h(y==null?void 0:y.positive_prompt,y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt)},[y==null?void 0:y.negative_prompt,y==null?void 0:y.positive_prompt,y==null?void 0:y.positive_style_prompt,y==null?void 0:y.negative_style_prompt,h]);_t("p",M,[b]),_t("w",j,[w]);const E=l.useCallback(()=>{e(M8()),e(gg(b))},[e,b]);_t("shift+i",E,[b]);const A=l.useCallback(()=>{b&&e(mP({imageDTO:b}))},[e,b]),R=l.useCallback(()=>{b&&e(vg([b]))},[e,b]);_t("Shift+U",()=>{A()},{enabled:()=>!!(i&&!n&&t)},[i,b,n,t]);const D=l.useCallback(()=>e(rN(!r)),[e,r]);_t("i",()=>{b?D():d({title:p("toast.metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[b,r,d]),_t("delete",()=>{R()},[e,b]);const O=l.useCallback(()=>{e(NI(!s))},[e,s]);return a.jsx(a.Fragment,{children:a.jsxs(N,{sx:{flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:2},children:[a.jsx(Hn,{isAttached:!0,isDisabled:n,children:a.jsxs(Mg,{isLazy:!0,children:[a.jsx(Og,{as:rt,"aria-label":p("parameters.imageActions"),tooltip:p("parameters.imageActions"),isDisabled:!b,icon:a.jsx(use,{})}),a.jsx(ql,{motionProps:fu,children:b&&a.jsx(O8,{imageDTO:b})})]})}),a.jsxs(Hn,{isAttached:!0,isDisabled:n,children:[a.jsx(rt,{isLoading:S,icon:a.jsx(T2,{}),tooltip:`${p("nodes.loadWorkflow")} (W)`,"aria-label":`${p("nodes.loadWorkflow")} (W)`,isDisabled:!w,onClick:j}),a.jsx(rt,{isLoading:x,icon:a.jsx(eO,{}),tooltip:`${p("parameters.usePrompt")} (P)`,"aria-label":`${p("parameters.usePrompt")} (P)`,isDisabled:!(y!=null&&y.positive_prompt),onClick:M}),a.jsx(rt,{isLoading:x,icon:a.jsx(tO,{}),tooltip:`${p("parameters.useSeed")} (S)`,"aria-label":`${p("parameters.useSeed")} (S)`,isDisabled:(y==null?void 0:y.seed)===null||(y==null?void 0:y.seed)===void 0,onClick:_}),a.jsx(rt,{isLoading:x,icon:a.jsx(VM,{}),tooltip:`${p("parameters.useAll")} (A)`,"aria-label":`${p("parameters.useAll")} (A)`,isDisabled:!y,onClick:I})]}),i&&a.jsx(Hn,{isAttached:!0,isDisabled:c,children:i&&a.jsx(mpe,{imageDTO:b})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(rt,{icon:a.jsx(GM,{}),tooltip:`${p("parameters.info")} (I)`,"aria-label":`${p("parameters.info")} (I)`,isChecked:r,onClick:D})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(rt,{"aria-label":p("settings.displayInProgress"),tooltip:p("settings.displayInProgress"),icon:a.jsx(zee,{}),isChecked:s,onClick:O})}),a.jsx(Hn,{isAttached:!0,children:a.jsx(dpe,{onClick:R})})]})})},bpe=l.memo(vpe),xpe=me([we,Ux],(e,t)=>{var j,I;const{data:n,status:r}=oN.endpoints.listImages.select(t)(e),{data:o}=e.gallery.galleryView==="images"?gS.endpoints.getBoardImagesTotal.select(t.board_id??"none")(e):gS.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(e),s=e.gallery.selection[e.gallery.selection.length-1],i=r==="pending";if(!n||!s||(o==null?void 0:o.total)===0)return{isFetching:i,queryArgs:t,isOnFirstImage:!0,isOnLastImage:!0};const c={...t,offset:n.ids.length,limit:eP},d=sN.getSelectors(),p=d.selectAll(n),h=p.findIndex(_=>_.image_name===s.image_name),m=Hl(h+1,0,p.length-1),g=Hl(h-1,0,p.length-1),b=(j=p[m])==null?void 0:j.image_name,y=(I=p[g])==null?void 0:I.image_name,x=b?d.selectById(n,b):void 0,w=y?d.selectById(n,y):void 0,S=p.length;return{loadedImagesCount:p.length,currentImageIndex:h,areMoreImagesAvailable:((o==null?void 0:o.total)??0)>S,isFetching:r==="pending",nextImage:x,prevImage:w,queryArgs:c}},{memoizeOptions:{resultEqualityCheck:Nn}}),zA=()=>{const e=le(),{nextImage:t,prevImage:n,areMoreImagesAvailable:r,isFetching:o,queryArgs:s,loadedImagesCount:i,currentImageIndex:c}=H(xpe),d=l.useCallback(()=>{n&&e(vS(n))},[e,n]),p=l.useCallback(()=>{t&&e(vS(t))},[e,t]),[h]=ZI(),m=l.useCallback(()=>{h(s)},[h,s]);return{handlePrevImage:d,handleNextImage:p,isOnFirstImage:c===0,isOnLastImage:c!==void 0&&c===i-1,nextImage:t,prevImage:n,areMoreImagesAvailable:r,handleLoadMoreImages:m,isFetching:o}};function ype(e){return Ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const Cpe=({label:e,value:t,onClick:n,isLink:r,labelPosition:o,withCopy:s=!1})=>{const{t:i}=J(),c=l.useCallback(()=>navigator.clipboard.writeText(t.toString()),[t]);return t?a.jsxs(N,{gap:2,children:[n&&a.jsx(Wn,{label:`Recall ${e}`,children:a.jsx(Ia,{"aria-label":i("accessibility.useThisParameter"),icon:a.jsx(ype,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),s&&a.jsx(Wn,{label:`Copy ${e}`,children:a.jsx(Ia,{"aria-label":`Copy ${e}`,icon:a.jsx(Hu,{}),size:"xs",variant:"ghost",fontSize:14,onClick:c})}),a.jsxs(N,{direction:o?"column":"row",children:[a.jsxs(je,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?a.jsxs(Ig,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",a.jsx(HO,{mx:"2px"})]}):a.jsx(je,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}):null},Vr=l.memo(Cpe),wpe=e=>{var F;const{metadata:t}=e,{t:n}=J(),{recallPositivePrompt:r,recallNegativePrompt:o,recallSeed:s,recallCfgScale:i,recallModel:c,recallScheduler:d,recallVaeModel:p,recallSteps:h,recallWidth:m,recallHeight:g,recallStrength:b,recallHrfEnabled:y,recallHrfStrength:x,recallHrfMethod:w,recallLoRA:S,recallControlNet:j,recallIPAdapter:I,recallT2IAdapter:_}=j0(),M=l.useCallback(()=>{r(t==null?void 0:t.positive_prompt)},[t==null?void 0:t.positive_prompt,r]),E=l.useCallback(()=>{o(t==null?void 0:t.negative_prompt)},[t==null?void 0:t.negative_prompt,o]),A=l.useCallback(()=>{s(t==null?void 0:t.seed)},[t==null?void 0:t.seed,s]),R=l.useCallback(()=>{c(t==null?void 0:t.model)},[t==null?void 0:t.model,c]),D=l.useCallback(()=>{m(t==null?void 0:t.width)},[t==null?void 0:t.width,m]),O=l.useCallback(()=>{g(t==null?void 0:t.height)},[t==null?void 0:t.height,g]),T=l.useCallback(()=>{d(t==null?void 0:t.scheduler)},[t==null?void 0:t.scheduler,d]),K=l.useCallback(()=>{p(t==null?void 0:t.vae)},[t==null?void 0:t.vae,p]),G=l.useCallback(()=>{h(t==null?void 0:t.steps)},[t==null?void 0:t.steps,h]),Q=l.useCallback(()=>{i(t==null?void 0:t.cfg_scale)},[t==null?void 0:t.cfg_scale,i]),Z=l.useCallback(()=>{b(t==null?void 0:t.strength)},[t==null?void 0:t.strength,b]),te=l.useCallback(()=>{y(t==null?void 0:t.hrf_enabled)},[t==null?void 0:t.hrf_enabled,y]),V=l.useCallback(()=>{x(t==null?void 0:t.hrf_strength)},[t==null?void 0:t.hrf_strength,x]),oe=l.useCallback(()=>{w(t==null?void 0:t.hrf_method)},[t==null?void 0:t.hrf_method,w]),ne=l.useCallback(q=>{S(q)},[S]),se=l.useCallback(q=>{j(q)},[j]),re=l.useCallback(q=>{I(q)},[I]),ae=l.useCallback(q=>{_(q)},[_]),B=l.useMemo(()=>t!=null&&t.controlnets?t.controlnets.filter(q=>qh(q.control_model)):[],[t==null?void 0:t.controlnets]),X=l.useMemo(()=>t!=null&&t.ipAdapters?t.ipAdapters.filter(q=>qh(q.ip_adapter_model)):[],[t==null?void 0:t.ipAdapters]),$=l.useMemo(()=>t!=null&&t.t2iAdapters?t.t2iAdapters.filter(q=>aN(q.t2i_adapter_model)):[],[t==null?void 0:t.t2iAdapters]);return!t||Object.keys(t).length===0?null:(console.log(t),a.jsxs(a.Fragment,{children:[t.created_by&&a.jsx(Vr,{label:n("metadata.createdBy"),value:t.created_by}),t.generation_mode&&a.jsx(Vr,{label:n("metadata.generationMode"),value:t.generation_mode}),t.positive_prompt&&a.jsx(Vr,{label:n("metadata.positivePrompt"),labelPosition:"top",value:t.positive_prompt,onClick:M}),t.negative_prompt&&a.jsx(Vr,{label:n("metadata.negativePrompt"),labelPosition:"top",value:t.negative_prompt,onClick:E}),t.seed!==void 0&&t.seed!==null&&a.jsx(Vr,{label:n("metadata.seed"),value:t.seed,onClick:A}),t.model!==void 0&&t.model!==null&&t.model.model_name&&a.jsx(Vr,{label:n("metadata.model"),value:t.model.model_name,onClick:R}),t.width&&a.jsx(Vr,{label:n("metadata.width"),value:t.width,onClick:D}),t.height&&a.jsx(Vr,{label:n("metadata.height"),value:t.height,onClick:O}),t.scheduler&&a.jsx(Vr,{label:n("metadata.scheduler"),value:t.scheduler,onClick:T}),a.jsx(Vr,{label:n("metadata.vae"),value:((F=t.vae)==null?void 0:F.model_name)??"Default",onClick:K}),t.steps&&a.jsx(Vr,{label:n("metadata.steps"),value:t.steps,onClick:G}),t.cfg_scale!==void 0&&t.cfg_scale!==null&&a.jsx(Vr,{label:n("metadata.cfgScale"),value:t.cfg_scale,onClick:Q}),t.strength&&a.jsx(Vr,{label:n("metadata.strength"),value:t.strength,onClick:Z}),t.hrf_enabled&&a.jsx(Vr,{label:n("hrf.metadata.enabled"),value:t.hrf_enabled,onClick:te}),t.hrf_enabled&&t.hrf_strength&&a.jsx(Vr,{label:n("hrf.metadata.strength"),value:t.hrf_strength,onClick:V}),t.hrf_enabled&&t.hrf_method&&a.jsx(Vr,{label:n("hrf.metadata.method"),value:t.hrf_method,onClick:oe}),t.loras&&t.loras.map((q,pe)=>{if(FI(q.lora))return a.jsx(Vr,{label:"LoRA",value:`${q.lora.model_name} - ${q.weight}`,onClick:ne.bind(null,q)},pe)}),B.map((q,pe)=>{var W;return a.jsx(Vr,{label:"ControlNet",value:`${(W=q.control_model)==null?void 0:W.model_name} - ${q.control_weight}`,onClick:se.bind(null,q)},pe)}),X.map((q,pe)=>{var W;return a.jsx(Vr,{label:"IP Adapter",value:`${(W=q.ip_adapter_model)==null?void 0:W.model_name} - ${q.weight}`,onClick:re.bind(null,q)},pe)}),$.map((q,pe)=>{var W;return a.jsx(Vr,{label:"T2I Adapter",value:`${(W=q.t2i_adapter_model)==null?void 0:W.model_name} - ${q.weight}`,onClick:ae.bind(null,q)},pe)})]}))},Spe=l.memo(wpe),kpe=({image:e})=>{const{t}=J(),{metadata:n}=z2(e.image_name),{workflow:r}=F2(e.workflow_id);return a.jsxs(N,{layerStyle:"first",sx:{padding:4,gap:1,flexDirection:"column",width:"full",height:"full",borderRadius:"base",position:"absolute",overflow:"hidden"},children:[a.jsxs(N,{gap:2,children:[a.jsx(je,{fontWeight:"semibold",children:"File:"}),a.jsxs(Ig,{href:e.image_url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.image_name,a.jsx(HO,{mx:"2px"})]})]}),a.jsxs(tc,{variant:"line",sx:{display:"flex",flexDir:"column",w:"full",h:"full"},children:[a.jsxs(nc,{children:[a.jsx(wo,{children:t("metadata.recallParameters")}),a.jsx(wo,{children:t("metadata.metadata")}),a.jsx(wo,{children:t("metadata.imageDetails")}),a.jsx(wo,{children:t("metadata.workflow")})]}),a.jsxs($u,{children:[a.jsx(Go,{children:n?a.jsx(cc,{children:a.jsx(Spe,{metadata:n})}):a.jsx(eo,{label:t("metadata.noRecallParameters")})}),a.jsx(Go,{children:n?a.jsx(tl,{data:n,label:t("metadata.metadata")}):a.jsx(eo,{label:t("metadata.noMetaData")})}),a.jsx(Go,{children:e?a.jsx(tl,{data:e,label:t("metadata.imageDetails")}):a.jsx(eo,{label:t("metadata.noImageDetails")})}),a.jsx(Go,{children:r?a.jsx(tl,{data:r,label:t("metadata.workflow")}):a.jsx(eo,{label:t("nodes.noWorkflow")})})]})]})]})},jpe=l.memo(kpe),F1={color:"base.100",pointerEvents:"auto"},_pe=()=>{const{t:e}=J(),{handlePrevImage:t,handleNextImage:n,isOnFirstImage:r,isOnLastImage:o,handleLoadMoreImages:s,areMoreImagesAvailable:i,isFetching:c}=zA();return a.jsxs(Le,{sx:{position:"relative",height:"100%",width:"100%"},children:[a.jsx(Le,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineStart:0},children:!r&&a.jsx(Ia,{"aria-label":e("accessibility.previousImage"),icon:a.jsx(yee,{size:64}),variant:"unstyled",onClick:t,boxSize:16,sx:F1})}),a.jsxs(Le,{sx:{pos:"absolute",top:"50%",transform:"translate(0, -50%)",insetInlineEnd:0},children:[!o&&a.jsx(Ia,{"aria-label":e("accessibility.nextImage"),icon:a.jsx(Cee,{size:64}),variant:"unstyled",onClick:n,boxSize:16,sx:F1}),o&&i&&!c&&a.jsx(Ia,{"aria-label":e("accessibility.loadMore"),icon:a.jsx(xee,{size:64}),variant:"unstyled",onClick:s,boxSize:16,sx:F1}),o&&i&&c&&a.jsx(N,{sx:{w:16,h:16,alignItems:"center",justifyContent:"center"},children:a.jsx(Ci,{opacity:.5,size:"xl"})})]})]})},FA=l.memo(_pe),Ipe=me([we,iN],({ui:e,system:t},n)=>{const{shouldShowImageDetails:r,shouldHidePreview:o,shouldShowProgressInViewer:s}=e,{denoiseProgress:i,shouldAntialiasProgressImage:c}=t;return{shouldShowImageDetails:r,shouldHidePreview:o,imageName:n==null?void 0:n.image_name,denoiseProgress:i,shouldShowProgressInViewer:s,shouldAntialiasProgressImage:c}},{memoizeOptions:{resultEqualityCheck:Nn}}),Ppe=()=>{const{shouldShowImageDetails:e,imageName:t,denoiseProgress:n,shouldShowProgressInViewer:r,shouldAntialiasProgressImage:o}=H(Ipe),{handlePrevImage:s,handleNextImage:i,isOnLastImage:c,handleLoadMoreImages:d,areMoreImagesAvailable:p,isFetching:h}=zA();_t("left",()=>{s()},[s]),_t("right",()=>{if(c&&p&&!h){d();return}c||i()},[c,p,d,h,i]);const{currentData:m}=Rs(t??zs.skipToken),g=l.useMemo(()=>{if(m)return{id:"current-image",payloadType:"IMAGE_DTO",payload:{imageDTO:m}}},[m]),b=l.useMemo(()=>({id:"current-image",actionType:"SET_CURRENT_IMAGE"}),[]),[y,x]=l.useState(!1),w=l.useRef(0),{t:S}=J(),j=l.useCallback(()=>{x(!0),window.clearTimeout(w.current)},[]),I=l.useCallback(()=>{w.current=window.setTimeout(()=>{x(!1)},500)},[]);return a.jsxs(N,{onMouseOver:j,onMouseOut:I,sx:{width:"full",height:"full",alignItems:"center",justifyContent:"center",position:"relative"},children:[n!=null&&n.progress_image&&r?a.jsx(_i,{src:n.progress_image.dataURL,width:n.progress_image.width,height:n.progress_image.height,draggable:!1,"data-testid":"progress-image",sx:{objectFit:"contain",maxWidth:"full",maxHeight:"full",height:"auto",position:"absolute",borderRadius:"base",imageRendering:o?"auto":"pixelated"}}):a.jsx(ll,{imageDTO:m,droppableData:b,draggableData:g,isUploadDisabled:!0,fitContainer:!0,useThumbailFallback:!0,dropLabel:S("gallery.setCurrentImage"),noContentFallback:a.jsx(eo,{icon:Xl,label:"No image selected"}),dataTestId:"image-preview"}),e&&m&&a.jsx(Le,{sx:{position:"absolute",top:"0",width:"full",height:"full",borderRadius:"base"},children:a.jsx(jpe,{image:m})}),a.jsx(So,{children:!e&&m&&y&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:"0",width:"100%",height:"100%",pointerEvents:"none"},children:a.jsx(FA,{})},"nextPrevButtons")})]})},Epe=l.memo(Ppe),Mpe=()=>a.jsxs(N,{sx:{position:"relative",flexDirection:"column",height:"100%",width:"100%",rowGap:4,alignItems:"center",justifyContent:"center"},children:[a.jsx(bpe,{}),a.jsx(Epe,{})]}),Ope=l.memo(Mpe),Ape=()=>a.jsx(Le,{layerStyle:"first",sx:{position:"relative",width:"100%",height:"100%",p:2,borderRadius:"base"},children:a.jsx(N,{sx:{width:"100%",height:"100%"},children:a.jsx(Ope,{})})}),BA=l.memo(Ape),Rpe=()=>{const e=l.useRef(null),t=l.useCallback(()=>{e.current&&e.current.setLayout([50,50])},[]),n=G2();return a.jsx(Le,{sx:{w:"full",h:"full"},children:a.jsxs(E0,{ref:e,autoSaveId:"imageTab.content",direction:"horizontal",style:{height:"100%",width:"100%"},storage:n,units:"percentages",children:[a.jsx(el,{id:"imageTab.content.initImage",order:0,defaultSize:50,minSize:25,style:{position:"relative"},children:a.jsx(upe,{})}),a.jsx(lg,{onDoubleClick:t}),a.jsx(el,{id:"imageTab.content.selectedImage",order:1,defaultSize:50,minSize:25,children:a.jsx(BA,{})})]})})},Dpe=l.memo(Rpe);var Tpe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const F_=Sf(Tpe);function xx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var Npe=Object.defineProperty,B_=Object.getOwnPropertySymbols,$pe=Object.prototype.hasOwnProperty,Lpe=Object.prototype.propertyIsEnumerable,H_=(e,t,n)=>t in e?Npe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zpe=(e,t)=>{for(var n in t||(t={}))$pe.call(t,n)&&H_(e,n,t[n]);if(B_)for(var n of B_(t))Lpe.call(t,n)&&H_(e,n,t[n]);return e};function HA(e,t){if(t===null||typeof t!="object")return{};const n=zpe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const Fpe="__MANTINE_FORM_INDEX__";function W_(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${Fpe}`)):!1:!1}function V_(e,t,n){typeof n.value=="object"&&(n.value=Qc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Qc(e){if(typeof e!="object")return e;var t=0,n,r,o,s=Object.prototype.toString.call(e);if(s==="[object Object]"?o=Object.create(e.__proto__||null):s==="[object Array]"?o=Array(e.length):s==="[object Set]"?(o=new Set,e.forEach(function(i){o.add(Qc(i))})):s==="[object Map]"?(o=new Map,e.forEach(function(i,c){o.set(Qc(c),Qc(i))})):s==="[object Date]"?o=new Date(+e):s==="[object RegExp]"?o=new RegExp(e.source,e.flags):s==="[object DataView]"?o=new e.constructor(Qc(e.buffer)):s==="[object ArrayBuffer]"?o=e.slice(0):s.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function yx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,s)=>{const i=e[s],c=`${n===""?"":`${n}.`}${s}`,d=ri(c,t);let p=!1;return typeof i=="function"&&(o[c]=i(d,t,c)),typeof i=="object"&&Array.isArray(d)&&(p=!0,d.forEach((h,m)=>yx(i,t,`${c}.${m}`,o))),typeof i=="object"&&typeof d=="object"&&d!==null&&(p||yx(i,t,c,o)),o},r)}function Cx(e,t){return U_(typeof e=="function"?e(t):yx(e,t))}function kh(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Cx(t,n),o=Object.keys(r.errors).find(s=>e.split(".").every((i,c)=>i===s.split(".")[c]));return{hasError:!!o,error:o?r.errors[o]:null}}function Bpe(e,{from:t,to:n},r){const o=ri(e,r);if(!Array.isArray(o))return r;const s=[...o],i=o[t];return s.splice(t,1),s.splice(n,0,i),N0(e,s,r)}var Hpe=Object.defineProperty,G_=Object.getOwnPropertySymbols,Wpe=Object.prototype.hasOwnProperty,Vpe=Object.prototype.propertyIsEnumerable,q_=(e,t,n)=>t in e?Hpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Upe=(e,t)=>{for(var n in t||(t={}))Wpe.call(t,n)&&q_(e,n,t[n]);if(G_)for(var n of G_(t))Vpe.call(t,n)&&q_(e,n,t[n]);return e};function Gpe(e,{from:t,to:n},r){const o=`${e}.${t}`,s=`${e}.${n}`,i=Upe({},r);return Object.keys(r).every(c=>{let d,p;if(c.startsWith(o)&&(d=c,p=c.replace(o,s)),c.startsWith(s)&&(d=c.replace(s,o),p=c),d&&p){const h=i[d],m=i[p];return m===void 0?delete i[d]:i[d]=m,h===void 0?delete i[p]:i[p]=h,!1}return!0}),i}function qpe(e,t,n){const r=ri(e,n);return Array.isArray(r)?N0(e,r.filter((o,s)=>s!==t),n):n}var Kpe=Object.defineProperty,K_=Object.getOwnPropertySymbols,Qpe=Object.prototype.hasOwnProperty,Xpe=Object.prototype.propertyIsEnumerable,Q_=(e,t,n)=>t in e?Kpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ype=(e,t)=>{for(var n in t||(t={}))Qpe.call(t,n)&&Q_(e,n,t[n]);if(K_)for(var n of K_(t))Xpe.call(t,n)&&Q_(e,n,t[n]);return e};function X_(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function Y_(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let s=n;r===-1&&(s=HA(`${o}.${t}`,s));const i=Ype({},s),c=new Set;return Object.entries(s).filter(([d])=>{if(!d.startsWith(`${o}.`))return!1;const p=X_(d,o);return Number.isNaN(p)?!1:p>=t}).forEach(([d,p])=>{const h=X_(d,o),m=d.replace(`${o}.${h}`,`${o}.${h+r}`);i[m]=p,c.add(m),c.has(d)||delete i[d]}),i}function Jpe(e,t,n,r){const o=ri(e,r);if(!Array.isArray(o))return r;const s=[...o];return s.splice(typeof n=="number"?n:s.length,0,t),N0(e,s,r)}function J_(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function Zpe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var ehe=Object.defineProperty,the=Object.defineProperties,nhe=Object.getOwnPropertyDescriptors,Z_=Object.getOwnPropertySymbols,rhe=Object.prototype.hasOwnProperty,ohe=Object.prototype.propertyIsEnumerable,eI=(e,t,n)=>t in e?ehe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wi=(e,t)=>{for(var n in t||(t={}))rhe.call(t,n)&&eI(e,n,t[n]);if(Z_)for(var n of Z_(t))ohe.call(t,n)&&eI(e,n,t[n]);return e},B1=(e,t)=>the(e,nhe(t));function uc({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:s=!1,validateInputOnBlur:i=!1,transformValues:c=p=>p,validate:d}={}){const[p,h]=l.useState(r),[m,g]=l.useState(n),[b,y]=l.useState(e),[x,w]=l.useState(xx(t)),S=l.useRef(e),j=$=>{S.current=$},I=l.useCallback(()=>h({}),[]),_=$=>{const F=$?Wi(Wi({},b),$):b;j(F),g({})},M=l.useCallback($=>w(F=>xx(typeof $=="function"?$(F):$)),[]),E=l.useCallback(()=>w({}),[]),A=l.useCallback(()=>{y(e),E(),j(e),g({}),I()},[]),R=l.useCallback(($,F)=>M(q=>B1(Wi({},q),{[$]:F})),[]),D=l.useCallback($=>M(F=>{if(typeof $!="string")return F;const q=Wi({},F);return delete q[$],q}),[]),O=l.useCallback($=>g(F=>{if(typeof $!="string")return F;const q=HA($,F);return delete q[$],q}),[]),T=l.useCallback(($,F)=>{const q=W_($,s);O($),h(pe=>B1(Wi({},pe),{[$]:!0})),y(pe=>{const W=N0($,F,pe);if(q){const U=kh($,d,W);U.hasError?R($,U.error):D($)}return W}),!q&&o&&R($,null)},[]),K=l.useCallback($=>{y(F=>{const q=typeof $=="function"?$(F):$;return Wi(Wi({},F),q)}),o&&E()},[]),G=l.useCallback(($,F)=>{O($),y(q=>Bpe($,F,q)),w(q=>Gpe($,F,q))},[]),Q=l.useCallback(($,F)=>{O($),y(q=>qpe($,F,q)),w(q=>Y_($,F,q,-1))},[]),Z=l.useCallback(($,F,q)=>{O($),y(pe=>Jpe($,F,q,pe)),w(pe=>Y_($,q,pe,1))},[]),te=l.useCallback(()=>{const $=Cx(d,b);return w($.errors),$},[b,d]),V=l.useCallback($=>{const F=kh($,d,b);return F.hasError?R($,F.error):D($),F},[b,d]),oe=($,{type:F="input",withError:q=!0,withFocus:pe=!0}={})=>{const U={onChange:Zpe(ee=>T($,ee))};return q&&(U.error=x[$]),F==="checkbox"?U.checked=ri($,b):U.value=ri($,b),pe&&(U.onFocus=()=>h(ee=>B1(Wi({},ee),{[$]:!0})),U.onBlur=()=>{if(W_($,i)){const ee=kh($,d,b);ee.hasError?R($,ee.error):D($)}}),U},ne=($,F)=>q=>{q==null||q.preventDefault();const pe=te();pe.hasErrors?F==null||F(pe.errors,b,q):$==null||$(c(b),q)},se=$=>c($||b),re=l.useCallback($=>{$.preventDefault(),A()},[]),ae=$=>{if($){const q=ri($,m);if(typeof q=="boolean")return q;const pe=ri($,b),W=ri($,S.current);return!F_(pe,W)}return Object.keys(m).length>0?J_(m):!F_(b,S.current)},B=l.useCallback($=>J_(p,$),[p]),X=l.useCallback($=>$?!kh($,d,b).hasError:!Cx(d,b).hasErrors,[b,d]);return{values:b,errors:x,setValues:K,setErrors:M,setFieldValue:T,setFieldError:R,clearFieldError:D,clearErrors:E,reset:A,validate:te,validateField:V,reorderListItem:G,removeListItem:Q,insertListItem:Z,getInputProps:oe,onSubmit:ne,onReset:re,isDirty:ae,isTouched:B,setTouched:h,setDirty:g,resetTouched:I,resetDirty:_,isValid:X,getTransformedValues:se}}function Or(e){const{...t}=e,{base50:n,base100:r,base200:o,base300:s,base800:i,base700:c,base900:d,accent500:p,accent300:h}=Jf(),{colorMode:m}=ji(),g=l.useCallback(()=>({input:{color:Xe(d,r)(m),backgroundColor:Xe(n,d)(m),borderColor:Xe(o,i)(m),borderWidth:2,outline:"none",":focus":{borderColor:Xe(h,p)(m)}},label:{color:Xe(c,s)(m),fontWeight:"normal",marginBottom:4}}),[h,p,r,o,s,n,c,i,d,m]);return a.jsx(DM,{styles:g,...t})}const she=[{value:"sd-1",label:xr["sd-1"]},{value:"sd-2",label:xr["sd-2"]},{value:"sdxl",label:xr.sdxl},{value:"sdxl-refiner",label:xr["sdxl-refiner"]}];function sp(e){const{...t}=e,{t:n}=J();return a.jsx(Dr,{label:n("modelManager.baseModel"),data:she,...t})}function VA(e){const{data:t}=gP(),{...n}=e;return a.jsx(Dr,{label:"Config File",placeholder:"Select A Config File",data:t||[],...n})}const ahe=[{value:"normal",label:"Normal"},{value:"inpaint",label:"Inpaint"},{value:"depth",label:"Depth"}];function $0(e){const{...t}=e,{t:n}=J();return a.jsx(Dr,{label:n("modelManager.variant"),data:ahe,...t})}function dg(e,t=!0){let n;t?n=new RegExp("[^\\\\/]+(?=\\.)"):n=new RegExp("[^\\\\/]+(?=[\\\\/]?$)");const r=e.match(n);return r?r[0]:""}function UA(e){const{t}=J(),n=le(),{model_path:r}=e,o=uc({initialValues:{model_name:r?dg(r):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"checkpoint",error:void 0,vae:"",variant:"normal",config:"configs\\stable-diffusion\\v1-inference.yaml"}}),[s]=vP(),[i,c]=l.useState(!1),d=m=>{s({body:m}).unwrap().then(g=>{n(Ht(rr({title:t("modelManager.modelAdded",{modelName:m.model_name}),status:"success"}))),o.reset(),r&&n(Pf(null))}).catch(g=>{g&&n(Ht(rr({title:t("toast.modelAddFailed"),status:"error"})))})},p=l.useCallback(m=>{if(o.values.model_name===""){const g=dg(m.currentTarget.value);g&&o.setFieldValue("model_name",g)}},[o]),h=l.useCallback(()=>c(m=>!m),[]);return a.jsx("form",{onSubmit:o.onSubmit(m=>d(m)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Or,{label:t("modelManager.model"),required:!0,...o.getInputProps("model_name")}),a.jsx(sp,{label:t("modelManager.baseModel"),...o.getInputProps("base_model")}),a.jsx(Or,{label:t("modelManager.modelLocation"),required:!0,...o.getInputProps("path"),onBlur:p}),a.jsx(Or,{label:t("modelManager.description"),...o.getInputProps("description")}),a.jsx(Or,{label:t("modelManager.vaeLocation"),...o.getInputProps("vae")}),a.jsx($0,{label:t("modelManager.variant"),...o.getInputProps("variant")}),a.jsxs(N,{flexDirection:"column",width:"100%",gap:2,children:[i?a.jsx(Or,{required:!0,label:t("modelManager.customConfigFileLocation"),...o.getInputProps("config")}):a.jsx(VA,{required:!0,width:"100%",...o.getInputProps("config")}),a.jsx(Eo,{isChecked:i,onChange:h,label:t("modelManager.useCustomConfig")}),a.jsx(Dt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})]})})}function GA(e){const{t}=J(),n=le(),{model_path:r}=e,[o]=vP(),s=uc({initialValues:{model_name:r?dg(r,!1):"",base_model:"sd-1",model_type:"main",path:r||"",description:"",model_format:"diffusers",error:void 0,vae:"",variant:"normal"}}),i=d=>{o({body:d}).unwrap().then(p=>{n(Ht(rr({title:t("modelManager.modelAdded",{modelName:d.model_name}),status:"success"}))),s.reset(),r&&n(Pf(null))}).catch(p=>{p&&n(Ht(rr({title:t("toast.modelAddFailed"),status:"error"})))})},c=l.useCallback(d=>{if(s.values.model_name===""){const p=dg(d.currentTarget.value,!1);p&&s.setFieldValue("model_name",p)}},[s]);return a.jsx("form",{onSubmit:s.onSubmit(d=>i(d)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",gap:2,children:[a.jsx(Or,{required:!0,label:t("modelManager.model"),...s.getInputProps("model_name")}),a.jsx(sp,{label:t("modelManager.baseModel"),...s.getInputProps("base_model")}),a.jsx(Or,{required:!0,label:t("modelManager.modelLocation"),placeholder:t("modelManager.modelLocationValidationMsg"),...s.getInputProps("path"),onBlur:c}),a.jsx(Or,{label:t("modelManager.description"),...s.getInputProps("description")}),a.jsx(Or,{label:t("modelManager.vaeLocation"),...s.getInputProps("vae")}),a.jsx($0,{label:t("modelManager.variant"),...s.getInputProps("variant")}),a.jsx(Dt,{mt:2,type:"submit",children:t("modelManager.addModel")})]})})}const qA=[{label:"Diffusers",value:"diffusers"},{label:"Checkpoint / Safetensors",value:"checkpoint"}];function ihe(){const[e,t]=l.useState("diffusers"),{t:n}=J(),r=l.useCallback(o=>{o&&t(o)},[]);return a.jsxs(N,{flexDirection:"column",gap:4,width:"100%",children:[a.jsx(Dr,{label:n("modelManager.modelType"),value:e,data:qA,onChange:r}),a.jsxs(N,{sx:{p:4,borderRadius:4,bg:"base.300",_dark:{bg:"base.850"}},children:[e==="diffusers"&&a.jsx(GA,{}),e==="checkpoint"&&a.jsx(UA,{})]})]})}const lhe=[{label:"None",value:"none"},{label:"v_prediction",value:"v_prediction"},{label:"epsilon",value:"epsilon"},{label:"sample",value:"sample"}];function che(){const e=le(),{t}=J(),[n,{isLoading:r}]=bP(),o=uc({initialValues:{location:"",prediction_type:void 0}}),s=i=>{const c={location:i.location,prediction_type:i.prediction_type==="none"?void 0:i.prediction_type};n({body:c}).unwrap().then(d=>{e(Ht(rr({title:t("toast.modelAddedSimple"),status:"success"}))),o.reset()}).catch(d=>{d&&e(Ht(rr({title:`${d.data.detail} `,status:"error"})))})};return a.jsx("form",{onSubmit:o.onSubmit(i=>s(i)),style:{width:"100%"},children:a.jsxs(N,{flexDirection:"column",width:"100%",gap:4,children:[a.jsx(Or,{label:t("modelManager.modelLocation"),placeholder:t("modelManager.simpleModelDesc"),w:"100%",...o.getInputProps("location")}),a.jsx(Dr,{label:t("modelManager.predictionType"),data:lhe,defaultValue:"none",...o.getInputProps("prediction_type")}),a.jsx(Dt,{type:"submit",isLoading:r,children:t("modelManager.addModel")})]})})}function uhe(){const[e,t]=l.useState("simple"),n=l.useCallback(()=>t("simple"),[]),r=l.useCallback(()=>t("advanced"),[]);return a.jsxs(N,{flexDirection:"column",width:"100%",overflow:"scroll",maxHeight:window.innerHeight-250,gap:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{size:"sm",isChecked:e=="simple",onClick:n,children:"Simple"}),a.jsx(Dt,{size:"sm",isChecked:e=="advanced",onClick:r,children:"Advanced"})]}),a.jsxs(N,{sx:{p:4,borderRadius:4,background:"base.200",_dark:{background:"base.800"}},children:[e==="simple"&&a.jsx(che,{}),e==="advanced"&&a.jsx(ihe,{})]})]})}function dhe(e){const{...t}=e;return a.jsx(_E,{w:"100%",...t,children:e.children})}function fhe(){const e=H(w=>w.modelmanager.searchFolder),[t,n]=l.useState(""),{data:r}=aa(Al),{foundModels:o,alreadyInstalled:s,filteredModels:i}=xP({search_path:e||""},{selectFromResult:({data:w})=>{const S=P$(r==null?void 0:r.entities),j=To(S,"path"),I=S$(w,j),_=R$(w,j);return{foundModels:w,alreadyInstalled:tI(_,t),filteredModels:tI(I,t)}}}),[c,{isLoading:d}]=bP(),p=le(),{t:h}=J(),m=l.useCallback(w=>{const S=w.currentTarget.id.split("\\").splice(-1)[0];c({body:{location:w.currentTarget.id}}).unwrap().then(j=>{p(Ht(rr({title:`Added Model: ${S}`,status:"success"})))}).catch(j=>{j&&p(Ht(rr({title:h("toast.modelAddFailed"),status:"error"})))})},[p,c,h]),g=l.useCallback(w=>{n(w.target.value)},[]),b=l.useCallback(w=>p(Pf(w)),[p]),y=({models:w,showActions:S=!0})=>w.map(j=>a.jsxs(N,{sx:{p:4,gap:4,alignItems:"center",borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{w:"100%",sx:{flexDirection:"column",minW:"25%"},children:[a.jsx(je,{sx:{fontWeight:600},children:j.split("\\").slice(-1)[0]}),a.jsx(je,{sx:{fontSize:"sm",color:"base.600",_dark:{color:"base.400"}},children:j})]}),S?a.jsxs(N,{gap:2,children:[a.jsx(Dt,{id:j,onClick:m,isLoading:d,children:h("modelManager.quickAdd")}),a.jsx(Dt,{onClick:b.bind(null,j),isLoading:d,children:h("modelManager.advanced")})]}):a.jsx(je,{sx:{fontWeight:600,p:2,borderRadius:4,color:"accent.50",bg:"accent.400",_dark:{color:"accent.100",bg:"accent.600"}},children:"Installed"})]},j));return(()=>e?!o||o.length===0?a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",height:96,userSelect:"none",bg:"base.200",_dark:{bg:"base.900"}},children:a.jsx(je,{variant:"subtext",children:h("modelManager.noModels")})}):a.jsxs(N,{sx:{flexDirection:"column",gap:2,w:"100%",minW:"50%"},children:[a.jsx(Is,{onChange:g,label:h("modelManager.search"),labelPos:"side"}),a.jsxs(N,{p:2,gap:2,children:[a.jsxs(je,{sx:{fontWeight:600},children:["Models Found: ",o.length]}),a.jsxs(je,{sx:{fontWeight:600,color:"accent.500",_dark:{color:"accent.200"}},children:["Not Installed: ",i.length]})]}),a.jsx(dhe,{offsetScrollbars:!0,children:a.jsxs(N,{gap:2,flexDirection:"column",children:[y({models:i}),y({models:s,showActions:!1})]})})]}):null)()}const tI=(e,t)=>{const n=[];return to(e,r=>{if(!r)return null;r.includes(t)&&n.push(r)}),n};function phe(){const e=H(p=>p.modelmanager.advancedAddScanModel),{t}=J(),[n,r]=l.useState("diffusers"),[o,s]=l.useState(!0);l.useEffect(()=>{e&&[".ckpt",".safetensors",".pth",".pt"].some(p=>e.endsWith(p))?r("checkpoint"):r("diffusers")},[e,r,o]);const i=le(),c=l.useCallback(()=>i(Pf(null)),[i]),d=l.useCallback(p=>{p&&(r(p),s(p==="checkpoint"))},[]);return e?a.jsxs(Le,{as:Ar.div,initial:{x:-100,opacity:0},animate:{x:0,opacity:1,transition:{duration:.2}},sx:{display:"flex",flexDirection:"column",minWidth:"40%",maxHeight:window.innerHeight-300,overflow:"scroll",p:4,gap:4,borderRadius:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsx(je,{size:"xl",fontWeight:600,children:o||n==="checkpoint"?"Add Checkpoint Model":"Add Diffusers Model"}),a.jsx(rt,{icon:a.jsx(ku,{}),"aria-label":t("modelManager.closeAdvanced"),onClick:c,size:"sm"})]}),a.jsx(Dr,{label:t("modelManager.modelType"),value:n,data:qA,onChange:d}),o?a.jsx(UA,{model_path:e},e):a.jsx(GA,{model_path:e},e)]}):null}function hhe(){const e=le(),{t}=J(),n=H(d=>d.modelmanager.searchFolder),{refetch:r}=xP({search_path:n||""}),o=uc({initialValues:{folder:""}}),s=l.useCallback(d=>{e(bS(d.folder))},[e]),i=l.useCallback(()=>{r()},[r]),c=l.useCallback(()=>{e(bS(null)),e(Pf(null))},[e]);return a.jsx("form",{onSubmit:o.onSubmit(d=>s(d)),style:{width:"100%"},children:a.jsxs(N,{sx:{w:"100%",gap:2,borderRadius:4,alignItems:"center"},children:[a.jsxs(N,{w:"100%",alignItems:"center",gap:4,minH:12,children:[a.jsx(je,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",minW:"max-content",_dark:{color:"base.300"}},children:"Folder"}),n?a.jsx(N,{sx:{w:"100%",p:2,px:4,bg:"base.300",borderRadius:4,fontSize:"sm",fontWeight:"bold",_dark:{bg:"base.700"}},children:n}):a.jsx(Is,{w:"100%",size:"md",...o.getInputProps("folder")})]}),a.jsxs(N,{gap:2,children:[n?a.jsx(rt,{"aria-label":t("modelManager.scanAgain"),tooltip:t("modelManager.scanAgain"),icon:a.jsx(s0,{}),onClick:i,fontSize:18,size:"sm"}):a.jsx(rt,{"aria-label":t("modelManager.findModels"),tooltip:t("modelManager.findModels"),icon:a.jsx(Yee,{}),fontSize:18,size:"sm",type:"submit"}),a.jsx(rt,{"aria-label":t("modelManager.clearCheckpointFolder"),tooltip:t("modelManager.clearCheckpointFolder"),icon:a.jsx(Zo,{}),size:"sm",onClick:c,isDisabled:!n,colorScheme:"red"})]})]})})}const mhe=l.memo(hhe);function ghe(){return a.jsxs(N,{flexDirection:"column",w:"100%",gap:4,children:[a.jsx(mhe,{}),a.jsxs(N,{gap:4,children:[a.jsx(N,{sx:{maxHeight:window.innerHeight-300,overflow:"scroll",gap:4,w:"100%"},children:a.jsx(fhe,{})}),a.jsx(phe,{})]})]})}function vhe(){const[e,t]=l.useState("add"),{t:n}=J(),r=l.useCallback(()=>t("add"),[]),o=l.useCallback(()=>t("scan"),[]);return a.jsxs(N,{flexDirection:"column",gap:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{onClick:r,isChecked:e=="add",size:"sm",width:"100%",children:n("modelManager.addModel")}),a.jsx(Dt,{onClick:o,isChecked:e=="scan",size:"sm",width:"100%",children:n("modelManager.scanForModels")})]}),e=="add"&&a.jsx(uhe,{}),e=="scan"&&a.jsx(ghe,{})]})}const bhe=[{label:"Stable Diffusion 1",value:"sd-1"},{label:"Stable Diffusion 2",value:"sd-2"}];function xhe(){var q,pe;const{t:e}=J(),t=le(),{data:n}=aa(Al),[r,{isLoading:o}]=lN(),[s,i]=l.useState("sd-1"),c=OS(n==null?void 0:n.entities,(W,U)=>(W==null?void 0:W.model_format)==="diffusers"&&(W==null?void 0:W.base_model)==="sd-1"),d=OS(n==null?void 0:n.entities,(W,U)=>(W==null?void 0:W.model_format)==="diffusers"&&(W==null?void 0:W.base_model)==="sd-2"),p=l.useMemo(()=>({"sd-1":c,"sd-2":d}),[c,d]),[h,m]=l.useState(((q=Object.keys(p[s]))==null?void 0:q[0])??null),[g,b]=l.useState(((pe=Object.keys(p[s]))==null?void 0:pe[1])??null),[y,x]=l.useState(null),[w,S]=l.useState(""),[j,I]=l.useState(.5),[_,M]=l.useState("weighted_sum"),[E,A]=l.useState("root"),[R,D]=l.useState(""),[O,T]=l.useState(!1),K=Object.keys(p[s]).filter(W=>W!==g&&W!==y),G=Object.keys(p[s]).filter(W=>W!==h&&W!==y),Q=Object.keys(p[s]).filter(W=>W!==h&&W!==g),Z=l.useCallback(W=>{i(W),m(null),b(null)},[]),te=l.useCallback(W=>{m(W)},[]),V=l.useCallback(W=>{b(W)},[]),oe=l.useCallback(W=>{W?(x(W),M("weighted_sum")):(x(null),M("add_difference"))},[]),ne=l.useCallback(W=>S(W.target.value),[]),se=l.useCallback(W=>I(W),[]),re=l.useCallback(()=>I(.5),[]),ae=l.useCallback(W=>M(W),[]),B=l.useCallback(W=>A(W),[]),X=l.useCallback(W=>D(W.target.value),[]),$=l.useCallback(W=>T(W.target.checked),[]),F=l.useCallback(()=>{const W=[];let U=[h,g,y];U=U.filter(Y=>Y!==null),U.forEach(Y=>{var he;const ge=(he=Y==null?void 0:Y.split("/"))==null?void 0:he[2];ge&&W.push(ge)});const ee={model_names:W,merged_model_name:w!==""?w:W.join("-"),alpha:j,interp:_,force:O,merge_dest_directory:E==="root"?void 0:R};r({base_model:s,body:{body:ee}}).unwrap().then(Y=>{t(Ht(rr({title:e("modelManager.modelsMerged"),status:"success"})))}).catch(Y=>{Y&&t(Ht(rr({title:e("modelManager.modelsMergeFailed"),status:"error"})))})},[s,t,r,w,j,R,O,_,E,h,y,g,e]);return a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsxs(N,{sx:{flexDirection:"column",rowGap:1},children:[a.jsx(je,{children:e("modelManager.modelMergeHeaderHelp1")}),a.jsx(je,{fontSize:"sm",variant:"subtext",children:e("modelManager.modelMergeHeaderHelp2")})]}),a.jsxs(N,{columnGap:4,children:[a.jsx(Dr,{label:"Model Type",w:"100%",data:bhe,value:s,onChange:Z}),a.jsx(sr,{label:e("modelManager.modelOne"),w:"100%",value:h,placeholder:e("modelManager.selectModel"),data:K,onChange:te}),a.jsx(sr,{label:e("modelManager.modelTwo"),w:"100%",placeholder:e("modelManager.selectModel"),value:g,data:G,onChange:V}),a.jsx(sr,{label:e("modelManager.modelThree"),data:Q,w:"100%",placeholder:e("modelManager.selectModel"),clearable:!0,onChange:oe})]}),a.jsx(Is,{label:e("modelManager.mergedModelName"),value:w,onChange:ne}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(It,{label:e("modelManager.alpha"),min:.01,max:.99,step:.01,value:j,onChange:se,withInput:!0,withReset:!0,handleReset:re,withSliderMarks:!0}),a.jsx(je,{variant:"subtext",fontSize:"sm",children:e("modelManager.modelMergeAlphaHelp")})]}),a.jsxs(N,{sx:{padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(je,{fontWeight:500,fontSize:"sm",variant:"subtext",children:e("modelManager.interpolationType")}),a.jsx(om,{value:_,onChange:ae,children:a.jsx(N,{columnGap:4,children:y===null?a.jsxs(a.Fragment,{children:[a.jsx(ei,{value:"weighted_sum",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.weightedSum")})}),a.jsx(ei,{value:"sigmoid",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.sigmoid")})}),a.jsx(ei,{value:"inv_sigmoid",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.inverseSigmoid")})})]}):a.jsx(ei,{value:"add_difference",children:a.jsx(Wn,{label:e("modelManager.modelMergeInterpAddDifferenceHelp"),children:a.jsx(je,{fontSize:"sm",children:e("modelManager.addDifference")})})})})})]}),a.jsxs(N,{sx:{flexDirection:"column",padding:4,borderRadius:"base",gap:4,bg:"base.200",_dark:{bg:"base.900"}},children:[a.jsxs(N,{columnGap:4,children:[a.jsx(je,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:e("modelManager.mergedModelSaveLocation")}),a.jsx(om,{value:E,onChange:B,children:a.jsxs(N,{columnGap:4,children:[a.jsx(ei,{value:"root",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.invokeAIFolder")})}),a.jsx(ei,{value:"custom",children:a.jsx(je,{fontSize:"sm",children:e("modelManager.custom")})})]})})]}),E==="custom"&&a.jsx(Is,{label:e("modelManager.mergedModelCustomSaveLocation"),value:R,onChange:X})]}),a.jsx(Eo,{label:e("modelManager.ignoreMismatch"),isChecked:O,onChange:$,fontWeight:"500"}),a.jsx(Dt,{onClick:F,isLoading:o,isDisabled:h===null||g===null,children:e("modelManager.merge")})]})}function yhe(e){const{model:t}=e,n=le(),{t:r}=J(),[o,{isLoading:s}]=cN(),[i,c]=l.useState("InvokeAIRoot"),[d,p]=l.useState("");l.useEffect(()=>{c("InvokeAIRoot")},[t]);const h=l.useCallback(()=>{c("InvokeAIRoot")},[]),m=l.useCallback(y=>{c(y)},[]),g=l.useCallback(y=>{p(y.target.value)},[]),b=l.useCallback(()=>{const y={base_model:t.base_model,model_name:t.model_name,convert_dest_directory:i==="Custom"?d:void 0};if(i==="Custom"&&d===""){n(Ht(rr({title:r("modelManager.noCustomLocationProvided"),status:"error"})));return}n(Ht(rr({title:`${r("modelManager.convertingModelBegin")}: ${t.model_name}`,status:"info"}))),o(y).unwrap().then(()=>{n(Ht(rr({title:`${r("modelManager.modelConverted")}: ${t.model_name}`,status:"success"})))}).catch(()=>{n(Ht(rr({title:`${r("modelManager.modelConversionFailed")}: ${t.model_name}`,status:"error"})))})},[o,d,n,t.base_model,t.model_name,i,r]);return a.jsxs(_0,{title:`${r("modelManager.convert")} ${t.model_name}`,acceptCallback:b,cancelCallback:h,acceptButtonText:`${r("modelManager.convert")}`,triggerComponent:a.jsxs(Dt,{size:"sm","aria-label":r("modelManager.convertToDiffusers"),className:" modal-close-btn",isLoading:s,children:["🧨 ",r("modelManager.convertToDiffusers")]}),motionPreset:"slideInBottom",children:[a.jsxs(N,{flexDirection:"column",rowGap:4,children:[a.jsx(je,{children:r("modelManager.convertToDiffusersHelpText1")}),a.jsxs(zf,{children:[a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText2")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText3")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText4")}),a.jsx(Ps,{children:r("modelManager.convertToDiffusersHelpText5")})]}),a.jsx(je,{children:r("modelManager.convertToDiffusersHelpText6")})]}),a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsxs(N,{marginTop:4,flexDir:"column",gap:2,children:[a.jsx(je,{fontWeight:"600",children:r("modelManager.convertToDiffusersSaveLocation")}),a.jsx(om,{value:i,onChange:m,children:a.jsxs(N,{gap:4,children:[a.jsx(ei,{value:"InvokeAIRoot",children:a.jsx(Wn,{label:"Save converted model in the InvokeAI root folder",children:r("modelManager.invokeRoot")})}),a.jsx(ei,{value:"Custom",children:a.jsx(Wn,{label:"Save converted model in a custom folder",children:r("modelManager.custom")})})]})})]}),i==="Custom"&&a.jsxs(N,{flexDirection:"column",rowGap:2,children:[a.jsx(je,{fontWeight:"500",fontSize:"sm",variant:"subtext",children:r("modelManager.customSaveLocation")}),a.jsx(Is,{value:d,onChange:g,width:"full"})]})]})]})}function Che(e){const{model:t}=e,[n,{isLoading:r}]=yP(),{data:o}=gP(),[s,i]=l.useState(!1);l.useEffect(()=>{o!=null&&o.includes(t.config)||i(!0)},[o,t.config]);const c=le(),{t:d}=J(),p=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"checkpoint",vae:t.vae?t.vae:"",config:t.config?t.config:"",variant:t.variant},validate:{path:g=>g.trim().length===0?"Must provide a path":null}}),h=l.useCallback(()=>i(g=>!g),[]),m=l.useCallback(g=>{const b={base_model:t.base_model,model_name:t.model_name,body:g};n(b).unwrap().then(y=>{p.setValues(y),c(Ht(rr({title:d("modelManager.modelUpdated"),status:"success"})))}).catch(y=>{p.reset(),c(Ht(rr({title:d("modelManager.modelUpdateFailed"),status:"error"})))})},[p,c,t.base_model,t.model_name,d,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{justifyContent:"space-between",alignItems:"center",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model"]})]}),[""].includes(t.base_model)?a.jsx(Va,{sx:{p:2,borderRadius:4,bg:"error.200",_dark:{bg:"error.400"}},children:"Conversion Not Supported"}):a.jsx(yhe,{model:t})]}),a.jsx(io,{}),a.jsx(N,{flexDirection:"column",maxHeight:window.innerHeight-270,overflowY:"scroll",children:a.jsx("form",{onSubmit:p.onSubmit(g=>m(g)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:d("modelManager.name"),...p.getInputProps("model_name")}),a.jsx(Or,{label:d("modelManager.description"),...p.getInputProps("description")}),a.jsx(sp,{required:!0,...p.getInputProps("base_model")}),a.jsx($0,{required:!0,...p.getInputProps("variant")}),a.jsx(Or,{required:!0,label:d("modelManager.modelLocation"),...p.getInputProps("path")}),a.jsx(Or,{label:d("modelManager.vaeLocation"),...p.getInputProps("vae")}),a.jsxs(N,{flexDirection:"column",gap:2,children:[s?a.jsx(Or,{required:!0,label:d("modelManager.config"),...p.getInputProps("config")}):a.jsx(VA,{required:!0,...p.getInputProps("config")}),a.jsx(Eo,{isChecked:s,onChange:h,label:"Use Custom Config"})]}),a.jsx(Dt,{type:"submit",isLoading:r,children:d("modelManager.updateModel")})]})})})]})}function whe(e){const{model:t}=e,[n,{isLoading:r}]=yP(),o=le(),{t:s}=J(),i=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"main",path:t.path?t.path:"",description:t.description?t.description:"",model_format:"diffusers",vae:t.vae?t.vae:"",variant:t.variant},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Ht(rr({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Ht(rr({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[i,o,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model"]})]}),a.jsx(io,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Or,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(sp,{required:!0,...i.getInputProps("base_model")}),a.jsx($0,{required:!0,...i.getInputProps("variant")}),a.jsx(Or,{required:!0,label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Or,{label:s("modelManager.vaeLocation"),...i.getInputProps("vae")}),a.jsx(Dt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function She(e){const{model:t}=e,[n,{isLoading:r}]=uN(),o=le(),{t:s}=J(),i=uc({initialValues:{model_name:t.model_name?t.model_name:"",base_model:t.base_model,model_type:"lora",path:t.path?t.path:"",description:t.description?t.description:"",model_format:t.model_format},validate:{path:d=>d.trim().length===0?"Must provide a path":null}}),c=l.useCallback(d=>{const p={base_model:t.base_model,model_name:t.model_name,body:d};n(p).unwrap().then(h=>{i.setValues(h),o(Ht(rr({title:s("modelManager.modelUpdated"),status:"success"})))}).catch(h=>{i.reset(),o(Ht(rr({title:s("modelManager.modelUpdateFailed"),status:"error"})))})},[o,i,t.base_model,t.model_name,s,n]);return a.jsxs(N,{flexDirection:"column",rowGap:4,width:"100%",children:[a.jsxs(N,{flexDirection:"column",children:[a.jsx(je,{fontSize:"lg",fontWeight:"bold",children:t.model_name}),a.jsxs(je,{fontSize:"sm",color:"base.400",children:[xr[t.base_model]," Model ⋅"," ",dN[t.model_format]," format"]})]}),a.jsx(io,{}),a.jsx("form",{onSubmit:i.onSubmit(d=>c(d)),children:a.jsxs(N,{flexDirection:"column",overflowY:"scroll",gap:4,children:[a.jsx(Or,{label:s("modelManager.name"),...i.getInputProps("model_name")}),a.jsx(Or,{label:s("modelManager.description"),...i.getInputProps("description")}),a.jsx(sp,{...i.getInputProps("base_model")}),a.jsx(Or,{label:s("modelManager.modelLocation"),...i.getInputProps("path")}),a.jsx(Dt,{type:"submit",isLoading:r,children:s("modelManager.updateModel")})]})})]})}function khe(e){const{t}=J(),n=le(),[r]=fN(),[o]=pN(),{model:s,isSelected:i,setSelectedModelId:c}=e,d=l.useCallback(()=>{c(s.id)},[s.id,c]),p=l.useCallback(()=>{const h={main:r,lora:o,onnx:r}[s.model_type];h(s).unwrap().then(m=>{n(Ht(rr({title:`${t("modelManager.modelDeleted")}: ${s.model_name}`,status:"success"})))}).catch(m=>{m&&n(Ht(rr({title:`${t("modelManager.modelDeleteFailed")}: ${s.model_name}`,status:"error"})))}),c(void 0)},[r,o,s,c,n,t]);return a.jsxs(N,{sx:{gap:2,alignItems:"center",w:"full"},children:[a.jsx(N,{as:Dt,isChecked:i,sx:{justifyContent:"start",p:2,borderRadius:"base",w:"full",alignItems:"center",bg:i?"accent.400":"base.100",color:i?"base.50":"base.800",_hover:{bg:i?"accent.500":"base.300",color:i?"base.50":"base.800"},_dark:{color:i?"base.50":"base.100",bg:i?"accent.600":"base.850",_hover:{color:i?"base.50":"base.100",bg:i?"accent.550":"base.700"}}},onClick:d,children:a.jsxs(N,{gap:4,alignItems:"center",children:[a.jsx(Va,{minWidth:14,p:.5,fontSize:"sm",variant:"solid",children:hN[s.base_model]}),a.jsx(Wn,{label:s.description,hasArrow:!0,placement:"bottom",children:a.jsx(je,{sx:{fontWeight:500},children:s.model_name})})]})}),a.jsx(_0,{title:t("modelManager.deleteModel"),acceptCallback:p,acceptButtonText:t("modelManager.delete"),triggerComponent:a.jsx(rt,{icon:a.jsx(qne,{}),"aria-label":t("modelManager.deleteConfig"),colorScheme:"error"}),children:a.jsxs(N,{rowGap:4,flexDirection:"column",children:[a.jsx("p",{style:{fontWeight:"bold"},children:t("modelManager.deleteMsg1")}),a.jsx("p",{children:t("modelManager.deleteMsg2")})]})})]})}const jhe=e=>{const{selectedModelId:t,setSelectedModelId:n}=e,{t:r}=J(),[o,s]=l.useState(""),[i,c]=l.useState("all"),{filteredDiffusersModels:d,isLoadingDiffusersModels:p}=aa(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredDiffusersModels:jd(I,"main","diffusers",o),isLoadingDiffusersModels:_})}),{filteredCheckpointModels:h,isLoadingCheckpointModels:m}=aa(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredCheckpointModels:jd(I,"main","checkpoint",o),isLoadingCheckpointModels:_})}),{filteredLoraModels:g,isLoadingLoraModels:b}=_f(void 0,{selectFromResult:({data:I,isLoading:_})=>({filteredLoraModels:jd(I,"lora",void 0,o),isLoadingLoraModels:_})}),{filteredOnnxModels:y,isLoadingOnnxModels:x}=Jd(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredOnnxModels:jd(I,"onnx","onnx",o),isLoadingOnnxModels:_})}),{filteredOliveModels:w,isLoadingOliveModels:S}=Jd(Al,{selectFromResult:({data:I,isLoading:_})=>({filteredOliveModels:jd(I,"onnx","olive",o),isLoadingOliveModels:_})}),j=l.useCallback(I=>{s(I.target.value)},[]);return a.jsx(N,{flexDirection:"column",rowGap:4,width:"50%",minWidth:"50%",children:a.jsxs(N,{flexDirection:"column",gap:4,paddingInlineEnd:4,children:[a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Dt,{onClick:c.bind(null,"all"),isChecked:i==="all",size:"sm",children:r("modelManager.allModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"diffusers"),isChecked:i==="diffusers",children:r("modelManager.diffusersModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"checkpoint"),isChecked:i==="checkpoint",children:r("modelManager.checkpointModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"onnx"),isChecked:i==="onnx",children:r("modelManager.onnxModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"olive"),isChecked:i==="olive",children:r("modelManager.oliveModels")}),a.jsx(Dt,{size:"sm",onClick:c.bind(null,"lora"),isChecked:i==="lora",children:r("modelManager.loraModels")})]}),a.jsx(Is,{onChange:j,label:r("modelManager.search"),labelPos:"side"}),a.jsxs(N,{flexDirection:"column",gap:4,maxHeight:window.innerHeight-280,overflow:"scroll",children:[p&&a.jsx(Wc,{loadingMessage:"Loading Diffusers..."}),["all","diffusers"].includes(i)&&!p&&d.length>0&&a.jsx(Hc,{title:"Diffusers",modelList:d,selected:{selectedModelId:t,setSelectedModelId:n}},"diffusers"),m&&a.jsx(Wc,{loadingMessage:"Loading Checkpoints..."}),["all","checkpoint"].includes(i)&&!m&&h.length>0&&a.jsx(Hc,{title:"Checkpoints",modelList:h,selected:{selectedModelId:t,setSelectedModelId:n}},"checkpoints"),b&&a.jsx(Wc,{loadingMessage:"Loading LoRAs..."}),["all","lora"].includes(i)&&!b&&g.length>0&&a.jsx(Hc,{title:"LoRAs",modelList:g,selected:{selectedModelId:t,setSelectedModelId:n}},"loras"),S&&a.jsx(Wc,{loadingMessage:"Loading Olives..."}),["all","olive"].includes(i)&&!S&&w.length>0&&a.jsx(Hc,{title:"Olives",modelList:w,selected:{selectedModelId:t,setSelectedModelId:n}},"olive"),x&&a.jsx(Wc,{loadingMessage:"Loading ONNX..."}),["all","onnx"].includes(i)&&!x&&y.length>0&&a.jsx(Hc,{title:"ONNX",modelList:y,selected:{selectedModelId:t,setSelectedModelId:n}},"onnx")]})]})})},_he=l.memo(jhe),jd=(e,t,n,r)=>{const o=[];return to(e==null?void 0:e.entities,s=>{if(!s)return;const i=s.model_name.toLowerCase().includes(r.toLowerCase()),c=n===void 0||s.model_format===n,d=s.model_type===t;i&&c&&d&&o.push(s)}),o},rC=l.memo(e=>a.jsx(N,{flexDirection:"column",gap:4,borderRadius:4,p:4,sx:{bg:"base.200",_dark:{bg:"base.800"}},children:e.children}));rC.displayName="StyledModelContainer";const Hc=l.memo(e=>{const{title:t,modelList:n,selected:r}=e;return a.jsx(rC,{children:a.jsxs(N,{sx:{gap:2,flexDir:"column"},children:[a.jsx(je,{variant:"subtext",fontSize:"sm",children:t}),n.map(o=>a.jsx(khe,{model:o,isSelected:r.selectedModelId===o.id,setSelectedModelId:r.setSelectedModelId},o.id))]})})});Hc.displayName="ModelListWrapper";const Wc=l.memo(({loadingMessage:e})=>a.jsx(rC,{children:a.jsxs(N,{justifyContent:"center",alignItems:"center",flexDirection:"column",p:4,gap:8,children:[a.jsx(Ci,{}),a.jsx(je,{variant:"subtext",children:e||"Fetching..."})]})}));Wc.displayName="FetchingModelsLoader";function Ihe(){const[e,t]=l.useState(),{mainModel:n}=aa(Al,{selectFromResult:({data:s})=>({mainModel:e?s==null?void 0:s.entities[e]:void 0})}),{loraModel:r}=_f(void 0,{selectFromResult:({data:s})=>({loraModel:e?s==null?void 0:s.entities[e]:void 0})}),o=n||r;return a.jsxs(N,{sx:{gap:8,w:"full",h:"full"},children:[a.jsx(_he,{selectedModelId:e,setSelectedModelId:t}),a.jsx(Phe,{model:o})]})}const Phe=e=>{const{model:t}=e;return(t==null?void 0:t.model_format)==="checkpoint"?a.jsx(Che,{model:t},t.id):(t==null?void 0:t.model_format)==="diffusers"?a.jsx(whe,{model:t},t.id):(t==null?void 0:t.model_type)==="lora"?a.jsx(She,{model:t},t.id):a.jsx(N,{sx:{w:"full",h:"full",justifyContent:"center",alignItems:"center",maxH:96,userSelect:"none"},children:a.jsx(je,{variant:"subtext",children:"No Model Selected"})})};function Ehe(){const{t:e}=J();return a.jsxs(N,{sx:{w:"full",p:4,borderRadius:4,gap:4,justifyContent:"space-between",alignItems:"center",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsxs(N,{sx:{flexDirection:"column",gap:2},children:[a.jsx(je,{sx:{fontWeight:600},children:e("modelManager.syncModels")}),a.jsx(je,{fontSize:"sm",sx:{_dark:{color:"base.400"}},children:e("modelManager.syncModelsDesc")})]}),a.jsx(Ku,{})]})}function Mhe(){return a.jsx(N,{children:a.jsx(Ehe,{})})}const nI=[{id:"modelManager",label:an.t("modelManager.modelManager"),content:a.jsx(Ihe,{})},{id:"importModels",label:an.t("modelManager.importModels"),content:a.jsx(vhe,{})},{id:"mergeModels",label:an.t("modelManager.mergeModels"),content:a.jsx(xhe,{})},{id:"settings",label:an.t("modelManager.settings"),content:a.jsx(Mhe,{})}],Ohe=()=>a.jsxs(tc,{isLazy:!0,variant:"line",layerStyle:"first",sx:{w:"full",h:"full",p:4,gap:4,borderRadius:"base"},children:[a.jsx(nc,{children:nI.map(e=>a.jsx(wo,{sx:{borderTopRadius:"base"},children:e.label},e.id))}),a.jsx($u,{sx:{w:"full",h:"full"},children:nI.map(e=>a.jsx(Go,{sx:{w:"full",h:"full"},children:e.content},e.id))})]}),Ahe=l.memo(Ohe),Rhe=me([e=>e.nodes],e=>e.nodeTemplates),Dhe=()=>{const e=H(Rhe),t=Jx();return l.useCallback(n=>{var d;let r=window.innerWidth/2,o=window.innerHeight/2;const s=(d=document.querySelector("#workflow-editor"))==null?void 0:d.getBoundingClientRect();s&&(r=s.width/2-sb/2,o=s.height/2-sb/2);const i=t.project({x:r,y:o}),c=e[n];return mN(n,i,c)},[e,t])},KA=l.forwardRef(({label:e,description:t,...n},r)=>a.jsx("div",{ref:r,...n,children:a.jsxs("div",{children:[a.jsx(je,{fontWeight:600,children:e}),a.jsx(je,{size:"xs",sx:{color:"base.600",_dark:{color:"base.500"}},children:t})]})}));KA.displayName="AddNodePopoverSelectItem";const The=(e,t)=>{const n=new RegExp(e.trim().replace(/[-[\]{}()*+!<=:?./\\^$|#,]/g,"").split(" ").join(".*"),"gi");return n.test(t.label)||n.test(t.description)||t.tags.some(r=>n.test(r))},Nhe=()=>{const e=le(),t=Dhe(),n=Zl(),{t:r}=J(),o=H(w=>w.nodes.currentConnectionFieldType),s=H(w=>{var S;return(S=w.nodes.connectionStartParams)==null?void 0:S.handleType}),i=me([we],({nodes:w})=>{const S=o?j$(w.nodeTemplates,I=>{const _=s=="source"?I.inputs:I.outputs;return ta(_,M=>{const E=s=="source"?o:M.type,A=s=="target"?o:M.type;return Zx(E,A)})}):To(w.nodeTemplates),j=To(S,I=>({label:I.title,value:I.type,description:I.description,tags:I.tags}));return o===null&&(j.push({label:r("nodes.currentImage"),value:"current_image",description:r("nodes.currentImageDescription"),tags:["progress"]}),j.push({label:r("nodes.notes"),value:"notes",description:r("nodes.notesDescription"),tags:["notes"]})),j.sort((I,_)=>I.label.localeCompare(_.label)),{data:j,t:r}},Ie),{data:c}=H(i),d=H(w=>w.nodes.isAddNodePopoverOpen),p=l.useRef(null),h=l.useCallback(w=>{const S=t(w);if(!S){const j=r("nodes.unknownNode",{nodeType:w});n({status:"error",title:j});return}e(gN(S))},[e,t,n,r]),m=l.useCallback(w=>{w&&h(w)},[h]),g=l.useCallback(()=>{e(vN())},[e]),b=l.useCallback(()=>{e(CP())},[e]),y=l.useCallback(w=>{w.preventDefault(),b(),setTimeout(()=>{var S;(S=p.current)==null||S.focus()},0)},[b]),x=l.useCallback(()=>{g()},[g]);return _t(["shift+a","space"],y),_t(["escape"],x),a.jsxs(Uf,{initialFocusRef:p,isOpen:d,onClose:g,placement:"bottom",openDelay:0,closeDelay:0,closeOnBlur:!0,returnFocusOnClose:!0,children:[a.jsx(C3,{children:a.jsx(N,{sx:{position:"absolute",top:"15%",insetInlineStart:"50%",pointerEvents:"none"}})}),a.jsx(Gf,{sx:{p:0,top:-1,shadow:"dark-lg",borderColor:"accent.300",borderWidth:"2px",borderStyle:"solid",_dark:{borderColor:"accent.400"}},children:a.jsx(Hg,{sx:{p:0},children:a.jsx(sr,{inputRef:p,selectOnBlur:!1,placeholder:r("nodes.nodeSearch"),value:null,data:c,maxDropdownHeight:400,nothingFound:r("nodes.noMatchingNodes"),itemComponent:KA,filter:The,onChange:m,hoverOnSearchChange:!0,onDropdownClose:g,sx:{width:"32rem",input:{padding:"0.5rem"}}})})})]})},$he=l.memo(Nhe),Lhe=()=>{const e=Jx(),t=H(r=>r.nodes.shouldValidateGraph);return l.useCallback(({source:r,sourceHandle:o,target:s,targetHandle:i})=>{var b,y;const c=e.getEdges(),d=e.getNodes();if(!(r&&o&&s&&i))return!1;const p=e.getNode(r),h=e.getNode(s);if(!(p&&h&&p.data&&h.data))return!1;const m=(b=p.data.outputs[o])==null?void 0:b.type,g=(y=h.data.inputs[i])==null?void 0:y.type;return!m||!g||r===s?!1:t?c.find(x=>{x.target===s&&x.targetHandle===i&&x.source===r&&x.sourceHandle})||c.find(x=>x.target===s&&x.targetHandle===i)&&g!=="CollectionItem"||!Zx(m,g)?!1:wP(r,s,d,c):!0},[e,t])},yf=e=>`var(--invokeai-colors-${e.split(".").join("-")})`,zhe=me(we,({nodes:e})=>{const{shouldAnimateEdges:t,currentConnectionFieldType:n,shouldColorEdges:r}=e,o=yf(n&&r?If[n].color:"base.500");let s="react-flow__custom_connection-path";return t&&(s=s.concat(" animated")),{stroke:o,className:s}}),Fhe=({fromX:e,fromY:t,fromPosition:n,toX:r,toY:o,toPosition:s})=>{const{stroke:i,className:c}=H(zhe),d={sourceX:e,sourceY:t,sourcePosition:n,targetX:r,targetY:o,targetPosition:s},[p]=ey(d);return a.jsx("g",{children:a.jsx("path",{fill:"none",stroke:i,strokeWidth:2,className:c,d:p,style:{opacity:.8}})})},Bhe=l.memo(Fhe),QA=(e,t,n,r,o)=>me(we,({nodes:s})=>{var g,b;const i=s.nodes.find(y=>y.id===e),c=s.nodes.find(y=>y.id===n),d=Rr(i)&&Rr(c),p=(i==null?void 0:i.selected)||(c==null?void 0:c.selected)||o,h=d?(b=(g=i==null?void 0:i.data)==null?void 0:g.outputs[t||""])==null?void 0:b.type:void 0,m=h&&s.shouldColorEdges?yf(If[h].color):yf("base.500");return{isSelected:p,shouldAnimate:s.shouldAnimateEdges&&p,stroke:m}},Ie),Hhe=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,data:c,selected:d,source:p,target:h,sourceHandleId:m,targetHandleId:g})=>{const b=l.useMemo(()=>QA(p,m,h,g,d),[d,p,m,h,g]),{isSelected:y,shouldAnimate:x}=H(b),[w,S,j]=ey({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s}),{base500:I}=Jf();return a.jsxs(a.Fragment,{children:[a.jsx(SP,{path:w,markerEnd:i,style:{strokeWidth:y?3:2,stroke:I,opacity:y?.8:.5,animation:x?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:x?5:"none"}}),(c==null?void 0:c.count)&&c.count>1&&a.jsx(bN,{children:a.jsx(N,{sx:{position:"absolute",transform:`translate(-50%, -50%) translate(${S}px,${j}px)`},className:"nodrag nopan",children:a.jsx(Va,{variant:"solid",sx:{bg:"base.500",opacity:y?.8:.5,boxShadow:"base"},children:c.count})})})]})},Whe=l.memo(Hhe),Vhe=({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o,targetPosition:s,markerEnd:i,selected:c,source:d,target:p,sourceHandleId:h,targetHandleId:m})=>{const g=l.useMemo(()=>QA(d,h,p,m,c),[d,h,p,m,c]),{isSelected:b,shouldAnimate:y,stroke:x}=H(g),[w]=ey({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return a.jsx(SP,{path:w,markerEnd:i,style:{strokeWidth:b?3:2,stroke:x,opacity:b?.8:.5,animation:y?"dashdraw 0.5s linear infinite":void 0,strokeDasharray:y?5:"none"}})},Uhe=l.memo(Vhe),Ghe=e=>{const{nodeId:t,width:n,children:r,selected:o}=e,{isMouseOverNode:s,handleMouseOut:i,handleMouseOver:c}=oA(t),d=l.useMemo(()=>me(we,({nodes:j})=>{var I;return((I=j.nodeExecutionStates[t])==null?void 0:I.status)===oi.IN_PROGRESS}),[t]),p=H(d),[h,m,g,b]=ea("shadows",["nodeInProgress.light","nodeInProgress.dark","shadows.xl","shadows.base"]),y=le(),x=di(h,m),w=H(j=>j.nodes.nodeOpacity),S=l.useCallback(j=>{!j.ctrlKey&&!j.altKey&&!j.metaKey&&!j.shiftKey&&y(xN(t)),y(kP())},[y,t]);return a.jsxs(Le,{onClick:S,onMouseEnter:c,onMouseLeave:i,className:Du,sx:{h:"full",position:"relative",borderRadius:"base",w:n??sb,transitionProperty:"common",transitionDuration:"0.1s",cursor:"grab",opacity:w},children:[a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"base",pointerEvents:"none",shadow:`${g}, ${b}, ${b}`,zIndex:-1}}),a.jsx(Le,{sx:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,borderRadius:"md",pointerEvents:"none",transitionProperty:"common",transitionDuration:"0.1s",opacity:.7,shadow:p?x:void 0,zIndex:-1}}),r,a.jsx(rA,{isSelected:o,isHovered:s})]})},L0=l.memo(Ghe),qhe=me(we,({system:e,gallery:t})=>{var r;return{imageDTO:t.selection[t.selection.length-1],progressImage:(r=e.denoiseProgress)==null?void 0:r.progress_image}}),Khe=e=>{const{progressImage:t,imageDTO:n}=yN(qhe);return t?a.jsx(H1,{nodeProps:e,children:a.jsx(_i,{src:t.dataURL,sx:{w:"full",h:"full",objectFit:"contain",borderRadius:"base"}})}):n?a.jsx(H1,{nodeProps:e,children:a.jsx(ll,{imageDTO:n,isDragDisabled:!0,useThumbailFallback:!0})}):a.jsx(H1,{nodeProps:e,children:a.jsx(eo,{})})},Qhe=l.memo(Khe),H1=e=>{const[t,n]=l.useState(!1),r=l.useCallback(()=>{n(!0)},[]),o=l.useCallback(()=>{n(!1)},[]);return a.jsx(L0,{nodeId:e.nodeProps.id,selected:e.nodeProps.selected,width:384,children:a.jsxs(N,{onMouseEnter:r,onMouseLeave:o,className:Du,sx:{position:"relative",flexDirection:"column"},children:[a.jsx(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",alignItems:"center",justifyContent:"center",h:8},children:a.jsx(je,{sx:{fontSize:"sm",fontWeight:600,color:"base.700",_dark:{color:"base.200"}},children:"Current Image"})}),a.jsxs(N,{layerStyle:"nodeBody",sx:{w:"full",h:"full",borderBottomRadius:"base",p:2},children:[e.children,t&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},style:{position:"absolute",top:40,left:-2,right:-2,bottom:0,pointerEvents:"none"},children:a.jsx(FA,{})},"nextPrevButtons")]})]})})},oC=e=>{const t=e.filter(o=>!o.ui_hidden),n=t.filter(o=>!si(o.ui_order)).sort((o,s)=>(o.ui_order??0)-(s.ui_order??0)),r=t.filter(o=>si(o.ui_order));return n.concat(r).map(o=>o.name).filter(o=>o!=="is_intermediate")},Xhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=To(s.inputs).filter(c=>(["any","direct"].includes(c.input)||ty.includes(c.type))&&jP.includes(c.type));return oC(i)},Ie),[e]);return H(t)},Yhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(c=>c.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];if(!s)return[];const i=To(s.inputs).filter(c=>c.input==="connection"&&!ty.includes(c.type)||!jP.includes(c.type));return oC(i)},Ie),[e]);return H(t)},Jhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return[];const s=r.nodeTemplates[o.data.type];return s?oC(To(s.outputs)):[]},Ie),[e]);return H(t)},sC=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?ta(o.data.outputs,s=>CN.includes(s.type)&&o.data.type!=="image"):!1},Ie),[e]);return H(t)},Zhe=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.embedWorkflow:!1},Ie),[e]);return H(t)},eme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);if(!Rr(o))return!1;const s=r.nodeTemplates[(o==null?void 0:o.data.type)??""];return s?s.withWorkflow:!1},Ie),[e]);return H(t)},tme=({nodeId:e})=>{const t=le(),n=eme(e),r=Zhe(e),o=l.useCallback(s=>{t(wN({nodeId:e,embedWorkflow:s.target.checked}))},[t,e]);return n?a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Workflow"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:o,isChecked:r})]}):null},nme=l.memo(tme),rme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.isIntermediate:!1},Ie),[e]);return H(t)},ome=({nodeId:e})=>{const t=le(),n=sC(e),r=rme(e),o=l.useCallback(s=>{t(SN({nodeId:e,isIntermediate:!s.target.checked}))},[t,e]);return n?a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Save to Gallery"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:o,isChecked:!r})]}):null},sme=l.memo(ome),ame=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(s=>s.id===e);return Rr(o)?o.data.useCache:!1},Ie),[e]);return H(t)},ime=({nodeId:e})=>{const t=le(),n=ame(e),r=l.useCallback(o=>{t(kN({nodeId:e,useCache:o.target.checked}))},[t,e]);return a.jsxs(Vn,{as:N,sx:{alignItems:"center",gap:2,w:"auto"},children:[a.jsx(yr,{sx:{fontSize:"xs",mb:"1px"},children:"Use Cache"}),a.jsx(Tf,{className:"nopan",size:"sm",onChange:r,isChecked:n})]})},lme=l.memo(ime),cme=({nodeId:e})=>{const t=sC(e),n=Pn("invocationCache").isFeatureEnabled;return a.jsxs(N,{className:Du,layerStyle:"nodeFooter",sx:{w:"full",borderBottomRadius:"base",px:2,py:0,h:6,justifyContent:"space-between"},children:[n&&a.jsx(lme,{nodeId:e}),t&&a.jsx(nme,{nodeId:e}),t&&a.jsx(sme,{nodeId:e})]})},ume=l.memo(cme),dme=({nodeId:e,isOpen:t})=>{const n=le(),r=jN(),o=l.useCallback(()=>{n(_N({nodeId:e,isOpen:!t})),r(e)},[n,t,e,r]);return a.jsx(rt,{className:"nodrag",onClick:o,"aria-label":"Minimize",sx:{minW:8,w:8,h:8,color:"base.500",_dark:{color:"base.500"},_hover:{color:"base.700",_dark:{color:"base.300"}}},variant:"link",icon:a.jsx(b0,{sx:{transform:t?"rotate(0deg)":"rotate(180deg)",transitionProperty:"common",transitionDuration:"normal"}})})},aC=l.memo(dme),fme=({nodeId:e,title:t})=>{const n=le(),r=eA(e),o=tA(e),{t:s}=J(),[i,c]=l.useState(""),d=l.useCallback(async h=>{n(sP({nodeId:e,label:h})),c(r||t||o||s("nodes.problemSettingTitle"))},[n,e,t,o,r,s]),p=l.useCallback(h=>{c(h)},[]);return l.useEffect(()=>{c(r||t||o||s("nodes.problemSettingTitle"))},[r,o,t,s]),a.jsx(N,{sx:{overflow:"hidden",w:"full",h:"full",alignItems:"center",justifyContent:"center",cursor:"text"},children:a.jsxs(Lf,{as:N,value:i,onChange:p,onSubmit:d,sx:{alignItems:"center",position:"relative",w:"full",h:"full"},children:[a.jsx($f,{fontSize:"sm",sx:{p:0,w:"full"},noOfLines:1}),a.jsx(Nf,{className:"nodrag",fontSize:"sm",sx:{p:0,fontWeight:700,_focusVisible:{p:0,boxShadow:"none"}}}),a.jsx(pme,{})]})})},XA=l.memo(fme);function pme(){const{isEditing:e,getEditButtonProps:t}=t5(),n=l.useCallback(r=>{const{onClick:o}=t();o&&o(r)},[t]);return e?null:a.jsx(Le,{className:Du,onDoubleClick:n,sx:{position:"absolute",w:"full",h:"full",top:0,cursor:"grab"}})}const hme=({nodeId:e})=>{const t=K2(e),{base400:n,base600:r}=Jf(),o=di(n,r),s=l.useMemo(()=>({borderWidth:0,borderRadius:"3px",width:"1rem",height:"1rem",backgroundColor:o,zIndex:-1}),[o]);return Kh(t)?a.jsxs(a.Fragment,{children:[a.jsx(Ed,{type:"target",id:`${t.id}-collapsed-target`,isConnectable:!1,position:Uc.Left,style:{...s,left:"-0.5rem"}}),To(t.inputs,i=>a.jsx(Ed,{type:"target",id:i.name,isConnectable:!1,position:Uc.Left,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-input-handle`)),a.jsx(Ed,{type:"source",id:`${t.id}-collapsed-source`,isConnectable:!1,position:Uc.Right,style:{...s,right:"-0.5rem"}}),To(t.outputs,i=>a.jsx(Ed,{type:"source",id:i.name,isConnectable:!1,position:Uc.Right,style:{visibility:"hidden"}},`${t.id}-${i.name}-collapsed-output-handle`))]}):null},mme=l.memo(hme),gme=e=>{const t=l.useMemo(()=>me(we,({nodes:r})=>{const o=r.nodes.find(i=>i.id===e);return r.nodeTemplates[(o==null?void 0:o.data.type)??""]},Ie),[e]);return H(t)},vme=({nodeId:e})=>{const{needsUpdate:t}=aP(e);return a.jsx(Wn,{label:a.jsx(YA,{nodeId:e}),placement:"top",shouldWrapChildren:!0,children:a.jsx(Gr,{as:XM,sx:{boxSize:4,w:8,color:t?"error.400":"base.400"}})})},bme=l.memo(vme),YA=l.memo(({nodeId:e})=>{const t=K2(e),n=gme(e),{t:r}=J(),o=l.useMemo(()=>t!=null&&t.label&&(n!=null&&n.title)?`${t.label} (${n.title})`:t!=null&&t.label&&!n?t.label:!(t!=null&&t.label)&&n?n.title:r("nodes.unknownNode"),[t,n,r]),s=l.useMemo(()=>!Kh(t)||!n?null:t.version?n.version?xS(t.version,n.version,"<")?a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateNode"),")"]}):xS(t.version,n.version,">")?a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.updateApp"),")"]}):a.jsxs(je,{as:"span",children:[r("nodes.version")," ",t.version]}):a.jsxs(je,{as:"span",sx:{color:"error.500"},children:[r("nodes.version")," ",t.version," (",r("nodes.unknownTemplate"),")"]}):a.jsx(je,{as:"span",sx:{color:"error.500"},children:r("nodes.versionUnknown")}),[t,n,r]);return Kh(t)?a.jsxs(N,{sx:{flexDir:"column"},children:[a.jsx(je,{as:"span",sx:{fontWeight:600},children:o}),a.jsx(je,{sx:{opacity:.7,fontStyle:"oblique 5deg"},children:n==null?void 0:n.description}),s,(t==null?void 0:t.notes)&&a.jsx(je,{children:t.notes})]}):a.jsx(je,{sx:{fontWeight:600},children:r("nodes.unknownNode")})});YA.displayName="TooltipContent";const W1=3,rI={circle:{transitionProperty:"none",transitionDuration:"0s"},".chakra-progress__track":{stroke:"transparent"}},xme=({nodeId:e})=>{const t=l.useMemo(()=>me(we,({nodes:r})=>r.nodeExecutionStates[e]),[e]),n=H(t);return n?a.jsx(Wn,{label:a.jsx(JA,{nodeExecutionState:n}),placement:"top",children:a.jsx(N,{className:Du,sx:{w:5,h:"full",alignItems:"center",justifyContent:"flex-end"},children:a.jsx(ZA,{nodeExecutionState:n})})}):null},yme=l.memo(xme),JA=l.memo(({nodeExecutionState:e})=>{const{status:t,progress:n,progressImage:r}=e,{t:o}=J();return t===oi.PENDING?a.jsx(je,{children:"Pending"}):t===oi.IN_PROGRESS?r?a.jsxs(N,{sx:{pos:"relative",pt:1.5,pb:.5},children:[a.jsx(_i,{src:r.dataURL,sx:{w:32,h:32,borderRadius:"base",objectFit:"contain"}}),n!==null&&a.jsxs(Va,{variant:"solid",sx:{pos:"absolute",top:2.5,insetInlineEnd:1},children:[Math.round(n*100),"%"]})]}):n!==null?a.jsxs(je,{children:[o("nodes.executionStateInProgress")," (",Math.round(n*100),"%)"]}):a.jsx(je,{children:o("nodes.executionStateInProgress")}):t===oi.COMPLETED?a.jsx(je,{children:o("nodes.executionStateCompleted")}):t===oi.FAILED?a.jsx(je,{children:o("nodes.executionStateError")}):null});JA.displayName="TooltipLabel";const ZA=l.memo(e=>{const{progress:t,status:n}=e.nodeExecutionState;return n===oi.PENDING?a.jsx(Gr,{as:Mee,sx:{boxSize:W1,color:"base.600",_dark:{color:"base.300"}}}):n===oi.IN_PROGRESS?t===null?a.jsx(Pb,{isIndeterminate:!0,size:"14px",color:"base.500",thickness:14,sx:rI}):a.jsx(Pb,{value:Math.round(t*100),size:"14px",color:"base.500",thickness:14,sx:rI}):n===oi.COMPLETED?a.jsx(Gr,{as:UM,sx:{boxSize:W1,color:"ok.600",_dark:{color:"ok.300"}}}):n===oi.FAILED?a.jsx(Gr,{as:Ree,sx:{boxSize:W1,color:"error.600",_dark:{color:"error.300"}}}):null});ZA.displayName="StatusIcon";const Cme=({nodeId:e,isOpen:t})=>a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",justifyContent:"space-between",h:8,textAlign:"center",fontWeight:500,color:"base.700",_dark:{color:"base.200"}},children:[a.jsx(aC,{nodeId:e,isOpen:t}),a.jsx(XA,{nodeId:e}),a.jsxs(N,{alignItems:"center",children:[a.jsx(yme,{nodeId:e}),a.jsx(bme,{nodeId:e})]}),!t&&a.jsx(mme,{nodeId:e})]}),wme=l.memo(Cme),Sme=(e,t,n,r)=>me(we,o=>{if(!r)return an.t("nodes.noFieldType");const{currentConnectionFieldType:s,connectionStartParams:i,nodes:c,edges:d}=o.nodes;if(!i||!s)return an.t("nodes.noConnectionInProgress");const{handleType:p,nodeId:h,handleId:m}=i;if(!p||!h||!m)return an.t("nodes.noConnectionData");const g=n==="target"?r:s,b=n==="source"?r:s;if(e===h)return an.t("nodes.cannotConnectToSelf");if(n===p)return n==="source"?an.t("nodes.cannotConnectOutputToOutput"):an.t("nodes.cannotConnectInputToInput");const y=n==="target"?e:h,x=n==="target"?t:m,w=n==="source"?e:h,S=n==="source"?t:m;return d.find(I=>{I.target===y&&I.targetHandle===x&&I.source===w&&I.sourceHandle})?an.t("nodes.cannotDuplicateConnection"):d.find(I=>I.target===y&&I.targetHandle===x)&&g!=="CollectionItem"?an.t("nodes.inputMayOnlyHaveOneConnection"):Zx(b,g)?wP(p==="source"?h:e,p==="source"?e:h,c,d)?null:an.t("nodes.connectionWouldCreateCycle"):an.t("nodes.fieldTypesMustMatch")}),kme=(e,t,n)=>{const r=l.useMemo(()=>me(we,({nodes:s})=>{var c;const i=s.nodes.find(d=>d.id===e);if(Rr(i))return(c=i==null?void 0:i.data[Xx[n]][t])==null?void 0:c.type},Ie),[t,n,e]);return H(r)},jme=me(we,({nodes:e})=>e.currentConnectionFieldType!==null&&e.connectionStartParams!==null),eR=({nodeId:e,fieldName:t,kind:n})=>{const r=kme(e,t,n),o=l.useMemo(()=>me(we,({nodes:g})=>!!g.edges.filter(b=>(n==="input"?b.target:b.source)===e&&(n==="input"?b.targetHandle:b.sourceHandle)===t).length),[t,n,e]),s=l.useMemo(()=>Sme(e,t,n==="input"?"target":"source",r),[e,t,n,r]),i=l.useMemo(()=>me(we,({nodes:g})=>{var b,y,x;return((b=g.connectionStartParams)==null?void 0:b.nodeId)===e&&((y=g.connectionStartParams)==null?void 0:y.handleId)===t&&((x=g.connectionStartParams)==null?void 0:x.handleType)==={input:"target",output:"source"}[n]}),[t,n,e]),c=H(o),d=H(jme),p=H(i),h=H(s),m=l.useMemo(()=>!!(d&&h&&!p),[h,d,p]);return{isConnected:c,isConnectionInProgress:d,isConnectionStartField:p,connectionError:h,shouldDim:m}},_me=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{var i;const s=o.nodes.find(c=>c.id===e);if(Rr(s))return((i=s==null?void 0:s.data.inputs[t])==null?void 0:i.value)!==void 0},Ie),[t,e]);return H(n)},Ime=(e,t)=>{const n=l.useMemo(()=>me(we,({nodes:o})=>{const s=o.nodes.find(d=>d.id===e);if(!Rr(s))return;const i=o.nodeTemplates[(s==null?void 0:s.data.type)??""],c=i==null?void 0:i.inputs[t];return c==null?void 0:c.input},Ie),[t,e]);return H(n)},Pme=({nodeId:e,fieldName:t,kind:n,children:r})=>{const o=le(),s=sA(e,t),i=aA(e,t,n),c=Ime(e,t),{t:d}=J(),p=l.useCallback(S=>{S.preventDefault()},[]),h=l.useMemo(()=>me(we,({nodes:S})=>({isExposed:!!S.workflow.exposedFields.find(I=>I.nodeId===e&&I.fieldName===t)}),Ie),[t,e]),m=l.useMemo(()=>["any","direct"].includes(c??"__UNKNOWN_INPUT__"),[c]),{isExposed:g}=H(h),b=l.useCallback(()=>{o(IN({nodeId:e,fieldName:t}))},[o,t,e]),y=l.useCallback(()=>{o(cP({nodeId:e,fieldName:t}))},[o,t,e]),x=l.useMemo(()=>{const S=[];return m&&!g&&S.push(a.jsx(Kn,{icon:a.jsx(Zi,{}),onClick:b,children:"Add to Linear View"},`${e}.${t}.expose-field`)),m&&g&&S.push(a.jsx(Kn,{icon:a.jsx(Vee,{}),onClick:y,children:"Remove from Linear View"},`${e}.${t}.unexpose-field`)),S},[t,b,y,g,m,e]),w=l.useCallback(()=>x.length?a.jsx(ql,{sx:{visibility:"visible !important"},motionProps:fu,onContextMenu:p,children:a.jsx(af,{title:s||i||d("nodes.unknownField"),children:x})}):null,[i,s,x,p,d]);return a.jsx(S2,{menuProps:{size:"sm",isLazy:!0},menuButtonProps:{bg:"transparent",_hover:{bg:"transparent"}},renderMenu:w,children:r})},Eme=l.memo(Pme),Mme=e=>{const{fieldTemplate:t,handleType:n,isConnectionInProgress:r,isConnectionStartField:o,connectionError:s}=e,{name:i,type:c}=t,{color:d,title:p}=If[c],h=l.useMemo(()=>{const g=PN.includes(c),b=ty.includes(c),y=EN.includes(c),x=yf(d),w={backgroundColor:g||b?"var(--invokeai-colors-base-900)":x,position:"absolute",width:"1rem",height:"1rem",borderWidth:g||b?4:0,borderStyle:"solid",borderColor:x,borderRadius:y?4:"100%",zIndex:1};return n==="target"?w.insetInlineStart="-1rem":w.insetInlineEnd="-1rem",r&&!o&&s&&(w.filter="opacity(0.4) grayscale(0.7)"),r&&s?o?w.cursor="grab":w.cursor="not-allowed":w.cursor="crosshair",w},[s,n,r,o,c,d]),m=l.useMemo(()=>r&&o?p:r&&s?s??p:p,[s,r,o,p]);return a.jsx(Wn,{label:m,placement:n==="target"?"start":"end",hasArrow:!0,openDelay:xg,children:a.jsx(Ed,{type:n,id:i,position:n==="target"?Uc.Left:Uc.Right,style:h})})},tR=l.memo(Mme),Ome=({nodeId:e,fieldName:t})=>{const n=M0(e,t,"input"),r=_me(e,t),{isConnected:o,isConnectionInProgress:s,isConnectionStartField:i,connectionError:c,shouldDim:d}=eR({nodeId:e,fieldName:t,kind:"input"}),p=l.useMemo(()=>{if((n==null?void 0:n.fieldKind)!=="input"||!n.required)return!1;if(!o&&n.input==="connection"||!r&&!o&&n.input==="any")return!0},[n,o,r]);return(n==null?void 0:n.fieldKind)!=="input"?a.jsx(wx,{shouldDim:d,children:a.jsxs(Vn,{sx:{color:"error.400",textAlign:"left",fontSize:"sm"},children:["Unknown input: ",t]})}):a.jsxs(wx,{shouldDim:d,children:[a.jsxs(Vn,{isInvalid:p,isDisabled:o,sx:{alignItems:"stretch",justifyContent:"space-between",ps:n.input==="direct"?0:2,gap:2,h:"full",w:"full"},children:[a.jsx(Eme,{nodeId:e,fieldName:t,kind:"input",children:h=>a.jsx(yr,{sx:{display:"flex",alignItems:"center",h:"full",mb:0,px:1,gap:2},children:a.jsx(lA,{ref:h,nodeId:e,fieldName:t,kind:"input",isMissingInput:p,withTooltip:!0})})}),a.jsx(Le,{children:a.jsx(xA,{nodeId:e,fieldName:t})})]}),n.input!=="direct"&&a.jsx(tR,{fieldTemplate:n,handleType:"target",isConnectionInProgress:s,isConnectionStartField:i,connectionError:c})]})},oI=l.memo(Ome),wx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",w:"full",h:"full"},children:t}));wx.displayName="InputFieldWrapper";const Ame=({nodeId:e,fieldName:t})=>{const n=M0(e,t,"output"),{isConnected:r,isConnectionInProgress:o,isConnectionStartField:s,connectionError:i,shouldDim:c}=eR({nodeId:e,fieldName:t,kind:"output"});return(n==null?void 0:n.fieldKind)!=="output"?a.jsx(Sx,{shouldDim:c,children:a.jsxs(Vn,{sx:{color:"error.400",textAlign:"right",fontSize:"sm"},children:["Unknown output: ",t]})}):a.jsxs(Sx,{shouldDim:c,children:[a.jsx(Wn,{label:a.jsx(Q2,{nodeId:e,fieldName:t,kind:"output"}),openDelay:xg,placement:"top",shouldWrapChildren:!0,hasArrow:!0,children:a.jsx(Vn,{isDisabled:r,pe:2,children:a.jsx(yr,{sx:{mb:0,fontWeight:500},children:n==null?void 0:n.title})})}),a.jsx(tR,{fieldTemplate:n,handleType:"source",isConnectionInProgress:o,isConnectionStartField:s,connectionError:i})]})},Rme=l.memo(Ame),Sx=l.memo(({shouldDim:e,children:t})=>a.jsx(N,{sx:{position:"relative",minH:8,py:.5,alignItems:"center",opacity:e?.5:1,transitionProperty:"opacity",transitionDuration:"0.1s",justifyContent:"flex-end"},children:t}));Sx.displayName="OutputFieldWrapper";const Dme=e=>{const t=sC(e),n=Pn("invocationCache").isFeatureEnabled;return l.useMemo(()=>t||n,[t,n])},Tme=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>{const s=Yhe(e),i=Xhe(e),c=Dme(e),d=Jhe(e);return a.jsxs(L0,{nodeId:e,selected:o,children:[a.jsx(wme,{nodeId:e,isOpen:t,label:n,selected:o,type:r}),t&&a.jsxs(a.Fragment,{children:[a.jsx(N,{layerStyle:"nodeBody",sx:{flexDirection:"column",w:"full",h:"full",py:2,gap:1,borderBottomRadius:c?0:"base"},children:a.jsxs(N,{sx:{flexDir:"column",px:2,w:"full",h:"full"},children:[a.jsxs(rl,{gridTemplateColumns:"1fr auto",gridAutoRows:"1fr",children:[s.map((p,h)=>a.jsx(rf,{gridColumnStart:1,gridRowStart:h+1,children:a.jsx(oI,{nodeId:e,fieldName:p})},`${e}.${p}.input-field`)),d.map((p,h)=>a.jsx(rf,{gridColumnStart:2,gridRowStart:h+1,children:a.jsx(Rme,{nodeId:e,fieldName:p})},`${e}.${p}.output-field`))]}),i.map(p=>a.jsx(oI,{nodeId:e,fieldName:p},`${e}.${p}.input-field`))]})}),c&&a.jsx(ume,{nodeId:e})]})]})},Nme=l.memo(Tme),$me=({nodeId:e,isOpen:t,label:n,type:r,selected:o})=>a.jsxs(L0,{nodeId:e,selected:o,children:[a.jsxs(N,{className:Du,layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:t?0:"base",alignItems:"center",h:8,fontWeight:600,fontSize:"sm"},children:[a.jsx(aC,{nodeId:e,isOpen:t}),a.jsx(je,{sx:{w:"full",textAlign:"center",pe:8,color:"error.500",_dark:{color:"error.300"}},children:n?`${n} (${r})`:r})]}),t&&a.jsx(N,{layerStyle:"nodeBody",sx:{userSelect:"auto",flexDirection:"column",w:"full",h:"full",p:4,gap:1,borderBottomRadius:"base",fontSize:"sm"},children:a.jsxs(Le,{children:[a.jsx(je,{as:"span",children:"Unknown node type: "}),a.jsx(je,{as:"span",fontWeight:600,children:r})]})})]}),Lme=l.memo($me),zme=e=>{const{data:t,selected:n}=e,{id:r,type:o,isOpen:s,label:i}=t,c=l.useMemo(()=>me(we,({nodes:p})=>!!p.nodeTemplates[o]),[o]);return H(c)?a.jsx(Nme,{nodeId:r,isOpen:s,label:i,type:o,selected:n}):a.jsx(Lme,{nodeId:r,isOpen:s,label:i,type:o,selected:n})},Fme=l.memo(zme),Bme=e=>{const{id:t,data:n,selected:r}=e,{notes:o,isOpen:s}=n,i=le(),c=l.useCallback(d=>{i(MN({nodeId:t,value:d.target.value}))},[i,t]);return a.jsxs(L0,{nodeId:t,selected:r,children:[a.jsxs(N,{layerStyle:"nodeHeader",sx:{borderTopRadius:"base",borderBottomRadius:s?0:"base",alignItems:"center",justifyContent:"space-between",h:8},children:[a.jsx(aC,{nodeId:t,isOpen:s}),a.jsx(XA,{nodeId:t,title:"Notes"}),a.jsx(Le,{minW:8})]}),s&&a.jsx(a.Fragment,{children:a.jsx(N,{layerStyle:"nodeBody",className:"nopan",sx:{cursor:"auto",flexDirection:"column",borderBottomRadius:"base",w:"full",h:"full",p:2,gap:1},children:a.jsx(N,{className:"nopan",sx:{flexDir:"column",w:"full",h:"full"},children:a.jsx(yi,{value:o,onChange:c,rows:8,resize:"none",sx:{fontSize:"xs"}})})})})]})},Hme=l.memo(Bme),Wme=["Delete","Backspace"],Vme={collapsed:Whe,default:Uhe},Ume={invocation:Fme,current_image:Qhe,notes:Hme},Gme={hideAttribution:!0},qme=me(we,({nodes:e})=>{const{shouldSnapToGrid:t,selectionMode:n}=e;return{shouldSnapToGrid:t,selectionMode:n}},Ie),Kme=()=>{const e=le(),t=H(O=>O.nodes.nodes),n=H(O=>O.nodes.edges),r=H(O=>O.nodes.viewport),{shouldSnapToGrid:o,selectionMode:s}=H(qme),i=l.useRef(null),c=l.useRef(),d=Lhe(),[p]=ea("radii",["base"]),h=l.useCallback(O=>{e(ON(O))},[e]),m=l.useCallback(O=>{e(AN(O))},[e]),g=l.useCallback((O,T)=>{e(RN(T))},[e]),b=l.useCallback(O=>{e(yS(O))},[e]),y=l.useCallback(()=>{e(DN({cursorPosition:c.current}))},[e]),x=l.useCallback(O=>{e(TN(O))},[e]),w=l.useCallback(O=>{e(NN(O))},[e]),S=l.useCallback(({nodes:O,edges:T})=>{e($N(O?O.map(K=>K.id):[])),e(LN(T?T.map(K=>K.id):[]))},[e]),j=l.useCallback((O,T)=>{e(zN(T))},[e]),I=l.useCallback(()=>{e(kP())},[e]),_=l.useCallback(O=>{CS.set(O),O.fitView()},[]),M=l.useCallback(O=>{var K,G;const T=(K=i.current)==null?void 0:K.getBoundingClientRect();if(T){const Q=(G=CS.get())==null?void 0:G.project({x:O.clientX-T.left,y:O.clientY-T.top});c.current=Q}},[]),E=l.useRef(),A=l.useCallback((O,T,K)=>{E.current=O,e(FN(T.id)),e(BN())},[e]),R=l.useCallback((O,T)=>{e(yS(T))},[e]),D=l.useCallback((O,T,K)=>{var G,Q;!("touches"in O)&&((G=E.current)==null?void 0:G.clientX)===O.clientX&&((Q=E.current)==null?void 0:Q.clientY)===O.clientY&&e(HN(T)),E.current=void 0},[e]);return _t(["Ctrl+c","Meta+c"],O=>{O.preventDefault(),e(WN())}),_t(["Ctrl+a","Meta+a"],O=>{O.preventDefault(),e(VN())}),_t(["Ctrl+v","Meta+v"],O=>{O.preventDefault(),e(UN({cursorPosition:c.current}))}),a.jsx(GN,{id:"workflow-editor",ref:i,defaultViewport:r,nodeTypes:Ume,edgeTypes:Vme,nodes:t,edges:n,onInit:_,onMouseMove:M,onNodesChange:h,onEdgesChange:m,onEdgesDelete:x,onEdgeUpdate:R,onEdgeUpdateStart:A,onEdgeUpdateEnd:D,onNodesDelete:w,onConnectStart:g,onConnect:b,onConnectEnd:y,onMoveEnd:j,connectionLineComponent:Bhe,onSelectionChange:S,isValidConnection:d,minZoom:.1,snapToGrid:o,snapGrid:[25,25],connectionRadius:30,proOptions:Gme,style:{borderRadius:p},onPaneClick:I,deleteKeyCode:Wme,selectionMode:s,children:a.jsx(Z$,{})})},Qme=me(we,e=>{const t=e.nodes.nodes,n=e.nodes.nodeTemplates;return t.some(o=>{const s=n[o.data.type];return qN(o,s)})},Ie),Xme=()=>H(Qme),Yme=()=>{const e=le(),{t}=J(),n=Xme(),r=l.useCallback(()=>{e(CP())},[e]),o=l.useCallback(()=>{e(KN())},[e]);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:2},children:[a.jsx(rt,{tooltip:t("nodes.addNodeToolTip"),"aria-label":t("nodes.addNode"),icon:a.jsx(Zi,{}),onClick:r}),n&&a.jsx(Dt,{leftIcon:a.jsx(s0,{}),onClick:o,children:t("nodes.updateAllNodes")})]})},Jme=l.memo(Yme),Zme=()=>{const e=le(),t=X3("nodes"),{t:n}=J();return l.useCallback(o=>{if(!o)return;const s=new FileReader;s.onload=async()=>{const i=s.result;try{const c=JSON.parse(String(i)),d=QI.safeParse(c);if(!d.success){const{message:p}=QN(d.error,{prefix:n("nodes.workflowValidation")});t.error({error:XN(d.error)},p),e(Ht(rr({title:n("nodes.unableToValidateWorkflow"),status:"error",duration:5e3}))),s.abort();return}e(Vx(d.data)),s.abort()}catch{e(Ht(rr({title:n("nodes.unableToLoadWorkflow"),status:"error"})))}},s.readAsText(o)},[e,t,n])},ege=l.memo(e=>e.error.issues[0]?a.jsx(je,{children:wS(e.error.issues[0],{prefix:null}).toString()}):a.jsx(zf,{children:e.error.issues.map((t,n)=>a.jsx(Ps,{children:a.jsx(je,{children:wS(t,{prefix:null}).toString()})},n))}));ege.displayName="WorkflowValidationErrorContent";const tge=()=>{const{t:e}=J(),t=l.useRef(null),n=Zme();return a.jsx(bM,{resetRef:t,accept:"application/json",onChange:n,children:r=>a.jsx(rt,{icon:a.jsx(i0,{}),tooltip:e("nodes.loadWorkflow"),"aria-label":e("nodes.loadWorkflow"),...r})})},nge=l.memo(tge),rge=()=>{const{t:e}=J(),t=le(),{isOpen:n,onOpen:r,onClose:o}=hs(),s=l.useRef(null),i=H(d=>d.nodes.nodes.length),c=l.useCallback(()=>{t(YN()),t(Ht(rr({title:e("toast.nodesCleared"),status:"success"}))),o()},[t,e,o]);return a.jsxs(a.Fragment,{children:[a.jsx(rt,{icon:a.jsx(Zo,{}),tooltip:e("nodes.resetWorkflow"),"aria-label":e("nodes.resetWorkflow"),onClick:r,isDisabled:!i,colorScheme:"error"}),a.jsxs(Wf,{isOpen:n,onClose:o,leastDestructiveRef:s,isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(Vf,{children:[a.jsx(Oa,{fontSize:"lg",fontWeight:"bold",children:e("nodes.resetWorkflow")}),a.jsx(Ra,{py:4,children:a.jsxs(N,{flexDir:"column",gap:2,children:[a.jsx(je,{children:e("nodes.resetWorkflowDesc")}),a.jsx(je,{variant:"subtext",children:e("nodes.resetWorkflowDesc2")})]})}),a.jsxs(pi,{children:[a.jsx(nl,{ref:s,onClick:o,children:e("common.cancel")}),a.jsx(nl,{colorScheme:"error",ml:3,onClick:c,children:e("common.accept")})]})]})]})]})},oge=l.memo(rge),sge=()=>{const{t:e}=J(),t=nA(),n=l.useCallback(()=>{const r=new Blob([JSON.stringify(t,null,2)]),o=document.createElement("a");o.href=URL.createObjectURL(r),o.download=`${t.name||"My Workflow"}.json`,document.body.appendChild(o),o.click(),o.remove()},[t]);return a.jsx(rt,{icon:a.jsx(Wu,{}),tooltip:e("nodes.downloadWorkflow"),"aria-label":e("nodes.downloadWorkflow"),onClick:n})},age=l.memo(sge),ige=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineStart:"50%",transform:"translate(-50%)"},children:[a.jsx(age,{}),a.jsx(nge,{}),a.jsx(oge,{})]}),lge=l.memo(ige),cge=()=>a.jsx(N,{sx:{gap:2,flexDir:"column"},children:To(If,({title:e,description:t,color:n},r)=>a.jsx(Wn,{label:t,children:a.jsx(Va,{sx:{userSelect:"none",color:parseInt(n.split(".")[1]??"0",10)<500?"base.800":"base.50",bg:n},textAlign:"center",children:e})},r))}),uge=l.memo(cge),dge=()=>{const{t:e}=J(),t=le(),n=l.useCallback(()=>{t(JN())},[t]);return a.jsx(Dt,{leftIcon:a.jsx(ete,{}),tooltip:e("nodes.reloadNodeTemplates"),"aria-label":e("nodes.reloadNodeTemplates"),onClick:n,children:e("nodes.reloadNodeTemplates")})},fge=l.memo(dge),_d={fontWeight:600},pge=me(we,({nodes:e})=>{const{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionMode:s}=e;return{shouldAnimateEdges:t,shouldValidateGraph:n,shouldSnapToGrid:r,shouldColorEdges:o,selectionModeIsChecked:s===ZN.Full}},Ie),hge=De((e,t)=>{const{isOpen:n,onOpen:r,onClose:o}=hs(),s=le(),{shouldAnimateEdges:i,shouldValidateGraph:c,shouldSnapToGrid:d,shouldColorEdges:p,selectionModeIsChecked:h}=H(pge),m=l.useCallback(S=>{s(e9(S.target.checked))},[s]),g=l.useCallback(S=>{s(t9(S.target.checked))},[s]),b=l.useCallback(S=>{s(n9(S.target.checked))},[s]),y=l.useCallback(S=>{s(r9(S.target.checked))},[s]),x=l.useCallback(S=>{s(o9(S.target.checked))},[s]),{t:w}=J();return a.jsxs(a.Fragment,{children:[a.jsx(rt,{ref:t,"aria-label":w("nodes.workflowSettings"),tooltip:w("nodes.workflowSettings"),icon:a.jsx(qM,{}),onClick:r}),a.jsxs(vu,{isOpen:n,onClose:o,size:"2xl",isCentered:!0,children:[a.jsx(Aa,{}),a.jsxs(bu,{children:[a.jsx(Oa,{children:w("nodes.workflowSettings")}),a.jsx(Rg,{}),a.jsx(Ra,{children:a.jsxs(N,{sx:{flexDirection:"column",gap:4,py:4},children:[a.jsx(yo,{size:"sm",children:"General"}),a.jsx(_r,{formLabelProps:_d,onChange:g,isChecked:i,label:w("nodes.animatedEdges"),helperText:w("nodes.animatedEdgesHelp")}),a.jsx(io,{}),a.jsx(_r,{formLabelProps:_d,isChecked:d,onChange:b,label:w("nodes.snapToGrid"),helperText:w("nodes.snapToGridHelp")}),a.jsx(io,{}),a.jsx(_r,{formLabelProps:_d,isChecked:p,onChange:y,label:w("nodes.colorCodeEdges"),helperText:w("nodes.colorCodeEdgesHelp")}),a.jsx(_r,{formLabelProps:_d,isChecked:h,onChange:x,label:w("nodes.fullyContainNodes"),helperText:w("nodes.fullyContainNodesHelp")}),a.jsx(yo,{size:"sm",pt:4,children:"Advanced"}),a.jsx(_r,{formLabelProps:_d,isChecked:c,onChange:m,label:w("nodes.validateConnections"),helperText:w("nodes.validateConnectionsHelp")}),a.jsx(fge,{})]})})]})]})]})}),mge=l.memo(hge),gge=()=>{const e=H(t=>t.nodes.shouldShowFieldTypeLegend);return a.jsxs(N,{sx:{gap:2,position:"absolute",top:2,insetInlineEnd:2},children:[a.jsx(mge,{}),e&&a.jsx(uge,{})]})},vge=l.memo(gge);function bge(){const e=le(),t=H(o=>o.nodes.nodeOpacity),{t:n}=J(),r=l.useCallback(o=>{e(s9(o))},[e]);return a.jsx(N,{alignItems:"center",children:a.jsxs(Ny,{"aria-label":n("nodes.nodeOpacity"),value:t,min:.5,max:1,step:.01,onChange:r,orientation:"vertical",defaultValue:30,h:"calc(100% - 0.5rem)",children:[a.jsx(Ly,{children:a.jsx(zy,{})}),a.jsx($y,{})]})})}const xge=()=>{const{t:e}=J(),{zoomIn:t,zoomOut:n,fitView:r}=Jx(),o=le(),s=H(h=>h.nodes.shouldShowMinimapPanel),i=l.useCallback(()=>{t()},[t]),c=l.useCallback(()=>{n()},[n]),d=l.useCallback(()=>{r()},[r]),p=l.useCallback(()=>{o(a9(!s))},[s,o]);return a.jsxs(Hn,{isAttached:!0,orientation:"vertical",children:[a.jsx(rt,{tooltip:e("nodes.zoomInNodes"),"aria-label":e("nodes.zoomInNodes"),onClick:i,icon:a.jsx(fse,{})}),a.jsx(rt,{tooltip:e("nodes.zoomOutNodes"),"aria-label":e("nodes.zoomOutNodes"),onClick:c,icon:a.jsx(dse,{})}),a.jsx(rt,{tooltip:e("nodes.fitViewportNodes"),"aria-label":e("nodes.fitViewportNodes"),onClick:d,icon:a.jsx(KM,{})}),a.jsx(rt,{tooltip:e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),"aria-label":e(s?"nodes.hideMinimapnodes":"nodes.showMinimapnodes"),isChecked:s,onClick:p,icon:a.jsx(Wee,{})})]})},yge=l.memo(xge),Cge=()=>a.jsxs(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineStart:2},children:[a.jsx(yge,{}),a.jsx(bge,{})]}),wge=l.memo(Cge),Sge=Ae(q$),kge=()=>{const e=H(r=>r.nodes.shouldShowMinimapPanel),t=di("var(--invokeai-colors-accent-300)","var(--invokeai-colors-accent-600)"),n=di("var(--invokeai-colors-blackAlpha-300)","var(--invokeai-colors-blackAlpha-600)");return a.jsx(N,{sx:{gap:2,position:"absolute",bottom:2,insetInlineEnd:2},children:e&&a.jsx(Sge,{pannable:!0,zoomable:!0,nodeBorderRadius:15,sx:{m:"0 !important",backgroundColor:"base.200 !important",borderRadius:"base",_dark:{backgroundColor:"base.500 !important"},svg:{borderRadius:"inherit"}},nodeColor:t,maskColor:n})})},jge=l.memo(kge),_ge=()=>{const e=H(n=>n.nodes.isReady),{t}=J();return a.jsxs(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center"},children:[a.jsx(So,{children:e&&a.jsxs(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"relative",width:"100%",height:"100%"},children:[a.jsx(Kme,{}),a.jsx($he,{}),a.jsx(Jme,{}),a.jsx(lge,{}),a.jsx(vge,{}),a.jsx(wge,{}),a.jsx(jge,{})]})}),a.jsx(So,{children:!e&&a.jsx(Ar.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.2}},style:{position:"absolute",width:"100%",height:"100%"},children:a.jsx(N,{layerStyle:"first",sx:{position:"relative",width:"full",height:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:a.jsx(eo,{label:t("nodes.loadingNodes"),icon:pse})})})})]})},Ige=l.memo(_ge),Pge=()=>a.jsx(i9,{children:a.jsx(Ige,{})}),Ege=l.memo(Pge),Mge=()=>{const{t:e}=J(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=l9({fixedCacheKey:"clearInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.size)||!r,[n==null?void 0:n.size,r]);return{clearInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.clearSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.clearFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Oge=()=>{const{t:e}=J(),{clearInvocationCache:t,isDisabled:n,isLoading:r}=Mge();return a.jsx(Dt,{isDisabled:n,isLoading:r,onClick:t,children:e("invocationCache.clear")})},Age=l.memo(Oge),Rge=()=>{const{t:e}=J(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=c9({fixedCacheKey:"disableInvocationCache"}),i=l.useMemo(()=>!(n!=null&&n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{disableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.disableSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.disableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Dge=()=>{const{t:e}=J(),t=le(),{data:n}=Ef(),r=H(d=>d.system.isConnected),[o,{isLoading:s}]=u9({fixedCacheKey:"enableInvocationCache"}),i=l.useMemo(()=>(n==null?void 0:n.enabled)||!r||(n==null?void 0:n.max_size)===0,[n==null?void 0:n.enabled,n==null?void 0:n.max_size,r]);return{enableInvocationCache:l.useCallback(async()=>{if(!i)try{await o().unwrap(),t(Ht({title:e("invocationCache.enableSucceeded"),status:"success"}))}catch{t(Ht({title:e("invocationCache.enableFailed"),status:"error"}))}},[i,o,t,e]),isLoading:s,cacheStatus:n,isDisabled:i}},Tge=()=>{const{t:e}=J(),{data:t}=Ef(),{enableInvocationCache:n,isDisabled:r,isLoading:o}=Dge(),{disableInvocationCache:s,isDisabled:i,isLoading:c}=Rge();return t!=null&&t.enabled?a.jsx(Dt,{isDisabled:i,isLoading:c,onClick:s,children:e("invocationCache.disable")}):a.jsx(Dt,{isDisabled:r,isLoading:o,onClick:n,children:e("invocationCache.enable")})},Nge=l.memo(Tge),$ge=({children:e,...t})=>a.jsx(V3,{alignItems:"center",justifyContent:"center",w:"full",h:"full",layerStyle:"second",borderRadius:"base",py:2,px:3,gap:6,flexWrap:"nowrap",...t,children:e}),nR=l.memo($ge),Lge={'&[aria-disabled="true"]':{color:"base.400",_dark:{color:"base.500"}}},zge=({label:e,value:t,isDisabled:n=!1,...r})=>a.jsxs(W3,{flexGrow:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap","aria-disabled":n,sx:Lge,...r,children:[a.jsx(U3,{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",children:e}),a.jsx(G3,{children:t})]}),Ca=l.memo(zge),Fge=()=>{const{t:e}=J(),{data:t}=Ef(void 0);return a.jsxs(nR,{children:[a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.cacheSize"),value:(t==null?void 0:t.size)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.hits"),value:(t==null?void 0:t.hits)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.misses"),value:(t==null?void 0:t.misses)??0}),a.jsx(Ca,{isDisabled:!(t!=null&&t.enabled),label:e("invocationCache.maxCacheSize"),value:(t==null?void 0:t.max_size)??0}),a.jsxs(Hn,{w:24,orientation:"vertical",size:"xs",children:[a.jsx(Age,{}),a.jsx(Nge,{})]})]})},Bge=l.memo(Fge),rR=e=>{const t=H(c=>c.system.isConnected),[n,{isLoading:r}]=Gx(),o=le(),{t:s}=J();return{cancelQueueItem:l.useCallback(async()=>{try{await n(e).unwrap(),o(Ht({title:s("queue.cancelSucceeded"),status:"success"}))}catch{o(Ht({title:s("queue.cancelFailed"),status:"error"}))}},[o,e,s,n]),isLoading:r,isDisabled:!t}},oR=(e,t)=>Number(((Date.parse(t)-Date.parse(e))/1e3).toFixed(2)),sI={pending:{colorScheme:"cyan",translationKey:"queue.pending"},in_progress:{colorScheme:"yellow",translationKey:"queue.in_progress"},completed:{colorScheme:"green",translationKey:"queue.completed"},failed:{colorScheme:"red",translationKey:"queue.failed"},canceled:{colorScheme:"orange",translationKey:"queue.canceled"}},Hge=({status:e})=>{const{t}=J();return a.jsx(Va,{colorScheme:sI[e].colorScheme,children:t(sI[e].translationKey)})},Wge=l.memo(Hge),Vge=e=>{const t=H(d=>d.system.isConnected),{isCanceled:n}=d9({batch_id:e},{selectFromResult:({data:d})=>d?{isCanceled:(d==null?void 0:d.in_progress)===0&&(d==null?void 0:d.pending)===0}:{isCanceled:!0}}),[r,{isLoading:o}]=f9({fixedCacheKey:"cancelByBatchIds"}),s=le(),{t:i}=J();return{cancelBatch:l.useCallback(async()=>{if(!n)try{await r({batch_ids:[e]}).unwrap(),s(Ht({title:i("queue.cancelBatchSucceeded"),status:"success"}))}catch{s(Ht({title:i("queue.cancelBatchFailed"),status:"error"}))}},[e,s,n,i,r]),isLoading:o,isCanceled:n,isDisabled:!t}},Uge=({queueItemDTO:e})=>{const{session_id:t,batch_id:n,item_id:r}=e,{t:o}=J(),{cancelBatch:s,isLoading:i,isCanceled:c}=Vge(n),{cancelQueueItem:d,isLoading:p}=rR(r),{data:h}=p9(r),m=l.useMemo(()=>{if(!h)return o("common.loading");if(!h.completed_at||!h.started_at)return o(`queue.${h.status}`);const g=oR(h.started_at,h.completed_at);return h.status==="completed"?`${o("queue.completedIn")} ${g}${g===1?"":"s"}`:`${g}s`},[h,o]);return a.jsxs(N,{layerStyle:"third",flexDir:"column",p:2,pt:0,borderRadius:"base",gap:2,children:[a.jsxs(N,{layerStyle:"second",p:2,gap:2,justifyContent:"space-between",alignItems:"center",borderRadius:"base",h:20,children:[a.jsx(jh,{label:o("queue.status"),data:m}),a.jsx(jh,{label:o("queue.item"),data:r}),a.jsx(jh,{label:o("queue.batch"),data:n}),a.jsx(jh,{label:o("queue.session"),data:t}),a.jsxs(Hn,{size:"xs",orientation:"vertical",children:[a.jsx(Dt,{onClick:d,isLoading:p,isDisabled:h?["canceled","completed","failed"].includes(h.status):!0,"aria-label":o("queue.cancelItem"),icon:a.jsx(ku,{}),colorScheme:"error",children:o("queue.cancelItem")}),a.jsx(Dt,{onClick:s,isLoading:i,isDisabled:c,"aria-label":o("queue.cancelBatch"),icon:a.jsx(ku,{}),colorScheme:"error",children:o("queue.cancelBatch")})]})]}),(h==null?void 0:h.error)&&a.jsxs(N,{layerStyle:"second",p:3,gap:1,justifyContent:"space-between",alignItems:"flex-start",borderRadius:"base",flexDir:"column",children:[a.jsx(yo,{size:"sm",color:"error.500",_dark:{color:"error.400"},children:"Error"}),a.jsx("pre",{children:h.error})]}),a.jsx(N,{layerStyle:"second",h:512,w:"full",borderRadius:"base",alignItems:"center",justifyContent:"center",children:h?a.jsx(cc,{children:a.jsx(tl,{label:"Queue Item",data:h})}):a.jsx(Ci,{opacity:.5})})]})},Gge=l.memo(Uge),jh=({label:e,data:t})=>a.jsxs(N,{flexDir:"column",justifyContent:"flex-start",p:1,gap:1,overflow:"hidden",h:"full",w:"full",children:[a.jsx(yo,{size:"md",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e}),a.jsx(je,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]}),Sa={number:"3rem",statusBadge:"5.7rem",statusDot:2,time:"4rem",batchId:"5rem",fieldValues:"auto",actions:"auto"},aI={bg:"base.300",_dark:{bg:"base.750"}},qge={_hover:aI,"&[aria-selected='true']":aI},Kge=({index:e,item:t,context:n})=>{const{t:r}=J(),o=l.useCallback(()=>{n.toggleQueueItem(t.item_id)},[n,t.item_id]),{cancelQueueItem:s,isLoading:i}=rR(t.item_id),c=l.useCallback(m=>{m.stopPropagation(),s()},[s]),d=l.useMemo(()=>n.openQueueItems.includes(t.item_id),[n.openQueueItems,t.item_id]),p=l.useMemo(()=>!t.completed_at||!t.started_at?void 0:`${oR(t.started_at,t.completed_at)}s`,[t]),h=l.useMemo(()=>["canceled","completed","failed"].includes(t.status),[t.status]);return a.jsxs(N,{flexDir:"column","aria-selected":d,fontSize:"sm",borderRadius:"base",justifyContent:"center",sx:qge,"data-testid":"queue-item",children:[a.jsxs(N,{minH:9,alignItems:"center",gap:4,p:1.5,cursor:"pointer",onClick:o,children:[a.jsx(N,{w:Sa.number,justifyContent:"flex-end",alignItems:"center",flexShrink:0,children:a.jsx(je,{variant:"subtext",children:e+1})}),a.jsx(N,{w:Sa.statusBadge,alignItems:"center",flexShrink:0,children:a.jsx(Wge,{status:t.status})}),a.jsx(N,{w:Sa.time,alignItems:"center",flexShrink:0,children:p||"-"}),a.jsx(N,{w:Sa.batchId,flexShrink:0,children:a.jsx(je,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",alignItems:"center",children:t.batch_id})}),a.jsx(N,{alignItems:"center",overflow:"hidden",flexGrow:1,children:t.field_values&&a.jsx(N,{gap:2,w:"full",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",children:t.field_values.filter(m=>m.node_path!=="metadata_accumulator").map(({node_path:m,field_name:g,value:b})=>a.jsxs(je,{as:"span",children:[a.jsxs(je,{as:"span",fontWeight:600,children:[m,".",g]}),": ",b]},`${t.item_id}.${m}.${g}.${b}`))})}),a.jsx(N,{alignItems:"center",w:Sa.actions,pe:3,children:a.jsx(Hn,{size:"xs",variant:"ghost",children:a.jsx(rt,{onClick:c,isDisabled:h,isLoading:i,"aria-label":r("queue.cancelItem"),icon:a.jsx(ku,{})})})})]}),a.jsx(Af,{in:d,transition:{enter:{duration:.1},exit:{duration:.1}},unmountOnExit:!0,children:a.jsx(Gge,{queueItemDTO:t})})]})},Qge=l.memo(Kge),Xge=l.memo(De((e,t)=>a.jsx(N,{...e,ref:t,flexDirection:"column",gap:.5,children:e.children}))),Yge=l.memo(Xge),Jge=()=>a.jsxs(N,{alignItems:"center",gap:4,p:1,pb:2,textTransform:"uppercase",fontWeight:700,fontSize:"xs",letterSpacing:1,children:[a.jsx(N,{w:Sa.number,justifyContent:"flex-end",alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"#"})}),a.jsx(N,{ps:.5,w:Sa.statusBadge,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"status"})}),a.jsx(N,{ps:.5,w:Sa.time,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"time"})}),a.jsx(N,{ps:.5,w:Sa.batchId,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"batch"})}),a.jsx(N,{ps:.5,w:Sa.fieldValues,alignItems:"center",children:a.jsx(je,{variant:"subtext",children:"batch field values"})})]}),Zge=l.memo(Jge),e0e={defer:!0,options:{scrollbars:{visibility:"auto",autoHide:"scroll",autoHideDelay:1300,theme:"os-theme-dark"},overflow:{x:"hidden"}}},t0e=me(we,({queue:e})=>{const{listCursor:t,listPriority:n}=e;return{listCursor:t,listPriority:n}},Ie),n0e=(e,t)=>t.item_id,r0e={List:Yge},o0e=(e,t,n)=>a.jsx(Qge,{index:e,item:t,context:n}),s0e=()=>{const{listCursor:e,listPriority:t}=H(t0e),n=le(),r=l.useRef(null),[o,s]=l.useState(null),[i,c]=y2(e0e),{t:d}=J();l.useEffect(()=>{const{current:S}=r;return o&&S&&i({target:S,elements:{viewport:o}}),()=>{var j;return(j=c())==null?void 0:j.destroy()}},[o,i,c]);const{data:p,isLoading:h}=h9({cursor:e,priority:t}),m=l.useMemo(()=>p?m9.getSelectors().selectAll(p):[],[p]),g=l.useCallback(()=>{if(!(p!=null&&p.has_more))return;const S=m[m.length-1];S&&(n(qx(S.item_id)),n(Kx(S.priority)))},[n,p==null?void 0:p.has_more,m]),[b,y]=l.useState([]),x=l.useCallback(S=>{y(j=>j.includes(S)?j.filter(I=>I!==S):[...j,S])},[]),w=l.useMemo(()=>({openQueueItems:b,toggleQueueItem:x}),[b,x]);return h?a.jsx(Ire,{}):m.length?a.jsxs(N,{w:"full",h:"full",flexDir:"column",children:[a.jsx(Zge,{}),a.jsx(N,{ref:r,w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx(zoe,{data:m,endReached:g,scrollerRef:s,itemContent:o0e,computeItemKey:n0e,components:r0e,context:w})})]}):a.jsx(N,{w:"full",h:"full",alignItems:"center",justifyContent:"center",children:a.jsx(yo,{color:"base.400",_dark:{color:"base.500"},children:d("queue.queueEmpty")})})},a0e=l.memo(s0e),i0e=()=>{const{data:e}=Ha(),{t}=J();return a.jsxs(nR,{"data-testid":"queue-status",children:[a.jsx(Ca,{label:t("queue.in_progress"),value:(e==null?void 0:e.queue.in_progress)??0}),a.jsx(Ca,{label:t("queue.pending"),value:(e==null?void 0:e.queue.pending)??0}),a.jsx(Ca,{label:t("queue.completed"),value:(e==null?void 0:e.queue.completed)??0}),a.jsx(Ca,{label:t("queue.failed"),value:(e==null?void 0:e.queue.failed)??0}),a.jsx(Ca,{label:t("queue.canceled"),value:(e==null?void 0:e.queue.canceled)??0}),a.jsx(Ca,{label:t("queue.total"),value:(e==null?void 0:e.queue.total)??0})]})},l0e=l.memo(i0e);function c0e(e){return Ye({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828l.645-1.937zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.734 1.734 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.734 1.734 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.734 1.734 0 0 0 3.407 2.31l.387-1.162zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L10.863.1z"}}]})(e)}const u0e=()=>{const e=le(),{t}=J(),n=H(d=>d.system.isConnected),[r,{isLoading:o}]=hP({fixedCacheKey:"pruneQueue"}),{finishedCount:s}=Ha(void 0,{selectFromResult:({data:d})=>d?{finishedCount:d.queue.completed+d.queue.canceled+d.queue.failed}:{finishedCount:0}}),i=l.useCallback(async()=>{if(s)try{const d=await r().unwrap();e(Ht({title:t("queue.pruneSucceeded",{item_count:d.deleted}),status:"success"})),e(qx(void 0)),e(Kx(void 0))}catch{e(Ht({title:t("queue.pruneFailed"),status:"error"}))}},[s,r,e,t]),c=l.useMemo(()=>!n||!s,[s,n]);return{pruneQueue:i,isLoading:o,finishedCount:s,isDisabled:c}},d0e=({asIconButton:e})=>{const{t}=J(),{pruneQueue:n,isLoading:r,finishedCount:o,isDisabled:s}=u0e();return a.jsx(lc,{isDisabled:s,isLoading:r,asIconButton:e,label:t("queue.prune"),tooltip:t("queue.pruneTooltip",{item_count:o}),icon:a.jsx(c0e,{}),onClick:n,colorScheme:"blue"})},f0e=l.memo(d0e),p0e=()=>{const e=Pn("pauseQueue").isFeatureEnabled,t=Pn("resumeQueue").isFeatureEnabled;return a.jsxs(N,{layerStyle:"second",borderRadius:"base",p:2,gap:2,children:[e||t?a.jsxs(Hn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[t?a.jsx(z8,{}):a.jsx(a.Fragment,{}),e?a.jsx(R8,{}):a.jsx(a.Fragment,{})]}):a.jsx(a.Fragment,{}),a.jsxs(Hn,{w:28,orientation:"vertical",isAttached:!0,size:"sm",children:[a.jsx(f0e,{}),a.jsx(B2,{})]})]})},h0e=l.memo(p0e),m0e=()=>{const e=Pn("invocationCache").isFeatureEnabled;return a.jsxs(N,{layerStyle:"first",borderRadius:"base",w:"full",h:"full",p:2,flexDir:"column",gap:2,children:[a.jsxs(N,{gap:2,w:"full",children:[a.jsx(h0e,{}),a.jsx(l0e,{}),e&&a.jsx(Bge,{})]}),a.jsx(Le,{layerStyle:"second",p:2,borderRadius:"base",w:"full",h:"full",children:a.jsx(a0e,{})})]})},g0e=l.memo(m0e),v0e=()=>a.jsx(g0e,{}),b0e=l.memo(v0e),x0e=()=>a.jsx(BA,{}),y0e=l.memo(x0e);var kx={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=SS;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});const r=SS;e.exports=r.Konva})(kx,kx.exports);var C0e=kx.exports;const Cf=Sf(C0e);var sR={exports:{}};/** - * @license React - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var w0e=function(t){var n={},r=l,o=Ih,s=Object.assign;function i(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,v=1;vce||k[L]!==P[ce]){var be=` -`+k[L].replace(" at new "," at ");return u.displayName&&be.includes("")&&(be=be.replace("",u.displayName)),be}while(1<=L&&0<=ce);break}}}finally{tn=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?Ut(u):""}var ln=Object.prototype.hasOwnProperty,Yt=[],Ve=-1;function Ct(u){return{current:u}}function Ft(u){0>Ve||(u.current=Yt[Ve],Yt[Ve]=null,Ve--)}function Qt(u,f){Ve++,Yt[Ve]=u.current,u.current=f}var Ln={},Jt=Ct(Ln),yn=Ct(!1),hn=Ln;function Hr(u,f){var v=u.type.contextTypes;if(!v)return Ln;var C=u.stateNode;if(C&&C.__reactInternalMemoizedUnmaskedChildContext===f)return C.__reactInternalMemoizedMaskedChildContext;var k={},P;for(P in v)k[P]=f[P];return C&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=k),k}function pr(u){return u=u.childContextTypes,u!=null}function Tt(){Ft(yn),Ft(Jt)}function zn(u,f,v){if(Jt.current!==Ln)throw Error(i(168));Qt(Jt,f),Qt(yn,v)}function Gn(u,f,v){var C=u.stateNode;if(f=f.childContextTypes,typeof C.getChildContext!="function")return v;C=C.getChildContext();for(var k in C)if(!(k in f))throw Error(i(108,R(u)||"Unknown",k));return s({},v,C)}function hr(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Ln,hn=Jt.current,Qt(Jt,u),Qt(yn,yn.current),!0}function Pr(u,f,v){var C=u.stateNode;if(!C)throw Error(i(169));v?(u=Gn(u,f,hn),C.__reactInternalMemoizedMergedChildContext=u,Ft(yn),Ft(Jt),Qt(Jt,u)):Ft(yn),Qt(yn,v)}var er=Math.clz32?Math.clz32:An,qn=Math.log,Cn=Math.LN2;function An(u){return u>>>=0,u===0?32:31-(qn(u)/Cn|0)|0}var Rn=64,jn=4194304;function Fn(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Zt(u,f){var v=u.pendingLanes;if(v===0)return 0;var C=0,k=u.suspendedLanes,P=u.pingedLanes,L=v&268435455;if(L!==0){var ce=L&~k;ce!==0?C=Fn(ce):(P&=L,P!==0&&(C=Fn(P)))}else L=v&~k,L!==0?C=Fn(L):P!==0&&(C=Fn(P));if(C===0)return 0;if(f!==0&&f!==C&&!(f&k)&&(k=C&-C,P=f&-f,k>=P||k===16&&(P&4194240)!==0))return f;if(C&4&&(C|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=C;0v;v++)f.push(u);return f}function Bt(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-er(f),u[f]=v}function Ue(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var C=u.eventTimes;for(u=u.expirationTimes;0>=L,k-=L,rs=1<<32-er(f)+k|v<Dn?(so=sn,sn=null):so=sn.sibling;var Tn=ut(ve,sn,Ce[Dn],dt);if(Tn===null){sn===null&&(sn=so);break}u&&sn&&Tn.alternate===null&&f(ve,sn),fe=P(Tn,fe,Dn),dn===null?Wt=Tn:dn.sibling=Tn,dn=Tn,sn=so}if(Dn===Ce.length)return v(ve,sn),mr&&xl(ve,Dn),Wt;if(sn===null){for(;DnDn?(so=sn,sn=null):so=sn.sibling;var Fi=ut(ve,sn,Tn.value,dt);if(Fi===null){sn===null&&(sn=so);break}u&&sn&&Fi.alternate===null&&f(ve,sn),fe=P(Fi,fe,Dn),dn===null?Wt=Fi:dn.sibling=Fi,dn=Fi,sn=so}if(Tn.done)return v(ve,sn),mr&&xl(ve,Dn),Wt;if(sn===null){for(;!Tn.done;Dn++,Tn=Ce.next())Tn=on(ve,Tn.value,dt),Tn!==null&&(fe=P(Tn,fe,Dn),dn===null?Wt=Tn:dn.sibling=Tn,dn=Tn);return mr&&xl(ve,Dn),Wt}for(sn=C(ve,sn);!Tn.done;Dn++,Tn=Ce.next())Tn=fr(sn,ve,Dn,Tn.value,dt),Tn!==null&&(u&&Tn.alternate!==null&&sn.delete(Tn.key===null?Dn:Tn.key),fe=P(Tn,fe,Dn),dn===null?Wt=Tn:dn.sibling=Tn,dn=Tn);return u&&sn.forEach(function(QR){return f(ve,QR)}),mr&&xl(ve,Dn),Wt}function Ja(ve,fe,Ce,dt){if(typeof Ce=="object"&&Ce!==null&&Ce.type===h&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case d:e:{for(var Wt=Ce.key,dn=fe;dn!==null;){if(dn.key===Wt){if(Wt=Ce.type,Wt===h){if(dn.tag===7){v(ve,dn.sibling),fe=k(dn,Ce.props.children),fe.return=ve,ve=fe;break e}}else if(dn.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===I&&kC(Wt)===dn.type){v(ve,dn.sibling),fe=k(dn,Ce.props),fe.ref=ed(ve,dn,Ce),fe.return=ve,ve=fe;break e}v(ve,dn);break}else f(ve,dn);dn=dn.sibling}Ce.type===h?(fe=_l(Ce.props.children,ve.mode,dt,Ce.key),fe.return=ve,ve=fe):(dt=Fp(Ce.type,Ce.key,Ce.props,null,ve.mode,dt),dt.ref=ed(ve,fe,Ce),dt.return=ve,ve=dt)}return L(ve);case p:e:{for(dn=Ce.key;fe!==null;){if(fe.key===dn)if(fe.tag===4&&fe.stateNode.containerInfo===Ce.containerInfo&&fe.stateNode.implementation===Ce.implementation){v(ve,fe.sibling),fe=k(fe,Ce.children||[]),fe.return=ve,ve=fe;break e}else{v(ve,fe);break}else f(ve,fe);fe=fe.sibling}fe=Fv(Ce,ve.mode,dt),fe.return=ve,ve=fe}return L(ve);case I:return dn=Ce._init,Ja(ve,fe,dn(Ce._payload),dt)}if(Z(Ce))return tr(ve,fe,Ce,dt);if(E(Ce))return Ho(ve,fe,Ce,dt);hp(ve,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"?(Ce=""+Ce,fe!==null&&fe.tag===6?(v(ve,fe.sibling),fe=k(fe,Ce),fe.return=ve,ve=fe):(v(ve,fe),fe=zv(Ce,ve.mode,dt),fe.return=ve,ve=fe),L(ve)):v(ve,fe)}return Ja}var mc=jC(!0),_C=jC(!1),td={},ys=Ct(td),nd=Ct(td),gc=Ct(td);function ma(u){if(u===td)throw Error(i(174));return u}function Z0(u,f){Qt(gc,f),Qt(nd,u),Qt(ys,td),u=V(f),Ft(ys),Qt(ys,u)}function vc(){Ft(ys),Ft(nd),Ft(gc)}function IC(u){var f=ma(gc.current),v=ma(ys.current);f=oe(v,u.type,f),v!==f&&(Qt(nd,u),Qt(ys,f))}function ev(u){nd.current===u&&(Ft(ys),Ft(nd))}var wr=Ct(0);function mp(u){for(var f=u;f!==null;){if(f.tag===13){var v=f.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Br(v)||ts(v)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var tv=[];function nv(){for(var u=0;uv?v:4,u(!0);var C=rv.transition;rv.transition={};try{u(!1),f()}finally{Oe=v,rv.transition=C}}function UC(){return Cs().memoizedState}function wR(u,f,v){var C=$i(u);if(v={lane:C,action:v,hasEagerState:!1,eagerState:null,next:null},GC(u))qC(f,v);else if(v=gC(u,f,v,C),v!==null){var k=bo();ws(v,u,C,k),KC(v,f,C)}}function SR(u,f,v){var C=$i(u),k={lane:C,action:v,hasEagerState:!1,eagerState:null,next:null};if(GC(u))qC(f,k);else{var P=u.alternate;if(u.lanes===0&&(P===null||P.lanes===0)&&(P=f.lastRenderedReducer,P!==null))try{var L=f.lastRenderedState,ce=P(L,v);if(k.hasEagerState=!0,k.eagerState=ce,dr(ce,L)){var be=f.interleaved;be===null?(k.next=k,Q0(f)):(k.next=be.next,be.next=k),f.interleaved=k;return}}catch{}finally{}v=gC(u,f,k,C),v!==null&&(k=bo(),ws(v,u,C,k),KC(v,f,C))}}function GC(u){var f=u.alternate;return u===Sr||f!==null&&f===Sr}function qC(u,f){rd=vp=!0;var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}function KC(u,f,v){if(v&4194240){var C=f.lanes;C&=u.pendingLanes,v|=C,f.lanes=v,Be(u,v)}}var yp={readContext:xs,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useInsertionEffect:mo,useLayoutEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useMutableSource:mo,useSyncExternalStore:mo,useId:mo,unstable_isNewReconciler:!1},kR={readContext:xs,useCallback:function(u,f){return ga().memoizedState=[u,f===void 0?null:f],u},useContext:xs,useEffect:$C,useImperativeHandle:function(u,f,v){return v=v!=null?v.concat([u]):null,bp(4194308,4,FC.bind(null,f,u),v)},useLayoutEffect:function(u,f){return bp(4194308,4,u,f)},useInsertionEffect:function(u,f){return bp(4,2,u,f)},useMemo:function(u,f){var v=ga();return f=f===void 0?null:f,u=u(),v.memoizedState=[u,f],u},useReducer:function(u,f,v){var C=ga();return f=v!==void 0?v(f):f,C.memoizedState=C.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},C.queue=u,u=u.dispatch=wR.bind(null,Sr,u),[C.memoizedState,u]},useRef:function(u){var f=ga();return u={current:u},f.memoizedState=u},useState:TC,useDebugValue:uv,useDeferredValue:function(u){return ga().memoizedState=u},useTransition:function(){var u=TC(!1),f=u[0];return u=CR.bind(null,u[1]),ga().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,v){var C=Sr,k=ga();if(mr){if(v===void 0)throw Error(i(407));v=v()}else{if(v=f(),oo===null)throw Error(i(349));Cl&30||MC(C,f,v)}k.memoizedState=v;var P={value:v,getSnapshot:f};return k.queue=P,$C(AC.bind(null,C,P,u),[u]),C.flags|=2048,ad(9,OC.bind(null,C,P,v,f),void 0,null),v},useId:function(){var u=ga(),f=oo.identifierPrefix;if(mr){var v=ho,C=rs;v=(C&~(1<<32-er(C)-1)).toString(32)+v,f=":"+f+"R"+v,v=od++,0Ov&&(f.flags|=128,C=!0,cd(k,!1),f.lanes=4194304)}else{if(!C)if(u=mp(P),u!==null){if(f.flags|=128,C=!0,u=u.updateQueue,u!==null&&(f.updateQueue=u,f.flags|=4),cd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!P.alternate&&!mr)return go(f),null}else 2*Ze()-k.renderingStartTime>Ov&&v!==1073741824&&(f.flags|=128,C=!0,cd(k,!1),f.lanes=4194304);k.isBackwards?(P.sibling=f.child,f.child=P):(u=k.last,u!==null?u.sibling=P:f.child=P,k.last=P)}return k.tail!==null?(f=k.tail,k.rendering=f,k.tail=f.sibling,k.renderingStartTime=Ze(),f.sibling=null,u=wr.current,Qt(wr,C?u&1|2:u&1),f):(go(f),null);case 22:case 23:return Nv(),v=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==v&&(f.flags|=8192),v&&f.mode&1?ss&1073741824&&(go(f),ee&&f.subtreeFlags&6&&(f.flags|=8192)):go(f),null;case 24:return null;case 25:return null}throw Error(i(156,f.tag))}function AR(u,f){switch(B0(f),f.tag){case 1:return pr(f.type)&&Tt(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return vc(),Ft(yn),Ft(Jt),nv(),u=f.flags,u&65536&&!(u&128)?(f.flags=u&-65537|128,f):null;case 5:return ev(f),null;case 13:if(Ft(wr),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(i(340));fc()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return Ft(wr),null;case 4:return vc(),null;case 10:return q0(f.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var jp=!1,vo=!1,RR=typeof WeakSet=="function"?WeakSet:Set,bt=null;function xc(u,f){var v=u.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(C){gr(u,f,C)}else v.current=null}function xv(u,f,v){try{v()}catch(C){gr(u,f,C)}}var pw=!1;function DR(u,f){for(ne(u.containerInfo),bt=f;bt!==null;)if(u=bt,f=u.child,(u.subtreeFlags&1028)!==0&&f!==null)f.return=u,bt=f;else for(;bt!==null;){u=bt;try{var v=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var C=v.memoizedProps,k=v.memoizedState,P=u.stateNode,L=P.getSnapshotBeforeUpdate(u.elementType===u.type?C:Gs(u.type,C),k);P.__reactInternalSnapshotBeforeUpdate=L}break;case 3:ee&&fn(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ce){gr(u,u.return,ce)}if(f=u.sibling,f!==null){f.return=u.return,bt=f;break}bt=u.return}return v=pw,pw=!1,v}function ud(u,f,v){var C=f.updateQueue;if(C=C!==null?C.lastEffect:null,C!==null){var k=C=C.next;do{if((k.tag&u)===u){var P=k.destroy;k.destroy=void 0,P!==void 0&&xv(f,v,P)}k=k.next}while(k!==C)}}function _p(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var v=f=f.next;do{if((v.tag&u)===u){var C=v.create;v.destroy=C()}v=v.next}while(v!==f)}}function yv(u){var f=u.ref;if(f!==null){var v=u.stateNode;switch(u.tag){case 5:u=te(v);break;default:u=v}typeof f=="function"?f(u):f.current=u}}function hw(u){var f=u.alternate;f!==null&&(u.alternate=null,hw(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&Pe(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function mw(u){return u.tag===5||u.tag===3||u.tag===4}function gw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||mw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Cv(u,f,v){var C=u.tag;if(C===5||C===6)u=u.stateNode,f?En(v,u,f):lt(v,u);else if(C!==4&&(u=u.child,u!==null))for(Cv(u,f,v),u=u.sibling;u!==null;)Cv(u,f,v),u=u.sibling}function wv(u,f,v){var C=u.tag;if(C===5||C===6)u=u.stateNode,f?Qe(v,u,f):ke(v,u);else if(C!==4&&(u=u.child,u!==null))for(wv(u,f,v),u=u.sibling;u!==null;)wv(u,f,v),u=u.sibling}var uo=null,qs=!1;function ba(u,f,v){for(v=v.child;v!==null;)Sv(u,f,v),v=v.sibling}function Sv(u,f,v){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(cr,v)}catch{}switch(v.tag){case 5:vo||xc(v,f);case 6:if(ee){var C=uo,k=qs;uo=null,ba(u,f,v),uo=C,qs=k,uo!==null&&(qs?ct(uo,v.stateNode):Te(uo,v.stateNode))}else ba(u,f,v);break;case 18:ee&&uo!==null&&(qs?Ge(uo,v.stateNode):wt(uo,v.stateNode));break;case 4:ee?(C=uo,k=qs,uo=v.stateNode.containerInfo,qs=!0,ba(u,f,v),uo=C,qs=k):(Y&&(C=v.stateNode.containerInfo,k=ir(C),Mn(C,k)),ba(u,f,v));break;case 0:case 11:case 14:case 15:if(!vo&&(C=v.updateQueue,C!==null&&(C=C.lastEffect,C!==null))){k=C=C.next;do{var P=k,L=P.destroy;P=P.tag,L!==void 0&&(P&2||P&4)&&xv(v,f,L),k=k.next}while(k!==C)}ba(u,f,v);break;case 1:if(!vo&&(xc(v,f),C=v.stateNode,typeof C.componentWillUnmount=="function"))try{C.props=v.memoizedProps,C.state=v.memoizedState,C.componentWillUnmount()}catch(ce){gr(v,f,ce)}ba(u,f,v);break;case 21:ba(u,f,v);break;case 22:v.mode&1?(vo=(C=vo)||v.memoizedState!==null,ba(u,f,v),vo=C):ba(u,f,v);break;default:ba(u,f,v)}}function vw(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var v=u.stateNode;v===null&&(v=u.stateNode=new RR),f.forEach(function(C){var k=WR.bind(null,u,C);v.has(C)||(v.add(C),C.then(k,k))})}}function Ks(u,f){var v=f.deletions;if(v!==null)for(var C=0;C";case Pp:return":has("+(_v(u)||"")+")";case Ep:return'[role="'+u.value+'"]';case Op:return'"'+u.value+'"';case Mp:return'[data-testname="'+u.value+'"]';default:throw Error(i(365))}}function Sw(u,f){var v=[];u=[u,0];for(var C=0;Ck&&(k=L),C&=~P}if(C=k,C=Ze()-C,C=(120>C?120:480>C?480:1080>C?1080:1920>C?1920:3e3>C?3e3:4320>C?4320:1960*NR(C/1960))-C,10u?16:u,Ni===null)var C=!1;else{if(u=Ni,Ni=null,Np=0,gn&6)throw Error(i(331));var k=gn;for(gn|=4,bt=u.current;bt!==null;){var P=bt,L=P.child;if(bt.flags&16){var ce=P.deletions;if(ce!==null){for(var be=0;beZe()-Mv?Sl(u,0):Ev|=v),Bo(u,f)}function Aw(u,f){f===0&&(u.mode&1?(f=jn,jn<<=1,!(jn&130023424)&&(jn=4194304)):f=1);var v=bo();u=ha(u,f),u!==null&&(Bt(u,f,v),Bo(u,v))}function HR(u){var f=u.memoizedState,v=0;f!==null&&(v=f.retryLane),Aw(u,v)}function WR(u,f){var v=0;switch(u.tag){case 13:var C=u.stateNode,k=u.memoizedState;k!==null&&(v=k.retryLane);break;case 19:C=u.stateNode;break;default:throw Error(i(314))}C!==null&&C.delete(f),Aw(u,v)}var Rw;Rw=function(u,f,v){if(u!==null)if(u.memoizedProps!==f.pendingProps||yn.current)zo=!0;else{if(!(u.lanes&v)&&!(f.flags&128))return zo=!1,MR(u,f,v);zo=!!(u.flags&131072)}else zo=!1,mr&&f.flags&1048576&&uC(f,jo,f.index);switch(f.lanes=0,f.tag){case 2:var C=f.type;wp(u,f),u=f.pendingProps;var k=Hr(f,Jt.current);hc(f,v),k=sv(null,f,C,u,k,v);var P=av();return f.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,pr(C)?(P=!0,hr(f)):P=!1,f.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,X0(f),k.updater=pp,f.stateNode=k,k._reactInternals=f,J0(f,C,u,v),f=hv(null,f,C,!0,P,v)):(f.tag=0,mr&&P&&F0(f),Po(null,f,k,v),f=f.child),f;case 16:C=f.elementType;e:{switch(wp(u,f),u=f.pendingProps,k=C._init,C=k(C._payload),f.type=C,k=f.tag=UR(C),u=Gs(C,u),k){case 0:f=pv(null,f,C,u,v);break e;case 1:f=sw(null,f,C,u,v);break e;case 11:f=ew(null,f,C,u,v);break e;case 14:f=tw(null,f,C,Gs(C.type,u),v);break e}throw Error(i(306,C,""))}return f;case 0:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),pv(u,f,C,k,v);case 1:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),sw(u,f,C,k,v);case 3:e:{if(aw(f),u===null)throw Error(i(387));C=f.pendingProps,P=f.memoizedState,k=P.element,vC(u,f),fp(f,C,null,v);var L=f.memoizedState;if(C=L.element,ge&&P.isDehydrated)if(P={element:C,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},f.updateQueue.baseState=P,f.memoizedState=P,f.flags&256){k=bc(Error(i(423)),f),f=iw(u,f,C,v,k);break e}else if(C!==k){k=bc(Error(i(424)),f),f=iw(u,f,C,v,k);break e}else for(ge&&(bs=ue(f.stateNode.containerInfo),os=f,mr=!0,Us=null,Zu=!1),v=_C(f,null,C,v),f.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(fc(),C===k){f=Xa(u,f,v);break e}Po(u,f,C,v)}f=f.child}return f;case 5:return IC(f),u===null&&W0(f),C=f.type,k=f.pendingProps,P=u!==null?u.memoizedProps:null,L=k.children,$(C,k)?L=null:P!==null&&$(C,P)&&(f.flags|=32),ow(u,f),Po(u,f,L,v),f.child;case 6:return u===null&&W0(f),null;case 13:return lw(u,f,v);case 4:return Z0(f,f.stateNode.containerInfo),C=f.pendingProps,u===null?f.child=mc(f,null,C,v):Po(u,f,C,v),f.child;case 11:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),ew(u,f,C,k,v);case 7:return Po(u,f,f.pendingProps,v),f.child;case 8:return Po(u,f,f.pendingProps.children,v),f.child;case 12:return Po(u,f,f.pendingProps.children,v),f.child;case 10:e:{if(C=f.type._context,k=f.pendingProps,P=f.memoizedProps,L=k.value,mC(f,C,L),P!==null)if(dr(P.value,L)){if(P.children===k.children&&!yn.current){f=Xa(u,f,v);break e}}else for(P=f.child,P!==null&&(P.return=f);P!==null;){var ce=P.dependencies;if(ce!==null){L=P.child;for(var be=ce.firstContext;be!==null;){if(be.context===C){if(P.tag===1){be=Qa(-1,v&-v),be.tag=2;var We=P.updateQueue;if(We!==null){We=We.shared;var xt=We.pending;xt===null?be.next=be:(be.next=xt.next,xt.next=be),We.pending=be}}P.lanes|=v,be=P.alternate,be!==null&&(be.lanes|=v),K0(P.return,v,f),ce.lanes|=v;break}be=be.next}}else if(P.tag===10)L=P.type===f.type?null:P.child;else if(P.tag===18){if(L=P.return,L===null)throw Error(i(341));L.lanes|=v,ce=L.alternate,ce!==null&&(ce.lanes|=v),K0(L,v,f),L=P.sibling}else L=P.child;if(L!==null)L.return=P;else for(L=P;L!==null;){if(L===f){L=null;break}if(P=L.sibling,P!==null){P.return=L.return,L=P;break}L=L.return}P=L}Po(u,f,k.children,v),f=f.child}return f;case 9:return k=f.type,C=f.pendingProps.children,hc(f,v),k=xs(k),C=C(k),f.flags|=1,Po(u,f,C,v),f.child;case 14:return C=f.type,k=Gs(C,f.pendingProps),k=Gs(C.type,k),tw(u,f,C,k,v);case 15:return nw(u,f,f.type,f.pendingProps,v);case 17:return C=f.type,k=f.pendingProps,k=f.elementType===C?k:Gs(C,k),wp(u,f),f.tag=1,pr(C)?(u=!0,hr(f)):u=!1,hc(f,v),wC(f,C,k),J0(f,C,k,v),hv(null,f,C,!0,u,v);case 19:return uw(u,f,v);case 22:return rw(u,f,v)}throw Error(i(156,f.tag))};function Dw(u,f){return Ne(u,f)}function VR(u,f,v,C){this.tag=u,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=C,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ss(u,f,v,C){return new VR(u,f,v,C)}function Lv(u){return u=u.prototype,!(!u||!u.isReactComponent)}function UR(u){if(typeof u=="function")return Lv(u)?1:0;if(u!=null){if(u=u.$$typeof,u===x)return 11;if(u===j)return 14}return 2}function zi(u,f){var v=u.alternate;return v===null?(v=Ss(u.tag,f,u.key,u.mode),v.elementType=u.elementType,v.type=u.type,v.stateNode=u.stateNode,v.alternate=u,u.alternate=v):(v.pendingProps=f,v.type=u.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=u.flags&14680064,v.childLanes=u.childLanes,v.lanes=u.lanes,v.child=u.child,v.memoizedProps=u.memoizedProps,v.memoizedState=u.memoizedState,v.updateQueue=u.updateQueue,f=u.dependencies,v.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},v.sibling=u.sibling,v.index=u.index,v.ref=u.ref,v}function Fp(u,f,v,C,k,P){var L=2;if(C=u,typeof u=="function")Lv(u)&&(L=1);else if(typeof u=="string")L=5;else e:switch(u){case h:return _l(v.children,k,P,f);case m:L=8,k|=8;break;case g:return u=Ss(12,v,f,k|2),u.elementType=g,u.lanes=P,u;case w:return u=Ss(13,v,f,k),u.elementType=w,u.lanes=P,u;case S:return u=Ss(19,v,f,k),u.elementType=S,u.lanes=P,u;case _:return Bp(v,k,P,f);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case b:L=10;break e;case y:L=9;break e;case x:L=11;break e;case j:L=14;break e;case I:L=16,C=null;break e}throw Error(i(130,u==null?u:typeof u,""))}return f=Ss(L,v,f,k),f.elementType=u,f.type=C,f.lanes=P,f}function _l(u,f,v,C){return u=Ss(7,u,C,f),u.lanes=v,u}function Bp(u,f,v,C){return u=Ss(22,u,C,f),u.elementType=_,u.lanes=v,u.stateNode={isHidden:!1},u}function zv(u,f,v){return u=Ss(6,u,null,f),u.lanes=v,u}function Fv(u,f,v){return f=Ss(4,u.children!==null?u.children:[],u.key,f),f.lanes=v,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function GR(u,f,v,C,k){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=W,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=St(0),this.expirationTimes=St(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.identifierPrefix=C,this.onRecoverableError=k,ge&&(this.mutableSourceEagerHydrationData=null)}function Tw(u,f,v,C,k,P,L,ce,be){return u=new GR(u,f,v,ce,be),f===1?(f=1,P===!0&&(f|=8)):f=0,P=Ss(3,null,null,f),u.current=P,P.stateNode=u,P.memoizedState={element:C,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},X0(P),u}function Nw(u){if(!u)return Ln;u=u._reactInternals;e:{if(D(u)!==u||u.tag!==1)throw Error(i(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(pr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(i(171))}if(u.tag===1){var v=u.type;if(pr(v))return Gn(u,v,f)}return f}function $w(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(i(188)):(u=Object.keys(u).join(","),Error(i(268,u)));return u=K(f),u===null?null:u.stateNode}function Lw(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var v=u.retryLane;u.retryLane=v!==0&&v=We&&P>=on&&k<=xt&&L<=ut){u.splice(f,1);break}else if(C!==We||v.width!==be.width||utL){if(!(P!==on||v.height!==be.height||xtk)){We>C&&(be.width+=We-C,be.x=C),xtP&&(be.height+=on-P,be.y=P),utv&&(v=L)),L ")+` - -No matching component was found for: - `)+u.join(" > ")}return null},n.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return te(u.child.stateNode);default:return u.child.stateNode}},n.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:qR,findFiberByHostInstance:u.findFiberByHostInstance||KR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)u=!0;else{try{cr=f.inject(u),_n=f}catch{}u=!!f.checkDCE}}return u},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(u,f,v,C){if(!Je)throw Error(i(363));u=Iv(u,f);var k=At(u,v,C).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(u,f){var v=f._getVersion;v=v(f._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[f,v]:u.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(u,f){var v=Oe;try{return Oe=u,f()}finally{Oe=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(u,f,v,C){var k=f.current,P=bo(),L=$i(k);return v=Nw(v),f.context===null?f.context=v:f.pendingContext=v,f=Qa(P,L),f.payload={element:u},C=C===void 0?null:C,C!==null&&(f.callback=C),u=Di(k,f,L),u!==null&&(ws(u,k,L,P),dp(u,k,L)),L},n};sR.exports=w0e;var S0e=sR.exports;const k0e=Sf(S0e);var aR={exports:{}},dc={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */dc.ConcurrentRoot=1;dc.ContinuousEventPriority=4;dc.DefaultEventPriority=16;dc.DiscreteEventPriority=1;dc.IdleEventPriority=536870912;dc.LegacyRoot=0;aR.exports=dc;var iR=aR.exports;const iI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let lI=!1,cI=!1;const iC=".react-konva-event",j0e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,_0e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,I0e={};function z0(e,t,n=I0e){if(!lI&&"zIndex"in t&&(console.warn(_0e),lI=!0),!cI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(j0e),cI=!0)}for(var s in n)if(!iI[s]){var i=s.slice(0,2)==="on",c=n[s]!==t[s];if(i&&c){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e.off(d,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},g=!1;const b={};for(var s in t)if(!iI[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(b[d]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(g=!0,m[s]=t[s])}g&&(e.setAttrs(m),bl(e));for(var d in b)e.on(d+iC,b[d])}function bl(e){if(!g9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const lR={},P0e={};Cf.Node.prototype._applyProps=z0;function E0e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),bl(e)}function M0e(e,t,n){let r=Cf[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Cf.Group);const o={},s={};for(var i in t){var c=i.slice(0,2)==="on";c?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return z0(d,s),d}function O0e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function A0e(e,t,n){return!1}function R0e(e){return e}function D0e(){return null}function T0e(){return null}function N0e(e,t,n,r){return P0e}function $0e(){}function L0e(e){}function z0e(e,t){return!1}function F0e(){return lR}function B0e(){return lR}const H0e=setTimeout,W0e=clearTimeout,V0e=-1;function U0e(e,t){return!1}const G0e=!1,q0e=!0,K0e=!0;function Q0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function X0e(e,t){t.parent===e?t.moveToTop():e.add(t),bl(e)}function cR(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),bl(e)}function Y0e(e,t,n){cR(e,t,n)}function J0e(e,t){t.destroy(),t.off(iC),bl(e)}function Z0e(e,t){t.destroy(),t.off(iC),bl(e)}function eve(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function tve(e,t,n){}function nve(e,t,n,r,o){z0(e,o,r)}function rve(e){e.hide(),bl(e)}function ove(e){}function sve(e,t){(t.visible==null||t.visible)&&e.show()}function ave(e,t){}function ive(e){}function lve(){}const cve=()=>iR.DefaultEventPriority,uve=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Q0e,appendChildToContainer:X0e,appendInitialChild:E0e,cancelTimeout:W0e,clearContainer:ive,commitMount:tve,commitTextUpdate:eve,commitUpdate:nve,createInstance:M0e,createTextInstance:O0e,detachDeletedInstance:lve,finalizeInitialChildren:A0e,getChildHostContext:B0e,getCurrentEventPriority:cve,getPublicInstance:R0e,getRootHostContext:F0e,hideInstance:rve,hideTextInstance:ove,idlePriority:Ih.unstable_IdlePriority,insertBefore:cR,insertInContainerBefore:Y0e,isPrimaryRenderer:G0e,noTimeout:V0e,now:Ih.unstable_now,prepareForCommit:D0e,preparePortalMount:T0e,prepareUpdate:N0e,removeChild:J0e,removeChildFromContainer:Z0e,resetAfterCommit:$0e,resetTextContent:L0e,run:Ih.unstable_runWithPriority,scheduleTimeout:H0e,shouldDeprioritizeSubtree:z0e,shouldSetTextContent:U0e,supportsMutation:K0e,unhideInstance:sve,unhideTextInstance:ave,warnsIfNotActing:q0e},Symbol.toStringTag,{value:"Module"}));var dve=Object.defineProperty,fve=Object.defineProperties,pve=Object.getOwnPropertyDescriptors,uI=Object.getOwnPropertySymbols,hve=Object.prototype.hasOwnProperty,mve=Object.prototype.propertyIsEnumerable,dI=(e,t,n)=>t in e?dve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fI=(e,t)=>{for(var n in t||(t={}))hve.call(t,n)&&dI(e,n,t[n]);if(uI)for(var n of uI(t))mve.call(t,n)&&dI(e,n,t[n]);return e},gve=(e,t)=>fve(e,pve(t));function uR(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=uR(r,t,n);if(o)return o;r=t?null:r.sibling}}function dR(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const lC=dR(l.createContext(null));class fR extends l.Component{render(){return l.createElement(lC.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:pI,ReactCurrentDispatcher:hI}=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function vve(){const e=l.useContext(lC);if(e===null)throw new Error("its-fine: useFiber must be called within a !");const t=l.useId();return l.useMemo(()=>{for(const r of[pI==null?void 0:pI.current,e,e==null?void 0:e.alternate]){if(!r)continue;const o=uR(r,!1,s=>{let i=s.memoizedState;for(;i;){if(i.memoizedState===t)return!0;i=i.next}});if(o)return o}},[e,t])}function bve(){var e,t;const n=vve(),[r]=l.useState(()=>new Map);r.clear();let o=n;for(;o;){const s=(e=o.type)==null?void 0:e._context;s&&s!==lC&&!r.has(s)&&r.set(s,(t=hI==null?void 0:hI.current)==null?void 0:t.readContext(dR(s))),o=o.return}return r}function xve(){const e=bve();return l.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>l.createElement(t,null,l.createElement(n.Provider,gve(fI({},r),{value:e.get(n)}))),t=>l.createElement(fR,fI({},t))),[e])}function yve(e){const t=z.useRef({});return z.useLayoutEffect(()=>{t.current=e}),z.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const Cve=e=>{const t=z.useRef(),n=z.useRef(),r=z.useRef(),o=yve(e),s=xve(),i=c=>{const{forwardedRef:d}=e;d&&(typeof d=="function"?d(c):d.current=c)};return z.useLayoutEffect(()=>(n.current=new Cf.Stage({width:e.width,height:e.height,container:t.current}),i(n.current),r.current=Nd.createContainer(n.current,iR.LegacyRoot,!1,null),Nd.updateContainer(z.createElement(s,{},e.children),r.current),()=>{Cf.isBrowser&&(i(null),Nd.updateContainer(null,r.current,null),n.current.destroy())}),[]),z.useLayoutEffect(()=>{i(n.current),z0(n.current,e,o),Nd.updateContainer(z.createElement(s,{},e.children),r.current,null)}),z.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Id="Layer",Fa="Group",Ba="Rect",Il="Circle",fg="Line",pR="Image",wve="Text",Sve="Transformer",Nd=k0e(uve);Nd.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:z.version,rendererPackageName:"react-konva"});const kve=z.forwardRef((e,t)=>z.createElement(fR,{},z.createElement(Cve,{...e,forwardedRef:t}))),jve=me([Ir,Vs],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),_ve=()=>{const e=le(),{tool:t,isStaging:n,isMovingBoundingBox:r}=H(jve);return{handleDragStart:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Xh(!0))},[e,r,n,t]),handleDragMove:l.useCallback(o=>{if(!((t==="move"||n)&&!r))return;const s={x:o.target.x(),y:o.target.y()};e(_P(s))},[e,r,n,t]),handleDragEnd:l.useCallback(()=>{(t==="move"||n)&&!r&&e(Xh(!1))},[e,r,n,t])}},Ive=me([Ir,lo,Vs],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isMaskEnabled:c,shouldSnapToGrid:d}=e;return{activeTabName:t,isCursorOnCanvas:!!r,shouldLockBoundingBox:o,shouldShowBoundingBox:s,tool:i,isStaging:n,isMaskEnabled:c,shouldSnapToGrid:d}},{memoizeOptions:{resultEqualityCheck:Nn}}),Pve=()=>{const e=le(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:o,isMaskEnabled:s,shouldSnapToGrid:i}=H(Ive),c=l.useRef(null),d=IP(),p=()=>e(PP());_t(["shift+c"],()=>{p()},{enabled:()=>!o,preventDefault:!0},[]);const h=()=>e(ny(!s));_t(["h"],()=>{h()},{enabled:()=>!o,preventDefault:!0},[s]),_t(["n"],()=>{e(Yh(!i))},{enabled:!0,preventDefault:!0},[i]),_t("esc",()=>{e(v9())},{enabled:()=>!0,preventDefault:!0}),_t("shift+h",()=>{e(b9(!n))},{enabled:()=>!o,preventDefault:!0},[t,n]),_t(["space"],m=>{m.repeat||(d==null||d.container().focus(),r!=="move"&&(c.current=r,e(Zc("move"))),r==="move"&&c.current&&c.current!=="move"&&(e(Zc(c.current)),c.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,c])},cC=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},hR=()=>{const e=le(),t=ab(),n=IP();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const o=x9.pixelRatio,[s,i,c,d]=t.getContext().getImageData(r.x*o,r.y*o,1,1).data;s===void 0||i===void 0||c===void 0||d===void 0||e(y9({r:s,g:i,b:c,a:d}))},commitColorUnderCursor:()=>{e(C9())}}},Eve=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Mve=e=>{const t=le(),{tool:n,isStaging:r}=H(Eve),{commitColorUnderCursor:o}=hR();return l.useCallback(s=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(Xh(!0));return}if(n==="colorPicker"){o();return}const i=cC(e.current);i&&(s.evt.preventDefault(),t(EP(!0)),t(w9([i.x,i.y])))},[e,n,r,t,o])},Ove=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Ave=(e,t,n)=>{const r=le(),{isDrawing:o,tool:s,isStaging:i}=H(Ove),{updateColorUnderCursor:c}=hR();return l.useCallback(()=>{if(!e.current)return;const d=cC(e.current);if(d){if(r(S9(d)),n.current=d,s==="colorPicker"){c();return}!o||s==="move"||i||(t.current=!0,r(MP([d.x,d.y])))}},[t,r,o,i,n,e,s,c])},Rve=()=>{const e=le();return l.useCallback(()=>{e(k9())},[e])},Dve=me([lo,Ir,Vs],(e,t,n)=>{const{tool:r,isDrawing:o}=t;return{tool:r,isDrawing:o,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),Tve=(e,t)=>{const n=le(),{tool:r,isDrawing:o,isStaging:s}=H(Dve);return l.useCallback(()=>{if(r==="move"||s){n(Xh(!1));return}if(!t.current&&o&&e.current){const i=cC(e.current);if(!i)return;n(MP([i.x,i.y]))}else t.current=!1;n(EP(!1))},[t,n,o,s,e,r])},Nve=me([Ir],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Nn}}),$ve=e=>{const t=le(),{isMoveStageKeyHeld:n,stageScale:r}=H(Nve);return l.useCallback(o=>{if(!e.current||n)return;o.evt.preventDefault();const s=e.current.getPointerPosition();if(!s)return;const i={x:(s.x-e.current.x())/r,y:(s.y-e.current.y())/r};let c=o.evt.deltaY;o.evt.ctrlKey&&(c=-c);const d=Hl(r*I9**c,_9,j9),p={x:s.x-i.x*d,y:s.y-i.y*d};t(P9(d)),t(_P(p))},[e,n,r,t])},Lve=me(Ir,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:o,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:s,stageCoordinates:i,stageDimensions:r,stageScale:o}},{memoizeOptions:{resultEqualityCheck:Nn}}),zve=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(Lve);return a.jsxs(Fa,{children:[a.jsx(Ba,{offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),a.jsx(Ba,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},Fve=l.memo(zve),Bve=me([Ir],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),Hve=()=>{const{stageScale:e,stageCoordinates:t,stageDimensions:n}=H(Bve),{colorMode:r}=ji(),[o,s]=l.useState([]),[i,c]=ea("colors",["base.800","base.200"]),d=l.useCallback(p=>p/e,[e]);return l.useLayoutEffect(()=>{const{width:p,height:h}=n,{x:m,y:g}=t,b={x1:0,y1:0,x2:p,y2:h,offset:{x:d(m),y:d(g)}},y={x:Math.ceil(d(m)/64)*64,y:Math.ceil(d(g)/64)*64},x={x1:-y.x,y1:-y.y,x2:d(p)-y.x+64,y2:d(h)-y.y+64},S={x1:Math.min(b.x1,x.x1),y1:Math.min(b.y1,x.y1),x2:Math.max(b.x2,x.x2),y2:Math.max(b.y2,x.y2)},j=S.x2-S.x1,I=S.y2-S.y1,_=Math.round(j/64)+1,M=Math.round(I/64)+1,E=kS(0,_).map(R=>a.jsx(fg,{x:S.x1+R*64,y:S.y1,points:[0,0,0,I],stroke:r==="dark"?i:c,strokeWidth:1},`x_${R}`)),A=kS(0,M).map(R=>a.jsx(fg,{x:S.x1,y:S.y1+R*64,points:[0,0,j,0],stroke:r==="dark"?i:c,strokeWidth:1},`y_${R}`));s(E.concat(A))},[e,t,n,d,r,i,c]),a.jsx(Fa,{children:o})},Wve=l.memo(Hve),Vve=me([we],({system:e,canvas:t})=>{const{denoiseProgress:n}=e,{boundingBox:r}=t.layerState.stagingArea,{batchIds:o}=t;return{boundingBox:r,progressImage:n&&o.includes(n.batch_id)?n.progress_image:void 0}},{memoizeOptions:{resultEqualityCheck:Nn}}),Uve=e=>{const{...t}=e,{progressImage:n,boundingBox:r}=H(Vve),[o,s]=l.useState(null);return l.useEffect(()=>{if(!n)return;const i=new Image;i.onload=()=>{s(i)},i.src=n.dataURL},[n]),n&&r&&o?a.jsx(pR,{x:r.x,y:r.y,width:r.width,height:r.height,image:o,listening:!1,...t}):null},Gve=l.memo(Uve),Bl=e=>{const{r:t,g:n,b:r,a:o}=e;return`rgba(${t}, ${n}, ${r}, ${o})`},qve=me(Ir,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:o}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:o,maskColorString:Bl(t)}}),mI=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),Kve=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=H(qve),[i,c]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(null),m=l.useCallback(()=>{p(d+1),setTimeout(m,500)},[d]);return l.useEffect(()=>{if(i)return;const g=new Image;g.onload=()=>{c(g)},g.src=mI(n)},[i,n]),l.useEffect(()=>{i&&(i.src=mI(n))},[i,n]),l.useEffect(()=>{const g=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(g)},[]),!i||!kc(r.x)||!kc(r.y)||!kc(s)||!kc(o.width)||!kc(o.height)?null:a.jsx(Ba,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:kc(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Qve=l.memo(Kve),Xve=me([Ir],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Nn}}),Yve=e=>{const{...t}=e,{objects:n}=H(Xve);return a.jsx(Fa,{listening:!1,...t,children:n.filter(E9).map((r,o)=>a.jsx(fg,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},o))})},Jve=l.memo(Yve);var Pl=l,Zve=function(t,n,r){const o=Pl.useRef("loading"),s=Pl.useRef(),[i,c]=Pl.useState(0),d=Pl.useRef(),p=Pl.useRef(),h=Pl.useRef();return(d.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,d.current=t,p.current=n,h.current=r),Pl.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function g(){o.current="loaded",s.current=m,c(Math.random())}function b(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",g),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",g),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const e1e=Sf(Zve),t1e=({canvasImage:e})=>{const[t,n,r,o]=ea("colors",["base.400","base.500","base.700","base.900"]),s=di(t,n),i=di(r,o),{t:c}=J();return a.jsxs(Fa,{children:[a.jsx(Ba,{x:e.x,y:e.y,width:e.width,height:e.height,fill:s}),a.jsx(wve,{x:e.x,y:e.y,width:e.width,height:e.height,align:"center",verticalAlign:"middle",fontFamily:'"Inter Variable", sans-serif',fontSize:e.width/16,fontStyle:"600",text:c("common.imageFailedToLoad"),fill:i})]})},n1e=l.memo(t1e),r1e=e=>{const{x:t,y:n,imageName:r}=e.canvasImage,{currentData:o,isError:s}=Rs(r??zs.skipToken),[i,c]=e1e((o==null?void 0:o.image_url)??"",GI.get()?"use-credentials":"anonymous");return s||c==="failed"?a.jsx(n1e,{canvasImage:e.canvasImage}):a.jsx(pR,{x:t,y:n,image:i,listening:!1})},mR=l.memo(r1e),o1e=me([Ir],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Nn}}),s1e=()=>{const{objects:e}=H(o1e);return e?a.jsx(Fa,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(M9(t))return a.jsx(mR,{canvasImage:t},n);if(O9(t)){const r=a.jsx(fg,{points:t.points,stroke:t.color?Bl(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?a.jsx(Fa,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(A9(t))return a.jsx(Ba,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Bl(t.color)},n);if(R9(t))return a.jsx(Ba,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},a1e=l.memo(s1e),i1e=me([Ir],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:o,boundingBoxDimensions:s}=e,{selectedImageIndex:i,images:c,boundingBox:d}=t.stagingArea;return{currentStagingAreaImage:c.length>0&&i!==void 0?c[i]:void 0,isOnFirstImage:i===0,isOnLastImage:i===c.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:(d==null?void 0:d.x)??o.x,y:(d==null?void 0:d.y)??o.y,width:(d==null?void 0:d.width)??s.width,height:(d==null?void 0:d.height)??s.height}},{memoizeOptions:{resultEqualityCheck:Nn}}),l1e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:c,height:d}=H(i1e);return a.jsxs(Fa,{...t,children:[r&&n&&a.jsx(mR,{canvasImage:n}),o&&a.jsxs(Fa,{children:[a.jsx(Ba,{x:s,y:i,width:c,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(Ba,{x:s,y:i,width:c,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},c1e=l.memo(l1e),u1e=me([Ir],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:o}=e;return{currentIndex:n,total:t.length,currentStagingAreaImage:t.length>0?t[n]:void 0,shouldShowStagingImage:o,shouldShowStagingOutline:r}},Ie),d1e=()=>{const e=le(),{currentStagingAreaImage:t,shouldShowStagingImage:n,currentIndex:r,total:o}=H(u1e),{t:s}=J(),i=l.useCallback(()=>{e(jS(!0))},[e]),c=l.useCallback(()=>{e(jS(!1))},[e]),d=l.useCallback(()=>e(D9()),[e]),p=l.useCallback(()=>e(T9()),[e]),h=l.useCallback(()=>e(N9()),[e]);_t(["left"],d,{enabled:()=>!0,preventDefault:!0}),_t(["right"],p,{enabled:()=>!0,preventDefault:!0}),_t(["enter"],()=>h,{enabled:()=>!0,preventDefault:!0});const{data:m}=Rs((t==null?void 0:t.imageName)??zs.skipToken),g=l.useCallback(()=>{e($9(!n))},[e,n]),b=l.useCallback(()=>{m&&e(L9({imageDTO:m}))},[e,m]),y=l.useCallback(()=>{e(z9())},[e]);return t?a.jsxs(N,{pos:"absolute",bottom:4,gap:2,w:"100%",align:"center",justify:"center",onMouseEnter:i,onMouseLeave:c,children:[a.jsxs(Hn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(rt,{tooltip:`${s("unifiedCanvas.previous")} (Left)`,"aria-label":`${s("unifiedCanvas.previous")} (Left)`,icon:a.jsx(wee,{}),onClick:d,colorScheme:"accent",isDisabled:!n}),a.jsx(Dt,{colorScheme:"base",pointerEvents:"none",isDisabled:!n,minW:20,children:`${r+1}/${o}`}),a.jsx(rt,{tooltip:`${s("unifiedCanvas.next")} (Right)`,"aria-label":`${s("unifiedCanvas.next")} (Right)`,icon:a.jsx(See,{}),onClick:p,colorScheme:"accent",isDisabled:!n})]}),a.jsxs(Hn,{isAttached:!0,borderRadius:"base",shadow:"dark-lg",children:[a.jsx(rt,{tooltip:`${s("unifiedCanvas.accept")} (Enter)`,"aria-label":`${s("unifiedCanvas.accept")} (Enter)`,icon:a.jsx(UM,{}),onClick:h,colorScheme:"accent"}),a.jsx(rt,{tooltip:s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"aria-label":s(n?"unifiedCanvas.showResultsOn":"unifiedCanvas.showResultsOff"),"data-alert":!n,icon:n?a.jsx(Nee,{}):a.jsx(Tee,{}),onClick:g,colorScheme:"accent"}),a.jsx(rt,{tooltip:s("unifiedCanvas.saveToGallery"),"aria-label":s("unifiedCanvas.saveToGallery"),isDisabled:!m||!m.is_intermediate,icon:a.jsx(o0,{}),onClick:b,colorScheme:"accent"}),a.jsx(rt,{tooltip:s("unifiedCanvas.discardAll"),"aria-label":s("unifiedCanvas.discardAll"),icon:a.jsx(ku,{}),onClick:y,colorScheme:"error",fontSize:20})]})]}):null},f1e=l.memo(d1e),p1e=()=>{const e=H(c=>c.canvas.layerState),t=H(c=>c.canvas.boundingBoxCoordinates),n=H(c=>c.canvas.boundingBoxDimensions),r=H(c=>c.canvas.isMaskEnabled),o=H(c=>c.canvas.shouldPreserveMaskedArea),[s,i]=l.useState();return l.useEffect(()=>{i(void 0)},[e,t,n,r,o]),lte(async()=>{const c=await F9(e,t,n,r,o);if(!c)return;const{baseImageData:d,maskImageData:p}=c,h=B9(d,p);i(h)},1e3,[e,t,n,r,o]),s},h1e={txt2img:"Text to Image",img2img:"Image to Image",inpaint:"Inpaint",outpaint:"Inpaint"},m1e=()=>{const e=p1e();return a.jsxs(Le,{children:["Mode: ",e?h1e[e]:"..."]})},g1e=l.memo(m1e),Xc=e=>Math.round(e*100)/100,v1e=me([Ir],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${Xc(n)}, ${Xc(r)})`}},{memoizeOptions:{resultEqualityCheck:Nn}});function b1e(){const{cursorCoordinatesString:e}=H(v1e),{t}=J();return a.jsx(Le,{children:`${t("unifiedCanvas.cursorPosition")}: ${e}`})}const jx="var(--invokeai-colors-warning-500)",x1e=me([Ir],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:o},boundingBoxDimensions:{width:s,height:i},scaledBoundingBoxDimensions:{width:c,height:d},boundingBoxCoordinates:{x:p,y:h},stageScale:m,shouldShowCanvasDebugInfo:g,layer:b,boundingBoxScaleMethod:y,shouldPreserveMaskedArea:x}=e;let w="inherit";return(y==="none"&&(s<512||i<512)||y==="manual"&&c*d<512*512)&&(w=jx),{activeLayerColor:b==="mask"?jx:"inherit",layer:b,boundingBoxColor:w,boundingBoxCoordinatesString:`(${Xc(p)}, ${Xc(h)})`,boundingBoxDimensionsString:`${s}×${i}`,scaledBoundingBoxDimensionsString:`${c}×${d}`,canvasCoordinatesString:`${Xc(r)}×${Xc(o)}`,canvasDimensionsString:`${t}×${n}`,canvasScaleString:Math.round(m*100),shouldShowCanvasDebugInfo:g,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none",shouldPreserveMaskedArea:x}},{memoizeOptions:{resultEqualityCheck:Nn}}),y1e=()=>{const{activeLayerColor:e,layer:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:o,scaledBoundingBoxDimensionsString:s,shouldShowScaledBoundingBox:i,canvasCoordinatesString:c,canvasDimensionsString:d,canvasScaleString:p,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:m,shouldPreserveMaskedArea:g}=H(x1e),{t:b}=J();return a.jsxs(N,{sx:{flexDirection:"column",position:"absolute",top:0,insetInlineStart:0,opacity:.65,display:"flex",fontSize:"sm",padding:1,px:2,minWidth:48,margin:1,borderRadius:"base",pointerEvents:"none",bg:"base.200",_dark:{bg:"base.800"}},children:[a.jsx(g1e,{}),a.jsx(Le,{style:{color:e},children:`${b("unifiedCanvas.activeLayer")}: ${b(`unifiedCanvas.${t}`)}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasScale")}: ${p}%`}),g&&a.jsxs(Le,{style:{color:jx},children:[b("unifiedCanvas.preserveMaskedArea"),": ",b("common.on")]}),m&&a.jsx(Le,{style:{color:n},children:`${b("unifiedCanvas.boundingBox")}: ${o}`}),i&&a.jsx(Le,{style:{color:n},children:`${b("unifiedCanvas.scaledBoundingBox")}: ${s}`}),h&&a.jsxs(a.Fragment,{children:[a.jsx(Le,{children:`${b("unifiedCanvas.boundingBoxPosition")}: ${r}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasDimensions")}: ${d}`}),a.jsx(Le,{children:`${b("unifiedCanvas.canvasPosition")}: ${c}`}),a.jsx(b1e,{})]})]})},C1e=l.memo(y1e),w1e=me([we],({canvas:e,generation:t})=>{const{boundingBoxCoordinates:n,boundingBoxDimensions:r,stageScale:o,isDrawing:s,isTransformingBoundingBox:i,isMovingBoundingBox:c,tool:d,shouldSnapToGrid:p}=e,{aspectRatio:h}=t;return{boundingBoxCoordinates:n,boundingBoxDimensions:r,isDrawing:s,isMovingBoundingBox:c,isTransformingBoundingBox:i,stageScale:o,shouldSnapToGrid:p,tool:d,hitStrokeWidth:20/o,aspectRatio:h}},{memoizeOptions:{resultEqualityCheck:Nn}}),S1e=e=>{const{...t}=e,n=le(),{boundingBoxCoordinates:r,boundingBoxDimensions:o,isDrawing:s,isMovingBoundingBox:i,isTransformingBoundingBox:c,stageScale:d,shouldSnapToGrid:p,tool:h,hitStrokeWidth:m,aspectRatio:g}=H(w1e),b=l.useRef(null),y=l.useRef(null),[x,w]=l.useState(!1);l.useEffect(()=>{var G;!b.current||!y.current||(b.current.nodes([y.current]),(G=b.current.getLayer())==null||G.batchDraw())},[]);const S=64*d;_t("N",()=>{n(Yh(!p))});const j=l.useCallback(G=>{if(!p){n(Gv({x:Math.floor(G.target.x()),y:Math.floor(G.target.y())}));return}const Q=G.target.x(),Z=G.target.y(),te=Ro(Q,64),V=Ro(Z,64);G.target.x(te),G.target.y(V),n(Gv({x:te,y:V}))},[n,p]),I=l.useCallback(()=>{if(!y.current)return;const G=y.current,Q=G.scaleX(),Z=G.scaleY(),te=Math.round(G.width()*Q),V=Math.round(G.height()*Z),oe=Math.round(G.x()),ne=Math.round(G.y());if(g){const se=Ro(te/g,64);n(na({width:te,height:se}))}else n(na({width:te,height:V}));n(Gv({x:p?Pd(oe,64):oe,y:p?Pd(ne,64):ne})),G.scaleX(1),G.scaleY(1)},[n,p,g]),_=l.useCallback((G,Q,Z)=>{const te=G.x%S,V=G.y%S;return{x:Pd(Q.x,S)+te,y:Pd(Q.y,S)+V}},[S]),M=l.useCallback(()=>{n(qv(!0))},[n]),E=l.useCallback(()=>{n(qv(!1)),n(Kv(!1)),n(Kp(!1)),w(!1)},[n]),A=l.useCallback(()=>{n(Kv(!0))},[n]),R=l.useCallback(()=>{n(qv(!1)),n(Kv(!1)),n(Kp(!1)),w(!1)},[n]),D=l.useCallback(()=>{w(!0)},[]),O=l.useCallback(()=>{!c&&!i&&w(!1)},[i,c]),T=l.useCallback(()=>{n(Kp(!0))},[n]),K=l.useCallback(()=>{n(Kp(!1))},[n]);return a.jsxs(Fa,{...t,children:[a.jsx(Ba,{height:o.height,width:o.width,x:r.x,y:r.y,onMouseEnter:T,onMouseOver:T,onMouseLeave:K,onMouseOut:K}),a.jsx(Ba,{draggable:!0,fillEnabled:!1,height:o.height,hitStrokeWidth:m,listening:!s&&h==="move",onDragStart:A,onDragEnd:R,onDragMove:j,onMouseDown:A,onMouseOut:O,onMouseOver:D,onMouseEnter:D,onMouseUp:R,onTransform:I,onTransformEnd:E,ref:y,stroke:x?"rgba(255,255,255,0.7)":"white",strokeWidth:(x?8:1)/d,width:o.width,x:r.x,y:r.y}),a.jsx(Sve,{anchorCornerRadius:3,anchorDragBoundFunc:_,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:h==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!s&&h==="move",onDragStart:A,onDragEnd:R,onMouseDown:M,onMouseUp:E,onTransformEnd:E,ref:b,rotateEnabled:!1})]})},k1e=l.memo(S1e),j1e=me(Ir,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:o,brushColor:s,tool:i,layer:c,shouldShowBrush:d,isMovingBoundingBox:p,isTransformingBoundingBox:h,stageScale:m,stageDimensions:g,boundingBoxCoordinates:b,boundingBoxDimensions:y,shouldRestrictStrokesToBox:x}=e,w=x?{clipX:b.x,clipY:b.y,clipWidth:y.width,clipHeight:y.height}:{};return{cursorPosition:t,brushX:t?t.x:g.width/2,brushY:t?t.y:g.height/2,radius:n/2,colorPickerOuterRadius:_S/m,colorPickerInnerRadius:(_S-ib+1)/m,maskColorString:Bl({...o,a:.5}),brushColorString:Bl(s),colorPickerColorString:Bl(r),tool:i,layer:c,shouldShowBrush:d,shouldDrawBrushPreview:!(p||h||!t)&&d,strokeWidth:1.5/m,dotRadius:1.5/m,clip:w}},{memoizeOptions:{resultEqualityCheck:Nn}}),_1e=e=>{const{...t}=e,{brushX:n,brushY:r,radius:o,maskColorString:s,tool:i,layer:c,shouldDrawBrushPreview:d,dotRadius:p,strokeWidth:h,brushColorString:m,colorPickerColorString:g,colorPickerInnerRadius:b,colorPickerOuterRadius:y,clip:x}=H(j1e);return d?a.jsxs(Fa,{listening:!1,...x,...t,children:[i==="colorPicker"?a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:y,stroke:m,strokeWidth:ib,strokeScaleEnabled:!1}),a.jsx(Il,{x:n,y:r,radius:b,stroke:g,strokeWidth:ib,strokeScaleEnabled:!1})]}):a.jsxs(a.Fragment,{children:[a.jsx(Il,{x:n,y:r,radius:o,fill:c==="mask"?s:m,globalCompositeOperation:i==="eraser"?"destination-out":"source-out"}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),a.jsx(Il,{x:n,y:r,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),a.jsx(Il,{x:n,y:r,radius:p*2,fill:"rgba(255,255,255,0.4)",listening:!1}),a.jsx(Il,{x:n,y:r,radius:p,fill:"rgba(0,0,0,1)",listening:!1})]}):null},I1e=l.memo(_1e),P1e=me([Ir,Vs],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:o,isTransformingBoundingBox:s,isMouseOverBoundingBox:i,isMovingBoundingBox:c,stageDimensions:d,stageCoordinates:p,tool:h,isMovingStage:m,shouldShowIntermediates:g,shouldShowGrid:b,shouldRestrictStrokesToBox:y,shouldAntialias:x}=e;let w="none";return h==="move"||t?m?w="grabbing":w="grab":s?w=void 0:y&&!i&&(w="default"),{isMaskEnabled:n,isModifyingBoundingBox:s||c,shouldShowBoundingBox:o,shouldShowGrid:b,stageCoordinates:p,stageCursor:w,stageDimensions:d,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:g,shouldAntialias:x}},Ie),E1e=Ae(kve,{shouldForwardProp:e=>!["sx"].includes(e)}),M1e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:o,stageCursor:s,stageDimensions:i,stageScale:c,tool:d,isStaging:p,shouldShowIntermediates:h,shouldAntialias:m}=H(P1e);Pve();const g=le(),b=l.useRef(null),y=l.useRef(null),x=l.useRef(null),w=l.useCallback(G=>{H9(G),y.current=G},[]),S=l.useCallback(G=>{W9(G),x.current=G},[]),j=l.useRef({x:0,y:0}),I=l.useRef(!1),_=$ve(y),M=Mve(y),E=Tve(y,I),A=Ave(y,I,j),R=Rve(),{handleDragStart:D,handleDragMove:O,handleDragEnd:T}=_ve(),K=l.useCallback(G=>G.evt.preventDefault(),[]);return l.useEffect(()=>{if(!b.current)return;const G=new ResizeObserver(te=>{for(const V of te)if(V.contentBoxSize){const{width:oe,height:ne}=V.contentRect;g(IS({width:oe,height:ne}))}});G.observe(b.current);const{width:Q,height:Z}=b.current.getBoundingClientRect();return g(IS({width:Q,height:Z})),()=>{G.disconnect()}},[g]),a.jsxs(N,{id:"canvas-container",ref:b,sx:{position:"relative",height:"100%",width:"100%",borderRadius:"base"},children:[a.jsx(Le,{sx:{position:"absolute"},children:a.jsxs(E1e,{tabIndex:-1,ref:w,sx:{outline:"none",overflow:"hidden",cursor:s||void 0,canvas:{outline:"none"}},x:o.x,y:o.y,width:i.width,height:i.height,scale:{x:c,y:c},onTouchStart:M,onTouchMove:A,onTouchEnd:E,onMouseDown:M,onMouseLeave:R,onMouseMove:A,onMouseUp:E,onDragStart:D,onDragMove:O,onDragEnd:T,onContextMenu:K,onWheel:_,draggable:(d==="move"||p)&&!t,children:[a.jsx(Id,{id:"grid",visible:r,children:a.jsx(Wve,{})}),a.jsx(Id,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:m,children:a.jsx(a1e,{})}),a.jsxs(Id,{id:"mask",visible:e&&!p,listening:!1,children:[a.jsx(Jve,{visible:!0,listening:!1}),a.jsx(Qve,{listening:!1})]}),a.jsx(Id,{children:a.jsx(Fve,{})}),a.jsxs(Id,{id:"preview",imageSmoothingEnabled:m,children:[!p&&a.jsx(I1e,{visible:d!=="move",listening:!1}),a.jsx(c1e,{visible:p}),h&&a.jsx(Gve,{}),a.jsx(k1e,{visible:n&&!p})]})]})}),a.jsx(C1e,{}),a.jsx(f1e,{})]})},O1e=l.memo(M1e);function A1e(e,t,n=250){const[r,o]=l.useState(0);return l.useEffect(()=>{const s=setTimeout(()=>{r===1&&e(),o(0)},n);return r===2&&t(),()=>clearTimeout(s)},[r,e,t,n]),()=>o(s=>s+1)}const V1={width:6,height:6,borderColor:"base.100"},R1e={".react-colorful__hue-pointer":V1,".react-colorful__saturation-pointer":V1,".react-colorful__alpha-pointer":V1,gap:2,flexDir:"column"},_h="4.2rem",D1e=e=>{const{color:t,onChange:n,withNumberInput:r,...o}=e,s=l.useCallback(p=>n({...t,r:p}),[t,n]),i=l.useCallback(p=>n({...t,g:p}),[t,n]),c=l.useCallback(p=>n({...t,b:p}),[t,n]),d=l.useCallback(p=>n({...t,a:p}),[t,n]);return a.jsxs(N,{sx:R1e,children:[a.jsx(pA,{color:t,onChange:n,style:{width:"100%"},...o}),r&&a.jsxs(N,{children:[a.jsx(_a,{value:t.r,onChange:s,min:0,max:255,step:1,label:"Red",w:_h}),a.jsx(_a,{value:t.g,onChange:i,min:0,max:255,step:1,label:"Green",w:_h}),a.jsx(_a,{value:t.b,onChange:c,min:0,max:255,step:1,label:"Blue",w:_h}),a.jsx(_a,{value:t.a,onChange:d,step:.1,min:0,max:1,label:"Alpha",w:_h,isInteger:!1})]})]})},gR=l.memo(D1e),T1e=me([Ir,Vs],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:o,shouldPreserveMaskedArea:s}=e;return{layer:r,maskColor:n,maskColorString:Bl(n),isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Nn}}),N1e=()=>{const e=le(),{t}=J(),{layer:n,maskColor:r,isMaskEnabled:o,shouldPreserveMaskedArea:s,isStaging:i}=H(T1e);_t(["q"],()=>{c()},{enabled:()=>!i,preventDefault:!0},[n]),_t(["shift+c"],()=>{d()},{enabled:()=>!i,preventDefault:!0},[]),_t(["h"],()=>{p()},{enabled:()=>!i,preventDefault:!0},[o]);const c=l.useCallback(()=>{e(OP(n==="mask"?"base":"mask"))},[e,n]),d=l.useCallback(()=>{e(PP())},[e]),p=l.useCallback(()=>{e(ny(!o))},[e,o]),h=l.useCallback(async()=>{e(V9())},[e]),m=l.useCallback(b=>{e(U9(b.target.checked))},[e]),g=l.useCallback(b=>{e(G9(b))},[e]);return a.jsx(tp,{triggerComponent:a.jsx(Hn,{children:a.jsx(rt,{"aria-label":t("unifiedCanvas.maskingOptions"),tooltip:t("unifiedCanvas.maskingOptions"),icon:a.jsx(ZM,{}),isChecked:n==="mask",isDisabled:i})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Eo,{label:`${t("unifiedCanvas.enableMask")} (H)`,isChecked:o,onChange:p}),a.jsx(Eo,{label:t("unifiedCanvas.preserveMaskedArea"),isChecked:s,onChange:m}),a.jsx(Le,{sx:{paddingTop:2,paddingBottom:2},children:a.jsx(gR,{color:r,onChange:g})}),a.jsx(Dt,{size:"sm",leftIcon:a.jsx(o0,{}),onClick:h,children:"Save Mask"}),a.jsxs(Dt,{size:"sm",leftIcon:a.jsx(Zo,{}),onClick:d,children:[t("unifiedCanvas.clearMask")," (Shift+C)"]})]})})},$1e=l.memo(N1e),L1e=me([we,lo],({canvas:e},t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Nn}});function z1e(){const e=le(),{canRedo:t,activeTabName:n}=H(L1e),{t:r}=J(),o=l.useCallback(()=>{e(q9())},[e]);return _t(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{o()},{enabled:()=>t,preventDefault:!0},[n,t]),a.jsx(rt,{"aria-label":`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,icon:a.jsx(Qee,{}),onClick:o,isDisabled:!t})}const F1e=()=>{const e=H(Vs),t=le(),{t:n}=J(),r=l.useCallback(()=>t(K9()),[t]);return a.jsxs(_0,{title:n("unifiedCanvas.clearCanvasHistory"),acceptCallback:r,acceptButtonText:n("unifiedCanvas.clearHistory"),triggerComponent:a.jsx(Dt,{size:"sm",leftIcon:a.jsx(Zo,{}),isDisabled:e,children:n("unifiedCanvas.clearCanvasHistory")}),children:[a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryMessage")}),a.jsx("br",{}),a.jsx("p",{children:n("unifiedCanvas.clearCanvasHistoryConfirm")})]})},B1e=l.memo(F1e),H1e=me([Ir],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:o,shouldShowGrid:s,shouldShowIntermediates:i,shouldSnapToGrid:c,shouldRestrictStrokesToBox:d,shouldAntialias:p}},{memoizeOptions:{resultEqualityCheck:Nn}}),W1e=()=>{const e=le(),{t}=J(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:s,shouldShowGrid:i,shouldShowIntermediates:c,shouldSnapToGrid:d,shouldRestrictStrokesToBox:p,shouldAntialias:h}=H(H1e);_t(["n"],()=>{e(Yh(!d))},{enabled:!0,preventDefault:!0},[d]);const m=l.useCallback(_=>e(Yh(_.target.checked)),[e]),g=l.useCallback(_=>e(Q9(_.target.checked)),[e]),b=l.useCallback(_=>e(X9(_.target.checked)),[e]),y=l.useCallback(_=>e(Y9(_.target.checked)),[e]),x=l.useCallback(_=>e(J9(_.target.checked)),[e]),w=l.useCallback(_=>e(Z9(_.target.checked)),[e]),S=l.useCallback(_=>e(e$(_.target.checked)),[e]),j=l.useCallback(_=>e(t$(_.target.checked)),[e]),I=l.useCallback(_=>e(n$(_.target.checked)),[e]);return a.jsx(tp,{isLazy:!1,triggerComponent:a.jsx(rt,{tooltip:t("unifiedCanvas.canvasSettings"),"aria-label":t("unifiedCanvas.canvasSettings"),icon:a.jsx(rO,{})}),children:a.jsxs(N,{direction:"column",gap:2,children:[a.jsx(Eo,{label:t("unifiedCanvas.showIntermediates"),isChecked:c,onChange:g}),a.jsx(Eo,{label:t("unifiedCanvas.showGrid"),isChecked:i,onChange:b}),a.jsx(Eo,{label:t("unifiedCanvas.snapToGrid"),isChecked:d,onChange:m}),a.jsx(Eo,{label:t("unifiedCanvas.darkenOutsideSelection"),isChecked:o,onChange:y}),a.jsx(Eo,{label:t("unifiedCanvas.autoSaveToGallery"),isChecked:n,onChange:x}),a.jsx(Eo,{label:t("unifiedCanvas.saveBoxRegionOnly"),isChecked:r,onChange:w}),a.jsx(Eo,{label:t("unifiedCanvas.limitStrokesToBox"),isChecked:p,onChange:S}),a.jsx(Eo,{label:t("unifiedCanvas.showCanvasDebugInfo"),isChecked:s,onChange:j}),a.jsx(Eo,{label:t("unifiedCanvas.antialiasing"),isChecked:h,onChange:I}),a.jsx(B1e,{})]})})},V1e=l.memo(W1e),U1e=me([we,Vs],({canvas:e},t)=>{const{tool:n,brushColor:r,brushSize:o}=e;return{tool:n,isStaging:t,brushColor:r,brushSize:o}},{memoizeOptions:{resultEqualityCheck:Nn}}),G1e=()=>{const e=le(),{tool:t,brushColor:n,brushSize:r,isStaging:o}=H(U1e),{t:s}=J();_t(["b"],()=>{i()},{enabled:()=>!o,preventDefault:!0},[]),_t(["e"],()=>{c()},{enabled:()=>!o,preventDefault:!0},[t]),_t(["c"],()=>{d()},{enabled:()=>!o,preventDefault:!0},[t]),_t(["shift+f"],()=>{p()},{enabled:()=>!o,preventDefault:!0}),_t(["delete","backspace"],()=>{h()},{enabled:()=>!o,preventDefault:!0}),_t(["BracketLeft"],()=>{r-5<=5?e(Qp(Math.max(r-1,1))):e(Qp(Math.max(r-5,1)))},{enabled:()=>!o,preventDefault:!0},[r]),_t(["BracketRight"],()=>{e(Qp(Math.min(r+5,500)))},{enabled:()=>!o,preventDefault:!0},[r]),_t(["Shift+BracketLeft"],()=>{e(Qv({...n,a:Hl(n.a-.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]),_t(["Shift+BracketRight"],()=>{e(Qv({...n,a:Hl(n.a+.05,.05,1)}))},{enabled:()=>!o,preventDefault:!0},[n]);const i=l.useCallback(()=>{e(Zc("brush"))},[e]),c=l.useCallback(()=>{e(Zc("eraser"))},[e]),d=l.useCallback(()=>{e(Zc("colorPicker"))},[e]),p=l.useCallback(()=>{e(r$())},[e]),h=l.useCallback(()=>{e(o$())},[e]),m=l.useCallback(b=>{e(Qp(b))},[e]),g=l.useCallback(b=>{e(Qv(b))},[e]);return a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${s("unifiedCanvas.brush")} (B)`,tooltip:`${s("unifiedCanvas.brush")} (B)`,icon:a.jsx(Uee,{}),isChecked:t==="brush"&&!o,onClick:i,isDisabled:o}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.eraser")} (E)`,tooltip:`${s("unifiedCanvas.eraser")} (E)`,icon:a.jsx(Oee,{}),isChecked:t==="eraser"&&!o,isDisabled:o,onClick:c}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,tooltip:`${s("unifiedCanvas.fillBoundingBox")} (Shift+F)`,icon:a.jsx($ee,{}),isDisabled:o,onClick:p}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,tooltip:`${s("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,icon:a.jsx(Zi,{style:{transform:"rotate(45deg)"}}),isDisabled:o,onClick:h}),a.jsx(rt,{"aria-label":`${s("unifiedCanvas.colorPicker")} (C)`,tooltip:`${s("unifiedCanvas.colorPicker")} (C)`,icon:a.jsx(Dee,{}),isChecked:t==="colorPicker"&&!o,isDisabled:o,onClick:d}),a.jsx(tp,{triggerComponent:a.jsx(rt,{"aria-label":s("unifiedCanvas.brushOptions"),tooltip:s("unifiedCanvas.brushOptions"),icon:a.jsx(nO,{})}),children:a.jsxs(N,{minWidth:60,direction:"column",gap:4,width:"100%",children:[a.jsx(N,{gap:4,justifyContent:"space-between",children:a.jsx(It,{label:s("unifiedCanvas.brushSize"),value:r,withInput:!0,onChange:m,sliderNumberInputProps:{max:500}})}),a.jsx(Le,{sx:{width:"100%",paddingTop:2,paddingBottom:2},children:a.jsx(gR,{withNumberInput:!0,color:n,onChange:g})})]})})]})},q1e=l.memo(G1e),K1e=me([we,lo],({canvas:e},t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Nn}});function Q1e(){const e=le(),{t}=J(),{canUndo:n,activeTabName:r}=H(K1e),o=l.useCallback(()=>{e(s$())},[e]);return _t(["meta+z","ctrl+z"],()=>{o()},{enabled:()=>n,preventDefault:!0},[r,n]),a.jsx(rt,{"aria-label":`${t("unifiedCanvas.undo")} (Ctrl+Z)`,tooltip:`${t("unifiedCanvas.undo")} (Ctrl+Z)`,icon:a.jsx(a0,{}),onClick:o,isDisabled:!n})}const X1e=me([we,Vs],({canvas:e},t)=>{const{tool:n,shouldCropToBoundingBoxOnSave:r,layer:o,isMaskEnabled:s}=e;return{isStaging:t,isMaskEnabled:s,tool:n,layer:o,shouldCropToBoundingBoxOnSave:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),Y1e=()=>{const e=le(),{isStaging:t,isMaskEnabled:n,layer:r,tool:o}=H(X1e),s=ab(),{t:i}=J(),{isClipboardAPIAvailable:c}=P8(),{getUploadButtonProps:d,getUploadInputProps:p}=D2({postUploadAction:{type:"SET_CANVAS_INITIAL_IMAGE"}});_t(["v"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[]),_t(["r"],()=>{g()},{enabled:()=>!0,preventDefault:!0},[s]),_t(["shift+m"],()=>{y()},{enabled:()=>!t,preventDefault:!0},[s]),_t(["shift+s"],()=>{x()},{enabled:()=>!t,preventDefault:!0},[s]),_t(["meta+c","ctrl+c"],()=>{w()},{enabled:()=>!t&&c,preventDefault:!0},[s,c]),_t(["shift+d"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s]);const h=l.useCallback(()=>{e(Zc("move"))},[e]),m=A1e(()=>g(!1),()=>g(!0)),g=(I=!1)=>{const _=ab();if(!_)return;const M=_.getClientRect({skipTransform:!0});e(d$({contentRect:M,shouldScaleTo1:I}))},b=l.useCallback(()=>{e(DI())},[e]),y=l.useCallback(()=>{e(a$())},[e]),x=l.useCallback(()=>{e(i$())},[e]),w=l.useCallback(()=>{c&&e(l$())},[e,c]),S=l.useCallback(()=>{e(c$())},[e]),j=l.useCallback(I=>{const _=I;e(OP(_)),_==="mask"&&!n&&e(ny(!0))},[e,n]);return a.jsxs(N,{sx:{alignItems:"center",gap:2,flexWrap:"wrap"},children:[a.jsx(Le,{w:24,children:a.jsx(Dr,{tooltip:`${i("unifiedCanvas.layer")} (Q)`,value:r,data:u$,onChange:j,disabled:t})}),a.jsx($1e,{}),a.jsx(q1e,{}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("unifiedCanvas.move")} (V)`,tooltip:`${i("unifiedCanvas.move")} (V)`,icon:a.jsx(kee,{}),isChecked:o==="move"||t,onClick:h}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.resetView")} (R)`,tooltip:`${i("unifiedCanvas.resetView")} (R)`,icon:a.jsx(Pee,{}),onClick:m})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,tooltip:`${i("unifiedCanvas.mergeVisible")} (Shift+M)`,icon:a.jsx(Hee,{}),onClick:y,isDisabled:t}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,tooltip:`${i("unifiedCanvas.saveToGallery")} (Shift+S)`,icon:a.jsx(o0,{}),onClick:x,isDisabled:t}),c&&a.jsx(rt,{"aria-label":`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${i("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,icon:a.jsx(Hu,{}),onClick:w,isDisabled:t}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,tooltip:`${i("unifiedCanvas.downloadAsImage")} (Shift+D)`,icon:a.jsx(Wu,{}),onClick:S,isDisabled:t})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(Q1e,{}),a.jsx(z1e,{})]}),a.jsxs(Hn,{isAttached:!0,children:[a.jsx(rt,{"aria-label":`${i("common.upload")}`,tooltip:`${i("common.upload")}`,icon:a.jsx(i0,{}),isDisabled:t,...d()}),a.jsx("input",{...p()}),a.jsx(rt,{"aria-label":`${i("unifiedCanvas.clearCanvas")}`,tooltip:`${i("unifiedCanvas.clearCanvas")}`,icon:a.jsx(Zo,{}),onClick:b,colorScheme:"error",isDisabled:t})]}),a.jsx(Hn,{isAttached:!0,children:a.jsx(V1e,{})})]})},J1e=l.memo(Y1e),gI={id:"canvas-intial-image",actionType:"SET_CANVAS_INITIAL_IMAGE"},Z1e=()=>{const{isOver:e,setNodeRef:t,active:n}=WO({id:"unifiedCanvas",data:gI});return a.jsxs(N,{layerStyle:"first",ref:t,tabIndex:-1,sx:{flexDirection:"column",alignItems:"center",gap:4,p:2,borderRadius:"base",w:"full",h:"full"},children:[a.jsx(J1e,{}),a.jsx(O1e,{}),VO(gI,n)&&a.jsx(UO,{isOver:e,label:"Set Canvas Initial Image"})]})},ebe=l.memo(Z1e),tbe=()=>a.jsx(ebe,{}),nbe=l.memo(tbe),rbe=[{id:"txt2img",translationKey:"common.txt2img",icon:a.jsx(Gr,{as:Lee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(y0e,{})},{id:"img2img",translationKey:"common.img2img",icon:a.jsx(Gr,{as:Xl,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Dpe,{})},{id:"unifiedCanvas",translationKey:"common.unifiedCanvas",icon:a.jsx(Gr,{as:hse,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(nbe,{})},{id:"nodes",translationKey:"common.nodes",icon:a.jsx(Gr,{as:T2,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Ege,{})},{id:"modelManager",translationKey:"modelManager.modelManager",icon:a.jsx(Gr,{as:Eee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(Ahe,{})},{id:"queue",translationKey:"queue.queue",icon:a.jsx(Gr,{as:Zee,sx:{boxSize:6,pointerEvents:"none"}}),content:a.jsx(b0e,{})}],obe=me([we],({config:e})=>{const{disabledTabs:t}=e;return rbe.filter(r=>!t.includes(r.id))},{memoizeOptions:{resultEqualityCheck:Nn}}),sbe=448,abe=448,ibe=360,lbe=["modelManager","queue"],cbe=["modelManager","queue"],ube=()=>{const e=H(f$),t=H(lo),n=H(obe),{t:r}=J(),o=le(),s=l.useCallback(O=>{O.target instanceof HTMLElement&&O.target.blur()},[]),i=l.useMemo(()=>n.map(O=>a.jsx(Wn,{hasArrow:!0,label:String(r(O.translationKey)),placement:"end",children:a.jsxs(wo,{onClick:s,children:[a.jsx(GP,{children:String(r(O.translationKey))}),O.icon]})},O.id)),[n,r,s]),c=l.useMemo(()=>n.map(O=>a.jsx(Go,{children:O.content},O.id)),[n]),d=l.useCallback(O=>{const T=n[O];T&&o(ni(T.id))},[o,n]),{minSize:p,isCollapsed:h,setIsCollapsed:m,ref:g,reset:b,expand:y,collapse:x,toggle:w}=I_(sbe,"pixels"),{ref:S,minSize:j,isCollapsed:I,setIsCollapsed:_,reset:M,expand:E,collapse:A,toggle:R}=I_(ibe,"pixels");_t("f",()=>{I||h?(E(),y()):(x(),A())},[o,I,h]),_t(["t","o"],()=>{w()},[o]),_t("g",()=>{R()},[o]);const D=G2();return a.jsxs(tc,{variant:"appTabs",defaultIndex:e,index:e,onChange:d,sx:{flexGrow:1,gap:4},isLazy:!0,children:[a.jsxs(nc,{sx:{pt:2,gap:4,flexDir:"column"},children:[i,a.jsx(Pi,{})]}),a.jsxs(E0,{id:"app",autoSaveId:"app",direction:"horizontal",style:{height:"100%",width:"100%"},storage:D,units:"pixels",children:[!cbe.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(el,{order:0,id:"side",ref:g,defaultSize:p,minSize:p,onCollapse:m,collapsible:!0,children:t==="nodes"?a.jsx(kle,{}):a.jsx(rpe,{})}),a.jsx(lg,{onDoubleClick:b,collapsedDirection:h?"left":void 0}),a.jsx(Ple,{isSidePanelCollapsed:h,sidePanelRef:g})]}),a.jsx(el,{id:"main",order:1,minSize:abe,children:a.jsx($u,{style:{height:"100%",width:"100%"},children:c})}),!lbe.includes(t)&&a.jsxs(a.Fragment,{children:[a.jsx(lg,{onDoubleClick:M,collapsedDirection:I?"right":void 0}),a.jsx(el,{id:"gallery",ref:S,order:2,defaultSize:j,minSize:j,onCollapse:_,collapsible:!0,children:a.jsx(Qse,{})}),a.jsx(_le,{isGalleryCollapsed:I,galleryPanelRef:S})]})]})]})},dbe=l.memo(ube),fbe=l.createContext(null),U1={didCatch:!1,error:null};class pbe extends l.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=U1}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,s=new Array(o),i=0;i0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function mbe(e={}){let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");const n=new URL(`${t}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(const o of r){let s=e[o];if(s!==void 0){if(o==="labels"||o==="projects"){if(!Array.isArray(s))throw new TypeError(`The \`${o}\` option should be an array`);s=s.join(",")}n.searchParams.set(o,s)}}return n.toString()}const gbe=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),vbe=new Map(gbe),bbe=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],_x=new WeakSet,xbe=e=>{_x.add(e);const t=e.toJSON();return _x.delete(e),t},ybe=e=>vbe.get(e)??Error,vR=({from:e,seen:t,to:n,forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c})=>{if(!n)if(Array.isArray(e))n=[];else if(!c&&vI(e)){const p=ybe(e.name);n=new p}else n={};if(t.push(e),s>=o)return n;if(i&&typeof e.toJSON=="function"&&!_x.has(e))return xbe(e);const d=p=>vR({from:p,seen:[...t],forceEnumerable:r,maxDepth:o,depth:s,useToJSON:i,serialize:c});for(const[p,h]of Object.entries(e)){if(typeof Buffer=="function"&&Buffer.isBuffer(h)){n[p]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){n[p]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){try{n[p]=h}catch{}continue}if(!t.includes(e[p])){s++,n[p]=d(e[p]);continue}n[p]="[Circular]"}}for(const{property:p,enumerable:h}of bbe)typeof e[p]<"u"&&e[p]!==null&&Object.defineProperty(n,p,{value:vI(e[p])?d(e[p]):e[p],enumerable:r?!0:h,configurable:!0,writable:!0});return n};function Cbe(e,t={}){const{maxDepth:n=Number.POSITIVE_INFINITY,useToJSON:r=!0}=t;return typeof e=="object"&&e!==null?vR({from:e,seen:[],forceEnumerable:!0,maxDepth:n,depth:0,useToJSON:r,serialize:!0}):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e}function vI(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}const wbe=({error:e,resetErrorBoundary:t})=>{const n=p$(),r=l.useCallback(()=>{const s=JSON.stringify(Cbe(e),null,2);navigator.clipboard.writeText(`\`\`\` -${s} -\`\`\``),n({title:"Error Copied"})},[e,n]),o=l.useMemo(()=>mbe({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx(N,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(yo,{children:"Something went wrong"}),a.jsx(N,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(je,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs(N,{sx:{gap:4},children:[a.jsx(Dt,{leftIcon:a.jsx(ise,{}),onClick:t,children:"Reset UI"}),a.jsx(Dt,{leftIcon:a.jsx(Hu,{}),onClick:r,children:"Copy Error"}),a.jsx(Ig,{href:o,isExternal:!0,children:a.jsx(Dt,{leftIcon:a.jsx(l2,{}),children:"Create Issue"})})]})]})})},Sbe=l.memo(wbe),kbe=me([we],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:Nn}}),jbe=()=>{const e=le(),{shift:t,ctrl:n,meta:r}=H(kbe),{queueBack:o,isDisabled:s,isLoading:i}=D8();_t(["ctrl+enter","meta+enter"],o,{enabled:()=>!s&&!i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s,i]);const{queueFront:c,isDisabled:d,isLoading:p}=L8();return _t(["ctrl+shift+enter","meta+shift+enter"],c,{enabled:()=>!d&&!p,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[c,d,p]),_t("*",()=>{Th("shift")?!t&&e(Qo(!0)):t&&e(Qo(!1)),Th("ctrl")?!n&&e(PS(!0)):n&&e(PS(!1)),Th("meta")?!r&&e(ES(!0)):r&&e(ES(!1))},{keyup:!0,keydown:!0},[t,n,r]),_t("1",()=>{e(ni("txt2img"))}),_t("2",()=>{e(ni("img2img"))}),_t("3",()=>{e(ni("unifiedCanvas"))}),_t("4",()=>{e(ni("nodes"))}),_t("5",()=>{e(ni("modelManager"))}),null},_be=l.memo(jbe),Ibe=e=>{const t=le(),{recallAllParameters:n}=j0(),r=Zl(),{currentData:o}=Rs((e==null?void 0:e.imageName)??zs.skipToken),{currentData:s}=qI((e==null?void 0:e.imageName)??zs.skipToken),i=l.useCallback(()=>{o&&(t(XI(o)),t(ni("unifiedCanvas")),r({title:$I("toast.sentToUnifiedCanvas"),status:"info",duration:2500,isClosable:!0}))},[t,r,o]),c=l.useCallback(()=>{o&&t(gg(o))},[t,o]),d=l.useCallback(()=>{s&&n(s.metadata)},[s]);return l.useEffect(()=>{e&&e.action==="sendToCanvas"&&i()},[e,i]),l.useEffect(()=>{e&&e.action==="sendToImg2Img"&&c()},[e,c]),l.useEffect(()=>{e&&e.action==="useAllParameters"&&d()},[e,d]),{handleSendToCanvas:i,handleSendToImg2Img:c,handleUseAllMetadata:d}},Pbe=e=>(Ibe(e.selectedImage),null),Ebe=l.memo(Pbe),Mbe={},Obe=({config:e=Mbe,selectedImage:t})=>{const n=H(aO),r=X3("system"),o=le(),s=l.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);l.useEffect(()=>{an.changeLanguage(n)},[n]),l.useEffect(()=>{uP(e)&&(r.info({config:e},"Received config"),o(h$(e)))},[o,e,r]),l.useEffect(()=>{o(m$())},[o]);const i=Xg(v$);return a.jsxs(pbe,{onReset:s,FallbackComponent:Sbe,children:[a.jsx(rl,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(DG,{children:a.jsxs(rl,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[i||a.jsx(Ite,{}),a.jsx(N,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(dbe,{})})]})})}),a.jsx(hee,{}),a.jsx(uee,{}),a.jsx(g$,{}),a.jsx(_be,{}),a.jsx(Ebe,{selectedImage:t})]})},$be=l.memo(Obe);export{$be as default}; diff --git a/invokeai/frontend/web/dist/assets/MantineProvider-094ba0de.js b/invokeai/frontend/web/dist/assets/MantineProvider-094ba0de.js new file mode 100644 index 0000000000..6a64f214ec --- /dev/null +++ b/invokeai/frontend/web/dist/assets/MantineProvider-094ba0de.js @@ -0,0 +1 @@ +import{a6 as d,ie as _,v as h,ir as X}from"./index-c553e366.js";const Y={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function q(r){return()=>({fontFamily:r.fontFamily||"sans-serif"})}var J=Object.defineProperty,x=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,z=(r,e,o)=>e in r?J(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,j=(r,e)=>{for(var o in e||(e={}))K.call(e,o)&&z(r,o,e[o]);if(x)for(var o of x(e))Q.call(e,o)&&z(r,o,e[o]);return r};function Z(r){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:j({},r.focusRing==="always"||r.focusRing==="auto"?r.focusRingStyles.styles(r):r.focusRingStyles.resetStyles(r)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:j({},r.focusRing==="auto"||r.focusRing==="never"?r.focusRingStyles.resetStyles(r):null)})}function y(r){return e=>typeof r.primaryShade=="number"?r.primaryShade:r.primaryShade[e||r.colorScheme]}function w(r){const e=y(r);return(o,n,a=!0,t=!0)=>{if(typeof o=="string"&&o.includes(".")){const[s,l]=o.split("."),g=parseInt(l,10);if(s in r.colors&&g>=0&&g<10)return r.colors[s][typeof n=="number"&&!t?n:g]}const i=typeof n=="number"?n:e();return o in r.colors?r.colors[o][i]:a?r.colors[r.primaryColor][i]:o}}function T(r){let e="";for(let o=1;o{const a={from:(n==null?void 0:n.from)||r.defaultGradient.from,to:(n==null?void 0:n.to)||r.defaultGradient.to,deg:(n==null?void 0:n.deg)||r.defaultGradient.deg};return`linear-gradient(${a.deg}deg, ${e(a.from,o(),!1)} 0%, ${e(a.to,o(),!1)} 100%)`}}function D(r){return e=>{if(typeof e=="number")return`${e/16}${r}`;if(typeof e=="string"){const o=e.replace("px","");if(!Number.isNaN(Number(o)))return`${Number(o)/16}${r}`}return e}}const u=D("rem"),k=D("em");function V({size:r,sizes:e,units:o}){return r in e?e[r]:typeof r=="number"?o==="em"?k(r):u(r):r||e.md}function S(r){return typeof r=="number"?r:typeof r=="string"&&r.includes("rem")?Number(r.replace("rem",""))*16:typeof r=="string"&&r.includes("em")?Number(r.replace("em",""))*16:Number(r)}function er(r){return e=>`@media (min-width: ${k(S(V({size:e,sizes:r.breakpoints})))})`}function or(r){return e=>`@media (max-width: ${k(S(V({size:e,sizes:r.breakpoints}))-1)})`}function nr(r){return/^#?([0-9A-F]{3}){1,2}$/i.test(r)}function tr(r){let e=r.replace("#","");if(e.length===3){const i=e.split("");e=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const o=parseInt(e,16),n=o>>16&255,a=o>>8&255,t=o&255;return{r:n,g:a,b:t,a:1}}function ar(r){const[e,o,n,a]=r.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:o,b:n,a:a||1}}function C(r){return nr(r)?tr(r):r.startsWith("rgb")?ar(r):{r:0,g:0,b:0,a:1}}function p(r,e){if(typeof r!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(r.startsWith("var(--"))return r;const{r:o,g:n,b:a}=C(r);return`rgba(${o}, ${n}, ${a}, ${e})`}function ir(r=0){return{position:"absolute",top:u(r),right:u(r),left:u(r),bottom:u(r)}}function sr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=1-e,s=l=>Math.round(l*i);return`rgba(${s(o)}, ${s(n)}, ${s(a)}, ${t})`}function lr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=s=>Math.round(s+(255-s)*e);return`rgba(${i(o)}, ${i(n)}, ${i(a)}, ${t})`}function fr(r){return e=>{if(typeof e=="number")return u(e);const o=typeof r.defaultRadius=="number"?r.defaultRadius:r.radius[r.defaultRadius]||r.defaultRadius;return r.radius[e]||e||o}}function cr(r,e){if(typeof r=="string"&&r.includes(".")){const[o,n]=r.split("."),a=parseInt(n,10);if(o in e.colors&&a>=0&&a<10)return{isSplittedColor:!0,key:o,shade:a}}return{isSplittedColor:!1}}function dr(r){const e=w(r),o=y(r),n=G(r);return({variant:a,color:t,gradient:i,primaryFallback:s})=>{const l=cr(t,r);switch(a){case"light":return{border:"transparent",background:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1),color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?7:1,s,!1),r.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1)};case"outline":return{border:e(t,r.colorScheme==="dark"?5:o("light")),background:"transparent",color:e(t,r.colorScheme==="dark"?5:o("light")),hover:r.colorScheme==="dark"?p(e(t,5,s,!1),.05):p(e(t,0,s,!1),.35)};case"default":return{border:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[4],background:r.colorScheme==="dark"?r.colors.dark[6]:r.white,color:r.colorScheme==="dark"?r.white:r.black,hover:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[0]};case"white":return{border:"transparent",background:r.white,color:e(t,o()),hover:null};case"transparent":return{border:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),background:"transparent",hover:null};case"gradient":return{background:n(i),color:r.white,border:"transparent",hover:null};default:{const g=o(),$=l.isSplittedColor?l.shade:g,O=l.isSplittedColor?l.key:t;return{border:"transparent",background:e(O,$,s),color:r.white,hover:e(O,$===9?8:$+1)}}}}}function ur(r){return e=>{const o=y(r)(e);return r.colors[r.primaryColor][o]}}function pr(r){return{"@media (hover: hover)":{"&:hover":r},"@media (hover: none)":{"&:active":r}}}function gr(r){return()=>({userSelect:"none",color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]})}function br(r){return()=>r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]}const f={fontStyles:q,themeColor:w,focusStyles:Z,linearGradient:B,radialGradient:rr,smallerThan:or,largerThan:er,rgba:p,cover:ir,darken:sr,lighten:lr,radius:fr,variant:dr,primaryShade:y,hover:pr,gradient:G,primaryColor:ur,placeholderStyles:gr,dimmed:br};var mr=Object.defineProperty,yr=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,F=(r,e,o)=>e in r?mr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,hr=(r,e)=>{for(var o in e||(e={}))vr.call(e,o)&&F(r,o,e[o]);if(R)for(var o of R(e))_r.call(e,o)&&F(r,o,e[o]);return r},kr=(r,e)=>yr(r,Sr(e));function U(r){return kr(hr({},r),{fn:{fontStyles:f.fontStyles(r),themeColor:f.themeColor(r),focusStyles:f.focusStyles(r),largerThan:f.largerThan(r),smallerThan:f.smallerThan(r),radialGradient:f.radialGradient,linearGradient:f.linearGradient,gradient:f.gradient(r),rgba:f.rgba,cover:f.cover,lighten:f.lighten,darken:f.darken,primaryShade:f.primaryShade(r),radius:f.radius(r),variant:f.variant(r),hover:f.hover,primaryColor:f.primaryColor(r),placeholderStyles:f.placeholderStyles(r),dimmed:f.dimmed(r)}})}const $r={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Y,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:r=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${r.colors[r.primaryColor][r.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:r=>({outline:"none",borderColor:r.colors[r.primaryColor][typeof r.primaryShade=="object"?r.primaryShade[r.colorScheme]:r.primaryShade]})}},E=U($r);var Pr=Object.defineProperty,wr=Object.defineProperties,Cr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,M=(r,e,o)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,xr=(r,e)=>{for(var o in e||(e={}))Er.call(e,o)&&M(r,o,e[o]);if(H)for(var o of H(e))Or.call(e,o)&&M(r,o,e[o]);return r},zr=(r,e)=>wr(r,Cr(e));function jr({theme:r}){return d.createElement(_,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:r.colorScheme==="dark"?"dark":"light"},body:zr(xr({},r.fn.fontStyles()),{backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:r.white,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,fontSize:r.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function b(r,e,o,n=u){Object.keys(e).forEach(a=>{r[`--mantine-${o}-${a}`]=n(e[a])})}function Rr({theme:r}){const e={"--mantine-color-white":r.white,"--mantine-color-black":r.black,"--mantine-transition-timing-function":r.transitionTimingFunction,"--mantine-line-height":`${r.lineHeight}`,"--mantine-font-family":r.fontFamily,"--mantine-font-family-monospace":r.fontFamilyMonospace,"--mantine-font-family-headings":r.headings.fontFamily,"--mantine-heading-font-weight":`${r.headings.fontWeight}`};b(e,r.shadows,"shadow"),b(e,r.fontSizes,"font-size"),b(e,r.radius,"radius"),b(e,r.spacing,"spacing"),b(e,r.breakpoints,"breakpoints",k),Object.keys(r.colors).forEach(n=>{r.colors[n].forEach((a,t)=>{e[`--mantine-color-${n}-${t}`]=a})});const o=r.headings.sizes;return Object.keys(o).forEach(n=>{e[`--mantine-${n}-font-size`]=o[n].fontSize,e[`--mantine-${n}-line-height`]=`${o[n].lineHeight}`}),d.createElement(_,{styles:{":root":e}})}var Fr=Object.defineProperty,Hr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,A=(r,e,o)=>e in r?Fr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,c=(r,e)=>{for(var o in e||(e={}))Ir.call(e,o)&&A(r,o,e[o]);if(I)for(var o of I(e))Ar.call(e,o)&&A(r,o,e[o]);return r},P=(r,e)=>Hr(r,Mr(e));function Nr(r,e){var o;if(!e)return r;const n=Object.keys(r).reduce((a,t)=>{if(t==="headings"&&e.headings){const i=e.headings.sizes?Object.keys(r.headings.sizes).reduce((s,l)=>(s[l]=c(c({},r.headings.sizes[l]),e.headings.sizes[l]),s),{}):r.headings.sizes;return P(c({},a),{headings:P(c(c({},r.headings),e.headings),{sizes:i})})}if(t==="breakpoints"&&e.breakpoints){const i=c(c({},r.breakpoints),e.breakpoints);return P(c({},a),{breakpoints:Object.fromEntries(Object.entries(i).sort((s,l)=>S(s[1])-S(l[1])))})}return a[t]=typeof e[t]=="object"?c(c({},r[t]),e[t]):typeof e[t]=="number"||typeof e[t]=="boolean"||typeof e[t]=="function"?e[t]:e[t]||r[t],a},{});if(e!=null&&e.fontFamily&&!((o=e==null?void 0:e.headings)!=null&&o.fontFamily)&&(n.headings.fontFamily=e.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function Wr(r,e){return U(Nr(r,e))}function Tr(r){return Object.keys(r).reduce((e,o)=>(r[o]!==void 0&&(e[o]=r[o]),e),{})}const Gr={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${u(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Dr(){return d.createElement(_,{styles:Gr})}var Vr=Object.defineProperty,N=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,W=(r,e,o)=>e in r?Vr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,m=(r,e)=>{for(var o in e||(e={}))Ur.call(e,o)&&W(r,o,e[o]);if(N)for(var o of N(e))Lr.call(e,o)&&W(r,o,e[o]);return r};const v=h.createContext({theme:E});function L(){var r;return((r=h.useContext(v))==null?void 0:r.theme)||E}function qr(r){const e=L(),o=n=>{var a,t,i,s;return{styles:((a=e.components[n])==null?void 0:a.styles)||{},classNames:((t=e.components[n])==null?void 0:t.classNames)||{},variants:(i=e.components[n])==null?void 0:i.variants,sizes:(s=e.components[n])==null?void 0:s.sizes}};return Array.isArray(r)?r.map(o):[o(r)]}function Jr(){var r;return(r=h.useContext(v))==null?void 0:r.emotionCache}function Kr(r,e,o){var n;const a=L(),t=(n=a.components[r])==null?void 0:n.defaultProps,i=typeof t=="function"?t(a):t;return m(m(m({},e),i),Tr(o))}function Xr({theme:r,emotionCache:e,withNormalizeCSS:o=!1,withGlobalStyles:n=!1,withCSSVariables:a=!1,inherit:t=!1,children:i}){const s=h.useContext(v),l=Wr(E,t?m(m({},s.theme),r):r);return d.createElement(X,{theme:l},d.createElement(v.Provider,{value:{theme:l,emotionCache:e}},o&&d.createElement(Dr,null),n&&d.createElement(jr,{theme:l}),a&&d.createElement(Rr,{theme:l}),typeof l.globalStyles=="function"&&d.createElement(_,{styles:l.globalStyles(l)}),i))}Xr.displayName="@mantine/core/MantineProvider";export{Xr as M,L as a,qr as b,V as c,Kr as d,Tr as f,S as g,u as r,Jr as u}; diff --git a/invokeai/frontend/web/dist/assets/MantineProvider-1fe3e660.js b/invokeai/frontend/web/dist/assets/MantineProvider-1fe3e660.js deleted file mode 100644 index 2c4c7411c9..0000000000 --- a/invokeai/frontend/web/dist/assets/MantineProvider-1fe3e660.js +++ /dev/null @@ -1 +0,0 @@ -import{R as d,ie as _,v as h,ir as X}from"./index-2ad466e0.js";const Y={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function q(r){return()=>({fontFamily:r.fontFamily||"sans-serif"})}var J=Object.defineProperty,x=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,z=(r,e,o)=>e in r?J(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,j=(r,e)=>{for(var o in e||(e={}))K.call(e,o)&&z(r,o,e[o]);if(x)for(var o of x(e))Q.call(e,o)&&z(r,o,e[o]);return r};function Z(r){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:j({},r.focusRing==="always"||r.focusRing==="auto"?r.focusRingStyles.styles(r):r.focusRingStyles.resetStyles(r)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:j({},r.focusRing==="auto"||r.focusRing==="never"?r.focusRingStyles.resetStyles(r):null)})}function y(r){return e=>typeof r.primaryShade=="number"?r.primaryShade:r.primaryShade[e||r.colorScheme]}function w(r){const e=y(r);return(o,n,a=!0,t=!0)=>{if(typeof o=="string"&&o.includes(".")){const[s,l]=o.split("."),g=parseInt(l,10);if(s in r.colors&&g>=0&&g<10)return r.colors[s][typeof n=="number"&&!t?n:g]}const i=typeof n=="number"?n:e();return o in r.colors?r.colors[o][i]:a?r.colors[r.primaryColor][i]:o}}function T(r){let e="";for(let o=1;o{const a={from:(n==null?void 0:n.from)||r.defaultGradient.from,to:(n==null?void 0:n.to)||r.defaultGradient.to,deg:(n==null?void 0:n.deg)||r.defaultGradient.deg};return`linear-gradient(${a.deg}deg, ${e(a.from,o(),!1)} 0%, ${e(a.to,o(),!1)} 100%)`}}function D(r){return e=>{if(typeof e=="number")return`${e/16}${r}`;if(typeof e=="string"){const o=e.replace("px","");if(!Number.isNaN(Number(o)))return`${Number(o)/16}${r}`}return e}}const u=D("rem"),k=D("em");function V({size:r,sizes:e,units:o}){return r in e?e[r]:typeof r=="number"?o==="em"?k(r):u(r):r||e.md}function S(r){return typeof r=="number"?r:typeof r=="string"&&r.includes("rem")?Number(r.replace("rem",""))*16:typeof r=="string"&&r.includes("em")?Number(r.replace("em",""))*16:Number(r)}function er(r){return e=>`@media (min-width: ${k(S(V({size:e,sizes:r.breakpoints})))})`}function or(r){return e=>`@media (max-width: ${k(S(V({size:e,sizes:r.breakpoints}))-1)})`}function nr(r){return/^#?([0-9A-F]{3}){1,2}$/i.test(r)}function tr(r){let e=r.replace("#","");if(e.length===3){const i=e.split("");e=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const o=parseInt(e,16),n=o>>16&255,a=o>>8&255,t=o&255;return{r:n,g:a,b:t,a:1}}function ar(r){const[e,o,n,a]=r.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:o,b:n,a:a||1}}function C(r){return nr(r)?tr(r):r.startsWith("rgb")?ar(r):{r:0,g:0,b:0,a:1}}function p(r,e){if(typeof r!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(r.startsWith("var(--"))return r;const{r:o,g:n,b:a}=C(r);return`rgba(${o}, ${n}, ${a}, ${e})`}function ir(r=0){return{position:"absolute",top:u(r),right:u(r),left:u(r),bottom:u(r)}}function sr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=1-e,s=l=>Math.round(l*i);return`rgba(${s(o)}, ${s(n)}, ${s(a)}, ${t})`}function lr(r,e){if(typeof r=="string"&&r.startsWith("var(--"))return r;const{r:o,g:n,b:a,a:t}=C(r),i=s=>Math.round(s+(255-s)*e);return`rgba(${i(o)}, ${i(n)}, ${i(a)}, ${t})`}function fr(r){return e=>{if(typeof e=="number")return u(e);const o=typeof r.defaultRadius=="number"?r.defaultRadius:r.radius[r.defaultRadius]||r.defaultRadius;return r.radius[e]||e||o}}function cr(r,e){if(typeof r=="string"&&r.includes(".")){const[o,n]=r.split("."),a=parseInt(n,10);if(o in e.colors&&a>=0&&a<10)return{isSplittedColor:!0,key:o,shade:a}}return{isSplittedColor:!1}}function dr(r){const e=w(r),o=y(r),n=G(r);return({variant:a,color:t,gradient:i,primaryFallback:s})=>{const l=cr(t,r);switch(a){case"light":return{border:"transparent",background:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1),color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?7:1,s,!1),r.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),hover:p(e(t,r.colorScheme==="dark"?8:0,s,!1),r.colorScheme==="dark"?.2:1)};case"outline":return{border:e(t,r.colorScheme==="dark"?5:o("light")),background:"transparent",color:e(t,r.colorScheme==="dark"?5:o("light")),hover:r.colorScheme==="dark"?p(e(t,5,s,!1),.05):p(e(t,0,s,!1),.35)};case"default":return{border:r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[4],background:r.colorScheme==="dark"?r.colors.dark[6]:r.white,color:r.colorScheme==="dark"?r.white:r.black,hover:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[0]};case"white":return{border:"transparent",background:r.white,color:e(t,o()),hover:null};case"transparent":return{border:"transparent",color:t==="dark"?r.colorScheme==="dark"?r.colors.dark[0]:r.colors.dark[9]:e(t,r.colorScheme==="dark"?2:o("light")),background:"transparent",hover:null};case"gradient":return{background:n(i),color:r.white,border:"transparent",hover:null};default:{const g=o(),$=l.isSplittedColor?l.shade:g,O=l.isSplittedColor?l.key:t;return{border:"transparent",background:e(O,$,s),color:r.white,hover:e(O,$===9?8:$+1)}}}}}function ur(r){return e=>{const o=y(r)(e);return r.colors[r.primaryColor][o]}}function pr(r){return{"@media (hover: hover)":{"&:hover":r},"@media (hover: none)":{"&:active":r}}}function gr(r){return()=>({userSelect:"none",color:r.colorScheme==="dark"?r.colors.dark[3]:r.colors.gray[5]})}function br(r){return()=>r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]}const f={fontStyles:q,themeColor:w,focusStyles:Z,linearGradient:B,radialGradient:rr,smallerThan:or,largerThan:er,rgba:p,cover:ir,darken:sr,lighten:lr,radius:fr,variant:dr,primaryShade:y,hover:pr,gradient:G,primaryColor:ur,placeholderStyles:gr,dimmed:br};var mr=Object.defineProperty,yr=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,F=(r,e,o)=>e in r?mr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,hr=(r,e)=>{for(var o in e||(e={}))vr.call(e,o)&&F(r,o,e[o]);if(R)for(var o of R(e))_r.call(e,o)&&F(r,o,e[o]);return r},kr=(r,e)=>yr(r,Sr(e));function U(r){return kr(hr({},r),{fn:{fontStyles:f.fontStyles(r),themeColor:f.themeColor(r),focusStyles:f.focusStyles(r),largerThan:f.largerThan(r),smallerThan:f.smallerThan(r),radialGradient:f.radialGradient,linearGradient:f.linearGradient,gradient:f.gradient(r),rgba:f.rgba,cover:f.cover,lighten:f.lighten,darken:f.darken,primaryShade:f.primaryShade(r),radius:f.radius(r),variant:f.variant(r),hover:f.hover,primaryColor:f.primaryColor(r),placeholderStyles:f.placeholderStyles(r),dimmed:f.dimmed(r)}})}const $r={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Y,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:r=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${r.colors[r.primaryColor][r.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:r=>({outline:"none",borderColor:r.colors[r.primaryColor][typeof r.primaryShade=="object"?r.primaryShade[r.colorScheme]:r.primaryShade]})}},E=U($r);var Pr=Object.defineProperty,wr=Object.defineProperties,Cr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,M=(r,e,o)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,xr=(r,e)=>{for(var o in e||(e={}))Er.call(e,o)&&M(r,o,e[o]);if(H)for(var o of H(e))Or.call(e,o)&&M(r,o,e[o]);return r},zr=(r,e)=>wr(r,Cr(e));function jr({theme:r}){return d.createElement(_,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:r.colorScheme==="dark"?"dark":"light"},body:zr(xr({},r.fn.fontStyles()),{backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:r.white,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,fontSize:r.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function b(r,e,o,n=u){Object.keys(e).forEach(a=>{r[`--mantine-${o}-${a}`]=n(e[a])})}function Rr({theme:r}){const e={"--mantine-color-white":r.white,"--mantine-color-black":r.black,"--mantine-transition-timing-function":r.transitionTimingFunction,"--mantine-line-height":`${r.lineHeight}`,"--mantine-font-family":r.fontFamily,"--mantine-font-family-monospace":r.fontFamilyMonospace,"--mantine-font-family-headings":r.headings.fontFamily,"--mantine-heading-font-weight":`${r.headings.fontWeight}`};b(e,r.shadows,"shadow"),b(e,r.fontSizes,"font-size"),b(e,r.radius,"radius"),b(e,r.spacing,"spacing"),b(e,r.breakpoints,"breakpoints",k),Object.keys(r.colors).forEach(n=>{r.colors[n].forEach((a,t)=>{e[`--mantine-color-${n}-${t}`]=a})});const o=r.headings.sizes;return Object.keys(o).forEach(n=>{e[`--mantine-${n}-font-size`]=o[n].fontSize,e[`--mantine-${n}-line-height`]=`${o[n].lineHeight}`}),d.createElement(_,{styles:{":root":e}})}var Fr=Object.defineProperty,Hr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,A=(r,e,o)=>e in r?Fr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,c=(r,e)=>{for(var o in e||(e={}))Ir.call(e,o)&&A(r,o,e[o]);if(I)for(var o of I(e))Ar.call(e,o)&&A(r,o,e[o]);return r},P=(r,e)=>Hr(r,Mr(e));function Nr(r,e){var o;if(!e)return r;const n=Object.keys(r).reduce((a,t)=>{if(t==="headings"&&e.headings){const i=e.headings.sizes?Object.keys(r.headings.sizes).reduce((s,l)=>(s[l]=c(c({},r.headings.sizes[l]),e.headings.sizes[l]),s),{}):r.headings.sizes;return P(c({},a),{headings:P(c(c({},r.headings),e.headings),{sizes:i})})}if(t==="breakpoints"&&e.breakpoints){const i=c(c({},r.breakpoints),e.breakpoints);return P(c({},a),{breakpoints:Object.fromEntries(Object.entries(i).sort((s,l)=>S(s[1])-S(l[1])))})}return a[t]=typeof e[t]=="object"?c(c({},r[t]),e[t]):typeof e[t]=="number"||typeof e[t]=="boolean"||typeof e[t]=="function"?e[t]:e[t]||r[t],a},{});if(e!=null&&e.fontFamily&&!((o=e==null?void 0:e.headings)!=null&&o.fontFamily)&&(n.headings.fontFamily=e.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function Wr(r,e){return U(Nr(r,e))}function Tr(r){return Object.keys(r).reduce((e,o)=>(r[o]!==void 0&&(e[o]=r[o]),e),{})}const Gr={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${u(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Dr(){return d.createElement(_,{styles:Gr})}var Vr=Object.defineProperty,N=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,W=(r,e,o)=>e in r?Vr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,m=(r,e)=>{for(var o in e||(e={}))Ur.call(e,o)&&W(r,o,e[o]);if(N)for(var o of N(e))Lr.call(e,o)&&W(r,o,e[o]);return r};const v=h.createContext({theme:E});function L(){var r;return((r=h.useContext(v))==null?void 0:r.theme)||E}function qr(r){const e=L(),o=n=>{var a,t,i,s;return{styles:((a=e.components[n])==null?void 0:a.styles)||{},classNames:((t=e.components[n])==null?void 0:t.classNames)||{},variants:(i=e.components[n])==null?void 0:i.variants,sizes:(s=e.components[n])==null?void 0:s.sizes}};return Array.isArray(r)?r.map(o):[o(r)]}function Jr(){var r;return(r=h.useContext(v))==null?void 0:r.emotionCache}function Kr(r,e,o){var n;const a=L(),t=(n=a.components[r])==null?void 0:n.defaultProps,i=typeof t=="function"?t(a):t;return m(m(m({},e),i),Tr(o))}function Xr({theme:r,emotionCache:e,withNormalizeCSS:o=!1,withGlobalStyles:n=!1,withCSSVariables:a=!1,inherit:t=!1,children:i}){const s=h.useContext(v),l=Wr(E,t?m(m({},s.theme),r):r);return d.createElement(X,{theme:l},d.createElement(v.Provider,{value:{theme:l,emotionCache:e}},o&&d.createElement(Dr,null),n&&d.createElement(jr,{theme:l}),a&&d.createElement(Rr,{theme:l}),typeof l.globalStyles=="function"&&d.createElement(_,{styles:l.globalStyles(l)}),i))}Xr.displayName="@mantine/core/MantineProvider";export{Xr as M,L as a,qr as b,V as c,Kr as d,Tr as f,S as g,u as r,Jr as u}; diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-d0bb8985.js b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-37ef62a0.js similarity index 94% rename from invokeai/frontend/web/dist/assets/ThemeLocaleProvider-d0bb8985.js rename to invokeai/frontend/web/dist/assets/ThemeLocaleProvider-37ef62a0.js index 3dcff25084..dbe6637892 100644 --- a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-d0bb8985.js +++ b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-37ef62a0.js @@ -1,4 +1,4 @@ -import{I as s,ie as T,v as l,$ as A,ig as R,aa as V,ih as z,ii as j,ij as D,ik as F,il as G,im as W,io as K,az as H,ip as U,iq as Y}from"./index-2ad466e0.js";import{M as Z}from"./MantineProvider-1fe3e660.js";var P=String.raw,E=P` +import{w as s,ie as T,v as l,_ as I,ig as R,aa as V,ih as z,ii as j,ij as D,ik as F,il as G,im as W,io as K,az as H,ip as U,iq as Y}from"./index-c553e366.js";import{M as Z}from"./MantineProvider-094ba0de.js";var P=String.raw,E=P` :root, :host { --chakra-vh: 100vh; @@ -277,4 +277,4 @@ import{I as s,ie as T,v as l,$ as A,ig as R,aa as V,ih as z,ii as j,ij as D,ik a } ${E} - `}),g={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Q(e={}){const{preventTransition:o=!0}=e,n={setDataset:r=>{const t=o?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,t==null||t()},setClassName(r){document.body.classList.add(r?g.dark:g.light),document.body.classList.remove(r?g.light:g.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var t;return((t=n.query().matches)!=null?t:r==="dark")?"dark":"light"},addListener(r){const t=n.query(),i=a=>{r(a.matches?"dark":"light")};return typeof t.addListener=="function"?t.addListener(i):t.addEventListener("change",i),()=>{typeof t.removeListener=="function"?t.removeListener(i):t.removeEventListener("change",i)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var X="chakra-ui-color-mode";function L(e){return{ssr:!1,type:"localStorage",get(o){if(!(globalThis!=null&&globalThis.document))return o;let n;try{n=localStorage.getItem(e)||o}catch{}return n||o},set(o){try{localStorage.setItem(e,o)}catch{}}}}var ee=L(X),M=()=>{};function S(e,o){return e.type==="cookie"&&e.ssr?e.get(o):o}function O(e){const{value:o,children:n,options:{useSystemColorMode:r,initialColorMode:t,disableTransitionOnChange:i}={},colorModeManager:a=ee}=e,d=t==="dark"?"dark":"light",[u,p]=l.useState(()=>S(a,d)),[y,b]=l.useState(()=>S(a)),{getSystemTheme:w,setClassName:k,setDataset:x,addListener:$}=l.useMemo(()=>Q({preventTransition:i}),[i]),v=t==="system"&&!u?y:u,c=l.useCallback(m=>{const f=m==="system"?w():m;p(f),k(f==="dark"),x(f),a.set(f)},[a,w,k,x]);A(()=>{t==="system"&&b(w())},[]),l.useEffect(()=>{const m=a.get();if(m){c(m);return}if(t==="system"){c("system");return}c(d)},[a,d,t,c]);const C=l.useCallback(()=>{c(v==="dark"?"light":"dark")},[v,c]);l.useEffect(()=>{if(r)return $(c)},[r,$,c]);const N=l.useMemo(()=>({colorMode:o??v,toggleColorMode:o?M:C,setColorMode:o?M:c,forced:o!==void 0}),[v,C,c,o]);return s.jsx(R.Provider,{value:N,children:n})}O.displayName="ColorModeProvider";var te=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function re(e){return V(e)?te.every(o=>Object.prototype.hasOwnProperty.call(e,o)):!1}function h(e){return typeof e=="function"}function oe(...e){return o=>e.reduce((n,r)=>r(n),o)}var ne=e=>function(...n){let r=[...n],t=n[n.length-1];return re(t)&&r.length>1?r=r.slice(0,r.length-1):t=e,oe(...r.map(i=>a=>h(i)?i(a):ae(a,i)))(t)},ie=ne(j);function ae(...e){return z({},...e,_)}function _(e,o,n,r){if((h(e)||h(o))&&Object.prototype.hasOwnProperty.call(r,n))return(...t)=>{const i=h(e)?e(...t):e,a=h(o)?o(...t):o;return z({},i,a,_)}}var q=l.createContext({getDocument(){return document},getWindow(){return window}});q.displayName="EnvironmentContext";function I(e){const{children:o,environment:n,disabled:r}=e,t=l.useRef(null),i=l.useMemo(()=>n||{getDocument:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument)!=null?u:document},getWindow:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument.defaultView)!=null?u:window}},[n]),a=!r||!n;return s.jsxs(q.Provider,{value:i,children:[o,a&&s.jsx("span",{id:"__chakra_env",hidden:!0,ref:t})]})}I.displayName="EnvironmentProvider";var se=e=>{const{children:o,colorModeManager:n,portalZIndex:r,resetScope:t,resetCSS:i=!0,theme:a={},environment:d,cssVarsRoot:u,disableEnvironment:p,disableGlobalStyle:y}=e,b=s.jsx(I,{environment:d,disabled:p,children:o});return s.jsx(D,{theme:a,cssVarsRoot:u,children:s.jsxs(O,{colorModeManager:n,options:a.config,children:[i?s.jsx(J,{scope:t}):s.jsx(B,{}),!y&&s.jsx(F,{}),r?s.jsx(G,{zIndex:r,children:b}):b]})})},le=e=>function({children:n,theme:r=e,toastOptions:t,...i}){return s.jsxs(se,{theme:r,...i,children:[s.jsx(W,{value:t==null?void 0:t.defaultOptions,children:n}),s.jsx(K,{...t})]})},de=le(j);const ue=()=>l.useMemo(()=>({colorScheme:"dark",fontFamily:"'Inter Variable', sans-serif",components:{ScrollArea:{defaultProps:{scrollbarSize:10},styles:{scrollbar:{"&:hover":{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}},thumb:{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}}}}}),[]),ce=L("@@invokeai-color-mode");function me({children:e}){const{i18n:o}=H(),n=o.dir(),r=l.useMemo(()=>ie({...U,direction:n}),[n]);l.useEffect(()=>{document.body.dir=n},[n]);const t=ue();return s.jsx(Z,{theme:t,children:s.jsx(de,{theme:r,colorModeManager:ce,toastOptions:Y,children:e})})}const ve=l.memo(me);export{ve as default}; + `}),g={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Q(e={}){const{preventTransition:o=!0}=e,n={setDataset:r=>{const t=o?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,t==null||t()},setClassName(r){document.body.classList.add(r?g.dark:g.light),document.body.classList.remove(r?g.light:g.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var t;return((t=n.query().matches)!=null?t:r==="dark")?"dark":"light"},addListener(r){const t=n.query(),i=a=>{r(a.matches?"dark":"light")};return typeof t.addListener=="function"?t.addListener(i):t.addEventListener("change",i),()=>{typeof t.removeListener=="function"?t.removeListener(i):t.removeEventListener("change",i)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var X="chakra-ui-color-mode";function L(e){return{ssr:!1,type:"localStorage",get(o){if(!(globalThis!=null&&globalThis.document))return o;let n;try{n=localStorage.getItem(e)||o}catch{}return n||o},set(o){try{localStorage.setItem(e,o)}catch{}}}}var ee=L(X),M=()=>{};function S(e,o){return e.type==="cookie"&&e.ssr?e.get(o):o}function O(e){const{value:o,children:n,options:{useSystemColorMode:r,initialColorMode:t,disableTransitionOnChange:i}={},colorModeManager:a=ee}=e,d=t==="dark"?"dark":"light",[u,p]=l.useState(()=>S(a,d)),[y,b]=l.useState(()=>S(a)),{getSystemTheme:w,setClassName:k,setDataset:x,addListener:$}=l.useMemo(()=>Q({preventTransition:i}),[i]),v=t==="system"&&!u?y:u,c=l.useCallback(m=>{const f=m==="system"?w():m;p(f),k(f==="dark"),x(f),a.set(f)},[a,w,k,x]);I(()=>{t==="system"&&b(w())},[]),l.useEffect(()=>{const m=a.get();if(m){c(m);return}if(t==="system"){c("system");return}c(d)},[a,d,t,c]);const C=l.useCallback(()=>{c(v==="dark"?"light":"dark")},[v,c]);l.useEffect(()=>{if(r)return $(c)},[r,$,c]);const A=l.useMemo(()=>({colorMode:o??v,toggleColorMode:o?M:C,setColorMode:o?M:c,forced:o!==void 0}),[v,C,c,o]);return s.jsx(R.Provider,{value:A,children:n})}O.displayName="ColorModeProvider";var te=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function re(e){return V(e)?te.every(o=>Object.prototype.hasOwnProperty.call(e,o)):!1}function h(e){return typeof e=="function"}function oe(...e){return o=>e.reduce((n,r)=>r(n),o)}var ne=e=>function(...n){let r=[...n],t=n[n.length-1];return re(t)&&r.length>1?r=r.slice(0,r.length-1):t=e,oe(...r.map(i=>a=>h(i)?i(a):ae(a,i)))(t)},ie=ne(j);function ae(...e){return z({},...e,_)}function _(e,o,n,r){if((h(e)||h(o))&&Object.prototype.hasOwnProperty.call(r,n))return(...t)=>{const i=h(e)?e(...t):e,a=h(o)?o(...t):o;return z({},i,a,_)}}var q=l.createContext({getDocument(){return document},getWindow(){return window}});q.displayName="EnvironmentContext";function N(e){const{children:o,environment:n,disabled:r}=e,t=l.useRef(null),i=l.useMemo(()=>n||{getDocument:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument)!=null?u:document},getWindow:()=>{var d,u;return(u=(d=t.current)==null?void 0:d.ownerDocument.defaultView)!=null?u:window}},[n]),a=!r||!n;return s.jsxs(q.Provider,{value:i,children:[o,a&&s.jsx("span",{id:"__chakra_env",hidden:!0,ref:t})]})}N.displayName="EnvironmentProvider";var se=e=>{const{children:o,colorModeManager:n,portalZIndex:r,resetScope:t,resetCSS:i=!0,theme:a={},environment:d,cssVarsRoot:u,disableEnvironment:p,disableGlobalStyle:y}=e,b=s.jsx(N,{environment:d,disabled:p,children:o});return s.jsx(D,{theme:a,cssVarsRoot:u,children:s.jsxs(O,{colorModeManager:n,options:a.config,children:[i?s.jsx(J,{scope:t}):s.jsx(B,{}),!y&&s.jsx(F,{}),r?s.jsx(G,{zIndex:r,children:b}):b]})})},le=e=>function({children:n,theme:r=e,toastOptions:t,...i}){return s.jsxs(se,{theme:r,...i,children:[s.jsx(W,{value:t==null?void 0:t.defaultOptions,children:n}),s.jsx(K,{...t})]})},de=le(j);const ue=()=>l.useMemo(()=>({colorScheme:"dark",fontFamily:"'Inter Variable', sans-serif",components:{ScrollArea:{defaultProps:{scrollbarSize:10},styles:{scrollbar:{"&:hover":{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}},thumb:{backgroundColor:"var(--invokeai-colors-baseAlpha-300)"}}}}}),[]),ce=L("@@invokeai-color-mode");function me({children:e}){const{i18n:o}=H(),n=o.dir(),r=l.useMemo(()=>ie({...U,direction:n}),[n]);l.useEffect(()=>{document.body.dir=n},[n]);const t=ue();return s.jsx(Z,{theme:t,children:s.jsx(de,{theme:r,colorModeManager:ce,toastOptions:Y,children:e})})}const ve=l.memo(me);export{ve as default}; diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-90f0fcd3.css b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-90f0fcd3.css new file mode 100644 index 0000000000..d25bb84a51 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-90f0fcd3.css @@ -0,0 +1,9 @@ +@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-ext-wght-normal-848492d3.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-wght-normal-262a1054.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-ext-wght-normal-fe977ddb.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-wght-normal-89b4a3fe.woff2) format("woff2-variations");unicode-range:U+0370-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-vietnamese-wght-normal-ac4e131c.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-ext-wght-normal-45606f83.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-wght-normal-450f3ba4.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}/*! +* OverlayScrollbars +* Version: 2.2.1 +* +* Copyright (c) Rene Haas | KingSora. +* https://github.com/KingSora +* +* Released under the MIT license. +*/.os-size-observer,.os-size-observer-listener{direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;top:0;right:0;bottom:0;left:0;transform:scale(.1)}.os-size-observer:before{content:"";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:"";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0px;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{--os-custom-prop: -1;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:var(--os-custom-prop)}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:"";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-scrollbar-hidden.os-environment{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-scrollbar-hidden.os-environment::-webkit-scrollbar,.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]{overflow:auto}html[data-overlayscrollbars],html.os-scrollbar-hidden,html.os-scrollbar-hidden>body{box-sizing:border-box;margin:0;width:100%;height:100%}html[data-overlayscrollbars]>body{overflow:visible}[data-overlayscrollbars~=host]{position:relative}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0}[data-overlayscrollbars-viewport]{--os-vaw: 0;--os-vah: 0}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:"";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:var(--os-vaw);height:var(--os-vah)}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport],[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-x=hidden]{overflow-y:hidden}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible,.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hidden{opacity:0;visibility:hidden}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar{--os-size: 0;--os-padding-perpendicular: 0;--os-padding-axis: 0;--os-track-border-radius: 0;--os-track-bg: none;--os-track-bg-hover: none;--os-track-bg-active: none;--os-track-border: none;--os-track-border-hover: none;--os-track-border-active: none;--os-handle-border-radius: 0;--os-handle-bg: none;--os-handle-bg-hover: none;--os-handle-bg-active: none;--os-handle-border: none;--os-handle-border-hover: none;--os-handle-border-active: none;--os-handle-min-size: 33px;--os-handle-max-size: none;--os-handle-perpendicular-size: 100%;--os-handle-perpendicular-size-hover: 100%;--os-handle-perpendicular-size-active: 100%;--os-handle-interactive-area-offset: 0}.os-scrollbar .os-scrollbar-track{border:var(--os-track-border);border-radius:var(--os-track-border-radius);background:var(--os-track-bg);transition:opacity .15s,background-color .15s,border-color .15s}.os-scrollbar .os-scrollbar-track:hover{border:var(--os-track-border-hover);background:var(--os-track-bg-hover)}.os-scrollbar .os-scrollbar-track:active{border:var(--os-track-border-active);background:var(--os-track-bg-active)}.os-scrollbar .os-scrollbar-handle{border:var(--os-handle-border);border-radius:var(--os-handle-border-radius);background:var(--os-handle-bg)}.os-scrollbar .os-scrollbar-handle:before{content:"";position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-scrollbar .os-scrollbar-handle:hover{border:var(--os-handle-border-hover);background:var(--os-handle-bg-hover)}.os-scrollbar .os-scrollbar-handle:active{border:var(--os-handle-border-active);background:var(--os-handle-bg-active)}.os-scrollbar-horizontal{padding:var(--os-padding-perpendicular) var(--os-padding-axis);right:var(--os-size);height:var(--os-size)}.os-scrollbar-horizontal.os-scrollbar-rtl{left:var(--os-size);right:0}.os-scrollbar-horizontal .os-scrollbar-handle{min-width:var(--os-handle-min-size);max-width:var(--os-handle-max-size);height:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,height .15s}.os-scrollbar-horizontal .os-scrollbar-handle:before{top:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);bottom:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-horizontal:hover .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-horizontal:active .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-active)}.os-scrollbar-vertical{padding:var(--os-padding-axis) var(--os-padding-perpendicular);bottom:var(--os-size);width:var(--os-size)}.os-scrollbar-vertical .os-scrollbar-handle{min-height:var(--os-handle-min-size);max-height:var(--os-handle-max-size);width:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,width .15s}.os-scrollbar-vertical .os-scrollbar-handle:before{left:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);right:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);left:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical:hover .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-vertical:active .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-active)}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}.os-theme-dark,.os-theme-light{box-sizing:border-box;--os-size: 10px;--os-padding-perpendicular: 2px;--os-padding-axis: 2px;--os-track-border-radius: 10px;--os-handle-interactive-area-offset: 4px;--os-handle-border-radius: 10px}.os-theme-dark{--os-handle-bg: rgba(0, 0, 0, .44);--os-handle-bg-hover: rgba(0, 0, 0, .55);--os-handle-bg-active: rgba(0, 0, 0, .66)}.os-theme-light{--os-handle-bg: rgba(255, 255, 255, .44);--os-handle-bg-hover: rgba(255, 255, 255, .55);--os-handle-bg-active: rgba(255, 255, 255, .66)}.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track{border-radius:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal{padding:2px;right:10px;height:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl{left:10px;right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle{min-width:33px;max-width:none}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical,.os-no-css-vars.os-theme-light.os-scrollbar-vertical{padding:2px;bottom:10px;width:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle{min-height:33px;max-height:none}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:-6px;left:-2px}.os-no-css-vars.os-theme-dark .os-scrollbar-handle{background:rgba(0,0,0,.44)}.os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-no-css-vars.os-theme-dark:active .os-scrollbar-handle{background:rgba(0,0,0,.66)}.os-no-css-vars.os-theme-light .os-scrollbar-handle{background:rgba(255,255,255,.44)}.os-no-css-vars.os-theme-light:hover .os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-no-css-vars.os-theme-light:active .os-scrollbar-handle{background:rgba(255,255,255,.66)}.os-scrollbar{--os-handle-bg: var(--invokeai-colors-accentAlpha-500);--os-handle-bg-hover: var(--invokeai-colors-accentAlpha-700);--os-handle-bg-active: var(--invokeai-colors-accentAlpha-800);--os-handle-min-size: 50px} diff --git a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css b/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css deleted file mode 100644 index 2d9bf55425..0000000000 --- a/invokeai/frontend/web/dist/assets/ThemeLocaleProvider-f5f9aabf.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-ext-wght-normal-1c3007b8.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-wght-normal-eba94878.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-ext-wght-normal-81f77e51.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-wght-normal-d92c6cbc.woff2) format("woff2-variations");unicode-range:U+0370-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-vietnamese-wght-normal-15df7612.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-ext-wght-normal-a2bfd9fe.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-wght-normal-88df0b5a.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}/*! -* OverlayScrollbars -* Version: 2.4.4 -* -* Copyright (c) Rene Haas | KingSora. -* https://github.com/KingSora -* -* Released under the MIT license. -*/.os-size-observer,.os-size-observer-listener{scroll-behavior:auto!important;direction:inherit;pointer-events:none;overflow:hidden;visibility:hidden;box-sizing:border-box}.os-size-observer,.os-size-observer-listener,.os-size-observer-listener-item,.os-size-observer-listener-item-final{writing-mode:horizontal-tb;position:absolute;left:0;top:0}.os-size-observer{z-index:-1;contain:strict;display:flex;flex-direction:row;flex-wrap:nowrap;padding:inherit;border:inherit;box-sizing:inherit;margin:-133px;top:0;right:0;bottom:0;left:0;transform:scale(.1)}.os-size-observer:before{content:"";flex:none;box-sizing:inherit;padding:10px;width:10px;height:10px}.os-size-observer-appear{animation:os-size-observer-appear-animation 1ms forwards}.os-size-observer-listener{box-sizing:border-box;position:relative;flex:auto;padding:inherit;border:inherit;margin:-133px;transform:scale(10)}.os-size-observer-listener.ltr{margin-right:-266px;margin-left:0}.os-size-observer-listener.rtl{margin-left:-266px;margin-right:0}.os-size-observer-listener:empty:before{content:"";width:100%;height:100%}.os-size-observer-listener:empty:before,.os-size-observer-listener>.os-size-observer-listener-item{display:block;position:relative;padding:inherit;border:inherit;box-sizing:content-box;flex:auto}.os-size-observer-listener-scroll{box-sizing:border-box;display:flex}.os-size-observer-listener-item{right:0;bottom:0;overflow:hidden;direction:ltr;flex:none}.os-size-observer-listener-item-final{transition:none}@keyframes os-size-observer-appear-animation{0%{cursor:auto}to{cursor:none}}.os-trinsic-observer{flex:none;box-sizing:border-box;position:relative;max-width:0px;max-height:1px;padding:0;margin:0;border:none;overflow:hidden;z-index:-1;height:0;top:calc(100% + 1px);contain:strict}.os-trinsic-observer:not(:empty){height:calc(100% + 1px);top:-1px}.os-trinsic-observer:not(:empty)>.os-size-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-environment{scroll-behavior:auto!important;--os-custom-prop: -1;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:var(--os-custom-prop)}.os-environment div{width:200%;height:200%;margin:10px 0}.os-environment.os-environment-flexbox-glue{display:flex;flex-direction:row;flex-wrap:nowrap;height:auto;width:auto;min-height:200px;min-width:200px}.os-environment.os-environment-flexbox-glue div{flex:auto;width:auto;height:auto;max-height:100%;max-width:100%;margin:0}.os-environment.os-environment-flexbox-glue-max{max-height:200px}.os-environment.os-environment-flexbox-glue-max div{overflow:visible}.os-environment.os-environment-flexbox-glue-max div:before{content:"";display:block;height:999px;width:999px}.os-environment,[data-overlayscrollbars-viewport]{-ms-overflow-style:scrollbar!important}[data-overlayscrollbars-initialize],[data-overlayscrollbars~=scrollbarHidden],[data-overlayscrollbars-viewport~=scrollbarHidden],.os-scrollbar-hidden.os-environment{scrollbar-width:none!important}[data-overlayscrollbars-initialize]::-webkit-scrollbar,[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars~=scrollbarHidden]::-webkit-scrollbar-corner,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar,[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner,.os-scrollbar-hidden.os-environment::-webkit-scrollbar,.os-scrollbar-hidden.os-environment::-webkit-scrollbar-corner{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;display:none!important;width:0!important;height:0!important}[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body){overflow:auto}html[data-overlayscrollbars],html.os-scrollbar-hidden,html.os-scrollbar-hidden>body{box-sizing:border-box;margin:0;width:100%;height:100%}html[data-overlayscrollbars]>body{overflow:visible}[data-overlayscrollbars~=host],[data-overlayscrollbars-padding]{display:flex;align-items:stretch!important;flex-direction:row!important;flex-wrap:nowrap!important}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{box-sizing:inherit;position:relative;flex:auto!important;height:auto;width:100%;min-width:0;padding:0;margin:0;border:none;z-index:0}[data-overlayscrollbars-viewport]{--os-vaw: 0;--os-vah: 0}[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]:before{content:"";position:absolute;pointer-events:none;z-index:-1;min-width:1px;min-height:1px;width:var(--os-vaw);height:var(--os-vah)}[data-overlayscrollbars-padding],[data-overlayscrollbars-viewport]{overflow:hidden}[data-overlayscrollbars~=host],[data-overlayscrollbars~=viewport]{position:relative;overflow:hidden}[data-overlayscrollbars~=overflowVisible],[data-overlayscrollbars-padding~=overflowVisible],[data-overlayscrollbars-viewport~=overflowVisible]{overflow:visible}[data-overlayscrollbars-overflow-x=hidden]{overflow-x:hidden}[data-overlayscrollbars-overflow-x=scroll]{overflow-x:scroll}[data-overlayscrollbars-overflow-x=hidden]{overflow-y:hidden}[data-overlayscrollbars-overflow-y=scroll]{overflow-y:scroll}[data-overlayscrollbars~=scrollbarPressed],[data-overlayscrollbars~=scrollbarPressed] [data-overlayscrollbars-viewport]{scroll-behavior:auto!important}[data-overlayscrollbars-content]{box-sizing:inherit}[data-overlayscrollbars-contents]:not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]){display:contents}[data-overlayscrollbars-grid],[data-overlayscrollbars-grid] [data-overlayscrollbars-padding]{display:grid;grid-template:1fr/1fr}[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding],[data-overlayscrollbars-grid]>[data-overlayscrollbars-viewport],[data-overlayscrollbars-grid]>[data-overlayscrollbars-padding]>[data-overlayscrollbars-viewport]{height:auto!important;width:auto!important}.os-scrollbar{contain:size layout;contain:size layout style;transition:opacity .15s,visibility .15s,top .15s,right .15s,bottom .15s,left .15s;pointer-events:none;position:absolute;opacity:0;visibility:hidden}body>.os-scrollbar{position:fixed;z-index:99999}.os-scrollbar-transitionless{transition:none}.os-scrollbar-track{position:relative;direction:ltr!important;padding:0!important;border:none!important}.os-scrollbar-handle{position:absolute}.os-scrollbar-track,.os-scrollbar-handle{pointer-events:none;width:100%;height:100%}.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track,.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle{pointer-events:auto;touch-action:none}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-scrollbar-rtl.os-scrollbar-horizontal{right:0}.os-scrollbar-rtl.os-scrollbar-vertical{right:auto;left:0}.os-scrollbar-visible,.os-scrollbar-interaction.os-scrollbar-visible{opacity:1;visibility:visible}.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden{opacity:0;visibility:hidden}.os-scrollbar-unusable,.os-scrollbar-unusable *,.os-scrollbar-wheel,.os-scrollbar-wheel *{pointer-events:none!important}.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal .os-scrollbar-handle{bottom:0}.os-scrollbar-vertical .os-scrollbar-handle{right:0}.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle{right:auto;left:0}.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl{left:0;right:0}.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless,.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl{top:0;bottom:0}.os-scrollbar{--os-size: 0;--os-padding-perpendicular: 0;--os-padding-axis: 0;--os-track-border-radius: 0;--os-track-bg: none;--os-track-bg-hover: none;--os-track-bg-active: none;--os-track-border: none;--os-track-border-hover: none;--os-track-border-active: none;--os-handle-border-radius: 0;--os-handle-bg: none;--os-handle-bg-hover: none;--os-handle-bg-active: none;--os-handle-border: none;--os-handle-border-hover: none;--os-handle-border-active: none;--os-handle-min-size: 33px;--os-handle-max-size: none;--os-handle-perpendicular-size: 100%;--os-handle-perpendicular-size-hover: 100%;--os-handle-perpendicular-size-active: 100%;--os-handle-interactive-area-offset: 0}.os-scrollbar .os-scrollbar-track{border:var(--os-track-border);border-radius:var(--os-track-border-radius);background:var(--os-track-bg);transition:opacity .15s,background-color .15s,border-color .15s}.os-scrollbar .os-scrollbar-track:hover{border:var(--os-track-border-hover);background:var(--os-track-bg-hover)}.os-scrollbar .os-scrollbar-track:active{border:var(--os-track-border-active);background:var(--os-track-bg-active)}.os-scrollbar .os-scrollbar-handle{border:var(--os-handle-border);border-radius:var(--os-handle-border-radius);background:var(--os-handle-bg)}.os-scrollbar .os-scrollbar-handle:before{content:"";position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-scrollbar .os-scrollbar-handle:hover{border:var(--os-handle-border-hover);background:var(--os-handle-bg-hover)}.os-scrollbar .os-scrollbar-handle:active{border:var(--os-handle-border-active);background:var(--os-handle-bg-active)}.os-scrollbar-horizontal{padding:var(--os-padding-perpendicular) var(--os-padding-axis);right:var(--os-size);height:var(--os-size)}.os-scrollbar-horizontal.os-scrollbar-rtl{left:var(--os-size);right:0}.os-scrollbar-horizontal .os-scrollbar-handle{min-width:var(--os-handle-min-size);max-width:var(--os-handle-max-size);height:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,height .15s}.os-scrollbar-horizontal .os-scrollbar-handle:before{top:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);bottom:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-horizontal:hover .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-horizontal:active .os-scrollbar-handle{height:var(--os-handle-perpendicular-size-active)}.os-scrollbar-vertical{padding:var(--os-padding-axis) var(--os-padding-perpendicular);bottom:var(--os-size);width:var(--os-size)}.os-scrollbar-vertical .os-scrollbar-handle{min-height:var(--os-handle-min-size);max-height:var(--os-handle-max-size);width:var(--os-handle-perpendicular-size);transition:opacity .15s,background-color .15s,border-color .15s,width .15s}.os-scrollbar-vertical .os-scrollbar-handle:before{left:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);right:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1);left:calc(var(--os-padding-perpendicular) * -1)}.os-scrollbar-vertical:hover .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-hover)}.os-scrollbar-vertical:active .os-scrollbar-handle{width:var(--os-handle-perpendicular-size-active)}[data-overlayscrollbars~=updating]>.os-scrollbar,.os-theme-none.os-scrollbar{display:none!important}.os-theme-dark,.os-theme-light{box-sizing:border-box;--os-size: 10px;--os-padding-perpendicular: 2px;--os-padding-axis: 2px;--os-track-border-radius: 10px;--os-handle-interactive-area-offset: 4px;--os-handle-border-radius: 10px}.os-theme-dark{--os-handle-bg: rgba(0, 0, 0, .44);--os-handle-bg-hover: rgba(0, 0, 0, .55);--os-handle-bg-active: rgba(0, 0, 0, .66)}.os-theme-light{--os-handle-bg: rgba(255, 255, 255, .44);--os-handle-bg-hover: rgba(255, 255, 255, .55);--os-handle-bg-active: rgba(255, 255, 255, .66)}.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-handle,.os-no-css-vars.os-theme-dark.os-scrollbar .os-scrollbar-track,.os-no-css-vars.os-theme-light.os-scrollbar .os-scrollbar-track{border-radius:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal{padding:2px;right:10px;height:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-cornerless{right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl{left:10px;right:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal.os-scrollbar-rtl.os-scrollbar-cornerless{left:0}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle{min-width:33px;max-width:none}.os-no-css-vars.os-theme-dark.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical,.os-no-css-vars.os-theme-light.os-scrollbar-vertical{padding:2px;bottom:10px;width:10px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-cornerless,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-cornerless{bottom:0}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle{min-height:33px;max-height:none}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-no-css-vars.os-theme-dark.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before,.os-no-css-vars.os-theme-light.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before{right:-6px;left:-2px}.os-no-css-vars.os-theme-dark .os-scrollbar-handle{background:rgba(0,0,0,.44)}.os-no-css-vars.os-theme-dark:hover .os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-no-css-vars.os-theme-dark:active .os-scrollbar-handle{background:rgba(0,0,0,.66)}.os-no-css-vars.os-theme-light .os-scrollbar-handle{background:rgba(255,255,255,.44)}.os-no-css-vars.os-theme-light:hover .os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-no-css-vars.os-theme-light:active .os-scrollbar-handle{background:rgba(255,255,255,.66)}.os-scrollbar{--os-handle-bg: var(--invokeai-colors-accentAlpha-500);--os-handle-bg-hover: var(--invokeai-colors-accentAlpha-700);--os-handle-bg-active: var(--invokeai-colors-accentAlpha-800);--os-handle-min-size: 50px} diff --git a/invokeai/frontend/web/dist/assets/index-2ad466e0.js b/invokeai/frontend/web/dist/assets/index-2ad466e0.js deleted file mode 100644 index e66930cce1..0000000000 --- a/invokeai/frontend/web/dist/assets/index-2ad466e0.js +++ /dev/null @@ -1,157 +0,0 @@ -var fq=Object.defineProperty;var hq=(e,t,n)=>t in e?fq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q2=(e,t,n)=>(hq(e,typeof t!="symbol"?t+"":t,n),n),Y2=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var te=(e,t,n)=>(Y2(e,t,"read from private field"),n?n.call(e):t.get(e)),Gt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$i=(e,t,n,r)=>(Y2(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var eh=(e,t,n,r)=>({set _(i){$i(e,t,i,n)},get _(){return te(e,t,r)}}),Go=(e,t,n)=>(Y2(e,t,"access private method"),n);function gO(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var mO={exports:{}},Sb={},yO={exports:{}},Ke={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var rm=Symbol.for("react.element"),gq=Symbol.for("react.portal"),mq=Symbol.for("react.fragment"),yq=Symbol.for("react.strict_mode"),vq=Symbol.for("react.profiler"),bq=Symbol.for("react.provider"),_q=Symbol.for("react.context"),Sq=Symbol.for("react.forward_ref"),xq=Symbol.for("react.suspense"),wq=Symbol.for("react.memo"),Cq=Symbol.for("react.lazy"),JA=Symbol.iterator;function Eq(e){return e===null||typeof e!="object"?null:(e=JA&&e[JA]||e["@@iterator"],typeof e=="function"?e:null)}var vO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bO=Object.assign,_O={};function Pf(e,t,n){this.props=e,this.context=t,this.refs=_O,this.updater=n||vO}Pf.prototype.isReactComponent={};Pf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function SO(){}SO.prototype=Pf.prototype;function t4(e,t,n){this.props=e,this.context=t,this.refs=_O,this.updater=n||vO}var n4=t4.prototype=new SO;n4.constructor=t4;bO(n4,Pf.prototype);n4.isPureReactComponent=!0;var eP=Array.isArray,xO=Object.prototype.hasOwnProperty,r4={current:null},wO={key:!0,ref:!0,__self:!0,__source:!0};function CO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)xO.call(t,r)&&!wO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,U=$[B];if(0>>1;Bi(Y,O))Zi(V,Y)?($[B]=V,$[Z]=O,B=Z):($[B]=Y,$[q]=O,B=q);else if(Zi(V,O))$[B]=V,$[Z]=O,B=Z;else break e}}return L}function i($,L){var O=$.sortIndex-L.sortIndex;return O!==0?O:$.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,_=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m($){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=$)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function v($){if(g=!1,m($),!p)if(n(l)!==null)p=!0,R(S);else{var L=n(u);L!==null&&D(v,L.startTime-$)}}function S($,L){p=!1,g&&(g=!1,b(x),x=-1),h=!0;var O=f;try{for(m(L),d=n(l);d!==null&&(!(d.expirationTime>L)||$&&!I());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var U=B(d.expirationTime<=L);L=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(l)&&r(l),m(L)}else r(l);d=n(l)}if(d!==null)var j=!0;else{var q=n(u);q!==null&&D(v,q.startTime-L),j=!1}return j}finally{d=null,f=O,h=!1}}var w=!1,C=null,x=-1,P=5,E=-1;function I(){return!(e.unstable_now()-E$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var O=f;f=L;try{return $()}finally{f=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,L){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var O=f;f=$;try{return L()}finally{f=O}},e.unstable_scheduleCallback=function($,L,O){var B=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0B?($.sortIndex=O,t(u,$),n(l)===null&&$===n(u)&&(g?(b(x),x=-1):g=!0,D(v,O-B))):($.sortIndex=U,t(l,$),p||h||(p=!0,R(S))),$},e.unstable_shouldYield=I,e.unstable_wrapCallback=function($){var L=f;return function(){var O=f;f=L;try{return $.apply(this,arguments)}finally{f=O}}}})(PO);AO.exports=PO;var Dq=AO.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kO=k,wi=Dq;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sC=Object.prototype.hasOwnProperty,Lq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rP={},iP={};function Fq(e){return sC.call(iP,e)?!0:sC.call(rP,e)?!1:Lq.test(e)?iP[e]=!0:(rP[e]=!0,!1)}function Bq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zq(e,t,n,r){if(t===null||typeof t>"u"||Bq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Br(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sr[e]=new Br(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sr[t]=new Br(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sr[e]=new Br(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sr[e]=new Br(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){sr[e]=new Br(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sr[e]=new Br(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sr[e]=new Br(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sr[e]=new Br(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sr[e]=new Br(e,5,!1,e.toLowerCase(),null,!1,!1)});var o4=/[\-:]([a-z])/g;function a4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(o4,a4);sr[t]=new Br(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sr[e]=new Br(e,1,!1,e.toLowerCase(),null,!1,!1)});sr.xlinkHref=new Br("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sr[e]=new Br(e,1,!1,e.toLowerCase(),null,!0,!0)});function s4(e,t,n,r){var i=sr.hasOwnProperty(t)?sr[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{ex=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nh(e):""}function Vq(e){switch(e.tag){case 5:return Nh(e.type);case 16:return Nh("Lazy");case 13:return Nh("Suspense");case 19:return Nh("SuspenseList");case 0:case 2:case 15:return e=tx(e.type,!1),e;case 11:return e=tx(e.type.render,!1),e;case 1:return e=tx(e.type,!0),e;default:return""}}function dC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yc:return"Fragment";case Qc:return"Portal";case lC:return"Profiler";case l4:return"StrictMode";case uC:return"Suspense";case cC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case RO:return(e.displayName||"Context")+".Consumer";case MO:return(e._context.displayName||"Context")+".Provider";case u4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:dC(e.type)||"Memo";case Gs:t=e._payload,e=e._init;try{return dC(e(t))}catch{}}return null}function jq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dC(t);case 8:return t===l4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $O(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uq(e){var t=$O(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function r0(e){e._valueTracker||(e._valueTracker=Uq(e))}function NO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$O(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _v(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fC(e,t){var n=t.checked;return en({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function DO(e,t){t=t.checked,t!=null&&s4(e,"checked",t,!1)}function hC(e,t){DO(e,t);var n=wl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pC(e,t.type,n):t.hasOwnProperty("defaultValue")&&pC(e,t.type,wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pC(e,t,n){(t!=="number"||_v(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dh=Array.isArray;function _d(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=i0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function kp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gq=["Webkit","ms","Moz","O"];Object.keys(tp).forEach(function(e){Gq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tp[t]=tp[e]})});function zO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tp.hasOwnProperty(e)&&tp[e]?(""+t).trim():t+"px"}function VO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Hq=en({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yC(e,t){if(t){if(Hq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function vC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bC=null;function d4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _C=null,Sd=null,xd=null;function cP(e){if(e=am(e)){if(typeof _C!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Tb(t),_C(e.stateNode,e.type,t))}}function jO(e){Sd?xd?xd.push(e):xd=[e]:Sd=e}function UO(){if(Sd){var e=Sd,t=xd;if(xd=Sd=null,cP(e),t)for(e=0;e>>=0,e===0?32:31-(nW(e)/rW|0)|0}var o0=64,a0=4194304;function Lh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Lh(s):(o&=a,o!==0&&(r=Lh(o)))}else a=n&~i,a!==0?r=Lh(a):o!==0&&(r=Lh(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function im(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-To(t),e[t]=n}function sW(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=rp),bP=String.fromCharCode(32),_P=!1;function u7(e,t){switch(e){case"keyup":return NW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zc=!1;function LW(e,t){switch(e){case"compositionend":return c7(t);case"keypress":return t.which!==32?null:(_P=!0,bP);case"textInput":return e=t.data,e===bP&&_P?null:e;default:return null}}function FW(e,t){if(Zc)return e==="compositionend"||!b4&&u7(e,t)?(e=s7(),Iy=m4=il=null,Zc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=CP(n)}}function p7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?p7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function g7(){for(var e=window,t=_v();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_v(e.document)}return t}function _4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WW(e){var t=g7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&p7(n.ownerDocument.documentElement,n)){if(r!==null&&_4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=EP(n,o);var a=EP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jc=null,TC=null,op=null,AC=!1;function TP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;AC||Jc==null||Jc!==_v(r)||(r=Jc,"selectionStart"in r&&_4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),op&&Np(op,r)||(op=r,r=Av(TC,"onSelect"),0nd||(e.current=OC[nd],OC[nd]=null,nd--)}function Rt(e,t){nd++,OC[nd]=e.current,e.current=t}var Cl={},br=Vl(Cl),Zr=Vl(!1),Xu=Cl;function ef(e,t){var n=e.type.contextTypes;if(!n)return Cl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jr(e){return e=e.childContextTypes,e!=null}function kv(){zt(Zr),zt(br)}function OP(e,t,n){if(br.current!==Cl)throw Error(ne(168));Rt(br,t),Rt(Zr,n)}function C7(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ne(108,jq(e)||"Unknown",i));return en({},n,r)}function Iv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cl,Xu=br.current,Rt(br,e),Rt(Zr,Zr.current),!0}function $P(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=C7(e,t,Xu),r.__reactInternalMemoizedMergedChildContext=e,zt(Zr),zt(br),Rt(br,e)):zt(Zr),Rt(Zr,n)}var ja=null,Ab=!1,gx=!1;function E7(e){ja===null?ja=[e]:ja.push(e)}function oK(e){Ab=!0,E7(e)}function jl(){if(!gx&&ja!==null){gx=!0;var e=0,t=vt;try{var n=ja;for(vt=1;e>=a,i-=a,Qa=1<<32-To(t)+i|n<x?(P=C,C=null):P=C.sibling;var E=f(b,C,m[x],v);if(E===null){C===null&&(C=P);break}e&&C&&E.alternate===null&&t(b,C),y=o(E,y,x),w===null?S=E:w.sibling=E,w=E,C=P}if(x===m.length)return n(b,C),qt&&hu(b,x),S;if(C===null){for(;xx?(P=C,C=null):P=C.sibling;var I=f(b,C,E.value,v);if(I===null){C===null&&(C=P);break}e&&C&&I.alternate===null&&t(b,C),y=o(I,y,x),w===null?S=I:w.sibling=I,w=I,C=P}if(E.done)return n(b,C),qt&&hu(b,x),S;if(C===null){for(;!E.done;x++,E=m.next())E=d(b,E.value,v),E!==null&&(y=o(E,y,x),w===null?S=E:w.sibling=E,w=E);return qt&&hu(b,x),S}for(C=r(b,C);!E.done;x++,E=m.next())E=h(C,b,x,E.value,v),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?x:E.key),y=o(E,y,x),w===null?S=E:w.sibling=E,w=E);return e&&C.forEach(function(N){return t(b,N)}),qt&&hu(b,x),S}function _(b,y,m,v){if(typeof m=="object"&&m!==null&&m.type===Yc&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case n0:e:{for(var S=m.key,w=y;w!==null;){if(w.key===S){if(S=m.type,S===Yc){if(w.tag===7){n(b,w.sibling),y=i(w,m.props.children),y.return=b,b=y;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Gs&&VP(S)===w.type){n(b,w.sibling),y=i(w,m.props),y.ref=ah(b,w,m),y.return=b,b=y;break e}n(b,w);break}else t(b,w);w=w.sibling}m.type===Yc?(y=Fu(m.props.children,b.mode,v,m.key),y.return=b,b=y):(v=Fy(m.type,m.key,m.props,null,b.mode,v),v.ref=ah(b,y,m),v.return=b,b=v)}return a(b);case Qc:e:{for(w=m.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(b,y.sibling),y=i(y,m.children||[]),y.return=b,b=y;break e}else{n(b,y);break}else t(b,y);y=y.sibling}y=wx(m,b.mode,v),y.return=b,b=y}return a(b);case Gs:return w=m._init,_(b,y,w(m._payload),v)}if(Dh(m))return p(b,y,m,v);if(th(m))return g(b,y,m,v);h0(b,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,y!==null&&y.tag===6?(n(b,y.sibling),y=i(y,m),y.return=b,b=y):(n(b,y),y=xx(m,b.mode,v),y.return=b,b=y),a(b)):n(b,y)}return _}var nf=O7(!0),$7=O7(!1),sm={},fa=Vl(sm),Bp=Vl(sm),zp=Vl(sm);function Pu(e){if(e===sm)throw Error(ne(174));return e}function k4(e,t){switch(Rt(zp,t),Rt(Bp,e),Rt(fa,sm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mC(t,e)}zt(fa),Rt(fa,t)}function rf(){zt(fa),zt(Bp),zt(zp)}function N7(e){Pu(zp.current);var t=Pu(fa.current),n=mC(t,e.type);t!==n&&(Rt(Bp,e),Rt(fa,n))}function I4(e){Bp.current===e&&(zt(fa),zt(Bp))}var Yt=Vl(0);function Dv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mx=[];function M4(){for(var e=0;en?n:4,e(!0);var r=yx.transition;yx.transition={};try{e(!1),t()}finally{vt=n,yx.transition=r}}function Y7(){return Yi().memoizedState}function uK(e,t,n){var r=pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Z7(e))J7(t,n);else if(n=k7(e,t,n,r),n!==null){var i=$r();Ao(n,e,r,i),e$(n,t,r)}}function cK(e,t,n){var r=pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Z7(e))J7(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Oo(s,a)){var l=t.interleaved;l===null?(i.next=i,A4(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=k7(e,t,i,r),n!==null&&(i=$r(),Ao(n,e,r,i),e$(n,t,r))}}function Z7(e){var t=e.alternate;return e===Jt||t!==null&&t===Jt}function J7(e,t){ap=Lv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function e$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,h4(e,n)}}var Fv={readContext:Qi,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useInsertionEffect:dr,useLayoutEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useMutableSource:dr,useSyncExternalStore:dr,useId:dr,unstable_isNewReconciler:!1},dK={readContext:Qi,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:UP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$y(4194308,4,q7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $y(4194308,4,e,t)},useInsertionEffect:function(e,t){return $y(4,2,e,t)},useMemo:function(e,t){var n=Ko();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ko();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uK.bind(null,Jt,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:jP,useDebugValue:D4,useDeferredValue:function(e){return Ko().memoizedState=e},useTransition:function(){var e=jP(!1),t=e[0];return e=lK.bind(null,e[1]),Ko().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Jt,i=Ko();if(qt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Hn===null)throw Error(ne(349));Yu&30||F7(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,UP(z7.bind(null,r,o,e),[e]),r.flags|=2048,Up(9,B7.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ko(),t=Hn.identifierPrefix;if(qt){var n=Ya,r=Qa;n=(r&~(1<<32-To(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ra]=t,e[Fp]=r,u$(e,t,!1,!1),t.stateNode=e;e:{switch(a=vC(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),i=r;break;case"iframe":case"object":case"embed":Dt("load",e),i=r;break;case"video":case"audio":for(i=0;iaf&&(t.flags|=128,r=!0,sh(o,!1),t.lanes=4194304)}else{if(!r)if(e=Dv(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!qt)return fr(t),null}else 2*mn()-o.renderingStartTime>af&&n!==1073741824&&(t.flags|=128,r=!0,sh(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=mn(),t.sibling=null,n=Yt.current,Rt(Yt,r?n&1|2:n&1),t):(fr(t),null);case 22:case 23:return j4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pi&1073741824&&(fr(t),t.subtreeFlags&6&&(t.flags|=8192)):fr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function bK(e,t){switch(x4(t),t.tag){case 1:return Jr(t.type)&&kv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rf(),zt(Zr),zt(br),M4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return I4(t),null;case 13:if(zt(Yt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));tf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(Yt),null;case 4:return rf(),null;case 10:return T4(t.type._context),null;case 22:case 23:return j4(),null;case 24:return null;default:return null}}var g0=!1,yr=!1,_K=typeof WeakSet=="function"?WeakSet:Set,be=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){an(e,t,r)}else n.current=null}function HC(e,t,n){try{n()}catch(r){an(e,t,r)}}var ZP=!1;function SK(e,t){if(PC=Ev,e=g7(),_4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=a),f===o&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kC={focusedElem:e,selectionRange:n},Ev=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,_=p.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:mo(t.type,g),_);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(v){an(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return p=ZP,ZP=!1,p}function sp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&HC(t,n,o)}i=i.next}while(i!==r)}}function Ib(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function f$(e){var t=e.alternate;t!==null&&(e.alternate=null,f$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ra],delete t[Fp],delete t[RC],delete t[rK],delete t[iK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h$(e){return e.tag===5||e.tag===3||e.tag===4}function JP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function WC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pv));else if(r!==4&&(e=e.child,e!==null))for(WC(e,t,n),e=e.sibling;e!==null;)WC(e,t,n),e=e.sibling}function KC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(KC(e,t,n),e=e.sibling;e!==null;)KC(e,t,n),e=e.sibling}var tr=null,vo=!1;function Os(e,t,n){for(n=n.child;n!==null;)p$(e,t,n),n=n.sibling}function p$(e,t,n){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(xb,n)}catch{}switch(n.tag){case 5:yr||ad(n,t);case 6:var r=tr,i=vo;tr=null,Os(e,t,n),tr=r,vo=i,tr!==null&&(vo?(e=tr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tr.removeChild(n.stateNode));break;case 18:tr!==null&&(vo?(e=tr,n=n.stateNode,e.nodeType===8?px(e.parentNode,n):e.nodeType===1&&px(e,n),Op(e)):px(tr,n.stateNode));break;case 4:r=tr,i=vo,tr=n.stateNode.containerInfo,vo=!0,Os(e,t,n),tr=r,vo=i;break;case 0:case 11:case 14:case 15:if(!yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&HC(n,t,a),i=i.next}while(i!==r)}Os(e,t,n);break;case 1:if(!yr&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){an(n,t,s)}Os(e,t,n);break;case 21:Os(e,t,n);break;case 22:n.mode&1?(yr=(r=yr)||n.memoizedState!==null,Os(e,t,n),yr=r):Os(e,t,n);break;default:Os(e,t,n)}}function ek(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _K),t.forEach(function(r){var i=IK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ho(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=mn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wK(r/1960))-r,10e?16:e,ol===null)var r=!1;else{if(e=ol,ol=null,Vv=0,st&6)throw Error(ne(331));var i=st;for(st|=4,be=e.current;be!==null;){var o=be,a=o.child;if(be.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lmn()-z4?Lu(e,0):B4|=n),ei(e,t)}function x$(e,t){t===0&&(e.mode&1?(t=a0,a0<<=1,!(a0&130023424)&&(a0=4194304)):t=1);var n=$r();e=ds(e,t),e!==null&&(im(e,t,n),ei(e,n))}function kK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),x$(e,n)}function IK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),x$(e,n)}var w$;w$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zr.current)Xr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xr=!1,yK(e,t,n);Xr=!!(e.flags&131072)}else Xr=!1,qt&&t.flags&1048576&&T7(t,Rv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ny(e,t),e=t.pendingProps;var i=ef(t,br.current);Cd(t,n),i=O4(null,t,r,e,i,n);var o=$4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jr(r)?(o=!0,Iv(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,P4(t),i.updater=Pb,t.stateNode=i,i._reactInternals=t,FC(t,r,e,n),t=VC(null,t,r,!0,o,n)):(t.tag=0,qt&&o&&S4(t),Mr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ny(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=RK(r),e=mo(r,e),i){case 0:t=zC(null,t,r,e,n);break e;case 1:t=XP(null,t,r,e,n);break e;case 11:t=WP(null,t,r,e,n);break e;case 14:t=KP(null,t,r,mo(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),zC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),XP(e,t,r,i,n);case 3:e:{if(a$(t),e===null)throw Error(ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,I7(e,t),Nv(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=of(Error(ne(423)),t),t=QP(e,t,r,n,i);break e}else if(r!==i){i=of(Error(ne(424)),t),t=QP(e,t,r,n,i);break e}else for(bi=dl(t.stateNode.containerInfo.firstChild),_i=t,qt=!0,_o=null,n=$7(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tf(),r===i){t=fs(e,t,n);break e}Mr(e,t,r,n)}t=t.child}return t;case 5:return N7(t),e===null&&NC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,IC(r,i)?a=null:o!==null&&IC(r,o)&&(t.flags|=32),o$(e,t),Mr(e,t,a,n),t.child;case 6:return e===null&&NC(t),null;case 13:return s$(e,t,n);case 4:return k4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nf(t,null,r,n):Mr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),WP(e,t,r,i,n);case 7:return Mr(e,t,t.pendingProps,n),t.child;case 8:return Mr(e,t,t.pendingProps.children,n),t.child;case 12:return Mr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Rt(Ov,r._currentValue),r._currentValue=a,o!==null)if(Oo(o.value,a)){if(o.children===i.children&&!Zr.current){t=fs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ns(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),DC(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),DC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Mr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cd(t,n),i=Qi(i),r=r(i),t.flags|=1,Mr(e,t,r,n),t.child;case 14:return r=t.type,i=mo(r,t.pendingProps),i=mo(r.type,i),KP(e,t,r,i,n);case 15:return r$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mo(r,i),Ny(e,t),t.tag=1,Jr(r)?(e=!0,Iv(t)):e=!1,Cd(t,n),R7(t,r,i),FC(t,r,i,n),VC(null,t,r,!0,e,n);case 19:return l$(e,t,n);case 22:return i$(e,t,n)}throw Error(ne(156,t.tag))};function C$(e,t){return QO(e,t)}function MK(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wi(e,t,n,r){return new MK(e,t,n,r)}function G4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RK(e){if(typeof e=="function")return G4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===u4)return 11;if(e===c4)return 14}return 2}function gl(e,t){var n=e.alternate;return n===null?(n=Wi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")G4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Yc:return Fu(n.children,i,o,t);case l4:a=8,i|=8;break;case lC:return e=Wi(12,n,t,i|2),e.elementType=lC,e.lanes=o,e;case uC:return e=Wi(13,n,t,i),e.elementType=uC,e.lanes=o,e;case cC:return e=Wi(19,n,t,i),e.elementType=cC,e.lanes=o,e;case OO:return Rb(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MO:a=10;break e;case RO:a=9;break e;case u4:a=11;break e;case c4:a=14;break e;case Gs:a=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Wi(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fu(e,t,n,r){return e=Wi(7,e,r,t),e.lanes=n,e}function Rb(e,t,n,r){return e=Wi(22,e,r,t),e.elementType=OO,e.lanes=n,e.stateNode={isHidden:!1},e}function xx(e,t,n){return e=Wi(6,e,null,t),e.lanes=n,e}function wx(e,t,n){return t=Wi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OK(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rx(0),this.expirationTimes=rx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H4(e,t,n,r,i,o,a,s,l){return e=new OK(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Wi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},P4(o),e}function $K(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P$)}catch(e){console.error(e)}}P$(),TO.exports=Ai;var mi=TO.exports;const vLe=Bl(mi);var lk=mi;aC.createRoot=lk.createRoot,aC.hydrateRoot=lk.hydrateRoot;const BK="modulepreload",zK=function(e,t){return new URL(e,t).href},uk={},k$=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zK(o,r),o in uk)return;uk[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const d=i[c];if(d.href===o&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":BK,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function Un(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Lb(e)?2:Fb(e)?3:0}function ml(e,t){return El(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function By(e,t){return El(e)===2?e.get(t):e[t]}function I$(e,t,n){var r=El(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function M$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Lb(e){return qK&&e instanceof Map}function Fb(e){return WK&&e instanceof Set}function Ln(e){return e.o||e.t}function Q4(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=O$(e);delete t[Fe];for(var n=Ad(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=VK),Object.freeze(e),t&&hs(e,function(n,r){return lm(r,!0)},!0)),e}function VK(){Un(2)}function Y4(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ha(e){var t=e5[e];return t||Un(18,e),t}function Z4(e,t){e5[e]||(e5[e]=t)}function Hp(){return Wp}function Cx(e,t){t&&(ha("Patches"),e.u=[],e.s=[],e.v=t)}function Gv(e){JC(e),e.p.forEach(jK),e.p=null}function JC(e){e===Wp&&(Wp=e.l)}function ck(e){return Wp={p:[],l:Wp,h:e,m:!0,_:0}}function jK(e){var t=e[Fe];t.i===0||t.i===1?t.j():t.g=!0}function Ex(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||ha("ES5").S(t,e,r),r?(n[Fe].P&&(Gv(t),Un(4)),ti(e)&&(e=Hv(t,e),t.l||qv(t,e)),t.u&&ha("Patches").M(n[Fe].t,e,t.u,t.s)):e=Hv(t,n,[]),Gv(t),t.u&&t.v(t.u,t.s),e!==zb?e:void 0}function Hv(e,t,n){if(Y4(t))return t;var r=t[Fe];if(!r)return hs(t,function(s,l){return dk(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return qv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Q4(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),hs(o,function(s,l){return dk(e,r,i,s,l,n,a)}),qv(e,i,!1),n&&e.u&&ha("Patches").N(r,n,e.u,e.s)}return r.o}function dk(e,t,n,r,i,o,a){if(Dr(i)){var s=Hv(e,i,o&&t&&t.i!==3&&!ml(t.R,r)?o.concat(r):void 0);if(I$(n,r,s),!Dr(s))return;e.m=!1}else a&&n.add(i);if(ti(i)&&!Y4(i)){if(!e.h.D&&e._<1)return;Hv(e,i),t&&t.A.l||qv(e,i)}}function qv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Tx(e,t){var n=e[Fe];return(n?Ln(n):e)[t]}function fk(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Wr(e){e.P||(e.P=!0,e.l&&Wr(e.l))}function Ax(e){e.o||(e.o=Q4(e.t))}function qp(e,t,n){var r=Lb(t)?ha("MapSet").F(t,n):Fb(t)?ha("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Hp(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Kp;a&&(l=[s],u=Bh);var c=Proxy.revocable(l,u),d=c.revoke,f=c.proxy;return s.k=f,s.j=d,f}(t,n):ha("ES5").J(t,n);return(n?n.A:Hp()).p.push(r),r}function Bb(e){return Dr(e)||Un(22,e),function t(n){if(!ti(n))return n;var r,i=n[Fe],o=El(n);if(i){if(!i.P&&(i.i<4||!ha("ES5").K(i)))return i.t;i.I=!0,r=hk(n,o),i.I=!1}else r=hk(n,o);return hs(r,function(a,s){i&&By(i.t,a)===s||I$(r,a,t(s))}),o===3?new Set(r):r}(e)}function hk(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Q4(e)}function J4(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[Fe];return Kp.get(l,o)},set:function(l){var u=this[Fe];Kp.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][Fe];if(!s.P)switch(s.i){case 5:r(s)&&Wr(s);break;case 4:n(s)&&Wr(s)}}}function n(o){for(var a=o.t,s=o.k,l=Ad(s),u=l.length-1;u>=0;u--){var c=l[u];if(c!==Fe){var d=a[c];if(d===void 0&&!ml(a,c))return!0;var f=s[c],h=f&&f[Fe];if(h?h.t!==d:!M$(f,d))return!0}}var p=!!a[Fe];return l.length!==Ad(a).length+(p?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?b-1:0),m=1;m1?c-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=ha("Patches").$;return Dr(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Ci=new $$,N$=Ci.produce,nE=Ci.produceWithPatches.bind(Ci),XK=Ci.setAutoFreeze.bind(Ci),QK=Ci.setUseProxies.bind(Ci),t5=Ci.applyPatches.bind(Ci),YK=Ci.createDraft.bind(Ci),ZK=Ci.finishDraft.bind(Ci);const Ul=N$,bLe=Object.freeze(Object.defineProperty({__proto__:null,Immer:$$,applyPatches:t5,castDraft:GK,castImmutable:HK,createDraft:YK,current:Bb,default:Ul,enableAllPlugins:UK,enableES5:J4,enableMapSet:R$,enablePatches:eE,finishDraft:ZK,freeze:lm,immerable:Td,isDraft:Dr,isDraftable:ti,nothing:zb,original:X4,produce:N$,produceWithPatches:nE,setAutoFreeze:XK,setUseProxies:QK},Symbol.toStringTag,{value:"Module"}));function Xp(e){"@babel/helpers - typeof";return Xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xp(e)}function JK(e,t){if(Xp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eX(e){var t=JK(e,"string");return Xp(t)==="symbol"?t:String(t)}function tX(e,t,n){return t=eX(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yk(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(nr(1));return n(um)(e,t)}if(typeof e!="function")throw new Error(nr(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(nr(3));return o}function d(g){if(typeof g!="function")throw new Error(nr(4));if(l)throw new Error(nr(5));var _=!0;return u(),s.push(g),function(){if(_){if(l)throw new Error(nr(6));_=!1,u();var y=s.indexOf(g);s.splice(y,1),a=null}}}function f(g){if(!nX(g))throw new Error(nr(7));if(typeof g.type>"u")throw new Error(nr(8));if(l)throw new Error(nr(9));try{l=!0,o=i(o,g)}finally{l=!1}for(var _=a=s,b=0;b<_.length;b++){var y=_[b];y()}return g}function h(g){if(typeof g!="function")throw new Error(nr(10));i=g,f({type:sf.REPLACE})}function p(){var g,_=d;return g={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(nr(11));function m(){y.next&&y.next(c())}m();var v=_(m);return{unsubscribe:v}}},g[vk]=function(){return this},g}return f({type:sf.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:h},r[vk]=p,r}var D$=um;function rX(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:sf.INIT});if(typeof r>"u")throw new Error(nr(12));if(typeof n(void 0,{type:sf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(nr(13))})}function Mf(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(nr(14));d[h]=_,c=c||_!==g}return c=c||o.length!==Object.keys(l).length,c?d:l}}function bk(e,t){return function(){return t(e.apply(this,arguments))}}function L$(e,t){if(typeof e=="function")return bk(e,t);if(typeof e!="object"||e===null)throw new Error(nr(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=bk(i,t))}return n}function lf(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Wv}function i(s,l){r(s)===Wv&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var F$=function(t,n){return t===n};function sX(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]-1}function vX(e){return""+e}function bX(e){return function(){return function(t){return function(n){return t(n)}}}}var H$=function(e){j$(t,e);function t(){for(var n=[],r=0;r",value:e};if(typeof e!="object"||e===null||o!=null&&o.has(e))return!1;for(var s=r!=null?r(e):Object.entries(e),l=i.length>0,u=function(_,b){var y=t?t+"."+_:_;if(l){var m=i.some(function(v){return v instanceof RegExp?v.test(y):y===v});if(m)return"continue"}if(!n(b))return{value:{keyPath:y,value:b}};if(typeof b=="object"&&(a=K$(b,y,n,r,i,o),a))return{value:a}},c=0,d=s;c0;if(y){var m=p.filter(function(v){return u(_,v,g)}).length>0;m&&(g.ids=Object.keys(g.entities))}}function f(p,g){return h([p],g)}function h(p,g){var _=eN(p,e,g),b=_[0],y=_[1];d(y,g),n(b,g)}return{removeAll:MX(l),addOne:gn(t),addMany:gn(n),setOne:gn(r),setMany:gn(i),setAll:gn(o),updateOne:gn(c),updateMany:gn(d),upsertOne:gn(f),upsertMany:gn(h),removeOne:gn(a),removeMany:gn(s)}}function RX(e,t){var n=tN(e),r=n.removeOne,i=n.removeMany,o=n.removeAll;function a(y,m){return s([y],m)}function s(y,m){y=Bu(y);var v=y.filter(function(S){return!(cp(S,e)in m.entities)});v.length!==0&&_(v,m)}function l(y,m){return u([y],m)}function u(y,m){y=Bu(y),y.length!==0&&_(y,m)}function c(y,m){y=Bu(y),m.entities={},m.ids=[],s(y,m)}function d(y,m){return f([y],m)}function f(y,m){for(var v=!1,S=0,w=y;S-1;return n&&r}function fm(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ub(){for(var e=[],t=0;t0)for(var m=h.getState(),v=Array.from(n.values()),S=0,w=v;SMath.floor(e/t)*t,Rr=(e,t)=>Math.round(e/t)*t;var XX=typeof global=="object"&&global&&global.Object===Object&&global;const bN=XX;var QX=typeof self=="object"&&self&&self.Object===Object&&self,YX=bN||QX||Function("return this")();const Ta=YX;var ZX=Ta.Symbol;const Zi=ZX;var _N=Object.prototype,JX=_N.hasOwnProperty,eQ=_N.toString,uh=Zi?Zi.toStringTag:void 0;function tQ(e){var t=JX.call(e,uh),n=e[uh];try{e[uh]=void 0;var r=!0}catch{}var i=eQ.call(e);return r&&(t?e[uh]=n:delete e[uh]),i}var nQ=Object.prototype,rQ=nQ.toString;function iQ(e){return rQ.call(e)}var oQ="[object Null]",aQ="[object Undefined]",Ak=Zi?Zi.toStringTag:void 0;function Bo(e){return e==null?e===void 0?aQ:oQ:Ak&&Ak in Object(e)?tQ(e):iQ(e)}function ni(e){return e!=null&&typeof e=="object"}var sQ="[object Symbol]";function Gb(e){return typeof e=="symbol"||ni(e)&&Bo(e)==sQ}function SN(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=zQ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function GQ(e){return function(){return e}}var HQ=function(){try{var e=fc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Jv=HQ;var qQ=Jv?function(e,t){return Jv(e,"toString",{configurable:!0,enumerable:!1,value:GQ(t),writable:!0})}:Hb;const WQ=qQ;var KQ=UQ(WQ);const EN=KQ;function TN(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var eY=9007199254740991,tY=/^(?:0|[1-9]\d*)$/;function lE(e,t){var n=typeof e;return t=t??eY,!!t&&(n=="number"||n!="symbol"&&tY.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=iY}function Of(e){return e!=null&&uE(e.length)&&!sE(e)}function Wb(e,t,n){if(!ri(n))return!1;var r=typeof t;return(r=="number"?Of(n)&&lE(t,n.length):r=="string"&&t in n)?mm(n[t],e):!1}function IN(e){return kN(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Wb(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1}function bZ(e,t){var n=this.__data__,r=Xb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?LN(s,t-1,n,r,i):gE(i,s):r||(i[i.length]=s)}return i}function DZ(e){var t=e==null?0:e.length;return t?LN(e,1):[]}function LZ(e){return EN(PN(e,void 0,DZ),e+"")}var FZ=NN(Object.getPrototypeOf,Object);const mE=FZ;var BZ="[object Object]",zZ=Function.prototype,VZ=Object.prototype,FN=zZ.toString,jZ=VZ.hasOwnProperty,UZ=FN.call(Object);function BN(e){if(!ni(e)||Bo(e)!=BZ)return!1;var t=mE(e);if(t===null)return!0;var n=jZ.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&FN.call(n)==UZ}function zN(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:zN(e,t,n)}var GZ="\\ud800-\\udfff",HZ="\\u0300-\\u036f",qZ="\\ufe20-\\ufe2f",WZ="\\u20d0-\\u20ff",KZ=HZ+qZ+WZ,XZ="\\ufe0e\\ufe0f",QZ="\\u200d",YZ=RegExp("["+QZ+GZ+KZ+XZ+"]");function Zb(e){return YZ.test(e)}function ZZ(e){return e.split("")}var jN="\\ud800-\\udfff",JZ="\\u0300-\\u036f",eJ="\\ufe20-\\ufe2f",tJ="\\u20d0-\\u20ff",nJ=JZ+eJ+tJ,rJ="\\ufe0e\\ufe0f",iJ="["+jN+"]",a5="["+nJ+"]",s5="\\ud83c[\\udffb-\\udfff]",oJ="(?:"+a5+"|"+s5+")",UN="[^"+jN+"]",GN="(?:\\ud83c[\\udde6-\\uddff]){2}",HN="[\\ud800-\\udbff][\\udc00-\\udfff]",aJ="\\u200d",qN=oJ+"?",WN="["+rJ+"]?",sJ="(?:"+aJ+"(?:"+[UN,GN,HN].join("|")+")"+WN+qN+")*",lJ=WN+qN+sJ,uJ="(?:"+[UN+a5+"?",a5,GN,HN,iJ].join("|")+")",cJ=RegExp(s5+"(?="+s5+")|"+uJ+lJ,"g");function dJ(e){return e.match(cJ)||[]}function KN(e){return Zb(e)?dJ(e):ZZ(e)}function fJ(e){return function(t){t=cf(t);var n=Zb(t)?KN(t):void 0,r=n?n[0]:t.charAt(0),i=n?VN(n,1).join(""):t.slice(1);return r[e]()+i}}var hJ=fJ("toUpperCase");const XN=hJ;function QN(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i=t?e:t)),e}function al(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=zy(n),n=n===n?n:0),t!==void 0&&(t=zy(t),t=t===t?t:0),ree(zy(e),t,n)}function iee(){this.__data__=new xs,this.size=0}function oee(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function aee(e){return this.__data__.get(e)}function see(e){return this.__data__.has(e)}var lee=200;function uee(e,t){var n=this.__data__;if(n instanceof xs){var r=n.__data__;if(!Jp||r.lengths))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&Gte?new eg:void 0;for(o.set(e,t),o.set(t,e);++d1),o}),Rf(e,gD(e),n),r&&(n=fp(n,are|sre|lre,ore));for(var i=t.length;i--;)ire(n,t[i]);return n});const $f=ure;var cre=AD("length");const dre=cre;var MD="\\ud800-\\udfff",fre="\\u0300-\\u036f",hre="\\ufe20-\\ufe2f",pre="\\u20d0-\\u20ff",gre=fre+hre+pre,mre="\\ufe0e\\ufe0f",yre="["+MD+"]",h5="["+gre+"]",p5="\\ud83c[\\udffb-\\udfff]",vre="(?:"+h5+"|"+p5+")",RD="[^"+MD+"]",OD="(?:\\ud83c[\\udde6-\\uddff]){2}",$D="[\\ud800-\\udbff][\\udc00-\\udfff]",bre="\\u200d",ND=vre+"?",DD="["+mre+"]?",_re="(?:"+bre+"(?:"+[RD,OD,$D].join("|")+")"+DD+ND+")*",Sre=DD+ND+_re,xre="(?:"+[RD+h5+"?",h5,OD,$D,yre].join("|")+")",l6=RegExp(p5+"(?="+p5+")|"+xre+Sre,"g");function wre(e){for(var t=l6.lastIndex=0;l6.test(e);)++t;return t}function LD(e){return Zb(e)?wre(e):dre(e)}var Cre=Math.floor,Ere=Math.random;function Tre(e,t){return e+Cre(Ere()*(t-e+1))}var Are=parseFloat,Pre=Math.min,kre=Math.random;function Ire(e,t,n){if(n&&typeof n!="boolean"&&Wb(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=Md(e),t===void 0?(t=e,e=0):t=Md(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=kre();return Pre(e+i*(t-e+Are("1e-"+((i+"").length-1))),t)}return Tre(e,t)}var Mre=Math.ceil,Rre=Math.max;function Ore(e,t,n,r){for(var i=-1,o=Rre(Mre((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function $re(e){return function(t,n,r){return r&&typeof r!="number"&&Wb(t,n,r)&&(n=r=void 0),t=Md(t),n===void 0?(n=t,t=0):n=Md(n),r=r===void 0?t=o)return e;var s=n-LD(r);if(s<1)return r;var l=a?VN(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),tre(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,cf(Gre.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Zv(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}var Hre=1/0,qre=Rd&&1/bE(new Rd([,-0]))[1]==Hre?function(e){return new Rd(e)}:BQ;const Wre=qre;var Kre=200;function FD(e,t,n){var r=-1,i=JQ,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Bne;else if(o>=Kre){var u=t?null:Wre(e);if(u)return bE(u);a=!1,i=xD,l=new eg}else l=t?[]:s;e:for(;++r{Od(e,t.payload)}}}),{configChanged:Qre}=zD.actions,Yre=zD.reducer,VD=ge("socket/socketConnected"),CE=ge("socket/appSocketConnected"),jD=ge("socket/socketDisconnected"),UD=ge("socket/appSocketDisconnected"),Zre=ge("socket/socketSubscribedSession"),Jre=ge("socket/appSocketSubscribedSession"),eie=ge("socket/socketUnsubscribedSession"),tie=ge("socket/appSocketUnsubscribedSession"),GD=ge("socket/socketInvocationStarted"),EE=ge("socket/appSocketInvocationStarted"),TE=ge("socket/socketInvocationComplete"),AE=ge("socket/appSocketInvocationComplete"),HD=ge("socket/socketInvocationError"),i_=ge("socket/appSocketInvocationError"),qD=ge("socket/socketGraphExecutionStateComplete"),WD=ge("socket/appSocketGraphExecutionStateComplete"),KD=ge("socket/socketGeneratorProgress"),PE=ge("socket/appSocketGeneratorProgress"),XD=ge("socket/socketModelLoadStarted"),QD=ge("socket/appSocketModelLoadStarted"),YD=ge("socket/socketModelLoadCompleted"),ZD=ge("socket/appSocketModelLoadCompleted"),JD=ge("socket/socketSessionRetrievalError"),eL=ge("socket/appSocketSessionRetrievalError"),tL=ge("socket/socketInvocationRetrievalError"),nL=ge("socket/appSocketInvocationRetrievalError"),rL=ge("socket/socketQueueItemStatusChanged"),o_=ge("socket/appSocketQueueItemStatusChanged");let S0;const nie=new Uint8Array(16);function rie(){if(!S0&&(S0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!S0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return S0(nie)}const er=[];for(let e=0;e<256;++e)er.push((e+256).toString(16).slice(1));function iie(e,t=0){return er[e[t+0]]+er[e[t+1]]+er[e[t+2]]+er[e[t+3]]+"-"+er[e[t+4]]+er[e[t+5]]+"-"+er[e[t+6]]+er[e[t+7]]+"-"+er[e[t+8]]+er[e[t+9]]+"-"+er[e[t+10]]+er[e[t+11]]+er[e[t+12]]+er[e[t+13]]+er[e[t+14]]+er[e[t+15]]}const oie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),c6={randomUUID:oie};function yl(e,t,n){if(c6.randomUUID&&!t&&!e)return c6.randomUUID();e=e||{};const r=e.random||(e.rng||rie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return iie(r)}const aie={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class t1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||aie,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{a(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(a=>{a.apply(a,[t,...r])})}}function ch(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function d6(e){return e==null?"":""+e}function sie(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function kE(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function f6(e,t,n){const{obj:r,k:i}=kE(e,t,Object);r[i]=n}function lie(e,t,n,r){const{obj:i,k:o}=kE(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}function n1(e,t){const{obj:n,k:r}=kE(e,t);if(n)return n[r]}function uie(e,t,n){const r=n1(e,n);return r!==void 0?r:n1(t,n)}function iL(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):iL(e[r],t[r],n):e[r]=t[r]);return e}function kc(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var cie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function die(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>cie[t]):e}const fie=[" ",",","?","!",";"];function hie(e,t,n){t=t||"",n=n||"";const r=fie.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function r1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;oo+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const u=r.slice(o+a).join(n);return u?r1(l,u,n):void 0}i=i[r[o]]}return i}function i1(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class h6 extends a_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,n];r&&typeof r!="string"&&(s=s.concat(r)),r&&typeof r=="string"&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split("."));const l=n1(this.data,s);return l||!a||typeof r!="string"?l:r1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),f6(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=n1(this.data,s)||{};i?iL(l,r,o):l={...l,...r},f6(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var oL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const p6={};class o1 extends a_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),sie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=sa.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!hie(t,r,i);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const v=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${v}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${v}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const h=d&&d.usedKey||a,p=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&_.indexOf(g)<0&&!(typeof b=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const v=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=v,d.usedParams=this.getUsedParamsDetails(n),d):v}if(o){const v=g==="[object Array]",S=v?[]:{},w=v?p:h;for(const C in f)if(Object.prototype.hasOwnProperty.call(f,C)){const x=`${w}${o}${C}`;S[C]=this.translate(x,{...n,joinArrays:!1,ns:s}),S[C]===x&&(S[C]=f[C])}f=S}}else if(y&&typeof b=="string"&&g==="[object Array]")f=f.join(b),f&&(f=this.extendTranslation(f,t,n,r));else{let v=!1,S=!1;const w=n.count!==void 0&&typeof n.count!="string",C=o1.hasDefaultValue(n),x=w?this.pluralResolver.getSuffix(u,n.count,n):"",P=n.ordinal&&w?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",E=n[`defaultValue${x}`]||n[`defaultValue${P}`]||n.defaultValue;!this.isValidLookup(f)&&C&&(v=!0,f=E),this.isValidLookup(f)||(S=!0,f=a);const N=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,M=C&&E!==f&&this.options.updateMissing;if(S||v||M){if(this.logger.log(M?"updateKey":"missingKey",u,l,a,M?E:f),o){const D=this.resolve(a,{...n,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const A=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&A&&A[0])for(let D=0;D{const O=C&&L!==f?L:N;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,$,O,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(D,l,$,O,M,n),this.emit("missingKey",D,l,$,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(D=>{this.pluralResolver.getSuffixes(D,n).forEach($=>{R([D],a+$,n[`defaultValue${$}`]||E)})}):R(T,a,E))}f=this.extendTranslation(f,t,n,d,r),S&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(S||v)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,v?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),h=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",h=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{this.isValidLookup(r)||(s=_,!p6[`${g[0]}-${_}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(p6[`${g[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(r))return;a=b;const y=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,b,_,n);else{let v;f&&(v=this.pluralResolver.getSuffix(b,n.count,n));const S=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(y.push(c+v),n.ordinal&&v.indexOf(w)===0&&y.push(c+v.replace(w,this.options.pluralSeparator)),h&&y.push(c+S)),p){const C=`${c}${this.options.contextSeparator}${n.context}`;y.push(C),f&&(y.push(C+v),n.ordinal&&v.indexOf(w)===0&&y.push(C+v.replace(w,this.options.pluralSeparator)),h&&y.push(C+S))}}let m;for(;m=y.pop();)this.isValidLookup(r)||(o=m,r=this.getResource(b,_,m,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function $x(e){return e.charAt(0).toUpperCase()+e.slice(1)}class g6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=sa.create("languageUtils")}getScriptPartFromCode(t){if(t=i1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=i1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=$x(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=$x(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=$x(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&o.indexOf(i)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let pie=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gie={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const mie=["v1","v2","v3"],yie=["v4"],m6={zero:0,one:1,two:2,few:3,many:4,other:5};function vie(){const e={};return pie.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:gie[t.fc]}})}),e}class bie{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=sa.create("pluralResolver"),(!this.options.compatibilityJSON||yie.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=vie()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(i1(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>m6[i]-m6[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!mie.includes(this.options.compatibilityJSON)}}function y6(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=uie(e,t,n);return!o&&i&&typeof n=="string"&&(o=r1(e,n,r),o===void 0&&(o=r1(t,n,r))),o}class _ie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=sa.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:die,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?kc(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?kc(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?kc(n.nestingPrefix):n.nestingPrefixEscaped||kc("$t("),this.nestingSuffix=n.nestingSuffix?kc(n.nestingSuffix):n.nestingSuffixEscaped||kc(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let o,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const y=y6(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),_=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(y6(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:_})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const g=o[1].trim();if(a=c(g),a===void 0)if(typeof d=="function"){const b=d(t,o,i);a=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=d6(a));const _=p.safeValue(a);if(t=t.replace(o[0],_),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;function s(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),p=f.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=d6(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function Sie(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(!a)return;const[s,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=u),u==="false"&&(n[s.trim()]=!1),u==="true"&&(n[s.trim()]=!0),isNaN(u)||(n[s.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Ic(e){const t={};return function(r,i,o){const a=i+JSON.stringify(o);let s=t[a];return s||(s=e(i1(i),o),t[a]=s),s(r)}}class xie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=sa.create("formatter"),this.options=t,this.formats={number:Ic((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Ic((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Ic((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Ic((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Ic((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ic(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,l)=>{const{formatName:u,formatOptions:c}=Sie(l);if(this.formats[u]){let d=s;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[u](s,h,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}function wie(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class Cie extends a_{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=sa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(s[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),r&&this.store.addResourceBundle(o,a,r),this.state[t]=n?-1:2;const s={};this.queue.forEach(l=>{lie(l.loaded,[o],a),wie(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{s[u][d]===void 0&&(s[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,l):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}else u(t,n,r,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function v6(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function b6(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function x0(){}function Eie(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class ng extends a_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=b6(t),this.services={},this.logger=sa,this.modules={external:[]},Eie(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=v6();this.options={...i,...this.options,...b6(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?sa.init(o(this.modules.logger),this.options):sa.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=xie);const d=new g6(this.options);this.store=new h6(this.options.resources,this.options);const f=this.services;f.logger=sa,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new bie(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new _ie(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Cie(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),_=1;_1?p-1:0),_=1;_{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=x0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=ch(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x0;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=ch();return t||(t=this.languages),n||(n=this.options.ns),r||(r=x0),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&oL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=ch();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let l;if(typeof s!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${p}`):h=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(h,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=ch();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ch();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0);return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new g6(v6());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ng(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x0;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ng(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new h6(this.store.data,i),o.services.resourceStore=o.store),o.translator=new o1(o.services,i),o.translator.on("*",function(s){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{switch(t){case"controlnet":return Od(Ye(Tie),{id:e,...n});case"t2i_adapter":return Od(Ye(Aie),{id:e,...n});case"ip_adapter":return Od(Ye(Pie),{id:e,...n});default:throw new Error(`Unknown control adapter type: ${t}`)}},IE=ge("controlAdapters/imageProcessed"),s_=e=>e.type==="controlnet",aL=e=>e.type==="ip_adapter",ME=e=>e.type==="t2i_adapter",gi=e=>s_(e)||ME(e),pn=Ji(),{selectById:di,selectAll:Aa,selectEntities:xLe,selectIds:wLe,selectTotal:CLe}=pn.getSelectors(),m5=pn.getInitialState({pendingControlImages:[]}),kie=e=>Aa(e).filter(s_),Iie=e=>Aa(e).filter(s_).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),Mie=e=>Aa(e).filter(aL),Rie=e=>Aa(e).filter(aL).filter(t=>t.isEnabled&&t.model&&!!t.controlImage),Oie=e=>Aa(e).filter(ME),$ie=e=>Aa(e).filter(ME).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),sL=Wt({name:"controlAdapters",initialState:m5,reducers:{controlAdapterAdded:{reducer:(e,t)=>{const{id:n,type:r,overrides:i}=t.payload;pn.addOne(e,_6(n,r,i))},prepare:({type:e,overrides:t})=>({payload:{id:yl(),type:e,overrides:t}})},controlAdapterRecalled:(e,t)=>{pn.addOne(e,t.payload)},controlAdapterDuplicated:{reducer:(e,t)=>{const{id:n,newId:r}=t.payload,i=di(e,n);if(!i)return;const o=Od(Ye(i),{id:r,isEnabled:!0});pn.addOne(e,o)},prepare:e=>({payload:{id:e,newId:yl()}})},controlAdapterAddedFromImage:{reducer:(e,t)=>{const{id:n,type:r,controlImage:i}=t.payload;pn.addOne(e,_6(n,r,{controlImage:i}))},prepare:e=>({payload:{...e,id:yl()}})},controlAdapterRemoved:(e,t)=>{pn.removeOne(e,t.payload.id)},controlAdapterIsEnabledChanged:(e,t)=>{const{id:n,isEnabled:r}=t.payload;pn.updateOne(e,{id:n,changes:{isEnabled:r}})},controlAdapterImageChanged:(e,t)=>{const{id:n,controlImage:r}=t.payload,i=di(e,n);i&&(pn.updateOne(e,{id:n,changes:{controlImage:r,processedControlImage:null}}),r!==null&&gi(i)&&i.processorType!=="none"&&e.pendingControlImages.push(n))},controlAdapterProcessedImageChanged:(e,t)=>{const{id:n,processedControlImage:r}=t.payload,i=di(e,n);i&&gi(i)&&(pn.updateOne(e,{id:n,changes:{processedControlImage:r}}),e.pendingControlImages=e.pendingControlImages.filter(o=>o!==n))},controlAdapterModelCleared:(e,t)=>{pn.updateOne(e,{id:t.payload.id,changes:{model:null}})},controlAdapterModelChanged:(e,t)=>{const{id:n,model:r}=t.payload,i=di(e,n);if(!i)return;if(!gi(i)){pn.updateOne(e,{id:n,changes:{model:r}});return}const o={id:n,changes:{model:r}};if(o.changes.processedControlImage=null,i.shouldAutoConfig){let a;for(const s in w0)if(r.model_name.includes(s)){a=w0[s];break}a?(o.changes.processorType=a,o.changes.processorNode=Su[a].default):(o.changes.processorType="none",o.changes.processorNode=Su.none.default)}pn.updateOne(e,o)},controlAdapterWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload;pn.updateOne(e,{id:n,changes:{weight:r}})},controlAdapterBeginStepPctChanged:(e,t)=>{const{id:n,beginStepPct:r}=t.payload;pn.updateOne(e,{id:n,changes:{beginStepPct:r}})},controlAdapterEndStepPctChanged:(e,t)=>{const{id:n,endStepPct:r}=t.payload;pn.updateOne(e,{id:n,changes:{endStepPct:r}})},controlAdapterControlModeChanged:(e,t)=>{const{id:n,controlMode:r}=t.payload,i=di(e,n);!i||!s_(i)||pn.updateOne(e,{id:n,changes:{controlMode:r}})},controlAdapterResizeModeChanged:(e,t)=>{const{id:n,resizeMode:r}=t.payload,i=di(e,n);!i||!gi(i)||pn.updateOne(e,{id:n,changes:{resizeMode:r}})},controlAdapterProcessorParamsChanged:(e,t)=>{const{id:n,params:r}=t.payload,i=di(e,n);if(!i||!gi(i)||!i.processorNode)return;const o=Od(Ye(i.processorNode),r);pn.updateOne(e,{id:n,changes:{shouldAutoConfig:!1,processorNode:o}})},controlAdapterProcessortTypeChanged:(e,t)=>{const{id:n,processorType:r}=t.payload,i=di(e,n);if(!i||!gi(i))return;const o=Ye(Su[r].default);pn.updateOne(e,{id:n,changes:{processorType:r,processedControlImage:null,processorNode:o,shouldAutoConfig:!1}})},controlAdapterAutoConfigToggled:(e,t)=>{var o;const{id:n}=t.payload,r=di(e,n);if(!r||!gi(r))return;const i={id:n,changes:{shouldAutoConfig:!r.shouldAutoConfig}};if(i.changes.shouldAutoConfig){let a;for(const s in w0)if((o=r.model)!=null&&o.model_name.includes(s)){a=w0[s];break}a?(i.changes.processorType=a,i.changes.processorNode=Su[a].default):(i.changes.processorType="none",i.changes.processorNode=Su.none.default)}pn.updateOne(e,i)},controlAdaptersReset:()=>Ye(m5),pendingControlImagesCleared:e=>{e.pendingControlImages=[]}},extraReducers:e=>{e.addCase(IE,(t,n)=>{const r=di(t,n.payload.id);r&&r.controlImage!==null&&(t.pendingControlImages=Xre(t.pendingControlImages.concat(n.payload.id)))}),e.addCase(i_,t=>{t.pendingControlImages=[]})}}),{controlAdapterAdded:Nie,controlAdapterRecalled:Die,controlAdapterDuplicated:ELe,controlAdapterAddedFromImage:Lie,controlAdapterRemoved:TLe,controlAdapterImageChanged:Hl,controlAdapterProcessedImageChanged:RE,controlAdapterIsEnabledChanged:OE,controlAdapterModelChanged:S6,controlAdapterWeightChanged:ALe,controlAdapterBeginStepPctChanged:PLe,controlAdapterEndStepPctChanged:kLe,controlAdapterControlModeChanged:ILe,controlAdapterResizeModeChanged:MLe,controlAdapterProcessorParamsChanged:Fie,controlAdapterProcessortTypeChanged:Bie,controlAdaptersReset:zie,controlAdapterAutoConfigToggled:x6,pendingControlImagesCleared:Vie,controlAdapterModelCleared:Nx}=sL.actions,jie=sL.reducer,Uie=si(Nie,Lie,Die),RLe={any:"Any","sd-1":"Stable Diffusion 1.x","sd-2":"Stable Diffusion 2.x",sdxl:"Stable Diffusion XL","sdxl-refiner":"Stable Diffusion XL Refiner"},OLe={any:"Any","sd-1":"SD1","sd-2":"SD2",sdxl:"SDXL","sdxl-refiner":"SDXLR"},Gie={any:{maxClip:0,markers:[]},"sd-1":{maxClip:12,markers:[0,1,2,3,4,8,12]},"sd-2":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},sdxl:{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},"sdxl-refiner":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]}},$Le={lycoris:"LyCORIS",diffusers:"Diffusers"},Hie=0,hp=4294967295;var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ut||(ut={}));var y5;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(y5||(y5={}));const he=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zs=e=>{switch(typeof e){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(e)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(e)?he.array:e===null?he.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?he.promise:typeof Map<"u"&&e instanceof Map?he.map:typeof Set<"u"&&e instanceof Set?he.set:typeof Date<"u"&&e instanceof Date?he.date:he.object;default:return he.unknown}},ie=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),qie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ko extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;ln.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ko.create=e=>new ko(e);const rg=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===he.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let lL=rg;function Wie(e){lL=e}function a1(){return lL}const s1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},Kie=[];function ye(e,t){const n=s1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a1(),rg].filter(r=>!!r)});e.common.issues.push(n)}class _r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return _r.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),uL=e=>({status:"dirty",value:e}),Lr=e=>({status:"valid",value:e}),v5=e=>e.status==="aborted",b5=e=>e.status==="dirty",ig=e=>e.status==="valid",l1=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ie||(Ie={}));class Sa{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w6=(e,t)=>{if(ig(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ko(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class ze{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Zs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new _r,ctx:{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(l1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},o=this._parseSync({data:t,path:i.path,parent:i});return w6(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(l1(i)?i:Promise.resolve(i));return w6(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new No({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return rs.create(this,this._def)}nullable(){return rc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Io.create(this,this._def)}promise(){return hf.create(this,this._def)}or(t){return lg.create([this,t],this._def)}and(t){return ug.create(this,t,this._def)}transform(t){return new No({...Be(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pg({...Be(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new dL({typeName:Oe.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new f1({...Be(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _m.create(this,t)}readonly(){return p1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xie=/^c[^\s-]{8,}$/i,Qie=/^[a-z][a-z0-9]*$/,Yie=/^[0-9A-HJKMNP-TV-Z]{26}$/,Zie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Jie=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eoe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dx;const toe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,noe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,roe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function ioe(e,t){return!!((t==="v4"||!t)&&toe.test(e)||(t==="v6"||!t)&&noe.test(e))}class Eo extends ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==he.string){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.string,received:o.parsedType}),Le}const r=new _r;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:ie.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Eo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ie.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ie.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Eo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Eo({checks:[],typeName:Oe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function ooe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==he.number){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.number,received:o.parsedType}),Le}let r;const i=new _r;for(const o of this._def.checks)o.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?ooe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_finite,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});class kl extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==he.bigint){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.bigint,received:o.parsedType}),Le}let r;const i=new _r;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Oe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};class og extends ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==he.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.boolean,received:r.parsedType}),Le}return Lr(t.data)}}og.create=e=>new og({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});class tc extends ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==he.date){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.date,received:o.parsedType}),Le}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_date}),Le}const r=new _r;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ut.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew tc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Be(e)});class u1 extends ze{_parse(t){if(this._getType(t)!==he.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.symbol,received:r.parsedType}),Le}return Lr(t.data)}}u1.create=e=>new u1({typeName:Oe.ZodSymbol,...Be(e)});class ag extends ze{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.undefined,received:r.parsedType}),Le}return Lr(t.data)}}ag.create=e=>new ag({typeName:Oe.ZodUndefined,...Be(e)});class sg extends ze{_parse(t){if(this._getType(t)!==he.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.null,received:r.parsedType}),Le}return Lr(t.data)}}sg.create=e=>new sg({typeName:Oe.ZodNull,...Be(e)});class ff extends ze{constructor(){super(...arguments),this._any=!0}_parse(t){return Lr(t.data)}}ff.create=e=>new ff({typeName:Oe.ZodAny,...Be(e)});class zu extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Lr(t.data)}}zu.create=e=>new zu({typeName:Oe.ZodUnknown,...Be(e)});class gs extends ze{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ie.invalid_type,expected:he.never,received:n.parsedType}),Le}}gs.create=e=>new gs({typeName:Oe.ZodNever,...Be(e)});class c1 extends ze{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.void,received:r.parsedType}),Le}return Lr(t.data)}}c1.create=e=>new c1({typeName:Oe.ZodVoid,...Be(e)});class Io extends ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==he.array)return ye(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Le;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(ye(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Sa(n,a,n.path,s)))).then(a=>_r.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Sa(n,a,n.path,s)));return _r.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Io({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new Io({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new Io({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}Io.create=(e,t)=>new Io({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Be(t)});function Hc(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=rs.create(Hc(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof Io?new Io({...e._def,type:Hc(e.element)}):e instanceof rs?rs.create(Hc(e.unwrap())):e instanceof rc?rc.create(Hc(e.unwrap())):e instanceof xa?xa.create(e.items.map(t=>Hc(t))):e}class Qt extends ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==he.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ie.invalid_type,expected:he.object,received:u.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gs&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||s.push(u);const l=[];for(const u of a){const c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Sa(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof gs){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(ye(i,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Sa(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>_r.mergeObjectSync(r,u)):_r.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ie.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}deepPartial(){return Hc(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Qt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rs;)o=o._def.innerType;n[r]=o}}),new Qt({...this._def,shape:()=>n})}keyof(){return cL(ut.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:gs.create(),typeName:Oe.ZodObject,...Be(t)});class lg extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new ko(s.ctx.common.issues));return ye(n,{code:ie.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new ko(l));return ye(n,{code:ie.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}lg.create=(e,t)=>new lg({options:e,typeName:Oe.ZodUnion,...Be(t)});const jy=e=>e instanceof dg?jy(e.schema):e instanceof No?jy(e.innerType()):e instanceof fg?[e.value]:e instanceof Il?e.options:e instanceof hg?Object.keys(e.enum):e instanceof pg?jy(e._def.innerType):e instanceof ag?[void 0]:e instanceof sg?[null]:null;class l_ extends ze{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.object)return ye(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=jy(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new l_({typeName:Oe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}}function _5(e,t){const n=Zs(e),r=Zs(t);if(e===t)return{valid:!0,data:e};if(n===he.object&&r===he.object){const i=ut.objectKeys(t),o=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=_5(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===he.array&&r===he.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(v5(o)||v5(a))return Le;const s=_5(o.value,a.value);return s.valid?((b5(o)||b5(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ie.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ug.create=(e,t,n)=>new ug({left:e,right:t,typeName:Oe.ZodIntersection,...Be(n)});class xa extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.array)return ye(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Le;if(r.data.lengththis._def.items.length&&(ye(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Sa(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>_r.mergeArray(n,a)):_r.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new xa({...this._def,rest:t})}}xa.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xa({items:e,typeName:Oe.ZodTuple,rest:null,...Be(t)})};class cg extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.object)return ye(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Le;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Sa(r,s,r.path,s)),value:a._parse(new Sa(r,r.data[s],r.path,s))});return r.common.async?_r.mergeObjectAsync(n,i):_r.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ze?new cg({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Be(r)}):new cg({keyType:Eo.create(),valueType:t,typeName:Oe.ZodRecord,...Be(n)})}}class d1 extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.map)return ye(r,{code:ie.invalid_type,expected:he.map,received:r.parsedType}),Le;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],u)=>({key:i._parse(new Sa(r,s,r.path,[u,"key"])),value:o._parse(new Sa(r,l,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}d1.create=(e,t,n)=>new d1({valueType:t,keyType:e,typeName:Oe.ZodMap,...Be(n)});class nc extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.set)return ye(r,{code:ie.invalid_type,expected:he.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(ye(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((l,u)=>o._parse(new Sa(r,l,r.path,u)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new nc({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new nc({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}nc.create=(e,t)=>new nc({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Be(t)});class $d extends ze{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.function)return ye(n,{code:ie.invalid_type,expected:he.function,received:n.parsedType}),Le;function r(s,l){return s1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,a1(),rg].filter(u=>!!u),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(s,l){return s1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,a1(),rg].filter(u=>!!u),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof hf){const s=this;return Lr(async function(...l){const u=new ko([]),c=await s._def.args.parseAsync(l,o).catch(h=>{throw u.addIssue(r(l,h)),u}),d=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return Lr(function(...l){const u=s._def.args.safeParse(l,o);if(!u.success)throw new ko([r(l,u.error)]);const c=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new ko([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $d({...this._def,args:xa.create(t).rest(zu.create())})}returns(t){return new $d({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $d({args:t||xa.create([]).rest(zu.create()),returns:n||zu.create(),typeName:Oe.ZodFunction,...Be(r)})}}class dg extends ze{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}dg.create=(e,t)=>new dg({getter:e,typeName:Oe.ZodLazy,...Be(t)});class fg extends ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}fg.create=(e,t)=>new fg({value:e,typeName:Oe.ZodLiteral,...Be(t)});function cL(e,t){return new Il({values:e,typeName:Oe.ZodEnum,...Be(t)})}class Il extends ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:ut.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Le}return Lr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Il.create(t)}exclude(t){return Il.create(this.options.filter(n=>!t.includes(n)))}}Il.create=cL;class hg extends ze{_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==he.string&&r.parsedType!==he.number){const i=ut.objectValues(n);return ye(r,{expected:ut.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=ut.objectValues(n);return ye(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Le}return Lr(t.data)}get enum(){return this._def.values}}hg.create=(e,t)=>new hg({values:e,typeName:Oe.ZodNativeEnum,...Be(t)});class hf extends ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.promise&&n.common.async===!1)return ye(n,{code:ie.invalid_type,expected:he.promise,received:n.parsedType}),Le;const r=n.parsedType===he.promise?n.data:Promise.resolve(n.data);return Lr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hf.create=(e,t)=>new hf({type:e,typeName:Oe.ZodPromise,...Be(t)});class No extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ig(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ig(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);ut.assertNever(i)}}No.create=(e,t,n)=>new No({schema:e,typeName:Oe.ZodEffects,effect:t,...Be(n)});No.createWithPreprocess=(e,t,n)=>new No({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Be(n)});class rs extends ze{_parse(t){return this._getType(t)===he.undefined?Lr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:Oe.ZodOptional,...Be(t)});class rc extends ze{_parse(t){return this._getType(t)===he.null?Lr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rc.create=(e,t)=>new rc({innerType:e,typeName:Oe.ZodNullable,...Be(t)});class pg extends ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pg.create=(e,t)=>new pg({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});class f1 extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return l1(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ko(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ko(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}f1.create=(e,t)=>new f1({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});class h1 extends ze{_parse(t){if(this._getType(t)!==he.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}h1.create=e=>new h1({typeName:Oe.ZodNaN,...Be(e)});const aoe=Symbol("zod_brand");class dL extends ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _m extends ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),uL(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new _m({in:t,out:n,typeName:Oe.ZodPipeline})}}class p1 extends ze{_parse(t){const n=this._def.innerType._parse(t);return ig(n)&&(n.value=Object.freeze(n.value)),n}}p1.create=(e,t)=>new p1({innerType:e,typeName:Oe.ZodReadonly,...Be(t)});const fL=(e,t={},n)=>e?ff.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):ff.create(),soe={object:Qt.lazycreate};var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const loe=(e,t={message:`Input not instance of ${e.name}`})=>fL(n=>n instanceof e,t),hL=Eo.create,pL=Pl.create,uoe=h1.create,coe=kl.create,gL=og.create,doe=tc.create,foe=u1.create,hoe=ag.create,poe=sg.create,goe=ff.create,moe=zu.create,yoe=gs.create,voe=c1.create,boe=Io.create,_oe=Qt.create,Soe=Qt.strictCreate,xoe=lg.create,woe=l_.create,Coe=ug.create,Eoe=xa.create,Toe=cg.create,Aoe=d1.create,Poe=nc.create,koe=$d.create,Ioe=dg.create,Moe=fg.create,Roe=Il.create,Ooe=hg.create,$oe=hf.create,C6=No.create,Noe=rs.create,Doe=rc.create,Loe=No.createWithPreprocess,Foe=_m.create,Boe=()=>hL().optional(),zoe=()=>pL().optional(),Voe=()=>gL().optional(),joe={string:e=>Eo.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>og.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>tc.create({...e,coerce:!0})},Uoe=Le;var F=Object.freeze({__proto__:null,defaultErrorMap:rg,setErrorMap:Wie,getErrorMap:a1,makeIssue:s1,EMPTY_PATH:Kie,addIssueToContext:ye,ParseStatus:_r,INVALID:Le,DIRTY:uL,OK:Lr,isAborted:v5,isDirty:b5,isValid:ig,isAsync:l1,get util(){return ut},get objectUtil(){return y5},ZodParsedType:he,getParsedType:Zs,ZodType:ze,ZodString:Eo,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:og,ZodDate:tc,ZodSymbol:u1,ZodUndefined:ag,ZodNull:sg,ZodAny:ff,ZodUnknown:zu,ZodNever:gs,ZodVoid:c1,ZodArray:Io,ZodObject:Qt,ZodUnion:lg,ZodDiscriminatedUnion:l_,ZodIntersection:ug,ZodTuple:xa,ZodRecord:cg,ZodMap:d1,ZodSet:nc,ZodFunction:$d,ZodLazy:dg,ZodLiteral:fg,ZodEnum:Il,ZodNativeEnum:hg,ZodPromise:hf,ZodEffects:No,ZodTransformer:No,ZodOptional:rs,ZodNullable:rc,ZodDefault:pg,ZodCatch:f1,ZodNaN:h1,BRAND:aoe,ZodBranded:dL,ZodPipeline:_m,ZodReadonly:p1,custom:fL,Schema:ze,ZodSchema:ze,late:soe,get ZodFirstPartyTypeKind(){return Oe},coerce:joe,any:goe,array:boe,bigint:coe,boolean:gL,date:doe,discriminatedUnion:woe,effect:C6,enum:Roe,function:koe,instanceof:loe,intersection:Coe,lazy:Ioe,literal:Moe,map:Aoe,nan:uoe,nativeEnum:Ooe,never:yoe,null:poe,nullable:Doe,number:pL,object:_oe,oboolean:Voe,onumber:zoe,optional:Noe,ostring:Boe,pipeline:Foe,preprocess:Loe,promise:$oe,record:Toe,set:Poe,strictObject:Soe,string:hL,symbol:foe,transformer:C6,tuple:Eoe,undefined:hoe,union:xoe,unknown:moe,void:voe,NEVER:Uoe,ZodIssueCode:ie,quotelessJson:qie,ZodError:ko});const Goe=F.string(),NLe=e=>Goe.safeParse(e).success,Hoe=F.string(),DLe=e=>Hoe.safeParse(e).success,qoe=F.string(),LLe=e=>qoe.safeParse(e).success,Woe=F.string(),FLe=e=>Woe.safeParse(e).success,Koe=F.number().int().min(1),BLe=e=>Koe.safeParse(e).success,Xoe=F.number().min(1),zLe=e=>Xoe.safeParse(e).success,mL=F.enum(["euler","deis","ddim","ddpm","dpmpp_2s","dpmpp_2m","dpmpp_2m_sde","dpmpp_sde","heun","kdpm_2","lms","pndm","unipc","euler_k","dpmpp_2s_k","dpmpp_2m_k","dpmpp_2m_sde_k","dpmpp_sde_k","heun_k","lms_k","euler_a","kdpm_2_a","lcm"]),VLe=e=>mL.safeParse(e).success,jLe={euler:"Euler",deis:"DEIS",ddim:"DDIM",ddpm:"DDPM",dpmpp_sde:"DPM++ SDE",dpmpp_2s:"DPM++ 2S",dpmpp_2m:"DPM++ 2M",dpmpp_2m_sde:"DPM++ 2M SDE",heun:"Heun",kdpm_2:"KDPM 2",lms:"LMS",pndm:"PNDM",unipc:"UniPC",euler_k:"Euler Karras",dpmpp_sde_k:"DPM++ SDE Karras",dpmpp_2s_k:"DPM++ 2S Karras",dpmpp_2m_k:"DPM++ 2M Karras",dpmpp_2m_sde_k:"DPM++ 2M SDE Karras",heun_k:"Heun Karras",lms_k:"LMS Karras",euler_a:"Euler Ancestral",kdpm_2_a:"KDPM 2 Ancestral",lcm:"LCM"},Qoe=F.number().int().min(0).max(hp),ULe=e=>Qoe.safeParse(e).success,yL=F.number().multipleOf(8).min(64),GLe=e=>yL.safeParse(e).success,vL=F.number().multipleOf(8).min(64),HLe=e=>vL.safeParse(e).success;F.tuple([yL,vL]);const ql=F.enum(["any","sd-1","sd-2","sdxl","sdxl-refiner"]),u_=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("main")}),qLe=e=>u_.safeParse(e).success,$E=F.object({model_name:F.string().min(1),base_model:F.literal("sdxl-refiner"),model_type:F.literal("main")}),WLe=e=>$E.safeParse(e).success,bL=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("onnx")}),Sm=F.union([u_,bL]),_L=F.object({model_name:F.string().min(1),base_model:ql}),KLe=e=>_L.safeParse(e).success,Yoe=F.object({model_name:F.string().min(1),base_model:ql}),XLe=e=>Yoe.safeParse(e).success,Zoe=F.object({model_name:F.string().min(1),base_model:ql}),QLe=e=>Zoe.safeParse(e).success,Joe=F.object({model_name:F.string().min(1),base_model:ql}),eae=F.object({model_name:F.string().min(1),base_model:ql}),YLe=e=>eae.safeParse(e).success,ZLe=e=>Joe.safeParse(e).success,tae=F.number().min(0).max(1),JLe=e=>tae.safeParse(e).success;F.enum(["fp16","fp32"]);const nae=F.enum(["ESRGAN","bilinear"]),eFe=e=>nae.safeParse(e).success,rae=F.number().min(1).max(10),tFe=e=>rae.safeParse(e).success,iae=F.number().min(1).max(10),nFe=e=>iae.safeParse(e).success,oae=F.number().min(0).max(1),rFe=e=>oae.safeParse(e).success;F.enum(["box","gaussian"]);F.enum(["unmasked","mask","edge"]);const aae=F.boolean(),iFe=e=>aae.safeParse(e).success&&e!==null&&e!==void 0,NE={hrfStrength:.45,hrfEnabled:!1,hrfMethod:"ESRGAN",cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,perlin:0,positivePrompt:"",negativePrompt:"",scheduler:"euler",maskBlur:16,maskBlurMethod:"box",canvasCoherenceMode:"unmasked",canvasCoherenceSteps:20,canvasCoherenceStrength:.3,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,infillTileSize:32,infillPatchmatchDownscaleSize:1,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0,model:null,vae:null,vaePrecision:"fp32",seamlessXAxis:!1,seamlessYAxis:!1,clipSkip:0,shouldUseCpuNoise:!0,shouldShowAdvancedOptions:!1,aspectRatio:null,shouldLockAspectRatio:!1},sae=NE,SL=Wt({name:"generation",initialState:sae,reducers:{setPositivePrompt:(e,t)=>{e.positivePrompt=t.payload},setNegativePrompt:(e,t)=>{e.negativePrompt=t.payload},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},clampSymmetrySteps:e=>{e.horizontalSymmetrySteps=al(e.horizontalSymmetrySteps,0,e.steps),e.verticalSymmetrySteps=al(e.verticalSymmetrySteps,0,e.steps)},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},toggleSize:e=>{const[t,n]=[e.width,e.height];e.width=n,e.height=t},setScheduler:(e,t)=>{e.scheduler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setSeamlessXAxis:(e,t)=>{e.seamlessXAxis=t.payload},setSeamlessYAxis:(e,t)=>{e.seamlessYAxis=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},resetParametersState:e=>({...e,...NE}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setMaskBlur:(e,t)=>{e.maskBlur=t.payload},setMaskBlurMethod:(e,t)=>{e.maskBlurMethod=t.payload},setCanvasCoherenceMode:(e,t)=>{e.canvasCoherenceMode=t.payload},setCanvasCoherenceSteps:(e,t)=>{e.canvasCoherenceSteps=t.payload},setCanvasCoherenceStrength:(e,t)=>{e.canvasCoherenceStrength=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setInfillTileSize:(e,t)=>{e.infillTileSize=t.payload},setInfillPatchmatchDownscaleSize:(e,t)=>{e.infillPatchmatchDownscaleSize=t.payload},setShouldUseSymmetry:(e,t)=>{e.shouldUseSymmetry=t.payload},setHorizontalSymmetrySteps:(e,t)=>{e.horizontalSymmetrySteps=t.payload},setVerticalSymmetrySteps:(e,t)=>{e.verticalSymmetrySteps=t.payload},initialImageChanged:(e,t)=>{const{image_name:n,width:r,height:i}=t.payload;e.initialImage={imageName:n,width:r,height:i}},modelChanged:(e,t)=>{if(e.model=t.payload,e.model===null)return;const{maxClip:n}=Gie[e.model.base_model];e.clipSkip=al(e.clipSkip,0,n)},vaeSelected:(e,t)=>{e.vae=t.payload},vaePrecisionChanged:(e,t)=>{e.vaePrecision=t.payload},setClipSkip:(e,t)=>{e.clipSkip=t.payload},setHrfStrength:(e,t)=>{e.hrfStrength=t.payload},setHrfEnabled:(e,t)=>{e.hrfEnabled=t.payload},setHrfMethod:(e,t)=>{e.hrfMethod=t.payload},shouldUseCpuNoiseChanged:(e,t)=>{e.shouldUseCpuNoise=t.payload},setAspectRatio:(e,t)=>{const n=t.payload;e.aspectRatio=n,n&&(e.height=Rr(e.width/n,8))},setShouldLockAspectRatio:(e,t)=>{e.shouldLockAspectRatio=t.payload}},extraReducers:e=>{e.addCase(Qre,(t,n)=>{var i;const r=(i=n.payload.sd)==null?void 0:i.defaultModel;if(r&&!t.model){const[o,a,s]=r.split("/"),l=u_.safeParse({model_name:s,base_model:o,model_type:a});l.success&&(t.model=l.data)}}),e.addMatcher(Uie,(t,n)=>{n.payload.type==="t2i_adapter"&&(t.width=Rr(t.width,64),t.height=Rr(t.height,64))})}}),{clampSymmetrySteps:oFe,clearInitialImage:DE,resetParametersState:aFe,resetSeed:sFe,setCfgScale:lFe,setWidth:E6,setHeight:T6,toggleSize:uFe,setImg2imgStrength:cFe,setInfillMethod:lae,setIterations:dFe,setPerlin:fFe,setPositivePrompt:uae,setNegativePrompt:hFe,setScheduler:pFe,setMaskBlur:gFe,setMaskBlurMethod:mFe,setCanvasCoherenceMode:yFe,setCanvasCoherenceSteps:vFe,setCanvasCoherenceStrength:bFe,setSeed:_Fe,setSeedWeights:SFe,setShouldFitToWidthHeight:xFe,setShouldGenerateVariations:wFe,setShouldRandomizeSeed:CFe,setSteps:EFe,setThreshold:TFe,setInfillTileSize:AFe,setInfillPatchmatchDownscaleSize:PFe,setVariationAmount:kFe,setShouldUseSymmetry:IFe,setHorizontalSymmetrySteps:MFe,setVerticalSymmetrySteps:RFe,initialImageChanged:c_,modelChanged:sl,vaeSelected:xL,setSeamlessXAxis:OFe,setSeamlessYAxis:$Fe,setClipSkip:NFe,setHrfEnabled:DFe,setHrfStrength:LFe,setHrfMethod:FFe,shouldUseCpuNoiseChanged:BFe,setAspectRatio:cae,setShouldLockAspectRatio:zFe,vaePrecisionChanged:VFe}=SL.actions,dae=SL.reducer,C0=(e,t,n,r,i,o,a)=>{const s=Math.floor(e/2-(n+i/2)*a),l=Math.floor(t/2-(r+o/2)*a);return{x:s,y:l}},E0=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r,s=Math.min(1,Math.min(o,a));return s||1},jFe=.999,UFe=.1,GFe=20,T0=.95,HFe=30,qFe=10,fae=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Mc=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a1?(r.width=s,r.height=Rr(s/o,64)):o<1&&(r.height=s,r.width=Rr(s*o,64)),a=r.width*r.height;return r},hae=e=>({width:Rr(e.width,64),height:Rr(e.height,64)}),WFe=[{label:"Base",value:"base"},{label:"Mask",value:"mask"}],KFe=[{label:"None",value:"none"},{label:"Auto",value:"auto"},{label:"Manual",value:"manual"}],wL=e=>e.kind==="line"&&e.layer==="mask",XFe=e=>e.kind==="line"&&e.layer==="base",pae=e=>e.kind==="image"&&e.layer==="base",QFe=e=>e.kind==="fillRect"&&e.layer==="base",YFe=e=>e.kind==="eraseRect"&&e.layer==="base",gae=e=>e.kind==="line";let Tr=[],Pa=(e,t)=>{let n=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},l:t||0,lc:0,listen(i,o){return r.lc=n.push(i,o||r.l)/2,()=>{let a=n.indexOf(i);~a&&(n.splice(a,2),--r.lc||r.off())}},notify(i){let o=!Tr.length;for(let a=0;a(e.events=e.events||{},e.events[n+P0]||(e.events[n+P0]=r(i=>{e.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],o=i.indexOf(t);i.splice(o,1),i.length||(delete e.events[n],e.events[n+P0](),delete e.events[n+P0])}),vae=1e3,bae=(e,t)=>yae(e,r=>{let i=t(r);i&&e.events[A0].push(i)},mae,r=>{let i=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,r()),i(...a));let o=e.off;return e.events[A0]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[A0])a();e.events[A0]=[]}},vae)},()=>{e.listen=i,e.off=o}}),_ae=(e,t)=>{Array.isArray(e)||(e=[e]);let n,r=()=>{let o=e.map(a=>a.get());(n===void 0||o.some((a,s)=>a!==n[s]))&&(n=o,i.set(t(...o)))},i=Pa(void 0,Math.max(...e.map(o=>o.l))+1);return bae(i,()=>{let o=e.map(a=>a.listen(r,i.l));return r(),()=>{for(let a of o)a()}}),i};const CL="default",Dn=Pa(CL),Sae={listCursor:void 0,listPriority:void 0,selectedQueueItem:void 0,resumeProcessorOnEnqueue:!0},xae=Sae,EL=Wt({name:"queue",initialState:xae,reducers:{listCursorChanged:(e,t)=>{e.listCursor=t.payload},listPriorityChanged:(e,t)=>{e.listPriority=t.payload},listParamsReset:e=>{e.listCursor=void 0,e.listPriority=void 0},queueItemSelectionToggled:(e,t)=>{e.selectedQueueItem===t.payload?e.selectedQueueItem=void 0:e.selectedQueueItem=t.payload},resumeProcessorOnEnqueueChanged:(e,t)=>{e.resumeProcessorOnEnqueue=t.payload}}}),{listCursorChanged:ZFe,listPriorityChanged:JFe,listParamsReset:wae,queueItemSelectionToggled:eBe,resumeProcessorOnEnqueueChanged:tBe}=EL.actions,Cae=EL.reducer,TL="%[a-f0-9]{2}",A6=new RegExp("("+TL+")|([^%]+?)","gi"),P6=new RegExp("("+TL+")+","gi");function S5(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],S5(n),S5(r))}function Eae(e){try{return decodeURIComponent(e)}catch{let t=e.match(A6)||[];for(let n=1;ne==null,Iae=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),x5=Symbol("encodeFragmentIdentifier");function Mae(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),"[",i,"]"].join("")]:[...n,[Sn(t,e),"[",Sn(i,e),"]=",Sn(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),"[]"].join("")]:[...n,[Sn(t,e),"[]=",Sn(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[Sn(t,e),":list="].join("")]:[...n,[Sn(t,e),":list=",Sn(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[Sn(n,e),t,Sn(i,e)].join("")]:[[r,Sn(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,Sn(t,e)]:[...n,[Sn(t,e),"=",Sn(r,e)].join("")]}}function Rae(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),a=typeof r=="string"&&!o&&Ua(r,e).includes(e.arrayFormatSeparator);r=a?Ua(r,e):r;const s=o||a?r.split(e.arrayFormatSeparator).map(l=>Ua(l,e)):r===null?r:Ua(r,e);i[n]=s};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&Ua(r,e);return}const a=r===null?[]:r.split(e.arrayFormatSeparator).map(s=>Ua(s,e));if(i[n]===void 0){i[n]=a;return}i[n]=[...i[n],...a]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function PL(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Sn(e,t){return t.encode?t.strict?Iae(e):encodeURIComponent(e):e}function Ua(e,t){return t.decode?Aae(e):e}function kL(e){return Array.isArray(e)?e.sort():typeof e=="object"?kL(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function IL(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function Oae(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function k6(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function LE(e){e=IL(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function FE(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},PL(t.arrayFormatSeparator);const n=Rae(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replace(/\+/g," "):i;let[a,s]=AL(o,"=");a===void 0&&(a=o),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Ua(s,t),n(Ua(a,t),s,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[a,s]of Object.entries(o))o[a]=k6(s,t);else r[i]=k6(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const a=r[o];return a&&typeof a=="object"&&!Array.isArray(a)?i[o]=kL(a):i[o]=a,i},Object.create(null))}function ML(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},PL(t.arrayFormatSeparator);const n=a=>t.skipNull&&kae(e[a])||t.skipEmptyString&&e[a]==="",r=Mae(t),i={};for(const[a,s]of Object.entries(e))n(a)||(i[a]=s);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(a=>{const s=e[a];return s===void 0?"":s===null?Sn(a,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?Sn(a,t)+"[]":s.reduce(r(a),[]).join("&"):Sn(a,t)+"="+Sn(s,t)}).filter(a=>a.length>0).join("&")}function RL(e,t){var i;t={decode:!0,...t};let[n,r]=AL(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:FE(LE(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:Ua(r,t)}:{}}}function OL(e,t){t={encode:!0,strict:!0,[x5]:!0,...t};const n=IL(e.url).split("?")[0]||"",r=LE(e.url),i={...FE(r,{sort:!1}),...e.query};let o=ML(i,t);o&&(o=`?${o}`);let a=Oae(e.url);if(e.fragmentIdentifier){const s=new URL(n);s.hash=e.fragmentIdentifier,a=t[x5]?s.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${a}`}function $L(e,t,n){n={parseFragmentIdentifier:!0,[x5]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=RL(e,n);return OL({url:r,query:Pae(i,t),fragmentIdentifier:o},n)}function $ae(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return $L(e,r,n)}const pp=Object.freeze(Object.defineProperty({__proto__:null,exclude:$ae,extract:LE,parse:FE,parseUrl:RL,pick:$L,stringify:ML,stringifyUrl:OL},Symbol.toStringTag,{value:"Module"}));var g1=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||navigator.onLine===void 0?!0:navigator.onLine}function Gae(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var O6=$o;function LL(e,t){if(e===t||!(O6(e)&&O6(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,o=Array.isArray(t)?[]:{},a=0,s=n;a=200&&e.status<=299},qae=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function N6(e){if(!$o(e))return e;for(var t=sn({},e),n=0,r=Object.entries(t);n"u"&&s===$6&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(m,v){return v1(t,null,function(){var S,w,C,x,P,E,I,N,M,T,A,R,D,$,L,O,B,U,j,q,Y,Z,V,K,ee,re,fe,Se,Me,De,Ee,tt,ot,xe,Xn,Vt;return g1(this,function($t){switch($t.label){case 0:return S=v.signal,w=v.getState,C=v.extra,x=v.endpoint,P=v.forced,E=v.type,N=typeof m=="string"?{url:m}:m,M=N.url,T=N.headers,A=T===void 0?new Headers(b.headers):T,R=N.params,D=R===void 0?void 0:R,$=N.responseHandler,L=$===void 0?g??"json":$,O=N.validateStatus,B=O===void 0?_??Hae:O,U=N.timeout,j=U===void 0?p:U,q=M6(N,["url","headers","params","responseHandler","validateStatus","timeout"]),Y=sn(la(sn({},b),{signal:S}),q),A=new Headers(N6(A)),Z=Y,[4,o(A,{getState:w,extra:C,endpoint:x,forced:P,type:E})];case 1:Z.headers=$t.sent()||A,V=function(xt){return typeof xt=="object"&&($o(xt)||Array.isArray(xt)||typeof xt.toJSON=="function")},!Y.headers.has("content-type")&&V(Y.body)&&Y.headers.set("content-type",f),V(Y.body)&&c(Y.headers)&&(Y.body=JSON.stringify(Y.body,h)),D&&(K=~M.indexOf("?")?"&":"?",ee=l?l(D):new URLSearchParams(N6(D)),M+=K+ee),M=jae(r,M),re=new Request(M,Y),fe=new Request(M,Y),I={request:fe},Me=!1,De=j&&setTimeout(function(){Me=!0,v.abort()},j),$t.label=2;case 2:return $t.trys.push([2,4,5,6]),[4,s(re)];case 3:return Se=$t.sent(),[3,6];case 4:return Ee=$t.sent(),[2,{error:{status:Me?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Ee)},meta:I}];case 5:return De&&clearTimeout(De),[7];case 6:tt=Se.clone(),I.response=tt,xe="",$t.label=7;case 7:return $t.trys.push([7,9,,10]),[4,Promise.all([y(Se,L).then(function(xt){return ot=xt},function(xt){return Xn=xt}),tt.text().then(function(xt){return xe=xt},function(){})])];case 8:if($t.sent(),Xn)throw Xn;return[3,10];case 9:return Vt=$t.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Se.status,data:xe,error:String(Vt)},meta:I}];case 10:return[2,B(Se,ot)?{data:ot,meta:I}:{error:{status:Se.status,data:ot},meta:I}]}})})};function y(m,v){return v1(this,null,function(){var S;return g1(this,function(w){switch(w.label){case 0:return typeof v=="function"?[2,v(m)]:(v==="content-type"&&(v=c(m.headers)?"json":"text"),v!=="json"?[3,2]:[4,m.text()]);case 1:return S=w.sent(),[2,S.length?JSON.parse(S):null];case 2:return[2,m.text()]}})})}}var D6=function(){function e(t,n){n===void 0&&(n=void 0),this.value=t,this.meta=n}return e}(),BE=ge("__rtkq/focused"),FL=ge("__rtkq/unfocused"),zE=ge("__rtkq/online"),BL=ge("__rtkq/offline"),wa;(function(e){e.query="query",e.mutation="mutation"})(wa||(wa={}));function zL(e){return e.type===wa.query}function Kae(e){return e.type===wa.mutation}function VE(e,t,n,r,i,o){return Xae(e)?e(t,n,r,i).map(w5).map(o):Array.isArray(e)?e.map(w5).map(o):[]}function Xae(e){return typeof e=="function"}function w5(e){return typeof e=="string"?{type:e}:e}function Lx(e){return e!=null}var gg=Symbol("forceQueryFn"),C5=function(e){return typeof e[gg]=="function"};function Qae(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,o=e.context,a=new Map,s=new Map,l=i.internalActions,u=l.unsubscribeQueryResult,c=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:y,buildInitiateMutation:m,getRunningQueryThunk:p,getRunningMutationThunk:g,getRunningQueriesThunk:_,getRunningMutationsThunk:b,getRunningOperationPromises:h,removalWarning:f};function f(){throw new Error(`This method had to be removed due to a conceptual bug in RTK. - Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details. - See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}function h(){typeof process<"u";var v=function(S){return Array.from(S.values()).flatMap(function(w){return w?Object.values(w):[]})};return m1(m1([],v(a)),v(s)).filter(Lx)}function p(v,S){return function(w){var C,x=o.endpointDefinitions[v],P=t({queryArgs:S,endpointDefinition:x,endpointName:v});return(C=a.get(w))==null?void 0:C[P]}}function g(v,S){return function(w){var C;return(C=s.get(w))==null?void 0:C[S]}}function _(){return function(v){return Object.values(a.get(v)||{}).filter(Lx)}}function b(){return function(v){return Object.values(s.get(v)||{}).filter(Lx)}}function y(v,S){var w=function(C,x){var P=x===void 0?{}:x,E=P.subscribe,I=E===void 0?!0:E,N=P.forceRefetch,M=P.subscriptionOptions,T=gg,A=P[T];return function(R,D){var $,L,O=t({queryArgs:C,endpointDefinition:S,endpointName:v}),B=n(($={type:"query",subscribe:I,forceRefetch:N,subscriptionOptions:M,endpointName:v,originalArgs:C,queryCacheKey:O},$[gg]=A,$)),U=i.endpoints[v].select(C),j=R(B),q=U(D()),Y=j.requestId,Z=j.abort,V=q.requestId!==Y,K=(L=a.get(R))==null?void 0:L[O],ee=function(){return U(D())},re=Object.assign(A?j.then(ee):V&&!K?Promise.resolve(q):Promise.all([K,j]).then(ee),{arg:C,requestId:Y,subscriptionOptions:M,queryCacheKey:O,abort:Z,unwrap:function(){return v1(this,null,function(){var Se;return g1(this,function(Me){switch(Me.label){case 0:return[4,re];case 1:if(Se=Me.sent(),Se.isError)throw Se.error;return[2,Se.data]}})})},refetch:function(){return R(w(C,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){I&&R(u({queryCacheKey:O,requestId:Y}))},updateSubscriptionOptions:function(Se){re.subscriptionOptions=Se,R(d({endpointName:v,requestId:Y,queryCacheKey:O,options:Se}))}});if(!K&&!V&&!A){var fe=a.get(R)||{};fe[O]=re,a.set(R,fe),re.then(function(){delete fe[O],Object.keys(fe).length||a.delete(R)})}return re}};return w}function m(v){return function(S,w){var C=w===void 0?{}:w,x=C.track,P=x===void 0?!0:x,E=C.fixedCacheKey;return function(I,N){var M=r({type:"mutation",endpointName:v,originalArgs:S,track:P,fixedCacheKey:E}),T=I(M),A=T.requestId,R=T.abort,D=T.unwrap,$=T.unwrap().then(function(U){return{data:U}}).catch(function(U){return{error:U}}),L=function(){I(c({requestId:A,fixedCacheKey:E}))},O=Object.assign($,{arg:T.arg,requestId:A,abort:R,unwrap:D,unsubscribe:L,reset:L}),B=s.get(I)||{};return s.set(I,B),B[A]=O,O.then(function(){delete B[A],Object.keys(B).length||s.delete(I)}),E&&(B[E]=O,O.then(function(){B[E]===O&&(delete B[E],Object.keys(B).length||s.delete(I))})),O}}}}function L6(e){return e}function Yae(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,o=e.serializeQueryArgs,a=e.api,s=e.assertTagType,l=function(v,S,w,C){return function(x,P){var E=i[v],I=o({queryArgs:S,endpointDefinition:E,endpointName:v});if(x(a.internalActions.queryResultPatched({queryCacheKey:I,patches:w})),!!C){var N=a.endpoints[v].select(S)(P()),M=VE(E.providesTags,N.data,void 0,S,{},s);x(a.internalActions.updateProvidedBy({queryCacheKey:I,providedTags:M}))}}},u=function(v,S,w,C){return C===void 0&&(C=!0),function(x,P){var E,I,N=a.endpoints[v],M=N.select(S)(P()),T={patches:[],inversePatches:[],undo:function(){return x(a.util.patchQueryData(v,S,T.inversePatches,C))}};if(M.status===Ht.uninitialized)return T;var A;if("data"in M)if(ti(M.data)){var R=nE(M.data,w),D=R[0],$=R[1],L=R[2];(E=T.patches).push.apply(E,$),(I=T.inversePatches).push.apply(I,L),A=D}else A=w(M.data),T.patches.push({op:"replace",path:[],value:A}),T.inversePatches.push({op:"replace",path:[],value:M.data});return x(a.util.patchQueryData(v,S,T.patches,C)),T}},c=function(v,S,w){return function(C){var x;return C(a.endpoints[v].initiate(S,(x={subscribe:!1,forceRefetch:!0},x[gg]=function(){return{data:w}},x)))}},d=function(v,S){return v1(t,[v,S],function(w,C){var x,P,E,I,N,M,T,A,R,D,$,L,O,B,U,j,q,Y,Z=C.signal,V=C.abort,K=C.rejectWithValue,ee=C.fulfillWithValue,re=C.dispatch,fe=C.getState,Se=C.extra;return g1(this,function(Me){switch(Me.label){case 0:x=i[w.endpointName],Me.label=1;case 1:return Me.trys.push([1,8,,13]),P=L6,E=void 0,I={signal:Z,abort:V,dispatch:re,getState:fe,extra:Se,endpoint:w.endpointName,type:w.type,forced:w.type==="query"?f(w,fe()):void 0},N=w.type==="query"?w[gg]:void 0,N?(E=N(),[3,6]):[3,2];case 2:return x.query?[4,r(x.query(w.originalArgs),I,x.extraOptions)]:[3,4];case 3:return E=Me.sent(),x.transformResponse&&(P=x.transformResponse),[3,6];case 4:return[4,x.queryFn(w.originalArgs,I,x.extraOptions,function(De){return r(De,I,x.extraOptions)})];case 5:E=Me.sent(),Me.label=6;case 6:if(typeof process<"u",E.error)throw new D6(E.error,E.meta);return $=ee,[4,P(E.data,E.meta,w.originalArgs)];case 7:return[2,$.apply(void 0,[Me.sent(),(q={fulfilledTimeStamp:Date.now(),baseQueryMeta:E.meta},q[ku]=!0,q)])];case 8:if(L=Me.sent(),O=L,!(O instanceof D6))return[3,12];B=L6,x.query&&x.transformErrorResponse&&(B=x.transformErrorResponse),Me.label=9;case 9:return Me.trys.push([9,11,,12]),U=K,[4,B(O.value,O.meta,w.originalArgs)];case 10:return[2,U.apply(void 0,[Me.sent(),(Y={baseQueryMeta:O.meta},Y[ku]=!0,Y)])];case 11:return j=Me.sent(),O=j,[3,12];case 12:throw typeof process<"u",console.error(O),O;case 13:return[2]}})})};function f(v,S){var w,C,x,P,E=(C=(w=S[n])==null?void 0:w.queries)==null?void 0:C[v.queryCacheKey],I=(x=S[n])==null?void 0:x.config.refetchOnMountOrArgChange,N=E==null?void 0:E.fulfilledTimeStamp,M=(P=v.forceRefetch)!=null?P:v.subscribe&&I;return M?M===!0||(Number(new Date)-Number(N))/1e3>=M:!1}var h=Xv(n+"/executeQuery",d,{getPendingMeta:function(){var v;return v={startedTimeStamp:Date.now()},v[ku]=!0,v},condition:function(v,S){var w=S.getState,C,x,P,E=w(),I=(x=(C=E[n])==null?void 0:C.queries)==null?void 0:x[v.queryCacheKey],N=I==null?void 0:I.fulfilledTimeStamp,M=v.originalArgs,T=I==null?void 0:I.originalArgs,A=i[v.endpointName];return C5(v)?!0:(I==null?void 0:I.status)==="pending"?!1:f(v,E)||zL(A)&&((P=A==null?void 0:A.forceRefetch)!=null&&P.call(A,{currentArg:M,previousArg:T,endpointState:I,state:E}))?!0:!N},dispatchConditionRejection:!0}),p=Xv(n+"/executeMutation",d,{getPendingMeta:function(){var v;return v={startedTimeStamp:Date.now()},v[ku]=!0,v}}),g=function(v){return"force"in v},_=function(v){return"ifOlderThan"in v},b=function(v,S,w){return function(C,x){var P=g(w)&&w.force,E=_(w)&&w.ifOlderThan,I=function(A){return A===void 0&&(A=!0),a.endpoints[v].initiate(S,{forceRefetch:A})},N=a.endpoints[v].select(S)(x());if(P)C(I());else if(E){var M=N==null?void 0:N.fulfilledTimeStamp;if(!M){C(I());return}var T=(Number(new Date)-Number(new Date(M)))/1e3>=E;T&&C(I())}else C(I(!1))}};function y(v){return function(S){var w,C;return((C=(w=S==null?void 0:S.meta)==null?void 0:w.arg)==null?void 0:C.endpointName)===v}}function m(v,S){return{matchPending:Pd(Ub(v),y(S)),matchFulfilled:Pd(Gl(v),y(S)),matchRejected:Pd(uf(v),y(S))}}return{queryThunk:h,mutationThunk:p,prefetch:b,updateQueryData:u,upsertQueryData:c,patchQueryData:l,buildMatchThunkActions:m}}function VL(e,t,n,r){return VE(n[e.meta.arg.endpointName][t],Gl(e)?e.payload:void 0,hm(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function k0(e,t,n){var r=e[t];r&&n(r)}function mg(e){var t;return(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)!=null?t:e.requestId}function F6(e,t,n){var r=e[mg(t)];r&&n(r)}var dh={};function Zae(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,o=i.endpointDefinitions,a=i.apiUid,s=i.extractRehydrationInfo,l=i.hasRehydrationInfo,u=e.assertTagType,c=e.config,d=ge(t+"/resetApiState"),f=Wt({name:t+"/queries",initialState:dh,reducers:{removeQueryResult:{reducer:function(S,w){var C=w.payload.queryCacheKey;delete S[C]},prepare:jc()},queryResultPatched:{reducer:function(S,w){var C=w.payload,x=C.queryCacheKey,P=C.patches;k0(S,x,function(E){E.data=t5(E.data,P.concat())})},prepare:jc()}},extraReducers:function(S){S.addCase(n.pending,function(w,C){var x=C.meta,P=C.meta.arg,E,I,N=C5(P);(P.subscribe||N)&&((I=w[E=P.queryCacheKey])!=null||(w[E]={status:Ht.uninitialized,endpointName:P.endpointName})),k0(w,P.queryCacheKey,function(M){M.status=Ht.pending,M.requestId=N&&M.requestId?M.requestId:x.requestId,P.originalArgs!==void 0&&(M.originalArgs=P.originalArgs),M.startedTimeStamp=x.startedTimeStamp})}).addCase(n.fulfilled,function(w,C){var x=C.meta,P=C.payload;k0(w,x.arg.queryCacheKey,function(E){var I;if(!(E.requestId!==x.requestId&&!C5(x.arg))){var N=o[x.arg.endpointName].merge;if(E.status=Ht.fulfilled,N)if(E.data!==void 0){var M=x.fulfilledTimeStamp,T=x.arg,A=x.baseQueryMeta,R=x.requestId,D=Ul(E.data,function($){return N($,P,{arg:T.originalArgs,baseQueryMeta:A,fulfilledTimeStamp:M,requestId:R})});E.data=D}else E.data=P;else E.data=(I=o[x.arg.endpointName].structuralSharing)==null||I?LL(Dr(E.data)?X4(E.data):E.data,P):P;delete E.error,E.fulfilledTimeStamp=x.fulfilledTimeStamp}})}).addCase(n.rejected,function(w,C){var x=C.meta,P=x.condition,E=x.arg,I=x.requestId,N=C.error,M=C.payload;k0(w,E.queryCacheKey,function(T){if(!P){if(T.requestId!==I)return;T.status=Ht.rejected,T.error=M??N}})}).addMatcher(l,function(w,C){for(var x=s(C).queries,P=0,E=Object.entries(x);P"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Sse:_se;GL.useSyncExternalStore=pf.useSyncExternalStore!==void 0?pf.useSyncExternalStore:xse;UL.exports=GL;var wse=UL.exports,HL={exports:{}},qL={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var d_=k,Cse=wse;function Ese(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tse=typeof Object.is=="function"?Object.is:Ese,Ase=Cse.useSyncExternalStore,Pse=d_.useRef,kse=d_.useEffect,Ise=d_.useMemo,Mse=d_.useDebugValue;qL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Pse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Ise(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&a.hasValue){var p=a.value;if(i(p,h))return d=p}return d=h}if(p=d,Tse(c,h))return p;var g=r(h);return i!==void 0&&i(p,g)?p:(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Ase(e,o[0],o[1]);return kse(function(){a.hasValue=!0,a.value=s},[s]),Mse(s),s};HL.exports=qL;var WL=HL.exports;const Rse=Bl(WL);function Ose(e){e()}let KL=Ose;const $se=e=>KL=e,Nse=()=>KL,H6=Symbol.for("react-redux-context"),q6=typeof globalThis<"u"?globalThis:{};function Dse(){var e;if(!k.createContext)return{};const t=(e=q6[H6])!=null?e:q6[H6]=new Map;let n=t.get(k.createContext);return n||(n=k.createContext(null),t.set(k.createContext,n)),n}const Ml=Dse();function jE(e=Ml){return function(){return k.useContext(e)}}const XL=jE(),Lse=()=>{throw new Error("uSES not initialized!")};let QL=Lse;const Fse=e=>{QL=e},Bse=(e,t)=>e===t;function zse(e=Ml){const t=e===Ml?XL:jE(e);return function(r,i={}){const{equalityFn:o=Bse,stabilityCheck:a=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:l,subscription:u,getServerState:c,stabilityCheck:d,noopCheck:f}=t();k.useRef(!0);const h=k.useCallback({[r.name](g){return r(g)}}[r.name],[r,d,a]),p=QL(u.addNestedSub,l.getState,c||l.getState,h,o);return k.useDebugValue(p),p}}const YL=zse();function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const W6={notify(){},get:()=>[]};function Zse(e,t){let n,r=W6,i=0,o=!1;function a(g){c();const _=r.subscribe(g);let b=!1;return()=>{b||(b=!0,_(),d())}}function s(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function u(){return o}function c(){i++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=Yse())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=W6)}function f(){o||(o=!0,c())}function h(){o&&(o=!1,d())}const p={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>r};return p}const Jse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ele=Jse?k.useLayoutEffect:k.useEffect;function K6(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function _1(e,t){if(K6(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{const u=Zse(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=k.useMemo(()=>e.getState(),[e]);ele(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,s]);const l=t||Ml;return k.createElement(l.Provider,{value:a},n)}function rF(e=Ml){const t=e===Ml?XL:jE(e);return function(){const{store:r}=t();return r}}const iF=rF();function nle(e=Ml){const t=e===Ml?iF:rF(e);return function(){return t().dispatch}}const oF=nle();Fse(WL.useSyncExternalStoreWithSelector);$se(mi.unstable_batchedUpdates);var rle=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n_le({headers:{...e?{Authorization:`Bearer ${e}`}:{},...n?{"project-id":n}:{}},baseUrl:`${t??""}`}));const Ele=["AppVersion","AppConfig","Board","BoardImagesTotal","BoardAssetsTotal","Image","ImageNameList","ImageList","ImageMetadata","ImageMetadataFromFile","IntermediatesCount","SessionQueueItem","SessionQueueStatus","SessionProcessorStatus","CurrentSessionQueueItem","NextSessionQueueItem","BatchStatus","InvocationCacheStatus","Model","T2IAdapterModel","MainModel","OnnxModel","VaeModel","IPAdapterModel","TextualInversionModel","ControlNetModel","LoRAModel","SDXLRefinerModel","Workflow"],kr="LIST",Tle=async(e,t,n)=>{const r=vg.get(),i=yg.get(),o=x1.get();return Wae({baseUrl:`${r??""}/api/v1`,prepareHeaders:s=>(i&&s.set("Authorization",`Bearer ${i}`),o&&s.set("project-id",o),s)})(e,t,n)},Do=vle({baseQuery:Tle,reducerPath:"api",tagTypes:Ele,endpoints:()=>({})}),Ale=e=>{const t=e?pp.stringify(e,{arrayFormat:"none"}):void 0;return t?`queue/${Dn.get()}/list?${t}`:`queue/${Dn.get()}/list`},xu=Ji({selectId:e=>e.item_id,sortComparer:(e,t)=>e.priority>t.priority?-1:e.priorityt.item_id?1:0}),un=Do.injectEndpoints({endpoints:e=>({enqueueBatch:e.mutation({query:t=>({url:`queue/${Dn.get()}/enqueue_batch`,body:t,method:"POST"}),invalidatesTags:["SessionQueueStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),resumeProcessor:e.mutation({query:()=>({url:`queue/${Dn.get()}/processor/resume`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pauseProcessor:e.mutation({query:()=>({url:`queue/${Dn.get()}/processor/pause`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pruneQueue:e.mutation({query:()=>({url:`queue/${Dn.get()}/prune`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","BatchStatus"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),clearQueue:e.mutation({query:()=>({url:`queue/${Dn.get()}/clear`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","SessionProcessorStatus","BatchStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}}}),getCurrentQueueItem:e.query({query:()=>({url:`queue/${Dn.get()}/current`,method:"GET"}),providesTags:t=>{const n=["CurrentSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getNextQueueItem:e.query({query:()=>({url:`queue/${Dn.get()}/next`,method:"GET"}),providesTags:t=>{const n=["NextSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getQueueStatus:e.query({query:()=>({url:`queue/${Dn.get()}/status`,method:"GET"}),providesTags:["SessionQueueStatus"]}),getBatchStatus:e.query({query:({batch_id:t})=>({url:`queue/${Dn.get()}/b/${t}/status`,method:"GET"}),providesTags:t=>t?[{type:"BatchStatus",id:t.batch_id}]:[]}),getQueueItem:e.query({query:t=>({url:`queue/${Dn.get()}/i/${t}`,method:"GET"}),providesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id}]:[]}),cancelQueueItem:e.mutation({query:t=>({url:`queue/${Dn.get()}/i/${t}/cancel`,method:"PUT"}),onQueryStarted:async(t,{dispatch:n,queryFulfilled:r})=>{try{const{data:i}=await r;n(un.util.updateQueryData("listQueueItems",void 0,o=>{xu.updateOne(o,{id:t,changes:{status:i.status,completed_at:i.completed_at,updated_at:i.updated_at}})}))}catch{}},invalidatesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id},{type:"BatchStatus",id:t.batch_id}]:[]}),cancelByBatchIds:e.mutation({query:t=>({url:`queue/${Dn.get()}/cancel_by_batch_ids`,method:"PUT",body:t}),onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,O0(r)}catch{}},invalidatesTags:["SessionQueueStatus","BatchStatus"]}),listQueueItems:e.query({query:t=>({url:Ale(t),method:"GET"}),serializeQueryArgs:()=>`queue/${Dn.get()}/list`,transformResponse:t=>xu.addMany(xu.getInitialState({has_more:t.has_more}),t.items),merge:(t,n)=>{xu.addMany(t,xu.getSelectors().selectAll(n)),t.has_more=n.has_more},forceRefetch:({currentArg:t,previousArg:n})=>t!==n,keepUnusedDataFor:60*5})})}),{useCancelByBatchIdsMutation:nBe,useEnqueueBatchMutation:rBe,usePauseProcessorMutation:iBe,useResumeProcessorMutation:oBe,useClearQueueMutation:aBe,usePruneQueueMutation:sBe,useGetCurrentQueueItemQuery:lBe,useGetQueueStatusQuery:uBe,useGetQueueItemQuery:cBe,useGetNextQueueItemQuery:dBe,useListQueueItemsQuery:fBe,useCancelQueueItemMutation:hBe,useGetBatchStatusQuery:pBe}=un,O0=e=>{e(un.util.updateQueryData("listQueueItems",void 0,t=>{xu.removeAll(t),t.has_more=!1})),e(wae()),e(un.endpoints.listQueueItems.initiate(void 0))},zh={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},aF={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"none",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,futureLayerStates:[],isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:zh,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAntialias:!0,shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush",batchIds:[]},sF=Wt({name:"canvas",initialState:aF,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!wL(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{width:r,height:i}=n,{stageDimensions:o}=e,a={width:b0(al(r,64,512),64),height:b0(al(i,64,512),64)},s={x:Rr(r/2-a.width/2,64),y:Rr(i/2-a.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const c=Mc(a);e.scaledBoundingBoxDimensions=c}e.boundingBoxDimensions=a,e.boundingBoxCoordinates=s,e.pastLayerStates.push(Ye(e.layerState)),e.layerState={...Ye(zh),objects:[{kind:"image",layer:"base",x:0,y:0,width:r,height:i,imageName:n.image_name}]},e.futureLayerStates=[],e.batchIds=[];const l=E0(o.width,o.height,r,i,T0),u=C0(o.width,o.height,0,0,r,i,l);e.stageScale=l,e.stageCoordinates=u},setBoundingBoxDimensions:(e,t)=>{const n=hae(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Mc(n);e.scaledBoundingBoxDimensions=r}},flipBoundingBoxAxes:e=>{const[t,n]=[e.boundingBoxDimensions.width,e.boundingBoxDimensions.height],[r,i]=[e.scaledBoundingBoxDimensions.width,e.scaledBoundingBoxDimensions.height];e.boundingBoxDimensions={width:n,height:t},e.scaledBoundingBoxDimensions={width:i,height:r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=fae(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},canvasBatchIdAdded:(e,t)=>{e.batchIds.push(t.payload)},canvasBatchIdsReset:e=>{e.batchIds=[]},stagingAreaInitialized:(e,t)=>{const{boundingBox:n}=t.payload;e.layerState.stagingArea={boundingBox:n,images:[],selectedImageIndex:-1}},addImageToStagingArea:(e,t)=>{const n=t.payload;!n||!e.layerState.stagingArea.boundingBox||(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...e.layerState.stagingArea.boundingBox,imageName:n.image_name}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea=Ye(Ye(zh)).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(gae);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Ye(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState=Ye(zh),e.futureLayerStates=[],e.batchIds=[]},canvasResized:(e,t)=>{const{width:n,height:r}=t.payload,i={width:Math.floor(n),height:Math.floor(r)};if(e.stageDimensions=i,!e.layerState.objects.find(pae)){const o=E0(i.width,i.height,512,512,T0),a=C0(i.width,i.height,0,0,512,512,o),s={width:512,height:512};if(e.stageScale=o,e.stageCoordinates=a,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=s,e.boundingBoxScaleMethod==="auto"){const l=Mc(s);e.scaledBoundingBoxDimensions=l}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const c=r?1:E0(i,o,l,u,T0),d=C0(i,o,a,s,l,u,c);e.stageScale=c,e.stageCoordinates=d}else{const c=E0(i,o,512,512,T0),d=C0(i,o,0,0,512,512,c),f={width:512,height:512};if(e.stageScale=c,e.stageCoordinates=d,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=f,e.boundingBoxScaleMethod==="auto"){const h=Mc(f);e.scaledBoundingBoxDimensions=h}}},nextStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex+1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t>n?0:t},prevStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex-1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t<0?n:t},commitStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const r=t[n];r&&e.layerState.objects.push({...r}),e.layerState.stagingArea=Ye(zh).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:b0(al(o,64,512),64),height:b0(al(a,64,512),64)},l={x:Rr(o/2-s.width/2,64),y:Rr(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=Mc(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Mc(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldAntialias:(e,t)=>{e.shouldAntialias=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(Ye(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}},extraReducers:e=>{e.addCase(o_,(t,n)=>{const r=n.payload.data.batch_status;t.batchIds.includes(r.batch_id)&&r.in_progress===0&&r.pending===0&&(t.batchIds=t.batchIds.filter(i=>i!==r.batch_id))}),e.addCase(cae,(t,n)=>{const r=n.payload;r&&(t.boundingBoxDimensions.height=Rr(t.boundingBoxDimensions.width/r,64),t.scaledBoundingBoxDimensions.height=Rr(t.scaledBoundingBoxDimensions.width/r,64))}),e.addMatcher(un.endpoints.clearQueue.matchFulfilled,t=>{t.batchIds=[]}),e.addMatcher(un.endpoints.cancelByBatchIds.matchFulfilled,(t,n)=>{t.batchIds=t.batchIds.filter(r=>!n.meta.arg.originalArgs.batch_ids.includes(r))})}}),{addEraseRect:gBe,addFillRect:mBe,addImageToStagingArea:Ple,addLine:yBe,addPointToCurrentLine:vBe,clearCanvasHistory:bBe,clearMask:_Be,commitColorPickerColor:SBe,commitStagingAreaImage:kle,discardStagedImages:Ile,fitBoundingBoxToStage:xBe,mouseLeftCanvas:wBe,nextStagingAreaImage:CBe,prevStagingAreaImage:EBe,redo:TBe,resetCanvas:KE,resetCanvasInteractionState:ABe,resetCanvasView:PBe,setBoundingBoxCoordinates:kBe,setBoundingBoxDimensions:Z6,setBoundingBoxPreviewFill:IBe,setBoundingBoxScaleMethod:MBe,flipBoundingBoxAxes:RBe,setBrushColor:OBe,setBrushSize:$Be,setColorPickerColor:NBe,setCursorPosition:DBe,setInitialCanvasImage:lF,setIsDrawing:LBe,setIsMaskEnabled:FBe,setIsMouseOverBoundingBox:BBe,setIsMoveBoundingBoxKeyHeld:zBe,setIsMoveStageKeyHeld:VBe,setIsMovingBoundingBox:jBe,setIsMovingStage:UBe,setIsTransformingBoundingBox:GBe,setLayer:HBe,setMaskColor:qBe,setMergedCanvas:Mle,setShouldAutoSave:WBe,setShouldCropToBoundingBoxOnSave:KBe,setShouldDarkenOutsideBoundingBox:XBe,setShouldLockBoundingBox:QBe,setShouldPreserveMaskedArea:YBe,setShouldShowBoundingBox:ZBe,setShouldShowBrush:JBe,setShouldShowBrushPreview:eze,setShouldShowCanvasDebugInfo:tze,setShouldShowCheckboardTransparency:nze,setShouldShowGrid:rze,setShouldShowIntermediates:ize,setShouldShowStagingImage:oze,setShouldShowStagingOutline:aze,setShouldSnapToGrid:sze,setStageCoordinates:lze,setStageScale:uze,setTool:cze,toggleShouldLockBoundingBox:dze,toggleTool:fze,undo:hze,setScaledBoundingBoxDimensions:pze,setShouldRestrictStrokesToBox:gze,stagingAreaInitialized:Rle,setShouldAntialias:mze,canvasResized:yze,canvasBatchIdAdded:Ole,canvasBatchIdsReset:$le}=sF.actions,Nle=sF.reducer,Dle={isModalOpen:!1,imagesToChange:[]},uF=Wt({name:"changeBoardModal",initialState:Dle,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToChangeSelected:(e,t)=>{e.imagesToChange=t.payload},changeBoardReset:e=>{e.imagesToChange=[],e.isModalOpen=!1}}}),{isModalOpenChanged:vze,imagesToChangeSelected:bze,changeBoardReset:_ze}=uF.actions,Lle=uF.reducer,Fle={imagesToDelete:[],isModalOpen:!1},cF=Wt({name:"deleteImageModal",initialState:Fle,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToDeleteSelected:(e,t)=>{e.imagesToDelete=t.payload},imageDeletionCanceled:e=>{e.imagesToDelete=[],e.isModalOpen=!1}}}),{isModalOpenChanged:XE,imagesToDeleteSelected:Ble,imageDeletionCanceled:Sze}=cF.actions,zle=cF.reducer,QE={maxPrompts:100,combinatorial:!0,prompts:[],parsingError:void 0,isError:!1,isLoading:!1,seedBehaviour:"PER_ITERATION"},Vle=QE,dF=Wt({name:"dynamicPrompts",initialState:Vle,reducers:{maxPromptsChanged:(e,t)=>{e.maxPrompts=t.payload},maxPromptsReset:e=>{e.maxPrompts=QE.maxPrompts},combinatorialToggled:e=>{e.combinatorial=!e.combinatorial},promptsChanged:(e,t)=>{e.prompts=t.payload},parsingErrorChanged:(e,t)=>{e.parsingError=t.payload},isErrorChanged:(e,t)=>{e.isError=t.payload},isLoadingChanged:(e,t)=>{e.isLoading=t.payload},seedBehaviourChanged:(e,t)=>{e.seedBehaviour=t.payload}}}),{maxPromptsChanged:jle,maxPromptsReset:Ule,combinatorialToggled:Gle,promptsChanged:Hle,parsingErrorChanged:qle,isErrorChanged:J6,isLoadingChanged:Ux,seedBehaviourChanged:xze}=dF.actions,Wle=dF.reducer,Fn=["general"],Pr=["control","mask","user","other"],Kle=100,$0=20,Xle=(e,t)=>{const n=new Date(e),r=new Date(t);return n>r?1:n{if(!e)return!1;const n=bg.selectAll(e);if(n.length<=1)return!0;const r=[],i=[];for(let o=0;o=s}else{const o=i[i.length-1];if(!o)return!1;const a=new Date(t.created_at),s=new Date(o.created_at);return a>=s}},Ni=e=>Fn.includes(e.image_category)?Fn:Pr,Ft=Ji({selectId:e=>e.image_name,sortComparer:(e,t)=>e.starred&&!t.starred?-1:!e.starred&&t.starred?1:Xle(t.created_at,e.created_at)}),bg=Ft.getSelectors(),Vi=e=>`images/?${pp.stringify(e,{arrayFormat:"none"})}`,Qe=Do.injectEndpoints({endpoints:e=>({listBoards:e.query({query:t=>({url:"boards/",params:t}),providesTags:t=>{const n=[{type:"Board",id:kr}];return t&&n.push(...t.items.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllBoards:e.query({query:()=>({url:"boards/",params:{all:!0}}),providesTags:t=>{const n=[{type:"Board",id:kr}];return t&&n.push(...t.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllImageNamesForBoard:e.query({query:t=>({url:`boards/${t}/image_names`}),providesTags:(t,n,r)=>[{type:"ImageNameList",id:r}],keepUnusedDataFor:0}),getBoardImagesTotal:e.query({query:t=>({url:Vi({board_id:t??"none",categories:Fn,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardImagesTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),getBoardAssetsTotal:e.query({query:t=>({url:Vi({board_id:t??"none",categories:Pr,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardAssetsTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),createBoard:e.mutation({query:t=>({url:"boards/",method:"POST",params:{board_name:t}}),invalidatesTags:[{type:"Board",id:kr}]}),updateBoard:e.mutation({query:({board_id:t,changes:n})=>({url:`boards/${t}`,method:"PATCH",body:n}),invalidatesTags:(t,n,r)=>[{type:"Board",id:r.board_id}]})})}),{useListBoardsQuery:wze,useListAllBoardsQuery:Cze,useGetBoardImagesTotalQuery:Eze,useGetBoardAssetsTotalQuery:Tze,useCreateBoardMutation:Aze,useUpdateBoardMutation:Pze,useListAllImageNamesForBoardQuery:kze}=Qe;var fF={},R_={},O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.createLogMethods=void 0;var Qle=function(){return{debug:console.debug.bind(console),error:console.error.bind(console),fatal:console.error.bind(console),info:console.info.bind(console),trace:console.debug.bind(console),warn:console.warn.bind(console)}};O_.createLogMethods=Qle;var YE={},$_={};Object.defineProperty($_,"__esModule",{value:!0});$_.boolean=void 0;const Yle=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};$_.boolean=Yle;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.isBooleanable=void 0;const Zle=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};N_.isBooleanable=Zle;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=$_;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=N_;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(YE);var eI=Object.prototype.toString,hF=function(t){var n=eI.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&eI.call(t.callee)==="[object Function]"),r},Gx,tI;function Jle(){if(tI)return Gx;tI=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=hF,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var h=f.constructor;return h&&h.prototype===f},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!u["$"+f]&&t.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),d=function(f){if(typeof window>"u"||!c)return l(f);try{return l(f)}catch{return!1}};e=function(h){var p=h!==null&&typeof h=="object",g=n.call(h)==="[object Function]",_=r(h),b=p&&n.call(h)==="[object String]",y=[];if(!p&&!g&&!_)throw new TypeError("Object.keys called on a non-object");var m=a&&g;if(b&&h.length>0&&!t.call(h,0))for(var v=0;v0)for(var S=0;S"u"||!Bn?We:Bn(Uint8Array),ju={"%AggregateError%":typeof AggregateError>"u"?We:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?We:ArrayBuffer,"%ArrayIteratorPrototype%":Rc&&Bn?Bn([][Symbol.iterator]()):We,"%AsyncFromSyncIteratorPrototype%":We,"%AsyncFunction%":qc,"%AsyncGenerator%":qc,"%AsyncGeneratorFunction%":qc,"%AsyncIteratorPrototype%":qc,"%Atomics%":typeof Atomics>"u"?We:Atomics,"%BigInt%":typeof BigInt>"u"?We:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?We:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?We:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?We:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?We:Float32Array,"%Float64Array%":typeof Float64Array>"u"?We:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?We:FinalizationRegistry,"%Function%":gF,"%GeneratorFunction%":qc,"%Int8Array%":typeof Int8Array>"u"?We:Int8Array,"%Int16Array%":typeof Int16Array>"u"?We:Int16Array,"%Int32Array%":typeof Int32Array>"u"?We:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rc&&Bn?Bn(Bn([][Symbol.iterator]())):We,"%JSON%":typeof JSON=="object"?JSON:We,"%Map%":typeof Map>"u"?We:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rc||!Bn?We:Bn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?We:Promise,"%Proxy%":typeof Proxy>"u"?We:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?We:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?We:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rc||!Bn?We:Bn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?We:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rc&&Bn?Bn(""[Symbol.iterator]()):We,"%Symbol%":Rc?Symbol:We,"%SyntaxError%":gf,"%ThrowTypeError%":gue,"%TypedArray%":yue,"%TypeError%":Nd,"%Uint8Array%":typeof Uint8Array>"u"?We:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?We:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?We:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?We:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?We:WeakMap,"%WeakRef%":typeof WeakRef>"u"?We:WeakRef,"%WeakSet%":typeof WeakSet>"u"?We:WeakSet};if(Bn)try{null.error}catch(e){var vue=Bn(Bn(e));ju["%Error.prototype%"]=vue}var bue=function e(t){var n;if(t==="%AsyncFunction%")n=qx("async function () {}");else if(t==="%GeneratorFunction%")n=qx("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=qx("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Bn&&(n=Bn(i.prototype))}return ju[t]=n,n},aI={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},xm=pF,w1=pue,_ue=xm.call(Function.call,Array.prototype.concat),Sue=xm.call(Function.apply,Array.prototype.splice),sI=xm.call(Function.call,String.prototype.replace),C1=xm.call(Function.call,String.prototype.slice),xue=xm.call(Function.call,RegExp.prototype.exec),wue=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cue=/\\(\\)?/g,Eue=function(t){var n=C1(t,0,1),r=C1(t,-1);if(n==="%"&&r!=="%")throw new gf("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gf("invalid intrinsic syntax, expected opening `%`");var i=[];return sI(t,wue,function(o,a,s,l){i[i.length]=s?sI(l,Cue,"$1"):a||o}),i},Tue=function(t,n){var r=t,i;if(w1(aI,r)&&(i=aI[r],r="%"+i[0]+"%"),w1(ju,r)){var o=ju[r];if(o===qc&&(o=bue(r)),typeof o>"u"&&!n)throw new Nd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gf("intrinsic "+t+" does not exist!")},Aue=function(t,n){if(typeof t!="string"||t.length===0)throw new Nd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nd('"allowMissing" argument must be a boolean');if(xue(/^%?[^%]*%?$/,t)===null)throw new gf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Eue(t),i=r.length>0?r[0]:"",o=Tue("%"+i+"%",n),a=o.name,s=o.value,l=!1,u=o.alias;u&&(i=u[0],Sue(r,_ue([0,1],u)));for(var c=1,d=!0;c=r.length){var g=Vu(s,f);d=!!g,d&&"get"in g&&!("originalValue"in g.get)?s=g.get:s=s[f]}else d=w1(s,f),s=s[f];d&&!l&&(ju[a]=s)}}return s},Pue=Aue,T5=Pue("%Object.defineProperty%",!0),A5=function(){if(T5)try{return T5({},"a",{value:1}),!0}catch{return!1}return!1};A5.hasArrayLengthDefineBug=function(){if(!A5())return null;try{return T5([],"length",{value:1}).length!==1}catch{return!0}};var kue=A5,Iue=nue,Mue=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Rue=Object.prototype.toString,Oue=Array.prototype.concat,mF=Object.defineProperty,$ue=function(e){return typeof e=="function"&&Rue.call(e)==="[object Function]"},Nue=kue(),yF=mF&&Nue,Due=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!$ue(r)||!r())return}yF?mF(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},vF=function(e,t){var n=arguments.length>2?arguments[2]:{},r=Iue(t);Mue&&(r=Oue.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i":return t>e;case":<":return t=":return t>=e;case":<=":return t<=e;default:throw new Error("Unimplemented comparison operator: ".concat(n))}};B_.testComparisonRange=ice;var z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.testRange=void 0;var oce=function(e,t){return typeof e=="number"?!(et.max||e===t.max&&!t.maxInclusive):!1};z_.testRange=oce;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(c){for(var d,f=1,h=arguments.length;f0?{path:l.path,query:new RegExp("("+l.keywords.map(function(u){return(0,lce.escapeRegexString)(u.trim())}).join("|")+")")}:{path:l.path}})};V_.highlight=cce;var j_={},EF={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(He,function(){function t(u,c,d){return this.id=++t.highestId,this.name=u,this.symbols=c,this.postprocess=d,this}t.highestId=0,t.prototype.toString=function(u){var c=typeof u>"u"?this.symbols.map(l).join(" "):this.symbols.slice(0,u).map(l).join(" ")+" ● "+this.symbols.slice(u).map(l).join(" ");return this.name+" → "+c};function n(u,c,d,f){this.rule=u,this.dot=c,this.reference=d,this.data=[],this.wantedBy=f,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var c=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return c.left=this,c.right=u,c.isComplete&&(c.data=c.build(),c.right=void 0),c},n.prototype.build=function(){var u=[],c=this;do u.push(c.right.data),c=c.left;while(c.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,a.fail))};function r(u,c){this.grammar=u,this.index=c,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var c=this.states,d=this.wants,f=this.completed,h=0;h0&&c.push(" ^ "+f+" more lines identical to this"),f=0,c.push(" "+g)),d=g}},a.prototype.getSymbolDisplay=function(u){return s(u)},a.prototype.buildFirstStateStack=function(u,c){if(c.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var d=u.wantedBy[0],f=[u].concat(c),h=this.buildFirstStateStack(d,f);return h===null?null:[u].concat(h)},a.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},a.prototype.restore=function(u){var c=u.index;this.current=c,this.table[c]=u,this.table.splice(c+1),this.lexerState=u.lexerState,this.results=this.finish()},a.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},a.prototype.finish=function(){var u=[],c=this.grammar.start,d=this.table[this.table.length-1];return d.states.forEach(function(f){f.rule.name===c&&f.dot===f.rule.symbols.length&&f.reference===0&&f.data!==a.fail&&u.push(f)}),u.map(function(f){return f.data})};function s(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function l(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:a,Grammar:i,Rule:t}})})(EF);var dce=EF.exports,ic={},TF={},Wl={};Wl.__esModule=void 0;Wl.__esModule=!0;var fce=typeof Object.setPrototypeOf=="function",hce=typeof Object.getPrototypeOf=="function",pce=typeof Object.defineProperty=="function",gce=typeof Object.create=="function",mce=typeof Object.prototype.hasOwnProperty=="function",yce=function(t,n){fce?Object.setPrototypeOf(t,n):t.__proto__=n};Wl.setPrototypeOf=yce;var vce=function(t){return hce?Object.getPrototypeOf(t):t.__proto__||t.prototype};Wl.getPrototypeOf=vce;var lI=!1,bce=function e(t,n,r){if(pce&&!lI)try{Object.defineProperty(t,n,r)}catch{lI=!0,e(t,n,r)}else t[n]=r.value};Wl.defineProperty=bce;var AF=function(t,n){return mce?t.hasOwnProperty(t,n):t[n]===void 0};Wl.hasOwnProperty=AF;var _ce=function(t,n){if(gce)return Object.create(t,n);var r=function(){};r.prototype=t;var i=new r;if(typeof n>"u")return i;if(typeof n=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof n=="object")for(var o in n)AF(n,o)&&(i[o]=n[o].value);return i};Wl.objectCreate=_ce;(function(e){e.__esModule=void 0,e.__esModule=!0;var t=Wl,n=t.setPrototypeOf,r=t.getPrototypeOf,i=t.defineProperty,o=t.objectCreate,a=new Error().toString()==="[object Error]",s="";function l(u){var c=this.constructor,d=c.name||function(){var _=c.toString().match(/^function\s*([^\s(]+)/);return _===null?s||"Error":_[1]}(),f=d==="Error",h=f?s:d,p=Error.apply(this,arguments);if(n(p,r(this)),!(p instanceof c)||!(p instanceof l)){var p=this;Error.apply(this,arguments),i(p,"message",{configurable:!0,enumerable:!1,value:u,writable:!0})}if(i(p,"name",{configurable:!0,enumerable:!1,value:h,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(p,f?l:c),p.stack===void 0){var g=new Error(u);g.name=p.name,p.stack=g.stack}return a&&i(p,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),p}s=l.name||"ExtendableError",l.prototype=o(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),e.ExtendableError=l,e.default=e.ExtendableError})(TF);var PF=He&&He.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ic,"__esModule",{value:!0});ic.SyntaxError=ic.LiqeError=void 0;var Sce=TF,kF=function(e){PF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Sce.ExtendableError);ic.LiqeError=kF;var xce=function(e){PF(t,e);function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.offset=r,a.line=i,a.column=o,a}return t}(kF);ic.SyntaxError=xce;var JE={},E1=He&&He.__assign||function(){return E1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$2"]},{name:"comparison_operator$subexpression$1$string$3",symbols:[{literal:":"},{literal:"<"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$3"]},{name:"comparison_operator$subexpression$1$string$4",symbols:[{literal:":"},{literal:">"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$4"]},{name:"comparison_operator$subexpression$1$string$5",symbols:[{literal:":"},{literal:"<"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$5"]},{name:"comparison_operator",symbols:["comparison_operator$subexpression$1"],postprocess:function(e,t){return{location:{start:t,end:t+e[0][0].length},type:"ComparisonOperator",operator:e[0][0]}}},{name:"regex",symbols:["regex_body","regex_flags"],postprocess:function(e){return e.join("")}},{name:"regex_body$ebnf$1",symbols:[]},{name:"regex_body$ebnf$1",symbols:["regex_body$ebnf$1","regex_body_char"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_body",symbols:[{literal:"/"},"regex_body$ebnf$1",{literal:"/"}],postprocess:function(e){return"/"+e[1].join("")+"/"}},{name:"regex_body_char",symbols:[/[^\\]/],postprocess:$a},{name:"regex_body_char",symbols:[{literal:"\\"},/[^\\]/],postprocess:function(e){return"\\"+e[1]}},{name:"regex_flags",symbols:[]},{name:"regex_flags$ebnf$1",symbols:[/[gmiyusd]/]},{name:"regex_flags$ebnf$1",symbols:["regex_flags$ebnf$1",/[gmiyusd]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_flags",symbols:["regex_flags$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"unquoted_value$ebnf$1",symbols:[]},{name:"unquoted_value$ebnf$1",symbols:["unquoted_value$ebnf$1",/[a-zA-Z\.\-_*@#$]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"unquoted_value",symbols:[/[a-zA-Z_*@#$]/,"unquoted_value$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}}],ParserStart:"main"};JE.default=wce;var IF={},U_={},Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.isSafePath=void 0;var Cce=/^(\.(?:[_a-zA-Z][a-zA-Z\d_]*|\0|[1-9]\d*))+$/u,Ece=function(e){return Cce.test(e)};Em.isSafePath=Ece;Object.defineProperty(U_,"__esModule",{value:!0});U_.createGetValueFunctionBody=void 0;var Tce=Em,Ace=function(e){if(!(0,Tce.isSafePath)(e))throw new Error("Unsafe path.");var t="return subject"+e;return t.replace(/(\.(\d+))/g,".[$2]").replace(/\./g,"?.")};U_.createGetValueFunctionBody=Ace;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(o){for(var a,s=1,l=arguments.length;s\d+) col (?\d+)/,Oce=function(e){if(e.trim()==="")return{location:{end:0,start:0},type:"EmptyExpression"};var t=new RF.default.Parser(Mce),n;try{n=t.feed(e).results}catch(o){if(typeof(o==null?void 0:o.message)=="string"&&typeof(o==null?void 0:o.offset)=="number"){var r=o.message.match(Rce);throw r?new Pce.SyntaxError("Syntax error at line ".concat(r.groups.line," column ").concat(r.groups.column),o.offset,Number(r.groups.line),Number(r.groups.column)):o}throw o}if(n.length===0)throw new Error("Found no parsings.");if(n.length>1)throw new Error("Ambiguous results.");var i=(0,Ice.hydrateAst)(n[0]);return i};j_.parse=Oce;var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.test=void 0;var $ce=wm,Nce=function(e,t){return(0,$ce.filter)(e,[t]).length===1};G_.test=Nce;var OF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=void 0;var t=function(o,a){return a==="double"?'"'.concat(o,'"'):a==="single"?"'".concat(o,"'"):o},n=function(o){if(o.type==="LiteralExpression")return o.quoted&&typeof o.value=="string"?t(o.value,o.quotes):String(o.value);if(o.type==="RegexExpression")return String(o.value);if(o.type==="RangeExpression"){var a=o.range,s=a.min,l=a.max,u=a.minInclusive,c=a.maxInclusive;return"".concat(u?"[":"{").concat(s," TO ").concat(l).concat(c?"]":"}")}if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")},r=function(o){if(o.type!=="Tag")throw new Error("Expected a tag expression.");var a=o.field,s=o.expression,l=o.operator;if(a.type==="ImplicitField")return n(s);var u=a.quoted?t(a.name,a.quotes):a.name,c=" ".repeat(s.location.start-l.location.end);return u+l.operator+c+n(s)},i=function(o){if(o.type==="ParenthesizedExpression"){if(!("location"in o.expression))throw new Error("Expected location in expression.");if(!o.location.end)throw new Error("Expected location end.");var a=" ".repeat(o.expression.location.start-(o.location.start+1)),s=" ".repeat(o.location.end-o.expression.location.end-1);return"(".concat(a).concat((0,e.serialize)(o.expression)).concat(s,")")}if(o.type==="Tag")return r(o);if(o.type==="LogicalExpression"){var l="";return o.operator.type==="BooleanOperator"?(l+=" ".repeat(o.operator.location.start-o.left.location.end),l+=o.operator.operator,l+=" ".repeat(o.right.location.start-o.operator.location.end)):l=" ".repeat(o.right.location.start-o.left.location.end),"".concat((0,e.serialize)(o.left)).concat(l).concat((0,e.serialize)(o.right))}if(o.type==="UnaryOperator")return(o.operator==="NOT"?"NOT ":o.operator)+(0,e.serialize)(o.operand);if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")};e.serialize=i})(OF);var H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.isSafeUnquotedExpression=void 0;var Dce=function(e){return/^[#$*@A-Z_a-z][#$*.@A-Z_a-z-]*$/.test(e)};H_.isSafeUnquotedExpression=Dce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isSafeUnquotedExpression=e.serialize=e.SyntaxError=e.LiqeError=e.test=e.parse=e.highlight=e.filter=void 0;var t=wm;Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return t.filter}});var n=V_;Object.defineProperty(e,"highlight",{enumerable:!0,get:function(){return n.highlight}});var r=j_;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.parse}});var i=G_;Object.defineProperty(e,"test",{enumerable:!0,get:function(){return i.test}});var o=ic;Object.defineProperty(e,"LiqeError",{enumerable:!0,get:function(){return o.LiqeError}}),Object.defineProperty(e,"SyntaxError",{enumerable:!0,get:function(){return o.SyntaxError}});var a=OF;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return a.serialize}});var s=H_;Object.defineProperty(e,"isSafeUnquotedExpression",{enumerable:!0,get:function(){return s.isSafeUnquotedExpression}})})(CF);var Tm={},$F={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.ROARR_LOG_FORMAT_VERSION=oc.ROARR_VERSION=void 0;oc.ROARR_VERSION="5.0.0";oc.ROARR_LOG_FORMAT_VERSION="2.0.0";var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.logLevels=void 0;Nf.logLevels={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};var NF={},q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.hasOwnProperty=void 0;const Lce=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);q_.hasOwnProperty=Lce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hasOwnProperty=void 0;var t=q_;Object.defineProperty(e,"hasOwnProperty",{enumerable:!0,get:function(){return t.hasOwnProperty}})})(NF);var W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.isBrowser=void 0;const Fce=()=>typeof window<"u";W_.isBrowser=Fce;var K_={};Object.defineProperty(K_,"__esModule",{value:!0});K_.isTruthy=void 0;const Bce=e=>["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());K_.isTruthy=Bce;var DF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMockLogger=void 0;const t=Nf,n=(i,o)=>(a,s,l,u,c,d,f,h,p,g)=>{i.child({logLevel:o})(a,s,l,u,c,d,f,h,p,g)},r=(i,o)=>{const a=()=>{};return a.adopt=async s=>s(),a.child=()=>(0,e.createMockLogger)(i,o),a.getContext=()=>({}),a.debug=n(a,t.logLevels.debug),a.debugOnce=n(a,t.logLevels.debug),a.error=n(a,t.logLevels.error),a.errorOnce=n(a,t.logLevels.error),a.fatal=n(a,t.logLevels.fatal),a.fatalOnce=n(a,t.logLevels.fatal),a.info=n(a,t.logLevels.info),a.infoOnce=n(a,t.logLevels.info),a.trace=n(a,t.logLevels.trace),a.traceOnce=n(a,t.logLevels.trace),a.warn=n(a,t.logLevels.warn),a.warnOnce=n(a,t.logLevels.warn),a};e.createMockLogger=r})(DF);var LF={},X_={},Q_={};Object.defineProperty(Q_,"__esModule",{value:!0});Q_.tokenize=void 0;const zce=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Vce=e=>{let t;const n=[];let r=0,i=0,o=null;for(;(t=zce.exec(e))!==null;){t.index>i&&(o={literal:e.slice(i,t.index),type:"literal"},n.push(o));const a=t[0];i=t.index+a.length,a==="\\%"||a==="%%"?o&&o.type==="literal"?o.literal+="%":(o={literal:"%",type:"literal"},n.push(o)):t.groups&&(o={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:a,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(o))}return i<=e.length-1&&(o&&o.type==="literal"?o.literal+=e.slice(i):n.push({literal:e.slice(i),type:"literal"})),n};Q_.tokenize=Vce;Object.defineProperty(X_,"__esModule",{value:!0});X_.createPrintf=void 0;const uI=YE,jce=Q_,Uce=(e,t)=>t.placeholder,Gce=e=>{var t;const n=(o,a,s)=>s==="-"?o.padEnd(a," "):s==="-+"?((Number(o)>=0?"+":"")+o).padEnd(a," "):s==="+"?((Number(o)>=0?"+":"")+o).padStart(a," "):s==="0"?o.padStart(a,"0"):o.padStart(a," "),r=(t=e==null?void 0:e.formatUnboundExpression)!==null&&t!==void 0?t:Uce,i={};return(o,...a)=>{let s=i[o];s||(s=i[o]=jce.tokenize(o));let l="";for(const u of s)if(u.type==="literal")l+=u.literal;else{let c=a[u.position];if(c===void 0)l+=r(o,u,a);else if(u.conversion==="b")l+=uI.boolean(c)?"true":"false";else if(u.conversion==="B")l+=uI.boolean(c)?"TRUE":"FALSE";else if(u.conversion==="c")l+=c;else if(u.conversion==="C")l+=String(c).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")c=String(Math.trunc(c)),u.width!==null&&(c=n(c,u.width,u.flag)),l+=c;else if(u.conversion==="e")l+=Number(c).toExponential();else if(u.conversion==="E")l+=Number(c).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(c=Number(c).toFixed(u.precision)),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="o")l+=(Number.parseInt(String(c),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="S")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=String(c).toUpperCase();else if(u.conversion==="u")l+=Number.parseInt(String(c),10)>>>0;else if(u.conversion==="x")c=(Number.parseInt(String(c),10)>>>0).toString(16),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else throw new Error("Unknown format specifier.")}return l}};X_.createPrintf=Gce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=X_;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(LF);var P5={exports:{}};(function(e,t){const{hasOwnProperty:n}=Object.prototype,r=_();r.configure=_,r.stringify=r,r.default=r,t.stringify=r,t.configure=_,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function o(b){return b.length<5e3&&!i.test(b)?`"${b}"`:JSON.stringify(b)}function a(b){if(b.length>200)return b.sort();for(let y=1;ym;)b[v]=b[v-1],v--;b[v]=m}return b}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(b){return s.call(b)!==void 0&&b.length!==0}function u(b,y,m){b.length= 1`)}return m===void 0?1/0:m}function h(b){return b===1?"1 item":`${b} items`}function p(b){const y=new Set;for(const m of b)(typeof m=="string"||typeof m=="number")&&y.add(String(m));return y}function g(b){if(n.call(b,"strict")){const y=b.strict;if(typeof y!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(y)return m=>{let v=`Object can not safely be stringified. Received type ${typeof m}`;throw typeof m!="function"&&(v+=` (${m.toString()})`),new Error(v)}}}function _(b){b={...b};const y=g(b);y&&(b.bigint===void 0&&(b.bigint=!1),"circularValue"in b||(b.circularValue=Error));const m=c(b),v=d(b,"bigint"),S=d(b,"deterministic"),w=f(b,"maximumDepth"),C=f(b,"maximumBreadth");function x(M,T,A,R,D,$){let L=T[M];switch(typeof L=="object"&&L!==null&&typeof L.toJSON=="function"&&(L=L.toJSON(M)),L=R.call(T,M,L),typeof L){case"string":return o(L);case"object":{if(L===null)return"null";if(A.indexOf(L)!==-1)return m;let O="",B=",";const U=$;if(Array.isArray(L)){if(L.length===0)return"[]";if(wC){const fe=L.length-C-1;O+=`${B}"... ${h(fe)} not stringified"`}return D!==""&&(O+=` -${U}`),A.pop(),`[${O}]`}let j=Object.keys(L);const q=j.length;if(q===0)return"{}";if(wC){const K=q-C;O+=`${Z}"...":${Y}"${h(K)} not stringified"`,Z=B}return D!==""&&Z.length>1&&(O=` -${$}${O} -${U}`),A.pop(),`{${O}}`}case"number":return isFinite(L)?String(L):y?y(L):"null";case"boolean":return L===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(L);default:return y?y(L):void 0}}function P(M,T,A,R,D,$){switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(M)),typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(A.indexOf(T)!==-1)return m;const L=$;let O="",B=",";if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const V=T.length-C-1;O+=`${B}"... ${h(V)} not stringified"`}return D!==""&&(O+=` -${L}`),A.pop(),`[${O}]`}A.push(T);let U="";D!==""&&($+=D,B=`, -${$}`,U=" ");let j="";for(const q of R){const Y=P(q,T[q],A,R,D,$);Y!==void 0&&(O+=`${j}${o(q)}:${U}${Y}`,j=B)}return D!==""&&j.length>1&&(O=` -${$}${O} -${L}`),A.pop(),`{${O}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function E(M,T,A,R,D){switch(typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(typeof T.toJSON=="function"){if(T=T.toJSON(M),typeof T!="object")return E(M,T,A,R,D);if(T===null)return"null"}if(A.indexOf(T)!==-1)return m;const $=D;if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const re=T.length-C-1;Y+=`${Z}"... ${h(re)} not stringified"`}return Y+=` -${$}`,A.pop(),`[${Y}]`}let L=Object.keys(T);const O=L.length;if(O===0)return"{}";if(wC){const Y=O-C;U+=`${j}"...": "${h(Y)} not stringified"`,j=B}return j!==""&&(U=` -${D}${U} -${$}`),A.pop(),`{${U}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function I(M,T,A){switch(typeof T){case"string":return o(T);case"object":{if(T===null)return"null";if(typeof T.toJSON=="function"){if(T=T.toJSON(M),typeof T!="object")return I(M,T,A);if(T===null)return"null"}if(A.indexOf(T)!==-1)return m;let R="";if(Array.isArray(T)){if(T.length===0)return"[]";if(wC){const q=T.length-C-1;R+=`,"... ${h(q)} not stringified"`}return A.pop(),`[${R}]`}let D=Object.keys(T);const $=D.length;if($===0)return"{}";if(wC){const B=$-C;R+=`${L}"...":"${h(B)} not stringified"`}return A.pop(),`{${R}}`}case"number":return isFinite(T)?String(T):y?y(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(v)return String(T);default:return y?y(T):void 0}}function N(M,T,A){if(arguments.length>1){let R="";if(typeof A=="number"?R=" ".repeat(Math.min(A,10)):typeof A=="string"&&(R=A.slice(0,10)),T!=null){if(typeof T=="function")return x("",{"":M},[],T,R,"");if(Array.isArray(T))return P("",M,[],p(T),R,"")}if(R.length!==0)return E("",M,[],R,"")}return I("",M,[])}return N}})(P5,P5.exports);var Hce=P5.exports;(function(e){var t=He&&He.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=void 0;const n=oc,r=Nf,i=NF,o=W_,a=K_,s=DF,l=LF,u=t(Hce);let c=!1;const d=()=>globalThis.ROARR,f=()=>({messageContext:{},transforms:[]}),h=()=>{const v=d().asyncLocalStorage;if(!v)throw new Error("AsyncLocalContext is unavailable.");const S=v.getStore();return S||f()},p=()=>!!d().asyncLocalStorage,g=()=>{if(p()){const v=h();return(0,i.hasOwnProperty)(v,"sequenceRoot")&&(0,i.hasOwnProperty)(v,"sequence")&&typeof v.sequence=="number"?String(v.sequenceRoot)+"."+String(v.sequence++):String(d().sequence++)}return String(d().sequence++)},_=(v,S)=>(w,C,x,P,E,I,N,M,T,A)=>{v.child({logLevel:S})(w,C,x,P,E,I,N,M,T,A)},b=1e3,y=(v,S)=>(w,C,x,P,E,I,N,M,T,A)=>{const R=(0,u.default)({a:w,b:C,c:x,d:P,e:E,f:I,g:N,h:M,i:T,j:A,logLevel:S});if(!R)throw new Error("Expected key to be a string");const D=d().onceLog;D.has(R)||(D.add(R),D.size>b&&D.clear(),v.child({logLevel:S})(w,C,x,P,E,I,N,M,T,A))},m=(v,S={},w=[])=>{var C;if(!(0,o.isBrowser)()&&typeof process<"u"&&!(0,a.isTruthy)((C={}.ROARR_LOG)!==null&&C!==void 0?C:""))return(0,s.createMockLogger)(v,S);const x=(P,E,I,N,M,T,A,R,D,$)=>{const L=Date.now(),O=g();let B;p()?B=h():B=f();let U,j;if(typeof P=="string"?U={...B.messageContext,...S}:U={...B.messageContext,...S,...P},typeof P=="string"&&E===void 0)j=P;else if(typeof P=="string"){if(!P.includes("%"))throw new Error("When a string parameter is followed by other arguments, then it is assumed that you are attempting to format a message using printf syntax. You either forgot to add printf bindings or if you meant to add context to the log message, pass them in an object as the first parameter.");j=(0,l.printf)(P,E,I,N,M,T,A,R,D,$)}else{let Y=E;if(typeof E!="string")if(E===void 0)Y="";else throw new TypeError("Message must be a string. Received "+typeof E+".");j=(0,l.printf)(Y,I,N,M,T,A,R,D,$)}let q={context:U,message:j,sequence:O,time:L,version:n.ROARR_LOG_FORMAT_VERSION};for(const Y of[...B.transforms,...w])if(q=Y(q),typeof q!="object"||q===null)throw new Error("Message transform function must return a message object.");v(q)};return x.child=P=>{let E;return p()?E=h():E=f(),typeof P=="function"?(0,e.createLogger)(v,{...E.messageContext,...S,...P},[P,...w]):(0,e.createLogger)(v,{...E.messageContext,...S,...P},w)},x.getContext=()=>{let P;return p()?P=h():P=f(),{...P.messageContext,...S}},x.adopt=async(P,E)=>{if(!p())return c===!1&&(c=!0,v({context:{logLevel:r.logLevels.warn,package:"roarr"},message:"async_hooks are unavailable; Roarr.adopt will not function as expected",sequence:g(),time:Date.now(),version:n.ROARR_LOG_FORMAT_VERSION})),P();const I=h();let N;(0,i.hasOwnProperty)(I,"sequenceRoot")&&(0,i.hasOwnProperty)(I,"sequence")&&typeof I.sequence=="number"?N=I.sequenceRoot+"."+String(I.sequence++):N=String(d().sequence++);let M={...I.messageContext};const T=[...I.transforms];typeof E=="function"?T.push(E):M={...M,...E};const A=d().asyncLocalStorage;if(!A)throw new Error("Async local context unavailable.");return A.run({messageContext:M,sequence:0,sequenceRoot:N,transforms:T},()=>P())},x.debug=_(x,r.logLevels.debug),x.debugOnce=y(x,r.logLevels.debug),x.error=_(x,r.logLevels.error),x.errorOnce=y(x,r.logLevels.error),x.fatal=_(x,r.logLevels.fatal),x.fatalOnce=y(x,r.logLevels.fatal),x.info=_(x,r.logLevels.info),x.infoOnce=y(x,r.logLevels.info),x.trace=_(x,r.logLevels.trace),x.traceOnce=y(x,r.logLevels.trace),x.warn=_(x,r.logLevels.warn),x.warnOnce=y(x,r.logLevels.warn),x};e.createLogger=m})($F);var Y_={},qce=function(t,n){for(var r=t.split("."),i=n.split("."),o=0;o<3;o++){var a=Number(r[o]),s=Number(i[o]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return 0},Wce=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y_,"__esModule",{value:!0});Y_.createRoarrInitialGlobalStateBrowser=void 0;const cI=oc,dI=Wce(qce),Kce=e=>{const t=(e.versions||[]).concat();return t.length>1&&t.sort(dI.default),t.includes(cI.ROARR_VERSION)||t.push(cI.ROARR_VERSION),t.sort(dI.default),{sequence:0,...e,versions:t}};Y_.createRoarrInitialGlobalStateBrowser=Kce;var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.getLogLevelName=void 0;const Xce=e=>e<=10?"trace":e<=20?"debug":e<=30?"info":e<=40?"warn":e<=50?"error":"fatal";Z_.getLogLevelName=Xce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getLogLevelName=e.logLevels=e.Roarr=e.ROARR=void 0;const t=$F,r=(0,Y_.createRoarrInitialGlobalStateBrowser)(globalThis.ROARR||{});e.ROARR=r,globalThis.ROARR=r;const i=l=>JSON.stringify(l),o=(0,t.createLogger)(l=>{var u;r.write&&r.write(((u=r.serializeMessage)!==null&&u!==void 0?u:i)(l))});e.Roarr=o;var a=Nf;Object.defineProperty(e,"logLevels",{enumerable:!0,get:function(){return a.logLevels}});var s=Z_;Object.defineProperty(e,"getLogLevelName",{enumerable:!0,get:function(){return s.getLogLevelName}})})(Tm);var fI=He&&He.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0?g("%c ".concat(p," %c").concat(f?" [".concat(String(f),"]:"):"","%c ").concat(u.message," %O"),b,y,m,h):g("%c ".concat(p," %c").concat(f?" [".concat(String(f),"]:"):"","%c ").concat(u.message),b,y,m)}}:function(l){var u=JSON.parse(l),c=u.context,d=c.logLevel,f=c.namespace,h=fI(c,["logLevel","namespace"]);if(!(s&&!(0,k5.test)(s,u))){var p=(0,hI.getLogLevelName)(Number(d)),g=a[p];Object.keys(h).length>0?g("".concat(p," ").concat(f?" [".concat(String(f),"]:"):""," ").concat(u.message),h):g("".concat(p," ").concat(f?" [".concat(String(f),"]:"):""," ").concat(u.message))}}};R_.createLogWriter=rde;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createLogWriter=void 0;var t=R_;Object.defineProperty(e,"createLogWriter",{enumerable:!0,get:function(){return t.createLogWriter}})})(fF);Tm.ROARR.write=fF.createLogWriter();const FF={};Tm.Roarr.child(FF);const J_=Pa(Tm.Roarr.child(FF)),se=e=>J_.get().child({namespace:e}),Ize=["trace","debug","info","warn","error","fatal"],Mze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},BF=Pa(),zF=F.enum(["Any","BoardField","boolean","BooleanCollection","BooleanPolymorphic","ClipField","Collection","CollectionItem","ColorCollection","ColorField","ColorPolymorphic","ConditioningCollection","ConditioningField","ConditioningPolymorphic","ControlCollection","ControlField","ControlNetModelField","ControlPolymorphic","DenoiseMaskField","enum","float","FloatCollection","FloatPolymorphic","ImageCollection","ImageField","ImagePolymorphic","integer","IntegerCollection","IntegerPolymorphic","IPAdapterCollection","IPAdapterField","IPAdapterModelField","IPAdapterPolymorphic","LatentsCollection","LatentsField","LatentsPolymorphic","LoRAModelField","MainModelField","MetadataField","MetadataCollection","MetadataItemField","MetadataItemCollection","MetadataItemPolymorphic","ONNXModelField","Scheduler","SDXLMainModelField","SDXLRefinerModelField","string","StringCollection","StringPolymorphic","T2IAdapterCollection","T2IAdapterField","T2IAdapterModelField","T2IAdapterPolymorphic","UNetField","VaeField","VaeModelField"]),ide=F.enum(["WorkflowField","IsIntermediate","MetadataField"]),gI=e=>zF.safeParse(e).success||ide.safeParse(e).success;F.enum(["connection","direct","any"]);const VF=F.object({id:F.string().trim().min(1),name:F.string().trim().min(1),type:zF}),ode=VF.extend({fieldKind:F.literal("output")}),Ae=VF.extend({fieldKind:F.literal("input"),label:F.string()}),Cs=F.object({model_name:F.string().trim().min(1),base_model:ql}),Df=F.object({image_name:F.string().trim().min(1)}),ade=F.object({board_id:F.string().trim().min(1)}),T1=F.object({latents_name:F.string().trim().min(1),seed:F.number().int().optional()}),A1=F.object({conditioning_name:F.string().trim().min(1)}),sde=F.object({mask_name:F.string().trim().min(1),masked_latents_name:F.string().trim().min(1).optional()}),lde=Ae.extend({type:F.literal("integer"),value:F.number().int().optional()}),ude=Ae.extend({type:F.literal("IntegerCollection"),value:F.array(F.number().int()).optional()}),cde=Ae.extend({type:F.literal("IntegerPolymorphic"),value:F.number().int().optional()}),dde=Ae.extend({type:F.literal("float"),value:F.number().optional()}),fde=Ae.extend({type:F.literal("FloatCollection"),value:F.array(F.number()).optional()}),hde=Ae.extend({type:F.literal("FloatPolymorphic"),value:F.number().optional()}),pde=Ae.extend({type:F.literal("string"),value:F.string().optional()}),gde=Ae.extend({type:F.literal("StringCollection"),value:F.array(F.string()).optional()}),mde=Ae.extend({type:F.literal("StringPolymorphic"),value:F.string().optional()}),yde=Ae.extend({type:F.literal("boolean"),value:F.boolean().optional()}),vde=Ae.extend({type:F.literal("BooleanCollection"),value:F.array(F.boolean()).optional()}),bde=Ae.extend({type:F.literal("BooleanPolymorphic"),value:F.boolean().optional()}),_de=Ae.extend({type:F.literal("enum"),value:F.string().optional()}),Sde=Ae.extend({type:F.literal("LatentsField"),value:T1.optional()}),xde=Ae.extend({type:F.literal("LatentsCollection"),value:F.array(T1).optional()}),wde=Ae.extend({type:F.literal("LatentsPolymorphic"),value:F.union([T1,F.array(T1)]).optional()}),Cde=Ae.extend({type:F.literal("DenoiseMaskField"),value:sde.optional()}),Ede=Ae.extend({type:F.literal("ConditioningField"),value:A1.optional()}),Tde=Ae.extend({type:F.literal("ConditioningCollection"),value:F.array(A1).optional()}),Ade=Ae.extend({type:F.literal("ConditioningPolymorphic"),value:F.union([A1,F.array(A1)]).optional()}),Pde=Cs,_g=F.object({image:Df,control_model:Pde,control_weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),control_mode:F.enum(["balanced","more_prompt","more_control","unbalanced"]).optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),kde=Ae.extend({type:F.literal("ControlField"),value:_g.optional()}),Ide=Ae.extend({type:F.literal("ControlPolymorphic"),value:F.union([_g,F.array(_g)]).optional()}),Mde=Ae.extend({type:F.literal("ControlCollection"),value:F.array(_g).optional()}),Rde=Cs,Sg=F.object({image:Df,ip_adapter_model:Rde,weight:F.number(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional()}),Ode=Ae.extend({type:F.literal("IPAdapterField"),value:Sg.optional()}),$de=Ae.extend({type:F.literal("IPAdapterPolymorphic"),value:F.union([Sg,F.array(Sg)]).optional()}),Nde=Ae.extend({type:F.literal("IPAdapterCollection"),value:F.array(Sg).optional()}),Dde=Cs,xg=F.object({image:Df,t2i_adapter_model:Dde,weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),Lde=Ae.extend({type:F.literal("T2IAdapterField"),value:xg.optional()}),Fde=Ae.extend({type:F.literal("T2IAdapterPolymorphic"),value:F.union([xg,F.array(xg)]).optional()}),Bde=Ae.extend({type:F.literal("T2IAdapterCollection"),value:F.array(xg).optional()}),zde=F.enum(["onnx","main","vae","lora","controlnet","embedding"]),Vde=F.enum(["unet","text_encoder","text_encoder_2","tokenizer","tokenizer_2","vae","vae_decoder","vae_encoder","scheduler","safety_checker"]),mf=Cs.extend({model_type:zde,submodel:Vde.optional()}),jF=mf.extend({weight:F.number().optional()}),jde=F.object({unet:mf,scheduler:mf,loras:F.array(jF)}),Ude=Ae.extend({type:F.literal("UNetField"),value:jde.optional()}),Gde=F.object({tokenizer:mf,text_encoder:mf,skipped_layers:F.number(),loras:F.array(jF)}),Hde=Ae.extend({type:F.literal("ClipField"),value:Gde.optional()}),qde=F.object({vae:mf}),Wde=Ae.extend({type:F.literal("VaeField"),value:qde.optional()}),Kde=Ae.extend({type:F.literal("ImageField"),value:Df.optional()}),Xde=Ae.extend({type:F.literal("BoardField"),value:ade.optional()}),Qde=Ae.extend({type:F.literal("ImagePolymorphic"),value:Df.optional()}),Yde=Ae.extend({type:F.literal("ImageCollection"),value:F.array(Df).optional()}),Zde=Ae.extend({type:F.literal("MainModelField"),value:Sm.optional()}),Jde=Ae.extend({type:F.literal("SDXLMainModelField"),value:Sm.optional()}),efe=Ae.extend({type:F.literal("SDXLRefinerModelField"),value:Sm.optional()}),UF=Cs,tfe=Ae.extend({type:F.literal("VaeModelField"),value:UF.optional()}),GF=Cs,nfe=Ae.extend({type:F.literal("LoRAModelField"),value:GF.optional()}),rfe=Cs,ife=Ae.extend({type:F.literal("ControlNetModelField"),value:rfe.optional()}),ofe=Cs,afe=Ae.extend({type:F.literal("IPAdapterModelField"),value:ofe.optional()}),sfe=Cs,lfe=Ae.extend({type:F.literal("T2IAdapterModelField"),value:sfe.optional()}),ufe=Ae.extend({type:F.literal("Collection"),value:F.array(F.any()).optional()}),cfe=Ae.extend({type:F.literal("CollectionItem"),value:F.any().optional()}),P1=F.object({label:F.string(),value:F.any()}),dfe=Ae.extend({type:F.literal("MetadataItemField"),value:P1.optional()}),ffe=Ae.extend({type:F.literal("MetadataItemCollection"),value:F.array(P1).optional()}),hfe=Ae.extend({type:F.literal("MetadataItemPolymorphic"),value:F.union([P1,F.array(P1)]).optional()}),HF=F.record(F.any()),pfe=Ae.extend({type:F.literal("MetadataField"),value:HF.optional()}),gfe=Ae.extend({type:F.literal("MetadataCollection"),value:F.array(HF).optional()}),k1=F.object({r:F.number().int().min(0).max(255),g:F.number().int().min(0).max(255),b:F.number().int().min(0).max(255),a:F.number().int().min(0).max(255)}),mfe=Ae.extend({type:F.literal("ColorField"),value:k1.optional()}),yfe=Ae.extend({type:F.literal("ColorCollection"),value:F.array(k1).optional()}),vfe=Ae.extend({type:F.literal("ColorPolymorphic"),value:F.union([k1,F.array(k1)]).optional()}),bfe=Ae.extend({type:F.literal("Scheduler"),value:mL.optional()}),_fe=Ae.extend({type:F.literal("Any"),value:F.any().optional()}),Sfe=F.discriminatedUnion("type",[_fe,Xde,vde,yde,bde,Hde,ufe,cfe,mfe,yfe,vfe,Ede,Tde,Ade,kde,ife,Mde,Ide,Cde,_de,fde,dde,hde,Yde,Qde,Kde,ude,cde,lde,Ode,afe,Nde,$de,Sde,xde,wde,nfe,Zde,bfe,Jde,efe,gde,mde,pde,Lde,lfe,Bde,Fde,Ude,Wde,tfe,dfe,ffe,hfe,pfe,gfe]),Rze=e=>!!(e&&e.fieldKind==="input"),Oze=e=>!!(e&&e.fieldKind==="input"),N0=e=>!!(e&&!("$ref"in e)),mI=e=>!!(e&&!("$ref"in e)&&e.type==="array"),D0=e=>!!(e&&!("$ref"in e)&&e.type!=="array"),au=e=>!!(e&&"$ref"in e),xfe=e=>"class"in e&&e.class==="invocation",wfe=e=>"class"in e&&e.class==="output",yI=e=>!("$ref"in e),qF=F.object({lora:GF.deepPartial(),weight:F.number()}),Cfe=_g.deepPartial(),Efe=Sg.deepPartial(),Tfe=xg.deepPartial(),Afe=F.object({app_version:F.string().nullish().catch(null),generation_mode:F.string().nullish().catch(null),created_by:F.string().nullish().catch(null),positive_prompt:F.string().nullish().catch(null),negative_prompt:F.string().nullish().catch(null),width:F.number().int().nullish().catch(null),height:F.number().int().nullish().catch(null),seed:F.number().int().nullish().catch(null),rand_device:F.string().nullish().catch(null),cfg_scale:F.number().nullish().catch(null),steps:F.number().int().nullish().catch(null),scheduler:F.string().nullish().catch(null),clip_skip:F.number().int().nullish().catch(null),model:F.union([u_.deepPartial(),bL.deepPartial()]).nullish().catch(null),controlnets:F.array(Cfe).nullish().catch(null),ipAdapters:F.array(Efe).nullish().catch(null),t2iAdapters:F.array(Tfe).nullish().catch(null),loras:F.array(qF).nullish().catch(null),vae:UF.nullish().catch(null),strength:F.number().nullish().catch(null),hrf_enabled:F.boolean().nullish().catch(null),hrf_strength:F.number().nullish().catch(null),hrf_method:F.string().nullish().catch(null),init_image:F.string().nullish().catch(null),positive_style_prompt:F.string().nullish().catch(null),negative_style_prompt:F.string().nullish().catch(null),refiner_model:$E.deepPartial().nullish().catch(null),refiner_cfg_scale:F.number().nullish().catch(null),refiner_steps:F.number().int().nullish().catch(null),refiner_scheduler:F.string().nullish().catch(null),refiner_positive_aesthetic_score:F.number().nullish().catch(null),refiner_negative_aesthetic_score:F.number().nullish().catch(null),refiner_start:F.number().nullish().catch(null)}).passthrough(),eT=F.string().refine(e=>{const[t,n,r]=e.split(".");return t!==void 0&&Number.isInteger(Number(t))&&n!==void 0&&Number.isInteger(Number(n))&&r!==void 0&&Number.isInteger(Number(r))}),Pfe=eT.transform(e=>{const[t,n,r]=e.split(".");return{major:Number(t),minor:Number(n),patch:Number(r)}}),vI=F.object({id:F.string().trim().min(1),type:F.string().trim().min(1),inputs:F.record(Sfe),outputs:F.record(ode),label:F.string(),isOpen:F.boolean(),notes:F.string(),embedWorkflow:F.boolean(),isIntermediate:F.boolean(),useCache:F.boolean().optional(),version:eT.optional()}),kfe=F.preprocess(e=>{var t;try{const n=vI.parse(e);if(!Hne(n,"useCache")){const r=(t=BF.get())==null?void 0:t.getState().nodes.nodeTemplates,i=r==null?void 0:r[n.type];let o=!0;i&&(o=i.useCache),Object.assign(n,{useCache:o})}return n}catch{return e}},vI.extend({useCache:F.boolean()})),Ife=F.object({id:F.string().trim().min(1),type:F.literal("notes"),label:F.string(),isOpen:F.boolean(),notes:F.string()}),WF=F.object({x:F.number(),y:F.number()}).default({x:0,y:0}),I1=F.number().gt(0).nullish(),KF=F.object({id:F.string().trim().min(1),type:F.literal("invocation"),data:kfe,width:I1,height:I1,position:WF}),I5=e=>KF.safeParse(e).success,Mfe=F.object({id:F.string().trim().min(1),type:F.literal("notes"),data:Ife,width:I1,height:I1,position:WF}),XF=F.discriminatedUnion("type",[KF,Mfe]),Rfe=F.object({source:F.string().trim().min(1),sourceHandle:F.string().trim().min(1),target:F.string().trim().min(1),targetHandle:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("default")}),Ofe=F.object({source:F.string().trim().min(1),target:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("collapsed")}),QF=F.union([Rfe,Ofe]),$fe=F.object({nodeId:F.string().trim().min(1),fieldName:F.string().trim().min(1)}),Nfe="1.0.0",Dfe=F.object({name:F.string().default(""),author:F.string().default(""),description:F.string().default(""),version:F.string().default(""),contact:F.string().default(""),tags:F.string().default(""),notes:F.string().default(""),nodes:F.array(XF).default([]),edges:F.array(QF).default([]),exposedFields:F.array($fe).default([]),meta:F.object({version:eT}).default({version:Nfe})});Dfe.transform(e=>{const{nodes:t,edges:n}=e,r=[],i=t.filter(I5),o=xE(i,"id");return n.forEach((a,s)=>{const l=o[a.source],u=o[a.target],c=[];if(l?a.type==="default"&&!(a.sourceHandle in l.data.outputs)&&c.push(`${de.t("nodes.outputField")}"${a.source}.${a.sourceHandle}" ${de.t("nodes.doesNotExist")}`):c.push(`${de.t("nodes.outputNode")} ${a.source} ${de.t("nodes.doesNotExist")}`),u?a.type==="default"&&!(a.targetHandle in u.data.inputs)&&c.push(`${de.t("nodes.inputField")} "${a.target}.${a.targetHandle}" ${de.t("nodes.doesNotExist")}`):c.push(`${de.t("nodes.inputNode")} ${a.target} ${de.t("nodes.doesNotExist")}`),c.length){delete n[s];const d=a.type==="default"?a.sourceHandle:a.source,f=a.type==="default"?a.targetHandle:a.target;r.push({message:`${de.t("nodes.edge")} "${d} -> ${f}" ${de.t("nodes.skipped")}`,issues:c,data:a})}}),{workflow:e,warnings:r}});const on=e=>!!(e&&e.type==="invocation"),$ze=e=>!!(e&&!["notes","current_image"].includes(e.type)),bI=e=>!!(e&&e.type==="notes");var wu=(e=>(e[e.PENDING=0]="PENDING",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETED=2]="COMPLETED",e[e.FAILED=3]="FAILED",e))(wu||{});const ce=Do.injectEndpoints({endpoints:e=>({listImages:e.query({query:t=>({url:Vi(t),method:"GET"}),providesTags:(t,n,{board_id:r,categories:i})=>[{type:"ImageList",id:Vi({board_id:r,categories:i})}],serializeQueryArgs:({queryArgs:t})=>{const{board_id:n,categories:r}=t;return Vi({board_id:n,categories:r})},transformResponse(t){const{items:n}=t;return Ft.addMany(Ft.getInitialState(),n)},merge:(t,n)=>{Ft.addMany(t,bg.selectAll(n))},forceRefetch({currentArg:t,previousArg:n}){return(t==null?void 0:t.offset)!==(n==null?void 0:n.offset)},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;bg.selectAll(i).forEach(o=>{n(ce.util.upsertQueryData("getImageDTO",o.image_name,o))})}catch{}},keepUnusedDataFor:86400}),getIntermediatesCount:e.query({query:()=>({url:"images/intermediates"}),providesTags:["IntermediatesCount"]}),clearIntermediates:e.mutation({query:()=>({url:"images/intermediates",method:"DELETE"}),invalidatesTags:["IntermediatesCount"]}),getImageDTO:e.query({query:t=>({url:`images/i/${t}`}),providesTags:(t,n,r)=>[{type:"Image",id:r}],keepUnusedDataFor:86400}),getImageMetadata:e.query({query:t=>({url:`images/i/${t}/metadata`}),providesTags:(t,n,r)=>[{type:"ImageMetadata",id:r}],transformResponse:t=>{if(t){const n=Afe.safeParse(t);if(n.success)return n.data;se("images").warn("Problem parsing metadata")}},keepUnusedDataFor:86400}),deleteImage:e.mutation({query:({image_name:t})=>({url:`images/i/${t}`,method:"DELETE"}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){const{image_name:i,board_id:o}=t,a=Pr.includes(t.image_category),s={board_id:o??"none",categories:Ni(t)},l=[];l.push(n(ce.util.updateQueryData("listImages",s,u=>{Ft.removeOne(u,i)}))),l.push(n(Qe.util.updateQueryData(a?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));try{await r}catch{l.forEach(u=>{u.undo()})}}}),deleteImages:e.mutation({query:({imageDTOs:t})=>({url:"images/delete",method:"POST",body:{image_names:t.map(r=>r.image_name)}}),async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,o=xE(t,"image_name");i.deleted_images.forEach(a=>{const s=o[a];if(s){const l={board_id:s.board_id??"none",categories:Ni(s)};n(ce.util.updateQueryData("listImages",l,c=>{Ft.removeOne(c,a)}));const u=Pr.includes(s.image_category);n(Qe.util.updateQueryData(u?"getBoardAssetsTotal":"getBoardImagesTotal",s.board_id??"none",c=>{c.total=Math.max(c.total-1,0)}))}})}catch{}}}),changeImageIsIntermediate:e.mutation({query:({imageDTO:t,is_intermediate:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{is_intermediate:n}}),async onQueryStarted({imageDTO:t,is_intermediate:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[];a.push(r(ce.util.updateQueryData("getImageDTO",t.image_name,u=>{Object.assign(u,{is_intermediate:n})})));const s=Ni(t),l=Pr.includes(t.image_category);if(n)a.push(r(ce.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:s},u=>{Ft.removeOne(u,t.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));else{a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",p=>{p.total+=1})));const u={board_id:t.board_id??"none",categories:s},c=ce.endpoints.listImages.select(u)(o()),{data:d}=Fn.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,t);(f||h)&&a.push(r(ce.util.updateQueryData("listImages",u,p=>{Ft.upsertOne(p,t)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),changeImageSessionId:e.mutation({query:({imageDTO:t,session_id:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{session_id:n}}),async onQueryStarted({imageDTO:t,session_id:n},{dispatch:r,queryFulfilled:i}){const o=[];o.push(r(ce.util.updateQueryData("getImageDTO",t.image_name,a=>{Object.assign(a,{session_id:n})})));try{await i}catch{o.forEach(a=>a.undo())}}}),starImages:e.mutation({query:({imageDTOs:t})=>({url:"images/star",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Ni(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Vi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Ni(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ce.util.updateQueryData("getImageDTO",c,_=>{_.starred=!0}));const d={board_id:l??"none",categories:s},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,u):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Ft.upsertOne(_,{...u,starred:!0})}))})}catch{}}}),unstarImages:e.mutation({query:({imageDTOs:t})=>({url:"images/unstar",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Ni(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Vi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Ni(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ce.util.updateQueryData("getImageDTO",c,_=>{_.starred=!1}));const d={board_id:l??"none",categories:s},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,u):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Ft.upsertOne(_,{...u,starred:!1})}))})}catch{}}}),uploadImage:e.mutation({query:({file:t,image_category:n,is_intermediate:r,session_id:i,board_id:o,crop_visible:a})=>{const s=new FormData;return s.append("file",t),{url:"images/upload",method:"POST",body:s,params:{image_category:n,is_intermediate:r,session_id:i,board_id:o==="none"?void 0:o,crop_visible:a}}},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;if(i.is_intermediate)return;n(ce.util.upsertQueryData("getImageDTO",i.image_name,i));const o=Ni(i);n(ce.util.updateQueryData("listImages",{board_id:i.board_id??"none",categories:o},a=>{Ft.addOne(a,i)})),n(Qe.util.updateQueryData("getBoardAssetsTotal",i.board_id??"none",a=>{a.total+=1}))}catch{}}}),deleteBoard:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"Board",id:kr},{type:"ImageList",id:Vi({board_id:"none",categories:Fn})},{type:"ImageList",id:Vi({board_id:"none",categories:Pr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_board_images:o}=i;o.forEach(l=>{n(ce.util.updateQueryData("getImageDTO",l,u=>{u.board_id=void 0}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,l=>{l.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,l=>{l.total=0}));const a=[{categories:Fn},{categories:Pr}],s=o.map(l=>({id:l,changes:{board_id:void 0}}));a.forEach(l=>{n(ce.util.updateQueryData("listImages",l,u=>{Ft.updateMany(u,s)}))})}catch{}}}),deleteBoardAndImages:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE",params:{include_images:!0}}),invalidatesTags:()=>[{type:"Board",id:kr},{type:"ImageList",id:Vi({board_id:"none",categories:Fn})},{type:"ImageList",id:Vi({board_id:"none",categories:Pr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_images:o}=i;[{categories:Fn},{categories:Pr}].forEach(s=>{n(ce.util.updateQueryData("listImages",s,l=>{Ft.removeMany(l,o)}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,s=>{s.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,s=>{s.total=0}))}catch{}}}),addImageToBoard:e.mutation({query:({board_id:t,imageDTO:n})=>{const{image_name:r}=n;return{url:"board_images/",method:"POST",body:{board_id:t,image_name:r}}},invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r}],async onQueryStarted({board_id:t,imageDTO:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[],s=Ni(n),l=Pr.includes(n.image_category);if(a.push(r(ce.util.updateQueryData("getImageDTO",n.image_name,u=>{u.board_id=t}))),!n.is_intermediate){a.push(r(ce.util.updateQueryData("listImages",{board_id:n.board_id??"none",categories:s},p=>{Ft.removeOne(p,n.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",n.board_id??"none",p=>{p.total=Math.max(p.total-1,0)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",p=>{p.total+=1})));const u={board_id:t??"none",categories:s},c=ce.endpoints.listImages.select(u)(o()),{data:d}=Fn.includes(n.image_category)?Qe.endpoints.getBoardImagesTotal.select(n.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(n.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,n);(f||h)&&a.push(r(ce.util.updateQueryData("listImages",u,p=>{Ft.addOne(p,n)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),removeImageFromBoard:e.mutation({query:({imageDTO:t})=>{const{image_name:n}=t;return{url:"board_images/",method:"DELETE",body:{image_name:n}}},invalidatesTags:(t,n,{imageDTO:r})=>{const{board_id:i}=r;return[{type:"Board",id:i??"none"}]},async onQueryStarted({imageDTO:t},{dispatch:n,queryFulfilled:r,getState:i}){const o=Ni(t),a=[],s=Pr.includes(t.image_category);a.push(n(ce.util.updateQueryData("getImageDTO",t.image_name,h=>{h.board_id=void 0}))),a.push(n(ce.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:o},h=>{Ft.removeOne(h,t.image_name)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",h=>{h.total=Math.max(h.total-1,0)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal","none",h=>{h.total+=1})));const l={board_id:"none",categories:o},u=ce.endpoints.listImages.select(l)(i()),{data:c}=Fn.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(i()),d=u.data&&u.data.ids.length>=((c==null?void 0:c.total)??0),f=ou(u.data,t);(d||f)&&a.push(n(ce.util.updateQueryData("listImages",l,h=>{Ft.upsertOne(h,t)})));try{await r}catch{a.forEach(h=>h.undo())}}}),addImagesToBoard:e.mutation({query:({board_id:t,imageDTOs:n})=>({url:"board_images/batch",method:"POST",body:{image_names:n.map(r=>r.image_name),board_id:t}}),invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r??"none"}],async onQueryStarted({board_id:t,imageDTOs:n},{dispatch:r,queryFulfilled:i,getState:o}){try{const{data:a}=await i,{added_image_names:s}=a;s.forEach(l=>{r(ce.util.updateQueryData("getImageDTO",l,y=>{y.board_id=t==="none"?void 0:t}));const u=n.find(y=>y.image_name===l);if(!u)return;const c=Ni(u),d=u.board_id,f=Pr.includes(u.image_category);r(ce.util.updateQueryData("listImages",{board_id:d??"none",categories:c},y=>{Ft.removeOne(y,u.image_name)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",d??"none",y=>{y.total=Math.max(y.total-1,0)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",y=>{y.total+=1}));const h={board_id:t,categories:c},p=ce.endpoints.listImages.select(h)(o()),{data:g}=Fn.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(t??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t??"none")(o()),_=p.data&&p.data.ids.length>=((g==null?void 0:g.total)??0),b=((g==null?void 0:g.total)??0)>=$0?ou(p.data,u):!0;(_||b)&&r(ce.util.updateQueryData("listImages",h,y=>{Ft.upsertOne(y,{...u,board_id:t})}))})}catch{}}}),removeImagesFromBoard:e.mutation({query:({imageDTOs:t})=>({url:"board_images/batch/delete",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{const i=[],o=[];return t==null||t.removed_image_names.forEach(a=>{var l;const s=(l=r.find(u=>u.image_name===a))==null?void 0:l.board_id;!s||i.includes(s)||o.push({type:"Board",id:s})}),o},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{removed_image_names:a}=o;a.forEach(s=>{n(ce.util.updateQueryData("getImageDTO",s,_=>{_.board_id=void 0}));const l=t.find(_=>_.image_name===s);if(!l)return;const u=Ni(l),c=Pr.includes(l.image_category);n(ce.util.updateQueryData("listImages",{board_id:l.board_id??"none",categories:u},_=>{Ft.removeOne(_,l.image_name)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal",l.board_id??"none",_=>{_.total=Math.max(_.total-1,0)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal","none",_=>{_.total+=1}));const d={board_id:"none",categories:u},f=ce.endpoints.listImages.select(d)(i()),{data:h}=Fn.includes(l.image_category)?Qe.endpoints.getBoardImagesTotal.select(l.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l.board_id??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),g=((h==null?void 0:h.total)??0)>=$0?ou(f.data,l):!0;(p||g)&&n(ce.util.updateQueryData("listImages",d,_=>{Ft.upsertOne(_,{...l,board_id:"none"})}))})}catch{}}}),bulkDownloadImages:e.mutation({query:({image_names:t,board_id:n})=>({url:"images/download",method:"POST",body:{image_names:t,board_id:n}})})})}),{useGetIntermediatesCountQuery:Nze,useListImagesQuery:Dze,useLazyListImagesQuery:Lze,useGetImageDTOQuery:Fze,useGetImageMetadataQuery:Bze,useDeleteImageMutation:zze,useDeleteImagesMutation:Vze,useUploadImageMutation:jze,useClearIntermediatesMutation:Uze,useAddImagesToBoardMutation:Gze,useRemoveImagesFromBoardMutation:Hze,useAddImageToBoardMutation:qze,useRemoveImageFromBoardMutation:Wze,useChangeImageIsIntermediateMutation:Kze,useChangeImageSessionIdMutation:Xze,useDeleteBoardAndImagesMutation:Qze,useDeleteBoardMutation:Yze,useStarImagesMutation:Zze,useUnstarImagesMutation:Jze,useBulkDownloadImagesMutation:eVe}=ce,YF={selection:[],shouldAutoSwitch:!0,autoAssignBoardOnClick:!0,autoAddBoardId:"none",galleryImageMinimumWidth:96,selectedBoardId:"none",galleryView:"images",boardSearchText:""},ZF=Wt({name:"gallery",initialState:YF,reducers:{imageSelected:(e,t)=>{e.selection=t.payload?[t.payload]:[]},selectionChanged:(e,t)=>{e.selection=g5(t.payload,n=>n.image_name)},shouldAutoSwitchChanged:(e,t)=>{e.shouldAutoSwitch=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},autoAssignBoardOnClickChanged:(e,t)=>{e.autoAssignBoardOnClick=t.payload},boardIdSelected:(e,t)=>{e.selectedBoardId=t.payload.boardId,e.galleryView="images"},autoAddBoardIdChanged:(e,t)=>{if(!t.payload){e.autoAddBoardId="none";return}e.autoAddBoardId=t.payload},galleryViewChanged:(e,t)=>{e.galleryView=t.payload},boardSearchTextChanged:(e,t)=>{e.boardSearchText=t.payload}},extraReducers:e=>{e.addMatcher(Ffe,(t,n)=>{const r=n.meta.arg.originalArgs;r===t.selectedBoardId&&(t.selectedBoardId="none",t.galleryView="images"),r===t.autoAddBoardId&&(t.autoAddBoardId="none")}),e.addMatcher(Qe.endpoints.listAllBoards.matchFulfilled,(t,n)=>{const r=n.payload;t.autoAddBoardId&&(r.map(i=>i.board_id).includes(t.autoAddBoardId)||(t.autoAddBoardId="none"))})}}),{imageSelected:pa,shouldAutoSwitchChanged:tVe,autoAssignBoardOnClickChanged:nVe,setGalleryImageMinimumWidth:rVe,boardIdSelected:M1,autoAddBoardIdChanged:iVe,galleryViewChanged:M5,selectionChanged:JF,boardSearchTextChanged:oVe}=ZF.actions,Lfe=ZF.reducer,Ffe=si(ce.endpoints.deleteBoard.matchFulfilled,ce.endpoints.deleteBoardAndImages.matchFulfilled),_I={weight:.75},Bfe={loras:{}},eB=Wt({name:"lora",initialState:Bfe,reducers:{loraAdded:(e,t)=>{const{model_name:n,id:r,base_model:i}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,..._I}},loraRecalled:(e,t)=>{const{model_name:n,id:r,base_model:i,weight:o}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,weight:o}},loraRemoved:(e,t)=>{const n=t.payload;delete e.loras[n]},lorasCleared:e=>{e.loras={}},loraWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload,i=e.loras[n];i&&(i.weight=r)},loraWeightReset:(e,t)=>{const n=t.payload,r=e.loras[n];r&&(r.weight=_I.weight)}}}),{loraAdded:aVe,loraRemoved:tB,loraWeightChanged:sVe,loraWeightReset:lVe,lorasCleared:uVe,loraRecalled:cVe}=eB.actions,zfe=eB.reducer;function to(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},Vfe=e=>e?SI(e):SI,{useSyncExternalStoreWithSelector:jfe}=Rse;function nB(e,t=e.getState,n){const r=jfe(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return k.useDebugValue(r),r}const xI=(e,t)=>{const n=Vfe(e),r=(i,o=t)=>nB(n,i,o);return Object.assign(r,n),r},Ufe=(e,t)=>e?xI(e,t):xI;function ii(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{}};function eS(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}qy.prototype=eS.prototype={constructor:qy,on:function(e,t){var n=this._,r=Hfe(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),CI.hasOwnProperty(t)?{space:CI[t],local:e}:e}function Wfe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===R5&&t.documentElement.namespaceURI===R5?t.createElement(e):t.createElementNS(n,e)}}function Kfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rB(e){var t=tS(e);return(t.local?Kfe:Wfe)(t)}function Xfe(){}function tT(e){return e==null?Xfe:function(){return this.querySelector(e)}}function Qfe(e){typeof e!="function"&&(e=tT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=m&&(m=y+1);!(S=_[m])&&++m=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function She(e){e||(e=xhe);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function whe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Che(){return Array.from(this)}function Ehe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Dhe:typeof t=="function"?Fhe:Lhe)(e,t,n??"")):yf(this.node(),e)}function yf(e,t){return e.style.getPropertyValue(t)||lB(e).getComputedStyle(e,null).getPropertyValue(t)}function zhe(e){return function(){delete this[e]}}function Vhe(e,t){return function(){this[e]=t}}function jhe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Uhe(e,t){return arguments.length>1?this.each((t==null?zhe:typeof t=="function"?jhe:Vhe)(e,t)):this.node()[e]}function uB(e){return e.trim().split(/^|\s+/)}function nT(e){return e.classList||new cB(e)}function cB(e){this._node=e,this._names=uB(e.getAttribute("class")||"")}cB.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dB(e,t){for(var n=nT(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ype(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n()=>e;function O5(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}O5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ape(e){return!e.ctrlKey&&!e.button}function Ppe(){return this.parentNode}function kpe(e,t){return t??{x:e.x,y:e.y}}function Ipe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mpe(){var e=Ape,t=Ppe,n=kpe,r=Ipe,i={},o=eS("start","drag","end"),a=0,s,l,u,c,d=0;function f(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",_).on("touchmove.drag",b,Tpe).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,S){if(!(c||!e.call(this,v,S))){var w=m(this,t.call(this,v,S),v,S,"mouse");w&&(So(v.view).on("mousemove.drag",p,wg).on("mouseup.drag",g,wg),gB(v.view),Xx(v),u=!1,s=v.clientX,l=v.clientY,w("start",v))}}function p(v){if(Dd(v),!u){var S=v.clientX-s,w=v.clientY-l;u=S*S+w*w>d}i.mouse("drag",v)}function g(v){So(v.view).on("mousemove.drag mouseup.drag",null),mB(v.view,u),Dd(v),i.mouse("end",v)}function _(v,S){if(e.call(this,v,S)){var w=v.changedTouches,C=t.call(this,v,S),x=w.length,P,E;for(P=0;P>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?F0(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?F0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ope.exec(e))?new Yr(t[1],t[2],t[3],1):(t=$pe.exec(e))?new Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Npe.exec(e))?F0(t[1],t[2],t[3],t[4]):(t=Dpe.exec(e))?F0(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lpe.exec(e))?MI(t[1],t[2]/100,t[3]/100,1):(t=Fpe.exec(e))?MI(t[1],t[2]/100,t[3]/100,t[4]):EI.hasOwnProperty(e)?PI(EI[e]):e==="transparent"?new Yr(NaN,NaN,NaN,0):null}function PI(e){return new Yr(e>>16&255,e>>8&255,e&255,1)}function F0(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yr(e,t,n,r)}function Vpe(e){return e instanceof Pm||(e=Tg(e)),e?(e=e.rgb(),new Yr(e.r,e.g,e.b,e.opacity)):new Yr}function $5(e,t,n,r){return arguments.length===1?Vpe(e):new Yr(e,t,n,r??1)}function Yr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}rT(Yr,$5,yB(Pm,{brighter(e){return e=e==null?O1:Math.pow(O1,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cg:Math.pow(Cg,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yr(Uu(this.r),Uu(this.g),Uu(this.b),$1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kI,formatHex:kI,formatHex8:jpe,formatRgb:II,toString:II}));function kI(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}`}function jpe(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}${Mu((isNaN(this.opacity)?1:this.opacity)*255)}`}function II(){const e=$1(this.opacity);return`${e===1?"rgb(":"rgba("}${Uu(this.r)}, ${Uu(this.g)}, ${Uu(this.b)}${e===1?")":`, ${e})`}`}function $1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mu(e){return e=Uu(e),(e<16?"0":"")+e.toString(16)}function MI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xo(e,t,n,r)}function vB(e){if(e instanceof xo)return new xo(e.h,e.s,e.l,e.opacity);if(e instanceof Pm||(e=Tg(e)),!e)return new xo;if(e instanceof xo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new xo(a,s,l,e.opacity)}function Upe(e,t,n,r){return arguments.length===1?vB(e):new xo(e,t,n,r??1)}function xo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rT(xo,Upe,yB(Pm,{brighter(e){return e=e==null?O1:Math.pow(O1,e),new xo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cg:Math.pow(Cg,e),new xo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yr(Qx(e>=240?e-240:e+120,i,r),Qx(e,i,r),Qx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new xo(RI(this.h),B0(this.s),B0(this.l),$1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$1(this.opacity);return`${e===1?"hsl(":"hsla("}${RI(this.h)}, ${B0(this.s)*100}%, ${B0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RI(e){return e=(e||0)%360,e<0?e+360:e}function B0(e){return Math.max(0,Math.min(1,e||0))}function Qx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const bB=e=>()=>e;function Gpe(e,t){return function(n){return e+n*t}}function Hpe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qpe(e){return(e=+e)==1?_B:function(t,n){return n-t?Hpe(t,n,e):bB(isNaN(t)?n:t)}}function _B(e,t){var n=t-e;return n?Gpe(e,n):bB(isNaN(e)?t:e)}const OI=function e(t){var n=qpe(t);function r(i,o){var a=n((i=$5(i)).r,(o=$5(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=_B(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function qs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var N5=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yx=new RegExp(N5.source,"g");function Wpe(e){return function(){return e}}function Kpe(e){return function(t){return e(t)+""}}function Xpe(e,t){var n=N5.lastIndex=Yx.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=N5.exec(e))&&(i=Yx.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:qs(r,i)})),n=Yx.lastIndex;return n180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:qs(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:qs(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var g=h.push(i(h)+"scale(",null,",",null,")");p.push({i:g-4,x:qs(u,d)},{i:g-2,x:qs(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,g=f.length,_;++p=0&&e._call.call(void 0,t),e=e._next;--vf}function DI(){ac=(D1=Ag.now())+nS,vf=Vh=0;try{oge()}finally{vf=0,sge(),ac=0}}function age(){var e=Ag.now(),t=e-D1;t>wB&&(nS-=t,D1=e)}function sge(){for(var e,t=N1,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:N1=n);jh=e,L5(r)}function L5(e){if(!vf){Vh&&(Vh=clearTimeout(Vh));var t=e-ac;t>24?(e<1/0&&(Vh=setTimeout(DI,e-Ag.now()-nS)),fh&&(fh=clearInterval(fh))):(fh||(D1=Ag.now(),fh=setInterval(age,wB)),vf=1,CB(DI))}}function LI(e,t,n){var r=new L1;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var lge=eS("start","end","cancel","interrupt"),uge=[],TB=0,FI=1,F5=2,Wy=3,BI=4,B5=5,Ky=6;function rS(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;cge(e,n,{name:t,index:r,group:i,on:lge,tween:uge,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:TB})}function oT(e,t){var n=zo(e,t);if(n.state>TB)throw new Error("too late; already scheduled");return n}function ka(e,t){var n=zo(e,t);if(n.state>Wy)throw new Error("too late; already running");return n}function zo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cge(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=EB(o,0,n.time);function o(u){n.state=FI,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==FI)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Wy)return LI(a);h.state===BI?(h.state=Ky,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+cF5&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function zge(e,t,n){var r,i,o=Bge(t)?oT:ka;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function Vge(e,t){var n=this._id;return arguments.length<2?zo(this.node(),n).on.on(e):this.each(zge(n,e,t))}function jge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Uge(){return this.on("end.remove",jge(this._id))}function Gge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=tT(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a()=>e;function gme(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Za(e,t,n){this.k=e,this.x=t,this.y=n}Za.prototype={constructor:Za,scale:function(e){return e===1?this:new Za(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Za(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vl=new Za(1,0,0);Za.prototype;function Zx(e){e.stopImmediatePropagation()}function hh(e){e.preventDefault(),e.stopImmediatePropagation()}function mme(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function yme(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function zI(){return this.__zoom||vl}function vme(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bme(){return navigator.maxTouchPoints||"ontouchstart"in this}function _me(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Sme(){var e=mme,t=yme,n=_me,r=vme,i=bme,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=rge,u=eS("start","zoom","end"),c,d,f,h=500,p=150,g=0,_=10;function b(T){T.property("__zoom",zI).on("wheel.zoom",x,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(T,A,R,D){var $=T.selection?T.selection():T;$.property("__zoom",zI),T!==$?S(T,A,R,D):$.interrupt().each(function(){w(this,arguments).event(D).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},b.scaleBy=function(T,A,R,D){b.scaleTo(T,function(){var $=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return $*L},R,D)},b.scaleTo=function(T,A,R,D){b.transform(T,function(){var $=t.apply(this,arguments),L=this.__zoom,O=R==null?v($):typeof R=="function"?R.apply(this,arguments):R,B=L.invert(O),U=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,U),O,B),$,a)},R,D)},b.translateBy=function(T,A,R,D){b.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),a)},null,D)},b.translateTo=function(T,A,R,D,$){b.transform(T,function(){var L=t.apply(this,arguments),O=this.__zoom,B=D==null?v(L):typeof D=="function"?D.apply(this,arguments):D;return n(vl.translate(B[0],B[1]).scale(O.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof R=="function"?-R.apply(this,arguments):-R),L,a)},D,$)};function y(T,A){return A=Math.max(o[0],Math.min(o[1],A)),A===T.k?T:new Za(A,T.x,T.y)}function m(T,A,R){var D=A[0]-R[0]*T.k,$=A[1]-R[1]*T.k;return D===T.x&&$===T.y?T:new Za(T.k,D,$)}function v(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function S(T,A,R,D){T.on("start.zoom",function(){w(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(D).end()}).tween("zoom",function(){var $=this,L=arguments,O=w($,L).event(D),B=t.apply($,L),U=R==null?v(B):typeof R=="function"?R.apply($,L):R,j=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),q=$.__zoom,Y=typeof A=="function"?A.apply($,L):A,Z=l(q.invert(U).concat(j/q.k),Y.invert(U).concat(j/Y.k));return function(V){if(V===1)V=Y;else{var K=Z(V),ee=j/K[2];V=new Za(ee,U[0]-K[0]*ee,U[1]-K[1]*ee)}O.zoom(null,V)}})}function w(T,A,R){return!R&&T.__zooming||new C(T,A)}function C(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}C.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=So(this.that).datum();u.call(T,this.that,new gme(T,{sourceEvent:this.sourceEvent,target:b,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function x(T,...A){if(!e.apply(this,arguments))return;var R=w(this,A).event(T),D=this.__zoom,$=Math.max(o[0],Math.min(o[1],D.k*Math.pow(2,r.apply(this,arguments)))),L=Yo(T);if(R.wheel)(R.mouse[0][0]!==L[0]||R.mouse[0][1]!==L[1])&&(R.mouse[1]=D.invert(R.mouse[0]=L)),clearTimeout(R.wheel);else{if(D.k===$)return;R.mouse=[L,D.invert(L)],Xy(this),R.start()}hh(T),R.wheel=setTimeout(O,p),R.zoom("mouse",n(m(y(D,$),R.mouse[0],R.mouse[1]),R.extent,a));function O(){R.wheel=null,R.end()}}function P(T,...A){if(f||!e.apply(this,arguments))return;var R=T.currentTarget,D=w(this,A,!0).event(T),$=So(T.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",j,!0),L=Yo(T,R),O=T.clientX,B=T.clientY;gB(T.view),Zx(T),D.mouse=[L,this.__zoom.invert(L)],Xy(this),D.start();function U(q){if(hh(q),!D.moved){var Y=q.clientX-O,Z=q.clientY-B;D.moved=Y*Y+Z*Z>g}D.event(q).zoom("mouse",n(m(D.that.__zoom,D.mouse[0]=Yo(q,R),D.mouse[1]),D.extent,a))}function j(q){$.on("mousemove.zoom mouseup.zoom",null),mB(q.view,D.moved),hh(q),D.event(q).end()}}function E(T,...A){if(e.apply(this,arguments)){var R=this.__zoom,D=Yo(T.changedTouches?T.changedTouches[0]:T,this),$=R.invert(D),L=R.k*(T.shiftKey?.5:2),O=n(m(y(R,L),D,$),t.apply(this,A),a);hh(T),s>0?So(this).transition().duration(s).call(S,O,D,T):So(this).call(b.transform,O,D,T)}}function I(T,...A){if(e.apply(this,arguments)){var R=T.touches,D=R.length,$=w(this,A,T.changedTouches.length===D).event(T),L,O,B,U;for(Zx(T),O=0;O"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},IB=ys.error001();function fn(e,t){const n=k.useContext(iS);if(n===null)throw new Error(IB);return nB(n,e,t)}const Kn=()=>{const e=k.useContext(iS);if(e===null)throw new Error(IB);return k.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},wme=e=>e.userSelectionActive?"none":"all";function Cme({position:e,children:t,className:n,style:r,...i}){const o=fn(wme),a=`${e}`.split("-");return J.createElement("div",{className:to(["react-flow__panel",n,...a]),style:{...r,pointerEvents:o},...i},t)}function Eme({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:J.createElement(Cme,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"},J.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Tme=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const d=k.useRef(null),[f,h]=k.useState({x:0,y:0,width:0,height:0}),p=to(["react-flow__edge-textwrapper",u]);return k.useEffect(()=>{if(d.current){const g=d.current.getBBox();h({x:g.x,y:g.y,width:g.width,height:g.height})}},[n]),typeof n>"u"||!n?null:J.createElement("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...c},i&&J.createElement("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:o,rx:s,ry:s}),J.createElement("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:d,style:r},n),l)};var Ame=k.memo(Tme);const sT=e=>({width:e.offsetWidth,height:e.offsetHeight}),bf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),lT=(e={x:0,y:0},t)=>({x:bf(e.x,t[0][0],t[1][0]),y:bf(e.y,t[0][1],t[1][1])}),VI=(e,t,n)=>en?-bf(Math.abs(e-n),1,50)/50:0,MB=(e,t)=>{const n=VI(e.x,35,t.width-35)*20,r=VI(e.y,35,t.height-35)*20;return[n,r]},RB=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},OB=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Pg=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),$B=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),jI=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),dVe=(e,t)=>$B(OB(Pg(e),Pg(t))),z5=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Pme=e=>Ki(e.width)&&Ki(e.height)&&Ki(e.x)&&Ki(e.y),Ki=e=>!isNaN(e)&&isFinite(e),Rn=Symbol.for("internals"),NB=["Enter"," ","Escape"],kme=(e,t)=>{},Ime=e=>"nativeEvent"in e;function V5(e){var i,o;const t=Ime(e)?e.nativeEvent:e,n=((o=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:o[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const DB=e=>"clientX"in e,bl=(e,t)=>{var o,a;const n=DB(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},F1=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},km=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h=20})=>J.createElement(J.Fragment,null,J.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:d,markerStart:f}),h&&J.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&Ki(n)&&Ki(r)?J.createElement(Ame,{x:n,y:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null);km.displayName="BaseEdge";function ph(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(o=>o.id===e);i&&n(r,{...i})}}function LB({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n{const[_,b,y]=BB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return J.createElement(km,{path:_,labelX:b,labelY:y,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:g})});uT.displayName="SimpleBezierEdge";const GI={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},Mme=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Rme({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:r=Pe.Top,center:i,offset:o}){const a=GI[t],s=GI[r],l={x:e.x+a.x*o,y:e.y+a.y*o},u={x:n.x+s.x*o,y:n.y+s.y*o},c=Mme({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h=[],p,g;const _={x:0,y:0},b={x:0,y:0},[y,m,v,S]=LB({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){p=i.x||y,g=i.y||m;const C=[{x:p,y:l.y},{x:p,y:u.y}],x=[{x:l.x,y:g},{x:u.x,y:g}];a[d]===f?h=d==="x"?C:x:h=d==="x"?x:C}else{const C=[{x:l.x,y:u.y}],x=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?x:C:h=a.y===f?C:x,t===r){const M=Math.abs(e[d]-n[d]);if(M<=o){const T=Math.min(o-1,o-M);a[d]===f?_[d]=(l[d]>e[d]?-1:1)*T:b[d]=(u[d]>n[d]?-1:1)*T}}if(t!==r){const M=d==="x"?"y":"x",T=a[d]===s[M],A=l[M]>u[M],R=l[M]=N?(p=(P.x+E.x)/2,g=h[0].y):(p=h[0].x,g=(P.y+E.y)/2)}return[[e,{x:l.x+_.x,y:l.y+_.y},...h,{x:u.x+b.x,y:u.y+b.y},n],p,g,v,S]}function Ome(e,t,n,r){const i=Math.min(HI(e,t)/2,HI(t,n)/2,r),{x:o,y:a}=t;if(e.x===o&&o===n.x||e.y===a&&a===n.y)return`L${o} ${a}`;if(e.y===a){const u=e.x{let m="";return y>0&&y{const[b,y,m]=j5({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:f,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return J.createElement(km,{path:b,labelX:y,labelY:m,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:h,markerStart:p,interactionWidth:_})});oS.displayName="SmoothStepEdge";const cT=k.memo(e=>{var t;return J.createElement(oS,{...e,pathOptions:k.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});cT.displayName="StepEdge";function $me({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,a,s]=LB({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,a,s]}const dT=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})=>{const[p,g,_]=$me({sourceX:e,sourceY:t,targetX:n,targetY:r});return J.createElement(km,{path:p,labelX:g,labelY:_,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})});dT.displayName="StraightEdge";function j0(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function qI({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Pe.Left:return[t-j0(t-r,o),n];case Pe.Right:return[t+j0(r-t,o),n];case Pe.Top:return[t,n-j0(n-i,o)];case Pe.Bottom:return[t,n+j0(i-n,o)]}}function zB({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:o=Pe.Top,curvature:a=.25}){const[s,l]=qI({pos:n,x1:e,y1:t,x2:r,y2:i,c:a}),[u,c]=qI({pos:o,x1:r,y1:i,x2:e,y2:t,c:a}),[d,f,h,p]=FB({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${i}`,d,f,h,p]}const z1=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Pe.Bottom,targetPosition:o=Pe.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,pathOptions:g,interactionWidth:_})=>{const[b,y,m]=zB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:g==null?void 0:g.curvature});return J.createElement(km,{path:b,labelX:y,labelY:m,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:_})});z1.displayName="BezierEdge";const fT=k.createContext(null),Nme=fT.Provider;fT.Consumer;const Dme=()=>k.useContext(fT),Lme=e=>"id"in e&&"source"in e&&"target"in e,VB=e=>"id"in e&&!("source"in e)&&!("target"in e),Fme=(e,t,n)=>{if(!VB(e))return[];const r=n.filter(i=>i.source===e.id).map(i=>i.target);return t.filter(i=>r.includes(i.id))},Bme=(e,t,n)=>{if(!VB(e))return[];const r=n.filter(i=>i.target===e.id).map(i=>i.source);return t.filter(i=>r.includes(i.id))},jB=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,U5=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,zme=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Uh=(e,t)=>{if(!e.source||!e.target)return t;let n;return Lme(e)?n={...e}:n={...e,id:jB(e)},zme(n,t)?t:t.concat(n)},Vme=(e,t,n,r={shouldReplaceId:!0})=>{const{id:i,...o}=e;if(!t.source||!t.target||!n.find(l=>l.id===i))return n;const s={...o,id:r.shouldReplaceId?jB(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(l=>l.id!==i).concat(s)},UB=({x:e,y:t},[n,r,i],o,[a,s])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},jme=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Fd=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},hT=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:o,y:a}=Fd(i,t).positionAbsolute;return OB(r,Pg({x:o,y:a,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $B(n)},GB=(e,t,[n,r,i]=[0,0,1],o=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(c=>{const{width:d,height:f,selectable:h=!0,hidden:p=!1}=c;if(a&&!h||p)return!1;const{positionAbsolute:g}=Fd(c,s),_={x:g.x,y:g.y,width:d||0,height:f||0},b=z5(l,_),y=typeof d>"u"||typeof f>"u"||d===null||f===null,m=o&&b>0,v=(d||0)*(f||0);(y||m||b>=v||c.dragging)&&u.push(c)}),u},pT=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},HB=(e,t,n,r,i,o=.1)=>{const a=t/(e.width*(1+o)),s=n/(e.height*(1+o)),l=Math.min(a,s),u=bf(l,r,i),c=e.x+e.width/2,d=e.y+e.height/2,f=t/2-c*u,h=n/2-d*u;return[f,h,u]},mu=(e,t=0)=>e.transition().duration(t);function WI(e,t,n,r){return(t[n]||[]).reduce((i,o)=>{var a,s;return`${e.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+o.x+o.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+o.y+o.height/2}),i},[])}function Ume(e,t,n,r,i,o){const{x:a,y:s}=bl(e),u=t.elementsFromPoint(a,s).find(p=>p.classList.contains("react-flow__handle"));if(u){const p=u.getAttribute("data-nodeid");if(p){const g=gT(void 0,u),_=u.getAttribute("data-handleid"),b=o({nodeId:p,id:_,type:g});if(b)return{handle:{id:_,type:g,nodeId:p,x:n.x,y:n.y},validHandleResult:b}}}let c=[],d=1/0;if(i.forEach(p=>{const g=Math.sqrt((p.x-n.x)**2+(p.y-n.y)**2);if(g<=r){const _=o(p);g<=d&&(gp.isValid),h=c.some(({handle:p})=>p.type==="target");return c.find(({handle:p,validHandleResult:g})=>h?p.type==="target":f?g.isValid:!0)||c[0]}const Gme={source:null,target:null,sourceHandle:null,targetHandle:null},qB=()=>({handleDomNode:null,isValid:!1,connection:Gme,endHandle:null});function WB(e,t,n,r,i,o,a){const s=i==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...qB(),handleDomNode:l};if(l){const c=gT(void 0,l),d=l.getAttribute("data-nodeid"),f=l.getAttribute("data-handleid"),h=l.classList.contains("connectable"),p=l.classList.contains("connectableend"),g={source:s?d:n,sourceHandle:s?f:r,target:s?n:d,targetHandle:s?r:f};u.connection=g,h&&p&&(t===sc.Strict?s&&c==="source"||!s&&c==="target":d!==n||f!==r)&&(u.endHandle={nodeId:d,handleId:f,type:c},u.isValid=o(g))}return u}function Hme({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,o)=>{if(o[Rn]){const{handleBounds:a}=o[Rn];let s=[],l=[];a&&(s=WI(o,a,"source",`${t}-${n}-${r}`),l=WI(o,a,"target",`${t}-${n}-${r}`)),i.push(...s,...l)}return i},[])}function gT(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Jx(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function qme(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function KB({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:a,isValidConnection:s,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const c=RB(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:h,connectionRadius:p,onConnectStart:g,panBy:_,getNodes:b,cancelConnection:y}=o();let m=0,v;const{x:S,y:w}=bl(e),C=c==null?void 0:c.elementFromPoint(S,w),x=gT(l,C),P=f==null?void 0:f.getBoundingClientRect();if(!P||!x)return;let E,I=bl(e,P),N=!1,M=null,T=!1,A=null;const R=Hme({nodes:b(),nodeId:n,handleId:t,handleType:x}),D=()=>{if(!h)return;const[O,B]=MB(I,P);_({x:O,y:B}),m=requestAnimationFrame(D)};a({connectionPosition:I,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:x,connectionStartHandle:{nodeId:n,handleId:t,type:x},connectionEndHandle:null}),g==null||g(e,{nodeId:n,handleId:t,handleType:x});function $(O){const{transform:B}=o();I=bl(O,P);const{handle:U,validHandleResult:j}=Ume(O,c,UB(I,B,!1,[1,1]),p,R,q=>WB(q,d,n,t,i?"target":"source",s,c));if(v=U,N||(D(),N=!0),A=j.handleDomNode,M=j.connection,T=j.isValid,a({connectionPosition:v&&T?jme({x:v.x,y:v.y},B):I,connectionStatus:qme(!!v,T),connectionEndHandle:j.endHandle}),!v&&!T&&!A)return Jx(E);M.source!==M.target&&A&&(Jx(E),E=A,A.classList.add("connecting","react-flow__handle-connecting"),A.classList.toggle("valid",T),A.classList.toggle("react-flow__handle-valid",T))}function L(O){var B,U;(v||A)&&M&&T&&(r==null||r(M)),(U=(B=o()).onConnectEnd)==null||U.call(B,O),l&&(u==null||u(O)),Jx(E),y(),cancelAnimationFrame(m),N=!1,T=!1,M=null,A=null,c.removeEventListener("mousemove",$),c.removeEventListener("mouseup",L),c.removeEventListener("touchmove",$),c.removeEventListener("touchend",L)}c.addEventListener("mousemove",$),c.addEventListener("mouseup",L),c.addEventListener("touchmove",$),c.addEventListener("touchend",L)}const KI=()=>!0,Wme=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Kme=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:a}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===n}},XB=k.forwardRef(({type:e="source",position:t=Pe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:a,onConnect:s,children:l,className:u,onMouseDown:c,onTouchStart:d,...f},h)=>{var P,E;const p=a||null,g=e==="target",_=Kn(),b=Dme(),{connectOnClick:y,noPanClassName:m}=fn(Wme,ii),{connecting:v,clickConnecting:S}=fn(Kme(b,p,e),ii);b||(E=(P=_.getState()).onError)==null||E.call(P,"010",ys.error010());const w=I=>{const{defaultEdgeOptions:N,onConnect:M,hasDefaultEdges:T}=_.getState(),A={...N,...I};if(T){const{edges:R,setEdges:D}=_.getState();D(Uh(A,R))}M==null||M(A),s==null||s(A)},C=I=>{if(!b)return;const N=DB(I);i&&(N&&I.button===0||!N)&&KB({event:I,handleId:p,nodeId:b,onConnect:w,isTarget:g,getState:_.getState,setState:_.setState,isValidConnection:n||_.getState().isValidConnection||KI}),N?c==null||c(I):d==null||d(I)},x=I=>{const{onClickConnectStart:N,onClickConnectEnd:M,connectionClickStartHandle:T,connectionMode:A,isValidConnection:R}=_.getState();if(!b||!T&&!i)return;if(!T){N==null||N(I,{nodeId:b,handleId:p,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:b,type:e,handleId:p}});return}const D=RB(I.target),$=n||R||KI,{connection:L,isValid:O}=WB({nodeId:b,id:p,type:e},A,T.nodeId,T.handleId||null,T.type,$,D);O&&w(L),M==null||M(I),_.setState({connectionClickStartHandle:null})};return J.createElement("div",{"data-handleid":p,"data-nodeid":b,"data-handlepos":t,"data-id":`${b}-${p}-${e}`,className:to(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!g,target:g,connectable:r,connectablestart:i,connectableend:o,connecting:S,connectionindicator:r&&(i&&!v||o&&v)}]),onMouseDown:C,onTouchStart:C,onClick:y?x:void 0,ref:h,...f},l)});XB.displayName="Handle";var V1=k.memo(XB);const QB=({data:e,isConnectable:t,targetPosition:n=Pe.Top,sourcePosition:r=Pe.Bottom})=>J.createElement(J.Fragment,null,J.createElement(V1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,J.createElement(V1,{type:"source",position:r,isConnectable:t}));QB.displayName="DefaultNode";var G5=k.memo(QB);const YB=({data:e,isConnectable:t,sourcePosition:n=Pe.Bottom})=>J.createElement(J.Fragment,null,e==null?void 0:e.label,J.createElement(V1,{type:"source",position:n,isConnectable:t}));YB.displayName="InputNode";var ZB=k.memo(YB);const JB=({data:e,isConnectable:t,targetPosition:n=Pe.Top})=>J.createElement(J.Fragment,null,J.createElement(V1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);JB.displayName="OutputNode";var ez=k.memo(JB);const mT=()=>null;mT.displayName="GroupNode";const Xme=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),U0=e=>e.id;function Qme(e,t){return ii(e.selectedNodes.map(U0),t.selectedNodes.map(U0))&&ii(e.selectedEdges.map(U0),t.selectedEdges.map(U0))}const tz=k.memo(({onSelectionChange:e})=>{const t=Kn(),{selectedNodes:n,selectedEdges:r}=fn(Xme,Qme);return k.useEffect(()=>{var o,a;const i={nodes:n,edges:r};e==null||e(i),(a=(o=t.getState()).onSelectionChange)==null||a.call(o,i)},[n,r,e]),null});tz.displayName="SelectionListener";const Yme=e=>!!e.onSelectionChange;function Zme({onSelectionChange:e}){const t=fn(Yme);return e||t?J.createElement(tz,{onSelectionChange:e}):null}const Jme=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Oc(e,t){k.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Ue(e,t,n){k.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const e0e=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:f,edgesUpdatable:h,elevateNodesOnSelect:p,minZoom:g,maxZoom:_,nodeExtent:b,onNodesChange:y,onEdgesChange:m,elementsSelectable:v,connectionMode:S,snapGrid:w,snapToGrid:C,translateExtent:x,connectOnClick:P,defaultEdgeOptions:E,fitView:I,fitViewOptions:N,onNodesDelete:M,onEdgesDelete:T,onNodeDrag:A,onNodeDragStart:R,onNodeDragStop:D,onSelectionDrag:$,onSelectionDragStart:L,onSelectionDragStop:O,noPanClassName:B,nodeOrigin:U,rfId:j,autoPanOnConnect:q,autoPanOnNodeDrag:Y,onError:Z,connectionRadius:V,isValidConnection:K,nodeDragThreshold:ee})=>{const{setNodes:re,setEdges:fe,setDefaultNodesAndEdges:Se,setMinZoom:Me,setMaxZoom:De,setTranslateExtent:Ee,setNodeExtent:tt,reset:ot}=fn(Jme,ii),xe=Kn();return k.useEffect(()=>{const Xn=r==null?void 0:r.map(Vt=>({...Vt,...E}));return Se(n,Xn),()=>{ot()}},[]),Ue("defaultEdgeOptions",E,xe.setState),Ue("connectionMode",S,xe.setState),Ue("onConnect",i,xe.setState),Ue("onConnectStart",o,xe.setState),Ue("onConnectEnd",a,xe.setState),Ue("onClickConnectStart",s,xe.setState),Ue("onClickConnectEnd",l,xe.setState),Ue("nodesDraggable",u,xe.setState),Ue("nodesConnectable",c,xe.setState),Ue("nodesFocusable",d,xe.setState),Ue("edgesFocusable",f,xe.setState),Ue("edgesUpdatable",h,xe.setState),Ue("elementsSelectable",v,xe.setState),Ue("elevateNodesOnSelect",p,xe.setState),Ue("snapToGrid",C,xe.setState),Ue("snapGrid",w,xe.setState),Ue("onNodesChange",y,xe.setState),Ue("onEdgesChange",m,xe.setState),Ue("connectOnClick",P,xe.setState),Ue("fitViewOnInit",I,xe.setState),Ue("fitViewOnInitOptions",N,xe.setState),Ue("onNodesDelete",M,xe.setState),Ue("onEdgesDelete",T,xe.setState),Ue("onNodeDrag",A,xe.setState),Ue("onNodeDragStart",R,xe.setState),Ue("onNodeDragStop",D,xe.setState),Ue("onSelectionDrag",$,xe.setState),Ue("onSelectionDragStart",L,xe.setState),Ue("onSelectionDragStop",O,xe.setState),Ue("noPanClassName",B,xe.setState),Ue("nodeOrigin",U,xe.setState),Ue("rfId",j,xe.setState),Ue("autoPanOnConnect",q,xe.setState),Ue("autoPanOnNodeDrag",Y,xe.setState),Ue("onError",Z,xe.setState),Ue("connectionRadius",V,xe.setState),Ue("isValidConnection",K,xe.setState),Ue("nodeDragThreshold",ee,xe.setState),Oc(e,re),Oc(t,fe),Oc(g,Me),Oc(_,De),Oc(x,Ee),Oc(b,tt),null},XI={display:"none"},t0e={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},nz="react-flow__node-desc",rz="react-flow__edge-desc",n0e="react-flow__aria-live",r0e=e=>e.ariaLiveMessage;function i0e({rfId:e}){const t=fn(r0e);return J.createElement("div",{id:`${n0e}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:t0e},t)}function o0e({rfId:e,disableKeyboardA11y:t}){return J.createElement(J.Fragment,null,J.createElement("div",{id:`${nz}-${e}`,style:XI},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),J.createElement("div",{id:`${rz}-${e}`,style:XI},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&J.createElement(i0e,{rfId:e}))}var kg=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=k.useState(!1),i=k.useRef(!1),o=k.useRef(new Set([])),[a,s]=k.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return k.useEffect(()=>{const l=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||l;if(e!==null){const c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&V5(h))return!1;const g=YI(h.code,s);o.current.add(h[g]),QI(a,o.current,!1)&&(h.preventDefault(),r(!0))},d=h=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&V5(h))return!1;const g=YI(h.code,s);QI(a,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(h[g]),h.key==="Meta"&&o.current.clear(),i.current=!1},f=()=>{o.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",d),window.addEventListener("blur",f),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",d),window.removeEventListener("blur",f)}}},[e,r]),n};function QI(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function YI(e,t){return t.includes(e)?"code":"key"}function iz(e,t,n,r){var a,s;if(!e.parentNode)return n;const i=t.get(e.parentNode),o=Fd(i,r);return iz(i,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(((a=i[Rn])==null?void 0:a.z)??0)>(n.z??0)?((s=i[Rn])==null?void 0:s.z)??0:n.z??0},r)}function oz(e,t,n){e.forEach(r=>{var i;if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n!=null&&n[r.id]){const{x:o,y:a,z:s}=iz(r,e,{...r.position,z:((i=r[Rn])==null?void 0:i.z)??0},t);r.positionAbsolute={x:o,y:a},r[Rn].z=s,n!=null&&n[r.id]&&(r[Rn].isParent=!0)}})}function ew(e,t,n,r){const i=new Map,o={},a=r?1e3:0;return e.forEach(s=>{var d;const l=(Ki(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={width:u==null?void 0:u.width,height:u==null?void 0:u.height,...s,positionAbsolute:{x:s.position.x,y:s.position.y}};s.parentNode&&(c.parentNode=s.parentNode,o[s.parentNode]=!0),Object.defineProperty(c,Rn,{enumerable:!1,value:{handleBounds:(d=u==null?void 0:u[Rn])==null?void 0:d.handleBounds,z:l}}),i.set(s.id,c)}),oz(i,n,o),i}function az(e,t={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),f=t.initial&&!u&&c;if(s&&l&&(f||!t.initial)){const p=n().filter(_=>{var y;const b=t.includeHiddenNodes?_.width&&_.height:!_.hidden;return(y=t.nodes)!=null&&y.length?b&&t.nodes.some(m=>m.id===_.id):b}),g=p.every(_=>_.width&&_.height);if(p.length>0&&g){const _=hT(p,d),[b,y,m]=HB(_,r,i,t.minZoom??o,t.maxZoom??a,t.padding??.1),v=vl.translate(b,y).scale(m);return typeof t.duration=="number"&&t.duration>0?s.transform(mu(l,t.duration),v):s.transform(l,v),!0}}return!1}function a0e(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Rn]:r[Rn],selected:n.selected})}),new Map(t)}function s0e(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function G0({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:a0e(e,i)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:s0e(t,o)}),s==null||s(t))}const $c=()=>{},l0e={zoomIn:$c,zoomOut:$c,zoomTo:$c,getZoom:()=>1,setViewport:$c,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:$c,fitBounds:$c,project:e=>e,viewportInitialized:!1},u0e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),c0e=()=>{const e=Kn(),{d3Zoom:t,d3Selection:n}=fn(u0e,ii);return k.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>t.scaleTo(mu(n,o==null?void 0:o.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,o)=>{const[a,s,l]=e.getState().transform,u=vl.translate(i.x??a,i.y??s).scale(i.zoom??l);t.transform(mu(n,o==null?void 0:o.duration),u)},getViewport:()=>{const[i,o,a]=e.getState().transform;return{x:i,y:o,zoom:a}},fitView:i=>az(e.getState,i),setCenter:(i,o,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,d=s/2-i*c,f=l/2-o*c,h=vl.translate(d,f).scale(c);t.transform(mu(n,a==null?void 0:a.duration),h)},fitBounds:(i,o)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),[c,d,f]=HB(i,a,s,l,u,(o==null?void 0:o.padding)??.1),h=vl.translate(c,d).scale(f);t.transform(mu(n,o==null?void 0:o.duration),h)},project:i=>{const{transform:o,snapToGrid:a,snapGrid:s}=e.getState();return UB(i,o,a,s)},viewportInitialized:!0}:l0e,[t,n])};function sz(){const e=c0e(),t=Kn(),n=k.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),r=k.useCallback(g=>t.getState().nodeInternals.get(g),[]),i=k.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(_=>({..._}))},[]),o=k.useCallback(g=>{const{edges:_=[]}=t.getState();return _.find(b=>b.id===g)},[]),a=k.useCallback(g=>{const{getNodes:_,setNodes:b,hasDefaultNodes:y,onNodesChange:m}=t.getState(),v=_(),S=typeof g=="function"?g(v):g;if(y)b(S);else if(m){const w=S.length===0?v.map(C=>({type:"remove",id:C.id})):S.map(C=>({item:C,type:"reset"}));m(w)}},[]),s=k.useCallback(g=>{const{edges:_=[],setEdges:b,hasDefaultEdges:y,onEdgesChange:m}=t.getState(),v=typeof g=="function"?g(_):g;if(y)b(v);else if(m){const S=v.length===0?_.map(w=>({type:"remove",id:w.id})):v.map(w=>({item:w,type:"reset"}));m(S)}},[]),l=k.useCallback(g=>{const _=Array.isArray(g)?g:[g],{getNodes:b,setNodes:y,hasDefaultNodes:m,onNodesChange:v}=t.getState();if(m){const w=[...b(),..._];y(w)}else if(v){const S=_.map(w=>({item:w,type:"add"}));v(S)}},[]),u=k.useCallback(g=>{const _=Array.isArray(g)?g:[g],{edges:b=[],setEdges:y,hasDefaultEdges:m,onEdgesChange:v}=t.getState();if(m)y([...b,..._]);else if(v){const S=_.map(w=>({item:w,type:"add"}));v(S)}},[]),c=k.useCallback(()=>{const{getNodes:g,edges:_=[],transform:b}=t.getState(),[y,m,v]=b;return{nodes:g().map(S=>({...S})),edges:_.map(S=>({...S})),viewport:{x:y,y:m,zoom:v}}},[]),d=k.useCallback(({nodes:g,edges:_})=>{const{nodeInternals:b,getNodes:y,edges:m,hasDefaultNodes:v,hasDefaultEdges:S,onNodesDelete:w,onEdgesDelete:C,onNodesChange:x,onEdgesChange:P}=t.getState(),E=(g||[]).map(A=>A.id),I=(_||[]).map(A=>A.id),N=y().reduce((A,R)=>{const D=!E.includes(R.id)&&R.parentNode&&A.find(L=>L.id===R.parentNode);return(typeof R.deletable=="boolean"?R.deletable:!0)&&(E.includes(R.id)||D)&&A.push(R),A},[]),M=m.filter(A=>typeof A.deletable=="boolean"?A.deletable:!0),T=M.filter(A=>I.includes(A.id));if(N||T){const A=pT(N,M),R=[...T,...A],D=R.reduce(($,L)=>($.includes(L.id)||$.push(L.id),$),[]);if((S||v)&&(S&&t.setState({edges:m.filter($=>!D.includes($.id))}),v&&(N.forEach($=>{b.delete($.id)}),t.setState({nodeInternals:new Map(b)}))),D.length>0&&(C==null||C(R),P&&P(D.map($=>({id:$,type:"remove"})))),N.length>0&&(w==null||w(N),x)){const $=N.map(L=>({id:L.id,type:"remove"}));x($)}}},[]),f=k.useCallback(g=>{const _=Pme(g),b=_?null:t.getState().nodeInternals.get(g.id);return[_?g:jI(b),b,_]},[]),h=k.useCallback((g,_=!0,b)=>{const[y,m,v]=f(g);return y?(b||t.getState().getNodes()).filter(S=>{if(!v&&(S.id===m.id||!S.positionAbsolute))return!1;const w=jI(S),C=z5(w,y);return _&&C>0||C>=g.width*g.height}):[]},[]),p=k.useCallback((g,_,b=!0)=>{const[y]=f(g);if(!y)return!1;const m=z5(y,_);return b&&m>0||m>=g.width*g.height},[]);return k.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:h,isNodeIntersecting:p}),[e,n,r,i,o,a,s,l,u,c,d,h,p])}const d0e={actInsideInputWithModifier:!1};var f0e=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Kn(),{deleteElements:r}=sz(),i=kg(e,d0e),o=kg(t);k.useEffect(()=>{if(i){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[i]),k.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function h0e(e){const t=Kn();k.useEffect(()=>{let n;const r=()=>{var o,a;if(!e.current)return;const i=sT(e.current);(i.height===0||i.width===0)&&((a=(o=t.getState()).onError)==null||a.call(o,"004",ys.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const yT={position:"absolute",width:"100%",height:"100%",top:0,left:0},p0e=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,H0=e=>({x:e.x,y:e.y,zoom:e.k}),Nc=(e,t)=>e.target.closest(`.${t}`),ZI=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),JI=e=>{const t=e.ctrlKey&&F1()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},g0e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),m0e=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=Ru.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:p,maxZoom:g,zoomActivationKeyCode:_,preventScrolling:b=!0,children:y,noWheelClassName:m,noPanClassName:v})=>{const S=k.useRef(),w=Kn(),C=k.useRef(!1),x=k.useRef(!1),P=k.useRef(null),E=k.useRef({x:0,y:0,zoom:0}),{d3Zoom:I,d3Selection:N,d3ZoomHandler:M,userSelectionActive:T}=fn(g0e,ii),A=kg(_),R=k.useRef(0),D=k.useRef(!1),$=k.useRef();return h0e(P),k.useEffect(()=>{if(P.current){const L=P.current.getBoundingClientRect(),O=Sme().scaleExtent([p,g]).translateExtent(h),B=So(P.current).call(O),U=vl.translate(f.x,f.y).scale(bf(f.zoom,p,g)),j=[[0,0],[L.width,L.height]],q=O.constrain()(U,j,h);O.transform(B,q),O.wheelDelta(JI),w.setState({d3Zoom:O,d3Selection:B,d3ZoomHandler:B.on("wheel.zoom"),transform:[q.x,q.y,q.k],domNode:P.current.closest(".react-flow")})}},[]),k.useEffect(()=>{N&&I&&(a&&!A&&!T?N.on("wheel.zoom",L=>{if(Nc(L,m))return!1;L.preventDefault(),L.stopImmediatePropagation();const O=N.property("__zoom").k||1,B=F1();if(L.ctrlKey&&o&&B){const ee=Yo(L),re=JI(L),fe=O*Math.pow(2,re);I.scaleTo(N,fe,ee,L);return}const U=L.deltaMode===1?20:1;let j=l===Ru.Vertical?0:L.deltaX*U,q=l===Ru.Horizontal?0:L.deltaY*U;!B&&L.shiftKey&&l!==Ru.Vertical&&(j=L.deltaY*U,q=0),I.translateBy(N,-(j/O)*s,-(q/O)*s,{internal:!0});const Y=H0(N.property("__zoom")),{onViewportChangeStart:Z,onViewportChange:V,onViewportChangeEnd:K}=w.getState();clearTimeout($.current),D.current||(D.current=!0,t==null||t(L,Y),Z==null||Z(Y)),D.current&&(e==null||e(L,Y),V==null||V(Y),$.current=setTimeout(()=>{n==null||n(L,Y),K==null||K(Y),D.current=!1},150))},{passive:!1}):typeof M<"u"&&N.on("wheel.zoom",function(L,O){if(!b||Nc(L,m))return null;L.preventDefault(),M.call(this,L,O)},{passive:!1}))},[T,a,l,N,I,M,A,o,b,m,t,e,n]),k.useEffect(()=>{I&&I.on("start",L=>{var U,j;if(!L.sourceEvent||L.sourceEvent.internal)return null;R.current=(U=L.sourceEvent)==null?void 0:U.button;const{onViewportChangeStart:O}=w.getState(),B=H0(L.transform);C.current=!0,E.current=B,((j=L.sourceEvent)==null?void 0:j.type)==="mousedown"&&w.setState({paneDragging:!0}),O==null||O(B),t==null||t(L.sourceEvent,B)})},[I,t]),k.useEffect(()=>{I&&(T&&!C.current?I.on("zoom",null):T||I.on("zoom",L=>{var B;const{onViewportChange:O}=w.getState();if(w.setState({transform:[L.transform.x,L.transform.y,L.transform.k]}),x.current=!!(r&&ZI(d,R.current??0)),(e||O)&&!((B=L.sourceEvent)!=null&&B.internal)){const U=H0(L.transform);O==null||O(U),e==null||e(L.sourceEvent,U)}}))},[T,I,e,d,r]),k.useEffect(()=>{I&&I.on("end",L=>{if(!L.sourceEvent||L.sourceEvent.internal)return null;const{onViewportChangeEnd:O}=w.getState();if(C.current=!1,w.setState({paneDragging:!1}),r&&ZI(d,R.current??0)&&!x.current&&r(L.sourceEvent),x.current=!1,(n||O)&&p0e(E.current,L.transform)){const B=H0(L.transform);E.current=B,clearTimeout(S.current),S.current=setTimeout(()=>{O==null||O(B),n==null||n(L.sourceEvent,B)},a?150:0)}})},[I,a,d,n,r]),k.useEffect(()=>{I&&I.filter(L=>{const O=A||i,B=o&&L.ctrlKey;if((d===!0||Array.isArray(d)&&d.includes(1))&&L.button===1&&L.type==="mousedown"&&(Nc(L,"react-flow__node")||Nc(L,"react-flow__edge")))return!0;if(!d&&!O&&!a&&!u&&!o||T||!u&&L.type==="dblclick"||Nc(L,m)&&L.type==="wheel"||Nc(L,v)&&(L.type!=="wheel"||a&&L.type==="wheel")||!o&&L.ctrlKey&&L.type==="wheel"||!O&&!a&&!B&&L.type==="wheel"||!d&&(L.type==="mousedown"||L.type==="touchstart")||Array.isArray(d)&&!d.includes(L.button)&&(L.type==="mousedown"||L.type==="touchstart"))return!1;const U=Array.isArray(d)&&d.includes(L.button)||!L.button||L.button<=1;return(!L.ctrlKey||L.type==="wheel")&&U})},[T,I,i,o,a,u,d,c,A]),J.createElement("div",{className:"react-flow__renderer",ref:P,style:yT},y)},y0e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function v0e(){const{userSelectionActive:e,userSelectionRect:t}=fn(y0e,ii);return e&&t?J.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function e8(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(r>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),i>0&&(n.style.height+=i),t.position.x<0){const o=Math.abs(t.position.x);n.position.x=n.position.x-o,n.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);n.position.y=n.position.y-o,n.style.height+=o,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function lz(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const o=e.filter(s=>s.id===i.id);if(o.length===0)return r.push(i),r;const a={...i};for(const s of o)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&e8(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&e8(r,a);break}case"remove":return r}return r.push(a),r},n)}function yu(e,t){return lz(e,t)}function su(e,t){return lz(e,t)}const Ws=(e,t)=>({id:e,type:"select",selected:t});function ld(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Ws(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Ws(r.id,!1))),n},[])}const tw=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},b0e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),uz=k.memo(({isSelecting:e,selectionMode:t=Rl.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const f=k.useRef(null),h=Kn(),p=k.useRef(0),g=k.useRef(0),_=k.useRef(),{userSelectionActive:b,elementsSelectable:y,dragging:m}=fn(b0e,ii),v=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),p.current=0,g.current=0},S=M=>{o==null||o(M),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},w=M=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){M.preventDefault();return}a==null||a(M)},C=s?M=>s(M):void 0,x=M=>{const{resetSelectedElements:T,domNode:A}=h.getState();if(_.current=A==null?void 0:A.getBoundingClientRect(),!y||!e||M.button!==0||M.target!==f.current||!_.current)return;const{x:R,y:D}=bl(M,_.current);T(),h.setState({userSelectionRect:{width:0,height:0,startX:R,startY:D,x:R,y:D}}),r==null||r(M)},P=M=>{const{userSelectionRect:T,nodeInternals:A,edges:R,transform:D,onNodesChange:$,onEdgesChange:L,nodeOrigin:O,getNodes:B}=h.getState();if(!e||!_.current||!T)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=bl(M,_.current),j=T.startX??0,q=T.startY??0,Y={...T,x:U.xre.id),ee=V.map(re=>re.id);if(p.current!==ee.length){p.current=ee.length;const re=ld(Z,ee);re.length&&($==null||$(re))}if(g.current!==K.length){g.current=K.length;const re=ld(R,K);re.length&&(L==null||L(re))}h.setState({userSelectionRect:Y})},E=M=>{if(M.button!==0)return;const{userSelectionRect:T}=h.getState();!b&&T&&M.target===f.current&&(S==null||S(M)),h.setState({nodesSelectionActive:p.current>0}),v(),i==null||i(M)},I=M=>{b&&(h.setState({nodesSelectionActive:p.current>0}),i==null||i(M)),v()},N=y&&(e||b);return J.createElement("div",{className:to(["react-flow__pane",{dragging:m,selection:e}]),onClick:N?void 0:tw(S,f),onContextMenu:tw(w,f),onWheel:tw(C,f),onMouseEnter:N?void 0:l,onMouseDown:N?x:void 0,onMouseMove:N?P:u,onMouseUp:N?E:void 0,onMouseLeave:N?I:c,ref:f,style:yT},d,J.createElement(v0e,null))});uz.displayName="Pane";function cz(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:cz(n,t):!1}function t8(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function _0e(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||!cz(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var o,a;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((a=i.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode,width:i.width,height:i.height,expandParent:i.expandParent}})}function S0e(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function dz(e,t,n,r,i=[0,0],o){const a=S0e(e,e.extent||r);let s=a;if(e.extent==="parent"&&!e.expandParent)if(e.parentNode&&e.width&&e.height){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=c&&Ki(d)&&Ki(f)&&Ki(c.width)&&Ki(c.height)?[[d+e.width*i[0],f+e.height*i[1]],[d+c.width-e.width+e.width*i[0],f+c.height-e.height+e.height*i[1]]]:s}else o==null||o("005",ys.error005()),s=a;else if(e.extent&&e.parentNode&&e.extent!=="parent"){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=[[e.extent[0][0]+d,e.extent[0][1]+f],[e.extent[1][0]+d,e.extent[1][1]+f]]}let l={x:0,y:0};if(e.parentNode){const c=n.get(e.parentNode);l=Fd(c,i).positionAbsolute}const u=s&&s!=="parent"?lT(t,s):t;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function nw({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const n8=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const o=Array.from(i),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return o.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...sT(l)}})};function gh(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function H5({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),u=s.get(e);if(!u){l==null||l("012",ys.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function x0e(){const e=Kn();return k.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:o?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function rw(e){return(t,n,r)=>e==null?void 0:e(t,r)}function fz({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:a}){const s=Kn(),[l,u]=k.useState(!1),c=k.useRef([]),d=k.useRef({x:null,y:null}),f=k.useRef(0),h=k.useRef(null),p=k.useRef({x:0,y:0}),g=k.useRef(null),_=k.useRef(!1),b=k.useRef(!1),y=x0e();return k.useEffect(()=>{if(e!=null&&e.current){const m=So(e.current),v=({x:C,y:x})=>{const{nodeInternals:P,onNodeDrag:E,onSelectionDrag:I,updateNodePositions:N,nodeExtent:M,snapGrid:T,snapToGrid:A,nodeOrigin:R,onError:D}=s.getState();d.current={x:C,y:x};let $=!1,L={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&M){const B=hT(c.current,R);L=Pg(B)}if(c.current=c.current.map(B=>{const U={x:C-B.distance.x,y:x-B.distance.y};A&&(U.x=T[0]*Math.round(U.x/T[0]),U.y=T[1]*Math.round(U.y/T[1]));const j=[[M[0][0],M[0][1]],[M[1][0],M[1][1]]];c.current.length>1&&M&&!B.extent&&(j[0][0]=B.positionAbsolute.x-L.x+M[0][0],j[1][0]=B.positionAbsolute.x+(B.width??0)-L.x2+M[1][0],j[0][1]=B.positionAbsolute.y-L.y+M[0][1],j[1][1]=B.positionAbsolute.y+(B.height??0)-L.y2+M[1][1]);const q=dz(B,U,P,j,R,D);return $=$||B.position.x!==q.position.x||B.position.y!==q.position.y,B.position=q.position,B.positionAbsolute=q.positionAbsolute,B}),!$)return;N(c.current,!0,!0),u(!0);const O=i?E:rw(I);if(O&&g.current){const[B,U]=nw({nodeId:i,dragItems:c.current,nodeInternals:P});O(g.current,B,U)}},S=()=>{if(!h.current)return;const[C,x]=MB(p.current,h.current);if(C!==0||x!==0){const{transform:P,panBy:E}=s.getState();d.current.x=(d.current.x??0)-C/P[2],d.current.y=(d.current.y??0)-x/P[2],E({x:C,y:x})&&v(d.current)}f.current=requestAnimationFrame(S)},w=C=>{var R;const{nodeInternals:x,multiSelectionActive:P,nodesDraggable:E,unselectNodesAndEdges:I,onNodeDragStart:N,onSelectionDragStart:M}=s.getState();b.current=!0;const T=i?N:rw(M);(!a||!o)&&!P&&i&&((R=x.get(i))!=null&&R.selected||I()),i&&o&&a&&H5({id:i,store:s,nodeRef:e});const A=y(C);if(d.current=A,c.current=_0e(x,E,A,i),T&&c.current){const[D,$]=nw({nodeId:i,dragItems:c.current,nodeInternals:x});T(C.sourceEvent,D,$)}};if(t)m.on(".drag",null);else{const C=Mpe().on("start",x=>{const{domNode:P,nodeDragThreshold:E}=s.getState();E===0&&w(x);const I=y(x);d.current=I,h.current=(P==null?void 0:P.getBoundingClientRect())||null,p.current=bl(x.sourceEvent,h.current)}).on("drag",x=>{var N,M;const P=y(x),{autoPanOnNodeDrag:E,nodeDragThreshold:I}=s.getState();if(!_.current&&b.current&&E&&(_.current=!0,S()),!b.current){const T=P.xSnapped-(((N=d==null?void 0:d.current)==null?void 0:N.x)??0),A=P.ySnapped-(((M=d==null?void 0:d.current)==null?void 0:M.y)??0);Math.sqrt(T*T+A*A)>I&&w(x)}(d.current.x!==P.xSnapped||d.current.y!==P.ySnapped)&&c.current&&b.current&&(g.current=x.sourceEvent,p.current=bl(x.sourceEvent,h.current),v(P))}).on("end",x=>{if(b.current&&(u(!1),_.current=!1,b.current=!1,cancelAnimationFrame(f.current),c.current)){const{updateNodePositions:P,nodeInternals:E,onNodeDragStop:I,onSelectionDragStop:N}=s.getState(),M=i?I:rw(N);if(P(c.current,!1,!1),M){const[T,A]=nw({nodeId:i,dragItems:c.current,nodeInternals:E});M(x.sourceEvent,T,A)}}}).filter(x=>{const P=x.target;return!x.button&&(!n||!t8(P,`.${n}`,e))&&(!r||t8(P,r,e))});return m.call(C),()=>{m.on(".drag",null)}}}},[e,t,n,r,o,s,i,a,y]),l}function hz(){const e=Kn();return k.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=a().filter(y=>y.selected&&(y.draggable||c&&typeof y.draggable>"u")),f=s?l[0]:5,h=s?l[1]:5,p=n.isShiftPressed?4:1,g=n.x*f*p,_=n.y*h*p,b=d.map(y=>{if(y.positionAbsolute){const m={x:y.positionAbsolute.x+g,y:y.positionAbsolute.y+_};s&&(m.x=l[0]*Math.round(m.x/l[0]),m.y=l[1]*Math.round(m.y/l[1]));const{positionAbsolute:v,position:S}=dz(y,m,r,i,void 0,u);y.position=S,y.positionAbsolute=v}return y});o(b,!0,!1)},[])}const Bd={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var mh=e=>{const t=({id:n,type:r,data:i,xPos:o,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onContextMenu:p,onDoubleClick:g,style:_,className:b,isDraggable:y,isSelectable:m,isConnectable:v,isFocusable:S,selectNodesOnDrag:w,sourcePosition:C,targetPosition:x,hidden:P,resizeObserver:E,dragHandle:I,zIndex:N,isParent:M,noDragClassName:T,noPanClassName:A,initialized:R,disableKeyboardA11y:D,ariaLabel:$,rfId:L})=>{const O=Kn(),B=k.useRef(null),U=k.useRef(C),j=k.useRef(x),q=k.useRef(r),Y=m||y||c||d||f||h,Z=hz(),V=gh(n,O.getState,d),K=gh(n,O.getState,f),ee=gh(n,O.getState,h),re=gh(n,O.getState,p),fe=gh(n,O.getState,g),Se=Ee=>{const{nodeDragThreshold:tt}=O.getState();if(m&&(!w||!y||tt>0)&&H5({id:n,store:O,nodeRef:B}),c){const ot=O.getState().nodeInternals.get(n);ot&&c(Ee,{...ot})}},Me=Ee=>{if(!V5(Ee))if(NB.includes(Ee.key)&&m){const tt=Ee.key==="Escape";H5({id:n,store:O,unselect:tt,nodeRef:B})}else!D&&y&&u&&Object.prototype.hasOwnProperty.call(Bd,Ee.key)&&(O.setState({ariaLiveMessage:`Moved selected node ${Ee.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~a}`}),Z({x:Bd[Ee.key].x,y:Bd[Ee.key].y,isShiftPressed:Ee.shiftKey}))};k.useEffect(()=>{if(B.current&&!P){const Ee=B.current;return E==null||E.observe(Ee),()=>E==null?void 0:E.unobserve(Ee)}},[P]),k.useEffect(()=>{const Ee=q.current!==r,tt=U.current!==C,ot=j.current!==x;B.current&&(Ee||tt||ot)&&(Ee&&(q.current=r),tt&&(U.current=C),ot&&(j.current=x),O.getState().updateNodeDimensions([{id:n,nodeElement:B.current,forceUpdate:!0}]))},[n,r,C,x]);const De=fz({nodeRef:B,disabled:P||!y,noDragClassName:T,handleSelector:I,nodeId:n,isSelectable:m,selectNodesOnDrag:w});return P?null:J.createElement("div",{className:to(["react-flow__node",`react-flow__node-${r}`,{[A]:y},b,{selected:u,selectable:m,parent:M,dragging:De}]),ref:B,style:{zIndex:N,transform:`translate(${s}px,${l}px)`,pointerEvents:Y?"all":"none",visibility:R?"visible":"hidden",..._},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:V,onMouseMove:K,onMouseLeave:ee,onContextMenu:re,onClick:Se,onDoubleClick:fe,onKeyDown:S?Me:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":D?void 0:`${nz}-${L}`,"aria-label":$},J.createElement(Nme,{value:n},J.createElement(e,{id:n,data:i,type:r,xPos:o,yPos:a,selected:u,isConnectable:v,sourcePosition:C,targetPosition:x,dragging:De,dragHandle:I,zIndex:N})))};return t.displayName="NodeWrapper",k.memo(t)};const w0e=e=>{const t=e.getNodes().filter(n=>n.selected);return{...hT(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function C0e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Kn(),{width:i,height:o,x:a,y:s,transformString:l,userSelectionActive:u}=fn(w0e,ii),c=hz(),d=k.useRef(null);if(k.useEffect(()=>{var p;n||(p=d.current)==null||p.focus({preventScroll:!0})},[n]),fz({nodeRef:d}),u||!i||!o)return null;const f=e?p=>{const g=r.getState().getNodes().filter(_=>_.selected);e(p,g)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(Bd,p.key)&&c({x:Bd[p.key].x,y:Bd[p.key].y,isShiftPressed:p.shiftKey})};return J.createElement("div",{className:to(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},J.createElement("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:o,top:s,left:a}}))}var E0e=k.memo(C0e);const T0e=e=>e.nodesSelectionActive,pz=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:f,selectionMode:h,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:_,panActivationKeyCode:b,zoomActivationKeyCode:y,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:S,panOnScroll:w,panOnScrollSpeed:C,panOnScrollMode:x,zoomOnDoubleClick:P,panOnDrag:E,defaultViewport:I,translateExtent:N,minZoom:M,maxZoom:T,preventScrolling:A,onSelectionContextMenu:R,noWheelClassName:D,noPanClassName:$,disableKeyboardA11y:L})=>{const O=fn(T0e),B=kg(d),j=kg(b)||E,q=B||f&&j!==!0;return f0e({deleteKeyCode:s,multiSelectionKeyCode:_}),J.createElement(m0e,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:o,elementsSelectable:m,zoomOnScroll:v,zoomOnPinch:S,panOnScroll:w,panOnScrollSpeed:C,panOnScrollMode:x,zoomOnDoubleClick:P,panOnDrag:!B&&j,defaultViewport:I,translateExtent:N,minZoom:M,maxZoom:T,zoomActivationKeyCode:y,preventScrolling:A,noWheelClassName:D,noPanClassName:$},J.createElement(uz,{onSelectionStart:p,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,panOnDrag:j,isSelecting:!!q,selectionMode:h},e,O&&J.createElement(E0e,{onSelectionContextMenu:R,noPanClassName:$,disableKeyboardA11y:L})))};pz.displayName="FlowRenderer";var A0e=k.memo(pz);function P0e(e){return fn(k.useCallback(n=>e?GB(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function k0e(e){const t={input:mh(e.input||ZB),default:mh(e.default||G5),output:mh(e.output||ez),group:mh(e.group||mT)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=mh(e[o]||G5),i),n);return{...t,...r}}const I0e=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},M0e=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),gz=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:a}=fn(M0e,ii),s=P0e(e.onlyRenderVisibleElements),l=k.useRef(),u=k.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const f=d.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));o(f)});return l.current=c,c},[]);return k.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),J.createElement("div",{className:"react-flow__nodes",style:yT},s.map(c=>{var S,w;let d=c.type||"default";e.nodeTypes[d]||(a==null||a("003",ys.error003(d)),d="default");const f=e.nodeTypes[d]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),p=!!(c.selectable||i&&typeof c.selectable>"u"),g=!!(c.connectable||n&&typeof c.connectable>"u"),_=!!(c.focusable||r&&typeof c.focusable>"u"),b=e.nodeExtent?lT(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,y=(b==null?void 0:b.x)??0,m=(b==null?void 0:b.y)??0,v=I0e({x:y,y:m,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return J.createElement(f,{key:c.id,id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||Pe.Bottom,targetPosition:c.targetPosition||Pe.Top,hidden:c.hidden,xPos:y,yPos:m,xPosOrigin:v.x,yPosOrigin:v.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:h,isSelectable:p,isConnectable:g,isFocusable:_,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((S=c[Rn])==null?void 0:S.z)??0,isParent:!!((w=c[Rn])!=null&&w.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel})}))};gz.displayName="NodeRenderer";var R0e=k.memo(gz);const O0e=(e,t,n)=>n===Pe.Left?e-t:n===Pe.Right?e+t:e,$0e=(e,t,n)=>n===Pe.Top?e-t:n===Pe.Bottom?e+t:e,r8="react-flow__edgeupdater",i8=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:a,type:s})=>J.createElement("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:a,className:to([r8,`${r8}-${s}`]),cx:O0e(t,r,e),cy:$0e(n,r,e),r,stroke:"transparent",fill:"transparent"}),N0e=()=>!0;var Dc=e=>{const t=({id:n,className:r,type:i,data:o,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,style:_,source:b,target:y,sourceX:m,sourceY:v,targetX:S,targetY:w,sourcePosition:C,targetPosition:x,elementsSelectable:P,hidden:E,sourceHandleId:I,targetHandleId:N,onContextMenu:M,onMouseEnter:T,onMouseMove:A,onMouseLeave:R,edgeUpdaterRadius:D,onEdgeUpdate:$,onEdgeUpdateStart:L,onEdgeUpdateEnd:O,markerEnd:B,markerStart:U,rfId:j,ariaLabel:q,isFocusable:Y,isUpdatable:Z,pathOptions:V,interactionWidth:K})=>{const ee=k.useRef(null),[re,fe]=k.useState(!1),[Se,Me]=k.useState(!1),De=Kn(),Ee=k.useMemo(()=>`url(#${U5(U,j)})`,[U,j]),tt=k.useMemo(()=>`url(#${U5(B,j)})`,[B,j]);if(E)return null;const ot=rn=>{var _n;const{edges:Nt,addSelectedEdges:li,unselectNodesAndEdges:Ri,multiSelectionActive:fo}=De.getState(),jr=Nt.find(ui=>ui.id===n);jr&&(P&&(De.setState({nodesSelectionActive:!1}),jr.selected&&fo?(Ri({nodes:[],edges:[jr]}),(_n=ee.current)==null||_n.blur()):li([n])),a&&a(rn,jr))},xe=ph(n,De.getState,s),Xn=ph(n,De.getState,M),Vt=ph(n,De.getState,T),$t=ph(n,De.getState,A),xt=ph(n,De.getState,R),bn=(rn,Nt)=>{if(rn.button!==0)return;const{edges:li,isValidConnection:Ri}=De.getState(),fo=Nt?y:b,jr=(Nt?N:I)||null,_n=Nt?"target":"source",ui=Ri||N0e,tu=Nt,jo=li.find(wt=>wt.id===n);Me(!0),L==null||L(rn,jo,_n);const nu=wt=>{Me(!1),O==null||O(wt,jo,_n)};KB({event:rn,handleId:jr,nodeId:fo,onConnect:wt=>$==null?void 0:$(jo,wt),isTarget:tu,getState:De.getState,setState:De.setState,isValidConnection:ui,edgeUpdaterType:_n,onEdgeUpdateEnd:nu})},Vr=rn=>bn(rn,!0),co=rn=>bn(rn,!1),Mi=()=>fe(!0),ur=()=>fe(!1),Qn=!P&&!a,xr=rn=>{var Nt;if(NB.includes(rn.key)&&P){const{unselectNodesAndEdges:li,addSelectedEdges:Ri,edges:fo}=De.getState();rn.key==="Escape"?((Nt=ee.current)==null||Nt.blur(),li({edges:[fo.find(_n=>_n.id===n)]})):Ri([n])}};return J.createElement("g",{className:to(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:l,animated:u,inactive:Qn,updating:re}]),onClick:ot,onDoubleClick:xe,onContextMenu:Xn,onMouseEnter:Vt,onMouseMove:$t,onMouseLeave:xt,onKeyDown:Y?xr:void 0,tabIndex:Y?0:void 0,role:Y?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":q===null?void 0:q||`Edge from ${b} to ${y}`,"aria-describedby":Y?`${rz}-${j}`:void 0,ref:ee},!Se&&J.createElement(e,{id:n,source:b,target:y,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,data:o,style:_,sourceX:m,sourceY:v,targetX:S,targetY:w,sourcePosition:C,targetPosition:x,sourceHandleId:I,targetHandleId:N,markerStart:Ee,markerEnd:tt,pathOptions:V,interactionWidth:K}),Z&&J.createElement(J.Fragment,null,(Z==="source"||Z===!0)&&J.createElement(i8,{position:C,centerX:m,centerY:v,radius:D,onMouseDown:Vr,onMouseEnter:Mi,onMouseOut:ur,type:"source"}),(Z==="target"||Z===!0)&&J.createElement(i8,{position:x,centerX:S,centerY:w,radius:D,onMouseDown:co,onMouseEnter:Mi,onMouseOut:ur,type:"target"})))};return t.displayName="EdgeWrapper",k.memo(t)};function D0e(e){const t={default:Dc(e.default||z1),straight:Dc(e.bezier||dT),step:Dc(e.step||cT),smoothstep:Dc(e.step||oS),simplebezier:Dc(e.simplebezier||uT)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=Dc(e[o]||z1),i),n);return{...t,...r}}function o8(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,o=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case Pe.Top:return{x:r+o/2,y:i};case Pe.Right:return{x:r+o,y:i+a/2};case Pe.Bottom:return{x:r+o/2,y:i+a};case Pe.Left:return{x:r,y:i+a/2}}}function a8(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const L0e=(e,t,n,r,i,o)=>{const a=o8(n,e,t),s=o8(o,r,i);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function F0e({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:a,height:s,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Pg({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function s8(e){var r,i,o,a,s;const t=((r=e==null?void 0:e[Rn])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const B0e=[{level:0,isMaxLevel:!0,edges:[]}];function z0e(e,t,n=!1){let r=-1;const i=e.reduce((a,s)=>{var c,d;const l=Ki(s.zIndex);let u=l?s.zIndex:0;if(n){const f=t.get(s.target),h=t.get(s.source),p=s.selected||(f==null?void 0:f.selected)||(h==null?void 0:h.selected),g=Math.max(((c=h==null?void 0:h[Rn])==null?void 0:c.z)||0,((d=f==null?void 0:f[Rn])==null?void 0:d.z)||0,1e3);u=(l?s.zIndex:0)+(p?g:0)}return a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),o=Object.entries(i).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return o.length===0?B0e:o}function V0e(e,t,n){const r=fn(k.useCallback(i=>e?i.edges.filter(o=>{const a=t.get(o.source),s=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&F0e({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return z0e(r,t,n)}const j0e=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),U0e=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),l8={[B1.Arrow]:j0e,[B1.ArrowClosed]:U0e};function G0e(e){const t=Kn();return k.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(l8,e)?l8[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",ys.error009(e)),null)},[e])}const H0e=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=G0e(t);return l?J.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:s,refX:"0",refY:"0"},J.createElement(l,{color:n,strokeWidth:a})):null},q0e=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=U5(a,t);r.includes(s)||(i.push({id:s,color:a.color||e,...a}),r.push(s))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},mz=({defaultColor:e,rfId:t})=>{const n=fn(k.useCallback(q0e({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((o,a)=>o.id!==i[a].id)));return J.createElement("defs",null,n.map(r=>J.createElement(H0e,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};mz.displayName="MarkerDefinitions";var W0e=k.memo(mz);const K0e=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),yz=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeUpdate:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,children:_})=>{const{edgesFocusable:b,edgesUpdatable:y,elementsSelectable:m,width:v,height:S,connectionMode:w,nodeInternals:C,onError:x}=fn(K0e,ii),P=V0e(t,C,n);return v?J.createElement(J.Fragment,null,P.map(({level:E,edges:I,isMaxLevel:N})=>J.createElement("svg",{key:E,style:{zIndex:E},width:v,height:S,className:"react-flow__edges react-flow__container"},N&&J.createElement(W0e,{defaultColor:e,rfId:r}),J.createElement("g",null,I.map(M=>{const[T,A,R]=s8(C.get(M.source)),[D,$,L]=s8(C.get(M.target));if(!R||!L)return null;let O=M.type||"default";i[O]||(x==null||x("011",ys.error011(O)),O="default");const B=i[O]||i.default,U=w===sc.Strict?$.target:($.target??[]).concat($.source??[]),j=a8(A.source,M.sourceHandle),q=a8(U,M.targetHandle),Y=(j==null?void 0:j.position)||Pe.Bottom,Z=(q==null?void 0:q.position)||Pe.Top,V=!!(M.focusable||b&&typeof M.focusable>"u"),K=typeof a<"u"&&(M.updatable||y&&typeof M.updatable>"u");if(!j||!q)return x==null||x("008",ys.error008(j,M)),null;const{sourceX:ee,sourceY:re,targetX:fe,targetY:Se}=L0e(T,j,Y,D,q,Z);return J.createElement(B,{key:M.id,id:M.id,className:to([M.className,o]),type:O,data:M.data,selected:!!M.selected,animated:!!M.animated,hidden:!!M.hidden,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,style:M.style,source:M.source,target:M.target,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerEnd:M.markerEnd,markerStart:M.markerStart,sourceX:ee,sourceY:re,targetX:fe,targetY:Se,sourcePosition:Y,targetPosition:Z,elementsSelectable:m,onEdgeUpdate:a,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:c,onClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,rfId:r,ariaLabel:M.ariaLabel,isFocusable:V,isUpdatable:K,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth})})))),_):null};yz.displayName="EdgeRenderer";var X0e=k.memo(yz);const Q0e=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Y0e({children:e}){const t=fn(Q0e);return J.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function Z0e(e){const t=sz(),n=k.useRef(!1);k.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const J0e={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top},vz=({nodeId:e,handleType:t,style:n,type:r=Js.Bezier,CustomComponent:i,connectionStatus:o})=>{var w,C,x;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=fn(k.useCallback(P=>({fromNode:P.nodeInternals.get(e),handleId:P.connectionHandleId,toX:(P.connectionPosition.x-P.transform[0])/P.transform[2],toY:(P.connectionPosition.y-P.transform[1])/P.transform[2],connectionMode:P.connectionMode}),[e]),ii),d=(w=a==null?void 0:a[Rn])==null?void 0:w.handleBounds;let f=d==null?void 0:d[t];if(c===sc.Loose&&(f=f||(d==null?void 0:d[t==="source"?"target":"source"])),!a||!f)return null;const h=s?f.find(P=>P.id===s):f[0],p=h?h.x+h.width/2:(a.width??0)/2,g=h?h.y+h.height/2:a.height??0,_=(((C=a.positionAbsolute)==null?void 0:C.x)??0)+p,b=(((x=a.positionAbsolute)==null?void 0:x.y)??0)+g,y=h==null?void 0:h.position,m=y?J0e[y]:null;if(!y||!m)return null;if(i)return J.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:h,fromX:_,fromY:b,toX:l,toY:u,fromPosition:y,toPosition:m,connectionStatus:o});let v="";const S={sourceX:_,sourceY:b,sourcePosition:y,targetX:l,targetY:u,targetPosition:m};return r===Js.Bezier?[v]=zB(S):r===Js.Step?[v]=j5({...S,borderRadius:0}):r===Js.SmoothStep?[v]=j5(S):r===Js.SimpleBezier?[v]=BB(S):v=`M${_},${b} ${l},${u}`,J.createElement("path",{d:v,fill:"none",className:"react-flow__connection-path",style:n})};vz.displayName="ConnectionLine";const eye=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function tye({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:a,width:s,height:l,connectionStatus:u}=fn(eye,ii);return!(i&&o&&s&&a)?null:J.createElement("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},J.createElement("g",{className:to(["react-flow__connection",u])},J.createElement(vz,{nodeId:i,handleType:o,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function u8(e,t){return k.useRef(null),Kn(),k.useMemo(()=>t(e),[e])}const bz=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:_,connectionLineType:b,connectionLineStyle:y,connectionLineComponent:m,connectionLineContainerStyle:v,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,multiSelectionKeyCode:x,panActivationKeyCode:P,zoomActivationKeyCode:E,deleteKeyCode:I,onlyRenderVisibleElements:N,elementsSelectable:M,selectNodesOnDrag:T,defaultViewport:A,translateExtent:R,minZoom:D,maxZoom:$,preventScrolling:L,defaultMarkerColor:O,zoomOnScroll:B,zoomOnPinch:U,panOnScroll:j,panOnScrollSpeed:q,panOnScrollMode:Y,zoomOnDoubleClick:Z,panOnDrag:V,onPaneClick:K,onPaneMouseEnter:ee,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneScroll:Se,onPaneContextMenu:Me,onEdgeUpdate:De,onEdgeContextMenu:Ee,onEdgeMouseEnter:tt,onEdgeMouseMove:ot,onEdgeMouseLeave:xe,edgeUpdaterRadius:Xn,onEdgeUpdateStart:Vt,onEdgeUpdateEnd:$t,noDragClassName:xt,noWheelClassName:bn,noPanClassName:Vr,elevateEdgesOnSelect:co,disableKeyboardA11y:Mi,nodeOrigin:ur,nodeExtent:Qn,rfId:xr})=>{const rn=u8(e,k0e),Nt=u8(t,D0e);return Z0e(o),J.createElement(A0e,{onPaneClick:K,onPaneMouseEnter:ee,onPaneMouseMove:re,onPaneMouseLeave:fe,onPaneContextMenu:Me,onPaneScroll:Se,deleteKeyCode:I,selectionKeyCode:S,selectionOnDrag:w,selectionMode:C,onSelectionStart:g,onSelectionEnd:_,multiSelectionKeyCode:x,panActivationKeyCode:P,zoomActivationKeyCode:E,elementsSelectable:M,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:B,zoomOnPinch:U,zoomOnDoubleClick:Z,panOnScroll:j,panOnScrollSpeed:q,panOnScrollMode:Y,panOnDrag:V,defaultViewport:A,translateExtent:R,minZoom:D,maxZoom:$,onSelectionContextMenu:p,preventScrolling:L,noDragClassName:xt,noWheelClassName:bn,noPanClassName:Vr,disableKeyboardA11y:Mi},J.createElement(Y0e,null,J.createElement(X0e,{edgeTypes:Nt,onEdgeClick:s,onEdgeDoubleClick:u,onEdgeUpdate:De,onlyRenderVisibleElements:N,onEdgeContextMenu:Ee,onEdgeMouseEnter:tt,onEdgeMouseMove:ot,onEdgeMouseLeave:xe,onEdgeUpdateStart:Vt,onEdgeUpdateEnd:$t,edgeUpdaterRadius:Xn,defaultMarkerColor:O,noPanClassName:Vr,elevateEdgesOnSelect:!!co,disableKeyboardA11y:Mi,rfId:xr},J.createElement(tye,{style:y,type:b,component:m,containerStyle:v})),J.createElement("div",{className:"react-flow__edgelabel-renderer"}),J.createElement(R0e,{nodeTypes:rn,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,selectNodesOnDrag:T,onlyRenderVisibleElements:N,noPanClassName:Vr,noDragClassName:xt,disableKeyboardA11y:Mi,nodeOrigin:ur,nodeExtent:Qn,rfId:xr})))};bz.displayName="GraphView";var nye=k.memo(bz);const q5=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ns={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:q5,nodeExtent:q5,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:sc.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:kme,isValidConnection:void 0},rye=()=>Ufe((e,t)=>({...Ns,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=t();e({nodeInternals:ew(n,r,i,o)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",a=i?ew(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=n.reduce((g,_)=>{const b=i.get(_.id);if(b){const y=sT(_.nodeElement);!!(y.width&&y.height&&(b.width!==y.width||b.height!==y.height||_.forceUpdate))&&(i.set(b.id,{...b,[Rn]:{...b[Rn],handleBounds:{source:n8(".source",_.nodeElement,f,u),target:n8(".target",_.nodeElement,f,u)}},...y}),g.push({id:b.id,type:"dimensions",dimensions:y}))}return g},[]);oz(i,u);const p=a||o&&!a&&az(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:p}),(h==null?void 0:h.length)>0&&(r==null||r(h))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:i};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});o(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(o){const u=yu(n,s()),c=ew(u,i,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(o(),n),s=ld(i,[])),G0({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(i,n),s=ld(o(),[])),G0({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=t(),a=n||o(),s=r||i,l=a.map(c=>(c.selected=!1,Ws(c.id,!1))),u=s.map(c=>Ws(c.id,!1));G0({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),o=r().filter(s=>s.selected).map(s=>Ws(s.id,!1)),a=n.filter(s=>s.selected).map(s=>Ws(s.id,!1));G0({changedNodes:o,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=lT(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return!1;const u=vl.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[i,o]],d=a==null?void 0:a.constrain()(u,c,l);return a.transform(s,d),r[0]!==d.x||r[1]!==d.y||r[2]!==d.k},cancelConnection:()=>e({connectionNodeId:Ns.connectionNodeId,connectionHandleId:Ns.connectionHandleId,connectionHandleType:Ns.connectionHandleType,connectionStatus:Ns.connectionStatus,connectionStartHandle:Ns.connectionStartHandle,connectionEndHandle:Ns.connectionEndHandle}),reset:()=>e({...Ns})}),Object.is),_z=({children:e})=>{const t=k.useRef(null);return t.current||(t.current=rye()),J.createElement(xme,{value:t.current},e)};_z.displayName="ReactFlowProvider";const Sz=({children:e})=>k.useContext(iS)?J.createElement(J.Fragment,null,e):J.createElement(_z,null,e);Sz.displayName="ReactFlowWrapper";const iye={input:ZB,default:G5,output:ez,group:mT},oye={default:z1,straight:dT,step:cT,smoothstep:oS,simplebezier:uT},aye=[0,0],sye=[15,15],lye={x:0,y:0,zoom:1},uye={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},cye=k.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=iye,edgeTypes:a=oye,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:v,onNodeContextMenu:S,onNodeDoubleClick:w,onNodeDragStart:C,onNodeDrag:x,onNodeDragStop:P,onNodesDelete:E,onEdgesDelete:I,onSelectionChange:N,onSelectionDragStart:M,onSelectionDrag:T,onSelectionDragStop:A,onSelectionContextMenu:R,onSelectionStart:D,onSelectionEnd:$,connectionMode:L=sc.Strict,connectionLineType:O=Js.Bezier,connectionLineStyle:B,connectionLineComponent:U,connectionLineContainerStyle:j,deleteKeyCode:q="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:Z=!1,selectionMode:V=Rl.Full,panActivationKeyCode:K="Space",multiSelectionKeyCode:ee=F1()?"Meta":"Control",zoomActivationKeyCode:re=F1()?"Meta":"Control",snapToGrid:fe=!1,snapGrid:Se=sye,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:De=!0,nodesDraggable:Ee,nodesConnectable:tt,nodesFocusable:ot,nodeOrigin:xe=aye,edgesFocusable:Xn,edgesUpdatable:Vt,elementsSelectable:$t,defaultViewport:xt=lye,minZoom:bn=.5,maxZoom:Vr=2,translateExtent:co=q5,preventScrolling:Mi=!0,nodeExtent:ur,defaultMarkerColor:Qn="#b1b1b7",zoomOnScroll:xr=!0,zoomOnPinch:rn=!0,panOnScroll:Nt=!1,panOnScrollSpeed:li=.5,panOnScrollMode:Ri=Ru.Free,zoomOnDoubleClick:fo=!0,panOnDrag:jr=!0,onPaneClick:_n,onPaneMouseEnter:ui,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Xt,children:wt,onEdgeUpdate:Yn,onEdgeContextMenu:Nn,onEdgeDoubleClick:cr,onEdgeMouseEnter:wr,onEdgeMouseMove:Ur,onEdgeMouseLeave:Uo,onEdgeUpdateStart:Cr,onEdgeUpdateEnd:Zn,edgeUpdaterRadius:Ra=10,onNodesChange:Is,onEdgesChange:Ms,noDragClassName:Cc="nodrag",noWheelClassName:Oa="nowheel",noPanClassName:Er="nopan",fitView:ru=!1,fitViewOptions:M2,connectOnClick:R2=!0,attributionPosition:O2,proOptions:$2,defaultEdgeOptions:Rs,elevateNodesOnSelect:N2=!0,elevateEdgesOnSelect:D2=!1,disableKeyboardA11y:Ym=!1,autoPanOnConnect:L2=!0,autoPanOnNodeDrag:F2=!0,connectionRadius:B2=20,isValidConnection:Qf,onError:z2,style:Ec,id:Tc,nodeDragThreshold:V2,...Ac},Zm)=>{const Yf=Tc||"1";return J.createElement("div",{...Ac,style:{...Ec,...uye},ref:Zm,className:to(["react-flow",i]),"data-testid":"rf__wrapper",id:Tc},J.createElement(Sz,null,J.createElement(nye,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:v,onNodeContextMenu:S,onNodeDoubleClick:w,nodeTypes:o,edgeTypes:a,connectionLineType:O,connectionLineStyle:B,connectionLineComponent:U,connectionLineContainerStyle:j,selectionKeyCode:Y,selectionOnDrag:Z,selectionMode:V,deleteKeyCode:q,multiSelectionKeyCode:ee,panActivationKeyCode:K,zoomActivationKeyCode:re,onlyRenderVisibleElements:Me,selectNodesOnDrag:De,defaultViewport:xt,translateExtent:co,minZoom:bn,maxZoom:Vr,preventScrolling:Mi,zoomOnScroll:xr,zoomOnPinch:rn,zoomOnDoubleClick:fo,panOnScroll:Nt,panOnScrollSpeed:li,panOnScrollMode:Ri,panOnDrag:jr,onPaneClick:_n,onPaneMouseEnter:ui,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Xt,onSelectionContextMenu:R,onSelectionStart:D,onSelectionEnd:$,onEdgeUpdate:Yn,onEdgeContextMenu:Nn,onEdgeDoubleClick:cr,onEdgeMouseEnter:wr,onEdgeMouseMove:Ur,onEdgeMouseLeave:Uo,onEdgeUpdateStart:Cr,onEdgeUpdateEnd:Zn,edgeUpdaterRadius:Ra,defaultMarkerColor:Qn,noDragClassName:Cc,noWheelClassName:Oa,noPanClassName:Er,elevateEdgesOnSelect:D2,rfId:Yf,disableKeyboardA11y:Ym,nodeOrigin:xe,nodeExtent:ur}),J.createElement(e0e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:b,nodesDraggable:Ee,nodesConnectable:tt,nodesFocusable:ot,edgesFocusable:Xn,edgesUpdatable:Vt,elementsSelectable:$t,elevateNodesOnSelect:N2,minZoom:bn,maxZoom:Vr,nodeExtent:ur,onNodesChange:Is,onEdgesChange:Ms,snapToGrid:fe,snapGrid:Se,connectionMode:L,translateExtent:co,connectOnClick:R2,defaultEdgeOptions:Rs,fitView:ru,fitViewOptions:M2,onNodesDelete:E,onEdgesDelete:I,onNodeDragStart:C,onNodeDrag:x,onNodeDragStop:P,onSelectionDrag:T,onSelectionDragStart:M,onSelectionDragStop:A,noPanClassName:Er,nodeOrigin:xe,rfId:Yf,autoPanOnConnect:L2,autoPanOnNodeDrag:F2,onError:z2,connectionRadius:B2,isValidConnection:Qf,nodeDragThreshold:V2}),J.createElement(Zme,{onSelectionChange:N}),wt,J.createElement(Eme,{proOptions:$2,position:O2}),J.createElement(o0e,{rfId:Yf,disableKeyboardA11y:Ym})))});cye.displayName="ReactFlow";const dye=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function fVe({children:e}){const t=fn(dye);return t?mi.createPortal(e,t):null}function hVe(){const e=Kn();return k.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=(Array.isArray(t)?t:[t]).reduce((a,s)=>{const l=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${s}"]`);return l&&a.push({id:s,nodeElement:l,forceUpdate:!0}),a},[]);requestAnimationFrame(()=>r(o))},[])}function fye(){const e=[];return function(t,n){if(typeof n!="object"||n===null)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}const Ig=Xv("nodes/receivedOpenAPISchema",async(e,{rejectWithValue:t})=>{try{const n=[window.location.origin,"openapi.json"].join("/"),i=await(await fetch(n)).json();return JSON.parse(JSON.stringify(i,fye()))}catch(n){return t({error:n})}}),pVe=500,gVe=320,xz="node-drag-handle",mVe=["ImageField","ImageCollection"],yVe={input:"inputs",output:"outputs"},q0=["Collection","IntegerCollection","BooleanCollection","FloatCollection","StringCollection","ImageCollection","LatentsCollection","ConditioningCollection","ControlCollection","ColorCollection","T2IAdapterCollection","IPAdapterCollection","MetadataItemCollection","MetadataCollection"],Gh=["IntegerPolymorphic","BooleanPolymorphic","FloatPolymorphic","StringPolymorphic","ImagePolymorphic","LatentsPolymorphic","ConditioningPolymorphic","ControlPolymorphic","ColorPolymorphic","T2IAdapterPolymorphic","IPAdapterPolymorphic","MetadataItemPolymorphic"],vVe=["IPAdapterModelField","ControlNetModelField","LoRAModelField","MainModelField","ONNXModelField","SDXLMainModelField","SDXLRefinerModelField","VaeModelField","UNetField","VaeField","ClipField","T2IAdapterModelField","IPAdapterModelField"],vT={integer:"IntegerCollection",boolean:"BooleanCollection",number:"FloatCollection",float:"FloatCollection",string:"StringCollection",ImageField:"ImageCollection",LatentsField:"LatentsCollection",ConditioningField:"ConditioningCollection",ControlField:"ControlCollection",ColorField:"ColorCollection",T2IAdapterField:"T2IAdapterCollection",IPAdapterField:"IPAdapterCollection",MetadataItemField:"MetadataItemCollection",MetadataField:"MetadataCollection"},hye=e=>!!(e&&e in vT),wz={integer:"IntegerPolymorphic",boolean:"BooleanPolymorphic",number:"FloatPolymorphic",float:"FloatPolymorphic",string:"StringPolymorphic",ImageField:"ImagePolymorphic",LatentsField:"LatentsPolymorphic",ConditioningField:"ConditioningPolymorphic",ControlField:"ControlPolymorphic",ColorField:"ColorPolymorphic",T2IAdapterField:"T2IAdapterPolymorphic",IPAdapterField:"IPAdapterPolymorphic",MetadataItemField:"MetadataItemPolymorphic"},pye={IntegerPolymorphic:"integer",BooleanPolymorphic:"boolean",FloatPolymorphic:"float",StringPolymorphic:"string",ImagePolymorphic:"ImageField",LatentsPolymorphic:"LatentsField",ConditioningPolymorphic:"ConditioningField",ControlPolymorphic:"ControlField",ColorPolymorphic:"ColorField",T2IAdapterPolymorphic:"T2IAdapterField",IPAdapterPolymorphic:"IPAdapterField",MetadataItemPolymorphic:"MetadataItemField"},bVe=["string","StringPolymorphic","boolean","BooleanPolymorphic","integer","float","FloatPolymorphic","IntegerPolymorphic","enum","ImageField","ImagePolymorphic","MainModelField","SDXLRefinerModelField","VaeModelField","LoRAModelField","ControlNetModelField","ColorField","SDXLMainModelField","Scheduler","IPAdapterModelField","BoardField","T2IAdapterModelField"],gye=e=>!!(e&&e in wz),_Ve={Any:{color:"gray.500",description:"Any field type is accepted.",title:"Any"},MetadataField:{color:"gray.500",description:"A metadata dict.",title:"Metadata Dict"},MetadataCollection:{color:"gray.500",description:"A collection of metadata dicts.",title:"Metadata Dict Collection"},MetadataItemField:{color:"gray.500",description:"A metadata item.",title:"Metadata Item"},MetadataItemCollection:{color:"gray.500",description:"Any field type is accepted.",title:"Metadata Item Collection"},MetadataItemPolymorphic:{color:"gray.500",description:"MetadataItem or MetadataItemCollection field types are accepted.",title:"Metadata Item Polymorphic"},boolean:{color:"green.500",description:X("nodes.booleanDescription"),title:X("nodes.boolean")},BooleanCollection:{color:"green.500",description:X("nodes.booleanCollectionDescription"),title:X("nodes.booleanCollection")},BooleanPolymorphic:{color:"green.500",description:X("nodes.booleanPolymorphicDescription"),title:X("nodes.booleanPolymorphic")},ClipField:{color:"green.500",description:X("nodes.clipFieldDescription"),title:X("nodes.clipField")},Collection:{color:"base.500",description:X("nodes.collectionDescription"),title:X("nodes.collection")},CollectionItem:{color:"base.500",description:X("nodes.collectionItemDescription"),title:X("nodes.collectionItem")},ColorCollection:{color:"pink.300",description:X("nodes.colorCollectionDescription"),title:X("nodes.colorCollection")},ColorField:{color:"pink.300",description:X("nodes.colorFieldDescription"),title:X("nodes.colorField")},ColorPolymorphic:{color:"pink.300",description:X("nodes.colorPolymorphicDescription"),title:X("nodes.colorPolymorphic")},ConditioningCollection:{color:"cyan.500",description:X("nodes.conditioningCollectionDescription"),title:X("nodes.conditioningCollection")},ConditioningField:{color:"cyan.500",description:X("nodes.conditioningFieldDescription"),title:X("nodes.conditioningField")},ConditioningPolymorphic:{color:"cyan.500",description:X("nodes.conditioningPolymorphicDescription"),title:X("nodes.conditioningPolymorphic")},ControlCollection:{color:"teal.500",description:X("nodes.controlCollectionDescription"),title:X("nodes.controlCollection")},ControlField:{color:"teal.500",description:X("nodes.controlFieldDescription"),title:X("nodes.controlField")},ControlNetModelField:{color:"teal.500",description:"TODO",title:"ControlNet"},ControlPolymorphic:{color:"teal.500",description:"Control info passed between nodes.",title:"Control Polymorphic"},DenoiseMaskField:{color:"blue.300",description:X("nodes.denoiseMaskFieldDescription"),title:X("nodes.denoiseMaskField")},enum:{color:"blue.500",description:X("nodes.enumDescription"),title:X("nodes.enum")},float:{color:"orange.500",description:X("nodes.floatDescription"),title:X("nodes.float")},FloatCollection:{color:"orange.500",description:X("nodes.floatCollectionDescription"),title:X("nodes.floatCollection")},FloatPolymorphic:{color:"orange.500",description:X("nodes.floatPolymorphicDescription"),title:X("nodes.floatPolymorphic")},ImageCollection:{color:"purple.500",description:X("nodes.imageCollectionDescription"),title:X("nodes.imageCollection")},ImageField:{color:"purple.500",description:X("nodes.imageFieldDescription"),title:X("nodes.imageField")},BoardField:{color:"purple.500",description:X("nodes.imageFieldDescription"),title:X("nodes.imageField")},ImagePolymorphic:{color:"purple.500",description:X("nodes.imagePolymorphicDescription"),title:X("nodes.imagePolymorphic")},integer:{color:"red.500",description:X("nodes.integerDescription"),title:X("nodes.integer")},IntegerCollection:{color:"red.500",description:X("nodes.integerCollectionDescription"),title:X("nodes.integerCollection")},IntegerPolymorphic:{color:"red.500",description:X("nodes.integerPolymorphicDescription"),title:X("nodes.integerPolymorphic")},IPAdapterCollection:{color:"teal.500",description:X("nodes.ipAdapterCollectionDescription"),title:X("nodes.ipAdapterCollection")},IPAdapterField:{color:"teal.500",description:X("nodes.ipAdapterDescription"),title:X("nodes.ipAdapter")},IPAdapterModelField:{color:"teal.500",description:X("nodes.ipAdapterModelDescription"),title:X("nodes.ipAdapterModel")},IPAdapterPolymorphic:{color:"teal.500",description:X("nodes.ipAdapterPolymorphicDescription"),title:X("nodes.ipAdapterPolymorphic")},LatentsCollection:{color:"pink.500",description:X("nodes.latentsCollectionDescription"),title:X("nodes.latentsCollection")},LatentsField:{color:"pink.500",description:X("nodes.latentsFieldDescription"),title:X("nodes.latentsField")},LatentsPolymorphic:{color:"pink.500",description:X("nodes.latentsPolymorphicDescription"),title:X("nodes.latentsPolymorphic")},LoRAModelField:{color:"teal.500",description:X("nodes.loRAModelFieldDescription"),title:X("nodes.loRAModelField")},MainModelField:{color:"teal.500",description:X("nodes.mainModelFieldDescription"),title:X("nodes.mainModelField")},ONNXModelField:{color:"teal.500",description:X("nodes.oNNXModelFieldDescription"),title:X("nodes.oNNXModelField")},Scheduler:{color:"base.500",description:X("nodes.schedulerDescription"),title:X("nodes.scheduler")},SDXLMainModelField:{color:"teal.500",description:X("nodes.sDXLMainModelFieldDescription"),title:X("nodes.sDXLMainModelField")},SDXLRefinerModelField:{color:"teal.500",description:X("nodes.sDXLRefinerModelFieldDescription"),title:X("nodes.sDXLRefinerModelField")},string:{color:"yellow.500",description:X("nodes.stringDescription"),title:X("nodes.string")},StringCollection:{color:"yellow.500",description:X("nodes.stringCollectionDescription"),title:X("nodes.stringCollection")},StringPolymorphic:{color:"yellow.500",description:X("nodes.stringPolymorphicDescription"),title:X("nodes.stringPolymorphic")},T2IAdapterCollection:{color:"teal.500",description:X("nodes.t2iAdapterCollectionDescription"),title:X("nodes.t2iAdapterCollection")},T2IAdapterField:{color:"teal.500",description:X("nodes.t2iAdapterFieldDescription"),title:X("nodes.t2iAdapterField")},T2IAdapterModelField:{color:"teal.500",description:"TODO",title:"T2I-Adapter"},T2IAdapterPolymorphic:{color:"teal.500",description:"T2I-Adapter info passed between nodes.",title:"T2I-Adapter Polymorphic"},UNetField:{color:"red.500",description:X("nodes.uNetFieldDescription"),title:X("nodes.uNetField")},VaeField:{color:"blue.500",description:X("nodes.vaeFieldDescription"),title:X("nodes.vaeField")},VaeModelField:{color:"teal.500",description:X("nodes.vaeModelFieldDescription"),title:X("nodes.vaeModelField")}},c8=(e,t,n)=>{let r=t,i=n;for(;e.find(o=>o.position.x===r&&o.position.y===i);)r=r+50,i=i+50;return{x:r,y:i}},mye=(e,t)=>{if(e==="Collection"&&t==="Collection")return!1;if(e===t)return!0;const n=e==="CollectionItem"&&!q0.includes(t),r=t==="CollectionItem"&&!q0.includes(e)&&!Gh.includes(e),i=Gh.includes(t)&&(()=>{if(!Gh.includes(t))return!1;const c=pye[t],d=vT[c];return e===c||e===d})(),o=e==="Collection"&&(q0.includes(t)||Gh.includes(t)),a=t==="Collection"&&q0.includes(e);return n||r||i||o||a||e==="integer"&&t==="float"||(e==="integer"||e==="float")&&t==="string"||t==="Any"};var yye="\0",lu="\0",d8="",Hr,Du,hi,Jg,Kd,Xd,ji,Jo,nl,ea,rl,Ga,Ha,Qd,Yd,qa,yo,em,W5,hO;let vye=(hO=class{constructor(t){Gt(this,em);Gt(this,Hr,!0);Gt(this,Du,!1);Gt(this,hi,!1);Gt(this,Jg,void 0);Gt(this,Kd,()=>{});Gt(this,Xd,()=>{});Gt(this,ji,{});Gt(this,Jo,{});Gt(this,nl,{});Gt(this,ea,{});Gt(this,rl,{});Gt(this,Ga,{});Gt(this,Ha,{});Gt(this,Qd,0);Gt(this,Yd,0);Gt(this,qa,void 0);Gt(this,yo,void 0);t&&($i(this,Hr,t.hasOwnProperty("directed")?t.directed:!0),$i(this,Du,t.hasOwnProperty("multigraph")?t.multigraph:!1),$i(this,hi,t.hasOwnProperty("compound")?t.compound:!1)),te(this,hi)&&($i(this,qa,{}),$i(this,yo,{}),te(this,yo)[lu]={})}isDirected(){return te(this,Hr)}isMultigraph(){return te(this,Du)}isCompound(){return te(this,hi)}setGraph(t){return $i(this,Jg,t),this}graph(){return te(this,Jg)}setDefaultNodeLabel(t){return $i(this,Kd,t),typeof t!="function"&&$i(this,Kd,()=>t),this}nodeCount(){return te(this,Qd)}nodes(){return Object.keys(te(this,ji))}sources(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,Jo)[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,ea)[n]).length===0)}setNodes(t,n){var r=arguments,i=this;return t.forEach(function(o){r.length>1?i.setNode(o,n):i.setNode(o)}),this}setNode(t,n){return te(this,ji).hasOwnProperty(t)?(arguments.length>1&&(te(this,ji)[t]=n),this):(te(this,ji)[t]=arguments.length>1?n:te(this,Kd).call(this,t),te(this,hi)&&(te(this,qa)[t]=lu,te(this,yo)[t]={},te(this,yo)[lu][t]=!0),te(this,Jo)[t]={},te(this,nl)[t]={},te(this,ea)[t]={},te(this,rl)[t]={},++eh(this,Qd)._,this)}node(t){return te(this,ji)[t]}hasNode(t){return te(this,ji).hasOwnProperty(t)}removeNode(t){var n=this;if(te(this,ji).hasOwnProperty(t)){var r=i=>n.removeEdge(te(n,Ga)[i]);delete te(this,ji)[t],te(this,hi)&&(Go(this,em,W5).call(this,t),delete te(this,qa)[t],this.children(t).forEach(function(i){n.setParent(i)}),delete te(this,yo)[t]),Object.keys(te(this,Jo)[t]).forEach(r),delete te(this,Jo)[t],delete te(this,nl)[t],Object.keys(te(this,ea)[t]).forEach(r),delete te(this,ea)[t],delete te(this,rl)[t],--eh(this,Qd)._}return this}setParent(t,n){if(!te(this,hi))throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=lu;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),Go(this,em,W5).call(this,t),te(this,qa)[t]=n,te(this,yo)[n][t]=!0,this}parent(t){if(te(this,hi)){var n=te(this,qa)[t];if(n!==lu)return n}}children(t=lu){if(te(this,hi)){var n=te(this,yo)[t];if(n)return Object.keys(n)}else{if(t===lu)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=te(this,nl)[t];if(n)return Object.keys(n)}successors(t){var n=te(this,rl)[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const i=new Set(n);for(var r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:te(this,Hr),multigraph:te(this,Du),compound:te(this,hi)});n.setGraph(this.graph());var r=this;Object.entries(te(this,ji)).forEach(function([a,s]){t(a)&&n.setNode(a,s)}),Object.values(te(this,Ga)).forEach(function(a){n.hasNode(a.v)&&n.hasNode(a.w)&&n.setEdge(a,r.edge(a))});var i={};function o(a){var s=r.parent(a);return s===void 0||n.hasNode(s)?(i[a]=s,s):s in i?i[s]:o(s)}return te(this,hi)&&n.nodes().forEach(a=>n.setParent(a,o(a))),n}setDefaultEdgeLabel(t){return $i(this,Xd,t),typeof t!="function"&&$i(this,Xd,()=>t),this}edgeCount(){return te(this,Yd)}edges(){return Object.values(te(this,Ga))}setPath(t,n){var r=this,i=arguments;return t.reduce(function(o,a){return i.length>1?r.setEdge(o,a,n):r.setEdge(o,a),a}),this}setEdge(){var t,n,r,i,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,n=a.w,r=a.name,arguments.length===2&&(i=arguments[1],o=!0)):(t=a,n=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var s=Hh(te(this,Hr),t,n,r);if(te(this,Ha).hasOwnProperty(s))return o&&(te(this,Ha)[s]=i),this;if(r!==void 0&&!te(this,Du))throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),te(this,Ha)[s]=o?i:te(this,Xd).call(this,t,n,r);var l=bye(te(this,Hr),t,n,r);return t=l.v,n=l.w,Object.freeze(l),te(this,Ga)[s]=l,f8(te(this,nl)[n],t),f8(te(this,rl)[t],n),te(this,Jo)[n][s]=l,te(this,ea)[t][s]=l,eh(this,Yd)._++,this}edge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r);return te(this,Ha)[i]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r);return te(this,Ha).hasOwnProperty(i)}removeEdge(t,n,r){var i=arguments.length===1?iw(te(this,Hr),arguments[0]):Hh(te(this,Hr),t,n,r),o=te(this,Ga)[i];return o&&(t=o.v,n=o.w,delete te(this,Ha)[i],delete te(this,Ga)[i],h8(te(this,nl)[n],t),h8(te(this,rl)[t],n),delete te(this,Jo)[n][i],delete te(this,ea)[t][i],eh(this,Yd)._--),this}inEdges(t,n){var r=te(this,Jo)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.v===n):i}}outEdges(t,n){var r=te(this,ea)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.w===n):i}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}},Hr=new WeakMap,Du=new WeakMap,hi=new WeakMap,Jg=new WeakMap,Kd=new WeakMap,Xd=new WeakMap,ji=new WeakMap,Jo=new WeakMap,nl=new WeakMap,ea=new WeakMap,rl=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Qd=new WeakMap,Yd=new WeakMap,qa=new WeakMap,yo=new WeakMap,em=new WeakSet,W5=function(t){delete te(this,yo)[te(this,qa)[t]][t]},hO);function f8(e,t){e[t]?e[t]++:e[t]=1}function h8(e,t){--e[t]||delete e[t]}function Hh(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}return i+d8+o+d8+(r===void 0?yye:r)}function bye(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function iw(e,t){return Hh(e,t.v,t.w,t.name)}var bT=vye,_ye="2.1.13",Sye={Graph:bT,version:_ye},xye=bT,wye={write:Cye,read:Aye};function Cye(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Eye(e),edges:Tye(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function Eye(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function Tye(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function Aye(e){var t=new xye(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Pye=kye;function kye(e){var t={},n=[],r;function i(o){t.hasOwnProperty(o)||(t[o]=!0,r.push(o),e.successors(o).forEach(i),e.predecessors(o).forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&n.push(r)}),n}var pr,Wa,tm,K5,nm,X5,Zd,Qy,pO;let Iye=(pO=class{constructor(){Gt(this,tm);Gt(this,nm);Gt(this,Zd);Gt(this,pr,[]);Gt(this,Wa,{})}size(){return te(this,pr).length}keys(){return te(this,pr).map(function(t){return t.key})}has(t){return te(this,Wa).hasOwnProperty(t)}priority(t){var n=te(this,Wa)[t];if(n!==void 0)return te(this,pr)[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return te(this,pr)[0].key}add(t,n){var r=te(this,Wa);if(t=String(t),!r.hasOwnProperty(t)){var i=te(this,pr),o=i.length;return r[t]=o,i.push({key:t,priority:n}),Go(this,nm,X5).call(this,o),!0}return!1}removeMin(){Go(this,Zd,Qy).call(this,0,te(this,pr).length-1);var t=te(this,pr).pop();return delete te(this,Wa)[t.key],Go(this,tm,K5).call(this,0),t.key}decrease(t,n){var r=te(this,Wa)[t];if(n>te(this,pr)[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+te(this,pr)[r].priority+" New: "+n);te(this,pr)[r].priority=n,Go(this,nm,X5).call(this,r)}},pr=new WeakMap,Wa=new WeakMap,tm=new WeakSet,K5=function(t){var n=te(this,pr),r=2*t,i=r+1,o=t;r>1,!(n[i].priority1;function Oye(e,t,n,r){return $ye(e,String(t),n||Rye,r||function(i){return e.outEdges(i)})}function $ye(e,t,n,r){var i={},o=new Mye,a,s,l=function(u){var c=u.v!==a?u.v:u.w,d=i[c],f=n(u),h=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);h0&&(a=o.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)r(a).forEach(l);return i}var Nye=Ez,Dye=Lye;function Lye(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=Nye(e,i,t,n),r},{})}var Tz=Fye;function Fye(e){var t=0,n=[],r={},i=[];function o(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(c){r.hasOwnProperty(c)?r[c].onStack&&(s.lowlink=Math.min(s.lowlink,r[c].index)):(o(c),s.lowlink=Math.min(s.lowlink,r[c].lowlink))}),s.lowlink===s.index){var l=[],u;do u=n.pop(),r[u].onStack=!1,l.push(u);while(a!==u);i.push(l)}}return e.nodes().forEach(function(a){r.hasOwnProperty(a)||o(a)}),i}var Bye=Tz,zye=Vye;function Vye(e){return Bye(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var jye=Gye,Uye=()=>1;function Gye(e,t,n){return Hye(e,t||Uye,n||function(r){return e.outEdges(r)})}function Hye(e,t,n){var r={},i=e.nodes();return i.forEach(function(o){r[o]={},r[o][o]={distance:0},i.forEach(function(a){o!==a&&(r[o][a]={distance:Number.POSITIVE_INFINITY})}),n(o).forEach(function(a){var s=a.v===o?a.w:a.v,l=t(a);r[o][s]={distance:l,predecessor:o}})}),i.forEach(function(o){var a=r[o];i.forEach(function(s){var l=r[s];i.forEach(function(u){var c=l[o],d=a[u],f=l[u],h=c.distance+d.distance;he.successors(s):s=>e.neighbors(s),i=n==="post"?Xye:Qye,o=[],a={};return t.forEach(s=>{if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);i(s,r,a,o)}),o}function Xye(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):n.hasOwnProperty(o[0])||(n[o[0]]=!0,i.push([o[0],!0]),Iz(t(o[0]),a=>i.push([a,!1])))}}function Qye(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();n.hasOwnProperty(o)||(n[o]=!0,r.push(o),Iz(t(o),a=>i.push(a)))}}function Iz(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var Yye=kz,Zye=Jye;function Jye(e,t){return Yye(e,t,"post")}var eve=kz,tve=nve;function nve(e,t){return eve(e,t,"pre")}var rve=bT,ive=Cz,ove=ave;function ave(e,t){var n=new rve,r={},i=new ive,o;function a(l){var u=l.v===o?l.w:l.v,c=i.priority(u);if(c!==void 0){var d=t(l);d0;){if(o=i.removeMin(),r.hasOwnProperty(o))n.setEdge(o,r[o]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(o).forEach(a)}return n}var sve={components:Pye,dijkstra:Ez,dijkstraAll:Dye,findCycles:zye,floydWarshall:jye,isAcyclic:qye,postorder:Zye,preorder:tve,prim:ove,tarjan:Tz,topsort:Pz},g8=Sye,lve={Graph:g8.Graph,json:wye,alg:sve,version:g8.version};const m8=Bl(lve),y8=(e,t,n,r)=>{const i=new m8.Graph;return n.forEach(o=>{i.setNode(o.id)}),r.forEach(o=>{i.setEdge(o.source,o.target)}),i.setEdge(e,t),m8.alg.isAcyclic(i)},v8=(e,t,n,r,i)=>{let o=!0;return t==="source"?e.find(a=>a.target===r.id&&a.targetHandle===i.name)&&(o=!1):e.find(a=>a.source===r.id&&a.sourceHandle===i.name)&&(o=!1),mye(n,i.type)||(o=!1),o},b8=(e,t,n,r,i,o,a)=>{if(e.id===r)return null;const s=o=="source"?e.data.inputs:e.data.outputs;if(s[i]){const l=s[i],u=o=="source"?r:e.id,c=o=="source"?e.id:r,d=o=="source"?i:l.name,f=o=="source"?l.name:i,h=y8(u,c,t,n),p=v8(n,o,a,e,l);if(h&&p)return{source:u,sourceHandle:d,target:c,targetHandle:f}}for(const l in s){const u=s[l],c=o=="source"?r:e.id,d=o=="source"?e.id:r,f=o=="source"?i:u.name,h=o=="source"?u.name:i,p=y8(c,d,t,n),g=v8(n,o,a,e,u);if(p&&g)return{source:c,sourceHandle:f,target:d,targetHandle:h}}return null},uve="1.0.0",ow={status:wu.PENDING,error:null,progress:null,progressImage:null,outputs:[]},Y5={meta:{version:uve},name:"",author:"",description:"",notes:"",tags:"",contact:"",version:"",exposedFields:[]},Mz={nodes:[],edges:[],nodeTemplates:{},isReady:!1,connectionStartParams:null,currentConnectionFieldType:null,connectionMade:!1,modifyingEdge:!1,addNewNodePosition:null,shouldShowFieldTypeLegend:!1,shouldShowMinimapPanel:!0,shouldValidateGraph:!0,shouldAnimateEdges:!0,shouldSnapToGrid:!1,shouldColorEdges:!0,isAddNodePopoverOpen:!1,nodeOpacity:1,selectedNodes:[],selectedEdges:[],workflow:Y5,nodeExecutionStates:{},viewport:{x:0,y:0,zoom:1},mouseOverField:null,mouseOverNode:null,nodesToCopy:[],edgesToCopy:[],selectionMode:Rl.Partial},Ar=(e,t)=>{var l,u;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(c=>c.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=(u=a.data)==null?void 0:u.inputs[r];s&&o>-1&&(s.value=i)},Rz=Wt({name:"nodes",initialState:Mz,reducers:{nodesChanged:(e,t)=>{e.nodes=yu(t.payload,e.nodes)},nodeReplaced:(e,t)=>{const n=e.nodes.findIndex(r=>r.id===t.payload.nodeId);n<0||(e.nodes[n]=t.payload.node)},nodeAdded:(e,t)=>{var i,o;const n=t.payload,r=c8(e.nodes,((i=e.addNewNodePosition)==null?void 0:i.x)??n.position.x,((o=e.addNewNodePosition)==null?void 0:o.y)??n.position.y);if(n.position=r,n.selected=!0,e.nodes=yu(e.nodes.map(a=>({id:a.id,type:"select",selected:!1})),e.nodes),e.edges=su(e.edges.map(a=>({id:a.id,type:"select",selected:!1})),e.edges),e.nodes.push(n),!!on(n)){if(e.nodeExecutionStates[n.id]={nodeId:n.id,...ow},e.connectionStartParams){const{nodeId:a,handleId:s,handleType:l}=e.connectionStartParams;if(a&&s&&l&&e.currentConnectionFieldType){const u=b8(n,e.nodes,e.edges,a,s,l,e.currentConnectionFieldType);u&&(e.edges=Uh({...u,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}},edgeChangeStarted:e=>{e.modifyingEdge=!0},edgesChanged:(e,t)=>{e.edges=su(t.payload,e.edges)},edgeAdded:(e,t)=>{e.edges=Uh(t.payload,e.edges)},edgeUpdated:(e,t)=>{const{oldEdge:n,newConnection:r}=t.payload;e.edges=Vme(n,r,e.edges)},connectionStarted:(e,t)=>{var l;e.connectionStartParams=t.payload,e.connectionMade=e.modifyingEdge;const{nodeId:n,handleId:r,handleType:i}=t.payload;if(!n||!r)return;const o=e.nodes.findIndex(u=>u.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=i==="source"?a.data.outputs[r]:a.data.inputs[r];e.currentConnectionFieldType=(s==null?void 0:s.type)??null},connectionMade:(e,t)=>{e.currentConnectionFieldType&&(e.edges=Uh({...t.payload,type:"default"},e.edges),e.connectionMade=!0)},connectionEnded:(e,t)=>{var n;if(e.connectionMade)e.connectionStartParams=null,e.currentConnectionFieldType=null;else if(e.mouseOverNode){const r=e.nodes.findIndex(o=>o.id===e.mouseOverNode),i=(n=e.nodes)==null?void 0:n[r];if(i&&e.connectionStartParams){const{nodeId:o,handleId:a,handleType:s}=e.connectionStartParams;if(o&&a&&s&&e.currentConnectionFieldType){const l=b8(i,e.nodes,e.edges,o,a,s,e.currentConnectionFieldType);l&&(e.edges=Uh({...l,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}else e.addNewNodePosition=t.payload.cursorPosition,e.isAddNodePopoverOpen=!0;e.modifyingEdge=!1},workflowExposedFieldAdded:(e,t)=>{e.workflow.exposedFields=g5(e.workflow.exposedFields.concat(t.payload),n=>`${n.nodeId}-${n.fieldName}`)},workflowExposedFieldRemoved:(e,t)=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(n=>!SE(n,t.payload))},fieldLabelChanged:(e,t)=>{const{nodeId:n,fieldName:r,label:i}=t.payload,o=e.nodes.find(s=>s.id===n);if(!on(o))return;const a=o.data.inputs[r];a&&(a.label=i)},nodeEmbedWorkflowChanged:(e,t)=>{var a;const{nodeId:n,embedWorkflow:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.embedWorkflow=r)},nodeUseCacheChanged:(e,t)=>{var a;const{nodeId:n,useCache:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.useCache=r)},nodeIsIntermediateChanged:(e,t)=>{var a;const{nodeId:n,isIntermediate:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.isIntermediate=r)},nodeIsOpenChanged:(e,t)=>{var s;const{nodeId:n,isOpen:r}=t.payload,i=e.nodes.findIndex(l=>l.id===n),o=(s=e.nodes)==null?void 0:s[i];if(!on(o)&&!bI(o)||(o.data.isOpen=r,!on(o)))return;const a=pT([o],e.edges);if(r)a.forEach(l=>{delete l.hidden}),a.forEach(l=>{l.type==="collapsed"&&(e.edges=e.edges.filter(u=>u.id!==l.id))});else{const l=Bme(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),u=Fme(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),c=[];a.forEach(d=>{var f,h;if(d.target===n&&l.find(p=>p.id===d.source)){d.hidden=!0;const p=c.find(g=>g.source===d.source&&g.target===d.target);p?p.data={count:(((f=p.data)==null?void 0:f.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}if(d.source===n&&u.find(p=>p.id===d.target)){const p=c.find(g=>g.source===d.source&&g.target===d.target);d.hidden=!0,p?p.data={count:(((h=p.data)==null?void 0:h.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}}),c.length&&(e.edges=su(c.map(d=>({type:"add",item:d})),e.edges))}},edgeDeleted:(e,t)=>{e.edges=e.edges.filter(n=>n.id!==t.payload)},edgesDeleted:(e,t)=>{const r=t.payload.filter(i=>i.type==="collapsed");if(r.length){const i=[];r.forEach(o=>{e.edges.forEach(a=>{a.source===o.source&&a.target===o.target&&i.push({id:a.id,type:"remove"})})}),e.edges=su(i,e.edges)}},nodesDeleted:(e,t)=>{t.payload.forEach(n=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(r=>r.nodeId!==n.id),on(n)&&delete e.nodeExecutionStates[n.id]})},nodeLabelChanged:(e,t)=>{var a;const{nodeId:n,label:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.label=r)},nodeNotesChanged:(e,t)=>{var a;const{nodeId:n,notes:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.notes=r)},nodeExclusivelySelected:(e,t)=>{const n=t.payload;e.nodes=yu(e.nodes.map(r=>({id:r.id,type:"select",selected:r.id===n})),e.nodes)},selectedNodesChanged:(e,t)=>{e.selectedNodes=t.payload},selectedEdgesChanged:(e,t)=>{e.selectedEdges=t.payload},fieldStringValueChanged:(e,t)=>{Ar(e,t)},fieldNumberValueChanged:(e,t)=>{Ar(e,t)},fieldBooleanValueChanged:(e,t)=>{Ar(e,t)},fieldBoardValueChanged:(e,t)=>{Ar(e,t)},fieldImageValueChanged:(e,t)=>{Ar(e,t)},fieldColorValueChanged:(e,t)=>{Ar(e,t)},fieldMainModelValueChanged:(e,t)=>{Ar(e,t)},fieldRefinerModelValueChanged:(e,t)=>{Ar(e,t)},fieldVaeModelValueChanged:(e,t)=>{Ar(e,t)},fieldLoRAModelValueChanged:(e,t)=>{Ar(e,t)},fieldControlNetModelValueChanged:(e,t)=>{Ar(e,t)},fieldIPAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldT2IAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldEnumModelValueChanged:(e,t)=>{Ar(e,t)},fieldSchedulerValueChanged:(e,t)=>{Ar(e,t)},imageCollectionFieldValueChanged:(e,t)=>{var u,c;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(d=>d.id===n);if(o===-1)return;const a=(u=e.nodes)==null?void 0:u[o];if(!on(a))return;const s=(c=a.data)==null?void 0:c.inputs[r];if(!s)return;const l=Ye(s.value);if(!l){s.value=i;return}s.value=g5(l.concat(i),"image_name")},notesNodeValueChanged:(e,t)=>{var a;const{nodeId:n,value:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];bI(o)&&(o.data.notes=r)},shouldShowFieldTypeLegendChanged:(e,t)=>{e.shouldShowFieldTypeLegend=t.payload},shouldShowMinimapPanelChanged:(e,t)=>{e.shouldShowMinimapPanel=t.payload},nodeTemplatesBuilt:(e,t)=>{e.nodeTemplates=t.payload,e.isReady=!0},nodeEditorReset:e=>{e.nodes=[],e.edges=[],e.workflow=Ye(Y5)},shouldValidateGraphChanged:(e,t)=>{e.shouldValidateGraph=t.payload},shouldAnimateEdgesChanged:(e,t)=>{e.shouldAnimateEdges=t.payload},shouldSnapToGridChanged:(e,t)=>{e.shouldSnapToGrid=t.payload},shouldColorEdgesChanged:(e,t)=>{e.shouldColorEdges=t.payload},nodeOpacityChanged:(e,t)=>{e.nodeOpacity=t.payload},workflowNameChanged:(e,t)=>{e.workflow.name=t.payload},workflowDescriptionChanged:(e,t)=>{e.workflow.description=t.payload},workflowTagsChanged:(e,t)=>{e.workflow.tags=t.payload},workflowAuthorChanged:(e,t)=>{e.workflow.author=t.payload},workflowNotesChanged:(e,t)=>{e.workflow.notes=t.payload},workflowVersionChanged:(e,t)=>{e.workflow.version=t.payload},workflowContactChanged:(e,t)=>{e.workflow.contact=t.payload},workflowLoaded:(e,t)=>{const{nodes:n,edges:r,...i}=t.payload;e.workflow=i,e.nodes=yu(n.map(o=>({item:{...o,dragHandle:`.${xz}`},type:"add"})),[]),e.edges=su(r.map(o=>({item:o,type:"add"})),[]),e.nodeExecutionStates=n.reduce((o,a)=>(o[a.id]={nodeId:a.id,...ow},o),{})},workflowReset:e=>{e.workflow=Ye(Y5)},viewportChanged:(e,t)=>{e.viewport=t.payload},mouseOverFieldChanged:(e,t)=>{e.mouseOverField=t.payload},mouseOverNodeChanged:(e,t)=>{e.mouseOverNode=t.payload},selectedAll:e=>{e.nodes=yu(e.nodes.map(t=>({id:t.id,type:"select",selected:!0})),e.nodes),e.edges=su(e.edges.map(t=>({id:t.id,type:"select",selected:!0})),e.edges)},selectionCopied:e=>{if(e.nodesToCopy=e.nodes.filter(t=>t.selected).map(Ye),e.edgesToCopy=e.edges.filter(t=>t.selected).map(Ye),e.nodesToCopy.length>0){const t={x:0,y:0};e.nodesToCopy.forEach(n=>{const r=.15*(n.width??0),i=.5*(n.height??0);t.x+=n.position.x+r,t.y+=n.position.y+i}),t.x/=e.nodesToCopy.length,t.y/=e.nodesToCopy.length,e.nodesToCopy.forEach(n=>{n.position.x-=t.x,n.position.y-=t.y})}},selectionPasted:(e,t)=>{const{cursorPosition:n}=t.payload,r=e.nodesToCopy.map(Ye),i=r.map(c=>c.data.id),o=e.edgesToCopy.filter(c=>i.includes(c.source)&&i.includes(c.target)).map(Ye);o.forEach(c=>c.selected=!0),r.forEach(c=>{const d=yl();o.forEach(h=>{h.source===c.data.id&&(h.source=d,h.id=h.id.replace(c.data.id,d)),h.target===c.data.id&&(h.target=d,h.id=h.id.replace(c.data.id,d))}),c.selected=!0,c.id=d,c.data.id=d;const f=c8(e.nodes,c.position.x+((n==null?void 0:n.x)??0),c.position.y+((n==null?void 0:n.y)??0));c.position=f});const a=r.map(c=>({item:c,type:"add"})),s=e.nodes.map(c=>({id:c.data.id,type:"select",selected:!1})),l=o.map(c=>({item:c,type:"add"})),u=e.edges.map(c=>({id:c.id,type:"select",selected:!1}));e.nodes=yu(a.concat(s),e.nodes),e.edges=su(l.concat(u),e.edges),r.forEach(c=>{e.nodeExecutionStates[c.id]={nodeId:c.id,...ow}})},addNodePopoverOpened:e=>{e.addNewNodePosition=null,e.isAddNodePopoverOpen=!0},addNodePopoverClosed:e=>{e.isAddNodePopoverOpen=!1,e.connectionStartParams=null,e.currentConnectionFieldType=null},addNodePopoverToggled:e=>{e.isAddNodePopoverOpen=!e.isAddNodePopoverOpen},selectionModeChanged:(e,t)=>{e.selectionMode=t.payload?Rl.Full:Rl.Partial}},extraReducers:e=>{e.addCase(Ig.pending,t=>{t.isReady=!1}),e.addCase(EE,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.IN_PROGRESS)}),e.addCase(AE,(t,n)=>{const{source_node_id:r,result:i}=n.payload.data,o=t.nodeExecutionStates[r];o&&(o.status=wu.COMPLETED,o.progress!==null&&(o.progress=1),o.outputs.push(i))}),e.addCase(i_,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.FAILED,i.error=n.payload.data.error,i.progress=null,i.progressImage=null)}),e.addCase(PE,(t,n)=>{const{source_node_id:r,step:i,total_steps:o,progress_image:a}=n.payload.data,s=t.nodeExecutionStates[r];s&&(s.status=wu.IN_PROGRESS,s.progress=(i+1)/o,s.progressImage=a??null)}),e.addCase(o_,(t,n)=>{["in_progress"].includes(n.payload.data.queue_item.status)&&ps(t.nodeExecutionStates,r=>{r.status=wu.PENDING,r.error=null,r.progress=null,r.progressImage=null,r.outputs=[]})})}}),{addNodePopoverClosed:wVe,addNodePopoverOpened:CVe,addNodePopoverToggled:EVe,connectionEnded:TVe,connectionMade:AVe,connectionStarted:PVe,edgeDeleted:kVe,edgeChangeStarted:IVe,edgesChanged:MVe,edgesDeleted:RVe,edgeUpdated:OVe,fieldBoardValueChanged:$Ve,fieldBooleanValueChanged:NVe,fieldColorValueChanged:DVe,fieldControlNetModelValueChanged:LVe,fieldEnumModelValueChanged:FVe,fieldImageValueChanged:aS,fieldIPAdapterModelValueChanged:BVe,fieldT2IAdapterModelValueChanged:zVe,fieldLabelChanged:VVe,fieldLoRAModelValueChanged:jVe,fieldMainModelValueChanged:UVe,fieldNumberValueChanged:GVe,fieldRefinerModelValueChanged:HVe,fieldSchedulerValueChanged:qVe,fieldStringValueChanged:WVe,fieldVaeModelValueChanged:KVe,imageCollectionFieldValueChanged:XVe,mouseOverFieldChanged:QVe,mouseOverNodeChanged:YVe,nodeAdded:ZVe,nodeReplaced:Oz,nodeEditorReset:cve,nodeEmbedWorkflowChanged:JVe,nodeExclusivelySelected:eje,nodeIsIntermediateChanged:tje,nodeIsOpenChanged:nje,nodeLabelChanged:rje,nodeNotesChanged:ije,nodeOpacityChanged:oje,nodesChanged:aje,nodesDeleted:sje,nodeTemplatesBuilt:$z,nodeUseCacheChanged:lje,notesNodeValueChanged:uje,selectedAll:cje,selectedEdgesChanged:dje,selectedNodesChanged:fje,selectionCopied:hje,selectionModeChanged:pje,selectionPasted:gje,shouldAnimateEdgesChanged:mje,shouldColorEdgesChanged:yje,shouldShowFieldTypeLegendChanged:vje,shouldShowMinimapPanelChanged:bje,shouldSnapToGridChanged:_je,shouldValidateGraphChanged:Sje,viewportChanged:xje,workflowAuthorChanged:wje,workflowContactChanged:Cje,workflowDescriptionChanged:Eje,workflowExposedFieldAdded:dve,workflowExposedFieldRemoved:Tje,workflowLoaded:fve,workflowNameChanged:Aje,workflowNotesChanged:Pje,workflowTagsChanged:kje,workflowVersionChanged:Ije,edgeAdded:Mje}=Rz.actions,hve=Rz.reducer,Nz={esrganModelName:"RealESRGAN_x4plus.pth"},Dz=Wt({name:"postprocessing",initialState:Nz,reducers:{esrganModelNameChanged:(e,t)=>{e.esrganModelName=t.payload}}}),{esrganModelNameChanged:Rje}=Dz.actions,pve=Dz.reducer,Lz={positiveStylePrompt:"",negativeStylePrompt:"",shouldConcatSDXLStylePrompt:!0,shouldUseSDXLRefiner:!1,sdxlImg2ImgDenoisingStrength:.7,refinerModel:null,refinerSteps:20,refinerCFGScale:7.5,refinerScheduler:"euler",refinerPositiveAestheticScore:6,refinerNegativeAestheticScore:2.5,refinerStart:.8},Fz=Wt({name:"sdxl",initialState:Lz,reducers:{setPositiveStylePromptSDXL:(e,t)=>{e.positiveStylePrompt=t.payload},setNegativeStylePromptSDXL:(e,t)=>{e.negativeStylePrompt=t.payload},setShouldConcatSDXLStylePrompt:(e,t)=>{e.shouldConcatSDXLStylePrompt=t.payload},setShouldUseSDXLRefiner:(e,t)=>{e.shouldUseSDXLRefiner=t.payload},setSDXLImg2ImgDenoisingStrength:(e,t)=>{e.sdxlImg2ImgDenoisingStrength=t.payload},refinerModelChanged:(e,t)=>{e.refinerModel=t.payload},setRefinerSteps:(e,t)=>{e.refinerSteps=t.payload},setRefinerCFGScale:(e,t)=>{e.refinerCFGScale=t.payload},setRefinerScheduler:(e,t)=>{e.refinerScheduler=t.payload},setRefinerPositiveAestheticScore:(e,t)=>{e.refinerPositiveAestheticScore=t.payload},setRefinerNegativeAestheticScore:(e,t)=>{e.refinerNegativeAestheticScore=t.payload},setRefinerStart:(e,t)=>{e.refinerStart=t.payload}}}),{setPositiveStylePromptSDXL:Oje,setNegativeStylePromptSDXL:$je,setShouldConcatSDXLStylePrompt:Nje,setShouldUseSDXLRefiner:gve,setSDXLImg2ImgDenoisingStrength:Dje,refinerModelChanged:_8,setRefinerSteps:Lje,setRefinerCFGScale:Fje,setRefinerScheduler:Bje,setRefinerPositiveAestheticScore:zje,setRefinerNegativeAestheticScore:Vje,setRefinerStart:jje}=Fz.actions,mve=Fz.reducer,yve=(e,t,n)=>t===0?0:n===2?Math.floor((e+1+1)/2)/Math.floor((t+1)/2):(e+1+1)/(t+1),vs=e=>typeof e=="string"?{title:e,status:"info",isClosable:!0,duration:2500}:{status:"info",isClosable:!0,duration:2500,...e},Bz={isInitialized:!1,isConnected:!1,shouldConfirmOnDelete:!0,enableImageDebugging:!1,toastQueue:[],denoiseProgress:null,shouldAntialiasProgressImage:!1,consoleLogLevel:"debug",shouldLogToConsole:!0,language:"en",shouldUseNSFWChecker:!1,shouldUseWatermarker:!1,shouldEnableInformationalPopovers:!1,status:"DISCONNECTED"},zz=Wt({name:"system",initialState:Bz,reducers:{setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},consoleLogLevelChanged:(e,t)=>{e.consoleLogLevel=t.payload},shouldLogToConsoleChanged:(e,t)=>{e.shouldLogToConsole=t.payload},shouldAntialiasProgressImageChanged:(e,t)=>{e.shouldAntialiasProgressImage=t.payload},languageChanged:(e,t)=>{e.language=t.payload},shouldUseNSFWCheckerChanged(e,t){e.shouldUseNSFWChecker=t.payload},shouldUseWatermarkerChanged(e,t){e.shouldUseWatermarker=t.payload},setShouldEnableInformationalPopovers(e,t){e.shouldEnableInformationalPopovers=t.payload},isInitializedChanged(e,t){e.isInitialized=t.payload}},extraReducers(e){e.addCase(CE,t=>{t.isConnected=!0,t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(UD,t=>{t.isConnected=!1,t.denoiseProgress=null,t.status="DISCONNECTED"}),e.addCase(EE,t=>{t.denoiseProgress=null,t.status="PROCESSING"}),e.addCase(PE,(t,n)=>{const{step:r,total_steps:i,order:o,progress_image:a,graph_execution_state_id:s,queue_batch_id:l}=n.payload.data;t.denoiseProgress={step:r,total_steps:i,order:o,percentage:yve(r,i,o),progress_image:a,session_id:s,batch_id:l},t.status="PROCESSING"}),e.addCase(AE,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(WD,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(QD,t=>{t.status="LOADING_MODEL"}),e.addCase(ZD,t=>{t.status="CONNECTED"}),e.addCase(o_,(t,n)=>{["completed","canceled","failed"].includes(n.payload.data.queue_item.status)&&(t.status="CONNECTED",t.denoiseProgress=null)}),e.addMatcher(wve,(t,n)=>{t.toastQueue.push(vs({title:X("toast.serverError"),status:"error",description:wE(n.payload.data.error_type)}))})}}),{setShouldConfirmOnDelete:Uje,setEnableImageDebugging:Gje,addToast:it,clearToastQueue:vve,consoleLogLevelChanged:Hje,shouldLogToConsoleChanged:qje,shouldAntialiasProgressImageChanged:Wje,languageChanged:Kje,shouldUseNSFWCheckerChanged:bve,shouldUseWatermarkerChanged:_ve,setShouldEnableInformationalPopovers:Xje,isInitializedChanged:Sve}=zz.actions,xve=zz.reducer,wve=si(i_,eL,nL),Cve={searchFolder:null,advancedAddScanModel:null},Vz=Wt({name:"modelmanager",initialState:Cve,reducers:{setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setAdvancedAddScanModel:(e,t)=>{e.advancedAddScanModel=t.payload}}}),{setSearchFolder:Qje,setAdvancedAddScanModel:Yje}=Vz.actions,Eve=Vz.reducer,jz={shift:!1,ctrl:!1,meta:!1},Uz=Wt({name:"hotkeys",initialState:jz,reducers:{shiftKeyPressed:(e,t)=>{e.shift=t.payload},ctrlKeyPressed:(e,t)=>{e.ctrl=t.payload},metaKeyPressed:(e,t)=>{e.meta=t.payload}}}),{shiftKeyPressed:Zje,ctrlKeyPressed:Jje,metaKeyPressed:eUe}=Uz.actions,Tve=Uz.reducer,Gz={activeTab:"txt2img",shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,shouldHidePreview:!1,shouldShowProgressInViewer:!0,shouldShowEmbeddingPicker:!1,shouldAutoChangeDimensions:!1,favoriteSchedulers:[],globalContextMenuCloseTrigger:0,panels:{}},Hz=Wt({name:"ui",initialState:Gz,reducers:{setActiveTab:(e,t)=>{e.activeTab=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldHidePreview:(e,t)=>{e.shouldHidePreview=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setShouldShowProgressInViewer:(e,t)=>{e.shouldShowProgressInViewer=t.payload},favoriteSchedulersChanged:(e,t)=>{e.favoriteSchedulers=t.payload},toggleEmbeddingPicker:e=>{e.shouldShowEmbeddingPicker=!e.shouldShowEmbeddingPicker},setShouldAutoChangeDimensions:(e,t)=>{e.shouldAutoChangeDimensions=t.payload},contextMenusClosed:e=>{e.globalContextMenuCloseTrigger+=1},panelsChanged:(e,t)=>{e.panels[t.payload.name]=t.payload.value}},extraReducers(e){e.addCase(c_,t=>{t.activeTab="img2img"})}}),{setActiveTab:qz,setShouldShowImageDetails:tUe,setShouldUseCanvasBetaLayout:nUe,setShouldShowExistingModelsInSearch:rUe,setShouldUseSliders:iUe,setShouldHidePreview:oUe,setShouldShowProgressInViewer:aUe,favoriteSchedulersChanged:sUe,toggleEmbeddingPicker:lUe,setShouldAutoChangeDimensions:uUe,contextMenusClosed:cUe,panelsChanged:dUe}=Hz.actions,Ave=Hz.reducer,Pve=pq(iX);Wz=Z5=void 0;var kve=Pve,Ive=function(){var t=[],n=[],r=void 0,i=function(u){return r=u,function(c){return function(d){return kve.compose.apply(void 0,n)(c)(d)}}},o=function(){for(var u,c,d=arguments.length,f=Array(d),h=0;h=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Xz(e,t){if(e){if(typeof e=="string")return x8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x8(e,t)}}function x8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=r.prefix,o=r.driver,a=r.persistWholeStore,s=r.serialize;try{var l=a?Gve:Hve;yield l(t,n,{prefix:i,driver:o,serialize:s})}catch(u){console.warn("redux-remember: persist error",u)}});return function(){return e.apply(this,arguments)}}();function T8(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){n(u);return}s.done?t(l):Promise.resolve(l).then(r,i)}function A8(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(l){T8(o,r,i,a,s,"next",l)}function s(l){T8(o,r,i,a,s,"throw",l)}a(void 0)})}}var Wve=function(){var e=A8(function*(t,n,r){var i=r.prefix,o=r.driver,a=r.serialize,s=r.unserialize,l=r.persistThrottle,u=r.persistDebounce,c=r.persistWholeStore;yield Bve(t,n,{prefix:i,driver:o,unserialize:s,persistWholeStore:c});var d={},f=function(){var h=A8(function*(){var p=Kz(t.getState(),n);yield qve(p,d,{prefix:i,driver:o,serialize:a,persistWholeStore:c}),ST(p,d)||t.dispatch({type:$ve,payload:p}),d=p});return function(){return h.apply(this,arguments)}}();u&&u>0?t.subscribe(Dve(f,u)):t.subscribe(Nve(f,l))});return function(n,r,i){return e.apply(this,arguments)}}();const Kve=Wve;function Mg(e){"@babel/helpers - typeof";return Mg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mg(e)}function P8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lw(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:n.state,i=arguments.length>1?arguments[1]:void 0;i.type&&(i.type==="@@INIT"||i.type.startsWith("@@redux/INIT"))&&(n.state=lw({},r));var o=typeof t=="function"?t:Mf(t);switch(i.type){case J5:{var a=lw(lw({},n.state),i.payload||{});return n.state=o(a,{type:J5,payload:a}),n.state}default:return o(r,i)}}},Jve=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.prefix,o=i===void 0?"@@remember-":i,a=r.serialize,s=a===void 0?function(_,b){return JSON.stringify(_)}:a,l=r.unserialize,u=l===void 0?function(_,b){return JSON.parse(_)}:l,c=r.persistThrottle,d=c===void 0?100:c,f=r.persistDebounce,h=r.persistWholeStore,p=h===void 0?!1:h;if(!t)throw Error("redux-remember error: driver required");if(!Array.isArray(n))throw Error("redux-remember error: rememberedKeys needs to be an array");var g=function(b){return function(y,m,v){var S=b(y,m,v);return Kve(S,n,{driver:t,prefix:o,serialize:s,unserialize:u,persistThrottle:d,persistDebounce:f,persistWholeStore:p}),S}};return g};const fUe=["chakra-ui-color-mode","i18nextLng","ROARR_FILTER","ROARR_LOG"],e1e="@@invokeai-",t1e=["cursorPosition"],n1e=["pendingControlImages"],r1e=["prompts"],i1e=["selection","selectedBoardId","galleryView"],o1e=["nodeTemplates","connectionStartParams","currentConnectionFieldType","selectedNodes","selectedEdges","isReady","nodesToCopy","edgesToCopy","connectionMade","modifyingEdge","addNewNodePosition"],a1e=[],s1e=[],l1e=["isInitialized","isConnected","denoiseProgress","status"],u1e=["shouldShowImageDetails","globalContextMenuCloseTrigger","panels"],c1e={canvas:t1e,gallery:i1e,generation:a1e,nodes:o1e,postprocessing:s1e,system:l1e,ui:u1e,controlNet:n1e,dynamicPrompts:r1e},d1e=(e,t)=>{const n=$f(e,c1e[t]??[]);return JSON.stringify(n)},f1e={canvas:aF,gallery:YF,generation:NE,nodes:Mz,postprocessing:Nz,system:Bz,config:BD,ui:Gz,hotkeys:jz,controlAdapters:m5,dynamicPrompts:QE,sdxl:Lz},h1e=(e,t)=>ID(JSON.parse(e),f1e[t]),p1e=ge("nodes/textToImageGraphBuilt"),g1e=ge("nodes/imageToImageGraphBuilt"),Yz=ge("nodes/canvasGraphBuilt"),m1e=ge("nodes/nodesGraphBuilt"),y1e=si(p1e,g1e,Yz,m1e),v1e=ge("nodes/workflowLoadRequested"),b1e=ge("nodes/updateAllNodesRequested"),_1e=e=>{if(y1e(e)&&e.payload.nodes){const t={};return{...e,payload:{...e.payload,nodes:t}}}return Ig.fulfilled.match(e)?{...e,payload:""}:$z.match(e)?{...e,payload:""}:e},S1e=["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine","socket/socketGeneratorProgress","socket/appSocketGeneratorProgress","@@REMEMBER_PERSISTED"],x1e=e=>e,w1e=si(kle,Ile),C1e=()=>{pe({matcher:w1e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{batchIds:o}=i.canvas;try{const a=t(un.endpoints.cancelByBatchIds.initiate({batch_ids:o},{fixedCacheKey:"cancelByBatchIds"})),{canceled:s}=await a.unwrap();a.reset(),s>0&&(r.debug(`Canceled ${s} canvas batches`),t(it({title:X("queue.cancelBatchSucceeded"),status:"success"}))),t($le())}catch{r.error("Failed to cancel canvas batches"),t(it({title:X("queue.cancelBatchFailed"),status:"error"}))}}})};ge("app/appStarted");const E1e=()=>{pe({matcher:ce.endpoints.listImages.matchFulfilled,effect:async(e,{dispatch:t,unsubscribe:n,cancelActiveListeners:r})=>{if(e.meta.arg.queryCacheKey!==Vi({board_id:"none",categories:Fn}))return;r(),n();const i=e.payload;if(i.ids.length>0){const o=Ft.getSelectors().selectAll(i)[0];t(pa(o??null))}}})},T1e=()=>{pe({matcher:un.endpoints.enqueueBatch.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{data:r}=un.endpoints.getQueueStatus.select()(n());!r||r.processor.is_started||t(un.endpoints.resumeProcessor.initiate(void 0,{fixedCacheKey:"resumeProcessor"}))}})},Zz=Do.injectEndpoints({endpoints:e=>({getAppVersion:e.query({query:()=>({url:"app/version",method:"GET"}),providesTags:["AppVersion"],keepUnusedDataFor:864e5}),getAppConfig:e.query({query:()=>({url:"app/config",method:"GET"}),providesTags:["AppConfig"],keepUnusedDataFor:864e5}),getInvocationCacheStatus:e.query({query:()=>({url:"app/invocation_cache/status",method:"GET"}),providesTags:["InvocationCacheStatus"]}),clearInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache",method:"DELETE"}),invalidatesTags:["InvocationCacheStatus"]}),enableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/enable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]}),disableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/disable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]})})}),{useGetAppVersionQuery:hUe,useGetAppConfigQuery:pUe,useClearInvocationCacheMutation:gUe,useDisableInvocationCacheMutation:mUe,useEnableInvocationCacheMutation:yUe,useGetInvocationCacheStatusQuery:vUe}=Zz,A1e=()=>{pe({matcher:Zz.endpoints.getAppConfig.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const{infill_methods:r=[],nsfw_methods:i=[],watermarking_methods:o=[]}=e.payload,a=t().generation.infillMethod;r.includes(a)||n(lae(r[0])),i.includes("nsfw_checker")||n(bve(!1)),o.includes("invisible_watermark")||n(_ve(!1))}})},P1e=ge("app/appStarted"),k1e=()=>{pe({actionCreator:P1e,effect:async(e,{unsubscribe:t,cancelActiveListeners:n})=>{n(),t()}})};function I1e(e){if(e.sheet)return e.sheet;for(var t=0;t0?ir(Lf,--oi):0,_f--,wn===10&&(_f=1,uS--),wn}function Si(){return wn=oi2||Og(wn)>3?"":" "}function U1e(e,t){for(;--t&&Si()&&!(wn<48||wn>102||wn>57&&wn<65||wn>70&&wn<97););return Im(e,Yy()+(t<6&&ma()==32&&Si()==32))}function n3(e){for(;Si();)switch(wn){case e:return oi;case 34:case 39:e!==34&&e!==39&&n3(wn);break;case 40:e===41&&n3(e);break;case 92:Si();break}return oi}function G1e(e,t){for(;Si()&&e+wn!==47+10;)if(e+wn===42+42&&ma()===47)break;return"/*"+Im(t,oi-1)+"*"+lS(e===47?e:Si())}function H1e(e){for(;!Og(ma());)Si();return Im(e,oi)}function q1e(e){return iV(Jy("",null,null,null,[""],e=rV(e),0,[0],e))}function Jy(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,p=0,g=1,_=1,b=1,y=0,m="",v=i,S=o,w=r,C=m;_;)switch(p=y,y=Si()){case 40:if(p!=108&&ir(C,d-1)==58){t3(C+=ht(Zy(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:C+=Zy(y);break;case 9:case 10:case 13:case 32:C+=j1e(p);break;case 92:C+=U1e(Yy()-1,7);continue;case 47:switch(ma()){case 42:case 47:W0(W1e(G1e(Si(),Yy()),t,n),l);break;default:C+="/"}break;case 123*g:s[u++]=ta(C)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+c:b==-1&&(C=ht(C,/\f/g,"")),h>0&&ta(C)-d&&W0(h>32?I8(C+";",r,n,d-1):I8(ht(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(W0(w=k8(C,t,n,u,c,i,s,m,v=[],S=[],d),o),y===123)if(c===0)Jy(C,t,w,w,v,o,d,s,S);else switch(f===99&&ir(C,3)===110?100:f){case 100:case 108:case 109:case 115:Jy(e,w,w,r&&W0(k8(e,w,w,0,0,i,s,m,i,v=[],d),S),i,S,d,s,r?v:S);break;default:Jy(C,w,w,w,[""],S,0,s,S)}}u=c=h=0,g=b=1,m=C="",d=a;break;case 58:d=1+ta(C),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&V1e()==125)continue}switch(C+=lS(y),y*g){case 38:b=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(ta(C)-1)*b,b=1;break;case 64:ma()===45&&(C+=Zy(Si())),f=ma(),c=d=ta(m=C+=H1e(Yy())),y++;break;case 45:p===45&&ta(C)==2&&(g=0)}}return o}function k8(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,f=i===0?o:[""],h=CT(f),p=0,g=0,_=0;p0?f[b]+" "+y:ht(y,/&\f/g,f[b])))&&(l[_++]=m);return cS(e,t,n,i===0?xT:s,l,u,c)}function W1e(e,t,n){return cS(e,t,n,Jz,lS(z1e()),Rg(e,2,-2),0)}function I8(e,t,n,r){return cS(e,t,n,wT,Rg(e,0,r),Rg(e,r+1,-1),r)}function zd(e,t){for(var n="",r=CT(e),i=0;i6)switch(ir(e,t+1)){case 109:if(ir(e,t+4)!==45)break;case 102:return ht(e,/(.+:)(.+)-([^]+)/,"$1"+ft+"$2-$3$1"+U1+(ir(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~t3(e,"stretch")?aV(ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ir(e,t+1)!==115)break;case 6444:switch(ir(e,ta(e)-3-(~t3(e,"!important")&&10))){case 107:return ht(e,":",":"+ft)+e;case 101:return ht(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ft+(ir(e,14)===45?"inline-":"")+"box$3$1"+ft+"$2$3$1"+hr+"$2box$3")+e}break;case 5936:switch(ir(e,t+11)){case 114:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ft+e+hr+ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ft+e+hr+e+e}return e}var nbe=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case wT:t.return=aV(t.value,t.length);break;case eV:return zd([yh(t,{value:ht(t.value,"@","@"+ft)})],i);case xT:if(t.length)return B1e(t.props,function(o){switch(F1e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zd([yh(t,{props:[ht(o,/:(read-\w+)/,":"+U1+"$1")]})],i);case"::placeholder":return zd([yh(t,{props:[ht(o,/:(plac\w+)/,":"+ft+"input-$1")]}),yh(t,{props:[ht(o,/:(plac\w+)/,":"+U1+"$1")]}),yh(t,{props:[ht(o,/:(plac\w+)/,hr+"input-$1")]})],i)}return""})}},rbe=[nbe],ibe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var _=g.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||rbe,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var _=g.getAttribute("data-emotion").split(" "),b=1;b<_.length;b++)o[_[b]]=!0;s.push(g)});var l,u=[ebe,tbe];{var c,d=[K1e,Q1e(function(g){c.insert(g)})],f=X1e(u.concat(i,d)),h=function(_){return zd(q1e(_),f)};l=function(_,b,y,m){c=y,h(_?_+"{"+b.styles+"}":b.styles),m&&(p.inserted[b.name]=!0)}}var p={key:n,sheet:new R1e({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(s),p},obe=!0;function abe(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var sV=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||obe===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},lV=function(t,n,r){sV(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function sbe(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lbe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ube=/[A-Z]|^ms/g,cbe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uV=function(t){return t.charCodeAt(1)===45},O8=function(t){return t!=null&&typeof t!="boolean"},uw=oV(function(e){return uV(e)?e:e.replace(ube,"-$&").toLowerCase()}),$8=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(cbe,function(r,i,o){return na={name:i,styles:o,next:na},i})}return lbe[t]!==1&&!uV(t)&&typeof n=="number"&&n!==0?n+"px":n};function $g(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return na={name:n.name,styles:n.styles,next:na},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)na={name:r.name,styles:r.styles,next:na},r=r.next;var i=n.styles+";";return i}return dbe(e,t,n)}case"function":{if(e!==void 0){var o=na,a=n(e);return na=o,$g(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function dbe(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ioe.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Tbe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=k.useState(null),o=k.useRef(null),[,a]=k.useState({});k.useEffect(()=>a({}),[]);const s=wbe(),l=Sbe();G1(()=>{if(!r)return;const c=r.ownerDocument,d=t?s??c.body:c.body;if(!d)return;o.current=c.createElement("div"),o.current.className=TT,d.appendChild(o.current),a({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const u=l!=null&&l.zIndex?oe.jsx(Ebe,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?mi.createPortal(oe.jsx(pV,{value:o.current,children:u}),o.current):oe.jsx("span",{ref:c=>{c&&i(c)}})},Abe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=k.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=TT),l},[i]),[,s]=k.useState({});return G1(()=>s({}),[]),G1(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?mi.createPortal(oe.jsx(pV,{value:r?a:null,children:t}),a):null};function dS(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?oe.jsx(Abe,{containerRef:n,...r}):oe.jsx(Tbe,{...r})}dS.className=TT;dS.selector=Cbe;dS.displayName="Portal";function gV(){const e=k.useContext(Ng);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var AT=k.createContext({});AT.displayName="ColorModeContext";function fS(){const e=k.useContext(AT);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function bUe(e,t){const{colorMode:n}=fS();return n==="dark"?t:e}function mV(){const e=fS(),t=gV();return{...e,theme:t}}function Pbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function kbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function _Ue(e,t,n){const r=gV();return Ibe(e,t,n)(r)}function Ibe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{var c,d;if(e==="breakpoints")return Pbe(o,l,(c=a[u])!=null?c:l);const f=`${e}.${l}`;return kbe(o,f,(d=a[u])!=null?d:l)});return Array.isArray(t)?s:s[0]}}var Kl=(...e)=>e.filter(Boolean).join(" ");function Mbe(){return!1}function ya(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var SUe=e=>{const{condition:t,message:n}=e;t&&Mbe()&&console.warn(n)};function ua(e,...t){return Rbe(e)?e(...t):e}var Rbe=e=>typeof e=="function",xUe=e=>e?"":void 0,wUe=e=>e?!0:void 0;function CUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function EUe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var H1={exports:{}};H1.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",_="[object Number]",b="[object Null]",y="[object Object]",m="[object Proxy]",v="[object RegExp]",S="[object Set]",w="[object String]",C="[object Undefined]",x="[object WeakMap]",P="[object ArrayBuffer]",E="[object DataView]",I="[object Float32Array]",N="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",$="[object Uint16Array]",L="[object Uint32Array]",O=/[\\^$.*+?()[\]{}|]/g,B=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,j={};j[I]=j[N]=j[M]=j[T]=j[A]=j[R]=j[D]=j[$]=j[L]=!0,j[s]=j[l]=j[P]=j[c]=j[E]=j[d]=j[f]=j[h]=j[g]=j[_]=j[y]=j[v]=j[S]=j[w]=j[x]=!1;var q=typeof He=="object"&&He&&He.Object===Object&&He,Y=typeof self=="object"&&self&&self.Object===Object&&self,Z=q||Y||Function("return this")(),V=t&&!t.nodeType&&t,K=V&&!0&&e&&!e.nodeType&&e,ee=K&&K.exports===V,re=ee&&q.process,fe=function(){try{var z=K&&K.require&&K.require("util").types;return z||re&&re.binding&&re.binding("util")}catch{}}(),Se=fe&&fe.isTypedArray;function Me(z,G,Q){switch(Q.length){case 0:return z.call(G);case 1:return z.call(G,Q[0]);case 2:return z.call(G,Q[0],Q[1]);case 3:return z.call(G,Q[0],Q[1],Q[2])}return z.apply(G,Q)}function De(z,G){for(var Q=-1,me=Array(z);++Q-1}function Oa(z,G){var Q=this.__data__,me=Ec(Q,z);return me<0?(++this.size,Q.push([z,G])):Q[me][1]=G,this}Zn.prototype.clear=Ra,Zn.prototype.delete=Is,Zn.prototype.get=Ms,Zn.prototype.has=Cc,Zn.prototype.set=Oa;function Er(z){var G=-1,Q=z==null?0:z.length;for(this.clear();++G1?Q[nt-1]:void 0,jt=nt>2?Q[2]:void 0;for(Ct=z.length>3&&typeof Ct=="function"?(nt--,Ct):void 0,jt&&YH(Q[0],Q[1],jt)&&(Ct=nt<3?void 0:Ct,nt=1),G=Object(G);++me-1&&z%1==0&&z0){if(++G>=i)return arguments[0]}else G=0;return z.apply(void 0,arguments)}}function oq(z){if(z!=null){try{return xt.call(z)}catch{}try{return z+""}catch{}}return""}function e0(z,G){return z===G||z!==z&&G!==G}var G2=Zm(function(){return arguments}())?Zm:function(z){return Zf(z)&&bn.call(z,"callee")&&!fo.call(z,"callee")},H2=Array.isArray;function q2(z){return z!=null&&KA(z.length)&&!W2(z)}function aq(z){return Zf(z)&&q2(z)}var WA=tu||dq;function W2(z){if(!iu(z))return!1;var G=Ac(z);return G==h||G==p||G==u||G==m}function KA(z){return typeof z=="number"&&z>-1&&z%1==0&&z<=a}function iu(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function Zf(z){return z!=null&&typeof z=="object"}function sq(z){if(!Zf(z)||Ac(z)!=y)return!1;var G=li(z);if(G===null)return!0;var Q=bn.call(G,"constructor")&&G.constructor;return typeof Q=="function"&&Q instanceof Q&&xt.call(Q)==Mi}var XA=Se?Ee(Se):LH;function lq(z){return qH(z,QA(z))}function QA(z){return q2(z)?B2(z,!0):FH(z)}var uq=WH(function(z,G,Q,me){GA(z,G,Q,me)});function cq(z){return function(){return z}}function YA(z){return z}function dq(){return!1}e.exports=uq})(H1,H1.exports);var Obe=H1.exports;const ca=Bl(Obe);var $be=e=>/!(important)?$/.test(e),L8=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Nbe=(e,t)=>n=>{const r=String(t),i=$be(r),o=L8(r),a=e?`${e}.${o}`:o;let s=ya(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=L8(s),i?`${s} !important`:s};function PT(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var s;const l=Nbe(t,o)(a);let u=(s=n==null?void 0:n(l,a))!=null?s:l;return r&&(u=r(u,a)),u}}var K0=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Di(e,t){return n=>{const r={property:n,scale:e};return r.transform=PT({scale:e,transform:t}),r}}var Dbe=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Lbe(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Dbe(t),transform:n?PT({scale:n,compose:r}):r}}var yV=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Fbe(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...yV].join(" ")}function Bbe(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...yV].join(" ")}var zbe={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Vbe={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function jbe(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Ube={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},r3={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Gbe=new Set(Object.values(r3)),i3=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Hbe=e=>e.trim();function qbe(e,t){if(e==null||i3.has(e))return e;if(!(o3(e)||i3.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=a.split(",").map(Hbe).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in r3?r3[l]:l;u.unshift(c);const d=u.map(f=>{if(Gbe.has(f))return f;const h=f.indexOf(" "),[p,g]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],_=o3(g)?g:g&&g.split(" "),b=`colors.${p}`,y=b in t.__cssMap?t.__cssMap[b].varRef:p;return _?[y,...Array.isArray(_)?_:[_]].join(" "):y});return`${s}(${d.join(", ")})`}var o3=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),Wbe=(e,t)=>qbe(e,t??{});function Kbe(e){return/^var\(--.+\)$/.test(e)}var Xbe=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},qo=e=>t=>`${e}(${t})`,Je={filter(e){return e!=="auto"?e:zbe},backdropFilter(e){return e!=="auto"?e:Vbe},ring(e){return jbe(Je.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Fbe():e==="auto-gpu"?Bbe():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Xbe(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(Kbe(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:Wbe,blur:qo("blur"),opacity:qo("opacity"),brightness:qo("brightness"),contrast:qo("contrast"),dropShadow:qo("drop-shadow"),grayscale:qo("grayscale"),hueRotate:e=>qo("hue-rotate")(Je.degree(e)),invert:qo("invert"),saturate:qo("saturate"),sepia:qo("sepia"),bgImage(e){return e==null||o3(e)||i3.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=Ube[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},H={borderWidths:Di("borderWidths"),borderStyles:Di("borderStyles"),colors:Di("colors"),borders:Di("borders"),gradients:Di("gradients",Je.gradient),radii:Di("radii",Je.px),space:Di("space",K0(Je.vh,Je.px)),spaceT:Di("space",K0(Je.vh,Je.px)),degreeT(e){return{property:e,transform:Je.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:PT({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Di("sizes",K0(Je.vh,Je.px)),sizesT:Di("sizes",K0(Je.vh,Je.fraction)),shadows:Di("shadows"),logical:Lbe,blur:Di("blur",Je.blur)},ev={background:H.colors("background"),backgroundColor:H.colors("backgroundColor"),backgroundImage:H.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Je.bgClip},bgSize:H.prop("backgroundSize"),bgPosition:H.prop("backgroundPosition"),bg:H.colors("background"),bgColor:H.colors("backgroundColor"),bgPos:H.prop("backgroundPosition"),bgRepeat:H.prop("backgroundRepeat"),bgAttachment:H.prop("backgroundAttachment"),bgGradient:H.gradients("backgroundImage"),bgClip:{transform:Je.bgClip}};Object.assign(ev,{bgImage:ev.backgroundImage,bgImg:ev.backgroundImage});var dt={border:H.borders("border"),borderWidth:H.borderWidths("borderWidth"),borderStyle:H.borderStyles("borderStyle"),borderColor:H.colors("borderColor"),borderRadius:H.radii("borderRadius"),borderTop:H.borders("borderTop"),borderBlockStart:H.borders("borderBlockStart"),borderTopLeftRadius:H.radii("borderTopLeftRadius"),borderStartStartRadius:H.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:H.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:H.radii("borderTopRightRadius"),borderStartEndRadius:H.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:H.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:H.borders("borderRight"),borderInlineEnd:H.borders("borderInlineEnd"),borderBottom:H.borders("borderBottom"),borderBlockEnd:H.borders("borderBlockEnd"),borderBottomLeftRadius:H.radii("borderBottomLeftRadius"),borderBottomRightRadius:H.radii("borderBottomRightRadius"),borderLeft:H.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:H.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:H.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:H.borders(["borderLeft","borderRight"]),borderInline:H.borders("borderInline"),borderY:H.borders(["borderTop","borderBottom"]),borderBlock:H.borders("borderBlock"),borderTopWidth:H.borderWidths("borderTopWidth"),borderBlockStartWidth:H.borderWidths("borderBlockStartWidth"),borderTopColor:H.colors("borderTopColor"),borderBlockStartColor:H.colors("borderBlockStartColor"),borderTopStyle:H.borderStyles("borderTopStyle"),borderBlockStartStyle:H.borderStyles("borderBlockStartStyle"),borderBottomWidth:H.borderWidths("borderBottomWidth"),borderBlockEndWidth:H.borderWidths("borderBlockEndWidth"),borderBottomColor:H.colors("borderBottomColor"),borderBlockEndColor:H.colors("borderBlockEndColor"),borderBottomStyle:H.borderStyles("borderBottomStyle"),borderBlockEndStyle:H.borderStyles("borderBlockEndStyle"),borderLeftWidth:H.borderWidths("borderLeftWidth"),borderInlineStartWidth:H.borderWidths("borderInlineStartWidth"),borderLeftColor:H.colors("borderLeftColor"),borderInlineStartColor:H.colors("borderInlineStartColor"),borderLeftStyle:H.borderStyles("borderLeftStyle"),borderInlineStartStyle:H.borderStyles("borderInlineStartStyle"),borderRightWidth:H.borderWidths("borderRightWidth"),borderInlineEndWidth:H.borderWidths("borderInlineEndWidth"),borderRightColor:H.colors("borderRightColor"),borderInlineEndColor:H.colors("borderInlineEndColor"),borderRightStyle:H.borderStyles("borderRightStyle"),borderInlineEndStyle:H.borderStyles("borderInlineEndStyle"),borderTopRadius:H.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:H.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:H.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:H.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(dt,{rounded:dt.borderRadius,roundedTop:dt.borderTopRadius,roundedTopLeft:dt.borderTopLeftRadius,roundedTopRight:dt.borderTopRightRadius,roundedTopStart:dt.borderStartStartRadius,roundedTopEnd:dt.borderStartEndRadius,roundedBottom:dt.borderBottomRadius,roundedBottomLeft:dt.borderBottomLeftRadius,roundedBottomRight:dt.borderBottomRightRadius,roundedBottomStart:dt.borderEndStartRadius,roundedBottomEnd:dt.borderEndEndRadius,roundedLeft:dt.borderLeftRadius,roundedRight:dt.borderRightRadius,roundedStart:dt.borderInlineStartRadius,roundedEnd:dt.borderInlineEndRadius,borderStart:dt.borderInlineStart,borderEnd:dt.borderInlineEnd,borderTopStartRadius:dt.borderStartStartRadius,borderTopEndRadius:dt.borderStartEndRadius,borderBottomStartRadius:dt.borderEndStartRadius,borderBottomEndRadius:dt.borderEndEndRadius,borderStartRadius:dt.borderInlineStartRadius,borderEndRadius:dt.borderInlineEndRadius,borderStartWidth:dt.borderInlineStartWidth,borderEndWidth:dt.borderInlineEndWidth,borderStartColor:dt.borderInlineStartColor,borderEndColor:dt.borderInlineEndColor,borderStartStyle:dt.borderInlineStartStyle,borderEndStyle:dt.borderInlineEndStyle});var Qbe={color:H.colors("color"),textColor:H.colors("color"),fill:H.colors("fill"),stroke:H.colors("stroke")},a3={boxShadow:H.shadows("boxShadow"),mixBlendMode:!0,blendMode:H.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:H.prop("backgroundBlendMode"),opacity:!0};Object.assign(a3,{shadow:a3.boxShadow});var Ybe={filter:{transform:Je.filter},blur:H.blur("--chakra-blur"),brightness:H.propT("--chakra-brightness",Je.brightness),contrast:H.propT("--chakra-contrast",Je.contrast),hueRotate:H.propT("--chakra-hue-rotate",Je.hueRotate),invert:H.propT("--chakra-invert",Je.invert),saturate:H.propT("--chakra-saturate",Je.saturate),dropShadow:H.propT("--chakra-drop-shadow",Je.dropShadow),backdropFilter:{transform:Je.backdropFilter},backdropBlur:H.blur("--chakra-backdrop-blur"),backdropBrightness:H.propT("--chakra-backdrop-brightness",Je.brightness),backdropContrast:H.propT("--chakra-backdrop-contrast",Je.contrast),backdropHueRotate:H.propT("--chakra-backdrop-hue-rotate",Je.hueRotate),backdropInvert:H.propT("--chakra-backdrop-invert",Je.invert),backdropSaturate:H.propT("--chakra-backdrop-saturate",Je.saturate)},q1={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Je.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:H.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:H.space("gap"),rowGap:H.space("rowGap"),columnGap:H.space("columnGap")};Object.assign(q1,{flexDir:q1.flexDirection});var vV={gridGap:H.space("gridGap"),gridColumnGap:H.space("gridColumnGap"),gridRowGap:H.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Zbe={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Je.outline},outlineOffset:!0,outlineColor:H.colors("outlineColor")},Bi={width:H.sizesT("width"),inlineSize:H.sizesT("inlineSize"),height:H.sizes("height"),blockSize:H.sizes("blockSize"),boxSize:H.sizes(["width","height"]),minWidth:H.sizes("minWidth"),minInlineSize:H.sizes("minInlineSize"),minHeight:H.sizes("minHeight"),minBlockSize:H.sizes("minBlockSize"),maxWidth:H.sizes("maxWidth"),maxInlineSize:H.sizes("maxInlineSize"),maxHeight:H.sizes("maxHeight"),maxBlockSize:H.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:H.propT("float",Je.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Bi,{w:Bi.width,h:Bi.height,minW:Bi.minWidth,maxW:Bi.maxWidth,minH:Bi.minHeight,maxH:Bi.maxHeight,overscroll:Bi.overscrollBehavior,overscrollX:Bi.overscrollBehaviorX,overscrollY:Bi.overscrollBehaviorY});var Jbe={listStyleType:!0,listStylePosition:!0,listStylePos:H.prop("listStylePosition"),listStyleImage:!0,listStyleImg:H.prop("listStyleImage")};function e_e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},n_e=t_e(e_e),r_e={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},i_e={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},cw=(e,t,n)=>{const r={},i=n_e(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},o_e={srOnly:{transform(e){return e===!0?r_e:e==="focusable"?i_e:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>cw(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>cw(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>cw(t,e,n)}},gp={position:!0,pos:H.prop("position"),zIndex:H.prop("zIndex","zIndices"),inset:H.spaceT("inset"),insetX:H.spaceT(["left","right"]),insetInline:H.spaceT("insetInline"),insetY:H.spaceT(["top","bottom"]),insetBlock:H.spaceT("insetBlock"),top:H.spaceT("top"),insetBlockStart:H.spaceT("insetBlockStart"),bottom:H.spaceT("bottom"),insetBlockEnd:H.spaceT("insetBlockEnd"),left:H.spaceT("left"),insetInlineStart:H.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:H.spaceT("right"),insetInlineEnd:H.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(gp,{insetStart:gp.insetInlineStart,insetEnd:gp.insetInlineEnd});var a_e={ring:{transform:Je.ring},ringColor:H.colors("--chakra-ring-color"),ringOffset:H.prop("--chakra-ring-offset-width"),ringOffsetColor:H.colors("--chakra-ring-offset-color"),ringInset:H.prop("--chakra-ring-inset")},Lt={margin:H.spaceT("margin"),marginTop:H.spaceT("marginTop"),marginBlockStart:H.spaceT("marginBlockStart"),marginRight:H.spaceT("marginRight"),marginInlineEnd:H.spaceT("marginInlineEnd"),marginBottom:H.spaceT("marginBottom"),marginBlockEnd:H.spaceT("marginBlockEnd"),marginLeft:H.spaceT("marginLeft"),marginInlineStart:H.spaceT("marginInlineStart"),marginX:H.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:H.spaceT("marginInline"),marginY:H.spaceT(["marginTop","marginBottom"]),marginBlock:H.spaceT("marginBlock"),padding:H.space("padding"),paddingTop:H.space("paddingTop"),paddingBlockStart:H.space("paddingBlockStart"),paddingRight:H.space("paddingRight"),paddingBottom:H.space("paddingBottom"),paddingBlockEnd:H.space("paddingBlockEnd"),paddingLeft:H.space("paddingLeft"),paddingInlineStart:H.space("paddingInlineStart"),paddingInlineEnd:H.space("paddingInlineEnd"),paddingX:H.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:H.space("paddingInline"),paddingY:H.space(["paddingTop","paddingBottom"]),paddingBlock:H.space("paddingBlock")};Object.assign(Lt,{m:Lt.margin,mt:Lt.marginTop,mr:Lt.marginRight,me:Lt.marginInlineEnd,marginEnd:Lt.marginInlineEnd,mb:Lt.marginBottom,ml:Lt.marginLeft,ms:Lt.marginInlineStart,marginStart:Lt.marginInlineStart,mx:Lt.marginX,my:Lt.marginY,p:Lt.padding,pt:Lt.paddingTop,py:Lt.paddingY,px:Lt.paddingX,pb:Lt.paddingBottom,pl:Lt.paddingLeft,ps:Lt.paddingInlineStart,paddingStart:Lt.paddingInlineStart,pr:Lt.paddingRight,pe:Lt.paddingInlineEnd,paddingEnd:Lt.paddingInlineEnd});var s_e={textDecorationColor:H.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:H.shadows("textShadow")},l_e={clipPath:!0,transform:H.propT("transform",Je.transform),transformOrigin:!0,translateX:H.spaceT("--chakra-translate-x"),translateY:H.spaceT("--chakra-translate-y"),skewX:H.degreeT("--chakra-skew-x"),skewY:H.degreeT("--chakra-skew-y"),scaleX:H.prop("--chakra-scale-x"),scaleY:H.prop("--chakra-scale-y"),scale:H.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:H.degreeT("--chakra-rotate")},u_e={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:H.prop("transitionDuration","transition.duration"),transitionProperty:H.prop("transitionProperty","transition.property"),transitionTimingFunction:H.prop("transitionTimingFunction","transition.easing")},c_e={fontFamily:H.prop("fontFamily","fonts"),fontSize:H.prop("fontSize","fontSizes",Je.px),fontWeight:H.prop("fontWeight","fontWeights"),lineHeight:H.prop("lineHeight","lineHeights"),letterSpacing:H.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},d_e={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:H.spaceT("scrollMargin"),scrollMarginTop:H.spaceT("scrollMarginTop"),scrollMarginBottom:H.spaceT("scrollMarginBottom"),scrollMarginLeft:H.spaceT("scrollMarginLeft"),scrollMarginRight:H.spaceT("scrollMarginRight"),scrollMarginX:H.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:H.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:H.spaceT("scrollPadding"),scrollPaddingTop:H.spaceT("scrollPaddingTop"),scrollPaddingBottom:H.spaceT("scrollPaddingBottom"),scrollPaddingLeft:H.spaceT("scrollPaddingLeft"),scrollPaddingRight:H.spaceT("scrollPaddingRight"),scrollPaddingX:H.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:H.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function bV(e){return ya(e)&&e.reference?e.reference:String(e)}var hS=(e,...t)=>t.map(bV).join(` ${e} `).replace(/calc/g,""),F8=(...e)=>`calc(${hS("+",...e)})`,B8=(...e)=>`calc(${hS("-",...e)})`,s3=(...e)=>`calc(${hS("*",...e)})`,z8=(...e)=>`calc(${hS("/",...e)})`,V8=e=>{const t=bV(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:s3(t,-1)},Cu=Object.assign(e=>({add:(...t)=>Cu(F8(e,...t)),subtract:(...t)=>Cu(B8(e,...t)),multiply:(...t)=>Cu(s3(e,...t)),divide:(...t)=>Cu(z8(e,...t)),negate:()=>Cu(V8(e)),toString:()=>e.toString()}),{add:F8,subtract:B8,multiply:s3,divide:z8,negate:V8});function f_e(e,t="-"){return e.replace(/\s+/g,t)}function h_e(e){const t=f_e(e.toString());return g_e(p_e(t))}function p_e(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function g_e(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function m_e(e,t=""){return[t,e].filter(Boolean).join("-")}function y_e(e,t){return`var(${e}${t?`, ${t}`:""})`}function v_e(e,t=""){return h_e(`--${m_e(e,t)}`)}function ke(e,t,n){const r=v_e(e,n);return{variable:r,reference:y_e(r,t)}}function b_e(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=ke(`${e}-${i}`,o);continue}n[r]=ke(`${e}-${r}`)}return n}function __e(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function S_e(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function l3(e){if(e==null)return e;const{unitless:t}=S_e(e);return t||typeof e=="number"?`${e}px`:e}var _V=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,kT=e=>Object.fromEntries(Object.entries(e).sort(_V));function j8(e){const t=kT(e);return Object.assign(Object.values(t),t)}function x_e(e){const t=Object.keys(kT(e));return new Set(t)}function U8(e){var t;if(!e)return e;e=(t=l3(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function qh(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${l3(e)})`),t&&n.push("and",`(max-width: ${l3(t)})`),n.join(" ")}function w_e(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=j8(e),r=Object.entries(e).sort(_V).map(([a,s],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?U8(d):void 0,{_minW:U8(s),breakpoint:a,minW:s,maxW:d,maxWQuery:qh(null,d),minWQuery:qh(s),minMaxQuery:qh(s,d)}}),i=x_e(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>i.has(l))},asObject:kT(e),asArray:j8(e),details:r,get(a){return r.find(s=>s.breakpoint===a)},media:[null,...n.map(a=>qh(a)).slice(1)],toArrayValue(a){if(!ya(a))throw new Error("toArrayValue: value must be an object");const s=o.map(l=>{var u;return(u=a[l])!=null?u:null});for(;__e(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=o[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var Jn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ds=e=>SV(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Da=e=>SV(t=>e(t,"~ &"),"[data-peer]",".peer"),SV=(e,...t)=>t.map(e).join(", "),pS={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ds(Jn.hover),_peerHover:Da(Jn.hover),_groupFocus:Ds(Jn.focus),_peerFocus:Da(Jn.focus),_groupFocusVisible:Ds(Jn.focusVisible),_peerFocusVisible:Da(Jn.focusVisible),_groupActive:Ds(Jn.active),_peerActive:Da(Jn.active),_groupDisabled:Ds(Jn.disabled),_peerDisabled:Da(Jn.disabled),_groupInvalid:Ds(Jn.invalid),_peerInvalid:Da(Jn.invalid),_groupChecked:Ds(Jn.checked),_peerChecked:Da(Jn.checked),_groupFocusWithin:Ds(Jn.focusWithin),_peerFocusWithin:Da(Jn.focusWithin),_peerPlaceholderShown:Da(Jn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},xV=Object.keys(pS);function G8(e,t){return ke(String(e).replace(/\./g,"-"),void 0,t)}function C_e(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=G8(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,g=`${h}.-${p.join(".")}`,_=Cu.negate(s),b=Cu.negate(u);r[g]={value:_,var:l,varRef:b}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const c=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:_}=G8(p,t==null?void 0:t.cssVarPrefix);return _},d=ya(s)?s:{default:s};n=ca(n,Object.entries(d).reduce((f,[h,p])=>{var g,_;if(!p)return f;const b=c(`${p}`);if(h==="default")return f[l]=b,f;const y=(_=(g=pS)==null?void 0:g[h])!=null?_:h;return f[y]={[l]:b},f},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function E_e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function T_e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function A_e(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function H8(e,t,n={}){const{stop:r,getKey:i}=n;function o(a,s=[]){var l;if(A_e(a)||Array.isArray(a)){const u={};for(const[c,d]of Object.entries(a)){const f=(l=i==null?void 0:i(c))!=null?l:c,h=[...s,f];if(r!=null&&r(a,h))return t(a,s);u[f]=o(d,h)}return u}return t(a,s)}return o(e)}var P_e=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function k_e(e){return T_e(e,P_e)}function I_e(e){return e.semanticTokens}function M_e(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var R_e=e=>xV.includes(e)||e==="default";function O_e({tokens:e,semanticTokens:t}){const n={};return H8(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),H8(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(R_e)}),n}function $_e(e){var t;const n=M_e(e),r=k_e(n),i=I_e(n),o=O_e({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=C_e(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:w_e(n.breakpoints)}),n}var IT=ca({},ev,dt,Qbe,q1,Bi,Ybe,a_e,Zbe,vV,o_e,gp,a3,Lt,d_e,c_e,s_e,l_e,Jbe,u_e),N_e=Object.assign({},Lt,Bi,q1,vV,gp),TUe=Object.keys(N_e),D_e=[...Object.keys(IT),...xV],L_e={...IT,...pS},F_e=e=>e in L_e,B_e=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=ua(e[a],t);if(s==null)continue;if(s=ya(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!V_e(t),U_e=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=z_e(t);return t=(r=(n=i(a))!=null?n:o(s))!=null?r:o(t),t};function G_e(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s,l,u;const c=ua(o,r),d=B_e(c)(r);let f={};for(let h in d){const p=d[h];let g=ua(p,r);h in n&&(h=n[h]),j_e(h,g)&&(g=U_e(r,g));let _=t[h];if(_===!0&&(_={property:h}),ya(g)){f[h]=(s=f[h])!=null?s:{},f[h]=ca({},f[h],i(g,!0));continue}let b=(u=(l=_==null?void 0:_.transform)==null?void 0:l.call(_,g,r,c))!=null?u:g;b=_!=null&&_.processResult?i(b,!0):b;const y=ua(_==null?void 0:_.property,r);if(!a&&(_!=null&&_.static)){const m=ua(_.static,r);f=ca({},f,m)}if(y&&Array.isArray(y)){for(const m of y)f[m]=b;continue}if(y){y==="&"&&ya(b)?f=ca({},f,b):f[y]=b;continue}if(ya(b)){f=ca({},f,b);continue}f[h]=b}return f};return i}var wV=e=>t=>G_e({theme:t,pseudos:pS,configs:IT})(e);function Ve(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function H_e(e,t){if(Array.isArray(e))return e;if(ya(e))return t(e);if(e!=null)return[e]}function q_e(e,t){for(let n=t+1;n{ca(u,{[m]:f?y[m]:{[b]:y[m]}})});continue}if(!h){f?ca(u,y):u[b]=y;continue}u[b]=y}}return u}}function K_e(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,a=W_e(o);return ca({},ua((n=e.baseStyle)!=null?n:{},t),a(e,"sizes",i,t),a(e,"variants",r,t))}}function AUe(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function Rm(e){return E_e(e,["styleConfig","size","variant","colorScheme"])}var X_e={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Q_e={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Y_e={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Z_e={property:X_e,easing:Q_e,duration:Y_e},J_e=Z_e,eSe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},tSe=eSe,nSe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},rSe=nSe,iSe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},oSe=iSe,aSe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},sSe=aSe,lSe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},uSe=lSe,cSe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},dSe=cSe,fSe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},hSe=fSe,pSe={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},CV=pSe,EV={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},gSe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},mSe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},ySe={...EV,...gSe,container:mSe},TV=ySe,vSe={breakpoints:oSe,zIndices:tSe,radii:uSe,blur:hSe,colors:sSe,...CV,sizes:TV,shadows:dSe,space:EV,borders:rSe,transition:J_e},{defineMultiStyleConfig:bSe,definePartsStyle:Wh}=Ve(["stepper","step","title","description","indicator","separator","icon","number"]),Ka=ke("stepper-indicator-size"),ud=ke("stepper-icon-size"),cd=ke("stepper-title-font-size"),Kh=ke("stepper-description-font-size"),vh=ke("stepper-accent-color"),_Se=Wh(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[vh.variable]:`colors.${e}.500`,_dark:{[vh.variable]:`colors.${e}.200`}},title:{fontSize:cd.reference,fontWeight:"medium"},description:{fontSize:Kh.reference,color:"chakra-subtle-text"},number:{fontSize:cd.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:ud.reference,height:ud.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ka.reference,height:Ka.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:vh.reference},"&[data-status=complete]":{bg:vh.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:vh.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ka.reference} - 8px)`,top:`calc(${Ka.reference} + 4px)`,insetStart:`calc(${Ka.reference} / 2 - 1px)`}}})),SSe=bSe({baseStyle:_Se,sizes:{xs:Wh({stepper:{[Ka.variable]:"sizes.4",[ud.variable]:"sizes.3",[cd.variable]:"fontSizes.xs",[Kh.variable]:"fontSizes.xs"}}),sm:Wh({stepper:{[Ka.variable]:"sizes.6",[ud.variable]:"sizes.4",[cd.variable]:"fontSizes.sm",[Kh.variable]:"fontSizes.xs"}}),md:Wh({stepper:{[Ka.variable]:"sizes.8",[ud.variable]:"sizes.5",[cd.variable]:"fontSizes.md",[Kh.variable]:"fontSizes.sm"}}),lg:Wh({stepper:{[Ka.variable]:"sizes.10",[ud.variable]:"sizes.6",[cd.variable]:"fontSizes.lg",[Kh.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function mt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){r();for(const d of c)t[d]=l(d);return mt(e,t)}function o(...c){for(const d of c)d in t||(t[d]=l(d));return mt(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const h=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var AV=mt("accordion").parts("root","container","button","panel").extend("icon"),xSe=mt("alert").parts("title","description","container").extend("icon","spinner"),wSe=mt("avatar").parts("label","badge","container").extend("excessLabel","group"),CSe=mt("breadcrumb").parts("link","item","container").extend("separator");mt("button").parts();var PV=mt("checkbox").parts("control","icon","container").extend("label");mt("progress").parts("track","filledTrack").extend("label");var ESe=mt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),kV=mt("editable").parts("preview","input","textarea"),TSe=mt("form").parts("container","requiredIndicator","helperText"),ASe=mt("formError").parts("text","icon"),IV=mt("input").parts("addon","field","element","group"),PSe=mt("list").parts("container","item","icon"),MV=mt("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),RV=mt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),OV=mt("numberinput").parts("root","field","stepperGroup","stepper");mt("pininput").parts("field");var $V=mt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),NV=mt("progress").parts("label","filledTrack","track"),kSe=mt("radio").parts("container","control","label"),DV=mt("select").parts("field","icon"),LV=mt("slider").parts("container","track","thumb","filledTrack","mark"),ISe=mt("stat").parts("container","label","helpText","number","icon"),FV=mt("switch").parts("container","track","thumb","label"),MSe=mt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),BV=mt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),RSe=mt("tag").parts("container","label","closeButton"),OSe=mt("card").parts("container","header","body","footer");mt("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Ou(e,t,n){return Math.min(Math.max(e,n),t)}class $Se extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Xh=$Se;function MT(e){if(typeof e!="string")throw new Xh(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=jSe.test(e)?LSe(e):e;const n=FSe.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(Dg(s,2),16)),parseInt(Dg(a[3]||"f",2),16)/255]}const r=BSe.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=zSe.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=VSe.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(Ou(0,100,s)!==s)throw new Xh(e);if(Ou(0,100,l)!==l)throw new Xh(e);return[...USe(a,s,l),Number.isNaN(u)?1:u]}throw new Xh(e)}function NSe(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const q8=e=>parseInt(e.replace(/_/g,""),36),DSe="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=q8(t.substring(0,3)),r=q8(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function LSe(e){const t=e.toLowerCase().trim(),n=DSe[NSe(t)];if(!n)throw new Xh(e);return`#${n}`}const Dg=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),FSe=new RegExp(`^#${Dg("([a-f0-9])",3)}([a-f0-9])?$`,"i"),BSe=new RegExp(`^#${Dg("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),zSe=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Dg(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),VSe=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,jSe=/^[a-z]+$/i,W8=e=>Math.round(e*255),USe=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(W8);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);const c=r-o/2,d=s+c,f=l+c,h=u+c;return[d,f,h].map(W8)};function GSe(e,t,n,r){return`rgba(${Ou(0,255,e).toFixed()}, ${Ou(0,255,t).toFixed()}, ${Ou(0,255,n).toFixed()}, ${parseFloat(Ou(0,1,r).toFixed(3))})`}function HSe(e,t){const[n,r,i,o]=MT(e);return GSe(n,r,i,o-t)}function qSe(e){const[t,n,r,i]=MT(e);let o=a=>{const s=Ou(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function WSe(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Or=(e,t,n)=>{const r=WSe(e,`colors.${t}`,t);try{return qSe(r),r}catch{return n??"#000000"}},XSe=e=>{const[t,n,r]=MT(e);return(t*299+n*587+r*114)/1e3},QSe=e=>t=>{const n=Or(t,e);return XSe(n)<128?"dark":"light"},YSe=e=>t=>QSe(e)(t)==="dark",Sf=(e,t)=>n=>{const r=Or(n,e);return HSe(r,1-t)};function K8(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}var ZSe=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function JSe(e){const t=ZSe();return!e||KSe(e)?t:e.string&&e.colors?t2e(e.string,e.colors):e.string&&!e.colors?e2e(e.string):e.colors&&!e.string?n2e(e.colors):t}function e2e(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function t2e(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function RT(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function zV(e){return ya(e)&&e.reference?e.reference:String(e)}var gS=(e,...t)=>t.map(zV).join(` ${e} `).replace(/calc/g,""),X8=(...e)=>`calc(${gS("+",...e)})`,Q8=(...e)=>`calc(${gS("-",...e)})`,u3=(...e)=>`calc(${gS("*",...e)})`,Y8=(...e)=>`calc(${gS("/",...e)})`,Z8=e=>{const t=zV(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:u3(t,-1)},Xa=Object.assign(e=>({add:(...t)=>Xa(X8(e,...t)),subtract:(...t)=>Xa(Q8(e,...t)),multiply:(...t)=>Xa(u3(e,...t)),divide:(...t)=>Xa(Y8(e,...t)),negate:()=>Xa(Z8(e)),toString:()=>e.toString()}),{add:X8,subtract:Q8,multiply:u3,divide:Y8,negate:Z8});function r2e(e){return!Number.isInteger(parseFloat(e.toString()))}function i2e(e,t="-"){return e.replace(/\s+/g,t)}function VV(e){const t=i2e(e.toString());return t.includes("\\.")?e:r2e(e)?t.replace(".","\\."):e}function o2e(e,t=""){return[t,VV(e)].filter(Boolean).join("-")}function a2e(e,t){return`var(${VV(e)}${t?`, ${t}`:""})`}function s2e(e,t=""){return`--${o2e(e,t)}`}function tn(e,t){const n=s2e(e,t==null?void 0:t.prefix);return{variable:n,reference:a2e(n,l2e(t==null?void 0:t.fallback))}}function l2e(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:u2e,definePartsStyle:tv}=Ve(FV.keys),mp=tn("switch-track-width"),Gu=tn("switch-track-height"),dw=tn("switch-track-diff"),c2e=Xa.subtract(mp,Gu),c3=tn("switch-thumb-x"),bh=tn("switch-bg"),d2e=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[mp.reference],height:[Gu.reference],transitionProperty:"common",transitionDuration:"fast",[bh.variable]:"colors.gray.300",_dark:{[bh.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[bh.variable]:`colors.${t}.500`,_dark:{[bh.variable]:`colors.${t}.200`}},bg:bh.reference}},f2e={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Gu.reference],height:[Gu.reference],_checked:{transform:`translateX(${c3.reference})`}},h2e=tv(e=>({container:{[dw.variable]:c2e,[c3.variable]:dw.reference,_rtl:{[c3.variable]:Xa(dw).negate().toString()}},track:d2e(e),thumb:f2e})),p2e={sm:tv({container:{[mp.variable]:"1.375rem",[Gu.variable]:"sizes.3"}}),md:tv({container:{[mp.variable]:"1.875rem",[Gu.variable]:"sizes.4"}}),lg:tv({container:{[mp.variable]:"2.875rem",[Gu.variable]:"sizes.6"}})},g2e=u2e({baseStyle:h2e,sizes:p2e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:m2e,definePartsStyle:Vd}=Ve(MSe.keys),y2e=Vd({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),W1={"&[data-is-numeric=true]":{textAlign:"end"}},v2e=Vd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},caption:{color:W("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),b2e=Vd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...W1},caption:{color:W("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e)},td:{background:W(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),_2e={simple:v2e,striped:b2e,unstyled:{}},S2e={sm:Vd({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Vd({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Vd({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},x2e=m2e({baseStyle:y2e,variants:_2e,sizes:S2e,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Kr=ke("tabs-color"),wo=ke("tabs-bg"),X0=ke("tabs-border-color"),{defineMultiStyleConfig:w2e,definePartsStyle:va}=Ve(BV.keys),C2e=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},E2e=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},T2e=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},A2e={p:4},P2e=va(e=>({root:C2e(e),tab:E2e(e),tablist:T2e(e),tabpanel:A2e})),k2e={sm:va({tab:{py:1,px:4,fontSize:"sm"}}),md:va({tab:{fontSize:"md",py:2,px:4}}),lg:va({tab:{fontSize:"lg",py:3,px:4}})},I2e=va(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Kr.variable]:`colors.${t}.600`,_dark:{[Kr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[wo.variable]:"colors.gray.200",_dark:{[wo.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Kr.reference,bg:wo.reference}}}),M2e=va(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[X0.variable]:"transparent",_selected:{[Kr.variable]:`colors.${t}.600`,[X0.variable]:"colors.white",_dark:{[Kr.variable]:`colors.${t}.300`,[X0.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:X0.reference},color:Kr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),R2e=va(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[wo.variable]:"colors.gray.50",_dark:{[wo.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[wo.variable]:"colors.white",[Kr.variable]:`colors.${t}.600`,_dark:{[wo.variable]:"colors.gray.800",[Kr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Kr.reference,bg:wo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),O2e=va(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Or(n,`${t}.700`),bg:Or(n,`${t}.100`)}}}}),$2e=va(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Kr.variable]:"colors.gray.600",_dark:{[Kr.variable]:"inherit"},_selected:{[Kr.variable]:"colors.white",[wo.variable]:`colors.${t}.600`,_dark:{[Kr.variable]:"colors.gray.800",[wo.variable]:`colors.${t}.300`}},color:Kr.reference,bg:wo.reference}}}),N2e=va({}),D2e={line:I2e,enclosed:M2e,"enclosed-colored":R2e,"soft-rounded":O2e,"solid-rounded":$2e,unstyled:N2e},L2e=w2e({baseStyle:P2e,sizes:k2e,variants:D2e,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),yn=b_e("badge",["bg","color","shadow"]),F2e={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:yn.bg.reference,color:yn.color.reference,boxShadow:yn.shadow.reference},B2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.500`,.6)(n);return{[yn.bg.variable]:`colors.${t}.500`,[yn.color.variable]:"colors.white",_dark:{[yn.bg.variable]:r,[yn.color.variable]:"colors.whiteAlpha.800"}}},z2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.16)(n);return{[yn.bg.variable]:`colors.${t}.100`,[yn.color.variable]:`colors.${t}.800`,_dark:{[yn.bg.variable]:r,[yn.color.variable]:`colors.${t}.200`}}},V2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.8)(n);return{[yn.color.variable]:`colors.${t}.500`,_dark:{[yn.color.variable]:r},[yn.shadow.variable]:`inset 0 0 0px 1px ${yn.color.reference}`}},j2e={solid:B2e,subtle:z2e,outline:V2e},yp={baseStyle:F2e,variants:j2e,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:U2e,definePartsStyle:Hu}=Ve(RSe.keys),J8=ke("tag-bg"),e9=ke("tag-color"),fw=ke("tag-shadow"),nv=ke("tag-min-height"),rv=ke("tag-min-width"),iv=ke("tag-font-size"),ov=ke("tag-padding-inline"),G2e={fontWeight:"medium",lineHeight:1.2,outline:0,[e9.variable]:yn.color.reference,[J8.variable]:yn.bg.reference,[fw.variable]:yn.shadow.reference,color:e9.reference,bg:J8.reference,boxShadow:fw.reference,borderRadius:"md",minH:nv.reference,minW:rv.reference,fontSize:iv.reference,px:ov.reference,_focusVisible:{[fw.variable]:"shadows.outline"}},H2e={lineHeight:1.2,overflow:"visible"},q2e={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},W2e=Hu({container:G2e,label:H2e,closeButton:q2e}),K2e={sm:Hu({container:{[nv.variable]:"sizes.5",[rv.variable]:"sizes.5",[iv.variable]:"fontSizes.xs",[ov.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hu({container:{[nv.variable]:"sizes.6",[rv.variable]:"sizes.6",[iv.variable]:"fontSizes.sm",[ov.variable]:"space.2"}}),lg:Hu({container:{[nv.variable]:"sizes.8",[rv.variable]:"sizes.8",[iv.variable]:"fontSizes.md",[ov.variable]:"space.3"}})},X2e={subtle:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.subtle(e)}}),solid:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.solid(e)}}),outline:Hu(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.outline(e)}})},Q2e=U2e({variants:X2e,baseStyle:W2e,sizes:K2e,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Ja,defineMultiStyleConfig:Y2e}=Ve(IV.keys),dd=ke("input-height"),fd=ke("input-font-size"),hd=ke("input-padding"),pd=ke("input-border-radius"),Z2e=Ja({addon:{height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference},field:{width:"100%",height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Ls={lg:{[fd.variable]:"fontSizes.lg",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.12"},md:{[fd.variable]:"fontSizes.md",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.10"},sm:{[fd.variable]:"fontSizes.sm",[hd.variable]:"space.3",[pd.variable]:"radii.sm",[dd.variable]:"sizes.8"},xs:{[fd.variable]:"fontSizes.xs",[hd.variable]:"space.2",[pd.variable]:"radii.sm",[dd.variable]:"sizes.6"}},J2e={lg:Ja({field:Ls.lg,group:Ls.lg}),md:Ja({field:Ls.md,group:Ls.md}),sm:Ja({field:Ls.sm,group:Ls.sm}),xs:Ja({field:Ls.xs,group:Ls.xs})};function OT(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||W("blue.500","blue.300")(e),errorBorderColor:n||W("red.500","red.300")(e)}}var exe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:W("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r),boxShadow:`0 0 0 1px ${Or(t,r)}`},_focusVisible:{zIndex:1,borderColor:Or(t,n),boxShadow:`0 0 0 1px ${Or(t,n)}`}},addon:{border:"1px solid",borderColor:W("inherit","whiteAlpha.50")(e),bg:W("gray.100","whiteAlpha.300")(e)}}}),txe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e),_hover:{bg:W("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r)},_focusVisible:{bg:"transparent",borderColor:Or(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e)}}}),nxe=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=OT(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Or(t,r),boxShadow:`0px 1px 0px 0px ${Or(t,r)}`},_focusVisible:{borderColor:Or(t,n),boxShadow:`0px 1px 0px 0px ${Or(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),rxe=Ja({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),ixe={outline:exe,filled:txe,flushed:nxe,unstyled:rxe},gt=Y2e({baseStyle:Z2e,sizes:J2e,variants:ixe,defaultProps:{size:"md",variant:"outline"}}),t9,oxe={...(t9=gt.baseStyle)==null?void 0:t9.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},n9,r9,axe={outline:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=gt.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(r9=(n9=gt.variants)==null?void 0:n9.unstyled.field)!=null?r9:{}},i9,o9,a9,s9,l9,u9,c9,d9,sxe={xs:(o9=(i9=gt.sizes)==null?void 0:i9.xs.field)!=null?o9:{},sm:(s9=(a9=gt.sizes)==null?void 0:a9.sm.field)!=null?s9:{},md:(u9=(l9=gt.sizes)==null?void 0:l9.md.field)!=null?u9:{},lg:(d9=(c9=gt.sizes)==null?void 0:c9.lg.field)!=null?d9:{}},lxe={baseStyle:oxe,sizes:sxe,variants:axe,defaultProps:{size:"md",variant:"outline"}},Q0=tn("tooltip-bg"),hw=tn("tooltip-fg"),uxe=tn("popper-arrow-bg"),cxe={bg:Q0.reference,color:hw.reference,[Q0.variable]:"colors.gray.700",[hw.variable]:"colors.whiteAlpha.900",_dark:{[Q0.variable]:"colors.gray.300",[hw.variable]:"colors.gray.900"},[uxe.variable]:Q0.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},dxe={baseStyle:cxe},{defineMultiStyleConfig:fxe,definePartsStyle:Qh}=Ve(NV.keys),hxe=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=W(K8(),K8("1rem","rgba(0,0,0,0.1)"))(e),a=W(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Or(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},pxe={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},gxe=e=>({bg:W("gray.100","whiteAlpha.300")(e)}),mxe=e=>({transitionProperty:"common",transitionDuration:"slow",...hxe(e)}),yxe=Qh(e=>({label:pxe,filledTrack:mxe(e),track:gxe(e)})),vxe={xs:Qh({track:{h:"1"}}),sm:Qh({track:{h:"2"}}),md:Qh({track:{h:"3"}}),lg:Qh({track:{h:"4"}})},bxe=fxe({sizes:vxe,baseStyle:yxe,defaultProps:{size:"md",colorScheme:"blue"}}),_xe=e=>typeof e=="function";function Nr(e,...t){return _xe(e)?e(...t):e}var{definePartsStyle:av,defineMultiStyleConfig:Sxe}=Ve(PV.keys),vp=ke("checkbox-size"),xxe=e=>{const{colorScheme:t}=e;return{w:vp.reference,h:vp.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e),_hover:{bg:W(`${t}.600`,`${t}.300`)(e),borderColor:W(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:W("gray.200","transparent")(e),bg:W("gray.200","whiteAlpha.300")(e),color:W("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e)},_disabled:{bg:W("gray.100","whiteAlpha.100")(e),borderColor:W("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:W("red.500","red.300")(e)}}},wxe={_disabled:{cursor:"not-allowed"}},Cxe={userSelect:"none",_disabled:{opacity:.4}},Exe={transitionProperty:"transform",transitionDuration:"normal"},Txe=av(e=>({icon:Exe,container:wxe,control:Nr(xxe,e),label:Cxe})),Axe={sm:av({control:{[vp.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:av({control:{[vp.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:av({control:{[vp.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},K1=Sxe({baseStyle:Txe,sizes:Axe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Pxe,definePartsStyle:sv}=Ve(kSe.keys),kxe=e=>{var t;const n=(t=Nr(K1.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Ixe=sv(e=>{var t,n,r,i;return{label:(n=(t=K1).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=K1).baseStyle)==null?void 0:i.call(r,e).container,control:kxe(e)}}),Mxe={md:sv({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:sv({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:sv({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Rxe=Pxe({baseStyle:Ixe,sizes:Mxe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Oxe,definePartsStyle:$xe}=Ve(DV.keys),Y0=ke("select-bg"),f9,Nxe={...(f9=gt.baseStyle)==null?void 0:f9.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Y0.reference,[Y0.variable]:"colors.white",_dark:{[Y0.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Y0.reference}},Dxe={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Lxe=$xe({field:Nxe,icon:Dxe}),Z0={paddingInlineEnd:"8"},h9,p9,g9,m9,y9,v9,b9,_9,Fxe={lg:{...(h9=gt.sizes)==null?void 0:h9.lg,field:{...(p9=gt.sizes)==null?void 0:p9.lg.field,...Z0}},md:{...(g9=gt.sizes)==null?void 0:g9.md,field:{...(m9=gt.sizes)==null?void 0:m9.md.field,...Z0}},sm:{...(y9=gt.sizes)==null?void 0:y9.sm,field:{...(v9=gt.sizes)==null?void 0:v9.sm.field,...Z0}},xs:{...(b9=gt.sizes)==null?void 0:b9.xs,field:{...(_9=gt.sizes)==null?void 0:_9.xs.field,...Z0},icon:{insetEnd:"1"}}},Bxe=Oxe({baseStyle:Lxe,sizes:Fxe,variants:gt.variants,defaultProps:gt.defaultProps}),pw=ke("skeleton-start-color"),gw=ke("skeleton-end-color"),zxe={[pw.variable]:"colors.gray.100",[gw.variable]:"colors.gray.400",_dark:{[pw.variable]:"colors.gray.800",[gw.variable]:"colors.gray.600"},background:pw.reference,borderColor:gw.reference,opacity:.7,borderRadius:"sm"},Vxe={baseStyle:zxe},mw=ke("skip-link-bg"),jxe={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[mw.variable]:"colors.white",_dark:{[mw.variable]:"colors.gray.700"},bg:mw.reference}},Uxe={baseStyle:jxe},{defineMultiStyleConfig:Gxe,definePartsStyle:mS}=Ve(LV.keys),Lg=ke("slider-thumb-size"),Fg=ke("slider-track-size"),el=ke("slider-bg"),Hxe=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...RT({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},qxe=e=>({...RT({orientation:e.orientation,horizontal:{h:Fg.reference},vertical:{w:Fg.reference}}),overflow:"hidden",borderRadius:"sm",[el.variable]:"colors.gray.200",_dark:{[el.variable]:"colors.whiteAlpha.200"},_disabled:{[el.variable]:"colors.gray.300",_dark:{[el.variable]:"colors.whiteAlpha.300"}},bg:el.reference}),Wxe=e=>{const{orientation:t}=e;return{...RT({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Lg.reference,h:Lg.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Kxe=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[el.variable]:`colors.${t}.500`,_dark:{[el.variable]:`colors.${t}.200`},bg:el.reference}},Xxe=mS(e=>({container:Hxe(e),track:qxe(e),thumb:Wxe(e),filledTrack:Kxe(e)})),Qxe=mS({container:{[Lg.variable]:"sizes.4",[Fg.variable]:"sizes.1"}}),Yxe=mS({container:{[Lg.variable]:"sizes.3.5",[Fg.variable]:"sizes.1"}}),Zxe=mS({container:{[Lg.variable]:"sizes.2.5",[Fg.variable]:"sizes.0.5"}}),Jxe={lg:Qxe,md:Yxe,sm:Zxe},ewe=Gxe({baseStyle:Xxe,sizes:Jxe,defaultProps:{size:"md",colorScheme:"blue"}}),Eu=tn("spinner-size"),twe={width:[Eu.reference],height:[Eu.reference]},nwe={xs:{[Eu.variable]:"sizes.3"},sm:{[Eu.variable]:"sizes.4"},md:{[Eu.variable]:"sizes.6"},lg:{[Eu.variable]:"sizes.8"},xl:{[Eu.variable]:"sizes.12"}},rwe={baseStyle:twe,sizes:nwe,defaultProps:{size:"md"}},{defineMultiStyleConfig:iwe,definePartsStyle:jV}=Ve(ISe.keys),owe={fontWeight:"medium"},awe={opacity:.8,marginBottom:"2"},swe={verticalAlign:"baseline",fontWeight:"semibold"},lwe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},uwe=jV({container:{},label:owe,helpText:awe,number:swe,icon:lwe}),cwe={md:jV({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},dwe=iwe({baseStyle:uwe,sizes:cwe,defaultProps:{size:"md"}}),yw=ke("kbd-bg"),fwe={[yw.variable]:"colors.gray.100",_dark:{[yw.variable]:"colors.whiteAlpha.100"},bg:yw.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hwe={baseStyle:fwe},pwe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},gwe={baseStyle:pwe},{defineMultiStyleConfig:mwe,definePartsStyle:ywe}=Ve(PSe.keys),vwe={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},bwe=ywe({icon:vwe}),_we=mwe({baseStyle:bwe}),{defineMultiStyleConfig:Swe,definePartsStyle:xwe}=Ve(MV.keys),Zo=ke("menu-bg"),vw=ke("menu-shadow"),wwe={[Zo.variable]:"#fff",[vw.variable]:"shadows.sm",_dark:{[Zo.variable]:"colors.gray.700",[vw.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Zo.reference,boxShadow:vw.reference},Cwe={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Zo.variable]:"colors.gray.100",_dark:{[Zo.variable]:"colors.whiteAlpha.100"}},_active:{[Zo.variable]:"colors.gray.200",_dark:{[Zo.variable]:"colors.whiteAlpha.200"}},_expanded:{[Zo.variable]:"colors.gray.100",_dark:{[Zo.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Zo.reference},Ewe={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Twe={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},Awe={opacity:.6},Pwe={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},kwe={transitionProperty:"common",transitionDuration:"normal"},Iwe=xwe({button:kwe,list:wwe,item:Cwe,groupTitle:Ewe,icon:Twe,command:Awe,divider:Pwe}),Mwe=Swe({baseStyle:Iwe}),{defineMultiStyleConfig:Rwe,definePartsStyle:d3}=Ve(RV.keys),bw=ke("modal-bg"),_w=ke("modal-shadow"),Owe={bg:"blackAlpha.600",zIndex:"modal"},$we=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},Nwe=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[bw.variable]:"colors.white",[_w.variable]:"shadows.lg",_dark:{[bw.variable]:"colors.gray.700",[_w.variable]:"shadows.dark-lg"},bg:bw.reference,boxShadow:_w.reference}},Dwe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Lwe={position:"absolute",top:"2",insetEnd:"3"},Fwe=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Bwe={px:"6",py:"4"},zwe=d3(e=>({overlay:Owe,dialogContainer:Nr($we,e),dialog:Nr(Nwe,e),header:Dwe,closeButton:Lwe,body:Nr(Fwe,e),footer:Bwe}));function po(e){return d3(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Vwe={xs:po("xs"),sm:po("sm"),md:po("md"),lg:po("lg"),xl:po("xl"),"2xl":po("2xl"),"3xl":po("3xl"),"4xl":po("4xl"),"5xl":po("5xl"),"6xl":po("6xl"),full:po("full")},jwe=Rwe({baseStyle:zwe,sizes:Vwe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Uwe,definePartsStyle:UV}=Ve(OV.keys),$T=tn("number-input-stepper-width"),GV=tn("number-input-input-padding"),Gwe=Xa($T).add("0.5rem").toString(),Sw=tn("number-input-bg"),xw=tn("number-input-color"),ww=tn("number-input-border-color"),Hwe={[$T.variable]:"sizes.6",[GV.variable]:Gwe},qwe=e=>{var t,n;return(n=(t=Nr(gt.baseStyle,e))==null?void 0:t.field)!=null?n:{}},Wwe={width:$T.reference},Kwe={borderStart:"1px solid",borderStartColor:ww.reference,color:xw.reference,bg:Sw.reference,[xw.variable]:"colors.chakra-body-text",[ww.variable]:"colors.chakra-border-color",_dark:{[xw.variable]:"colors.whiteAlpha.800",[ww.variable]:"colors.whiteAlpha.300"},_active:{[Sw.variable]:"colors.gray.200",_dark:{[Sw.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Xwe=UV(e=>{var t;return{root:Hwe,field:(t=Nr(qwe,e))!=null?t:{},stepperGroup:Wwe,stepper:Kwe}});function J0(e){var t,n,r;const i=(t=gt.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",s=CV.fontSizes[a];return UV({field:{...i.field,paddingInlineEnd:GV.reference,verticalAlign:"top"},stepper:{fontSize:Xa(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var Qwe={xs:J0("xs"),sm:J0("sm"),md:J0("md"),lg:J0("lg")},Ywe=Uwe({baseStyle:Xwe,sizes:Qwe,variants:gt.variants,defaultProps:gt.defaultProps}),S9,Zwe={...(S9=gt.baseStyle)==null?void 0:S9.field,textAlign:"center"},Jwe={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},x9,w9,eCe={outline:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=Nr((t=gt.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(w9=(x9=gt.variants)==null?void 0:x9.unstyled.field)!=null?w9:{}},tCe={baseStyle:Zwe,sizes:Jwe,variants:eCe,defaultProps:gt.defaultProps},{defineMultiStyleConfig:nCe,definePartsStyle:rCe}=Ve($V.keys),ey=tn("popper-bg"),iCe=tn("popper-arrow-bg"),C9=tn("popper-arrow-shadow-color"),oCe={zIndex:10},aCe={[ey.variable]:"colors.white",bg:ey.reference,[iCe.variable]:ey.reference,[C9.variable]:"colors.gray.200",_dark:{[ey.variable]:"colors.gray.700",[C9.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sCe={px:3,py:2,borderBottomWidth:"1px"},lCe={px:3,py:2},uCe={px:3,py:2,borderTopWidth:"1px"},cCe={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},dCe=rCe({popper:oCe,content:aCe,header:sCe,body:lCe,footer:uCe,closeButton:cCe}),fCe=nCe({baseStyle:dCe}),{definePartsStyle:f3,defineMultiStyleConfig:hCe}=Ve(ESe.keys),Cw=ke("drawer-bg"),Ew=ke("drawer-box-shadow");function Lc(e){return f3(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var pCe={bg:"blackAlpha.600",zIndex:"modal"},gCe={display:"flex",zIndex:"modal",justifyContent:"center"},mCe=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Cw.variable]:"colors.white",[Ew.variable]:"shadows.lg",_dark:{[Cw.variable]:"colors.gray.700",[Ew.variable]:"shadows.dark-lg"},bg:Cw.reference,boxShadow:Ew.reference}},yCe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},vCe={position:"absolute",top:"2",insetEnd:"3"},bCe={px:"6",py:"2",flex:"1",overflow:"auto"},_Ce={px:"6",py:"4"},SCe=f3(e=>({overlay:pCe,dialogContainer:gCe,dialog:Nr(mCe,e),header:yCe,closeButton:vCe,body:bCe,footer:_Ce})),xCe={xs:Lc("xs"),sm:Lc("md"),md:Lc("lg"),lg:Lc("2xl"),xl:Lc("4xl"),full:Lc("full")},wCe=hCe({baseStyle:SCe,sizes:xCe,defaultProps:{size:"xs"}}),{definePartsStyle:CCe,defineMultiStyleConfig:ECe}=Ve(kV.keys),TCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},ACe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},PCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},kCe=CCe({preview:TCe,input:ACe,textarea:PCe}),ICe=ECe({baseStyle:kCe}),{definePartsStyle:MCe,defineMultiStyleConfig:RCe}=Ve(TSe.keys),jd=ke("form-control-color"),OCe={marginStart:"1",[jd.variable]:"colors.red.500",_dark:{[jd.variable]:"colors.red.300"},color:jd.reference},$Ce={mt:"2",[jd.variable]:"colors.gray.600",_dark:{[jd.variable]:"colors.whiteAlpha.600"},color:jd.reference,lineHeight:"normal",fontSize:"sm"},NCe=MCe({container:{width:"100%",position:"relative"},requiredIndicator:OCe,helperText:$Ce}),DCe=RCe({baseStyle:NCe}),{definePartsStyle:LCe,defineMultiStyleConfig:FCe}=Ve(ASe.keys),Ud=ke("form-error-color"),BCe={[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},zCe={marginEnd:"0.5em",[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference},VCe=LCe({text:BCe,icon:zCe}),jCe=FCe({baseStyle:VCe}),UCe={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},GCe={baseStyle:UCe},HCe={fontFamily:"heading",fontWeight:"bold"},qCe={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},WCe={baseStyle:HCe,sizes:qCe,defaultProps:{size:"xl"}},{defineMultiStyleConfig:KCe,definePartsStyle:XCe}=Ve(CSe.keys),Tw=ke("breadcrumb-link-decor"),QCe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Tw.reference,[Tw.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Tw.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},YCe=XCe({link:QCe}),ZCe=KCe({baseStyle:YCe}),JCe={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},HV=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.100","whiteAlpha.200")(e)},_active:{bg:W("gray.200","whiteAlpha.300")(e)}};const r=Sf(`${t}.200`,.12)(n),i=Sf(`${t}.200`,.24)(n);return{color:W(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:W(`${t}.50`,r)(e)},_active:{bg:W(`${t}.100`,i)(e)}}},e5e=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...Nr(HV,e)}},t5e={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},n5e=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=W("gray.100","whiteAlpha.200")(e);return{bg:l,color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:W("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:a=`${n}.700`}=(t=t5e[n])!=null?t:{},s=W(r,`${n}.200`)(e);return{bg:s,color:W(i,"gray.800")(e),_hover:{bg:W(o,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:W(a,`${n}.400`)(e)}}},r5e=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:W(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:W(`${t}.700`,`${t}.500`)(e)}}},i5e={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},o5e={ghost:HV,outline:e5e,solid:n5e,link:r5e,unstyled:i5e},a5e={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},s5e={baseStyle:JCe,variants:o5e,sizes:a5e,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:qu,defineMultiStyleConfig:l5e}=Ve(OSe.keys),X1=ke("card-bg"),is=ke("card-padding"),qV=ke("card-shadow"),lv=ke("card-radius"),WV=ke("card-border-width","0"),KV=ke("card-border-color"),u5e=qu({container:{[X1.variable]:"colors.chakra-body-bg",backgroundColor:X1.reference,boxShadow:qV.reference,borderRadius:lv.reference,color:"chakra-body-text",borderWidth:WV.reference,borderColor:KV.reference},body:{padding:is.reference,flex:"1 1 0%"},header:{padding:is.reference},footer:{padding:is.reference}}),c5e={sm:qu({container:{[lv.variable]:"radii.base",[is.variable]:"space.3"}}),md:qu({container:{[lv.variable]:"radii.md",[is.variable]:"space.5"}}),lg:qu({container:{[lv.variable]:"radii.xl",[is.variable]:"space.7"}})},d5e={elevated:qu({container:{[qV.variable]:"shadows.base",_dark:{[X1.variable]:"colors.gray.700"}}}),outline:qu({container:{[WV.variable]:"1px",[KV.variable]:"colors.chakra-border-color"}}),filled:qu({container:{[X1.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[is.variable]:0},header:{[is.variable]:0},footer:{[is.variable]:0}}},f5e=l5e({baseStyle:u5e,variants:d5e,sizes:c5e,defaultProps:{variant:"elevated",size:"md"}}),bp=tn("close-button-size"),_h=tn("close-button-bg"),h5e={w:[bp.reference],h:[bp.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[_h.variable]:"colors.blackAlpha.100",_dark:{[_h.variable]:"colors.whiteAlpha.100"}},_active:{[_h.variable]:"colors.blackAlpha.200",_dark:{[_h.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:_h.reference},p5e={lg:{[bp.variable]:"sizes.10",fontSize:"md"},md:{[bp.variable]:"sizes.8",fontSize:"xs"},sm:{[bp.variable]:"sizes.6",fontSize:"2xs"}},g5e={baseStyle:h5e,sizes:p5e,defaultProps:{size:"md"}},{variants:m5e,defaultProps:y5e}=yp,v5e={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:yn.bg.reference,color:yn.color.reference,boxShadow:yn.shadow.reference},b5e={baseStyle:v5e,variants:m5e,defaultProps:y5e},_5e={w:"100%",mx:"auto",maxW:"prose",px:"4"},S5e={baseStyle:_5e},x5e={opacity:.6,borderColor:"inherit"},w5e={borderStyle:"solid"},C5e={borderStyle:"dashed"},E5e={solid:w5e,dashed:C5e},T5e={baseStyle:x5e,variants:E5e,defaultProps:{variant:"solid"}},{definePartsStyle:A5e,defineMultiStyleConfig:P5e}=Ve(AV.keys),k5e={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},I5e={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},M5e={pt:"2",px:"4",pb:"5"},R5e={fontSize:"1.25em"},O5e=A5e({container:k5e,button:I5e,panel:M5e,icon:R5e}),$5e=P5e({baseStyle:O5e}),{definePartsStyle:Om,defineMultiStyleConfig:N5e}=Ve(xSe.keys),xi=ke("alert-fg"),bs=ke("alert-bg"),D5e=Om({container:{bg:bs.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:xi.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:xi.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function NT(e){const{theme:t,colorScheme:n}=e,r=Sf(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var L5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark}}}}),F5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:xi.reference}}}),B5e=Om(e=>{const{colorScheme:t}=e,n=NT(e);return{container:{[xi.variable]:`colors.${t}.600`,[bs.variable]:n.light,_dark:{[xi.variable]:`colors.${t}.200`,[bs.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:xi.reference}}}),z5e=Om(e=>{const{colorScheme:t}=e;return{container:{[xi.variable]:"colors.white",[bs.variable]:`colors.${t}.600`,_dark:{[xi.variable]:"colors.gray.900",[bs.variable]:`colors.${t}.200`},color:xi.reference}}}),V5e={subtle:L5e,"left-accent":F5e,"top-accent":B5e,solid:z5e},j5e=N5e({baseStyle:D5e,variants:V5e,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:XV,defineMultiStyleConfig:U5e}=Ve(wSe.keys),Gd=ke("avatar-border-color"),_p=ke("avatar-bg"),Bg=ke("avatar-font-size"),xf=ke("avatar-size"),G5e={borderRadius:"full",border:"0.2em solid",borderColor:Gd.reference,[Gd.variable]:"white",_dark:{[Gd.variable]:"colors.gray.800"}},H5e={bg:_p.reference,fontSize:Bg.reference,width:xf.reference,height:xf.reference,lineHeight:"1",[_p.variable]:"colors.gray.200",_dark:{[_p.variable]:"colors.whiteAlpha.400"}},q5e=e=>{const{name:t,theme:n}=e,r=t?JSe({string:t}):"colors.gray.400",i=YSe(r)(n);let o="white";return i||(o="gray.800"),{bg:_p.reference,fontSize:Bg.reference,color:o,borderColor:Gd.reference,verticalAlign:"top",width:xf.reference,height:xf.reference,"&:not([data-loaded])":{[_p.variable]:r},[Gd.variable]:"colors.white",_dark:{[Gd.variable]:"colors.gray.800"}}},W5e={fontSize:Bg.reference,lineHeight:"1"},K5e=XV(e=>({badge:Nr(G5e,e),excessLabel:Nr(H5e,e),container:Nr(q5e,e),label:W5e}));function Fs(e){const t=e!=="100%"?TV[e]:void 0;return XV({container:{[xf.variable]:t??e,[Bg.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[xf.variable]:t??e,[Bg.variable]:`calc(${t??e} / 2.5)`}})}var X5e={"2xs":Fs(4),xs:Fs(6),sm:Fs(8),md:Fs(12),lg:Fs(16),xl:Fs(24),"2xl":Fs(32),full:Fs("100%")},Q5e=U5e({baseStyle:K5e,sizes:X5e,defaultProps:{size:"md"}}),Y5e={Accordion:$5e,Alert:j5e,Avatar:Q5e,Badge:yp,Breadcrumb:ZCe,Button:s5e,Checkbox:K1,CloseButton:g5e,Code:b5e,Container:S5e,Divider:T5e,Drawer:wCe,Editable:ICe,Form:DCe,FormError:jCe,FormLabel:GCe,Heading:WCe,Input:gt,Kbd:hwe,Link:gwe,List:_we,Menu:Mwe,Modal:jwe,NumberInput:Ywe,PinInput:tCe,Popover:fCe,Progress:bxe,Radio:Rxe,Select:Bxe,Skeleton:Vxe,SkipLink:Uxe,Slider:ewe,Spinner:rwe,Stat:dwe,Switch:g2e,Table:x2e,Tabs:L2e,Tag:Q2e,Textarea:lxe,Tooltip:dxe,Card:f5e,Stepper:SSe},Z5e={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},J5e={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},e3e="ltr",t3e={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},n3e={semanticTokens:Z5e,direction:e3e,...vSe,components:Y5e,styles:J5e,config:t3e};function r3e(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function i3e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},QV=o3e(i3e);function YV(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var ZV=e=>YV(e,t=>t!=null);function a3e(e){return typeof e=="function"}function JV(e,...t){return a3e(e)?e(...t):e}function PUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var s3e=typeof Element<"u",l3e=typeof Map=="function",u3e=typeof Set=="function",c3e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function uv(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!uv(e[r],t[r]))return!1;return!0}var o;if(l3e&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!uv(r.value[1],t.get(r.value[0])))return!1;return!0}if(u3e&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(c3e&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(s3e&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!uv(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var d3e=function(t,n){try{return uv(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const f3e=Bl(d3e);function ej(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:a}=mV(),s=e?QV(o,`components.${e}`):void 0,l=r||s,u=ca({theme:o,colorMode:a},(n=l==null?void 0:l.defaultProps)!=null?n:{},ZV(r3e(i,["children"]))),c=k.useRef({});if(l){const f=K_e(l)(u);f3e(c.current,f)||(c.current=f)}return c.current}function $m(e,t={}){return ej(e,t)}function h3e(e,t={}){return ej(e,t)}var p3e=new Set([...D_e,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),g3e=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function m3e(e){return g3e.has(e)||!p3e.has(e)}function y3e(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function v3e(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var b3e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_3e=oV(function(e){return b3e.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),S3e=_3e,x3e=function(t){return t!=="theme"},E9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?S3e:x3e},T9=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},w3e=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return sV(n,r,i),hbe(function(){return lV(n,r,i)}),null},C3e=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=T9(t,n,r),l=s||E9(i),u=!l("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;ht=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=YV(a,(d,f)=>F_e(f)),l=JV(e,t),u=y3e({},i,l,ZV(s),o),c=wV(u)(t.theme);return r?[c,r]:c};function Aw(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=m3e);const i=A3e({baseStyle:n}),o=T3e(e,r)(i);return J.forwardRef(function(l,u){const{colorMode:c,forced:d}=fS();return J.createElement(o,{ref:u,"data-theme":d?c:void 0,...l})})}function P3e(){const e=new Map;return new Proxy(Aw,{apply(t,n,r){return Aw(...r)},get(t,n){return e.has(n)||e.set(n,Aw(n)),e.get(n)}})}var lr=P3e();function Ii(e){return k.forwardRef(e)}function k3e(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.createContext(void 0);i.displayName=r;function o(){var a;const s=k.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}function I3e(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=k.useMemo(()=>$_e(n),[n]);return oe.jsxs(mbe,{theme:i,children:[oe.jsx(M3e,{root:t}),r]})}function M3e({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return oe.jsx(hV,{styles:n=>({[t]:n.__cssVars})})}k3e({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function kUe(){const{colorMode:e}=fS();return oe.jsx(hV,{styles:t=>{const n=QV(t,"styles.global"),r=JV(n,{theme:t,colorMode:e});return r?wV(r)(t):void 0}})}var R3e=(e,t)=>e.find(n=>n.id===t);function P9(e,t){const n=tj(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function tj(e,t){for(const[n,r]of Object.entries(e))if(R3e(r,t))return n}function O3e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function $3e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}function N3e(e,t=[]){const n=k.useRef(e);return k.useEffect(()=>{n.current=e}),k.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function D3e(e,t){const n=N3e(e);k.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function k9(e,t){const n=k.useRef(!1),r=k.useRef(!1);k.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const nj=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),yS=k.createContext({}),Nm=k.createContext(null),vS=typeof document<"u",DT=vS?k.useLayoutEffect:k.useEffect,rj=k.createContext({strict:!1});function L3e(e,t,n,r){const{visualElement:i}=k.useContext(yS),o=k.useContext(rj),a=k.useContext(Nm),s=k.useContext(nj).reducedMotion,l=k.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;k.useInsertionEffect(()=>{u&&u.update(n,a)});const c=k.useRef(!!window.HandoffAppearAnimations);return DT(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),k.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function gd(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F3e(e,t,n){return k.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gd(n)&&(n.current=r))},[t])}function zg(e){return typeof e=="string"||Array.isArray(e)}function bS(e){return typeof e=="object"&&typeof e.start=="function"}const LT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],FT=["initial",...LT];function _S(e){return bS(e.animate)||FT.some(t=>zg(e[t]))}function ij(e){return!!(_S(e)||e.variants)}function B3e(e,t){if(_S(e)){const{initial:n,animate:r}=e;return{initial:n===!1||zg(n)?n:void 0,animate:zg(r)?r:void 0}}return e.inherit!==!1?t:{}}function z3e(e){const{initial:t,animate:n}=B3e(e,k.useContext(yS));return k.useMemo(()=>({initial:t,animate:n}),[I9(t),I9(n)])}function I9(e){return Array.isArray(e)?e.join(" "):e}const M9={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Vg={};for(const e in M9)Vg[e]={isEnabled:t=>M9[e].some(n=>!!t[n])};function V3e(e){for(const t in e)Vg[t]={...Vg[t],...e[t]}}const BT=k.createContext({}),oj=k.createContext({}),j3e=Symbol.for("motionComponentSymbol");function U3e({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&V3e(e);function o(s,l){let u;const c={...k.useContext(nj),...s,layoutId:G3e(s)},{isStatic:d}=c,f=z3e(s),h=r(s,d);if(!d&&vS){f.visualElement=L3e(i,h,c,t);const p=k.useContext(oj),g=k.useContext(rj).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,g,e,p))}return k.createElement(yS.Provider,{value:f},u&&f.visualElement?k.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,s,F3e(h,f.visualElement,l),h,d,f.visualElement))}const a=k.forwardRef(o);return a[j3e]=i,a}function G3e({layoutId:e}){const t=k.useContext(BT).id;return t&&e!==void 0?t+"-"+e:e}function H3e(e){function t(r,i={}){return U3e(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const q3e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zT(e){return typeof e!="string"||e.includes("-")?!1:!!(q3e.indexOf(e)>-1||/[A-Z]/.test(e))}const Y1={};function W3e(e){Object.assign(Y1,e)}const Dm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hc=new Set(Dm);function aj(e,{layout:t,layoutId:n}){return hc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Y1[e]||e==="opacity")}const ai=e=>!!(e&&e.getVelocity),K3e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X3e=Dm.length;function Q3e(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let a=0;at=>typeof t=="string"&&t.startsWith(e),lj=sj("--"),h3=sj("var(--"),Y3e=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Z3e=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ol=(e,t,n)=>Math.min(Math.max(n,e),t),pc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Sp={...pc,transform:e=>Ol(0,1,e)},ty={...pc,default:1},xp=e=>Math.round(e*1e5)/1e5,SS=/(-)?([\d]*\.?[\d])+/g,uj=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,J3e=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Lm(e){return typeof e=="string"}const Fm=e=>({test:t=>Lm(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vs=Fm("deg"),ba=Fm("%"),Re=Fm("px"),e4e=Fm("vh"),t4e=Fm("vw"),R9={...ba,parse:e=>ba.parse(e)/100,transform:e=>ba.transform(e*100)},O9={...pc,transform:Math.round},cj={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,radius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,size:Re,top:Re,right:Re,bottom:Re,left:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,rotate:Vs,rotateX:Vs,rotateY:Vs,rotateZ:Vs,scale:ty,scaleX:ty,scaleY:ty,scaleZ:ty,skew:Vs,skewX:Vs,skewY:Vs,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:Sp,originX:R9,originY:R9,originZ:Re,zIndex:O9,fillOpacity:Sp,strokeOpacity:Sp,numOctaves:O9};function VT(e,t,n,r){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(lj(d)){o[d]=f;continue}const h=cj[d],p=Z3e(f,h);if(hc.has(d)){if(l=!0,a[d]=p,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=p):i[d]=p}if(t.transform||(l||r?i.transform=Q3e(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=s;i.transformOrigin=`${d} ${f} ${h}`}}const jT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dj(e,t,n){for(const r in t)!ai(t[r])&&!aj(r,n)&&(e[r]=t[r])}function n4e({transformTemplate:e},t,n){return k.useMemo(()=>{const r=jT();return VT(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function r4e(e,t,n){const r=e.style||{},i={};return dj(i,r,e),Object.assign(i,n4e(e,t,n)),e.transformValues?e.transformValues(i):i}function i4e(e,t,n){const r={},i=r4e(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const o4e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Z1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||o4e.has(e)}let fj=e=>!Z1(e);function a4e(e){e&&(fj=t=>t.startsWith("on")?!Z1(t):e(t))}try{a4e(require("@emotion/is-prop-valid").default)}catch{}function s4e(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fj(i)||n===!0&&Z1(i)||!t&&!Z1(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function $9(e,t,n){return typeof e=="string"?e:Re.transform(t+n*e)}function l4e(e,t,n){const r=$9(t,e.x,e.width),i=$9(n,e.y,e.height);return`${r} ${i}`}const u4e={offset:"stroke-dashoffset",array:"stroke-dasharray"},c4e={offset:"strokeDashoffset",array:"strokeDasharray"};function d4e(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?u4e:c4e;e[o.offset]=Re.transform(-r);const a=Re.transform(t),s=Re.transform(n);e[o.array]=`${a} ${s}`}function UT(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,d,f){if(VT(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=l4e(g,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&d4e(h,a,s,l,!1)}const hj=()=>({...jT(),attrs:{}}),GT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f4e(e,t,n,r){const i=k.useMemo(()=>{const o=hj();return UT(o,t,{enableHardwareAcceleration:!1},GT(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dj(o,e.style,e),i.style={...o,...i.style}}return i}function h4e(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(zT(n)?f4e:i4e)(r,o,a,n),c={...s4e(r,typeof n=="string",e),...l,ref:i},{children:d}=r,f=k.useMemo(()=>ai(d)?d.get():d,[d]);return k.createElement(n,{...c,children:f})}}const HT=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function pj(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const gj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mj(e,t,n,r){pj(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gj.has(i)?i:HT(i),t.attrs[i])}function qT(e,t){const{style:n}=e,r={};for(const i in n)(ai(n[i])||t.style&&ai(t.style[i])||aj(i,e))&&(r[i]=n[i]);return r}function yj(e,t){const n=qT(e,t);for(const r in e)if(ai(e[r])||ai(t[r])){const i=Dm.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function WT(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function vj(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const J1=e=>Array.isArray(e),p4e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),g4e=e=>J1(e)?e[e.length-1]||0:e;function cv(e){const t=ai(e)?e.get():e;return p4e(t)?t.toValue():t}function m4e({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:y4e(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const bj=e=>(t,n)=>{const r=k.useContext(yS),i=k.useContext(Nm),o=()=>m4e(e,t,r,i);return n?o():vj(o)};function y4e(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=cv(o[f]);let{initial:a,animate:s}=e;const l=_S(e),u=ij(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const d=c?s:a;return d&&typeof d!="boolean"&&!bS(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const p=WT(e,h);if(!p)return;const{transitionEnd:g,transition:_,...b}=p;for(const y in b){let m=b[y];if(Array.isArray(m)){const v=c?m.length-1:0;m=m[v]}m!==null&&(i[y]=m)}for(const y in g)i[y]=g[y]}),i}const cn=e=>e;class N9{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function v4e(e){let t=new N9,n=new N9,r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&a.add(l),f.add(l)&&d&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(d[f]=v4e(()=>n=!0),d),{}),a=d=>o[d].process(i),s=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,b4e),1),i.timestamp=d,i.isProcessing=!0,ny.forEach(a),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:ny.reduce((d,f)=>{const h=o[f];return d[f]=(p,g=!1,_=!1)=>(n||l(),h.schedule(p,g,_)),d},{}),cancel:d=>ny.forEach(f=>o[f].cancel(d)),state:i,steps:o}}const{schedule:Ot,cancel:_s,state:zn,steps:Pw}=_4e(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0),S4e={useVisualState:bj({scrapeMotionValuesFromProps:yj,createRenderState:hj,onMount:(e,t,{renderState:n,latestValues:r})=>{Ot.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ot.render(()=>{UT(n,r,{enableHardwareAcceleration:!1},GT(t.tagName),e.transformTemplate),mj(t,n)})}})},x4e={useVisualState:bj({scrapeMotionValuesFromProps:qT,createRenderState:jT})};function w4e(e,{forwardMotionProps:t=!1},n,r){return{...zT(e)?S4e:x4e,preloadedFeatures:n,useRender:h4e(t),createVisualElement:r,Component:e}}function es(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _j=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xS(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const C4e=e=>t=>_j(t)&&e(t,xS(t));function os(e,t,n,r){return es(e,t,C4e(n),r)}const E4e=(e,t)=>n=>t(e(n)),_l=(...e)=>e.reduce(E4e);function Sj(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const D9=Sj("dragHorizontal"),L9=Sj("dragVertical");function xj(e){let t=!1;if(e==="y")t=L9();else if(e==="x")t=D9();else{const n=D9(),r=L9();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function wj(){const e=xj(!0);return e?(e(),!1):!0}class Xl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function F9(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||wj())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&Ot.update(()=>s[r](o,a))};return os(e.current,n,i,{passive:!e.getProps()[r]})}class T4e extends Xl{mount(){this.unmount=_l(F9(this.node,!0),F9(this.node,!1))}unmount(){}}class A4e extends Xl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_l(es(this.node.current,"focus",()=>this.onFocus()),es(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Cj=(e,t)=>t?e===t?!0:Cj(e,t.parentElement):!1;function kw(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xS(n))}class P4e extends Xl{constructor(){super(...arguments),this.removeStartListeners=cn,this.removeEndListeners=cn,this.removeAccessibleListeners=cn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=os(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Ot.update(()=>{Cj(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),a=os(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_l(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||kw("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Ot.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=es(this.node.current,"keyup",a),kw("down",(s,l)=>{this.startPress(s,l)})},n=es(this.node.current,"keydown",t),r=()=>{this.isPressing&&kw("cancel",(o,a)=>this.cancelPress(o,a))},i=es(this.node.current,"blur",r);this.removeAccessibleListeners=_l(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ot.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!wj()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ot.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=os(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=es(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_l(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const p3=new WeakMap,Iw=new WeakMap,k4e=e=>{const t=p3.get(e.target);t&&t(e)},I4e=e=>{e.forEach(k4e)};function M4e({root:e,...t}){const n=e||document;Iw.has(n)||Iw.set(n,{});const r=Iw.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(I4e,{root:e,...t})),r[i]}function R4e(e,t,n){const r=M4e(t);return p3.set(e,n),r.observe(e),()=>{p3.delete(e),r.unobserve(e)}}const O4e={some:0,all:1};class $4e extends Xl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:O4e[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return R4e(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(N4e(t,n))&&this.startObserver()}unmount(){}}function N4e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D4e={inView:{Feature:$4e},tap:{Feature:P4e},focus:{Feature:A4e},hover:{Feature:T4e}};function Ej(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function F4e(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function wS(e,t,n){const r=e.getProps();return WT(r,t,n!==void 0?n:r.custom,L4e(e),F4e(e))}const B4e="framerAppearId",z4e="data-"+HT(B4e);let V4e=cn,KT=cn;const Sl=e=>e*1e3,as=e=>e/1e3,j4e={current:!1},Tj=e=>Array.isArray(e)&&typeof e[0]=="number";function Aj(e){return!!(!e||typeof e=="string"&&Pj[e]||Tj(e)||Array.isArray(e)&&e.every(Aj))}const Yh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yh([0,.65,.55,1]),circOut:Yh([.55,0,1,.45]),backIn:Yh([.31,.01,.66,-.59]),backOut:Yh([.33,1.53,.69,.99])};function kj(e){if(e)return Tj(e)?Yh(e):Array.isArray(e)?e.map(kj):Pj[e]}function U4e(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=kj(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function G4e(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Ij=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,H4e=1e-7,q4e=12;function W4e(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Ij(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>H4e&&++sW4e(o,0,1,e,n);return o=>o===0||o===1?o:Ij(i(o),t,r)}const K4e=Bm(.42,0,1,1),X4e=Bm(0,0,.58,1),Mj=Bm(.42,0,.58,1),Q4e=e=>Array.isArray(e)&&typeof e[0]!="number",Rj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Oj=e=>t=>1-e(1-t),$j=e=>1-Math.sin(Math.acos(e)),XT=Oj($j),Y4e=Rj(XT),Nj=Bm(.33,1.53,.69,.99),QT=Oj(Nj),Z4e=Rj(QT),J4e=e=>(e*=2)<1?.5*QT(e):.5*(2-Math.pow(2,-10*(e-1))),eEe={linear:cn,easeIn:K4e,easeInOut:Mj,easeOut:X4e,circIn:$j,circInOut:Y4e,circOut:XT,backIn:QT,backInOut:Z4e,backOut:Nj,anticipate:J4e},B9=e=>{if(Array.isArray(e)){KT(e.length===4);const[t,n,r,i]=e;return Bm(t,n,r,i)}else if(typeof e=="string")return eEe[e];return e},YT=(e,t)=>n=>!!(Lm(n)&&J3e.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Dj=(e,t,n)=>r=>{if(!Lm(r))return r;const[i,o,a,s]=r.match(SS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},tEe=e=>Ol(0,255,e),Mw={...pc,transform:e=>Math.round(tEe(e))},$u={test:YT("rgb","red"),parse:Dj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mw.transform(e)+", "+Mw.transform(t)+", "+Mw.transform(n)+", "+xp(Sp.transform(r))+")"};function nEe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const g3={test:YT("#"),parse:nEe,transform:$u.transform},md={test:YT("hsl","hue"),parse:Dj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ba.transform(xp(t))+", "+ba.transform(xp(n))+", "+xp(Sp.transform(r))+")"},Ir={test:e=>$u.test(e)||g3.test(e)||md.test(e),parse:e=>$u.test(e)?$u.parse(e):md.test(e)?md.parse(e):g3.parse(e),transform:e=>Lm(e)?e:e.hasOwnProperty("red")?$u.transform(e):md.transform(e)},Zt=(e,t,n)=>-n*e+n*t+e;function Rw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rEe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Rw(l,s,e+1/3),o=Rw(l,s,e),a=Rw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Ow=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},iEe=[g3,$u,md],oEe=e=>iEe.find(t=>t.test(e));function z9(e){const t=oEe(e);let n=t.parse(e);return t===md&&(n=rEe(n)),n}const Lj=(e,t)=>{const n=z9(e),r=z9(t),i={...n};return o=>(i.red=Ow(n.red,r.red,o),i.green=Ow(n.green,r.green,o),i.blue=Ow(n.blue,r.blue,o),i.alpha=Zt(n.alpha,r.alpha,o),$u.transform(i))};function aEe(e){var t,n;return isNaN(e)&&Lm(e)&&(((t=e.match(SS))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(uj))===null||n===void 0?void 0:n.length)||0)>0}const Fj={regex:Y3e,countKey:"Vars",token:"${v}",parse:cn},Bj={regex:uj,countKey:"Colors",token:"${c}",parse:Ir.parse},zj={regex:SS,countKey:"Numbers",token:"${n}",parse:pc.parse};function $w(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function eb(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&$w(n,Fj),$w(n,Bj),$w(n,zj),n}function Vj(e){return eb(e).values}function jj(e){const{values:t,numColors:n,numVars:r,tokenised:i}=eb(e),o=t.length;return a=>{let s=i;for(let l=0;ltypeof e=="number"?0:e;function lEe(e){const t=Vj(e);return jj(e)(t.map(sEe))}const $l={test:aEe,parse:Vj,createTransformer:jj,getAnimatableNone:lEe},Uj=(e,t)=>n=>`${n>0?t:e}`;function Gj(e,t){return typeof e=="number"?n=>Zt(e,t,n):Ir.test(e)?Lj(e,t):e.startsWith("var(")?Uj(e,t):qj(e,t)}const Hj=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>Gj(o,t[a]));return o=>{for(let a=0;a{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Gj(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},qj=(e,t)=>{const n=$l.createTransformer(t),r=eb(e),i=eb(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_l(Hj(r.values,i.values),n):Uj(e,t)},jg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},V9=(e,t)=>n=>Zt(e,t,n);function cEe(e){return typeof e=="number"?V9:typeof e=="string"?Ir.test(e)?Lj:qj:Array.isArray(e)?Hj:typeof e=="object"?uEe:V9}function dEe(e,t,n){const r=[],i=n||cEe(e[0]),o=e.length-1;for(let a=0;at[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=dEe(t,r,i),s=a.length,l=u=>{let c=0;if(s>1)for(;cl(Ol(e[0],e[o-1],u)):l}function fEe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=jg(0,t,r);e.push(Zt(n,1,i))}}function hEe(e){const t=[0];return fEe(t,e.length-1),t}function pEe(e,t){return e.map(n=>n*t)}function gEe(e,t){return e.map(()=>t||Mj).splice(0,e.length-1)}function tb({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Q4e(r)?r.map(B9):B9(r),o={done:!1,value:t[0]},a=pEe(n&&n.length===t.length?n:hEe(t),e),s=Wj(a,t,{ease:Array.isArray(i)?i:gEe(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}function Kj(e,t){return t?e*(1e3/t):0}const mEe=5;function Xj(e,t,n){const r=Math.max(t-mEe,0);return Kj(n-e(r),t-r)}const Nw=.001,yEe=.01,j9=10,vEe=.05,bEe=1;function _Ee({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;V4e(e<=Sl(j9));let a=1-t;a=Ol(vEe,bEe,a),e=Ol(yEe,j9,as(e)),a<1?(i=u=>{const c=u*a,d=c*e,f=c-n,h=m3(u,a),p=Math.exp(-d);return Nw-f/h*p},o=u=>{const d=u*a*e,f=d*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=m3(Math.pow(u,2),a);return(-i(u)+Nw>0?-1:1)*((f-h)*p)/g}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Nw+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=xEe(i,o,s);if(e=Sl(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const SEe=12;function xEe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function EEe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!U9(e,CEe)&&U9(e,wEe)){const n=_Ee(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Qj({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=EEe(r),h=c?-as(c):0,p=l/(2*Math.sqrt(s*u)),g=o-i,_=as(Math.sqrt(s/u)),b=Math.abs(g)<5;n||(n=b?.01:2),t||(t=b?.005:.5);let y;if(p<1){const m=m3(_,p);y=v=>{const S=Math.exp(-p*_*v);return o-S*((h+p*_*g)/m*Math.sin(m*v)+g*Math.cos(m*v))}}else if(p===1)y=m=>o-Math.exp(-_*m)*(g+(h+_*g)*m);else{const m=_*Math.sqrt(p*p-1);y=v=>{const S=Math.exp(-p*_*v),w=Math.min(m*v,300);return o-S*((h+p*_*g)*Math.sinh(w)+m*g*Math.cosh(w))/m}}return{calculatedDuration:f&&d||null,next:m=>{const v=y(m);if(f)a.done=m>=d;else{let S=h;m!==0&&(p<1?S=Xj(y,m,v):S=0);const w=Math.abs(S)<=n,C=Math.abs(o-v)<=t;a.done=w&&C}return a.value=a.done?o:v,a}}}function G9({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=x=>s!==void 0&&xl,p=x=>s===void 0?l:l===void 0||Math.abs(s-x)-g*Math.exp(-x/r),m=x=>b+y(x),v=x=>{const P=y(x),E=m(x);f.done=Math.abs(P)<=u,f.value=f.done?b:E};let S,w;const C=x=>{h(f.value)&&(S=x,w=Qj({keyframes:[f.value,p(f.value)],velocity:Xj(m,x,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:x=>{let P=!1;return!w&&S===void 0&&(P=!0,v(x),C(x)),S!==void 0&&x>S?w.next(x-S):(!P&&v(x),f)}}}const TEe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ot.update(t,!0),stop:()=>_s(t),now:()=>zn.isProcessing?zn.timestamp:performance.now()}},H9=2e4;function q9(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=H9?1/0:t}const AEe={decay:G9,inertia:G9,tween:tb,keyframes:tb,spring:Qj};function nb({autoplay:e=!0,delay:t=0,driver:n=TEe,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let h=1,p=!1,g,_;const b=()=>{_=new Promise(B=>{g=B})};b();let y;const m=AEe[i]||tb;let v;m!==tb&&typeof r[0]!="number"&&(v=Wj([0,100],r,{clamp:!1}),r=[0,100]);const S=m({...f,keyframes:r});let w;s==="mirror"&&(w=m({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let C="idle",x=null,P=null,E=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=q9(S));const{calculatedDuration:I}=S;let N=1/0,M=1/0;I!==null&&(N=I+a,M=N*(o+1)-a);let T=0;const A=B=>{if(P===null)return;h>0&&(P=Math.min(P,B)),h<0&&(P=Math.min(B-M/h,P)),x!==null?T=x:T=Math.round(B-P)*h;const U=T-t*(h>=0?1:-1),j=h>=0?U<0:U>M;T=Math.max(U,0),C==="finished"&&x===null&&(T=M);let q=T,Y=S;if(o){const ee=T/N;let re=Math.floor(ee),fe=ee%1;!fe&&ee>=1&&(fe=1),fe===1&&re--,re=Math.min(re,o+1);const Se=!!(re%2);Se&&(s==="reverse"?(fe=1-fe,a&&(fe-=a/N)):s==="mirror"&&(Y=w));let Me=Ol(0,1,fe);T>M&&(Me=s==="reverse"&&Se?1:0),q=Me*N}const Z=j?{done:!1,value:r[0]}:Y.next(q);v&&(Z.value=v(Z.value));let{done:V}=Z;!j&&I!==null&&(V=h>=0?T>=M:T<=0);const K=x===null&&(C==="finished"||C==="running"&&V);return d&&d(Z.value),K&&$(),Z},R=()=>{y&&y.stop(),y=void 0},D=()=>{C="idle",R(),g(),b(),P=E=null},$=()=>{C="finished",c&&c(),R(),g()},L=()=>{if(p)return;y||(y=n(A));const B=y.now();l&&l(),x!==null?P=B-x:(!P||C==="finished")&&(P=B),C==="finished"&&b(),E=P,x=null,C="running",y.start()};e&&L();const O={then(B,U){return _.then(B,U)},get time(){return as(T)},set time(B){B=Sl(B),T=B,x!==null||!y||h===0?x=B:P=y.now()-B/h},get duration(){const B=S.calculatedDuration===null?q9(S):S.calculatedDuration;return as(B)},get speed(){return h},set speed(B){B===h||!y||(h=B,O.time=as(T))},get state(){return C},play:L,pause:()=>{C="paused",x=T},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),D())},cancel:()=>{E!==null&&A(E),D()},complete:()=>{C="finished"},sample:B=>(P=0,A(B))};return O}function PEe(e){let t;return()=>(t===void 0&&(t=e()),t)}const kEe=PEe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),IEe=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ry=10,MEe=2e4,REe=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Aj(t.ease);function OEe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(kEe()&&IEe.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,s,l;const u=()=>{l=new Promise(y=>{s=y})};u();let{keyframes:c,duration:d=300,ease:f,times:h}=i;if(REe(t,i)){const y=nb({...i,repeat:0,delay:0});let m={done:!1,value:c[0]};const v=[];let S=0;for(;!m.done&&Sp.cancel(),_=()=>{Ot.update(g),s(),u()};return p.onfinish=()=>{e.set(G4e(c,i)),r&&r(),_()},{then(y,m){return l.then(y,m)},attachTimeline(y){return p.timeline=y,p.onfinish=null,cn},get time(){return as(p.currentTime||0)},set time(y){p.currentTime=Sl(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return as(d)},play:()=>{a||(p.play(),_s(g))},pause:()=>p.pause(),stop:()=>{if(a=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const m=nb({...i,autoplay:!1});e.setWithVelocity(m.sample(y-ry).value,m.sample(y).value,ry)}_()},complete:()=>p.finish(),cancel:_}}function $Ee({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:cn,pause:cn,stop:cn,then:o=>(o(),Promise.resolve()),cancel:cn,complete:cn});return t?nb({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const NEe={type:"spring",stiffness:500,damping:25,restSpeed:10},DEe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LEe={type:"keyframes",duration:.8},FEe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BEe=(e,{keyframes:t})=>t.length>2?LEe:hc.has(e)?e.startsWith("scale")?DEe(t[1]):NEe:FEe,y3=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($l.test(t)||t==="0")&&!t.startsWith("url(")),zEe=new Set(["brightness","contrast","saturate","opacity"]);function VEe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(SS)||[];if(!r)return e;const i=n.replace(r,"");let o=zEe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const jEe=/([a-z-]*)\(.*?\)/g,v3={...$l,getAnimatableNone:e=>{const t=e.match(jEe);return t?t.map(VEe).join(" "):e}},UEe={...cj,color:Ir,backgroundColor:Ir,outlineColor:Ir,fill:Ir,stroke:Ir,borderColor:Ir,borderTopColor:Ir,borderRightColor:Ir,borderBottomColor:Ir,borderLeftColor:Ir,filter:v3,WebkitFilter:v3},ZT=e=>UEe[e];function Yj(e,t){let n=ZT(e);return n!==v3&&(n=$l),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Zj=e=>/^0[^.\s]+$/.test(e);function GEe(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Zj(e)}function HEe(e,t,n,r){const i=y3(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const a=r.from!==void 0?r.from:e.get();let s;const l=[];for(let u=0;ui=>{const o=Jj(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Sl(a);const l=HEe(t,e,n,o),u=l[0],c=l[l.length-1],d=y3(e,u),f=y3(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-s,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(qEe(o)||(h={...h,...BEe(e,h)}),h.duration&&(h.duration=Sl(h.duration)),h.repeatDelay&&(h.repeatDelay=Sl(h.repeatDelay)),!d||!f||j4e.current||o.type===!1)return $Ee(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=OEe(t,e,h);if(p)return p}return nb(h)};function rb(e){return!!(ai(e)&&e.add)}const eU=e=>/^\-?\d*\.?\d+$/.test(e);function eA(e,t){e.indexOf(t)===-1&&e.push(t)}function tA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class nA{constructor(){this.subscriptions=[]}add(t){return eA(this.subscriptions,t),()=>tA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class KEe{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:a}=zn;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,Ot.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Ot.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=WEe(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new nA);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Kj(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wf(e,t){return new KEe(e,t)}const tU=e=>t=>t.test(e),XEe={test:e=>e==="auto",parse:e=>e},nU=[pc,Re,ba,Vs,t4e,e4e,XEe],Sh=e=>nU.find(tU(e)),QEe=[...nU,Ir,$l],YEe=e=>QEe.find(tU(e));function ZEe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wf(n))}function JEe(e,t){const n=wS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=g4e(o[a]);ZEe(e,a,s)}}function eTe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;sl.remove(d))),u.push(g)}return a&&Promise.all(u).then(()=>{a&&JEe(e,a)}),u}function b3(e,t,n={}){const r=wS(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(rU(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return iTe(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function iTe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(oTe).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(b3(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function oTe(e,t){return e.sortNodePosition(t)}function aTe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>b3(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=b3(e,t,n);else{const i=typeof t=="function"?wS(e,t,n.custom):t;r=Promise.all(rU(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const sTe=[...LT].reverse(),lTe=LT.length;function uTe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>aTe(e,n,r)))}function cTe(e){let t=uTe(e);const n=fTe();let r=!0;const i=(l,u)=>{const c=wS(e,u);if(c){const{transition:d,transitionEnd:f,...h}=c;l={...l,...h,...f}}return l};function o(l){t=l(e)}function a(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},g=1/0;for(let b=0;bg&&S;const E=Array.isArray(v)?v:[v];let I=E.reduce(i,{});w===!1&&(I={});const{prevResolvedValues:N={}}=m,M={...N,...I},T=A=>{P=!0,h.delete(A),m.needsAnimating[A]=!0};for(const A in M){const R=I[A],D=N[A];p.hasOwnProperty(A)||(R!==D?J1(R)&&J1(D)?!Ej(R,D)||x?T(A):m.protectedKeys[A]=!0:R!==void 0?T(A):h.add(A):R!==void 0&&h.has(A)?T(A):m.protectedKeys[A]=!0)}m.prevProp=v,m.prevResolvedValues=I,m.isActive&&(p={...p,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&!C&&f.push(...E.map(A=>({animation:A,options:{type:y,...l}})))}if(h.size){const b={};h.forEach(y=>{const m=e.getBaseTarget(y);m!==void 0&&(b[y]=m)}),f.push({animation:b})}let _=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(f):Promise.resolve()}function s(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=a(c,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function dTe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ej(t,e):!1}function uu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fTe(){return{animate:uu(!0),whileInView:uu(),whileHover:uu(),whileTap:uu(),whileDrag:uu(),whileFocus:uu(),exit:uu()}}class hTe extends Xl{constructor(t){super(t),t.animationState||(t.animationState=cTe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),bS(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let pTe=0;class gTe extends Xl{constructor(){super(...arguments),this.id=pTe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const mTe={animation:{Feature:hTe},exit:{Feature:gTe}},W9=(e,t)=>Math.abs(e-t);function yTe(e,t){const n=W9(e.x,t.x),r=W9(e.y,t.y);return Math.sqrt(n**2+r**2)}class iU{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lw(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=yTe(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:h}=zn;this.history.push({...f,timestamp:h});const{onStart:p,onMove:g}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Dw(c,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=Lw(u.type==="pointercancel"?this.lastMoveEventInfo:Dw(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!_j(t))return;this.handlers=n,this.transformPagePoint=r;const i=xS(t),o=Dw(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=zn;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Lw(o,this.history)),this.removeListeners=_l(os(window,"pointermove",this.handlePointerMove),os(window,"pointerup",this.handlePointerUp),os(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_s(this.updatePoint)}}function Dw(e,t){return t?{point:t(e.point)}:e}function K9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lw({point:e},t){return{point:e,delta:K9(e,oU(t)),offset:K9(e,vTe(t)),velocity:bTe(t,.1)}}function vTe(e){return e[0]}function oU(e){return e[e.length-1]}function bTe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=oU(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Sl(t)));)n--;if(!r)return{x:0,y:0};const o=as(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ti(e){return e.max-e.min}function _3(e,t=0,n=.01){return Math.abs(e-t)<=n}function X9(e,t,n,r=.5){e.origin=r,e.originPoint=Zt(t.min,t.max,e.origin),e.scale=Ti(n)/Ti(t),(_3(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Zt(n.min,n.max,e.origin)-e.originPoint,(_3(e.translate)||isNaN(e.translate))&&(e.translate=0)}function wp(e,t,n,r){X9(e.x,t.x,n.x,r?r.originX:void 0),X9(e.y,t.y,n.y,r?r.originY:void 0)}function Q9(e,t,n){e.min=n.min+t.min,e.max=e.min+Ti(t)}function _Te(e,t,n){Q9(e.x,t.x,n.x),Q9(e.y,t.y,n.y)}function Y9(e,t,n){e.min=t.min-n.min,e.max=e.min+Ti(t)}function Cp(e,t,n){Y9(e.x,t.x,n.x),Y9(e.y,t.y,n.y)}function STe(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Zt(n,e,r.max):Math.min(e,n)),e}function Z9(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function xTe(e,{top:t,left:n,bottom:r,right:i}){return{x:Z9(e.x,n,i),y:Z9(e.y,t,r)}}function J9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=jg(t.min,t.max-r,e.min):r>i&&(n=jg(e.min,e.max-i,t.min)),Ol(0,1,n)}function ETe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const S3=.35;function TTe(e=S3){return e===!1?e=0:e===!0&&(e=S3),{x:eM(e,"left","right"),y:eM(e,"top","bottom")}}function eM(e,t,n){return{min:tM(e,t),max:tM(e,n)}}function tM(e,t){return typeof e=="number"?e:e[t]||0}const nM=()=>({translate:0,scale:1,origin:0,originPoint:0}),yd=()=>({x:nM(),y:nM()}),rM=()=>({min:0,max:0}),xn=()=>({x:rM(),y:rM()});function Xo(e){return[e("x"),e("y")]}function aU({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ATe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function PTe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fw(e){return e===void 0||e===1}function x3({scale:e,scaleX:t,scaleY:n}){return!Fw(e)||!Fw(t)||!Fw(n)}function vu(e){return x3(e)||sU(e)||e.z||e.rotate||e.rotateX||e.rotateY}function sU(e){return iM(e.x)||iM(e.y)}function iM(e){return e&&e!=="0%"}function ib(e,t,n){const r=e-n,i=t*r;return n+i}function oM(e,t,n,r,i){return i!==void 0&&(e=ib(e,i,r)),ib(e,n,r)+t}function w3(e,t=0,n=1,r,i){e.min=oM(e.min,t,n,r,i),e.max=oM(e.max,t,n,r,i)}function lU(e,{x:t,y:n}){w3(e.x,t.translate,t.scale,t.originPoint),w3(e.y,n.translate,n.scale,n.originPoint)}function kTe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Ks(e,t){e.min=e.min+t,e.max=e.max+t}function sM(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Zt(e.min,e.max,o);w3(e,t[n],t[r],a,t.scale)}const ITe=["x","scaleX","originX"],MTe=["y","scaleY","originY"];function vd(e,t){sM(e.x,t,ITe),sM(e.y,t,MTe)}function uU(e,t){return aU(PTe(e.getBoundingClientRect(),t))}function RTe(e,t,n){const r=uU(e,n),{scroll:i}=t;return i&&(Ks(r.x,i.offset.x),Ks(r.y,i.offset.y)),r}const OTe=new WeakMap;class $Te{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(xS(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xj(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xo(p=>{let g=this.getAxisMotionValue(p).get()||0;if(ba.test(g)){const{projection:_}=this.visualElement;if(_&&_.layout){const b=_.layout.layoutBox[p];b&&(g=Ti(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&Ot.update(()=>f(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(d&&this.currentDirection===null){this.currentDirection=NTe(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new iU(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Ot.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!iy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=STe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&gd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=xTe(r.layoutBox,t):this.constraints=!1,this.elastic=TTe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xo(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ETe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gd(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=RTe(r,i.root,this.visualElement.getTransformPagePoint());let a=wTe(i.layout.layoutBox,o);if(n){const s=n(ATe(a));this.hasMutatedConstraints=!!s,s&&(a=aU(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Xo(c=>{if(!iy(c,n,this.currentDirection))return;let d=l&&l[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(JT(t,r,0,n))}stopAnimation(){Xo(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xo(n=>{const{drag:r}=this.getProps();if(!iy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Zt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gd(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xo(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();i[a]=CTe({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xo(a=>{if(!iy(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Zt(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;OTe.set(this.visualElement,this);const t=this.visualElement.current,n=os(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();gd(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=es(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xo(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=S3,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function iy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NTe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class DTe extends Xl{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new $Te(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const lM=e=>(t,n)=>{e&&Ot.update(()=>e(t,n))};class LTe extends Xl{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new iU(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:lM(t),onStart:lM(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Ot.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=os(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function FTe(){const e=k.useContext(Nm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=k.useId();return k.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function BTe(){return zTe(k.useContext(Nm))}function zTe(e){return e===null?!0:e.isPresent}const dv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Re.test(e))e=parseFloat(e);else return e;const n=uM(e,t.target.x),r=uM(e,t.target.y);return`${n}% ${r}%`}},VTe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$l.parse(e);if(i.length>5)return r;const o=$l.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Zt(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}};class jTe extends J.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;W3e(UTe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),dv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ot.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cU(e){const[t,n]=FTe(),r=k.useContext(BT);return J.createElement(jTe,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(oj),isPresent:t,safeToRemove:n})}const UTe={borderRadius:{...xh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xh,borderTopRightRadius:xh,borderBottomLeftRadius:xh,borderBottomRightRadius:xh,boxShadow:VTe},dU=["TopLeft","TopRight","BottomLeft","BottomRight"],GTe=dU.length,cM=e=>typeof e=="string"?parseFloat(e):e,dM=e=>typeof e=="number"||Re.test(e);function HTe(e,t,n,r,i,o){i?(e.opacity=Zt(0,n.opacity!==void 0?n.opacity:1,qTe(r)),e.opacityExit=Zt(t.opacity!==void 0?t.opacity:1,0,WTe(r))):o&&(e.opacity=Zt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(jg(e,t,r))}function hM(e,t){e.min=t.min,e.max=t.max}function Li(e,t){hM(e.x,t.x),hM(e.y,t.y)}function pM(e,t,n,r,i){return e-=t,e=ib(e,1/n,r),i!==void 0&&(e=ib(e,1/i,r)),e}function KTe(e,t=0,n=1,r=.5,i,o=e,a=e){if(ba.test(t)&&(t=parseFloat(t),t=Zt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Zt(o.min,o.max,r);e===o&&(s-=t),e.min=pM(e.min,t,n,s,i),e.max=pM(e.max,t,n,s,i)}function gM(e,t,[n,r,i],o,a){KTe(e,t[n],t[r],t[i],t.scale,o,a)}const XTe=["x","scaleX","originX"],QTe=["y","scaleY","originY"];function mM(e,t,n,r){gM(e.x,t,XTe,n?n.x:void 0,r?r.x:void 0),gM(e.y,t,QTe,n?n.y:void 0,r?r.y:void 0)}function yM(e){return e.translate===0&&e.scale===1}function hU(e){return yM(e.x)&&yM(e.y)}function YTe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function pU(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function vM(e){return Ti(e.x)/Ti(e.y)}class ZTe{constructor(){this.members=[]}add(t){eA(this.members,t),t.scheduleRender()}remove(t){if(tA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bM(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const JTe=(e,t)=>e.depth-t.depth;class eAe{constructor(){this.children=[],this.isDirty=!1}add(t){eA(this.children,t),this.isDirty=!0}remove(t){tA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(JTe),this.isDirty=!1,this.children.forEach(t)}}function tAe(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(_s(r),e(o-t))};return Ot.read(r,!0),()=>_s(r)}function nAe(e){window.MotionDebug&&window.MotionDebug.record(e)}function rAe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function iAe(e,t,n){const r=ai(e)?e:wf(e);return r.start(JT("",r,t,n)),r.animation}const _M=["","X","Y","Z"],SM=1e3;let oAe=0;const bu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function gU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=oAe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{bu.totalNodes=bu.resolvedTargetDeltas=bu.recalculatedProjection=0,this.nodes.forEach(lAe),this.nodes.forEach(hAe),this.nodes.forEach(pAe),this.nodes.forEach(uAe),nAe(bu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=tAe(f,250),dv.hasAnimatedSinceResize&&(dv.hasAnimatedSinceResize=!1,this.nodes.forEach(wM))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||bAe,{onLayoutAnimationStart:_,onLayoutAnimationComplete:b}=c.getProps(),y=!this.targetLayout||!pU(this.targetLayout,p)||h,m=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||m||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,m);const v={...Jj(g,"layout"),onPlay:_,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else f||wM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_s(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gAe),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(cAe),this.sharedNodes.forEach(mAe)}scheduleUpdateProjection(){Ot.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=v/1e3;CM(d.x,a.x,S),CM(d.y,a.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cp(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yAe(this.relativeTarget,this.relativeTargetOrigin,f,S),m&&YTe(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=xn()),Li(m,this.relativeTarget)),g&&(this.animationValues=c,HTe(c,u,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_s(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ot.update(()=>{dv.hasAnimatedSinceResize=!0,this.currentAnimation=iAe(0,SM,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(SM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&mU(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||xn();const d=Ti(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=Ti(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Li(s,l),vd(s,c),wp(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new ZTe),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c<_M.length;c++){const d="rotate"+_M[c];l[d]&&(u[d]=l[d],a.setStaticValue(d,0))}a.render();for(const c in u)a.setStaticValue(c,u[c]);a.scheduleRender()}getProjectionStyles(a={}){var s,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=cv(a.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=cv(a.pointerEvents)||""),this.hasProjected&&!vu(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=bM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Y1){if(f[g]===void 0)continue;const{correct:_,applyTo:b}=Y1[g],y=u.transform==="none"?f[g]:_(f[g],d);if(b){const m=b.length;for(let v=0;v{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xM),this.root.sharedNodes.clear()}}}function aAe(e){e.updateLayout()}function sAe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?Xo(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ti(f);f.min=r[d].min,f.max=f.min+h}):mU(o,n.layoutBox,r)&&Xo(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ti(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=yd();wp(s,r,n.layoutBox);const l=yd();a?wp(l,e.applyTransform(i,!0),n.measuredBox):wp(l,r,n.layoutBox);const u=!hU(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=xn();Cp(p,n.layoutBox,f.layoutBox);const g=xn();Cp(g,r,h.layoutBox),pU(p,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lAe(e){bu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uAe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cAe(e){e.clearSnapshot()}function xM(e){e.clearMeasurements()}function dAe(e){e.isLayoutDirty=!1}function fAe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hAe(e){e.resolveTargetDelta()}function pAe(e){e.calcProjection()}function gAe(e){e.resetRotation()}function mAe(e){e.removeLeadSnapshot()}function CM(e,t,n){e.translate=Zt(t.translate,0,n),e.scale=Zt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function EM(e,t,n,r){e.min=Zt(t.min,n.min,r),e.max=Zt(t.max,n.max,r)}function yAe(e,t,n,r){EM(e.x,t.x,n.x,r),EM(e.y,t.y,n.y,r)}function vAe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bAe={duration:.45,ease:[.4,0,.1,1]},TM=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),AM=TM("applewebkit/")&&!TM("chrome/")?Math.round:cn;function PM(e){e.min=AM(e.min),e.max=AM(e.max)}function _Ae(e){PM(e.x),PM(e.y)}function mU(e,t,n){return e==="position"||e==="preserve-aspect"&&!_3(vM(t),vM(n),.2)}const SAe=gU({attachResizeListener:(e,t)=>es(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bw={current:void 0},yU=gU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bw.current){const e=new SAe({});e.mount(window),e.setOptions({layoutScroll:!0}),Bw.current=e}return Bw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xAe={pan:{Feature:LTe},drag:{Feature:DTe,ProjectionNode:yU,MeasureLayout:cU}},wAe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function CAe(e){const t=wAe.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function C3(e,t,n=1){const[r,i]=CAe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return eU(a)?parseFloat(a):a}else return h3(i)?C3(i,t,n+1):i}function EAe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!h3(o))return;const a=C3(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!h3(o))continue;const a=C3(o,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const TAe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),vU=e=>TAe.has(e),AAe=e=>Object.keys(e).some(vU),kM=e=>e===pc||e===Re,IM=(e,t)=>parseFloat(e.split(", ")[t]),MM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return IM(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?IM(o[1],e):0}},PAe=new Set(["x","y","z"]),kAe=Dm.filter(e=>!PAe.has(e));function IAe(e){const t=[];return kAe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Cf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:MM(4,13),y:MM(5,14)};Cf.translateX=Cf.x;Cf.translateY=Cf.y;const MAe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=Cf[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=Cf[u](l,o)}),e},RAe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(vU);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=Sh(c);const f=t[l];let h;if(J1(f)){const p=f.length,g=f[0]===null?1:0;c=f[g],d=Sh(c);for(let _=g;_=0?window.pageYOffset:null,u=MAe(t,e,s);return o.length&&o.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),vS&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function OAe(e,t,n,r){return AAe(t)?RAe(e,t,n,r):{target:t,transitionEnd:r}}const $Ae=(e,t,n,r)=>{const i=EAe(e,t,r);return t=i.target,r=i.transitionEnd,OAe(e,t,n,r)},E3={current:null},bU={current:!1};function NAe(){if(bU.current=!0,!!vS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>E3.current=e.matches;e.addListener(t),t()}else E3.current=!1}function DAe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ai(o))e.addValue(i,o),rb(r)&&r.add(i);else if(ai(a))e.addValue(i,wf(o,{owner:e})),rb(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,wf(s!==void 0?s:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const RM=new WeakMap,_U=Object.keys(Vg),LAe=_U.length,OM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],FAe=FT.length;class BAe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ot.render(this.render,!1,!0);const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=_S(n),this.isVariantNode=ij(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];s[d]!==void 0&&ai(f)&&(f.set(s[d],!1),rb(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,RM.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),bU.current||NAe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:E3.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){RM.delete(this.current),this.projection&&this.projection.unmount(),_s(this.notifyUpdate),_s(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=hc.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ot.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let a,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wf(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=WT(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ai(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new nA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class SU extends BAe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=nTe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){eTe(this,r,a);const s=$Ae(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function zAe(e){return window.getComputedStyle(e)}class VAe extends SU{readValueFromInstance(t,n){if(hc.has(n)){const r=ZT(n);return r&&r.default||0}else{const r=zAe(t),i=(lj(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uU(t,n)}build(t,n,r,i){VT(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return qT(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){pj(t,n,r,i)}}class jAe extends SU{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hc.has(n)){const r=ZT(n);return r&&r.default||0}return n=gj.has(n)?n:HT(n),t.getAttribute(n)}measureInstanceViewportBox(){return xn()}scrapeMotionValuesFromProps(t,n){return yj(t,n)}build(t,n,r,i){UT(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){mj(t,n,r,i)}mount(t){this.isSVGTag=GT(t.tagName),super.mount(t)}}const UAe=(e,t)=>zT(e)?new jAe(t,{enableHardwareAcceleration:!1}):new VAe(t,{enableHardwareAcceleration:!0}),GAe={layout:{ProjectionNode:yU,MeasureLayout:cU}},HAe={...mTe,...D4e,...xAe,...GAe},xU=H3e((e,t)=>w4e(e,t,HAe,UAe));function wU(){const e=k.useRef(!1);return DT(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function qAe(){const e=wU(),[t,n]=k.useState(0),r=k.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.useCallback(()=>Ot.postRender(r),[r]),t]}class WAe extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function KAe({children:e,isPresent:t}){const n=k.useId(),r=k.useRef(null),i=k.useRef({width:0,height:0,top:0,left:0});return k.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),k.createElement(WAe,{isPresent:t,childRef:r,sizeRef:i},k.cloneElement(e,{ref:r}))}const zw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=vj(XAe),l=k.useId(),u=k.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c=>{s.set(c,!0);for(const d of s.values())if(!d)return;r&&r()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?void 0:[n]);return k.useMemo(()=>{s.forEach((c,d)=>s.set(d,!1))},[n]),k.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=k.createElement(KAe,{isPresent:n},e)),k.createElement(Nm.Provider,{value:u},e)};function XAe(){return new Map}function QAe(e){return k.useEffect(()=>()=>e(),[])}const Wc=e=>e.key||"";function YAe(e,t){e.forEach(n=>{const r=Wc(n);t.set(r,n)})}function ZAe(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const CU=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=k.useContext(BT).forceRender||qAe()[0],l=wU(),u=ZAe(e);let c=u;const d=k.useRef(new Map).current,f=k.useRef(c),h=k.useRef(new Map).current,p=k.useRef(!0);if(DT(()=>{p.current=!1,YAe(u,h),f.current=c}),QAe(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return k.createElement(k.Fragment,null,c.map(y=>k.createElement(zw,{key:Wc(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},y)));c=[...c];const g=f.current.map(Wc),_=u.map(Wc),b=g.length;for(let y=0;y{if(_.indexOf(m)!==-1)return;const v=h.get(m);if(!v)return;const S=g.indexOf(m);let w=y;if(!w){const C=()=>{h.delete(m),d.delete(m);const x=f.current.findIndex(P=>P.key===m);if(f.current.splice(x,1),!d.size){if(f.current=u,l.current===!1)return;s(),r&&r()}};w=k.createElement(zw,{key:Wc(v),isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:o,mode:a},v),d.set(m,w)}c.splice(S,0,w)}),c=c.map(y=>{const m=y.key;return d.has(m)?y:k.createElement(zw,{key:Wc(y),isPresent:!0,presenceAffectsLayout:o,mode:a},y)}),k.createElement(k.Fragment,null,d.size?c:c.map(y=>k.cloneElement(y)))};var JAe={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},EU=k.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=JAe,toastSpacing:c="0.5rem"}=e,[d,f]=k.useState(s),h=BTe();k9(()=>{h||r==null||r()},[h]),k9(()=>{f(s)},[s]);const p=()=>f(null),g=()=>f(s),_=()=>{h&&i()};k.useEffect(()=>{h&&o&&i()},[h,o,i]),D3e(_,d);const b=k.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),y=k.useMemo(()=>O3e(a),[a]);return oe.jsx(xU.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:a},style:y,children:oe.jsx(lr.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:b,children:ua(n,{id:t,onClose:_})})})});EU.displayName="ToastComponent";function ePe(e,t){var n;const r=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var $M={path:oe.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[oe.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),oe.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),oe.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},zm=Ii((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,c=Kl("chakra-icon",s),d=$m("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...d},h={ref:t,focusable:o,className:c,__css:f},p=r??$M.viewBox;if(n&&typeof n!="string")return oe.jsx(lr.svg,{as:n,...h,...u});const g=a??$M.path;return oe.jsx(lr.svg,{verticalAlign:"middle",viewBox:p,...h,...u,children:g})});zm.displayName="Icon";function tPe(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function nPe(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function NM(e){return oe.jsx(zm,{viewBox:"0 0 24 24",...e,children:oe.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var rPe=vbe({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),rA=Ii((e,t)=>{const n=$m("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Rm(e),u=Kl("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${rPe} ${o} linear infinite`,...n};return oe.jsx(lr.div,{ref:t,__css:c,className:u,...l,children:r&&oe.jsx(lr.span,{srOnly:!0,children:r})})});rA.displayName="Spinner";var[iPe,iA]=Mm({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[oPe,oA]=Mm({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),TU={info:{icon:nPe,colorScheme:"blue"},warning:{icon:NM,colorScheme:"orange"},success:{icon:tPe,colorScheme:"green"},error:{icon:NM,colorScheme:"red"},loading:{icon:rA,colorScheme:"blue"}};function aPe(e){return TU[e].colorScheme}function sPe(e){return TU[e].icon}var AU=Ii(function(t,n){const r=oA(),{status:i}=iA(),o={display:"inline",...r.description};return oe.jsx(lr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__desc",t.className),__css:o})});AU.displayName="AlertDescription";function PU(e){const{status:t}=iA(),n=sPe(t),r=oA(),i=t==="loading"?r.spinner:r.icon;return oe.jsx(lr.span,{display:"inherit","data-status":t,...e,className:Kl("chakra-alert__icon",e.className),__css:i,children:e.children||oe.jsx(n,{h:"100%",w:"100%"})})}PU.displayName="AlertIcon";var kU=Ii(function(t,n){const r=oA(),{status:i}=iA();return oe.jsx(lr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__title",t.className),__css:r.title})});kU.displayName="AlertTitle";var IU=Ii(function(t,n){var r;const{status:i="info",addRole:o=!0,...a}=Rm(t),s=(r=t.colorScheme)!=null?r:aPe(i),l=h3e("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return oe.jsx(iPe,{value:{status:i},children:oe.jsx(oPe,{value:l,children:oe.jsx(lr.div,{"data-status":i,role:o?"alert":void 0,ref:n,...a,className:Kl("chakra-alert",t.className),__css:u})})})});IU.displayName="Alert";function lPe(e){return oe.jsx(zm,{focusable:"false","aria-hidden":!0,...e,children:oe.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var MU=Ii(function(t,n){const r=$m("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Rm(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return oe.jsx(lr.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s,children:i||oe.jsx(lPe,{width:"1em",height:"1em"})})});MU.displayName="CloseButton";var uPe={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ia=cPe(uPe);function cPe(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=dPe(i,o),{position:s,id:l}=a;return r(u=>{var c,d;const h=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(d=u[s])!=null?d:[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=P9(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:RU(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=tj(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>!!P9(ia.getState(),i).position}}var DM=0;function dPe(e,t={}){var n,r;DM+=1;const i=(n=t.id)!=null?n:DM,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ia.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var fPe=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return oe.jsxs(IU,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[oe.jsx(PU,{children:u}),oe.jsxs(lr.div,{flex:"1",maxWidth:"100%",children:[i&&oe.jsx(kU,{id:c==null?void 0:c.title,children:i}),s&&oe.jsx(AU,{id:c==null?void 0:c.description,display:"block",children:s})]}),o&&oe.jsx(MU,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function RU(e={}){const{render:t,toastComponent:n=fPe}=e;return i=>typeof t=="function"?t({...i,...e}):oe.jsx(n,{...i,...e})}function OU(e,t){const n=i=>{var o;return{...t,...i,position:ePe((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=RU(o);return ia.notify(a,o)};return r.update=(i,o)=>{ia.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...ua(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...ua(o.error,s)}))},r.closeAll=ia.closeAll,r.close=ia.close,r.isActive=ia.isActive,r}var[MUe,hPe]=Mm({name:"ToastOptionsContext",strict:!1}),pPe=e=>{const t=k.useSyncExternalStore(ia.subscribe,ia.getState,ia.getState),{motionVariants:n,component:r=EU,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return oe.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${s}`,id:`chakra-toast-manager-${s}`,style:$3e(s),children:oe.jsx(CU,{initial:!1,children:l.map(u=>oe.jsx(r,{motionVariants:n,...u},u.id))})},s)});return oe.jsx(dS,{...i,children:a})};function gPe(e){const{theme:t}=mV(),n=hPe();return k.useMemo(()=>OU(t.direction,{...n,...e}),[e,t.direction,n])}var mPe={duration:5e3,variant:"solid"},Fc={theme:n3e,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:mPe,forced:!1};function yPe({theme:e=Fc.theme,colorMode:t=Fc.colorMode,toggleColorMode:n=Fc.toggleColorMode,setColorMode:r=Fc.setColorMode,defaultOptions:i=Fc.defaultOptions,motionVariants:o,toastSpacing:a,component:s,forced:l}=Fc){const u={colorMode:t,setColorMode:r,toggleColorMode:n,forced:l};return{ToastContainer:()=>oe.jsx(I3e,{theme:e,children:oe.jsx(AT.Provider,{value:u,children:oe.jsx(pPe,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:s})})}),toast:OU(e.direction,i)}}var T3=Ii(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return oe.jsx("img",{width:r,height:i,ref:n,alt:o,...a})});T3.displayName="NativeImage";function vPe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,c]=k.useState("pending");k.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=k.useRef(),f=k.useCallback(()=>{if(!n)return;h();const p=new Image;p.src=n,a&&(p.crossOrigin=a),r&&(p.srcset=r),s&&(p.sizes=s),t&&(p.loading=t),p.onload=g=>{h(),c("loaded"),i==null||i(g)},p.onerror=g=>{h(),c("failed"),o==null||o(g)},d.current=p},[n,a,r,s,i,o,t]),h=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return G1(()=>{if(!l)return u==="loading"&&f(),()=>{h()}},[u,f,l]),l?"loaded":u}var bPe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function _Pe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var aA=Ii(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:h,...p}=t,g=r!==void 0||i!==void 0,_=u!=null||c||!g,b=vPe({...t,crossOrigin:d,ignoreFallback:_}),y=bPe(b,f),m={ref:n,objectFit:l,objectPosition:s,..._?p:_Pe(p,["onError","onLoad"])};return y?i||oe.jsx(lr.img,{as:T3,className:"chakra-image__placeholder",src:r,...m}):oe.jsx(lr.img,{as:T3,src:o,srcSet:a,crossOrigin:d,loading:u,referrerPolicy:h,className:"chakra-image",...m})});aA.displayName="Image";var $U=Ii(function(t,n){const r=$m("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Rm(t),u=v3e({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return oe.jsx(lr.p,{ref:n,className:Kl("chakra-text",t.className),...u,...l,__css:r})});$U.displayName="Text";var A3=Ii(function(t,n){const r=$m("Heading",t),{className:i,...o}=Rm(t);return oe.jsx(lr.h2,{ref:n,className:Kl("chakra-heading",t.className),...o,__css:r})});A3.displayName="Heading";var ob=lr("div");ob.displayName="Box";var NU=Ii(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return oe.jsx(ob,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});NU.displayName="Square";var SPe=Ii(function(t,n){const{size:r,...i}=t;return oe.jsx(NU,{size:r,ref:n,borderRadius:"9999px",...i})});SPe.displayName="Circle";var sA=Ii(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return oe.jsx(lr.div,{ref:n,__css:d,...c})});sA.displayName="Flex";const pt=e=>{try{return JSON.parse(JSON.stringify(e))}catch{return"Error parsing object"}},xPe=F.object({status:F.literal(422),data:F.object({detail:F.array(F.object({loc:F.array(F.string()),msg:F.string(),type:F.string()}))})});function Gr(e,t,n=!1){e=String(e),t=String(t);const r=Array.from({length:21},(a,s)=>s*50),i=[0,5,10,15,20,25,30,35,40,45,50,55,59,64,68,73,77,82,86,95,100];return r.reduce((a,s,l)=>{const u=n?i[l]/100:1,c=n?50:i[r.length-1-l];return a[s]=`hsl(${e} ${t}% ${c}% / ${u})`,a},{})}const oy={H:220,S:16},ay={H:250,S:42},sy={H:47,S:42},ly={H:40,S:70},uy={H:28,S:42},cy={H:113,S:42},dy={H:0,S:42},wPe={base:Gr(oy.H,oy.S),baseAlpha:Gr(oy.H,oy.S,!0),accent:Gr(ay.H,ay.S),accentAlpha:Gr(ay.H,ay.S,!0),working:Gr(sy.H,sy.S),workingAlpha:Gr(sy.H,sy.S,!0),gold:Gr(ly.H,ly.S),goldAlpha:Gr(ly.H,ly.S,!0),warning:Gr(uy.H,uy.S),warningAlpha:Gr(uy.H,uy.S,!0),ok:Gr(cy.H,cy.S),okAlpha:Gr(cy.H,cy.S,!0),error:Gr(dy.H,dy.S),errorAlpha:Gr(dy.H,dy.S,!0)},{definePartsStyle:CPe,defineMultiStyleConfig:EPe}=Ve(AV.keys),TPe={border:"none"},APe=e=>{const{colorScheme:t}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:W(`${t}.200`,`${t}.700`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.250`,`${t}.650`)(e)},_expanded:{bg:W(`${t}.250`,`${t}.650`)(e),borderBottomRadius:"none",_hover:{bg:W(`${t}.300`,`${t}.600`)(e)}}}},PPe=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.100`,`${t}.800`)(e),borderRadius:"base",borderTopRadius:"none"}},kPe={},IPe=CPe(e=>({container:TPe,button:APe(e),panel:PPe(e),icon:kPe})),MPe=EPe({variants:{invokeAI:IPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),RPe=e=>{const{colorScheme:t}=e;if(t==="base"){const r={bg:W("base.150","base.700")(e),color:W("base.300","base.500")(e),svg:{fill:W("base.300","base.500")(e)},opacity:1},i={bg:"none",color:W("base.300","base.500")(e),svg:{fill:W("base.500","base.500")(e)},opacity:1};return{bg:W("base.250","base.600")(e),color:W("base.850","base.100")(e),borderRadius:"base",svg:{fill:W("base.850","base.100")(e)},_hover:{bg:W("base.300","base.500")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.900","base.50")(e)},_disabled:r},_disabled:r,'&[data-progress="true"]':{...i,_hover:i}}}const n={bg:W(`${t}.400`,`${t}.700`)(e),color:W(`${t}.600`,`${t}.500`)(e),svg:{fill:W(`${t}.600`,`${t}.500`)(e),filter:"unset"},opacity:.7,filter:"saturate(65%)"};return{bg:W(`${t}.400`,`${t}.600`)(e),color:W("base.50","base.100")(e),borderRadius:"base",svg:{fill:W("base.50","base.100")(e)},_disabled:n,_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)},_disabled:n}}},OPe=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}},".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"}}},$Pe={variants:{invokeAI:RPe,invokeAIOutline:OPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}},{definePartsStyle:NPe,defineMultiStyleConfig:DPe}=Ve(PV.keys),LPe=e=>{const{colorScheme:t}=e;return{bg:W("base.200","base.700")(e),borderColor:W("base.300","base.600")(e),color:W("base.900","base.100")(e),_checked:{bg:W(`${t}.300`,`${t}.500`)(e),borderColor:W(`${t}.300`,`${t}.500`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.400`,`${t}.500`)(e),borderColor:W(`${t}.400`,`${t}.500`)(e)},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:W(`${t}.300`,`${t}.600`)(e),borderColor:W(`${t}.300`,`${t}.600`)(e),color:W(`${t}.900`,`${t}.100`)(e)},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"none",outline:"none"},_invalid:{borderColor:W("error.600","error.300")(e)}}},FPe=NPe(e=>({control:LPe(e)})),BPe=DPe({variants:{invokeAI:FPe},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{definePartsStyle:zPe,defineMultiStyleConfig:VPe}=Ve(kV.keys),jPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},UPe=e=>({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6},"::selection":{color:W("accent.900","accent.50")(e),bg:W("accent.200","accent.400")(e)}}),GPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},HPe=zPe(e=>({preview:jPe,input:UPe(e),textarea:GPe})),qPe=VPe({variants:{invokeAI:HPe},defaultProps:{size:"sm",variant:"invokeAI"}}),WPe=e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:W("base.700","base.300")(e),_invalid:{color:W("error.500","error.300")(e)}}),KPe={variants:{invokeAI:WPe},defaultProps:{variant:"invokeAI"}},CS=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:W("base.200","base.800")(e),bg:W("base.50","base.900")(e),borderRadius:"base",color:W("base.900","base.100")(e),boxShadow:"none",_hover:{borderColor:W("base.300","base.600")(e)},_focus:{borderColor:W("accent.200","accent.600")(e),boxShadow:"none",_hover:{borderColor:W("accent.300","accent.500")(e)}},_invalid:{borderColor:W("error.300","error.600")(e),boxShadow:"none",_hover:{borderColor:W("error.400","error.500")(e)}},_disabled:{borderColor:W("base.300","base.700")(e),bg:W("base.300","base.700")(e),color:W("base.600","base.400")(e),_hover:{borderColor:W("base.300","base.700")(e)}},_placeholder:{color:W("base.700","base.400")(e)},"::selection":{bg:W("accent.200","accent.400")(e)}}),{definePartsStyle:XPe,defineMultiStyleConfig:QPe}=Ve(IV.keys),YPe=XPe(e=>({field:CS(e)})),ZPe=QPe({variants:{invokeAI:YPe},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:JPe,defineMultiStyleConfig:eke}=Ve(MV.keys),tke=JPe(e=>({button:{fontWeight:500,bg:W("base.300","base.500")(e),color:W("base.900","base.100")(e),_hover:{bg:W("base.400","base.600")(e),color:W("base.900","base.50")(e),fontWeight:600}},list:{zIndex:9999,color:W("base.900","base.150")(e),bg:W("base.200","base.800")(e),shadow:"dark-lg",border:"none"},item:{fontSize:"sm",bg:W("base.200","base.800")(e),_hover:{bg:W("base.300","base.700")(e),svg:{opacity:1}},_focus:{bg:W("base.400","base.600")(e)},svg:{opacity:.7,fontSize:14}}})),nke=eke({variants:{invokeAI:tke},defaultProps:{variant:"invokeAI"}}),RUe={variants:{enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.07,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.07,easings:"easeOut"}}}},{defineMultiStyleConfig:rke,definePartsStyle:ike}=Ve(RV.keys),oke=e=>({bg:W("blackAlpha.700","blackAlpha.700")(e)}),ake={},ske=()=>({layerStyle:"first",maxH:"80vh"}),lke=()=>({fontWeight:"600",fontSize:"lg",layerStyle:"first",borderTopRadius:"base",borderInlineEndRadius:"base"}),uke={},cke={overflowY:"scroll"},dke={},fke=ike(e=>({overlay:oke(e),dialogContainer:ake,dialog:ske(),header:lke(),closeButton:uke,body:cke,footer:dke})),hke=rke({variants:{invokeAI:fke},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:pke,definePartsStyle:gke}=Ve(OV.keys),mke=e=>({height:8}),yke=e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...CS(e)}),vke=e=>({display:"flex"}),bke=e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:W("base.700","base.300")(e),width:2.5,height:2.5,_hover:{color:W("base.900","base.100")(e)}}}),_ke=gke(e=>({root:mke(e),field:yke(e),stepperGroup:vke(e),stepper:bke(e)})),Ske=pke({variants:{invokeAI:_ke},defaultProps:{size:"sm",variant:"invokeAI"}}),{defineMultiStyleConfig:xke,definePartsStyle:DU}=Ve($V.keys),LU=tn("popper-bg"),FU=tn("popper-arrow-bg"),BU=tn("popper-arrow-shadow-color"),wke=e=>({[FU.variable]:W("colors.base.100","colors.base.800")(e),[LU.variable]:W("colors.base.100","colors.base.800")(e),[BU.variable]:W("colors.base.400","colors.base.600")(e),minW:"unset",width:"unset",p:4,bg:W("base.100","base.800")(e),border:"none",shadow:"dark-lg"}),Cke=e=>({[FU.variable]:W("colors.base.100","colors.base.700")(e),[LU.variable]:W("colors.base.100","colors.base.700")(e),[BU.variable]:W("colors.base.400","colors.base.400")(e),p:4,bg:W("base.100","base.700")(e),border:"none",shadow:"dark-lg"}),Eke=DU(e=>({content:wke(e),body:{padding:0}})),Tke=DU(e=>({content:Cke(e),body:{padding:0}})),Ake=xke({variants:{invokeAI:Eke,informational:Tke},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:Pke,definePartsStyle:kke}=Ve(NV.keys),Ike=e=>({bg:"accentAlpha.700"}),Mke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.200`,`${t}.700`)(e)}},Rke=kke(e=>({filledTrack:Ike(e),track:Mke(e)})),Oke=Pke({variants:{invokeAI:Rke},defaultProps:{variant:"invokeAI"}}),$ke={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},{definePartsStyle:Nke,defineMultiStyleConfig:Dke}=Ve(DV.keys),Lke=e=>({color:W("base.200","base.300")(e)}),Fke=e=>({fontWeight:"600",...CS(e)}),Bke=Nke(e=>({field:Fke(e),icon:Lke(e)})),zke=Dke({variants:{invokeAI:Bke},defaultProps:{size:"sm",variant:"invokeAI"}}),LM=ke("skeleton-start-color"),FM=ke("skeleton-end-color"),Vke={borderRadius:"base",maxW:"full",maxH:"full",_light:{[LM.variable]:"colors.base.250",[FM.variable]:"colors.base.450"},_dark:{[LM.variable]:"colors.base.700",[FM.variable]:"colors.base.500"}},jke={variants:{invokeAI:Vke},defaultProps:{variant:"invokeAI"}},{definePartsStyle:Uke,defineMultiStyleConfig:Gke}=Ve(LV.keys),Hke=e=>({bg:W("base.400","base.600")(e),h:1.5}),qke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.400`,`${t}.600`)(e),h:1.5}},Wke=e=>({w:e.orientation==="horizontal"?2:4,h:e.orientation==="horizontal"?4:2,bg:W("base.50","base.100")(e)}),Kke=e=>({fontSize:"2xs",fontWeight:"500",color:W("base.700","base.400")(e),mt:2,insetInlineStart:"unset"}),Xke=Uke(e=>({container:{_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},track:Hke(e),filledTrack:qke(e),thumb:Wke(e),mark:Kke(e)})),Qke=Gke({variants:{invokeAI:Xke},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Yke,definePartsStyle:Zke}=Ve(FV.keys),Jke=e=>{const{colorScheme:t}=e;return{bg:W("base.300","base.600")(e),_focusVisible:{boxShadow:"none"},_checked:{bg:W(`${t}.400`,`${t}.500`)(e)}}},e6e=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.50`,`${t}.50`)(e)}},t6e=Zke(e=>({container:{},track:Jke(e),thumb:e6e(e)})),n6e=Yke({variants:{invokeAI:t6e},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:r6e,definePartsStyle:zU}=Ve(BV.keys),i6e=e=>({display:"flex",columnGap:4}),o6e=e=>({}),a6e=e=>{const{colorScheme:t}=e;return{display:"flex",flexDirection:"column",gap:1,color:W("base.700","base.400")(e),button:{fontSize:"sm",padding:2,borderRadius:"base",textShadow:W("0 0 0.3rem var(--invokeai-colors-accent-100)","0 0 0.3rem var(--invokeai-colors-accent-900)")(e),svg:{fill:W("base.700","base.300")(e)},_selected:{bg:W("accent.400","accent.600")(e),color:W("base.50","base.100")(e),svg:{fill:W("base.50","base.100")(e),filter:W(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-800))`)(e)},_hover:{bg:W("accent.500","accent.500")(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}}},_hover:{bg:W("base.100","base.800")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.800","base.100")(e)}}}}},s6e=e=>({padding:0,height:"100%"}),l6e=zU(e=>({root:i6e(e),tab:o6e(e),tablist:a6e(e),tabpanel:s6e(e)})),u6e=zU(e=>({tab:{borderTopRadius:"base",px:4,py:1,fontSize:"sm",color:W("base.600","base.400")(e),fontWeight:500,_selected:{color:W("accent.600","accent.400")(e)}},tabpanel:{p:0,pt:4,w:"full",h:"full"},tabpanels:{w:"full",h:"full"}})),c6e=r6e({variants:{line:u6e,appTabs:l6e},defaultProps:{variant:"appTabs",colorScheme:"accent"}}),d6e=e=>({color:W("error.500","error.400")(e)}),f6e=e=>({color:W("base.500","base.400")(e)}),h6e={variants:{subtext:f6e,error:d6e}},p6e=e=>({...CS(e),"::-webkit-scrollbar":{display:"initial"},"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-50) 0%, - var(--invokeai-colors-base-50) 70%, - var(--invokeai-colors-base-200) 70%, - var(--invokeai-colors-base-200) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-50) 0%, - var(--invokeai-colors-base-50) 70%, - var(--invokeai-colors-base-200) 70%, - var(--invokeai-colors-base-200) 100%)`}},_dark:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-900) 0%, - var(--invokeai-colors-base-900) 70%, - var(--invokeai-colors-base-800) 70%, - var(--invokeai-colors-base-800) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, - var(--invokeai-colors-base-900) 0%, - var(--invokeai-colors-base-900) 70%, - var(--invokeai-colors-base-800) 70%, - var(--invokeai-colors-base-800) 100%)`}}},p:2}),g6e={variants:{invokeAI:p6e},defaultProps:{size:"md",variant:"invokeAI"}},m6e=tn("popper-arrow-bg"),y6e=e=>({borderRadius:"base",shadow:"dark-lg",bg:W("base.700","base.200")(e),[m6e.variable]:W("colors.base.700","colors.base.200")(e),pb:1.5}),v6e={baseStyle:y6e},BM={backgroundColor:"accentAlpha.150 !important",borderColor:"accentAlpha.700 !important",borderRadius:"base !important",borderStyle:"dashed !important",_dark:{borderColor:"accent.400 !important"}},b6e={".react-flow__nodesselection-rect":{...BM,padding:"1rem !important",boxSizing:"content-box !important",transform:"translate(-1rem, -1rem) !important"},".react-flow__selection":BM},_6e={config:{cssVarPrefix:"invokeai",initialColorMode:"dark",useSystemColorMode:!1},layerStyles:{body:{bg:"base.50",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.50"}},first:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.850",color:"base.100"}},second:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},third:{bg:"base.300",color:"base.900",".chakra-ui-dark &":{bg:"base.750",color:"base.100"}},nodeBody:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},nodeHeader:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}},nodeFooter:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}}},styles:{global:()=>({layerStyle:"body","*":{...$ke},...b6e})},direction:"ltr",fonts:{body:"'Inter Variable', sans-serif",heading:"'Inter Variable', sans-serif"},shadows:{light:{accent:"0 0 10px 0 var(--invokeai-colors-accent-300)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-400)",ok:"0 0 7px var(--invokeai-colors-ok-600)",working:"0 0 7px var(--invokeai-colors-working-600)",error:"0 0 7px var(--invokeai-colors-error-600)"},dark:{accent:"0 0 10px 0 var(--invokeai-colors-accent-600)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-500)",ok:"0 0 7px var(--invokeai-colors-ok-400)",working:"0 0 7px var(--invokeai-colors-working-400)",error:"0 0 7px var(--invokeai-colors-error-400)"},selected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-400)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-500)"},hoverSelected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-400)"},hoverUnselected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 3px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 3px var(--invokeai-colors-accent-400)"},nodeSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-400)",dark:"0 0 0 3px var(--invokeai-colors-accent-500)"},nodeHovered:{light:"0 0 0 2px var(--invokeai-colors-accent-500)",dark:"0 0 0 2px var(--invokeai-colors-accent-400)"},nodeHoveredSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-500)",dark:"0 0 0 3px var(--invokeai-colors-accent-400)"},nodeInProgress:{light:"0 0 0 2px var(--invokeai-colors-accent-500), 0 0 10px 2px var(--invokeai-colors-accent-600)",dark:"0 0 0 2px var(--invokeai-colors-yellow-400), 0 0 20px 2px var(--invokeai-colors-orange-700)"}},colors:wPe,components:{Button:$Pe,Input:ZPe,Editable:qPe,Textarea:g6e,Tabs:c6e,Progress:Oke,Accordion:MPe,FormLabel:KPe,Switch:n6e,NumberInput:Ske,Select:zke,Skeleton:jke,Slider:Qke,Popover:Ake,Modal:hke,Checkbox:BPe,Menu:nke,Text:h6e,Tooltip:v6e}},S6e={defaultOptions:{isClosable:!0}},{toast:wh}=yPe({theme:_6e,defaultOptions:S6e.defaultOptions}),x6e=()=>{pe({matcher:un.endpoints.enqueueBatch.matchFulfilled,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;se("queue").debug({enqueueResult:pt(t)},"Batch enqueued"),wh.isActive("batch-queued")||wh({id:"batch-queued",title:X("queue.batchQueued"),description:X("queue.batchQueuedDesc",{count:t.enqueued,direction:n.prepend?X("queue.front"):X("queue.back")}),duration:1e3,status:"success"})}}),pe({matcher:un.endpoints.enqueueBatch.matchRejected,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;if(!t){wh({title:X("queue.batchFailedToQueue"),status:"error",description:"Unknown Error"}),se("queue").error({batchConfig:pt(n),error:pt(t)},X("queue.batchFailedToQueue"));return}const r=xPe.safeParse(t);if(r.success)r.data.data.detail.map(i=>{wh({id:"batch-failed-to-queue",title:u6(XN(i.msg),{length:128}),status:"error",description:u6(`Path: - ${i.loc.join(".")}`,{length:128})})});else{let i="Unknown Error",o;t.status===403&&"body"in t?i=Vy(t,"body.detail","Unknown Error"):t.status===403&&"error"in t?i=Vy(t,"error.detail","Unknown Error"):t.status===403&&"data"in t&&(i=Vy(t,"data.detail","Unknown Error"),o=15e3),wh({title:X("queue.batchFailedToQueue"),status:"error",description:i,...o?{duration:o}:{}})}se("queue").error({batchConfig:pt(n),error:pt(t)},X("queue.batchFailedToQueue"))}})},Vm={memoizeOptions:{resultEqualityCheck:SE}},VU=(e,t)=>{var d;const{generation:n,canvas:r,nodes:i,controlAdapters:o}=e,a=((d=n.initialImage)==null?void 0:d.imageName)===t,s=r.layerState.objects.some(f=>f.kind==="image"&&f.imageName===t),l=i.nodes.filter(on).some(f=>Gc(f.data.inputs,h=>{var p;return h.type==="ImageField"&&((p=h.value)==null?void 0:p.image_name)===t})),u=Aa(o).some(f=>f.controlImage===t||gi(f)&&f.processedControlImage===t);return{isInitialImage:a,isCanvasImage:s,isNodesImage:l,isControlImage:u}},w6e=qn([e=>e],e=>{const{imagesToDelete:t}=e.deleteImageModal;return t.length?t.map(r=>VU(e,r.image_name)):[]},Vm),C6e=()=>{pe({matcher:ce.endpoints.deleteBoardAndImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{deleted_images:r}=e.payload;let i=!1,o=!1,a=!1,s=!1;const l=n();r.forEach(u=>{const c=VU(l,u);c.isInitialImage&&!i&&(t(DE()),i=!0),c.isCanvasImage&&!o&&(t(KE()),o=!0),c.isNodesImage&&!a&&(t(cve()),a=!0),c.isControlImage&&!s&&(t(zie()),s=!0)})}})},E6e=()=>{pe({matcher:si(M1,M5),effect:async(e,{getState:t,dispatch:n,condition:r,cancelActiveListeners:i})=>{i();const o=t(),a=M1.match(e)?e.payload.boardId:o.gallery.selectedBoardId,l=(M5.match(e)?e.payload:o.gallery.galleryView)==="images"?Fn:Pr,u={board_id:a??"none",categories:l};if(await r(()=>ce.endpoints.listImages.select(u)(t()).isSuccess,5e3)){const{data:d}=ce.endpoints.listImages.select(u)(t());if(d){const f=bg.selectAll(d)[0],h=bg.selectById(d,e.payload.selectedImageName);n(pa(h||f||null))}else n(pa(null))}else n(pa(null))}})},T6e=ge("canvas/canvasSavedToGallery"),A6e=ge("canvas/canvasMaskSavedToGallery"),P6e=ge("canvas/canvasCopiedToClipboard"),k6e=ge("canvas/canvasDownloadedAsImage"),I6e=ge("canvas/canvasMerged"),M6e=ge("canvas/stagingAreaImageSaved"),R6e=ge("canvas/canvasMaskToControlAdapter"),O6e=ge("canvas/canvasImageToControlAdapter");let jU=null,UU=null;const OUe=e=>{jU=e},ES=()=>jU,$Ue=e=>{UU=e},$6e=()=>UU,N6e=async e=>new Promise((t,n)=>{e.toBlob(r=>{if(r){t(r);return}n("Unable to create Blob")})}),ab=async(e,t)=>await N6e(e.toCanvas(t)),TS=async(e,t=!1)=>{const n=ES();if(!n)throw new Error("Problem getting base layer blob");const{shouldCropToBoundingBoxOnSave:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e.canvas,a=n.clone();a.scale({x:1,y:1});const s=a.getAbsolutePosition(),l=r||t?{x:i.x+s.x,y:i.y+s.y,width:o.width,height:o.height}:a.getClientRect();return ab(a,l)},D6e=(e,t="image/png")=>{navigator.clipboard.write([new ClipboardItem({[t]:e})])},L6e=()=>{pe({actionCreator:P6e,effect:async(e,{dispatch:t,getState:n})=>{const r=J_.get().child({namespace:"canvasCopiedToClipboardListener"}),i=n();try{const o=TS(i);D6e(o)}catch(o){r.error(String(o)),t(it({title:X("toast.problemCopyingCanvas"),description:X("toast.problemCopyingCanvasDesc"),status:"error"}));return}t(it({title:X("toast.canvasCopiedClipboard"),status:"success"}))}})},F6e=(e,t)=>{const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()},B6e=()=>{pe({actionCreator:k6e,effect:async(e,{dispatch:t,getState:n})=>{const r=J_.get().child({namespace:"canvasSavedToGalleryListener"}),i=n();let o;try{o=await TS(i)}catch(a){r.error(String(a)),t(it({title:X("toast.problemDownloadingCanvas"),description:X("toast.problemDownloadingCanvasDesc"),status:"error"}));return}F6e(o,"canvas.png"),t(it({title:X("toast.canvasDownloaded"),status:"success"}))}})},z6e=()=>{pe({actionCreator:O6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{id:o}=e.payload;let a;try{a=await TS(i,!0)}catch(c){r.error(String(c)),t(it({title:X("toast.problemSavingCanvas"),description:X("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery,l=await t(ce.endpoints.uploadImage.initiate({file:new File([a],"savedCanvas.png",{type:"image/png"}),image_category:"control",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasSentControlnetAssets")}}})).unwrap(),{image_name:u}=l;t(Hl({id:o,controlImage:u}))}})};var lA={exports:{}},AS={},GU={},Ge={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof He<"u"?He:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.2.3",isBrowser:n(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return e.Konva.angleDeg?i*t:i},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(i){e.glob.Konva=i}};const r=i=>{e.Konva[i.prototype.getClassName()]=i};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(Ge);var nn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=Ge;class n{constructor(v=[1,0,0,1,0,0]){this.dirty=!1,this.m=v&&v.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(v){v.m[0]=this.m[0],v.m[1]=this.m[1],v.m[2]=this.m[2],v.m[3]=this.m[3],v.m[4]=this.m[4],v.m[5]=this.m[5]}point(v){var S=this.m;return{x:S[0]*v.x+S[2]*v.y+S[4],y:S[1]*v.x+S[3]*v.y+S[5]}}translate(v,S){return this.m[4]+=this.m[0]*v+this.m[2]*S,this.m[5]+=this.m[1]*v+this.m[3]*S,this}scale(v,S){return this.m[0]*=v,this.m[1]*=v,this.m[2]*=S,this.m[3]*=S,this}rotate(v){var S=Math.cos(v),w=Math.sin(v),C=this.m[0]*S+this.m[2]*w,x=this.m[1]*S+this.m[3]*w,P=this.m[0]*-w+this.m[2]*S,E=this.m[1]*-w+this.m[3]*S;return this.m[0]=C,this.m[1]=x,this.m[2]=P,this.m[3]=E,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(v,S){var w=this.m[0]+this.m[2]*S,C=this.m[1]+this.m[3]*S,x=this.m[2]+this.m[0]*v,P=this.m[3]+this.m[1]*v;return this.m[0]=w,this.m[1]=C,this.m[2]=x,this.m[3]=P,this}multiply(v){var S=this.m[0]*v.m[0]+this.m[2]*v.m[1],w=this.m[1]*v.m[0]+this.m[3]*v.m[1],C=this.m[0]*v.m[2]+this.m[2]*v.m[3],x=this.m[1]*v.m[2]+this.m[3]*v.m[3],P=this.m[0]*v.m[4]+this.m[2]*v.m[5]+this.m[4],E=this.m[1]*v.m[4]+this.m[3]*v.m[5]+this.m[5];return this.m[0]=S,this.m[1]=w,this.m[2]=C,this.m[3]=x,this.m[4]=P,this.m[5]=E,this}invert(){var v=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),S=this.m[3]*v,w=-this.m[1]*v,C=-this.m[2]*v,x=this.m[0]*v,P=v*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),E=v*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=S,this.m[1]=w,this.m[2]=C,this.m[3]=x,this.m[4]=P,this.m[5]=E,this}getMatrix(){return this.m}decompose(){var v=this.m[0],S=this.m[1],w=this.m[2],C=this.m[3],x=this.m[4],P=this.m[5],E=v*C-S*w;let I={x,y:P,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(v!=0||S!=0){var N=Math.sqrt(v*v+S*S);I.rotation=S>0?Math.acos(v/N):-Math.acos(v/N),I.scaleX=N,I.scaleY=E/N,I.skewX=(v*w+S*C)/E,I.skewY=0}else if(w!=0||C!=0){var M=Math.sqrt(w*w+C*C);I.rotation=Math.PI/2-(C>0?Math.acos(-w/M):-Math.acos(w/M)),I.scaleX=E/M,I.scaleY=M,I.skewX=0,I.skewY=(v*w+S*C)/E}return I.rotation=e.Util._getRotation(I.rotation),I}}e.Transform=n;var r="[object Array]",i="[object Number]",o="[object String]",a="[object Boolean]",s=Math.PI/180,l=180/Math.PI,u="#",c="",d="0",f="Konva warning: ",h="Konva error: ",p="rgb(",g={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,b=[];const y=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};e.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===r},_isNumber(m){return Object.prototype.toString.call(m)===i&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===o},_isBoolean(m){return Object.prototype.toString.call(m)===a},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;var v=m[0];return v==="#"||v==="."||v===v.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){b.push(m),b.length===1&&y(function(){const v=b;b=[],v.forEach(function(S){S()})})},createCanvasElement(){var m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,v){var S=e.Util.createImageElement();S.onload=function(){v(S)},S.src=m},_rgbToHex(m,v,S){return((1<<24)+(m<<16)+(v<<8)+S).toString(16).slice(1)},_hexToRgb(m){m=m.replace(u,c);var v=parseInt(m,16);return{r:v>>16&255,g:v>>8&255,b:v&255}},getRandomColor(){for(var m=(Math.random()*16777215<<0).toString(16);m.length<6;)m=d+m;return u+m},getRGB(m){var v;return m in g?(v=g[m],{r:v[0],g:v[1],b:v[2]}):m[0]===u?this._hexToRgb(m.substring(1)):m.substr(0,4)===p?(v=_.exec(m.replace(/ /g,"")),{r:parseInt(v[1],10),g:parseInt(v[2],10),b:parseInt(v[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",e.Util._namedColorToRBA(m)||e.Util._hex3ColorToRGBA(m)||e.Util._hex4ColorToRGBA(m)||e.Util._hex6ColorToRGBA(m)||e.Util._hex8ColorToRGBA(m)||e.Util._rgbColorToRGBA(m)||e.Util._rgbaColorToRGBA(m)||e.Util._hslColorToRGBA(m)},_namedColorToRBA(m){var v=g[m.toLowerCase()];return v?{r:v[0],g:v[1],b:v[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];var v=m.split(/ *, */).map(Number);return{r:v[0],g:v[1],b:v[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];var v=m.split(/ *, */).map((S,w)=>S.slice(-1)==="%"?w===3?parseInt(S)/100:parseInt(S)/100*255:Number(S));return{r:v[0],g:v[1],b:v[2],a:v[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[v,...S]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),w=Number(S[0])/360,C=Number(S[1])/100,x=Number(S[2])/100;let P,E,I;if(C===0)return I=x*255,{r:Math.round(I),g:Math.round(I),b:Math.round(I),a:1};x<.5?P=x*(1+C):P=x+C-x*C;const N=2*x-P,M=[0,0,0];for(let T=0;T<3;T++)E=w+1/3*-(T-1),E<0&&E++,E>1&&E--,6*E<1?I=N+(P-N)*6*E:2*E<1?I=P:3*E<2?I=N+(P-N)*(2/3-E)*6:I=N,M[T]=I*255;return{r:Math.round(M[0]),g:Math.round(M[1]),b:Math.round(M[2]),a:1}}},haveIntersection(m,v){return!(v.x>m.x+m.width||v.x+v.widthm.y+m.height||v.y+v.height1?(P=S,E=w,I=(S-C)*(S-C)+(w-x)*(w-x)):(P=m+M*(S-m),E=v+M*(w-v),I=(P-C)*(P-C)+(E-x)*(E-x))}return[P,E,I]},_getProjectionToLine(m,v,S){var w=e.Util.cloneObject(m),C=Number.MAX_VALUE;return v.forEach(function(x,P){if(!(!S&&P===v.length-1)){var E=v[(P+1)%v.length],I=e.Util._getProjectionToSegment(x.x,x.y,E.x,E.y,m.x,m.y),N=I[0],M=I[1],T=I[2];Tv.length){var P=v;v=m,m=P}for(w=0;w{v.width=0,v.height=0})},drawRoundedRectPath(m,v,S,w){let C=0,x=0,P=0,E=0;typeof w=="number"?C=x=P=E=Math.min(w,v/2,S/2):(C=Math.min(w[0]||0,v/2,S/2),x=Math.min(w[1]||0,v/2,S/2),E=Math.min(w[2]||0,v/2,S/2),P=Math.min(w[3]||0,v/2,S/2)),m.moveTo(C,0),m.lineTo(v-x,0),m.arc(v-x,x,x,Math.PI*3/2,0,!1),m.lineTo(v,S-E),m.arc(v-E,S-E,E,0,Math.PI/2,!1),m.lineTo(P,S),m.arc(P,S-P,P,Math.PI/2,Math.PI,!1),m.lineTo(0,C),m.arc(C,C,C,Math.PI,Math.PI*3/2,!1)}}})(nn);var Kt={},je={},Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.getComponentValidator=Te.getBooleanValidator=Te.getNumberArrayValidator=Te.getFunctionValidator=Te.getStringOrGradientValidator=Te.getStringValidator=Te.getNumberOrAutoValidator=Te.getNumberOrArrayOfNumbersValidator=Te.getNumberValidator=Te.alphaComponent=Te.RGBComponent=void 0;const Es=Ge,dn=nn;function Ts(e){return dn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||dn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function V6e(e){return e>255?255:e<0?0:Math.round(e)}Te.RGBComponent=V6e;function j6e(e){return e>1?1:e<1e-4?1e-4:e}Te.alphaComponent=j6e;function U6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isNumber(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}Te.getNumberValidator=U6e;function G6e(e){if(Es.Konva.isUnminified)return function(t,n){let r=dn.Util._isNumber(t),i=dn.Util._isArray(t)&&t.length==e;return!r&&!i&&dn.Util.warn(Ts(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}Te.getNumberOrArrayOfNumbersValidator=G6e;function H6e(){if(Es.Konva.isUnminified)return function(e,t){var n=dn.Util._isNumber(e),r=e==="auto";return n||r||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}Te.getNumberOrAutoValidator=H6e;function q6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isString(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}Te.getStringValidator=q6e;function W6e(){if(Es.Konva.isUnminified)return function(e,t){const n=dn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}Te.getStringOrGradientValidator=W6e;function K6e(){if(Es.Konva.isUnminified)return function(e,t){return dn.Util._isFunction(e)||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}Te.getFunctionValidator=K6e;function X6e(){if(Es.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(dn.Util._isArray(e)?e.forEach(function(r){dn.Util._isNumber(r)||dn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}Te.getNumberArrayValidator=X6e;function Q6e(){if(Es.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||dn.Util.warn(Ts(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}Te.getBooleanValidator=Q6e;function Y6e(e){if(Es.Konva.isUnminified)return function(t,n){return t==null||dn.Util.isObject(t)||dn.Util.warn(Ts(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}Te.getComponentValidator=Y6e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=nn,n=Te;var r="get",i="set";e.Factory={addGetterSetter(o,a,s,l,u){e.Factory.addGetter(o,a,s),e.Factory.addSetter(o,a,l,u),e.Factory.addOverloadedGetterSetter(o,a)},addGetter(o,a,s){var l=r+t.Util._capitalize(a);o.prototype[l]=o.prototype[l]||function(){var u=this.attrs[a];return u===void 0?s:u}},addSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]||e.Factory.overWriteSetter(o,a,s,l)},overWriteSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]=function(c){return s&&c!==void 0&&c!==null&&(c=s.call(this,c,a)),this._setAttr(a,c),l&&l.call(this),this}},addComponentsGetterSetter(o,a,s,l,u){var c=s.length,d=t.Util._capitalize,f=r+d(a),h=i+d(a),p,g;o.prototype[f]=function(){var b={};for(p=0;p{this._setAttr(a+d(v),void 0)}),this._fireChangeEvent(a,y,b),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(o,a)},addOverloadedGetterSetter(o,a){var s=t.Util._capitalize(a),l=i+s,u=r+s;o.prototype[a]=function(){return arguments.length?(this[l](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(o,a,s,l){t.Util.error("Adding deprecated "+a);var u=r+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[u]=function(){t.Util.error(c);var d=this.attrs[a];return d===void 0?s:d},e.Factory.addSetter(o,a,l,function(){t.Util.error(c)}),e.Factory.addOverloadedGetterSetter(o,a)},backCompat(o,a){t.Util.each(a,function(s,l){var u=o.prototype[l],c=r+t.Util._capitalize(s),d=i+t.Util._capitalize(s);function f(){u.apply(this,arguments),t.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}o.prototype[s]=f,o.prototype[c]=f,o.prototype[d]=f})},afterSetFilter(){this._filterUpToDate=!1}}})(je);var Mo={},ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.HitContext=ss.SceneContext=ss.Context=void 0;const HU=nn,Z6e=Ge;function J6e(e){var t=[],n=e.length,r=HU.Util,i,o;for(i=0;itypeof c=="number"?Math.floor(c):c)),o+=eIe+u.join(zM)+tIe)):(o+=s.property,t||(o+=aIe+s.val)),o+=iIe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=lIe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var c=arguments,d=this._context;c.length===3?d.drawImage(t,n,r):c.length===5?d.drawImage(t,n,r,i,o):c.length===9&&d.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n,r,i){return r?this._context.isPointInPath(r,t,n,i):this._context.isPointInPath(t,n,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=VM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=J6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];e.DD._dragElements.forEach((o,a)=>{const{node:s}=o,l=s.getStage();l.setPointersPositions(r),o.pointerId===void 0&&(o.pointerId=n.Util._getFirstPointerId(r));const u=l._changedPointerPositions.find(f=>f.id===o.pointerId);if(u){if(o.dragStatus!=="dragging"){var c=s.dragDistance(),d=Math.max(Math.abs(u.x-o.startPointerPos.x),Math.abs(u.y-o.startPointerPos.y));if(d{o.fire("dragmove",{type:"dragmove",target:o,evt:r},!0)})},_endDragBefore(r){const i=[];e.DD._dragElements.forEach(o=>{const{node:a}=o,s=a.getStage();if(r&&s.setPointersPositions(r),!s._changedPointerPositions.find(c=>c.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,o.dragStatus="stopped");const u=o.node.getLayer()||o.node instanceof t.Konva.Stage&&o.node;u&&i.indexOf(u)===-1&&i.push(u)}),i.forEach(o=>{o.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&e.DD._dragElements.delete(o)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(IS);Object.defineProperty(Kt,"__esModule",{value:!0});Kt.Node=void 0;const qe=nn,jm=je,hy=Mo,cu=Ge,Fi=IS,vn=Te;var fv="absoluteOpacity",py="allEventListeners",za="absoluteTransform",jM="absoluteScale",du="canvas",mIe="Change",yIe="children",vIe="konva",P3="listening",UM="mouseenter",GM="mouseleave",HM="set",qM="Shape",hv=" ",WM="stage",js="transform",bIe="Stage",k3="visible",_Ie=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(hv);let SIe=1;class Ne{constructor(t){this._id=SIe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===js||t===za)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===js||t===za,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(hv);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(du)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===za&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(du)){const{scene:t,filter:n,hit:r}=this._cache.get(du);qe.Util.releaseCanvas(t,n,r),this._cache.delete(du)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,c=n.drawBorder||!1,d=n.hitCanvasPixelRatio||1;if(!i||!o){qe.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var f=new hy.SceneCanvas({pixelRatio:a,width:i,height:o}),h=new hy.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new hy.HitCanvas({pixelRatio:d,width:i,height:o}),g=f.getContext(),_=p.getContext();return p.isCache=!0,f.isCache=!0,this._cache.delete(du),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(f.getContext()._context.imageSmoothingEnabled=!1,h.getContext()._context.imageSmoothingEnabled=!1),g.save(),_.save(),g.translate(-s,-l),_.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(fv),this._clearSelfAndDescendantCache(jM),this.drawScene(f,this),this.drawHit(p,this),this._isUnderCache=!1,g.restore(),_.restore(),c&&(g.save(),g.beginPath(),g.rect(0,0,i,o),g.closePath(),g.setAttr("strokeStyle","red"),g.setAttr("lineWidth",5),g.stroke(),g.restore()),this._cache.set(du,{scene:f,filter:h,hit:p,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(du)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i=1/0,o=1/0,a=-1/0,s=-1/0,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var c=l.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var c=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/c,r.getHeight()/c),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==yIe&&(r=HM+qe.Util._capitalize(n),qe.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(P3,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(k3,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;Fi.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!cu.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(c){for(i=[],o=c.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}const u=this.getStage();return n.nodeType!==bIe&&u&&l(u.getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(js),this._clearSelfAndDescendantCache(za)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new qe.Transform,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){const{x:n,y:r,...i}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(js);var o=this._getAbsoluteTransform().copy();return o.invert(),o.translate(t.x,t.y),t={x:this.attrs.x+o.getTranslation().x,y:this.attrs.y+o.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(js),this._clearSelfAndDescendantCache(za),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return qe.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return qe.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&qe.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(fv,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=qe.Util.isObject(i)&&!qe.Util._isPlainObject(i)&&!qe.Util._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),qe.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t==null?void 0:t.callback;i&&delete t.callback,qe.Util._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():cu.Konva.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(r&&!this.isDragging()){var i=!1;Fi.DD._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Fi.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Fi.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return qe.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return qe.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ne.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),cu.Konva[r]||(qe.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=cu.Konva[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Vw.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Vw.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const c=r===this;if(u){o.save();var d=this.getAbsoluteTransform(r),f=d.getMatrix();o.transform(f[0],f[1],f[2],f[3],f[4],f[5]),o.beginPath();let _;if(l)_=l.call(this,o,this);else{var h=this.clipX(),p=this.clipY();o.rect(h,p,a,s)}o.clip.apply(o,_),f=d.copy().invert().getMatrix(),o.transform(f[0],f[1],f[2],f[3],f[4],f[5])}var g=!c&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";g&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](n,r)}),g&&o.restore(),u&&o.restore()}getClientRect(t={}){var n,r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},c=this;(n=this.children)===null||n===void 0||n.forEach(function(g){if(g.visible()){var _=g.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(o===void 0?(o=_.x,a=_.y,s=_.x+_.width,l=_.y+_.height):(o=Math.min(o,_.x),a=Math.min(a,_.y),s=Math.max(s,_.x+_.width),l=Math.max(l,_.y+_.height)))}});for(var d=this.find("Shape"),f=!1,h=0;hZ.indexOf("pointer")>=0?"pointer":Z.indexOf("touch")>=0?"touch":"mouse",U=Z=>{const V=B(Z);if(V==="pointer")return i.Konva.pointerEventsEnabled&&O.pointer;if(V==="touch")return O.touch;if(V==="mouse")return O.mouse};function j(Z={}){return(Z.clipFunc||Z.clipWidth||Z.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Z}const q="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class Y extends r.Container{constructor(V){super(j(V)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{j(this.attrs)}),this._checkVisibility()}_validateAdd(V){const K=V.getType()==="Layer",ee=V.getType()==="FastLayer";K||ee||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const V=this.visible()?"":"none";this.content.style.display=V}setContainer(V){if(typeof V===c){if(V.charAt(0)==="."){var K=V.slice(1);V=document.getElementsByClassName(K)[0]}else{var ee;V.charAt(0)!=="#"?ee=V:ee=V.slice(1),V=document.getElementById(ee)}if(!V)throw"Can not find container in document with id "+ee}return this._setAttr("container",V),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),V.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var V=this.children,K=V.length,ee;for(ee=0;ee-1&&e.stages.splice(K,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const V=this._pointerPositions[0]||this._changedPointerPositions[0];return V?{x:V.x,y:V.y}:(t.Util.warn(q),null)}_getPointerById(V){return this._pointerPositions.find(K=>K.id===V)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(V){V=V||{},V.x=V.x||0,V.y=V.y||0,V.width=V.width||this.width(),V.height=V.height||this.height();var K=new o.SceneCanvas({width:V.width,height:V.height,pixelRatio:V.pixelRatio||1}),ee=K.getContext()._context,re=this.children;return(V.x||V.y)&&ee.translate(-1*V.x,-1*V.y),re.forEach(function(fe){if(fe.isVisible()){var Se=fe._toKonvaCanvas(V);ee.drawImage(Se._canvas,V.x,V.y,Se.getWidth()/Se.getPixelRatio(),Se.getHeight()/Se.getPixelRatio())}}),K}getIntersection(V){if(!V)return null;var K=this.children,ee=K.length,re=ee-1,fe;for(fe=re;fe>=0;fe--){const Se=K[fe].getIntersection(V);if(Se)return Se}return null}_resizeDOM(){var V=this.width(),K=this.height();this.content&&(this.content.style.width=V+d,this.content.style.height=K+d),this.bufferCanvas.setSize(V,K),this.bufferHitCanvas.setSize(V,K),this.children.forEach(ee=>{ee.setSize({width:V,height:K}),ee.draw()})}add(V,...K){if(arguments.length>1){for(var ee=0;ee$&&t.Util.warn("The stage has "+re+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),V.setSize({width:this.width(),height:this.height()}),V.draw(),i.Konva.isBrowser&&this.content.appendChild(V.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(V){return l.hasPointerCapture(V,this)}setPointerCapture(V){l.setPointerCapture(V,this)}releaseCapture(V){l.releaseCapture(V,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&L.forEach(([V,K])=>{this.content.addEventListener(V,ee=>{this[K](ee)},{passive:!1})})}_pointerenter(V){this.setPointersPositions(V);const K=U(V.type);K&&this._fire(K.pointerenter,{evt:V,target:this,currentTarget:this})}_pointerover(V){this.setPointersPositions(V);const K=U(V.type);K&&this._fire(K.pointerover,{evt:V,target:this,currentTarget:this})}_getTargetShape(V){let K=this[V+"targetShape"];return K&&!K.getStage()&&(K=null),K}_pointerleave(V){const K=U(V.type),ee=B(V.type);if(K){this.setPointersPositions(V);var re=this._getTargetShape(ee),fe=!a.DD.isDragging||i.Konva.hitOnDragEnabled;re&&fe?(re._fireAndBubble(K.pointerout,{evt:V}),re._fireAndBubble(K.pointerleave,{evt:V}),this._fire(K.pointerleave,{evt:V,target:this,currentTarget:this}),this[ee+"targetShape"]=null):fe&&(this._fire(K.pointerleave,{evt:V,target:this,currentTarget:this}),this._fire(K.pointerout,{evt:V,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(V){const K=U(V.type),ee=B(V.type);if(K){this.setPointersPositions(V);var re=!1;this._changedPointerPositions.forEach(fe=>{var Se=this.getIntersection(fe);if(a.DD.justDragged=!1,i.Konva["_"+ee+"ListenClick"]=!0,!Se||!Se.isListening())return;i.Konva.capturePointerEventsEnabled&&Se.setPointerCapture(fe.id),this[ee+"ClickStartShape"]=Se,Se._fireAndBubble(K.pointerdown,{evt:V,pointerId:fe.id}),re=!0;const Me=V.type.indexOf("touch")>=0;Se.preventDefault()&&V.cancelable&&Me&&V.preventDefault()}),re||this._fire(K.pointerdown,{evt:V,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(V){const K=U(V.type),ee=B(V.type);if(!K)return;a.DD.isDragging&&a.DD.node.preventDefault()&&V.cancelable&&V.preventDefault(),this.setPointersPositions(V);var re=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!re)return;var fe={};let Se=!1;var Me=this._getTargetShape(ee);this._changedPointerPositions.forEach(De=>{const Ee=l.getCapturedShape(De.id)||this.getIntersection(De),tt=De.id,ot={evt:V,pointerId:tt};var xe=Me!==Ee;if(xe&&Me&&(Me._fireAndBubble(K.pointerout,{...ot},Ee),Me._fireAndBubble(K.pointerleave,{...ot},Ee)),Ee){if(fe[Ee._id])return;fe[Ee._id]=!0}Ee&&Ee.isListening()?(Se=!0,xe&&(Ee._fireAndBubble(K.pointerover,{...ot},Me),Ee._fireAndBubble(K.pointerenter,{...ot},Me),this[ee+"targetShape"]=Ee),Ee._fireAndBubble(K.pointermove,{...ot})):Me&&(this._fire(K.pointerover,{evt:V,target:this,currentTarget:this,pointerId:tt}),this[ee+"targetShape"]=null)}),Se||this._fire(K.pointermove,{evt:V,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(V){const K=U(V.type),ee=B(V.type);if(!K)return;this.setPointersPositions(V);const re=this[ee+"ClickStartShape"],fe=this[ee+"ClickEndShape"];var Se={};let Me=!1;this._changedPointerPositions.forEach(De=>{const Ee=l.getCapturedShape(De.id)||this.getIntersection(De);if(Ee){if(Ee.releaseCapture(De.id),Se[Ee._id])return;Se[Ee._id]=!0}const tt=De.id,ot={evt:V,pointerId:tt};let xe=!1;i.Konva["_"+ee+"InDblClickWindow"]?(xe=!0,clearTimeout(this[ee+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+ee+"InDblClickWindow"]=!0,clearTimeout(this[ee+"DblTimeout"])),this[ee+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ee+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),Ee&&Ee.isListening()?(Me=!0,this[ee+"ClickEndShape"]=Ee,Ee._fireAndBubble(K.pointerup,{...ot}),i.Konva["_"+ee+"ListenClick"]&&re&&re===Ee&&(Ee._fireAndBubble(K.pointerclick,{...ot}),xe&&fe&&fe===Ee&&Ee._fireAndBubble(K.pointerdblclick,{...ot}))):(this[ee+"ClickEndShape"]=null,i.Konva["_"+ee+"ListenClick"]&&this._fire(K.pointerclick,{evt:V,target:this,currentTarget:this,pointerId:tt}),xe&&this._fire(K.pointerdblclick,{evt:V,target:this,currentTarget:this,pointerId:tt}))}),Me||this._fire(K.pointerup,{evt:V,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ee+"ListenClick"]=!1,V.cancelable&&ee!=="touch"&&V.preventDefault()}_contextmenu(V){this.setPointersPositions(V);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(N,{evt:V}):this._fire(N,{evt:V,target:this,currentTarget:this})}_wheel(V){this.setPointersPositions(V);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(D,{evt:V}):this._fire(D,{evt:V,target:this,currentTarget:this})}_pointercancel(V){this.setPointersPositions(V);const K=l.getCapturedShape(V.pointerId)||this.getIntersection(this.getPointerPosition());K&&K._fireAndBubble(S,l.createEvent(V)),l.releaseCapture(V.pointerId)}_lostpointercapture(V){l.releaseCapture(V.pointerId)}setPointersPositions(V){var K=this._getContentPosition(),ee=null,re=null;V=V||window.event,V.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(V.touches,fe=>{this._pointerPositions.push({id:fe.identifier,x:(fe.clientX-K.left)/K.scaleX,y:(fe.clientY-K.top)/K.scaleY})}),Array.prototype.forEach.call(V.changedTouches||V.touches,fe=>{this._changedPointerPositions.push({id:fe.identifier,x:(fe.clientX-K.left)/K.scaleX,y:(fe.clientY-K.top)/K.scaleY})})):(ee=(V.clientX-K.left)/K.scaleX,re=(V.clientY-K.top)/K.scaleY,this.pointerPos={x:ee,y:re},this._pointerPositions=[{x:ee,y:re,id:t.Util._getFirstPointerId(V)}],this._changedPointerPositions=[{x:ee,y:re,id:t.Util._getFirstPointerId(V)}])}_setPointerPosition(V){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(V)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var V=this.content.getBoundingClientRect();return{top:V.top,left:V.left,scaleX:V.width/this.content.clientWidth||1,scaleY:V.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var V=this.container();if(!V)throw"Stage has no container. A container is required.";V.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),V.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(V){V.batchDraw()}),this}}e.Stage=Y,Y.prototype.nodeType=u,(0,s._registerNode)(Y),n.Factory.addGetterSetter(Y,"container")})(KU);var Um={},On={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=Ge,n=nn,r=je,i=Kt,o=Te,a=Ge,s=yi;var l="hasShadow",u="shadowRGBA",c="patternImage",d="linearGradient",f="radialGradient";let h;function p(){return h||(h=n.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function g(P){const E=this.attrs.fillRule;E?P.fill(E):P.fill()}function _(P){P.stroke()}function b(P){P.fill()}function y(P){P.stroke()}function m(){this._clearCache(l)}function v(){this._clearCache(u)}function S(){this._clearCache(c)}function w(){this._clearCache(d)}function C(){this._clearCache(f)}class x extends i.Node{constructor(E){super(E);let I;for(;I=n.Util.getRandomColor(),!(I&&!(I in e.shapes)););this.colorKey=I,e.shapes[I]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var E=p();const I=E.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const N=new n.Transform;N.translate(this.fillPatternX(),this.fillPatternY()),N.rotate(t.Konva.getAngle(this.fillPatternRotation())),N.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),N.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const M=N.getMatrix(),T=typeof DOMMatrix>"u"?{a:M[0],b:M[1],c:M[2],d:M[3],e:M[4],f:M[5]}:new DOMMatrix(M);I.setTransform(T)}return I}}_getLinearGradient(){return this._getCache(d,this.__getLinearGradient)}__getLinearGradient(){var E=this.fillLinearGradientColorStops();if(E){for(var I=p(),N=this.fillLinearGradientStartPoint(),M=this.fillLinearGradientEndPoint(),T=I.createLinearGradient(N.x,N.y,M.x,M.y),A=0;Athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const E=this.hitStrokeWidth();return E==="auto"?this.hasStroke():this.strokeEnabled()&&!!E}intersects(E){var I=this.getStage();if(!I)return!1;const N=I.bufferHitCanvas;return N.getContext().clear(),this.drawHit(N,void 0,!0),N.context.getImageData(Math.round(E.x),Math.round(E.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(E){var I;if(!this.getStage()||!((I=this.attrs.perfectDrawEnabled)!==null&&I!==void 0?I:!0))return!1;const M=E||this.hasFill(),T=this.hasStroke(),A=this.getAbsoluteOpacity()!==1;if(M&&T&&A)return!0;const R=this.hasShadow(),D=this.shadowForStrokeEnabled();return!!(M&&T&&R&&D)}setStrokeHitEnabled(E){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),E?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var E=this.size();return{x:this._centroid?-E.width/2:0,y:this._centroid?-E.height/2:0,width:E.width,height:E.height}}getClientRect(E={}){const I=E.skipTransform,N=E.relativeTo,M=this.getSelfRect(),A=!E.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,R=M.width+A,D=M.height+A,$=!E.skipShadow&&this.hasShadow(),L=$?this.shadowOffsetX():0,O=$?this.shadowOffsetY():0,B=R+Math.abs(L),U=D+Math.abs(O),j=$&&this.shadowBlur()||0,q=B+j*2,Y=U+j*2,Z={width:q,height:Y,x:-(A/2+j)+Math.min(L,0)+M.x,y:-(A/2+j)+Math.min(O,0)+M.y};return I?Z:this._transformedRect(Z,N)}drawScene(E,I){var N=this.getLayer(),M=E||N.getCanvas(),T=M.getContext(),A=this._getCanvasCache(),R=this.getSceneFunc(),D=this.hasShadow(),$,L,O,B=M.isCache,U=I===this;if(!this.isVisible()&&!U)return this;if(A){T.save();var j=this.getAbsoluteTransform(I).getMatrix();return T.transform(j[0],j[1],j[2],j[3],j[4],j[5]),this._drawCachedSceneCanvas(T),T.restore(),this}if(!R)return this;if(T.save(),this._useBufferCanvas()&&!B){$=this.getStage(),L=$.bufferCanvas,O=L.getContext(),O.clear(),O.save(),O._applyLineJoin(this);var q=this.getAbsoluteTransform(I).getMatrix();O.transform(q[0],q[1],q[2],q[3],q[4],q[5]),R.call(this,O,this),O.restore();var Y=L.pixelRatio;D&&T._applyShadow(this),T._applyOpacity(this),T._applyGlobalCompositeOperation(this),T.drawImage(L._canvas,0,0,L.width/Y,L.height/Y)}else{if(T._applyLineJoin(this),!U){var q=this.getAbsoluteTransform(I).getMatrix();T.transform(q[0],q[1],q[2],q[3],q[4],q[5]),T._applyOpacity(this),T._applyGlobalCompositeOperation(this)}D&&T._applyShadow(this),R.call(this,T,this)}return T.restore(),this}drawHit(E,I,N=!1){if(!this.shouldDrawHit(I,N))return this;var M=this.getLayer(),T=E||M.hitCanvas,A=T&&T.getContext(),R=this.hitFunc()||this.sceneFunc(),D=this._getCanvasCache(),$=D&&D.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),$){A.save();var L=this.getAbsoluteTransform(I).getMatrix();return A.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedHitCanvas(A),A.restore(),this}if(!R)return this;if(A.save(),A._applyLineJoin(this),!(this===I)){var B=this.getAbsoluteTransform(I).getMatrix();A.transform(B[0],B[1],B[2],B[3],B[4],B[5])}return R.call(this,A,this),A.restore(),this}drawHitFromCache(E=0){var I=this._getCanvasCache(),N=this._getCachedSceneCanvas(),M=I.hit,T=M.getContext(),A=M.getWidth(),R=M.getHeight(),D,$,L,O,B,U;T.clear(),T.drawImage(N._canvas,0,0,A,R);try{for(D=T.getImageData(0,0,A,R),$=D.data,L=$.length,O=n.Util._hexToRgb(this.colorKey),B=0;BE?($[B]=O.r,$[B+1]=O.g,$[B+2]=O.b,$[B+3]=255):$[B+3]=0;T.putImageData(D,0,0)}catch(j){n.Util.error("Unable to draw hit graph from cached scene canvas. "+j.message)}return this}hasPointerCapture(E){return s.hasPointerCapture(E,this)}setPointerCapture(E){s.setPointerCapture(E,this)}releaseCapture(E){s.releaseCapture(E,this)}}e.Shape=x,x.prototype._fillFunc=g,x.prototype._strokeFunc=_,x.prototype._fillFuncHit=b,x.prototype._strokeFuncHit=y,x.prototype._centroid=!1,x.prototype.nodeType="Shape",(0,a._registerNode)(x),x.prototype.eventListeners={},x.prototype.on.call(x.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),x.prototype.on.call(x.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",S),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",w),x.prototype.on.call(x.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",C),r.Factory.addGetterSetter(x,"stroke",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(x,"strokeWidth",2,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(x,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(x,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(x,"lineJoin"),r.Factory.addGetterSetter(x,"lineCap"),r.Factory.addGetterSetter(x,"sceneFunc"),r.Factory.addGetterSetter(x,"hitFunc"),r.Factory.addGetterSetter(x,"dash"),r.Factory.addGetterSetter(x,"dashOffset",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowColor",void 0,(0,o.getStringValidator)()),r.Factory.addGetterSetter(x,"shadowBlur",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowOpacity",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(x,"shadowOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"shadowOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternImage"),r.Factory.addGetterSetter(x,"fill",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(x,"fillPatternX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(x,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(x,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(x,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(x,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(x,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(x,"fillEnabled",!0),r.Factory.addGetterSetter(x,"strokeEnabled",!0),r.Factory.addGetterSetter(x,"shadowEnabled",!0),r.Factory.addGetterSetter(x,"dashEnabled",!0),r.Factory.addGetterSetter(x,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(x,"fillPriority","color"),r.Factory.addComponentsGetterSetter(x,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(x,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(x,"fillPatternScaleX",1,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(x,"fillPatternScaleY",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(x,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(x,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(x,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(x,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(x,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(x,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(x,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(x,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(x,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(x,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(x,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(x,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(x,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(x,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(x,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(x,"fillPatternRotation",0),r.Factory.addGetterSetter(x,"fillRule",void 0,(0,o.getStringValidator)()),r.Factory.backCompat(x,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(On);Object.defineProperty(Um,"__esModule",{value:!0});Um.Layer=void 0;const La=nn,jw=gc,Bc=Kt,cA=je,KM=Mo,TIe=Te,AIe=On,PIe=Ge;var kIe="#",IIe="beforeDraw",MIe="draw",YU=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],RIe=YU.length;class Bf extends jw.Container{constructor(t){super(t),this.canvas=new KM.SceneCanvas,this.hitCanvas=new KM.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(IIe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),jw.Container.prototype.drawScene.call(this,i,n),this._fire(MIe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),jw.Container.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return La.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Um.Layer=Bf;Bf.prototype.nodeType="Layer";(0,PIe._registerNode)(Bf);cA.Factory.addGetterSetter(Bf,"imageSmoothingEnabled",!0);cA.Factory.addGetterSetter(Bf,"clearBeforeDraw",!0);cA.Factory.addGetterSetter(Bf,"hitGraphEnabled",!0,(0,TIe.getBooleanValidator)());var RS={};Object.defineProperty(RS,"__esModule",{value:!0});RS.FastLayer=void 0;const OIe=nn,$Ie=Um,NIe=Ge;class dA extends $Ie.Layer{constructor(t){super(t),this.listening(!1),OIe.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}RS.FastLayer=dA;dA.prototype.nodeType="FastLayer";(0,NIe._registerNode)(dA);var zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.Group=void 0;const DIe=nn,LIe=gc,FIe=Ge;class fA extends LIe.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&DIe.Util.throw("You may only add groups and shapes to groups.")}}zf.Group=fA;fA.prototype.nodeType="Group";(0,FIe._registerNode)(fA);var Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});Vf.Animation=void 0;const Uw=Ge,XM=nn,Gw=function(){return Uw.glob.performance&&Uw.glob.performance.now?function(){return Uw.glob.performance.now()}:function(){return new Date().getTime()}}();class oa{constructor(t,n){this.id=oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Gw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var p=this.getTimer()-this._startTime;this.state===s?this.setTime(p):this.state===l&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class f{constructor(p){var g=this,_=p.node,b=_._id,y,m=p.easing||e.Easings.Linear,v=!!p.yoyo,S;typeof p.duration>"u"?y=.3:p.duration===0?y=.001:y=p.duration,this.node=_,this._id=u++;var w=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);w||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){g.tween.onEnterFrame()},w),this.tween=new d(S,function(C){g._tweenFunc(C)},m,0,1,y*1e3,v),this._addListeners(),f.attrs[b]||(f.attrs[b]={}),f.attrs[b][this._id]||(f.attrs[b][this._id]={}),f.tweens[b]||(f.tweens[b]={});for(S in p)o[S]===void 0&&this._addAttr(S,p[S]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,g){var _=this.node,b=_._id,y,m,v,S,w,C,x,P;if(v=f.tweens[b][p],v&&delete f.attrs[b][v][p],y=_.getAttr(p),t.Util._isArray(g))if(m=[],w=Math.max(g.length,y.length),p==="points"&&g.length!==y.length&&(g.length>y.length?(x=y,y=t.Util._prepareArrayForTween(y,g,_.closed())):(C=g,g=t.Util._prepareArrayForTween(g,y,_.closed()))),p.indexOf("fill")===0)for(S=0;S{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueEnd&&p.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueStart&&p.points(g.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,g=this._id,_=f.tweens[p],b;this.pause();for(b in _)delete f.tweens[p][b];delete f.attrs[p][g]}}e.Tween=f,f.attrs={},f.tweens={},r.Node.prototype.to=function(h){var p=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),p&&p()};var g=new f(h);g.play()},e.Easings={BackEaseIn(h,p,g,_){var b=1.70158;return g*(h/=_)*h*((b+1)*h-b)+p},BackEaseOut(h,p,g,_){var b=1.70158;return g*((h=h/_-1)*h*((b+1)*h+b)+1)+p},BackEaseInOut(h,p,g,_){var b=1.70158;return(h/=_/2)<1?g/2*(h*h*(((b*=1.525)+1)*h-b))+p:g/2*((h-=2)*h*(((b*=1.525)+1)*h+b)+2)+p},ElasticEaseIn(h,p,g,_,b,y){var m=0;return h===0?p:(h/=_)===1?p+g:(y||(y=_*.3),!b||b0?t:n),c=a*n,d=s*(s>0?t:n),f=l*(l>0?n:t);return{x:u,y:r?-1*f:d,width:c-u,height:f-d}}}OS.Arc=As;As.prototype._centroid=!0;As.prototype.className="Arc";As.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,zIe._registerNode)(As);$S.Factory.addGetterSetter(As,"innerRadius",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"outerRadius",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"angle",0,(0,NS.getNumberValidator)());$S.Factory.addGetterSetter(As,"clockwise",!1,(0,NS.getBooleanValidator)());var DS={},Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.Line=void 0;const LS=je,VIe=On,JU=Te,jIe=Ge;function I3(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),c=a*l/(s+l),d=n-u*(i-e),f=r-u*(o-t),h=n+c*(i-e),p=r+c*(o-t);return[d,f,h,p]}function YM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u{let u,c,d;u=l/2,c=0;for(let h=0;h<20;h++)d=u*e.tValues[20][h]+u,c+=e.cValues[20][h]*r(a,s,d);return u*c};e.getCubicArcLength=t;const n=(a,s,l)=>{l===void 0&&(l=1);const u=a[0]-2*a[1]+a[2],c=s[0]-2*s[1]+s[2],d=2*a[1]-2*a[0],f=2*s[1]-2*s[0],h=4*(u*u+c*c),p=4*(u*d+c*f),g=d*d+f*f;if(h===0)return l*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(s[2]-s[0],2));const _=p/(2*h),b=g/h,y=l+_,m=b-_*_,v=y*y+m>0?Math.sqrt(y*y+m):0,S=_*_+m>0?Math.sqrt(_*_+m):0,w=_+Math.sqrt(_*_+m)!==0?m*Math.log(Math.abs((y+v)/(_+S))):0;return Math.sqrt(h)/2*(y*v-_*S+w)};e.getQuadraticArcLength=n;function r(a,s,l){const u=i(1,l,a),c=i(1,l,s),d=u*u+c*c;return Math.sqrt(d)}const i=(a,s,l)=>{const u=l.length-1;let c,d;if(u===0)return 0;if(a===0){d=0;for(let f=0;f<=u;f++)d+=e.binomialCoefficients[u][f]*Math.pow(1-s,u-f)*Math.pow(s,f)*l[f];return d}else{c=new Array(u);for(let f=0;f{let u=1,c=a/s,d=(a-l(c))/s,f=0;for(;u>.001;){const h=l(c+d),p=Math.abs(a-h)/s;if(p500)break}return c};e.t2length=o})(eG);Object.defineProperty(jf,"__esModule",{value:!0});jf.Path=void 0;const UIe=je,GIe=On,HIe=Ge,zc=eG;class An extends GIe.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=An.parsePathData(this.data()),this.pathLength=An.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;ic?u:c,_=u>c?1:u/c,b=u>c?c/u:1;t.translate(s,l),t.rotate(h),t.scale(_,b),t.arc(0,0,g,d,d+f,1-p),t.scale(1/_,1/b),t.rotate(-h),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var c=u.points[4],d=u.points[5],f=u.points[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;p-=h){const g=An.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],p,0);t.push(g.x,g.y)}else for(let p=c+h;pn[i].pathLength;)t-=n[i].pathLength,++i;if(i===o)return r=n[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[i].points.slice(0,2),{x:r[0],y:r[1]};var a=n[i],s=a.points;switch(a.command){case"L":return An.getPointOnLine(t,a.start.x,a.start.y,s[0],s[1]);case"C":return An.getPointOnCubicBezier((0,zc.t2length)(t,An.getPathLength(n),g=>(0,zc.getCubicArcLength)([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],g)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return An.getPointOnQuadraticBezier((0,zc.t2length)(t,An.getPathLength(n),g=>(0,zc.getQuadraticArcLength)([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],g)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var l=s[0],u=s[1],c=s[2],d=s[3],f=s[4],h=s[5],p=s[6];return f+=h*t/a.pathLength,An.getPointOnEllipticalArc(l,u,c,d,f,p)}return null}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(p[0]);){var y="",m=[],v=l,S=u,w,C,x,P,E,I,N,M,T,A;switch(h){case"l":l+=p.shift(),u+=p.shift(),y="L",m.push(l,u);break;case"L":l=p.shift(),u=p.shift(),m.push(l,u);break;case"m":var R=p.shift(),D=p.shift();if(l+=R,u+=D,y="M",a.length>2&&a[a.length-1].command==="z"){for(var $=a.length-2;$>=0;$--)if(a[$].command==="M"){l=a[$].points[0]+R,u=a[$].points[1]+D;break}}m.push(l,u),h="l";break;case"M":l=p.shift(),u=p.shift(),y="M",m.push(l,u),h="L";break;case"h":l+=p.shift(),y="L",m.push(l,u);break;case"H":l=p.shift(),y="L",m.push(l,u);break;case"v":u+=p.shift(),y="L",m.push(l,u);break;case"V":u=p.shift(),y="L",m.push(l,u);break;case"C":m.push(p.shift(),p.shift(),p.shift(),p.shift()),l=p.shift(),u=p.shift(),m.push(l,u);break;case"c":m.push(l+p.shift(),u+p.shift(),l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",m.push(l,u);break;case"S":C=l,x=u,w=a[a.length-1],w.command==="C"&&(C=l+(l-w.points[2]),x=u+(u-w.points[3])),m.push(C,x,p.shift(),p.shift()),l=p.shift(),u=p.shift(),y="C",m.push(l,u);break;case"s":C=l,x=u,w=a[a.length-1],w.command==="C"&&(C=l+(l-w.points[2]),x=u+(u-w.points[3])),m.push(C,x,l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",m.push(l,u);break;case"Q":m.push(p.shift(),p.shift()),l=p.shift(),u=p.shift(),m.push(l,u);break;case"q":m.push(l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="Q",m.push(l,u);break;case"T":C=l,x=u,w=a[a.length-1],w.command==="Q"&&(C=l+(l-w.points[0]),x=u+(u-w.points[1])),l=p.shift(),u=p.shift(),y="Q",m.push(C,x,l,u);break;case"t":C=l,x=u,w=a[a.length-1],w.command==="Q"&&(C=l+(l-w.points[0]),x=u+(u-w.points[1])),l+=p.shift(),u+=p.shift(),y="Q",m.push(C,x,l,u);break;case"A":P=p.shift(),E=p.shift(),I=p.shift(),N=p.shift(),M=p.shift(),T=l,A=u,l=p.shift(),u=p.shift(),y="A",m=this.convertEndpointToCenterParameterization(T,A,l,u,N,M,P,E,I);break;case"a":P=p.shift(),E=p.shift(),I=p.shift(),N=p.shift(),M=p.shift(),T=l,A=u,l+=p.shift(),u+=p.shift(),y="A",m=this.convertEndpointToCenterParameterization(T,A,l,u,N,M,P,E,I);break}a.push({command:y||h,points:m,start:{x:v,y:S},pathLength:this.calcLength(v,S,y||h,m)})}(h==="z"||h==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=An;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":return(0,zc.getCubicArcLength)([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case"Q":return(0,zc.getQuadraticArcLength)([t,i[0],i[2]],[n,i[1],i[3]],1);case"A":o=0;var c=i[4],d=i[5],f=i[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;l-=h)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=c+h;l1&&(s*=Math.sqrt(h),l*=Math.sqrt(h));var p=Math.sqrt((s*s*(l*l)-s*s*(f*f)-l*l*(d*d))/(s*s*(f*f)+l*l*(d*d)));o===a&&(p*=-1),isNaN(p)&&(p=0);var g=p*s*f/l,_=p*-l*d/s,b=(t+r)/2+Math.cos(c)*g-Math.sin(c)*_,y=(n+i)/2+Math.sin(c)*g+Math.cos(c)*_,m=function(E){return Math.sqrt(E[0]*E[0]+E[1]*E[1])},v=function(E,I){return(E[0]*I[0]+E[1]*I[1])/(m(E)*m(I))},S=function(E,I){return(E[0]*I[1]=1&&(P=0),a===0&&P>0&&(P=P-2*Math.PI),a===1&&P<0&&(P=P+2*Math.PI),[b,y,s,l,w,P,c,a]}}jf.Path=An;An.prototype.className="Path";An.prototype._attrsAffectingSize=["data"];(0,HIe._registerNode)(An);UIe.Factory.addGetterSetter(An,"data");Object.defineProperty(DS,"__esModule",{value:!0});DS.Arrow=void 0;const FS=je,qIe=Gm,tG=Te,WIe=Ge,ZM=jf;class yc extends qIe.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const f=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],h=ZM.Path.calcLength(i[i.length-4],i[i.length-3],"C",f),p=ZM.Path.getPointOnQuadraticBezier(Math.min(1,1-a/h),f[0],f[1],f[2],f[3],f[4],f[5]);l=r[s-2]-p.x,u=r[s-1]-p.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var c=(Math.atan2(u,l)+n)%n,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}DS.Arrow=yc;yc.prototype.className="Arrow";(0,WIe._registerNode)(yc);FS.Factory.addGetterSetter(yc,"pointerLength",10,(0,tG.getNumberValidator)());FS.Factory.addGetterSetter(yc,"pointerWidth",10,(0,tG.getNumberValidator)());FS.Factory.addGetterSetter(yc,"pointerAtBeginning",!1);FS.Factory.addGetterSetter(yc,"pointerAtEnding",!0);var BS={};Object.defineProperty(BS,"__esModule",{value:!0});BS.Circle=void 0;const KIe=je,XIe=On,QIe=Te,YIe=Ge;class Uf extends XIe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}BS.Circle=Uf;Uf.prototype._centroid=!0;Uf.prototype.className="Circle";Uf.prototype._attrsAffectingSize=["radius"];(0,YIe._registerNode)(Uf);KIe.Factory.addGetterSetter(Uf,"radius",0,(0,QIe.getNumberValidator)());var zS={};Object.defineProperty(zS,"__esModule",{value:!0});zS.Ellipse=void 0;const hA=je,ZIe=On,nG=Te,JIe=Ge;class Yl extends ZIe.Shape{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}zS.Ellipse=Yl;Yl.prototype.className="Ellipse";Yl.prototype._centroid=!0;Yl.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,JIe._registerNode)(Yl);hA.Factory.addComponentsGetterSetter(Yl,"radius",["x","y"]);hA.Factory.addGetterSetter(Yl,"radiusX",0,(0,nG.getNumberValidator)());hA.Factory.addGetterSetter(Yl,"radiusY",0,(0,nG.getNumberValidator)());var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.Image=void 0;const Hw=nn,vc=je,e8e=On,t8e=Ge,Hm=Te;let Ia=class rG extends e8e.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;let a;if(o){const s=this.attrs.cropWidth,l=this.attrs.cropHeight;s&&l?a=[o,this.cropX(),this.cropY(),s,l,0,0,n,r]:a=[o,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?Hw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),o&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var n=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?Hw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=Hw.Util.createImageElement();i.onload=function(){var o=new rG({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};VS.Image=Ia;Ia.prototype.className="Image";(0,t8e._registerNode)(Ia);vc.Factory.addGetterSetter(Ia,"cornerRadius",0,(0,Hm.getNumberOrArrayOfNumbersValidator)(4));vc.Factory.addGetterSetter(Ia,"image");vc.Factory.addComponentsGetterSetter(Ia,"crop",["x","y","width","height"]);vc.Factory.addGetterSetter(Ia,"cropX",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropY",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropWidth",0,(0,Hm.getNumberValidator)());vc.Factory.addGetterSetter(Ia,"cropHeight",0,(0,Hm.getNumberValidator)());var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.Tag=Ef.Label=void 0;const jS=je,n8e=On,r8e=zf,pA=Te,iG=Ge;var oG=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],i8e="Change.konva",o8e="none",M3="up",R3="right",O3="down",$3="left",a8e=oG.length;class gA extends r8e.Group{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}GS.RegularPolygon=_c;_c.prototype.className="RegularPolygon";_c.prototype._centroid=!0;_c.prototype._attrsAffectingSize=["radius"];(0,h8e._registerNode)(_c);aG.Factory.addGetterSetter(_c,"radius",0,(0,sG.getNumberValidator)());aG.Factory.addGetterSetter(_c,"sides",0,(0,sG.getNumberValidator)());var HS={};Object.defineProperty(HS,"__esModule",{value:!0});HS.Ring=void 0;const lG=je,p8e=On,uG=Te,g8e=Ge;var JM=Math.PI*2;class Sc extends p8e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,JM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),JM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}HS.Ring=Sc;Sc.prototype.className="Ring";Sc.prototype._centroid=!0;Sc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,g8e._registerNode)(Sc);lG.Factory.addGetterSetter(Sc,"innerRadius",0,(0,uG.getNumberValidator)());lG.Factory.addGetterSetter(Sc,"outerRadius",0,(0,uG.getNumberValidator)());var qS={};Object.defineProperty(qS,"__esModule",{value:!0});qS.Sprite=void 0;const xc=je,m8e=On,y8e=Vf,cG=Te,v8e=Ge;class Ma extends m8e.Shape{constructor(t){super(t),this._updated=!0,this.anim=new y8e.Animation(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],c=o[i+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,c),t.closePath(),t.fillStrokeShape(this)),d)if(a){var f=a[n],h=r*2;t.drawImage(d,s,l,u,c,f[h+0],f[h+1],u,c)}else t.drawImage(d,s,l,u,c,0,0,u,c)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],c=r*2;t.rect(u[c+0],u[c+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var my;function Ww(){return my||(my=N3.Util.createCanvasElement().getContext(E8e),my)}function D8e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L8e(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function F8e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hn extends S8e.Shape{constructor(t){super(F8e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<$8e;n++)this.on(gG[n]+C8e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=this.direction(),u=0,c=this.align(),d=this.getWidth(),f=this.letterSpacing(),h=this.fill(),p=this.textDecoration(),g=p.indexOf("underline")!==-1,_=p.indexOf("line-through")!==-1,b;l=l===fG?t.direction:l;var y=0,y=a/2,m=0,v=0;for(l===nR&&t.setAttr("direction",l),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",tR),t.setAttr("textAlign",hG),s===tR?u=(this.getHeight()-r*a-i*2)/2:s===k8e&&(u=this.getHeight()-r*a-i*2),t.translate(i,u+i),b=0;b1&&(y+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=N3.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(T8e,n),this}getWidth(){var t=this.attrs.width===Vc||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Vc||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return N3.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Ww(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+gy+this.fontVariant()+gy+(this.fontSize()+I8e)+N8e(this.fontFamily())}_addTextLine(t){this.align()===Ch&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Ww().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Vc&&o!==void 0,l=a!==Vc&&a!==void 0,u=this.padding(),c=o-u*2,d=a-u*2,f=0,h=this.wrap(),p=h!==rR,g=h!==O8e&&p,_=this.ellipsis();this.textArr=[],Ww().font=this._getContextFont();for(var b=_?this._getTextWidth(qw):0,y=0,m=t.length;yc)for(;v.length>0;){for(var w=0,C=v.length,x="",P=0;w>>1,I=v.slice(0,E+1),N=this._getTextWidth(I)+b;N<=c?(w=E+1,x=I,P=N):C=E}if(x){if(g){var M,T=v[x.length],A=T===gy||T===eR;A&&P<=c?M=x.length:M=Math.max(x.lastIndexOf(gy),x.lastIndexOf(eR))+1,M>0&&(w=M,x=x.slice(0,w),P=this._getTextWidth(x))}x=x.trimRight(),this._addTextLine(x),r=Math.max(r,P),f+=i;var R=this._shouldHandleEllipsis(f);if(R){this._tryToAddEllipsisToLastLine();break}if(v=v.slice(w),v=v.trimLeft(),v.length>0&&(S=this._getTextWidth(v),S<=c)){this._addTextLine(v),f+=i,r=Math.max(r,S);break}}else break}else this._addTextLine(v),f+=i,r=Math.max(r,S),this._shouldHandleEllipsis(f)&&yd)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Vc&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==rR;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Vc&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+qw)n?null:Eh.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Eh.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;ie+`.${_G}`).join(" "),aR="nodesRect",q8e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],W8e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const K8e="ontouchstart"in go.Konva._global;function X8e(e,t,n){if(e==="rotater")return n;t+=_t.Util.degToRad(W8e[e]||0);var r=(_t.Util.radToDeg(t)%360+360)%360;return _t.Util._inRange(r,315+22.5,360)||_t.Util._inRange(r,0,22.5)?"ns-resize":_t.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":_t.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":_t.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":_t.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":_t.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":_t.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":_t.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(_t.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var lb=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],sR=1e8;function Q8e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function SG(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:i}}function Y8e(e,t){const n=Q8e(e);return SG(e,t,n)}function Z8e(e,t,n){let r=t;for(let i=0;ii.isAncestorOf(this)?(_t.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");i.on(a,o),i.on(q8e.map(s=>s+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(aR),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(aR,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(go.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),c={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return SG(c,-go.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-sR,y:-sR,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const c=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var d=[{x:c.x,y:c.y},{x:c.x+c.width,y:c.y},{x:c.x+c.width,y:c.y+c.height},{x:c.x,y:c.y+c.height}],f=u.getAbsoluteTransform();d.forEach(function(h){var p=f.point(h);n.push(p)})});const r=new _t.Transform;r.rotate(-go.Konva.getAngle(this.rotation()));var i=1/0,o=1/0,a=-1/0,s=-1/0;n.forEach(function(u){var c=r.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:go.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),lb.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var n=new U8e.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:K8e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=go.Konva.getAngle(this.rotation()),o=this.rotateAnchorCursor(),a=X8e(t,i,o);n.getStage().content&&(n.getStage().content.style.cursor=a),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new j8e.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){var i=r.getParent(),o=i.padding();n.beginPath(),n.rect(-o,-o,r.width()+o*2,r.height()+o*2),n.moveTo(r.width()/2,-o),i.rotateEnabled()&&n.lineTo(r.width()/2,-i.rotateAnchorOffset()*_t.Util._sign(r.height())-o),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const c=o.getAbsolutePosition();if(!(u.x===c.x&&u.y===c.y)){if(this._movingAnchorName==="rotater"){var d=this._getNodeRect();n=o.x()-d.width/2,r=-o.y()+d.height/2;let M=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(M-=Math.PI);var f=go.Konva.getAngle(this.rotation());const T=f+M,A=go.Konva.getAngle(this.rotationSnapTolerance()),D=Z8e(this.rotationSnaps(),T,A)-d.rotation,$=Y8e(d,D);this._fitNodesInto($,t);return}var h=this.shiftBehavior(),p;h==="inverted"?p=this.keepRatio()&&!t.shiftKey:h==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var m=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(g.y-o.y(),2));var _=this.findOne(".top-left").x()>g.x?-1:1,b=this.findOne(".top-left").y()>g.y?-1:1;n=i*this.cos*_,r=i*this.sin*b,this.findOne(".top-left").x(g.x-n),this.findOne(".top-left").y(g.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-g.x,2)+Math.pow(g.y-o.y(),2));var _=this.findOne(".top-right").x()g.y?-1:1;n=i*this.cos*_,r=i*this.sin*b,this.findOne(".top-right").x(g.x+n),this.findOne(".top-right").y(g.y-r)}var y=o.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(p){var g=m?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(o.y()-g.y,2));var _=g.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(_t.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(_t.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}var o=new _t.Transform;if(o.rotate(go.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=o.point({x:-this.padding()*2,y:0});t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=o.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=o.point({x:0,y:-this.padding()*2});t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=o.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:_t.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,s=new _t.Transform;s.translate(r.x,r.y),s.rotate(r.rotation),s.scale(r.width/a,r.height/a);const l=new _t.Transform,u=t.width/a,c=t.height/a;this.flipEnabled()===!1?(l.translate(t.x,t.y),l.rotate(t.rotation),l.translate(t.width<0?t.width:0,t.height<0?t.height:0),l.scale(Math.abs(u),Math.abs(c))):(l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(u,c));const d=l.multiply(s.invert());this._nodes.forEach(f=>{var h;const p=f.getParent().getAbsoluteTransform(),g=f.getTransform().copy();g.translate(f.offsetX(),f.offsetY());const _=new _t.Transform;_.multiply(p.copy().invert()).multiply(d).multiply(p).multiply(g);const b=_.decompose();f.setAttrs(b),this._fire("transform",{evt:n,target:f}),f._fire("transform",{evt:n,target:f}),(h=f.getLayer())===null||h===void 0||h.batchDraw()}),this.rotation(_t.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(_t.Util._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const u=this.find("._anchor");u.forEach(d=>{d.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*_t.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&u.forEach(d=>{c(d)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),oR.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return iR.Node.prototype.toObject.call(this)}clone(t){var n=iR.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}XS.Transformer=lt;function J8e(e){return e instanceof Array||_t.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){lb.indexOf(t)===-1&&_t.Util.warn("Unknown anchor name: "+t+". Available names are: "+lb.join(", "))}),e||[]}lt.prototype.className="Transformer";(0,G8e._registerNode)(lt);yt.Factory.addGetterSetter(lt,"enabledAnchors",lb,J8e);yt.Factory.addGetterSetter(lt,"flipEnabled",!0,(0,eu.getBooleanValidator)());yt.Factory.addGetterSetter(lt,"resizeEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorSize",10,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotateEnabled",!0);yt.Factory.addGetterSetter(lt,"rotationSnaps",[]);yt.Factory.addGetterSetter(lt,"rotateAnchorOffset",50,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotateAnchorCursor","crosshair");yt.Factory.addGetterSetter(lt,"rotationSnapTolerance",5,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"anchorStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"anchorFill","white");yt.Factory.addGetterSetter(lt,"anchorCornerRadius",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"borderStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderDash");yt.Factory.addGetterSetter(lt,"keepRatio",!0);yt.Factory.addGetterSetter(lt,"shiftBehavior","default");yt.Factory.addGetterSetter(lt,"centeredScaling",!1);yt.Factory.addGetterSetter(lt,"ignoreStroke",!1);yt.Factory.addGetterSetter(lt,"padding",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"node");yt.Factory.addGetterSetter(lt,"nodes");yt.Factory.addGetterSetter(lt,"boundBoxFunc");yt.Factory.addGetterSetter(lt,"anchorDragBoundFunc");yt.Factory.addGetterSetter(lt,"anchorStyleFunc");yt.Factory.addGetterSetter(lt,"shouldOverdrawWholeArea",!1);yt.Factory.addGetterSetter(lt,"useSingleNodeRotation",!0);yt.Factory.backCompat(lt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var QS={};Object.defineProperty(QS,"__esModule",{value:!0});QS.Wedge=void 0;const YS=je,e9e=On,t9e=Ge,xG=Te,n9e=Ge;class Ps extends e9e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,t9e.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}QS.Wedge=Ps;Ps.prototype.className="Wedge";Ps.prototype._centroid=!0;Ps.prototype._attrsAffectingSize=["radius"];(0,n9e._registerNode)(Ps);YS.Factory.addGetterSetter(Ps,"radius",0,(0,xG.getNumberValidator)());YS.Factory.addGetterSetter(Ps,"angle",0,(0,xG.getNumberValidator)());YS.Factory.addGetterSetter(Ps,"clockwise",!1);YS.Factory.backCompat(Ps,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var ZS={};Object.defineProperty(ZS,"__esModule",{value:!0});ZS.Blur=void 0;const lR=je,r9e=Kt,i9e=Te;function uR(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var o9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],a9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function s9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,c,d,f,h,p,g,_,b,y,m,v,S,w,C,x,P,E,I,N,M=t+t+1,T=r-1,A=i-1,R=t+1,D=R*(R+1)/2,$=new uR,L=null,O=$,B=null,U=null,j=o9e[t],q=a9e[t];for(s=1;s>q,I!==0?(I=255/I,n[c]=(f*j>>q)*I,n[c+1]=(h*j>>q)*I,n[c+2]=(p*j>>q)*I):n[c]=n[c+1]=n[c+2]=0,f-=_,h-=b,p-=y,g-=m,_-=B.r,b-=B.g,y-=B.b,m-=B.a,l=d+((l=o+t+1)>q,I>0?(I=255/I,n[l]=(f*j>>q)*I,n[l+1]=(h*j>>q)*I,n[l+2]=(p*j>>q)*I):n[l]=n[l+1]=n[l+2]=0,f-=_,h-=b,p-=y,g-=m,_-=B.r,b-=B.g,y-=B.b,m-=B.a,l=o+((l=a+R)0&&s9e(t,n)};ZS.Blur=l9e;lR.Factory.addGetterSetter(r9e.Node,"blurRadius",0,(0,i9e.getNumberValidator)(),lR.Factory.afterSetFilter);var JS={};Object.defineProperty(JS,"__esModule",{value:!0});JS.Brighten=void 0;const cR=je,u9e=Kt,c9e=Te,d9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};e2.Contrast=p9e;dR.Factory.addGetterSetter(f9e.Node,"contrast",0,(0,h9e.getNumberValidator)(),dR.Factory.afterSetFilter);var t2={};Object.defineProperty(t2,"__esModule",{value:!0});t2.Emboss=void 0;const Nl=je,n2=Kt,g9e=nn,wG=Te,m9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,c=l*4,d=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:g9e.Util.error("Unknown emboss direction: "+r)}do{var f=(d-1)*c,h=o;d+h<1&&(h=0),d+h>u&&(h=0);var p=(d-1+h)*l*4,g=l;do{var _=f+(g-1)*4,b=a;g+b<1&&(b=0),g+b>l&&(b=0);var y=p+(g-1+b)*4,m=s[_]-s[y],v=s[_+1]-s[y+1],S=s[_+2]-s[y+2],w=m,C=w>0?w:-w,x=v>0?v:-v,P=S>0?S:-S;if(x>C&&(w=v),P>C&&(w=S),w*=t,i){var E=s[_]+w,I=s[_+1]+w,N=s[_+2]+w;s[_]=E>255?255:E<0?0:E,s[_+1]=I>255?255:I<0?0:I,s[_+2]=N>255?255:N<0?0:N}else{var M=n-w;M<0?M=0:M>255&&(M=255),s[_]=s[_+1]=s[_+2]=M}}while(--g)}while(--d)};t2.Emboss=m9e;Nl.Factory.addGetterSetter(n2.Node,"embossStrength",.5,(0,wG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossWhiteLevel",.5,(0,wG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossDirection","top-left",null,Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(n2.Node,"embossBlend",!1,null,Nl.Factory.afterSetFilter);var r2={};Object.defineProperty(r2,"__esModule",{value:!0});r2.Enhance=void 0;const fR=je,y9e=Kt,v9e=Te;function Qw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const b9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],c=u,d,f,h=this.enhance();if(h!==0){for(f=0;fi&&(i=o),l=t[f+1],ls&&(s=l),d=t[f+2],dc&&(c=d);i===r&&(i=255,r=0),s===a&&(s=255,a=0),c===u&&(c=255,u=0);var p,g,_,b,y,m,v,S,w;for(h>0?(g=i+h*(255-i),_=r-h*(r-0),y=s+h*(255-s),m=a-h*(a-0),S=c+h*(255-c),w=u-h*(u-0)):(p=(i+r)*.5,g=i+h*(i-p),_=r+h*(r-p),b=(s+a)*.5,y=s+h*(s-b),m=a+h*(a-b),v=(c+u)*.5,S=c+h*(c-v),w=u+h*(u-v)),f=0;fb?_:b;var y=a,m=o,v,S,w=360/m*Math.PI/180,C,x;for(S=0;Sm?y:m;var v=a,S=o,w,C,x=n.polarRotation||0,P,E;for(c=0;ct&&(v=m,S=0,w=-1),i=0;i=0&&h=0&&p=0&&h=0&&p=255*4?255:0}return a}function $9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&h=0&&p=n))for(o=g;o<_;o+=1)o>=r||(a=(n*o+i)*4,s+=v[a+0],l+=v[a+1],u+=v[a+2],c+=v[a+3],m+=1);for(s=s/m,l=l/m,u=u/m,c=c/m,i=h;i=n))for(o=g;o<_;o+=1)o>=r||(a=(n*o+i)*4,v[a+0]=s,v[a+1]=l,v[a+2]=u,v[a+3]=c)}};d2.Pixelate=j9e;mR.Factory.addGetterSetter(z9e.Node,"pixelSize",8,(0,V9e.getNumberValidator)(),mR.Factory.afterSetFilter);var f2={};Object.defineProperty(f2,"__esModule",{value:!0});f2.Posterize=void 0;const yR=je,U9e=Kt,G9e=Te,H9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});cb.Factory.addGetterSetter(xA.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});cb.Factory.addGetterSetter(xA.Node,"blue",0,q9e.RGBComponent,cb.Factory.afterSetFilter);var p2={};Object.defineProperty(p2,"__esModule",{value:!0});p2.RGBA=void 0;const Gg=je,g2=Kt,K9e=Te,X9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Gg.Factory.addGetterSetter(g2.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Gg.Factory.addGetterSetter(g2.Node,"blue",0,K9e.RGBComponent,Gg.Factory.afterSetFilter);Gg.Factory.addGetterSetter(g2.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.Sepia=void 0;const Q9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),c>127&&(c=255-c),d>127&&(d=255-d),t[l]=u,t[l+1]=c,t[l+2]=d}while(--s)}while(--o)};y2.Solarize=Y9e;var v2={};Object.defineProperty(v2,"__esModule",{value:!0});v2.Threshold=void 0;const vR=je,Z9e=Kt,J9e=Te,eMe=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{const{width:r,height:i}=t,o=document.createElement("div"),a=new Ah.Stage({container:o,width:r,height:i}),s=new Ah.Layer,l=new Ah.Layer;return s.add(new Ah.Rect({...t,fill:n?"black":"white"})),e.forEach(u=>l.add(new Ah.Line({points:u.points,stroke:n?"white":"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),a.add(s),a.add(l),o.remove(),a},zMe=async(e,t,n)=>new Promise((r,i)=>{const o=document.createElement("canvas");o.width=t,o.height=n;const a=o.getContext("2d"),s=new Image;if(!a){o.remove(),i("Unable to get context");return}s.onload=function(){a.drawImage(s,0,0),o.remove(),r(a.getImageData(0,0,t,n))},s.src=e}),SR=async(e,t)=>{const n=e.toDataURL(t);return await zMe(n,t.width,t.height)},wA=async(e,t,n,r,i)=>{const o=se("canvas"),a=ES(),s=$6e();if(!a||!s){o.error("Unable to find canvas / stage");return}const l={...t,...n},u=a.clone();u.scale({x:1,y:1});const c=u.getAbsolutePosition(),d={x:l.x+c.x,y:l.y+c.y,width:l.width,height:l.height},f=await ab(u,d),h=await SR(u,d),p=await BMe(r?e.objects.filter(wL):[],l,i),g=await ab(p,l),_=await SR(p,l);return{baseBlob:f,baseImageData:h,maskBlob:g,maskImageData:_}},VMe=()=>{pe({actionCreator:A6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),o=await wA(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!o)return;const{maskBlob:a}=o;if(!a){r.error("Problem getting mask layer blob"),t(it({title:X("toast.problemSavingMask"),description:X("toast.problemSavingMaskDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery;t(ce.endpoints.uploadImage.initiate({file:new File([a],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.maskSavedAssets")}}}))}})},jMe=()=>{pe({actionCreator:R6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n(),{id:o}=e.payload,a=await wA(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!a)return;const{maskBlob:s}=a;if(!s){r.error("Problem getting mask layer blob"),t(it({title:X("toast.problemImportingMask"),description:X("toast.problemImportingMaskDesc"),status:"error"}));return}const{autoAddBoardId:l}=i.gallery,u=await t(ce.endpoints.uploadImage.initiate({file:new File([s],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:l==="none"?void 0:l,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.maskSentControlnetAssets")}}})).unwrap(),{image_name:c}=u;t(Hl({id:o,controlImage:c}))}})},UMe=async()=>{const e=ES();if(!e)return;const t=e.clone();return t.scale({x:1,y:1}),ab(t,t.getClientRect())},GMe=()=>{pe({actionCreator:I6e,effect:async(e,{dispatch:t})=>{const n=J_.get().child({namespace:"canvasCopiedToClipboardListener"}),r=await UMe();if(!r){n.error("Problem getting base layer blob"),t(it({title:X("toast.problemMergingCanvas"),description:X("toast.problemMergingCanvasDesc"),status:"error"}));return}const i=ES();if(!i){n.error("Problem getting canvas base layer"),t(it({title:X("toast.problemMergingCanvas"),description:X("toast.problemMergingCanvasDesc"),status:"error"}));return}const o=i.getClientRect({relativeTo:i.getParent()??void 0}),a=await t(ce.endpoints.uploadImage.initiate({file:new File([r],"mergedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasMerged")}}})).unwrap(),{image_name:s}=a;t(Mle({kind:"image",layer:"base",imageName:s,...o}))}})},HMe=()=>{pe({actionCreator:T6e,effect:async(e,{dispatch:t,getState:n})=>{const r=se("canvas"),i=n();let o;try{o=await TS(i)}catch(s){r.error(String(s)),t(it({title:X("toast.problemSavingCanvas"),description:X("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:a}=i.gallery;t(ce.endpoints.uploadImage.initiate({file:new File([o],"savedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!1,board_id:a==="none"?void 0:a,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:X("toast.canvasSavedGallery")}}}))}})},qMe=(e,t,n)=>{if(!(Fie.match(e)||S6.match(e)||Hl.match(e)||Bie.match(e)||x6.match(e)))return!1;const{id:i}=e.payload,o=di(n.controlAdapters,i),a=di(t.controlAdapters,i);if(!o||!gi(o)||!a||!gi(a)||x6.match(e)&&o.shouldAutoConfig===!0)return!1;const{controlImage:s,processorType:l,shouldAutoConfig:u}=a;return S6.match(e)&&!u?!1:l!=="none"&&!!s},WMe=()=>{pe({predicate:qMe,effect:async(e,{dispatch:t,cancelActiveListeners:n,delay:r})=>{const i=se("session"),{id:o}=e.payload;n(),i.trace("ControlNet auto-process triggered"),await r(300),t(IE({id:o}))}})},TG=e=>(e==null?void 0:e.type)==="image_output",KMe=()=>{pe({actionCreator:IE,effect:async(e,{dispatch:t,getState:n,take:r})=>{var u;const i=se("session"),{id:o}=e.payload,a=di(n().controlAdapters,o);if(!(a!=null&&a.controlImage)||!gi(a)){i.error("Unable to process ControlNet image");return}if(a.processorType==="none"||a.processorNode.type==="none")return;const s=a.processorNode.id,l={prepend:!0,batch:{graph:{nodes:{[a.processorNode.id]:{...a.processorNode,is_intermediate:!0,use_cache:!1,image:{image_name:a.controlImage}}}},runs:1}};try{const c=t(un.endpoints.enqueueBatch.initiate(l,{fixedCacheKey:"enqueueBatch"})),d=await c.unwrap();c.reset(),i.debug({enqueueResult:pt(d)},X("queue.graphQueued"));const[f]=await r(h=>TE.match(h)&&h.payload.data.queue_batch_id===d.batch.batch_id&&h.payload.data.source_node_id===s);if(TG(f.payload.data.result)){const{image_name:h}=f.payload.data.result.image,[{payload:p}]=await r(_=>ce.endpoints.getImageDTO.matchFulfilled(_)&&_.payload.image_name===h),g=p;i.debug({controlNetId:e.payload,processedControlImage:g},"ControlNet image processed"),t(RE({id:o,processedControlImage:g.image_name}))}}catch(c){if(i.error({enqueueBatchArg:pt(l)},X("queue.graphFailedToQueue")),c instanceof Object&&"data"in c&&"status"in c&&c.status===403){const d=((u=c.data)==null?void 0:u.detail)||"Unknown Error";t(it({title:X("queue.graphFailedToQueue"),status:"error",description:d,duration:15e3})),t(Vie()),t(Hl({id:o,controlImage:null}));return}t(it({title:X("queue.graphFailedToQueue"),status:"error"}))}}})},CA=ge("app/enqueueRequested");ge("app/batchEnqueued");const XMe=e=>{const t=window.open("");t&&e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},xR=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=i=>t(r.result),r.onerror=i=>n(r.error),r.onabort=i=>n(new Error("Read aborted")),r.readAsDataURL(e)}),QMe=e=>{let t=!0,n=!1;const r=e.length;let i=3;for(i;i{const t=e.length;let n=0;for(n;n{const{isPartiallyTransparent:n,isFullyTransparent:r}=QMe(e.data),i=YMe(t.data);return n?r?"txt2img":"outpaint":i?"inpaint":"img2img"},_e="positive_conditioning",we="negative_conditioning",ue="denoise_latents",Kc="denoise_latents_hrf",Ce="latents_to_image",tl="latents_to_image_hrf_hr",_u="latents_to_image_hrf_lr",Ph="image_to_latents_hrf",Us="resize_hrf",Zh="esrgan_hrf",Wu="linear_ui_output",xl="nsfw_checker",Nu="invisible_watermark",ve="noise",kh="noise_hrf",Ro="main_model_loader",b2="onnx_model_loader",fi="vae_loader",AG="lora_loader",ct="clip_skip",Et="image_to_latents",aa="resize_image",Ku="img2img_resize",le="canvas_output",Mt="inpaint_image",JMe="scaled_inpaint_image",Gn="inpaint_image_resize_up",or="inpaint_image_resize_down",at="inpaint_infill",ts="inpaint_infill_resize_down",eRe="inpaint_final_image",kt="inpaint_create_mask",tRe="inpaint_mask",$e="canvas_coherence_denoise_latents",rt="canvas_coherence_noise",Dl="canvas_coherence_noise_increment",ln="canvas_coherence_mask_edge",et="canvas_coherence_inpaint_create_mask",Hd="tomask",gr="mask_blur",rr="mask_combine",It="mask_resize_up",vr="mask_resize_down",nRe="img_paste",Ih="control_net_collect",vy="ip_adapter_collect",Mh="t2i_adapter_collect",vi="core_metadata",Jh="esrgan",rRe="scale_image",mr="sdxl_model_loader",ae="sdxl_denoise_latents",fu="sdxl_refiner_model_loader",by="sdxl_refiner_positive_conditioning",_y="sdxl_refiner_negative_conditioning",Wo="sdxl_refiner_denoise_latents",zi="refiner_inpaint_create_mask",In="seamless",Co="refiner_seamless",iRe=[le,Ce,tl,xl,Nu,Jh,Zh,Us,_u,Ku,Mt,JMe,Gn,or,at,ts,eRe,kt,tRe,nRe,rRe],PG="text_to_image_graph",D3="image_to_image_graph",kG="canvas_text_to_image_graph",L3="canvas_image_to_image_graph",_2="canvas_inpaint_graph",S2="canvas_outpaint_graph",EA="sdxl_text_to_image_graph",db="sxdl_image_to_image_graph",x2="sdxl_canvas_text_to_image_graph",Hg="sdxl_canvas_image_to_image_graph",Ll="sdxl_canvas_inpaint_graph",Fl="sdxl_canvas_outpaint_graph",ks=(e,t,n)=>{e.nodes[vi]={id:vi,type:"core_metadata",...t},e.edges.push({source:{node_id:vi,field:"metadata"},destination:{node_id:n,field:"metadata"}})},Lo=(e,t)=>{const n=e.nodes[vi];n&&Object.assign(n,t)},Rh=(e,t)=>{const n=e.nodes[vi];n&&delete n[t]},Oh=e=>!!e.nodes[vi],oRe=(e,t)=>{e.edges=e.edges.filter(n=>n.source.node_id!==vi),e.edges.push({source:{node_id:vi,field:"metadata"},destination:{node_id:t,field:"metadata"}})},no=(e,t,n)=>{const r=Iie(e.controlAdapters).filter(o=>{var a,s;return((a=o.model)==null?void 0:a.base_model)===((s=e.generation.model)==null?void 0:s.base_model)}),i=[];if(r.length){const o={id:Ih,type:"collect",is_intermediate:!0};t.nodes[Ih]=o,t.edges.push({source:{node_id:Ih,field:"collection"},destination:{node_id:n,field:"control"}}),$e in t.nodes&&t.edges.push({source:{node_id:Ih,field:"collection"},destination:{node_id:$e,field:"control"}}),r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,controlMode:f,resizeMode:h,model:p,processorType:g,weight:_}=a,b={id:`control_net_${s}`,type:"controlnet",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,control_mode:f,resize_mode:h,control_model:p,control_weight:_};if(u&&g!=="none")b.image={image_name:u};else if(l)b.image={image_name:l};else return;t.nodes[b.id]=b,i.push($f(b,["id","type","is_intermediate"])),t.edges.push({source:{node_id:b.id,field:"control"},destination:{node_id:Ih,field:"item"}})}),Lo(t,{controlnets:i})}},ro=(e,t,n)=>{const r=Rie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:vy,type:"collect",is_intermediate:!0};t.nodes[vy]=i,t.edges.push({source:{node_id:vy,field:"collection"},destination:{node_id:n,field:"ip_adapter"}}),$e in t.nodes&&t.edges.push({source:{node_id:vy,field:"collection"},destination:{node_id:$e,field:"ip_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,weight:l,model:u,beginStepPct:c,endStepPct:d}=a,f={id:`ip_adapter_${s}`,type:"ip_adapter",is_intermediate:!0,weight:l,ip_adapter_model:u,begin_step_percent:c,end_step_percent:d};if(a.controlImage)f.image={image_name:a.controlImage};else return;t.nodes[f.id]=f,o.push($f(f,["id","type","is_intermediate"])),t.edges.push({source:{node_id:f.id,field:"ip_adapter"},destination:{node_id:i.id,field:"item"}})}),Lo(t,{ipAdapters:o})}},Gf=(e,t,n,r=Ro)=>{const{loras:i}=e.lora,o=r_(i);if(o===0)return;t.edges=t.edges.filter(u=>!(u.source.node_id===r&&["unet"].includes(u.source.field))),t.edges=t.edges.filter(u=>!(u.source.node_id===ct&&["clip"].includes(u.source.field)));let a="",s=0;const l=[];ps(i,u=>{const{model_name:c,base_model:d,weight:f}=u,h=`${AG}_${c.replace(".","_")}`,p={type:"lora_loader",id:h,is_intermediate:!0,lora:{model_name:c,base_model:d},weight:f};l.push({lora:{model_name:c,base_model:d},weight:f}),t.nodes[h]=p,s===0?(t.edges.push({source:{node_id:r,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:ct,field:"clip"},destination:{node_id:h,field:"clip"}})):(t.edges.push({source:{node_id:a,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:a,field:"clip"},destination:{node_id:h,field:"clip"}})),s===o-1&&(t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[_2,S2].includes(t.id)&&t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:$e,field:"unet"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:_e,field:"clip"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:we,field:"clip"}})),a=h,s+=1}),Lo(t,{loras:l})},io=(e,t,n=Ce)=>{const r=t.nodes[n];if(!r)return;r.is_intermediate=!0,r.use_cache=!0;const i={id:xl,type:"img_nsfw",is_intermediate:!0};t.nodes[xl]=i,t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:xl,field:"image"}})},aRe=["txt2img","img2img","unifiedCanvas","nodes","modelManager","queue"],TA=qn(e=>e,({ui:e})=>_E(e.activeTab)?e.activeTab:"txt2img"),DUe=qn(e=>e,({ui:e,config:t})=>{const r=aRe.filter(i=>!t.disabledTabs.includes(i)).indexOf(e.activeTab);return r===-1?0:r}),LUe=qn(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:SE}}),oo=(e,t)=>{const r=TA(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,{autoAddBoardId:i}=e.gallery,o={id:Wu,type:"linear_ui_output",is_intermediate:r,use_cache:!1,board:i==="none"?void 0:{board_id:i}};t.nodes[Wu]=o;const a={node_id:Wu,field:"image"};Nu in t.nodes?t.edges.push({source:{node_id:Nu,field:"image"},destination:a}):xl in t.nodes?t.edges.push({source:{node_id:xl,field:"image"},destination:a}):le in t.nodes?t.edges.push({source:{node_id:le,field:"image"},destination:a}):tl in t.nodes?t.edges.push({source:{node_id:tl,field:"image"},destination:a}):Ce in t.nodes&&t.edges.push({source:{node_id:Ce,field:"image"},destination:a})},ao=(e,t,n)=>{const{seamlessXAxis:r,seamlessYAxis:i}=e.generation;t.nodes[In]={id:In,type:"seamless",seamless_x:r,seamless_y:i},r&&Lo(t,{seamless_x:r}),i&&Lo(t,{seamless_y:i});let o=ue;(t.id===EA||t.id===db||t.id===x2||t.id===Hg||t.id===Ll||t.id===Fl)&&(o=ae),t.edges=t.edges.filter(a=>!(a.source.node_id===n&&["unet"].includes(a.source.field))&&!(a.source.node_id===n&&["vae"].includes(a.source.field))),t.edges.push({source:{node_id:n,field:"unet"},destination:{node_id:In,field:"unet"}},{source:{node_id:n,field:"vae"},destination:{node_id:In,field:"vae"}},{source:{node_id:In,field:"unet"},destination:{node_id:o,field:"unet"}}),(t.id==_2||t.id===S2||t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:In,field:"unet"},destination:{node_id:$e,field:"unet"}})},so=(e,t,n)=>{const r=$ie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:Mh,type:"collect",is_intermediate:!0};t.nodes[Mh]=i,t.edges.push({source:{node_id:Mh,field:"collection"},destination:{node_id:n,field:"t2i_adapter"}}),$e in t.nodes&&t.edges.push({source:{node_id:Mh,field:"collection"},destination:{node_id:$e,field:"t2i_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,resizeMode:f,model:h,processorType:p,weight:g}=a,_={id:`t2i_adapter_${s}`,type:"t2i_adapter",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,resize_mode:f,t2i_adapter_model:h,weight:g};if(u&&p!=="none")_.image={image_name:u};else if(l)_.image={image_name:l};else return;t.nodes[_.id]=_,o.push($f(_,["id","type","is_intermediate"])),t.edges.push({source:{node_id:_.id,field:"t2i_adapter"},destination:{node_id:Mh,field:"item"}})}),Lo(t,{t2iAdapters:o})}},lo=(e,t,n=Ro)=>{const{vae:r,canvasCoherenceMode:i}=e.generation,{boundingBoxScaleMethod:o}=e.canvas,{shouldUseSDXLRefiner:a}=e.sdxl,s=["auto","manual"].includes(o),l=!r;l||(t.nodes[fi]={type:"vae_loader",id:fi,is_intermediate:!0,vae_model:r});const u=n==b2;(t.id===PG||t.id===D3||t.id===EA||t.id===db)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Ce,field:"vae"}}),(t.id===kG||t.id===L3||t.id===x2||t.id==Hg)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:s?Ce:le,field:"vae"}}),(t.id===D3||t.id===db||t.id===L3||t.id===Hg)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Et,field:"vae"}}),(t.id===_2||t.id===S2||t.id===Ll||t.id===Fl)&&(t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Mt,field:"vae"}},{source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:kt,field:"vae"}},{source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Ce,field:"vae"}}),i!=="unmasked"&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:et,field:"vae"}})),a&&(t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:l?n:fi,field:l&&u?"vae_decoder":"vae"},destination:{node_id:zi,field:"vae"}}),r&&Lo(t,{vae:r})},uo=(e,t,n=Ce)=>{const i=TA(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,o=t.nodes[n],a=t.nodes[xl];if(!o)return;const s={id:Nu,type:"img_watermark",is_intermediate:i};t.nodes[Nu]=s,o.is_intermediate=!0,o.use_cache=!0,a?(a.is_intermediate=!0,t.edges.push({source:{node_id:xl,field:"image"},destination:{node_id:Nu,field:"image"}})):t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:Nu,field:"image"}})},sRe=(e,t)=>{const n=se("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,img2imgStrength:c,vaePrecision:d,clipSkip:f,shouldUseCpuNoise:h,seamlessXAxis:p,seamlessYAxis:g}=e.generation,{width:_,height:b}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:y,boundingBoxScaleMethod:m}=e.canvas,v=d==="fp32",S=!0,w=["auto","manual"].includes(m);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let C=Ro;const x=h,P={id:L3,nodes:{[C]:{type:"main_model_loader",id:C,is_intermediate:S,model:o},[ct]:{type:"clip_skip",id:ct,is_intermediate:S,skipped_layers:f},[_e]:{type:"compel",id:_e,is_intermediate:S,prompt:r},[we]:{type:"compel",id:we,is_intermediate:S,prompt:i},[ve]:{type:"noise",id:ve,is_intermediate:S,use_cpu:x,seed:l,width:w?y.width:_,height:w?y.height:b},[Et]:{type:"i2l",id:Et,is_intermediate:S},[ue]:{type:"denoise_latents",id:ue,is_intermediate:S,cfg_scale:a,scheduler:s,steps:u,denoising_start:1-c,denoising_end:1},[le]:{type:"l2i",id:le,is_intermediate:S}},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Et,field:"latents"},destination:{node_id:ue,field:"latents"}}]};return w?(P.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:S,image:t,width:y.width,height:y.height},P.nodes[Ce]={id:Ce,type:"l2i",is_intermediate:S,fp32:v},P.nodes[le]={id:le,type:"img_resize",is_intermediate:S,width:_,height:b},P.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Et,field:"image"}},{source:{node_id:ue,field:"latents"},destination:{node_id:Ce,field:"latents"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}})):(P.nodes[le]={type:"l2i",id:le,is_intermediate:S,fp32:v},P.nodes[Et].image=t,P.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(P,{generation_mode:"img2img",cfg_scale:a,width:w?y.width:_,height:w?y.height:b,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:x?"cpu":"cuda",scheduler:s,clip_skip:f,strength:c,init_image:t.image_name},le),(p||g)&&(ao(e,P,C),C=In),Gf(e,P,ue),lo(e,P,C),no(e,P,ue),ro(e,P,ue),so(e,P,ue),e.system.shouldUseNSFWChecker&&io(e,P,le),e.system.shouldUseWatermarker&&uo(e,P,le),oo(e,P),P},lRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,maskBlurMethod:g,canvasCoherenceMode:_,canvasCoherenceSteps:b,canvasCoherenceStrength:y,clipSkip:m,seamlessXAxis:v,seamlessYAxis:S}=e.generation;if(!a)throw r.error("No Image found in state"),new Error("No Image found in state");const{width:w,height:C}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:x,boundingBoxScaleMethod:P}=e.canvas,E=!0,I=f==="fp32",N=["auto","manual"].includes(P);let M=Ro;const T=h,A={id:_2,nodes:{[M]:{type:"main_model_loader",id:M,is_intermediate:E,model:a},[ct]:{type:"clip_skip",id:ct,is_intermediate:E,skipped_layers:m},[_e]:{type:"compel",id:_e,is_intermediate:E,prompt:i},[we]:{type:"compel",id:we,is_intermediate:E,prompt:o},[gr]:{type:"img_blur",id:gr,is_intermediate:E,radius:p,blur_type:g},[Mt]:{type:"i2l",id:Mt,is_intermediate:E,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:T,seed:d,is_intermediate:E},[kt]:{type:"create_denoise_mask",id:kt,is_intermediate:E,fp32:I},[ue]:{type:"denoise_latents",id:ue,is_intermediate:E,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[rt]:{type:"noise",id:rt,use_cpu:T,seed:d+1,is_intermediate:E},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:E},[$e]:{type:"denoise_latents",id:$e,is_intermediate:E,steps:b,cfg_scale:s,scheduler:l,denoising_start:1-y,denoising_end:1},[Ce]:{type:"l2i",id:Ce,is_intermediate:E,fp32:I},[le]:{type:"color_correct",id:le,is_intermediate:E,reference:t}},edges:[{source:{node_id:M,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:M,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Mt,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:kt,field:"mask"}},{source:{node_id:kt,field:"denoise_mask"},destination:{node_id:ue,field:"denoise_mask"}},{source:{node_id:M,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:$e,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(N){const R=x.width,D=x.height;A.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:E,width:R,height:D,image:t},A.nodes[It]={type:"img_resize",id:It,is_intermediate:E,width:R,height:D,image:n},A.nodes[or]={type:"img_resize",id:or,is_intermediate:E,width:w,height:C},A.nodes[vr]={type:"img_resize",id:vr,is_intermediate:E,width:w,height:C},A.nodes[ve].width=R,A.nodes[ve].height=D,A.nodes[rt].width=R,A.nodes[rt].height=D,A.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:Mt,field:"image"}},{source:{node_id:It,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Gn,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Ce,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else A.nodes[ve].width=w,A.nodes[ve].height=C,A.nodes[rt].width=w,A.nodes[rt].height=C,A.nodes[Mt]={...A.nodes[Mt],image:t},A.nodes[gr]={...A.nodes[gr],image:n},A.nodes[kt]={...A.nodes[kt],image:t},A.edges.push({source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:le,field:"mask"}});return _!=="unmasked"&&(A.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:E,fp32:I},N?A.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:et,field:"image"}}):A.nodes[et]={...A.nodes[et],image:t},_==="mask"&&(N?A.edges.push({source:{node_id:It,field:"image"},destination:{node_id:et,field:"mask"}}):A.nodes[et]={...A.nodes[et],mask:n}),_==="edge"&&(A.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:E,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},N?A.edges.push({source:{node_id:It,field:"image"},destination:{node_id:ln,field:"image"}}):A.nodes[ln]={...A.nodes[ln],image:n},A.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),A.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(v||S)&&(ao(e,A,M),M=In),lo(e,A,M),Gf(e,A,ue,M),no(e,A,ue),ro(e,A,ue),so(e,A,ue),e.system.shouldUseNSFWChecker&&io(e,A,le),e.system.shouldUseWatermarker&&uo(e,A,le),oo(e,A),A},uRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,canvasCoherenceMode:g,canvasCoherenceSteps:_,canvasCoherenceStrength:b,infillTileSize:y,infillPatchmatchDownscaleSize:m,infillMethod:v,clipSkip:S,seamlessXAxis:w,seamlessYAxis:C}=e.generation;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:x,height:P}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:E,boundingBoxScaleMethod:I}=e.canvas,N=f==="fp32",M=!0,T=["auto","manual"].includes(I);let A=Ro;const R=h,D={id:S2,nodes:{[A]:{type:"main_model_loader",id:A,is_intermediate:M,model:a},[ct]:{type:"clip_skip",id:ct,is_intermediate:M,skipped_layers:S},[_e]:{type:"compel",id:_e,is_intermediate:M,prompt:i},[we]:{type:"compel",id:we,is_intermediate:M,prompt:o},[Hd]:{type:"tomask",id:Hd,is_intermediate:M,image:t},[rr]:{type:"mask_combine",id:rr,is_intermediate:M,mask2:n},[Mt]:{type:"i2l",id:Mt,is_intermediate:M,fp32:N},[ve]:{type:"noise",id:ve,use_cpu:R,seed:d,is_intermediate:M},[kt]:{type:"create_denoise_mask",id:kt,is_intermediate:M,fp32:N},[ue]:{type:"denoise_latents",id:ue,is_intermediate:M,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[rt]:{type:"noise",id:rt,use_cpu:R,seed:d+1,is_intermediate:M},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:M},[$e]:{type:"denoise_latents",id:$e,is_intermediate:M,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-b,denoising_end:1},[Ce]:{type:"l2i",id:Ce,is_intermediate:M,fp32:N},[le]:{type:"color_correct",id:le,is_intermediate:M}},edges:[{source:{node_id:A,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:A,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:at,field:"image"},destination:{node_id:Mt,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:rr,field:"mask1"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Mt,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:T?It:rr,field:"image"},destination:{node_id:kt,field:"mask"}},{source:{node_id:kt,field:"denoise_mask"},destination:{node_id:ue,field:"denoise_mask"}},{source:{node_id:A,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:at,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:$e,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(v==="patchmatch"&&(D.nodes[at]={type:"infill_patchmatch",id:at,is_intermediate:M,downscale:m}),v==="lama"&&(D.nodes[at]={type:"infill_lama",id:at,is_intermediate:M}),v==="cv2"&&(D.nodes[at]={type:"infill_cv2",id:at,is_intermediate:M}),v==="tile"&&(D.nodes[at]={type:"infill_tile",id:at,is_intermediate:M,tile_size:y}),T){const $=E.width,L=E.height;D.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:M,width:$,height:L,image:t},D.nodes[It]={type:"img_resize",id:It,is_intermediate:M,width:$,height:L},D.nodes[or]={type:"img_resize",id:or,is_intermediate:M,width:x,height:P},D.nodes[ts]={type:"img_resize",id:ts,is_intermediate:M,width:x,height:P},D.nodes[vr]={type:"img_resize",id:vr,is_intermediate:M,width:x,height:P},D.nodes[ve].width=$,D.nodes[ve].height=L,D.nodes[rt].width=$,D.nodes[rt].height=L,D.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:at,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:Ce,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:It,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:at,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else D.nodes[at]={...D.nodes[at],image:t},D.nodes[ve].width=x,D.nodes[ve].height=P,D.nodes[rt].width=x,D.nodes[rt].height=P,D.nodes[Mt]={...D.nodes[Mt],image:t},D.edges.push({source:{node_id:at,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:le,field:"mask"}});return g!=="unmasked"&&(D.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:M,fp32:N},D.edges.push({source:{node_id:at,field:"image"},destination:{node_id:et,field:"image"}}),g==="mask"&&(T?D.edges.push({source:{node_id:It,field:"image"},destination:{node_id:et,field:"mask"}}):D.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:et,field:"mask"}})),g==="edge"&&(D.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:M,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},T?D.edges.push({source:{node_id:It,field:"image"},destination:{node_id:ln,field:"image"}}):D.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:ln,field:"image"}}),D.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),D.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(w||C)&&(ao(e,D,A),A=In),lo(e,D,A),Gf(e,D,ue,A),no(e,D,ue),ro(e,D,ue),so(e,D,ue),e.system.shouldUseNSFWChecker&&io(e,D,le),e.system.shouldUseWatermarker&&uo(e,D,le),oo(e,D),D},Hf=(e,t,n,r=mr)=>{const{loras:i}=e.lora,o=r_(i);if(o===0)return;const a=[],s=r;let l=r;[In,zi].includes(r)&&(l=mr),t.edges=t.edges.filter(d=>!(d.source.node_id===s&&["unet"].includes(d.source.field))&&!(d.source.node_id===l&&["clip"].includes(d.source.field))&&!(d.source.node_id===l&&["clip2"].includes(d.source.field)));let u="",c=0;ps(i,d=>{const{model_name:f,base_model:h,weight:p}=d,g=`${AG}_${f.replace(".","_")}`,_={type:"sdxl_lora_loader",id:g,is_intermediate:!0,lora:{model_name:f,base_model:h},weight:p};a.push(qF.parse({lora:{model_name:f,base_model:h},weight:p})),t.nodes[g]=_,c===0?(t.edges.push({source:{node_id:s,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:l,field:"clip"},destination:{node_id:g,field:"clip"}}),t.edges.push({source:{node_id:l,field:"clip2"},destination:{node_id:g,field:"clip2"}})):(t.edges.push({source:{node_id:u,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:u,field:"clip"},destination:{node_id:g,field:"clip"}}),t.edges.push({source:{node_id:u,field:"clip2"},destination:{node_id:g,field:"clip2"}})),c===o-1&&(t.edges.push({source:{node_id:g,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[Ll,Fl].includes(t.id)&&t.edges.push({source:{node_id:g,field:"unet"},destination:{node_id:$e,field:"unet"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:_e,field:"clip"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:we,field:"clip"}}),t.edges.push({source:{node_id:g,field:"clip2"},destination:{node_id:_e,field:"clip2"}}),t.edges.push({source:{node_id:g,field:"clip2"},destination:{node_id:we,field:"clip2"}})),u=g,c+=1}),Lo(t,{loras:a})},wc=(e,t)=>{const{positivePrompt:n,negativePrompt:r}=e.generation,{positiveStylePrompt:i,negativeStylePrompt:o,shouldConcatSDXLStylePrompt:a}=e.sdxl,s=a||t?[n,i].join(" "):i,l=a||t?[r,o].join(" "):o;return{joinedPositiveStylePrompt:s,joinedNegativeStylePrompt:l}},qf=(e,t,n,r,i,o)=>{const{refinerModel:a,refinerPositiveAestheticScore:s,refinerNegativeAestheticScore:l,refinerSteps:u,refinerScheduler:c,refinerCFGScale:d,refinerStart:f}=e.sdxl,{seamlessXAxis:h,seamlessYAxis:p,vaePrecision:g}=e.generation,{boundingBoxScaleMethod:_}=e.canvas,b=g==="fp32",y=["auto","manual"].includes(_);if(!a)return;Lo(t,{refiner_model:a,refiner_positive_aesthetic_score:s,refiner_negative_aesthetic_score:l,refiner_cfg_scale:d,refiner_scheduler:c,refiner_start:f,refiner_steps:u});const m=r||mr,{joinedPositiveStylePrompt:v,joinedNegativeStylePrompt:S}=wc(e,!0);t.edges=t.edges.filter(w=>!(w.source.node_id===n&&["latents"].includes(w.source.field))),t.edges=t.edges.filter(w=>!(w.source.node_id===m&&["vae"].includes(w.source.field))),t.nodes[fu]={type:"sdxl_refiner_model_loader",id:fu,model:a},t.nodes[by]={type:"sdxl_refiner_compel_prompt",id:by,style:v,aesthetic_score:s},t.nodes[_y]={type:"sdxl_refiner_compel_prompt",id:_y,style:S,aesthetic_score:l},t.nodes[Wo]={type:"denoise_latents",id:Wo,cfg_scale:d,steps:u,scheduler:c,denoising_start:f,denoising_end:1},h||p?(t.nodes[Co]={id:Co,type:"seamless",seamless_x:h,seamless_y:p},t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:Co,field:"unet"}},{source:{node_id:fu,field:"vae"},destination:{node_id:Co,field:"vae"}},{source:{node_id:Co,field:"unet"},destination:{node_id:Wo,field:"unet"}})):t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:Wo,field:"unet"}}),t.edges.push({source:{node_id:fu,field:"clip2"},destination:{node_id:by,field:"clip2"}},{source:{node_id:fu,field:"clip2"},destination:{node_id:_y,field:"clip2"}},{source:{node_id:by,field:"conditioning"},destination:{node_id:Wo,field:"positive_conditioning"}},{source:{node_id:_y,field:"conditioning"},destination:{node_id:Wo,field:"negative_conditioning"}},{source:{node_id:n,field:"latents"},destination:{node_id:Wo,field:"latents"}}),(t.id===Ll||t.id===Fl)&&(t.nodes[zi]={type:"create_denoise_mask",id:zi,is_intermediate:!0,fp32:b},y?t.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:zi,field:"image"}}):t.nodes[zi]={...t.nodes[zi],image:i},t.id===Ll&&(y?t.edges.push({source:{node_id:It,field:"image"},destination:{node_id:zi,field:"mask"}}):t.nodes[zi]={...t.nodes[zi],mask:o}),t.id===Fl&&t.edges.push({source:{node_id:y?It:rr,field:"image"},destination:{node_id:zi,field:"mask"}}),t.edges.push({source:{node_id:zi,field:"denoise_mask"},destination:{node_id:Wo,field:"denoise_mask"}})),t.id===x2||t.id===Hg?t.edges.push({source:{node_id:Wo,field:"latents"},destination:{node_id:y?Ce:le,field:"latents"}}):t.edges.push({source:{node_id:Wo,field:"latents"},destination:{node_id:Ce,field:"latents"}})},cRe=(e,t)=>{const n=se("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,vaePrecision:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{shouldUseSDXLRefiner:p,refinerStart:g,sdxlImg2ImgDenoisingStrength:_}=e.sdxl,{width:b,height:y}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:m,boundingBoxScaleMethod:v}=e.canvas,S=c==="fp32",w=!0,C=["auto","manual"].includes(v);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let x=mr;const P=d,{joinedPositiveStylePrompt:E,joinedNegativeStylePrompt:I}=wc(e),N={id:Hg,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:o},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:r,style:E},[we]:{type:"sdxl_compel_prompt",id:we,prompt:i,style:I},[ve]:{type:"noise",id:ve,is_intermediate:w,use_cpu:P,seed:l,width:C?m.width:b,height:C?m.height:y},[Et]:{type:"i2l",id:Et,is_intermediate:w,fp32:S},[ae]:{type:"denoise_latents",id:ae,is_intermediate:w,cfg_scale:a,scheduler:s,steps:u,denoising_start:p?Math.min(g,1-_):1-_,denoising_end:p?g:1}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Et,field:"latents"},destination:{node_id:ae,field:"latents"}}]};return C?(N.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:w,image:t,width:m.width,height:m.height},N.nodes[Ce]={id:Ce,type:"l2i",is_intermediate:w,fp32:S},N.nodes[le]={id:le,type:"img_resize",is_intermediate:w,width:b,height:y},N.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Et,field:"image"}},{source:{node_id:ae,field:"latents"},destination:{node_id:Ce,field:"latents"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}})):(N.nodes[le]={type:"l2i",id:le,is_intermediate:w,fp32:S},N.nodes[Et].image=t,N.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(N,{generation_mode:"img2img",cfg_scale:a,width:C?m.width:b,height:C?m.height:y,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:P?"cpu":"cuda",scheduler:s,strength:_,init_image:t.image_name},le),(f||h)&&(ao(e,N,x),x=In),p&&(qf(e,N,ae,x),(f||h)&&(x=Co)),lo(e,N,x),Hf(e,N,ae,x),no(e,N,ae),ro(e,N,ae),so(e,N,ae),e.system.shouldUseNSFWChecker&&io(e,N,le),e.system.shouldUseWatermarker&&uo(e,N,le),oo(e,N),N},dRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,maskBlurMethod:p,canvasCoherenceMode:g,canvasCoherenceSteps:_,canvasCoherenceStrength:b,seamlessXAxis:y,seamlessYAxis:m}=e.generation,{sdxlImg2ImgDenoisingStrength:v,shouldUseSDXLRefiner:S,refinerStart:w}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:C,height:x}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:P,boundingBoxScaleMethod:E}=e.canvas,I=d==="fp32",N=!0,M=["auto","manual"].includes(E);let T=mr;const A=f,{joinedPositiveStylePrompt:R,joinedNegativeStylePrompt:D}=wc(e),$={id:Ll,nodes:{[T]:{type:"sdxl_model_loader",id:T,model:a},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:i,style:R},[we]:{type:"sdxl_compel_prompt",id:we,prompt:o,style:D},[gr]:{type:"img_blur",id:gr,is_intermediate:N,radius:h,blur_type:p},[Mt]:{type:"i2l",id:Mt,is_intermediate:N,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:A,seed:c,is_intermediate:N},[kt]:{type:"create_denoise_mask",id:kt,is_intermediate:N,fp32:I},[ae]:{type:"denoise_latents",id:ae,is_intermediate:N,steps:u,cfg_scale:s,scheduler:l,denoising_start:S?Math.min(w,1-v):1-v,denoising_end:S?w:1},[rt]:{type:"noise",id:rt,use_cpu:A,seed:c+1,is_intermediate:N},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:N},[$e]:{type:"denoise_latents",id:$e,is_intermediate:N,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-b,denoising_end:1},[Ce]:{type:"l2i",id:Ce,is_intermediate:N,fp32:I},[le]:{type:"color_correct",id:le,is_intermediate:N,reference:t}},edges:[{source:{node_id:T,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:T,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:T,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:T,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:T,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Mt,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:kt,field:"mask"}},{source:{node_id:kt,field:"denoise_mask"},destination:{node_id:ae,field:"denoise_mask"}},{source:{node_id:T,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:$e,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(M){const L=P.width,O=P.height;$.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:N,width:L,height:O,image:t},$.nodes[It]={type:"img_resize",id:It,is_intermediate:N,width:L,height:O,image:n},$.nodes[or]={type:"img_resize",id:or,is_intermediate:N,width:C,height:x},$.nodes[vr]={type:"img_resize",id:vr,is_intermediate:N,width:C,height:x},$.nodes[ve].width=L,$.nodes[ve].height=O,$.nodes[rt].width=L,$.nodes[rt].height=O,$.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:Mt,field:"image"}},{source:{node_id:It,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Gn,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Ce,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else $.nodes[ve].width=C,$.nodes[ve].height=x,$.nodes[rt].width=C,$.nodes[rt].height=x,$.nodes[Mt]={...$.nodes[Mt],image:t},$.nodes[gr]={...$.nodes[gr],image:n},$.nodes[kt]={...$.nodes[kt],image:t},$.edges.push({source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:le,field:"mask"}});return g!=="unmasked"&&($.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:N,fp32:I},M?$.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:et,field:"image"}}):$.nodes[et]={...$.nodes[et],image:t},g==="mask"&&(M?$.edges.push({source:{node_id:It,field:"image"},destination:{node_id:et,field:"mask"}}):$.nodes[et]={...$.nodes[et],mask:n}),g==="edge"&&($.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:N,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},M?$.edges.push({source:{node_id:It,field:"image"},destination:{node_id:ln,field:"image"}}):$.nodes[ln]={...$.nodes[ln],image:n},$.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),$.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(y||m)&&(ao(e,$,T),T=In),S&&(qf(e,$,$e,T,t,n),(y||m)&&(T=Co)),lo(e,$,T),Hf(e,$,ae,T),no(e,$,ae),ro(e,$,ae),so(e,$,ae),e.system.shouldUseNSFWChecker&&io(e,$,le),e.system.shouldUseWatermarker&&uo(e,$,le),oo(e,$),$},fRe=(e,t,n)=>{const r=se("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,canvasCoherenceMode:p,canvasCoherenceSteps:g,canvasCoherenceStrength:_,infillTileSize:b,infillPatchmatchDownscaleSize:y,infillMethod:m,seamlessXAxis:v,seamlessYAxis:S}=e.generation,{sdxlImg2ImgDenoisingStrength:w,shouldUseSDXLRefiner:C,refinerStart:x}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:P,height:E}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:I,boundingBoxScaleMethod:N}=e.canvas,M=d==="fp32",T=!0,A=["auto","manual"].includes(N);let R=mr;const D=f,{joinedPositiveStylePrompt:$,joinedNegativeStylePrompt:L}=wc(e),O={id:Fl,nodes:{[mr]:{type:"sdxl_model_loader",id:mr,model:a},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:i,style:$},[we]:{type:"sdxl_compel_prompt",id:we,prompt:o,style:L},[Hd]:{type:"tomask",id:Hd,is_intermediate:T,image:t},[rr]:{type:"mask_combine",id:rr,is_intermediate:T,mask2:n},[Mt]:{type:"i2l",id:Mt,is_intermediate:T,fp32:M},[ve]:{type:"noise",id:ve,use_cpu:D,seed:c,is_intermediate:T},[kt]:{type:"create_denoise_mask",id:kt,is_intermediate:T,fp32:M},[ae]:{type:"denoise_latents",id:ae,is_intermediate:T,steps:u,cfg_scale:s,scheduler:l,denoising_start:C?Math.min(x,1-w):1-w,denoising_end:C?x:1},[rt]:{type:"noise",id:rt,use_cpu:D,seed:c+1,is_intermediate:T},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:T},[$e]:{type:"denoise_latents",id:$e,is_intermediate:T,steps:g,cfg_scale:s,scheduler:l,denoising_start:1-_,denoising_end:1},[Ce]:{type:"l2i",id:Ce,is_intermediate:T,fp32:M},[le]:{type:"color_correct",id:le,is_intermediate:T}},edges:[{source:{node_id:mr,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:mr,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:mr,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:at,field:"image"},destination:{node_id:Mt,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:rr,field:"mask1"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Mt,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:A?It:rr,field:"image"},destination:{node_id:kt,field:"mask"}},{source:{node_id:kt,field:"denoise_mask"},destination:{node_id:ae,field:"denoise_mask"}},{source:{node_id:R,field:"unet"},destination:{node_id:$e,field:"unet"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:$e,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:$e,field:"negative_conditioning"}},{source:{node_id:rt,field:"noise"},destination:{node_id:$e,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:$e,field:"latents"}},{source:{node_id:at,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:$e,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(m==="patchmatch"&&(O.nodes[at]={type:"infill_patchmatch",id:at,is_intermediate:T,downscale:y}),m==="lama"&&(O.nodes[at]={type:"infill_lama",id:at,is_intermediate:T}),m==="cv2"&&(O.nodes[at]={type:"infill_cv2",id:at,is_intermediate:T}),m==="tile"&&(O.nodes[at]={type:"infill_tile",id:at,is_intermediate:T,tile_size:b}),A){const B=I.width,U=I.height;O.nodes[Gn]={type:"img_resize",id:Gn,is_intermediate:T,width:B,height:U,image:t},O.nodes[It]={type:"img_resize",id:It,is_intermediate:T,width:B,height:U},O.nodes[or]={type:"img_resize",id:or,is_intermediate:T,width:P,height:E},O.nodes[ts]={type:"img_resize",id:ts,is_intermediate:T,width:P,height:E},O.nodes[vr]={type:"img_resize",id:vr,is_intermediate:T,width:P,height:E},O.nodes[ve].width=B,O.nodes[ve].height=U,O.nodes[rt].width=B,O.nodes[rt].height=U,O.edges.push({source:{node_id:Gn,field:"image"},destination:{node_id:at,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:It,field:"image"}},{source:{node_id:Ce,field:"image"},destination:{node_id:or,field:"image"}},{source:{node_id:It,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:at,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:or,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:le,field:"mask"}})}else O.nodes[at]={...O.nodes[at],image:t},O.nodes[ve].width=P,O.nodes[ve].height=E,O.nodes[rt].width=P,O.nodes[rt].height=E,O.nodes[Mt]={...O.nodes[Mt],image:t},O.edges.push({source:{node_id:at,field:"image"},destination:{node_id:le,field:"reference"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}},{source:{node_id:rr,field:"image"},destination:{node_id:le,field:"mask"}});return p!=="unmasked"&&(O.nodes[et]={type:"create_denoise_mask",id:et,is_intermediate:T,fp32:M},O.edges.push({source:{node_id:at,field:"image"},destination:{node_id:et,field:"image"}}),p==="mask"&&(A?O.edges.push({source:{node_id:It,field:"image"},destination:{node_id:et,field:"mask"}}):O.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:et,field:"mask"}})),p==="edge"&&(O.nodes[ln]={type:"mask_edge",id:ln,is_intermediate:T,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},A?O.edges.push({source:{node_id:It,field:"image"},destination:{node_id:ln,field:"image"}}):O.edges.push({source:{node_id:rr,field:"image"},destination:{node_id:ln,field:"image"}}),O.edges.push({source:{node_id:ln,field:"image"},destination:{node_id:et,field:"mask"}})),O.edges.push({source:{node_id:et,field:"denoise_mask"},destination:{node_id:$e,field:"denoise_mask"}})),(v||S)&&(ao(e,O,R),R=In),C&&(qf(e,O,$e,R,t),(v||S)&&(R=Co)),lo(e,O,R),Hf(e,O,ae,R),no(e,O,ae),ro(e,O,ae),so(e,O,ae),e.system.shouldUseNSFWChecker&&io(e,O,le),e.system.shouldUseWatermarker&&uo(e,O,le),oo(e,O),O},hRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,shouldUseCpuNoise:c,seamlessXAxis:d,seamlessYAxis:f}=e.generation,{width:h,height:p}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:g,boundingBoxScaleMethod:_}=e.canvas,b=u==="fp32",y=!0,m=["auto","manual"].includes(_),{shouldUseSDXLRefiner:v,refinerStart:S}=e.sdxl;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const w=c,C=i.model_type==="onnx";let x=C?b2:mr;const P=C?"onnx_model_loader":"sdxl_model_loader",E=C?{type:"t2l_onnx",id:ae,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:ae,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:v?S:1},{joinedPositiveStylePrompt:I,joinedNegativeStylePrompt:N}=wc(e),M={id:x2,nodes:{[x]:{type:P,id:x,is_intermediate:y,model:i},[_e]:{type:C?"prompt_onnx":"sdxl_compel_prompt",id:_e,is_intermediate:y,prompt:n,style:I},[we]:{type:C?"prompt_onnx":"sdxl_compel_prompt",id:we,is_intermediate:y,prompt:r,style:N},[ve]:{type:"noise",id:ve,is_intermediate:y,seed:s,width:m?g.width:h,height:m?g.height:p,use_cpu:w},[E.id]:E},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}}]};return m?(M.nodes[Ce]={id:Ce,type:C?"l2i_onnx":"l2i",is_intermediate:y,fp32:b},M.nodes[le]={id:le,type:"img_resize",is_intermediate:y,width:h,height:p},M.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:Ce,field:"latents"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}})):(M.nodes[le]={type:C?"l2i_onnx":"l2i",id:le,is_intermediate:y,fp32:b},M.edges.push({source:{node_id:ae,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(M,{generation_mode:"txt2img",cfg_scale:o,width:m?g.width:h,height:m?g.height:p,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:w?"cpu":"cuda",scheduler:a},le),(d||f)&&(ao(e,M,x),x=In),v&&(qf(e,M,ae,x),(d||f)&&(x=Co)),Hf(e,M,ae,x),lo(e,M,x),no(e,M,ae),ro(e,M,ae),so(e,M,ae),e.system.shouldUseNSFWChecker&&io(e,M,le),e.system.shouldUseWatermarker&&uo(e,M,le),oo(e,M),M},pRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,clipSkip:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{width:p,height:g}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:_,boundingBoxScaleMethod:b}=e.canvas,y=u==="fp32",m=!0,v=["auto","manual"].includes(b);if(!i)throw t.error("No model found in state"),new Error("No model found in state");const S=d,w=i.model_type==="onnx";let C=w?b2:Ro;const x=w?"onnx_model_loader":"main_model_loader",P=w?{type:"t2l_onnx",id:ue,is_intermediate:m,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:ue,is_intermediate:m,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:1},E={id:kG,nodes:{[C]:{type:x,id:C,is_intermediate:m,model:i},[ct]:{type:"clip_skip",id:ct,is_intermediate:m,skipped_layers:c},[_e]:{type:w?"prompt_onnx":"compel",id:_e,is_intermediate:m,prompt:n},[we]:{type:w?"prompt_onnx":"compel",id:we,is_intermediate:m,prompt:r},[ve]:{type:"noise",id:ve,is_intermediate:m,seed:s,width:v?_.width:p,height:v?_.height:g,use_cpu:S},[P.id]:P},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}}]};return v?(E.nodes[Ce]={id:Ce,type:w?"l2i_onnx":"l2i",is_intermediate:m,fp32:y},E.nodes[le]={id:le,type:"img_resize",is_intermediate:m,width:p,height:g},E.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:Ce,field:"latents"}},{source:{node_id:Ce,field:"image"},destination:{node_id:le,field:"image"}})):(E.nodes[le]={type:w?"l2i_onnx":"l2i",id:le,is_intermediate:m,fp32:y},E.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:le,field:"latents"}})),ks(E,{generation_mode:"txt2img",cfg_scale:o,width:v?_.width:p,height:v?_.height:g,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:S?"cpu":"cuda",scheduler:a,clip_skip:c},le),(f||h)&&(ao(e,E,C),C=In),lo(e,E,C),Gf(e,E,ue,C),no(e,E,ue),ro(e,E,ue),so(e,E,ue),e.system.shouldUseNSFWChecker&&io(e,E,le),e.system.shouldUseWatermarker&&uo(e,E,le),oo(e,E),E},gRe=(e,t,n,r)=>{let i;if(t==="txt2img")e.generation.model&&e.generation.model.base_model==="sdxl"?i=hRe(e):i=pRe(e);else if(t==="img2img"){if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=cRe(e,n):i=sRe(e,n)}else if(t==="inpaint"){if(!n||!r)throw new Error("Missing canvas init and mask images");e.generation.model&&e.generation.model.base_model==="sdxl"?i=dRe(e,n,r):i=lRe(e,n,r)}else{if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=fRe(e,n,r):i=uRe(e,n,r)}return i},Yw=({count:e,start:t,min:n=Hie,max:r=hp})=>{const i=t??Ire(n,r),o=[];for(let a=i;a{const{iterations:r,model:i,shouldRandomizeSeed:o,seed:a}=e.generation,{shouldConcatSDXLStylePrompt:s,positiveStylePrompt:l}=e.sdxl,{prompts:u,seedBehaviour:c}=e.dynamicPrompts,d=[];if(u.length===1){const h=Yw({count:r,start:o?void 0:a}),p=[];t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:h}),Oh(t)&&(Rh(t,"seed"),p.push({node_path:vi,field_name:"seed",items:h})),t.nodes[rt]&&p.push({node_path:rt,field_name:"seed",items:h.map(g=>(g+1)%hp)}),d.push(p)}else{const h=[],p=[];if(c==="PER_PROMPT"){const _=Yw({count:u.length*r,start:o?void 0:a});t.nodes[ve]&&h.push({node_path:ve,field_name:"seed",items:_}),Oh(t)&&(Rh(t,"seed"),h.push({node_path:vi,field_name:"seed",items:_})),t.nodes[rt]&&h.push({node_path:rt,field_name:"seed",items:_.map(b=>(b+1)%hp)})}else{const _=Yw({count:r,start:o?void 0:a});t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:_}),Oh(t)&&(Rh(t,"seed"),p.push({node_path:vi,field_name:"seed",items:_})),t.nodes[rt]&&p.push({node_path:rt,field_name:"seed",items:_.map(b=>(b+1)%hp)}),d.push(p)}const g=c==="PER_PROMPT"?Dre(r).flatMap(()=>u):u;if(t.nodes[_e]&&h.push({node_path:_e,field_name:"prompt",items:g}),Oh(t)&&(Rh(t,"positive_prompt"),h.push({node_path:vi,field_name:"positive_prompt",items:g})),s&&(i==null?void 0:i.base_model)==="sdxl"){const _=g.map(b=>[b,l].join(" "));t.nodes[_e]&&h.push({node_path:_e,field_name:"style",items:_}),Oh(t)&&(Rh(t,"positive_style_prompt"),h.push({node_path:vi,field_name:"positive_style_prompt",items:g}))}d.push(h)}return{prepend:n,batch:{graph:t,runs:1,data:d}}},mRe=()=>{pe({predicate:e=>CA.match(e)&&e.payload.tabName==="unifiedCanvas",effect:async(e,{getState:t,dispatch:n})=>{const r=se("queue"),{prepend:i}=e.payload,o=t(),{layerState:a,boundingBoxCoordinates:s,boundingBoxDimensions:l,isMaskEnabled:u,shouldPreserveMaskedArea:c}=o.canvas,d=await wA(a,s,l,u,c);if(!d){r.error("Unable to create canvas data");return}const{baseBlob:f,baseImageData:h,maskBlob:p,maskImageData:g}=d,_=ZMe(h,g);if(o.system.enableImageDebugging){const S=await xR(f),w=await xR(p);XMe([{base64:w,caption:"mask b64"},{base64:S,caption:"image b64"}])}r.debug(`Generation mode: ${_}`);let b,y;["img2img","inpaint","outpaint"].includes(_)&&(b=await n(ce.endpoints.uploadImage.initiate({file:new File([f],"canvasInitImage.png",{type:"image/png"}),image_category:"general",is_intermediate:!0})).unwrap()),["inpaint","outpaint"].includes(_)&&(y=await n(ce.endpoints.uploadImage.initiate({file:new File([p],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!0})).unwrap());const m=gRe(o,_,b,y);r.debug({graph:pt(m)},"Canvas graph built"),n(Yz(m));const v=IG(o,m,i);try{const S=n(un.endpoints.enqueueBatch.initiate(v,{fixedCacheKey:"enqueueBatch"})),w=await S.unwrap();S.reset();const C=w.batch.batch_id;o.canvas.layerState.stagingArea.boundingBox||n(Rle({boundingBox:{...o.canvas.boundingBoxCoordinates,...o.canvas.boundingBoxDimensions}})),n(Ole(C))}catch{}}})},yRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,img2imgStrength:c,shouldFitToWidthHeight:d,width:f,height:h,clipSkip:p,shouldUseCpuNoise:g,vaePrecision:_,seamlessXAxis:b,seamlessYAxis:y}=e.generation;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const m=_==="fp32",v=!0;let S=Ro;const w=g,C={id:D3,nodes:{[S]:{type:"main_model_loader",id:S,model:i,is_intermediate:v},[ct]:{type:"clip_skip",id:ct,skipped_layers:p,is_intermediate:v},[_e]:{type:"compel",id:_e,prompt:n,is_intermediate:v},[we]:{type:"compel",id:we,prompt:r,is_intermediate:v},[ve]:{type:"noise",id:ve,use_cpu:w,seed:s,is_intermediate:v},[Ce]:{type:"l2i",id:Ce,fp32:m,is_intermediate:v},[ue]:{type:"denoise_latents",id:ue,cfg_scale:o,scheduler:a,steps:l,denoising_start:1-c,denoising_end:1,is_intermediate:v},[Et]:{type:"i2l",id:Et,fp32:m,is_intermediate:v}},edges:[{source:{node_id:S,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:S,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:Et,field:"latents"},destination:{node_id:ue,field:"latents"}},{source:{node_id:ue,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(d&&(u.width!==f||u.height!==h)){const x={id:aa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:f,height:h};C.nodes[aa]=x,C.edges.push({source:{node_id:aa,field:"image"},destination:{node_id:Et,field:"image"}}),C.edges.push({source:{node_id:aa,field:"width"},destination:{node_id:ve,field:"width"}}),C.edges.push({source:{node_id:aa,field:"height"},destination:{node_id:ve,field:"height"}})}else C.nodes[Et].image={image_name:u.imageName},C.edges.push({source:{node_id:Et,field:"width"},destination:{node_id:ve,field:"width"}}),C.edges.push({source:{node_id:Et,field:"height"},destination:{node_id:ve,field:"height"}});return ks(C,{generation_mode:"img2img",cfg_scale:o,height:h,width:f,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:w?"cpu":"cuda",scheduler:a,clip_skip:p,strength:c,init_image:u.imageName},Et),(b||y)&&(ao(e,C,S),S=In),lo(e,C,S),Gf(e,C,ue,S),no(e,C,ue),ro(e,C,ue),so(e,C,ue),e.system.shouldUseNSFWChecker&&io(e,C),e.system.shouldUseWatermarker&&uo(e,C),oo(e,C),C},vRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,shouldFitToWidthHeight:c,width:d,height:f,shouldUseCpuNoise:h,vaePrecision:p,seamlessXAxis:g,seamlessYAxis:_}=e.generation,{positiveStylePrompt:b,negativeStylePrompt:y,shouldUseSDXLRefiner:m,refinerStart:v,sdxlImg2ImgDenoisingStrength:S}=e.sdxl;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const w=p==="fp32",C=!0;let x=mr;const P=h,{joinedPositiveStylePrompt:E,joinedNegativeStylePrompt:I}=wc(e),N={id:db,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:i,is_intermediate:C},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:n,style:E,is_intermediate:C},[we]:{type:"sdxl_compel_prompt",id:we,prompt:r,style:I,is_intermediate:C},[ve]:{type:"noise",id:ve,use_cpu:P,seed:s,is_intermediate:C},[Ce]:{type:"l2i",id:Ce,fp32:w,is_intermediate:C},[ae]:{type:"denoise_latents",id:ae,cfg_scale:o,scheduler:a,steps:l,denoising_start:m?Math.min(v,1-S):1-S,denoising_end:m?v:1,is_intermediate:C},[Et]:{type:"i2l",id:Et,fp32:w,is_intermediate:C}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:Et,field:"latents"},destination:{node_id:ae,field:"latents"}},{source:{node_id:ae,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};if(c&&(u.width!==d||u.height!==f)){const M={id:aa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:d,height:f};N.nodes[aa]=M,N.edges.push({source:{node_id:aa,field:"image"},destination:{node_id:Et,field:"image"}}),N.edges.push({source:{node_id:aa,field:"width"},destination:{node_id:ve,field:"width"}}),N.edges.push({source:{node_id:aa,field:"height"},destination:{node_id:ve,field:"height"}})}else N.nodes[Et].image={image_name:u.imageName},N.edges.push({source:{node_id:Et,field:"width"},destination:{node_id:ve,field:"width"}}),N.edges.push({source:{node_id:Et,field:"height"},destination:{node_id:ve,field:"height"}});return ks(N,{generation_mode:"sdxl_img2img",cfg_scale:o,height:f,width:d,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:P?"cpu":"cuda",scheduler:a,strength:S,init_image:u.imageName,positive_style_prompt:b,negative_style_prompt:y},Et),(g||_)&&(ao(e,N,x),x=In),m&&(qf(e,N,ae),(g||_)&&(x=Co)),lo(e,N,x),Hf(e,N,ae,x),no(e,N,ae),ro(e,N,ae),so(e,N,ae),e.system.shouldUseNSFWChecker&&io(e,N),e.system.shouldUseWatermarker&&uo(e,N),oo(e,N),N},bRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,width:u,height:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p}=e.generation,{positiveStylePrompt:g,negativeStylePrompt:_,shouldUseSDXLRefiner:b,refinerStart:y}=e.sdxl,m=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const v=f==="fp32",S=!0,{joinedPositiveStylePrompt:w,joinedNegativeStylePrompt:C}=wc(e);let x=mr;const P={id:EA,nodes:{[x]:{type:"sdxl_model_loader",id:x,model:i,is_intermediate:S},[_e]:{type:"sdxl_compel_prompt",id:_e,prompt:n,style:w,is_intermediate:S},[we]:{type:"sdxl_compel_prompt",id:we,prompt:r,style:C,is_intermediate:S},[ve]:{type:"noise",id:ve,seed:s,width:u,height:c,use_cpu:m,is_intermediate:S},[ae]:{type:"denoise_latents",id:ae,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:b?y:1,is_intermediate:S},[Ce]:{type:"l2i",id:Ce,fp32:v,is_intermediate:S}},edges:[{source:{node_id:x,field:"unet"},destination:{node_id:ae,field:"unet"}},{source:{node_id:x,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:_e,field:"clip2"}},{source:{node_id:x,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:x,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ae,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ae,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ae,field:"noise"}},{source:{node_id:ae,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};return ks(P,{generation_mode:"sdxl_txt2img",cfg_scale:o,height:c,width:u,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:m?"cpu":"cuda",scheduler:a,positive_style_prompt:g,negative_style_prompt:_},Ce),(h||p)&&(ao(e,P,x),x=In),b&&(qf(e,P,ae),(h||p)&&(x=Co)),lo(e,P,x),Hf(e,P,ae,x),no(e,P,ae),ro(e,P,ae),so(e,P,ae),e.system.shouldUseNSFWChecker&&io(e,P),e.system.shouldUseWatermarker&&uo(e,P),oo(e,P),P};function _Re(e){const t=["vae","control","ip_adapter","metadata","unet","positive_conditioning","negative_conditioning"],n=[];e.edges.forEach(r=>{r.destination.node_id===ue&&t.includes(r.destination.field)&&n.push({source:{node_id:r.source.node_id,field:r.source.field},destination:{node_id:Kc,field:r.destination.field}})}),e.edges=e.edges.concat(n)}function SRe(e,t,n){const r=t/n;let i;e=="sdxl"?i=1024:i=512;const o=Math.floor(i*.5),a=i*i;let s,l;r>1?(l=Math.max(o,Math.sqrt(a/r)),s=l*r):(s=Math.max(o,Math.sqrt(a*r)),l=s/r),s=Math.min(t,s),l=Math.min(n,l);const u=Rr(Math.floor(s),8),c=Rr(Math.floor(l),8);return{newWidth:u,newHeight:c}}const xRe=(e,t)=>{var _;if(!e.generation.hrfEnabled||e.config.disabledSDFeatures.includes("hrf")||((_=e.generation.model)==null?void 0:_.model_type)==="onnx")return;const n=se("txt2img"),{vae:r,hrfStrength:i,hrfEnabled:o,hrfMethod:a}=e.generation,s=!r,l=e.generation.width,u=e.generation.height,c=e.generation.model?e.generation.model.base_model:"sd1",{newWidth:d,newHeight:f}=SRe(c,l,u),h=t.nodes[ue],p=t.nodes[ve],g=t.nodes[Ce];if(!h){n.error("originalDenoiseLatentsNode is undefined");return}if(!p){n.error("originalNoiseNode is undefined");return}if(!g){n.error("originalLatentsToImageNode is undefined");return}if(p&&(p.width=d,p.height=f),t.nodes[_u]={type:"l2i",id:_u,fp32:g==null?void 0:g.fp32,is_intermediate:!0},t.edges.push({source:{node_id:ue,field:"latents"},destination:{node_id:_u,field:"latents"}},{source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:_u,field:"vae"}}),t.nodes[Us]={id:Us,type:"img_resize",is_intermediate:!0,width:l,height:u},a=="ESRGAN"){let b="RealESRGAN_x2plus.pth";l*u/(d*f)>2&&(b="RealESRGAN_x4plus.pth"),t.nodes[Zh]={id:Zh,type:"esrgan",model_name:b,is_intermediate:!0},t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Zh,field:"image"}},{source:{node_id:Zh,field:"image"},destination:{node_id:Us,field:"image"}})}else t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Us,field:"image"}});t.nodes[kh]={type:"noise",id:kh,seed:p==null?void 0:p.seed,use_cpu:p==null?void 0:p.use_cpu,is_intermediate:!0},t.edges.push({source:{node_id:Us,field:"height"},destination:{node_id:kh,field:"height"}},{source:{node_id:Us,field:"width"},destination:{node_id:kh,field:"width"}}),t.nodes[Ph]={type:"i2l",id:Ph,is_intermediate:!0},t.edges.push({source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:Ph,field:"vae"}},{source:{node_id:Us,field:"image"},destination:{node_id:Ph,field:"image"}}),t.nodes[Kc]={type:"denoise_latents",id:Kc,is_intermediate:!0,cfg_scale:h==null?void 0:h.cfg_scale,scheduler:h==null?void 0:h.scheduler,steps:h==null?void 0:h.steps,denoising_start:1-e.generation.hrfStrength,denoising_end:1},t.edges.push({source:{node_id:Ph,field:"latents"},destination:{node_id:Kc,field:"latents"}},{source:{node_id:kh,field:"noise"},destination:{node_id:Kc,field:"noise"}}),_Re(t),t.nodes[tl]={type:"l2i",id:tl,fp32:g==null?void 0:g.fp32,is_intermediate:!0},t.edges.push({source:{node_id:s?Ro:fi,field:"vae"},destination:{node_id:tl,field:"vae"}},{source:{node_id:Kc,field:"latents"},destination:{node_id:tl,field:"latents"}}),Lo(t,{hrf_strength:i,hrf_enabled:o,hrf_method:a}),oRe(t,tl)},wRe=e=>{const t=se("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,steps:s,width:l,height:u,clipSkip:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p,seed:g}=e.generation,_=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const b=f==="fp32",y=!0,m=i.model_type==="onnx";let v=m?b2:Ro;const S=m?"onnx_model_loader":"main_model_loader",w=m?{type:"t2l_onnx",id:ue,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s}:{type:"denoise_latents",id:ue,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s,denoising_start:0,denoising_end:1},C={id:PG,nodes:{[v]:{type:S,id:v,is_intermediate:y,model:i},[ct]:{type:"clip_skip",id:ct,skipped_layers:c,is_intermediate:y},[_e]:{type:m?"prompt_onnx":"compel",id:_e,prompt:n,is_intermediate:y},[we]:{type:m?"prompt_onnx":"compel",id:we,prompt:r,is_intermediate:y},[ve]:{type:"noise",id:ve,seed:g,width:l,height:u,use_cpu:_,is_intermediate:y},[w.id]:w,[Ce]:{type:m?"l2i_onnx":"l2i",id:Ce,fp32:b,is_intermediate:y}},edges:[{source:{node_id:v,field:"unet"},destination:{node_id:ue,field:"unet"}},{source:{node_id:v,field:"clip"},destination:{node_id:ct,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:_e,field:"clip"}},{source:{node_id:ct,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:_e,field:"conditioning"},destination:{node_id:ue,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:ue,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:ue,field:"noise"}},{source:{node_id:ue,field:"latents"},destination:{node_id:Ce,field:"latents"}}]};return ks(C,{generation_mode:"txt2img",cfg_scale:o,height:u,width:l,positive_prompt:n,negative_prompt:r,model:i,seed:g,steps:s,rand_device:_?"cpu":"cuda",scheduler:a,clip_skip:c},Ce),(h||p)&&(ao(e,C,v),v=In),lo(e,C,v),Gf(e,C,ue,v),no(e,C,ue),ro(e,C,ue),so(e,C,ue),e.generation.hrfEnabled&&!m&&xRe(e,C),e.system.shouldUseNSFWChecker&&io(e,C),e.system.shouldUseWatermarker&&uo(e,C),oo(e,C),C},CRe=()=>{pe({predicate:e=>CA.match(e)&&(e.payload.tabName==="txt2img"||e.payload.tabName==="img2img"),effect:async(e,{getState:t,dispatch:n})=>{const r=t(),i=r.generation.model,{prepend:o}=e.payload;let a;i&&i.base_model==="sdxl"?e.payload.tabName==="txt2img"?a=bRe(r):a=vRe(r):e.payload.tabName==="txt2img"?a=wRe(r):a=yRe(r);const s=IG(r,a,o);n(un.endpoints.enqueueBatch.initiate(s,{fixedCacheKey:"enqueueBatch"})).reset()}})},ERe=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function TRe(e){return e.length===1?e[0].toString():e.reduce((t,n)=>{if(typeof n=="number")return t+"["+n.toString()+"]";if(n.includes('"'))return t+'["'+ARe(n)+'"]';if(!ERe.test(n))return t+'["'+n+'"]';const r=t.length===0?"":".";return t+r+n},"")}function ARe(e){return e.replace(/"/g,'\\"')}function PRe(e){return e.length!==0}const kRe=99,MG="; ",RG=", or ",AA="Validation error",OG=": ";class $G extends Error{constructor(n,r=[]){super(n);Q2(this,"details");Q2(this,"name");this.details=r,this.name="ZodValidationError"}toString(){return this.message}}function PA(e){const{issue:t,issueSeparator:n,unionSeparator:r,includePath:i}=e;if(t.code==="invalid_union")return t.unionErrors.reduce((o,a)=>{const s=a.issues.map(l=>PA({issue:l,issueSeparator:n,unionSeparator:r,includePath:i})).join(n);return o.includes(s)||o.push(s),o},[]).join(r);if(i&&PRe(t.path)){if(t.path.length===1){const o=t.path[0];if(typeof o=="number")return`${t.message} at index ${o}`}return`${t.message} at "${TRe(t.path)}"`}return t.message}function NG(e,t,n){return t!==null?e.length>0?[t,e].join(n):t:e.length>0?e:AA}function FUe(e,t={}){const{issueSeparator:n=MG,unionSeparator:r=RG,prefixSeparator:i=OG,prefix:o=AA,includePath:a=!0}=t,s=PA({issue:e,issueSeparator:n,unionSeparator:r,includePath:a}),l=NG(s,o,i);return new $G(l,[e])}function wR(e,t={}){const{maxIssuesInMessage:n=kRe,issueSeparator:r=MG,unionSeparator:i=RG,prefixSeparator:o=OG,prefix:a=AA,includePath:s=!0}=t,l=e.errors.slice(0,n).map(c=>PA({issue:c,issueSeparator:r,unionSeparator:i,includePath:s})).join(r),u=NG(l,a,o);return new $G(u,e.errors)}const IRe=e=>{const{workflow:t,nodes:n,edges:r}=e,i={...t,nodes:[],edges:[]};return n.filter(o=>["invocation","notes"].includes(o.type??"__UNKNOWN_NODE_TYPE__")).forEach(o=>{const a=XF.safeParse(o);if(!a.success){const{message:s}=wR(a.error,{prefix:de.t("nodes.unableToParseNode")});se("nodes").warn({node:pt(o)},s);return}i.nodes.push(a.data)}),r.forEach(o=>{const a=QF.safeParse(o);if(!a.success){const{message:s}=wR(a.error,{prefix:de.t("nodes.unableToParseEdge")});se("nodes").warn({edge:pt(o)},s);return}i.edges.push(a.data)}),i},MRe=e=>{if(e.type==="ColorField"&&e.value){const t=Ye(e.value),{r:n,g:r,b:i,a:o}=e.value,a=Math.max(0,Math.min(o*255,255));return Object.assign(t,{r:n,g:r,b:i,a}),t}return e.value},RRe=e=>{const{nodes:t,edges:n}=e,i=t.filter(on).reduce((l,u)=>{const{id:c,data:d}=u,{type:f,inputs:h,isIntermediate:p,embedWorkflow:g}=d,_=tg(h,(y,m,v)=>{const S=MRe(m);return y[v]=S,y},{});_.use_cache=u.data.useCache;const b={type:f,id:c,..._,is_intermediate:p};return g&&Object.assign(b,{workflow:IRe(e)}),Object.assign(l,{[c]:b}),l},{}),a=n.filter(l=>l.type!=="collapsed").reduce((l,u)=>{const{source:c,target:d,sourceHandle:f,targetHandle:h}=u;return l.push({source:{node_id:c,field:f},destination:{node_id:d,field:h}}),l},[]);return a.forEach(l=>{const u=i[l.destination.node_id],c=l.destination.field;i[l.destination.node_id]=$f(u,c)}),{id:yl(),nodes:i,edges:a}},ORe=()=>{pe({predicate:e=>CA.match(e)&&e.payload.tabName==="nodes",effect:async(e,{getState:t,dispatch:n})=>{const r=t(),o={batch:{graph:RRe(r.nodes),runs:r.generation.iterations},prepend:e.payload.prepend};n(un.endpoints.enqueueBatch.initiate(o,{fixedCacheKey:"enqueueBatch"})).reset()}})},$Re=()=>{pe({matcher:ce.endpoints.addImageToBoard.matchFulfilled,effect:e=>{const t=se("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Image added to board")}})},NRe=()=>{pe({matcher:ce.endpoints.addImageToBoard.matchRejected,effect:e=>{const t=se("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Problem adding image to board")}})},kA=ge("deleteImageModal/imageDeletionConfirmed"),BUe=qn(e=>e,e=>e.gallery.selection[e.gallery.selection.length-1],Vm),DG=qn([e=>e],e=>{const{selectedBoardId:t,galleryView:n}=e.gallery;return{board_id:t,categories:n==="images"?Fn:Pr,offset:0,limit:Kle,is_intermediate:!1}},Vm),DRe=()=>{pe({actionCreator:kA,effect:async(e,{dispatch:t,getState:n,condition:r})=>{var f;const{imageDTOs:i,imagesUsage:o}=e.payload;if(i.length!==1||o.length!==1)return;const a=i[0],s=o[0];if(!a||!s)return;t(XE(!1));const l=n(),u=(f=l.gallery.selection[l.gallery.selection.length-1])==null?void 0:f.image_name;if(a&&(a==null?void 0:a.image_name)===u){const{image_name:h}=a,p=DG(l),{data:g}=ce.endpoints.listImages.select(p)(l),_=g?Ft.getSelectors().selectAll(g):[],b=_.findIndex(S=>S.image_name===h),y=_.filter(S=>S.image_name!==h),m=al(b,0,y.length-1),v=y[m];t(pa(v||null))}s.isCanvasImage&&t(KE()),i.forEach(h=>{var p;((p=n().generation.initialImage)==null?void 0:p.imageName)===h.image_name&&t(DE()),ps(Aa(n().controlAdapters),g=>{(g.controlImage===h.image_name||gi(g)&&g.processedControlImage===h.image_name)&&(t(Hl({id:g.id,controlImage:null})),t(RE({id:g.id,processedControlImage:null})))}),n().nodes.nodes.forEach(g=>{on(g)&&ps(g.data.inputs,_=>{var b;_.type==="ImageField"&&((b=_.value)==null?void 0:b.image_name)===h.image_name&&t(aS({nodeId:g.data.id,fieldName:_.name,value:void 0}))})})});const{requestId:c}=t(ce.endpoints.deleteImage.initiate(a));await r(h=>ce.endpoints.deleteImage.matchFulfilled(h)&&h.meta.requestId===c,3e4)&&t(Do.util.invalidateTags([{type:"Board",id:a.board_id??"none"}]))}})},LRe=()=>{pe({actionCreator:kA,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTOs:r,imagesUsage:i}=e.payload;if(!(r.length<=1||i.length<=1))try{await t(ce.endpoints.deleteImages.initiate({imageDTOs:r})).unwrap();const o=n(),a=DG(o),{data:s}=ce.endpoints.listImages.select(a)(o),l=s?Ft.getSelectors().selectAll(s)[0]:void 0;t(pa(l||null)),t(XE(!1)),i.some(u=>u.isCanvasImage)&&t(KE()),r.forEach(u=>{var c;((c=n().generation.initialImage)==null?void 0:c.imageName)===u.image_name&&t(DE()),ps(Aa(n().controlAdapters),d=>{(d.controlImage===u.image_name||gi(d)&&d.processedControlImage===u.image_name)&&(t(Hl({id:d.id,controlImage:null})),t(RE({id:d.id,processedControlImage:null})))}),n().nodes.nodes.forEach(d=>{on(d)&&ps(d.data.inputs,f=>{var h;f.type==="ImageField"&&((h=f.value)==null?void 0:h.image_name)===u.image_name&&t(aS({nodeId:d.data.id,fieldName:f.name,value:void 0}))})})})}catch{}}})},FRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchPending,effect:()=>{}})},BRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchFulfilled,effect:e=>{se("images").debug({imageDTO:e.meta.arg.originalArgs},"Image deleted")}})},zRe=()=>{pe({matcher:ce.endpoints.deleteImage.matchRejected,effect:e=>{se("images").debug({imageDTO:e.meta.arg.originalArgs},"Unable to delete image")}})},LG=ge("dnd/dndDropped"),VRe=()=>{pe({actionCreator:LG,effect:async(e,{dispatch:t})=>{const n=se("dnd"),{activeData:r,overData:i}=e.payload;if(r.payloadType==="IMAGE_DTO"?n.debug({activeData:r,overData:i},"Image dropped"):r.payloadType==="IMAGE_DTOS"?n.debug({activeData:r,overData:i},`Images (${r.payload.imageDTOs.length}) dropped`):r.payloadType==="NODE_FIELD"?n.debug({activeData:pt(r),overData:pt(i)},"Node field dropped"):n.debug({activeData:r,overData:i},"Unknown payload dropped"),i.actionType==="ADD_FIELD_TO_LINEAR"&&r.payloadType==="NODE_FIELD"){const{nodeId:o,field:a}=r.payload;t(dve({nodeId:o,fieldName:a.name}))}if(i.actionType==="SET_CURRENT_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(pa(r.payload.imageDTO));return}if(i.actionType==="SET_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(c_(r.payload.imageDTO));return}if(i.actionType==="SET_CONTROL_ADAPTER_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{id:o}=i.context;t(Hl({id:o,controlImage:r.payload.imageDTO.image_name})),t(OE({id:o,isEnabled:!0}));return}if(i.actionType==="SET_CANVAS_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(lF(r.payload.imageDTO));return}if(i.actionType==="SET_NODES_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{fieldName:o,nodeId:a}=i.context;t(aS({nodeId:a,fieldName:o,value:r.payload.imageDTO}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload,{boardId:a}=i.context;t(ce.endpoints.addImageToBoard.initiate({imageDTO:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload;t(ce.endpoints.removeImageFromBoard.initiate({imageDTO:o}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload,{boardId:a}=i.context;t(ce.endpoints.addImagesToBoard.initiate({imageDTOs:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload;t(ce.endpoints.removeImagesFromBoard.initiate({imageDTOs:o}));return}}})},jRe=()=>{pe({matcher:ce.endpoints.removeImageFromBoard.matchFulfilled,effect:e=>{const t=se("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Image removed from board")}})},URe=()=>{pe({matcher:ce.endpoints.removeImageFromBoard.matchRejected,effect:e=>{const t=se("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Problem removing image from board")}})},GRe=()=>{pe({actionCreator:Ble,effect:async(e,{dispatch:t,getState:n})=>{const r=e.payload,i=n(),{shouldConfirmOnDelete:o}=i.system,a=w6e(n()),s=a.some(l=>l.isCanvasImage)||a.some(l=>l.isInitialImage)||a.some(l=>l.isControlImage)||a.some(l=>l.isNodesImage);if(o||s){t(XE(!0));return}t(kA({imageDTOs:r,imagesUsage:a}))}})},HRe=()=>{pe({matcher:ce.endpoints.uploadImage.matchFulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=se("images"),i=e.payload,o=n(),{autoAddBoardId:a}=o.gallery;r.debug({imageDTO:i},"Image uploaded");const{postUploadAction:s}=e.meta.arg.originalArgs;if(e.payload.is_intermediate&&!s)return;const l={title:X("toast.imageUploaded"),status:"success"};if((s==null?void 0:s.type)==="TOAST"){const{toastOptions:u}=s;if(!a||a==="none")t(it({...l,...u}));else{t(ce.endpoints.addImageToBoard.initiate({board_id:a,imageDTO:i}));const{data:c}=Qe.endpoints.listAllBoards.select()(o),d=c==null?void 0:c.find(h=>h.board_id===a),f=d?`${X("toast.addedToBoard")} ${d.board_name}`:`${X("toast.addedToBoard")} ${a}`;t(it({...l,description:f}))}return}if((s==null?void 0:s.type)==="SET_CANVAS_INITIAL_IMAGE"){t(lF(i)),t(it({...l,description:X("toast.setCanvasInitialImage")}));return}if((s==null?void 0:s.type)==="SET_CONTROL_ADAPTER_IMAGE"){const{id:u}=s;t(OE({id:u,isEnabled:!0})),t(Hl({id:u,controlImage:i.image_name})),t(it({...l,description:X("toast.setControlImage")}));return}if((s==null?void 0:s.type)==="SET_INITIAL_IMAGE"){t(c_(i)),t(it({...l,description:X("toast.setInitialImage")}));return}if((s==null?void 0:s.type)==="SET_NODES_IMAGE"){const{nodeId:u,fieldName:c}=s;t(aS({nodeId:u,fieldName:c,value:i})),t(it({...l,description:`${X("toast.setNodeField")} ${c}`}));return}}})},qRe=()=>{pe({matcher:ce.endpoints.uploadImage.matchRejected,effect:(e,{dispatch:t})=>{const n=se("images"),r={arg:{...$f(e.meta.arg.originalArgs,["file","postUploadAction"]),file:""}};n.error({...r},"Image upload failed"),t(it({title:X("toast.imageUploadFailed"),description:e.error.message,status:"error"}))}})},WRe=()=>{pe({matcher:ce.endpoints.starImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!0}):a.push(s)}),t(JF(a))}})},KRe=()=>{pe({matcher:ce.endpoints.unstarImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!1}):a.push(s)}),t(JF(a))}})},XRe=ge("generation/initialImageSelected"),QRe=ge("generation/modelSelected"),YRe=()=>{pe({actionCreator:XRe,effect:(e,{dispatch:t})=>{if(!e.payload){t(it(vs({title:X("toast.imageNotLoadedDesc"),status:"error"})));return}t(c_(e.payload)),t(it(vs(X("toast.sentToImageToImage"))))}})},ZRe=()=>{pe({actionCreator:QRe,effect:(e,{getState:t,dispatch:n})=>{var l,u;const r=se("models"),i=t(),o=Sm.safeParse(e.payload);if(!o.success){r.error({error:o.error.format()},"Failed to parse main model");return}const a=o.data,{base_model:s}=a;if(((l=i.generation.model)==null?void 0:l.base_model)!==s){let c=0;ps(i.lora.loras,(f,h)=>{f.base_model!==s&&(n(tB(h)),c+=1)});const{vae:d}=i.generation;d&&d.base_model!==s&&(n(xL(null)),c+=1),Aa(i.controlAdapters).forEach(f=>{var h;((h=f.model)==null?void 0:h.base_model)!==s&&(n(OE({id:f.id,isEnabled:!1})),c+=1)}),c>0&&n(it(vs({title:X("toast.baseModelChangedCleared",{count:c}),status:"warning"})))}((u=i.generation.model)==null?void 0:u.base_model)!==a.base_model&&i.ui.shouldAutoChangeDimensions&&(["sdxl","sdxl-refiner"].includes(a.base_model)?(n(E6(1024)),n(T6(1024)),n(Z6({width:1024,height:1024}))):(n(E6(512)),n(T6(512)),n(Z6({width:512,height:512})))),n(sl(a))}})},qg=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),CR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),ER=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),TR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),AR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),PR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),kR=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),F3=Ji({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),JRe=({base_model:e,model_type:t,model_name:n})=>`${e}/${t}/${n}`,Bs=e=>{const t=[];return e.forEach(n=>{const r={...Ye(n),id:JRe(n)};t.push(r)}),t},Qo=Do.injectEndpoints({endpoints:e=>({getOnnxModels:e.query({query:t=>{const n={model_type:"onnx",base_models:t};return`models/?${pp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"OnnxModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"OnnxModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return CR.setAll(CR.getInitialState(),n)}}),getMainModels:e.query({query:t=>{const n={model_type:"main",base_models:t};return`models/?${pp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"MainModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"MainModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return qg.setAll(qg.getInitialState(),n)}}),updateMainModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/main/${n}`,method:"PATCH",body:r}),invalidatesTags:["Model"]}),importMainModels:e.mutation({query:({body:t})=>({url:"models/import",method:"POST",body:t}),invalidatesTags:["Model"]}),addMainModels:e.mutation({query:({body:t})=>({url:"models/add",method:"POST",body:t}),invalidatesTags:["Model"]}),deleteMainModels:e.mutation({query:({base_model:t,model_name:n,model_type:r})=>({url:`models/${t}/${r}/${n}`,method:"DELETE"}),invalidatesTags:["Model"]}),convertMainModels:e.mutation({query:({base_model:t,model_name:n,convert_dest_directory:r})=>({url:`models/convert/${t}/main/${n}`,method:"PUT",params:{convert_dest_directory:r}}),invalidatesTags:["Model"]}),mergeMainModels:e.mutation({query:({base_model:t,body:n})=>({url:`models/merge/${t}`,method:"PUT",body:n}),invalidatesTags:["Model"]}),syncModels:e.mutation({query:()=>({url:"models/sync",method:"POST"}),invalidatesTags:["Model"]}),getLoRAModels:e.query({query:()=>({url:"models/",params:{model_type:"lora"}}),providesTags:t=>{const n=[{type:"LoRAModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"LoRAModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return ER.setAll(ER.getInitialState(),n)}}),updateLoRAModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/lora/${n}`,method:"PATCH",body:r}),invalidatesTags:[{type:"LoRAModel",id:kr}]}),deleteLoRAModels:e.mutation({query:({base_model:t,model_name:n})=>({url:`models/${t}/lora/${n}`,method:"DELETE"}),invalidatesTags:[{type:"LoRAModel",id:kr}]}),getControlNetModels:e.query({query:()=>({url:"models/",params:{model_type:"controlnet"}}),providesTags:t=>{const n=[{type:"ControlNetModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"ControlNetModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return TR.setAll(TR.getInitialState(),n)}}),getIPAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"ip_adapter"}}),providesTags:t=>{const n=[{type:"IPAdapterModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"IPAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return AR.setAll(AR.getInitialState(),n)}}),getT2IAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"t2i_adapter"}}),providesTags:t=>{const n=[{type:"T2IAdapterModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"T2IAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return PR.setAll(PR.getInitialState(),n)}}),getVaeModels:e.query({query:()=>({url:"models/",params:{model_type:"vae"}}),providesTags:t=>{const n=[{type:"VaeModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"VaeModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return F3.setAll(F3.getInitialState(),n)}}),getTextualInversionModels:e.query({query:()=>({url:"models/",params:{model_type:"embedding"}}),providesTags:t=>{const n=[{type:"TextualInversionModel",id:kr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"TextualInversionModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return kR.setAll(kR.getInitialState(),n)}}),getModelsInFolder:e.query({query:t=>({url:`/models/search?${pp.stringify(t,{})}`})}),getCheckpointConfigs:e.query({query:()=>({url:"/models/ckpt_confs"})})})}),{useGetMainModelsQuery:zUe,useGetOnnxModelsQuery:VUe,useGetControlNetModelsQuery:jUe,useGetIPAdapterModelsQuery:UUe,useGetT2IAdapterModelsQuery:GUe,useGetLoRAModelsQuery:HUe,useGetTextualInversionModelsQuery:qUe,useGetVaeModelsQuery:WUe,useUpdateMainModelsMutation:KUe,useDeleteMainModelsMutation:XUe,useImportMainModelsMutation:QUe,useAddMainModelsMutation:YUe,useConvertMainModelsMutation:ZUe,useMergeMainModelsMutation:JUe,useDeleteLoRAModelsMutation:eGe,useUpdateLoRAModelsMutation:tGe,useSyncModelsMutation:nGe,useGetModelsInFolderQuery:rGe,useGetCheckpointConfigsQuery:iGe}=Qo,eOe=()=>{pe({predicate:e=>Qo.endpoints.getMainModels.matchFulfilled(e)&&!e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`Main models loaded (${e.payload.ids.length})`);const i=t().generation.model,o=qg.getSelectors().selectAll(e.payload);if(o.length===0){n(sl(null));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=Sm.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse main model");return}n(sl(s.data))}}),pe({predicate:e=>Qo.endpoints.getMainModels.matchFulfilled(e)&&e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`SDXL Refiner models loaded (${e.payload.ids.length})`);const i=t().sdxl.refinerModel,o=qg.getSelectors().selectAll(e.payload);if(o.length===0){n(_8(null)),n(gve(!1));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=$E.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse SDXL Refiner Model");return}n(_8(s.data))}}),pe({matcher:Qo.endpoints.getVaeModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const r=se("models");r.info({models:e.payload.entities},`VAEs loaded (${e.payload.ids.length})`);const i=t().generation.vae;if(i===null||Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(i==null?void 0:i.model_name)&&(l==null?void 0:l.base_model)===(i==null?void 0:i.base_model)))return;const a=F3.getSelectors().selectAll(e.payload)[0];if(!a){n(sl(null));return}const s=_L.safeParse(a);if(!s.success){r.error({error:s.error.format()},"Failed to parse VAE model");return}n(xL(s.data))}}),pe({matcher:Qo.endpoints.getLoRAModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`LoRAs loaded (${e.payload.ids.length})`);const i=t().lora.loras;ps(i,(o,a)=>{Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(o==null?void 0:o.model_name)&&(l==null?void 0:l.base_model)===(o==null?void 0:o.base_model))||n(tB(a))})}}),pe({matcher:Qo.endpoints.getControlNetModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),kie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getT2IAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),Oie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getIPAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{se("models").info({models:e.payload.entities},`IP Adapter models loaded (${e.payload.ids.length})`),Mie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Nx({id:i.id}))})}}),pe({matcher:Qo.endpoints.getTextualInversionModels.matchFulfilled,effect:async e=>{se("models").info({models:e.payload.entities},`Embeddings loaded (${e.payload.ids.length})`)}})},tOe=Do.injectEndpoints({endpoints:e=>({dynamicPrompts:e.query({query:t=>({url:"utilities/dynamicprompts",body:t,method:"POST"}),keepUnusedDataFor:86400})})}),nOe=si(uae,Gle,jle,Ule,CE),rOe=()=>{pe({matcher:nOe,effect:async(e,{dispatch:t,getState:n,cancelActiveListeners:r,delay:i})=>{r(),await i(1e3);const o=n();if(o.config.disabledFeatures.includes("dynamicPrompting"))return;const{positivePrompt:a}=o.generation,{maxPrompts:s}=o.dynamicPrompts;t(Ux(!0));try{const l=t(tOe.endpoints.dynamicPrompts.initiate({prompt:a,max_prompts:s})),u=await l.unwrap();l.unsubscribe(),t(Hle(u.prompts)),t(qle(u.error)),t(J6(!1)),t(Ux(!1))}catch{t(J6(!0)),t(Ux(!1))}}})},zs=e=>e.$ref.split("/").slice(-1)[0],iOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"integer",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},oOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"IntegerPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},aOe=({schemaObject:e,baseField:t})=>{const n=_a(e.item_default)&&Qne(e.item_default)?e.item_default:0;return{...t,type:"IntegerCollection",default:e.default??[],item_default:n}},sOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"float",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},lOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"FloatPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&_a(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&_a(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},uOe=({schemaObject:e,baseField:t})=>{const n=_a(e.item_default)?e.item_default:0;return{...t,type:"FloatCollection",default:e.default??[],item_default:n}},cOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"string",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},dOe=({schemaObject:e,baseField:t})=>{const n={...t,type:"StringPolymorphic",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},fOe=({schemaObject:e,baseField:t})=>{const n=_E(e.item_default)?e.item_default:"";return{...t,type:"StringCollection",default:e.default??[],item_default:n}},hOe=({schemaObject:e,baseField:t})=>({...t,type:"boolean",default:e.default??!1}),pOe=({schemaObject:e,baseField:t})=>({...t,type:"BooleanPolymorphic",default:e.default??!1}),gOe=({schemaObject:e,baseField:t})=>{const n=e.item_default&&Xne(e.item_default)?e.item_default:!1;return{...t,type:"BooleanCollection",default:e.default??[],item_default:n}},mOe=({schemaObject:e,baseField:t})=>({...t,type:"MainModelField",default:e.default??void 0}),yOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLMainModelField",default:e.default??void 0}),vOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLRefinerModelField",default:e.default??void 0}),bOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeModelField",default:e.default??void 0}),_Oe=({schemaObject:e,baseField:t})=>({...t,type:"LoRAModelField",default:e.default??void 0}),SOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlNetModelField",default:e.default??void 0}),xOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterModelField",default:e.default??void 0}),wOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterModelField",default:e.default??void 0}),COe=({schemaObject:e,baseField:t})=>({...t,type:"BoardField",default:e.default??void 0}),EOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageField",default:e.default??void 0}),TOe=({schemaObject:e,baseField:t})=>({...t,type:"ImagePolymorphic",default:e.default??void 0}),AOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageCollection",default:e.default??[],item_default:e.item_default??void 0}),POe=({schemaObject:e,baseField:t})=>({...t,type:"DenoiseMaskField",default:e.default??void 0}),kOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsField",default:e.default??void 0}),IOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsPolymorphic",default:e.default??void 0}),MOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsCollection",default:e.default??[],item_default:e.item_default??void 0}),ROe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningField",default:e.default??void 0}),OOe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningPolymorphic",default:e.default??void 0}),$Oe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningCollection",default:e.default??[],item_default:e.item_default??void 0}),NOe=({schemaObject:e,baseField:t})=>({...t,type:"UNetField",default:e.default??void 0}),DOe=({schemaObject:e,baseField:t})=>({...t,type:"ClipField",default:e.default??void 0}),LOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeField",default:e.default??void 0}),FOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlField",default:e.default??void 0}),BOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlPolymorphic",default:e.default??void 0}),zOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlCollection",default:e.default??[],item_default:e.item_default??void 0}),VOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterField",default:e.default??void 0}),jOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterPolymorphic",default:e.default??void 0}),UOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),GOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterField",default:e.default??void 0}),HOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterPolymorphic",default:e.default??void 0}),qOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),WOe=({schemaObject:e,baseField:t})=>{const n=e.enum??[];return{...t,type:"enum",options:n,ui_choice_labels:e.ui_choice_labels,default:e.default??n[0]}},KOe=({baseField:e})=>({...e,type:"Collection",default:[]}),XOe=({baseField:e})=>({...e,type:"CollectionItem",default:void 0}),QOe=({baseField:e})=>({...e,type:"Any",default:void 0}),YOe=({baseField:e})=>({...e,type:"MetadataItemField",default:void 0}),ZOe=({baseField:e})=>({...e,type:"MetadataItemCollection",default:void 0}),JOe=({baseField:e})=>({...e,type:"MetadataItemPolymorphic",default:void 0}),e7e=({baseField:e})=>({...e,type:"MetadataField",default:void 0}),t7e=({baseField:e})=>({...e,type:"MetadataCollection",default:void 0}),n7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorField",default:e.default??{r:127,g:127,b:127,a:255}}),r7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorPolymorphic",default:e.default??{r:127,g:127,b:127,a:255}}),i7e=({schemaObject:e,baseField:t})=>({...t,type:"ColorCollection",default:e.default??[]}),o7e=({schemaObject:e,baseField:t})=>({...t,type:"Scheduler",default:e.default??"euler"}),B3=e=>{if(N0(e)){if(e.type){if(e.enum)return"enum";if(e.type){if(e.type==="number")return"float";if(e.type==="array"){const t=N0(e.items)?e.items.type:zs(e.items);return Tn(t)?void 0:hye(t)?vT[t]:void 0}else if(!Tn(e.type))return e.type}}else if(e.allOf){const t=e.allOf;if(t&&t[0]&&au(t[0]))return zs(t[0])}else if(e.anyOf){const t=e.anyOf.filter(i=>!(N0(i)&&i.type==="null"));if(t.length===1){if(au(t[0]))return zs(t[0]);if(N0(t[0]))return B3(t[0])}let n,r;if(mI(t[0])){const i=t[0].items,o=t[1];au(i)&&au(o)?(n=zs(i),r=zs(o)):D0(i)&&D0(o)&&(n=i.type,r=o.type)}else if(mI(t[1])){const i=t[0],o=t[1].items;au(i)&&au(o)?(n=zs(i),r=zs(o)):D0(i)&&D0(o)&&(n=i.type,r=o.type)}if(n===r&&gye(n))return wz[n]}}else if(au(e))return zs(e)},FG={BoardField:COe,Any:QOe,boolean:hOe,BooleanCollection:gOe,BooleanPolymorphic:pOe,ClipField:DOe,Collection:KOe,CollectionItem:XOe,ColorCollection:i7e,ColorField:n7e,ColorPolymorphic:r7e,ConditioningCollection:$Oe,ConditioningField:ROe,ConditioningPolymorphic:OOe,ControlCollection:zOe,ControlField:FOe,ControlNetModelField:SOe,ControlPolymorphic:BOe,DenoiseMaskField:POe,enum:WOe,float:sOe,FloatCollection:uOe,FloatPolymorphic:lOe,ImageCollection:AOe,ImageField:EOe,ImagePolymorphic:TOe,integer:iOe,IntegerCollection:aOe,IntegerPolymorphic:oOe,IPAdapterCollection:UOe,IPAdapterField:VOe,IPAdapterModelField:xOe,IPAdapterPolymorphic:jOe,LatentsCollection:MOe,LatentsField:kOe,LatentsPolymorphic:IOe,LoRAModelField:_Oe,MetadataItemField:YOe,MetadataItemCollection:ZOe,MetadataItemPolymorphic:JOe,MetadataField:e7e,MetadataCollection:t7e,MainModelField:mOe,Scheduler:o7e,SDXLMainModelField:yOe,SDXLRefinerModelField:vOe,string:cOe,StringCollection:fOe,StringPolymorphic:dOe,T2IAdapterCollection:qOe,T2IAdapterField:GOe,T2IAdapterModelField:wOe,T2IAdapterPolymorphic:HOe,UNetField:NOe,VaeField:LOe,VaeModelField:bOe},a7e=e=>!!(e&&e in FG),s7e=(e,t,n,r)=>{var p;const{input:i,ui_hidden:o,ui_component:a,ui_type:s,ui_order:l,ui_choice_labels:u,item_default:c}=t,d={input:Gh.includes(r)?"connection":i,ui_hidden:o,ui_component:a,ui_type:s,required:((p=e.required)==null?void 0:p.includes(n))??!1,ui_order:l,ui_choice_labels:u,item_default:c},f={name:n,title:t.title??(n?wE(n):""),description:t.description??"",fieldKind:"input",...d};if(!a7e(r))return;const h=FG[r];if(h)return h({schemaObject:t,baseField:f})},l7e=["id","type","use_cache"],u7e=["type"],c7e=["IsIntermediate"],d7e=["graph","linear_ui_output"],f7e=(e,t)=>!!(l7e.includes(t)||e==="collect"&&t==="collection"||e==="iterate"&&t==="index"),h7e=e=>!!c7e.includes(e),p7e=(e,t)=>!u7e.includes(t),g7e=e=>!d7e.includes(e.properties.type.default),m7e=(e,t=void 0,n=void 0)=>{var o;return Object.values(((o=e.components)==null?void 0:o.schemas)??{}).filter(xfe).filter(g7e).filter(a=>t?t.includes(a.properties.type.default):!0).filter(a=>n?!n.includes(a.properties.type.default):!0).reduce((a,s)=>{var S,w;const l=s.properties.type.default,u=s.title.replace("Invocation",""),c=s.tags??[],d=s.description??"",f=s.version;let h=!1;const p=tg(s.properties,(C,x,P)=>{if(f7e(l,P))return se("nodes").trace({node:l,fieldName:P,field:pt(x)},"Skipped reserved input field"),C;if(!yI(x))return se("nodes").warn({node:l,propertyName:P,property:pt(x)},"Unhandled input property"),C;const E=x.ui_type??B3(x);if(!E)return se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},"Missing input field type"),C;if(E==="WorkflowField")return h=!0,C;if(h7e(E))return se("nodes").trace({node:l,fieldName:P,fieldType:E,field:pt(x)},`Skipping reserved input field type: ${E}`),C;if(!gI(E))return se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},`Skipping unknown input field type: ${E}`),C;const I=s7e(s,x,P,E);return I?(C[P]=I,C):(se("nodes").warn({node:l,fieldName:P,fieldType:E,field:pt(x)},"Skipping input field with no template"),C)},{}),g=s.output.$ref.split("/").pop();if(!g)return se("nodes").warn({outputRefObject:pt(s.output)},"No output schema name found in ref object"),a;const _=(w=(S=e.components)==null?void 0:S.schemas)==null?void 0:w[g];if(!_)return se("nodes").warn({outputSchemaName:g},"Output schema not found"),a;if(!wfe(_))return se("nodes").error({outputSchema:pt(_)},"Invalid output schema"),a;const b=_.properties.type.default,y=tg(_.properties,(C,x,P)=>{if(!p7e(l,P))return se("nodes").trace({type:l,propertyName:P,property:pt(x)},"Skipped reserved output field"),C;if(!yI(x))return se("nodes").warn({type:l,propertyName:P,property:pt(x)},"Unhandled output property"),C;const E=x.ui_type??B3(x);return gI(E)?(C[P]={fieldKind:"output",name:P,title:x.title??(P?wE(P):""),description:x.description??"",type:E,ui_hidden:x.ui_hidden??!1,ui_type:x.ui_type,ui_order:x.ui_order},C):(se("nodes").warn({fieldName:P,fieldType:E,field:pt(x)},"Skipping unknown output field type"),C)},{}),m=s.properties.use_cache.default,v={title:u,type:l,version:f,tags:c,description:d,outputType:b,inputs:p,outputs:y,useCache:m,withWorkflow:h};return Object.assign(a,{[l]:v}),a},{})},y7e=()=>{pe({actionCreator:Ig.fulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=se("system"),i=e.payload;r.debug({schemaJSON:i},"Received OpenAPI schema");const{nodesAllowlist:o,nodesDenylist:a}=n().config,s=m7e(i,o,a);r.debug({nodeTemplates:pt(s)},`Built ${r_(s)} node templates`),t($z(s))}}),pe({actionCreator:Ig.rejected,effect:e=>{se("system").error({error:pt(e.error)},"Problem retrieving OpenAPI Schema")}})},v7e=()=>{pe({actionCreator:VD,effect:(e,{dispatch:t,getState:n})=>{se("socketio").debug("Connected");const{nodes:i,config:o,system:a}=n(),{disabledTabs:s}=o;!r_(i.nodeTemplates)&&!s.includes("nodes")&&t(Ig()),a.isInitialized?t(Do.util.resetApiState()):t(Sve(!0)),t(CE(e.payload))}})},b7e=()=>{pe({actionCreator:jD,effect:(e,{dispatch:t})=>{se("socketio").debug("Disconnected"),t(UD(e.payload))}})},_7e=()=>{pe({actionCreator:KD,effect:(e,{dispatch:t})=>{se("socketio").trace(e.payload,"Generator progress"),t(PE(e.payload))}})},S7e=()=>{pe({actionCreator:qD,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Session complete"),t(WD(e.payload))}})},x7e=["load_image","image"],w7e=()=>{pe({actionCreator:TE,effect:async(e,{dispatch:t,getState:n})=>{const r=se("socketio"),{data:i}=e.payload;r.debug({data:pt(i)},`Invocation complete (${e.payload.data.node.type})`);const{result:o,node:a,queue_batch_id:s,source_node_id:l}=i;if(TG(o)&&!x7e.includes(a.type)&&!iRe.includes(l)){const{image_name:u}=o.image,{canvas:c,gallery:d}=n(),f=t(ce.endpoints.getImageDTO.initiate(u,{forceRefetch:!0})),h=await f.unwrap();if(f.unsubscribe(),c.batchIds.includes(s)&&[Wu].includes(i.source_node_id)&&t(Ple(h)),!h.is_intermediate){t(ce.util.updateQueryData("listImages",{board_id:h.board_id??"none",categories:Fn},g=>{Ft.addOne(g,h)})),t(Qe.util.updateQueryData("getBoardImagesTotal",h.board_id??"none",g=>{g.total+=1})),t(ce.util.invalidateTags([{type:"Board",id:h.board_id??"none"}]));const{shouldAutoSwitch:p}=d;p&&(d.galleryView!=="images"&&t(M5("images")),h.board_id&&h.board_id!==d.selectedBoardId&&t(M1({boardId:h.board_id,selectedImageName:h.image_name})),!h.board_id&&d.selectedBoardId!=="none"&&t(M1({boardId:"none",selectedImageName:h.image_name})),t(pa(h)))}}t(AE(e.payload))}})},C7e=()=>{pe({actionCreator:HD,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Invocation error (${e.payload.data.node.type})`),t(i_(e.payload))}})},E7e=()=>{pe({actionCreator:tL,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Invocation retrieval error (${e.payload.data.graph_execution_state_id})`),t(nL(e.payload))}})},T7e=()=>{pe({actionCreator:GD,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,`Invocation started (${e.payload.data.node.type})`),t(EE(e.payload))}})},A7e=()=>{pe({actionCreator:XD,effect:(e,{dispatch:t})=>{const n=se("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load started: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(QD(e.payload))}}),pe({actionCreator:YD,effect:(e,{dispatch:t})=>{const n=se("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load complete: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(ZD(e.payload))}})},P7e=()=>{pe({actionCreator:rL,effect:async(e,{dispatch:t})=>{const n=se("socketio"),{queue_item:r,batch_status:i,queue_status:o}=e.payload.data;n.debug(e.payload,`Queue item ${r.item_id} status updated: ${r.status}`),t(un.util.updateQueryData("listQueueItems",void 0,a=>{xu.updateOne(a,{id:r.item_id,changes:r})})),t(un.util.updateQueryData("getQueueStatus",void 0,a=>{a&&Object.assign(a.queue,o)})),t(un.util.updateQueryData("getBatchStatus",{batch_id:i.batch_id},()=>i)),t(un.util.updateQueryData("getQueueItem",r.item_id,a=>{a&&Object.assign(a,r)})),t(un.util.invalidateTags(["CurrentSessionQueueItem","NextSessionQueueItem","InvocationCacheStatus"])),t(o_(e.payload))}})},k7e=()=>{pe({actionCreator:JD,effect:(e,{dispatch:t})=>{se("socketio").error(e.payload,`Session retrieval error (${e.payload.data.graph_execution_state_id})`),t(eL(e.payload))}})},I7e=()=>{pe({actionCreator:Zre,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Subscribed"),t(Jre(e.payload))}})},M7e=()=>{pe({actionCreator:eie,effect:(e,{dispatch:t})=>{se("socketio").debug(e.payload,"Unsubscribed"),t(tie(e.payload))}})},R7e=()=>{pe({actionCreator:M6e,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTO:r}=e.payload;try{const i=await t(ce.endpoints.changeImageIsIntermediate.initiate({imageDTO:r,is_intermediate:!1})).unwrap(),{autoAddBoardId:o}=n().gallery;o&&o!=="none"&&await t(ce.endpoints.addImageToBoard.initiate({imageDTO:i,board_id:o})),t(it({title:X("toast.imageSaved"),status:"success"}))}catch(i){t(it({title:X("toast.imageSavingFailed"),description:i==null?void 0:i.message,status:"error"}))}}})},oGe=["sd-1","sd-2","sdxl","sdxl-refiner"],O7e=["sd-1","sd-2","sdxl"],aGe=["sdxl"],sGe=["sd-1","sd-2"],lGe=["sdxl-refiner"],$7e=()=>{pe({actionCreator:qz,effect:async(e,{getState:t,dispatch:n})=>{var i;if(e.payload==="unifiedCanvas"){const o=(i=t().generation.model)==null?void 0:i.base_model;if(o&&["sd-1","sd-2","sdxl"].includes(o))return;try{const a=n(Qo.endpoints.getMainModels.initiate(O7e)),s=await a.unwrap();if(a.unsubscribe(),!s.ids.length){n(sl(null));return}const u=qg.getSelectors().selectAll(s).filter(h=>["sd-1","sd-2","sxdl"].includes(h.base_model))[0];if(!u){n(sl(null));return}const{base_model:c,model_name:d,model_type:f}=u;n(sl({base_model:c,model_name:d,model_type:f}))}catch{n(sl(null))}}}})},N7e=({image_name:e,esrganModelName:t,autoAddBoardId:n})=>{const r={id:Jh,type:"esrgan",image:{image_name:e},model_name:t,is_intermediate:!0},i={id:Wu,type:"linear_ui_output",use_cache:!1,is_intermediate:!1,board:n==="none"?void 0:{board_id:n}},o={id:"adhoc-esrgan-graph",nodes:{[Jh]:r,[Wu]:i},edges:[{source:{node_id:Jh,field:"image"},destination:{node_id:Wu,field:"image"}}]};return ks(o,{},Jh),Lo(o,{esrgan_model:t}),o},w2=()=>oF(),C2=YL;function D7e(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function MR(e,t,n){e.loadNamespaces(t,BG(e,n))}function RR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,BG(e,r))}function L7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=t.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function F7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(z3("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):L7e(e,t,n)}const B7e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,z7e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},V7e=e=>z7e[e],j7e=e=>e.replace(B7e,V7e);let V3={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j7e};function U7e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};V3={...V3,...e}}function G7e(){return V3}let zG;function H7e(e){zG=e}function q7e(){return zG}const W7e={type:"3rdParty",init(e){U7e(e.options.react),H7e(e)}},K7e=k.createContext();class X7e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Q7e=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function VG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(K7e)||{},o=n||r||q7e();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new X7e),!o){z3("You will need to pass in an i18next instance by using initReactI18next");const m=(S,w)=>typeof w=="string"?w:w&&typeof w=="object"&&typeof w.defaultValue=="string"?w.defaultValue:Array.isArray(S)?S[S.length-1]:S,v=[m,{},!1];return v.t=m,v.i18n={},v.ready=!1,v}o.options.react&&o.options.react.wait!==void 0&&z3("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...G7e(),...o.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let u=e||i||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(m=>F7e(m,o,a));function d(){return o.getFixedT(t.lng||null,a.nsMode==="fallback"?u:u[0],l)}const[f,h]=k.useState(d);let p=u.join();t.lng&&(p=`${t.lng}${p}`);const g=Q7e(p),_=k.useRef(!0);k.useEffect(()=>{const{bindI18n:m,bindI18nStore:v}=a;_.current=!0,!c&&!s&&(t.lng?RR(o,t.lng,u,()=>{_.current&&h(d)}):MR(o,u,()=>{_.current&&h(d)})),c&&g&&g!==p&&_.current&&h(d);function S(){_.current&&h(d)}return m&&o&&o.on(m,S),v&&o&&o.store.on(v,S),()=>{_.current=!1,m&&o&&m.split(" ").forEach(w=>o.off(w,S)),v&&o&&v.split(" ").forEach(w=>o.store.off(w,S))}},[o,p]);const b=k.useRef(!0);k.useEffect(()=>{_.current&&!b.current&&h(d),b.current=!1},[o,l]);const y=[f,o,c];if(y.t=f,y.i18n=o,y.ready=c,c||!c&&!s)return y;throw new Promise(m=>{t.lng?RR(o,t.lng,u,()=>m()):MR(o,u,()=>m())})}const Y7e=(e,t)=>{if(!e||!t)return;const{width:n,height:r}=e,i=r*4*n*4,o=r*2*n*2;return{x4:i,x2:o}},Z7e=(e,t)=>{if(!e||!t)return{x4:!0,x2:!0};const n={x4:!1,x2:!1};return e.x4<=t&&(n.x4=!0),e.x2<=t&&(n.x2=!0),n},J7e=(e,t)=>{if(!(!e||!t)&&!(e.x4&&e.x2)){if(!e.x2&&!e.x4)return"parameters.isAllowedToUpscale.tooLarge";if(!e.x4&&e.x2&&t===4)return"parameters.isAllowedToUpscale.useX2Model"}},jG=e=>qn(IA,({postprocessing:t,config:n})=>{const{esrganModelName:r}=t,{maxUpscalePixels:i}=n,o=Y7e(e,i),a=Z7e(o,i),s=r.includes("x2")?2:4,l=J7e(a,s);return{isAllowedToUpscale:s===2?a.x2:a.x4,detailTKey:l}},Vm),uGe=e=>{const{t}=VG(),n=k.useMemo(()=>jG(e),[e]),{isAllowedToUpscale:r,detailTKey:i}=C2(n);return{isAllowedToUpscale:r,detail:i?t(i):void 0}},e$e=ge("upscale/upscaleRequested"),t$e=()=>{pe({actionCreator:e$e,effect:async(e,{dispatch:t,getState:n})=>{var f;const r=se("session"),{imageDTO:i}=e.payload,{image_name:o}=i,a=n(),{isAllowedToUpscale:s,detailTKey:l}=jG(i)(a);if(!s){r.error({imageDTO:i},X(l??"parameters.isAllowedToUpscale.tooLarge")),t(it({title:X(l??"parameters.isAllowedToUpscale.tooLarge"),status:"error"}));return}const{esrganModelName:u}=a.postprocessing,{autoAddBoardId:c}=a.gallery,d={prepend:!0,batch:{graph:N7e({image_name:o,esrganModelName:u,autoAddBoardId:c}),runs:1}};try{const h=t(un.endpoints.enqueueBatch.initiate(d,{fixedCacheKey:"enqueueBatch"})),p=await h.unwrap();h.reset(),r.debug({enqueueResult:pt(p)},X("queue.graphQueued"))}catch(h){if(r.error({enqueueBatchArg:pt(d)},X("queue.graphFailedToQueue")),h instanceof Object&&"data"in h&&"status"in h&&h.status===403){const p=((f=h.data)==null?void 0:f.detail)||"Unknown Error";t(it({title:X("queue.graphFailedToQueue"),status:"error",description:p,duration:15e3}));return}t(it({title:X("queue.graphFailedToQueue"),status:"error"}))}}})},n$e=Pa(null),r$e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fb=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(r$e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},OR=e=>e==="*"||e==="x"||e==="X",$R=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},i$e=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],o$e=(e,t)=>{if(OR(e)||OR(t))return 0;const[n,r]=i$e($R(e),$R(t));return n>r?1:n{for(let n=0;n{const n=fb(e),r=fb(t),i=n.pop(),o=r.pop(),a=bd(n,r);return a!==0?a:i&&o?bd(i.split("."),o.split(".")):i||o?i?-1:1:0},a$e=(e,t,n)=>{s$e(n);const r=UG(e,t);return GG[n].includes(r)},GG={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},NR=Object.keys(GG),s$e=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(NR.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${NR.join("|")}`)},pv=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>pv(e,_));if(t.includes(" - ")){const[_,b]=t.split(" - ",2);return pv(e,`>=${_} <=${b}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>pv(e,_));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return a$e(e,t,r);const[i,o,a,,s]=fb(e),[l,u,c,,d]=fb(t),f=[i,o,a],h=[l,u??"x",c??"x"];if(d&&(!s||bd(f,h)!==0||bd(s.split("."),d.split("."))===-1))return!1;const p=h.findIndex(_=>_!=="0")+1,g=r==="~"?2:p>1?p:1;return!(bd(f.slice(0,g),h.slice(0,g))!==0||bd(f.slice(g),h.slice(g))===-1)},l$e=(e,t)=>{const n=Ye(e),{nodes:r,edges:i}=n,o=[],a=r.filter(I5),s=xE(a,"id");return r.forEach(l=>{if(!I5(l))return;const u=t[l.data.type];if(!u){o.push({message:`${de.t("nodes.node")} "${l.data.type}" ${de.t("nodes.skipped")}`,issues:[`${de.t("nodes.nodeType")}"${l.data.type}" ${de.t("nodes.doesNotExist")}`],data:l});return}if(u.version&&l.data.version&&UG(u.version,l.data.version)!==0){o.push({message:`${de.t("nodes.node")} "${l.data.type}" ${de.t("nodes.mismatchedVersion")}`,issues:[`${de.t("nodes.node")} "${l.data.type}" v${l.data.version} ${de.t("nodes.maybeIncompatible")} v${u.version}`],data:{node:l,nodeTemplate:pt(u)}});return}}),i.forEach((l,u)=>{const c=s[l.source],d=s[l.target],f=[];if(c?l.type==="default"&&!(l.sourceHandle in c.data.outputs)&&f.push(`${de.t("nodes.outputNode")} "${l.source}.${l.sourceHandle}" ${de.t("nodes.doesNotExist")}`):f.push(`${de.t("nodes.outputNode")} ${l.source} ${de.t("nodes.doesNotExist")}`),d?l.type==="default"&&!(l.targetHandle in d.data.inputs)&&f.push(`${de.t("nodes.inputField")} "${l.target}.${l.targetHandle}" ${de.t("nodes.doesNotExist")}`):f.push(`${de.t("nodes.inputNode")} ${l.target} ${de.t("nodes.doesNotExist")}`),t[(c==null?void 0:c.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${de.t("nodes.sourceNode")} "${l.source}" ${de.t("nodes.missingTemplate")} "${c==null?void 0:c.data.type}"`),t[(d==null?void 0:d.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${de.t("nodes.sourceNode")}"${l.target}" ${de.t("nodes.missingTemplate")} "${d==null?void 0:d.data.type}"`),f.length){delete i[u];const h=l.type==="default"?l.sourceHandle:l.source,p=l.type==="default"?l.targetHandle:l.target;o.push({message:`Edge "${h} -> ${p}" skipped`,issues:f,data:l})}}),{workflow:n,errors:o}},u$e=()=>{pe({actionCreator:v1e,effect:(e,{dispatch:t,getState:n})=>{const r=se("nodes"),i=e.payload,o=n().nodes.nodeTemplates,{workflow:a,errors:s}=l$e(i,o);t(fve(a)),s.length?(t(it(vs({title:X("toast.loadedWithWarnings"),status:"warning"}))),s.forEach(({message:l,...u})=>{r.warn(u,l)})):t(it(vs({title:X("toast.workflowLoaded"),status:"success"}))),t(qz("nodes")),requestAnimationFrame(()=>{var l;(l=n$e.get())==null||l.fitView()})}})},c$e={Any:void 0,enum:"",BoardField:void 0,boolean:!1,BooleanCollection:[],BooleanPolymorphic:!1,ClipField:void 0,Collection:[],CollectionItem:void 0,ColorCollection:[],ColorField:void 0,ColorPolymorphic:void 0,ConditioningCollection:[],ConditioningField:void 0,ConditioningPolymorphic:void 0,ControlCollection:[],ControlField:void 0,ControlNetModelField:void 0,ControlPolymorphic:void 0,DenoiseMaskField:void 0,float:0,FloatCollection:[],FloatPolymorphic:0,ImageCollection:[],ImageField:void 0,ImagePolymorphic:void 0,integer:0,IntegerCollection:[],IntegerPolymorphic:0,IPAdapterCollection:[],IPAdapterField:void 0,IPAdapterModelField:void 0,IPAdapterPolymorphic:void 0,LatentsCollection:[],LatentsField:void 0,LatentsPolymorphic:void 0,MetadataItemField:void 0,MetadataItemCollection:[],MetadataItemPolymorphic:void 0,MetadataField:void 0,MetadataCollection:[],LoRAModelField:void 0,MainModelField:void 0,ONNXModelField:void 0,Scheduler:"euler",SDXLMainModelField:void 0,SDXLRefinerModelField:void 0,string:"",StringCollection:[],StringPolymorphic:"",T2IAdapterCollection:[],T2IAdapterField:void 0,T2IAdapterModelField:void 0,T2IAdapterPolymorphic:void 0,UNetField:void 0,VaeField:void 0,VaeModelField:void 0},d$e=(e,t)=>{const n={id:e,name:t.name,type:t.type,label:"",fieldKind:"input"};return n.value=t.default??c$e[t.type],n},Zw={dragHandle:`.${xz}`},f$e=(e,t,n)=>{const r=yl();if(e==="current_image")return{...Zw,id:r,type:"current_image",position:t,data:{id:r,type:"current_image",isOpen:!0,label:"Current Image"}};if(e==="notes")return{...Zw,id:r,type:"notes",position:t,data:{id:r,isOpen:!0,label:"Notes",notes:"",type:"notes"}};if(n===void 0){console.error(`Unable to find template ${e}.`);return}const i=tg(n.inputs,(s,l,u)=>{const c=yl(),d=d$e(c,l);return s[u]=d,s},{}),o=tg(n.outputs,(s,l,u)=>{const d={id:yl(),name:u,type:l.type,fieldKind:"output"};return s[u]=d,s},{});return{...Zw,id:r,type:"invocation",position:t,data:{id:r,type:e,version:n.version,label:"",notes:"",isOpen:!0,embedWorkflow:!1,isIntermediate:e!=="save_image",inputs:i,outputs:o,useCache:n.useCache}}},h$e=()=>{const e=w2(),t=C2(r=>r.system.toastQueue),n=gPe();return k.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(vve())},[e,n,t]),null},p$e=()=>{const e=w2();return k.useCallback(n=>e(it(vs(n))),[e])},cGe=k.memo(h$e),hb=(e,t)=>!on(e)||!t?!1:e.data.version!==t.version,HG=(e,t)=>{if(!hb(e,t)||!on(e)||!t||!e.data.version)return!1;const r=Pfe.parse(t.version).major;return pv(e.data.version,`^${r}`)},qG=(e,t)=>{if(!HG(e,t)||!on(e)||!t||!e.data.version)return;const r=f$e(e.data.type,e.position,t),i=Ye(e);return i.data.version=t.version,ID(i,r),i},dGe=e=>{const t=w2(),n=p$e(),{t:r}=VG(),i=k.useMemo(()=>qn(IA,({nodes:c})=>{const d=c.nodes.find(h=>h.id===e),f=c.nodeTemplates[(d==null?void 0:d.data.type)??""];return{node:d,nodeTemplate:f}},Vm),[e]),{node:o,nodeTemplate:a}=C2(i),s=k.useMemo(()=>hb(o,a),[o,a]),l=k.useMemo(()=>HG(o,a),[o,a]),u=k.useCallback(()=>{const c=hb(o,a),d=qG(o,a);if(!d){c&&n({title:r("nodes.unableToUpdateNodes",{count:1})});return}t(Oz({nodeId:d.id,node:d}))},[t,o,a,r,n]);return{needsUpdate:s,mayUpdate:l,updateNode:u}},g$e=()=>{pe({actionCreator:b1e,effect:(e,{dispatch:t,getState:n})=>{const r=se("nodes"),i=n().nodes.nodes,o=n().nodes.nodeTemplates;let a=0;i.forEach(s=>{const l=o[s.data.type],u=hb(s,l),c=qG(s,l);if(!c){u&&a++;return}t(Oz({nodeId:c.id,node:c}))}),a&&(r.warn(`Unable to update ${a} nodes. Please report this issue.`),t(it(vs({title:X("nodes.unableToUpdateNodes",{count:a})}))))}})},WG=mN(),pe=WG.startListening;HRe();qRe();YRe();DRe();LRe();FRe();BRe();zRe();C6e();GRe();WRe();KRe();mRe();ORe();CRe();T1e();x6e();HMe();VMe();z6e();jMe();B6e();L6e();GMe();R7e();C1e();_7e();S7e();w7e();C7e();T7e();v7e();b7e();I7e();M7e();A7e();k7e();E7e();P7e();KMe();WMe();$Re();NRe();jRe();URe();E6e();y7e();u$e();g$e();VRe();ZRe();k1e();eOe();A1e();E1e();t$e();$7e();rOe();const m$e={canvas:Nle,gallery:Lfe,generation:dae,nodes:hve,postprocessing:pve,system:xve,config:Yre,ui:Ave,hotkeys:Tve,controlAdapters:jie,dynamicPrompts:Wle,deleteImageModal:zle,changeBoardModal:Lle,lora:zfe,modelmanager:Eve,sdxl:mve,queue:Cae,[Do.reducerPath]:Do.reducer},y$e=Mf(m$e),v$e=Zve(y$e),b$e=["canvas","gallery","generation","sdxl","nodes","postprocessing","system","ui","controlAdapters","dynamicPrompts","lora","modelmanager"],KG=Y$({reducer:v$e,enhancers:e=>e.concat(Jve(window.localStorage,b$e,{persistDebounce:300,serialize:d1e,unserialize:h1e,prefix:e1e})).concat(vN()),middleware:e=>e({serializableCheck:!1,immutableCheck:!1}).concat(Do.middleware).concat(Mve).prepend(WG.middleware),devTools:{actionSanitizer:_1e,stateSanitizer:x1e,trace:!0,predicate:(e,t)=>!S1e.includes(t.type)}}),IA=e=>e;BF.set(KG);const _$e=e=>{const{socket:t,storeApi:n}=e,{dispatch:r}=n;t.on("connect",()=>{se("socketio").debug("Connected"),r(VD());const o=Dn.get();t.emit("subscribe_queue",{queue_id:o})}),t.on("connect_error",i=>{i&&i.message&&i.data==="ERR_UNAUTHENTICATED"&&r(it(vs({title:i.message,status:"error",duration:1e4})))}),t.on("disconnect",()=>{r(jD())}),t.on("invocation_started",i=>{r(GD({data:i}))}),t.on("generator_progress",i=>{r(KD({data:i}))}),t.on("invocation_error",i=>{r(HD({data:i}))}),t.on("invocation_complete",i=>{r(TE({data:i}))}),t.on("graph_execution_state_complete",i=>{r(qD({data:i}))}),t.on("model_load_started",i=>{r(XD({data:i}))}),t.on("model_load_completed",i=>{r(YD({data:i}))}),t.on("session_retrieval_error",i=>{r(JD({data:i}))}),t.on("invocation_retrieval_error",i=>{r(tL({data:i}))}),t.on("queue_item_status_changed",i=>{r(rL({data:i}))})},Ca=Object.create(null);Ca.open="0";Ca.close="1";Ca.ping="2";Ca.pong="3";Ca.message="4";Ca.upgrade="5";Ca.noop="6";const gv=Object.create(null);Object.keys(Ca).forEach(e=>{gv[Ca[e]]=e});const j3={type:"error",data:"parser error"},XG=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",QG=typeof ArrayBuffer=="function",YG=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,MA=({type:e,data:t},n,r)=>XG&&t instanceof Blob?n?r(t):DR(t,r):QG&&(t instanceof ArrayBuffer||YG(t))?n?r(t):DR(new Blob([t]),r):r(Ca[e]+(t||"")),DR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function LR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Jw;function S$e(e,t){if(XG&&e.data instanceof Blob)return e.data.arrayBuffer().then(LR).then(t);if(QG&&(e.data instanceof ArrayBuffer||YG(e.data)))return t(LR(e.data));MA(e,!1,n=>{Jw||(Jw=new TextEncoder),t(Jw.encode(n))})}const FR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ep=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(a&15)<<4|s>>2,c[i++]=(s&3)<<6|l&63;return u},w$e=typeof ArrayBuffer=="function",RA=(e,t)=>{if(typeof e!="string")return{type:"message",data:ZG(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C$e(e.substring(1),t)}:gv[n]?e.length>1?{type:gv[n],data:e.substring(1)}:{type:gv[n]}:j3},C$e=(e,t)=>{if(w$e){const n=x$e(e);return ZG(n,t)}else return{base64:!0,data:e}},ZG=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},JG=String.fromCharCode(30),E$e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{MA(o,!1,s=>{r[a]=s,++i===n&&t(r.join(JG))})})},T$e=(e,t)=>{const n=e.split(JG),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let eC;function Sy(e){return e.reduce((t,n)=>t+n.length,0)}function xy(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){s.enqueue(j3);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Sy(n)e){s.enqueue(j3);break}}}})}const eH=4;function En(e){if(e)return k$e(e)}function k$e(e){for(var t in En.prototype)e[t]=En.prototype[t];return e}En.prototype.on=En.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};En.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};En.prototype.off=En.prototype.removeListener=En.prototype.removeAllListeners=En.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function tH(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const I$e=qi.setTimeout,M$e=qi.clearTimeout;function E2(e,t){t.useNativeTimers?(e.setTimeoutFn=I$e.bind(qi),e.clearTimeoutFn=M$e.bind(qi)):(e.setTimeoutFn=qi.setTimeout.bind(qi),e.clearTimeoutFn=qi.clearTimeout.bind(qi))}const R$e=1.33;function O$e(e){return typeof e=="string"?$$e(e):Math.ceil((e.byteLength||e.size)*R$e)}function $$e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function N$e(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function D$e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function rH(){const e=VR(+new Date);return e!==zR?(BR=0,zR=e):e+"."+VR(BR++)}for(;wy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T$e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,E$e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=rH()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new qd(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let qd=class mv extends En{constructor(t,n){super(),E2(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=tH(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new oH(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=mv.requestsCount++,mv.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=z$e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete mv.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};qd.requestsCount=0;qd.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jR);else if(typeof addEventListener=="function"){const e="onpagehide"in qi?"pagehide":"unload";addEventListener(e,jR,!1)}}function jR(){for(let e in qd.requests)qd.requests.hasOwnProperty(e)&&qd.requests[e].abort()}const $A=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Cy=qi.WebSocket||qi.MozWebSocket,UR=!0,U$e="arraybuffer",GR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class G$e extends OA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=GR?{}:tH(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=UR&&!GR?n?new Cy(t,n):new Cy(t):new Cy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{UR&&this.ws.send(o)}catch{}i&&$A(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=rH()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!Cy}}class H$e extends OA{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=P$e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=A$e();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),o())}).catch(s=>{})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&$A(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const q$e={websocket:G$e,webtransport:H$e,polling:j$e},W$e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K$e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function G3(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=W$e.exec(e||""),o={},a=14;for(;a--;)o[K$e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=X$e(o,o.path),o.queryKey=Q$e(o,o.query),o}function X$e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q$e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let aH=class Xc extends En{constructor(t,n={}){super(),this.binaryType=U$e,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=G3(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=G3(n.host).host),E2(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=D$e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=eH,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new q$e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Xc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Xc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const a=d=>{const f=new Error("probe error: "+d);f.transport=n.name,o(),this.emitReserved("upgradeError",f)};function s(){a("transport closed")}function l(){a("socket closed")}function u(d){n&&d.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Xc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Xc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,sH=Object.prototype.toString,eNe=typeof Blob=="function"||typeof Blob<"u"&&sH.call(Blob)==="[object BlobConstructor]",tNe=typeof File=="function"||typeof File<"u"&&sH.call(File)==="[object FileConstructor]";function NA(e){return Z$e&&(e instanceof ArrayBuffer||J$e(e))||eNe&&e instanceof Blob||tNe&&e instanceof File}function yv(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(o),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((a,s)=>r?a?o(a):i(s):i(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ze.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Wf.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Wf.prototype.reset=function(){this.attempts=0};Wf.prototype.setMin=function(e){this.ms=e};Wf.prototype.setMax=function(e){this.max=e};Wf.prototype.setJitter=function(e){this.jitter=e};class W3 extends En{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,E2(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Wf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||lNe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new aH(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=bo(n,"open",function(){r.onopen(),t&&t()}),o=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=bo(n,"error",o);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(bo(t,"ping",this.onping.bind(this)),bo(t,"data",this.ondata.bind(this)),bo(t,"error",this.onerror.bind(this)),bo(t,"close",this.onclose.bind(this)),bo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){$A(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new lH(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $h={};function vv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Y$e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=$h[i]&&o in $h[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new W3(r,t):($h[i]||($h[i]=new W3(r,t)),l=$h[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(vv,{Manager:W3,Socket:lH,io:vv,connect:vv});const qR=()=>{let e=!1,n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`;const r={timeout:6e4,path:"/ws/socket.io",autoConnect:!1};if(["nodes","package"].includes("production")){const a=vg.get();a&&(n=a.replace(/^https?\:\/\//i,""));const s=yg.get();s&&(r.auth={token:s}),r.transports=["websocket","polling"]}const i=vv(n,r);return a=>s=>l=>{e||(_$e({storeApi:a,socket:i}),e=!0,i.connect()),s(l)}},cNe=""+new URL("logo-13003d72.png",import.meta.url).href,dNe=()=>oe.jsxs(sA,{position:"relative",width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#151519",children:[oe.jsx(aA,{src:cNe,w:"8rem",h:"8rem"}),oe.jsx(rA,{label:"Loading",color:"grey",position:"absolute",size:"sm",width:"24px !important",height:"24px !important",right:"1.5rem",bottom:"1.5rem"})]}),fNe=k.memo(dNe);function K3(e){"@babel/helpers - typeof";return K3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K3(e)}var uH=[],hNe=uH.forEach,pNe=uH.slice;function X3(e){return hNe.call(pNe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function cH(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":K3(XMLHttpRequest))==="object"}function gNe(e){return!!e&&typeof e.then=="function"}function mNe(e){return gNe(e)?e:Promise.resolve(e)}function yNe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Q3={exports:{}},Ey={exports:{}},WR;function vNe(){return WR||(WR=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof He<"u"&&He,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s=typeof o<"u"&&o||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(A){return A&&DataView.prototype.isPrototypeOf(A)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(A){return A&&c.indexOf(Object.prototype.toString.call(A))>-1};function f(A){if(typeof A!="string"&&(A=String(A)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(A)||A==="")throw new TypeError('Invalid character in header field name: "'+A+'"');return A.toLowerCase()}function h(A){return typeof A!="string"&&(A=String(A)),A}function p(A){var R={next:function(){var D=A.shift();return{done:D===void 0,value:D}}};return l.iterable&&(R[Symbol.iterator]=function(){return R}),R}function g(A){this.map={},A instanceof g?A.forEach(function(R,D){this.append(D,R)},this):Array.isArray(A)?A.forEach(function(R){this.append(R[0],R[1])},this):A&&Object.getOwnPropertyNames(A).forEach(function(R){this.append(R,A[R])},this)}g.prototype.append=function(A,R){A=f(A),R=h(R);var D=this.map[A];this.map[A]=D?D+", "+R:R},g.prototype.delete=function(A){delete this.map[f(A)]},g.prototype.get=function(A){return A=f(A),this.has(A)?this.map[A]:null},g.prototype.has=function(A){return this.map.hasOwnProperty(f(A))},g.prototype.set=function(A,R){this.map[f(A)]=h(R)},g.prototype.forEach=function(A,R){for(var D in this.map)this.map.hasOwnProperty(D)&&A.call(R,this.map[D],D,this)},g.prototype.keys=function(){var A=[];return this.forEach(function(R,D){A.push(D)}),p(A)},g.prototype.values=function(){var A=[];return this.forEach(function(R){A.push(R)}),p(A)},g.prototype.entries=function(){var A=[];return this.forEach(function(R,D){A.push([D,R])}),p(A)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function _(A){if(A.bodyUsed)return Promise.reject(new TypeError("Already read"));A.bodyUsed=!0}function b(A){return new Promise(function(R,D){A.onload=function(){R(A.result)},A.onerror=function(){D(A.error)}})}function y(A){var R=new FileReader,D=b(R);return R.readAsArrayBuffer(A),D}function m(A){var R=new FileReader,D=b(R);return R.readAsText(A),D}function v(A){for(var R=new Uint8Array(A),D=new Array(R.length),$=0;$-1?R:A}function P(A,R){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var D=R.body;if(A instanceof P){if(A.bodyUsed)throw new TypeError("Already read");this.url=A.url,this.credentials=A.credentials,R.headers||(this.headers=new g(A.headers)),this.method=A.method,this.mode=A.mode,this.signal=A.signal,!D&&A._bodyInit!=null&&(D=A._bodyInit,A.bodyUsed=!0)}else this.url=String(A);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new g(R.headers)),this.method=x(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(D),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var $=/([?&])_=[^&]*/;if($.test(this.url))this.url=this.url.replace($,"$1_="+new Date().getTime());else{var L=/\?/;this.url+=(L.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function E(A){var R=new FormData;return A.trim().split("&").forEach(function(D){if(D){var $=D.split("="),L=$.shift().replace(/\+/g," "),O=$.join("=").replace(/\+/g," ");R.append(decodeURIComponent(L),decodeURIComponent(O))}}),R}function I(A){var R=new g,D=A.replace(/\r?\n[\t ]+/g," ");return D.split("\r").map(function($){return $.indexOf(` -`)===0?$.substr(1,$.length):$}).forEach(function($){var L=$.split(":"),O=L.shift().trim();if(O){var B=L.join(":").trim();R.append(O,B)}}),R}w.call(P.prototype);function N(A,R){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new g(R.headers),this.url=R.url||"",this._initBody(A)}w.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},N.error=function(){var A=new N(null,{status:0,statusText:""});return A.type="error",A};var M=[301,302,303,307,308];N.redirect=function(A,R){if(M.indexOf(R)===-1)throw new RangeError("Invalid status code");return new N(null,{status:R,headers:{location:A}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(R,D){this.message=R,this.name=D;var $=Error(R);this.stack=$.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function T(A,R){return new Promise(function(D,$){var L=new P(A,R);if(L.signal&&L.signal.aborted)return $(new a.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function B(){O.abort()}O.onload=function(){var j={status:O.status,statusText:O.statusText,headers:I(O.getAllResponseHeaders()||"")};j.url="responseURL"in O?O.responseURL:j.headers.get("X-Request-URL");var q="response"in O?O.response:O.responseText;setTimeout(function(){D(new N(q,j))},0)},O.onerror=function(){setTimeout(function(){$(new TypeError("Network request failed"))},0)},O.ontimeout=function(){setTimeout(function(){$(new TypeError("Network request failed"))},0)},O.onabort=function(){setTimeout(function(){$(new a.DOMException("Aborted","AbortError"))},0)};function U(j){try{return j===""&&s.location.href?s.location.href:j}catch{return j}}O.open(L.method,U(L.url),!0),L.credentials==="include"?O.withCredentials=!0:L.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&(l.blob?O.responseType="blob":l.arrayBuffer&&L.headers.get("Content-Type")&&L.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(O.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof g)?Object.getOwnPropertyNames(R.headers).forEach(function(j){O.setRequestHeader(j,h(R.headers[j]))}):L.headers.forEach(function(j,q){O.setRequestHeader(q,j)}),L.signal&&(L.signal.addEventListener("abort",B),O.onreadystatechange=function(){O.readyState===4&&L.signal.removeEventListener("abort",B)}),O.send(typeof L._bodyInit>"u"?null:L._bodyInit)})}return T.polyfill=!0,s.fetch||(s.fetch=T,s.Headers=g,s.Request=P,s.Response=N),a.Headers=g,a.Request=P,a.Response=N,a.fetch=T,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Ey,Ey.exports)),Ey.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof He<"u"&&He.fetch?n=He.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof yNe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||vNe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Q3,Q3.exports);var dH=Q3.exports;const fH=Bl(dH),KR=gO({__proto__:null,default:fH},[dH]);function pb(e){"@babel/helpers - typeof";return pb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pb(e)}var ls;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?ls=global.fetch:typeof window<"u"&&window.fetch?ls=window.fetch:ls=fetch);var Wg;cH()&&(typeof global<"u"&&global.XMLHttpRequest?Wg=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Wg=window.XMLHttpRequest));var gb;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?gb=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(gb=window.ActiveXObject));!ls&&KR&&!Wg&&!gb&&(ls=fH||KR);typeof ls!="function"&&(ls=void 0);var Y3=function(t,n){if(n&&pb(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},XR=function(t,n,r){var i=function(a){if(!a.ok)return r(a.statusText||"Error",{status:a.status});a.text().then(function(s){r(null,{status:a.status,data:s})}).catch(r)};typeof fetch=="function"?fetch(t,n).then(i).catch(r):ls(t,n).then(i).catch(r)},QR=!1,bNe=function(t,n,r,i){t.queryStringParams&&(n=Y3(n,t.queryStringParams));var o=X3({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=X3({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},QR?{}:a);try{XR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),XR(n,s,i),QR=!0}catch(u){i(u)}}},_Ne=function(t,n,r,i){r&&pb(r)==="object"&&(r=Y3("",r).slice(1)),t.queryStringParams&&(n=Y3(n,t.queryStringParams));try{var o;Wg?o=new Wg:o=new gb("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},SNe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},ls&&n.indexOf("file:")!==0)return bNe(t,n,r,i);if(cH()||typeof ActiveXObject=="function")return _Ne(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Kg(e){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kg(e)}function xNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};xNe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return wNe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=X3(i,this.options||{},TNe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=mNe(l),l.then(function(u){if(!u)return a(null,{});var c=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(c,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this,s=typeof i=="string"?[i]:i,l=typeof o=="string"?[o]:o,u=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,u,function(c,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&c&&c.message&&c.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+c.message,!0);if(c)return r(c,!1);var f,h;try{typeof d.data=="string"?f=a.options.parse(d.data,i,o):f=d.data}catch{h="failed parsing "+n+" to json"}if(h)return r(h,!1);r(null,f)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,c=[],d=[];n.forEach(function(f){var h=s.options.addPath;typeof s.options.addPath=="function"&&(h=s.options.addPath(f,r));var p=s.services.interpolator.interpolate(h,{lng:f,ns:r});s.options.request(s.options,p,l,function(g,_){u+=1,c.push(g),d.push(_),u===n.length&&typeof a=="function"&&a(c,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(d){var f=o.toResolveHierarchy(d);f.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(d){i.read(c,d,"read",null,null,function(f,h){f&&a.warn("loading namespace ".concat(d," for language ").concat(c," failed"),f),!f&&h&&a.log("loaded namespace ".concat(d," for language ").concat(c),h),i.loaded("".concat(c,"|").concat(d),f,h)})})})}}}]),e}();pH.type="backend";de.use(pH).use(W7e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const T2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function LA(e){return"nodeType"in e}function zr(e){var t,n;return e?Kf(e)?e:LA(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function FA(e){const{Document:t}=zr(e);return e instanceof t}function Wm(e){return Kf(e)?!1:e instanceof zr(e).HTMLElement}function gH(e){return e instanceof zr(e).SVGElement}function Xf(e){return e?Kf(e)?e.document:LA(e)?FA(e)?e:Wm(e)||gH(e)?e.ownerDocument:document:document:document}const Ea=T2?k.useLayoutEffect:k.useEffect;function A2(e){const t=k.useRef(e);return Ea(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{e.current=setInterval(r,i)},[]),n=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Xg(e,t){t===void 0&&(t=[e]);const n=k.useRef(e);return Ea(()=>{n.current!==e&&(n.current=e)},t),n}function Km(e,t){const n=k.useRef();return k.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function mb(e){const t=A2(e),n=k.useRef(null),r=k.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function yb(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}let tC={};function P2(e,t){return k.useMemo(()=>{if(t)return t;const n=tC[e]==null?0:tC[e]+1;return tC[e]=n,e+"-"+n},[e,t])}function mH(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const s=Object.entries(a);for(const[l,u]of s){const c=o[l];c!=null&&(o[l]=c+e*u)}return o},{...t})}}const Wd=mH(1),vb=mH(-1);function PNe(e){return"clientX"in e&&"clientY"in e}function BA(e){if(!e)return!1;const{KeyboardEvent:t}=zr(e.target);return t&&e instanceof t}function kNe(e){if(!e)return!1;const{TouchEvent:t}=zr(e.target);return t&&e instanceof t}function Qg(e){if(kNe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return PNe(e)?{x:e.clientX,y:e.clientY}:null}const Yg=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Yg.Translate.toString(e),Yg.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ZR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function INe(e){return e.matches(ZR)?e:e.querySelector(ZR)}const MNe={display:"none"};function RNe(e){let{id:t,value:n}=e;return J.createElement("div",{id:t,style:MNe},n)}function ONe(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return J.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function $Ne(){const[e,t]=k.useState("");return{announce:k.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yH=k.createContext(null);function NNe(e){const t=k.useContext(yH);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function DNe(){const[e]=k.useState(()=>new Set),t=k.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[k.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const LNe={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},FNe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function BNe(e){let{announcements:t=FNe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=LNe}=e;const{announce:o,announcement:a}=$Ne(),s=P2("DndLiveRegion"),[l,u]=k.useState(!1);if(k.useEffect(()=>{u(!0)},[]),NNe(k.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const c=J.createElement(J.Fragment,null,J.createElement(RNe,{id:r,value:i.draggable}),J.createElement(ONe,{id:s,announcement:a}));return n?mi.createPortal(c,n):c}var kn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(kn||(kn={}));function bb(){}function JR(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function zNe(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Fo=Object.freeze({x:0,y:0});function VNe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jNe(e,t){const n=Qg(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function UNe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function GNe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function HNe(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function qNe(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function WNe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=WNe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(GNe)};function XNe(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const QNe=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const o of t){const{id:a}=o,s=n.get(a);if(s&&XNe(r,s)){const u=HNe(s).reduce((d,f)=>d+VNe(r,f),0),c=Number((u/4).toFixed(4));i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(UNe)};function YNe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function vH(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Fo}function ZNe(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const JNe=ZNe(1);function bH(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function eDe(e,t,n){const r=bH(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}const tDe={ignoreTransform:!1};function Xm(e,t){t===void 0&&(t=tDe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:c}=zr(e).getComputedStyle(e);u&&(n=eDe(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function eO(e){return Xm(e,{ignoreTransform:!0})}function nDe(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function rDe(e,t){return t===void 0&&(t=zr(e).getComputedStyle(e)),t.position==="fixed"}function iDe(e,t){t===void 0&&(t=zr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function zA(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(FA(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Wm(i)||gH(i)||n.includes(i))return n;const o=zr(e).getComputedStyle(i);return i!==e&&iDe(i,o)&&n.push(i),rDe(i,o)?n:r(i.parentNode)}return e?r(e):n}function _H(e){const[t]=zA(e,1);return t??null}function nC(e){return!T2||!e?null:Kf(e)?e:LA(e)?FA(e)||e===Xf(e).scrollingElement?window:Wm(e)?e:null:null}function SH(e){return Kf(e)?e.scrollX:e.scrollLeft}function xH(e){return Kf(e)?e.scrollY:e.scrollTop}function Z3(e){return{x:SH(e),y:xH(e)}}var jn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(jn||(jn={}));function wH(e){return!T2||!e?!1:e===document.scrollingElement}function CH(e){const t={x:0,y:0},n=wH(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const oDe={x:.2,y:.2};function aDe(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=oDe);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=CH(e),h={x:0,y:0},p={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(h.y=jn.Backward,p.y=r*Math.abs((t.top+g.height-o)/g.height)):!c&&l>=t.bottom-g.height&&(h.y=jn.Forward,p.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!f&&s>=t.right-g.width?(h.x=jn.Forward,p.x=r*Math.abs((t.right-g.width-s)/g.width)):!d&&a<=t.left+g.width&&(h.x=jn.Backward,p.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:h,speed:p}}function sDe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function EH(e){return e.reduce((t,n)=>Wd(t,Z3(n)),Fo)}function lDe(e){return e.reduce((t,n)=>t+SH(n),0)}function uDe(e){return e.reduce((t,n)=>t+xH(n),0)}function TH(e,t){if(t===void 0&&(t=Xm),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_H(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cDe=[["x",["left","right"],lDe],["y",["top","bottom"],uDe]];class VA{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zA(n),i=EH(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of cDe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(r),c=i[o]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ep{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function dDe(e){const{EventTarget:t}=zr(e);return e instanceof t?e:Xf(e)}function rC(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Ui;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ui||(Ui={}));function tO(e){e.preventDefault()}function fDe(e){e.stopPropagation()}var Pt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Pt||(Pt={}));const AH={start:[Pt.Space,Pt.Enter],cancel:[Pt.Esc],end:[Pt.Space,Pt.Enter]},hDe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Pt.Right:return{...n,x:n.x+25};case Pt.Left:return{...n,x:n.x-25};case Pt.Down:return{...n,y:n.y+25};case Pt.Up:return{...n,y:n.y-25}}};class PH{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ep(Xf(n)),this.windowListeners=new Ep(zr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ui.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&TH(r),n(Fo)}handleKeyDown(t){if(BA(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=AH,coordinateGetter:a=hDe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,c=u?{x:u.left,y:u.top}:Fo;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(t,{active:n,context:r.current,currentCoordinates:c});if(d){const f=vb(d,c),h={x:0,y:0},{scrollableAncestors:p}=r.current;for(const g of p){const _=t.code,{isTop:b,isRight:y,isLeft:m,isBottom:v,maxScroll:S,minScroll:w}=CH(g),C=sDe(g),x={x:Math.min(_===Pt.Right?C.right-C.width/2:C.right,Math.max(_===Pt.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(_===Pt.Down?C.bottom-C.height/2:C.bottom,Math.max(_===Pt.Down?C.top:C.top+C.height/2,d.y))},P=_===Pt.Right&&!y||_===Pt.Left&&!m,E=_===Pt.Down&&!v||_===Pt.Up&&!b;if(P&&x.x!==d.x){const I=g.scrollLeft+f.x,N=_===Pt.Right&&I<=S.x||_===Pt.Left&&I>=w.x;if(N&&!f.y){g.scrollTo({left:I,behavior:s});return}N?h.x=g.scrollLeft-I:h.x=_===Pt.Right?g.scrollLeft-S.x:g.scrollLeft-w.x,h.x&&g.scrollBy({left:-h.x,behavior:s});break}else if(E&&x.y!==d.y){const I=g.scrollTop+f.y,N=_===Pt.Down&&I<=S.y||_===Pt.Up&&I>=w.y;if(N&&!f.x){g.scrollTo({top:I,behavior:s});return}N?h.y=g.scrollTop-I:h.y=_===Pt.Down?g.scrollTop-S.y:g.scrollTop-w.y,h.y&&g.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Wd(vb(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}PH.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=AH,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function nO(e){return!!(e&&"distance"in e)}function rO(e){return!!(e&&"delay"in e)}class jA{constructor(t,n,r){var i;r===void 0&&(r=dDe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=Xf(a),this.documentListeners=new Ep(this.document),this.listeners=new Ep(r),this.windowListeners=new Ep(zr(a)),this.initialCoordinates=(i=Qg(o))!=null?i:Fo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.DragStart,tO),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),this.windowListeners.add(Ui.ContextMenu,tO),this.documentListeners.add(Ui.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(rO(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(nO(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ui.Click,fDe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ui.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=Qg(t))!=null?n:Fo,u=vb(i,l);if(!r&&s){if(nO(s)){if(s.tolerance!=null&&rC(u,s.tolerance))return this.handleCancel();if(rC(u,s.distance))return this.handleStart()}return rO(s)&&rC(u,s.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Pt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const pDe={move:{name:"pointermove"},end:{name:"pointerup"}};class kH extends jA{constructor(t){const{event:n}=t,r=Xf(n.target);super(t,pDe,r)}}kH.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const gDe={move:{name:"mousemove"},end:{name:"mouseup"}};var J3;(function(e){e[e.RightClick=2]="RightClick"})(J3||(J3={}));class IH extends jA{constructor(t){super(t,gDe,Xf(t.event.target))}}IH.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===J3.RightClick?!1:(r==null||r({event:n}),!0)}}];const iC={move:{name:"touchmove"},end:{name:"touchend"}};class MH extends jA{constructor(t){super(t,iC)}static setup(){return window.addEventListener(iC.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(iC.move.name,t)};function t(){}}}MH.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Tp;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Tp||(Tp={}));var _b;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_b||(_b={}));function mDe(e){let{acceleration:t,activator:n=Tp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=_b.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=e;const h=vDe({delta:d,disabled:!o}),[p,g]=ANe(),_=k.useRef({x:0,y:0}),b=k.useRef({x:0,y:0}),y=k.useMemo(()=>{switch(n){case Tp.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Tp.DraggableRect:return i}},[n,i,l]),m=k.useRef(null),v=k.useCallback(()=>{const w=m.current;if(!w)return;const C=_.current.x*b.current.x,x=_.current.y*b.current.y;w.scrollBy(C,x)},[]),S=k.useMemo(()=>s===_b.TreeOrder?[...u].reverse():u,[s,u]);k.useEffect(()=>{if(!o||!u.length||!y){g();return}for(const w of S){if((r==null?void 0:r(w))===!1)continue;const C=u.indexOf(w),x=c[C];if(!x)continue;const{direction:P,speed:E}=aDe(w,x,y,t,f);for(const I of["x","y"])h[I][P[I]]||(E[I]=0,P[I]=0);if(E.x>0||E.y>0){g(),m.current=w,p(v,a),_.current=E,b.current=P;return}}_.current={x:0,y:0},b.current={x:0,y:0},g()},[t,v,r,g,o,a,JSON.stringify(y),JSON.stringify(h),p,u,S,c,JSON.stringify(f)])}const yDe={x:{[jn.Backward]:!1,[jn.Forward]:!1},y:{[jn.Backward]:!1,[jn.Forward]:!1}};function vDe(e){let{delta:t,disabled:n}=e;const r=yb(t);return Km(i=>{if(n||!r||!i)return yDe;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[jn.Backward]:i.x[jn.Backward]||o.x===-1,[jn.Forward]:i.x[jn.Forward]||o.x===1},y:{[jn.Backward]:i.y[jn.Backward]||o.y===-1,[jn.Forward]:i.y[jn.Forward]||o.y===1}}},[n,t,r])}function bDe(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Km(i=>{var o;return t===null?null:(o=r??i)!=null?o:null},[r,t])}function _De(e,t){return k.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Zg;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Zg||(Zg={}));var e4;(function(e){e.Optimized="optimized"})(e4||(e4={}));const iO=new Map;function SDe(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=k.useState(null),{frequency:s,measure:l,strategy:u}=i,c=k.useRef(e),d=_(),f=Xg(d),h=k.useCallback(function(b){b===void 0&&(b=[]),!f.current&&a(y=>y===null?b:y.concat(b.filter(m=>!y.includes(m))))},[f]),p=k.useRef(null),g=Km(b=>{if(d&&!n)return iO;if(!b||b===iO||c.current!==e||o!=null){const y=new Map;for(let m of e){if(!m)continue;if(o&&o.length>0&&!o.includes(m.id)&&m.rect.current){y.set(m.id,m.rect.current);continue}const v=m.node.current,S=v?new VA(l(v),v):null;m.rect.current=S,S&&y.set(m.id,S)}return y}return b},[e,o,n,d,l]);return k.useEffect(()=>{c.current=e},[e]),k.useEffect(()=>{d||h()},[n,d]),k.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),k.useEffect(()=>{d||typeof s!="number"||p.current!==null||(p.current=setTimeout(()=>{h(),p.current=null},s))},[s,d,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:o!=null};function _(){switch(u){case Zg.Always:return!1;case Zg.BeforeDragging:return n;default:return!n}}}function UA(e,t){return Km(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function xDe(e,t){return UA(e,t)}function wDe(e){let{callback:t,disabled:n}=e;const r=A2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function k2(e){let{callback:t,disabled:n}=e;const r=A2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function CDe(e){return new VA(Xm(e),e)}function oO(e,t,n){t===void 0&&(t=CDe);const[r,i]=k.useReducer(s,null),o=wDe({callback(l){if(e)for(const u of l){const{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=k2({callback:i});return Ea(()=>{i(),e?(a==null||a.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c}}function EDe(e){const t=UA(e);return vH(e,t)}const aO=[];function TDe(e){const t=k.useRef(e),n=Km(r=>e?r&&r!==aO&&e&&t.current&&e.parentNode===t.current.parentNode?r:zA(e):aO,[e]);return k.useEffect(()=>{t.current=e},[e]),n}function ADe(e){const[t,n]=k.useState(null),r=k.useRef(e),i=k.useCallback(o=>{const a=nC(o.target);a&&n(s=>s?(s.set(a,Z3(a)),new Map(s)):null)},[]);return k.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const u=nC(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Z3(u)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=nC(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),k.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Wd(o,a),Fo):EH(e):Fo,[e,t])}function sO(e,t){t===void 0&&(t=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},t),k.useEffect(()=>{const r=e!==Fo;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?vb(e,n.current):Fo}function PDe(e){k.useEffect(()=>{if(!T2)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function kDe(e,t){return k.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function RH(e){return k.useMemo(()=>e?nDe(e):null,[e])}const oC=[];function IDe(e,t){t===void 0&&(t=Xm);const[n]=e,r=RH(n?zr(n):null),[i,o]=k.useReducer(s,oC),a=k2({callback:o});return e.length>0&&i===oC&&o(),Ea(()=>{e.length?e.forEach(l=>a==null?void 0:a.observe(l)):(a==null||a.disconnect(),o())},[e]),i;function s(){return e.length?e.map(l=>wH(l)?r:new VA(t(l),l)):oC}}function OH(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Wm(t)?t:e}function MDe(e){let{measure:t}=e;const[n,r]=k.useState(null),i=k.useCallback(u=>{for(const{target:c}of u)if(Wm(c)){r(d=>{const f=t(c);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),o=k2({callback:i}),a=k.useCallback(u=>{const c=OH(u);o==null||o.disconnect(),c&&(o==null||o.observe(c)),r(c?t(c):null)},[t,o]),[s,l]=mb(a);return k.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const RDe=[{sensor:kH,options:{}},{sensor:PH,options:{}}],ODe={current:{}},bv={draggable:{measure:eO},droppable:{measure:eO,strategy:Zg.WhileDragging,frequency:e4.Optimized},dragOverlay:{measure:Xm}};class Ap extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const $De={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ap,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bv,measureDroppableContainers:bb,windowRect:null,measuringScheduled:!1},$H={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bb,draggableNodes:new Map,over:null,measureDroppableContainers:bb},Qm=k.createContext($H),NH=k.createContext($De);function NDe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ap}}}function DDe(e,t){switch(t.type){case kn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case kn.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case kn.DragEnd:case kn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case kn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ap(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case kn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Ap(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case kn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ap(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function LDe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=k.useContext(Qm),o=yb(r),a=yb(n==null?void 0:n.id);return k.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!BA(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const d=INe(c);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function DH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function FDe(e){return k.useMemo(()=>({draggable:{...bv.draggable,...e==null?void 0:e.draggable},droppable:{...bv.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bv.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function BDe(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=k.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Ea(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const c=n(u),d=vH(c,r);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=_H(u);f&&f.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const I2=k.createContext({...Fo,scaleX:1,scaleY:1});var Xs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Xs||(Xs={}));const zDe=k.memo(function(t){var n,r,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:c=RDe,collisionDetection:d=KNe,measuring:f,modifiers:h,...p}=t;const g=k.useReducer(DDe,void 0,NDe),[_,b]=g,[y,m]=DNe(),[v,S]=k.useState(Xs.Uninitialized),w=v===Xs.Initialized,{draggable:{active:C,nodes:x,translate:P},droppable:{containers:E}}=_,I=C?x.get(C):null,N=k.useRef({initial:null,translated:null}),M=k.useMemo(()=>{var Xt;return C!=null?{id:C,data:(Xt=I==null?void 0:I.data)!=null?Xt:ODe,rect:N}:null},[C,I]),T=k.useRef(null),[A,R]=k.useState(null),[D,$]=k.useState(null),L=Xg(p,Object.values(p)),O=P2("DndDescribedBy",a),B=k.useMemo(()=>E.getEnabled(),[E]),U=FDe(f),{droppableRects:j,measureDroppableContainers:q,measuringScheduled:Y}=SDe(B,{dragging:w,dependencies:[P.x,P.y],config:U.droppable}),Z=bDe(x,C),V=k.useMemo(()=>D?Qg(D):null,[D]),K=nu(),ee=xDe(Z,U.draggable.measure);BDe({activeNode:C?x.get(C):null,config:K.layoutShiftCompensation,initialRect:ee,measure:U.draggable.measure});const re=oO(Z,U.draggable.measure,ee),fe=oO(Z?Z.parentElement:null),Se=k.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:x,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=E.getNodeFor((n=Se.current.over)==null?void 0:n.id),De=MDe({measure:U.dragOverlay.measure}),Ee=(r=De.nodeRef.current)!=null?r:Z,tt=w?(i=De.rect)!=null?i:re:null,ot=!!(De.nodeRef.current&&De.rect),xe=EDe(ot?null:re),Xn=RH(Ee?zr(Ee):null),Vt=TDe(w?Me??Z:null),$t=IDe(Vt),xt=DH(h,{transform:{x:P.x-xe.x,y:P.y-xe.y,scaleX:1,scaleY:1},activatorEvent:D,active:M,activeNodeRect:re,containerNodeRect:fe,draggingNodeRect:tt,over:Se.current.over,overlayNodeRect:De.rect,scrollableAncestors:Vt,scrollableAncestorRects:$t,windowRect:Xn}),bn=V?Wd(V,P):null,Vr=ADe(Vt),co=sO(Vr),Mi=sO(Vr,[re]),ur=Wd(xt,co),Qn=tt?JNe(tt,xt):null,xr=M&&Qn?d({active:M,collisionRect:Qn,droppableRects:j,droppableContainers:B,pointerCoordinates:bn}):null,rn=qNe(xr,"id"),[Nt,li]=k.useState(null),Ri=ot?xt:Wd(xt,Mi),fo=YNe(Ri,(o=Nt==null?void 0:Nt.rect)!=null?o:null,re),jr=k.useCallback((Xt,wt)=>{let{sensor:Yn,options:Nn}=wt;if(T.current==null)return;const cr=x.get(T.current);if(!cr)return;const wr=Xt.nativeEvent,Ur=new Yn({active:T.current,activeNode:cr,event:wr,options:Nn,context:Se,onStart(Cr){const Zn=T.current;if(Zn==null)return;const Ra=x.get(Zn);if(!Ra)return;const{onDragStart:Is}=L.current,Ms={active:{id:Zn,data:Ra.data,rect:N}};mi.unstable_batchedUpdates(()=>{Is==null||Is(Ms),S(Xs.Initializing),b({type:kn.DragStart,initialCoordinates:Cr,active:Zn}),y({type:"onDragStart",event:Ms})})},onMove(Cr){b({type:kn.DragMove,coordinates:Cr})},onEnd:Uo(kn.DragEnd),onCancel:Uo(kn.DragCancel)});mi.unstable_batchedUpdates(()=>{R(Ur),$(Xt.nativeEvent)});function Uo(Cr){return async function(){const{active:Ra,collisions:Is,over:Ms,scrollAdjustedTranslate:Cc}=Se.current;let Oa=null;if(Ra&&Cc){const{cancelDrop:Er}=L.current;Oa={activatorEvent:wr,active:Ra,collisions:Is,delta:Cc,over:Ms},Cr===kn.DragEnd&&typeof Er=="function"&&await Promise.resolve(Er(Oa))&&(Cr=kn.DragCancel)}T.current=null,mi.unstable_batchedUpdates(()=>{b({type:Cr}),S(Xs.Uninitialized),li(null),R(null),$(null);const Er=Cr===kn.DragEnd?"onDragEnd":"onDragCancel";if(Oa){const ru=L.current[Er];ru==null||ru(Oa),y({type:Er,event:Oa})}})}}},[x]),_n=k.useCallback((Xt,wt)=>(Yn,Nn)=>{const cr=Yn.nativeEvent,wr=x.get(Nn);if(T.current!==null||!wr||cr.dndKit||cr.defaultPrevented)return;const Ur={active:wr};Xt(Yn,wt.options,Ur)===!0&&(cr.dndKit={capturedBy:wt.sensor},T.current=Nn,jr(Yn,wt))},[x,jr]),ui=_De(c,_n);PDe(c),Ea(()=>{re&&v===Xs.Initializing&&S(Xs.Initialized)},[re,v]),k.useEffect(()=>{const{onDragMove:Xt}=L.current,{active:wt,activatorEvent:Yn,collisions:Nn,over:cr}=Se.current;if(!wt||!Yn)return;const wr={active:wt,activatorEvent:Yn,collisions:Nn,delta:{x:ur.x,y:ur.y},over:cr};mi.unstable_batchedUpdates(()=>{Xt==null||Xt(wr),y({type:"onDragMove",event:wr})})},[ur.x,ur.y]),k.useEffect(()=>{const{active:Xt,activatorEvent:wt,collisions:Yn,droppableContainers:Nn,scrollAdjustedTranslate:cr}=Se.current;if(!Xt||T.current==null||!wt||!cr)return;const{onDragOver:wr}=L.current,Ur=Nn.get(rn),Uo=Ur&&Ur.rect.current?{id:Ur.id,rect:Ur.rect.current,data:Ur.data,disabled:Ur.disabled}:null,Cr={active:Xt,activatorEvent:wt,collisions:Yn,delta:{x:cr.x,y:cr.y},over:Uo};mi.unstable_batchedUpdates(()=>{li(Uo),wr==null||wr(Cr),y({type:"onDragOver",event:Cr})})},[rn]),Ea(()=>{Se.current={activatorEvent:D,active:M,activeNode:Z,collisionRect:Qn,collisions:xr,droppableRects:j,draggableNodes:x,draggingNode:Ee,draggingNodeRect:tt,droppableContainers:E,over:Nt,scrollableAncestors:Vt,scrollAdjustedTranslate:ur},N.current={initial:tt,translated:Qn}},[M,Z,xr,Qn,x,Ee,tt,j,E,Nt,Vt,ur]),mDe({...K,delta:P,draggingRect:Qn,pointerCoordinates:bn,scrollableAncestors:Vt,scrollableAncestorRects:$t});const tu=k.useMemo(()=>({active:M,activeNode:Z,activeNodeRect:re,activatorEvent:D,collisions:xr,containerNodeRect:fe,dragOverlay:De,draggableNodes:x,droppableContainers:E,droppableRects:j,over:Nt,measureDroppableContainers:q,scrollableAncestors:Vt,scrollableAncestorRects:$t,measuringConfiguration:U,measuringScheduled:Y,windowRect:Xn}),[M,Z,re,D,xr,fe,De,x,E,j,Nt,q,Vt,$t,U,Y,Xn]),jo=k.useMemo(()=>({activatorEvent:D,activators:ui,active:M,activeNodeRect:re,ariaDescribedById:{draggable:O},dispatch:b,draggableNodes:x,over:Nt,measureDroppableContainers:q}),[D,ui,M,re,b,O,x,Nt,q]);return J.createElement(yH.Provider,{value:m},J.createElement(Qm.Provider,{value:jo},J.createElement(NH.Provider,{value:tu},J.createElement(I2.Provider,{value:fo},u)),J.createElement(LDe,{disabled:(s==null?void 0:s.restoreFocus)===!1})),J.createElement(BNe,{...s,hiddenTextDescribedById:O}));function nu(){const Xt=(A==null?void 0:A.autoScrollEnabled)===!1,wt=typeof l=="object"?l.enabled===!1:l===!1,Yn=w&&!Xt&&!wt;return typeof l=="object"?{...l,enabled:Yn}:{enabled:Yn}}}),VDe=k.createContext(null),lO="button",jDe="Droppable";function fGe(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=P2(jDe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=k.useContext(Qm),{role:h=lO,roleDescription:p="draggable",tabIndex:g=0}=i??{},_=(l==null?void 0:l.id)===t,b=k.useContext(_?I2:VDe),[y,m]=mb(),[v,S]=mb(),w=kDe(a,t),C=Xg(n);Ea(()=>(d.set(t,{id:t,key:o,node:y,activatorNode:v,data:C}),()=>{const P=d.get(t);P&&P.key===o&&d.delete(t)}),[d,t]);const x=k.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":_&&h===lO?!0:void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[r,h,g,_,p,c.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:x,isDragging:_,listeners:r?void 0:w,node:y,over:f,setNodeRef:m,setActivatorNodeRef:S,transform:b}}function UDe(){return k.useContext(NH)}const GDe="Droppable",HDe={timeout:25};function hGe(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=P2(GDe),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=k.useContext(Qm),c=k.useRef({disabled:n}),d=k.useRef(!1),f=k.useRef(null),h=k.useRef(null),{disabled:p,updateMeasurementsFor:g,timeout:_}={...HDe,...i},b=Xg(g??r),y=k.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),h.current=null},_)},[_]),m=k2({callback:y,disabled:p||!a}),v=k.useCallback((x,P)=>{m&&(P&&(m.unobserve(P),d.current=!1),x&&m.observe(x))},[m]),[S,w]=mb(v),C=Xg(t);return k.useEffect(()=>{!m||!S.current||(m.disconnect(),d.current=!1,m.observe(S.current))},[S,m]),Ea(()=>(s({type:kn.RegisterDroppable,element:{id:r,key:o,disabled:n,node:S,rect:f,data:C}}),()=>s({type:kn.UnregisterDroppable,key:o,id:r})),[r]),k.useEffect(()=>{n!==c.current.disabled&&(s({type:kn.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:f,isOver:(l==null?void 0:l.id)===r,node:S,over:l,setNodeRef:w}}function qDe(e){let{animation:t,children:n}=e;const[r,i]=k.useState(null),[o,a]=k.useState(null),s=yb(n);return!n&&!r&&s&&i(s),Ea(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),J.createElement(J.Fragment,null,n,r?k.cloneElement(r,{ref:a}):null)}const WDe={x:0,y:0,scaleX:1,scaleY:1};function KDe(e){let{children:t}=e;return J.createElement(Qm.Provider,{value:$H},J.createElement(I2.Provider,{value:WDe},t))}const XDe={position:"fixed",touchAction:"none"},QDe=e=>BA(e)?"transform 250ms ease":void 0,YDe=k.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:u,transition:c=QDe}=e;if(!s)return null;const d=i?u:{...u,scaleX:1,scaleY:1},f={...XDe,width:s.width,height:s.height,top:s.top,left:s.left,transform:Yg.Transform.toString(d),transformOrigin:i&&r?jNe(r,s):void 0,transition:typeof c=="function"?c(r):c,...l};return J.createElement(n,{className:a,style:f,ref:t},o)}),ZDe=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},JDe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Yg.Transform.toString(t)},{transform:Yg.Transform.toString(n)}]},eLe={duration:250,easing:"ease",keyframes:JDe,sideEffects:ZDe({styles:{active:{opacity:"0"}}})};function tLe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return A2((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const u=OH(a);if(!u)return;const{transform:c}=zr(a).getComputedStyle(a),d=bH(c);if(!d)return;const f=typeof t=="function"?t:nLe(t);return TH(l,i.draggable.measure),f({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function nLe(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...eLe,...e};return o=>{let{active:a,dragOverlay:s,transform:l,...u}=o;if(!t)return;const c={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},f={x:l.x-c.x,y:l.y-c.y,...d},h=i({...u,active:a,dragOverlay:s,transform:{initial:l,final:f}}),[p]=h,g=h[h.length-1];if(JSON.stringify(p)===JSON.stringify(g))return;const _=r==null?void 0:r({active:a,dragOverlay:s,...u}),b=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{b.onfinish=()=>{_==null||_(),y()}})}}let uO=0;function rLe(e){return k.useMemo(()=>{if(e!=null)return uO++,uO},[e])}const iLe=J.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:u=999}=e;const{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:p,droppableContainers:g,dragOverlay:_,over:b,measuringConfiguration:y,scrollableAncestors:m,scrollableAncestorRects:v,windowRect:S}=UDe(),w=k.useContext(I2),C=rLe(d==null?void 0:d.id),x=DH(a,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:_.rect,over:b,overlayNodeRect:_.rect,scrollableAncestors:m,scrollableAncestorRects:v,transform:w,windowRect:S}),P=UA(f),E=tLe({config:r,draggableNodes:p,droppableContainers:g,measuringConfiguration:y}),I=P?_.setRef:void 0;return J.createElement(KDe,null,J.createElement(qDe,{animation:E},d&&C?J.createElement(YDe,{key:C,id:d.id,ref:I,as:s,activatorEvent:c,adjustScale:t,className:l,transition:o,rect:P,style:{zIndex:u,...i},transform:x},n):null))}),oLe=qn([IA,TA],({nodes:e},t)=>t==="nodes"?e.viewport.zoom:1),aLe=()=>{const e=C2(oLe);return k.useCallback(({activatorEvent:n,draggingNodeRect:r,transform:i})=>{if(r&&n){const o=Qg(n);if(!o)return i;const a=o.x-r.left,s=o.y-r.top,l=i.x+a-r.width/2,u=i.y+s-r.height/2,c=i.scaleX*e,d=i.scaleY*e;return{x:l,y:u,scaleX:c,scaleY:d}}return i},[e])},sLe=e=>{if(!e.pointerCoordinates)return[];const t=document.elementsFromPoint(e.pointerCoordinates.x,e.pointerCoordinates.y),n=e.droppableContainers.filter(r=>r.node.current?t.includes(r.node.current):!1);return QNe({...e,droppableContainers:n})};function lLe(e){return oe.jsx(zDe,{...e})}const Ty=28,cO={w:Ty,h:Ty,maxW:Ty,maxH:Ty,shadow:"dark-lg",borderRadius:"lg",opacity:.3,bg:"base.800",color:"base.50",_dark:{borderColor:"base.200",bg:"base.900",color:"base.100"}},uLe=e=>{if(!e.dragData)return null;if(e.dragData.payloadType==="NODE_FIELD"){const{field:t,fieldTemplate:n}=e.dragData.payload;return oe.jsx(ob,{sx:{position:"relative",p:2,px:3,opacity:.7,bg:"base.300",borderRadius:"base",boxShadow:"dark-lg",whiteSpace:"nowrap",fontSize:"sm"},children:oe.jsx($U,{children:t.label||n.title})})}if(e.dragData.payloadType==="IMAGE_DTO"){const{thumbnail_url:t,width:n,height:r}=e.dragData.payload.imageDTO;return oe.jsx(ob,{sx:{position:"relative",width:"full",height:"full",display:"flex",alignItems:"center",justifyContent:"center"},children:oe.jsx(aA,{sx:{...cO},objectFit:"contain",src:t,width:n,height:r})})}return e.dragData.payloadType==="IMAGE_DTOS"?oe.jsxs(sA,{sx:{position:"relative",alignItems:"center",justifyContent:"center",flexDir:"column",...cO},children:[oe.jsx(A3,{children:e.dragData.payload.imageDTOs.length}),oe.jsx(A3,{size:"sm",children:"Images"})]}):null},cLe=k.memo(uLe),dLe=e=>{const[t,n]=k.useState(null),r=se("images"),i=w2(),o=k.useCallback(d=>{r.trace({dragData:pt(d.active.data.current)},"Drag started");const f=d.active.data.current;f&&n(f)},[r]),a=k.useCallback(d=>{var h;r.trace({dragData:pt(d.active.data.current)},"Drag ended");const f=(h=d.over)==null?void 0:h.data.current;!t||!f||(i(LG({overData:f,activeData:t})),n(null))},[t,i,r]),s=JR(IH,{activationConstraint:{distance:10}}),l=JR(MH,{activationConstraint:{distance:10}}),u=zNe(s,l),c=aLe();return oe.jsxs(lLe,{onDragStart:o,onDragEnd:a,sensors:u,collisionDetection:sLe,autoScroll:!1,children:[e.children,oe.jsx(iLe,{dropAnimation:null,modifiers:[c],style:{width:"min-content",height:"min-content",cursor:"grabbing",userSelect:"none",padding:"10rem"},children:oe.jsx(CU,{children:t&&oe.jsx(xU.div,{layout:!0,initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1,transition:{duration:.1}},children:oe.jsx(cLe,{dragData:t})},"overlay-drag-image")})})]})},fLe=k.memo(dLe),dO=Pa(void 0),fO=Pa(void 0),hLe=k.lazy(()=>k$(()=>import("./App-ecb61195.js"),["./App-ecb61195.js","./MantineProvider-1fe3e660.js","./App-6125620a.css"],import.meta.url)),pLe=k.lazy(()=>k$(()=>import("./ThemeLocaleProvider-d0bb8985.js"),["./ThemeLocaleProvider-d0bb8985.js","./MantineProvider-1fe3e660.js","./ThemeLocaleProvider-f5f9aabf.css"],import.meta.url)),gLe=({apiUrl:e,token:t,config:n,headerComponent:r,middleware:i,projectId:o,queueId:a,selectedImage:s,customStarUi:l})=>(k.useEffect(()=>(t&&yg.set(t),e&&vg.set(e),o&&x1.set(o),a&&Dn.set(a),Wz(),i&&i.length>0?Z5(qR(),...i):Z5(qR()),()=>{vg.set(void 0),yg.set(void 0),x1.set(void 0),Dn.set(CL)}),[e,t,i,o,a]),k.useEffect(()=>(l&&dO.set(l),()=>{dO.set(void 0)}),[l]),k.useEffect(()=>(r&&fO.set(r),()=>{fO.set(void 0)}),[r]),oe.jsx(J.StrictMode,{children:oe.jsx(tle,{store:KG,children:oe.jsx(J.Suspense,{fallback:oe.jsx(fNe,{}),children:oe.jsx(pLe,{children:oe.jsx(fLe,{children:oe.jsx(hLe,{config:n,selectedImage:s})})})})})})),mLe=k.memo(gLe);aC.createRoot(document.getElementById("root")).render(oe.jsx(mLe,{}));export{G1 as $,So as A,Sme as B,ii as C,vl as D,Yo as E,dVe as F,hT as G,Ii as H,oe as I,zm as J,Mm as K,lr as L,Kl as M,N3e as N,CUe as O,Cme as P,SUe as Q,J as R,eg as S,CU as T,xU as U,h3e as V,Rm as W,rA as X,$m as Y,xUe as Z,wUe as _,SN as a,Nze as a$,k9 as a0,vbe as a1,EUe as a2,ua as a3,Bl as a4,b1 as a5,tX as a6,JV as a7,PUe as a8,v3e as a9,jze as aA,ibe as aB,ET as aC,lV as aD,abe as aE,mi as aF,nP as aG,fS as aH,w2 as aI,Zje as aJ,Cze as aK,Gze as aL,Hze as aM,_ze as aN,vze as aO,$U as aP,Gc as aQ,w6e as aR,VU as aS,Uje as aT,Sze as aU,XE as aV,kA as aW,hUe as aX,aA as aY,cNe as aZ,de as a_,ya as aa,gV as ab,dS as ac,FTe as ad,MU as ae,TUe as af,ke as ag,_Ue as ah,AUe as ai,qn as aj,IA as ak,SE as al,C2 as am,Mze as an,Tm as ao,fF as ap,FF as aq,J_ as ar,se as as,ob as at,sA as au,A3 as av,TA as aw,Vm as ax,p$e as ay,VG as az,Kb as b,QRe as b$,Uze as b0,uBe as b1,zie as b2,KE as b3,it as b4,jLe as b5,sUe as b6,qje as b7,pUe as b8,fUe as b9,X as bA,eVe as bB,iVe as bC,Eze as bD,Tze as bE,Fze as bF,M1 as bG,Pze as bH,al as bI,b0 as bJ,rVe as bK,tVe as bL,nVe as bM,vLe as bN,NLe as bO,DLe as bP,LLe as bQ,FLe as bR,uae as bS,hFe as bT,Oje as bU,$je as bV,ULe as bW,_Fe as bX,zLe as bY,lFe as bZ,qLe as b_,e1e as ba,Hje as bb,Kje as bc,bve as bd,_ve as be,iUe as bf,aUe as bg,Wje as bh,uUe as bi,Xje as bj,Gje as bk,Ize as bl,RUe as bm,pq as bn,SLe as bo,bLe as bp,_Le as bq,He as br,kze as bs,Yze as bt,Qze as bu,Aze as bv,oVe as bw,hGe as bx,fGe as by,yl as bz,JQ as c,Dze as c$,VLe as c0,pFe as c1,KLe as c2,xL as c3,BLe as c4,EFe as c5,GLe as c6,E6 as c7,HLe as c8,T6 as c9,_8 as cA,Lje as cB,Fje as cC,Bje as cD,tFe as cE,zje as cF,nFe as cG,Vje as cH,rFe as cI,jje as cJ,uVe as cK,yg as cL,D6e as cM,Bze as cN,Iu as cO,Do as cP,Dfe as cQ,ge as cR,dO as cS,Zze as cT,Jze as cU,Ble as cV,v1e as cW,qz as cX,lF as cY,bze as cZ,DG as c_,JLe as ca,cFe as cb,iFe as cc,DFe as cd,LFe as ce,eFe as cf,FFe as cg,HUe as ch,XLe as ci,ER as cj,cVe as ck,jUe as cl,QLe as cm,TR as cn,Su as co,Tie as cp,Die as cq,GUe as cr,PR as cs,Aie as ct,UUe as cu,ZLe as cv,AR as cw,Pie as cx,XRe as cy,WLe as cz,Bne as d,qVe as d$,bg as d0,JF as d1,bUe as d2,Lze as d3,$0 as d4,M5 as d5,hBe as d6,aBe as d7,ZFe as d8,JFe as d9,yVe as dA,Oze as dB,Rze as dC,_Ve as dD,wE as dE,VVe as dF,pVe as dG,NVe as dH,DVe as dI,Zoe as dJ,LVe as dK,RLe as dL,FVe as dM,aS as dN,Yoe as dO,jVe as dP,Sm as dQ,nGe as dR,vs as dS,VUe as dT,sGe as dU,zUe as dV,UVe as dW,GVe as dX,lGe as dY,HVe as dZ,aGe as d_,iBe as da,on as db,pT as dc,ps as dd,Aa as de,gi as df,rBe as dg,oFe as dh,CA as di,oBe as dj,dUe as dk,_E as dl,ije as dm,$ze as dn,rje as dp,dGe as dq,Aje as dr,wje as ds,Cje as dt,Ije as du,Eje as dv,kje as dw,Pje as dx,IRe as dy,YVe as dz,xD as e,zFe as e$,WVe as e0,_L as e1,WUe as e2,KVe as e3,Joe as e4,BVe as e5,eae as e6,zVe as e7,$Ve as e8,Tje as e9,O6e as eA,R6e as eB,PLe as eC,kLe as eD,s_ as eE,ILe as eF,Bie as eG,MLe as eH,TLe as eI,ELe as eJ,OE as eK,Nie as eL,Mie as eM,Rie as eN,kie as eO,Iie as eP,Oie as eQ,$ie as eR,wLe as eS,qUe as eT,Nje as eU,$E as eV,gve as eW,O7e as eX,LUe as eY,VFe as eZ,cae as e_,Od as ea,$f as eb,dFe as ec,jle as ed,Ule as ee,xze as ef,sVe as eg,lVe as eh,tB as ei,aVe as ej,r_ as ek,BFe as el,OFe as em,$Fe as en,NFe as eo,Gie as ep,di as eq,S6 as er,ALe as es,Kze as et,qze as eu,Wze as ev,Hl as ew,Z6 as ex,Fie as ey,x6 as ez,kN as f,xz as f$,Rr as f0,uFe as f1,xFe as f2,Hie as f3,hp as f4,CFe as f5,Dje as f6,yFe as f7,vFe as f8,bFe as f9,Yje as fA,QUe as fB,oGe as fC,rGe as fD,Qje as fE,JUe as fF,ZUe as fG,KUe as fH,tGe as fI,$Le as fJ,XUe as fK,eGe as fL,OLe as fM,sz as fN,gVe as fO,f$e as fP,ZVe as fQ,wVe as fR,CVe as fS,mye as fT,y8 as fU,zB as fV,km as fW,fVe as fX,wu as fY,eje as fZ,cUe as f_,gFe as fa,mFe as fb,lae as fc,PFe as fd,AFe as fe,MBe as ff,KFe as fg,pze as fh,RBe as fi,MFe as fj,RFe as fk,IFe as fl,DE as fm,sBe as fn,Rje as fo,uGe as fp,e$e as fq,tUe as fr,ce as fs,Qe as ft,Ft as fu,pa as fv,YLe as fw,BUe as fx,iGe as fy,YUe as fz,LN as g,lze as g$,YL as g0,Gh as g1,bVe as g2,mVe as g3,JVe as g4,tje as g5,lje as g6,hVe as g7,nje as g8,V1 as g9,FUe as gA,wR as gB,pt as gC,cve as gD,Ig as gE,Rl as gF,Sje as gG,mje as gH,_je as gI,yje as gJ,pje as gK,oje as gL,bje as gM,_z as gN,vUe as gO,gUe as gP,mUe as gQ,yUe as gR,pBe as gS,nBe as gT,cBe as gU,fBe as gV,xu as gW,GU as gX,Dq as gY,Ge as gZ,UBe as g_,Pe as ga,a$e as gb,dve as gc,q0 as gd,vVe as ge,uje as gf,aje as gg,MVe as gh,PVe as gi,AVe as gj,TVe as gk,RVe as gl,sje as gm,fje as gn,dje as go,xje as gp,n$e as gq,kVe as gr,IVe as gs,Mje as gt,hje as gu,cje as gv,gje as gw,cye as gx,hb as gy,b1e as gz,t_ as h,hze as h$,sze as h0,ABe as h1,ZBe as h2,cze as h3,$6e as h4,_Be as h5,FBe as h6,Ah as h7,NBe as h8,SBe as h9,kBe as hA,GBe as hB,jBe as hC,BBe as hD,HFe as hE,qFe as hF,yze as hG,$Ue as hH,OUe as hI,HBe as hJ,A6e as hK,YBe as hL,qBe as hM,TBe as hN,bBe as hO,ize as hP,rze as hQ,XBe as hR,WBe as hS,KBe as hT,gze as hU,tze as hV,mze as hW,mBe as hX,gBe as hY,$Be as hZ,OBe as h_,ES as ha,LBe as hb,yBe as hc,DBe as hd,vBe as he,wBe as hf,GFe as hg,UFe as hh,jFe as hi,uze as hj,Dre as hk,_a as hl,wL as hm,pae as hn,XFe as ho,QFe as hp,YFe as hq,aze as hr,EBe as hs,CBe as ht,kle as hu,oze as hv,M6e as hw,Ile as hx,wA as hy,ZMe as hz,One as i,I6e as i0,T6e as i1,P6e as i2,k6e as i3,WFe as i4,PBe as i5,DUe as i6,gPe as i7,Jje as i8,eUe as i9,Qre as ia,P1e as ib,cGe as ic,fO as id,hV as ie,AT as ig,ca as ih,n3e as ii,I3e as ij,kUe as ik,xbe as il,MUe as im,pPe as io,_6e as ip,S6e as iq,mbe as ir,Tn as j,hee as k,e_ as l,Of as m,ym as n,ri as o,Yb as p,lE as q,AN as r,pE as s,bm as t,gD as u,k as v,to as w,fn as x,Fd as y,Kn as z}; diff --git a/invokeai/frontend/web/dist/assets/index-c553e366.js b/invokeai/frontend/web/dist/assets/index-c553e366.js new file mode 100644 index 0000000000..6a524be799 --- /dev/null +++ b/invokeai/frontend/web/dist/assets/index-c553e366.js @@ -0,0 +1,156 @@ +var eq=Object.defineProperty;var tq=(e,t,n)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var W2=(e,t,n)=>(tq(e,typeof t!="symbol"?t+"":t,n),n),K2=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var te=(e,t,n)=>(K2(e,t,"read from private field"),n?n.call(e):t.get(e)),Ut=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ri=(e,t,n,r)=>(K2(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Zf=(e,t,n,r)=>({set _(i){Ri(e,t,i,n)},get _(){return te(e,t,r)}}),Uo=(e,t,n)=>(K2(e,t,"access private method"),n);function iO(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var oO={exports:{}},_b={},aO={exports:{}},We={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tm=Symbol.for("react.element"),rq=Symbol.for("react.portal"),iq=Symbol.for("react.fragment"),oq=Symbol.for("react.strict_mode"),aq=Symbol.for("react.profiler"),sq=Symbol.for("react.provider"),lq=Symbol.for("react.context"),uq=Symbol.for("react.forward_ref"),cq=Symbol.for("react.suspense"),dq=Symbol.for("react.memo"),fq=Symbol.for("react.lazy"),qT=Symbol.iterator;function hq(e){return e===null||typeof e!="object"?null:(e=qT&&e[qT]||e["@@iterator"],typeof e=="function"?e:null)}var sO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lO=Object.assign,uO={};function Pf(e,t,n){this.props=e,this.context=t,this.refs=uO,this.updater=n||sO}Pf.prototype.isReactComponent={};Pf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cO(){}cO.prototype=Pf.prototype;function K3(e,t,n){this.props=e,this.context=t,this.refs=uO,this.updater=n||sO}var X3=K3.prototype=new cO;X3.constructor=K3;lO(X3,Pf.prototype);X3.isPureReactComponent=!0;var WT=Array.isArray,dO=Object.prototype.hasOwnProperty,Q3={current:null},fO={key:!0,ref:!0,__self:!0,__source:!0};function hO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)dO.call(t,r)&&!fO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,V=O[z];if(0>>1;zi(Z,$))Ji(j,Z)?(O[z]=j,O[J]=$,z=J):(O[z]=Z,O[Q]=$,z=Q);else if(Ji(j,$))O[z]=j,O[J]=$,z=J;else break e}}return R}function i(O,R){var $=O.sortIndex-R.sortIndex;return $!==0?$:O.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(O){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=O)r(u),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(u)}}function b(O){if(m=!1,g(O),!p)if(n(l)!==null)p=!0,N(S);else{var R=n(u);R!==null&&L(b,R.startTime-O)}}function S(O,R){p=!1,m&&(m=!1,v(C),C=-1),h=!0;var $=f;try{for(g(R),d=n(l);d!==null&&(!(d.expirationTime>R)||O&&!I());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var V=z(d.expirationTime<=R);R=e.unstable_now(),typeof V=="function"?d.callback=V:d===n(l)&&r(l),g(R)}else r(l);d=n(l)}if(d!==null)var H=!0;else{var Q=n(u);Q!==null&&L(b,Q.startTime-R),H=!1}return H}finally{d=null,f=$,h=!1}}var x=!1,w=null,C=-1,T=5,A=-1;function I(){return!(e.unstable_now()-AO||125z?(O.sortIndex=$,t(u,O),n(l)===null&&O===n(u)&&(m?(v(C),C=-1):m=!0,L(b,$-z))):(O.sortIndex=V,t(l,O),p||h||(p=!0,N(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var R=f;return function(){var $=f;f=R;try{return O.apply(this,arguments)}finally{f=$}}}})(yO);mO.exports=yO;var Cq=mO.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vO=k,Si=Cq;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nC=Object.prototype.hasOwnProperty,Eq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,QT={},YT={};function Aq(e){return nC.call(YT,e)?!0:nC.call(QT,e)?!1:Eq.test(e)?YT[e]=!0:(QT[e]=!0,!1)}function Tq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pq(e,t,n,r){if(t===null||typeof t>"u"||Tq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Fr(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ar[e]=new Fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ar[t]=new Fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ar[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ar[e]=new Fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ar[e]=new Fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ar[e]=new Fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ar[e]=new Fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ar[e]=new Fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ar[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Z3=/[\-:]([a-z])/g;function J3(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Z3,J3);ar[t]=new Fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Z3,J3);ar[t]=new Fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Z3,J3);ar[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ar[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)});ar.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ar[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function e4(e,t,n,r){var i=ar.hasOwnProperty(t)?ar[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Y2=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Oh(e):""}function kq(e){switch(e.tag){case 5:return Oh(e.type);case 16:return Oh("Lazy");case 13:return Oh("Suspense");case 19:return Oh("SuspenseList");case 0:case 2:case 15:return e=Z2(e.type,!1),e;case 11:return e=Z2(e.type.render,!1),e;case 1:return e=Z2(e.type,!0),e;default:return""}}function aC(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yc:return"Fragment";case Qc:return"Portal";case rC:return"Profiler";case t4:return"StrictMode";case iC:return"Suspense";case oC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case SO:return(e.displayName||"Context")+".Consumer";case _O:return(e._context.displayName||"Context")+".Provider";case n4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case r4:return t=e.displayName||null,t!==null?t:aC(e.type)||"Memo";case Gs:t=e._payload,e=e._init;try{return aC(e(t))}catch{}}return null}function Iq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return aC(t);case 8:return t===t4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mq(e){var t=wO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function t0(e){e._valueTracker||(e._valueTracker=Mq(e))}function CO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sC(e,t){var n=t.checked;return Jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function JT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function EO(e,t){t=t.checked,t!=null&&e4(e,"checked",t,!1)}function lC(e,t){EO(e,t);var n=wl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uC(e,t.type,n):t.hasOwnProperty("defaultValue")&&uC(e,t.type,wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function uC(e,t,n){(t!=="number"||bv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $h=Array.isArray;function _d(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=n0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rq=["Webkit","ms","Moz","O"];Object.keys(Jh).forEach(function(e){Rq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jh[t]=Jh[e]})});function kO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jh.hasOwnProperty(e)&&Jh[e]?(""+t).trim():t+"px"}function IO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=kO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Oq=Jt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fC(e,t){if(t){if(Oq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function hC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pC=null;function i4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gC=null,Sd=null,xd=null;function rP(e){if(e=im(e)){if(typeof gC!="function")throw Error(re(280));var t=e.stateNode;t&&(t=Eb(t),gC(e.stateNode,e.type,t))}}function MO(e){Sd?xd?xd.push(e):xd=[e]:Sd=e}function RO(){if(Sd){var e=Sd,t=xd;if(xd=Sd=null,rP(e),t)for(e=0;e>>=0,e===0?32:31-(Gq(e)/Hq|0)|0}var r0=64,i0=4194304;function Nh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function wv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Nh(s):(o&=a,o!==0&&(r=Nh(o)))}else a=n&~i,a!==0?r=Nh(a):o!==0&&(r=Nh(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function nm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Eo(t),e[t]=n}function Xq(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=tp),fP=String.fromCharCode(32),hP=!1;function ZO(e,t){switch(e){case"keyup":return wW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zc=!1;function EW(e,t){switch(e){case"compositionend":return JO(t);case"keypress":return t.which!==32?null:(hP=!0,fP);case"textInput":return e=t.data,e===fP&&hP?null:e;default:return null}}function AW(e,t){if(Zc)return e==="compositionend"||!f4&&ZO(e,t)?(e=QO(),Py=u4=il=null,Zc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yP(n)}}function r7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?r7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function i7(){for(var e=window,t=bv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bv(e.document)}return t}function h4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function NW(e){var t=i7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&r7(n.ownerDocument.documentElement,n)){if(r!==null&&h4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=vP(n,o);var a=vP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jc=null,SC=null,rp=null,xC=!1;function bP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xC||Jc==null||Jc!==bv(r)||(r=Jc,"selectionStart"in r&&h4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rp&&Op(rp,r)||(rp=r,r=Av(SC,"onSelect"),0nd||(e.current=PC[nd],PC[nd]=null,nd--)}function It(e,t){nd++,PC[nd]=e.current,e.current=t}var Cl={},br=jl(Cl),Yr=jl(!1),Xu=Cl;function ef(e,t){var n=e.type.contextTypes;if(!n)return Cl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Zr(e){return e=e.childContextTypes,e!=null}function Pv(){Bt(Yr),Bt(br)}function AP(e,t,n){if(br.current!==Cl)throw Error(re(168));It(br,t),It(Yr,n)}function h7(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(re(108,Iq(e)||"Unknown",i));return Jt({},n,r)}function kv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cl,Xu=br.current,It(br,e),It(Yr,Yr.current),!0}function TP(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=h7(e,t,Xu),r.__reactInternalMemoizedMergedChildContext=e,Bt(Yr),Bt(br),It(br,e)):Bt(Yr),It(Yr,n)}var Va=null,Ab=!1,fx=!1;function p7(e){Va===null?Va=[e]:Va.push(e)}function WW(e){Ab=!0,p7(e)}function Vl(){if(!fx&&Va!==null){fx=!0;var e=0,t=gt;try{var n=Va;for(gt=1;e>=a,i-=a,Qa=1<<32-Eo(t)+i|n<C?(T=w,w=null):T=w.sibling;var A=f(v,w,g[C],b);if(A===null){w===null&&(w=T);break}e&&w&&A.alternate===null&&t(v,w),y=o(A,y,C),x===null?S=A:x.sibling=A,x=A,w=T}if(C===g.length)return n(v,w),Ht&&hu(v,C),S;if(w===null){for(;CC?(T=w,w=null):T=w.sibling;var I=f(v,w,A.value,b);if(I===null){w===null&&(w=T);break}e&&w&&I.alternate===null&&t(v,w),y=o(I,y,C),x===null?S=I:x.sibling=I,x=I,w=T}if(A.done)return n(v,w),Ht&&hu(v,C),S;if(w===null){for(;!A.done;C++,A=g.next())A=d(v,A.value,b),A!==null&&(y=o(A,y,C),x===null?S=A:x.sibling=A,x=A);return Ht&&hu(v,C),S}for(w=r(v,w);!A.done;C++,A=g.next())A=h(w,v,C,A.value,b),A!==null&&(e&&A.alternate!==null&&w.delete(A.key===null?C:A.key),y=o(A,y,C),x===null?S=A:x.sibling=A,x=A);return e&&w.forEach(function(D){return t(v,D)}),Ht&&hu(v,C),S}function _(v,y,g,b){if(typeof g=="object"&&g!==null&&g.type===Yc&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case e0:e:{for(var S=g.key,x=y;x!==null;){if(x.key===S){if(S=g.type,S===Yc){if(x.tag===7){n(v,x.sibling),y=i(x,g.props.children),y.return=v,v=y;break e}}else if(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Gs&&$P(S)===x.type){n(v,x.sibling),y=i(x,g.props),y.ref=ih(v,x,g),y.return=v,v=y;break e}n(v,x);break}else t(v,x);x=x.sibling}g.type===Yc?(y=Fu(g.props.children,v.mode,b,g.key),y.return=v,v=y):(b=Dy(g.type,g.key,g.props,null,v.mode,b),b.ref=ih(v,y,g),b.return=v,v=b)}return a(v);case Qc:e:{for(x=g.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){n(v,y.sibling),y=i(y,g.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=_x(g,v.mode,b),y.return=v,v=y}return a(v);case Gs:return x=g._init,_(v,y,x(g._payload),b)}if($h(g))return p(v,y,g,b);if(Jf(g))return m(v,y,g,b);d0(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,y!==null&&y.tag===6?(n(v,y.sibling),y=i(y,g),y.return=v,v=y):(n(v,y),y=bx(g,v.mode,b),y.return=v,v=y),a(v)):n(v,y)}return _}var nf=x7(!0),w7=x7(!1),om={},da=jl(om),Lp=jl(om),Fp=jl(om);function Pu(e){if(e===om)throw Error(re(174));return e}function x4(e,t){switch(It(Fp,t),It(Lp,e),It(da,om),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=dC(t,e)}Bt(da),It(da,t)}function rf(){Bt(da),Bt(Lp),Bt(Fp)}function C7(e){Pu(Fp.current);var t=Pu(da.current),n=dC(t,e.type);t!==n&&(It(Lp,e),It(da,n))}function w4(e){Lp.current===e&&(Bt(da),Bt(Lp))}var Qt=jl(0);function Nv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hx=[];function C4(){for(var e=0;en?n:4,e(!0);var r=px.transition;px.transition={};try{e(!1),t()}finally{gt=n,px.transition=r}}function z7(){return Xi().memoizedState}function YW(e,t,n){var r=pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},j7(e))V7(t,n);else if(n=v7(e,t,n,r),n!==null){var i=Or();Ao(n,e,r,i),U7(n,t,r)}}function ZW(e,t,n){var r=pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(j7(e))V7(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ro(s,a)){var l=t.interleaved;l===null?(i.next=i,_4(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=v7(e,t,i,r),n!==null&&(i=Or(),Ao(n,e,r,i),U7(n,t,r))}}function j7(e){var t=e.alternate;return e===Zt||t!==null&&t===Zt}function V7(e,t){ip=Dv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function U7(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,a4(e,n)}}var Lv={readContext:Ki,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useInsertionEffect:cr,useLayoutEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useMutableSource:cr,useSyncExternalStore:cr,useId:cr,unstable_isNewReconciler:!1},JW={readContext:Ki,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:Ki,useEffect:DP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ry(4194308,4,N7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ry(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ry(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=YW.bind(null,Zt,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:NP,useDebugValue:k4,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=NP(!1),t=e[0];return e=QW.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Zt,i=Wo();if(Ht){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),Un===null)throw Error(re(349));Yu&30||T7(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,DP(k7.bind(null,r,o,e),[e]),r.flags|=2048,jp(9,P7.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=Un.identifierPrefix;if(Ht){var n=Ya,r=Qa;n=(r&~(1<<32-Eo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[na]=t,e[Dp]=r,Z7(e,t,!1,!1),t.stateNode=e;e:{switch(a=hC(n,r),n){case"dialog":$t("cancel",e),$t("close",e),i=r;break;case"iframe":case"object":case"embed":$t("load",e),i=r;break;case"video":case"audio":for(i=0;iaf&&(t.flags|=128,r=!0,oh(o,!1),t.lanes=4194304)}else{if(!r)if(e=Nv(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ht)return dr(t),null}else 2*gn()-o.renderingStartTime>af&&n!==1073741824&&(t.flags|=128,r=!0,oh(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=gn(),t.sibling=null,n=Qt.current,It(Qt,r?n&1|2:n&1),t):(dr(t),null);case 22:case 23:return N4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?fi&1073741824&&(dr(t),t.subtreeFlags&6&&(t.flags|=8192)):dr(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function sK(e,t){switch(g4(t),t.tag){case 1:return Zr(t.type)&&Pv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rf(),Bt(Yr),Bt(br),C4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return w4(t),null;case 13:if(Bt(Qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));tf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bt(Qt),null;case 4:return rf(),null;case 10:return b4(t.type._context),null;case 22:case 23:return N4(),null;case 24:return null;default:return null}}var h0=!1,yr=!1,lK=typeof WeakSet=="function"?WeakSet:Set,_e=null;function ad(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){an(e,t,r)}else n.current=null}function zC(e,t,n){try{n()}catch(r){an(e,t,r)}}var HP=!1;function uK(e,t){if(wC=Cv,e=i7(),h4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=a),f===o&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(CC={focusedElem:e,selectionRange:n},Cv=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,_=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:go(t.type,m),_);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(b){an(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return p=HP,HP=!1,p}function op(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&zC(t,n,o)}i=i.next}while(i!==r)}}function kb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function jC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function t$(e){var t=e.alternate;t!==null&&(e.alternate=null,t$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[na],delete t[Dp],delete t[TC],delete t[HW],delete t[qW])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function n$(e){return e.tag===5||e.tag===3||e.tag===4}function qP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||n$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function VC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tv));else if(r!==4&&(e=e.child,e!==null))for(VC(e,t,n),e=e.sibling;e!==null;)VC(e,t,n),e=e.sibling}function UC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(UC(e,t,n),e=e.sibling;e!==null;)UC(e,t,n),e=e.sibling}var er=null,yo=!1;function Os(e,t,n){for(n=n.child;n!==null;)r$(e,t,n),n=n.sibling}function r$(e,t,n){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(Sb,n)}catch{}switch(n.tag){case 5:yr||ad(n,t);case 6:var r=er,i=yo;er=null,Os(e,t,n),er=r,yo=i,er!==null&&(yo?(e=er,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):er.removeChild(n.stateNode));break;case 18:er!==null&&(yo?(e=er,n=n.stateNode,e.nodeType===8?dx(e.parentNode,n):e.nodeType===1&&dx(e,n),Mp(e)):dx(er,n.stateNode));break;case 4:r=er,i=yo,er=n.stateNode.containerInfo,yo=!0,Os(e,t,n),er=r,yo=i;break;case 0:case 11:case 14:case 15:if(!yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&zC(n,t,a),i=i.next}while(i!==r)}Os(e,t,n);break;case 1:if(!yr&&(ad(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){an(n,t,s)}Os(e,t,n);break;case 21:Os(e,t,n);break;case 22:n.mode&1?(yr=(r=yr)||n.memoizedState!==null,Os(e,t,n),yr=r):Os(e,t,n);break;default:Os(e,t,n)}}function WP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new lK),t.forEach(function(r){var i=vK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function fo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=gn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dK(r/1960))-r,10e?16:e,ol===null)var r=!1;else{if(e=ol,ol=null,zv=0,it&6)throw Error(re(331));var i=it;for(it|=4,_e=e.current;_e!==null;){var o=_e,a=o.child;if(_e.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lgn()-O4?Lu(e,0):R4|=n),Jr(e,t)}function d$(e,t){t===0&&(e.mode&1?(t=i0,i0<<=1,!(i0&130023424)&&(i0=4194304)):t=1);var n=Or();e=ds(e,t),e!==null&&(nm(e,t,n),Jr(e,n))}function yK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d$(e,n)}function vK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(re(314))}r!==null&&r.delete(t),d$(e,n)}var f$;f$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yr.current)Kr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Kr=!1,oK(e,t,n);Kr=!!(e.flags&131072)}else Kr=!1,Ht&&t.flags&1048576&&g7(t,Mv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Oy(e,t),e=t.pendingProps;var i=ef(t,br.current);Cd(t,n),i=A4(null,t,r,e,i,n);var o=T4();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Zr(r)?(o=!0,kv(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,S4(t),i.updater=Tb,t.stateNode=i,i._reactInternals=t,OC(t,r,e,n),t=DC(null,t,r,!0,o,n)):(t.tag=0,Ht&&o&&p4(t),Ir(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Oy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=_K(r),e=go(r,e),i){case 0:t=NC(null,t,r,e,n);break e;case 1:t=VP(null,t,r,e,n);break e;case 11:t=zP(null,t,r,e,n);break e;case 14:t=jP(null,t,r,go(r.type,e),n);break e}throw Error(re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:go(r,i),NC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:go(r,i),VP(e,t,r,i,n);case 3:e:{if(X7(t),e===null)throw Error(re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,b7(e,t),$v(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=of(Error(re(423)),t),t=UP(e,t,r,n,i);break e}else if(r!==i){i=of(Error(re(424)),t),t=UP(e,t,r,n,i);break e}else for(yi=dl(t.stateNode.containerInfo.firstChild),vi=t,Ht=!0,bo=null,n=w7(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tf(),r===i){t=fs(e,t,n);break e}Ir(e,t,r,n)}t=t.child}return t;case 5:return C7(t),e===null&&IC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,EC(r,i)?a=null:o!==null&&EC(r,o)&&(t.flags|=32),K7(e,t),Ir(e,t,a,n),t.child;case 6:return e===null&&IC(t),null;case 13:return Q7(e,t,n);case 4:return x4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nf(t,null,r,n):Ir(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:go(r,i),zP(e,t,r,i,n);case 7:return Ir(e,t,t.pendingProps,n),t.child;case 8:return Ir(e,t,t.pendingProps.children,n),t.child;case 12:return Ir(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,It(Rv,r._currentValue),r._currentValue=a,o!==null)if(Ro(o.value,a)){if(o.children===i.children&&!Yr.current){t=fs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ns(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),MC(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),MC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ir(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cd(t,n),i=Ki(i),r=r(i),t.flags|=1,Ir(e,t,r,n),t.child;case 14:return r=t.type,i=go(r,t.pendingProps),i=go(r.type,i),jP(e,t,r,i,n);case 15:return q7(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:go(r,i),Oy(e,t),t.tag=1,Zr(r)?(e=!0,kv(t)):e=!1,Cd(t,n),S7(t,r,i),OC(t,r,i,n),DC(null,t,r,!0,e,n);case 19:return Y7(e,t,n);case 22:return W7(e,t,n)}throw Error(re(156,t.tag))};function h$(e,t){return BO(e,t)}function bK(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hi(e,t,n,r){return new bK(e,t,n,r)}function L4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _K(e){if(typeof e=="function")return L4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===n4)return 11;if(e===r4)return 14}return 2}function gl(e,t){var n=e.alternate;return n===null?(n=Hi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")L4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Yc:return Fu(n.children,i,o,t);case t4:a=8,i|=8;break;case rC:return e=Hi(12,n,t,i|2),e.elementType=rC,e.lanes=o,e;case iC:return e=Hi(13,n,t,i),e.elementType=iC,e.lanes=o,e;case oC:return e=Hi(19,n,t,i),e.elementType=oC,e.lanes=o,e;case xO:return Mb(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _O:a=10;break e;case SO:a=9;break e;case n4:a=11;break e;case r4:a=14;break e;case Gs:a=16,r=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=Hi(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fu(e,t,n,r){return e=Hi(7,e,r,t),e.lanes=n,e}function Mb(e,t,n,r){return e=Hi(22,e,r,t),e.elementType=xO,e.lanes=n,e.stateNode={isHidden:!1},e}function bx(e,t,n){return e=Hi(6,e,null,t),e.lanes=n,e}function _x(e,t,n){return t=Hi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SK(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ex(0),this.expirationTimes=ex(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ex(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F4(e,t,n,r,i,o,a,s,l){return e=new SK(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Hi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},S4(o),e}function xK(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y$)}catch(e){console.error(e)}}y$(),gO.exports=Ei;var pi=gO.exports;const lLe=Bl(pi);var tk=pi;tC.createRoot=tk.createRoot,tC.hydrateRoot=tk.hydrateRoot;const TK="modulepreload",PK=function(e,t){return new URL(e,t).href},nk={},v$=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=PK(o,r),o in nk)return;nk[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const d=i[c];if(d.href===o&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":TK,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function jn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Db(e)?2:Lb(e)?3:0}function ml(e,t){return El(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ly(e,t){return El(e)===2?e.get(t):e[t]}function b$(e,t,n){var r=El(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Db(e){return $K&&e instanceof Map}function Lb(e){return NK&&e instanceof Set}function Dn(e){return e.o||e.t}function U4(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=x$(e);delete t[De];for(var n=Td(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=kK),Object.freeze(e),t&&hs(e,function(n,r){return am(r,!0)},!0)),e}function kK(){jn(2)}function G4(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function fa(e){var t=XC[e];return t||jn(18,e),t}function H4(e,t){XC[e]||(XC[e]=t)}function Up(){return Hp}function Sx(e,t){t&&(fa("Patches"),e.u=[],e.s=[],e.v=t)}function Uv(e){KC(e),e.p.forEach(IK),e.p=null}function KC(e){e===Hp&&(Hp=e.l)}function rk(e){return Hp={p:[],l:Hp,h:e,m:!0,_:0}}function IK(e){var t=e[De];t.i===0||t.i===1?t.j():t.g=!0}function xx(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||fa("ES5").S(t,e,r),r?(n[De].P&&(Uv(t),jn(4)),ei(e)&&(e=Gv(t,e),t.l||Hv(t,e)),t.u&&fa("Patches").M(n[De].t,e,t.u,t.s)):e=Gv(t,n,[]),Uv(t),t.u&&t.v(t.u,t.s),e!==Bb?e:void 0}function Gv(e,t,n){if(G4(t))return t;var r=t[De];if(!r)return hs(t,function(s,l){return ik(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Hv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=U4(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),hs(o,function(s,l){return ik(e,r,i,s,l,n,a)}),Hv(e,i,!1),n&&e.u&&fa("Patches").N(r,n,e.u,e.s)}return r.o}function ik(e,t,n,r,i,o,a){if(Nr(i)){var s=Gv(e,i,o&&t&&t.i!==3&&!ml(t.R,r)?o.concat(r):void 0);if(b$(n,r,s),!Nr(s))return;e.m=!1}else a&&n.add(i);if(ei(i)&&!G4(i)){if(!e.h.D&&e._<1)return;Gv(e,i),t&&t.A.l||Hv(e,i)}}function Hv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&am(t,n)}function wx(e,t){var n=e[De];return(n?Dn(n):e)[t]}function ok(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function qr(e){e.P||(e.P=!0,e.l&&qr(e.l))}function Cx(e){e.o||(e.o=U4(e.t))}function Gp(e,t,n){var r=Db(t)?fa("MapSet").F(t,n):Lb(t)?fa("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Up(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=qp;a&&(l=[s],u=Lh);var c=Proxy.revocable(l,u),d=c.revoke,f=c.proxy;return s.k=f,s.j=d,f}(t,n):fa("ES5").J(t,n);return(n?n.A:Up()).p.push(r),r}function Fb(e){return Nr(e)||jn(22,e),function t(n){if(!ei(n))return n;var r,i=n[De],o=El(n);if(i){if(!i.P&&(i.i<4||!fa("ES5").K(i)))return i.t;i.I=!0,r=ak(n,o),i.I=!1}else r=ak(n,o);return hs(r,function(a,s){i&&Ly(i.t,a)===s||b$(r,a,t(s))}),o===3?new Set(r):r}(e)}function ak(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return U4(e)}function q4(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[De];return qp.get(l,o)},set:function(l){var u=this[De];qp.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][De];if(!s.P)switch(s.i){case 5:r(s)&&qr(s);break;case 4:n(s)&&qr(s)}}}function n(o){for(var a=o.t,s=o.k,l=Td(s),u=l.length-1;u>=0;u--){var c=l[u];if(c!==De){var d=a[c];if(d===void 0&&!ml(a,c))return!0;var f=s[c],h=f&&f[De];if(h?h.t!==d:!_$(f,d))return!0}}var p=!!a[De];return l.length!==Td(a).length+(p?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?v-1:0),g=1;g1?c-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=fa("Patches").$;return Nr(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),xi=new w$,C$=xi.produce,X4=xi.produceWithPatches.bind(xi),LK=xi.setAutoFreeze.bind(xi),FK=xi.setUseProxies.bind(xi),QC=xi.applyPatches.bind(xi),BK=xi.createDraft.bind(xi),zK=xi.finishDraft.bind(xi);const Ul=C$,uLe=Object.freeze(Object.defineProperty({__proto__:null,Immer:w$,applyPatches:QC,castDraft:RK,castImmutable:OK,createDraft:BK,current:Fb,default:Ul,enableAllPlugins:MK,enableES5:q4,enableMapSet:S$,enablePatches:W4,finishDraft:zK,freeze:am,immerable:Ad,isDraft:Nr,isDraftable:ei,nothing:Bb,original:V4,produce:C$,produceWithPatches:X4,setAutoFreeze:LK,setUseProxies:FK},Symbol.toStringTag,{value:"Module"}));function Wp(e){"@babel/helpers - typeof";return Wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(e)}function jK(e,t){if(Wp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VK(e){var t=jK(e,"string");return Wp(t)==="symbol"?t:String(t)}function UK(e,t,n){return t=VK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ck(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(tr(1));return n(sm)(e,t)}if(typeof e!="function")throw new Error(tr(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(tr(3));return o}function d(m){if(typeof m!="function")throw new Error(tr(4));if(l)throw new Error(tr(5));var _=!0;return u(),s.push(m),function(){if(_){if(l)throw new Error(tr(6));_=!1,u();var y=s.indexOf(m);s.splice(y,1),a=null}}}function f(m){if(!GK(m))throw new Error(tr(7));if(typeof m.type>"u")throw new Error(tr(8));if(l)throw new Error(tr(9));try{l=!0,o=i(o,m)}finally{l=!1}for(var _=a=s,v=0;v<_.length;v++){var y=_[v];y()}return m}function h(m){if(typeof m!="function")throw new Error(tr(10));i=m,f({type:sf.REPLACE})}function p(){var m,_=d;return m={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(tr(11));function g(){y.next&&y.next(c())}g();var b=_(g);return{unsubscribe:b}}},m[dk]=function(){return this},m}return f({type:sf.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:h},r[dk]=p,r}var E$=sm;function HK(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:sf.INIT});if(typeof r>"u")throw new Error(tr(12));if(typeof n(void 0,{type:sf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(tr(13))})}function Mf(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(tr(14));d[h]=_,c=c||_!==m}return c=c||o.length!==Object.keys(l).length,c?d:l}}function fk(e,t){return function(){return t(e.apply(this,arguments))}}function A$(e,t){if(typeof e=="function")return fk(e,t);if(typeof e!="object"||e===null)throw new Error(tr(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=fk(i,t))}return n}function lf(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return qv}function i(s,l){r(s)===qv&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var T$=function(t,n){return t===n};function XK(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]",value:e};if(typeof e!="object"||e===null||o!=null&&o.has(e))return!1;for(var s=r!=null?r(e):Object.entries(e),l=i.length>0,u=function(_,v){var y=t?t+"."+_:_;if(l){var g=i.some(function(b){return b instanceof RegExp?b.test(y):y===b});if(g)return"continue"}if(!n(v))return{value:{keyPath:y,value:v}};if(typeof v=="object"&&(a=N$(v,y,n,r,i,o),a))return{value:a}},c=0,d=s;c-1}function dX(e){return""+e}function z$(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function fX(e){return typeof e=="function"}function j$(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?z$(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(fX(e))l=function(){return YC(e())};else{var u=YC(e);l=function(){return u}}function c(d,f){d===void 0&&(d=l());var h=Al([o[f.type]],a.filter(function(p){var m=p.matcher;return m(f)}).map(function(p){var m=p.reducer;return m}));return h.filter(function(p){return!!p}).length===0&&(h=[s]),h.reduce(function(p,m){if(m)if(Nr(p)){var _=p,v=m(_,f);return v===void 0?p:v}else{if(ei(p))return Ul(p,function(y){return m(y,f)});var v=m(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}return p},d)}return c.getInitialState=l,c}function hX(e,t){return e+"/"+t}function qt(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:YC(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(c){var d=r[c],f=hX(t,c),h,p;"reducer"in d?(h=d.reducer,p=d.prepare):h=d,o[c]=h,a[f]=h,s[c]=p?ge(f,p):ge(f)});function l(){var c=typeof e.extraReducers=="function"?z$(e.extraReducers):[e.extraReducers],d=c[0],f=d===void 0?{}:d,h=c[1],p=h===void 0?[]:h,m=c[2],_=m===void 0?void 0:m,v=Xr(Xr({},f),a);return j$(n,function(y){for(var g in v)y.addCase(g,v[g]);for(var b=0,S=p;b0;if(y){var g=p.filter(function(b){return u(_,b,m)}).length>0;g&&(m.ids=Object.keys(m.entities))}}function f(p,m){return h([p],m)}function h(p,m){var _=V$(p,e,m),v=_[0],y=_[1];d(y,m),n(v,m)}return{removeAll:yX(l),addOne:hn(t),addMany:hn(n),setOne:hn(r),setMany:hn(i),setAll:hn(o),updateOne:hn(c),updateMany:hn(d),upsertOne:hn(f),upsertMany:hn(h),removeOne:hn(a),removeMany:hn(s)}}function vX(e,t){var n=U$(e),r=n.removeOne,i=n.removeMany,o=n.removeAll;function a(y,g){return s([y],g)}function s(y,g){y=Bu(y);var b=y.filter(function(S){return!(lp(S,e)in g.entities)});b.length!==0&&_(b,g)}function l(y,g){return u([y],g)}function u(y,g){y=Bu(y),y.length!==0&&_(y,g)}function c(y,g){y=Bu(y),g.entities={},g.ids=[],s(y,g)}function d(y,g){return f([y],g)}function f(y,g){for(var b=!1,S=0,x=y;S-1;return n&&r}function cm(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Vb(){for(var e=[],t=0;t0)for(var g=h.getState(),b=Array.from(n.values()),S=0,x=b;SMath.floor(e/t)*t,Mr=(e,t)=>Math.round(e/t)*t;var DX=typeof global=="object"&&global&&global.Object===Object&&global;const sN=DX;var LX=typeof self=="object"&&self&&self.Object===Object&&self,FX=sN||LX||Function("return this")();const Ea=FX;var BX=Ea.Symbol;const Qi=BX;var lN=Object.prototype,zX=lN.hasOwnProperty,jX=lN.toString,sh=Qi?Qi.toStringTag:void 0;function VX(e){var t=zX.call(e,sh),n=e[sh];try{e[sh]=void 0;var r=!0}catch{}var i=jX.call(e);return r&&(t?e[sh]=n:delete e[sh]),i}var UX=Object.prototype,GX=UX.toString;function HX(e){return GX.call(e)}var qX="[object Null]",WX="[object Undefined]",_k=Qi?Qi.toStringTag:void 0;function Fo(e){return e==null?e===void 0?WX:qX:_k&&_k in Object(e)?VX(e):HX(e)}function ti(e){return e!=null&&typeof e=="object"}var KX="[object Symbol]";function Ub(e){return typeof e=="symbol"||ti(e)&&Fo(e)==KX}function uN(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=TQ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function MQ(e){return function(){return e}}var RQ=function(){try{var e=fc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Zv=RQ;var OQ=Zv?function(e,t){return Zv(e,"toString",{configurable:!0,enumerable:!1,value:MQ(t),writable:!0})}:Gb;const $Q=OQ;var NQ=IQ($Q);const hN=NQ;function pN(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var jQ=9007199254740991,VQ=/^(?:0|[1-9]\d*)$/;function tE(e,t){var n=typeof e;return t=t??jQ,!!t&&(n=="number"||n!="symbol"&&VQ.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=HQ}function Of(e){return e!=null&&nE(e.length)&&!eE(e)}function qb(e,t,n){if(!ni(n))return!1;var r=typeof t;return(r=="number"?Of(n)&&tE(t,n.length):r=="string"&&t in n)?pm(n[t],e):!1}function vN(e){return yN(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&qb(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1}function aZ(e,t){var n=this.__data__,r=Kb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?EN(s,t-1,n,r,i):lE(i,s):r||(i[i.length]=s)}return i}function wZ(e){var t=e==null?0:e.length;return t?EN(e,1):[]}function CZ(e){return hN(mN(e,void 0,wZ),e+"")}var EZ=wN(Object.getPrototypeOf,Object);const uE=EZ;var AZ="[object Object]",TZ=Function.prototype,PZ=Object.prototype,AN=TZ.toString,kZ=PZ.hasOwnProperty,IZ=AN.call(Object);function TN(e){if(!ti(e)||Fo(e)!=AZ)return!1;var t=uE(e);if(t===null)return!0;var n=kZ.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&AN.call(n)==IZ}function PN(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:PN(e,t,n)}var MZ="\\ud800-\\udfff",RZ="\\u0300-\\u036f",OZ="\\ufe20-\\ufe2f",$Z="\\u20d0-\\u20ff",NZ=RZ+OZ+$Z,DZ="\\ufe0e\\ufe0f",LZ="\\u200d",FZ=RegExp("["+LZ+MZ+NZ+DZ+"]");function Yb(e){return FZ.test(e)}function BZ(e){return e.split("")}var IN="\\ud800-\\udfff",zZ="\\u0300-\\u036f",jZ="\\ufe20-\\ufe2f",VZ="\\u20d0-\\u20ff",UZ=zZ+jZ+VZ,GZ="\\ufe0e\\ufe0f",HZ="["+IN+"]",t5="["+UZ+"]",n5="\\ud83c[\\udffb-\\udfff]",qZ="(?:"+t5+"|"+n5+")",MN="[^"+IN+"]",RN="(?:\\ud83c[\\udde6-\\uddff]){2}",ON="[\\ud800-\\udbff][\\udc00-\\udfff]",WZ="\\u200d",$N=qZ+"?",NN="["+GZ+"]?",KZ="(?:"+WZ+"(?:"+[MN,RN,ON].join("|")+")"+NN+$N+")*",XZ=NN+$N+KZ,QZ="(?:"+[MN+t5+"?",t5,RN,ON,HZ].join("|")+")",YZ=RegExp(n5+"(?="+n5+")|"+QZ+XZ,"g");function ZZ(e){return e.match(YZ)||[]}function DN(e){return Yb(e)?ZZ(e):BZ(e)}function JZ(e){return function(t){t=cf(t);var n=Yb(t)?DN(t):void 0,r=n?n[0]:t.charAt(0),i=n?kN(n,1).join(""):t.slice(1);return r[e]()+i}}var eJ=JZ("toUpperCase");const LN=eJ;function FN(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i=t?e:t)),e}function al(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=By(n),n=n===n?n:0),t!==void 0&&(t=By(t),t=t===t?t:0),GJ(By(e),t,n)}function HJ(){this.__data__=new xs,this.size=0}function qJ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function WJ(e){return this.__data__.get(e)}function KJ(e){return this.__data__.has(e)}var XJ=200;function QJ(e,t){var n=this.__data__;if(n instanceof xs){var r=n.__data__;if(!Yp||r.lengths))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&Mte?new Zp:void 0;for(o.set(e,t),o.set(t,e);++d1),o}),Rf(e,rD(e),n),r&&(n=cp(n,Wne|Kne|Xne,qne));for(var i=t.length;i--;)Hne(n,t[i]);return n});const $f=Qne;var Yne=gD("length");const Zne=Yne;var bD="\\ud800-\\udfff",Jne="\\u0300-\\u036f",ere="\\ufe20-\\ufe2f",tre="\\u20d0-\\u20ff",nre=Jne+ere+tre,rre="\\ufe0e\\ufe0f",ire="["+bD+"]",l5="["+nre+"]",u5="\\ud83c[\\udffb-\\udfff]",ore="(?:"+l5+"|"+u5+")",_D="[^"+bD+"]",SD="(?:\\ud83c[\\udde6-\\uddff]){2}",xD="[\\ud800-\\udbff][\\udc00-\\udfff]",are="\\u200d",wD=ore+"?",CD="["+rre+"]?",sre="(?:"+are+"(?:"+[_D,SD,xD].join("|")+")"+CD+wD+")*",lre=CD+wD+sre,ure="(?:"+[_D+l5+"?",l5,SD,xD,ire].join("|")+")",t6=RegExp(u5+"(?="+u5+")|"+ure+lre,"g");function cre(e){for(var t=t6.lastIndex=0;t6.test(e);)++t;return t}function ED(e){return Yb(e)?cre(e):Zne(e)}var dre=Math.floor,fre=Math.random;function hre(e,t){return e+dre(fre()*(t-e+1))}var pre=parseFloat,gre=Math.min,mre=Math.random;function yre(e,t,n){if(n&&typeof n!="boolean"&&qb(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=Md(e),t===void 0?(t=e,e=0):t=Md(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=mre();return gre(e+i*(t-e+pre("1e-"+((i+"").length-1))),t)}return hre(e,t)}var vre=Math.ceil,bre=Math.max;function _re(e,t,n,r){for(var i=-1,o=bre(vre((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function Sre(e){return function(t,n,r){return r&&typeof r!="number"&&qb(t,n,r)&&(n=r=void 0),t=Md(t),n===void 0?(n=t,t=0):n=Md(n),r=r===void 0?t=o)return e;var s=n-ED(r);if(s<1)return r;var l=a?kN(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),Vne(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,cf(Mre.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Yv(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}var Rre=1/0,Ore=Rd&&1/fE(new Rd([,-0]))[1]==Rre?function(e){return new Rd(e)}:AQ;const $re=Ore;var Nre=200;function AD(e,t,n){var r=-1,i=zQ,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Ane;else if(o>=Nre){var u=t?null:$re(e);if(u)return fE(u);a=!1,i=cD,l=new Zp}else l=t?[]:s;e:for(;++r{Od(e,t.payload)}}}),{configChanged:Lre}=PD.actions,Fre=PD.reducer,kD=ge("socket/socketConnected"),yE=ge("socket/appSocketConnected"),ID=ge("socket/socketDisconnected"),MD=ge("socket/appSocketDisconnected"),Bre=ge("socket/socketSubscribedSession"),zre=ge("socket/appSocketSubscribedSession"),jre=ge("socket/socketUnsubscribedSession"),Vre=ge("socket/appSocketUnsubscribedSession"),RD=ge("socket/socketInvocationStarted"),vE=ge("socket/appSocketInvocationStarted"),bE=ge("socket/socketInvocationComplete"),_E=ge("socket/appSocketInvocationComplete"),OD=ge("socket/socketInvocationError"),r_=ge("socket/appSocketInvocationError"),$D=ge("socket/socketGraphExecutionStateComplete"),ND=ge("socket/appSocketGraphExecutionStateComplete"),DD=ge("socket/socketGeneratorProgress"),SE=ge("socket/appSocketGeneratorProgress"),LD=ge("socket/socketModelLoadStarted"),FD=ge("socket/appSocketModelLoadStarted"),BD=ge("socket/socketModelLoadCompleted"),zD=ge("socket/appSocketModelLoadCompleted"),jD=ge("socket/socketSessionRetrievalError"),VD=ge("socket/appSocketSessionRetrievalError"),UD=ge("socket/socketInvocationRetrievalError"),GD=ge("socket/appSocketInvocationRetrievalError"),HD=ge("socket/socketQueueItemStatusChanged"),i_=ge("socket/appSocketQueueItemStatusChanged");let b0;const Ure=new Uint8Array(16);function Gre(){if(!b0&&(b0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!b0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b0(Ure)}const Jn=[];for(let e=0;e<256;++e)Jn.push((e+256).toString(16).slice(1));function Hre(e,t=0){return(Jn[e[t+0]]+Jn[e[t+1]]+Jn[e[t+2]]+Jn[e[t+3]]+"-"+Jn[e[t+4]]+Jn[e[t+5]]+"-"+Jn[e[t+6]]+Jn[e[t+7]]+"-"+Jn[e[t+8]]+Jn[e[t+9]]+"-"+Jn[e[t+10]]+Jn[e[t+11]]+Jn[e[t+12]]+Jn[e[t+13]]+Jn[e[t+14]]+Jn[e[t+15]]).toLowerCase()}const qre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),r6={randomUUID:qre};function yl(e,t,n){if(r6.randomUUID&&!t&&!e)return r6.randomUUID();e=e||{};const r=e.random||(e.rng||Gre)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Hre(r)}const Wre={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class e1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Wre,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{a(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(a=>{a.apply(a,[t,...r])})}}function lh(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function i6(e){return e==null?"":""+e}function Kre(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function xE(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function o6(e,t,n){const{obj:r,k:i}=xE(e,t,Object);r[i]=n}function Xre(e,t,n,r){const{obj:i,k:o}=xE(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}function t1(e,t){const{obj:n,k:r}=xE(e,t);if(n)return n[r]}function Qre(e,t,n){const r=t1(e,n);return r!==void 0?r:t1(t,n)}function qD(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):qD(e[r],t[r],n):e[r]=t[r]);return e}function Ic(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Yre={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Zre(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>Yre[t]):e}const Jre=[" ",",","?","!",";"];function eie(e,t,n){t=t||"",n=n||"";const r=Jre.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function n1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;oo+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const u=r.slice(o+a).join(n);return u?n1(l,u,n):void 0}i=i[r[o]]}return i}function r1(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class a6 extends o_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[t,n];r&&typeof r!="string"&&(s=s.concat(r)),r&&typeof r=="string"&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split("."));const l=t1(this.data,s);return l||!a||typeof r!="string"?l:n1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),o6(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let l=t1(this.data,s)||{};i?qD(l,r,o):l={...l,...r},o6(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var WD={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const s6={};class i1 extends o_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Kre(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=aa.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!eie(t,r,i);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${b}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l}:`${l}${b}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l}:a}const d=this.resolve(t,n);let f=d&&d.res;const h=d&&d.usedKey||a,p=d&&d.exactUsedKey||a,m=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],v=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&_.indexOf(m)<0&&!(typeof v=="string"&&m==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=b,d):b}if(o){const b=m==="[object Array]",S=b?[]:{},x=b?p:h;for(const w in f)if(Object.prototype.hasOwnProperty.call(f,w)){const C=`${x}${o}${w}`;S[w]=this.translate(C,{...n,joinArrays:!1,ns:s}),S[w]===C&&(S[w]=f[w])}f=S}}else if(y&&typeof v=="string"&&m==="[object Array]")f=f.join(v),f&&(f=this.extendTranslation(f,t,n,r));else{let b=!1,S=!1;const x=n.count!==void 0&&typeof n.count!="string",w=i1.hasDefaultValue(n),C=x?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&x?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",A=n[`defaultValue${C}`]||n[`defaultValue${T}`]||n.defaultValue;!this.isValidLookup(f)&&w&&(b=!0,f=A),this.isValidLookup(f)||(S=!0,f=a);const D=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,M=w&&A!==f&&this.options.updateMissing;if(S||b||M){if(this.logger.log(M?"updateKey":"missingKey",u,l,a,M?A:f),o){const L=this.resolve(a,{...n,keySeparator:!1});L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let E=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let L=0;L{const $=w&&R!==f?R:D;this.options.missingKeyHandler?this.options.missingKeyHandler(L,l,O,$,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(L,l,O,$,M,n),this.emit("missingKey",L,l,O,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?E.forEach(L=>{this.pluralResolver.getSuffixes(L,n).forEach(O=>{N([L],a+O,n[`defaultValue${O}`]||A)})}):N(E,a,A))}f=this.extendTranslation(f,t,n,d,r),S&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(S||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,b?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d):f}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),h=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",h=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{this.isValidLookup(r)||(s=_,!s6[`${m[0]}-${_}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(s6[`${m[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(v=>{if(this.isValidLookup(r))return;a=v;const y=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,v,_,n);else{let b;f&&(b=this.pluralResolver.getSuffix(v,n.count,n));const S=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(y.push(c+b),n.ordinal&&b.indexOf(x)===0&&y.push(c+b.replace(x,this.options.pluralSeparator)),h&&y.push(c+S)),p){const w=`${c}${this.options.contextSeparator}${n.context}`;y.push(w),f&&(y.push(w+b),n.ordinal&&b.indexOf(x)===0&&y.push(w+b.replace(x,this.options.pluralSeparator)),h&&y.push(w+S))}}let g;for(;g=y.pop();)this.isValidLookup(r)||(o=g,r=this.getResource(v,_,g,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Mx(e){return e.charAt(0).toUpperCase()+e.slice(1)}class l6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=aa.create("languageUtils")}getScriptPartFromCode(t){if(t=r1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=r1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Mx(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Mx(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Mx(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&o.indexOf(i)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let tie=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],nie={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const rie=["v1","v2","v3"],iie=["v4"],u6={zero:0,one:1,two:2,few:3,many:4,other:5};function oie(){const e={};return tie.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:nie[t.fc]}})}),e}class aie{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=aa.create("pluralResolver"),(!this.options.compatibilityJSON||iie.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=oie()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r1(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>u6[i]-u6[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!rie.includes(this.options.compatibilityJSON)}}function c6(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Qre(e,t,n);return!o&&i&&typeof n=="string"&&(o=n1(e,n,r),o===void 0&&(o=n1(t,n,r))),o}class sie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=aa.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:Zre,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Ic(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Ic(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Ic(n.nestingPrefix):n.nestingPrefixEscaped||Ic("$t("),this.nestingSuffix=n.nestingSuffix?Ic(n.nestingSuffix):n.nestingSuffixEscaped||Ic(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let o,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const y=c6(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const m=p.split(this.formatSeparator),_=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(c6(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...i,...n,interpolationkey:_})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=c(m),a===void 0)if(typeof d=="function"){const v=d(t,o,i);a=typeof v=="string"?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=i6(a));const _=p.safeValue(a);if(t=t.replace(o[0],_),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;function s(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),p=f.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=i6(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function lie(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(!a)return;const[s,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=u),u==="false"&&(n[s.trim()]=!1),u==="true"&&(n[s.trim()]=!0),isNaN(u)||(n[s.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Mc(e){const t={};return function(r,i,o){const a=i+JSON.stringify(o);let s=t[a];return s||(s=e(r1(i),o),t[a]=s),s(r)}}class uie{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=aa.create("formatter"),this.options=t,this.formats={number:Mc((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Mc((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Mc((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Mc((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Mc((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Mc(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,l)=>{const{formatName:u,formatOptions:c}=lie(l);if(this.formats[u]){let d=s;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[u](s,h,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}function cie(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class die extends o_{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=aa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(s[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),r&&this.store.addResourceBundle(o,a,r),this.state[t]=n?-1:2;const s={};this.queue.forEach(l=>{Xre(l.loaded,[o],a),cie(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{s[u][d]===void 0&&(s[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>s(null,c)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,l):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(d=>s(null,d)).catch(s):s(null,c)}catch(c){s(c)}else u(t,n,r,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function d6(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function f6(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function _0(){}function fie(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class eg extends o_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=f6(t),this.services={},this.logger=aa,this.modules={external:[]},fie(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=d6();this.options={...i,...this.options,...f6(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?aa.init(o(this.modules.logger),this.options):aa.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=uie);const d=new l6(this.options);this.store=new a6(this.options.resources,this.options);const f=this.services;f.logger=aa,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new aie(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new sie(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new die(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,m=new Array(p>1?p-1:0),_=1;_1?p-1:0),_=1;_{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=_0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=lh(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_0;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode")return r();const o=[],a=s=>{if(!s)return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{o.indexOf(u)<0&&o.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=lh();return t||(t=this.languages),n||(n=this.options.ns),r||(r=_0),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&WD.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=lh();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let l;if(typeof s!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${p}`):h=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(h,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=lh();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=lh();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0);return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new l6(d6());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new eg(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_0;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new eg(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new a6(this.store.data,i),o.services.resourceStore=o.store),o.translator=new i1(o.services,i),o.translator.on("*",function(s){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{switch(t){case"controlnet":return Od(Ye(hie),{id:e,...n});case"t2i_adapter":return Od(Ye(pie),{id:e,...n});case"ip_adapter":return Od(Ye(gie),{id:e,...n});default:throw new Error(`Unknown control adapter type: ${t}`)}},wE=ge("controlAdapters/imageProcessed"),a_=e=>e.type==="controlnet",KD=e=>e.type==="ip_adapter",CE=e=>e.type==="t2i_adapter",hi=e=>a_(e)||CE(e),fn=Yi(),{selectById:ui,selectAll:Aa,selectEntities:fLe,selectIds:hLe,selectTotal:pLe}=fn.getSelectors(),d5=fn.getInitialState({pendingControlImages:[]}),mie=e=>Aa(e).filter(a_),yie=e=>Aa(e).filter(a_).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),vie=e=>Aa(e).filter(KD),bie=e=>Aa(e).filter(KD).filter(t=>t.isEnabled&&t.model&&!!t.controlImage),_ie=e=>Aa(e).filter(CE),Sie=e=>Aa(e).filter(CE).filter(t=>t.isEnabled&&t.model&&(!!t.processedControlImage||t.processorType==="none"&&!!t.controlImage)),XD=qt({name:"controlAdapters",initialState:d5,reducers:{controlAdapterAdded:{reducer:(e,t)=>{const{id:n,type:r,overrides:i}=t.payload;fn.addOne(e,h6(n,r,i))},prepare:({type:e,overrides:t})=>({payload:{id:yl(),type:e,overrides:t}})},controlAdapterRecalled:(e,t)=>{fn.addOne(e,t.payload)},controlAdapterDuplicated:{reducer:(e,t)=>{const{id:n,newId:r}=t.payload,i=ui(e,n);if(!i)return;const o=Od(Ye(i),{id:r,isEnabled:!0});fn.addOne(e,o)},prepare:e=>({payload:{id:e,newId:yl()}})},controlAdapterAddedFromImage:{reducer:(e,t)=>{const{id:n,type:r,controlImage:i}=t.payload;fn.addOne(e,h6(n,r,{controlImage:i}))},prepare:e=>({payload:{...e,id:yl()}})},controlAdapterRemoved:(e,t)=>{fn.removeOne(e,t.payload.id)},controlAdapterIsEnabledChanged:(e,t)=>{const{id:n,isEnabled:r}=t.payload;fn.updateOne(e,{id:n,changes:{isEnabled:r}})},controlAdapterImageChanged:(e,t)=>{const{id:n,controlImage:r}=t.payload,i=ui(e,n);i&&(fn.updateOne(e,{id:n,changes:{controlImage:r,processedControlImage:null}}),r!==null&&hi(i)&&i.processorType!=="none"&&e.pendingControlImages.push(n))},controlAdapterProcessedImageChanged:(e,t)=>{const{id:n,processedControlImage:r}=t.payload,i=ui(e,n);i&&hi(i)&&(fn.updateOne(e,{id:n,changes:{processedControlImage:r}}),e.pendingControlImages=e.pendingControlImages.filter(o=>o!==n))},controlAdapterModelCleared:(e,t)=>{fn.updateOne(e,{id:t.payload.id,changes:{model:null}})},controlAdapterModelChanged:(e,t)=>{const{id:n,model:r}=t.payload,i=ui(e,n);if(!i)return;if(!hi(i)){fn.updateOne(e,{id:n,changes:{model:r}});return}const o={id:n,changes:{model:r}};if(o.changes.processedControlImage=null,i.shouldAutoConfig){let a;for(const s in S0)if(r.model_name.includes(s)){a=S0[s];break}a?(o.changes.processorType=a,o.changes.processorNode=Su[a].default):(o.changes.processorType="none",o.changes.processorNode=Su.none.default)}fn.updateOne(e,o)},controlAdapterWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload;fn.updateOne(e,{id:n,changes:{weight:r}})},controlAdapterBeginStepPctChanged:(e,t)=>{const{id:n,beginStepPct:r}=t.payload;fn.updateOne(e,{id:n,changes:{beginStepPct:r}})},controlAdapterEndStepPctChanged:(e,t)=>{const{id:n,endStepPct:r}=t.payload;fn.updateOne(e,{id:n,changes:{endStepPct:r}})},controlAdapterControlModeChanged:(e,t)=>{const{id:n,controlMode:r}=t.payload,i=ui(e,n);!i||!a_(i)||fn.updateOne(e,{id:n,changes:{controlMode:r}})},controlAdapterResizeModeChanged:(e,t)=>{const{id:n,resizeMode:r}=t.payload,i=ui(e,n);!i||!hi(i)||fn.updateOne(e,{id:n,changes:{resizeMode:r}})},controlAdapterProcessorParamsChanged:(e,t)=>{const{id:n,params:r}=t.payload,i=ui(e,n);if(!i||!hi(i)||!i.processorNode)return;const o=Od(Ye(i.processorNode),r);fn.updateOne(e,{id:n,changes:{shouldAutoConfig:!1,processorNode:o}})},controlAdapterProcessortTypeChanged:(e,t)=>{const{id:n,processorType:r}=t.payload,i=ui(e,n);if(!i||!hi(i))return;const o=Ye(Su[r].default);fn.updateOne(e,{id:n,changes:{processorType:r,processedControlImage:null,processorNode:o,shouldAutoConfig:!1}})},controlAdapterAutoConfigToggled:(e,t)=>{var o;const{id:n}=t.payload,r=ui(e,n);if(!r||!hi(r))return;const i={id:n,changes:{shouldAutoConfig:!r.shouldAutoConfig}};if(i.changes.shouldAutoConfig){let a;for(const s in S0)if((o=r.model)!=null&&o.model_name.includes(s)){a=S0[s];break}a?(i.changes.processorType=a,i.changes.processorNode=Su[a].default):(i.changes.processorType="none",i.changes.processorNode=Su.none.default)}fn.updateOne(e,i)},controlAdaptersReset:()=>Ye(d5),pendingControlImagesCleared:e=>{e.pendingControlImages=[]}},extraReducers:e=>{e.addCase(wE,(t,n)=>{const r=ui(t,n.payload.id);r&&r.controlImage!==null&&(t.pendingControlImages=Dre(t.pendingControlImages.concat(n.payload.id)))}),e.addCase(r_,t=>{t.pendingControlImages=[]})}}),{controlAdapterAdded:xie,controlAdapterRecalled:wie,controlAdapterDuplicated:gLe,controlAdapterAddedFromImage:Cie,controlAdapterRemoved:mLe,controlAdapterImageChanged:Hl,controlAdapterProcessedImageChanged:EE,controlAdapterIsEnabledChanged:AE,controlAdapterModelChanged:p6,controlAdapterWeightChanged:yLe,controlAdapterBeginStepPctChanged:vLe,controlAdapterEndStepPctChanged:bLe,controlAdapterControlModeChanged:_Le,controlAdapterResizeModeChanged:SLe,controlAdapterProcessorParamsChanged:Eie,controlAdapterProcessortTypeChanged:Aie,controlAdaptersReset:Tie,controlAdapterAutoConfigToggled:g6,pendingControlImagesCleared:Pie,controlAdapterModelCleared:Rx}=XD.actions,kie=XD.reducer,Iie=ai(xie,Cie,wie),xLe={any:"Any","sd-1":"Stable Diffusion 1.x","sd-2":"Stable Diffusion 2.x",sdxl:"Stable Diffusion XL","sdxl-refiner":"Stable Diffusion XL Refiner"},wLe={any:"Any","sd-1":"SD1","sd-2":"SD2",sdxl:"SDXL","sdxl-refiner":"SDXLR"},Mie={any:{maxClip:0,markers:[]},"sd-1":{maxClip:12,markers:[0,1,2,3,4,8,12]},"sd-2":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},sdxl:{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},"sdxl-refiner":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]}},CLe={lycoris:"LyCORIS",diffusers:"Diffusers"},Rie=0,dp=4294967295;var at;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(at||(at={}));var f5;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(f5||(f5={}));const he=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zs=e=>{switch(typeof e){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(e)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(e)?he.array:e===null?he.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?he.promise:typeof Map<"u"&&e instanceof Map?he.map:typeof Set<"u"&&e instanceof Set?he.set:typeof Date<"u"&&e instanceof Date?he.date:he.object;default:return he.unknown}},ie=at.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Oie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Po extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;ln.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Po.create=e=>new Po(e);const tg=(e,t)=>{let n;switch(e.code){case ie.invalid_type:e.received===he.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case ie.invalid_union:n="Invalid input";break;case ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case ie.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:n="Invalid function arguments";break;case ie.invalid_return_type:n="Invalid function return type";break;case ie.invalid_date:n="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ie.custom:n="Invalid input";break;case ie.invalid_intersection_types:n="Intersection results could not be merged";break;case ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let QD=tg;function $ie(e){QD=e}function o1(){return QD}const a1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},Nie=[];function ye(e,t){const n=a1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,o1(),tg].filter(r=>!!r)});e.common.issues.push(n)}class _r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ne;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return _r.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ne;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Ne=Object.freeze({status:"aborted"}),YD=e=>({status:"dirty",value:e}),Dr=e=>({status:"valid",value:e}),h5=e=>e.status==="aborted",p5=e=>e.status==="dirty",ng=e=>e.status==="valid",s1=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ke||(ke={}));class _a{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const m6=(e,t)=>{if(ng(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Po(e.common.issues);return this._error=n,this._error}}};function Le(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Zs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new _r,ctx:{common:t.parent.common,data:t.data,parsedType:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(s1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},o=this._parseSync({data:t,path:i.path,parent:i});return m6(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Zs(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(s1(i)?i:Promise.resolve(i));return m6(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:ie.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new $o({schema:this,typeName:Me.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return rs.create(this,this._def)}nullable(){return rc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ko.create(this,this._def)}promise(){return hf.create(this,this._def)}or(t){return ag.create([this,t],this._def)}and(t){return sg.create(this,t,this._def)}transform(t){return new $o({...Le(this._def),schema:this,typeName:Me.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...Le(this._def),innerType:this,defaultValue:n,typeName:Me.ZodDefault})}brand(){return new JD({typeName:Me.ZodBranded,type:this,...Le(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new d1({...Le(this._def),innerType:this,catchValue:n,typeName:Me.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return vm.create(this,t)}readonly(){return h1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Die=/^c[^\s-]{8,}$/i,Lie=/^[a-z][a-z0-9]*$/,Fie=/[0-9A-HJKMNP-TV-Z]{26}/,Bie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zie=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jie=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,Vie=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Uie=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Gie=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Hie(e,t){return!!((t==="v4"||!t)&&Vie.test(e)||(t==="v6"||!t)&&Uie.test(e))}class Co extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:ie.invalid_string,...ke.errToObj(r)}),this.nonempty=t=>this.min(1,ke.errToObj(t)),this.trim=()=>new Co({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Co({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Co({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==he.string){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.string,received:o.parsedType}),Ne}const r=new _r;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...ke.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Co({checks:[],typeName:Me.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Le(e)})};function qie(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==he.number){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.number,received:o.parsedType}),Ne}let r;const i=new _r;for(const o of this._def.checks)o.kind==="int"?at.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?qie(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_finite,message:o.message}),i.dirty()):at.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&at.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Me.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Le(e)});class kl extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==he.bigint){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.bigint,received:o.parsedType}),Ne}let r;const i=new _r;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):at.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Me.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Le(e)})};class rg extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==he.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.boolean,received:r.parsedType}),Ne}return Dr(t.data)}}rg.create=e=>new rg({typeName:Me.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Le(e)});class tc extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==he.date){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_type,expected:he.date,received:o.parsedType}),Ne}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ye(o,{code:ie.invalid_date}),Ne}const r=new _r;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):at.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew tc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Me.ZodDate,...Le(e)});class l1 extends Fe{_parse(t){if(this._getType(t)!==he.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.symbol,received:r.parsedType}),Ne}return Dr(t.data)}}l1.create=e=>new l1({typeName:Me.ZodSymbol,...Le(e)});class ig extends Fe{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.undefined,received:r.parsedType}),Ne}return Dr(t.data)}}ig.create=e=>new ig({typeName:Me.ZodUndefined,...Le(e)});class og extends Fe{_parse(t){if(this._getType(t)!==he.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.null,received:r.parsedType}),Ne}return Dr(t.data)}}og.create=e=>new og({typeName:Me.ZodNull,...Le(e)});class ff extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Dr(t.data)}}ff.create=e=>new ff({typeName:Me.ZodAny,...Le(e)});class zu extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Dr(t.data)}}zu.create=e=>new zu({typeName:Me.ZodUnknown,...Le(e)});class gs extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ie.invalid_type,expected:he.never,received:n.parsedType}),Ne}}gs.create=e=>new gs({typeName:Me.ZodNever,...Le(e)});class u1 extends Fe{_parse(t){if(this._getType(t)!==he.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.void,received:r.parsedType}),Ne}return Dr(t.data)}}u1.create=e=>new u1({typeName:Me.ZodVoid,...Le(e)});class ko extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==he.array)return ye(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Ne;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(ye(n,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new _a(n,a,n.path,s)))).then(a=>_r.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new _a(n,a,n.path,s)));return _r.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ko({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new ko({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new ko({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ko.create=(e,t)=>new ko({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Me.ZodArray,...Le(t)});function Hc(e){if(e instanceof Xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=rs.create(Hc(r))}return new Xt({...e._def,shape:()=>t})}else return e instanceof ko?new ko({...e._def,type:Hc(e.element)}):e instanceof rs?rs.create(Hc(e.unwrap())):e instanceof rc?rc.create(Hc(e.unwrap())):e instanceof Sa?Sa.create(e.items.map(t=>Hc(t))):e}class Xt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=at.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==he.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ie.invalid_type,expected:he.object,received:u.parsedType}),Ne}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof gs&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||s.push(u);const l=[];for(const u of a){const c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new _a(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof gs){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(ye(i,{code:ie.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new _a(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>_r.mergeObjectSync(r,u)):_r.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new Xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ke.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Xt({...this._def,unknownKeys:"strip"})}passthrough(){return new Xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Me.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Xt({...this._def,catchall:t})}pick(t){const n={};return at.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Xt({...this._def,shape:()=>n})}omit(t){const n={};return at.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Xt({...this._def,shape:()=>n})}deepPartial(){return Hc(this)}partial(t){const n={};return at.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Xt({...this._def,shape:()=>n})}required(t){const n={};return at.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rs;)o=o._def.innerType;n[r]=o}}),new Xt({...this._def,shape:()=>n})}keyof(){return ZD(at.objectKeys(this.shape))}}Xt.create=(e,t)=>new Xt({shape:()=>e,unknownKeys:"strip",catchall:gs.create(),typeName:Me.ZodObject,...Le(t)});Xt.strictCreate=(e,t)=>new Xt({shape:()=>e,unknownKeys:"strict",catchall:gs.create(),typeName:Me.ZodObject,...Le(t)});Xt.lazycreate=(e,t)=>new Xt({shape:e,unknownKeys:"strip",catchall:gs.create(),typeName:Me.ZodObject,...Le(t)});class ag extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Po(s.ctx.common.issues));return ye(n,{code:ie.invalid_union,unionErrors:a}),Ne}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new Po(l));return ye(n,{code:ie.invalid_union,unionErrors:s}),Ne}}get options(){return this._def.options}}ag.create=(e,t)=>new ag({options:e,typeName:Me.ZodUnion,...Le(t)});const jy=e=>e instanceof ug?jy(e.schema):e instanceof $o?jy(e.innerType()):e instanceof cg?[e.value]:e instanceof Il?e.options:e instanceof dg?Object.keys(e.enum):e instanceof fg?jy(e._def.innerType):e instanceof ig?[void 0]:e instanceof og?[null]:null;class s_ extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.object)return ye(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Ne;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ne)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=jy(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new s_({typeName:Me.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Le(r)})}}function g5(e,t){const n=Zs(e),r=Zs(t);if(e===t)return{valid:!0,data:e};if(n===he.object&&r===he.object){const i=at.objectKeys(t),o=at.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=g5(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===he.array&&r===he.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(h5(o)||h5(a))return Ne;const s=g5(o.value,a.value);return s.valid?((p5(o)||p5(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ie.invalid_intersection_types}),Ne)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}sg.create=(e,t,n)=>new sg({left:e,right:t,typeName:Me.ZodIntersection,...Le(n)});class Sa extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.array)return ye(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Ne;if(r.data.lengththis._def.items.length&&(ye(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new _a(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>_r.mergeArray(n,a)):_r.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Sa({...this._def,rest:t})}}Sa.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Sa({items:e,typeName:Me.ZodTuple,rest:null,...Le(t)})};class lg extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.object)return ye(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Ne;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new _a(r,s,r.path,s)),value:a._parse(new _a(r,r.data[s],r.path,s))});return r.common.async?_r.mergeObjectAsync(n,i):_r.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new lg({keyType:t,valueType:n,typeName:Me.ZodRecord,...Le(r)}):new lg({keyType:Co.create(),valueType:t,typeName:Me.ZodRecord,...Le(n)})}}class c1 extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.map)return ye(r,{code:ie.invalid_type,expected:he.map,received:r.parsedType}),Ne;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],u)=>({key:i._parse(new _a(r,s,r.path,[u,"key"])),value:o._parse(new _a(r,l,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}c1.create=(e,t,n)=>new c1({valueType:t,keyType:e,typeName:Me.ZodMap,...Le(n)});class nc extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==he.set)return ye(r,{code:ie.invalid_type,expected:he.set,received:r.parsedType}),Ne;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(ye(r,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Ne;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((l,u)=>o._parse(new _a(r,l,r.path,u)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new nc({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new nc({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}nc.create=(e,t)=>new nc({valueType:e,minSize:null,maxSize:null,typeName:Me.ZodSet,...Le(t)});class $d extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.function)return ye(n,{code:ie.invalid_type,expected:he.function,received:n.parsedType}),Ne;function r(s,l){return a1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o1(),tg].filter(u=>!!u),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(s,l){return a1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o1(),tg].filter(u=>!!u),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof hf){const s=this;return Dr(async function(...l){const u=new Po([]),c=await s._def.args.parseAsync(l,o).catch(h=>{throw u.addIssue(r(l,h)),u}),d=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return Dr(function(...l){const u=s._def.args.safeParse(l,o);if(!u.success)throw new Po([r(l,u.error)]);const c=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new Po([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new $d({...this._def,args:Sa.create(t).rest(zu.create())})}returns(t){return new $d({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new $d({args:t||Sa.create([]).rest(zu.create()),returns:n||zu.create(),typeName:Me.ZodFunction,...Le(r)})}}class ug extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Me.ZodLazy,...Le(t)});class cg extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ie.invalid_literal,expected:this._def.value}),Ne}return{status:"valid",value:t.data}}get value(){return this._def.value}}cg.create=(e,t)=>new cg({value:e,typeName:Me.ZodLiteral,...Le(t)});function ZD(e,t){return new Il({values:e,typeName:Me.ZodEnum,...Le(t)})}class Il extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:at.joinValues(r),received:n.parsedType,code:ie.invalid_type}),Ne}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ie.invalid_enum_value,options:r}),Ne}return Dr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Il.create(t)}exclude(t){return Il.create(this.options.filter(n=>!t.includes(n)))}}Il.create=ZD;class dg extends Fe{_parse(t){const n=at.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==he.string&&r.parsedType!==he.number){const i=at.objectValues(n);return ye(r,{expected:at.joinValues(i),received:r.parsedType,code:ie.invalid_type}),Ne}if(n.indexOf(t.data)===-1){const i=at.objectValues(n);return ye(r,{received:r.data,code:ie.invalid_enum_value,options:i}),Ne}return Dr(t.data)}get enum(){return this._def.values}}dg.create=(e,t)=>new dg({values:e,typeName:Me.ZodNativeEnum,...Le(t)});class hf extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==he.promise&&n.common.async===!1)return ye(n,{code:ie.invalid_type,expected:he.promise,received:n.parsedType}),Ne;const r=n.parsedType===he.promise?n.data:Promise.resolve(n.data);return Dr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hf.create=(e,t)=>new hf({type:e,typeName:Me.ZodPromise,...Le(t)});class $o extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ne:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ne:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ng(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ng(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);at.assertNever(i)}}$o.create=(e,t,n)=>new $o({schema:e,typeName:Me.ZodEffects,effect:t,...Le(n)});$o.createWithPreprocess=(e,t,n)=>new $o({schema:t,effect:{type:"preprocess",transform:e},typeName:Me.ZodEffects,...Le(n)});class rs extends Fe{_parse(t){return this._getType(t)===he.undefined?Dr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:Me.ZodOptional,...Le(t)});class rc extends Fe{_parse(t){return this._getType(t)===he.null?Dr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rc.create=(e,t)=>new rc({innerType:e,typeName:Me.ZodNullable,...Le(t)});class fg extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Me.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Le(t)});class d1 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return s1(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Po(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Po(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}d1.create=(e,t)=>new d1({innerType:e,typeName:Me.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Le(t)});class f1 extends Fe{_parse(t){if(this._getType(t)!==he.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ie.invalid_type,expected:he.nan,received:r.parsedType}),Ne}return{status:"valid",value:t.data}}}f1.create=e=>new f1({typeName:Me.ZodNaN,...Le(e)});const Wie=Symbol("zod_brand");class JD extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class vm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ne:o.status==="dirty"?(n.dirty(),YD(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ne:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new vm({in:t,out:n,typeName:Me.ZodPipeline})}}class h1 extends Fe{_parse(t){const n=this._def.innerType._parse(t);return ng(n)&&(n.value=Object.freeze(n.value)),n}}h1.create=(e,t)=>new h1({innerType:e,typeName:Me.ZodReadonly,...Le(t)});const eL=(e,t={},n)=>e?ff.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):ff.create(),Kie={object:Xt.lazycreate};var Me;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Me||(Me={}));const Xie=(e,t={message:`Input not instance of ${e.name}`})=>eL(n=>n instanceof e,t),tL=Co.create,nL=Pl.create,Qie=f1.create,Yie=kl.create,rL=rg.create,Zie=tc.create,Jie=l1.create,eoe=ig.create,toe=og.create,noe=ff.create,roe=zu.create,ioe=gs.create,ooe=u1.create,aoe=ko.create,soe=Xt.create,loe=Xt.strictCreate,uoe=ag.create,coe=s_.create,doe=sg.create,foe=Sa.create,hoe=lg.create,poe=c1.create,goe=nc.create,moe=$d.create,yoe=ug.create,voe=cg.create,boe=Il.create,_oe=dg.create,Soe=hf.create,y6=$o.create,xoe=rs.create,woe=rc.create,Coe=$o.createWithPreprocess,Eoe=vm.create,Aoe=()=>tL().optional(),Toe=()=>nL().optional(),Poe=()=>rL().optional(),koe={string:e=>Co.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>rg.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>tc.create({...e,coerce:!0})},Ioe=Ne;var F=Object.freeze({__proto__:null,defaultErrorMap:tg,setErrorMap:$ie,getErrorMap:o1,makeIssue:a1,EMPTY_PATH:Nie,addIssueToContext:ye,ParseStatus:_r,INVALID:Ne,DIRTY:YD,OK:Dr,isAborted:h5,isDirty:p5,isValid:ng,isAsync:s1,get util(){return at},get objectUtil(){return f5},ZodParsedType:he,getParsedType:Zs,ZodType:Fe,ZodString:Co,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:rg,ZodDate:tc,ZodSymbol:l1,ZodUndefined:ig,ZodNull:og,ZodAny:ff,ZodUnknown:zu,ZodNever:gs,ZodVoid:u1,ZodArray:ko,ZodObject:Xt,ZodUnion:ag,ZodDiscriminatedUnion:s_,ZodIntersection:sg,ZodTuple:Sa,ZodRecord:lg,ZodMap:c1,ZodSet:nc,ZodFunction:$d,ZodLazy:ug,ZodLiteral:cg,ZodEnum:Il,ZodNativeEnum:dg,ZodPromise:hf,ZodEffects:$o,ZodTransformer:$o,ZodOptional:rs,ZodNullable:rc,ZodDefault:fg,ZodCatch:d1,ZodNaN:f1,BRAND:Wie,ZodBranded:JD,ZodPipeline:vm,ZodReadonly:h1,custom:eL,Schema:Fe,ZodSchema:Fe,late:Kie,get ZodFirstPartyTypeKind(){return Me},coerce:koe,any:noe,array:aoe,bigint:Yie,boolean:rL,date:Zie,discriminatedUnion:coe,effect:y6,enum:boe,function:moe,instanceof:Xie,intersection:doe,lazy:yoe,literal:voe,map:poe,nan:Qie,nativeEnum:_oe,never:ioe,null:toe,nullable:woe,number:nL,object:soe,oboolean:Poe,onumber:Toe,optional:xoe,ostring:Aoe,pipeline:Eoe,preprocess:Coe,promise:Soe,record:hoe,set:goe,strictObject:loe,string:tL,symbol:Jie,transformer:y6,tuple:foe,undefined:eoe,union:uoe,unknown:roe,void:ooe,NEVER:Ioe,ZodIssueCode:ie,quotelessJson:Oie,ZodError:Po});const Moe=F.string(),ELe=e=>Moe.safeParse(e).success,Roe=F.string(),ALe=e=>Roe.safeParse(e).success,Ooe=F.string(),TLe=e=>Ooe.safeParse(e).success,$oe=F.string(),PLe=e=>$oe.safeParse(e).success,Noe=F.number().int().min(1),kLe=e=>Noe.safeParse(e).success,Doe=F.number().min(1),ILe=e=>Doe.safeParse(e).success,iL=F.enum(["euler","deis","ddim","ddpm","dpmpp_2s","dpmpp_2m","dpmpp_2m_sde","dpmpp_sde","heun","kdpm_2","lms","pndm","unipc","euler_k","dpmpp_2s_k","dpmpp_2m_k","dpmpp_2m_sde_k","dpmpp_sde_k","heun_k","lms_k","euler_a","kdpm_2_a","lcm"]),MLe=e=>iL.safeParse(e).success,RLe={euler:"Euler",deis:"DEIS",ddim:"DDIM",ddpm:"DDPM",dpmpp_sde:"DPM++ SDE",dpmpp_2s:"DPM++ 2S",dpmpp_2m:"DPM++ 2M",dpmpp_2m_sde:"DPM++ 2M SDE",heun:"Heun",kdpm_2:"KDPM 2",lms:"LMS",pndm:"PNDM",unipc:"UniPC",euler_k:"Euler Karras",dpmpp_sde_k:"DPM++ SDE Karras",dpmpp_2s_k:"DPM++ 2S Karras",dpmpp_2m_k:"DPM++ 2M Karras",dpmpp_2m_sde_k:"DPM++ 2M SDE Karras",heun_k:"Heun Karras",lms_k:"LMS Karras",euler_a:"Euler Ancestral",kdpm_2_a:"KDPM 2 Ancestral",lcm:"LCM"},Loe=F.number().int().min(0).max(dp),OLe=e=>Loe.safeParse(e).success,oL=F.number().multipleOf(8).min(64),$Le=e=>oL.safeParse(e).success,aL=F.number().multipleOf(8).min(64),NLe=e=>aL.safeParse(e).success;F.tuple([oL,aL]);const ql=F.enum(["any","sd-1","sd-2","sdxl","sdxl-refiner"]),l_=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("main")}),DLe=e=>l_.safeParse(e).success,TE=F.object({model_name:F.string().min(1),base_model:F.literal("sdxl-refiner"),model_type:F.literal("main")}),LLe=e=>TE.safeParse(e).success,sL=F.object({model_name:F.string().min(1),base_model:ql,model_type:F.literal("onnx")}),bm=F.union([l_,sL]),lL=F.object({model_name:F.string().min(1),base_model:ql}),FLe=e=>lL.safeParse(e).success,Foe=F.object({model_name:F.string().min(1),base_model:ql}),BLe=e=>Foe.safeParse(e).success,Boe=F.object({model_name:F.string().min(1),base_model:ql}),zLe=e=>Boe.safeParse(e).success,zoe=F.object({model_name:F.string().min(1),base_model:ql}),joe=F.object({model_name:F.string().min(1),base_model:ql}),jLe=e=>joe.safeParse(e).success,VLe=e=>zoe.safeParse(e).success,Voe=F.number().min(0).max(1),ULe=e=>Voe.safeParse(e).success;F.enum(["fp16","fp32"]);const Uoe=F.enum(["ESRGAN","bilinear"]),GLe=e=>Uoe.safeParse(e).success,Goe=F.number().min(1).max(10),HLe=e=>Goe.safeParse(e).success,Hoe=F.number().min(1).max(10),qLe=e=>Hoe.safeParse(e).success,qoe=F.number().min(0).max(1),WLe=e=>qoe.safeParse(e).success;F.enum(["box","gaussian"]);F.enum(["unmasked","mask","edge"]);const Woe=F.boolean(),KLe=e=>Woe.safeParse(e).success&&e!==null&&e!==void 0,PE={hrfStrength:.45,hrfEnabled:!1,hrfMethod:"ESRGAN",cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,perlin:0,positivePrompt:"",negativePrompt:"",scheduler:"euler",maskBlur:16,maskBlurMethod:"box",canvasCoherenceMode:"unmasked",canvasCoherenceSteps:20,canvasCoherenceStrength:.3,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,steps:50,threshold:0,infillTileSize:32,infillPatchmatchDownscaleSize:1,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0,model:null,vae:null,vaePrecision:"fp32",seamlessXAxis:!1,seamlessYAxis:!1,clipSkip:0,shouldUseCpuNoise:!0,shouldShowAdvancedOptions:!1,aspectRatio:null,shouldLockAspectRatio:!1},Koe=PE,uL=qt({name:"generation",initialState:Koe,reducers:{setPositivePrompt:(e,t)=>{e.positivePrompt=t.payload},setNegativePrompt:(e,t)=>{e.negativePrompt=t.payload},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},clampSymmetrySteps:e=>{e.horizontalSymmetrySteps=al(e.horizontalSymmetrySteps,0,e.steps),e.verticalSymmetrySteps=al(e.verticalSymmetrySteps,0,e.steps)},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},toggleSize:e=>{const[t,n]=[e.width,e.height];e.width=n,e.height=t},setScheduler:(e,t)=>{e.scheduler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setSeamlessXAxis:(e,t)=>{e.seamlessXAxis=t.payload},setSeamlessYAxis:(e,t)=>{e.seamlessYAxis=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},resetParametersState:e=>({...e,...PE}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setMaskBlur:(e,t)=>{e.maskBlur=t.payload},setMaskBlurMethod:(e,t)=>{e.maskBlurMethod=t.payload},setCanvasCoherenceMode:(e,t)=>{e.canvasCoherenceMode=t.payload},setCanvasCoherenceSteps:(e,t)=>{e.canvasCoherenceSteps=t.payload},setCanvasCoherenceStrength:(e,t)=>{e.canvasCoherenceStrength=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setInfillTileSize:(e,t)=>{e.infillTileSize=t.payload},setInfillPatchmatchDownscaleSize:(e,t)=>{e.infillPatchmatchDownscaleSize=t.payload},setShouldUseSymmetry:(e,t)=>{e.shouldUseSymmetry=t.payload},setHorizontalSymmetrySteps:(e,t)=>{e.horizontalSymmetrySteps=t.payload},setVerticalSymmetrySteps:(e,t)=>{e.verticalSymmetrySteps=t.payload},initialImageChanged:(e,t)=>{const{image_name:n,width:r,height:i}=t.payload;e.initialImage={imageName:n,width:r,height:i}},modelChanged:(e,t)=>{if(e.model=t.payload,e.model===null)return;const{maxClip:n}=Mie[e.model.base_model];e.clipSkip=al(e.clipSkip,0,n)},vaeSelected:(e,t)=>{e.vae=t.payload},vaePrecisionChanged:(e,t)=>{e.vaePrecision=t.payload},setClipSkip:(e,t)=>{e.clipSkip=t.payload},setHrfStrength:(e,t)=>{e.hrfStrength=t.payload},setHrfEnabled:(e,t)=>{e.hrfEnabled=t.payload},setHrfMethod:(e,t)=>{e.hrfMethod=t.payload},shouldUseCpuNoiseChanged:(e,t)=>{e.shouldUseCpuNoise=t.payload},setAspectRatio:(e,t)=>{const n=t.payload;e.aspectRatio=n,n&&(e.height=Mr(e.width/n,8))},setShouldLockAspectRatio:(e,t)=>{e.shouldLockAspectRatio=t.payload}},extraReducers:e=>{e.addCase(Lre,(t,n)=>{var i;const r=(i=n.payload.sd)==null?void 0:i.defaultModel;if(r&&!t.model){const[o,a,s]=r.split("/"),l=l_.safeParse({model_name:s,base_model:o,model_type:a});l.success&&(t.model=l.data)}}),e.addMatcher(Iie,(t,n)=>{n.payload.type==="t2i_adapter"&&(t.width=Mr(t.width,64),t.height=Mr(t.height,64))})}}),{clampSymmetrySteps:XLe,clearInitialImage:kE,resetParametersState:QLe,resetSeed:YLe,setCfgScale:ZLe,setWidth:v6,setHeight:b6,toggleSize:JLe,setImg2imgStrength:eFe,setInfillMethod:Xoe,setIterations:tFe,setPerlin:nFe,setPositivePrompt:Qoe,setNegativePrompt:rFe,setScheduler:iFe,setMaskBlur:oFe,setMaskBlurMethod:aFe,setCanvasCoherenceMode:sFe,setCanvasCoherenceSteps:lFe,setCanvasCoherenceStrength:uFe,setSeed:cFe,setSeedWeights:dFe,setShouldFitToWidthHeight:fFe,setShouldGenerateVariations:hFe,setShouldRandomizeSeed:pFe,setSteps:gFe,setThreshold:mFe,setInfillTileSize:yFe,setInfillPatchmatchDownscaleSize:vFe,setVariationAmount:bFe,setShouldUseSymmetry:_Fe,setHorizontalSymmetrySteps:SFe,setVerticalSymmetrySteps:xFe,initialImageChanged:u_,modelChanged:sl,vaeSelected:cL,setSeamlessXAxis:wFe,setSeamlessYAxis:CFe,setClipSkip:EFe,setHrfEnabled:AFe,setHrfStrength:TFe,setHrfMethod:PFe,shouldUseCpuNoiseChanged:kFe,setAspectRatio:Yoe,setShouldLockAspectRatio:IFe,vaePrecisionChanged:MFe}=uL.actions,Zoe=uL.reducer,x0=(e,t,n,r,i,o,a)=>{const s=Math.floor(e/2-(n+i/2)*a),l=Math.floor(t/2-(r+o/2)*a);return{x:s,y:l}},w0=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r,s=Math.min(1,Math.min(o,a));return s||1},RFe=.999,OFe=.1,$Fe=20,C0=.95,NFe=30,DFe=10,Joe=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Rc=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a1?(r.width=s,r.height=Mr(s/o,64)):o<1&&(r.height=s,r.width=Mr(s*o,64)),a=r.width*r.height;return r},eae=e=>({width:Mr(e.width,64),height:Mr(e.height,64)}),LFe=[{label:"Base",value:"base"},{label:"Mask",value:"mask"}],FFe=[{label:"None",value:"none"},{label:"Auto",value:"auto"},{label:"Manual",value:"manual"}],dL=e=>e.kind==="line"&&e.layer==="mask",BFe=e=>e.kind==="line"&&e.layer==="base",tae=e=>e.kind==="image"&&e.layer==="base",zFe=e=>e.kind==="fillRect"&&e.layer==="base",jFe=e=>e.kind==="eraseRect"&&e.layer==="base",nae=e=>e.kind==="line";let Er=[],Ta=(e,t)=>{let n=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},l:t||0,lc:0,listen(i,o){return r.lc=n.push(i,o||r.l)/2,()=>{let a=n.indexOf(i);~a&&(n.splice(a,2),r.lc--,r.lc||r.off())}},notify(i){let o=!Er.length;for(let a=0;a(e.events=e.events||{},e.events[n+A0]||(e.events[n+A0]=r(i=>{e.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],o=i.indexOf(t);i.splice(o,1),i.length||(delete e.events[n],e.events[n+A0](),delete e.events[n+A0])}),oae=1e3,aae=(e,t)=>iae(e,r=>{let i=t(r);i&&e.events[E0].push(i)},rae,r=>{let i=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,r()),i(...a));let o=e.off;return e.events[E0]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[E0])a();e.events[E0]=[]}},oae)},()=>{e.listen=i,e.off=o}}),sae=(e,t)=>{Array.isArray(e)||(e=[e]);let n,r=()=>{let o=e.map(a=>a.get());(n===void 0||o.some((a,s)=>a!==n[s]))&&(n=o,i.set(t(...o)))},i=Ta(void 0,Math.max(...e.map(o=>o.l))+1);return aae(i,()=>{let o=e.map(a=>a.listen(r,i.l));return r(),()=>{for(let a of o)a()}}),i};const fL="default",Nn=Ta(fL),lae={listCursor:void 0,listPriority:void 0,selectedQueueItem:void 0,resumeProcessorOnEnqueue:!0},uae=lae,hL=qt({name:"queue",initialState:uae,reducers:{listCursorChanged:(e,t)=>{e.listCursor=t.payload},listPriorityChanged:(e,t)=>{e.listPriority=t.payload},listParamsReset:e=>{e.listCursor=void 0,e.listPriority=void 0},queueItemSelectionToggled:(e,t)=>{e.selectedQueueItem===t.payload?e.selectedQueueItem=void 0:e.selectedQueueItem=t.payload},resumeProcessorOnEnqueueChanged:(e,t)=>{e.resumeProcessorOnEnqueue=t.payload}}}),{listCursorChanged:VFe,listPriorityChanged:UFe,listParamsReset:cae,queueItemSelectionToggled:GFe,resumeProcessorOnEnqueueChanged:HFe}=hL.actions,dae=hL.reducer,pL="%[a-f0-9]{2}",_6=new RegExp("("+pL+")|([^%]+?)","gi"),S6=new RegExp("("+pL+")+","gi");function m5(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],m5(n),m5(r))}function fae(e){try{return decodeURIComponent(e)}catch{let t=e.match(_6)||[];for(let n=1;ne==null,yae=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),y5=Symbol("encodeFragmentIdentifier");function vae(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[_n(t,e),"[",i,"]"].join("")]:[...n,[_n(t,e),"[",_n(i,e),"]=",_n(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[_n(t,e),"[]"].join("")]:[...n,[_n(t,e),"[]=",_n(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[_n(t,e),":list="].join("")]:[...n,[_n(t,e),":list=",_n(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[_n(n,e),t,_n(i,e)].join("")]:[[r,_n(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,_n(t,e)]:[...n,[_n(t,e),"=",_n(r,e)].join("")]}}function bae(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),a=typeof r=="string"&&!o&&Ua(r,e).includes(e.arrayFormatSeparator);r=a?Ua(r,e):r;const s=o||a?r.split(e.arrayFormatSeparator).map(l=>Ua(l,e)):r===null?r:Ua(r,e);i[n]=s};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&Ua(r,e);return}const a=r===null?[]:r.split(e.arrayFormatSeparator).map(s=>Ua(s,e));if(i[n]===void 0){i[n]=a;return}i[n]=[...i[n],...a]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function mL(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function _n(e,t){return t.encode?t.strict?yae(e):encodeURIComponent(e):e}function Ua(e,t){return t.decode?pae(e):e}function yL(e){return Array.isArray(e)?e.sort():typeof e=="object"?yL(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function vL(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function _ae(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function x6(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function IE(e){e=vL(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function ME(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},mL(t.arrayFormatSeparator);const n=bae(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replace(/\+/g," "):i;let[a,s]=gL(o,"=");a===void 0&&(a=o),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Ua(s,t),n(Ua(a,t),s,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[a,s]of Object.entries(o))o[a]=x6(s,t);else r[i]=x6(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const a=r[o];return a&&typeof a=="object"&&!Array.isArray(a)?i[o]=yL(a):i[o]=a,i},Object.create(null))}function bL(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},mL(t.arrayFormatSeparator);const n=a=>t.skipNull&&mae(e[a])||t.skipEmptyString&&e[a]==="",r=vae(t),i={};for(const[a,s]of Object.entries(e))n(a)||(i[a]=s);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(a=>{const s=e[a];return s===void 0?"":s===null?_n(a,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?_n(a,t)+"[]":s.reduce(r(a),[]).join("&"):_n(a,t)+"="+_n(s,t)}).filter(a=>a.length>0).join("&")}function _L(e,t){var i;t={decode:!0,...t};let[n,r]=gL(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:ME(IE(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:Ua(r,t)}:{}}}function SL(e,t){t={encode:!0,strict:!0,[y5]:!0,...t};const n=vL(e.url).split("?")[0]||"",r=IE(e.url),i={...ME(r,{sort:!1}),...e.query};let o=bL(i,t);o&&(o=`?${o}`);let a=_ae(e.url);if(e.fragmentIdentifier){const s=new URL(n);s.hash=e.fragmentIdentifier,a=t[y5]?s.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${a}`}function xL(e,t,n){n={parseFragmentIdentifier:!0,[y5]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=_L(e,n);return SL({url:r,query:gae(i,t),fragmentIdentifier:o},n)}function Sae(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return xL(e,r,n)}const fp=Object.freeze(Object.defineProperty({__proto__:null,exclude:Sae,extract:IE,parse:ME,parseUrl:_L,pick:xL,stringify:bL,stringifyUrl:SL},Symbol.toStringTag,{value:"Module"}));var p1=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||navigator.onLine===void 0?!0:navigator.onLine}function Mae(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var A6=Oo;function EL(e,t){if(e===t||!(A6(e)&&A6(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,o=Array.isArray(t)?[]:{},a=0,s=n;a=200&&e.status<=299},Oae=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function P6(e){if(!Oo(e))return e;for(var t=pn({},e),n=0,r=Object.entries(t);n"u"&&s===T6&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(g,b){return y1(t,null,function(){var S,x,w,C,T,A,I,D,M,E,P,N,L,O,R,$,z,V,H,Q,Z,J,j,X,ee,ne,fe,de,Be,$e,Ce,Ke,be,zt,Wn,nn;return p1(this,function(Rt){switch(Rt.label){case 0:return S=b.signal,x=b.getState,w=b.extra,C=b.endpoint,T=b.forced,A=b.type,D=typeof g=="string"?{url:g}:g,M=D.url,E=D.headers,P=E===void 0?new Headers(v.headers):E,N=D.params,L=N===void 0?void 0:N,O=D.responseHandler,R=O===void 0?m??"json":O,$=D.validateStatus,z=$===void 0?_??Rae:$,V=D.timeout,H=V===void 0?p:V,Q=C6(D,["url","headers","params","responseHandler","validateStatus","timeout"]),Z=pn(sa(pn({},v),{signal:S}),Q),P=new Headers(P6(P)),J=Z,[4,o(P,{getState:x,extra:w,endpoint:C,forced:T,type:A})];case 1:J.headers=Rt.sent()||P,j=function(St){return typeof St=="object"&&(Oo(St)||Array.isArray(St)||typeof St.toJSON=="function")},!Z.headers.has("content-type")&&j(Z.body)&&Z.headers.set("content-type",f),j(Z.body)&&c(Z.headers)&&(Z.body=JSON.stringify(Z.body,h)),L&&(X=~M.indexOf("?")?"&":"?",ee=l?l(L):new URLSearchParams(P6(L)),M+=X+ee),M=kae(r,M),ne=new Request(M,Z),fe=ne.clone(),I={request:fe},Be=!1,$e=H&&setTimeout(function(){Be=!0,b.abort()},H),Rt.label=2;case 2:return Rt.trys.push([2,4,5,6]),[4,s(ne)];case 3:return de=Rt.sent(),[3,6];case 4:return Ce=Rt.sent(),[2,{error:{status:Be?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Ce)},meta:I}];case 5:return $e&&clearTimeout($e),[7];case 6:Ke=de.clone(),I.response=Ke,zt="",Rt.label=7;case 7:return Rt.trys.push([7,9,,10]),[4,Promise.all([y(de,R).then(function(St){return be=St},function(St){return Wn=St}),Ke.text().then(function(St){return zt=St},function(){})])];case 8:if(Rt.sent(),Wn)throw Wn;return[3,10];case 9:return nn=Rt.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:de.status,data:zt,error:String(nn)},meta:I}];case 10:return[2,z(de,be)?{data:be,meta:I}:{error:{status:de.status,data:be},meta:I}]}})})};function y(g,b){return y1(this,null,function(){var S;return p1(this,function(x){switch(x.label){case 0:return typeof b=="function"?[2,b(g)]:(b==="content-type"&&(b=c(g.headers)?"json":"text"),b!=="json"?[3,2]:[4,g.text()]);case 1:return S=x.sent(),[2,S.length?JSON.parse(S):null];case 2:return[2,g.text()]}})})}}var k6=function(){function e(t,n){n===void 0&&(n=void 0),this.value=t,this.meta=n}return e}(),RE=ge("__rtkq/focused"),AL=ge("__rtkq/unfocused"),OE=ge("__rtkq/online"),TL=ge("__rtkq/offline"),xa;(function(e){e.query="query",e.mutation="mutation"})(xa||(xa={}));function PL(e){return e.type===xa.query}function Nae(e){return e.type===xa.mutation}function kL(e,t,n,r,i,o){return Dae(e)?e(t,n,r,i).map(v5).map(o):Array.isArray(e)?e.map(v5).map(o):[]}function Dae(e){return typeof e=="function"}function v5(e){return typeof e=="string"?{type:e}:e}function Ox(e){return e!=null}var hg=Symbol("forceQueryFn"),b5=function(e){return typeof e[hg]=="function"};function Lae(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,o=e.context,a=new Map,s=new Map,l=i.internalActions,u=l.unsubscribeQueryResult,c=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:y,buildInitiateMutation:g,getRunningQueryThunk:p,getRunningMutationThunk:m,getRunningQueriesThunk:_,getRunningMutationsThunk:v,getRunningOperationPromises:h,removalWarning:f};function f(){throw new Error(`This method had to be removed due to a conceptual bug in RTK. + Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details. + See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}function h(){typeof process<"u";var b=function(S){return Array.from(S.values()).flatMap(function(x){return x?Object.values(x):[]})};return g1(g1([],b(a)),b(s)).filter(Ox)}function p(b,S){return function(x){var w,C=o.endpointDefinitions[b],T=t({queryArgs:S,endpointDefinition:C,endpointName:b});return(w=a.get(x))==null?void 0:w[T]}}function m(b,S){return function(x){var w;return(w=s.get(x))==null?void 0:w[S]}}function _(){return function(b){return Object.values(a.get(b)||{}).filter(Ox)}}function v(){return function(b){return Object.values(s.get(b)||{}).filter(Ox)}}function y(b,S){var x=function(w,C){var T=C===void 0?{}:C,A=T.subscribe,I=A===void 0?!0:A,D=T.forceRefetch,M=T.subscriptionOptions,E=hg,P=T[E];return function(N,L){var O,R,$=t({queryArgs:w,endpointDefinition:S,endpointName:b}),z=n((O={type:"query",subscribe:I,forceRefetch:D,subscriptionOptions:M,endpointName:b,originalArgs:w,queryCacheKey:$},O[hg]=P,O)),V=i.endpoints[b].select(w),H=N(z),Q=V(L()),Z=H.requestId,J=H.abort,j=Q.requestId!==Z,X=(R=a.get(N))==null?void 0:R[$],ee=function(){return V(L())},ne=Object.assign(P?H.then(ee):j&&!X?Promise.resolve(Q):Promise.all([X,H]).then(ee),{arg:w,requestId:Z,subscriptionOptions:M,queryCacheKey:$,abort:J,unwrap:function(){return y1(this,null,function(){var de;return p1(this,function(Be){switch(Be.label){case 0:return[4,ne];case 1:if(de=Be.sent(),de.isError)throw de.error;return[2,de.data]}})})},refetch:function(){return N(x(w,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){I&&N(u({queryCacheKey:$,requestId:Z}))},updateSubscriptionOptions:function(de){ne.subscriptionOptions=de,N(d({endpointName:b,requestId:Z,queryCacheKey:$,options:de}))}});if(!X&&!j&&!P){var fe=a.get(N)||{};fe[$]=ne,a.set(N,fe),ne.then(function(){delete fe[$],Object.keys(fe).length||a.delete(N)})}return ne}};return x}function g(b){return function(S,x){var w=x===void 0?{}:x,C=w.track,T=C===void 0?!0:C,A=w.fixedCacheKey;return function(I,D){var M=r({type:"mutation",endpointName:b,originalArgs:S,track:T,fixedCacheKey:A}),E=I(M),P=E.requestId,N=E.abort,L=E.unwrap,O=E.unwrap().then(function(V){return{data:V}}).catch(function(V){return{error:V}}),R=function(){I(c({requestId:P,fixedCacheKey:A}))},$=Object.assign(O,{arg:E.arg,requestId:P,abort:N,unwrap:L,unsubscribe:R,reset:R}),z=s.get(I)||{};return s.set(I,z),z[P]=$,$.then(function(){delete z[P],Object.keys(z).length||s.delete(I)}),A&&(z[A]=$,$.then(function(){z[A]===$&&(delete z[A],Object.keys(z).length||s.delete(I))})),$}}}}function I6(e){return e}function Fae(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,o=e.serializeQueryArgs,a=e.api,s=function(g,b,S){return function(x){var w=i[g];x(a.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:b,endpointDefinition:w,endpointName:g}),patches:S}))}},l=function(g,b,S){return function(x,w){var C,T,A=a.endpoints[g].select(b)(w()),I={patches:[],inversePatches:[],undo:function(){return x(a.util.patchQueryData(g,b,I.inversePatches))}};if(A.status===Gt.uninitialized)return I;if("data"in A)if(ei(A.data)){var D=X4(A.data,S),M=D[1],E=D[2];(C=I.patches).push.apply(C,M),(T=I.inversePatches).push.apply(T,E)}else{var P=S(A.data);I.patches.push({op:"replace",path:[],value:P}),I.inversePatches.push({op:"replace",path:[],value:A.data})}return x(a.util.patchQueryData(g,b,I.patches)),I}},u=function(g,b,S){return function(x){var w;return x(a.endpoints[g].initiate(b,(w={subscribe:!1,forceRefetch:!0},w[hg]=function(){return{data:S}},w)))}},c=function(g,b){return y1(t,[g,b],function(S,x){var w,C,T,A,I,D,M,E,P,N,L,O,R,$,z,V,H,Q,Z=x.signal,J=x.abort,j=x.rejectWithValue,X=x.fulfillWithValue,ee=x.dispatch,ne=x.getState,fe=x.extra;return p1(this,function(de){switch(de.label){case 0:w=i[S.endpointName],de.label=1;case 1:return de.trys.push([1,8,,13]),C=I6,T=void 0,A={signal:Z,abort:J,dispatch:ee,getState:ne,extra:fe,endpoint:S.endpointName,type:S.type,forced:S.type==="query"?d(S,ne()):void 0},I=S.type==="query"?S[hg]:void 0,I?(T=I(),[3,6]):[3,2];case 2:return w.query?[4,r(w.query(S.originalArgs),A,w.extraOptions)]:[3,4];case 3:return T=de.sent(),w.transformResponse&&(C=w.transformResponse),[3,6];case 4:return[4,w.queryFn(S.originalArgs,A,w.extraOptions,function(Be){return r(Be,A,w.extraOptions)})];case 5:T=de.sent(),de.label=6;case 6:if(typeof process<"u",T.error)throw new k6(T.error,T.meta);return L=X,[4,C(T.data,T.meta,S.originalArgs)];case 7:return[2,L.apply(void 0,[de.sent(),(H={fulfilledTimeStamp:Date.now(),baseQueryMeta:T.meta},H[ku]=!0,H)])];case 8:if(O=de.sent(),R=O,!(R instanceof k6))return[3,12];$=I6,w.query&&w.transformErrorResponse&&($=w.transformErrorResponse),de.label=9;case 9:return de.trys.push([9,11,,12]),z=j,[4,$(R.value,R.meta,S.originalArgs)];case 10:return[2,z.apply(void 0,[de.sent(),(Q={baseQueryMeta:R.meta},Q[ku]=!0,Q)])];case 11:return V=de.sent(),R=V,[3,12];case 12:throw typeof process<"u",console.error(R),R;case 13:return[2]}})})};function d(g,b){var S,x,w,C,T=(x=(S=b[n])==null?void 0:S.queries)==null?void 0:x[g.queryCacheKey],A=(w=b[n])==null?void 0:w.config.refetchOnMountOrArgChange,I=T==null?void 0:T.fulfilledTimeStamp,D=(C=g.forceRefetch)!=null?C:g.subscribe&&A;return D?D===!0||(Number(new Date)-Number(I))/1e3>=D:!1}var f=Kv(n+"/executeQuery",c,{getPendingMeta:function(){var g;return g={startedTimeStamp:Date.now()},g[ku]=!0,g},condition:function(g,b){var S=b.getState,x,w,C,T=S(),A=(w=(x=T[n])==null?void 0:x.queries)==null?void 0:w[g.queryCacheKey],I=A==null?void 0:A.fulfilledTimeStamp,D=g.originalArgs,M=A==null?void 0:A.originalArgs,E=i[g.endpointName];return b5(g)?!0:(A==null?void 0:A.status)==="pending"?!1:d(g,T)||PL(E)&&((C=E==null?void 0:E.forceRefetch)!=null&&C.call(E,{currentArg:D,previousArg:M,endpointState:A,state:T}))?!0:!I},dispatchConditionRejection:!0}),h=Kv(n+"/executeMutation",c,{getPendingMeta:function(){var g;return g={startedTimeStamp:Date.now()},g[ku]=!0,g}}),p=function(g){return"force"in g},m=function(g){return"ifOlderThan"in g},_=function(g,b,S){return function(x,w){var C=p(S)&&S.force,T=m(S)&&S.ifOlderThan,A=function(E){return E===void 0&&(E=!0),a.endpoints[g].initiate(b,{forceRefetch:E})},I=a.endpoints[g].select(b)(w());if(C)x(A());else if(T){var D=I==null?void 0:I.fulfilledTimeStamp;if(!D){x(A());return}var M=(Number(new Date)-Number(new Date(D)))/1e3>=T;M&&x(A())}else x(A(!1))}};function v(g){return function(b){var S,x;return((x=(S=b==null?void 0:b.meta)==null?void 0:S.arg)==null?void 0:x.endpointName)===g}}function y(g,b){return{matchPending:Pd(Vb(g),v(b)),matchFulfilled:Pd(Gl(g),v(b)),matchRejected:Pd(uf(g),v(b))}}return{queryThunk:f,mutationThunk:h,prefetch:_,updateQueryData:l,upsertQueryData:u,patchQueryData:s,buildMatchThunkActions:y}}function IL(e,t,n,r){return kL(n[e.meta.arg.endpointName][t],Gl(e)?e.payload:void 0,dm(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function T0(e,t,n){var r=e[t];r&&n(r)}function pg(e){var t;return(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)!=null?t:e.requestId}function M6(e,t,n){var r=e[pg(t)];r&&n(r)}var uh={};function Bae(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,o=i.endpointDefinitions,a=i.apiUid,s=i.extractRehydrationInfo,l=i.hasRehydrationInfo,u=e.assertTagType,c=e.config,d=ge(t+"/resetApiState"),f=qt({name:t+"/queries",initialState:uh,reducers:{removeQueryResult:{reducer:function(S,x){var w=x.payload.queryCacheKey;delete S[w]},prepare:Fy()},queryResultPatched:function(S,x){var w=x.payload,C=w.queryCacheKey,T=w.patches;T0(S,C,function(A){A.data=QC(A.data,T.concat())})}},extraReducers:function(S){S.addCase(n.pending,function(x,w){var C=w.meta,T=w.meta.arg,A,I,D=b5(T);(T.subscribe||D)&&((I=x[A=T.queryCacheKey])!=null||(x[A]={status:Gt.uninitialized,endpointName:T.endpointName})),T0(x,T.queryCacheKey,function(M){M.status=Gt.pending,M.requestId=D&&M.requestId?M.requestId:C.requestId,T.originalArgs!==void 0&&(M.originalArgs=T.originalArgs),M.startedTimeStamp=C.startedTimeStamp})}).addCase(n.fulfilled,function(x,w){var C=w.meta,T=w.payload;T0(x,C.arg.queryCacheKey,function(A){var I;if(!(A.requestId!==C.requestId&&!b5(C.arg))){var D=o[C.arg.endpointName].merge;if(A.status=Gt.fulfilled,D)if(A.data!==void 0){var M=C.fulfilledTimeStamp,E=C.arg,P=C.baseQueryMeta,N=C.requestId,L=Ul(A.data,function(O){return D(O,T,{arg:E.originalArgs,baseQueryMeta:P,fulfilledTimeStamp:M,requestId:N})});A.data=L}else A.data=T;else A.data=(I=o[C.arg.endpointName].structuralSharing)==null||I?EL(Nr(A.data)?V4(A.data):A.data,T):T;delete A.error,A.fulfilledTimeStamp=C.fulfilledTimeStamp}})}).addCase(n.rejected,function(x,w){var C=w.meta,T=C.condition,A=C.arg,I=C.requestId,D=w.error,M=w.payload;T0(x,A.queryCacheKey,function(E){if(!T){if(E.requestId!==I)return;E.status=Gt.rejected,E.error=M??D}})}).addMatcher(l,function(x,w){for(var C=s(w).queries,T=0,A=Object.entries(C);T"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lse:sse;OL.useSyncExternalStore=pf.useSyncExternalStore!==void 0?pf.useSyncExternalStore:use;RL.exports=OL;var cse=RL.exports,$L={exports:{}},NL={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var c_=k,dse=cse;function fse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hse=typeof Object.is=="function"?Object.is:fse,pse=dse.useSyncExternalStore,gse=c_.useRef,mse=c_.useEffect,yse=c_.useMemo,vse=c_.useDebugValue;NL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=gse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=yse(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&a.hasValue){var p=a.value;if(i(p,h))return d=p}return d=h}if(p=d,hse(c,h))return p;var m=r(h);return i!==void 0&&i(p,m)?p:(c=h,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=pse(e,o[0],o[1]);return mse(function(){a.hasValue=!0,a.value=s},[s]),vse(s),s};$L.exports=NL;var DL=$L.exports;const bse=Bl(DL);function _se(e){e()}let LL=_se;const Sse=e=>LL=e,xse=()=>LL,F6=Symbol.for("react-redux-context"),B6=typeof globalThis<"u"?globalThis:{};function wse(){var e;if(!k.createContext)return{};const t=(e=B6[F6])!=null?e:B6[F6]=new Map;let n=t.get(k.createContext);return n||(n=k.createContext(null),t.set(k.createContext,n)),n}const Ml=wse();function $E(e=Ml){return function(){return k.useContext(e)}}const FL=$E(),Cse=()=>{throw new Error("uSES not initialized!")};let BL=Cse;const Ese=e=>{BL=e},Ase=(e,t)=>e===t;function Tse(e=Ml){const t=e===Ml?FL:$E(e);return function(r,i={}){const{equalityFn:o=Ase,stabilityCheck:a=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:l,subscription:u,getServerState:c,stabilityCheck:d,noopCheck:f}=t();k.useRef(!0);const h=k.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,a]),p=BL(u.addNestedSub,l.getState,c||l.getState,h,o);return k.useDebugValue(p),p}}const zL=Tse();function v1(){return v1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const z6={notify(){},get:()=>[]};function Bse(e,t){let n,r=z6;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function a(){c.onStateChange&&c.onStateChange()}function s(){return!!n}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=Fse())}function u(){n&&(n(),n=void 0,r.clear(),r=z6)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}const zse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jse=zse?k.useLayoutEffect:k.useEffect;function j6(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function b1(e,t){if(j6(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{const u=Bse(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=k.useMemo(()=>e.getState(),[e]);jse(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,s]);const l=t||Ml;return k.createElement(l.Provider,{value:a},n)}function qL(e=Ml){const t=e===Ml?FL:$E(e);return function(){const{store:r}=t();return r}}const WL=qL();function Use(e=Ml){const t=e===Ml?WL:qL(e);return function(){return t().dispatch}}const KL=Use();Ese(DL.useSyncExternalStoreWithSelector);Sse(pi.unstable_batchedUpdates);var Gse=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;nlle({headers:{...e?{Authorization:`Bearer ${e}`}:{},...n?{"project-id":n}:{}},baseUrl:`${t??""}`}));const hle=["AppVersion","AppConfig","Board","BoardImagesTotal","BoardAssetsTotal","Image","ImageNameList","ImageList","ImageMetadata","ImageMetadataFromFile","IntermediatesCount","SessionQueueItem","SessionQueueStatus","SessionProcessorStatus","CurrentSessionQueueItem","NextSessionQueueItem","BatchStatus","InvocationCacheStatus","Model","T2IAdapterModel","MainModel","OnnxModel","VaeModel","IPAdapterModel","TextualInversionModel","ControlNetModel","LoRAModel","SDXLRefinerModel","Workflow"],Pr="LIST",ple=async(e,t,n)=>{const r=mg.get(),i=gg.get(),o=S1.get();return $ae({baseUrl:`${r??""}/api/v1`,prepareHeaders:s=>(i&&s.set("Authorization",`Bearer ${i}`),o&&s.set("project-id",o),s)})(e,t,n)},No=ole({baseQuery:ple,reducerPath:"api",tagTypes:hle,endpoints:()=>({})}),gle=e=>{const t=e?fp.stringify(e,{arrayFormat:"none"}):void 0;return t?`queue/${Nn.get()}/list?${t}`:`queue/${Nn.get()}/list`},xu=Yi({selectId:e=>e.item_id,sortComparer:(e,t)=>e.priority>t.priority?-1:e.priorityt.item_id?1:0}),ln=No.injectEndpoints({endpoints:e=>({enqueueBatch:e.mutation({query:t=>({url:`queue/${Nn.get()}/enqueue_batch`,body:t,method:"POST"}),invalidatesTags:["SessionQueueStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,M0(r)}catch{}}}),resumeProcessor:e.mutation({query:()=>({url:`queue/${Nn.get()}/processor/resume`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pauseProcessor:e.mutation({query:()=>({url:`queue/${Nn.get()}/processor/pause`,method:"PUT"}),invalidatesTags:["CurrentSessionQueueItem","SessionQueueStatus"]}),pruneQueue:e.mutation({query:()=>({url:`queue/${Nn.get()}/prune`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","BatchStatus"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,M0(r)}catch{}}}),clearQueue:e.mutation({query:()=>({url:`queue/${Nn.get()}/clear`,method:"PUT"}),invalidatesTags:["SessionQueueStatus","SessionProcessorStatus","BatchStatus","CurrentSessionQueueItem","NextSessionQueueItem"],onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,M0(r)}catch{}}}),getCurrentQueueItem:e.query({query:()=>({url:`queue/${Nn.get()}/current`,method:"GET"}),providesTags:t=>{const n=["CurrentSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getNextQueueItem:e.query({query:()=>({url:`queue/${Nn.get()}/next`,method:"GET"}),providesTags:t=>{const n=["NextSessionQueueItem"];return t&&n.push({type:"SessionQueueItem",id:t.item_id}),n}}),getQueueStatus:e.query({query:()=>({url:`queue/${Nn.get()}/status`,method:"GET"}),providesTags:["SessionQueueStatus"]}),getBatchStatus:e.query({query:({batch_id:t})=>({url:`queue/${Nn.get()}/b/${t}/status`,method:"GET"}),providesTags:t=>t?[{type:"BatchStatus",id:t.batch_id}]:[]}),getQueueItem:e.query({query:t=>({url:`queue/${Nn.get()}/i/${t}`,method:"GET"}),providesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id}]:[]}),cancelQueueItem:e.mutation({query:t=>({url:`queue/${Nn.get()}/i/${t}/cancel`,method:"PUT"}),onQueryStarted:async(t,{dispatch:n,queryFulfilled:r})=>{try{const{data:i}=await r;n(ln.util.updateQueryData("listQueueItems",void 0,o=>{xu.updateOne(o,{id:t,changes:{status:i.status,completed_at:i.completed_at,updated_at:i.updated_at}})}))}catch{}},invalidatesTags:t=>t?[{type:"SessionQueueItem",id:t.item_id},{type:"BatchStatus",id:t.batch_id}]:[]}),cancelByBatchIds:e.mutation({query:t=>({url:`queue/${Nn.get()}/cancel_by_batch_ids`,method:"PUT",body:t}),onQueryStarted:async(t,n)=>{const{dispatch:r,queryFulfilled:i}=n;try{await i,M0(r)}catch{}},invalidatesTags:["SessionQueueStatus","BatchStatus"]}),listQueueItems:e.query({query:t=>({url:gle(t),method:"GET"}),serializeQueryArgs:()=>`queue/${Nn.get()}/list`,transformResponse:t=>xu.addMany(xu.getInitialState({has_more:t.has_more}),t.items),merge:(t,n)=>{xu.addMany(t,xu.getSelectors().selectAll(n)),t.has_more=n.has_more},forceRefetch:({currentArg:t,previousArg:n})=>t!==n,keepUnusedDataFor:60*5})})}),{useCancelByBatchIdsMutation:qFe,useEnqueueBatchMutation:WFe,usePauseProcessorMutation:KFe,useResumeProcessorMutation:XFe,useClearQueueMutation:QFe,usePruneQueueMutation:YFe,useGetCurrentQueueItemQuery:ZFe,useGetQueueStatusQuery:JFe,useGetQueueItemQuery:eBe,useGetNextQueueItemQuery:tBe,useListQueueItemsQuery:nBe,useCancelQueueItemMutation:rBe,useGetBatchStatusQuery:iBe}=ln,M0=e=>{e(ln.util.updateQueryData("listQueueItems",void 0,t=>{xu.removeAll(t),t.has_more=!1})),e(cae()),e(ln.endpoints.listQueueItems.initiate(void 0))},Fh={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},XL={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"none",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,futureLayerStates:[],isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Fh,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAntialias:!0,shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush",batchIds:[]},QL=qt({name:"canvas",initialState:XL,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!dL(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{width:r,height:i}=n,{stageDimensions:o}=e,a={width:y0(al(r,64,512),64),height:y0(al(i,64,512),64)},s={x:Mr(r/2-a.width/2,64),y:Mr(i/2-a.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const c=Rc(a);e.scaledBoundingBoxDimensions=c}e.boundingBoxDimensions=a,e.boundingBoxCoordinates=s,e.pastLayerStates.push(Ye(e.layerState)),e.layerState={...Ye(Fh),objects:[{kind:"image",layer:"base",x:0,y:0,width:r,height:i,imageName:n.image_name}]},e.futureLayerStates=[],e.batchIds=[];const l=w0(o.width,o.height,r,i,C0),u=x0(o.width,o.height,0,0,r,i,l);e.stageScale=l,e.stageCoordinates=u},setBoundingBoxDimensions:(e,t)=>{const n=eae(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Rc(n);e.scaledBoundingBoxDimensions=r}},flipBoundingBoxAxes:e=>{const[t,n]=[e.boundingBoxDimensions.width,e.boundingBoxDimensions.height],[r,i]=[e.scaledBoundingBoxDimensions.width,e.scaledBoundingBoxDimensions.height];e.boundingBoxDimensions={width:n,height:t},e.scaledBoundingBoxDimensions={width:i,height:r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=Joe(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},canvasBatchIdAdded:(e,t)=>{e.batchIds.push(t.payload)},canvasBatchIdsReset:e=>{e.batchIds=[]},stagingAreaInitialized:(e,t)=>{const{boundingBox:n}=t.payload;e.layerState.stagingArea={boundingBox:n,images:[],selectedImageIndex:-1}},addImageToStagingArea:(e,t)=>{const n=t.payload;!n||!e.layerState.stagingArea.boundingBox||(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...e.layerState.stagingArea.boundingBox,imageName:n.image_name}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea=Ye(Ye(Fh)).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(nae);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(Ye(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(Ye(e.layerState)),e.layerState=Ye(Fh),e.futureLayerStates=[],e.batchIds=[]},canvasResized:(e,t)=>{const{width:n,height:r}=t.payload,i={width:Math.floor(n),height:Math.floor(r)};if(e.stageDimensions=i,!e.layerState.objects.find(tae)){const o=w0(i.width,i.height,512,512,C0),a=x0(i.width,i.height,0,0,512,512,o),s={width:512,height:512};if(e.stageScale=o,e.stageCoordinates=a,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=s,e.boundingBoxScaleMethod==="auto"){const l=Rc(s);e.scaledBoundingBoxDimensions=l}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:a,y:s,width:l,height:u}=n;if(l!==0&&u!==0){const c=r?1:w0(i,o,l,u,C0),d=x0(i,o,a,s,l,u,c);e.stageScale=c,e.stageCoordinates=d}else{const c=w0(i,o,512,512,C0),d=x0(i,o,0,0,512,512,c),f={width:512,height:512};if(e.stageScale=c,e.stageCoordinates=d,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=f,e.boundingBoxScaleMethod==="auto"){const h=Rc(f);e.scaledBoundingBoxDimensions=h}}},nextStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex+1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t>n?0:t},prevStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex-1,n=e.layerState.stagingArea.images.length-1;e.layerState.stagingArea.selectedImageIndex=t<0?n:t},commitStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(Ye(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const r=t[n];r&&e.layerState.objects.push({...r}),e.layerState.stagingArea=Ye(Fh).stagingArea,e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0,e.batchIds=[]},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:y0(al(o,64,512),64),height:y0(al(a,64,512),64)},l={x:Mr(o/2-s.width/2,64),y:Mr(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=Rc(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Rc(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldAntialias:(e,t)=>{e.shouldAntialias=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(Ye(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}},extraReducers:e=>{e.addCase(i_,(t,n)=>{const r=n.payload.data.batch_status;t.batchIds.includes(r.batch_id)&&r.in_progress===0&&r.pending===0&&(t.batchIds=t.batchIds.filter(i=>i!==r.batch_id))}),e.addCase(Yoe,(t,n)=>{const r=n.payload;r&&(t.boundingBoxDimensions.height=Mr(t.boundingBoxDimensions.width/r,64),t.scaledBoundingBoxDimensions.height=Mr(t.scaledBoundingBoxDimensions.width/r,64))}),e.addMatcher(ln.endpoints.clearQueue.matchFulfilled,t=>{t.batchIds=[]}),e.addMatcher(ln.endpoints.cancelByBatchIds.matchFulfilled,(t,n)=>{t.batchIds=t.batchIds.filter(r=>!n.meta.arg.originalArgs.batch_ids.includes(r))})}}),{addEraseRect:oBe,addFillRect:aBe,addImageToStagingArea:mle,addLine:sBe,addPointToCurrentLine:lBe,clearCanvasHistory:uBe,clearMask:cBe,commitColorPickerColor:dBe,commitStagingAreaImage:yle,discardStagedImages:vle,fitBoundingBoxToStage:fBe,mouseLeftCanvas:hBe,nextStagingAreaImage:pBe,prevStagingAreaImage:gBe,redo:mBe,resetCanvas:zE,resetCanvasInteractionState:yBe,resetCanvasView:vBe,setBoundingBoxCoordinates:bBe,setBoundingBoxDimensions:H6,setBoundingBoxPreviewFill:_Be,setBoundingBoxScaleMethod:SBe,flipBoundingBoxAxes:xBe,setBrushColor:wBe,setBrushSize:CBe,setColorPickerColor:EBe,setCursorPosition:ABe,setInitialCanvasImage:YL,setIsDrawing:TBe,setIsMaskEnabled:PBe,setIsMouseOverBoundingBox:kBe,setIsMoveBoundingBoxKeyHeld:IBe,setIsMoveStageKeyHeld:MBe,setIsMovingBoundingBox:RBe,setIsMovingStage:OBe,setIsTransformingBoundingBox:$Be,setLayer:NBe,setMaskColor:DBe,setMergedCanvas:ble,setShouldAutoSave:LBe,setShouldCropToBoundingBoxOnSave:FBe,setShouldDarkenOutsideBoundingBox:BBe,setShouldLockBoundingBox:zBe,setShouldPreserveMaskedArea:jBe,setShouldShowBoundingBox:VBe,setShouldShowBrush:UBe,setShouldShowBrushPreview:GBe,setShouldShowCanvasDebugInfo:HBe,setShouldShowCheckboardTransparency:qBe,setShouldShowGrid:WBe,setShouldShowIntermediates:KBe,setShouldShowStagingImage:XBe,setShouldShowStagingOutline:QBe,setShouldSnapToGrid:YBe,setStageCoordinates:ZBe,setStageScale:JBe,setTool:eze,toggleShouldLockBoundingBox:tze,toggleTool:nze,undo:rze,setScaledBoundingBoxDimensions:ize,setShouldRestrictStrokesToBox:oze,stagingAreaInitialized:_le,setShouldAntialias:aze,canvasResized:sze,canvasBatchIdAdded:Sle,canvasBatchIdsReset:xle}=QL.actions,wle=QL.reducer,Cle={isModalOpen:!1,imagesToChange:[]},ZL=qt({name:"changeBoardModal",initialState:Cle,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToChangeSelected:(e,t)=>{e.imagesToChange=t.payload},changeBoardReset:e=>{e.imagesToChange=[],e.isModalOpen=!1}}}),{isModalOpenChanged:lze,imagesToChangeSelected:uze,changeBoardReset:cze}=ZL.actions,Ele=ZL.reducer,Ale={imagesToDelete:[],isModalOpen:!1},JL=qt({name:"deleteImageModal",initialState:Ale,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToDeleteSelected:(e,t)=>{e.imagesToDelete=t.payload},imageDeletionCanceled:e=>{e.imagesToDelete=[],e.isModalOpen=!1}}}),{isModalOpenChanged:jE,imagesToDeleteSelected:Tle,imageDeletionCanceled:dze}=JL.actions,Ple=JL.reducer,VE={maxPrompts:100,combinatorial:!0,prompts:[],parsingError:void 0,isError:!1,isLoading:!1,seedBehaviour:"PER_ITERATION"},kle=VE,eF=qt({name:"dynamicPrompts",initialState:kle,reducers:{maxPromptsChanged:(e,t)=>{e.maxPrompts=t.payload},maxPromptsReset:e=>{e.maxPrompts=VE.maxPrompts},combinatorialToggled:e=>{e.combinatorial=!e.combinatorial},promptsChanged:(e,t)=>{e.prompts=t.payload},parsingErrorChanged:(e,t)=>{e.parsingError=t.payload},isErrorChanged:(e,t)=>{e.isError=t.payload},isLoadingChanged:(e,t)=>{e.isLoading=t.payload},seedBehaviourChanged:(e,t)=>{e.seedBehaviour=t.payload}}}),{maxPromptsChanged:Ile,maxPromptsReset:Mle,combinatorialToggled:Rle,promptsChanged:Ole,parsingErrorChanged:$le,isErrorChanged:q6,isLoadingChanged:Fx,seedBehaviourChanged:fze}=eF.actions,Nle=eF.reducer,Ln=["general"],Tr=["control","mask","user","other"],Dle=100,R0=20,Lle=(e,t)=>{const n=new Date(e),r=new Date(t);return n>r?1:n{if(!e)return!1;const n=yg.selectAll(e);if(n.length<=1)return!0;const r=[],i=[];for(let o=0;o=s}else{const o=i[i.length-1];if(!o)return!1;const a=new Date(t.created_at),s=new Date(o.created_at);return a>=s}},Oi=e=>Ln.includes(e.image_category)?Ln:Tr,Dt=Yi({selectId:e=>e.image_name,sortComparer:(e,t)=>e.starred&&!t.starred?-1:!e.starred&&t.starred?1:Lle(t.created_at,e.created_at)}),yg=Dt.getSelectors(),Bi=e=>`images/?${fp.stringify(e,{arrayFormat:"none"})}`,Qe=No.injectEndpoints({endpoints:e=>({listBoards:e.query({query:t=>({url:"boards/",params:t}),providesTags:t=>{const n=[{type:"Board",id:Pr}];return t&&n.push(...t.items.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllBoards:e.query({query:()=>({url:"boards/",params:{all:!0}}),providesTags:t=>{const n=[{type:"Board",id:Pr}];return t&&n.push(...t.map(({board_id:r})=>({type:"Board",id:r}))),n}}),listAllImageNamesForBoard:e.query({query:t=>({url:`boards/${t}/image_names`}),providesTags:(t,n,r)=>[{type:"ImageNameList",id:r}],keepUnusedDataFor:0}),getBoardImagesTotal:e.query({query:t=>({url:Bi({board_id:t??"none",categories:Ln,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardImagesTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),getBoardAssetsTotal:e.query({query:t=>({url:Bi({board_id:t??"none",categories:Tr,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardAssetsTotal",id:r??"none"}],transformResponse:t=>({total:t.total})}),createBoard:e.mutation({query:t=>({url:"boards/",method:"POST",params:{board_name:t}}),invalidatesTags:[{type:"Board",id:Pr}]}),updateBoard:e.mutation({query:({board_id:t,changes:n})=>({url:`boards/${t}`,method:"PATCH",body:n}),invalidatesTags:(t,n,r)=>[{type:"Board",id:r.board_id}]})})}),{useListBoardsQuery:hze,useListAllBoardsQuery:pze,useGetBoardImagesTotalQuery:gze,useGetBoardAssetsTotalQuery:mze,useCreateBoardMutation:yze,useUpdateBoardMutation:vze,useListAllImageNamesForBoardQuery:bze}=Qe;var tF={},M_={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.createLogMethods=void 0;var Fle=function(){return{debug:console.debug.bind(console),error:console.error.bind(console),fatal:console.error.bind(console),info:console.info.bind(console),trace:console.debug.bind(console),warn:console.warn.bind(console)}};R_.createLogMethods=Fle;var UE={},O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.boolean=void 0;const Ble=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};O_.boolean=Ble;var $_={};Object.defineProperty($_,"__esModule",{value:!0});$_.isBooleanable=void 0;const zle=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};$_.isBooleanable=zle;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=O_;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=$_;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(UE);var W6=Object.prototype.toString,nF=function(t){var n=W6.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&W6.call(t.callee)==="[object Function]"),r},Bx,K6;function jle(){if(K6)return Bx;K6=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=nF,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var h=f.constructor;return h&&h.prototype===f},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!u["$"+f]&&t.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),d=function(f){if(typeof window>"u"||!c)return l(f);try{return l(f)}catch{return!1}};e=function(h){var p=h!==null&&typeof h=="object",m=n.call(h)==="[object Function]",_=r(h),v=p&&n.call(h)==="[object String]",y=[];if(!p&&!m&&!_)throw new TypeError("Object.keys called on a non-object");var g=a&&m;if(v&&h.length>0&&!t.call(h,0))for(var b=0;b0)for(var S=0;S"u"||!Fn?qe:Fn(Uint8Array),Vu={"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Oc&&Fn?Fn([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":qc,"%AsyncGenerator%":qc,"%AsyncGeneratorFunction%":qc,"%AsyncIteratorPrototype%":qc,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":iF,"%GeneratorFunction%":qc,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oc&&Fn?Fn(Fn([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oc||!Fn?qe:Fn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oc||!Fn?qe:Fn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oc&&Fn?Fn(""[Symbol.iterator]()):qe,"%Symbol%":Oc?Symbol:qe,"%SyntaxError%":gf,"%ThrowTypeError%":rue,"%TypedArray%":oue,"%TypeError%":Nd,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet};if(Fn)try{null.error}catch(e){var aue=Fn(Fn(e));Vu["%Error.prototype%"]=aue}var sue=function e(t){var n;if(t==="%AsyncFunction%")n=jx("async function () {}");else if(t==="%GeneratorFunction%")n=jx("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=jx("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Fn&&(n=Fn(i.prototype))}return Vu[t]=n,n},J6={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_m=rF,x1=nue,lue=_m.call(Function.call,Array.prototype.concat),uue=_m.call(Function.apply,Array.prototype.splice),eI=_m.call(Function.call,String.prototype.replace),w1=_m.call(Function.call,String.prototype.slice),cue=_m.call(Function.call,RegExp.prototype.exec),due=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fue=/\\(\\)?/g,hue=function(t){var n=w1(t,0,1),r=w1(t,-1);if(n==="%"&&r!=="%")throw new gf("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new gf("invalid intrinsic syntax, expected opening `%`");var i=[];return eI(t,due,function(o,a,s,l){i[i.length]=s?eI(l,fue,"$1"):a||o}),i},pue=function(t,n){var r=t,i;if(x1(J6,r)&&(i=J6[r],r="%"+i[0]+"%"),x1(Vu,r)){var o=Vu[r];if(o===qc&&(o=sue(r)),typeof o>"u"&&!n)throw new Nd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new gf("intrinsic "+t+" does not exist!")},gue=function(t,n){if(typeof t!="string"||t.length===0)throw new Nd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nd('"allowMissing" argument must be a boolean');if(cue(/^%?[^%]*%?$/,t)===null)throw new gf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=hue(t),i=r.length>0?r[0]:"",o=pue("%"+i+"%",n),a=o.name,s=o.value,l=!1,u=o.alias;u&&(i=u[0],uue(r,lue([0,1],u)));for(var c=1,d=!0;c=r.length){var m=ju(s,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[f]}else d=x1(s,f),s=s[f];d&&!l&&(Vu[a]=s)}}return s},mue=gue,_5=mue("%Object.defineProperty%",!0),S5=function(){if(_5)try{return _5({},"a",{value:1}),!0}catch{return!1}return!1};S5.hasArrayLengthDefineBug=function(){if(!S5())return null;try{return _5([],"length",{value:1}).length!==1}catch{return!0}};var yue=S5,vue=Gle,bue=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",_ue=Object.prototype.toString,Sue=Array.prototype.concat,oF=Object.defineProperty,xue=function(e){return typeof e=="function"&&_ue.call(e)==="[object Function]"},wue=yue(),aF=oF&&wue,Cue=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!xue(r)||!r())return}aF?oF(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},sF=function(e,t){var n=arguments.length>2?arguments[2]:{},r=vue(t);bue&&(r=Sue.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i":return t>e;case":<":return t=":return t>=e;case":<=":return t<=e;default:throw new Error("Unimplemented comparison operator: ".concat(n))}};F_.testComparisonRange=Hue;var B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.testRange=void 0;var que=function(e,t){return typeof e=="number"?!(et.max||e===t.max&&!t.maxInclusive):!1};B_.testRange=que;(function(e){var t=Ve&&Ve.__assign||function(){return t=Object.assign||function(c){for(var d,f=1,h=arguments.length;f0?{path:l.path,query:new RegExp("("+l.keywords.map(function(u){return(0,Xue.escapeRegexString)(u.trim())}).join("|")+")")}:{path:l.path}})};z_.highlight=Yue;var j_={},pF={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(Ve,function(){function t(u,c,d){return this.id=++t.highestId,this.name=u,this.symbols=c,this.postprocess=d,this}t.highestId=0,t.prototype.toString=function(u){var c=typeof u>"u"?this.symbols.map(l).join(" "):this.symbols.slice(0,u).map(l).join(" ")+" ● "+this.symbols.slice(u).map(l).join(" ");return this.name+" → "+c};function n(u,c,d,f){this.rule=u,this.dot=c,this.reference=d,this.data=[],this.wantedBy=f,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var c=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return c.left=this,c.right=u,c.isComplete&&(c.data=c.build(),c.right=void 0),c},n.prototype.build=function(){var u=[],c=this;do u.push(c.right.data),c=c.left;while(c.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,a.fail))};function r(u,c){this.grammar=u,this.index=c,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var c=this.states,d=this.wants,f=this.completed,h=0;h0&&c.push(" ^ "+f+" more lines identical to this"),f=0,c.push(" "+m)),d=m}},a.prototype.getSymbolDisplay=function(u){return s(u)},a.prototype.buildFirstStateStack=function(u,c){if(c.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var d=u.wantedBy[0],f=[u].concat(c),h=this.buildFirstStateStack(d,f);return h===null?null:[u].concat(h)},a.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},a.prototype.restore=function(u){var c=u.index;this.current=c,this.table[c]=u,this.table.splice(c+1),this.lexerState=u.lexerState,this.results=this.finish()},a.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},a.prototype.finish=function(){var u=[],c=this.grammar.start,d=this.table[this.table.length-1];return d.states.forEach(function(f){f.rule.name===c&&f.dot===f.rule.symbols.length&&f.reference===0&&f.data!==a.fail&&u.push(f)}),u.map(function(f){return f.data})};function s(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function l(u){var c=typeof u;if(c==="string")return u;if(c==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:a,Grammar:i,Rule:t}})})(pF);var Zue=pF.exports,ic={},gF={},Wl={};Wl.__esModule=void 0;Wl.__esModule=!0;var Jue=typeof Object.setPrototypeOf=="function",ece=typeof Object.getPrototypeOf=="function",tce=typeof Object.defineProperty=="function",nce=typeof Object.create=="function",rce=typeof Object.prototype.hasOwnProperty=="function",ice=function(t,n){Jue?Object.setPrototypeOf(t,n):t.__proto__=n};Wl.setPrototypeOf=ice;var oce=function(t){return ece?Object.getPrototypeOf(t):t.__proto__||t.prototype};Wl.getPrototypeOf=oce;var tI=!1,ace=function e(t,n,r){if(tce&&!tI)try{Object.defineProperty(t,n,r)}catch{tI=!0,e(t,n,r)}else t[n]=r.value};Wl.defineProperty=ace;var mF=function(t,n){return rce?t.hasOwnProperty(t,n):t[n]===void 0};Wl.hasOwnProperty=mF;var sce=function(t,n){if(nce)return Object.create(t,n);var r=function(){};r.prototype=t;var i=new r;if(typeof n>"u")return i;if(typeof n=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof n=="object")for(var o in n)mF(n,o)&&(i[o]=n[o].value);return i};Wl.objectCreate=sce;(function(e){e.__esModule=void 0,e.__esModule=!0;var t=Wl,n=t.setPrototypeOf,r=t.getPrototypeOf,i=t.defineProperty,o=t.objectCreate,a=new Error().toString()==="[object Error]",s="";function l(u){var c=this.constructor,d=c.name||function(){var _=c.toString().match(/^function\s*([^\s(]+)/);return _===null?s||"Error":_[1]}(),f=d==="Error",h=f?s:d,p=Error.apply(this,arguments);if(n(p,r(this)),!(p instanceof c)||!(p instanceof l)){var p=this;Error.apply(this,arguments),i(p,"message",{configurable:!0,enumerable:!1,value:u,writable:!0})}if(i(p,"name",{configurable:!0,enumerable:!1,value:h,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(p,f?l:c),p.stack===void 0){var m=new Error(u);m.name=p.name,p.stack=m.stack}return a&&i(p,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),p}s=l.name||"ExtendableError",l.prototype=o(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),e.ExtendableError=l,e.default=e.ExtendableError})(gF);var yF=Ve&&Ve.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(ic,"__esModule",{value:!0});ic.SyntaxError=ic.LiqeError=void 0;var lce=gF,vF=function(e){yF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(lce.ExtendableError);ic.LiqeError=vF;var uce=function(e){yF(t,e);function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.offset=r,a.line=i,a.column=o,a}return t}(vF);ic.SyntaxError=uce;var qE={},C1=Ve&&Ve.__assign||function(){return C1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$2"]},{name:"comparison_operator$subexpression$1$string$3",symbols:[{literal:":"},{literal:"<"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$3"]},{name:"comparison_operator$subexpression$1$string$4",symbols:[{literal:":"},{literal:">"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$4"]},{name:"comparison_operator$subexpression$1$string$5",symbols:[{literal:":"},{literal:"<"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$5"]},{name:"comparison_operator",symbols:["comparison_operator$subexpression$1"],postprocess:function(e,t){return{location:{start:t,end:t+e[0][0].length},type:"ComparisonOperator",operator:e[0][0]}}},{name:"regex",symbols:["regex_body","regex_flags"],postprocess:function(e){return e.join("")}},{name:"regex_body$ebnf$1",symbols:[]},{name:"regex_body$ebnf$1",symbols:["regex_body$ebnf$1","regex_body_char"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_body",symbols:[{literal:"/"},"regex_body$ebnf$1",{literal:"/"}],postprocess:function(e){return"/"+e[1].join("")+"/"}},{name:"regex_body_char",symbols:[/[^\\]/],postprocess:$a},{name:"regex_body_char",symbols:[{literal:"\\"},/[^\\]/],postprocess:function(e){return"\\"+e[1]}},{name:"regex_flags",symbols:[]},{name:"regex_flags$ebnf$1",symbols:[/[gmiyusd]/]},{name:"regex_flags$ebnf$1",symbols:["regex_flags$ebnf$1",/[gmiyusd]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_flags",symbols:["regex_flags$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"unquoted_value$ebnf$1",symbols:[]},{name:"unquoted_value$ebnf$1",symbols:["unquoted_value$ebnf$1",/[a-zA-Z\.\-_*@#$]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"unquoted_value",symbols:[/[a-zA-Z_*@#$]/,"unquoted_value$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}}],ParserStart:"main"};qE.default=cce;var bF={},V_={},wm={};Object.defineProperty(wm,"__esModule",{value:!0});wm.isSafePath=void 0;var dce=/^(\.(?:[_a-zA-Z][a-zA-Z\d_]*|\0|[1-9]\d*))+$/u,fce=function(e){return dce.test(e)};wm.isSafePath=fce;Object.defineProperty(V_,"__esModule",{value:!0});V_.createGetValueFunctionBody=void 0;var hce=wm,pce=function(e){if(!(0,hce.isSafePath)(e))throw new Error("Unsafe path.");var t="return subject"+e;return t.replace(/(\.(\d+))/g,".[$2]").replace(/\./g,"?.")};V_.createGetValueFunctionBody=pce;(function(e){var t=Ve&&Ve.__assign||function(){return t=Object.assign||function(o){for(var a,s=1,l=arguments.length;s\d+) col (?\d+)/,_ce=function(e){if(e.trim()==="")return{location:{end:0,start:0},type:"EmptyExpression"};var t=new SF.default.Parser(vce),n;try{n=t.feed(e).results}catch(o){if(typeof(o==null?void 0:o.message)=="string"&&typeof(o==null?void 0:o.offset)=="number"){var r=o.message.match(bce);throw r?new gce.SyntaxError("Syntax error at line ".concat(r.groups.line," column ").concat(r.groups.column),o.offset,Number(r.groups.line),Number(r.groups.column)):o}throw o}if(n.length===0)throw new Error("Found no parsings.");if(n.length>1)throw new Error("Ambiguous results.");var i=(0,yce.hydrateAst)(n[0]);return i};j_.parse=_ce;var U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.test=void 0;var Sce=Sm,xce=function(e,t){return(0,Sce.filter)(e,[t]).length===1};U_.test=xce;var xF={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=void 0;var t=function(o,a){return a==="double"?'"'.concat(o,'"'):a==="single"?"'".concat(o,"'"):o},n=function(o){if(o.type==="LiteralExpression")return o.quoted&&typeof o.value=="string"?t(o.value,o.quotes):String(o.value);if(o.type==="RegexExpression")return String(o.value);if(o.type==="RangeExpression"){var a=o.range,s=a.min,l=a.max,u=a.minInclusive,c=a.maxInclusive;return"".concat(u?"[":"{").concat(s," TO ").concat(l).concat(c?"]":"}")}if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")},r=function(o){if(o.type!=="Tag")throw new Error("Expected a tag expression.");var a=o.field,s=o.expression,l=o.operator;if(a.type==="ImplicitField")return n(s);var u=a.quoted?t(a.name,a.quotes):a.name,c=" ".repeat(s.location.start-l.location.end);return u+l.operator+c+n(s)},i=function(o){if(o.type==="ParenthesizedExpression"){if(!("location"in o.expression))throw new Error("Expected location in expression.");if(!o.location.end)throw new Error("Expected location end.");var a=" ".repeat(o.expression.location.start-(o.location.start+1)),s=" ".repeat(o.location.end-o.expression.location.end-1);return"(".concat(a).concat((0,e.serialize)(o.expression)).concat(s,")")}if(o.type==="Tag")return r(o);if(o.type==="LogicalExpression"){var l="";return o.operator.type==="BooleanOperator"?(l+=" ".repeat(o.operator.location.start-o.left.location.end),l+=o.operator.operator,l+=" ".repeat(o.right.location.start-o.operator.location.end)):l=" ".repeat(o.right.location.start-o.left.location.end),"".concat((0,e.serialize)(o.left)).concat(l).concat((0,e.serialize)(o.right))}if(o.type==="UnaryOperator")return(o.operator==="NOT"?"NOT ":o.operator)+(0,e.serialize)(o.operand);if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")};e.serialize=i})(xF);var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.isSafeUnquotedExpression=void 0;var wce=function(e){return/^[#$*@A-Z_a-z][#$*.@A-Z_a-z-]*$/.test(e)};G_.isSafeUnquotedExpression=wce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isSafeUnquotedExpression=e.serialize=e.SyntaxError=e.LiqeError=e.test=e.parse=e.highlight=e.filter=void 0;var t=Sm;Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return t.filter}});var n=z_;Object.defineProperty(e,"highlight",{enumerable:!0,get:function(){return n.highlight}});var r=j_;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.parse}});var i=U_;Object.defineProperty(e,"test",{enumerable:!0,get:function(){return i.test}});var o=ic;Object.defineProperty(e,"LiqeError",{enumerable:!0,get:function(){return o.LiqeError}}),Object.defineProperty(e,"SyntaxError",{enumerable:!0,get:function(){return o.SyntaxError}});var a=xF;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return a.serialize}});var s=G_;Object.defineProperty(e,"isSafeUnquotedExpression",{enumerable:!0,get:function(){return s.isSafeUnquotedExpression}})})(hF);var Cm={},wF={},oc={};Object.defineProperty(oc,"__esModule",{value:!0});oc.ROARR_LOG_FORMAT_VERSION=oc.ROARR_VERSION=void 0;oc.ROARR_VERSION="5.0.0";oc.ROARR_LOG_FORMAT_VERSION="2.0.0";var Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.logLevels=void 0;Em.logLevels={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};var CF={},H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.hasOwnProperty=void 0;const Cce=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);H_.hasOwnProperty=Cce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hasOwnProperty=void 0;var t=H_;Object.defineProperty(e,"hasOwnProperty",{enumerable:!0,get:function(){return t.hasOwnProperty}})})(CF);var EF={},q_={},W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.tokenize=void 0;const Ece=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Ace=e=>{let t;const n=[];let r=0,i=0,o=null;for(;(t=Ece.exec(e))!==null;){t.index>i&&(o={literal:e.slice(i,t.index),type:"literal"},n.push(o));const a=t[0];i=t.index+a.length,a==="\\%"||a==="%%"?o&&o.type==="literal"?o.literal+="%":(o={literal:"%",type:"literal"},n.push(o)):t.groups&&(o={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:a,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(o))}return i<=e.length-1&&(o&&o.type==="literal"?o.literal+=e.slice(i):n.push({literal:e.slice(i),type:"literal"})),n};W_.tokenize=Ace;Object.defineProperty(q_,"__esModule",{value:!0});q_.createPrintf=void 0;const nI=UE,Tce=W_,Pce=(e,t)=>t.placeholder,kce=e=>{var t;const n=(o,a,s)=>s==="-"?o.padEnd(a," "):s==="-+"?((Number(o)>=0?"+":"")+o).padEnd(a," "):s==="+"?((Number(o)>=0?"+":"")+o).padStart(a," "):s==="0"?o.padStart(a,"0"):o.padStart(a," "),r=(t=e==null?void 0:e.formatUnboundExpression)!==null&&t!==void 0?t:Pce,i={};return(o,...a)=>{let s=i[o];s||(s=i[o]=Tce.tokenize(o));let l="";for(const u of s)if(u.type==="literal")l+=u.literal;else{let c=a[u.position];if(c===void 0)l+=r(o,u,a);else if(u.conversion==="b")l+=nI.boolean(c)?"true":"false";else if(u.conversion==="B")l+=nI.boolean(c)?"TRUE":"FALSE";else if(u.conversion==="c")l+=c;else if(u.conversion==="C")l+=String(c).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")c=String(Math.trunc(c)),u.width!==null&&(c=n(c,u.width,u.flag)),l+=c;else if(u.conversion==="e")l+=Number(c).toExponential();else if(u.conversion==="E")l+=Number(c).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(c=Number(c).toFixed(u.precision)),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="o")l+=(Number.parseInt(String(c),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else if(u.conversion==="S")u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=String(c).toUpperCase();else if(u.conversion==="u")l+=Number.parseInt(String(c),10)>>>0;else if(u.conversion==="x")c=(Number.parseInt(String(c),10)>>>0).toString(16),u.width!==null&&(c=n(String(c),u.width,u.flag)),l+=c;else throw new Error("Unknown format specifier.")}return l}};q_.createPrintf=kce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=q_;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(EF);var x5={exports:{}};(function(e,t){const{hasOwnProperty:n}=Object.prototype,r=_();r.configure=_,r.stringify=r,r.default=r,t.stringify=r,t.configure=_,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function o(v){return v.length<5e3&&!i.test(v)?`"${v}"`:JSON.stringify(v)}function a(v){if(v.length>200)return v.sort();for(let y=1;yg;)v[b]=v[b-1],b--;v[b]=g}return v}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(v){return s.call(v)!==void 0&&v.length!==0}function u(v,y,g){v.length= 1`)}return g===void 0?1/0:g}function h(v){return v===1?"1 item":`${v} items`}function p(v){const y=new Set;for(const g of v)(typeof g=="string"||typeof g=="number")&&y.add(String(g));return y}function m(v){if(n.call(v,"strict")){const y=v.strict;if(typeof y!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(y)return g=>{let b=`Object can not safely be stringified. Received type ${typeof g}`;throw typeof g!="function"&&(b+=` (${g.toString()})`),new Error(b)}}}function _(v){v={...v};const y=m(v);y&&(v.bigint===void 0&&(v.bigint=!1),"circularValue"in v||(v.circularValue=Error));const g=c(v),b=d(v,"bigint"),S=d(v,"deterministic"),x=f(v,"maximumDepth"),w=f(v,"maximumBreadth");function C(M,E,P,N,L,O){let R=E[M];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(M)),R=N.call(E,M,R),typeof R){case"string":return o(R);case"object":{if(R===null)return"null";if(P.indexOf(R)!==-1)return g;let $="",z=",";const V=O;if(Array.isArray(R)){if(R.length===0)return"[]";if(xw){const fe=R.length-w-1;$+=`${z}"... ${h(fe)} not stringified"`}return L!==""&&($+=` +${V}`),P.pop(),`[${$}]`}let H=Object.keys(R);const Q=H.length;if(Q===0)return"{}";if(xw){const X=Q-w;$+=`${J}"...":${Z}"${h(X)} not stringified"`,J=z}return L!==""&&J.length>1&&($=` +${O}${$} +${V}`),P.pop(),`{${$}}`}case"number":return isFinite(R)?String(R):y?y(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(b)return String(R);default:return y?y(R):void 0}}function T(M,E,P,N,L,O){switch(typeof E=="object"&&E!==null&&typeof E.toJSON=="function"&&(E=E.toJSON(M)),typeof E){case"string":return o(E);case"object":{if(E===null)return"null";if(P.indexOf(E)!==-1)return g;const R=O;let $="",z=",";if(Array.isArray(E)){if(E.length===0)return"[]";if(xw){const j=E.length-w-1;$+=`${z}"... ${h(j)} not stringified"`}return L!==""&&($+=` +${R}`),P.pop(),`[${$}]`}P.push(E);let V="";L!==""&&(O+=L,z=`, +${O}`,V=" ");let H="";for(const Q of N){const Z=T(Q,E[Q],P,N,L,O);Z!==void 0&&($+=`${H}${o(Q)}:${V}${Z}`,H=z)}return L!==""&&H.length>1&&($=` +${O}${$} +${R}`),P.pop(),`{${$}}`}case"number":return isFinite(E)?String(E):y?y(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(b)return String(E);default:return y?y(E):void 0}}function A(M,E,P,N,L){switch(typeof E){case"string":return o(E);case"object":{if(E===null)return"null";if(typeof E.toJSON=="function"){if(E=E.toJSON(M),typeof E!="object")return A(M,E,P,N,L);if(E===null)return"null"}if(P.indexOf(E)!==-1)return g;const O=L;if(Array.isArray(E)){if(E.length===0)return"[]";if(xw){const ne=E.length-w-1;Z+=`${J}"... ${h(ne)} not stringified"`}return Z+=` +${O}`,P.pop(),`[${Z}]`}let R=Object.keys(E);const $=R.length;if($===0)return"{}";if(xw){const Z=$-w;V+=`${H}"...": "${h(Z)} not stringified"`,H=z}return H!==""&&(V=` +${L}${V} +${O}`),P.pop(),`{${V}}`}case"number":return isFinite(E)?String(E):y?y(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(b)return String(E);default:return y?y(E):void 0}}function I(M,E,P){switch(typeof E){case"string":return o(E);case"object":{if(E===null)return"null";if(typeof E.toJSON=="function"){if(E=E.toJSON(M),typeof E!="object")return I(M,E,P);if(E===null)return"null"}if(P.indexOf(E)!==-1)return g;let N="";if(Array.isArray(E)){if(E.length===0)return"[]";if(xw){const Q=E.length-w-1;N+=`,"... ${h(Q)} not stringified"`}return P.pop(),`[${N}]`}let L=Object.keys(E);const O=L.length;if(O===0)return"{}";if(xw){const z=O-w;N+=`${R}"...":"${h(z)} not stringified"`}return P.pop(),`{${N}}`}case"number":return isFinite(E)?String(E):y?y(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(b)return String(E);default:return y?y(E):void 0}}function D(M,E,P){if(arguments.length>1){let N="";if(typeof P=="number"?N=" ".repeat(Math.min(P,10)):typeof P=="string"&&(N=P.slice(0,10)),E!=null){if(typeof E=="function")return C("",{"":M},[],E,N,"");if(Array.isArray(E))return T("",M,[],p(E),N,"")}if(N.length!==0)return A("",M,[],N,"")}return I("",M,[])}return D}})(x5,x5.exports);var Ice=x5.exports;(function(e){var t=Ve&&Ve.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=void 0;const n=oc,r=Em,i=CF,o=EF,a=t(GE),s=t(Ice);let l=!1;const u=(0,a.default)(),c=()=>u.ROARR,d=()=>({messageContext:{},transforms:[]}),f=()=>{const g=c().asyncLocalStorage;if(!g)throw new Error("AsyncLocalContext is unavailable.");const b=g.getStore();return b||d()},h=()=>!!c().asyncLocalStorage,p=()=>{if(h()){const g=f();return(0,i.hasOwnProperty)(g,"sequenceRoot")&&(0,i.hasOwnProperty)(g,"sequence")&&typeof g.sequence=="number"?String(g.sequenceRoot)+"."+String(g.sequence++):String(c().sequence++)}return String(c().sequence++)},m=(g,b)=>(S,x,w,C,T,A,I,D,M,E)=>{g.child({logLevel:b})(S,x,w,C,T,A,I,D,M,E)},_=1e3,v=(g,b)=>(S,x,w,C,T,A,I,D,M,E)=>{const P=(0,s.default)({a:S,b:x,c:w,d:C,e:T,f:A,g:I,h:D,i:M,j:E,logLevel:b});if(!P)throw new Error("Expected key to be a string");const N=c().onceLog;N.has(P)||(N.add(P),N.size>_&&N.clear(),g.child({logLevel:b})(S,x,w,C,T,A,I,D,M,E))},y=(g,b={},S=[])=>{const x=(w,C,T,A,I,D,M,E,P,N)=>{const L=Date.now(),O=p();let R;h()?R=f():R=d();let $,z;if(typeof w=="string"?$={...R.messageContext,...b}:$={...R.messageContext,...b,...w},typeof w=="string"&&C===void 0)z=w;else if(typeof w=="string"){if(!w.includes("%"))throw new Error("When a string parameter is followed by other arguments, then it is assumed that you are attempting to format a message using printf syntax. You either forgot to add printf bindings or if you meant to add context to the log message, pass them in an object as the first parameter.");z=(0,o.printf)(w,C,T,A,I,D,M,E,P,N)}else{let H=C;if(typeof C!="string")if(C===void 0)H="";else throw new TypeError("Message must be a string. Received "+typeof C+".");z=(0,o.printf)(H,T,A,I,D,M,E,P,N)}let V={context:$,message:z,sequence:O,time:L,version:n.ROARR_LOG_FORMAT_VERSION};for(const H of[...R.transforms,...S])if(V=H(V),typeof V!="object"||V===null)throw new Error("Message transform function must return a message object.");g(V)};return x.child=w=>{let C;return h()?C=f():C=d(),typeof w=="function"?(0,e.createLogger)(g,{...C.messageContext,...b,...w},[w,...S]):(0,e.createLogger)(g,{...C.messageContext,...b,...w},S)},x.getContext=()=>{let w;return h()?w=f():w=d(),{...w.messageContext,...b}},x.adopt=async(w,C)=>{if(!h())return l===!1&&(l=!0,g({context:{logLevel:r.logLevels.warn,package:"roarr"},message:"async_hooks are unavailable; Roarr.adopt will not function as expected",sequence:p(),time:Date.now(),version:n.ROARR_LOG_FORMAT_VERSION})),w();const T=f();let A;(0,i.hasOwnProperty)(T,"sequenceRoot")&&(0,i.hasOwnProperty)(T,"sequence")&&typeof T.sequence=="number"?A=T.sequenceRoot+"."+String(T.sequence++):A=String(c().sequence++);let I={...T.messageContext};const D=[...T.transforms];typeof C=="function"?D.push(C):I={...I,...C};const M=c().asyncLocalStorage;if(!M)throw new Error("Async local context unavailable.");return M.run({messageContext:I,sequence:0,sequenceRoot:A,transforms:D},()=>w())},x.debug=m(x,r.logLevels.debug),x.debugOnce=v(x,r.logLevels.debug),x.error=m(x,r.logLevels.error),x.errorOnce=v(x,r.logLevels.error),x.fatal=m(x,r.logLevels.fatal),x.fatalOnce=v(x,r.logLevels.fatal),x.info=m(x,r.logLevels.info),x.infoOnce=v(x,r.logLevels.info),x.trace=m(x,r.logLevels.trace),x.traceOnce=v(x,r.logLevels.trace),x.warn=m(x,r.logLevels.warn),x.warnOnce=v(x,r.logLevels.warn),x};e.createLogger=y})(wF);var K_={},Mce=function(t,n){for(var r=t.split("."),i=n.split("."),o=0;o<3;o++){var a=Number(r[o]),s=Number(i[o]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return 0},Rce=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(K_,"__esModule",{value:!0});K_.createRoarrInitialGlobalStateBrowser=void 0;const rI=oc,iI=Rce(Mce),Oce=e=>{const t=(e.versions||[]).concat();return t.length>1&&t.sort(iI.default),t.includes(rI.ROARR_VERSION)||t.push(rI.ROARR_VERSION),t.sort(iI.default),{sequence:0,...e,versions:t}};K_.createRoarrInitialGlobalStateBrowser=Oce;var X_={};Object.defineProperty(X_,"__esModule",{value:!0});X_.getLogLevelName=void 0;const $ce=e=>e<=10?"trace":e<=20?"debug":e<=30?"info":e<=40?"warn":e<=50?"error":"fatal";X_.getLogLevelName=$ce;(function(e){var t=Ve&&Ve.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLogLevelName=e.logLevels=e.Roarr=e.ROARR=void 0;const n=wF,r=K_,o=(0,t(GE).default)(),a=(0,r.createRoarrInitialGlobalStateBrowser)(o.ROARR||{});e.ROARR=a,o.ROARR=a;const s=d=>JSON.stringify(d),l=(0,n.createLogger)(d=>{var f;a.write&&a.write(((f=a.serializeMessage)!==null&&f!==void 0?f:s)(d))});e.Roarr=l;var u=Em;Object.defineProperty(e,"logLevels",{enumerable:!0,get:function(){return u.logLevels}});var c=X_;Object.defineProperty(e,"getLogLevelName",{enumerable:!0,get:function(){return c.getLogLevelName}})})(Cm);var Nce=Ve&&Ve.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0?h("%c ".concat(f," %c").concat(c?" [".concat(String(c),"]:"):"","%c ").concat(s.message," %O"),m,_,v,d):h("%c ".concat(f," %c").concat(c?" [".concat(String(c),"]:"):"","%c ").concat(s.message),m,_,v)}}};M_.createLogWriter=Gce;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createLogWriter=void 0;var t=M_;Object.defineProperty(e,"createLogWriter",{enumerable:!0,get:function(){return t.createLogWriter}})})(tF);Cm.ROARR.write=tF.createLogWriter();const TF={};Cm.Roarr.child(TF);const Q_=Ta(Cm.Roarr.child(TF)),ae=e=>Q_.get().child({namespace:e}),_ze=["trace","debug","info","warn","error","fatal"],Sze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},PF=Ta(),kF=F.enum(["Any","BoardField","boolean","BooleanCollection","BooleanPolymorphic","ClipField","Collection","CollectionItem","ColorCollection","ColorField","ColorPolymorphic","ConditioningCollection","ConditioningField","ConditioningPolymorphic","ControlCollection","ControlField","ControlNetModelField","ControlPolymorphic","DenoiseMaskField","enum","float","FloatCollection","FloatPolymorphic","ImageCollection","ImageField","ImagePolymorphic","integer","IntegerCollection","IntegerPolymorphic","IPAdapterCollection","IPAdapterField","IPAdapterModelField","IPAdapterPolymorphic","LatentsCollection","LatentsField","LatentsPolymorphic","LoRAModelField","MainModelField","MetadataField","MetadataCollection","MetadataItemField","MetadataItemCollection","MetadataItemPolymorphic","ONNXModelField","Scheduler","SDXLMainModelField","SDXLRefinerModelField","string","StringCollection","StringPolymorphic","T2IAdapterCollection","T2IAdapterField","T2IAdapterModelField","T2IAdapterPolymorphic","UNetField","VaeField","VaeModelField"]),Hce=F.enum(["WorkflowField","IsIntermediate","MetadataField"]),aI=e=>kF.safeParse(e).success||Hce.safeParse(e).success;F.enum(["connection","direct","any"]);const IF=F.object({id:F.string().trim().min(1),name:F.string().trim().min(1),type:kF}),qce=IF.extend({fieldKind:F.literal("output")}),Ae=IF.extend({fieldKind:F.literal("input"),label:F.string()}),Cs=F.object({model_name:F.string().trim().min(1),base_model:ql}),Nf=F.object({image_name:F.string().trim().min(1)}),Wce=F.object({board_id:F.string().trim().min(1)}),E1=F.object({latents_name:F.string().trim().min(1),seed:F.number().int().optional()}),A1=F.object({conditioning_name:F.string().trim().min(1)}),Kce=F.object({mask_name:F.string().trim().min(1),masked_latents_name:F.string().trim().min(1).optional()}),Xce=Ae.extend({type:F.literal("integer"),value:F.number().int().optional()}),Qce=Ae.extend({type:F.literal("IntegerCollection"),value:F.array(F.number().int()).optional()}),Yce=Ae.extend({type:F.literal("IntegerPolymorphic"),value:F.number().int().optional()}),Zce=Ae.extend({type:F.literal("float"),value:F.number().optional()}),Jce=Ae.extend({type:F.literal("FloatCollection"),value:F.array(F.number()).optional()}),ede=Ae.extend({type:F.literal("FloatPolymorphic"),value:F.number().optional()}),tde=Ae.extend({type:F.literal("string"),value:F.string().optional()}),nde=Ae.extend({type:F.literal("StringCollection"),value:F.array(F.string()).optional()}),rde=Ae.extend({type:F.literal("StringPolymorphic"),value:F.string().optional()}),ide=Ae.extend({type:F.literal("boolean"),value:F.boolean().optional()}),ode=Ae.extend({type:F.literal("BooleanCollection"),value:F.array(F.boolean()).optional()}),ade=Ae.extend({type:F.literal("BooleanPolymorphic"),value:F.boolean().optional()}),sde=Ae.extend({type:F.literal("enum"),value:F.string().optional()}),lde=Ae.extend({type:F.literal("LatentsField"),value:E1.optional()}),ude=Ae.extend({type:F.literal("LatentsCollection"),value:F.array(E1).optional()}),cde=Ae.extend({type:F.literal("LatentsPolymorphic"),value:F.union([E1,F.array(E1)]).optional()}),dde=Ae.extend({type:F.literal("DenoiseMaskField"),value:Kce.optional()}),fde=Ae.extend({type:F.literal("ConditioningField"),value:A1.optional()}),hde=Ae.extend({type:F.literal("ConditioningCollection"),value:F.array(A1).optional()}),pde=Ae.extend({type:F.literal("ConditioningPolymorphic"),value:F.union([A1,F.array(A1)]).optional()}),gde=Cs,vg=F.object({image:Nf,control_model:gde,control_weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),control_mode:F.enum(["balanced","more_prompt","more_control","unbalanced"]).optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),mde=Ae.extend({type:F.literal("ControlField"),value:vg.optional()}),yde=Ae.extend({type:F.literal("ControlPolymorphic"),value:F.union([vg,F.array(vg)]).optional()}),vde=Ae.extend({type:F.literal("ControlCollection"),value:F.array(vg).optional()}),bde=Cs,bg=F.object({image:Nf,ip_adapter_model:bde,weight:F.number(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional()}),_de=Ae.extend({type:F.literal("IPAdapterField"),value:bg.optional()}),Sde=Ae.extend({type:F.literal("IPAdapterPolymorphic"),value:F.union([bg,F.array(bg)]).optional()}),xde=Ae.extend({type:F.literal("IPAdapterCollection"),value:F.array(bg).optional()}),wde=Cs,_g=F.object({image:Nf,t2i_adapter_model:wde,weight:F.union([F.number(),F.array(F.number())]).optional(),begin_step_percent:F.number().optional(),end_step_percent:F.number().optional(),resize_mode:F.enum(["just_resize","crop_resize","fill_resize","just_resize_simple"]).optional()}),Cde=Ae.extend({type:F.literal("T2IAdapterField"),value:_g.optional()}),Ede=Ae.extend({type:F.literal("T2IAdapterPolymorphic"),value:F.union([_g,F.array(_g)]).optional()}),Ade=Ae.extend({type:F.literal("T2IAdapterCollection"),value:F.array(_g).optional()}),Tde=F.enum(["onnx","main","vae","lora","controlnet","embedding"]),Pde=F.enum(["unet","text_encoder","text_encoder_2","tokenizer","tokenizer_2","vae","vae_decoder","vae_encoder","scheduler","safety_checker"]),mf=Cs.extend({model_type:Tde,submodel:Pde.optional()}),MF=mf.extend({weight:F.number().optional()}),kde=F.object({unet:mf,scheduler:mf,loras:F.array(MF)}),Ide=Ae.extend({type:F.literal("UNetField"),value:kde.optional()}),Mde=F.object({tokenizer:mf,text_encoder:mf,skipped_layers:F.number(),loras:F.array(MF)}),Rde=Ae.extend({type:F.literal("ClipField"),value:Mde.optional()}),Ode=F.object({vae:mf}),$de=Ae.extend({type:F.literal("VaeField"),value:Ode.optional()}),Nde=Ae.extend({type:F.literal("ImageField"),value:Nf.optional()}),Dde=Ae.extend({type:F.literal("BoardField"),value:Wce.optional()}),Lde=Ae.extend({type:F.literal("ImagePolymorphic"),value:Nf.optional()}),Fde=Ae.extend({type:F.literal("ImageCollection"),value:F.array(Nf).optional()}),Bde=Ae.extend({type:F.literal("MainModelField"),value:bm.optional()}),zde=Ae.extend({type:F.literal("SDXLMainModelField"),value:bm.optional()}),jde=Ae.extend({type:F.literal("SDXLRefinerModelField"),value:bm.optional()}),RF=Cs,Vde=Ae.extend({type:F.literal("VaeModelField"),value:RF.optional()}),OF=Cs,Ude=Ae.extend({type:F.literal("LoRAModelField"),value:OF.optional()}),Gde=Cs,Hde=Ae.extend({type:F.literal("ControlNetModelField"),value:Gde.optional()}),qde=Cs,Wde=Ae.extend({type:F.literal("IPAdapterModelField"),value:qde.optional()}),Kde=Cs,Xde=Ae.extend({type:F.literal("T2IAdapterModelField"),value:Kde.optional()}),Qde=Ae.extend({type:F.literal("Collection"),value:F.array(F.any()).optional()}),Yde=Ae.extend({type:F.literal("CollectionItem"),value:F.any().optional()}),T1=F.object({label:F.string(),value:F.any()}),Zde=Ae.extend({type:F.literal("MetadataItemField"),value:T1.optional()}),Jde=Ae.extend({type:F.literal("MetadataItemCollection"),value:F.array(T1).optional()}),efe=Ae.extend({type:F.literal("MetadataItemPolymorphic"),value:F.union([T1,F.array(T1)]).optional()}),$F=F.record(F.any()),tfe=Ae.extend({type:F.literal("MetadataField"),value:$F.optional()}),nfe=Ae.extend({type:F.literal("MetadataCollection"),value:F.array($F).optional()}),P1=F.object({r:F.number().int().min(0).max(255),g:F.number().int().min(0).max(255),b:F.number().int().min(0).max(255),a:F.number().int().min(0).max(255)}),rfe=Ae.extend({type:F.literal("ColorField"),value:P1.optional()}),ife=Ae.extend({type:F.literal("ColorCollection"),value:F.array(P1).optional()}),ofe=Ae.extend({type:F.literal("ColorPolymorphic"),value:F.union([P1,F.array(P1)]).optional()}),afe=Ae.extend({type:F.literal("Scheduler"),value:iL.optional()}),sfe=Ae.extend({type:F.literal("Any"),value:F.any().optional()}),lfe=F.discriminatedUnion("type",[sfe,Dde,ode,ide,ade,Rde,Qde,Yde,rfe,ife,ofe,fde,hde,pde,mde,Hde,vde,yde,dde,sde,Jce,Zce,ede,Fde,Lde,Nde,Qce,Yce,Xce,_de,Wde,xde,Sde,lde,ude,cde,Ude,Bde,afe,zde,jde,nde,rde,tde,Cde,Xde,Ade,Ede,Ide,$de,Vde,Zde,Jde,efe,tfe,nfe]),xze=e=>!!(e&&e.fieldKind==="input"),wze=e=>!!(e&&e.fieldKind==="input"),O0=e=>!!(e&&!("$ref"in e)),sI=e=>!!(e&&!("$ref"in e)&&e.type==="array"),$0=e=>!!(e&&!("$ref"in e)&&e.type!=="array"),au=e=>!!(e&&"$ref"in e),ufe=e=>"class"in e&&e.class==="invocation",cfe=e=>"class"in e&&e.class==="output",lI=e=>!("$ref"in e),NF=F.object({lora:OF.deepPartial(),weight:F.number()}),dfe=vg.deepPartial(),ffe=bg.deepPartial(),hfe=_g.deepPartial(),pfe=F.object({app_version:F.string().nullish().catch(null),generation_mode:F.string().nullish().catch(null),created_by:F.string().nullish().catch(null),positive_prompt:F.string().nullish().catch(null),negative_prompt:F.string().nullish().catch(null),width:F.number().int().nullish().catch(null),height:F.number().int().nullish().catch(null),seed:F.number().int().nullish().catch(null),rand_device:F.string().nullish().catch(null),cfg_scale:F.number().nullish().catch(null),steps:F.number().int().nullish().catch(null),scheduler:F.string().nullish().catch(null),clip_skip:F.number().int().nullish().catch(null),model:F.union([l_.deepPartial(),sL.deepPartial()]).nullish().catch(null),controlnets:F.array(dfe).nullish().catch(null),ipAdapters:F.array(ffe).nullish().catch(null),t2iAdapters:F.array(hfe).nullish().catch(null),loras:F.array(NF).nullish().catch(null),vae:RF.nullish().catch(null),strength:F.number().nullish().catch(null),hrf_enabled:F.boolean().nullish().catch(null),hrf_strength:F.number().nullish().catch(null),hrf_method:F.string().nullish().catch(null),init_image:F.string().nullish().catch(null),positive_style_prompt:F.string().nullish().catch(null),negative_style_prompt:F.string().nullish().catch(null),refiner_model:TE.deepPartial().nullish().catch(null),refiner_cfg_scale:F.number().nullish().catch(null),refiner_steps:F.number().int().nullish().catch(null),refiner_scheduler:F.string().nullish().catch(null),refiner_positive_aesthetic_score:F.number().nullish().catch(null),refiner_negative_aesthetic_score:F.number().nullish().catch(null),refiner_start:F.number().nullish().catch(null)}).passthrough(),WE=F.string().refine(e=>{const[t,n,r]=e.split(".");return t!==void 0&&Number.isInteger(Number(t))&&n!==void 0&&Number.isInteger(Number(n))&&r!==void 0&&Number.isInteger(Number(r))}),gfe=WE.transform(e=>{const[t,n,r]=e.split(".");return{major:Number(t),minor:Number(n),patch:Number(r)}}),uI=F.object({id:F.string().trim().min(1),type:F.string().trim().min(1),inputs:F.record(lfe),outputs:F.record(qce),label:F.string(),isOpen:F.boolean(),notes:F.string(),embedWorkflow:F.boolean(),isIntermediate:F.boolean(),useCache:F.boolean().optional(),version:WE.optional()}),mfe=F.preprocess(e=>{var t;try{const n=uI.parse(e);if(!Rne(n,"useCache")){const r=(t=PF.get())==null?void 0:t.getState().nodes.nodeTemplates,i=r==null?void 0:r[n.type];let o=!0;i&&(o=i.useCache),Object.assign(n,{useCache:o})}return n}catch{return e}},uI.extend({useCache:F.boolean()})),yfe=F.object({id:F.string().trim().min(1),type:F.literal("notes"),label:F.string(),isOpen:F.boolean(),notes:F.string()}),DF=F.object({x:F.number(),y:F.number()}).default({x:0,y:0}),k1=F.number().gt(0).nullish(),LF=F.object({id:F.string().trim().min(1),type:F.literal("invocation"),data:mfe,width:k1,height:k1,position:DF}),w5=e=>LF.safeParse(e).success,vfe=F.object({id:F.string().trim().min(1),type:F.literal("notes"),data:yfe,width:k1,height:k1,position:DF}),FF=F.discriminatedUnion("type",[LF,vfe]),bfe=F.object({source:F.string().trim().min(1),sourceHandle:F.string().trim().min(1),target:F.string().trim().min(1),targetHandle:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("default")}),_fe=F.object({source:F.string().trim().min(1),target:F.string().trim().min(1),id:F.string().trim().min(1),type:F.literal("collapsed")}),BF=F.union([bfe,_fe]),Sfe=F.object({nodeId:F.string().trim().min(1),fieldName:F.string().trim().min(1)}),xfe="1.0.0",wfe=F.object({name:F.string().default(""),author:F.string().default(""),description:F.string().default(""),version:F.string().default(""),contact:F.string().default(""),tags:F.string().default(""),notes:F.string().default(""),nodes:F.array(FF).default([]),edges:F.array(BF).default([]),exposedFields:F.array(Sfe).default([]),meta:F.object({version:WE}).default({version:xfe})});wfe.transform(e=>{const{nodes:t,edges:n}=e,r=[],i=t.filter(w5),o=gE(i,"id");return n.forEach((a,s)=>{const l=o[a.source],u=o[a.target],c=[];if(l?a.type==="default"&&!(a.sourceHandle in l.data.outputs)&&c.push(`${ce.t("nodes.outputField")}"${a.source}.${a.sourceHandle}" ${ce.t("nodes.doesNotExist")}`):c.push(`${ce.t("nodes.outputNode")} ${a.source} ${ce.t("nodes.doesNotExist")}`),u?a.type==="default"&&!(a.targetHandle in u.data.inputs)&&c.push(`${ce.t("nodes.inputField")} "${a.target}.${a.targetHandle}" ${ce.t("nodes.doesNotExist")}`):c.push(`${ce.t("nodes.inputNode")} ${a.target} ${ce.t("nodes.doesNotExist")}`),c.length){delete n[s];const d=a.type==="default"?a.sourceHandle:a.source,f=a.type==="default"?a.targetHandle:a.target;r.push({message:`${ce.t("nodes.edge")} "${d} -> ${f}" ${ce.t("nodes.skipped")}`,issues:c,data:a})}}),{workflow:e,warnings:r}});const on=e=>!!(e&&e.type==="invocation"),Cze=e=>!!(e&&!["notes","current_image"].includes(e.type)),cI=e=>!!(e&&e.type==="notes");var wu=(e=>(e[e.PENDING=0]="PENDING",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETED=2]="COMPLETED",e[e.FAILED=3]="FAILED",e))(wu||{});const ue=No.injectEndpoints({endpoints:e=>({listImages:e.query({query:t=>({url:Bi(t),method:"GET"}),providesTags:(t,n,{board_id:r,categories:i})=>[{type:"ImageList",id:Bi({board_id:r,categories:i})}],serializeQueryArgs:({queryArgs:t})=>{const{board_id:n,categories:r}=t;return Bi({board_id:n,categories:r})},transformResponse(t){const{items:n}=t;return Dt.addMany(Dt.getInitialState(),n)},merge:(t,n)=>{Dt.addMany(t,yg.selectAll(n))},forceRefetch({currentArg:t,previousArg:n}){return(t==null?void 0:t.offset)!==(n==null?void 0:n.offset)},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;yg.selectAll(i).forEach(o=>{n(ue.util.upsertQueryData("getImageDTO",o.image_name,o))})}catch{}},keepUnusedDataFor:86400}),getIntermediatesCount:e.query({query:()=>({url:"images/intermediates"}),providesTags:["IntermediatesCount"]}),clearIntermediates:e.mutation({query:()=>({url:"images/intermediates",method:"DELETE"}),invalidatesTags:["IntermediatesCount"]}),getImageDTO:e.query({query:t=>({url:`images/i/${t}`}),providesTags:(t,n,r)=>[{type:"Image",id:r}],keepUnusedDataFor:86400}),getImageMetadata:e.query({query:t=>({url:`images/i/${t}/metadata`}),providesTags:(t,n,r)=>[{type:"ImageMetadata",id:r}],transformResponse:t=>{if(t){const n=pfe.safeParse(t);if(n.success)return n.data;ae("images").warn("Problem parsing metadata")}},keepUnusedDataFor:86400}),deleteImage:e.mutation({query:({image_name:t})=>({url:`images/i/${t}`,method:"DELETE"}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){const{image_name:i,board_id:o}=t,a=Tr.includes(t.image_category),s={board_id:o??"none",categories:Oi(t)},l=[];l.push(n(ue.util.updateQueryData("listImages",s,u=>{Dt.removeOne(u,i)}))),l.push(n(Qe.util.updateQueryData(a?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));try{await r}catch{l.forEach(u=>{u.undo()})}}}),deleteImages:e.mutation({query:({imageDTOs:t})=>({url:"images/delete",method:"POST",body:{image_names:t.map(r=>r.image_name)}}),async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,o=gE(t,"image_name");i.deleted_images.forEach(a=>{const s=o[a];if(s){const l={board_id:s.board_id??"none",categories:Oi(s)};n(ue.util.updateQueryData("listImages",l,c=>{Dt.removeOne(c,a)}));const u=Tr.includes(s.image_category);n(Qe.util.updateQueryData(u?"getBoardAssetsTotal":"getBoardImagesTotal",s.board_id??"none",c=>{c.total=Math.max(c.total-1,0)}))}})}catch{}}}),changeImageIsIntermediate:e.mutation({query:({imageDTO:t,is_intermediate:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{is_intermediate:n}}),async onQueryStarted({imageDTO:t,is_intermediate:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[];a.push(r(ue.util.updateQueryData("getImageDTO",t.image_name,u=>{Object.assign(u,{is_intermediate:n})})));const s=Oi(t),l=Tr.includes(t.image_category);if(n)a.push(r(ue.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:s},u=>{Dt.removeOne(u,t.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",u=>{u.total=Math.max(u.total-1,0)})));else{a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",p=>{p.total+=1})));const u={board_id:t.board_id??"none",categories:s},c=ue.endpoints.listImages.select(u)(o()),{data:d}=Ln.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,t);(f||h)&&a.push(r(ue.util.updateQueryData("listImages",u,p=>{Dt.upsertOne(p,t)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),changeImageSessionId:e.mutation({query:({imageDTO:t,session_id:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{session_id:n}}),async onQueryStarted({imageDTO:t,session_id:n},{dispatch:r,queryFulfilled:i}){const o=[];o.push(r(ue.util.updateQueryData("getImageDTO",t.image_name,a=>{Object.assign(a,{session_id:n})})));try{await i}catch{o.forEach(a=>a.undo())}}}),starImages:e.mutation({query:({imageDTOs:t})=>({url:"images/star",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Oi(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Bi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Oi(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ue.util.updateQueryData("getImageDTO",c,_=>{_.starred=!0}));const d={board_id:l??"none",categories:s},f=ue.endpoints.listImages.select(d)(i()),{data:h}=Ln.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),m=((h==null?void 0:h.total)??0)>=R0?ou(f.data,u):!0;(p||m)&&n(ue.util.updateQueryData("listImages",d,_=>{Dt.upsertOne(_,{...u,starred:!0})}))})}catch{}}}),unstarImages:e.mutation({query:({imageDTOs:t})=>({url:"images/unstar",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{if(r[0]){const i=Oi(r[0]),o=r[0].board_id??void 0;return[{type:"ImageList",id:Bi({board_id:o,categories:i})},{type:"Board",id:o}]}return[]},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,a=t.filter(u=>o.updated_image_names.includes(u.image_name));if(!a[0])return;const s=Oi(a[0]),l=a[0].board_id;a.forEach(u=>{const{image_name:c}=u;n(ue.util.updateQueryData("getImageDTO",c,_=>{_.starred=!1}));const d={board_id:l??"none",categories:s},f=ue.endpoints.listImages.select(d)(i()),{data:h}=Ln.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(l??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),m=((h==null?void 0:h.total)??0)>=R0?ou(f.data,u):!0;(p||m)&&n(ue.util.updateQueryData("listImages",d,_=>{Dt.upsertOne(_,{...u,starred:!1})}))})}catch{}}}),uploadImage:e.mutation({query:({file:t,image_category:n,is_intermediate:r,session_id:i,board_id:o,crop_visible:a})=>{const s=new FormData;return s.append("file",t),{url:"images/upload",method:"POST",body:s,params:{image_category:n,is_intermediate:r,session_id:i,board_id:o==="none"?void 0:o,crop_visible:a}}},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;if(i.is_intermediate)return;n(ue.util.upsertQueryData("getImageDTO",i.image_name,i));const o=Oi(i);n(ue.util.updateQueryData("listImages",{board_id:i.board_id??"none",categories:o},a=>{Dt.addOne(a,i)})),n(Qe.util.updateQueryData("getBoardAssetsTotal",i.board_id??"none",a=>{a.total+=1}))}catch{}}}),deleteBoard:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"Board",id:Pr},{type:"ImageList",id:Bi({board_id:"none",categories:Ln})},{type:"ImageList",id:Bi({board_id:"none",categories:Tr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_board_images:o}=i;o.forEach(l=>{n(ue.util.updateQueryData("getImageDTO",l,u=>{u.board_id=void 0}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,l=>{l.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,l=>{l.total=0}));const a=[{categories:Ln},{categories:Tr}],s=o.map(l=>({id:l,changes:{board_id:void 0}}));a.forEach(l=>{n(ue.util.updateQueryData("listImages",l,u=>{Dt.updateMany(u,s)}))})}catch{}}}),deleteBoardAndImages:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE",params:{include_images:!0}}),invalidatesTags:()=>[{type:"Board",id:Pr},{type:"ImageList",id:Bi({board_id:"none",categories:Ln})},{type:"ImageList",id:Bi({board_id:"none",categories:Tr})}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,{deleted_images:o}=i;[{categories:Ln},{categories:Tr}].forEach(s=>{n(ue.util.updateQueryData("listImages",s,l=>{Dt.removeMany(l,o)}))}),n(Qe.util.updateQueryData("getBoardAssetsTotal",t,s=>{s.total=0})),n(Qe.util.updateQueryData("getBoardImagesTotal",t,s=>{s.total=0}))}catch{}}}),addImageToBoard:e.mutation({query:({board_id:t,imageDTO:n})=>{const{image_name:r}=n;return{url:"board_images/",method:"POST",body:{board_id:t,image_name:r}}},invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r}],async onQueryStarted({board_id:t,imageDTO:n},{dispatch:r,queryFulfilled:i,getState:o}){const a=[],s=Oi(n),l=Tr.includes(n.image_category);if(a.push(r(ue.util.updateQueryData("getImageDTO",n.image_name,u=>{u.board_id=t}))),!n.is_intermediate){a.push(r(ue.util.updateQueryData("listImages",{board_id:n.board_id??"none",categories:s},p=>{Dt.removeOne(p,n.image_name)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",n.board_id??"none",p=>{p.total=Math.max(p.total-1,0)}))),a.push(r(Qe.util.updateQueryData(l?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",p=>{p.total+=1})));const u={board_id:t??"none",categories:s},c=ue.endpoints.listImages.select(u)(o()),{data:d}=Ln.includes(n.image_category)?Qe.endpoints.getBoardImagesTotal.select(n.board_id??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(n.board_id??"none")(o()),f=c.data&&c.data.ids.length>=((d==null?void 0:d.total)??0),h=ou(c.data,n);(f||h)&&a.push(r(ue.util.updateQueryData("listImages",u,p=>{Dt.addOne(p,n)})))}try{await i}catch{a.forEach(u=>u.undo())}}}),removeImageFromBoard:e.mutation({query:({imageDTO:t})=>{const{image_name:n}=t;return{url:"board_images/",method:"DELETE",body:{image_name:n}}},invalidatesTags:(t,n,{imageDTO:r})=>{const{board_id:i}=r;return[{type:"Board",id:i??"none"}]},async onQueryStarted({imageDTO:t},{dispatch:n,queryFulfilled:r,getState:i}){const o=Oi(t),a=[],s=Tr.includes(t.image_category);a.push(n(ue.util.updateQueryData("getImageDTO",t.image_name,h=>{h.board_id=void 0}))),a.push(n(ue.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:o},h=>{Dt.removeOne(h,t.image_name)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal",t.board_id??"none",h=>{h.total=Math.max(h.total-1,0)}))),a.push(n(Qe.util.updateQueryData(s?"getBoardAssetsTotal":"getBoardImagesTotal","none",h=>{h.total+=1})));const l={board_id:"none",categories:o},u=ue.endpoints.listImages.select(l)(i()),{data:c}=Ln.includes(t.image_category)?Qe.endpoints.getBoardImagesTotal.select(t.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(i()),d=u.data&&u.data.ids.length>=((c==null?void 0:c.total)??0),f=ou(u.data,t);(d||f)&&a.push(n(ue.util.updateQueryData("listImages",l,h=>{Dt.upsertOne(h,t)})));try{await r}catch{a.forEach(h=>h.undo())}}}),addImagesToBoard:e.mutation({query:({board_id:t,imageDTOs:n})=>({url:"board_images/batch",method:"POST",body:{image_names:n.map(r=>r.image_name),board_id:t}}),invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r??"none"}],async onQueryStarted({board_id:t,imageDTOs:n},{dispatch:r,queryFulfilled:i,getState:o}){try{const{data:a}=await i,{added_image_names:s}=a;s.forEach(l=>{r(ue.util.updateQueryData("getImageDTO",l,y=>{y.board_id=t==="none"?void 0:t}));const u=n.find(y=>y.image_name===l);if(!u)return;const c=Oi(u),d=u.board_id,f=Tr.includes(u.image_category);r(ue.util.updateQueryData("listImages",{board_id:d??"none",categories:c},y=>{Dt.removeOne(y,u.image_name)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",d??"none",y=>{y.total=Math.max(y.total-1,0)})),r(Qe.util.updateQueryData(f?"getBoardAssetsTotal":"getBoardImagesTotal",t??"none",y=>{y.total+=1}));const h={board_id:t,categories:c},p=ue.endpoints.listImages.select(h)(o()),{data:m}=Ln.includes(u.image_category)?Qe.endpoints.getBoardImagesTotal.select(t??"none")(o()):Qe.endpoints.getBoardAssetsTotal.select(t??"none")(o()),_=p.data&&p.data.ids.length>=((m==null?void 0:m.total)??0),v=((m==null?void 0:m.total)??0)>=R0?ou(p.data,u):!0;(_||v)&&r(ue.util.updateQueryData("listImages",h,y=>{Dt.upsertOne(y,{...u,board_id:t})}))})}catch{}}}),removeImagesFromBoard:e.mutation({query:({imageDTOs:t})=>({url:"board_images/batch/delete",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{const i=[],o=[];return t==null||t.removed_image_names.forEach(a=>{var l;const s=(l=r.find(u=>u.image_name===a))==null?void 0:l.board_id;!s||i.includes(s)||o.push({type:"Board",id:s})}),o},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{removed_image_names:a}=o;a.forEach(s=>{n(ue.util.updateQueryData("getImageDTO",s,_=>{_.board_id=void 0}));const l=t.find(_=>_.image_name===s);if(!l)return;const u=Oi(l),c=Tr.includes(l.image_category);n(ue.util.updateQueryData("listImages",{board_id:l.board_id??"none",categories:u},_=>{Dt.removeOne(_,l.image_name)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal",l.board_id??"none",_=>{_.total=Math.max(_.total-1,0)})),n(Qe.util.updateQueryData(c?"getBoardAssetsTotal":"getBoardImagesTotal","none",_=>{_.total+=1}));const d={board_id:"none",categories:u},f=ue.endpoints.listImages.select(d)(i()),{data:h}=Ln.includes(l.image_category)?Qe.endpoints.getBoardImagesTotal.select(l.board_id??"none")(i()):Qe.endpoints.getBoardAssetsTotal.select(l.board_id??"none")(i()),p=f.data&&f.data.ids.length>=((h==null?void 0:h.total)??0),m=((h==null?void 0:h.total)??0)>=R0?ou(f.data,l):!0;(p||m)&&n(ue.util.updateQueryData("listImages",d,_=>{Dt.upsertOne(_,{...l,board_id:"none"})}))})}catch{}}}),bulkDownloadImages:e.mutation({query:({image_names:t,board_id:n})=>({url:"images/download",method:"POST",body:{image_names:t,board_id:n}})})})}),{useGetIntermediatesCountQuery:Eze,useListImagesQuery:Aze,useLazyListImagesQuery:Tze,useGetImageDTOQuery:Pze,useGetImageMetadataQuery:kze,useDeleteImageMutation:Ize,useDeleteImagesMutation:Mze,useUploadImageMutation:Rze,useClearIntermediatesMutation:Oze,useAddImagesToBoardMutation:$ze,useRemoveImagesFromBoardMutation:Nze,useAddImageToBoardMutation:Dze,useRemoveImageFromBoardMutation:Lze,useChangeImageIsIntermediateMutation:Fze,useChangeImageSessionIdMutation:Bze,useDeleteBoardAndImagesMutation:zze,useDeleteBoardMutation:jze,useStarImagesMutation:Vze,useUnstarImagesMutation:Uze,useBulkDownloadImagesMutation:Gze}=ue,zF={selection:[],shouldAutoSwitch:!0,autoAssignBoardOnClick:!0,autoAddBoardId:"none",galleryImageMinimumWidth:96,selectedBoardId:"none",galleryView:"images",boardSearchText:""},jF=qt({name:"gallery",initialState:zF,reducers:{imageSelected:(e,t)=>{e.selection=t.payload?[t.payload]:[]},selectionChanged:(e,t)=>{e.selection=c5(t.payload,n=>n.image_name)},shouldAutoSwitchChanged:(e,t)=>{e.shouldAutoSwitch=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},autoAssignBoardOnClickChanged:(e,t)=>{e.autoAssignBoardOnClick=t.payload},boardIdSelected:(e,t)=>{e.selectedBoardId=t.payload.boardId,e.galleryView="images"},autoAddBoardIdChanged:(e,t)=>{if(!t.payload){e.autoAddBoardId="none";return}e.autoAddBoardId=t.payload},galleryViewChanged:(e,t)=>{e.galleryView=t.payload},boardSearchTextChanged:(e,t)=>{e.boardSearchText=t.payload}},extraReducers:e=>{e.addMatcher(Efe,(t,n)=>{const r=n.meta.arg.originalArgs;r===t.selectedBoardId&&(t.selectedBoardId="none",t.galleryView="images"),r===t.autoAddBoardId&&(t.autoAddBoardId="none")}),e.addMatcher(Qe.endpoints.listAllBoards.matchFulfilled,(t,n)=>{const r=n.payload;t.autoAddBoardId&&(r.map(i=>i.board_id).includes(t.autoAddBoardId)||(t.autoAddBoardId="none"))})}}),{imageSelected:ha,shouldAutoSwitchChanged:Hze,autoAssignBoardOnClickChanged:qze,setGalleryImageMinimumWidth:Wze,boardIdSelected:I1,autoAddBoardIdChanged:Kze,galleryViewChanged:C5,selectionChanged:VF,boardSearchTextChanged:Xze}=jF.actions,Cfe=jF.reducer,Efe=ai(ue.endpoints.deleteBoard.matchFulfilled,ue.endpoints.deleteBoardAndImages.matchFulfilled),dI={weight:.75},Afe={loras:{}},UF=qt({name:"lora",initialState:Afe,reducers:{loraAdded:(e,t)=>{const{model_name:n,id:r,base_model:i}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,...dI}},loraRecalled:(e,t)=>{const{model_name:n,id:r,base_model:i,weight:o}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,weight:o}},loraRemoved:(e,t)=>{const n=t.payload;delete e.loras[n]},lorasCleared:e=>{e.loras={}},loraWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload,i=e.loras[n];i&&(i.weight=r)},loraWeightReset:(e,t)=>{const n=t.payload,r=e.loras[n];r&&(r.weight=dI.weight)}}}),{loraAdded:Qze,loraRemoved:GF,loraWeightChanged:Yze,loraWeightReset:Zze,lorasCleared:Jze,loraRecalled:eje}=UF.actions,Tfe=UF.reducer;function Ji(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},Pfe=e=>e?fI(e):fI,{useSyncExternalStoreWithSelector:kfe}=bse;function HF(e,t=e.getState,n){const r=kfe(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return k.useDebugValue(r),r}const hI=(e,t)=>{const n=Pfe(e),r=(i,o=t)=>HF(n,i,o);return Object.assign(r,n),r},Ife=(e,t)=>e?hI(e,t):hI;function ri(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{}};function Y_(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Hy.prototype=Y_.prototype={constructor:Hy,on:function(e,t){var n=this._,r=Rfe(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),r=0,i,o;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),gI.hasOwnProperty(t)?{space:gI[t],local:e}:e}function $fe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===E5&&t.documentElement.namespaceURI===E5?t.createElement(e):t.createElementNS(n,e)}}function Nfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qF(e){var t=Z_(e);return(t.local?Nfe:$fe)(t)}function Dfe(){}function KE(e){return e==null?Dfe:function(){return this.querySelector(e)}}function Lfe(e){typeof e!="function"&&(e=KE(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=g&&(g=y+1);!(S=_[g])&&++g=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function lhe(e){e||(e=uhe);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;ot?1:e>=t?0:NaN}function che(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dhe(){return Array.from(this)}function fhe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?whe:typeof t=="function"?Ehe:Che)(e,t,n??"")):yf(this.node(),e)}function yf(e,t){return e.style.getPropertyValue(t)||YF(e).getComputedStyle(e,null).getPropertyValue(t)}function The(e){return function(){delete this[e]}}function Phe(e,t){return function(){this[e]=t}}function khe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ihe(e,t){return arguments.length>1?this.each((t==null?The:typeof t=="function"?khe:Phe)(e,t)):this.node()[e]}function ZF(e){return e.trim().split(/^|\s+/)}function XE(e){return e.classList||new JF(e)}function JF(e){this._node=e,this._names=ZF(e.getAttribute("class")||"")}JF.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function eB(e,t){for(var n=XE(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ipe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n()=>e;function A5(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}A5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ppe(e){return!e.ctrlKey&&!e.button}function gpe(){return this.parentNode}function mpe(e,t){return t??{x:e.x,y:e.y}}function ype(){return navigator.maxTouchPoints||"ontouchstart"in this}function vpe(){var e=ppe,t=gpe,n=mpe,r=ype,i={},o=Y_("start","drag","end"),a=0,s,l,u,c,d=0;function f(b){b.on("mousedown.drag",h).filter(r).on("touchstart.drag",_).on("touchmove.drag",v,hpe).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(b,S){if(!(c||!e.call(this,b,S))){var x=g(this,t.call(this,b,S),b,S,"mouse");x&&(_o(b.view).on("mousemove.drag",p,Sg).on("mouseup.drag",m,Sg),iB(b.view),Gx(b),u=!1,s=b.clientX,l=b.clientY,x("start",b))}}function p(b){if(Dd(b),!u){var S=b.clientX-s,x=b.clientY-l;u=S*S+x*x>d}i.mouse("drag",b)}function m(b){_o(b.view).on("mousemove.drag mouseup.drag",null),oB(b.view,u),Dd(b),i.mouse("end",b)}function _(b,S){if(e.call(this,b,S)){var x=b.changedTouches,w=t.call(this,b,S),C=x.length,T,A;for(T=0;T>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?D0(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?D0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_pe.exec(e))?new Qr(t[1],t[2],t[3],1):(t=Spe.exec(e))?new Qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xpe.exec(e))?D0(t[1],t[2],t[3],t[4]):(t=wpe.exec(e))?D0(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Cpe.exec(e))?xI(t[1],t[2]/100,t[3]/100,1):(t=Epe.exec(e))?xI(t[1],t[2]/100,t[3]/100,t[4]):mI.hasOwnProperty(e)?bI(mI[e]):e==="transparent"?new Qr(NaN,NaN,NaN,0):null}function bI(e){return new Qr(e>>16&255,e>>8&255,e&255,1)}function D0(e,t,n,r){return r<=0&&(e=t=n=NaN),new Qr(e,t,n,r)}function Ppe(e){return e instanceof Tm||(e=Cg(e)),e?(e=e.rgb(),new Qr(e.r,e.g,e.b,e.opacity)):new Qr}function T5(e,t,n,r){return arguments.length===1?Ppe(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}QE(Qr,T5,aB(Tm,{brighter(e){return e=e==null?R1:Math.pow(R1,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xg:Math.pow(xg,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qr(Uu(this.r),Uu(this.g),Uu(this.b),O1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_I,formatHex:_I,formatHex8:kpe,formatRgb:SI,toString:SI}));function _I(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}`}function kpe(){return`#${Mu(this.r)}${Mu(this.g)}${Mu(this.b)}${Mu((isNaN(this.opacity)?1:this.opacity)*255)}`}function SI(){const e=O1(this.opacity);return`${e===1?"rgb(":"rgba("}${Uu(this.r)}, ${Uu(this.g)}, ${Uu(this.b)}${e===1?")":`, ${e})`}`}function O1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mu(e){return e=Uu(e),(e<16?"0":"")+e.toString(16)}function xI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new So(e,t,n,r)}function sB(e){if(e instanceof So)return new So(e.h,e.s,e.l,e.opacity);if(e instanceof Tm||(e=Cg(e)),!e)return new So;if(e instanceof So)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new So(a,s,l,e.opacity)}function Ipe(e,t,n,r){return arguments.length===1?sB(e):new So(e,t,n,r??1)}function So(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}QE(So,Ipe,aB(Tm,{brighter(e){return e=e==null?R1:Math.pow(R1,e),new So(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xg:Math.pow(xg,e),new So(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Qr(Hx(e>=240?e-240:e+120,i,r),Hx(e,i,r),Hx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new So(wI(this.h),L0(this.s),L0(this.l),O1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=O1(this.opacity);return`${e===1?"hsl(":"hsla("}${wI(this.h)}, ${L0(this.s)*100}%, ${L0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wI(e){return e=(e||0)%360,e<0?e+360:e}function L0(e){return Math.max(0,Math.min(1,e||0))}function Hx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const lB=e=>()=>e;function Mpe(e,t){return function(n){return e+n*t}}function Rpe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ope(e){return(e=+e)==1?uB:function(t,n){return n-t?Rpe(t,n,e):lB(isNaN(t)?n:t)}}function uB(e,t){var n=t-e;return n?Mpe(e,n):lB(isNaN(e)?t:e)}const CI=function e(t){var n=Ope(t);function r(i,o){var a=n((i=T5(i)).r,(o=T5(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=uB(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function qs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var P5=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qx=new RegExp(P5.source,"g");function $pe(e){return function(){return e}}function Npe(e){return function(t){return e(t)+""}}function Dpe(e,t){var n=P5.lastIndex=qx.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=P5.exec(e))&&(i=qx.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:qs(r,i)})),n=qx.lastIndex;return n180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:qs(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function s(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:qs(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,h,p){if(u!==d||c!==f){var m=h.push(i(h)+"scale(",null,",",null,")");p.push({i:m-4,x:qs(u,d)},{i:m-2,x:qs(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var p=-1,m=f.length,_;++p=0&&e._call.call(void 0,t),e=e._next;--vf}function TI(){ac=(N1=Eg.now())+J_,vf=Bh=0;try{qpe()}finally{vf=0,Kpe(),ac=0}}function Wpe(){var e=Eg.now(),t=e-N1;t>fB&&(J_-=t,N1=e)}function Kpe(){for(var e,t=$1,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:$1=n);zh=e,I5(r)}function I5(e){if(!vf){Bh&&(Bh=clearTimeout(Bh));var t=e-ac;t>24?(e<1/0&&(Bh=setTimeout(TI,e-Eg.now()-J_)),ch&&(ch=clearInterval(ch))):(ch||(N1=Eg.now(),ch=setInterval(Wpe,fB)),vf=1,hB(TI))}}function PI(e,t,n){var r=new D1;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Xpe=Y_("start","end","cancel","interrupt"),Qpe=[],gB=0,kI=1,M5=2,qy=3,II=4,R5=5,Wy=6;function eS(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Ype(e,n,{name:t,index:r,group:i,on:Xpe,tween:Qpe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gB})}function ZE(e,t){var n=Bo(e,t);if(n.state>gB)throw new Error("too late; already scheduled");return n}function Pa(e,t){var n=Bo(e,t);if(n.state>qy)throw new Error("too late; already running");return n}function Bo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ype(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=pB(o,0,n.time);function o(u){n.state=kI,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==kI)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===qy)return PI(a);h.state===II?(h.state=Wy,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+cM5&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Tge(e,t,n){var r,i,o=Age(t)?ZE:Pa;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function Pge(e,t){var n=this._id;return arguments.length<2?Bo(this.node(),n).on.on(e):this.each(Tge(n,e,t))}function kge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ige(){return this.on("end.remove",kge(this._id))}function Mge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=KE(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a()=>e;function nme(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Za(e,t,n){this.k=e,this.x=t,this.y=n}Za.prototype={constructor:Za,scale:function(e){return e===1?this:new Za(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Za(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vl=new Za(1,0,0);Za.prototype;function Wx(e){e.stopImmediatePropagation()}function dh(e){e.preventDefault(),e.stopImmediatePropagation()}function rme(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ime(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function MI(){return this.__zoom||vl}function ome(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ame(){return navigator.maxTouchPoints||"ontouchstart"in this}function sme(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function lme(){var e=rme,t=ime,n=sme,r=ome,i=ame,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Gpe,u=Y_("start","zoom","end"),c,d,f,h=500,p=150,m=0,_=10;function v(E){E.property("__zoom",MI).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(E,P,N,L){var O=E.selection?E.selection():E;O.property("__zoom",MI),E!==O?S(E,P,N,L):O.interrupt().each(function(){x(this,arguments).event(L).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},v.scaleBy=function(E,P,N,L){v.scaleTo(E,function(){var O=this.__zoom.k,R=typeof P=="function"?P.apply(this,arguments):P;return O*R},N,L)},v.scaleTo=function(E,P,N,L){v.transform(E,function(){var O=t.apply(this,arguments),R=this.__zoom,$=N==null?b(O):typeof N=="function"?N.apply(this,arguments):N,z=R.invert($),V=typeof P=="function"?P.apply(this,arguments):P;return n(g(y(R,V),$,z),O,a)},N,L)},v.translateBy=function(E,P,N,L){v.transform(E,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),a)},null,L)},v.translateTo=function(E,P,N,L,O){v.transform(E,function(){var R=t.apply(this,arguments),$=this.__zoom,z=L==null?b(R):typeof L=="function"?L.apply(this,arguments):L;return n(vl.translate(z[0],z[1]).scale($.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof N=="function"?-N.apply(this,arguments):-N),R,a)},L,O)};function y(E,P){return P=Math.max(o[0],Math.min(o[1],P)),P===E.k?E:new Za(P,E.x,E.y)}function g(E,P,N){var L=P[0]-N[0]*E.k,O=P[1]-N[1]*E.k;return L===E.x&&O===E.y?E:new Za(E.k,L,O)}function b(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function S(E,P,N,L){E.on("start.zoom",function(){x(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(L).end()}).tween("zoom",function(){var O=this,R=arguments,$=x(O,R).event(L),z=t.apply(O,R),V=N==null?b(z):typeof N=="function"?N.apply(O,R):N,H=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),Q=O.__zoom,Z=typeof P=="function"?P.apply(O,R):P,J=l(Q.invert(V).concat(H/Q.k),Z.invert(V).concat(H/Z.k));return function(j){if(j===1)j=Z;else{var X=J(j),ee=H/X[2];j=new Za(ee,V[0]-X[0]*ee,V[1]-X[1]*ee)}$.zoom(null,j)}})}function x(E,P,N){return!N&&E.__zooming||new w(E,P)}function w(E,P){this.that=E,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,P),this.taps=0}w.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,P){return this.mouse&&E!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var P=_o(this.that).datum();u.call(E,this.that,new nme(E,{sourceEvent:this.sourceEvent,target:v,type:E,transform:this.that.__zoom,dispatch:u}),P)}};function C(E,...P){if(!e.apply(this,arguments))return;var N=x(this,P).event(E),L=this.__zoom,O=Math.max(o[0],Math.min(o[1],L.k*Math.pow(2,r.apply(this,arguments)))),R=Qo(E);if(N.wheel)(N.mouse[0][0]!==R[0]||N.mouse[0][1]!==R[1])&&(N.mouse[1]=L.invert(N.mouse[0]=R)),clearTimeout(N.wheel);else{if(L.k===O)return;N.mouse=[R,L.invert(R)],Ky(this),N.start()}dh(E),N.wheel=setTimeout($,p),N.zoom("mouse",n(g(y(L,O),N.mouse[0],N.mouse[1]),N.extent,a));function $(){N.wheel=null,N.end()}}function T(E,...P){if(f||!e.apply(this,arguments))return;var N=E.currentTarget,L=x(this,P,!0).event(E),O=_o(E.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",H,!0),R=Qo(E,N),$=E.clientX,z=E.clientY;iB(E.view),Wx(E),L.mouse=[R,this.__zoom.invert(R)],Ky(this),L.start();function V(Q){if(dh(Q),!L.moved){var Z=Q.clientX-$,J=Q.clientY-z;L.moved=Z*Z+J*J>m}L.event(Q).zoom("mouse",n(g(L.that.__zoom,L.mouse[0]=Qo(Q,N),L.mouse[1]),L.extent,a))}function H(Q){O.on("mousemove.zoom mouseup.zoom",null),oB(Q.view,L.moved),dh(Q),L.event(Q).end()}}function A(E,...P){if(e.apply(this,arguments)){var N=this.__zoom,L=Qo(E.changedTouches?E.changedTouches[0]:E,this),O=N.invert(L),R=N.k*(E.shiftKey?.5:2),$=n(g(y(N,R),L,O),t.apply(this,P),a);dh(E),s>0?_o(this).transition().duration(s).call(S,$,L,E):_o(this).call(v.transform,$,L,E)}}function I(E,...P){if(e.apply(this,arguments)){var N=E.touches,L=N.length,O=x(this,P,E.changedTouches.length===L).event(E),R,$,z,V;for(Wx(E),$=0;$"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},bB=ys.error001();function dn(e,t){const n=k.useContext(tS);if(n===null)throw new Error(bB);return HF(n,e,t)}const qn=()=>{const e=k.useContext(tS);if(e===null)throw new Error(bB);return k.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},cme=e=>e.userSelectionActive?"none":"all";function dme({position:e,children:t,className:n,style:r,...i}){const o=dn(cme),a=`${e}`.split("-");return q.jsx("div",{className:Ji(["react-flow__panel",n,...a]),style:{...r,pointerEvents:o},...i,children:t})}function fme({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:q.jsx(dme,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:q.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const hme=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const d=k.useRef(null),[f,h]=k.useState({x:0,y:0,width:0,height:0}),p=Ji(["react-flow__edge-textwrapper",u]);return k.useEffect(()=>{if(d.current){const m=d.current.getBBox();h({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),typeof n>"u"||!n?null:q.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...c,children:[i&&q.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:o,rx:s,ry:s}),q.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:d,style:r,children:n}),l]})};var pme=k.memo(hme);const eA=e=>({width:e.offsetWidth,height:e.offsetHeight}),bf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),tA=(e={x:0,y:0},t)=>({x:bf(e.x,t[0][0],t[1][0]),y:bf(e.y,t[0][1],t[1][1])}),RI=(e,t,n)=>en?-bf(Math.abs(e-n),1,50)/50:0,_B=(e,t)=>{const n=RI(e.x,35,t.width-35)*20,r=RI(e.y,35,t.height-35)*20;return[n,r]},SB=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},xB=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ag=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),wB=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),OI=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),tje=(e,t)=>wB(xB(Ag(e),Ag(t))),O5=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},gme=e=>qi(e.width)&&qi(e.height)&&qi(e.x)&&qi(e.y),qi=e=>!isNaN(e)&&isFinite(e),Mn=Symbol.for("internals"),CB=["Enter"," ","Escape"],mme=(e,t)=>{},yme=e=>"nativeEvent"in e;function $5(e){var i,o;const t=yme(e)?e.nativeEvent:e,n=((o=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:o[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const EB=e=>"clientX"in e,bl=(e,t)=>{var o,a;const n=EB(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},L1=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},Pm=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h=20})=>q.jsxs(q.Fragment,{children:[q.jsx("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:d,markerStart:f}),h&&q.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&qi(n)&&qi(r)?q.jsx(pme,{x:n,y:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null]});Pm.displayName="BaseEdge";function fh(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(o=>o.id===e);i&&n(r,{...i})}}function AB({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n{const[_,v,y]=PB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return q.jsx(Pm,{path:_,labelX:v,labelY:y,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:m})});nA.displayName="SimpleBezierEdge";const NI={[Te.Left]:{x:-1,y:0},[Te.Right]:{x:1,y:0},[Te.Top]:{x:0,y:-1},[Te.Bottom]:{x:0,y:1}},vme=({source:e,sourcePosition:t=Te.Bottom,target:n})=>t===Te.Left||t===Te.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function bme({source:e,sourcePosition:t=Te.Bottom,target:n,targetPosition:r=Te.Top,center:i,offset:o}){const a=NI[t],s=NI[r],l={x:e.x+a.x*o,y:e.y+a.y*o},u={x:n.x+s.x*o,y:n.y+s.y*o},c=vme({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h=[],p,m;const _={x:0,y:0},v={x:0,y:0},[y,g,b,S]=AB({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){p=i.x||y,m=i.y||g;const w=[{x:p,y:l.y},{x:p,y:u.y}],C=[{x:l.x,y:m},{x:u.x,y:m}];a[d]===f?h=d==="x"?w:C:h=d==="x"?C:w}else{const w=[{x:l.x,y:u.y}],C=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?C:w:h=a.y===f?w:C,t===r){const M=Math.abs(e[d]-n[d]);if(M<=o){const E=Math.min(o-1,o-M);a[d]===f?_[d]=(l[d]>e[d]?-1:1)*E:v[d]=(u[d]>n[d]?-1:1)*E}}if(t!==r){const M=d==="x"?"y":"x",E=a[d]===s[M],P=l[M]>u[M],N=l[M]=D?(p=(T.x+A.x)/2,m=h[0].y):(p=h[0].x,m=(T.y+A.y)/2)}return[[e,{x:l.x+_.x,y:l.y+_.y},...h,{x:u.x+v.x,y:u.y+v.y},n],p,m,b,S]}function _me(e,t,n,r){const i=Math.min(DI(e,t)/2,DI(t,n)/2,r),{x:o,y:a}=t;if(e.x===o&&o===n.x||e.y===a&&a===n.y)return`L${o} ${a}`;if(e.y===a){const u=e.x{let g="";return y>0&&y{const[v,y,g]=N5({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:f,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset});return q.jsx(Pm,{path:v,labelX:y,labelY:g,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:h,markerStart:p,interactionWidth:_})});nS.displayName="SmoothStepEdge";const rA=k.memo(e=>{var t;return q.jsx(nS,{...e,pathOptions:k.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});rA.displayName="StepEdge";function Sme({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,a,s]=AB({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,a,s]}const iA=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})=>{const[p,m,_]=Sme({sourceX:e,sourceY:t,targetX:n,targetY:r});return q.jsx(Pm,{path:p,labelX:m,labelY:_,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})});iA.displayName="StraightEdge";function z0(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function LI({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Te.Left:return[t-z0(t-r,o),n];case Te.Right:return[t+z0(r-t,o),n];case Te.Top:return[t,n-z0(n-i,o)];case Te.Bottom:return[t,n+z0(i-n,o)]}}function kB({sourceX:e,sourceY:t,sourcePosition:n=Te.Bottom,targetX:r,targetY:i,targetPosition:o=Te.Top,curvature:a=.25}){const[s,l]=LI({pos:n,x1:e,y1:t,x2:r,y2:i,c:a}),[u,c]=LI({pos:o,x1:r,y1:i,x2:e,y2:t,c:a}),[d,f,h,p]=TB({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${i}`,d,f,h,p]}const B1=k.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Te.Bottom,targetPosition:o=Te.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,pathOptions:m,interactionWidth:_})=>{const[v,y,g]=kB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:m==null?void 0:m.curvature});return q.jsx(Pm,{path:v,labelX:y,labelY:g,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:p,interactionWidth:_})});B1.displayName="BezierEdge";const oA=k.createContext(null),xme=oA.Provider;oA.Consumer;const wme=()=>k.useContext(oA),Cme=e=>"id"in e&&"source"in e&&"target"in e,IB=e=>"id"in e&&!("source"in e)&&!("target"in e),Eme=(e,t,n)=>{if(!IB(e))return[];const r=n.filter(i=>i.source===e.id).map(i=>i.target);return t.filter(i=>r.includes(i.id))},Ame=(e,t,n)=>{if(!IB(e))return[];const r=n.filter(i=>i.target===e.id).map(i=>i.source);return t.filter(i=>r.includes(i.id))},MB=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,D5=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,Tme=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),jh=(e,t)=>{if(!e.source||!e.target)return t;let n;return Cme(e)?n={...e}:n={...e,id:MB(e)},Tme(n,t)?t:t.concat(n)},Pme=(e,t,n,r={shouldReplaceId:!0})=>{const{id:i,...o}=e;if(!t.source||!t.target||!n.find(l=>l.id===i))return n;const s={...o,id:r.shouldReplaceId?MB(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(l=>l.id!==i).concat(s)},RB=({x:e,y:t},[n,r,i],o,[a,s])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},kme=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Fd=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},aA=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:o,y:a}=Fd(i,t).positionAbsolute;return xB(r,Ag({x:o,y:a,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return wB(n)},OB=(e,t,[n,r,i]=[0,0,1],o=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(c=>{const{width:d,height:f,selectable:h=!0,hidden:p=!1}=c;if(a&&!h||p)return!1;const{positionAbsolute:m}=Fd(c,s),_={x:m.x,y:m.y,width:d||0,height:f||0},v=O5(l,_),y=typeof d>"u"||typeof f>"u"||d===null||f===null,g=o&&v>0,b=(d||0)*(f||0);(y||g||v>=b||c.dragging)&&u.push(c)}),u},sA=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},$B=(e,t,n,r,i,o=.1)=>{const a=t/(e.width*(1+o)),s=n/(e.height*(1+o)),l=Math.min(a,s),u=bf(l,r,i),c=e.x+e.width/2,d=e.y+e.height/2,f=t/2-c*u,h=n/2-d*u;return[f,h,u]},mu=(e,t=0)=>e.transition().duration(t);function FI(e,t,n,r){return(t[n]||[]).reduce((i,o)=>{var a,s;return`${e.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+o.x+o.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+o.y+o.height/2}),i},[])}function Ime(e,t,n,r,i,o){const{x:a,y:s}=bl(e),u=t.elementsFromPoint(a,s).find(p=>p.classList.contains("react-flow__handle"));if(u){const p=u.getAttribute("data-nodeid");if(p){const m=lA(void 0,u),_=u.getAttribute("data-handleid"),v=o({nodeId:p,id:_,type:m});if(v)return{handle:{id:_,type:m,nodeId:p,x:n.x,y:n.y},validHandleResult:v}}}let c=[],d=1/0;if(i.forEach(p=>{const m=Math.sqrt((p.x-n.x)**2+(p.y-n.y)**2);if(m<=r){const _=o(p);m<=d&&(mp.isValid),h=c.some(({handle:p})=>p.type==="target");return c.find(({handle:p,validHandleResult:m})=>h?p.type==="target":f?m.isValid:!0)||c[0]}const Mme={source:null,target:null,sourceHandle:null,targetHandle:null},NB=()=>({handleDomNode:null,isValid:!1,connection:Mme,endHandle:null});function DB(e,t,n,r,i,o,a){const s=i==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...NB(),handleDomNode:l};if(l){const c=lA(void 0,l),d=l.getAttribute("data-nodeid"),f=l.getAttribute("data-handleid"),h=l.classList.contains("connectable"),p=l.classList.contains("connectableend"),m={source:s?d:n,sourceHandle:s?f:r,target:s?n:d,targetHandle:s?r:f};u.connection=m,h&&p&&(t===sc.Strict?s&&c==="source"||!s&&c==="target":d!==n||f!==r)&&(u.endHandle={nodeId:d,handleId:f,type:c},u.isValid=o(m))}return u}function Rme({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,o)=>{if(o[Mn]){const{handleBounds:a}=o[Mn];let s=[],l=[];a&&(s=FI(o,a,"source",`${t}-${n}-${r}`),l=FI(o,a,"target",`${t}-${n}-${r}`)),i.push(...s,...l)}return i},[])}function lA(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Kx(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Ome(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function LB({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:a,isValidConnection:s,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const c=SB(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:h,connectionRadius:p,onConnectStart:m,panBy:_,getNodes:v,cancelConnection:y}=o();let g=0,b;const{x:S,y:x}=bl(e),w=c==null?void 0:c.elementFromPoint(S,x),C=lA(l,w),T=f==null?void 0:f.getBoundingClientRect();if(!T||!C)return;let A,I=bl(e,T),D=!1,M=null,E=!1,P=null;const N=Rme({nodes:v(),nodeId:n,handleId:t,handleType:C}),L=()=>{if(!h)return;const[$,z]=_B(I,T);_({x:$,y:z}),g=requestAnimationFrame(L)};a({connectionPosition:I,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:C,connectionStartHandle:{nodeId:n,handleId:t,type:C},connectionEndHandle:null}),m==null||m(e,{nodeId:n,handleId:t,handleType:C});function O($){const{transform:z}=o();I=bl($,T);const{handle:V,validHandleResult:H}=Ime($,c,RB(I,z,!1,[1,1]),p,N,Q=>DB(Q,d,n,t,i?"target":"source",s,c));if(b=V,D||(L(),D=!0),P=H.handleDomNode,M=H.connection,E=H.isValid,a({connectionPosition:b&&E?kme({x:b.x,y:b.y},z):I,connectionStatus:Ome(!!b,E),connectionEndHandle:H.endHandle}),!b&&!E&&!P)return Kx(A);M.source!==M.target&&P&&(Kx(A),A=P,P.classList.add("connecting","react-flow__handle-connecting"),P.classList.toggle("valid",E),P.classList.toggle("react-flow__handle-valid",E))}function R($){var z,V;(b||P)&&M&&E&&(r==null||r(M)),(V=(z=o()).onConnectEnd)==null||V.call(z,$),l&&(u==null||u($)),Kx(A),y(),cancelAnimationFrame(g),D=!1,E=!1,M=null,P=null,c.removeEventListener("mousemove",O),c.removeEventListener("mouseup",R),c.removeEventListener("touchmove",O),c.removeEventListener("touchend",R)}c.addEventListener("mousemove",O),c.addEventListener("mouseup",R),c.addEventListener("touchmove",O),c.addEventListener("touchend",R)}const BI=()=>!0,$me=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Nme=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:a}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===n}},FB=k.forwardRef(({type:e="source",position:t=Te.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:a,onConnect:s,children:l,className:u,onMouseDown:c,onTouchStart:d,...f},h)=>{var T,A;const p=a||null,m=e==="target",_=qn(),v=wme(),{connectOnClick:y,noPanClassName:g}=dn($me,ri),{connecting:b,clickConnecting:S}=dn(Nme(v,p,e),ri);v||(A=(T=_.getState()).onError)==null||A.call(T,"010",ys.error010());const x=I=>{const{defaultEdgeOptions:D,onConnect:M,hasDefaultEdges:E}=_.getState(),P={...D,...I};if(E){const{edges:N,setEdges:L}=_.getState();L(jh(P,N))}M==null||M(P),s==null||s(P)},w=I=>{if(!v)return;const D=EB(I);i&&(D&&I.button===0||!D)&&LB({event:I,handleId:p,nodeId:v,onConnect:x,isTarget:m,getState:_.getState,setState:_.setState,isValidConnection:n||_.getState().isValidConnection||BI}),D?c==null||c(I):d==null||d(I)},C=I=>{const{onClickConnectStart:D,onClickConnectEnd:M,connectionClickStartHandle:E,connectionMode:P,isValidConnection:N}=_.getState();if(!v||!E&&!i)return;if(!E){D==null||D(I,{nodeId:v,handleId:p,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:p}});return}const L=SB(I.target),O=n||N||BI,{connection:R,isValid:$}=DB({nodeId:v,id:p,type:e},P,E.nodeId,E.handleId||null,E.type,O,L);$&&x(R),M==null||M(I),_.setState({connectionClickStartHandle:null})};return q.jsx("div",{"data-handleid":p,"data-nodeid":v,"data-handlepos":t,"data-id":`${v}-${p}-${e}`,className:Ji(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",g,u,{source:!m,target:m,connectable:r,connectablestart:i,connectableend:o,connecting:S,connectionindicator:r&&(i&&!b||o&&b)}]),onMouseDown:w,onTouchStart:w,onClick:y?C:void 0,ref:h,...f,children:l})});FB.displayName="Handle";var z1=k.memo(FB);const BB=({data:e,isConnectable:t,targetPosition:n=Te.Top,sourcePosition:r=Te.Bottom})=>q.jsxs(q.Fragment,{children:[q.jsx(z1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,q.jsx(z1,{type:"source",position:r,isConnectable:t})]});BB.displayName="DefaultNode";var L5=k.memo(BB);const zB=({data:e,isConnectable:t,sourcePosition:n=Te.Bottom})=>q.jsxs(q.Fragment,{children:[e==null?void 0:e.label,q.jsx(z1,{type:"source",position:n,isConnectable:t})]});zB.displayName="InputNode";var jB=k.memo(zB);const VB=({data:e,isConnectable:t,targetPosition:n=Te.Top})=>q.jsxs(q.Fragment,{children:[q.jsx(z1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]});VB.displayName="OutputNode";var UB=k.memo(VB);const uA=()=>null;uA.displayName="GroupNode";const Dme=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),j0=e=>e.id;function Lme(e,t){return ri(e.selectedNodes.map(j0),t.selectedNodes.map(j0))&&ri(e.selectedEdges.map(j0),t.selectedEdges.map(j0))}const GB=k.memo(({onSelectionChange:e})=>{const t=qn(),{selectedNodes:n,selectedEdges:r}=dn(Dme,Lme);return k.useEffect(()=>{var o,a;const i={nodes:n,edges:r};e==null||e(i),(a=(o=t.getState()).onSelectionChange)==null||a.call(o,i)},[n,r,e]),null});GB.displayName="SelectionListener";const Fme=e=>!!e.onSelectionChange;function Bme({onSelectionChange:e}){const t=dn(Fme);return e||t?q.jsx(GB,{onSelectionChange:e}):null}const zme=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function $c(e,t){k.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Ge(e,t,n){k.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const jme=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:f,edgesUpdatable:h,elevateNodesOnSelect:p,minZoom:m,maxZoom:_,nodeExtent:v,onNodesChange:y,onEdgesChange:g,elementsSelectable:b,connectionMode:S,snapGrid:x,snapToGrid:w,translateExtent:C,connectOnClick:T,defaultEdgeOptions:A,fitView:I,fitViewOptions:D,onNodesDelete:M,onEdgesDelete:E,onNodeDrag:P,onNodeDragStart:N,onNodeDragStop:L,onSelectionDrag:O,onSelectionDragStart:R,onSelectionDragStop:$,noPanClassName:z,nodeOrigin:V,rfId:H,autoPanOnConnect:Q,autoPanOnNodeDrag:Z,onError:J,connectionRadius:j,isValidConnection:X})=>{const{setNodes:ee,setEdges:ne,setDefaultNodesAndEdges:fe,setMinZoom:de,setMaxZoom:Be,setTranslateExtent:$e,setNodeExtent:Ce,reset:Ke}=dn(zme,ri),be=qn();return k.useEffect(()=>{const zt=r==null?void 0:r.map(Wn=>({...Wn,...A}));return fe(n,zt),()=>{Ke()}},[]),Ge("defaultEdgeOptions",A,be.setState),Ge("connectionMode",S,be.setState),Ge("onConnect",i,be.setState),Ge("onConnectStart",o,be.setState),Ge("onConnectEnd",a,be.setState),Ge("onClickConnectStart",s,be.setState),Ge("onClickConnectEnd",l,be.setState),Ge("nodesDraggable",u,be.setState),Ge("nodesConnectable",c,be.setState),Ge("nodesFocusable",d,be.setState),Ge("edgesFocusable",f,be.setState),Ge("edgesUpdatable",h,be.setState),Ge("elementsSelectable",b,be.setState),Ge("elevateNodesOnSelect",p,be.setState),Ge("snapToGrid",w,be.setState),Ge("snapGrid",x,be.setState),Ge("onNodesChange",y,be.setState),Ge("onEdgesChange",g,be.setState),Ge("connectOnClick",T,be.setState),Ge("fitViewOnInit",I,be.setState),Ge("fitViewOnInitOptions",D,be.setState),Ge("onNodesDelete",M,be.setState),Ge("onEdgesDelete",E,be.setState),Ge("onNodeDrag",P,be.setState),Ge("onNodeDragStart",N,be.setState),Ge("onNodeDragStop",L,be.setState),Ge("onSelectionDrag",O,be.setState),Ge("onSelectionDragStart",R,be.setState),Ge("onSelectionDragStop",$,be.setState),Ge("noPanClassName",z,be.setState),Ge("nodeOrigin",V,be.setState),Ge("rfId",H,be.setState),Ge("autoPanOnConnect",Q,be.setState),Ge("autoPanOnNodeDrag",Z,be.setState),Ge("onError",J,be.setState),Ge("connectionRadius",j,be.setState),Ge("isValidConnection",X,be.setState),$c(e,ee),$c(t,ne),$c(m,de),$c(_,Be),$c(C,$e),$c(v,Ce),null},zI={display:"none"},Vme={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},HB="react-flow__node-desc",qB="react-flow__edge-desc",Ume="react-flow__aria-live",Gme=e=>e.ariaLiveMessage;function Hme({rfId:e}){const t=dn(Gme);return q.jsx("div",{id:`${Ume}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Vme,children:t})}function qme({rfId:e,disableKeyboardA11y:t}){return q.jsxs(q.Fragment,{children:[q.jsxs("div",{id:`${HB}-${e}`,style:zI,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),q.jsx("div",{id:`${qB}-${e}`,style:zI,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&q.jsx(Hme,{rfId:e})]})}const Wme=typeof document<"u"?document:null;var Tg=(e=null,t={target:Wme})=>{const[n,r]=k.useState(!1),i=k.useRef(!1),o=k.useRef(new Set([])),[a,s]=k.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return k.useEffect(()=>{var l,u;if(e!==null){const c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey,!i.current&&$5(h))return!1;const p=VI(h.code,s);o.current.add(h[p]),jI(a,o.current,!1)&&(h.preventDefault(),r(!0))},d=h=>{if(!i.current&&$5(h))return!1;const p=VI(h.code,s);jI(a,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(h[p]),h.key==="Meta"&&o.current.clear(),i.current=!1},f=()=>{o.current.clear(),r(!1)};return(l=t==null?void 0:t.target)==null||l.addEventListener("keydown",c),(u=t==null?void 0:t.target)==null||u.addEventListener("keyup",d),window.addEventListener("blur",f),()=>{var h,p;(h=t==null?void 0:t.target)==null||h.removeEventListener("keydown",c),(p=t==null?void 0:t.target)==null||p.removeEventListener("keyup",d),window.removeEventListener("blur",f)}}},[e,r]),n};function jI(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function VI(e,t){return t.includes(e)?"code":"key"}function WB(e,t,n,r){var a,s;if(!e.parentNode)return n;const i=t.get(e.parentNode),o=Fd(i,r);return WB(i,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(((a=i[Mn])==null?void 0:a.z)??0)>(n.z??0)?((s=i[Mn])==null?void 0:s.z)??0:n.z??0},r)}function KB(e,t,n){e.forEach(r=>{var i;if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n!=null&&n[r.id]){const{x:o,y:a,z:s}=WB(r,e,{...r.position,z:((i=r[Mn])==null?void 0:i.z)??0},t);r.positionAbsolute={x:o,y:a},r[Mn].z=s,n!=null&&n[r.id]&&(r[Mn].isParent=!0)}})}function Xx(e,t,n,r){const i=new Map,o={},a=r?1e3:0;return e.forEach(s=>{var d;const l=(qi(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={width:u==null?void 0:u.width,height:u==null?void 0:u.height,...s,positionAbsolute:{x:s.position.x,y:s.position.y}};s.parentNode&&(c.parentNode=s.parentNode,o[s.parentNode]=!0),Object.defineProperty(c,Mn,{enumerable:!1,value:{handleBounds:(d=u==null?void 0:u[Mn])==null?void 0:d.handleBounds,z:l}}),i.set(s.id,c)}),KB(i,n,o),i}function XB(e,t={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),f=t.initial&&!u&&c;if(s&&l&&(f||!t.initial)){const p=n().filter(_=>{var y;const v=t.includeHiddenNodes?_.width&&_.height:!_.hidden;return(y=t.nodes)!=null&&y.length?v&&t.nodes.some(g=>g.id===_.id):v}),m=p.every(_=>_.width&&_.height);if(p.length>0&&m){const _=aA(p,d),[v,y,g]=$B(_,r,i,t.minZoom??o,t.maxZoom??a,t.padding??.1),b=vl.translate(v,y).scale(g);return typeof t.duration=="number"&&t.duration>0?s.transform(mu(l,t.duration),b):s.transform(l,b),!0}}return!1}function Kme(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Mn]:r[Mn],selected:n.selected})}),new Map(t)}function Xme(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function V0({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:Kme(e,i)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:Xme(t,o)}),s==null||s(t))}const Nc=()=>{},Qme={zoomIn:Nc,zoomOut:Nc,zoomTo:Nc,getZoom:()=>1,setViewport:Nc,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Nc,fitBounds:Nc,project:e=>e,viewportInitialized:!1},Yme=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),Zme=()=>{const e=qn(),{d3Zoom:t,d3Selection:n}=dn(Yme,ri);return k.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(mu(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>t.scaleTo(mu(n,o==null?void 0:o.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,o)=>{const[a,s,l]=e.getState().transform,u=vl.translate(i.x??a,i.y??s).scale(i.zoom??l);t.transform(mu(n,o==null?void 0:o.duration),u)},getViewport:()=>{const[i,o,a]=e.getState().transform;return{x:i,y:o,zoom:a}},fitView:i=>XB(e.getState,i),setCenter:(i,o,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,d=s/2-i*c,f=l/2-o*c,h=vl.translate(d,f).scale(c);t.transform(mu(n,a==null?void 0:a.duration),h)},fitBounds:(i,o)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),[c,d,f]=$B(i,a,s,l,u,(o==null?void 0:o.padding)??.1),h=vl.translate(c,d).scale(f);t.transform(mu(n,o==null?void 0:o.duration),h)},project:i=>{const{transform:o,snapToGrid:a,snapGrid:s}=e.getState();return RB(i,o,a,s)},viewportInitialized:!0}:Qme,[t,n])};function QB(){const e=Zme(),t=qn(),n=k.useCallback(()=>t.getState().getNodes().map(m=>({...m})),[]),r=k.useCallback(m=>t.getState().nodeInternals.get(m),[]),i=k.useCallback(()=>{const{edges:m=[]}=t.getState();return m.map(_=>({..._}))},[]),o=k.useCallback(m=>{const{edges:_=[]}=t.getState();return _.find(v=>v.id===m)},[]),a=k.useCallback(m=>{const{getNodes:_,setNodes:v,hasDefaultNodes:y,onNodesChange:g}=t.getState(),b=_(),S=typeof m=="function"?m(b):m;if(y)v(S);else if(g){const x=S.length===0?b.map(w=>({type:"remove",id:w.id})):S.map(w=>({item:w,type:"reset"}));g(x)}},[]),s=k.useCallback(m=>{const{edges:_=[],setEdges:v,hasDefaultEdges:y,onEdgesChange:g}=t.getState(),b=typeof m=="function"?m(_):m;if(y)v(b);else if(g){const S=b.length===0?_.map(x=>({type:"remove",id:x.id})):b.map(x=>({item:x,type:"reset"}));g(S)}},[]),l=k.useCallback(m=>{const _=Array.isArray(m)?m:[m],{getNodes:v,setNodes:y,hasDefaultNodes:g,onNodesChange:b}=t.getState();if(g){const x=[...v(),..._];y(x)}else if(b){const S=_.map(x=>({item:x,type:"add"}));b(S)}},[]),u=k.useCallback(m=>{const _=Array.isArray(m)?m:[m],{edges:v=[],setEdges:y,hasDefaultEdges:g,onEdgesChange:b}=t.getState();if(g)y([...v,..._]);else if(b){const S=_.map(x=>({item:x,type:"add"}));b(S)}},[]),c=k.useCallback(()=>{const{getNodes:m,edges:_=[],transform:v}=t.getState(),[y,g,b]=v;return{nodes:m().map(S=>({...S})),edges:_.map(S=>({...S})),viewport:{x:y,y:g,zoom:b}}},[]),d=k.useCallback(({nodes:m,edges:_})=>{const{nodeInternals:v,getNodes:y,edges:g,hasDefaultNodes:b,hasDefaultEdges:S,onNodesDelete:x,onEdgesDelete:w,onNodesChange:C,onEdgesChange:T}=t.getState(),A=(m||[]).map(P=>P.id),I=(_||[]).map(P=>P.id),D=y().reduce((P,N)=>{const L=!A.includes(N.id)&&N.parentNode&&P.find(R=>R.id===N.parentNode);return(typeof N.deletable=="boolean"?N.deletable:!0)&&(A.includes(N.id)||L)&&P.push(N),P},[]),M=g.filter(P=>typeof P.deletable=="boolean"?P.deletable:!0),E=M.filter(P=>I.includes(P.id));if(D||E){const P=sA(D,M),N=[...E,...P],L=N.reduce((O,R)=>(O.includes(R.id)||O.push(R.id),O),[]);if((S||b)&&(S&&t.setState({edges:g.filter(O=>!L.includes(O.id))}),b&&(D.forEach(O=>{v.delete(O.id)}),t.setState({nodeInternals:new Map(v)}))),L.length>0&&(w==null||w(N),T&&T(L.map(O=>({id:O,type:"remove"})))),D.length>0&&(x==null||x(D),C)){const O=D.map(R=>({id:R.id,type:"remove"}));C(O)}}},[]),f=k.useCallback(m=>{const _=gme(m),v=_?null:t.getState().nodeInternals.get(m.id);return[_?m:OI(v),v,_]},[]),h=k.useCallback((m,_=!0,v)=>{const[y,g,b]=f(m);return y?(v||t.getState().getNodes()).filter(S=>{if(!b&&(S.id===g.id||!S.positionAbsolute))return!1;const x=OI(S),w=O5(x,y);return _&&w>0||w>=m.width*m.height}):[]},[]),p=k.useCallback((m,_,v=!0)=>{const[y]=f(m);if(!y)return!1;const g=O5(y,_);return v&&g>0||g>=m.width*m.height},[]);return k.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:h,isNodeIntersecting:p}),[e,n,r,i,o,a,s,l,u,c,d,h,p])}var Jme=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=qn(),{deleteElements:r}=QB(),i=Tg(e),o=Tg(t);k.useEffect(()=>{if(i){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[i]),k.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function e0e(e){const t=qn();k.useEffect(()=>{let n;const r=()=>{var o,a;if(!e.current)return;const i=eA(e.current);(i.height===0||i.width===0)&&((a=(o=t.getState()).onError)==null||a.call(o,"004",ys.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const cA={position:"absolute",width:"100%",height:"100%",top:0,left:0},t0e=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,U0=e=>({x:e.x,y:e.y,zoom:e.k}),Dc=(e,t)=>e.target.closest(`.${t}`),UI=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),GI=e=>{const t=e.ctrlKey&&L1()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},n0e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),r0e=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=Ru.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:p,maxZoom:m,zoomActivationKeyCode:_,preventScrolling:v=!0,children:y,noWheelClassName:g,noPanClassName:b})=>{const S=k.useRef(),x=qn(),w=k.useRef(!1),C=k.useRef(!1),T=k.useRef(null),A=k.useRef({x:0,y:0,zoom:0}),{d3Zoom:I,d3Selection:D,d3ZoomHandler:M,userSelectionActive:E}=dn(n0e,ri),P=Tg(_),N=k.useRef(0),L=k.useRef(!1),O=k.useRef();return e0e(T),k.useEffect(()=>{if(T.current){const R=T.current.getBoundingClientRect(),$=lme().scaleExtent([p,m]).translateExtent(h),z=_o(T.current).call($),V=vl.translate(f.x,f.y).scale(bf(f.zoom,p,m)),H=[[0,0],[R.width,R.height]],Q=$.constrain()(V,H,h);$.transform(z,Q),$.wheelDelta(GI),x.setState({d3Zoom:$,d3Selection:z,d3ZoomHandler:z.on("wheel.zoom"),transform:[Q.x,Q.y,Q.k],domNode:T.current.closest(".react-flow")})}},[]),k.useEffect(()=>{D&&I&&(a&&!P&&!E?D.on("wheel.zoom",R=>{if(Dc(R,g))return!1;R.preventDefault(),R.stopImmediatePropagation();const $=D.property("__zoom").k||1,z=L1();if(R.ctrlKey&&o&&z){const ee=Qo(R),ne=GI(R),fe=$*Math.pow(2,ne);I.scaleTo(D,fe,ee,R);return}const V=R.deltaMode===1?20:1;let H=l===Ru.Vertical?0:R.deltaX*V,Q=l===Ru.Horizontal?0:R.deltaY*V;!z&&R.shiftKey&&l!==Ru.Vertical&&(H=R.deltaY*V,Q=0),I.translateBy(D,-(H/$)*s,-(Q/$)*s,{internal:!0});const Z=U0(D.property("__zoom")),{onViewportChangeStart:J,onViewportChange:j,onViewportChangeEnd:X}=x.getState();clearTimeout(O.current),L.current||(L.current=!0,t==null||t(R,Z),J==null||J(Z)),L.current&&(e==null||e(R,Z),j==null||j(Z),O.current=setTimeout(()=>{n==null||n(R,Z),X==null||X(Z),L.current=!1},150))},{passive:!1}):typeof M<"u"&&D.on("wheel.zoom",function(R,$){if(!v||Dc(R,g))return null;R.preventDefault(),M.call(this,R,$)},{passive:!1}))},[E,a,l,D,I,M,P,o,v,g,t,e,n]),k.useEffect(()=>{I&&I.on("start",R=>{var V,H;if(!R.sourceEvent||R.sourceEvent.internal)return null;N.current=(V=R.sourceEvent)==null?void 0:V.button;const{onViewportChangeStart:$}=x.getState(),z=U0(R.transform);w.current=!0,A.current=z,((H=R.sourceEvent)==null?void 0:H.type)==="mousedown"&&x.setState({paneDragging:!0}),$==null||$(z),t==null||t(R.sourceEvent,z)})},[I,t]),k.useEffect(()=>{I&&(E&&!w.current?I.on("zoom",null):E||I.on("zoom",R=>{var z;const{onViewportChange:$}=x.getState();if(x.setState({transform:[R.transform.x,R.transform.y,R.transform.k]}),C.current=!!(r&&UI(d,N.current??0)),(e||$)&&!((z=R.sourceEvent)!=null&&z.internal)){const V=U0(R.transform);$==null||$(V),e==null||e(R.sourceEvent,V)}}))},[E,I,e,d,r]),k.useEffect(()=>{I&&I.on("end",R=>{if(!R.sourceEvent||R.sourceEvent.internal)return null;const{onViewportChangeEnd:$}=x.getState();if(w.current=!1,x.setState({paneDragging:!1}),r&&UI(d,N.current??0)&&!C.current&&r(R.sourceEvent),C.current=!1,(n||$)&&t0e(A.current,R.transform)){const z=U0(R.transform);A.current=z,clearTimeout(S.current),S.current=setTimeout(()=>{$==null||$(z),n==null||n(R.sourceEvent,z)},a?150:0)}})},[I,a,d,n,r]),k.useEffect(()=>{I&&I.filter(R=>{const $=P||i,z=o&&R.ctrlKey;if(R.button===1&&R.type==="mousedown"&&(Dc(R,"react-flow__node")||Dc(R,"react-flow__edge")))return!0;if(!d&&!$&&!a&&!u&&!o||E||!u&&R.type==="dblclick"||Dc(R,g)&&R.type==="wheel"||Dc(R,b)&&R.type!=="wheel"||!o&&R.ctrlKey&&R.type==="wheel"||!$&&!a&&!z&&R.type==="wheel"||!d&&(R.type==="mousedown"||R.type==="touchstart")||Array.isArray(d)&&!d.includes(R.button)&&(R.type==="mousedown"||R.type==="touchstart"))return!1;const V=Array.isArray(d)&&d.includes(R.button)||!R.button||R.button<=1;return(!R.ctrlKey||R.type==="wheel")&&V})},[E,I,i,o,a,u,d,c,P]),q.jsx("div",{className:"react-flow__renderer",ref:T,style:cA,children:y})},i0e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function o0e(){const{userSelectionActive:e,userSelectionRect:t}=dn(i0e,ri);return e&&t?q.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function HI(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(r>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),i>0&&(n.style.height+=i),t.position.x<0){const o=Math.abs(t.position.x);n.position.x=n.position.x-o,n.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);n.position.y=n.position.y-o,n.style.height+=o,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function YB(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const o=e.filter(s=>s.id===i.id);if(o.length===0)return r.push(i),r;const a={...i};for(const s of o)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&HI(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&HI(r,a);break}case"remove":return r}return r.push(a),r},n)}function yu(e,t){return YB(e,t)}function su(e,t){return YB(e,t)}const Ws=(e,t)=>({id:e,type:"select",selected:t});function ld(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Ws(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Ws(r.id,!1))),n},[])}const Qx=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},a0e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),ZB=k.memo(({isSelecting:e,selectionMode:t=Rl.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const f=k.useRef(null),h=qn(),p=k.useRef(0),m=k.useRef(0),_=k.useRef(),{userSelectionActive:v,elementsSelectable:y,dragging:g}=dn(a0e,ri),b=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),p.current=0,m.current=0},S=M=>{o==null||o(M),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},x=M=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){M.preventDefault();return}a==null||a(M)},w=s?M=>s(M):void 0,C=M=>{const{resetSelectedElements:E,domNode:P}=h.getState();if(_.current=P==null?void 0:P.getBoundingClientRect(),!y||!e||M.button!==0||M.target!==f.current||!_.current)return;const{x:N,y:L}=bl(M,_.current);E(),h.setState({userSelectionRect:{width:0,height:0,startX:N,startY:L,x:N,y:L}}),r==null||r(M)},T=M=>{const{userSelectionRect:E,nodeInternals:P,edges:N,transform:L,onNodesChange:O,onEdgesChange:R,nodeOrigin:$,getNodes:z}=h.getState();if(!e||!_.current||!E)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const V=bl(M,_.current),H=E.startX??0,Q=E.startY??0,Z={...E,x:V.xne.id),ee=j.map(ne=>ne.id);if(p.current!==ee.length){p.current=ee.length;const ne=ld(J,ee);ne.length&&(O==null||O(ne))}if(m.current!==X.length){m.current=X.length;const ne=ld(N,X);ne.length&&(R==null||R(ne))}h.setState({userSelectionRect:Z})},A=M=>{if(M.button!==0)return;const{userSelectionRect:E}=h.getState();!v&&E&&M.target===f.current&&(S==null||S(M)),h.setState({nodesSelectionActive:p.current>0}),b(),i==null||i(M)},I=M=>{v&&(h.setState({nodesSelectionActive:p.current>0}),i==null||i(M)),b()},D=y&&(e||v);return q.jsxs("div",{className:Ji(["react-flow__pane",{dragging:g,selection:e}]),onClick:D?void 0:Qx(S,f),onContextMenu:Qx(x,f),onWheel:Qx(w,f),onMouseEnter:D?void 0:l,onMouseDown:D?C:void 0,onMouseMove:D?T:u,onMouseUp:D?A:void 0,onMouseLeave:D?I:c,ref:f,style:cA,children:[d,q.jsx(o0e,{})]})});ZB.displayName="Pane";function JB(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:JB(n,t):!1}function qI(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function s0e(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||!JB(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var o,a;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((a=i.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode,width:i.width,height:i.height}})}function l0e(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function ez(e,t,n,r,i=[0,0],o){const a=l0e(e,e.extent||r);let s=a;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=c&&qi(d)&&qi(f)&&qi(c.width)&&qi(c.height)?[[d+e.width*i[0],f+e.height*i[1]],[d+c.width-e.width+e.width*i[0],f+c.height-e.height+e.height*i[1]]]:s}else o==null||o("005",ys.error005()),s=a;else if(e.extent&&e.parentNode){const c=n.get(e.parentNode),{x:d,y:f}=Fd(c,i).positionAbsolute;s=[[e.extent[0][0]+d,e.extent[0][1]+f],[e.extent[1][0]+d,e.extent[1][1]+f]]}let l={x:0,y:0};if(e.parentNode){const c=n.get(e.parentNode);l=Fd(c,i).positionAbsolute}const u=s&&s!=="parent"?tA(t,s):t;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function Yx({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const WI=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const o=Array.from(i),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return o.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...eA(l)}})};function hh(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function F5({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),u=s.get(e);if(!u){l==null||l("012",ys.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(o({nodes:[u]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function u0e(){const e=qn();return k.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:o?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function Zx(e){return(t,n,r)=>e==null?void 0:e(t,r)}function tz({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:a}){const s=qn(),[l,u]=k.useState(!1),c=k.useRef([]),d=k.useRef({x:null,y:null}),f=k.useRef(0),h=k.useRef(null),p=k.useRef({x:0,y:0}),m=k.useRef(null),_=k.useRef(!1),v=u0e();return k.useEffect(()=>{if(e!=null&&e.current){const y=_o(e.current),g=({x:S,y:x})=>{const{nodeInternals:w,onNodeDrag:C,onSelectionDrag:T,updateNodePositions:A,nodeExtent:I,snapGrid:D,snapToGrid:M,nodeOrigin:E,onError:P}=s.getState();d.current={x:S,y:x};let N=!1,L={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&I){const R=aA(c.current,E);L=Ag(R)}if(c.current=c.current.map(R=>{const $={x:S-R.distance.x,y:x-R.distance.y};M&&($.x=D[0]*Math.round($.x/D[0]),$.y=D[1]*Math.round($.y/D[1]));const z=[[I[0][0],I[0][1]],[I[1][0],I[1][1]]];c.current.length>1&&I&&!R.extent&&(z[0][0]=R.positionAbsolute.x-L.x+I[0][0],z[1][0]=R.positionAbsolute.x+(R.width??0)-L.x2+I[1][0],z[0][1]=R.positionAbsolute.y-L.y+I[0][1],z[1][1]=R.positionAbsolute.y+(R.height??0)-L.y2+I[1][1]);const V=ez(R,$,w,z,E,P);return N=N||R.position.x!==V.position.x||R.position.y!==V.position.y,R.position=V.position,R.positionAbsolute=V.positionAbsolute,R}),!N)return;A(c.current,!0,!0),u(!0);const O=i?C:Zx(T);if(O&&m.current){const[R,$]=Yx({nodeId:i,dragItems:c.current,nodeInternals:w});O(m.current,R,$)}},b=()=>{if(!h.current)return;const[S,x]=_B(p.current,h.current);if(S!==0||x!==0){const{transform:w,panBy:C}=s.getState();d.current.x=(d.current.x??0)-S/w[2],d.current.y=(d.current.y??0)-x/w[2],C({x:S,y:x})&&g(d.current)}f.current=requestAnimationFrame(b)};if(t)y.on(".drag",null);else{const S=vpe().on("start",x=>{var N;const{nodeInternals:w,multiSelectionActive:C,domNode:T,nodesDraggable:A,unselectNodesAndEdges:I,onNodeDragStart:D,onSelectionDragStart:M}=s.getState(),E=i?D:Zx(M);!a&&!C&&i&&((N=w.get(i))!=null&&N.selected||I()),i&&o&&a&&F5({id:i,store:s,nodeRef:e});const P=v(x);if(d.current=P,c.current=s0e(w,A,P,i),E&&c.current){const[L,O]=Yx({nodeId:i,dragItems:c.current,nodeInternals:w});E(x.sourceEvent,L,O)}h.current=(T==null?void 0:T.getBoundingClientRect())||null,p.current=bl(x.sourceEvent,h.current)}).on("drag",x=>{const w=v(x),{autoPanOnNodeDrag:C}=s.getState();!_.current&&C&&(_.current=!0,b()),(d.current.x!==w.xSnapped||d.current.y!==w.ySnapped)&&c.current&&(m.current=x.sourceEvent,p.current=bl(x.sourceEvent,h.current),g(w))}).on("end",x=>{if(u(!1),_.current=!1,cancelAnimationFrame(f.current),c.current){const{updateNodePositions:w,nodeInternals:C,onNodeDragStop:T,onSelectionDragStop:A}=s.getState(),I=i?T:Zx(A);if(w(c.current,!1,!1),I){const[D,M]=Yx({nodeId:i,dragItems:c.current,nodeInternals:C});I(x.sourceEvent,D,M)}}}).filter(x=>{const w=x.target;return!x.button&&(!n||!qI(w,`.${n}`,e))&&(!r||qI(w,r,e))});return y.call(S),()=>{y.on(".drag",null)}}}},[e,t,n,r,o,s,i,a,v]),l}function nz(){const e=qn();return k.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=a().filter(y=>y.selected&&(y.draggable||c&&typeof y.draggable>"u")),f=s?l[0]:5,h=s?l[1]:5,p=n.isShiftPressed?4:1,m=n.x*f*p,_=n.y*h*p,v=d.map(y=>{if(y.positionAbsolute){const g={x:y.positionAbsolute.x+m,y:y.positionAbsolute.y+_};s&&(g.x=l[0]*Math.round(g.x/l[0]),g.y=l[1]*Math.round(g.y/l[1]));const{positionAbsolute:b,position:S}=ez(y,g,r,i,void 0,u);y.position=S,y.positionAbsolute=b}return y});o(v,!0,!1)},[])}const Bd={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var ph=e=>{const t=({id:n,type:r,data:i,xPos:o,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onContextMenu:p,onDoubleClick:m,style:_,className:v,isDraggable:y,isSelectable:g,isConnectable:b,isFocusable:S,selectNodesOnDrag:x,sourcePosition:w,targetPosition:C,hidden:T,resizeObserver:A,dragHandle:I,zIndex:D,isParent:M,noDragClassName:E,noPanClassName:P,initialized:N,disableKeyboardA11y:L,ariaLabel:O,rfId:R})=>{const $=qn(),z=k.useRef(null),V=k.useRef(w),H=k.useRef(C),Q=k.useRef(r),Z=g||y||c||d||f||h,J=nz(),j=hh(n,$.getState,d),X=hh(n,$.getState,f),ee=hh(n,$.getState,h),ne=hh(n,$.getState,p),fe=hh(n,$.getState,m),de=Ce=>{if(g&&(!x||!y)&&F5({id:n,store:$,nodeRef:z}),c){const Ke=$.getState().nodeInternals.get(n);Ke&&c(Ce,{...Ke})}},Be=Ce=>{if(!$5(Ce))if(CB.includes(Ce.key)&&g){const Ke=Ce.key==="Escape";F5({id:n,store:$,unselect:Ke,nodeRef:z})}else!L&&y&&u&&Object.prototype.hasOwnProperty.call(Bd,Ce.key)&&($.setState({ariaLiveMessage:`Moved selected node ${Ce.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~a}`}),J({x:Bd[Ce.key].x,y:Bd[Ce.key].y,isShiftPressed:Ce.shiftKey}))};k.useEffect(()=>{if(z.current&&!T){const Ce=z.current;return A==null||A.observe(Ce),()=>A==null?void 0:A.unobserve(Ce)}},[T]),k.useEffect(()=>{const Ce=Q.current!==r,Ke=V.current!==w,be=H.current!==C;z.current&&(Ce||Ke||be)&&(Ce&&(Q.current=r),Ke&&(V.current=w),be&&(H.current=C),$.getState().updateNodeDimensions([{id:n,nodeElement:z.current,forceUpdate:!0}]))},[n,r,w,C]);const $e=tz({nodeRef:z,disabled:T||!y,noDragClassName:E,handleSelector:I,nodeId:n,isSelectable:g,selectNodesOnDrag:x});return T?null:q.jsx("div",{className:Ji(["react-flow__node",`react-flow__node-${r}`,{[P]:y},v,{selected:u,selectable:g,parent:M,dragging:$e}]),ref:z,style:{zIndex:D,transform:`translate(${s}px,${l}px)`,pointerEvents:Z?"all":"none",visibility:N?"visible":"hidden",..._},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:j,onMouseMove:X,onMouseLeave:ee,onContextMenu:ne,onClick:de,onDoubleClick:fe,onKeyDown:S?Be:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":L?void 0:`${HB}-${R}`,"aria-label":O,children:q.jsx(xme,{value:n,children:q.jsx(e,{id:n,data:i,type:r,xPos:o,yPos:a,selected:u,isConnectable:b,sourcePosition:w,targetPosition:C,dragging:$e,dragHandle:I,zIndex:D})})})};return t.displayName="NodeWrapper",k.memo(t)};const c0e=e=>{const t=e.getNodes().filter(n=>n.selected);return{...aA(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function d0e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=qn(),{width:i,height:o,x:a,y:s,transformString:l,userSelectionActive:u}=dn(c0e,ri),c=nz(),d=k.useRef(null);if(k.useEffect(()=>{var p;n||(p=d.current)==null||p.focus({preventScroll:!0})},[n]),tz({nodeRef:d}),u||!i||!o)return null;const f=e?p=>{const m=r.getState().getNodes().filter(_=>_.selected);e(p,m)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(Bd,p.key)&&c({x:Bd[p.key].x,y:Bd[p.key].y,isShiftPressed:p.shiftKey})};return q.jsx("div",{className:Ji(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:q.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:o,top:s,left:a}})})}var f0e=k.memo(d0e);const h0e=e=>e.nodesSelectionActive,rz=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:f,selectionMode:h,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:_,panActivationKeyCode:v,zoomActivationKeyCode:y,elementsSelectable:g,zoomOnScroll:b,zoomOnPinch:S,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:C,zoomOnDoubleClick:T,panOnDrag:A,defaultViewport:I,translateExtent:D,minZoom:M,maxZoom:E,preventScrolling:P,onSelectionContextMenu:N,noWheelClassName:L,noPanClassName:O,disableKeyboardA11y:R})=>{const $=dn(h0e),z=Tg(d),H=Tg(v)||A,Q=z||f&&H!==!0;return Jme({deleteKeyCode:s,multiSelectionKeyCode:_}),q.jsx(r0e,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:o,elementsSelectable:g,zoomOnScroll:b,zoomOnPinch:S,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:C,zoomOnDoubleClick:T,panOnDrag:!z&&H,defaultViewport:I,translateExtent:D,minZoom:M,maxZoom:E,zoomActivationKeyCode:y,preventScrolling:P,noWheelClassName:L,noPanClassName:O,children:q.jsxs(ZB,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:a,panOnDrag:H,isSelecting:!!Q,selectionMode:h,children:[e,$&&q.jsx(f0e,{onSelectionContextMenu:N,noPanClassName:O,disableKeyboardA11y:R})]})})};rz.displayName="FlowRenderer";var p0e=k.memo(rz);function g0e(e){return dn(k.useCallback(n=>e?OB(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function m0e(e){const t={input:ph(e.input||jB),default:ph(e.default||L5),output:ph(e.output||UB),group:ph(e.group||uA)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=ph(e[o]||L5),i),n);return{...t,...r}}const y0e=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},v0e=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),iz=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:a}=dn(v0e,ri),s=g0e(e.onlyRenderVisibleElements),l=k.useRef(),u=k.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const f=d.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));o(f)});return l.current=c,c},[]);return k.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),q.jsx("div",{className:"react-flow__nodes",style:cA,children:s.map(c=>{var S,x;let d=c.type||"default";e.nodeTypes[d]||(a==null||a("003",ys.error003(d)),d="default");const f=e.nodeTypes[d]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),p=!!(c.selectable||i&&typeof c.selectable>"u"),m=!!(c.connectable||n&&typeof c.connectable>"u"),_=!!(c.focusable||r&&typeof c.focusable>"u"),v=e.nodeExtent?tA(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,y=(v==null?void 0:v.x)??0,g=(v==null?void 0:v.y)??0,b=y0e({x:y,y:g,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return q.jsx(f,{id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||Te.Bottom,targetPosition:c.targetPosition||Te.Top,hidden:c.hidden,xPos:y,yPos:g,xPosOrigin:b.x,yPosOrigin:b.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:h,isSelectable:p,isConnectable:m,isFocusable:_,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((S=c[Mn])==null?void 0:S.z)??0,isParent:!!((x=c[Mn])!=null&&x.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel},c.id)})})};iz.displayName="NodeRenderer";var b0e=k.memo(iz);const _0e=(e,t,n)=>n===Te.Left?e-t:n===Te.Right?e+t:e,S0e=(e,t,n)=>n===Te.Top?e-t:n===Te.Bottom?e+t:e,KI="react-flow__edgeupdater",XI=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:a,type:s})=>q.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:a,className:Ji([KI,`${KI}-${s}`]),cx:_0e(t,r,e),cy:S0e(n,r,e),r,stroke:"transparent",fill:"transparent"}),x0e=()=>!0;var Lc=e=>{const t=({id:n,className:r,type:i,data:o,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:_,source:v,target:y,sourceX:g,sourceY:b,targetX:S,targetY:x,sourcePosition:w,targetPosition:C,elementsSelectable:T,hidden:A,sourceHandleId:I,targetHandleId:D,onContextMenu:M,onMouseEnter:E,onMouseMove:P,onMouseLeave:N,edgeUpdaterRadius:L,onEdgeUpdate:O,onEdgeUpdateStart:R,onEdgeUpdateEnd:$,markerEnd:z,markerStart:V,rfId:H,ariaLabel:Q,isFocusable:Z,isUpdatable:J,pathOptions:j,interactionWidth:X})=>{const ee=k.useRef(null),[ne,fe]=k.useState(!1),[de,Be]=k.useState(!1),$e=qn(),Ce=k.useMemo(()=>`url(#${D5(V,H)})`,[V,H]),Ke=k.useMemo(()=>`url(#${D5(z,H)})`,[z,H]);if(A)return null;const be=rn=>{const{edges:Ot,addSelectedEdges:si}=$e.getState();if(T&&($e.setState({nodesSelectionActive:!1}),si([n])),a){const Ii=Ot.find(uo=>uo.id===n);a(rn,Ii)}},zt=fh(n,$e.getState,s),Wn=fh(n,$e.getState,M),nn=fh(n,$e.getState,E),Rt=fh(n,$e.getState,P),St=fh(n,$e.getState,N),bn=(rn,Ot)=>{if(rn.button!==0)return;const{edges:si,isValidConnection:Ii}=$e.getState(),uo=Ot?y:v,Ma=(Ot?D:I)||null,Xn=Ot?"target":"source",co=Ii||x0e,tu=Ot,jo=si.find(xt=>xt.id===n);Be(!0),R==null||R(rn,jo,Xn);const nu=xt=>{Be(!1),$==null||$(xt,jo,Xn)};LB({event:rn,handleId:Ma,nodeId:uo,onConnect:xt=>O==null?void 0:O(jo,xt),isTarget:tu,getState:$e.getState,setState:$e.setState,isValidConnection:co,edgeUpdaterType:Xn,onEdgeUpdateEnd:nu})},jr=rn=>bn(rn,!0),lo=rn=>bn(rn,!1),ki=()=>fe(!0),lr=()=>fe(!1),Kn=!T&&!a,Sr=rn=>{var Ot;if(CB.includes(rn.key)&&T){const{unselectNodesAndEdges:si,addSelectedEdges:Ii,edges:uo}=$e.getState();rn.key==="Escape"?((Ot=ee.current)==null||Ot.blur(),si({edges:[uo.find(Xn=>Xn.id===n)]})):Ii([n])}};return q.jsxs("g",{className:Ji(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:l,animated:u,inactive:Kn,updating:ne}]),onClick:be,onDoubleClick:zt,onContextMenu:Wn,onMouseEnter:nn,onMouseMove:Rt,onMouseLeave:St,onKeyDown:Z?Sr:void 0,tabIndex:Z?0:void 0,role:Z?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":Q===null?void 0:Q||`Edge from ${v} to ${y}`,"aria-describedby":Z?`${qB}-${H}`:void 0,ref:ee,children:[!de&&q.jsx(e,{id:n,source:v,target:y,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,data:o,style:_,sourceX:g,sourceY:b,targetX:S,targetY:x,sourcePosition:w,targetPosition:C,sourceHandleId:I,targetHandleId:D,markerStart:Ce,markerEnd:Ke,pathOptions:j,interactionWidth:X}),J&&q.jsxs(q.Fragment,{children:[(J==="source"||J===!0)&&q.jsx(XI,{position:w,centerX:g,centerY:b,radius:L,onMouseDown:jr,onMouseEnter:ki,onMouseOut:lr,type:"source"}),(J==="target"||J===!0)&&q.jsx(XI,{position:C,centerX:S,centerY:x,radius:L,onMouseDown:lo,onMouseEnter:ki,onMouseOut:lr,type:"target"})]})]})};return t.displayName="EdgeWrapper",k.memo(t)};function w0e(e){const t={default:Lc(e.default||B1),straight:Lc(e.bezier||iA),step:Lc(e.step||rA),smoothstep:Lc(e.step||nS),simplebezier:Lc(e.simplebezier||nA)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=Lc(e[o]||B1),i),n);return{...t,...r}}function QI(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,o=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case Te.Top:return{x:r+o/2,y:i};case Te.Right:return{x:r+o,y:i+a/2};case Te.Bottom:return{x:r+o/2,y:i+a};case Te.Left:return{x:r,y:i+a/2}}}function YI(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const C0e=(e,t,n,r,i,o)=>{const a=QI(n,e,t),s=QI(o,r,i);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function E0e({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:a,height:s,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Ag({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function ZI(e){var r,i,o,a,s;const t=((r=e==null?void 0:e[Mn])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const A0e=[{level:0,isMaxLevel:!0,edges:[]}];function T0e(e,t,n=!1){let r=-1;const i=e.reduce((a,s)=>{var c,d;const l=qi(s.zIndex);let u=l?s.zIndex:0;if(n){const f=t.get(s.target),h=t.get(s.source),p=s.selected||(f==null?void 0:f.selected)||(h==null?void 0:h.selected),m=Math.max(((c=h==null?void 0:h[Mn])==null?void 0:c.z)||0,((d=f==null?void 0:f[Mn])==null?void 0:d.z)||0,1e3);u=(l?s.zIndex:0)+(p?m:0)}return a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),o=Object.entries(i).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return o.length===0?A0e:o}function P0e(e,t,n){const r=dn(k.useCallback(i=>e?i.edges.filter(o=>{const a=t.get(o.source),s=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&E0e({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return T0e(r,t,n)}const k0e=({color:e="none",strokeWidth:t=1})=>q.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),I0e=({color:e="none",strokeWidth:t=1})=>q.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),JI={[F1.Arrow]:k0e,[F1.ArrowClosed]:I0e};function M0e(e){const t=qn();return k.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(JI,e)?JI[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",ys.error009(e)),null)},[e])}const R0e=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=M0e(t);return l?q.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:s,refX:"0",refY:"0",children:q.jsx(l,{color:n,strokeWidth:a})}):null},O0e=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=D5(a,t);r.includes(s)||(i.push({id:s,color:a.color||e,...a}),r.push(s))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},oz=({defaultColor:e,rfId:t})=>{const n=dn(k.useCallback(O0e({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((o,a)=>o.id!==i[a].id)));return q.jsx("defs",{children:n.map(r=>q.jsx(R0e,{id:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient},r.id))})};oz.displayName="MarkerDefinitions";var $0e=k.memo(oz);const N0e=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),az=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeUpdate:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:m,children:_})=>{const{edgesFocusable:v,edgesUpdatable:y,elementsSelectable:g,width:b,height:S,connectionMode:x,nodeInternals:w,onError:C}=dn(N0e,ri),T=P0e(t,w,n);return b?q.jsxs(q.Fragment,{children:[T.map(({level:A,edges:I,isMaxLevel:D})=>q.jsxs("svg",{style:{zIndex:A},width:b,height:S,className:"react-flow__edges react-flow__container",children:[D&&q.jsx($0e,{defaultColor:e,rfId:r}),q.jsx("g",{children:I.map(M=>{const[E,P,N]=ZI(w.get(M.source)),[L,O,R]=ZI(w.get(M.target));if(!N||!R)return null;let $=M.type||"default";i[$]||(C==null||C("011",ys.error011($)),$="default");const z=i[$]||i.default,V=x===sc.Strict?O.target:(O.target??[]).concat(O.source??[]),H=YI(P.source,M.sourceHandle),Q=YI(V,M.targetHandle),Z=(H==null?void 0:H.position)||Te.Bottom,J=(Q==null?void 0:Q.position)||Te.Top,j=!!(M.focusable||v&&typeof M.focusable>"u"),X=typeof a<"u"&&(M.updatable||y&&typeof M.updatable>"u");if(!H||!Q)return C==null||C("008",ys.error008(H,M)),null;const{sourceX:ee,sourceY:ne,targetX:fe,targetY:de}=C0e(E,H,Z,L,Q,J);return q.jsx(z,{id:M.id,className:Ji([M.className,o]),type:$,data:M.data,selected:!!M.selected,animated:!!M.animated,hidden:!!M.hidden,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,style:M.style,source:M.source,target:M.target,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerEnd:M.markerEnd,markerStart:M.markerStart,sourceX:ee,sourceY:ne,targetX:fe,targetY:de,sourcePosition:Z,targetPosition:J,elementsSelectable:g,onEdgeUpdate:a,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:c,onClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:m,rfId:r,ariaLabel:M.ariaLabel,isFocusable:j,isUpdatable:X,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth},M.id)})})]},A)),_]}):null};az.displayName="EdgeRenderer";var D0e=k.memo(az);const L0e=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function F0e({children:e}){const t=dn(L0e);return q.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function B0e(e){const t=QB(),n=k.useRef(!1);k.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const z0e={[Te.Left]:Te.Right,[Te.Right]:Te.Left,[Te.Top]:Te.Bottom,[Te.Bottom]:Te.Top},sz=({nodeId:e,handleType:t,style:n,type:r=Js.Bezier,CustomComponent:i,connectionStatus:o})=>{var x,w,C;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=dn(k.useCallback(T=>({fromNode:T.nodeInternals.get(e),handleId:T.connectionHandleId,toX:(T.connectionPosition.x-T.transform[0])/T.transform[2],toY:(T.connectionPosition.y-T.transform[1])/T.transform[2],connectionMode:T.connectionMode}),[e]),ri),d=(x=a==null?void 0:a[Mn])==null?void 0:x.handleBounds;let f=d==null?void 0:d[t];if(c===sc.Loose&&(f=f||(d==null?void 0:d[t==="source"?"target":"source"])),!a||!f)return null;const h=s?f.find(T=>T.id===s):f[0],p=h?h.x+h.width/2:(a.width??0)/2,m=h?h.y+h.height/2:a.height??0,_=(((w=a.positionAbsolute)==null?void 0:w.x)??0)+p,v=(((C=a.positionAbsolute)==null?void 0:C.y)??0)+m,y=h==null?void 0:h.position,g=y?z0e[y]:null;if(!y||!g)return null;if(i)return q.jsx(i,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:h,fromX:_,fromY:v,toX:l,toY:u,fromPosition:y,toPosition:g,connectionStatus:o});let b="";const S={sourceX:_,sourceY:v,sourcePosition:y,targetX:l,targetY:u,targetPosition:g};return r===Js.Bezier?[b]=kB(S):r===Js.Step?[b]=N5({...S,borderRadius:0}):r===Js.SmoothStep?[b]=N5(S):r===Js.SimpleBezier?[b]=PB(S):b=`M${_},${v} ${l},${u}`,q.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:n})};sz.displayName="ConnectionLine";const j0e=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function V0e({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:a,width:s,height:l,connectionStatus:u}=dn(j0e,ri);return!(i&&o&&s&&a)?null:q.jsx("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container",children:q.jsx("g",{className:Ji(["react-flow__connection",u]),children:q.jsx(sz,{nodeId:i,handleType:o,style:t,type:n,CustomComponent:r,connectionStatus:u})})})}function e8(e,t){return k.useRef(null),qn(),k.useMemo(()=>t(e),[e])}const lz=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:_,connectionLineType:v,connectionLineStyle:y,connectionLineComponent:g,connectionLineContainerStyle:b,selectionKeyCode:S,selectionOnDrag:x,selectionMode:w,multiSelectionKeyCode:C,panActivationKeyCode:T,zoomActivationKeyCode:A,deleteKeyCode:I,onlyRenderVisibleElements:D,elementsSelectable:M,selectNodesOnDrag:E,defaultViewport:P,translateExtent:N,minZoom:L,maxZoom:O,preventScrolling:R,defaultMarkerColor:$,zoomOnScroll:z,zoomOnPinch:V,panOnScroll:H,panOnScrollSpeed:Q,panOnScrollMode:Z,zoomOnDoubleClick:J,panOnDrag:j,onPaneClick:X,onPaneMouseEnter:ee,onPaneMouseMove:ne,onPaneMouseLeave:fe,onPaneScroll:de,onPaneContextMenu:Be,onEdgeUpdate:$e,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ke,onEdgeMouseMove:be,onEdgeMouseLeave:zt,edgeUpdaterRadius:Wn,onEdgeUpdateStart:nn,onEdgeUpdateEnd:Rt,noDragClassName:St,noWheelClassName:bn,noPanClassName:jr,elevateEdgesOnSelect:lo,disableKeyboardA11y:ki,nodeOrigin:lr,nodeExtent:Kn,rfId:Sr})=>{const rn=e8(e,m0e),Ot=e8(t,w0e);return B0e(o),q.jsx(p0e,{onPaneClick:X,onPaneMouseEnter:ee,onPaneMouseMove:ne,onPaneMouseLeave:fe,onPaneContextMenu:Be,onPaneScroll:de,deleteKeyCode:I,selectionKeyCode:S,selectionOnDrag:x,selectionMode:w,onSelectionStart:m,onSelectionEnd:_,multiSelectionKeyCode:C,panActivationKeyCode:T,zoomActivationKeyCode:A,elementsSelectable:M,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:z,zoomOnPinch:V,zoomOnDoubleClick:J,panOnScroll:H,panOnScrollSpeed:Q,panOnScrollMode:Z,panOnDrag:j,defaultViewport:P,translateExtent:N,minZoom:L,maxZoom:O,onSelectionContextMenu:p,preventScrolling:R,noDragClassName:St,noWheelClassName:bn,noPanClassName:jr,disableKeyboardA11y:ki,children:q.jsxs(F0e,{children:[q.jsx(D0e,{edgeTypes:Ot,onEdgeClick:s,onEdgeDoubleClick:u,onEdgeUpdate:$e,onlyRenderVisibleElements:D,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ke,onEdgeMouseMove:be,onEdgeMouseLeave:zt,onEdgeUpdateStart:nn,onEdgeUpdateEnd:Rt,edgeUpdaterRadius:Wn,defaultMarkerColor:$,noPanClassName:jr,elevateEdgesOnSelect:!!lo,disableKeyboardA11y:ki,rfId:Sr,children:q.jsx(V0e,{style:y,type:v,component:g,containerStyle:b})}),q.jsx("div",{className:"react-flow__edgelabel-renderer"}),q.jsx(b0e,{nodeTypes:rn,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,selectNodesOnDrag:E,onlyRenderVisibleElements:D,noPanClassName:jr,noDragClassName:St,disableKeyboardA11y:ki,nodeOrigin:lr,nodeExtent:Kn,rfId:Sr})]})})};lz.displayName="GraphView";var U0e=k.memo(lz);const B5=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ns={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:B5,nodeExtent:B5,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:sc.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:mme,isValidConnection:void 0},G0e=()=>Ife((e,t)=>({...Ns,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=t();e({nodeInternals:Xx(n,r,i,o)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",a=i?Xx(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=n.reduce((m,_)=>{const v=i.get(_.id);if(v){const y=eA(_.nodeElement);!!(y.width&&y.height&&(v.width!==y.width||v.height!==y.height||_.forceUpdate))&&(i.set(v.id,{...v,[Mn]:{...v[Mn],handleBounds:{source:WI(".source",_.nodeElement,f,u),target:WI(".target",_.nodeElement,f,u)}},...y}),m.push({id:v.id,type:"dimensions",dimensions:y}))}return m},[]);KB(i,u);const p=a||o&&!a&&XB(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:p}),(h==null?void 0:h.length)>0&&(r==null||r(h))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:i};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});o(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(o){const u=yu(n,s()),c=Xx(u,i,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(o(),n),s=ld(i,[])),V0({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let a,s=null;r?a=n.map(l=>Ws(l,!0)):(a=ld(i,n),s=ld(o(),[])),V0({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=t(),a=n||o(),s=r||i,l=a.map(c=>(c.selected=!1,Ws(c.id,!1))),u=s.map(c=>Ws(c.id,!1));V0({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),o=r().filter(s=>s.selected).map(s=>Ws(s.id,!1)),a=n.filter(s=>s.selected).map(s=>Ws(s.id,!1));V0({changedNodes:o,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=tA(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return!1;const u=vl.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[i,o]],d=a==null?void 0:a.constrain()(u,c,l);return a.transform(s,d),r[0]!==d.x||r[1]!==d.y||r[2]!==d.k},cancelConnection:()=>e({connectionNodeId:Ns.connectionNodeId,connectionHandleId:Ns.connectionHandleId,connectionHandleType:Ns.connectionHandleType,connectionStatus:Ns.connectionStatus,connectionStartHandle:Ns.connectionStartHandle,connectionEndHandle:Ns.connectionEndHandle}),reset:()=>e({...Ns})}),Object.is),uz=({children:e})=>{const t=k.useRef(null);return t.current||(t.current=G0e()),q.jsx(ume,{value:t.current,children:e})};uz.displayName="ReactFlowProvider";const cz=({children:e})=>k.useContext(tS)?q.jsx(q.Fragment,{children:e}):q.jsx(uz,{children:e});cz.displayName="ReactFlowWrapper";const H0e={input:jB,default:L5,output:UB,group:uA},q0e={default:B1,straight:iA,step:rA,smoothstep:nS,simplebezier:nA},W0e=[0,0],K0e=[15,15],X0e={x:0,y:0,zoom:1},Q0e={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Y0e=k.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=H0e,edgeTypes:a=q0e,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:p,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:g,onNodeMouseLeave:b,onNodeContextMenu:S,onNodeDoubleClick:x,onNodeDragStart:w,onNodeDrag:C,onNodeDragStop:T,onNodesDelete:A,onEdgesDelete:I,onSelectionChange:D,onSelectionDragStart:M,onSelectionDrag:E,onSelectionDragStop:P,onSelectionContextMenu:N,onSelectionStart:L,onSelectionEnd:O,connectionMode:R=sc.Strict,connectionLineType:$=Js.Bezier,connectionLineStyle:z,connectionLineComponent:V,connectionLineContainerStyle:H,deleteKeyCode:Q="Backspace",selectionKeyCode:Z="Shift",selectionOnDrag:J=!1,selectionMode:j=Rl.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:ee=L1()?"Meta":"Control",zoomActivationKeyCode:ne=L1()?"Meta":"Control",snapToGrid:fe=!1,snapGrid:de=K0e,onlyRenderVisibleElements:Be=!1,selectNodesOnDrag:$e=!0,nodesDraggable:Ce,nodesConnectable:Ke,nodesFocusable:be,nodeOrigin:zt=W0e,edgesFocusable:Wn,edgesUpdatable:nn,elementsSelectable:Rt,defaultViewport:St=X0e,minZoom:bn=.5,maxZoom:jr=2,translateExtent:lo=B5,preventScrolling:ki=!0,nodeExtent:lr,defaultMarkerColor:Kn="#b1b1b7",zoomOnScroll:Sr=!0,zoomOnPinch:rn=!0,panOnScroll:Ot=!1,panOnScrollSpeed:si=.5,panOnScrollMode:Ii=Ru.Free,zoomOnDoubleClick:uo=!0,panOnDrag:Ma=!0,onPaneClick:Xn,onPaneMouseEnter:co,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Kt,children:xt,onEdgeUpdate:Qn,onEdgeContextMenu:$n,onEdgeDoubleClick:ur,onEdgeMouseEnter:xr,onEdgeMouseMove:Vr,onEdgeMouseLeave:Vo,onEdgeUpdateStart:wr,onEdgeUpdateEnd:Yn,edgeUpdaterRadius:Ra=10,onNodesChange:Is,onEdgesChange:Ms,noDragClassName:Cc="nodrag",noWheelClassName:Oa="nowheel",noPanClassName:Cr="nopan",fitView:ru=!1,fitViewOptions:P2,connectOnClick:k2=!0,attributionPosition:I2,proOptions:M2,defaultEdgeOptions:Rs,elevateNodesOnSelect:R2=!0,elevateEdgesOnSelect:O2=!1,disableKeyboardA11y:Qm=!1,autoPanOnConnect:$2=!0,autoPanOnNodeDrag:N2=!0,connectionRadius:D2=20,isValidConnection:Xf,onError:L2,style:Ec,id:Ac,...F2},Tc)=>{const Pc=Ac||"1";return q.jsx("div",{...F2,style:{...Ec,...Q0e},ref:Tc,className:Ji(["react-flow",i]),"data-testid":"rf__wrapper",id:Ac,children:q.jsxs(cz,{children:[q.jsx(U0e,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:g,onNodeMouseLeave:b,onNodeContextMenu:S,onNodeDoubleClick:x,nodeTypes:o,edgeTypes:a,connectionLineType:$,connectionLineStyle:z,connectionLineComponent:V,connectionLineContainerStyle:H,selectionKeyCode:Z,selectionOnDrag:J,selectionMode:j,deleteKeyCode:Q,multiSelectionKeyCode:ee,panActivationKeyCode:X,zoomActivationKeyCode:ne,onlyRenderVisibleElements:Be,selectNodesOnDrag:$e,defaultViewport:St,translateExtent:lo,minZoom:bn,maxZoom:jr,preventScrolling:ki,zoomOnScroll:Sr,zoomOnPinch:rn,zoomOnDoubleClick:uo,panOnScroll:Ot,panOnScrollSpeed:si,panOnScrollMode:Ii,panOnDrag:Ma,onPaneClick:Xn,onPaneMouseEnter:co,onPaneMouseMove:tu,onPaneMouseLeave:jo,onPaneScroll:nu,onPaneContextMenu:Kt,onSelectionContextMenu:N,onSelectionStart:L,onSelectionEnd:O,onEdgeUpdate:Qn,onEdgeContextMenu:$n,onEdgeDoubleClick:ur,onEdgeMouseEnter:xr,onEdgeMouseMove:Vr,onEdgeMouseLeave:Vo,onEdgeUpdateStart:wr,onEdgeUpdateEnd:Yn,edgeUpdaterRadius:Ra,defaultMarkerColor:Kn,noDragClassName:Cc,noWheelClassName:Oa,noPanClassName:Cr,elevateEdgesOnSelect:O2,rfId:Pc,disableKeyboardA11y:Qm,nodeOrigin:zt,nodeExtent:lr}),q.jsx(jme,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:p,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:v,nodesDraggable:Ce,nodesConnectable:Ke,nodesFocusable:be,edgesFocusable:Wn,edgesUpdatable:nn,elementsSelectable:Rt,elevateNodesOnSelect:R2,minZoom:bn,maxZoom:jr,nodeExtent:lr,onNodesChange:Is,onEdgesChange:Ms,snapToGrid:fe,snapGrid:de,connectionMode:R,translateExtent:lo,connectOnClick:k2,defaultEdgeOptions:Rs,fitView:ru,fitViewOptions:P2,onNodesDelete:A,onEdgesDelete:I,onNodeDragStart:w,onNodeDrag:C,onNodeDragStop:T,onSelectionDrag:E,onSelectionDragStart:M,onSelectionDragStop:P,noPanClassName:Cr,nodeOrigin:zt,rfId:Pc,autoPanOnConnect:$2,autoPanOnNodeDrag:N2,onError:L2,connectionRadius:D2,isValidConnection:Xf}),q.jsx(Bme,{onSelectionChange:D}),xt,q.jsx(fme,{proOptions:M2,position:I2}),q.jsx(qme,{rfId:Pc,disableKeyboardA11y:Qm})]})})});Y0e.displayName="ReactFlow";const Z0e=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function nje({children:e}){const t=dn(Z0e);return t?pi.createPortal(e,t):null}function rje(){const e=qn();return k.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=(Array.isArray(t)?t:[t]).reduce((a,s)=>{const l=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${s}"]`);return l&&a.push({id:s,nodeElement:l,forceUpdate:!0}),a},[]);requestAnimationFrame(()=>r(o))},[])}function J0e(){const e=[];return function(t,n){if(typeof n!="object"||n===null)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}const Pg=Kv("nodes/receivedOpenAPISchema",async(e,{rejectWithValue:t})=>{try{const n=[window.location.origin,"openapi.json"].join("/"),i=await(await fetch(n)).json();return JSON.parse(JSON.stringify(i,J0e()))}catch(n){return t({error:n})}}),ije=500,oje=320,dz="node-drag-handle",aje=["ImageField","ImageCollection"],sje={input:"inputs",output:"outputs"},G0=["Collection","IntegerCollection","BooleanCollection","FloatCollection","StringCollection","ImageCollection","LatentsCollection","ConditioningCollection","ControlCollection","ColorCollection","T2IAdapterCollection","IPAdapterCollection","MetadataItemCollection","MetadataCollection"],Vh=["IntegerPolymorphic","BooleanPolymorphic","FloatPolymorphic","StringPolymorphic","ImagePolymorphic","LatentsPolymorphic","ConditioningPolymorphic","ControlPolymorphic","ColorPolymorphic","T2IAdapterPolymorphic","IPAdapterPolymorphic","MetadataItemPolymorphic"],lje=["IPAdapterModelField","ControlNetModelField","LoRAModelField","MainModelField","ONNXModelField","SDXLMainModelField","SDXLRefinerModelField","VaeModelField","UNetField","VaeField","ClipField","T2IAdapterModelField","IPAdapterModelField"],dA={integer:"IntegerCollection",boolean:"BooleanCollection",number:"FloatCollection",float:"FloatCollection",string:"StringCollection",ImageField:"ImageCollection",LatentsField:"LatentsCollection",ConditioningField:"ConditioningCollection",ControlField:"ControlCollection",ColorField:"ColorCollection",T2IAdapterField:"T2IAdapterCollection",IPAdapterField:"IPAdapterCollection",MetadataItemField:"MetadataItemCollection",MetadataField:"MetadataCollection"},eye=e=>!!(e&&e in dA),fz={integer:"IntegerPolymorphic",boolean:"BooleanPolymorphic",number:"FloatPolymorphic",float:"FloatPolymorphic",string:"StringPolymorphic",ImageField:"ImagePolymorphic",LatentsField:"LatentsPolymorphic",ConditioningField:"ConditioningPolymorphic",ControlField:"ControlPolymorphic",ColorField:"ColorPolymorphic",T2IAdapterField:"T2IAdapterPolymorphic",IPAdapterField:"IPAdapterPolymorphic",MetadataItemField:"MetadataItemPolymorphic"},tye={IntegerPolymorphic:"integer",BooleanPolymorphic:"boolean",FloatPolymorphic:"float",StringPolymorphic:"string",ImagePolymorphic:"ImageField",LatentsPolymorphic:"LatentsField",ConditioningPolymorphic:"ConditioningField",ControlPolymorphic:"ControlField",ColorPolymorphic:"ColorField",T2IAdapterPolymorphic:"T2IAdapterField",IPAdapterPolymorphic:"IPAdapterField",MetadataItemPolymorphic:"MetadataItemField"},uje=["string","StringPolymorphic","boolean","BooleanPolymorphic","integer","float","FloatPolymorphic","IntegerPolymorphic","enum","ImageField","ImagePolymorphic","MainModelField","SDXLRefinerModelField","VaeModelField","LoRAModelField","ControlNetModelField","ColorField","SDXLMainModelField","Scheduler","IPAdapterModelField","BoardField","T2IAdapterModelField"],nye=e=>!!(e&&e in fz),cje={Any:{color:"gray.500",description:"Any field type is accepted.",title:"Any"},MetadataField:{color:"gray.500",description:"A metadata dict.",title:"Metadata Dict"},MetadataCollection:{color:"gray.500",description:"A collection of metadata dicts.",title:"Metadata Dict Collection"},MetadataItemField:{color:"gray.500",description:"A metadata item.",title:"Metadata Item"},MetadataItemCollection:{color:"gray.500",description:"Any field type is accepted.",title:"Metadata Item Collection"},MetadataItemPolymorphic:{color:"gray.500",description:"MetadataItem or MetadataItemCollection field types are accepted.",title:"Metadata Item Polymorphic"},boolean:{color:"green.500",description:K("nodes.booleanDescription"),title:K("nodes.boolean")},BooleanCollection:{color:"green.500",description:K("nodes.booleanCollectionDescription"),title:K("nodes.booleanCollection")},BooleanPolymorphic:{color:"green.500",description:K("nodes.booleanPolymorphicDescription"),title:K("nodes.booleanPolymorphic")},ClipField:{color:"green.500",description:K("nodes.clipFieldDescription"),title:K("nodes.clipField")},Collection:{color:"base.500",description:K("nodes.collectionDescription"),title:K("nodes.collection")},CollectionItem:{color:"base.500",description:K("nodes.collectionItemDescription"),title:K("nodes.collectionItem")},ColorCollection:{color:"pink.300",description:K("nodes.colorCollectionDescription"),title:K("nodes.colorCollection")},ColorField:{color:"pink.300",description:K("nodes.colorFieldDescription"),title:K("nodes.colorField")},ColorPolymorphic:{color:"pink.300",description:K("nodes.colorPolymorphicDescription"),title:K("nodes.colorPolymorphic")},ConditioningCollection:{color:"cyan.500",description:K("nodes.conditioningCollectionDescription"),title:K("nodes.conditioningCollection")},ConditioningField:{color:"cyan.500",description:K("nodes.conditioningFieldDescription"),title:K("nodes.conditioningField")},ConditioningPolymorphic:{color:"cyan.500",description:K("nodes.conditioningPolymorphicDescription"),title:K("nodes.conditioningPolymorphic")},ControlCollection:{color:"teal.500",description:K("nodes.controlCollectionDescription"),title:K("nodes.controlCollection")},ControlField:{color:"teal.500",description:K("nodes.controlFieldDescription"),title:K("nodes.controlField")},ControlNetModelField:{color:"teal.500",description:"TODO",title:"ControlNet"},ControlPolymorphic:{color:"teal.500",description:"Control info passed between nodes.",title:"Control Polymorphic"},DenoiseMaskField:{color:"blue.300",description:K("nodes.denoiseMaskFieldDescription"),title:K("nodes.denoiseMaskField")},enum:{color:"blue.500",description:K("nodes.enumDescription"),title:K("nodes.enum")},float:{color:"orange.500",description:K("nodes.floatDescription"),title:K("nodes.float")},FloatCollection:{color:"orange.500",description:K("nodes.floatCollectionDescription"),title:K("nodes.floatCollection")},FloatPolymorphic:{color:"orange.500",description:K("nodes.floatPolymorphicDescription"),title:K("nodes.floatPolymorphic")},ImageCollection:{color:"purple.500",description:K("nodes.imageCollectionDescription"),title:K("nodes.imageCollection")},ImageField:{color:"purple.500",description:K("nodes.imageFieldDescription"),title:K("nodes.imageField")},BoardField:{color:"purple.500",description:K("nodes.imageFieldDescription"),title:K("nodes.imageField")},ImagePolymorphic:{color:"purple.500",description:K("nodes.imagePolymorphicDescription"),title:K("nodes.imagePolymorphic")},integer:{color:"red.500",description:K("nodes.integerDescription"),title:K("nodes.integer")},IntegerCollection:{color:"red.500",description:K("nodes.integerCollectionDescription"),title:K("nodes.integerCollection")},IntegerPolymorphic:{color:"red.500",description:K("nodes.integerPolymorphicDescription"),title:K("nodes.integerPolymorphic")},IPAdapterCollection:{color:"teal.500",description:K("nodes.ipAdapterCollectionDescription"),title:K("nodes.ipAdapterCollection")},IPAdapterField:{color:"teal.500",description:K("nodes.ipAdapterDescription"),title:K("nodes.ipAdapter")},IPAdapterModelField:{color:"teal.500",description:K("nodes.ipAdapterModelDescription"),title:K("nodes.ipAdapterModel")},IPAdapterPolymorphic:{color:"teal.500",description:K("nodes.ipAdapterPolymorphicDescription"),title:K("nodes.ipAdapterPolymorphic")},LatentsCollection:{color:"pink.500",description:K("nodes.latentsCollectionDescription"),title:K("nodes.latentsCollection")},LatentsField:{color:"pink.500",description:K("nodes.latentsFieldDescription"),title:K("nodes.latentsField")},LatentsPolymorphic:{color:"pink.500",description:K("nodes.latentsPolymorphicDescription"),title:K("nodes.latentsPolymorphic")},LoRAModelField:{color:"teal.500",description:K("nodes.loRAModelFieldDescription"),title:K("nodes.loRAModelField")},MainModelField:{color:"teal.500",description:K("nodes.mainModelFieldDescription"),title:K("nodes.mainModelField")},ONNXModelField:{color:"teal.500",description:K("nodes.oNNXModelFieldDescription"),title:K("nodes.oNNXModelField")},Scheduler:{color:"base.500",description:K("nodes.schedulerDescription"),title:K("nodes.scheduler")},SDXLMainModelField:{color:"teal.500",description:K("nodes.sDXLMainModelFieldDescription"),title:K("nodes.sDXLMainModelField")},SDXLRefinerModelField:{color:"teal.500",description:K("nodes.sDXLRefinerModelFieldDescription"),title:K("nodes.sDXLRefinerModelField")},string:{color:"yellow.500",description:K("nodes.stringDescription"),title:K("nodes.string")},StringCollection:{color:"yellow.500",description:K("nodes.stringCollectionDescription"),title:K("nodes.stringCollection")},StringPolymorphic:{color:"yellow.500",description:K("nodes.stringPolymorphicDescription"),title:K("nodes.stringPolymorphic")},T2IAdapterCollection:{color:"teal.500",description:K("nodes.t2iAdapterCollectionDescription"),title:K("nodes.t2iAdapterCollection")},T2IAdapterField:{color:"teal.500",description:K("nodes.t2iAdapterFieldDescription"),title:K("nodes.t2iAdapterField")},T2IAdapterModelField:{color:"teal.500",description:"TODO",title:"T2I-Adapter"},T2IAdapterPolymorphic:{color:"teal.500",description:"T2I-Adapter info passed between nodes.",title:"T2I-Adapter Polymorphic"},UNetField:{color:"red.500",description:K("nodes.uNetFieldDescription"),title:K("nodes.uNetField")},VaeField:{color:"blue.500",description:K("nodes.vaeFieldDescription"),title:K("nodes.vaeField")},VaeModelField:{color:"teal.500",description:K("nodes.vaeModelFieldDescription"),title:K("nodes.vaeModelField")}},t8=(e,t,n)=>{let r=t,i=n;for(;e.find(o=>o.position.x===r&&o.position.y===i);)r=r+50,i=i+50;return{x:r,y:i}},rye=(e,t)=>{if(e==="Collection"&&t==="Collection")return!1;if(e===t)return!0;const n=e==="CollectionItem"&&!G0.includes(t),r=t==="CollectionItem"&&!G0.includes(e)&&!Vh.includes(e),i=Vh.includes(t)&&(()=>{if(!Vh.includes(t))return!1;const c=tye[t],d=dA[c];return e===c||e===d})(),o=e==="Collection"&&(G0.includes(t)||Vh.includes(t)),a=t==="Collection"&&G0.includes(e);return n||r||i||o||a||e==="integer"&&t==="float"||(e==="integer"||e==="float")&&t==="string"||t==="Any"};var iye="\0",lu="\0",n8="",Gr,Du,di,Yg,Kd,Xd,zi,Zo,nl,Jo,rl,Ga,Ha,Qd,Yd,qa,mo,Zg,z5,nO;let oye=(nO=class{constructor(t){Ut(this,Zg);Ut(this,Gr,!0);Ut(this,Du,!1);Ut(this,di,!1);Ut(this,Yg,void 0);Ut(this,Kd,()=>{});Ut(this,Xd,()=>{});Ut(this,zi,{});Ut(this,Zo,{});Ut(this,nl,{});Ut(this,Jo,{});Ut(this,rl,{});Ut(this,Ga,{});Ut(this,Ha,{});Ut(this,Qd,0);Ut(this,Yd,0);Ut(this,qa,void 0);Ut(this,mo,void 0);t&&(Ri(this,Gr,t.hasOwnProperty("directed")?t.directed:!0),Ri(this,Du,t.hasOwnProperty("multigraph")?t.multigraph:!1),Ri(this,di,t.hasOwnProperty("compound")?t.compound:!1)),te(this,di)&&(Ri(this,qa,{}),Ri(this,mo,{}),te(this,mo)[lu]={})}isDirected(){return te(this,Gr)}isMultigraph(){return te(this,Du)}isCompound(){return te(this,di)}setGraph(t){return Ri(this,Yg,t),this}graph(){return te(this,Yg)}setDefaultNodeLabel(t){return Ri(this,Kd,t),typeof t!="function"&&Ri(this,Kd,()=>t),this}nodeCount(){return te(this,Qd)}nodes(){return Object.keys(te(this,zi))}sources(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,Zo)[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(te(t,Jo)[n]).length===0)}setNodes(t,n){var r=arguments,i=this;return t.forEach(function(o){r.length>1?i.setNode(o,n):i.setNode(o)}),this}setNode(t,n){return te(this,zi).hasOwnProperty(t)?(arguments.length>1&&(te(this,zi)[t]=n),this):(te(this,zi)[t]=arguments.length>1?n:te(this,Kd).call(this,t),te(this,di)&&(te(this,qa)[t]=lu,te(this,mo)[t]={},te(this,mo)[lu][t]=!0),te(this,Zo)[t]={},te(this,nl)[t]={},te(this,Jo)[t]={},te(this,rl)[t]={},++Zf(this,Qd)._,this)}node(t){return te(this,zi)[t]}hasNode(t){return te(this,zi).hasOwnProperty(t)}removeNode(t){var n=this;if(te(this,zi).hasOwnProperty(t)){var r=i=>n.removeEdge(te(n,Ga)[i]);delete te(this,zi)[t],te(this,di)&&(Uo(this,Zg,z5).call(this,t),delete te(this,qa)[t],this.children(t).forEach(function(i){n.setParent(i)}),delete te(this,mo)[t]),Object.keys(te(this,Zo)[t]).forEach(r),delete te(this,Zo)[t],delete te(this,nl)[t],Object.keys(te(this,Jo)[t]).forEach(r),delete te(this,Jo)[t],delete te(this,rl)[t],--Zf(this,Qd)._}return this}setParent(t,n){if(!te(this,di))throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=lu;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),Uo(this,Zg,z5).call(this,t),te(this,qa)[t]=n,te(this,mo)[n][t]=!0,this}parent(t){if(te(this,di)){var n=te(this,qa)[t];if(n!==lu)return n}}children(t=lu){if(te(this,di)){var n=te(this,mo)[t];if(n)return Object.keys(n)}else{if(t===lu)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=te(this,nl)[t];if(n)return Object.keys(n)}successors(t){var n=te(this,rl)[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const i=new Set(n);for(var r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:te(this,Gr),multigraph:te(this,Du),compound:te(this,di)});n.setGraph(this.graph());var r=this;Object.entries(te(this,zi)).forEach(function([a,s]){t(a)&&n.setNode(a,s)}),Object.values(te(this,Ga)).forEach(function(a){n.hasNode(a.v)&&n.hasNode(a.w)&&n.setEdge(a,r.edge(a))});var i={};function o(a){var s=r.parent(a);return s===void 0||n.hasNode(s)?(i[a]=s,s):s in i?i[s]:o(s)}return te(this,di)&&n.nodes().forEach(a=>n.setParent(a,o(a))),n}setDefaultEdgeLabel(t){return Ri(this,Xd,t),typeof t!="function"&&Ri(this,Xd,()=>t),this}edgeCount(){return te(this,Yd)}edges(){return Object.values(te(this,Ga))}setPath(t,n){var r=this,i=arguments;return t.reduce(function(o,a){return i.length>1?r.setEdge(o,a,n):r.setEdge(o,a),a}),this}setEdge(){var t,n,r,i,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,n=a.w,r=a.name,arguments.length===2&&(i=arguments[1],o=!0)):(t=a,n=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var s=Uh(te(this,Gr),t,n,r);if(te(this,Ha).hasOwnProperty(s))return o&&(te(this,Ha)[s]=i),this;if(r!==void 0&&!te(this,Du))throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),te(this,Ha)[s]=o?i:te(this,Xd).call(this,t,n,r);var l=aye(te(this,Gr),t,n,r);return t=l.v,n=l.w,Object.freeze(l),te(this,Ga)[s]=l,r8(te(this,nl)[n],t),r8(te(this,rl)[t],n),te(this,Zo)[n][s]=l,te(this,Jo)[t][s]=l,Zf(this,Yd)._++,this}edge(t,n,r){var i=arguments.length===1?Jx(te(this,Gr),arguments[0]):Uh(te(this,Gr),t,n,r);return te(this,Ha)[i]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var i=arguments.length===1?Jx(te(this,Gr),arguments[0]):Uh(te(this,Gr),t,n,r);return te(this,Ha).hasOwnProperty(i)}removeEdge(t,n,r){var i=arguments.length===1?Jx(te(this,Gr),arguments[0]):Uh(te(this,Gr),t,n,r),o=te(this,Ga)[i];return o&&(t=o.v,n=o.w,delete te(this,Ha)[i],delete te(this,Ga)[i],i8(te(this,nl)[n],t),i8(te(this,rl)[t],n),delete te(this,Zo)[n][i],delete te(this,Jo)[t][i],Zf(this,Yd)._--),this}inEdges(t,n){var r=te(this,Zo)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.v===n):i}}outEdges(t,n){var r=te(this,Jo)[t];if(r){var i=Object.values(r);return n?i.filter(o=>o.w===n):i}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}},Gr=new WeakMap,Du=new WeakMap,di=new WeakMap,Yg=new WeakMap,Kd=new WeakMap,Xd=new WeakMap,zi=new WeakMap,Zo=new WeakMap,nl=new WeakMap,Jo=new WeakMap,rl=new WeakMap,Ga=new WeakMap,Ha=new WeakMap,Qd=new WeakMap,Yd=new WeakMap,qa=new WeakMap,mo=new WeakMap,Zg=new WeakSet,z5=function(t){delete te(this,mo)[te(this,qa)[t]][t]},nO);function r8(e,t){e[t]?e[t]++:e[t]=1}function i8(e,t){--e[t]||delete e[t]}function Uh(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}return i+n8+o+n8+(r===void 0?iye:r)}function aye(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function Jx(e,t){return Uh(e,t.v,t.w,t.name)}var fA=oye,sye="2.1.13",lye={Graph:fA,version:sye},uye=fA,cye={write:dye,read:pye};function dye(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:fye(e),edges:hye(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function fye(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function hye(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function pye(e){var t=new uye(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var gye=mye;function mye(e){var t={},n=[],r;function i(o){t.hasOwnProperty(o)||(t[o]=!0,r.push(o),e.successors(o).forEach(i),e.predecessors(o).forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&n.push(r)}),n}var hr,Wa,Jg,j5,em,V5,Zd,Xy,rO;let yye=(rO=class{constructor(){Ut(this,Jg);Ut(this,em);Ut(this,Zd);Ut(this,hr,[]);Ut(this,Wa,{})}size(){return te(this,hr).length}keys(){return te(this,hr).map(function(t){return t.key})}has(t){return te(this,Wa).hasOwnProperty(t)}priority(t){var n=te(this,Wa)[t];if(n!==void 0)return te(this,hr)[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return te(this,hr)[0].key}add(t,n){var r=te(this,Wa);if(t=String(t),!r.hasOwnProperty(t)){var i=te(this,hr),o=i.length;return r[t]=o,i.push({key:t,priority:n}),Uo(this,em,V5).call(this,o),!0}return!1}removeMin(){Uo(this,Zd,Xy).call(this,0,te(this,hr).length-1);var t=te(this,hr).pop();return delete te(this,Wa)[t.key],Uo(this,Jg,j5).call(this,0),t.key}decrease(t,n){var r=te(this,Wa)[t];if(n>te(this,hr)[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+te(this,hr)[r].priority+" New: "+n);te(this,hr)[r].priority=n,Uo(this,em,V5).call(this,r)}},hr=new WeakMap,Wa=new WeakMap,Jg=new WeakSet,j5=function(t){var n=te(this,hr),r=2*t,i=r+1,o=t;r>1,!(n[i].priority1;function _ye(e,t,n,r){return Sye(e,String(t),n||bye,r||function(i){return e.outEdges(i)})}function Sye(e,t,n,r){var i={},o=new vye,a,s,l=function(u){var c=u.v!==a?u.v:u.w,d=i[c],f=n(u),h=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);h0&&(a=o.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)r(a).forEach(l);return i}var xye=pz,wye=Cye;function Cye(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=xye(e,i,t,n),r},{})}var gz=Eye;function Eye(e){var t=0,n=[],r={},i=[];function o(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(c){r.hasOwnProperty(c)?r[c].onStack&&(s.lowlink=Math.min(s.lowlink,r[c].index)):(o(c),s.lowlink=Math.min(s.lowlink,r[c].lowlink))}),s.lowlink===s.index){var l=[],u;do u=n.pop(),r[u].onStack=!1,l.push(u);while(a!==u);i.push(l)}}return e.nodes().forEach(function(a){r.hasOwnProperty(a)||o(a)}),i}var Aye=gz,Tye=Pye;function Pye(e){return Aye(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var kye=Mye,Iye=()=>1;function Mye(e,t,n){return Rye(e,t||Iye,n||function(r){return e.outEdges(r)})}function Rye(e,t,n){var r={},i=e.nodes();return i.forEach(function(o){r[o]={},r[o][o]={distance:0},i.forEach(function(a){o!==a&&(r[o][a]={distance:Number.POSITIVE_INFINITY})}),n(o).forEach(function(a){var s=a.v===o?a.w:a.v,l=t(a);r[o][s]={distance:l,predecessor:o}})}),i.forEach(function(o){var a=r[o];i.forEach(function(s){var l=r[s];i.forEach(function(u){var c=l[o],d=a[u],f=l[u],h=c.distance+d.distance;he.successors(s):s=>e.neighbors(s),i=n==="post"?Dye:Lye,o=[],a={};return t.forEach(s=>{if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);i(s,r,a,o)}),o}function Dye(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):n.hasOwnProperty(o[0])||(n[o[0]]=!0,i.push([o[0],!0]),bz(t(o[0]),a=>i.push([a,!1])))}}function Lye(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();n.hasOwnProperty(o)||(n[o]=!0,r.push(o),bz(t(o),a=>i.push(a)))}}function bz(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var Fye=vz,Bye=zye;function zye(e,t){return Fye(e,t,"post")}var jye=vz,Vye=Uye;function Uye(e,t){return jye(e,t,"pre")}var Gye=fA,Hye=hz,qye=Wye;function Wye(e,t){var n=new Gye,r={},i=new Hye,o;function a(l){var u=l.v===o?l.w:l.v,c=i.priority(u);if(c!==void 0){var d=t(l);d0;){if(o=i.removeMin(),r.hasOwnProperty(o))n.setEdge(o,r[o]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(o).forEach(a)}return n}var Kye={components:gye,dijkstra:pz,dijkstraAll:wye,findCycles:Tye,floydWarshall:kye,isAcyclic:Oye,postorder:Bye,preorder:Vye,prim:qye,tarjan:gz,topsort:yz},a8=lye,Xye={Graph:a8.Graph,json:cye,alg:Kye,version:a8.version};const s8=Bl(Xye),l8=(e,t,n,r)=>{const i=new s8.Graph;return n.forEach(o=>{i.setNode(o.id)}),r.forEach(o=>{i.setEdge(o.source,o.target)}),i.setEdge(e,t),s8.alg.isAcyclic(i)},u8=(e,t,n,r,i)=>{let o=!0;return t==="source"?e.find(a=>a.target===r.id&&a.targetHandle===i.name)&&(o=!1):e.find(a=>a.source===r.id&&a.sourceHandle===i.name)&&(o=!1),rye(n,i.type)||(o=!1),o},c8=(e,t,n,r,i,o,a)=>{if(e.id===r)return null;const s=o=="source"?e.data.inputs:e.data.outputs;if(s[i]){const l=s[i],u=o=="source"?r:e.id,c=o=="source"?e.id:r,d=o=="source"?i:l.name,f=o=="source"?l.name:i,h=l8(u,c,t,n),p=u8(n,o,a,e,l);if(h&&p)return{source:u,sourceHandle:d,target:c,targetHandle:f}}for(const l in s){const u=s[l],c=o=="source"?r:e.id,d=o=="source"?e.id:r,f=o=="source"?i:u.name,h=o=="source"?u.name:i,p=l8(c,d,t,n),m=u8(n,o,a,e,u);if(p&&m)return{source:c,sourceHandle:f,target:d,targetHandle:h}}return null},Qye="1.0.0",ew={status:wu.PENDING,error:null,progress:null,progressImage:null,outputs:[]},G5={meta:{version:Qye},name:"",author:"",description:"",notes:"",tags:"",contact:"",version:"",exposedFields:[]},_z={nodes:[],edges:[],nodeTemplates:{},isReady:!1,connectionStartParams:null,currentConnectionFieldType:null,connectionMade:!1,modifyingEdge:!1,addNewNodePosition:null,shouldShowFieldTypeLegend:!1,shouldShowMinimapPanel:!0,shouldValidateGraph:!0,shouldAnimateEdges:!0,shouldSnapToGrid:!1,shouldColorEdges:!0,isAddNodePopoverOpen:!1,nodeOpacity:1,selectedNodes:[],selectedEdges:[],workflow:G5,nodeExecutionStates:{},viewport:{x:0,y:0,zoom:1},mouseOverField:null,mouseOverNode:null,nodesToCopy:[],edgesToCopy:[],selectionMode:Rl.Partial},Ar=(e,t)=>{var l,u;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(c=>c.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=(u=a.data)==null?void 0:u.inputs[r];s&&o>-1&&(s.value=i)},Sz=qt({name:"nodes",initialState:_z,reducers:{nodesChanged:(e,t)=>{e.nodes=yu(t.payload,e.nodes)},nodeReplaced:(e,t)=>{const n=e.nodes.findIndex(r=>r.id===t.payload.nodeId);n<0||(e.nodes[n]=t.payload.node)},nodeAdded:(e,t)=>{var i,o;const n=t.payload,r=t8(e.nodes,((i=e.addNewNodePosition)==null?void 0:i.x)??n.position.x,((o=e.addNewNodePosition)==null?void 0:o.y)??n.position.y);if(n.position=r,n.selected=!0,e.nodes=yu(e.nodes.map(a=>({id:a.id,type:"select",selected:!1})),e.nodes),e.edges=su(e.edges.map(a=>({id:a.id,type:"select",selected:!1})),e.edges),e.nodes.push(n),!!on(n)){if(e.nodeExecutionStates[n.id]={nodeId:n.id,...ew},e.connectionStartParams){const{nodeId:a,handleId:s,handleType:l}=e.connectionStartParams;if(a&&s&&l&&e.currentConnectionFieldType){const u=c8(n,e.nodes,e.edges,a,s,l,e.currentConnectionFieldType);u&&(e.edges=jh({...u,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}},edgeChangeStarted:e=>{e.modifyingEdge=!0},edgesChanged:(e,t)=>{e.edges=su(t.payload,e.edges)},edgeAdded:(e,t)=>{e.edges=jh(t.payload,e.edges)},edgeUpdated:(e,t)=>{const{oldEdge:n,newConnection:r}=t.payload;e.edges=Pme(n,r,e.edges)},connectionStarted:(e,t)=>{var l;e.connectionStartParams=t.payload,e.connectionMade=e.modifyingEdge;const{nodeId:n,handleId:r,handleType:i}=t.payload;if(!n||!r)return;const o=e.nodes.findIndex(u=>u.id===n),a=(l=e.nodes)==null?void 0:l[o];if(!on(a))return;const s=i==="source"?a.data.outputs[r]:a.data.inputs[r];e.currentConnectionFieldType=(s==null?void 0:s.type)??null},connectionMade:(e,t)=>{e.currentConnectionFieldType&&(e.edges=jh({...t.payload,type:"default"},e.edges),e.connectionMade=!0)},connectionEnded:(e,t)=>{var n;if(e.connectionMade)e.connectionStartParams=null,e.currentConnectionFieldType=null;else if(e.mouseOverNode){const r=e.nodes.findIndex(o=>o.id===e.mouseOverNode),i=(n=e.nodes)==null?void 0:n[r];if(i&&e.connectionStartParams){const{nodeId:o,handleId:a,handleType:s}=e.connectionStartParams;if(o&&a&&s&&e.currentConnectionFieldType){const l=c8(i,e.nodes,e.edges,o,a,s,e.currentConnectionFieldType);l&&(e.edges=jh({...l,type:"default"},e.edges))}}e.connectionStartParams=null,e.currentConnectionFieldType=null}else e.addNewNodePosition=t.payload.cursorPosition,e.isAddNodePopoverOpen=!0;e.modifyingEdge=!1},workflowExposedFieldAdded:(e,t)=>{e.workflow.exposedFields=c5(e.workflow.exposedFields.concat(t.payload),n=>`${n.nodeId}-${n.fieldName}`)},workflowExposedFieldRemoved:(e,t)=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(n=>!pE(n,t.payload))},fieldLabelChanged:(e,t)=>{const{nodeId:n,fieldName:r,label:i}=t.payload,o=e.nodes.find(s=>s.id===n);if(!on(o))return;const a=o.data.inputs[r];a&&(a.label=i)},nodeEmbedWorkflowChanged:(e,t)=>{var a;const{nodeId:n,embedWorkflow:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.embedWorkflow=r)},nodeUseCacheChanged:(e,t)=>{var a;const{nodeId:n,useCache:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.useCache=r)},nodeIsIntermediateChanged:(e,t)=>{var a;const{nodeId:n,isIntermediate:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.isIntermediate=r)},nodeIsOpenChanged:(e,t)=>{var s;const{nodeId:n,isOpen:r}=t.payload,i=e.nodes.findIndex(l=>l.id===n),o=(s=e.nodes)==null?void 0:s[i];if(!on(o)&&!cI(o)||(o.data.isOpen=r,!on(o)))return;const a=sA([o],e.edges);if(r)a.forEach(l=>{delete l.hidden}),a.forEach(l=>{l.type==="collapsed"&&(e.edges=e.edges.filter(u=>u.id!==l.id))});else{const l=Ame(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),u=Eme(o,e.nodes,e.edges).filter(d=>on(d)&&d.data.isOpen===!1),c=[];a.forEach(d=>{var f,h;if(d.target===n&&l.find(p=>p.id===d.source)){d.hidden=!0;const p=c.find(m=>m.source===d.source&&m.target===d.target);p?p.data={count:(((f=p.data)==null?void 0:f.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}if(d.source===n&&u.find(p=>p.id===d.target)){const p=c.find(m=>m.source===d.source&&m.target===d.target);d.hidden=!0,p?p.data={count:(((h=p.data)==null?void 0:h.count)??0)+1}:c.push({id:`${d.source}-${d.target}-collapsed`,source:d.source,target:d.target,type:"collapsed",data:{count:1},updatable:!1})}}),c.length&&(e.edges=su(c.map(d=>({type:"add",item:d})),e.edges))}},edgeDeleted:(e,t)=>{e.edges=e.edges.filter(n=>n.id!==t.payload)},edgesDeleted:(e,t)=>{const r=t.payload.filter(i=>i.type==="collapsed");if(r.length){const i=[];r.forEach(o=>{e.edges.forEach(a=>{a.source===o.source&&a.target===o.target&&i.push({id:a.id,type:"remove"})})}),e.edges=su(i,e.edges)}},nodesDeleted:(e,t)=>{t.payload.forEach(n=>{e.workflow.exposedFields=e.workflow.exposedFields.filter(r=>r.nodeId!==n.id),on(n)&&delete e.nodeExecutionStates[n.id]})},nodeLabelChanged:(e,t)=>{var a;const{nodeId:n,label:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.label=r)},nodeNotesChanged:(e,t)=>{var a;const{nodeId:n,notes:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];on(o)&&(o.data.notes=r)},nodeExclusivelySelected:(e,t)=>{const n=t.payload;e.nodes=yu(e.nodes.map(r=>({id:r.id,type:"select",selected:r.id===n})),e.nodes)},selectedNodesChanged:(e,t)=>{e.selectedNodes=t.payload},selectedEdgesChanged:(e,t)=>{e.selectedEdges=t.payload},fieldStringValueChanged:(e,t)=>{Ar(e,t)},fieldNumberValueChanged:(e,t)=>{Ar(e,t)},fieldBooleanValueChanged:(e,t)=>{Ar(e,t)},fieldBoardValueChanged:(e,t)=>{Ar(e,t)},fieldImageValueChanged:(e,t)=>{Ar(e,t)},fieldColorValueChanged:(e,t)=>{Ar(e,t)},fieldMainModelValueChanged:(e,t)=>{Ar(e,t)},fieldRefinerModelValueChanged:(e,t)=>{Ar(e,t)},fieldVaeModelValueChanged:(e,t)=>{Ar(e,t)},fieldLoRAModelValueChanged:(e,t)=>{Ar(e,t)},fieldControlNetModelValueChanged:(e,t)=>{Ar(e,t)},fieldIPAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldT2IAdapterModelValueChanged:(e,t)=>{Ar(e,t)},fieldEnumModelValueChanged:(e,t)=>{Ar(e,t)},fieldSchedulerValueChanged:(e,t)=>{Ar(e,t)},imageCollectionFieldValueChanged:(e,t)=>{var u,c;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(d=>d.id===n);if(o===-1)return;const a=(u=e.nodes)==null?void 0:u[o];if(!on(a))return;const s=(c=a.data)==null?void 0:c.inputs[r];if(!s)return;const l=Ye(s.value);if(!l){s.value=i;return}s.value=c5(l.concat(i),"image_name")},notesNodeValueChanged:(e,t)=>{var a;const{nodeId:n,value:r}=t.payload,i=e.nodes.findIndex(s=>s.id===n),o=(a=e.nodes)==null?void 0:a[i];cI(o)&&(o.data.notes=r)},shouldShowFieldTypeLegendChanged:(e,t)=>{e.shouldShowFieldTypeLegend=t.payload},shouldShowMinimapPanelChanged:(e,t)=>{e.shouldShowMinimapPanel=t.payload},nodeTemplatesBuilt:(e,t)=>{e.nodeTemplates=t.payload,e.isReady=!0},nodeEditorReset:e=>{e.nodes=[],e.edges=[],e.workflow=Ye(G5)},shouldValidateGraphChanged:(e,t)=>{e.shouldValidateGraph=t.payload},shouldAnimateEdgesChanged:(e,t)=>{e.shouldAnimateEdges=t.payload},shouldSnapToGridChanged:(e,t)=>{e.shouldSnapToGrid=t.payload},shouldColorEdgesChanged:(e,t)=>{e.shouldColorEdges=t.payload},nodeOpacityChanged:(e,t)=>{e.nodeOpacity=t.payload},workflowNameChanged:(e,t)=>{e.workflow.name=t.payload},workflowDescriptionChanged:(e,t)=>{e.workflow.description=t.payload},workflowTagsChanged:(e,t)=>{e.workflow.tags=t.payload},workflowAuthorChanged:(e,t)=>{e.workflow.author=t.payload},workflowNotesChanged:(e,t)=>{e.workflow.notes=t.payload},workflowVersionChanged:(e,t)=>{e.workflow.version=t.payload},workflowContactChanged:(e,t)=>{e.workflow.contact=t.payload},workflowLoaded:(e,t)=>{const{nodes:n,edges:r,...i}=t.payload;e.workflow=i,e.nodes=yu(n.map(o=>({item:{...o,dragHandle:`.${dz}`},type:"add"})),[]),e.edges=su(r.map(o=>({item:o,type:"add"})),[]),e.nodeExecutionStates=n.reduce((o,a)=>(o[a.id]={nodeId:a.id,...ew},o),{})},workflowReset:e=>{e.workflow=Ye(G5)},viewportChanged:(e,t)=>{e.viewport=t.payload},mouseOverFieldChanged:(e,t)=>{e.mouseOverField=t.payload},mouseOverNodeChanged:(e,t)=>{e.mouseOverNode=t.payload},selectedAll:e=>{e.nodes=yu(e.nodes.map(t=>({id:t.id,type:"select",selected:!0})),e.nodes),e.edges=su(e.edges.map(t=>({id:t.id,type:"select",selected:!0})),e.edges)},selectionCopied:e=>{if(e.nodesToCopy=e.nodes.filter(t=>t.selected).map(Ye),e.edgesToCopy=e.edges.filter(t=>t.selected).map(Ye),e.nodesToCopy.length>0){const t={x:0,y:0};e.nodesToCopy.forEach(n=>{const r=.15*(n.width??0),i=.5*(n.height??0);t.x+=n.position.x+r,t.y+=n.position.y+i}),t.x/=e.nodesToCopy.length,t.y/=e.nodesToCopy.length,e.nodesToCopy.forEach(n=>{n.position.x-=t.x,n.position.y-=t.y})}},selectionPasted:(e,t)=>{const{cursorPosition:n}=t.payload,r=e.nodesToCopy.map(Ye),i=r.map(c=>c.data.id),o=e.edgesToCopy.filter(c=>i.includes(c.source)&&i.includes(c.target)).map(Ye);o.forEach(c=>c.selected=!0),r.forEach(c=>{const d=yl();o.forEach(h=>{h.source===c.data.id&&(h.source=d,h.id=h.id.replace(c.data.id,d)),h.target===c.data.id&&(h.target=d,h.id=h.id.replace(c.data.id,d))}),c.selected=!0,c.id=d,c.data.id=d;const f=t8(e.nodes,c.position.x+((n==null?void 0:n.x)??0),c.position.y+((n==null?void 0:n.y)??0));c.position=f});const a=r.map(c=>({item:c,type:"add"})),s=e.nodes.map(c=>({id:c.data.id,type:"select",selected:!1})),l=o.map(c=>({item:c,type:"add"})),u=e.edges.map(c=>({id:c.id,type:"select",selected:!1}));e.nodes=yu(a.concat(s),e.nodes),e.edges=su(l.concat(u),e.edges),r.forEach(c=>{e.nodeExecutionStates[c.id]={nodeId:c.id,...ew}})},addNodePopoverOpened:e=>{e.addNewNodePosition=null,e.isAddNodePopoverOpen=!0},addNodePopoverClosed:e=>{e.isAddNodePopoverOpen=!1,e.connectionStartParams=null,e.currentConnectionFieldType=null},addNodePopoverToggled:e=>{e.isAddNodePopoverOpen=!e.isAddNodePopoverOpen},selectionModeChanged:(e,t)=>{e.selectionMode=t.payload?Rl.Full:Rl.Partial}},extraReducers:e=>{e.addCase(Pg.pending,t=>{t.isReady=!1}),e.addCase(vE,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.IN_PROGRESS)}),e.addCase(_E,(t,n)=>{const{source_node_id:r,result:i}=n.payload.data,o=t.nodeExecutionStates[r];o&&(o.status=wu.COMPLETED,o.progress!==null&&(o.progress=1),o.outputs.push(i))}),e.addCase(r_,(t,n)=>{const{source_node_id:r}=n.payload.data,i=t.nodeExecutionStates[r];i&&(i.status=wu.FAILED,i.error=n.payload.data.error,i.progress=null,i.progressImage=null)}),e.addCase(SE,(t,n)=>{const{source_node_id:r,step:i,total_steps:o,progress_image:a}=n.payload.data,s=t.nodeExecutionStates[r];s&&(s.status=wu.IN_PROGRESS,s.progress=(i+1)/o,s.progressImage=a??null)}),e.addCase(i_,(t,n)=>{["in_progress"].includes(n.payload.data.queue_item.status)&&ps(t.nodeExecutionStates,r=>{r.status=wu.PENDING,r.error=null,r.progress=null,r.progressImage=null,r.outputs=[]})})}}),{addNodePopoverClosed:hje,addNodePopoverOpened:pje,addNodePopoverToggled:gje,connectionEnded:mje,connectionMade:yje,connectionStarted:vje,edgeDeleted:bje,edgeChangeStarted:_je,edgesChanged:Sje,edgesDeleted:xje,edgeUpdated:wje,fieldBoardValueChanged:Cje,fieldBooleanValueChanged:Eje,fieldColorValueChanged:Aje,fieldControlNetModelValueChanged:Tje,fieldEnumModelValueChanged:Pje,fieldImageValueChanged:rS,fieldIPAdapterModelValueChanged:kje,fieldT2IAdapterModelValueChanged:Ije,fieldLabelChanged:Mje,fieldLoRAModelValueChanged:Rje,fieldMainModelValueChanged:Oje,fieldNumberValueChanged:$je,fieldRefinerModelValueChanged:Nje,fieldSchedulerValueChanged:Dje,fieldStringValueChanged:Lje,fieldVaeModelValueChanged:Fje,imageCollectionFieldValueChanged:Bje,mouseOverFieldChanged:zje,mouseOverNodeChanged:jje,nodeAdded:Vje,nodeReplaced:xz,nodeEditorReset:Yye,nodeEmbedWorkflowChanged:Uje,nodeExclusivelySelected:Gje,nodeIsIntermediateChanged:Hje,nodeIsOpenChanged:qje,nodeLabelChanged:Wje,nodeNotesChanged:Kje,nodeOpacityChanged:Xje,nodesChanged:Qje,nodesDeleted:Yje,nodeTemplatesBuilt:wz,nodeUseCacheChanged:Zje,notesNodeValueChanged:Jje,selectedAll:eVe,selectedEdgesChanged:tVe,selectedNodesChanged:nVe,selectionCopied:rVe,selectionModeChanged:iVe,selectionPasted:oVe,shouldAnimateEdgesChanged:aVe,shouldColorEdgesChanged:sVe,shouldShowFieldTypeLegendChanged:lVe,shouldShowMinimapPanelChanged:uVe,shouldSnapToGridChanged:cVe,shouldValidateGraphChanged:dVe,viewportChanged:fVe,workflowAuthorChanged:hVe,workflowContactChanged:pVe,workflowDescriptionChanged:gVe,workflowExposedFieldAdded:Zye,workflowExposedFieldRemoved:mVe,workflowLoaded:Jye,workflowNameChanged:yVe,workflowNotesChanged:vVe,workflowTagsChanged:bVe,workflowVersionChanged:_Ve,edgeAdded:SVe}=Sz.actions,eve=Sz.reducer,Cz={esrganModelName:"RealESRGAN_x4plus.pth"},Ez=qt({name:"postprocessing",initialState:Cz,reducers:{esrganModelNameChanged:(e,t)=>{e.esrganModelName=t.payload}}}),{esrganModelNameChanged:xVe}=Ez.actions,tve=Ez.reducer,Az={positiveStylePrompt:"",negativeStylePrompt:"",shouldConcatSDXLStylePrompt:!0,shouldUseSDXLRefiner:!1,sdxlImg2ImgDenoisingStrength:.7,refinerModel:null,refinerSteps:20,refinerCFGScale:7.5,refinerScheduler:"euler",refinerPositiveAestheticScore:6,refinerNegativeAestheticScore:2.5,refinerStart:.8},Tz=qt({name:"sdxl",initialState:Az,reducers:{setPositiveStylePromptSDXL:(e,t)=>{e.positiveStylePrompt=t.payload},setNegativeStylePromptSDXL:(e,t)=>{e.negativeStylePrompt=t.payload},setShouldConcatSDXLStylePrompt:(e,t)=>{e.shouldConcatSDXLStylePrompt=t.payload},setShouldUseSDXLRefiner:(e,t)=>{e.shouldUseSDXLRefiner=t.payload},setSDXLImg2ImgDenoisingStrength:(e,t)=>{e.sdxlImg2ImgDenoisingStrength=t.payload},refinerModelChanged:(e,t)=>{e.refinerModel=t.payload},setRefinerSteps:(e,t)=>{e.refinerSteps=t.payload},setRefinerCFGScale:(e,t)=>{e.refinerCFGScale=t.payload},setRefinerScheduler:(e,t)=>{e.refinerScheduler=t.payload},setRefinerPositiveAestheticScore:(e,t)=>{e.refinerPositiveAestheticScore=t.payload},setRefinerNegativeAestheticScore:(e,t)=>{e.refinerNegativeAestheticScore=t.payload},setRefinerStart:(e,t)=>{e.refinerStart=t.payload}}}),{setPositiveStylePromptSDXL:wVe,setNegativeStylePromptSDXL:CVe,setShouldConcatSDXLStylePrompt:EVe,setShouldUseSDXLRefiner:nve,setSDXLImg2ImgDenoisingStrength:AVe,refinerModelChanged:d8,setRefinerSteps:TVe,setRefinerCFGScale:PVe,setRefinerScheduler:kVe,setRefinerPositiveAestheticScore:IVe,setRefinerNegativeAestheticScore:MVe,setRefinerStart:RVe}=Tz.actions,rve=Tz.reducer,ive=(e,t,n)=>t===0?0:n===2?Math.floor((e+1+1)/2)/Math.floor((t+1)/2):(e+1+1)/(t+1),vs=e=>typeof e=="string"?{title:e,status:"info",isClosable:!0,duration:2500}:{status:"info",isClosable:!0,duration:2500,...e},Pz={isInitialized:!1,isConnected:!1,shouldConfirmOnDelete:!0,enableImageDebugging:!1,toastQueue:[],denoiseProgress:null,shouldAntialiasProgressImage:!1,consoleLogLevel:"debug",shouldLogToConsole:!0,language:"en",shouldUseNSFWChecker:!1,shouldUseWatermarker:!1,shouldEnableInformationalPopovers:!1,status:"DISCONNECTED"},kz=qt({name:"system",initialState:Pz,reducers:{setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},consoleLogLevelChanged:(e,t)=>{e.consoleLogLevel=t.payload},shouldLogToConsoleChanged:(e,t)=>{e.shouldLogToConsole=t.payload},shouldAntialiasProgressImageChanged:(e,t)=>{e.shouldAntialiasProgressImage=t.payload},languageChanged:(e,t)=>{e.language=t.payload},shouldUseNSFWCheckerChanged(e,t){e.shouldUseNSFWChecker=t.payload},shouldUseWatermarkerChanged(e,t){e.shouldUseWatermarker=t.payload},setShouldEnableInformationalPopovers(e,t){e.shouldEnableInformationalPopovers=t.payload},isInitializedChanged(e,t){e.isInitialized=t.payload}},extraReducers(e){e.addCase(yE,t=>{t.isConnected=!0,t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(MD,t=>{t.isConnected=!1,t.denoiseProgress=null,t.status="DISCONNECTED"}),e.addCase(vE,t=>{t.denoiseProgress=null,t.status="PROCESSING"}),e.addCase(SE,(t,n)=>{const{step:r,total_steps:i,order:o,progress_image:a,graph_execution_state_id:s,queue_batch_id:l}=n.payload.data;t.denoiseProgress={step:r,total_steps:i,order:o,percentage:ive(r,i,o),progress_image:a,session_id:s,batch_id:l},t.status="PROCESSING"}),e.addCase(_E,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(ND,t=>{t.denoiseProgress=null,t.status="CONNECTED"}),e.addCase(FD,t=>{t.status="LOADING_MODEL"}),e.addCase(zD,t=>{t.status="CONNECTED"}),e.addCase(i_,(t,n)=>{["completed","canceled","failed"].includes(n.payload.data.queue_item.status)&&(t.status="CONNECTED",t.denoiseProgress=null)}),e.addMatcher(cve,(t,n)=>{t.toastQueue.push(vs({title:K("toast.serverError"),status:"error",description:mE(n.payload.data.error_type)}))})}}),{setShouldConfirmOnDelete:OVe,setEnableImageDebugging:$Ve,addToast:nt,clearToastQueue:ove,consoleLogLevelChanged:NVe,shouldLogToConsoleChanged:DVe,shouldAntialiasProgressImageChanged:LVe,languageChanged:FVe,shouldUseNSFWCheckerChanged:ave,shouldUseWatermarkerChanged:sve,setShouldEnableInformationalPopovers:BVe,isInitializedChanged:lve}=kz.actions,uve=kz.reducer,cve=ai(r_,VD,GD),dve={searchFolder:null,advancedAddScanModel:null},Iz=qt({name:"modelmanager",initialState:dve,reducers:{setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setAdvancedAddScanModel:(e,t)=>{e.advancedAddScanModel=t.payload}}}),{setSearchFolder:zVe,setAdvancedAddScanModel:jVe}=Iz.actions,fve=Iz.reducer,Mz={shift:!1,ctrl:!1,meta:!1},Rz=qt({name:"hotkeys",initialState:Mz,reducers:{shiftKeyPressed:(e,t)=>{e.shift=t.payload},ctrlKeyPressed:(e,t)=>{e.ctrl=t.payload},metaKeyPressed:(e,t)=>{e.meta=t.payload}}}),{shiftKeyPressed:VVe,ctrlKeyPressed:UVe,metaKeyPressed:GVe}=Rz.actions,hve=Rz.reducer,Oz={activeTab:"txt2img",shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,shouldHidePreview:!1,shouldShowProgressInViewer:!0,shouldShowEmbeddingPicker:!1,shouldAutoChangeDimensions:!1,favoriteSchedulers:[],globalContextMenuCloseTrigger:0,panels:{}},$z=qt({name:"ui",initialState:Oz,reducers:{setActiveTab:(e,t)=>{e.activeTab=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldHidePreview:(e,t)=>{e.shouldHidePreview=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setShouldShowProgressInViewer:(e,t)=>{e.shouldShowProgressInViewer=t.payload},favoriteSchedulersChanged:(e,t)=>{e.favoriteSchedulers=t.payload},toggleEmbeddingPicker:e=>{e.shouldShowEmbeddingPicker=!e.shouldShowEmbeddingPicker},setShouldAutoChangeDimensions:(e,t)=>{e.shouldAutoChangeDimensions=t.payload},contextMenusClosed:e=>{e.globalContextMenuCloseTrigger+=1},panelsChanged:(e,t)=>{e.panels[t.payload.name]=t.payload.value}},extraReducers(e){e.addCase(u_,t=>{t.activeTab="img2img"})}}),{setActiveTab:Nz,setShouldShowImageDetails:HVe,setShouldUseCanvasBetaLayout:qVe,setShouldShowExistingModelsInSearch:WVe,setShouldUseSliders:KVe,setShouldHidePreview:XVe,setShouldShowProgressInViewer:QVe,favoriteSchedulersChanged:YVe,toggleEmbeddingPicker:ZVe,setShouldAutoChangeDimensions:JVe,contextMenusClosed:eUe,panelsChanged:tUe}=$z.actions,pve=$z.reducer,gve=nq(qK);Dz=H5=void 0;var mve=gve,yve=function(){var t=[],n=[],r=void 0,i=function(u){return r=u,function(c){return function(d){return mve.compose.apply(void 0,n)(c)(d)}}},o=function(){for(var u,c,d=arguments.length,f=Array(d),h=0;h=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function Fz(e,t){if(e){if(typeof e=="string")return h8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h8(e,t)}}function h8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=r.prefix,o=r.driver,a=r.persistWholeStore,s=r.serialize;try{var l=a?Mve:Rve;yield l(t,n,{prefix:i,driver:o,serialize:s})}catch(u){console.warn("redux-remember: persist error",u)}});return function(){return e.apply(this,arguments)}}();function y8(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){n(u);return}s.done?t(l):Promise.resolve(l).then(r,i)}function v8(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(l){y8(o,r,i,a,s,"next",l)}function s(l){y8(o,r,i,a,s,"throw",l)}a(void 0)})}}var $ve=function(){var e=v8(function*(t,n,r){var i=r.prefix,o=r.driver,a=r.serialize,s=r.unserialize,l=r.persistThrottle,u=r.persistDebounce,c=r.persistWholeStore;yield Ave(t,n,{prefix:i,driver:o,unserialize:s,persistWholeStore:c});var d={},f=function(){var h=v8(function*(){var p=Lz(t.getState(),n);yield Ove(p,d,{prefix:i,driver:o,serialize:a,persistWholeStore:c}),pA(p,d)||t.dispatch({type:Sve,payload:p}),d=p});return function(){return h.apply(this,arguments)}}();u&&u>0?t.subscribe(wve(f,u)):t.subscribe(xve(f,l))});return function(n,r,i){return e.apply(this,arguments)}}();const Nve=$ve;function kg(e){"@babel/helpers - typeof";return kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kg(e)}function b8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rw(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:n.state,i=arguments.length>1?arguments[1]:void 0;i.type&&(i.type==="@@INIT"||i.type.startsWith("@@redux/INIT"))&&(n.state=rw({},r));var o=typeof t=="function"?t:Mf(t);switch(i.type){case q5:{var a=rw(rw({},n.state),i.payload||{});return n.state=o(a,{type:q5,payload:a}),n.state}default:return o(r,i)}}},zve=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.prefix,o=i===void 0?"@@remember-":i,a=r.serialize,s=a===void 0?function(_,v){return JSON.stringify(_)}:a,l=r.unserialize,u=l===void 0?function(_,v){return JSON.parse(_)}:l,c=r.persistThrottle,d=c===void 0?100:c,f=r.persistDebounce,h=r.persistWholeStore,p=h===void 0?!1:h;if(!t)throw Error("redux-remember error: driver required");if(!Array.isArray(n))throw Error("redux-remember error: rememberedKeys needs to be an array");var m=function(v){return function(y,g,b){var S=v(y,g,b);return Nve(S,n,{driver:t,prefix:o,serialize:s,unserialize:u,persistThrottle:d,persistDebounce:f,persistWholeStore:p}),S}};return m};const nUe=["chakra-ui-color-mode","i18nextLng","ROARR_FILTER","ROARR_LOG"],jve="@@invokeai-",Vve=["cursorPosition"],Uve=["pendingControlImages"],Gve=["prompts"],Hve=["selection","selectedBoardId","galleryView"],qve=["nodeTemplates","connectionStartParams","currentConnectionFieldType","selectedNodes","selectedEdges","isReady","nodesToCopy","edgesToCopy","connectionMade","modifyingEdge","addNewNodePosition"],Wve=[],Kve=[],Xve=["isInitialized","isConnected","denoiseProgress","status"],Qve=["shouldShowImageDetails","globalContextMenuCloseTrigger","panels"],Yve={canvas:Vve,gallery:Hve,generation:Wve,nodes:qve,postprocessing:Kve,system:Xve,ui:Qve,controlNet:Uve,dynamicPrompts:Gve},Zve=(e,t)=>{const n=$f(e,Yve[t]??[]);return JSON.stringify(n)},Jve={canvas:XL,gallery:zF,generation:PE,nodes:_z,postprocessing:Cz,system:Pz,config:TD,ui:Oz,hotkeys:Mz,controlAdapters:d5,dynamicPrompts:VE,sdxl:Az},e1e=(e,t)=>vD(JSON.parse(e),Jve[t]),t1e=ge("nodes/textToImageGraphBuilt"),n1e=ge("nodes/imageToImageGraphBuilt"),zz=ge("nodes/canvasGraphBuilt"),r1e=ge("nodes/nodesGraphBuilt"),i1e=ai(t1e,n1e,zz,r1e),o1e=ge("nodes/workflowLoadRequested"),a1e=ge("nodes/updateAllNodesRequested"),s1e=e=>{if(i1e(e)&&e.payload.nodes){const t={};return{...e,payload:{...e.payload,nodes:t}}}return Pg.fulfilled.match(e)?{...e,payload:""}:wz.match(e)?{...e,payload:""}:e},l1e=["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine","socket/socketGeneratorProgress","socket/appSocketGeneratorProgress","@@REMEMBER_PERSISTED"],u1e=e=>e,c1e=ai(yle,vle),d1e=()=>{pe({matcher:c1e,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("canvas"),i=n(),{batchIds:o}=i.canvas;try{const a=t(ln.endpoints.cancelByBatchIds.initiate({batch_ids:o},{fixedCacheKey:"cancelByBatchIds"})),{canceled:s}=await a.unwrap();a.reset(),s>0&&(r.debug(`Canceled ${s} canvas batches`),t(nt({title:K("queue.cancelBatchSucceeded"),status:"success"}))),t(xle())}catch{r.error("Failed to cancel canvas batches"),t(nt({title:K("queue.cancelBatchFailed"),status:"error"}))}}})};ge("app/appStarted");const f1e=()=>{pe({matcher:ue.endpoints.listImages.matchFulfilled,effect:async(e,{dispatch:t,unsubscribe:n,cancelActiveListeners:r})=>{if(e.meta.arg.queryCacheKey!==Bi({board_id:"none",categories:Ln}))return;r(),n();const i=e.payload;if(i.ids.length>0){const o=Dt.getSelectors().selectAll(i)[0];t(ha(o??null))}}})},h1e=()=>{pe({matcher:ln.endpoints.enqueueBatch.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{data:r}=ln.endpoints.getQueueStatus.select()(n());!r||r.processor.is_started||t(ln.endpoints.resumeProcessor.initiate(void 0,{fixedCacheKey:"resumeProcessor"}))}})},jz=No.injectEndpoints({endpoints:e=>({getAppVersion:e.query({query:()=>({url:"app/version",method:"GET"}),providesTags:["AppVersion"],keepUnusedDataFor:864e5}),getAppConfig:e.query({query:()=>({url:"app/config",method:"GET"}),providesTags:["AppConfig"],keepUnusedDataFor:864e5}),getInvocationCacheStatus:e.query({query:()=>({url:"app/invocation_cache/status",method:"GET"}),providesTags:["InvocationCacheStatus"]}),clearInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache",method:"DELETE"}),invalidatesTags:["InvocationCacheStatus"]}),enableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/enable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]}),disableInvocationCache:e.mutation({query:()=>({url:"app/invocation_cache/disable",method:"PUT"}),invalidatesTags:["InvocationCacheStatus"]})})}),{useGetAppVersionQuery:rUe,useGetAppConfigQuery:iUe,useClearInvocationCacheMutation:oUe,useDisableInvocationCacheMutation:aUe,useEnableInvocationCacheMutation:sUe,useGetInvocationCacheStatusQuery:lUe}=jz,p1e=()=>{pe({matcher:jz.endpoints.getAppConfig.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const{infill_methods:r=[],nsfw_methods:i=[],watermarking_methods:o=[]}=e.payload,a=t().generation.infillMethod;r.includes(a)||n(Xoe(r[0])),i.includes("nsfw_checker")||n(ave(!1)),o.includes("invisible_watermark")||n(sve(!1))}})},g1e=ge("app/appStarted"),m1e=()=>{pe({actionCreator:g1e,effect:async(e,{unsubscribe:t,cancelActiveListeners:n})=>{n(),t()}})};function y1e(e){if(e.sheet)return e.sheet;for(var t=0;t0?rr(Df,--ii):0,_f--,xn===10&&(_f=1,aS--),xn}function bi(){return xn=ii2||Mg(xn)>3?"":" "}function I1e(e,t){for(;--t&&bi()&&!(xn<48||xn>102||xn>57&&xn<65||xn>70&&xn<97););return km(e,Qy()+(t<6&&ga()==32&&bi()==32))}function X5(e){for(;bi();)switch(xn){case e:return ii;case 34:case 39:e!==34&&e!==39&&X5(xn);break;case 40:e===41&&X5(e);break;case 92:bi();break}return ii}function M1e(e,t){for(;bi()&&e+xn!==47+10;)if(e+xn===42+42&&ga()===47)break;return"/*"+km(t,ii-1)+"*"+oS(e===47?e:bi())}function R1e(e){for(;!Mg(ga());)bi();return km(e,ii)}function O1e(e){return Wz(Zy("",null,null,null,[""],e=qz(e),0,[0],e))}function Zy(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,p=0,m=1,_=1,v=1,y=0,g="",b=i,S=o,x=r,w=g;_;)switch(p=y,y=bi()){case 40:if(p!=108&&rr(w,d-1)==58){K5(w+=dt(Yy(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Yy(y);break;case 9:case 10:case 13:case 32:w+=k1e(p);break;case 92:w+=I1e(Qy()-1,7);continue;case 47:switch(ga()){case 42:case 47:H0($1e(M1e(bi(),Qy()),t,n),l);break;default:w+="/"}break;case 123*m:s[u++]=ea(w)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+c:v==-1&&(w=dt(w,/\f/g,"")),h>0&&ea(w)-d&&H0(h>32?S8(w+";",r,n,d-1):S8(dt(w," ","")+";",r,n,d-2),l);break;case 59:w+=";";default:if(H0(x=_8(w,t,n,u,c,i,s,g,b=[],S=[],d),o),y===123)if(c===0)Zy(w,t,x,x,b,o,d,s,S);else switch(f===99&&rr(w,3)===110?100:f){case 100:case 108:case 109:case 115:Zy(e,x,x,r&&H0(_8(e,x,x,0,0,i,s,g,i,b=[],d),S),i,S,d,s,r?b:S);break;default:Zy(w,x,x,x,[""],S,0,s,S)}}u=c=h=0,m=v=1,g=w="",d=a;break;case 58:d=1+ea(w),h=p;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&P1e()==125)continue}switch(w+=oS(y),y*m){case 38:v=c>0?1:(w+="\f",-1);break;case 44:s[u++]=(ea(w)-1)*v,v=1;break;case 64:ga()===45&&(w+=Yy(bi())),f=ga(),c=d=ea(g=w+=R1e(Qy())),y++;break;case 45:p===45&&ea(w)==2&&(m=0)}}return o}function _8(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,f=i===0?o:[""],h=yA(f),p=0,m=0,_=0;p0?f[v]+" "+y:dt(y,/&\f/g,f[v])))&&(l[_++]=g);return sS(e,t,n,i===0?gA:s,l,u,c)}function $1e(e,t,n){return sS(e,t,n,Vz,oS(T1e()),Ig(e,2,-2),0)}function S8(e,t,n,r){return sS(e,t,n,mA,Ig(e,0,r),Ig(e,r+1,-1),r)}function zd(e,t){for(var n="",r=yA(e),i=0;i6)switch(rr(e,t+1)){case 109:if(rr(e,t+4)!==45)break;case 102:return dt(e,/(.+:)(.+)-([^]+)/,"$1"+ct+"$2-$3$1"+V1+(rr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~K5(e,"stretch")?Xz(dt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rr(e,t+1)!==115)break;case 6444:switch(rr(e,ea(e)-3-(~K5(e,"!important")&&10))){case 107:return dt(e,":",":"+ct)+e;case 101:return dt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ct+(rr(e,14)===45?"inline-":"")+"box$3$1"+ct+"$2$3$1"+fr+"$2box$3")+e}break;case 5936:switch(rr(e,t+11)){case 114:return ct+e+fr+dt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ct+e+fr+dt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ct+e+fr+dt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ct+e+fr+e+e}return e}var U1e=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case mA:t.return=Xz(t.value,t.length);break;case Uz:return zd([gh(t,{value:dt(t.value,"@","@"+ct)})],i);case gA:if(t.length)return A1e(t.props,function(o){switch(E1e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zd([gh(t,{props:[dt(o,/:(read-\w+)/,":"+V1+"$1")]})],i);case"::placeholder":return zd([gh(t,{props:[dt(o,/:(plac\w+)/,":"+ct+"input-$1")]}),gh(t,{props:[dt(o,/:(plac\w+)/,":"+V1+"$1")]}),gh(t,{props:[dt(o,/:(plac\w+)/,fr+"input-$1")]})],i)}return""})}},G1e=[U1e],H1e=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var _=m.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||G1e,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var _=m.getAttribute("data-emotion").split(" "),v=1;v<_.length;v++)o[_[v]]=!0;s.push(m)});var l,u=[j1e,V1e];{var c,d=[N1e,L1e(function(m){c.insert(m)})],f=D1e(u.concat(i,d)),h=function(_){return zd(O1e(_),f)};l=function(_,v,y,g){c=y,h(_?_+"{"+v.styles+"}":v.styles),g&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new b1e({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(s),p},q1e=!0;function W1e(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var Qz=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||q1e===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},Yz=function(t,n,r){Qz(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function K1e(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var X1e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Q1e=/[A-Z]|^ms/g,Y1e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zz=function(t){return t.charCodeAt(1)===45},C8=function(t){return t!=null&&typeof t!="boolean"},iw=Kz(function(e){return Zz(e)?e:e.replace(Q1e,"-$&").toLowerCase()}),E8=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Y1e,function(r,i,o){return ta={name:i,styles:o,next:ta},i})}return X1e[t]!==1&&!Zz(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rg(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ta={name:n.name,styles:n.styles,next:ta},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ta={name:r.name,styles:r.styles,next:ta},r=r.next;var i=n.styles+";";return i}return Z1e(e,t,n)}case"function":{if(e!==void 0){var o=ta,a=n(e);return ta=o,Rg(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function Z1e(e,t,n){var r="";if(Array.isArray(n))for(var i=0;iq.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),hbe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=k.useState(null),o=k.useRef(null),[,a]=k.useState({});k.useEffect(()=>a({}),[]);const s=cbe(),l=lbe();U1(()=>{if(!r)return;const c=r.ownerDocument,d=t?s??c.body:c.body;if(!d)return;o.current=c.createElement("div"),o.current.className=bA,d.appendChild(o.current),a({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const u=l!=null&&l.zIndex?q.jsx(fbe,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?pi.createPortal(q.jsx(rj,{value:o.current,children:u}),o.current):q.jsx("span",{ref:c=>{c&&i(c)}})},pbe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=k.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=bA),l},[i]),[,s]=k.useState({});return U1(()=>s({}),[]),U1(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?pi.createPortal(q.jsx(rj,{value:r?a:null,children:t}),a):null};function lS(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?q.jsx(pbe,{containerRef:n,...r}):q.jsx(hbe,{...r})}lS.className=bA;lS.selector=dbe;lS.displayName="Portal";function ij(){const e=k.useContext(Og);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var _A=k.createContext({});_A.displayName="ColorModeContext";function uS(){const e=k.useContext(_A);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function uUe(e,t){const{colorMode:n}=uS();return n==="dark"?t:e}function oj(){const e=uS(),t=ij();return{...e,theme:t}}function gbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function mbe(e,t,n){var r,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function cUe(e,t,n){const r=ij();return ybe(e,t,n)(r)}function ybe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{var c,d;if(e==="breakpoints")return gbe(o,l,(c=a[u])!=null?c:l);const f=`${e}.${l}`;return mbe(o,f,(d=a[u])!=null?d:l)});return Array.isArray(t)?s:s[0]}}var Kl=(...e)=>e.filter(Boolean).join(" ");function vbe(){return!1}function ma(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var dUe=e=>{const{condition:t,message:n}=e;t&&vbe()&&console.warn(n)};function la(e,...t){return bbe(e)?e(...t):e}var bbe=e=>typeof e=="function",fUe=e=>e?"":void 0,hUe=e=>e?!0:void 0;function pUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function gUe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var G1={exports:{}};G1.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",v="[object Null]",y="[object Object]",g="[object Proxy]",b="[object RegExp]",S="[object Set]",x="[object String]",w="[object Undefined]",C="[object WeakMap]",T="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",D="[object Float64Array]",M="[object Int8Array]",E="[object Int16Array]",P="[object Int32Array]",N="[object Uint8Array]",L="[object Uint8ClampedArray]",O="[object Uint16Array]",R="[object Uint32Array]",$=/[\\^$.*+?()[\]{}|]/g,z=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,H={};H[I]=H[D]=H[M]=H[E]=H[P]=H[N]=H[L]=H[O]=H[R]=!0,H[s]=H[l]=H[T]=H[c]=H[A]=H[d]=H[f]=H[h]=H[m]=H[_]=H[y]=H[b]=H[S]=H[x]=H[C]=!1;var Q=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve,Z=typeof self=="object"&&self&&self.Object===Object&&self,J=Q||Z||Function("return this")(),j=t&&!t.nodeType&&t,X=j&&!0&&e&&!e.nodeType&&e,ee=X&&X.exports===j,ne=ee&&Q.process,fe=function(){try{var B=X&&X.require&&X.require("util").types;return B||ne&&ne.binding&&ne.binding("util")}catch{}}(),de=fe&&fe.isTypedArray;function Be(B,U,Y){switch(Y.length){case 0:return B.call(U);case 1:return B.call(U,Y[0]);case 2:return B.call(U,Y[0],Y[1]);case 3:return B.call(U,Y[0],Y[1],Y[2])}return B.apply(U,Y)}function $e(B,U){for(var Y=-1,me=Array(B);++Y-1}function Oa(B,U){var Y=this.__data__,me=Ec(Y,B);return me<0?(++this.size,Y.push([B,U])):Y[me][1]=U,this}Yn.prototype.clear=Ra,Yn.prototype.delete=Is,Yn.prototype.get=Ms,Yn.prototype.has=Cc,Yn.prototype.set=Oa;function Cr(B){var U=-1,Y=B==null?0:B.length;for(this.clear();++U1?Y[et-1]:void 0,jt=et>2?Y[2]:void 0;for(wt=B.length>3&&typeof wt=="function"?(et--,wt):void 0,jt&&BH(Y[0],Y[1],jt)&&(wt=et<3?void 0:wt,et=1),U=Object(U);++me-1&&B%1==0&&B0){if(++U>=i)return arguments[0]}else U=0;return B.apply(void 0,arguments)}}function WH(B){if(B!=null){try{return St.call(B)}catch{}try{return B+""}catch{}}return""}function Zm(B,U){return B===U||B!==B&&U!==U}var j2=Pc(function(){return arguments}())?Pc:function(B){return Qf(B)&&bn.call(B,"callee")&&!uo.call(B,"callee")},V2=Array.isArray;function U2(B){return B!=null&&jT(B.length)&&!G2(B)}function KH(B){return Qf(B)&&U2(B)}var zT=tu||JH;function G2(B){if(!iu(B))return!1;var U=Tc(B);return U==h||U==p||U==u||U==g}function jT(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=a}function iu(B){var U=typeof B;return B!=null&&(U=="object"||U=="function")}function Qf(B){return B!=null&&typeof B=="object"}function XH(B){if(!Qf(B)||Tc(B)!=y)return!1;var U=si(B);if(U===null)return!0;var Y=bn.call(U,"constructor")&&U.constructor;return typeof Y=="function"&&Y instanceof Y&&St.call(Y)==ki}var VT=de?Ce(de):EH;function QH(B){return $H(B,UT(B))}function UT(B){return U2(B)?D2(B,!0):AH(B)}var YH=NH(function(B,U,Y,me){LT(B,U,Y,me)});function ZH(B){return function(){return B}}function GT(B){return B}function JH(){return!1}e.exports=YH})(G1,G1.exports);var _be=G1.exports;const ua=Bl(_be);var Sbe=e=>/!(important)?$/.test(e),P8=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,xbe=(e,t)=>n=>{const r=String(t),i=Sbe(r),o=P8(r),a=e?`${e}.${o}`:o;let s=ma(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=P8(s),i?`${s} !important`:s};function SA(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var s;const l=xbe(t,o)(a);let u=(s=n==null?void 0:n(l,a))!=null?s:l;return r&&(u=r(u,a)),u}}var q0=(...e)=>t=>e.reduce((n,r)=>r(n),t);function $i(e,t){return n=>{const r={property:n,scale:e};return r.transform=SA({scale:e,transform:t}),r}}var wbe=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function Cbe(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:wbe(t),transform:n?SA({scale:n,compose:r}):r}}var aj=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Ebe(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...aj].join(" ")}function Abe(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...aj].join(" ")}var Tbe={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Pbe={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function kbe(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Ibe={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Q5={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Mbe=new Set(Object.values(Q5)),Y5=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Rbe=e=>e.trim();function Obe(e,t){if(e==null||Y5.has(e))return e;if(!(Z5(e)||Y5.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],a=i==null?void 0:i[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=a.split(",").map(Rbe).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in Q5?Q5[l]:l;u.unshift(c);const d=u.map(f=>{if(Mbe.has(f))return f;const h=f.indexOf(" "),[p,m]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],_=Z5(m)?m:m&&m.split(" "),v=`colors.${p}`,y=v in t.__cssMap?t.__cssMap[v].varRef:p;return _?[y,...Array.isArray(_)?_:[_]].join(" "):y});return`${s}(${d.join(", ")})`}var Z5=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),$be=(e,t)=>Obe(e,t??{});function Nbe(e){return/^var\(--.+\)$/.test(e)}var Dbe=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ho=e=>t=>`${e}(${t})`,ot={filter(e){return e!=="auto"?e:Tbe},backdropFilter(e){return e!=="auto"?e:Pbe},ring(e){return kbe(ot.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?Ebe():e==="auto-gpu"?Abe():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Dbe(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(Nbe(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:$be,blur:Ho("blur"),opacity:Ho("opacity"),brightness:Ho("brightness"),contrast:Ho("contrast"),dropShadow:Ho("drop-shadow"),grayscale:Ho("grayscale"),hueRotate:Ho("hue-rotate"),invert:Ho("invert"),saturate:Ho("saturate"),sepia:Ho("sepia"),bgImage(e){return e==null||Z5(e)||Y5.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=Ibe[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},G={borderWidths:$i("borderWidths"),borderStyles:$i("borderStyles"),colors:$i("colors"),borders:$i("borders"),gradients:$i("gradients",ot.gradient),radii:$i("radii",ot.px),space:$i("space",q0(ot.vh,ot.px)),spaceT:$i("space",q0(ot.vh,ot.px)),degreeT(e){return{property:e,transform:ot.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:SA({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:$i("sizes",q0(ot.vh,ot.px)),sizesT:$i("sizes",q0(ot.vh,ot.fraction)),shadows:$i("shadows"),logical:Cbe,blur:$i("blur",ot.blur)},Jy={background:G.colors("background"),backgroundColor:G.colors("backgroundColor"),backgroundImage:G.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:ot.bgClip},bgSize:G.prop("backgroundSize"),bgPosition:G.prop("backgroundPosition"),bg:G.colors("background"),bgColor:G.colors("backgroundColor"),bgPos:G.prop("backgroundPosition"),bgRepeat:G.prop("backgroundRepeat"),bgAttachment:G.prop("backgroundAttachment"),bgGradient:G.gradients("backgroundImage"),bgClip:{transform:ot.bgClip}};Object.assign(Jy,{bgImage:Jy.backgroundImage,bgImg:Jy.backgroundImage});var ut={border:G.borders("border"),borderWidth:G.borderWidths("borderWidth"),borderStyle:G.borderStyles("borderStyle"),borderColor:G.colors("borderColor"),borderRadius:G.radii("borderRadius"),borderTop:G.borders("borderTop"),borderBlockStart:G.borders("borderBlockStart"),borderTopLeftRadius:G.radii("borderTopLeftRadius"),borderStartStartRadius:G.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:G.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:G.radii("borderTopRightRadius"),borderStartEndRadius:G.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:G.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:G.borders("borderRight"),borderInlineEnd:G.borders("borderInlineEnd"),borderBottom:G.borders("borderBottom"),borderBlockEnd:G.borders("borderBlockEnd"),borderBottomLeftRadius:G.radii("borderBottomLeftRadius"),borderBottomRightRadius:G.radii("borderBottomRightRadius"),borderLeft:G.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:G.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:G.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:G.borders(["borderLeft","borderRight"]),borderInline:G.borders("borderInline"),borderY:G.borders(["borderTop","borderBottom"]),borderBlock:G.borders("borderBlock"),borderTopWidth:G.borderWidths("borderTopWidth"),borderBlockStartWidth:G.borderWidths("borderBlockStartWidth"),borderTopColor:G.colors("borderTopColor"),borderBlockStartColor:G.colors("borderBlockStartColor"),borderTopStyle:G.borderStyles("borderTopStyle"),borderBlockStartStyle:G.borderStyles("borderBlockStartStyle"),borderBottomWidth:G.borderWidths("borderBottomWidth"),borderBlockEndWidth:G.borderWidths("borderBlockEndWidth"),borderBottomColor:G.colors("borderBottomColor"),borderBlockEndColor:G.colors("borderBlockEndColor"),borderBottomStyle:G.borderStyles("borderBottomStyle"),borderBlockEndStyle:G.borderStyles("borderBlockEndStyle"),borderLeftWidth:G.borderWidths("borderLeftWidth"),borderInlineStartWidth:G.borderWidths("borderInlineStartWidth"),borderLeftColor:G.colors("borderLeftColor"),borderInlineStartColor:G.colors("borderInlineStartColor"),borderLeftStyle:G.borderStyles("borderLeftStyle"),borderInlineStartStyle:G.borderStyles("borderInlineStartStyle"),borderRightWidth:G.borderWidths("borderRightWidth"),borderInlineEndWidth:G.borderWidths("borderInlineEndWidth"),borderRightColor:G.colors("borderRightColor"),borderInlineEndColor:G.colors("borderInlineEndColor"),borderRightStyle:G.borderStyles("borderRightStyle"),borderInlineEndStyle:G.borderStyles("borderInlineEndStyle"),borderTopRadius:G.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:G.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:G.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:G.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(ut,{rounded:ut.borderRadius,roundedTop:ut.borderTopRadius,roundedTopLeft:ut.borderTopLeftRadius,roundedTopRight:ut.borderTopRightRadius,roundedTopStart:ut.borderStartStartRadius,roundedTopEnd:ut.borderStartEndRadius,roundedBottom:ut.borderBottomRadius,roundedBottomLeft:ut.borderBottomLeftRadius,roundedBottomRight:ut.borderBottomRightRadius,roundedBottomStart:ut.borderEndStartRadius,roundedBottomEnd:ut.borderEndEndRadius,roundedLeft:ut.borderLeftRadius,roundedRight:ut.borderRightRadius,roundedStart:ut.borderInlineStartRadius,roundedEnd:ut.borderInlineEndRadius,borderStart:ut.borderInlineStart,borderEnd:ut.borderInlineEnd,borderTopStartRadius:ut.borderStartStartRadius,borderTopEndRadius:ut.borderStartEndRadius,borderBottomStartRadius:ut.borderEndStartRadius,borderBottomEndRadius:ut.borderEndEndRadius,borderStartRadius:ut.borderInlineStartRadius,borderEndRadius:ut.borderInlineEndRadius,borderStartWidth:ut.borderInlineStartWidth,borderEndWidth:ut.borderInlineEndWidth,borderStartColor:ut.borderInlineStartColor,borderEndColor:ut.borderInlineEndColor,borderStartStyle:ut.borderInlineStartStyle,borderEndStyle:ut.borderInlineEndStyle});var Lbe={color:G.colors("color"),textColor:G.colors("color"),fill:G.colors("fill"),stroke:G.colors("stroke")},J5={boxShadow:G.shadows("boxShadow"),mixBlendMode:!0,blendMode:G.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:G.prop("backgroundBlendMode"),opacity:!0};Object.assign(J5,{shadow:J5.boxShadow});var Fbe={filter:{transform:ot.filter},blur:G.blur("--chakra-blur"),brightness:G.propT("--chakra-brightness",ot.brightness),contrast:G.propT("--chakra-contrast",ot.contrast),hueRotate:G.degreeT("--chakra-hue-rotate"),invert:G.propT("--chakra-invert",ot.invert),saturate:G.propT("--chakra-saturate",ot.saturate),dropShadow:G.propT("--chakra-drop-shadow",ot.dropShadow),backdropFilter:{transform:ot.backdropFilter},backdropBlur:G.blur("--chakra-backdrop-blur"),backdropBrightness:G.propT("--chakra-backdrop-brightness",ot.brightness),backdropContrast:G.propT("--chakra-backdrop-contrast",ot.contrast),backdropHueRotate:G.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:G.propT("--chakra-backdrop-invert",ot.invert),backdropSaturate:G.propT("--chakra-backdrop-saturate",ot.saturate)},H1={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:ot.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:G.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:G.space("gap"),rowGap:G.space("rowGap"),columnGap:G.space("columnGap")};Object.assign(H1,{flexDir:H1.flexDirection});var sj={gridGap:G.space("gridGap"),gridColumnGap:G.space("gridColumnGap"),gridRowGap:G.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Bbe={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:ot.outline},outlineOffset:!0,outlineColor:G.colors("outlineColor")},Li={width:G.sizesT("width"),inlineSize:G.sizesT("inlineSize"),height:G.sizes("height"),blockSize:G.sizes("blockSize"),boxSize:G.sizes(["width","height"]),minWidth:G.sizes("minWidth"),minInlineSize:G.sizes("minInlineSize"),minHeight:G.sizes("minHeight"),minBlockSize:G.sizes("minBlockSize"),maxWidth:G.sizes("maxWidth"),maxInlineSize:G.sizes("maxInlineSize"),maxHeight:G.sizes("maxHeight"),maxBlockSize:G.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:G.propT("float",ot.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Li,{w:Li.width,h:Li.height,minW:Li.minWidth,maxW:Li.maxWidth,minH:Li.minHeight,maxH:Li.maxHeight,overscroll:Li.overscrollBehavior,overscrollX:Li.overscrollBehaviorX,overscrollY:Li.overscrollBehaviorY});var zbe={listStyleType:!0,listStylePosition:!0,listStylePos:G.prop("listStylePosition"),listStyleImage:!0,listStyleImg:G.prop("listStyleImage")};function jbe(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},Ube=Vbe(jbe),Gbe={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Hbe={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},ow=(e,t,n)=>{const r={},i=Ube(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},qbe={srOnly:{transform(e){return e===!0?Gbe:e==="focusable"?Hbe:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>ow(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>ow(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>ow(t,e,n)}},hp={position:!0,pos:G.prop("position"),zIndex:G.prop("zIndex","zIndices"),inset:G.spaceT("inset"),insetX:G.spaceT(["left","right"]),insetInline:G.spaceT("insetInline"),insetY:G.spaceT(["top","bottom"]),insetBlock:G.spaceT("insetBlock"),top:G.spaceT("top"),insetBlockStart:G.spaceT("insetBlockStart"),bottom:G.spaceT("bottom"),insetBlockEnd:G.spaceT("insetBlockEnd"),left:G.spaceT("left"),insetInlineStart:G.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:G.spaceT("right"),insetInlineEnd:G.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(hp,{insetStart:hp.insetInlineStart,insetEnd:hp.insetInlineEnd});var Wbe={ring:{transform:ot.ring},ringColor:G.colors("--chakra-ring-color"),ringOffset:G.prop("--chakra-ring-offset-width"),ringOffsetColor:G.colors("--chakra-ring-offset-color"),ringInset:G.prop("--chakra-ring-inset")},Nt={margin:G.spaceT("margin"),marginTop:G.spaceT("marginTop"),marginBlockStart:G.spaceT("marginBlockStart"),marginRight:G.spaceT("marginRight"),marginInlineEnd:G.spaceT("marginInlineEnd"),marginBottom:G.spaceT("marginBottom"),marginBlockEnd:G.spaceT("marginBlockEnd"),marginLeft:G.spaceT("marginLeft"),marginInlineStart:G.spaceT("marginInlineStart"),marginX:G.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:G.spaceT("marginInline"),marginY:G.spaceT(["marginTop","marginBottom"]),marginBlock:G.spaceT("marginBlock"),padding:G.space("padding"),paddingTop:G.space("paddingTop"),paddingBlockStart:G.space("paddingBlockStart"),paddingRight:G.space("paddingRight"),paddingBottom:G.space("paddingBottom"),paddingBlockEnd:G.space("paddingBlockEnd"),paddingLeft:G.space("paddingLeft"),paddingInlineStart:G.space("paddingInlineStart"),paddingInlineEnd:G.space("paddingInlineEnd"),paddingX:G.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:G.space("paddingInline"),paddingY:G.space(["paddingTop","paddingBottom"]),paddingBlock:G.space("paddingBlock")};Object.assign(Nt,{m:Nt.margin,mt:Nt.marginTop,mr:Nt.marginRight,me:Nt.marginInlineEnd,marginEnd:Nt.marginInlineEnd,mb:Nt.marginBottom,ml:Nt.marginLeft,ms:Nt.marginInlineStart,marginStart:Nt.marginInlineStart,mx:Nt.marginX,my:Nt.marginY,p:Nt.padding,pt:Nt.paddingTop,py:Nt.paddingY,px:Nt.paddingX,pb:Nt.paddingBottom,pl:Nt.paddingLeft,ps:Nt.paddingInlineStart,paddingStart:Nt.paddingInlineStart,pr:Nt.paddingRight,pe:Nt.paddingInlineEnd,paddingEnd:Nt.paddingInlineEnd});var Kbe={textDecorationColor:G.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:G.shadows("textShadow")},Xbe={clipPath:!0,transform:G.propT("transform",ot.transform),transformOrigin:!0,translateX:G.spaceT("--chakra-translate-x"),translateY:G.spaceT("--chakra-translate-y"),skewX:G.degreeT("--chakra-skew-x"),skewY:G.degreeT("--chakra-skew-y"),scaleX:G.prop("--chakra-scale-x"),scaleY:G.prop("--chakra-scale-y"),scale:G.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:G.degreeT("--chakra-rotate")},Qbe={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:G.prop("transitionDuration","transition.duration"),transitionProperty:G.prop("transitionProperty","transition.property"),transitionTimingFunction:G.prop("transitionTimingFunction","transition.easing")},Ybe={fontFamily:G.prop("fontFamily","fonts"),fontSize:G.prop("fontSize","fontSizes",ot.px),fontWeight:G.prop("fontWeight","fontWeights"),lineHeight:G.prop("lineHeight","lineHeights"),letterSpacing:G.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},Zbe={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:G.spaceT("scrollMargin"),scrollMarginTop:G.spaceT("scrollMarginTop"),scrollMarginBottom:G.spaceT("scrollMarginBottom"),scrollMarginLeft:G.spaceT("scrollMarginLeft"),scrollMarginRight:G.spaceT("scrollMarginRight"),scrollMarginX:G.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:G.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:G.spaceT("scrollPadding"),scrollPaddingTop:G.spaceT("scrollPaddingTop"),scrollPaddingBottom:G.spaceT("scrollPaddingBottom"),scrollPaddingLeft:G.spaceT("scrollPaddingLeft"),scrollPaddingRight:G.spaceT("scrollPaddingRight"),scrollPaddingX:G.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:G.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function lj(e){return ma(e)&&e.reference?e.reference:String(e)}var cS=(e,...t)=>t.map(lj).join(` ${e} `).replace(/calc/g,""),k8=(...e)=>`calc(${cS("+",...e)})`,I8=(...e)=>`calc(${cS("-",...e)})`,e3=(...e)=>`calc(${cS("*",...e)})`,M8=(...e)=>`calc(${cS("/",...e)})`,R8=e=>{const t=lj(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:e3(t,-1)},Cu=Object.assign(e=>({add:(...t)=>Cu(k8(e,...t)),subtract:(...t)=>Cu(I8(e,...t)),multiply:(...t)=>Cu(e3(e,...t)),divide:(...t)=>Cu(M8(e,...t)),negate:()=>Cu(R8(e)),toString:()=>e.toString()}),{add:k8,subtract:I8,multiply:e3,divide:M8,negate:R8});function Jbe(e,t="-"){return e.replace(/\s+/g,t)}function e_e(e){const t=Jbe(e.toString());return n_e(t_e(t))}function t_e(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function n_e(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function r_e(e,t=""){return[t,e].filter(Boolean).join("-")}function i_e(e,t){return`var(${e}${t?`, ${t}`:""})`}function o_e(e,t=""){return e_e(`--${r_e(e,t)}`)}function Pe(e,t,n){const r=o_e(e,n);return{variable:r,reference:i_e(r,t)}}function a_e(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=Pe(`${e}-${i}`,o);continue}n[r]=Pe(`${e}-${r}`)}return n}function s_e(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function l_e(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function t3(e){if(e==null)return e;const{unitless:t}=l_e(e);return t||typeof e=="number"?`${e}px`:e}var uj=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,xA=e=>Object.fromEntries(Object.entries(e).sort(uj));function O8(e){const t=xA(e);return Object.assign(Object.values(t),t)}function u_e(e){const t=Object.keys(xA(e));return new Set(t)}function $8(e){var t;if(!e)return e;e=(t=t3(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function Gh(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${t3(e)})`),t&&n.push("and",`(max-width: ${t3(t)})`),n.join(" ")}function c_e(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=O8(e),r=Object.entries(e).sort(uj).map(([a,s],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?$8(d):void 0,{_minW:$8(s),breakpoint:a,minW:s,maxW:d,maxWQuery:Gh(null,d),minWQuery:Gh(s),minMaxQuery:Gh(s,d)}}),i=u_e(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>i.has(l))},asObject:xA(e),asArray:O8(e),details:r,get(a){return r.find(s=>s.breakpoint===a)},media:[null,...n.map(a=>Gh(a)).slice(1)],toArrayValue(a){if(!ma(a))throw new Error("toArrayValue: value must be an object");const s=o.map(l=>{var u;return(u=a[l])!=null?u:null});for(;s_e(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=o[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var Zn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ds=e=>cj(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Da=e=>cj(t=>e(t,"~ &"),"[data-peer]",".peer"),cj=(e,...t)=>t.map(e).join(", "),dS={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ds(Zn.hover),_peerHover:Da(Zn.hover),_groupFocus:Ds(Zn.focus),_peerFocus:Da(Zn.focus),_groupFocusVisible:Ds(Zn.focusVisible),_peerFocusVisible:Da(Zn.focusVisible),_groupActive:Ds(Zn.active),_peerActive:Da(Zn.active),_groupDisabled:Ds(Zn.disabled),_peerDisabled:Da(Zn.disabled),_groupInvalid:Ds(Zn.invalid),_peerInvalid:Da(Zn.invalid),_groupChecked:Ds(Zn.checked),_peerChecked:Da(Zn.checked),_groupFocusWithin:Ds(Zn.focusWithin),_peerFocusWithin:Da(Zn.focusWithin),_peerPlaceholderShown:Da(Zn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},dj=Object.keys(dS);function N8(e,t){return Pe(String(e).replace(/\./g,"-"),void 0,t)}function d_e(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=N8(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,m=`${h}.-${p.join(".")}`,_=Cu.negate(s),v=Cu.negate(u);r[m]={value:_,var:l,varRef:v}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const c=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:_}=N8(p,t==null?void 0:t.cssVarPrefix);return _},d=ma(s)?s:{default:s};n=ua(n,Object.entries(d).reduce((f,[h,p])=>{var m,_;if(!p)return f;const v=c(`${p}`);if(h==="default")return f[l]=v,f;const y=(_=(m=dS)==null?void 0:m[h])!=null?_:h;return f[y]={[l]:v},f},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function f_e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function h_e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function p_e(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function D8(e,t,n={}){const{stop:r,getKey:i}=n;function o(a,s=[]){var l;if(p_e(a)||Array.isArray(a)){const u={};for(const[c,d]of Object.entries(a)){const f=(l=i==null?void 0:i(c))!=null?l:c,h=[...s,f];if(r!=null&&r(a,h))return t(a,s);u[f]=o(d,h)}return u}return t(a,s)}return o(e)}var g_e=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function m_e(e){return h_e(e,g_e)}function y_e(e){return e.semanticTokens}function v_e(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var b_e=e=>dj.includes(e)||e==="default";function __e({tokens:e,semanticTokens:t}){const n={};return D8(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),D8(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(b_e)}),n}function S_e(e){var t;const n=v_e(e),r=m_e(n),i=y_e(n),o=__e({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=d_e(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:c_e(n.breakpoints)}),n}var wA=ua({},Jy,ut,Lbe,H1,Li,Fbe,Wbe,Bbe,sj,qbe,hp,J5,Nt,Zbe,Ybe,Kbe,Xbe,zbe,Qbe),x_e=Object.assign({},Nt,Li,H1,sj,hp),mUe=Object.keys(x_e),w_e=[...Object.keys(wA),...dj],C_e={...wA,...dS},E_e=e=>e in C_e,A_e=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=la(e[a],t);if(s==null)continue;if(s=ma(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!P_e(t),I_e=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=T_e(t);return t=(r=(n=i(a))!=null?n:o(s))!=null?r:o(t),t};function M_e(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s,l,u;const c=la(o,r),d=A_e(c)(r);let f={};for(let h in d){const p=d[h];let m=la(p,r);h in n&&(h=n[h]),k_e(h,m)&&(m=I_e(r,m));let _=t[h];if(_===!0&&(_={property:h}),ma(m)){f[h]=(s=f[h])!=null?s:{},f[h]=ua({},f[h],i(m,!0));continue}let v=(u=(l=_==null?void 0:_.transform)==null?void 0:l.call(_,m,r,c))!=null?u:m;v=_!=null&&_.processResult?i(v,!0):v;const y=la(_==null?void 0:_.property,r);if(!a&&(_!=null&&_.static)){const g=la(_.static,r);f=ua({},f,g)}if(y&&Array.isArray(y)){for(const g of y)f[g]=v;continue}if(y){y==="&"&&ma(v)?f=ua({},f,v):f[y]=v;continue}if(ma(v)){f=ua({},f,v);continue}f[h]=v}return f};return i}var fj=e=>t=>M_e({theme:t,pseudos:dS,configs:wA})(e);function ze(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function R_e(e,t){if(Array.isArray(e))return e;if(ma(e))return t(e);if(e!=null)return[e]}function O_e(e,t){for(let n=t+1;n{ua(u,{[g]:f?y[g]:{[v]:y[g]}})});continue}if(!h){f?ua(u,y):u[v]=y;continue}u[v]=y}}return u}}function N_e(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,a=$_e(o);return ua({},la((n=e.baseStyle)!=null?n:{},t),a(e,"sizes",i,t),a(e,"variants",r,t))}}function yUe(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function Mm(e){return f_e(e,["styleConfig","size","variant","colorScheme"])}var D_e={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},L_e={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},F_e={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},B_e={property:D_e,easing:L_e,duration:F_e},z_e=B_e,j_e={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},V_e=j_e,U_e={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},G_e=U_e,H_e={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},q_e=H_e,W_e={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},K_e=W_e,X_e={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Q_e=X_e,Y_e={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Z_e=Y_e,J_e={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},eSe=J_e,tSe={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},hj=tSe,pj={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},nSe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},rSe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},iSe={...pj,...nSe,container:rSe},gj=iSe,oSe={breakpoints:q_e,zIndices:V_e,radii:Q_e,blur:eSe,colors:K_e,...hj,sizes:gj,shadows:Z_e,space:pj,borders:G_e,transition:z_e},{defineMultiStyleConfig:aSe,definePartsStyle:Hh}=ze(["stepper","step","title","description","indicator","separator","icon","number"]),Ka=Pe("stepper-indicator-size"),ud=Pe("stepper-icon-size"),cd=Pe("stepper-title-font-size"),qh=Pe("stepper-description-font-size"),mh=Pe("stepper-accent-color"),sSe=Hh(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[mh.variable]:`colors.${e}.500`,_dark:{[mh.variable]:`colors.${e}.200`}},title:{fontSize:cd.reference,fontWeight:"medium"},description:{fontSize:qh.reference,color:"chakra-subtle-text"},number:{fontSize:cd.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:ud.reference,height:ud.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ka.reference,height:Ka.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:mh.reference},"&[data-status=complete]":{bg:mh.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:mh.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ka.reference} - 8px)`,top:`calc(${Ka.reference} + 4px)`,insetStart:`calc(${Ka.reference} / 2 - 1px)`}}})),lSe=aSe({baseStyle:sSe,sizes:{xs:Hh({stepper:{[Ka.variable]:"sizes.4",[ud.variable]:"sizes.3",[cd.variable]:"fontSizes.xs",[qh.variable]:"fontSizes.xs"}}),sm:Hh({stepper:{[Ka.variable]:"sizes.6",[ud.variable]:"sizes.4",[cd.variable]:"fontSizes.sm",[qh.variable]:"fontSizes.xs"}}),md:Hh({stepper:{[Ka.variable]:"sizes.8",[ud.variable]:"sizes.5",[cd.variable]:"fontSizes.md",[qh.variable]:"fontSizes.sm"}}),lg:Hh({stepper:{[Ka.variable]:"sizes.10",[ud.variable]:"sizes.6",[cd.variable]:"fontSizes.lg",[qh.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function pt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){r();for(const d of c)t[d]=l(d);return pt(e,t)}function o(...c){for(const d of c)d in t||(t[d]=l(d));return pt(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const h=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var mj=pt("accordion").parts("root","container","button","panel").extend("icon"),uSe=pt("alert").parts("title","description","container").extend("icon","spinner"),cSe=pt("avatar").parts("label","badge","container").extend("excessLabel","group"),dSe=pt("breadcrumb").parts("link","item","container").extend("separator");pt("button").parts();var yj=pt("checkbox").parts("control","icon","container").extend("label");pt("progress").parts("track","filledTrack").extend("label");var fSe=pt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),vj=pt("editable").parts("preview","input","textarea"),hSe=pt("form").parts("container","requiredIndicator","helperText"),pSe=pt("formError").parts("text","icon"),bj=pt("input").parts("addon","field","element","group"),gSe=pt("list").parts("container","item","icon"),_j=pt("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),Sj=pt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),xj=pt("numberinput").parts("root","field","stepperGroup","stepper");pt("pininput").parts("field");var wj=pt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Cj=pt("progress").parts("label","filledTrack","track"),mSe=pt("radio").parts("container","control","label"),Ej=pt("select").parts("field","icon"),Aj=pt("slider").parts("container","track","thumb","filledTrack","mark"),ySe=pt("stat").parts("container","label","helpText","number","icon"),Tj=pt("switch").parts("container","track","thumb"),vSe=pt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Pj=pt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),bSe=pt("tag").parts("container","label","closeButton"),_Se=pt("card").parts("container","header","body","footer");function Ou(e,t,n){return Math.min(Math.max(e,n),t)}class SSe extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Wh=SSe;function CA(e){if(typeof e!="string")throw new Wh(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=kSe.test(e)?CSe(e):e;const n=ESe.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt($g(s,2),16)),parseInt($g(a[3]||"f",2),16)/255]}const r=ASe.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=TSe.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=PSe.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(Ou(0,100,s)!==s)throw new Wh(e);if(Ou(0,100,l)!==l)throw new Wh(e);return[...ISe(a,s,l),Number.isNaN(u)?1:u]}throw new Wh(e)}function xSe(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const L8=e=>parseInt(e.replace(/_/g,""),36),wSe="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=L8(t.substring(0,3)),r=L8(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function CSe(e){const t=e.toLowerCase().trim(),n=wSe[xSe(t)];if(!n)throw new Wh(e);return`#${n}`}const $g=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),ESe=new RegExp(`^#${$g("([a-f0-9])",3)}([a-f0-9])?$`,"i"),ASe=new RegExp(`^#${$g("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),TSe=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${$g(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),PSe=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,kSe=/^[a-z]+$/i,F8=e=>Math.round(e*255),ISe=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(F8);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);const c=r-o/2,d=s+c,f=l+c,h=u+c;return[d,f,h].map(F8)};function MSe(e,t,n,r){return`rgba(${Ou(0,255,e).toFixed()}, ${Ou(0,255,t).toFixed()}, ${Ou(0,255,n).toFixed()}, ${parseFloat(Ou(0,1,r).toFixed(3))})`}function RSe(e,t){const[n,r,i,o]=CA(e);return MSe(n,r,i,o-t)}function OSe(e){const[t,n,r,i]=CA(e);let o=a=>{const s=Ou(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function $Se(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Rr=(e,t,n)=>{const r=$Se(e,`colors.${t}`,t);try{return OSe(r),r}catch{return n??"#000000"}},DSe=e=>{const[t,n,r]=CA(e);return(t*299+n*587+r*114)/1e3},LSe=e=>t=>{const n=Rr(t,e);return DSe(n)<128?"dark":"light"},FSe=e=>t=>LSe(e)(t)==="dark",Sf=(e,t)=>n=>{const r=Rr(n,e);return RSe(r,1-t)};function B8(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}var BSe=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function zSe(e){const t=BSe();return!e||NSe(e)?t:e.string&&e.colors?VSe(e.string,e.colors):e.string&&!e.colors?jSe(e.string):e.colors&&!e.string?USe(e.colors):t}function jSe(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function VSe(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function EA(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function kj(e){return ma(e)&&e.reference?e.reference:String(e)}var fS=(e,...t)=>t.map(kj).join(` ${e} `).replace(/calc/g,""),z8=(...e)=>`calc(${fS("+",...e)})`,j8=(...e)=>`calc(${fS("-",...e)})`,n3=(...e)=>`calc(${fS("*",...e)})`,V8=(...e)=>`calc(${fS("/",...e)})`,U8=e=>{const t=kj(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:n3(t,-1)},Xa=Object.assign(e=>({add:(...t)=>Xa(z8(e,...t)),subtract:(...t)=>Xa(j8(e,...t)),multiply:(...t)=>Xa(n3(e,...t)),divide:(...t)=>Xa(V8(e,...t)),negate:()=>Xa(U8(e)),toString:()=>e.toString()}),{add:z8,subtract:j8,multiply:n3,divide:V8,negate:U8});function GSe(e){return!Number.isInteger(parseFloat(e.toString()))}function HSe(e,t="-"){return e.replace(/\s+/g,t)}function Ij(e){const t=HSe(e.toString());return t.includes("\\.")?e:GSe(e)?t.replace(".","\\."):e}function qSe(e,t=""){return[t,Ij(e)].filter(Boolean).join("-")}function WSe(e,t){return`var(${Ij(e)}${t?`, ${t}`:""})`}function KSe(e,t=""){return`--${qSe(e,t)}`}function en(e,t){const n=KSe(e,t==null?void 0:t.prefix);return{variable:n,reference:WSe(n,XSe(t==null?void 0:t.fallback))}}function XSe(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:QSe,definePartsStyle:ev}=ze(Tj.keys),pp=en("switch-track-width"),Gu=en("switch-track-height"),aw=en("switch-track-diff"),YSe=Xa.subtract(pp,Gu),r3=en("switch-thumb-x"),yh=en("switch-bg"),ZSe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[pp.reference],height:[Gu.reference],transitionProperty:"common",transitionDuration:"fast",[yh.variable]:"colors.gray.300",_dark:{[yh.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[yh.variable]:`colors.${t}.500`,_dark:{[yh.variable]:`colors.${t}.200`}},bg:yh.reference}},JSe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Gu.reference],height:[Gu.reference],_checked:{transform:`translateX(${r3.reference})`}},e2e=ev(e=>({container:{[aw.variable]:YSe,[r3.variable]:aw.reference,_rtl:{[r3.variable]:Xa(aw).negate().toString()}},track:ZSe(e),thumb:JSe})),t2e={sm:ev({container:{[pp.variable]:"1.375rem",[Gu.variable]:"sizes.3"}}),md:ev({container:{[pp.variable]:"1.875rem",[Gu.variable]:"sizes.4"}}),lg:ev({container:{[pp.variable]:"2.875rem",[Gu.variable]:"sizes.6"}})},n2e=QSe({baseStyle:e2e,sizes:t2e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:r2e,definePartsStyle:jd}=ze(vSe.keys),i2e=jd({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),q1={"&[data-is-numeric=true]":{textAlign:"end"}},o2e=jd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...q1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...q1},caption:{color:W("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),a2e=jd(e=>{const{colorScheme:t}=e;return{th:{color:W("gray.600","gray.400")(e),borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...q1},td:{borderBottom:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e),...q1},caption:{color:W("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:W(`${t}.100`,`${t}.700`)(e)},td:{background:W(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),s2e={simple:o2e,striped:a2e,unstyled:{}},l2e={sm:jd({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:jd({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:jd({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},u2e=r2e({baseStyle:i2e,variants:s2e,sizes:l2e,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Wr=Pe("tabs-color"),xo=Pe("tabs-bg"),W0=Pe("tabs-border-color"),{defineMultiStyleConfig:c2e,definePartsStyle:ya}=ze(Pj.keys),d2e=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},f2e=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},h2e=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},p2e={p:4},g2e=ya(e=>({root:d2e(e),tab:f2e(e),tablist:h2e(e),tabpanel:p2e})),m2e={sm:ya({tab:{py:1,px:4,fontSize:"sm"}}),md:ya({tab:{fontSize:"md",py:2,px:4}}),lg:ya({tab:{fontSize:"lg",py:3,px:4}})},y2e=ya(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Wr.variable]:`colors.${t}.600`,_dark:{[Wr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[xo.variable]:"colors.gray.200",_dark:{[xo.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Wr.reference,bg:xo.reference}}}),v2e=ya(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[W0.variable]:"transparent",_selected:{[Wr.variable]:`colors.${t}.600`,[W0.variable]:"colors.white",_dark:{[Wr.variable]:`colors.${t}.300`,[W0.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:W0.reference},color:Wr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),b2e=ya(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[xo.variable]:"colors.gray.50",_dark:{[xo.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[xo.variable]:"colors.white",[Wr.variable]:`colors.${t}.600`,_dark:{[xo.variable]:"colors.gray.800",[Wr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Wr.reference,bg:xo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),_2e=ya(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Rr(n,`${t}.700`),bg:Rr(n,`${t}.100`)}}}}),S2e=ya(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Wr.variable]:"colors.gray.600",_dark:{[Wr.variable]:"inherit"},_selected:{[Wr.variable]:"colors.white",[xo.variable]:`colors.${t}.600`,_dark:{[Wr.variable]:"colors.gray.800",[xo.variable]:`colors.${t}.300`}},color:Wr.reference,bg:xo.reference}}}),x2e=ya({}),w2e={line:y2e,enclosed:v2e,"enclosed-colored":b2e,"soft-rounded":_2e,"solid-rounded":S2e,unstyled:x2e},C2e=c2e({baseStyle:g2e,sizes:m2e,variants:w2e,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),mn=a_e("badge",["bg","color","shadow"]),E2e={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:mn.bg.reference,color:mn.color.reference,boxShadow:mn.shadow.reference},A2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.500`,.6)(n);return{[mn.bg.variable]:`colors.${t}.500`,[mn.color.variable]:"colors.white",_dark:{[mn.bg.variable]:r,[mn.color.variable]:"colors.whiteAlpha.800"}}},T2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.16)(n);return{[mn.bg.variable]:`colors.${t}.100`,[mn.color.variable]:`colors.${t}.800`,_dark:{[mn.bg.variable]:r,[mn.color.variable]:`colors.${t}.200`}}},P2e=e=>{const{colorScheme:t,theme:n}=e,r=Sf(`${t}.200`,.8)(n);return{[mn.color.variable]:`colors.${t}.500`,_dark:{[mn.color.variable]:r},[mn.shadow.variable]:`inset 0 0 0px 1px ${mn.color.reference}`}},k2e={solid:A2e,subtle:T2e,outline:P2e},gp={baseStyle:E2e,variants:k2e,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:I2e,definePartsStyle:Hu}=ze(bSe.keys),G8=Pe("tag-bg"),H8=Pe("tag-color"),sw=Pe("tag-shadow"),tv=Pe("tag-min-height"),nv=Pe("tag-min-width"),rv=Pe("tag-font-size"),iv=Pe("tag-padding-inline"),M2e={fontWeight:"medium",lineHeight:1.2,outline:0,[H8.variable]:mn.color.reference,[G8.variable]:mn.bg.reference,[sw.variable]:mn.shadow.reference,color:H8.reference,bg:G8.reference,boxShadow:sw.reference,borderRadius:"md",minH:tv.reference,minW:nv.reference,fontSize:rv.reference,px:iv.reference,_focusVisible:{[sw.variable]:"shadows.outline"}},R2e={lineHeight:1.2,overflow:"visible"},O2e={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},$2e=Hu({container:M2e,label:R2e,closeButton:O2e}),N2e={sm:Hu({container:{[tv.variable]:"sizes.5",[nv.variable]:"sizes.5",[rv.variable]:"fontSizes.xs",[iv.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hu({container:{[tv.variable]:"sizes.6",[nv.variable]:"sizes.6",[rv.variable]:"fontSizes.sm",[iv.variable]:"space.2"}}),lg:Hu({container:{[tv.variable]:"sizes.8",[nv.variable]:"sizes.8",[rv.variable]:"fontSizes.md",[iv.variable]:"space.3"}})},D2e={subtle:Hu(e=>{var t;return{container:(t=gp.variants)==null?void 0:t.subtle(e)}}),solid:Hu(e=>{var t;return{container:(t=gp.variants)==null?void 0:t.solid(e)}}),outline:Hu(e=>{var t;return{container:(t=gp.variants)==null?void 0:t.outline(e)}})},L2e=I2e({variants:D2e,baseStyle:$2e,sizes:N2e,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Ja,defineMultiStyleConfig:F2e}=ze(bj.keys),dd=Pe("input-height"),fd=Pe("input-font-size"),hd=Pe("input-padding"),pd=Pe("input-border-radius"),B2e=Ja({addon:{height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference},field:{width:"100%",height:dd.reference,fontSize:fd.reference,px:hd.reference,borderRadius:pd.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Ls={lg:{[fd.variable]:"fontSizes.lg",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.12"},md:{[fd.variable]:"fontSizes.md",[hd.variable]:"space.4",[pd.variable]:"radii.md",[dd.variable]:"sizes.10"},sm:{[fd.variable]:"fontSizes.sm",[hd.variable]:"space.3",[pd.variable]:"radii.sm",[dd.variable]:"sizes.8"},xs:{[fd.variable]:"fontSizes.xs",[hd.variable]:"space.2",[pd.variable]:"radii.sm",[dd.variable]:"sizes.6"}},z2e={lg:Ja({field:Ls.lg,group:Ls.lg}),md:Ja({field:Ls.md,group:Ls.md}),sm:Ja({field:Ls.sm,group:Ls.sm}),xs:Ja({field:Ls.xs,group:Ls.xs})};function AA(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||W("blue.500","blue.300")(e),errorBorderColor:n||W("red.500","red.300")(e)}}var j2e=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=AA(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:W("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Rr(t,r),boxShadow:`0 0 0 1px ${Rr(t,r)}`},_focusVisible:{zIndex:1,borderColor:Rr(t,n),boxShadow:`0 0 0 1px ${Rr(t,n)}`}},addon:{border:"1px solid",borderColor:W("inherit","whiteAlpha.50")(e),bg:W("gray.100","whiteAlpha.300")(e)}}}),V2e=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=AA(e);return{field:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e),_hover:{bg:W("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Rr(t,r)},_focusVisible:{bg:"transparent",borderColor:Rr(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:W("gray.100","whiteAlpha.50")(e)}}}),U2e=Ja(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=AA(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Rr(t,r),boxShadow:`0px 1px 0px 0px ${Rr(t,r)}`},_focusVisible:{borderColor:Rr(t,n),boxShadow:`0px 1px 0px 0px ${Rr(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),G2e=Ja({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),H2e={outline:j2e,filled:V2e,flushed:U2e,unstyled:G2e},ht=F2e({baseStyle:B2e,sizes:z2e,variants:H2e,defaultProps:{size:"md",variant:"outline"}}),q8,q2e={...(q8=ht.baseStyle)==null?void 0:q8.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},W8,K8,W2e={outline:e=>{var t,n;return(n=(t=ht.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=ht.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=ht.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(K8=(W8=ht.variants)==null?void 0:W8.unstyled.field)!=null?K8:{}},X8,Q8,Y8,Z8,J8,e9,t9,n9,K2e={xs:(Q8=(X8=ht.sizes)==null?void 0:X8.xs.field)!=null?Q8:{},sm:(Z8=(Y8=ht.sizes)==null?void 0:Y8.sm.field)!=null?Z8:{},md:(e9=(J8=ht.sizes)==null?void 0:J8.md.field)!=null?e9:{},lg:(n9=(t9=ht.sizes)==null?void 0:t9.lg.field)!=null?n9:{}},X2e={baseStyle:q2e,sizes:K2e,variants:W2e,defaultProps:{size:"md",variant:"outline"}},K0=en("tooltip-bg"),lw=en("tooltip-fg"),Q2e=en("popper-arrow-bg"),Y2e={bg:K0.reference,color:lw.reference,[K0.variable]:"colors.gray.700",[lw.variable]:"colors.whiteAlpha.900",_dark:{[K0.variable]:"colors.gray.300",[lw.variable]:"colors.gray.900"},[Q2e.variable]:K0.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Z2e={baseStyle:Y2e},{defineMultiStyleConfig:J2e,definePartsStyle:Kh}=ze(Cj.keys),exe=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=W(B8(),B8("1rem","rgba(0,0,0,0.1)"))(e),a=W(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Rr(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},txe={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},nxe=e=>({bg:W("gray.100","whiteAlpha.300")(e)}),rxe=e=>({transitionProperty:"common",transitionDuration:"slow",...exe(e)}),ixe=Kh(e=>({label:txe,filledTrack:rxe(e),track:nxe(e)})),oxe={xs:Kh({track:{h:"1"}}),sm:Kh({track:{h:"2"}}),md:Kh({track:{h:"3"}}),lg:Kh({track:{h:"4"}})},axe=J2e({sizes:oxe,baseStyle:ixe,defaultProps:{size:"md",colorScheme:"blue"}}),sxe=e=>typeof e=="function";function $r(e,...t){return sxe(e)?e(...t):e}var{definePartsStyle:ov,defineMultiStyleConfig:lxe}=ze(yj.keys),mp=Pe("checkbox-size"),uxe=e=>{const{colorScheme:t}=e;return{w:mp.reference,h:mp.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e),_hover:{bg:W(`${t}.600`,`${t}.300`)(e),borderColor:W(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:W("gray.200","transparent")(e),bg:W("gray.200","whiteAlpha.300")(e),color:W("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:W(`${t}.500`,`${t}.200`)(e),borderColor:W(`${t}.500`,`${t}.200`)(e),color:W("white","gray.900")(e)},_disabled:{bg:W("gray.100","whiteAlpha.100")(e),borderColor:W("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:W("red.500","red.300")(e)}}},cxe={_disabled:{cursor:"not-allowed"}},dxe={userSelect:"none",_disabled:{opacity:.4}},fxe={transitionProperty:"transform",transitionDuration:"normal"},hxe=ov(e=>({icon:fxe,container:cxe,control:$r(uxe,e),label:dxe})),pxe={sm:ov({control:{[mp.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:ov({control:{[mp.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:ov({control:{[mp.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},W1=lxe({baseStyle:hxe,sizes:pxe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:gxe,definePartsStyle:av}=ze(mSe.keys),mxe=e=>{var t;const n=(t=$r(W1.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},yxe=av(e=>{var t,n,r,i;return{label:(n=(t=W1).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=W1).baseStyle)==null?void 0:i.call(r,e).container,control:mxe(e)}}),vxe={md:av({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:av({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:av({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},bxe=gxe({baseStyle:yxe,sizes:vxe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:_xe,definePartsStyle:Sxe}=ze(Ej.keys),X0=Pe("select-bg"),r9,xxe={...(r9=ht.baseStyle)==null?void 0:r9.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:X0.reference,[X0.variable]:"colors.white",_dark:{[X0.variable]:"colors.gray.700"},"> option, > optgroup":{bg:X0.reference}},wxe={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Cxe=Sxe({field:xxe,icon:wxe}),Q0={paddingInlineEnd:"8"},i9,o9,a9,s9,l9,u9,c9,d9,Exe={lg:{...(i9=ht.sizes)==null?void 0:i9.lg,field:{...(o9=ht.sizes)==null?void 0:o9.lg.field,...Q0}},md:{...(a9=ht.sizes)==null?void 0:a9.md,field:{...(s9=ht.sizes)==null?void 0:s9.md.field,...Q0}},sm:{...(l9=ht.sizes)==null?void 0:l9.sm,field:{...(u9=ht.sizes)==null?void 0:u9.sm.field,...Q0}},xs:{...(c9=ht.sizes)==null?void 0:c9.xs,field:{...(d9=ht.sizes)==null?void 0:d9.xs.field,...Q0},icon:{insetEnd:"1"}}},Axe=_xe({baseStyle:Cxe,sizes:Exe,variants:ht.variants,defaultProps:ht.defaultProps}),uw=Pe("skeleton-start-color"),cw=Pe("skeleton-end-color"),Txe={[uw.variable]:"colors.gray.100",[cw.variable]:"colors.gray.400",_dark:{[uw.variable]:"colors.gray.800",[cw.variable]:"colors.gray.600"},background:uw.reference,borderColor:cw.reference,opacity:.7,borderRadius:"sm"},Pxe={baseStyle:Txe},dw=Pe("skip-link-bg"),kxe={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[dw.variable]:"colors.white",_dark:{[dw.variable]:"colors.gray.700"},bg:dw.reference}},Ixe={baseStyle:kxe},{defineMultiStyleConfig:Mxe,definePartsStyle:hS}=ze(Aj.keys),Ng=Pe("slider-thumb-size"),Dg=Pe("slider-track-size"),el=Pe("slider-bg"),Rxe=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...EA({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Oxe=e=>({...EA({orientation:e.orientation,horizontal:{h:Dg.reference},vertical:{w:Dg.reference}}),overflow:"hidden",borderRadius:"sm",[el.variable]:"colors.gray.200",_dark:{[el.variable]:"colors.whiteAlpha.200"},_disabled:{[el.variable]:"colors.gray.300",_dark:{[el.variable]:"colors.whiteAlpha.300"}},bg:el.reference}),$xe=e=>{const{orientation:t}=e;return{...EA({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Ng.reference,h:Ng.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Nxe=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[el.variable]:`colors.${t}.500`,_dark:{[el.variable]:`colors.${t}.200`},bg:el.reference}},Dxe=hS(e=>({container:Rxe(e),track:Oxe(e),thumb:$xe(e),filledTrack:Nxe(e)})),Lxe=hS({container:{[Ng.variable]:"sizes.4",[Dg.variable]:"sizes.1"}}),Fxe=hS({container:{[Ng.variable]:"sizes.3.5",[Dg.variable]:"sizes.1"}}),Bxe=hS({container:{[Ng.variable]:"sizes.2.5",[Dg.variable]:"sizes.0.5"}}),zxe={lg:Lxe,md:Fxe,sm:Bxe},jxe=Mxe({baseStyle:Dxe,sizes:zxe,defaultProps:{size:"md",colorScheme:"blue"}}),Eu=en("spinner-size"),Vxe={width:[Eu.reference],height:[Eu.reference]},Uxe={xs:{[Eu.variable]:"sizes.3"},sm:{[Eu.variable]:"sizes.4"},md:{[Eu.variable]:"sizes.6"},lg:{[Eu.variable]:"sizes.8"},xl:{[Eu.variable]:"sizes.12"}},Gxe={baseStyle:Vxe,sizes:Uxe,defaultProps:{size:"md"}},{defineMultiStyleConfig:Hxe,definePartsStyle:Mj}=ze(ySe.keys),qxe={fontWeight:"medium"},Wxe={opacity:.8,marginBottom:"2"},Kxe={verticalAlign:"baseline",fontWeight:"semibold"},Xxe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Qxe=Mj({container:{},label:qxe,helpText:Wxe,number:Kxe,icon:Xxe}),Yxe={md:Mj({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Zxe=Hxe({baseStyle:Qxe,sizes:Yxe,defaultProps:{size:"md"}}),fw=Pe("kbd-bg"),Jxe={[fw.variable]:"colors.gray.100",_dark:{[fw.variable]:"colors.whiteAlpha.100"},bg:fw.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},ewe={baseStyle:Jxe},twe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},nwe={baseStyle:twe},{defineMultiStyleConfig:rwe,definePartsStyle:iwe}=ze(gSe.keys),owe={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},awe=iwe({icon:owe}),swe=rwe({baseStyle:awe}),{defineMultiStyleConfig:lwe,definePartsStyle:uwe}=ze(_j.keys),Yo=Pe("menu-bg"),hw=Pe("menu-shadow"),cwe={[Yo.variable]:"#fff",[hw.variable]:"shadows.sm",_dark:{[Yo.variable]:"colors.gray.700",[hw.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Yo.reference,boxShadow:hw.reference},dwe={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Yo.variable]:"colors.gray.100",_dark:{[Yo.variable]:"colors.whiteAlpha.100"}},_active:{[Yo.variable]:"colors.gray.200",_dark:{[Yo.variable]:"colors.whiteAlpha.200"}},_expanded:{[Yo.variable]:"colors.gray.100",_dark:{[Yo.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Yo.reference},fwe={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},hwe={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},pwe={opacity:.6},gwe={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},mwe={transitionProperty:"common",transitionDuration:"normal"},ywe=uwe({button:mwe,list:cwe,item:dwe,groupTitle:fwe,icon:hwe,command:pwe,divider:gwe}),vwe=lwe({baseStyle:ywe}),{defineMultiStyleConfig:bwe,definePartsStyle:i3}=ze(Sj.keys),pw=Pe("modal-bg"),gw=Pe("modal-shadow"),_we={bg:"blackAlpha.600",zIndex:"modal"},Swe=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},xwe=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[pw.variable]:"colors.white",[gw.variable]:"shadows.lg",_dark:{[pw.variable]:"colors.gray.700",[gw.variable]:"shadows.dark-lg"},bg:pw.reference,boxShadow:gw.reference}},wwe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Cwe={position:"absolute",top:"2",insetEnd:"3"},Ewe=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Awe={px:"6",py:"4"},Twe=i3(e=>({overlay:_we,dialogContainer:$r(Swe,e),dialog:$r(xwe,e),header:wwe,closeButton:Cwe,body:$r(Ewe,e),footer:Awe}));function ho(e){return i3(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Pwe={xs:ho("xs"),sm:ho("sm"),md:ho("md"),lg:ho("lg"),xl:ho("xl"),"2xl":ho("2xl"),"3xl":ho("3xl"),"4xl":ho("4xl"),"5xl":ho("5xl"),"6xl":ho("6xl"),full:ho("full")},kwe=bwe({baseStyle:Twe,sizes:Pwe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Iwe,definePartsStyle:Rj}=ze(xj.keys),TA=en("number-input-stepper-width"),Oj=en("number-input-input-padding"),Mwe=Xa(TA).add("0.5rem").toString(),mw=en("number-input-bg"),yw=en("number-input-color"),vw=en("number-input-border-color"),Rwe={[TA.variable]:"sizes.6",[Oj.variable]:Mwe},Owe=e=>{var t,n;return(n=(t=$r(ht.baseStyle,e))==null?void 0:t.field)!=null?n:{}},$we={width:TA.reference},Nwe={borderStart:"1px solid",borderStartColor:vw.reference,color:yw.reference,bg:mw.reference,[yw.variable]:"colors.chakra-body-text",[vw.variable]:"colors.chakra-border-color",_dark:{[yw.variable]:"colors.whiteAlpha.800",[vw.variable]:"colors.whiteAlpha.300"},_active:{[mw.variable]:"colors.gray.200",_dark:{[mw.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Dwe=Rj(e=>{var t;return{root:Rwe,field:(t=$r(Owe,e))!=null?t:{},stepperGroup:$we,stepper:Nwe}});function Y0(e){var t,n,r;const i=(t=ht.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",s=hj.fontSizes[a];return Rj({field:{...i.field,paddingInlineEnd:Oj.reference,verticalAlign:"top"},stepper:{fontSize:Xa(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var Lwe={xs:Y0("xs"),sm:Y0("sm"),md:Y0("md"),lg:Y0("lg")},Fwe=Iwe({baseStyle:Dwe,sizes:Lwe,variants:ht.variants,defaultProps:ht.defaultProps}),f9,Bwe={...(f9=ht.baseStyle)==null?void 0:f9.field,textAlign:"center"},zwe={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},h9,p9,jwe={outline:e=>{var t,n,r;return(r=(n=$r((t=ht.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=$r((t=ht.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=$r((t=ht.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(p9=(h9=ht.variants)==null?void 0:h9.unstyled.field)!=null?p9:{}},Vwe={baseStyle:Bwe,sizes:zwe,variants:jwe,defaultProps:ht.defaultProps},{defineMultiStyleConfig:Uwe,definePartsStyle:Gwe}=ze(wj.keys),Z0=en("popper-bg"),Hwe=en("popper-arrow-bg"),g9=en("popper-arrow-shadow-color"),qwe={zIndex:10},Wwe={[Z0.variable]:"colors.white",bg:Z0.reference,[Hwe.variable]:Z0.reference,[g9.variable]:"colors.gray.200",_dark:{[Z0.variable]:"colors.gray.700",[g9.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Kwe={px:3,py:2,borderBottomWidth:"1px"},Xwe={px:3,py:2},Qwe={px:3,py:2,borderTopWidth:"1px"},Ywe={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Zwe=Gwe({popper:qwe,content:Wwe,header:Kwe,body:Xwe,footer:Qwe,closeButton:Ywe}),Jwe=Uwe({baseStyle:Zwe}),{definePartsStyle:o3,defineMultiStyleConfig:eCe}=ze(fSe.keys),bw=Pe("drawer-bg"),_w=Pe("drawer-box-shadow");function Fc(e){return o3(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var tCe={bg:"blackAlpha.600",zIndex:"overlay"},nCe={display:"flex",zIndex:"modal",justifyContent:"center"},rCe=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[bw.variable]:"colors.white",[_w.variable]:"shadows.lg",_dark:{[bw.variable]:"colors.gray.700",[_w.variable]:"shadows.dark-lg"},bg:bw.reference,boxShadow:_w.reference}},iCe={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},oCe={position:"absolute",top:"2",insetEnd:"3"},aCe={px:"6",py:"2",flex:"1",overflow:"auto"},sCe={px:"6",py:"4"},lCe=o3(e=>({overlay:tCe,dialogContainer:nCe,dialog:$r(rCe,e),header:iCe,closeButton:oCe,body:aCe,footer:sCe})),uCe={xs:Fc("xs"),sm:Fc("md"),md:Fc("lg"),lg:Fc("2xl"),xl:Fc("4xl"),full:Fc("full")},cCe=eCe({baseStyle:lCe,sizes:uCe,defaultProps:{size:"xs"}}),{definePartsStyle:dCe,defineMultiStyleConfig:fCe}=ze(vj.keys),hCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},pCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},gCe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},mCe=dCe({preview:hCe,input:pCe,textarea:gCe}),yCe=fCe({baseStyle:mCe}),{definePartsStyle:vCe,defineMultiStyleConfig:bCe}=ze(hSe.keys),Vd=Pe("form-control-color"),_Ce={marginStart:"1",[Vd.variable]:"colors.red.500",_dark:{[Vd.variable]:"colors.red.300"},color:Vd.reference},SCe={mt:"2",[Vd.variable]:"colors.gray.600",_dark:{[Vd.variable]:"colors.whiteAlpha.600"},color:Vd.reference,lineHeight:"normal",fontSize:"sm"},xCe=vCe({container:{width:"100%",position:"relative"},requiredIndicator:_Ce,helperText:SCe}),wCe=bCe({baseStyle:xCe}),{definePartsStyle:CCe,defineMultiStyleConfig:ECe}=ze(pSe.keys),Ud=Pe("form-error-color"),ACe={[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},TCe={marginEnd:"0.5em",[Ud.variable]:"colors.red.500",_dark:{[Ud.variable]:"colors.red.300"},color:Ud.reference},PCe=CCe({text:ACe,icon:TCe}),kCe=ECe({baseStyle:PCe}),ICe={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},MCe={baseStyle:ICe},RCe={fontFamily:"heading",fontWeight:"bold"},OCe={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},$Ce={baseStyle:RCe,sizes:OCe,defaultProps:{size:"xl"}},{defineMultiStyleConfig:NCe,definePartsStyle:DCe}=ze(dSe.keys),Sw=Pe("breadcrumb-link-decor"),LCe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Sw.reference,[Sw.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Sw.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},FCe=DCe({link:LCe}),BCe=NCe({baseStyle:FCe}),zCe={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},$j=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.100","whiteAlpha.200")(e)},_active:{bg:W("gray.200","whiteAlpha.300")(e)}};const r=Sf(`${t}.200`,.12)(n),i=Sf(`${t}.200`,.24)(n);return{color:W(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:W(`${t}.50`,r)(e)},_active:{bg:W(`${t}.100`,i)(e)}}},jCe=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...$r($j,e)}},VCe={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},UCe=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=W("gray.100","whiteAlpha.200")(e);return{bg:l,color:W("gray.800","whiteAlpha.900")(e),_hover:{bg:W("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:W("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:a=`${n}.700`}=(t=VCe[n])!=null?t:{},s=W(r,`${n}.200`)(e);return{bg:s,color:W(i,"gray.800")(e),_hover:{bg:W(o,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:W(a,`${n}.400`)(e)}}},GCe=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:W(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:W(`${t}.700`,`${t}.500`)(e)}}},HCe={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},qCe={ghost:$j,outline:jCe,solid:UCe,link:GCe,unstyled:HCe},WCe={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},KCe={baseStyle:zCe,variants:qCe,sizes:WCe,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:qu,defineMultiStyleConfig:XCe}=ze(_Se.keys),K1=Pe("card-bg"),is=Pe("card-padding"),Nj=Pe("card-shadow"),sv=Pe("card-radius"),Dj=Pe("card-border-width","0"),Lj=Pe("card-border-color"),QCe=qu({container:{[K1.variable]:"colors.chakra-body-bg",backgroundColor:K1.reference,boxShadow:Nj.reference,borderRadius:sv.reference,color:"chakra-body-text",borderWidth:Dj.reference,borderColor:Lj.reference},body:{padding:is.reference,flex:"1 1 0%"},header:{padding:is.reference},footer:{padding:is.reference}}),YCe={sm:qu({container:{[sv.variable]:"radii.base",[is.variable]:"space.3"}}),md:qu({container:{[sv.variable]:"radii.md",[is.variable]:"space.5"}}),lg:qu({container:{[sv.variable]:"radii.xl",[is.variable]:"space.7"}})},ZCe={elevated:qu({container:{[Nj.variable]:"shadows.base",_dark:{[K1.variable]:"colors.gray.700"}}}),outline:qu({container:{[Dj.variable]:"1px",[Lj.variable]:"colors.chakra-border-color"}}),filled:qu({container:{[K1.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[is.variable]:0},header:{[is.variable]:0},footer:{[is.variable]:0}}},JCe=XCe({baseStyle:QCe,variants:ZCe,sizes:YCe,defaultProps:{variant:"elevated",size:"md"}}),yp=en("close-button-size"),vh=en("close-button-bg"),e5e={w:[yp.reference],h:[yp.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[vh.variable]:"colors.blackAlpha.100",_dark:{[vh.variable]:"colors.whiteAlpha.100"}},_active:{[vh.variable]:"colors.blackAlpha.200",_dark:{[vh.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:vh.reference},t5e={lg:{[yp.variable]:"sizes.10",fontSize:"md"},md:{[yp.variable]:"sizes.8",fontSize:"xs"},sm:{[yp.variable]:"sizes.6",fontSize:"2xs"}},n5e={baseStyle:e5e,sizes:t5e,defaultProps:{size:"md"}},{variants:r5e,defaultProps:i5e}=gp,o5e={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:mn.bg.reference,color:mn.color.reference,boxShadow:mn.shadow.reference},a5e={baseStyle:o5e,variants:r5e,defaultProps:i5e},s5e={w:"100%",mx:"auto",maxW:"prose",px:"4"},l5e={baseStyle:s5e},u5e={opacity:.6,borderColor:"inherit"},c5e={borderStyle:"solid"},d5e={borderStyle:"dashed"},f5e={solid:c5e,dashed:d5e},h5e={baseStyle:u5e,variants:f5e,defaultProps:{variant:"solid"}},{definePartsStyle:p5e,defineMultiStyleConfig:g5e}=ze(mj.keys),m5e={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},y5e={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},v5e={pt:"2",px:"4",pb:"5"},b5e={fontSize:"1.25em"},_5e=p5e({container:m5e,button:y5e,panel:v5e,icon:b5e}),S5e=g5e({baseStyle:_5e}),{definePartsStyle:Rm,defineMultiStyleConfig:x5e}=ze(uSe.keys),_i=Pe("alert-fg"),bs=Pe("alert-bg"),w5e=Rm({container:{bg:bs.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:_i.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:_i.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function PA(e){const{theme:t,colorScheme:n}=e,r=Sf(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var C5e=Rm(e=>{const{colorScheme:t}=e,n=PA(e);return{container:{[_i.variable]:`colors.${t}.500`,[bs.variable]:n.light,_dark:{[_i.variable]:`colors.${t}.200`,[bs.variable]:n.dark}}}}),E5e=Rm(e=>{const{colorScheme:t}=e,n=PA(e);return{container:{[_i.variable]:`colors.${t}.500`,[bs.variable]:n.light,_dark:{[_i.variable]:`colors.${t}.200`,[bs.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:_i.reference}}}),A5e=Rm(e=>{const{colorScheme:t}=e,n=PA(e);return{container:{[_i.variable]:`colors.${t}.500`,[bs.variable]:n.light,_dark:{[_i.variable]:`colors.${t}.200`,[bs.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:_i.reference}}}),T5e=Rm(e=>{const{colorScheme:t}=e;return{container:{[_i.variable]:"colors.white",[bs.variable]:`colors.${t}.500`,_dark:{[_i.variable]:"colors.gray.900",[bs.variable]:`colors.${t}.200`},color:_i.reference}}}),P5e={subtle:C5e,"left-accent":E5e,"top-accent":A5e,solid:T5e},k5e=x5e({baseStyle:w5e,variants:P5e,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:Fj,defineMultiStyleConfig:I5e}=ze(cSe.keys),Gd=Pe("avatar-border-color"),vp=Pe("avatar-bg"),Lg=Pe("avatar-font-size"),xf=Pe("avatar-size"),M5e={borderRadius:"full",border:"0.2em solid",borderColor:Gd.reference,[Gd.variable]:"white",_dark:{[Gd.variable]:"colors.gray.800"}},R5e={bg:vp.reference,fontSize:Lg.reference,width:xf.reference,height:xf.reference,lineHeight:"1",[vp.variable]:"colors.gray.200",_dark:{[vp.variable]:"colors.whiteAlpha.400"}},O5e=e=>{const{name:t,theme:n}=e,r=t?zSe({string:t}):"colors.gray.400",i=FSe(r)(n);let o="white";return i||(o="gray.800"),{bg:vp.reference,fontSize:Lg.reference,color:o,borderColor:Gd.reference,verticalAlign:"top",width:xf.reference,height:xf.reference,"&:not([data-loaded])":{[vp.variable]:r},[Gd.variable]:"colors.white",_dark:{[Gd.variable]:"colors.gray.800"}}},$5e={fontSize:Lg.reference,lineHeight:"1"},N5e=Fj(e=>({badge:$r(M5e,e),excessLabel:$r(R5e,e),container:$r(O5e,e),label:$5e}));function Fs(e){const t=e!=="100%"?gj[e]:void 0;return Fj({container:{[xf.variable]:t??e,[Lg.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[xf.variable]:t??e,[Lg.variable]:`calc(${t??e} / 2.5)`}})}var D5e={"2xs":Fs(4),xs:Fs(6),sm:Fs(8),md:Fs(12),lg:Fs(16),xl:Fs(24),"2xl":Fs(32),full:Fs("100%")},L5e=I5e({baseStyle:N5e,sizes:D5e,defaultProps:{size:"md"}}),F5e={Accordion:S5e,Alert:k5e,Avatar:L5e,Badge:gp,Breadcrumb:BCe,Button:KCe,Checkbox:W1,CloseButton:n5e,Code:a5e,Container:l5e,Divider:h5e,Drawer:cCe,Editable:yCe,Form:wCe,FormError:kCe,FormLabel:MCe,Heading:$Ce,Input:ht,Kbd:ewe,Link:nwe,List:swe,Menu:vwe,Modal:kwe,NumberInput:Fwe,PinInput:Vwe,Popover:Jwe,Progress:axe,Radio:bxe,Select:Axe,Skeleton:Pxe,SkipLink:Ixe,Slider:jxe,Spinner:Gxe,Stat:Zxe,Switch:n2e,Table:u2e,Tabs:C2e,Tag:L2e,Textarea:X2e,Tooltip:Z2e,Card:JCe,Stepper:lSe},B5e={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},z5e={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},j5e="ltr",V5e={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},U5e={semanticTokens:B5e,direction:j5e,...oSe,components:F5e,styles:z5e,config:V5e},G5e=U5e;function H5e(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function q5e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},Bj=W5e(q5e);function zj(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var jj=e=>zj(e,t=>t!=null);function K5e(e){return typeof e=="function"}function Vj(e,...t){return K5e(e)?e(...t):e}function vUe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var X5e=typeof Element<"u",Q5e=typeof Map=="function",Y5e=typeof Set=="function",Z5e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function lv(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!lv(e[r],t[r]))return!1;return!0}var o;if(Q5e&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!lv(r.value[1],t.get(r.value[0])))return!1;return!0}if(Y5e&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Z5e&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(X5e&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!lv(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var J5e=function(t,n){try{return lv(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const e3e=Bl(J5e);function Uj(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:a}=oj(),s=e?Bj(o,`components.${e}`):void 0,l=r||s,u=ua({theme:o,colorMode:a},(n=l==null?void 0:l.defaultProps)!=null?n:{},jj(H5e(i,["children"]))),c=k.useRef({});if(l){const f=N_e(l)(u);e3e(c.current,f)||(c.current=f)}return c.current}function Om(e,t={}){return Uj(e,t)}function t3e(e,t={}){return Uj(e,t)}var n3e=new Set([...w_e,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),r3e=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function i3e(e){return r3e.has(e)||!n3e.has(e)}function o3e(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function a3e(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var s3e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,l3e=Kz(function(e){return s3e.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),u3e=l3e,c3e=function(t){return t!=="theme"},m9=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?u3e:c3e},y9=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},d3e=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Qz(n,r,i),ebe(function(){return Yz(n,r,i)}),null},f3e=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=y9(t,n,r),l=s||m9(i),u=!l("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;ht=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=zj(a,(d,f)=>E_e(f)),l=Vj(e,t),u=o3e({},i,l,jj(s),o),c=fj(u)(t.theme);return r?[c,r]:c};function xw(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=i3e);const i=g3e({baseStyle:n}),o=p3e(e,r)(i);return bt.forwardRef(function(l,u){const{colorMode:c,forced:d}=uS();return bt.createElement(o,{ref:u,"data-theme":d?c:void 0,...l})})}function m3e(){const e=new Map;return new Proxy(xw,{apply(t,n,r){return xw(...r)},get(t,n){return e.has(n)||e.set(n,xw(n)),e.get(n)}})}var sr=m3e();function Pi(e){return k.forwardRef(e)}function y3e(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.createContext(void 0);i.displayName=r;function o(){var a;const s=k.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}function v3e(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=k.useMemo(()=>S_e(n),[n]);return q.jsxs(rbe,{theme:i,children:[q.jsx(b3e,{root:t}),r]})}function b3e({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return q.jsx(nj,{styles:n=>({[t]:n.__cssVars})})}y3e({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function bUe(){const{colorMode:e}=uS();return q.jsx(nj,{styles:t=>{const n=Bj(t,"styles.global"),r=Vj(n,{theme:t,colorMode:e});return r?fj(r)(t):void 0}})}var _3e=(e,t)=>e.find(n=>n.id===t);function b9(e,t){const n=Gj(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function Gj(e,t){for(const[n,r]of Object.entries(e))if(_3e(r,t))return n}function S3e(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function x3e(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}function w3e(e,t=[]){const n=k.useRef(e);return k.useEffect(()=>{n.current=e}),k.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function C3e(e,t){const n=w3e(e);k.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function _9(e,t){const n=k.useRef(!1),r=k.useRef(!1);k.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const Hj=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),pS=k.createContext({}),$m=k.createContext(null),gS=typeof document<"u",kA=gS?k.useLayoutEffect:k.useEffect,qj=k.createContext({strict:!1});function E3e(e,t,n,r){const{visualElement:i}=k.useContext(pS),o=k.useContext(qj),a=k.useContext($m),s=k.useContext(Hj).reducedMotion,l=k.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;k.useInsertionEffect(()=>{u&&u.update(n,a)});const c=k.useRef(!!window.HandoffAppearAnimations);return kA(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),k.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function gd(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function A3e(e,t,n){return k.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gd(n)&&(n.current=r))},[t])}function Fg(e){return typeof e=="string"||Array.isArray(e)}function mS(e){return typeof e=="object"&&typeof e.start=="function"}const IA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MA=["initial",...IA];function yS(e){return mS(e.animate)||MA.some(t=>Fg(e[t]))}function Wj(e){return!!(yS(e)||e.variants)}function T3e(e,t){if(yS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fg(n)?n:void 0,animate:Fg(r)?r:void 0}}return e.inherit!==!1?t:{}}function P3e(e){const{initial:t,animate:n}=T3e(e,k.useContext(pS));return k.useMemo(()=>({initial:t,animate:n}),[S9(t),S9(n)])}function S9(e){return Array.isArray(e)?e.join(" "):e}const x9={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bg={};for(const e in x9)Bg[e]={isEnabled:t=>x9[e].some(n=>!!t[n])};function k3e(e){for(const t in e)Bg[t]={...Bg[t],...e[t]}}const RA=k.createContext({}),Kj=k.createContext({}),I3e=Symbol.for("motionComponentSymbol");function M3e({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&k3e(e);function o(s,l){let u;const c={...k.useContext(Hj),...s,layoutId:R3e(s)},{isStatic:d}=c,f=P3e(s),h=r(s,d);if(!d&&gS){f.visualElement=E3e(i,h,c,t);const p=k.useContext(Kj),m=k.useContext(qj).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,m,e,p))}return k.createElement(pS.Provider,{value:f},u&&f.visualElement?k.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,s,A3e(h,f.visualElement,l),h,d,f.visualElement))}const a=k.forwardRef(o);return a[I3e]=i,a}function R3e({layoutId:e}){const t=k.useContext(RA).id;return t&&e!==void 0?t+"-"+e:e}function O3e(e){function t(r,i={}){return M3e(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const $3e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function OA(e){return typeof e!="string"||e.includes("-")?!1:!!($3e.indexOf(e)>-1||/[A-Z]/.test(e))}const Q1={};function N3e(e){Object.assign(Q1,e)}const Nm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hc=new Set(Nm);function Xj(e,{layout:t,layoutId:n}){return hc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Q1[e]||e==="opacity")}const oi=e=>!!(e&&e.getVelocity),D3e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},L3e=Nm.length;function F3e(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let a=0;at=>typeof t=="string"&&t.startsWith(e),Yj=Qj("--"),a3=Qj("var(--"),B3e=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,z3e=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ol=(e,t,n)=>Math.min(Math.max(n,e),t),pc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bp={...pc,transform:e=>Ol(0,1,e)},J0={...pc,default:1},_p=e=>Math.round(e*1e5)/1e5,vS=/(-)?([\d]*\.?[\d])+/g,Zj=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,j3e=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Dm(e){return typeof e=="string"}const Lm=e=>({test:t=>Dm(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),js=Lm("deg"),va=Lm("%"),Ie=Lm("px"),V3e=Lm("vh"),U3e=Lm("vw"),w9={...va,parse:e=>va.parse(e)/100,transform:e=>va.transform(e*100)},C9={...pc,transform:Math.round},Jj={borderWidth:Ie,borderTopWidth:Ie,borderRightWidth:Ie,borderBottomWidth:Ie,borderLeftWidth:Ie,borderRadius:Ie,radius:Ie,borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomRightRadius:Ie,borderBottomLeftRadius:Ie,width:Ie,maxWidth:Ie,height:Ie,maxHeight:Ie,size:Ie,top:Ie,right:Ie,bottom:Ie,left:Ie,padding:Ie,paddingTop:Ie,paddingRight:Ie,paddingBottom:Ie,paddingLeft:Ie,margin:Ie,marginTop:Ie,marginRight:Ie,marginBottom:Ie,marginLeft:Ie,rotate:js,rotateX:js,rotateY:js,rotateZ:js,scale:J0,scaleX:J0,scaleY:J0,scaleZ:J0,skew:js,skewX:js,skewY:js,distance:Ie,translateX:Ie,translateY:Ie,translateZ:Ie,x:Ie,y:Ie,z:Ie,perspective:Ie,transformPerspective:Ie,opacity:bp,originX:w9,originY:w9,originZ:Ie,zIndex:C9,fillOpacity:bp,strokeOpacity:bp,numOctaves:C9};function $A(e,t,n,r){const{style:i,vars:o,transform:a,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(Yj(d)){o[d]=f;continue}const h=Jj[d],p=z3e(f,h);if(hc.has(d)){if(l=!0,a[d]=p,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=p):i[d]=p}if(t.transform||(l||r?i.transform=F3e(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=s;i.transformOrigin=`${d} ${f} ${h}`}}const NA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eV(e,t,n){for(const r in t)!oi(t[r])&&!Xj(r,n)&&(e[r]=t[r])}function G3e({transformTemplate:e},t,n){return k.useMemo(()=>{const r=NA();return $A(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function H3e(e,t,n){const r=e.style||{},i={};return eV(i,r,e),Object.assign(i,G3e(e,t,n)),e.transformValues?e.transformValues(i):i}function q3e(e,t,n){const r={},i=H3e(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const W3e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Y1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||W3e.has(e)}let tV=e=>!Y1(e);function K3e(e){e&&(tV=t=>t.startsWith("on")?!Y1(t):e(t))}try{K3e(require("@emotion/is-prop-valid").default)}catch{}function X3e(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(tV(i)||n===!0&&Y1(i)||!t&&!Y1(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function E9(e,t,n){return typeof e=="string"?e:Ie.transform(t+n*e)}function Q3e(e,t,n){const r=E9(t,e.x,e.width),i=E9(n,e.y,e.height);return`${r} ${i}`}const Y3e={offset:"stroke-dashoffset",array:"stroke-dasharray"},Z3e={offset:"strokeDashoffset",array:"strokeDasharray"};function J3e(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Y3e:Z3e;e[o.offset]=Ie.transform(-r);const a=Ie.transform(t),s=Ie.transform(n);e[o.array]=`${a} ${s}`}function DA(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,d,f){if($A(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Q3e(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&J3e(h,a,s,l,!1)}const nV=()=>({...NA(),attrs:{}}),LA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function e4e(e,t,n,r){const i=k.useMemo(()=>{const o=nV();return DA(o,t,{enableHardwareAcceleration:!1},LA(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};eV(o,e.style,e),i.style={...o,...i.style}}return i}function t4e(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(OA(n)?e4e:q3e)(r,o,a,n),c={...X3e(r,typeof n=="string",e),...l,ref:i},{children:d}=r,f=k.useMemo(()=>oi(d)?d.get():d,[d]);return k.createElement(n,{...c,children:f})}}const FA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rV(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const iV=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function oV(e,t,n,r){rV(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(iV.has(i)?i:FA(i),t.attrs[i])}function BA(e,t){const{style:n}=e,r={};for(const i in n)(oi(n[i])||t.style&&oi(t.style[i])||Xj(i,e))&&(r[i]=n[i]);return r}function aV(e,t){const n=BA(e,t);for(const r in e)if(oi(e[r])||oi(t[r])){const i=Nm.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function zA(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function sV(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const Z1=e=>Array.isArray(e),n4e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),r4e=e=>Z1(e)?e[e.length-1]||0:e;function uv(e){const t=oi(e)?e.get():e;return n4e(t)?t.toValue():t}function i4e({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:o4e(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const lV=e=>(t,n)=>{const r=k.useContext(pS),i=k.useContext($m),o=()=>i4e(e,t,r,i);return n?o():sV(o)};function o4e(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=uv(o[f]);let{initial:a,animate:s}=e;const l=yS(e),u=Wj(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||a===!1;const d=c?s:a;return d&&typeof d!="boolean"&&!mS(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const p=zA(e,h);if(!p)return;const{transitionEnd:m,transition:_,...v}=p;for(const y in v){let g=v[y];if(Array.isArray(g)){const b=c?g.length-1:0;g=g[b]}g!==null&&(i[y]=g)}for(const y in m)i[y]=m[y]}),i}const un=e=>e;function a4e(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&a.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(d[f]=a4e(()=>n=!0),d),{}),a=d=>o[d].process(i),s=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,s4e),1),i.timestamp=d,i.isProcessing=!0,ey.forEach(a),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:ey.reduce((d,f)=>{const h=o[f];return d[f]=(p,m=!1,_=!1)=>(n||l(),h.schedule(p,m,_)),d},{}),cancel:d=>ey.forEach(f=>o[f].cancel(d)),state:i,steps:o}}const{schedule:Mt,cancel:_s,state:pr,steps:ww}=l4e(typeof requestAnimationFrame<"u"?requestAnimationFrame:un,!0),u4e={useVisualState:lV({scrapeMotionValuesFromProps:aV,createRenderState:nV,onMount:(e,t,{renderState:n,latestValues:r})=>{Mt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Mt.render(()=>{DA(n,r,{enableHardwareAcceleration:!1},LA(t.tagName),e.transformTemplate),oV(t,n)})}})},c4e={useVisualState:lV({scrapeMotionValuesFromProps:BA,createRenderState:NA})};function d4e(e,{forwardMotionProps:t=!1},n,r){return{...OA(e)?u4e:c4e,preloadedFeatures:n,useRender:t4e(t),createVisualElement:r,Component:e}}function es(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const uV=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function bS(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const f4e=e=>t=>uV(t)&&e(t,bS(t));function os(e,t,n,r){return es(e,t,f4e(n),r)}const h4e=(e,t)=>n=>t(e(n)),_l=(...e)=>e.reduce(h4e);function cV(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const A9=cV("dragHorizontal"),T9=cV("dragVertical");function dV(e){let t=!1;if(e==="y")t=T9();else if(e==="x")t=A9();else{const n=A9(),r=T9();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function fV(){const e=dV(!0);return e?(e(),!1):!0}class Xl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function P9(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,a)=>{if(o.type==="touch"||fV())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&Mt.update(()=>s[r](o,a))};return os(e.current,n,i,{passive:!e.getProps()[r]})}class p4e extends Xl{mount(){this.unmount=_l(P9(this.node,!0),P9(this.node,!1))}unmount(){}}class g4e extends Xl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_l(es(this.node.current,"focus",()=>this.onFocus()),es(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hV=(e,t)=>t?e===t?!0:hV(e,t.parentElement):!1;function Cw(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,bS(n))}class m4e extends Xl{constructor(){super(...arguments),this.removeStartListeners=un,this.removeEndListeners=un,this.removeAccessibleListeners=un,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=os(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Mt.update(()=>{hV(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),a=os(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_l(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||Cw("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Mt.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=es(this.node.current,"keyup",a),Cw("down",(s,l)=>{this.startPress(s,l)})},n=es(this.node.current,"keydown",t),r=()=>{this.isPressing&&Cw("cancel",(o,a)=>this.cancelPress(o,a))},i=es(this.node.current,"blur",r);this.removeAccessibleListeners=_l(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Mt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fV()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Mt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=os(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=es(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_l(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const s3=new WeakMap,Ew=new WeakMap,y4e=e=>{const t=s3.get(e.target);t&&t(e)},v4e=e=>{e.forEach(y4e)};function b4e({root:e,...t}){const n=e||document;Ew.has(n)||Ew.set(n,{});const r=Ew.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(v4e,{root:e,...t})),r[i]}function _4e(e,t,n){const r=b4e(t);return s3.set(e,n),r.observe(e),()=>{s3.delete(e),r.unobserve(e)}}const S4e={some:0,all:1};class x4e extends Xl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:S4e[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return _4e(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(w4e(t,n))&&this.startObserver()}unmount(){}}function w4e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const C4e={inView:{Feature:x4e},tap:{Feature:m4e},focus:{Feature:g4e},hover:{Feature:p4e}};function pV(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function A4e(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function _S(e,t,n){const r=e.getProps();return zA(r,t,n!==void 0?n:r.custom,E4e(e),A4e(e))}const T4e="framerAppearId",P4e="data-"+FA(T4e);let k4e=un,jA=un;const Sl=e=>e*1e3,as=e=>e/1e3,I4e={current:!1},gV=e=>Array.isArray(e)&&typeof e[0]=="number";function mV(e){return!!(!e||typeof e=="string"&&yV[e]||gV(e)||Array.isArray(e)&&e.every(mV))}const Xh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yV={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xh([0,.65,.55,1]),circOut:Xh([.55,0,1,.45]),backIn:Xh([.31,.01,.66,-.59]),backOut:Xh([.33,1.53,.69,.99])};function vV(e){if(e)return gV(e)?Xh(e):Array.isArray(e)?e.map(vV):yV[e]}function M4e(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=vV(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function R4e(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const bV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,O4e=1e-7,$4e=12;function N4e(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=bV(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>O4e&&++s<$4e);return a}function Fm(e,t,n,r){if(e===t&&n===r)return un;const i=o=>N4e(o,0,1,e,n);return o=>o===0||o===1?o:bV(i(o),t,r)}const D4e=Fm(.42,0,1,1),L4e=Fm(0,0,.58,1),_V=Fm(.42,0,.58,1),F4e=e=>Array.isArray(e)&&typeof e[0]!="number",SV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xV=e=>t=>1-e(1-t),wV=e=>1-Math.sin(Math.acos(e)),VA=xV(wV),B4e=SV(VA),CV=Fm(.33,1.53,.69,.99),UA=xV(CV),z4e=SV(UA),j4e=e=>(e*=2)<1?.5*UA(e):.5*(2-Math.pow(2,-10*(e-1))),V4e={linear:un,easeIn:D4e,easeInOut:_V,easeOut:L4e,circIn:wV,circInOut:B4e,circOut:VA,backIn:UA,backInOut:z4e,backOut:CV,anticipate:j4e},k9=e=>{if(Array.isArray(e)){jA(e.length===4);const[t,n,r,i]=e;return Fm(t,n,r,i)}else if(typeof e=="string")return V4e[e];return e},GA=(e,t)=>n=>!!(Dm(n)&&j3e.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),EV=(e,t,n)=>r=>{if(!Dm(r))return r;const[i,o,a,s]=r.match(vS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},U4e=e=>Ol(0,255,e),Aw={...pc,transform:e=>Math.round(U4e(e))},$u={test:GA("rgb","red"),parse:EV("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Aw.transform(e)+", "+Aw.transform(t)+", "+Aw.transform(n)+", "+_p(bp.transform(r))+")"};function G4e(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const l3={test:GA("#"),parse:G4e,transform:$u.transform},md={test:GA("hsl","hue"),parse:EV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+va.transform(_p(t))+", "+va.transform(_p(n))+", "+_p(bp.transform(r))+")"},kr={test:e=>$u.test(e)||l3.test(e)||md.test(e),parse:e=>$u.test(e)?$u.parse(e):md.test(e)?md.parse(e):l3.parse(e),transform:e=>Dm(e)?e:e.hasOwnProperty("red")?$u.transform(e):md.transform(e)},Yt=(e,t,n)=>-n*e+n*t+e;function Tw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function H4e({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Tw(l,s,e+1/3),o=Tw(l,s,e),a=Tw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Pw=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},q4e=[l3,$u,md],W4e=e=>q4e.find(t=>t.test(e));function I9(e){const t=W4e(e);let n=t.parse(e);return t===md&&(n=H4e(n)),n}const AV=(e,t)=>{const n=I9(e),r=I9(t),i={...n};return o=>(i.red=Pw(n.red,r.red,o),i.green=Pw(n.green,r.green,o),i.blue=Pw(n.blue,r.blue,o),i.alpha=Yt(n.alpha,r.alpha,o),$u.transform(i))};function K4e(e){var t,n;return isNaN(e)&&Dm(e)&&(((t=e.match(vS))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Zj))===null||n===void 0?void 0:n.length)||0)>0}const TV={regex:B3e,countKey:"Vars",token:"${v}",parse:un},PV={regex:Zj,countKey:"Colors",token:"${c}",parse:kr.parse},kV={regex:vS,countKey:"Numbers",token:"${n}",parse:pc.parse};function kw(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function J1(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&kw(n,TV),kw(n,PV),kw(n,kV),n}function IV(e){return J1(e).values}function MV(e){const{values:t,numColors:n,numVars:r,tokenised:i}=J1(e),o=t.length;return a=>{let s=i;for(let l=0;ltypeof e=="number"?0:e;function Q4e(e){const t=IV(e);return MV(e)(t.map(X4e))}const $l={test:K4e,parse:IV,createTransformer:MV,getAnimatableNone:Q4e},RV=(e,t)=>n=>`${n>0?t:e}`;function OV(e,t){return typeof e=="number"?n=>Yt(e,t,n):kr.test(e)?AV(e,t):e.startsWith("var(")?RV(e,t):NV(e,t)}const $V=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>OV(o,t[a]));return o=>{for(let a=0;a{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=OV(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},NV=(e,t)=>{const n=$l.createTransformer(t),r=J1(e),i=J1(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?_l($V(r.values,i.values),n):RV(e,t)},zg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},M9=(e,t)=>n=>Yt(e,t,n);function Z4e(e){return typeof e=="number"?M9:typeof e=="string"?kr.test(e)?AV:NV:Array.isArray(e)?$V:typeof e=="object"?Y4e:M9}function J4e(e,t,n){const r=[],i=n||Z4e(e[0]),o=e.length-1;for(let a=0;at[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=J4e(t,r,i),s=a.length,l=u=>{let c=0;if(s>1)for(;cl(Ol(e[0],e[o-1],u)):l}function eEe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=zg(0,t,r);e.push(Yt(n,1,i))}}function tEe(e){const t=[0];return eEe(t,e.length-1),t}function nEe(e,t){return e.map(n=>n*t)}function rEe(e,t){return e.map(()=>t||_V).splice(0,e.length-1)}function eb({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=F4e(r)?r.map(k9):k9(r),o={done:!1,value:t[0]},a=nEe(n&&n.length===t.length?n:tEe(t),e),s=DV(a,t,{ease:Array.isArray(i)?i:rEe(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}function LV(e,t){return t?e*(1e3/t):0}const iEe=5;function FV(e,t,n){const r=Math.max(t-iEe,0);return LV(n-e(r),t-r)}const Iw=.001,oEe=.01,R9=10,aEe=.05,sEe=1;function lEe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;k4e(e<=Sl(R9));let a=1-t;a=Ol(aEe,sEe,a),e=Ol(oEe,R9,as(e)),a<1?(i=u=>{const c=u*a,d=c*e,f=c-n,h=u3(u,a),p=Math.exp(-d);return Iw-f/h*p},o=u=>{const d=u*a*e,f=d*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=u3(Math.pow(u,2),a);return(-i(u)+Iw>0?-1:1)*((f-h)*p)/m}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Iw+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=cEe(i,o,s);if(e=Sl(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const uEe=12;function cEe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function hEe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!O9(e,fEe)&&O9(e,dEe)){const n=lEe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function BV({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=hEe(r),h=c?-as(c):0,p=l/(2*Math.sqrt(s*u)),m=o-i,_=as(Math.sqrt(s/u)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let y;if(p<1){const g=u3(_,p);y=b=>{const S=Math.exp(-p*_*b);return o-S*((h+p*_*m)/g*Math.sin(g*b)+m*Math.cos(g*b))}}else if(p===1)y=g=>o-Math.exp(-_*g)*(m+(h+_*m)*g);else{const g=_*Math.sqrt(p*p-1);y=b=>{const S=Math.exp(-p*_*b),x=Math.min(g*b,300);return o-S*((h+p*_*m)*Math.sinh(x)+g*m*Math.cosh(x))/g}}return{calculatedDuration:f&&d||null,next:g=>{const b=y(g);if(f)a.done=g>=d;else{let S=h;g!==0&&(p<1?S=FV(y,g,b):S=0);const x=Math.abs(S)<=n,w=Math.abs(o-b)<=t;a.done=x&&w}return a.value=a.done?o:b,a}}}function $9({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=C=>s!==void 0&&Cl,p=C=>s===void 0?l:l===void 0||Math.abs(s-C)-m*Math.exp(-C/r),g=C=>v+y(C),b=C=>{const T=y(C),A=g(C);f.done=Math.abs(T)<=u,f.value=f.done?v:A};let S,x;const w=C=>{h(f.value)&&(S=C,x=BV({keyframes:[f.value,p(f.value)],velocity:FV(g,C,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return w(0),{calculatedDuration:null,next:C=>{let T=!1;return!x&&S===void 0&&(T=!0,b(C),w(C)),S!==void 0&&C>S?x.next(C-S):(!T&&b(C),f)}}}const pEe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Mt.update(t,!0),stop:()=>_s(t),now:()=>pr.isProcessing?pr.timestamp:performance.now()}},N9=2e4;function D9(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=N9?1/0:t}const gEe={decay:$9,inertia:$9,tween:eb,keyframes:eb,spring:BV};function tb({autoplay:e=!0,delay:t=0,driver:n=pEe,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let h=1,p=!1,m,_;const v=()=>{_=new Promise(z=>{m=z})};v();let y;const g=gEe[i]||eb;let b;g!==eb&&typeof r[0]!="number"&&(b=DV([0,100],r,{clamp:!1}),r=[0,100]);const S=g({...f,keyframes:r});let x;s==="mirror"&&(x=g({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let w="idle",C=null,T=null,A=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=D9(S));const{calculatedDuration:I}=S;let D=1/0,M=1/0;I!==null&&(D=I+a,M=D*(o+1)-a);let E=0;const P=z=>{if(T===null)return;h>0&&(T=Math.min(T,z)),h<0&&(T=Math.min(z-M/h,T)),C!==null?E=C:E=Math.round(z-T)*h;const V=E-t*(h>=0?1:-1),H=h>=0?V<0:V>M;E=Math.max(V,0),w==="finished"&&C===null&&(E=M);let Q=E,Z=S;if(o){const ee=E/D;let ne=Math.floor(ee),fe=ee%1;!fe&&ee>=1&&(fe=1),fe===1&&ne--,ne=Math.min(ne,o+1);const de=!!(ne%2);de&&(s==="reverse"?(fe=1-fe,a&&(fe-=a/D)):s==="mirror"&&(Z=x));let Be=Ol(0,1,fe);E>M&&(Be=s==="reverse"&&de?1:0),Q=Be*D}const J=H?{done:!1,value:r[0]}:Z.next(Q);b&&(J.value=b(J.value));let{done:j}=J;!H&&I!==null&&(j=h>=0?E>=M:E<=0);const X=C===null&&(w==="finished"||w==="running"&&j);return d&&d(J.value),X&&O(),J},N=()=>{y&&y.stop(),y=void 0},L=()=>{w="idle",N(),m(),v(),T=A=null},O=()=>{w="finished",c&&c(),N(),m()},R=()=>{if(p)return;y||(y=n(P));const z=y.now();l&&l(),C!==null?T=z-C:(!T||w==="finished")&&(T=z),w==="finished"&&v(),A=T,C=null,w="running",y.start()};e&&R();const $={then(z,V){return _.then(z,V)},get time(){return as(E)},set time(z){z=Sl(z),E=z,C!==null||!y||h===0?C=z:T=y.now()-z/h},get duration(){const z=S.calculatedDuration===null?D9(S):S.calculatedDuration;return as(z)},get speed(){return h},set speed(z){z===h||!y||(h=z,$.time=as(E))},get state(){return w},play:R,pause:()=>{w="paused",C=E},stop:()=>{p=!0,w!=="idle"&&(w="idle",u&&u(),L())},cancel:()=>{A!==null&&P(A),L()},complete:()=>{w="finished"},sample:z=>(T=0,P(z))};return $}function mEe(e){let t;return()=>(t===void 0&&(t=e()),t)}const yEe=mEe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vEe=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ty=10,bEe=2e4,_Ee=(e,t)=>t.type==="spring"||e==="backgroundColor"||!mV(t.ease);function SEe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(yEe()&&vEe.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let a=!1,s,l;const u=()=>{l=new Promise(y=>{s=y})};u();let{keyframes:c,duration:d=300,ease:f,times:h}=i;if(_Ee(t,i)){const y=tb({...i,repeat:0,delay:0});let g={done:!1,value:c[0]};const b=[];let S=0;for(;!g.done&&Sp.cancel(),_=()=>{Mt.update(m),s(),u()};return p.onfinish=()=>{e.set(R4e(c,i)),r&&r(),_()},{then(y,g){return l.then(y,g)},attachTimeline(y){return p.timeline=y,p.onfinish=null,un},get time(){return as(p.currentTime||0)},set time(y){p.currentTime=Sl(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return as(d)},play:()=>{a||(p.play(),_s(m))},pause:()=>p.pause(),stop:()=>{if(a=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const g=tb({...i,autoplay:!1});e.setWithVelocity(g.sample(y-ty).value,g.sample(y).value,ty)}_()},complete:()=>p.finish(),cancel:_}}function xEe({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:un,pause:un,stop:un,then:o=>(o(),Promise.resolve()),cancel:un,complete:un});return t?tb({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const wEe={type:"spring",stiffness:500,damping:25,restSpeed:10},CEe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),EEe={type:"keyframes",duration:.8},AEe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TEe=(e,{keyframes:t})=>t.length>2?EEe:hc.has(e)?e.startsWith("scale")?CEe(t[1]):wEe:AEe,c3=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($l.test(t)||t==="0")&&!t.startsWith("url(")),PEe=new Set(["brightness","contrast","saturate","opacity"]);function kEe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vS)||[];if(!r)return e;const i=n.replace(r,"");let o=PEe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const IEe=/([a-z-]*)\(.*?\)/g,d3={...$l,getAnimatableNone:e=>{const t=e.match(IEe);return t?t.map(kEe).join(" "):e}},MEe={...Jj,color:kr,backgroundColor:kr,outlineColor:kr,fill:kr,stroke:kr,borderColor:kr,borderTopColor:kr,borderRightColor:kr,borderBottomColor:kr,borderLeftColor:kr,filter:d3,WebkitFilter:d3},HA=e=>MEe[e];function zV(e,t){let n=HA(e);return n!==d3&&(n=$l),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jV=e=>/^0[^.\s]+$/.test(e);function REe(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||jV(e)}function OEe(e,t,n,r){const i=c3(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const a=r.from!==void 0?r.from:e.get();let s;const l=[];for(let u=0;ui=>{const o=VV(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Sl(a);const l=OEe(t,e,n,o),u=l[0],c=l[l.length-1],d=c3(e,u),f=c3(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-s,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if($Ee(o)||(h={...h,...TEe(e,h)}),h.duration&&(h.duration=Sl(h.duration)),h.repeatDelay&&(h.repeatDelay=Sl(h.repeatDelay)),!d||!f||I4e.current||o.type===!1)return xEe(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=SEe(t,e,h);if(p)return p}return tb(h)};function nb(e){return!!(oi(e)&&e.add)}const UV=e=>/^\-?\d*\.?\d+$/.test(e);function WA(e,t){e.indexOf(t)===-1&&e.push(t)}function KA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class XA{constructor(){this.subscriptions=[]}add(t){return WA(this.subscriptions,t),()=>KA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class DEe{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:a}=pr;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,Mt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Mt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=NEe(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new XA);const r=this.events[t].add(n);return t==="change"?()=>{r(),Mt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?LV(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wf(e,t){return new DEe(e,t)}const GV=e=>t=>t.test(e),LEe={test:e=>e==="auto",parse:e=>e},HV=[pc,Ie,va,js,U3e,V3e,LEe],bh=e=>HV.find(GV(e)),FEe=[...HV,kr,$l],BEe=e=>FEe.find(GV(e));function zEe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wf(n))}function jEe(e,t){const n=_S(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=r4e(o[a]);zEe(e,a,s)}}function VEe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(a)for(let s=0;sl.remove(d))),u.push(m)}return a&&Promise.all(u).then(()=>{a&&jEe(e,a)}),u}function f3(e,t,n={}){const r=_S(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(qV(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return qEe(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[o,a]:[a,o];return l().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function qEe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(WEe).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(f3(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function WEe(e,t){return e.sortNodePosition(t)}function KEe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>f3(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=f3(e,t,n);else{const i=typeof t=="function"?_S(e,t,n.custom):t;r=Promise.all(qV(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const XEe=[...IA].reverse(),QEe=IA.length;function YEe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>KEe(e,n,r)))}function ZEe(e){let t=YEe(e);const n=eAe();let r=!0;const i=(l,u)=>{const c=_S(e,u);if(c){const{transition:d,transitionEnd:f,...h}=c;l={...l,...h,...f}}return l};function o(l){t=l(e)}function a(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},m=1/0;for(let v=0;vm&&S;const A=Array.isArray(b)?b:[b];let I=A.reduce(i,{});x===!1&&(I={});const{prevResolvedValues:D={}}=g,M={...D,...I},E=P=>{T=!0,h.delete(P),g.needsAnimating[P]=!0};for(const P in M){const N=I[P],L=D[P];p.hasOwnProperty(P)||(N!==L?Z1(N)&&Z1(L)?!pV(N,L)||C?E(P):g.protectedKeys[P]=!0:N!==void 0?E(P):h.add(P):N!==void 0&&h.has(P)?E(P):g.protectedKeys[P]=!0)}g.prevProp=b,g.prevResolvedValues=I,g.isActive&&(p={...p,...I}),r&&e.blockInitialAnimation&&(T=!1),T&&!w&&f.push(...A.map(P=>({animation:P,options:{type:y,...l}})))}if(h.size){const v={};h.forEach(y=>{const g=e.getBaseTarget(y);g!==void 0&&(v[y]=g)}),f.push({animation:v})}let _=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(f):Promise.resolve()}function s(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=a(c,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function JEe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!pV(t,e):!1}function uu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function eAe(){return{animate:uu(!0),whileInView:uu(),whileHover:uu(),whileTap:uu(),whileDrag:uu(),whileFocus:uu(),exit:uu()}}class tAe extends Xl{constructor(t){super(t),t.animationState||(t.animationState=ZEe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),mS(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let nAe=0;class rAe extends Xl{constructor(){super(...arguments),this.id=nAe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const iAe={animation:{Feature:tAe},exit:{Feature:rAe}},L9=(e,t)=>Math.abs(e-t);function oAe(e,t){const n=L9(e.x,t.x),r=L9(e.y,t.y);return Math.sqrt(n**2+r**2)}class WV{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Rw(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=oAe(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:h}=pr;this.history.push({...f,timestamp:h});const{onStart:p,onMove:m}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Mw(c,this.transformPagePoint),Mt.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=Rw(u.type==="pointercancel"?this.lastMoveEventInfo:Mw(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!uV(t))return;this.handlers=n,this.transformPagePoint=r;const i=bS(t),o=Mw(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=pr;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rw(o,this.history)),this.removeListeners=_l(os(window,"pointermove",this.handlePointerMove),os(window,"pointerup",this.handlePointerUp),os(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_s(this.updatePoint)}}function Mw(e,t){return t?{point:t(e.point)}:e}function F9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rw({point:e},t){return{point:e,delta:F9(e,KV(t)),offset:F9(e,aAe(t)),velocity:sAe(t,.1)}}function aAe(e){return e[0]}function KV(e){return e[e.length-1]}function sAe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=KV(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Sl(t)));)n--;if(!r)return{x:0,y:0};const o=as(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ci(e){return e.max-e.min}function h3(e,t=0,n=.01){return Math.abs(e-t)<=n}function B9(e,t,n,r=.5){e.origin=r,e.originPoint=Yt(t.min,t.max,e.origin),e.scale=Ci(n)/Ci(t),(h3(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Yt(n.min,n.max,e.origin)-e.originPoint,(h3(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Sp(e,t,n,r){B9(e.x,t.x,n.x,r?r.originX:void 0),B9(e.y,t.y,n.y,r?r.originY:void 0)}function z9(e,t,n){e.min=n.min+t.min,e.max=e.min+Ci(t)}function lAe(e,t,n){z9(e.x,t.x,n.x),z9(e.y,t.y,n.y)}function j9(e,t,n){e.min=t.min-n.min,e.max=e.min+Ci(t)}function xp(e,t,n){j9(e.x,t.x,n.x),j9(e.y,t.y,n.y)}function uAe(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Yt(n,e,r.max):Math.min(e,n)),e}function V9(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cAe(e,{top:t,left:n,bottom:r,right:i}){return{x:V9(e.x,n,i),y:V9(e.y,t,r)}}function U9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=zg(t.min,t.max-r,e.min):r>i&&(n=zg(e.min,e.max-i,t.min)),Ol(0,1,n)}function hAe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const p3=.35;function pAe(e=p3){return e===!1?e=0:e===!0&&(e=p3),{x:G9(e,"left","right"),y:G9(e,"top","bottom")}}function G9(e,t,n){return{min:H9(e,t),max:H9(e,n)}}function H9(e,t){return typeof e=="number"?e:e[t]||0}const q9=()=>({translate:0,scale:1,origin:0,originPoint:0}),yd=()=>({x:q9(),y:q9()}),W9=()=>({min:0,max:0}),Sn=()=>({x:W9(),y:W9()});function Ko(e){return[e("x"),e("y")]}function XV({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gAe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mAe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ow(e){return e===void 0||e===1}function g3({scale:e,scaleX:t,scaleY:n}){return!Ow(e)||!Ow(t)||!Ow(n)}function vu(e){return g3(e)||QV(e)||e.z||e.rotate||e.rotateX||e.rotateY}function QV(e){return K9(e.x)||K9(e.y)}function K9(e){return e&&e!=="0%"}function rb(e,t,n){const r=e-n,i=t*r;return n+i}function X9(e,t,n,r,i){return i!==void 0&&(e=rb(e,i,r)),rb(e,n,r)+t}function m3(e,t=0,n=1,r,i){e.min=X9(e.min,t,n,r,i),e.max=X9(e.max,t,n,r,i)}function YV(e,{x:t,y:n}){m3(e.x,t.translate,t.scale,t.originPoint),m3(e.y,n.translate,n.scale,n.originPoint)}function yAe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Ks(e,t){e.min=e.min+t,e.max=e.max+t}function Y9(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Yt(e.min,e.max,o);m3(e,t[n],t[r],a,t.scale)}const vAe=["x","scaleX","originX"],bAe=["y","scaleY","originY"];function vd(e,t){Y9(e.x,t,vAe),Y9(e.y,t,bAe)}function ZV(e,t){return XV(mAe(e.getBoundingClientRect(),t))}function _Ae(e,t,n){const r=ZV(e,n),{scroll:i}=t;return i&&(Ks(r.x,i.offset.x),Ks(r.y,i.offset.y)),r}const SAe=new WeakMap;class xAe{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Sn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(bS(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=dV(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ko(p=>{let m=this.getAxisMotionValue(p).get()||0;if(va.test(m)){const{projection:_}=this.visualElement;if(_&&_.layout){const v=_.layout.layoutBox[p];v&&(m=Ci(v)*(parseFloat(m)/100))}}this.originPoint[p]=m}),f&&Mt.update(()=>f(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(d&&this.currentDirection===null){this.currentDirection=wAe(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new WV(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Mt.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ny(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=uAe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&gd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cAe(r.layoutBox,t):this.constraints=!1,this.elastic=pAe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ko(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=hAe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gd(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=_Ae(r,i.root,this.visualElement.getTransformPagePoint());let a=dAe(i.layout.layoutBox,o);if(n){const s=n(gAe(a));this.hasMutatedConstraints=!!s,s&&(a=XV(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Ko(c=>{if(!ny(c,n,this.currentDirection))return;let d=l&&l[c]||{};a&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(qA(t,r,0,n))}stopAnimation(){Ko(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ko(n=>{const{drag:r}=this.getProps();if(!ny(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Yt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gd(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ko(a=>{const s=this.getAxisMotionValue(a);if(s){const l=s.get();i[a]=fAe({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ko(a=>{if(!ny(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Yt(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;SAe.set(this.visualElement,this);const t=this.visualElement.current,n=os(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();gd(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const a=es(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ko(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=p3,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function ny(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wAe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class CAe extends Xl{constructor(t){super(t),this.removeGroupControls=un,this.removeListeners=un,this.controls=new xAe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||un}unmount(){this.removeGroupControls(),this.removeListeners()}}const Z9=e=>(t,n)=>{e&&Mt.update(()=>e(t,n))};class EAe extends Xl{constructor(){super(...arguments),this.removePointerDownListener=un}onPointerDown(t){this.session=new WV(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Z9(t),onStart:Z9(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Mt.update(()=>i(o,a))}}}mount(){this.removePointerDownListener=os(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function AAe(){const e=k.useContext($m);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=k.useId();return k.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function TAe(){return PAe(k.useContext($m))}function PAe(e){return e===null?!0:e.isPresent}const cv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function J9(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _h={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ie.test(e))e=parseFloat(e);else return e;const n=J9(e,t.target.x),r=J9(e,t.target.y);return`${n}% ${r}%`}},kAe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=$l.parse(e);if(i.length>5)return r;const o=$l.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Yt(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}};class IAe extends bt.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;N3e(MAe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),cv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Mt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function JV(e){const[t,n]=AAe(),r=k.useContext(RA);return bt.createElement(IAe,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(Kj),isPresent:t,safeToRemove:n})}const MAe={borderRadius:{..._h,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_h,borderTopRightRadius:_h,borderBottomLeftRadius:_h,borderBottomRightRadius:_h,boxShadow:kAe},eU=["TopLeft","TopRight","BottomLeft","BottomRight"],RAe=eU.length,eM=e=>typeof e=="string"?parseFloat(e):e,tM=e=>typeof e=="number"||Ie.test(e);function OAe(e,t,n,r,i,o){i?(e.opacity=Yt(0,n.opacity!==void 0?n.opacity:1,$Ae(r)),e.opacityExit=Yt(t.opacity!==void 0?t.opacity:1,0,NAe(r))):o&&(e.opacity=Yt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(zg(e,t,r))}function rM(e,t){e.min=t.min,e.max=t.max}function Ni(e,t){rM(e.x,t.x),rM(e.y,t.y)}function iM(e,t,n,r,i){return e-=t,e=rb(e,1/n,r),i!==void 0&&(e=rb(e,1/i,r)),e}function DAe(e,t=0,n=1,r=.5,i,o=e,a=e){if(va.test(t)&&(t=parseFloat(t),t=Yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Yt(o.min,o.max,r);e===o&&(s-=t),e.min=iM(e.min,t,n,s,i),e.max=iM(e.max,t,n,s,i)}function oM(e,t,[n,r,i],o,a){DAe(e,t[n],t[r],t[i],t.scale,o,a)}const LAe=["x","scaleX","originX"],FAe=["y","scaleY","originY"];function aM(e,t,n,r){oM(e.x,t,LAe,n?n.x:void 0,r?r.x:void 0),oM(e.y,t,FAe,n?n.y:void 0,r?r.y:void 0)}function sM(e){return e.translate===0&&e.scale===1}function nU(e){return sM(e.x)&&sM(e.y)}function BAe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rU(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function lM(e){return Ci(e.x)/Ci(e.y)}class zAe{constructor(){this.members=[]}add(t){WA(this.members,t),t.scheduleRender()}remove(t){if(KA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uM(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const jAe=(e,t)=>e.depth-t.depth;class VAe{constructor(){this.children=[],this.isDirty=!1}add(t){WA(this.children,t),this.isDirty=!0}remove(t){KA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jAe),this.isDirty=!1,this.children.forEach(t)}}function UAe(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(_s(r),e(o-t))};return Mt.read(r,!0),()=>_s(r)}function GAe(e){window.MotionDebug&&window.MotionDebug.record(e)}function HAe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function qAe(e,t,n){const r=oi(e)?e:wf(e);return r.start(qA("",r,t,n)),r.animation}const cM=["","X","Y","Z"],dM=1e3;let WAe=0;const bu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function iU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=WAe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{bu.totalNodes=bu.resolvedTargetDeltas=bu.recalculatedProjection=0,this.nodes.forEach(QAe),this.nodes.forEach(tTe),this.nodes.forEach(nTe),this.nodes.forEach(YAe),GAe(bu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=UAe(f,250),cv.hasAnimatedSinceResize&&(cv.hasAnimatedSinceResize=!1,this.nodes.forEach(hM))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||sTe,{onLayoutAnimationStart:_,onLayoutAnimationComplete:v}=c.getProps(),y=!this.targetLayout||!rU(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const b={...VV(m,"layout"),onPlay:_,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||hM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_s(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rTe),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(ZAe),this.sharedNodes.forEach(iTe)}scheduleUpdateProjection(){Mt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=b/1e3;pM(d.x,a.x,S),pM(d.y,a.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xp(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oTe(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&BAe(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=Sn()),Ni(g,this.relativeTarget)),m&&(this.animationValues=c,OAe(c,u,this.latestValues,S,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_s(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mt.update(()=>{cv.hasAnimatedSinceResize=!0,this.currentAnimation=qAe(0,dM,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&oU(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Sn();const d=Ci(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=Ci(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Ni(s,l),vd(s,c),Sp(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new zAe),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(fM),this.root.sharedNodes.clear()}}}function KAe(e){e.updateLayout()}function XAe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?Ko(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ci(f);f.min=r[d].min,f.max=f.min+h}):oU(o,n.layoutBox,r)&&Ko(d=>{const f=a?n.measuredBox[d]:n.layoutBox[d],h=Ci(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=yd();Sp(s,r,n.layoutBox);const l=yd();a?Sp(l,e.applyTransform(i,!0),n.measuredBox):Sp(l,r,n.layoutBox);const u=!nU(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=Sn();xp(p,n.layoutBox,f.layoutBox);const m=Sn();xp(m,r,h.layoutBox),rU(p,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function QAe(e){bu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function YAe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZAe(e){e.clearSnapshot()}function fM(e){e.clearMeasurements()}function JAe(e){e.isLayoutDirty=!1}function eTe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tTe(e){e.resolveTargetDelta()}function nTe(e){e.calcProjection()}function rTe(e){e.resetRotation()}function iTe(e){e.removeLeadSnapshot()}function pM(e,t,n){e.translate=Yt(t.translate,0,n),e.scale=Yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gM(e,t,n,r){e.min=Yt(t.min,n.min,r),e.max=Yt(t.max,n.max,r)}function oTe(e,t,n,r){gM(e.x,t.x,n.x,r),gM(e.y,t.y,n.y,r)}function aTe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sTe={duration:.45,ease:[.4,0,.1,1]},mM=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),yM=mM("applewebkit/")&&!mM("chrome/")?Math.round:un;function vM(e){e.min=yM(e.min),e.max=yM(e.max)}function lTe(e){vM(e.x),vM(e.y)}function oU(e,t,n){return e==="position"||e==="preserve-aspect"&&!h3(lM(t),lM(n),.2)}const uTe=iU({attachResizeListener:(e,t)=>es(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$w={current:void 0},aU=iU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$w.current){const e=new uTe({});e.mount(window),e.setOptions({layoutScroll:!0}),$w.current=e}return $w.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cTe={pan:{Feature:EAe},drag:{Feature:CAe,ProjectionNode:aU,MeasureLayout:JV}},dTe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fTe(e){const t=dTe.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function y3(e,t,n=1){const[r,i]=fTe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return UV(a)?parseFloat(a):a}else return a3(i)?y3(i,t,n+1):i}function hTe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!a3(o))return;const a=y3(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!a3(o))continue;const a=y3(o,r);a&&(t[i]=a,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const pTe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sU=e=>pTe.has(e),gTe=e=>Object.keys(e).some(sU),bM=e=>e===pc||e===Ie,_M=(e,t)=>parseFloat(e.split(", ")[t]),SM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return _M(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?_M(o[1],e):0}},mTe=new Set(["x","y","z"]),yTe=Nm.filter(e=>!mTe.has(e));function vTe(e){const t=[];return yTe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Cf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:SM(4,13),y:SM(5,14)};Cf.translateX=Cf.x;Cf.translateY=Cf.y;const bTe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=Cf[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=Cf[u](l,o)}),e},_Te=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(sU);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=bh(c);const f=t[l];let h;if(Z1(f)){const p=f.length,m=f[0]===null?1:0;c=f[m],d=bh(c);for(let _=m;_=0?window.pageYOffset:null,u=bTe(t,e,s);return o.length&&o.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),gS&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function STe(e,t,n,r){return gTe(t)?_Te(e,t,n,r):{target:t,transitionEnd:r}}const xTe=(e,t,n,r)=>{const i=hTe(e,t,r);return t=i.target,r=i.transitionEnd,STe(e,t,n,r)},v3={current:null},lU={current:!1};function wTe(){if(lU.current=!0,!!gS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>v3.current=e.matches;e.addListener(t),t()}else v3.current=!1}function CTe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(oi(o))e.addValue(i,o),nb(r)&&r.add(i);else if(oi(a))e.addValue(i,wf(o,{owner:e})),nb(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,wf(s!==void 0?s:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const xM=new WeakMap,uU=Object.keys(Bg),ETe=uU.length,wM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ATe=MA.length;class TTe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Mt.render(this.render,!1,!0);const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.isControllingVariants=yS(n),this.isVariantNode=Wj(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];s[d]!==void 0&&oi(f)&&(f.set(s[d],!1),nb(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,xM.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),lU.current||wTe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:v3.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xM.delete(this.current),this.projection&&this.projection.unmount(),_s(this.notifyUpdate),_s(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=hc.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Mt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let a,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Sn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wf(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=zA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!oi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new XA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class cU extends TTe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=GEe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){VEe(this,r,a);const s=xTe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function PTe(e){return window.getComputedStyle(e)}class kTe extends cU{readValueFromInstance(t,n){if(hc.has(n)){const r=HA(n);return r&&r.default||0}else{const r=PTe(t),i=(Yj(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ZV(t,n)}build(t,n,r,i){$A(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return BA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;oi(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){rV(t,n,r,i)}}class ITe extends cU{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hc.has(n)){const r=HA(n);return r&&r.default||0}return n=iV.has(n)?n:FA(n),t.getAttribute(n)}measureInstanceViewportBox(){return Sn()}scrapeMotionValuesFromProps(t,n){return aV(t,n)}build(t,n,r,i){DA(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){oV(t,n,r,i)}mount(t){this.isSVGTag=LA(t.tagName),super.mount(t)}}const MTe=(e,t)=>OA(e)?new ITe(t,{enableHardwareAcceleration:!1}):new kTe(t,{enableHardwareAcceleration:!0}),RTe={layout:{ProjectionNode:aU,MeasureLayout:JV}},OTe={...iAe,...C4e,...cTe,...RTe},dU=O3e((e,t)=>d4e(e,t,OTe,MTe));function fU(){const e=k.useRef(!1);return kA(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function $Te(){const e=fU(),[t,n]=k.useState(0),r=k.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.useCallback(()=>Mt.postRender(r),[r]),t]}class NTe extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function DTe({children:e,isPresent:t}){const n=k.useId(),r=k.useRef(null),i=k.useRef({width:0,height:0,top:0,left:0});return k.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),k.createElement(NTe,{isPresent:t,childRef:r,sizeRef:i},k.cloneElement(e,{ref:r}))}const Nw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=sV(LTe),l=k.useId(),u=k.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c=>{s.set(c,!0);for(const d of s.values())if(!d)return;r&&r()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?void 0:[n]);return k.useMemo(()=>{s.forEach((c,d)=>s.set(d,!1))},[n]),k.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=k.createElement(DTe,{isPresent:n},e)),k.createElement($m.Provider,{value:u},e)};function LTe(){return new Map}function FTe(e){return k.useEffect(()=>()=>e(),[])}const Wc=e=>e.key||"";function BTe(e,t){e.forEach(n=>{const r=Wc(n);t.set(r,n)})}function zTe(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const hU=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=k.useContext(RA).forceRender||$Te()[0],l=fU(),u=zTe(e);let c=u;const d=k.useRef(new Map).current,f=k.useRef(c),h=k.useRef(new Map).current,p=k.useRef(!0);if(kA(()=>{p.current=!1,BTe(u,h),f.current=c}),FTe(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return k.createElement(k.Fragment,null,c.map(y=>k.createElement(Nw,{key:Wc(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},y)));c=[...c];const m=f.current.map(Wc),_=u.map(Wc),v=m.length;for(let y=0;y{if(_.indexOf(g)!==-1)return;const b=h.get(g);if(!b)return;const S=m.indexOf(g);let x=y;if(!x){const w=()=>{h.delete(g),d.delete(g);const C=f.current.findIndex(T=>T.key===g);if(f.current.splice(C,1),!d.size){if(f.current=u,l.current===!1)return;s(),r&&r()}};x=k.createElement(Nw,{key:Wc(b),isPresent:!1,onExitComplete:w,custom:t,presenceAffectsLayout:o,mode:a},b),d.set(g,x)}c.splice(S,0,x)}),c=c.map(y=>{const g=y.key;return d.has(g)?y:k.createElement(Nw,{key:Wc(y),isPresent:!0,presenceAffectsLayout:o,mode:a},y)}),k.createElement(k.Fragment,null,d.size?c:c.map(y=>k.cloneElement(y)))};var jTe={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},pU=k.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=jTe,toastSpacing:c="0.5rem"}=e,[d,f]=k.useState(s),h=TAe();_9(()=>{h||r==null||r()},[h]),_9(()=>{f(s)},[s]);const p=()=>f(null),m=()=>f(s),_=()=>{h&&i()};k.useEffect(()=>{h&&o&&i()},[h,o,i]),C3e(_,d);const v=k.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),y=k.useMemo(()=>S3e(a),[a]);return q.jsx(dU.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:m,custom:{position:a},style:y,children:q.jsx(sr.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v,children:la(n,{id:t,onClose:_})})})});pU.displayName="ToastComponent";function VTe(e,t){var n;const r=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var CM={path:q.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[q.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),q.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),q.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Bm=Pi((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,c=Kl("chakra-icon",s),d=Om("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...d},h={ref:t,focusable:o,className:c,__css:f},p=r??CM.viewBox;if(n&&typeof n!="string")return q.jsx(sr.svg,{as:n,...h,...u});const m=a??CM.path;return q.jsx(sr.svg,{verticalAlign:"middle",viewBox:p,...h,...u,children:m})});Bm.displayName="Icon";function UTe(e){return q.jsx(Bm,{viewBox:"0 0 24 24",...e,children:q.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function GTe(e){return q.jsx(Bm,{viewBox:"0 0 24 24",...e,children:q.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function EM(e){return q.jsx(Bm,{viewBox:"0 0 24 24",...e,children:q.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var HTe=obe({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),QA=Pi((e,t)=>{const n=Om("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Mm(e),u=Kl("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${HTe} ${o} linear infinite`,...n};return q.jsx(sr.div,{ref:t,__css:c,className:u,...l,children:r&&q.jsx(sr.span,{srOnly:!0,children:r})})});QA.displayName="Spinner";var[qTe,YA]=Im({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[WTe,ZA]=Im({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),gU={info:{icon:GTe,colorScheme:"blue"},warning:{icon:EM,colorScheme:"orange"},success:{icon:UTe,colorScheme:"green"},error:{icon:EM,colorScheme:"red"},loading:{icon:QA,colorScheme:"blue"}};function KTe(e){return gU[e].colorScheme}function XTe(e){return gU[e].icon}var mU=Pi(function(t,n){const r=ZA(),{status:i}=YA(),o={display:"inline",...r.description};return q.jsx(sr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__desc",t.className),__css:o})});mU.displayName="AlertDescription";function yU(e){const{status:t}=YA(),n=XTe(t),r=ZA(),i=t==="loading"?r.spinner:r.icon;return q.jsx(sr.span,{display:"inherit","data-status":t,...e,className:Kl("chakra-alert__icon",e.className),__css:i,children:e.children||q.jsx(n,{h:"100%",w:"100%"})})}yU.displayName="AlertIcon";var vU=Pi(function(t,n){const r=ZA(),{status:i}=YA();return q.jsx(sr.div,{ref:n,"data-status":i,...t,className:Kl("chakra-alert__title",t.className),__css:r.title})});vU.displayName="AlertTitle";var bU=Pi(function(t,n){var r;const{status:i="info",addRole:o=!0,...a}=Mm(t),s=(r=t.colorScheme)!=null?r:KTe(i),l=t3e("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return q.jsx(qTe,{value:{status:i},children:q.jsx(WTe,{value:l,children:q.jsx(sr.div,{"data-status":i,role:o?"alert":void 0,ref:n,...a,className:Kl("chakra-alert",t.className),__css:u})})})});bU.displayName="Alert";function QTe(e){return q.jsx(Bm,{focusable:"false","aria-hidden":!0,...e,children:q.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var _U=Pi(function(t,n){const r=Om("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Mm(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return q.jsx(sr.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s,children:i||q.jsx(QTe,{width:"1em",height:"1em"})})});_U.displayName="CloseButton";var YTe={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ra=ZTe(YTe);function ZTe(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=JTe(i,o),{position:s,id:l}=a;return r(u=>{var c,d;const h=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(d=u[s])!=null?d:[],a];return{...u,[s]:h}}),l},update:(i,o)=>{i&&r(a=>{const s={...a},{position:l,index:u}=b9(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:SU(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=Gj(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>!!b9(ra.getState(),i).position}}var AM=0;function JTe(e,t={}){var n,r;AM+=1;const i=(n=t.id)!=null?n:AM,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ra.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var ePe=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return q.jsxs(bU,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[q.jsx(yU,{children:u}),q.jsxs(sr.div,{flex:"1",maxWidth:"100%",children:[i&&q.jsx(vU,{id:c==null?void 0:c.title,children:i}),s&&q.jsx(mU,{id:c==null?void 0:c.description,display:"block",children:s})]}),o&&q.jsx(_U,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function SU(e={}){const{render:t,toastComponent:n=ePe}=e;return i=>typeof t=="function"?t({...i,...e}):q.jsx(n,{...i,...e})}function xU(e,t){const n=i=>{var o;return{...t,...i,position:VTe((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=SU(o);return ra.notify(a,o)};return r.update=(i,o)=>{ra.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...la(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...la(o.error,s)}))},r.closeAll=ra.closeAll,r.close=ra.close,r.isActive=ra.isActive,r}var[SUe,tPe]=Im({name:"ToastOptionsContext",strict:!1}),nPe=e=>{const t=k.useSyncExternalStore(ra.subscribe,ra.getState,ra.getState),{motionVariants:n,component:r=pU,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return q.jsx("div",{role:"region","aria-live":"polite","aria-label":"Notifications",id:`chakra-toast-manager-${s}`,style:x3e(s),children:q.jsx(hU,{initial:!1,children:l.map(u=>q.jsx(r,{motionVariants:n,...u},u.id))})},s)});return q.jsx(lS,{...i,children:a})};function rPe(e){const{theme:t}=oj(),n=tPe();return k.useMemo(()=>xU(t.direction,{...n,...e}),[e,t.direction,n])}var iPe={duration:5e3,variant:"solid"},Bc={theme:G5e,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:iPe,forced:!1};function oPe({theme:e=Bc.theme,colorMode:t=Bc.colorMode,toggleColorMode:n=Bc.toggleColorMode,setColorMode:r=Bc.setColorMode,defaultOptions:i=Bc.defaultOptions,motionVariants:o,toastSpacing:a,component:s,forced:l}=Bc){const u={colorMode:t,setColorMode:r,toggleColorMode:n,forced:l};return{ToastContainer:()=>q.jsx(v3e,{theme:e,children:q.jsx(_A.Provider,{value:u,children:q.jsx(nPe,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:s})})}),toast:xU(e.direction,i)}}var b3=Pi(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return q.jsx("img",{width:r,height:i,ref:n,alt:o,...a})});b3.displayName="NativeImage";function aPe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,c]=k.useState("pending");k.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=k.useRef(),f=k.useCallback(()=>{if(!n)return;h();const p=new Image;p.src=n,a&&(p.crossOrigin=a),r&&(p.srcset=r),s&&(p.sizes=s),t&&(p.loading=t),p.onload=m=>{h(),c("loaded"),i==null||i(m)},p.onerror=m=>{h(),c("failed"),o==null||o(m)},d.current=p},[n,a,r,s,i,o,t]),h=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return U1(()=>{if(!l)return u==="loading"&&f(),()=>{h()}},[u,f,l]),l?"loaded":u}var sPe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function lPe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var JA=Pi(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:h,...p}=t,m=r!==void 0||i!==void 0,_=u!=null||c||!m,v=aPe({...t,crossOrigin:d,ignoreFallback:_}),y=sPe(v,f),g={ref:n,objectFit:l,objectPosition:s,..._?p:lPe(p,["onError","onLoad"])};return y?i||q.jsx(sr.img,{as:b3,className:"chakra-image__placeholder",src:r,...g}):q.jsx(sr.img,{as:b3,src:o,srcSet:a,crossOrigin:d,loading:u,referrerPolicy:h,className:"chakra-image",...g})});JA.displayName="Image";var wU=Pi(function(t,n){const r=Om("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Mm(t),u=a3e({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return q.jsx(sr.p,{ref:n,className:Kl("chakra-text",t.className),...u,...l,__css:r})});wU.displayName="Text";var _3=Pi(function(t,n){const r=Om("Heading",t),{className:i,...o}=Mm(t);return q.jsx(sr.h2,{ref:n,className:Kl("chakra-heading",t.className),...o,__css:r})});_3.displayName="Heading";var ib=sr("div");ib.displayName="Box";var CU=Pi(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return q.jsx(ib,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});CU.displayName="Square";var uPe=Pi(function(t,n){const{size:r,...i}=t;return q.jsx(CU,{size:r,ref:n,borderRadius:"9999px",...i})});uPe.displayName="Circle";var eT=Pi(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return q.jsx(sr.div,{ref:n,__css:d,...c})});eT.displayName="Flex";const ft=e=>{try{return JSON.parse(JSON.stringify(e))}catch{return"Error parsing object"}},cPe=F.object({status:F.literal(422),data:F.object({detail:F.array(F.object({loc:F.array(F.string()),msg:F.string(),type:F.string()}))})});function Ur(e,t,n=!1){e=String(e),t=String(t);const r=Array.from({length:21},(a,s)=>s*50),i=[0,5,10,15,20,25,30,35,40,45,50,55,59,64,68,73,77,82,86,95,100];return r.reduce((a,s,l)=>{const u=n?i[l]/100:1,c=n?50:i[r.length-1-l];return a[s]=`hsl(${e} ${t}% ${c}% / ${u})`,a},{})}const ry={H:220,S:16},iy={H:250,S:42},oy={H:47,S:42},ay={H:40,S:70},sy={H:28,S:42},ly={H:113,S:42},uy={H:0,S:42},dPe={base:Ur(ry.H,ry.S),baseAlpha:Ur(ry.H,ry.S,!0),accent:Ur(iy.H,iy.S),accentAlpha:Ur(iy.H,iy.S,!0),working:Ur(oy.H,oy.S),workingAlpha:Ur(oy.H,oy.S,!0),gold:Ur(ay.H,ay.S),goldAlpha:Ur(ay.H,ay.S,!0),warning:Ur(sy.H,sy.S),warningAlpha:Ur(sy.H,sy.S,!0),ok:Ur(ly.H,ly.S),okAlpha:Ur(ly.H,ly.S,!0),error:Ur(uy.H,uy.S),errorAlpha:Ur(uy.H,uy.S,!0)},{definePartsStyle:fPe,defineMultiStyleConfig:hPe}=ze(mj.keys),pPe={border:"none"},gPe=e=>{const{colorScheme:t}=e;return{fontWeight:"600",fontSize:"sm",border:"none",borderRadius:"base",bg:W(`${t}.200`,`${t}.700`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.250`,`${t}.650`)(e)},_expanded:{bg:W(`${t}.250`,`${t}.650`)(e),borderBottomRadius:"none",_hover:{bg:W(`${t}.300`,`${t}.600`)(e)}}}},mPe=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.100`,`${t}.800`)(e),borderRadius:"base",borderTopRadius:"none"}},yPe={},vPe=fPe(e=>({container:pPe,button:gPe(e),panel:mPe(e),icon:yPe})),bPe=hPe({variants:{invokeAI:vPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}}),_Pe=e=>{const{colorScheme:t}=e;if(t==="base"){const r={bg:W("base.150","base.700")(e),color:W("base.300","base.500")(e),svg:{fill:W("base.300","base.500")(e)},opacity:1},i={bg:"none",color:W("base.300","base.500")(e),svg:{fill:W("base.500","base.500")(e)},opacity:1};return{bg:W("base.250","base.600")(e),color:W("base.850","base.100")(e),borderRadius:"base",svg:{fill:W("base.850","base.100")(e)},_hover:{bg:W("base.300","base.500")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.900","base.50")(e)},_disabled:r},_disabled:r,'&[data-progress="true"]':{...i,_hover:i}}}const n={bg:W(`${t}.400`,`${t}.700`)(e),color:W(`${t}.600`,`${t}.500`)(e),svg:{fill:W(`${t}.600`,`${t}.500`)(e),filter:"unset"},opacity:.7,filter:"saturate(65%)"};return{bg:W(`${t}.400`,`${t}.600`)(e),color:W("base.50","base.100")(e),borderRadius:"base",svg:{fill:W("base.50","base.100")(e)},_disabled:n,_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)},_disabled:n}}},SPe=e=>{const{colorScheme:t}=e,n=W("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",_hover:{bg:W(`${t}.500`,`${t}.500`)(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}},".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"}}},xPe={variants:{invokeAI:_Pe,invokeAIOutline:SPe},defaultProps:{variant:"invokeAI",colorScheme:"base"}},{definePartsStyle:wPe,defineMultiStyleConfig:CPe}=ze(yj.keys),EPe=e=>{const{colorScheme:t}=e;return{bg:W("base.200","base.700")(e),borderColor:W("base.300","base.600")(e),color:W("base.900","base.100")(e),_checked:{bg:W(`${t}.300`,`${t}.500`)(e),borderColor:W(`${t}.300`,`${t}.500`)(e),color:W(`${t}.900`,`${t}.100`)(e),_hover:{bg:W(`${t}.400`,`${t}.500`)(e),borderColor:W(`${t}.400`,`${t}.500`)(e)},_disabled:{borderColor:"transparent",bg:"whiteAlpha.300",color:"whiteAlpha.500"}},_indeterminate:{bg:W(`${t}.300`,`${t}.600`)(e),borderColor:W(`${t}.300`,`${t}.600`)(e),color:W(`${t}.900`,`${t}.100`)(e)},_disabled:{bg:"whiteAlpha.100",borderColor:"transparent"},_focusVisible:{boxShadow:"none",outline:"none"},_invalid:{borderColor:W("error.600","error.300")(e)}}},APe=wPe(e=>({control:EPe(e)})),TPe=CPe({variants:{invokeAI:APe},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{definePartsStyle:PPe,defineMultiStyleConfig:kPe}=ze(vj.keys),IPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},MPe=e=>({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6},"::selection":{color:W("accent.900","accent.50")(e),bg:W("accent.200","accent.400")(e)}}),RPe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},OPe=PPe(e=>({preview:IPe,input:MPe(e),textarea:RPe})),$Pe=kPe({variants:{invokeAI:OPe},defaultProps:{size:"sm",variant:"invokeAI"}}),NPe=e=>({fontSize:"sm",marginEnd:0,mb:1,fontWeight:"400",transitionProperty:"common",transitionDuration:"normal",whiteSpace:"nowrap",_disabled:{opacity:.4},color:W("base.700","base.300")(e),_invalid:{color:W("error.500","error.300")(e)}}),DPe={variants:{invokeAI:NPe},defaultProps:{variant:"invokeAI"}},SS=e=>({outline:"none",borderWidth:2,borderStyle:"solid",borderColor:W("base.200","base.800")(e),bg:W("base.50","base.900")(e),borderRadius:"base",color:W("base.900","base.100")(e),boxShadow:"none",_hover:{borderColor:W("base.300","base.600")(e)},_focus:{borderColor:W("accent.200","accent.600")(e),boxShadow:"none",_hover:{borderColor:W("accent.300","accent.500")(e)}},_invalid:{borderColor:W("error.300","error.600")(e),boxShadow:"none",_hover:{borderColor:W("error.400","error.500")(e)}},_disabled:{borderColor:W("base.300","base.700")(e),bg:W("base.300","base.700")(e),color:W("base.600","base.400")(e),_hover:{borderColor:W("base.300","base.700")(e)}},_placeholder:{color:W("base.700","base.400")(e)},"::selection":{bg:W("accent.200","accent.400")(e)}}),{definePartsStyle:LPe,defineMultiStyleConfig:FPe}=ze(bj.keys),BPe=LPe(e=>({field:SS(e)})),zPe=FPe({variants:{invokeAI:BPe},defaultProps:{size:"sm",variant:"invokeAI"}}),{definePartsStyle:jPe,defineMultiStyleConfig:VPe}=ze(_j.keys),UPe=jPe(e=>({button:{fontWeight:500,bg:W("base.300","base.500")(e),color:W("base.900","base.100")(e),_hover:{bg:W("base.400","base.600")(e),color:W("base.900","base.50")(e),fontWeight:600}},list:{zIndex:9999,color:W("base.900","base.150")(e),bg:W("base.200","base.800")(e),shadow:"dark-lg",border:"none"},item:{fontSize:"sm",bg:W("base.200","base.800")(e),_hover:{bg:W("base.300","base.700")(e),svg:{opacity:1}},_focus:{bg:W("base.400","base.600")(e)},svg:{opacity:.7,fontSize:14}}})),GPe=VPe({variants:{invokeAI:UPe},defaultProps:{variant:"invokeAI"}}),xUe={variants:{enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.07,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.07,easings:"easeOut"}}}},{defineMultiStyleConfig:HPe,definePartsStyle:qPe}=ze(Sj.keys),WPe=e=>({bg:W("blackAlpha.700","blackAlpha.700")(e)}),KPe={},XPe=()=>({layerStyle:"first",maxH:"80vh"}),QPe=()=>({fontWeight:"600",fontSize:"lg",layerStyle:"first",borderTopRadius:"base",borderInlineEndRadius:"base"}),YPe={},ZPe={overflowY:"scroll"},JPe={},eke=qPe(e=>({overlay:WPe(e),dialogContainer:KPe,dialog:XPe(),header:QPe(),closeButton:YPe,body:ZPe,footer:JPe})),tke=HPe({variants:{invokeAI:eke},defaultProps:{variant:"invokeAI",size:"lg"}}),{defineMultiStyleConfig:nke,definePartsStyle:rke}=ze(xj.keys),ike=e=>({height:8}),oke=e=>({border:"none",fontWeight:"600",height:"auto",py:1,ps:2,pe:6,...SS(e)}),ake=e=>({display:"flex"}),ske=e=>({border:"none",px:2,py:0,mx:-2,my:0,svg:{color:W("base.700","base.300")(e),width:2.5,height:2.5,_hover:{color:W("base.900","base.100")(e)}}}),lke=rke(e=>({root:ike(e),field:oke(e),stepperGroup:ake(e),stepper:ske(e)})),uke=nke({variants:{invokeAI:lke},defaultProps:{size:"sm",variant:"invokeAI"}}),{defineMultiStyleConfig:cke,definePartsStyle:EU}=ze(wj.keys),AU=en("popper-bg"),TU=en("popper-arrow-bg"),PU=en("popper-arrow-shadow-color"),dke=e=>({[TU.variable]:W("colors.base.100","colors.base.800")(e),[AU.variable]:W("colors.base.100","colors.base.800")(e),[PU.variable]:W("colors.base.400","colors.base.600")(e),minW:"unset",width:"unset",p:4,bg:W("base.100","base.800")(e),border:"none",shadow:"dark-lg"}),fke=e=>({[TU.variable]:W("colors.base.100","colors.base.700")(e),[AU.variable]:W("colors.base.100","colors.base.700")(e),[PU.variable]:W("colors.base.400","colors.base.400")(e),p:4,bg:W("base.100","base.700")(e),border:"none",shadow:"dark-lg"}),hke=EU(e=>({content:dke(e),body:{padding:0}})),pke=EU(e=>({content:fke(e),body:{padding:0}})),gke=cke({variants:{invokeAI:hke,informational:pke},defaultProps:{variant:"invokeAI"}}),{defineMultiStyleConfig:mke,definePartsStyle:yke}=ze(Cj.keys),vke=e=>({bg:"accentAlpha.700"}),bke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.200`,`${t}.700`)(e)}},_ke=yke(e=>({filledTrack:vke(e),track:bke(e)})),Ske=mke({variants:{invokeAI:_ke},defaultProps:{variant:"invokeAI"}}),xke={"::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"},{definePartsStyle:wke,defineMultiStyleConfig:Cke}=ze(Ej.keys),Eke=e=>({color:W("base.200","base.300")(e)}),Ake=e=>({fontWeight:"600",...SS(e)}),Tke=wke(e=>({field:Ake(e),icon:Eke(e)})),Pke=Cke({variants:{invokeAI:Tke},defaultProps:{size:"sm",variant:"invokeAI"}}),TM=Pe("skeleton-start-color"),PM=Pe("skeleton-end-color"),kke={borderRadius:"base",maxW:"full",maxH:"full",_light:{[TM.variable]:"colors.base.250",[PM.variable]:"colors.base.450"},_dark:{[TM.variable]:"colors.base.700",[PM.variable]:"colors.base.500"}},Ike={variants:{invokeAI:kke},defaultProps:{variant:"invokeAI"}},{definePartsStyle:Mke,defineMultiStyleConfig:Rke}=ze(Aj.keys),Oke=e=>({bg:W("base.400","base.600")(e),h:1.5}),$ke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.400`,`${t}.600`)(e),h:1.5}},Nke=e=>({w:e.orientation==="horizontal"?2:4,h:e.orientation==="horizontal"?4:2,bg:W("base.50","base.100")(e)}),Dke=e=>({fontSize:"2xs",fontWeight:"500",color:W("base.700","base.400")(e),mt:2,insetInlineStart:"unset"}),Lke=Mke(e=>({container:{_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},track:Oke(e),filledTrack:$ke(e),thumb:Nke(e),mark:Dke(e)})),Fke=Rke({variants:{invokeAI:Lke},defaultProps:{variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Bke,definePartsStyle:zke}=ze(Tj.keys),jke=e=>{const{colorScheme:t}=e;return{bg:W("base.300","base.600")(e),_focusVisible:{boxShadow:"none"},_checked:{bg:W(`${t}.400`,`${t}.500`)(e)}}},Vke=e=>{const{colorScheme:t}=e;return{bg:W(`${t}.50`,`${t}.50`)(e)}},Uke=zke(e=>({container:{},track:jke(e),thumb:Vke(e)})),Gke=Bke({variants:{invokeAI:Uke},defaultProps:{size:"md",variant:"invokeAI",colorScheme:"accent"}}),{defineMultiStyleConfig:Hke,definePartsStyle:kU}=ze(Pj.keys),qke=e=>({display:"flex",columnGap:4}),Wke=e=>({}),Kke=e=>{const{colorScheme:t}=e;return{display:"flex",flexDirection:"column",gap:1,color:W("base.700","base.400")(e),button:{fontSize:"sm",padding:2,borderRadius:"base",textShadow:W("0 0 0.3rem var(--invokeai-colors-accent-100)","0 0 0.3rem var(--invokeai-colors-accent-900)")(e),svg:{fill:W("base.700","base.300")(e)},_selected:{bg:W("accent.400","accent.600")(e),color:W("base.50","base.100")(e),svg:{fill:W("base.50","base.100")(e),filter:W(`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-600))`,`drop-shadow(0px 0px 0.3rem var(--invokeai-colors-${t}-800))`)(e)},_hover:{bg:W("accent.500","accent.500")(e),color:W("white","base.50")(e),svg:{fill:W("white","base.50")(e)}}},_hover:{bg:W("base.100","base.800")(e),color:W("base.900","base.50")(e),svg:{fill:W("base.800","base.100")(e)}}}}},Xke=e=>({padding:0,height:"100%"}),Qke=kU(e=>({root:qke(e),tab:Wke(e),tablist:Kke(e),tabpanel:Xke(e)})),Yke=kU(e=>({tab:{borderTopRadius:"base",px:4,py:1,fontSize:"sm",color:W("base.600","base.400")(e),fontWeight:500,_selected:{color:W("accent.600","accent.400")(e)}},tabpanel:{p:0,pt:4,w:"full",h:"full"},tabpanels:{w:"full",h:"full"}})),Zke=Hke({variants:{line:Yke,appTabs:Qke},defaultProps:{variant:"appTabs",colorScheme:"accent"}}),Jke=e=>({color:W("error.500","error.400")(e)}),e6e=e=>({color:W("base.500","base.400")(e)}),t6e={variants:{subtext:e6e,error:Jke}},n6e=e=>({...SS(e),"::-webkit-scrollbar":{display:"initial"},"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, + var(--invokeai-colors-base-50) 0%, + var(--invokeai-colors-base-50) 70%, + var(--invokeai-colors-base-200) 70%, + var(--invokeai-colors-base-200) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, + var(--invokeai-colors-base-50) 0%, + var(--invokeai-colors-base-50) 70%, + var(--invokeai-colors-base-200) 70%, + var(--invokeai-colors-base-200) 100%)`}},_dark:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, + var(--invokeai-colors-base-900) 0%, + var(--invokeai-colors-base-900) 70%, + var(--invokeai-colors-base-800) 70%, + var(--invokeai-colors-base-800) 100%)`},_disabled:{"::-webkit-resizer":{backgroundImage:`linear-gradient(135deg, + var(--invokeai-colors-base-900) 0%, + var(--invokeai-colors-base-900) 70%, + var(--invokeai-colors-base-800) 70%, + var(--invokeai-colors-base-800) 100%)`}}},p:2}),r6e={variants:{invokeAI:n6e},defaultProps:{size:"md",variant:"invokeAI"}},i6e=en("popper-arrow-bg"),o6e=e=>({borderRadius:"base",shadow:"dark-lg",bg:W("base.700","base.200")(e),[i6e.variable]:W("colors.base.700","colors.base.200")(e),pb:1.5}),a6e={baseStyle:o6e},kM={backgroundColor:"accentAlpha.150 !important",borderColor:"accentAlpha.700 !important",borderRadius:"base !important",borderStyle:"dashed !important",_dark:{borderColor:"accent.400 !important"}},s6e={".react-flow__nodesselection-rect":{...kM,padding:"1rem !important",boxSizing:"content-box !important",transform:"translate(-1rem, -1rem) !important"},".react-flow__selection":kM},l6e={config:{cssVarPrefix:"invokeai",initialColorMode:"dark",useSystemColorMode:!1},layerStyles:{body:{bg:"base.50",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.50"}},first:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.850",color:"base.100"}},second:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},third:{bg:"base.300",color:"base.900",".chakra-ui-dark &":{bg:"base.750",color:"base.100"}},nodeBody:{bg:"base.100",color:"base.900",".chakra-ui-dark &":{bg:"base.800",color:"base.100"}},nodeHeader:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}},nodeFooter:{bg:"base.200",color:"base.900",".chakra-ui-dark &":{bg:"base.900",color:"base.100"}}},styles:{global:()=>({layerStyle:"body","*":{...xke},...s6e})},direction:"ltr",fonts:{body:"'Inter Variable', sans-serif",heading:"'Inter Variable', sans-serif"},shadows:{light:{accent:"0 0 10px 0 var(--invokeai-colors-accent-300)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-400)",ok:"0 0 7px var(--invokeai-colors-ok-600)",working:"0 0 7px var(--invokeai-colors-working-600)",error:"0 0 7px var(--invokeai-colors-error-600)"},dark:{accent:"0 0 10px 0 var(--invokeai-colors-accent-600)",accentHover:"0 0 10px 0 var(--invokeai-colors-accent-500)",ok:"0 0 7px var(--invokeai-colors-ok-400)",working:"0 0 7px var(--invokeai-colors-working-400)",error:"0 0 7px var(--invokeai-colors-error-400)"},selected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-400)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-500)"},hoverSelected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 4px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 4px var(--invokeai-colors-accent-400)"},hoverUnselected:{light:"0px 0px 0px 1px var(--invokeai-colors-base-150), 0px 0px 0px 3px var(--invokeai-colors-accent-500)",dark:"0px 0px 0px 1px var(--invokeai-colors-base-900), 0px 0px 0px 3px var(--invokeai-colors-accent-400)"},nodeSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-400)",dark:"0 0 0 3px var(--invokeai-colors-accent-500)"},nodeHovered:{light:"0 0 0 2px var(--invokeai-colors-accent-500)",dark:"0 0 0 2px var(--invokeai-colors-accent-400)"},nodeHoveredSelected:{light:"0 0 0 3px var(--invokeai-colors-accent-500)",dark:"0 0 0 3px var(--invokeai-colors-accent-400)"},nodeInProgress:{light:"0 0 0 2px var(--invokeai-colors-accent-500), 0 0 10px 2px var(--invokeai-colors-accent-600)",dark:"0 0 0 2px var(--invokeai-colors-yellow-400), 0 0 20px 2px var(--invokeai-colors-orange-700)"}},colors:dPe,components:{Button:xPe,Input:zPe,Editable:$Pe,Textarea:r6e,Tabs:Zke,Progress:Ske,Accordion:bPe,FormLabel:DPe,Switch:Gke,NumberInput:uke,Select:Pke,Skeleton:Ike,Slider:Fke,Popover:gke,Modal:tke,Checkbox:TPe,Menu:GPe,Text:t6e,Tooltip:a6e}},u6e={defaultOptions:{isClosable:!0}},{toast:Sh}=oPe({theme:l6e,defaultOptions:u6e.defaultOptions}),c6e=()=>{pe({matcher:ln.endpoints.enqueueBatch.matchFulfilled,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;ae("queue").debug({enqueueResult:ft(t)},"Batch enqueued"),Sh.isActive("batch-queued")||Sh({id:"batch-queued",title:K("queue.batchQueued"),description:K("queue.batchQueuedDesc",{count:t.enqueued,direction:n.prepend?K("queue.front"):K("queue.back")}),duration:1e3,status:"success"})}}),pe({matcher:ln.endpoints.enqueueBatch.matchRejected,effect:async e=>{const t=e.payload,n=e.meta.arg.originalArgs;if(!t){Sh({title:K("queue.batchFailedToQueue"),status:"error",description:"Unknown Error"}),ae("queue").error({batchConfig:ft(n),error:ft(t)},K("queue.batchFailedToQueue"));return}const r=cPe.safeParse(t);if(r.success)r.data.data.detail.map(i=>{Sh({id:"batch-failed-to-queue",title:n6(LN(i.msg),{length:128}),status:"error",description:n6(`Path: + ${i.loc.join(".")}`,{length:128})})});else{let i="Unknown Error",o;t.status===403&&"body"in t?i=zy(t,"body.detail","Unknown Error"):t.status===403&&"error"in t?i=zy(t,"error.detail","Unknown Error"):t.status===403&&"data"in t&&(i=zy(t,"data.detail","Unknown Error"),o=15e3),Sh({title:K("queue.batchFailedToQueue"),status:"error",description:i,...o?{duration:o}:{}})}ae("queue").error({batchConfig:ft(n),error:ft(t)},K("queue.batchFailedToQueue"))}})},zm={memoizeOptions:{resultEqualityCheck:pE}},IU=(e,t)=>{var d;const{generation:n,canvas:r,nodes:i,controlAdapters:o}=e,a=((d=n.initialImage)==null?void 0:d.imageName)===t,s=r.layerState.objects.some(f=>f.kind==="image"&&f.imageName===t),l=i.nodes.filter(on).some(f=>Gc(f.data.inputs,h=>{var p;return h.type==="ImageField"&&((p=h.value)==null?void 0:p.image_name)===t})),u=Aa(o).some(f=>f.controlImage===t||hi(f)&&f.processedControlImage===t);return{isInitialImage:a,isCanvasImage:s,isNodesImage:l,isControlImage:u}},d6e=Gn([e=>e],e=>{const{imagesToDelete:t}=e.deleteImageModal;return t.length?t.map(r=>IU(e,r.image_name)):[]},zm),f6e=()=>{pe({matcher:ue.endpoints.deleteBoardAndImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{deleted_images:r}=e.payload;let i=!1,o=!1,a=!1,s=!1;const l=n();r.forEach(u=>{const c=IU(l,u);c.isInitialImage&&!i&&(t(kE()),i=!0),c.isCanvasImage&&!o&&(t(zE()),o=!0),c.isNodesImage&&!a&&(t(Yye()),a=!0),c.isControlImage&&!s&&(t(Tie()),s=!0)})}})},h6e=()=>{pe({matcher:ai(I1,C5),effect:async(e,{getState:t,dispatch:n,condition:r,cancelActiveListeners:i})=>{i();const o=t(),a=I1.match(e)?e.payload.boardId:o.gallery.selectedBoardId,l=(C5.match(e)?e.payload:o.gallery.galleryView)==="images"?Ln:Tr,u={board_id:a??"none",categories:l};if(await r(()=>ue.endpoints.listImages.select(u)(t()).isSuccess,5e3)){const{data:d}=ue.endpoints.listImages.select(u)(t());if(d){const f=yg.selectAll(d)[0],h=yg.selectById(d,e.payload.selectedImageName);n(ha(h||f||null))}else n(ha(null))}else n(ha(null))}})},p6e=ge("canvas/canvasSavedToGallery"),g6e=ge("canvas/canvasMaskSavedToGallery"),m6e=ge("canvas/canvasCopiedToClipboard"),y6e=ge("canvas/canvasDownloadedAsImage"),v6e=ge("canvas/canvasMerged"),b6e=ge("canvas/stagingAreaImageSaved"),_6e=ge("canvas/canvasMaskToControlAdapter"),S6e=ge("canvas/canvasImageToControlAdapter");let MU=null,RU=null;const wUe=e=>{MU=e},xS=()=>MU,CUe=e=>{RU=e},x6e=()=>RU,w6e=async e=>new Promise((t,n)=>{e.toBlob(r=>{if(r){t(r);return}n("Unable to create Blob")})}),ob=async(e,t)=>await w6e(e.toCanvas(t)),wS=async(e,t=!1)=>{const n=xS();if(!n)throw new Error("Problem getting base layer blob");const{shouldCropToBoundingBoxOnSave:r,boundingBoxCoordinates:i,boundingBoxDimensions:o}=e.canvas,a=n.clone();a.scale({x:1,y:1});const s=a.getAbsolutePosition(),l=r||t?{x:i.x+s.x,y:i.y+s.y,width:o.width,height:o.height}:a.getClientRect();return ob(a,l)},C6e=(e,t="image/png")=>{navigator.clipboard.write([new ClipboardItem({[t]:e})])},E6e=()=>{pe({actionCreator:m6e,effect:async(e,{dispatch:t,getState:n})=>{const r=Q_.get().child({namespace:"canvasCopiedToClipboardListener"}),i=n();try{const o=wS(i);C6e(o)}catch(o){r.error(String(o)),t(nt({title:K("toast.problemCopyingCanvas"),description:K("toast.problemCopyingCanvasDesc"),status:"error"}));return}t(nt({title:K("toast.canvasCopiedClipboard"),status:"success"}))}})},A6e=(e,t)=>{const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()},T6e=()=>{pe({actionCreator:y6e,effect:async(e,{dispatch:t,getState:n})=>{const r=Q_.get().child({namespace:"canvasSavedToGalleryListener"}),i=n();let o;try{o=await wS(i)}catch(a){r.error(String(a)),t(nt({title:K("toast.problemDownloadingCanvas"),description:K("toast.problemDownloadingCanvasDesc"),status:"error"}));return}A6e(o,"canvas.png"),t(nt({title:K("toast.canvasDownloaded"),status:"success"}))}})},P6e=()=>{pe({actionCreator:S6e,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("canvas"),i=n(),{id:o}=e.payload;let a;try{a=await wS(i,!0)}catch(c){r.error(String(c)),t(nt({title:K("toast.problemSavingCanvas"),description:K("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery,l=await t(ue.endpoints.uploadImage.initiate({file:new File([a],"savedCanvas.png",{type:"image/png"}),image_category:"control",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:K("toast.canvasSentControlnetAssets")}}})).unwrap(),{image_name:u}=l;t(Hl({id:o,controlImage:u}))}})};var tT={exports:{}},CS={},OU={},Ue={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;var t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof Ve<"u"?Ve:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.2.0",isBrowser:n(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return e.Konva.angleDeg?i*t:i},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(i){e.glob.Konva=i}};const r=i=>{e.Konva[i.prototype.getClassName()]=i};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(Ue);var tn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=Ue;class n{constructor(b=[1,0,0,1,0,0]){this.dirty=!1,this.m=b&&b.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(b){b.m[0]=this.m[0],b.m[1]=this.m[1],b.m[2]=this.m[2],b.m[3]=this.m[3],b.m[4]=this.m[4],b.m[5]=this.m[5]}point(b){var S=this.m;return{x:S[0]*b.x+S[2]*b.y+S[4],y:S[1]*b.x+S[3]*b.y+S[5]}}translate(b,S){return this.m[4]+=this.m[0]*b+this.m[2]*S,this.m[5]+=this.m[1]*b+this.m[3]*S,this}scale(b,S){return this.m[0]*=b,this.m[1]*=b,this.m[2]*=S,this.m[3]*=S,this}rotate(b){var S=Math.cos(b),x=Math.sin(b),w=this.m[0]*S+this.m[2]*x,C=this.m[1]*S+this.m[3]*x,T=this.m[0]*-x+this.m[2]*S,A=this.m[1]*-x+this.m[3]*S;return this.m[0]=w,this.m[1]=C,this.m[2]=T,this.m[3]=A,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(b,S){var x=this.m[0]+this.m[2]*S,w=this.m[1]+this.m[3]*S,C=this.m[2]+this.m[0]*b,T=this.m[3]+this.m[1]*b;return this.m[0]=x,this.m[1]=w,this.m[2]=C,this.m[3]=T,this}multiply(b){var S=this.m[0]*b.m[0]+this.m[2]*b.m[1],x=this.m[1]*b.m[0]+this.m[3]*b.m[1],w=this.m[0]*b.m[2]+this.m[2]*b.m[3],C=this.m[1]*b.m[2]+this.m[3]*b.m[3],T=this.m[0]*b.m[4]+this.m[2]*b.m[5]+this.m[4],A=this.m[1]*b.m[4]+this.m[3]*b.m[5]+this.m[5];return this.m[0]=S,this.m[1]=x,this.m[2]=w,this.m[3]=C,this.m[4]=T,this.m[5]=A,this}invert(){var b=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),S=this.m[3]*b,x=-this.m[1]*b,w=-this.m[2]*b,C=this.m[0]*b,T=b*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),A=b*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=S,this.m[1]=x,this.m[2]=w,this.m[3]=C,this.m[4]=T,this.m[5]=A,this}getMatrix(){return this.m}decompose(){var b=this.m[0],S=this.m[1],x=this.m[2],w=this.m[3],C=this.m[4],T=this.m[5],A=b*w-S*x;let I={x:C,y:T,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(b!=0||S!=0){var D=Math.sqrt(b*b+S*S);I.rotation=S>0?Math.acos(b/D):-Math.acos(b/D),I.scaleX=D,I.scaleY=A/D,I.skewX=(b*x+S*w)/A,I.skewY=0}else if(x!=0||w!=0){var M=Math.sqrt(x*x+w*w);I.rotation=Math.PI/2-(w>0?Math.acos(-x/M):-Math.acos(x/M)),I.scaleX=A/M,I.scaleY=M,I.skewX=0,I.skewY=(b*x+S*w)/A}return I.rotation=e.Util._getRotation(I.rotation),I}}e.Transform=n;var r="[object Array]",i="[object Number]",o="[object String]",a="[object Boolean]",s=Math.PI/180,l=180/Math.PI,u="#",c="",d="0",f="Konva warning: ",h="Konva error: ",p="rgb(",m={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},_=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,v=[];const y=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(g){setTimeout(g,60)};e.Util={_isElement(g){return!!(g&&g.nodeType==1)},_isFunction(g){return!!(g&&g.constructor&&g.call&&g.apply)},_isPlainObject(g){return!!g&&g.constructor===Object},_isArray(g){return Object.prototype.toString.call(g)===r},_isNumber(g){return Object.prototype.toString.call(g)===i&&!isNaN(g)&&isFinite(g)},_isString(g){return Object.prototype.toString.call(g)===o},_isBoolean(g){return Object.prototype.toString.call(g)===a},isObject(g){return g instanceof Object},isValidSelector(g){if(typeof g!="string")return!1;var b=g[0];return b==="#"||b==="."||b===b.toUpperCase()},_sign(g){return g===0||g>0?1:-1},requestAnimFrame(g){v.push(g),v.length===1&&y(function(){const b=v;v=[],b.forEach(function(S){S()})})},createCanvasElement(){var g=document.createElement("canvas");try{g.style=g.style||{}}catch{}return g},createImageElement(){return document.createElement("img")},_isInDocument(g){for(;g=g.parentNode;)if(g==document)return!0;return!1},_urlToImage(g,b){var S=e.Util.createImageElement();S.onload=function(){b(S)},S.src=g},_rgbToHex(g,b,S){return((1<<24)+(g<<16)+(b<<8)+S).toString(16).slice(1)},_hexToRgb(g){g=g.replace(u,c);var b=parseInt(g,16);return{r:b>>16&255,g:b>>8&255,b:b&255}},getRandomColor(){for(var g=(Math.random()*16777215<<0).toString(16);g.length<6;)g=d+g;return u+g},getRGB(g){var b;return g in m?(b=m[g],{r:b[0],g:b[1],b:b[2]}):g[0]===u?this._hexToRgb(g.substring(1)):g.substr(0,4)===p?(b=_.exec(g.replace(/ /g,"")),{r:parseInt(b[1],10),g:parseInt(b[2],10),b:parseInt(b[3],10)}):{r:0,g:0,b:0}},colorToRGBA(g){return g=g||"black",e.Util._namedColorToRBA(g)||e.Util._hex3ColorToRGBA(g)||e.Util._hex4ColorToRGBA(g)||e.Util._hex6ColorToRGBA(g)||e.Util._hex8ColorToRGBA(g)||e.Util._rgbColorToRGBA(g)||e.Util._rgbaColorToRGBA(g)||e.Util._hslColorToRGBA(g)},_namedColorToRBA(g){var b=m[g.toLowerCase()];return b?{r:b[0],g:b[1],b:b[2],a:1}:null},_rgbColorToRGBA(g){if(g.indexOf("rgb(")===0){g=g.match(/rgb\(([^)]+)\)/)[1];var b=g.split(/ *, */).map(Number);return{r:b[0],g:b[1],b:b[2],a:1}}},_rgbaColorToRGBA(g){if(g.indexOf("rgba(")===0){g=g.match(/rgba\(([^)]+)\)/)[1];var b=g.split(/ *, */).map((S,x)=>S.slice(-1)==="%"?x===3?parseInt(S)/100:parseInt(S)/100*255:Number(S));return{r:b[0],g:b[1],b:b[2],a:b[3]}}},_hex8ColorToRGBA(g){if(g[0]==="#"&&g.length===9)return{r:parseInt(g.slice(1,3),16),g:parseInt(g.slice(3,5),16),b:parseInt(g.slice(5,7),16),a:parseInt(g.slice(7,9),16)/255}},_hex6ColorToRGBA(g){if(g[0]==="#"&&g.length===7)return{r:parseInt(g.slice(1,3),16),g:parseInt(g.slice(3,5),16),b:parseInt(g.slice(5,7),16),a:1}},_hex4ColorToRGBA(g){if(g[0]==="#"&&g.length===5)return{r:parseInt(g[1]+g[1],16),g:parseInt(g[2]+g[2],16),b:parseInt(g[3]+g[3],16),a:parseInt(g[4]+g[4],16)/255}},_hex3ColorToRGBA(g){if(g[0]==="#"&&g.length===4)return{r:parseInt(g[1]+g[1],16),g:parseInt(g[2]+g[2],16),b:parseInt(g[3]+g[3],16),a:1}},_hslColorToRGBA(g){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(g)){const[b,...S]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(g),x=Number(S[0])/360,w=Number(S[1])/100,C=Number(S[2])/100;let T,A,I;if(w===0)return I=C*255,{r:Math.round(I),g:Math.round(I),b:Math.round(I),a:1};C<.5?T=C*(1+w):T=C+w-C*w;const D=2*C-T,M=[0,0,0];for(let E=0;E<3;E++)A=x+1/3*-(E-1),A<0&&A++,A>1&&A--,6*A<1?I=D+(T-D)*6*A:2*A<1?I=T:3*A<2?I=D+(T-D)*(2/3-A)*6:I=D,M[E]=I*255;return{r:Math.round(M[0]),g:Math.round(M[1]),b:Math.round(M[2]),a:1}}},haveIntersection(g,b){return!(b.x>g.x+g.width||b.x+b.widthg.y+g.height||b.y+b.height1?(T=S,A=x,I=(S-w)*(S-w)+(x-C)*(x-C)):(T=g+M*(S-g),A=b+M*(x-b),I=(T-w)*(T-w)+(A-C)*(A-C))}return[T,A,I]},_getProjectionToLine(g,b,S){var x=e.Util.cloneObject(g),w=Number.MAX_VALUE;return b.forEach(function(C,T){if(!(!S&&T===b.length-1)){var A=b[(T+1)%b.length],I=e.Util._getProjectionToSegment(C.x,C.y,A.x,A.y,g.x,g.y),D=I[0],M=I[1],E=I[2];Eb.length){var T=b;b=g,g=T}for(x=0;x{b.width=0,b.height=0})},drawRoundedRectPath(g,b,S,x){let w=0,C=0,T=0,A=0;typeof x=="number"?w=C=T=A=Math.min(x,b/2,S/2):(w=Math.min(x[0]||0,b/2,S/2),C=Math.min(x[1]||0,b/2,S/2),A=Math.min(x[2]||0,b/2,S/2),T=Math.min(x[3]||0,b/2,S/2)),g.moveTo(w,0),g.lineTo(b-C,0),g.arc(b-C,C,C,Math.PI*3/2,0,!1),g.lineTo(b,S-A),g.arc(b-A,S-A,A,0,Math.PI/2,!1),g.lineTo(T,S),g.arc(T,S-T,T,Math.PI/2,Math.PI,!1),g.lineTo(0,w),g.arc(w,w,w,Math.PI,Math.PI*3/2,!1)}}})(tn);var Wt={},je={},Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getComponentValidator=Ee.getBooleanValidator=Ee.getNumberArrayValidator=Ee.getFunctionValidator=Ee.getStringOrGradientValidator=Ee.getStringValidator=Ee.getNumberOrAutoValidator=Ee.getNumberOrArrayOfNumbersValidator=Ee.getNumberValidator=Ee.alphaComponent=Ee.RGBComponent=void 0;const Es=Ue,cn=tn;function As(e){return cn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||cn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function k6e(e){return e>255?255:e<0?0:Math.round(e)}Ee.RGBComponent=k6e;function I6e(e){return e>1?1:e<1e-4?1e-4:e}Ee.alphaComponent=I6e;function M6e(){if(Es.Konva.isUnminified)return function(e,t){return cn.Util._isNumber(e)||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}Ee.getNumberValidator=M6e;function R6e(e){if(Es.Konva.isUnminified)return function(t,n){let r=cn.Util._isNumber(t),i=cn.Util._isArray(t)&&t.length==e;return!r&&!i&&cn.Util.warn(As(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}Ee.getNumberOrArrayOfNumbersValidator=R6e;function O6e(){if(Es.Konva.isUnminified)return function(e,t){var n=cn.Util._isNumber(e),r=e==="auto";return n||r||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}Ee.getNumberOrAutoValidator=O6e;function $6e(){if(Es.Konva.isUnminified)return function(e,t){return cn.Util._isString(e)||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}Ee.getStringValidator=$6e;function N6e(){if(Es.Konva.isUnminified)return function(e,t){const n=cn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}Ee.getStringOrGradientValidator=N6e;function D6e(){if(Es.Konva.isUnminified)return function(e,t){return cn.Util._isFunction(e)||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}Ee.getFunctionValidator=D6e;function L6e(){if(Es.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(cn.Util._isArray(e)?e.forEach(function(r){cn.Util._isNumber(r)||cn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}Ee.getNumberArrayValidator=L6e;function F6e(){if(Es.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||cn.Util.warn(As(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}Ee.getBooleanValidator=F6e;function B6e(e){if(Es.Konva.isUnminified)return function(t,n){return t==null||cn.Util.isObject(t)||cn.Util.warn(As(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}Ee.getComponentValidator=B6e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=tn,n=Ee;var r="get",i="set";e.Factory={addGetterSetter(o,a,s,l,u){e.Factory.addGetter(o,a,s),e.Factory.addSetter(o,a,l,u),e.Factory.addOverloadedGetterSetter(o,a)},addGetter(o,a,s){var l=r+t.Util._capitalize(a);o.prototype[l]=o.prototype[l]||function(){var u=this.attrs[a];return u===void 0?s:u}},addSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]||e.Factory.overWriteSetter(o,a,s,l)},overWriteSetter(o,a,s,l){var u=i+t.Util._capitalize(a);o.prototype[u]=function(c){return s&&c!==void 0&&c!==null&&(c=s.call(this,c,a)),this._setAttr(a,c),l&&l.call(this),this}},addComponentsGetterSetter(o,a,s,l,u){var c=s.length,d=t.Util._capitalize,f=r+d(a),h=i+d(a),p,m;o.prototype[f]=function(){var v={};for(p=0;p{this._setAttr(a+d(b),void 0)}),this._fireChangeEvent(a,y,v),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(o,a)},addOverloadedGetterSetter(o,a){var s=t.Util._capitalize(a),l=i+s,u=r+s;o.prototype[a]=function(){return arguments.length?(this[l](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(o,a,s,l){t.Util.error("Adding deprecated "+a);var u=r+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[u]=function(){t.Util.error(c);var d=this.attrs[a];return d===void 0?s:d},e.Factory.addSetter(o,a,l,function(){t.Util.error(c)}),e.Factory.addOverloadedGetterSetter(o,a)},backCompat(o,a){t.Util.each(a,function(s,l){var u=o.prototype[l],c=r+t.Util._capitalize(s),d=i+t.Util._capitalize(s);function f(){u.apply(this,arguments),t.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}o.prototype[s]=f,o.prototype[c]=f,o.prototype[d]=f})},afterSetFilter(){this._filterUpToDate=!1}}})(je);var Io={},ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.HitContext=ss.SceneContext=ss.Context=void 0;const $U=tn,z6e=Ue;function j6e(e){var t=[],n=e.length,r=$U.Util,i,o;for(i=0;itypeof c=="number"?Math.floor(c):c)),o+=V6e+u.join(IM)+U6e)):(o+=s.property,t||(o+=K6e+s.val)),o+=q6e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=Q6e&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var c=arguments,d=this._context;c.length===3?d.drawImage(t,n,r):c.length===5?d.drawImage(t,n,r,i,o):c.length===9&&d.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n,r,i){return r?this._context.isPointInPath(r,t,n,i):this._context.isPointInPath(t,n,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=MM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=j6e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];e.DD._dragElements.forEach((o,a)=>{const{node:s}=o,l=s.getStage();l.setPointersPositions(r),o.pointerId===void 0&&(o.pointerId=n.Util._getFirstPointerId(r));const u=l._changedPointerPositions.find(f=>f.id===o.pointerId);if(u){if(o.dragStatus!=="dragging"){var c=s.dragDistance(),d=Math.max(Math.abs(u.x-o.startPointerPos.x),Math.abs(u.y-o.startPointerPos.y));if(d{o.fire("dragmove",{type:"dragmove",target:o,evt:r},!0)})},_endDragBefore(r){const i=[];e.DD._dragElements.forEach(o=>{const{node:a}=o,s=a.getStage();if(r&&s.setPointersPositions(r),!s._changedPointerPositions.find(c=>c.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,o.dragStatus="stopped");const u=o.node.getLayer()||o.node instanceof t.Konva.Stage&&o.node;u&&i.indexOf(u)===-1&&i.push(u)}),i.forEach(o=>{o.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&e.DD._dragElements.delete(o)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(TS);Object.defineProperty(Wt,"__esModule",{value:!0});Wt.Node=void 0;const He=tn,jm=je,dy=Io,cu=Ue,Di=TS,yn=Ee;var dv="absoluteOpacity",fy="allEventListeners",za="absoluteTransform",RM="absoluteScale",du="canvas",iIe="Change",oIe="children",aIe="konva",S3="listening",OM="mouseenter",$M="mouseleave",NM="set",DM="Shape",fv=" ",LM="stage",Vs="transform",sIe="Stage",x3="visible",lIe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(fv);let uIe=1;class Oe{constructor(t){this._id=uIe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===Vs||t===za)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Vs||t===za,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(fv);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(du)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===za&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(du)){const{scene:t,filter:n,hit:r}=this._cache.get(du);He.Util.releaseCanvas(t,n,r),this._cache.delete(du)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,c=n.drawBorder||!1,d=n.hitCanvasPixelRatio||1;if(!i||!o){He.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var f=new dy.SceneCanvas({pixelRatio:a,width:i,height:o}),h=new dy.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),p=new dy.HitCanvas({pixelRatio:d,width:i,height:o}),m=f.getContext(),_=p.getContext();return p.isCache=!0,f.isCache=!0,this._cache.delete(du),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(f.getContext()._context.imageSmoothingEnabled=!1,h.getContext()._context.imageSmoothingEnabled=!1),m.save(),_.save(),m.translate(-s,-l),_.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(dv),this._clearSelfAndDescendantCache(RM),this.drawScene(f,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),_.restore(),c&&(m.save(),m.beginPath(),m.rect(0,0,i,o),m.closePath(),m.setAttr("strokeStyle","red"),m.setAttr("lineWidth",5),m.stroke(),m.restore()),this._cache.set(du,{scene:f,filter:h,hit:p,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(du)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var c=l.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var c=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/c,r.getHeight()/c),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==oIe&&(r=NM+He.Util._capitalize(n),He.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(S3,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(x3,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;Di.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!cu.Konva.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==sIe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Vs),this._clearSelfAndDescendantCache(za)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new He.Transform,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Vs);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Vs),this._clearSelfAndDescendantCache(za),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return He.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return He.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&He.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(dv,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=He.Util.isObject(i)&&!He.Util._isPlainObject(i)&&!He.Util._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),He.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t==null?void 0:t.callback;i&&delete t.callback,He.Util._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():cu.Konva.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(r&&!this.isDragging()){var i=!1;Di.DD._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Di.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Di.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return He.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return He.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Oe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),cu.Konva[r]||(He.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=cu.Konva[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Dw.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Dw.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const c=r===this;if(u){o.save();var d=this.getAbsoluteTransform(r),f=d.getMatrix();o.transform(f[0],f[1],f[2],f[3],f[4],f[5]),o.beginPath();let _;if(l)_=l.call(this,o,this);else{var h=this.clipX(),p=this.clipY();o.rect(h,p,a,s)}o.clip.apply(o,_),f=d.copy().invert().getMatrix(),o.transform(f[0],f[1],f[2],f[3],f[4],f[5])}var m=!c&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";m&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(_){_[t](n,r)}),m&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},c=this;(n=this.children)===null||n===void 0||n.forEach(function(m){if(m.visible()){var _=m.getClientRect({relativeTo:c,skipShadow:t.skipShadow,skipStroke:t.skipStroke});_.width===0&&_.height===0||(o===void 0?(o=_.x,a=_.y,s=_.x+_.width,l=_.y+_.height):(o=Math.min(o,_.x),a=Math.min(a,_.y),s=Math.max(s,_.x+_.width),l=Math.max(l,_.y+_.height)))}});for(var d=this.find("Shape"),f=!1,h=0;hJ.indexOf("pointer")>=0?"pointer":J.indexOf("touch")>=0?"touch":"mouse",V=J=>{const j=z(J);if(j==="pointer")return i.Konva.pointerEventsEnabled&&$.pointer;if(j==="touch")return $.touch;if(j==="mouse")return $.mouse};function H(J={}){return(J.clipFunc||J.clipWidth||J.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),J}const Q="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class Z extends r.Container{constructor(j){super(H(j)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{H(this.attrs)}),this._checkVisibility()}_validateAdd(j){const X=j.getType()==="Layer",ee=j.getType()==="FastLayer";X||ee||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const j=this.visible()?"":"none";this.content.style.display=j}setContainer(j){if(typeof j===c){if(j.charAt(0)==="."){var X=j.slice(1);j=document.getElementsByClassName(X)[0]}else{var ee;j.charAt(0)!=="#"?ee=j:ee=j.slice(1),j=document.getElementById(ee)}if(!j)throw"Can not find container in document with id "+ee}return this._setAttr("container",j),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),j.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var j=this.children,X=j.length,ee;for(ee=0;ee-1&&e.stages.splice(X,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const j=this._pointerPositions[0]||this._changedPointerPositions[0];return j?{x:j.x,y:j.y}:(t.Util.warn(Q),null)}_getPointerById(j){return this._pointerPositions.find(X=>X.id===j)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(j){j=j||{},j.x=j.x||0,j.y=j.y||0,j.width=j.width||this.width(),j.height=j.height||this.height();var X=new o.SceneCanvas({width:j.width,height:j.height,pixelRatio:j.pixelRatio||1}),ee=X.getContext()._context,ne=this.children;return(j.x||j.y)&&ee.translate(-1*j.x,-1*j.y),ne.forEach(function(fe){if(fe.isVisible()){var de=fe._toKonvaCanvas(j);ee.drawImage(de._canvas,j.x,j.y,de.getWidth()/de.getPixelRatio(),de.getHeight()/de.getPixelRatio())}}),X}getIntersection(j){if(!j)return null;var X=this.children,ee=X.length,ne=ee-1,fe;for(fe=ne;fe>=0;fe--){const de=X[fe].getIntersection(j);if(de)return de}return null}_resizeDOM(){var j=this.width(),X=this.height();this.content&&(this.content.style.width=j+d,this.content.style.height=X+d),this.bufferCanvas.setSize(j,X),this.bufferHitCanvas.setSize(j,X),this.children.forEach(ee=>{ee.setSize({width:j,height:X}),ee.draw()})}add(j,...X){if(arguments.length>1){for(var ee=0;eeO&&t.Util.warn("The stage has "+ne+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),j.setSize({width:this.width(),height:this.height()}),j.draw(),i.Konva.isBrowser&&this.content.appendChild(j.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(j){return l.hasPointerCapture(j,this)}setPointerCapture(j){l.setPointerCapture(j,this)}releaseCapture(j){l.releaseCapture(j,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&R.forEach(([j,X])=>{this.content.addEventListener(j,ee=>{this[X](ee)},{passive:!1})})}_pointerenter(j){this.setPointersPositions(j);const X=V(j.type);this._fire(X.pointerenter,{evt:j,target:this,currentTarget:this})}_pointerover(j){this.setPointersPositions(j);const X=V(j.type);this._fire(X.pointerover,{evt:j,target:this,currentTarget:this})}_getTargetShape(j){let X=this[j+"targetShape"];return X&&!X.getStage()&&(X=null),X}_pointerleave(j){const X=V(j.type),ee=z(j.type);if(X){this.setPointersPositions(j);var ne=this._getTargetShape(ee),fe=!a.DD.isDragging||i.Konva.hitOnDragEnabled;ne&&fe?(ne._fireAndBubble(X.pointerout,{evt:j}),ne._fireAndBubble(X.pointerleave,{evt:j}),this._fire(X.pointerleave,{evt:j,target:this,currentTarget:this}),this[ee+"targetShape"]=null):fe&&(this._fire(X.pointerleave,{evt:j,target:this,currentTarget:this}),this._fire(X.pointerout,{evt:j,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(j){const X=V(j.type),ee=z(j.type);if(X){this.setPointersPositions(j);var ne=!1;this._changedPointerPositions.forEach(fe=>{var de=this.getIntersection(fe);if(a.DD.justDragged=!1,i.Konva["_"+ee+"ListenClick"]=!0,!(de&&de.isListening()))return;i.Konva.capturePointerEventsEnabled&&de.setPointerCapture(fe.id),this[ee+"ClickStartShape"]=de,de._fireAndBubble(X.pointerdown,{evt:j,pointerId:fe.id}),ne=!0;const $e=j.type.indexOf("touch")>=0;de.preventDefault()&&j.cancelable&&$e&&j.preventDefault()}),ne||this._fire(X.pointerdown,{evt:j,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(j){const X=V(j.type),ee=z(j.type);if(!X)return;a.DD.isDragging&&a.DD.node.preventDefault()&&j.cancelable&&j.preventDefault(),this.setPointersPositions(j);var ne=!a.DD.isDragging||i.Konva.hitOnDragEnabled;if(!ne)return;var fe={};let de=!1;var Be=this._getTargetShape(ee);this._changedPointerPositions.forEach($e=>{const Ce=l.getCapturedShape($e.id)||this.getIntersection($e),Ke=$e.id,be={evt:j,pointerId:Ke};var zt=Be!==Ce;if(zt&&Be&&(Be._fireAndBubble(X.pointerout,Object.assign({},be),Ce),Be._fireAndBubble(X.pointerleave,Object.assign({},be),Ce)),Ce){if(fe[Ce._id])return;fe[Ce._id]=!0}Ce&&Ce.isListening()?(de=!0,zt&&(Ce._fireAndBubble(X.pointerover,Object.assign({},be),Be),Ce._fireAndBubble(X.pointerenter,Object.assign({},be),Be),this[ee+"targetShape"]=Ce),Ce._fireAndBubble(X.pointermove,Object.assign({},be))):Be&&(this._fire(X.pointerover,{evt:j,target:this,currentTarget:this,pointerId:Ke}),this[ee+"targetShape"]=null)}),de||this._fire(X.pointermove,{evt:j,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(j){const X=V(j.type),ee=z(j.type);if(!X)return;this.setPointersPositions(j);const ne=this[ee+"ClickStartShape"],fe=this[ee+"ClickEndShape"];var de={};let Be=!1;this._changedPointerPositions.forEach($e=>{const Ce=l.getCapturedShape($e.id)||this.getIntersection($e);if(Ce){if(Ce.releaseCapture($e.id),de[Ce._id])return;de[Ce._id]=!0}const Ke=$e.id,be={evt:j,pointerId:Ke};let zt=!1;i.Konva["_"+ee+"InDblClickWindow"]?(zt=!0,clearTimeout(this[ee+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+ee+"InDblClickWindow"]=!0,clearTimeout(this[ee+"DblTimeout"])),this[ee+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ee+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),Ce&&Ce.isListening()?(Be=!0,this[ee+"ClickEndShape"]=Ce,Ce._fireAndBubble(X.pointerup,Object.assign({},be)),i.Konva["_"+ee+"ListenClick"]&&ne&&ne===Ce&&(Ce._fireAndBubble(X.pointerclick,Object.assign({},be)),zt&&fe&&fe===Ce&&Ce._fireAndBubble(X.pointerdblclick,Object.assign({},be)))):(this[ee+"ClickEndShape"]=null,i.Konva["_"+ee+"ListenClick"]&&this._fire(X.pointerclick,{evt:j,target:this,currentTarget:this,pointerId:Ke}),zt&&this._fire(X.pointerdblclick,{evt:j,target:this,currentTarget:this,pointerId:Ke}))}),Be||this._fire(X.pointerup,{evt:j,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ee+"ListenClick"]=!1,j.cancelable&&ee!=="touch"&&j.preventDefault()}_contextmenu(j){this.setPointersPositions(j);var X=this.getIntersection(this.getPointerPosition());X&&X.isListening()?X._fireAndBubble(D,{evt:j}):this._fire(D,{evt:j,target:this,currentTarget:this})}_wheel(j){this.setPointersPositions(j);var X=this.getIntersection(this.getPointerPosition());X&&X.isListening()?X._fireAndBubble(L,{evt:j}):this._fire(L,{evt:j,target:this,currentTarget:this})}_pointercancel(j){this.setPointersPositions(j);const X=l.getCapturedShape(j.pointerId)||this.getIntersection(this.getPointerPosition());X&&X._fireAndBubble(S,l.createEvent(j)),l.releaseCapture(j.pointerId)}_lostpointercapture(j){l.releaseCapture(j.pointerId)}setPointersPositions(j){var X=this._getContentPosition(),ee=null,ne=null;j=j||window.event,j.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(j.touches,fe=>{this._pointerPositions.push({id:fe.identifier,x:(fe.clientX-X.left)/X.scaleX,y:(fe.clientY-X.top)/X.scaleY})}),Array.prototype.forEach.call(j.changedTouches||j.touches,fe=>{this._changedPointerPositions.push({id:fe.identifier,x:(fe.clientX-X.left)/X.scaleX,y:(fe.clientY-X.top)/X.scaleY})})):(ee=(j.clientX-X.left)/X.scaleX,ne=(j.clientY-X.top)/X.scaleY,this.pointerPos={x:ee,y:ne},this._pointerPositions=[{x:ee,y:ne,id:t.Util._getFirstPointerId(j)}],this._changedPointerPositions=[{x:ee,y:ne,id:t.Util._getFirstPointerId(j)}])}_setPointerPosition(j){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(j)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var j=this.content.getBoundingClientRect();return{top:j.top,left:j.left,scaleX:j.width/this.content.clientWidth||1,scaleY:j.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var j=this.container();if(!j)throw"Stage has no container. A container is required.";j.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),j.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(j){j.batchDraw()}),this}}e.Stage=Z,Z.prototype.nodeType=u,(0,s._registerNode)(Z),n.Factory.addGetterSetter(Z,"container")})(LU);var Vm={},Rn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=Ue,n=tn,r=je,i=Wt,o=Ee,a=Ue,s=gi;var l="hasShadow",u="shadowRGBA",c="patternImage",d="linearGradient",f="radialGradient";let h;function p(){return h||(h=n.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function m(T){const A=this.attrs.fillRule;A?T.fill(A):T.fill()}function _(T){T.stroke()}function v(T){T.fill()}function y(T){T.stroke()}function g(){this._clearCache(l)}function b(){this._clearCache(u)}function S(){this._clearCache(c)}function x(){this._clearCache(d)}function w(){this._clearCache(f)}class C extends i.Node{constructor(A){super(A);let I;for(;I=n.Util.getRandomColor(),!(I&&!(I in e.shapes)););this.colorKey=I,e.shapes[I]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var A=p();const I=A.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const D=new n.Transform;D.translate(this.fillPatternX(),this.fillPatternY()),D.rotate(t.Konva.getAngle(this.fillPatternRotation())),D.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),D.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const M=D.getMatrix(),E=typeof DOMMatrix>"u"?{a:M[0],b:M[1],c:M[2],d:M[3],e:M[4],f:M[5]}:new DOMMatrix(M);I.setTransform(E)}return I}}_getLinearGradient(){return this._getCache(d,this.__getLinearGradient)}__getLinearGradient(){var A=this.fillLinearGradientColorStops();if(A){for(var I=p(),D=this.fillLinearGradientStartPoint(),M=this.fillLinearGradientEndPoint(),E=I.createLinearGradient(D.x,D.y,M.x,M.y),P=0;Pthis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const A=this.hitStrokeWidth();return A==="auto"?this.hasStroke():this.strokeEnabled()&&!!A}intersects(A){var I=this.getStage(),D=I.bufferHitCanvas,M;return D.getContext().clear(),this.drawHit(D,null,!0),M=D.context.getImageData(Math.round(A.x),Math.round(A.y),1,1).data,M[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(A){var I;if(!this.getStage()||!((I=this.attrs.perfectDrawEnabled)!==null&&I!==void 0?I:!0))return!1;const M=A||this.hasFill(),E=this.hasStroke(),P=this.getAbsoluteOpacity()!==1;if(M&&E&&P)return!0;const N=this.hasShadow(),L=this.shadowForStrokeEnabled();return!!(M&&E&&N&&L)}setStrokeHitEnabled(A){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),A?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var A=this.size();return{x:this._centroid?-A.width/2:0,y:this._centroid?-A.height/2:0,width:A.width,height:A.height}}getClientRect(A={}){const I=A.skipTransform,D=A.relativeTo,M=this.getSelfRect(),P=!A.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,N=M.width+P,L=M.height+P,O=!A.skipShadow&&this.hasShadow(),R=O?this.shadowOffsetX():0,$=O?this.shadowOffsetY():0,z=N+Math.abs(R),V=L+Math.abs($),H=O&&this.shadowBlur()||0,Q=z+H*2,Z=V+H*2,J={width:Q,height:Z,x:-(P/2+H)+Math.min(R,0)+M.x,y:-(P/2+H)+Math.min($,0)+M.y};return I?J:this._transformedRect(J,D)}drawScene(A,I){var D=this.getLayer(),M=A||D.getCanvas(),E=M.getContext(),P=this._getCanvasCache(),N=this.getSceneFunc(),L=this.hasShadow(),O,R,$,z=M.isCache,V=I===this;if(!this.isVisible()&&!V)return this;if(P){E.save();var H=this.getAbsoluteTransform(I).getMatrix();return E.transform(H[0],H[1],H[2],H[3],H[4],H[5]),this._drawCachedSceneCanvas(E),E.restore(),this}if(!N)return this;if(E.save(),this._useBufferCanvas()&&!z){O=this.getStage(),R=O.bufferCanvas,$=R.getContext(),$.clear(),$.save(),$._applyLineJoin(this);var Q=this.getAbsoluteTransform(I).getMatrix();$.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),N.call(this,$,this),$.restore();var Z=R.pixelRatio;L&&E._applyShadow(this),E._applyOpacity(this),E._applyGlobalCompositeOperation(this),E.drawImage(R._canvas,0,0,R.width/Z,R.height/Z)}else{if(E._applyLineJoin(this),!V){var Q=this.getAbsoluteTransform(I).getMatrix();E.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),E._applyOpacity(this),E._applyGlobalCompositeOperation(this)}L&&E._applyShadow(this),N.call(this,E,this)}return E.restore(),this}drawHit(A,I,D=!1){if(!this.shouldDrawHit(I,D))return this;var M=this.getLayer(),E=A||M.hitCanvas,P=E&&E.getContext(),N=this.hitFunc()||this.sceneFunc(),L=this._getCanvasCache(),O=L&&L.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),O){P.save();var R=this.getAbsoluteTransform(I).getMatrix();return P.transform(R[0],R[1],R[2],R[3],R[4],R[5]),this._drawCachedHitCanvas(P),P.restore(),this}if(!N)return this;if(P.save(),P._applyLineJoin(this),!(this===I)){var z=this.getAbsoluteTransform(I).getMatrix();P.transform(z[0],z[1],z[2],z[3],z[4],z[5])}return N.call(this,P,this),P.restore(),this}drawHitFromCache(A=0){var I=this._getCanvasCache(),D=this._getCachedSceneCanvas(),M=I.hit,E=M.getContext(),P=M.getWidth(),N=M.getHeight(),L,O,R,$,z,V;E.clear(),E.drawImage(D._canvas,0,0,P,N);try{for(L=E.getImageData(0,0,P,N),O=L.data,R=O.length,$=n.Util._hexToRgb(this.colorKey),z=0;zA?(O[z]=$.r,O[z+1]=$.g,O[z+2]=$.b,O[z+3]=255):O[z+3]=0;E.putImageData(L,0,0)}catch(H){n.Util.error("Unable to draw hit graph from cached scene canvas. "+H.message)}return this}hasPointerCapture(A){return s.hasPointerCapture(A,this)}setPointerCapture(A){s.setPointerCapture(A,this)}releaseCapture(A){s.releaseCapture(A,this)}}e.Shape=C,C.prototype._fillFunc=m,C.prototype._strokeFunc=_,C.prototype._fillFuncHit=v,C.prototype._strokeFuncHit=y,C.prototype._centroid=!1,C.prototype.nodeType="Shape",(0,a._registerNode)(C),C.prototype.eventListeners={},C.prototype.on.call(C.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",g),C.prototype.on.call(C.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),C.prototype.on.call(C.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",S),C.prototype.on.call(C.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",x),C.prototype.on.call(C.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",w),r.Factory.addGetterSetter(C,"stroke",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(C,"strokeWidth",2,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(C,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(C,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(C,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(C,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(C,"lineJoin"),r.Factory.addGetterSetter(C,"lineCap"),r.Factory.addGetterSetter(C,"sceneFunc"),r.Factory.addGetterSetter(C,"hitFunc"),r.Factory.addGetterSetter(C,"dash"),r.Factory.addGetterSetter(C,"dashOffset",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"shadowColor",void 0,(0,o.getStringValidator)()),r.Factory.addGetterSetter(C,"shadowBlur",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"shadowOpacity",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(C,"shadowOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"shadowOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillPatternImage"),r.Factory.addGetterSetter(C,"fill",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(C,"fillPatternX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillPatternY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(C,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(C,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(C,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(C,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(C,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(C,"fillEnabled",!0),r.Factory.addGetterSetter(C,"strokeEnabled",!0),r.Factory.addGetterSetter(C,"shadowEnabled",!0),r.Factory.addGetterSetter(C,"dashEnabled",!0),r.Factory.addGetterSetter(C,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(C,"fillPriority","color"),r.Factory.addComponentsGetterSetter(C,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(C,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(C,"fillPatternScaleX",1,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(C,"fillPatternScaleY",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(C,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(C,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(C,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(C,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(C,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(C,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(C,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(C,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(C,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(C,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(C,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(C,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(C,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(C,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(C,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(C,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(C,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(C,"fillPatternRotation",0),r.Factory.addGetterSetter(C,"fillRule",void 0,(0,o.getStringValidator)()),r.Factory.backCompat(C,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Rn);Object.defineProperty(Vm,"__esModule",{value:!0});Vm.Layer=void 0;const La=tn,Lw=gc,zc=Wt,rT=je,FM=Io,pIe=Ee,gIe=Rn,mIe=Ue;var yIe="#",vIe="beforeDraw",bIe="draw",zU=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],_Ie=zU.length;class Ff extends Lw.Container{constructor(t){super(t),this.canvas=new FM.SceneCanvas,this.hitCanvas=new FM.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<_Ie;i++){const o=zU[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=La.Util._rgbToHex(r[0],r[1],r[2]),a=gIe.shapes[yIe+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(vIe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Lw.Container.prototype.drawScene.call(this,i,n),this._fire(bIe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Lw.Container.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return La.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return La.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Vm.Layer=Ff;Ff.prototype.nodeType="Layer";(0,mIe._registerNode)(Ff);rT.Factory.addGetterSetter(Ff,"imageSmoothingEnabled",!0);rT.Factory.addGetterSetter(Ff,"clearBeforeDraw",!0);rT.Factory.addGetterSetter(Ff,"hitGraphEnabled",!0,(0,pIe.getBooleanValidator)());var kS={};Object.defineProperty(kS,"__esModule",{value:!0});kS.FastLayer=void 0;const SIe=tn,xIe=Vm,wIe=Ue;class iT extends xIe.Layer{constructor(t){super(t),this.listening(!1),SIe.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}kS.FastLayer=iT;iT.prototype.nodeType="FastLayer";(0,wIe._registerNode)(iT);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0});Bf.Group=void 0;const CIe=tn,EIe=gc,AIe=Ue;class oT extends EIe.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&CIe.Util.throw("You may only add groups and shapes to groups.")}}Bf.Group=oT;oT.prototype.nodeType="Group";(0,AIe._registerNode)(oT);var zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.Animation=void 0;const Fw=Ue,BM=tn;var Bw=function(){return Fw.glob.performance&&Fw.glob.performance.now?function(){return Fw.glob.performance.now()}:function(){return new Date().getTime()}}();class ia{constructor(t,n){this.id=ia.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Bw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var p=this.getTimer()-this._startTime;this.state===s?this.setTime(p):this.state===l&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class f{constructor(p){var m=this,_=p.node,v=_._id,y,g=p.easing||e.Easings.Linear,b=!!p.yoyo,S;typeof p.duration>"u"?y=.3:p.duration===0?y=.001:y=p.duration,this.node=_,this._id=u++;var x=_.getLayer()||(_ instanceof i.Konva.Stage?_.getLayers():null);x||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){m.tween.onEnterFrame()},x),this.tween=new d(S,function(w){m._tweenFunc(w)},g,0,1,y*1e3,b),this._addListeners(),f.attrs[v]||(f.attrs[v]={}),f.attrs[v][this._id]||(f.attrs[v][this._id]={}),f.tweens[v]||(f.tweens[v]={});for(S in p)o[S]===void 0&&this._addAttr(S,p[S]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,m){var _=this.node,v=_._id,y,g,b,S,x,w,C,T;if(b=f.tweens[v][p],b&&delete f.attrs[v][b][p],y=_.getAttr(p),t.Util._isArray(m))if(g=[],x=Math.max(m.length,y.length),p==="points"&&m.length!==y.length&&(m.length>y.length?(C=y,y=t.Util._prepareArrayForTween(y,m,_.closed())):(w=m,m=t.Util._prepareArrayForTween(m,y,_.closed()))),p.indexOf("fill")===0)for(S=0;S{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var p=this.node,m=f.attrs[p._id][this._id];m.points&&m.points.trueEnd&&p.setAttr("points",m.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var p=this.node,m=f.attrs[p._id][this._id];m.points&&m.points.trueStart&&p.points(m.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var p=this.node._id,m=this._id,_=f.tweens[p],v;this.pause();for(v in _)delete f.tweens[p][v];delete f.attrs[p][m]}}e.Tween=f,f.attrs={},f.tweens={},r.Node.prototype.to=function(h){var p=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),p&&p()};var m=new f(h);m.play()},e.Easings={BackEaseIn(h,p,m,_){var v=1.70158;return m*(h/=_)*h*((v+1)*h-v)+p},BackEaseOut(h,p,m,_){var v=1.70158;return m*((h=h/_-1)*h*((v+1)*h+v)+1)+p},BackEaseInOut(h,p,m,_){var v=1.70158;return(h/=_/2)<1?m/2*(h*h*(((v*=1.525)+1)*h-v))+p:m/2*((h-=2)*h*(((v*=1.525)+1)*h+v)+2)+p},ElasticEaseIn(h,p,m,_,v,y){var g=0;return h===0?p:(h/=_)===1?p+m:(y||(y=_*.3),!v||v0?t:n),c=a*n,d=s*(s>0?t:n),f=l*(l>0?n:t);return{x:u,y:r?-1*f:d,width:c-u,height:f-d}}}IS.Arc=Ts;Ts.prototype._centroid=!0;Ts.prototype.className="Arc";Ts.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,PIe._registerNode)(Ts);MS.Factory.addGetterSetter(Ts,"innerRadius",0,(0,RS.getNumberValidator)());MS.Factory.addGetterSetter(Ts,"outerRadius",0,(0,RS.getNumberValidator)());MS.Factory.addGetterSetter(Ts,"angle",0,(0,RS.getNumberValidator)());MS.Factory.addGetterSetter(Ts,"clockwise",!1,(0,RS.getBooleanValidator)());var OS={},Um={};Object.defineProperty(Um,"__esModule",{value:!0});Um.Line=void 0;const $S=je,kIe=Rn,VU=Ee,IIe=Ue;function w3(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),c=a*l/(s+l),d=n-u*(i-e),f=r-u*(o-t),h=n+c*(i-e),p=r+c*(o-t);return[d,f,h,p]}function jM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u{let u,c,d;u=l/2,c=0;for(let h=0;h<20;h++)d=u*e.tValues[20][h]+u,c+=e.cValues[20][h]*r(a,s,d);return u*c};e.getCubicArcLength=t;const n=(a,s,l)=>{l===void 0&&(l=1);const u=a[0]-2*a[1]+a[2],c=s[0]-2*s[1]+s[2],d=2*a[1]-2*a[0],f=2*s[1]-2*s[0],h=4*(u*u+c*c),p=4*(u*d+c*f),m=d*d+f*f;if(h===0)return l*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(s[2]-s[0],2));const _=p/(2*h),v=m/h,y=l+_,g=v-_*_,b=y*y+g>0?Math.sqrt(y*y+g):0,S=_*_+g>0?Math.sqrt(_*_+g):0,x=_+Math.sqrt(_*_+g)!==0?g*Math.log(Math.abs((y+b)/(_+S))):0;return Math.sqrt(h)/2*(y*b-_*S+x)};e.getQuadraticArcLength=n;function r(a,s,l){const u=i(1,l,a),c=i(1,l,s),d=u*u+c*c;return Math.sqrt(d)}const i=(a,s,l)=>{const u=l.length-1;let c,d;if(u===0)return 0;if(a===0){d=0;for(let f=0;f<=u;f++)d+=e.binomialCoefficients[u][f]*Math.pow(1-s,u-f)*Math.pow(s,f)*l[f];return d}else{c=new Array(u);for(let f=0;f{let u=1,c=a/s,d=(a-l(c))/s,f=0;for(;u>.001;){const h=l(c+d),p=Math.abs(a-h)/s;if(p500)break}return c};e.t2length=o})(UU);Object.defineProperty(jf,"__esModule",{value:!0});jf.Path=void 0;const MIe=je,RIe=Rn,OIe=Ue,jc=UU;class An extends RIe.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=An.parsePathData(this.data()),this.pathLength=An.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;ic?u:c,_=u>c?1:u/c,v=u>c?c/u:1;t.translate(s,l),t.rotate(h),t.scale(_,v),t.arc(0,0,m,d,d+f,1-p),t.scale(1/_,1/v),t.rotate(-h),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var c=u.points[4],d=u.points[5],f=u.points[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;p-=h){const m=An.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],p,0);t.push(m.x,m.y)}else for(let p=c+h;pn[i].pathLength;)t-=n[i].pathLength,++i;if(i===o)return r=n[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[i].points.slice(0,2),{x:r[0],y:r[1]};var a=n[i],s=a.points;switch(a.command){case"L":return An.getPointOnLine(t,a.start.x,a.start.y,s[0],s[1]);case"C":return An.getPointOnCubicBezier((0,jc.t2length)(t,An.getPathLength(n),m=>(0,jc.getCubicArcLength)([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],m)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return An.getPointOnQuadraticBezier((0,jc.t2length)(t,An.getPathLength(n),m=>(0,jc.getQuadraticArcLength)([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],m)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var l=s[0],u=s[1],c=s[2],d=s[3],f=s[4],h=s[5],p=s[6];return f+=h*t/a.pathLength,An.getPointOnEllipticalArc(l,u,c,d,f,p)}return null}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(p[0]);){var y=null,g=[],b=l,S=u,x,w,C,T,A,I,D,M,E,P;switch(h){case"l":l+=p.shift(),u+=p.shift(),y="L",g.push(l,u);break;case"L":l=p.shift(),u=p.shift(),g.push(l,u);break;case"m":var N=p.shift(),L=p.shift();if(l+=N,u+=L,y="M",a.length>2&&a[a.length-1].command==="z"){for(var O=a.length-2;O>=0;O--)if(a[O].command==="M"){l=a[O].points[0]+N,u=a[O].points[1]+L;break}}g.push(l,u),h="l";break;case"M":l=p.shift(),u=p.shift(),y="M",g.push(l,u),h="L";break;case"h":l+=p.shift(),y="L",g.push(l,u);break;case"H":l=p.shift(),y="L",g.push(l,u);break;case"v":u+=p.shift(),y="L",g.push(l,u);break;case"V":u=p.shift(),y="L",g.push(l,u);break;case"C":g.push(p.shift(),p.shift(),p.shift(),p.shift()),l=p.shift(),u=p.shift(),g.push(l,u);break;case"c":g.push(l+p.shift(),u+p.shift(),l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",g.push(l,u);break;case"S":w=l,C=u,x=a[a.length-1],x.command==="C"&&(w=l+(l-x.points[2]),C=u+(u-x.points[3])),g.push(w,C,p.shift(),p.shift()),l=p.shift(),u=p.shift(),y="C",g.push(l,u);break;case"s":w=l,C=u,x=a[a.length-1],x.command==="C"&&(w=l+(l-x.points[2]),C=u+(u-x.points[3])),g.push(w,C,l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="C",g.push(l,u);break;case"Q":g.push(p.shift(),p.shift()),l=p.shift(),u=p.shift(),g.push(l,u);break;case"q":g.push(l+p.shift(),u+p.shift()),l+=p.shift(),u+=p.shift(),y="Q",g.push(l,u);break;case"T":w=l,C=u,x=a[a.length-1],x.command==="Q"&&(w=l+(l-x.points[0]),C=u+(u-x.points[1])),l=p.shift(),u=p.shift(),y="Q",g.push(w,C,l,u);break;case"t":w=l,C=u,x=a[a.length-1],x.command==="Q"&&(w=l+(l-x.points[0]),C=u+(u-x.points[1])),l+=p.shift(),u+=p.shift(),y="Q",g.push(w,C,l,u);break;case"A":T=p.shift(),A=p.shift(),I=p.shift(),D=p.shift(),M=p.shift(),E=l,P=u,l=p.shift(),u=p.shift(),y="A",g=this.convertEndpointToCenterParameterization(E,P,l,u,D,M,T,A,I);break;case"a":T=p.shift(),A=p.shift(),I=p.shift(),D=p.shift(),M=p.shift(),E=l,P=u,l+=p.shift(),u+=p.shift(),y="A",g=this.convertEndpointToCenterParameterization(E,P,l,u,D,M,T,A,I);break}a.push({command:y||h,points:g,start:{x:b,y:S},pathLength:this.calcLength(b,S,y||h,g)})}(h==="z"||h==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=An;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":return(0,jc.getCubicArcLength)([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case"Q":return(0,jc.getQuadraticArcLength)([t,i[0],i[2]],[n,i[1],i[3]],1);case"A":o=0;var c=i[4],d=i[5],f=i[4]+d,h=Math.PI/180;if(Math.abs(c-f)f;l-=h)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=c+h;l1&&(s*=Math.sqrt(h),l*=Math.sqrt(h));var p=Math.sqrt((s*s*(l*l)-s*s*(f*f)-l*l*(d*d))/(s*s*(f*f)+l*l*(d*d)));o===a&&(p*=-1),isNaN(p)&&(p=0);var m=p*s*f/l,_=p*-l*d/s,v=(t+r)/2+Math.cos(c)*m-Math.sin(c)*_,y=(n+i)/2+Math.sin(c)*m+Math.cos(c)*_,g=function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1])},b=function(A,I){return(A[0]*I[0]+A[1]*I[1])/(g(A)*g(I))},S=function(A,I){return(A[0]*I[1]=1&&(T=0),a===0&&T>0&&(T=T-2*Math.PI),a===1&&T<0&&(T=T+2*Math.PI),[v,y,s,l,x,T,c,a]}}jf.Path=An;An.prototype.className="Path";An.prototype._attrsAffectingSize=["data"];(0,OIe._registerNode)(An);MIe.Factory.addGetterSetter(An,"data");Object.defineProperty(OS,"__esModule",{value:!0});OS.Arrow=void 0;const NS=je,$Ie=Um,GU=Ee,NIe=Ue,VM=jf;class yc extends $Ie.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const f=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],h=VM.Path.calcLength(i[i.length-4],i[i.length-3],"C",f),p=VM.Path.getPointOnQuadraticBezier(Math.min(1,1-a/h),f[0],f[1],f[2],f[3],f[4],f[5]);l=r[s-2]-p.x,u=r[s-1]-p.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var c=(Math.atan2(u,l)+n)%n,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,d/2),t.lineTo(-a,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}OS.Arrow=yc;yc.prototype.className="Arrow";(0,NIe._registerNode)(yc);NS.Factory.addGetterSetter(yc,"pointerLength",10,(0,GU.getNumberValidator)());NS.Factory.addGetterSetter(yc,"pointerWidth",10,(0,GU.getNumberValidator)());NS.Factory.addGetterSetter(yc,"pointerAtBeginning",!1);NS.Factory.addGetterSetter(yc,"pointerAtEnding",!0);var DS={};Object.defineProperty(DS,"__esModule",{value:!0});DS.Circle=void 0;const DIe=je,LIe=Rn,FIe=Ee,BIe=Ue;class Vf extends LIe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}DS.Circle=Vf;Vf.prototype._centroid=!0;Vf.prototype.className="Circle";Vf.prototype._attrsAffectingSize=["radius"];(0,BIe._registerNode)(Vf);DIe.Factory.addGetterSetter(Vf,"radius",0,(0,FIe.getNumberValidator)());var LS={};Object.defineProperty(LS,"__esModule",{value:!0});LS.Ellipse=void 0;const aT=je,zIe=Rn,HU=Ee,jIe=Ue;class Yl extends zIe.Shape{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}LS.Ellipse=Yl;Yl.prototype.className="Ellipse";Yl.prototype._centroid=!0;Yl.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,jIe._registerNode)(Yl);aT.Factory.addComponentsGetterSetter(Yl,"radius",["x","y"]);aT.Factory.addGetterSetter(Yl,"radiusX",0,(0,HU.getNumberValidator)());aT.Factory.addGetterSetter(Yl,"radiusY",0,(0,HU.getNumberValidator)());var FS={};Object.defineProperty(FS,"__esModule",{value:!0});FS.Image=void 0;const zw=tn,vc=je,VIe=Rn,UIe=Ue,Gm=Ee;let ka=class qU extends VIe.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;let a;if(o){const s=this.attrs.cropWidth,l=this.attrs.cropHeight;s&&l?a=[o,this.cropX(),this.cropY(),s,l,0,0,n,r]:a=[o,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?zw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),o&&(i&&t.clip(),t.drawImage.apply(t,a))}_hitFunc(t){var n=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?zw.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=zw.Util.createImageElement();i.onload=function(){var o=new qU({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};FS.Image=ka;ka.prototype.className="Image";(0,UIe._registerNode)(ka);vc.Factory.addGetterSetter(ka,"cornerRadius",0,(0,Gm.getNumberOrArrayOfNumbersValidator)(4));vc.Factory.addGetterSetter(ka,"image");vc.Factory.addComponentsGetterSetter(ka,"crop",["x","y","width","height"]);vc.Factory.addGetterSetter(ka,"cropX",0,(0,Gm.getNumberValidator)());vc.Factory.addGetterSetter(ka,"cropY",0,(0,Gm.getNumberValidator)());vc.Factory.addGetterSetter(ka,"cropWidth",0,(0,Gm.getNumberValidator)());vc.Factory.addGetterSetter(ka,"cropHeight",0,(0,Gm.getNumberValidator)());var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.Tag=Ef.Label=void 0;const BS=je,GIe=Rn,HIe=Bf,sT=Ee,WU=Ue;var KU=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],qIe="Change.konva",WIe="none",C3="up",E3="right",A3="down",T3="left",KIe=KU.length;class lT extends HIe.Group{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}jS.RegularPolygon=_c;_c.prototype.className="RegularPolygon";_c.prototype._centroid=!0;_c.prototype._attrsAffectingSize=["radius"];(0,t8e._registerNode)(_c);XU.Factory.addGetterSetter(_c,"radius",0,(0,QU.getNumberValidator)());XU.Factory.addGetterSetter(_c,"sides",0,(0,QU.getNumberValidator)());var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.Ring=void 0;const YU=je,n8e=Rn,ZU=Ee,r8e=Ue;var UM=Math.PI*2;class Sc extends n8e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,UM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),UM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}VS.Ring=Sc;Sc.prototype.className="Ring";Sc.prototype._centroid=!0;Sc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,r8e._registerNode)(Sc);YU.Factory.addGetterSetter(Sc,"innerRadius",0,(0,ZU.getNumberValidator)());YU.Factory.addGetterSetter(Sc,"outerRadius",0,(0,ZU.getNumberValidator)());var US={};Object.defineProperty(US,"__esModule",{value:!0});US.Sprite=void 0;const xc=je,i8e=Rn,o8e=zf,JU=Ee,a8e=Ue;class Ia extends i8e.Shape{constructor(t){super(t),this._updated=!0,this.anim=new o8e.Animation(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],c=o[i+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,c),t.closePath(),t.fillStrokeShape(this)),d)if(a){var f=a[n],h=r*2;t.drawImage(d,s,l,u,c,f[h+0],f[h+1],u,c)}else t.drawImage(d,s,l,u,c,0,0,u,c)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],c=r*2;t.rect(u[c+0],u[c+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var py;function Vw(){return py||(py=P3.Util.createCanvasElement().getContext(h8e),py)}function C8e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function E8e(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A8e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class vn extends u8e.Shape{constructor(t){super(A8e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(v+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=P3.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(p8e,n),this}getWidth(){var t=this.attrs.width===Vc||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Vc||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return P3.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Vw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+hy+this.fontVariant()+hy+(this.fontSize()+v8e)+w8e(this.fontFamily())}_addTextLine(t){this.align()===xh&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Vw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Vc&&o!==void 0,l=a!==Vc&&a!==void 0,u=this.padding(),c=o-u*2,d=a-u*2,f=0,h=this.wrap(),p=h!==qM,m=h!==S8e&&p,_=this.ellipsis();this.textArr=[],Vw().font=this._getContextFont();for(var v=_?this._getTextWidth(jw):0,y=0,g=t.length;yc)for(;b.length>0;){for(var x=0,w=b.length,C="",T=0;x>>1,I=b.slice(0,A+1),D=this._getTextWidth(I)+v;D<=c?(x=A+1,C=I,T=D):w=A}if(C){if(m){var M,E=b[C.length],P=E===hy||E===GM;P&&T<=c?M=C.length:M=Math.max(C.lastIndexOf(hy),C.lastIndexOf(GM))+1,M>0&&(x=M,C=C.slice(0,x),T=this._getTextWidth(C))}C=C.trimRight(),this._addTextLine(C),r=Math.max(r,T),f+=i;var N=this._shouldHandleEllipsis(f);if(N){this._tryToAddEllipsisToLastLine();break}if(b=b.slice(x),b=b.trimLeft(),b.length>0&&(S=this._getTextWidth(b),S<=c)){this._addTextLine(b),f+=i,r=Math.max(r,S);break}}else break}else this._addTextLine(b),f+=i,r=Math.max(r,S),this._shouldHandleEllipsis(f)&&yd)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Vc&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==qM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Vc&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+jw)n?null:wh.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=wh.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;ie+`.${lG}`).join(" "),XM="nodesRect",$8e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],N8e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const D8e="ontouchstart"in po.Konva._global;function L8e(e,t){if(e==="rotater")return"crosshair";t+=vt.Util.degToRad(N8e[e]||0);var n=(vt.Util.radToDeg(t)%360+360)%360;return vt.Util._inRange(n,315+22.5,360)||vt.Util._inRange(n,0,22.5)?"ns-resize":vt.Util._inRange(n,45-22.5,45+22.5)?"nesw-resize":vt.Util._inRange(n,90-22.5,90+22.5)?"ew-resize":vt.Util._inRange(n,135-22.5,135+22.5)?"nwse-resize":vt.Util._inRange(n,180-22.5,180+22.5)?"ns-resize":vt.Util._inRange(n,225-22.5,225+22.5)?"nesw-resize":vt.Util._inRange(n,270-22.5,270+22.5)?"ew-resize":vt.Util._inRange(n,315-22.5,315+22.5)?"nwse-resize":(vt.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var sb=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],QM=1e8;function F8e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function uG(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function B8e(e,t){const n=F8e(e);return uG(e,t,n)}function z8e(e,t,n){let r=t;for(let i=0;ii.isAncestorOf(this)?(vt.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");i.on(a,o),i.on($8e.map(s=>s+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(XM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(XM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(po.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),c={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return uG(c,-po.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-QM,y:-QM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const c=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var d=[{x:c.x,y:c.y},{x:c.x+c.width,y:c.y},{x:c.x+c.width,y:c.y+c.height},{x:c.x,y:c.y+c.height}],f=u.getAbsoluteTransform();d.forEach(function(h){var p=f.point(h);n.push(p)})});const r=new vt.Transform;r.rotate(-po.Konva.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var c=r.point(u);i===void 0&&(i=a=c.x,o=s=c.y),i=Math.min(i,c.x),o=Math.min(o,c.y),a=Math.max(a,c.x),s=Math.max(s,c.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:po.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),sb.forEach((function(t){this._createAnchor(t)}).bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new M8e.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:D8e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=po.Konva.getAngle(this.rotation()),o=L8e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new I8e.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*vt.Util._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const c=o.getAbsolutePosition();if(!(u.x===c.x&&u.y===c.y)){if(this._movingAnchorName==="rotater"){var d=this._getNodeRect();n=o.x()-d.width/2,r=-o.y()+d.height/2;let M=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(M-=Math.PI);var f=po.Konva.getAngle(this.rotation());const E=f+M,P=po.Konva.getAngle(this.rotationSnapTolerance()),L=z8e(this.rotationSnaps(),E,P)-d.rotation,O=B8e(d,L);this._fitNodesInto(O,t);return}var h=this.shiftBehavior(),p;h==="inverted"?p=this.keepRatio()&&!t.shiftKey:h==="none"?p=this.keepRatio():p=this.keepRatio()||t.shiftKey;var g=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(p){var m=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(m.x-o.x(),2)+Math.pow(m.y-o.y(),2));var _=this.findOne(".top-left").x()>m.x?-1:1,v=this.findOne(".top-left").y()>m.y?-1:1;n=i*this.cos*_,r=i*this.sin*v,this.findOne(".top-left").x(m.x-n),this.findOne(".top-left").y(m.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(p){var m=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-m.x,2)+Math.pow(m.y-o.y(),2));var _=this.findOne(".top-right").x()m.y?-1:1;n=i*this.cos*_,r=i*this.sin*v,this.findOne(".top-right").x(m.x+n),this.findOne(".top-right").y(m.y-r)}var y=o.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(p){var m=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(m.x-o.x(),2)+Math.pow(o.y()-m.y,2));var _=m.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(vt.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(vt.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new vt.Transform;if(a.rotate(po.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const d=a.point({x:-this.padding()*2,y:0});if(t.x+=d.x,t.y+=d.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const d=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const d=a.point({x:0,y:-this.padding()*2});if(t.x+=d.x,t.y+=d.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const d=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=d.x,this._anchorDragOffset.y-=d.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const d=this.boundBoxFunc()(r,t);d?t=d:vt.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new vt.Transform;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new vt.Transform;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const c=u.multiply(l.invert());this._nodes.forEach(d=>{var f;const h=d.getParent().getAbsoluteTransform(),p=d.getTransform().copy();p.translate(d.offsetX(),d.offsetY());const m=new vt.Transform;m.multiply(h.copy().invert()).multiply(c).multiply(h).multiply(p);const _=m.decompose();d.setAttrs(_),this._fire("transform",{evt:n,target:d}),d._fire("transform",{evt:n,target:d}),(f=d.getLayer())===null||f===void 0||f.batchDraw()}),this.rotation(vt.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(vt.Util._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const u=this.find("._anchor");u.forEach(d=>{d.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*vt.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&u.forEach(d=>{c(d)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),KM.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return WM.Node.prototype.toObject.call(this)}clone(t){var n=WM.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}qS.Transformer=lt;function j8e(e){return e instanceof Array||vt.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){sb.indexOf(t)===-1&&vt.Util.warn("Unknown anchor name: "+t+". Available names are: "+sb.join(", "))}),e||[]}lt.prototype.className="Transformer";(0,R8e._registerNode)(lt);yt.Factory.addGetterSetter(lt,"enabledAnchors",sb,j8e);yt.Factory.addGetterSetter(lt,"flipEnabled",!0,(0,eu.getBooleanValidator)());yt.Factory.addGetterSetter(lt,"resizeEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorSize",10,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotateEnabled",!0);yt.Factory.addGetterSetter(lt,"rotationSnaps",[]);yt.Factory.addGetterSetter(lt,"rotateAnchorOffset",50,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"rotationSnapTolerance",5,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderEnabled",!0);yt.Factory.addGetterSetter(lt,"anchorStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"anchorStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"anchorFill","white");yt.Factory.addGetterSetter(lt,"anchorCornerRadius",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderStroke","rgb(0, 161, 255)");yt.Factory.addGetterSetter(lt,"borderStrokeWidth",1,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"borderDash");yt.Factory.addGetterSetter(lt,"keepRatio",!0);yt.Factory.addGetterSetter(lt,"shiftBehavior","default");yt.Factory.addGetterSetter(lt,"centeredScaling",!1);yt.Factory.addGetterSetter(lt,"ignoreStroke",!1);yt.Factory.addGetterSetter(lt,"padding",0,(0,eu.getNumberValidator)());yt.Factory.addGetterSetter(lt,"node");yt.Factory.addGetterSetter(lt,"nodes");yt.Factory.addGetterSetter(lt,"boundBoxFunc");yt.Factory.addGetterSetter(lt,"anchorDragBoundFunc");yt.Factory.addGetterSetter(lt,"anchorStyleFunc");yt.Factory.addGetterSetter(lt,"shouldOverdrawWholeArea",!1);yt.Factory.addGetterSetter(lt,"useSingleNodeRotation",!0);yt.Factory.backCompat(lt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var WS={};Object.defineProperty(WS,"__esModule",{value:!0});WS.Wedge=void 0;const KS=je,V8e=Rn,U8e=Ue,cG=Ee,G8e=Ue;class Ps extends V8e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,U8e.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}WS.Wedge=Ps;Ps.prototype.className="Wedge";Ps.prototype._centroid=!0;Ps.prototype._attrsAffectingSize=["radius"];(0,G8e._registerNode)(Ps);KS.Factory.addGetterSetter(Ps,"radius",0,(0,cG.getNumberValidator)());KS.Factory.addGetterSetter(Ps,"angle",0,(0,cG.getNumberValidator)());KS.Factory.addGetterSetter(Ps,"clockwise",!1);KS.Factory.backCompat(Ps,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var XS={};Object.defineProperty(XS,"__esModule",{value:!0});XS.Blur=void 0;const YM=je,H8e=Wt,q8e=Ee;function ZM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var W8e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],K8e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function X8e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,c,d,f,h,p,m,_,v,y,g,b,S,x,w,C,T,A,I,D,M=t+t+1,E=r-1,P=i-1,N=t+1,L=N*(N+1)/2,O=new ZM,R=null,$=O,z=null,V=null,H=W8e[t],Q=K8e[t];for(s=1;s>Q,I!==0?(I=255/I,n[c]=(f*H>>Q)*I,n[c+1]=(h*H>>Q)*I,n[c+2]=(p*H>>Q)*I):n[c]=n[c+1]=n[c+2]=0,f-=_,h-=v,p-=y,m-=g,_-=z.r,v-=z.g,y-=z.b,g-=z.a,l=d+((l=o+t+1)>Q,I>0?(I=255/I,n[l]=(f*H>>Q)*I,n[l+1]=(h*H>>Q)*I,n[l+2]=(p*H>>Q)*I):n[l]=n[l+1]=n[l+2]=0,f-=_,h-=v,p-=y,m-=g,_-=z.r,v-=z.g,y-=z.b,g-=z.a,l=o+((l=a+N)0&&X8e(t,n)};XS.Blur=Q8e;YM.Factory.addGetterSetter(H8e.Node,"blurRadius",0,(0,q8e.getNumberValidator)(),YM.Factory.afterSetFilter);var QS={};Object.defineProperty(QS,"__esModule",{value:!0});QS.Brighten=void 0;const JM=je,Y8e=Wt,Z8e=Ee,J8e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};YS.Contrast=n9e;eR.Factory.addGetterSetter(e9e.Node,"contrast",0,(0,t9e.getNumberValidator)(),eR.Factory.afterSetFilter);var ZS={};Object.defineProperty(ZS,"__esModule",{value:!0});ZS.Emboss=void 0;const Nl=je,JS=Wt,r9e=tn,dG=Ee,i9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,c=l*4,d=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:r9e.Util.error("Unknown emboss direction: "+r)}do{var f=(d-1)*c,h=o;d+h<1&&(h=0),d+h>u&&(h=0);var p=(d-1+h)*l*4,m=l;do{var _=f+(m-1)*4,v=a;m+v<1&&(v=0),m+v>l&&(v=0);var y=p+(m-1+v)*4,g=s[_]-s[y],b=s[_+1]-s[y+1],S=s[_+2]-s[y+2],x=g,w=x>0?x:-x,C=b>0?b:-b,T=S>0?S:-S;if(C>w&&(x=b),T>w&&(x=S),x*=t,i){var A=s[_]+x,I=s[_+1]+x,D=s[_+2]+x;s[_]=A>255?255:A<0?0:A,s[_+1]=I>255?255:I<0?0:I,s[_+2]=D>255?255:D<0?0:D}else{var M=n-x;M<0?M=0:M>255&&(M=255),s[_]=s[_+1]=s[_+2]=M}}while(--m)}while(--d)};ZS.Emboss=i9e;Nl.Factory.addGetterSetter(JS.Node,"embossStrength",.5,(0,dG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(JS.Node,"embossWhiteLevel",.5,(0,dG.getNumberValidator)(),Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(JS.Node,"embossDirection","top-left",null,Nl.Factory.afterSetFilter);Nl.Factory.addGetterSetter(JS.Node,"embossBlend",!1,null,Nl.Factory.afterSetFilter);var e2={};Object.defineProperty(e2,"__esModule",{value:!0});e2.Enhance=void 0;const tR=je,o9e=Wt,a9e=Ee;function Hw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const s9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],c=u,d,f,h=this.enhance();if(h!==0){for(f=0;fi&&(i=o),l=t[f+1],ls&&(s=l),d=t[f+2],dc&&(c=d);i===r&&(i=255,r=0),s===a&&(s=255,a=0),c===u&&(c=255,u=0);var p,m,_,v,y,g,b,S,x;for(h>0?(m=i+h*(255-i),_=r-h*(r-0),y=s+h*(255-s),g=a-h*(a-0),S=c+h*(255-c),x=u-h*(u-0)):(p=(i+r)*.5,m=i+h*(i-p),_=r+h*(r-p),v=(s+a)*.5,y=s+h*(s-v),g=a+h*(a-v),b=(c+u)*.5,S=c+h*(c-b),x=u+h*(u-b)),f=0;fv?_:v;var y=a,g=o,b,S,x=360/g*Math.PI/180,w,C;for(S=0;Sg?y:g;var b=a,S=o,x,w,C=n.polarRotation||0,T,A;for(c=0;ct&&(b=g,S=0,x=-1),i=0;i=0&&h=0&&p=0&&h=0&&p=255*4?255:0}return a}function x9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&h=0&&p=n))for(o=m;o<_;o+=1)o>=r||(a=(n*o+i)*4,s+=b[a+0],l+=b[a+1],u+=b[a+2],c+=b[a+3],g+=1);for(s=s/g,l=l/g,u=u/g,c=c/g,i=h;i=n))for(o=m;o<_;o+=1)o>=r||(a=(n*o+i)*4,b[a+0]=s,b[a+1]=l,b[a+2]=u,b[a+3]=c)}};l2.Pixelate=I9e;oR.Factory.addGetterSetter(P9e.Node,"pixelSize",8,(0,k9e.getNumberValidator)(),oR.Factory.afterSetFilter);var u2={};Object.defineProperty(u2,"__esModule",{value:!0});u2.Posterize=void 0;const aR=je,M9e=Wt,R9e=Ee,O9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});ub.Factory.addGetterSetter(gT.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});ub.Factory.addGetterSetter(gT.Node,"blue",0,$9e.RGBComponent,ub.Factory.afterSetFilter);var d2={};Object.defineProperty(d2,"__esModule",{value:!0});d2.RGBA=void 0;const Vg=je,f2=Wt,D9e=Ee,L9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});Vg.Factory.addGetterSetter(f2.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Vg.Factory.addGetterSetter(f2.Node,"blue",0,D9e.RGBComponent,Vg.Factory.afterSetFilter);Vg.Factory.addGetterSetter(f2.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var h2={};Object.defineProperty(h2,"__esModule",{value:!0});h2.Sepia=void 0;const F9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),c>127&&(c=255-c),d>127&&(d=255-d),t[l]=u,t[l+1]=c,t[l+2]=d}while(--s)}while(--o)};p2.Solarize=B9e;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});g2.Threshold=void 0;const sR=je,z9e=Wt,j9e=Ee,V9e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i{const{width:r,height:i}=t,o=document.createElement("div"),a=new Eh.Stage({container:o,width:r,height:i}),s=new Eh.Layer,l=new Eh.Layer;return s.add(new Eh.Rect({...t,fill:n?"black":"white"})),e.forEach(u=>l.add(new Eh.Line({points:u.points,stroke:n?"white":"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),a.add(s),a.add(l),o.remove(),a},PMe=async(e,t,n)=>new Promise((r,i)=>{const o=document.createElement("canvas");o.width=t,o.height=n;const a=o.getContext("2d"),s=new Image;if(!a){o.remove(),i("Unable to get context");return}s.onload=function(){a.drawImage(s,0,0),o.remove(),r(a.getImageData(0,0,t,n))},s.src=e}),cR=async(e,t)=>{const n=e.toDataURL(t);return await PMe(n,t.width,t.height)},mT=async(e,t,n,r,i)=>{const o=ae("canvas"),a=xS(),s=x6e();if(!a||!s){o.error("Unable to find canvas / stage");return}const l={...t,...n},u=a.clone();u.scale({x:1,y:1});const c=u.getAbsolutePosition(),d={x:l.x+c.x,y:l.y+c.y,width:l.width,height:l.height},f=await ob(u,d),h=await cR(u,d),p=await TMe(r?e.objects.filter(dL):[],l,i),m=await ob(p,l),_=await cR(p,l);return{baseBlob:f,baseImageData:h,maskBlob:m,maskImageData:_}},kMe=()=>{pe({actionCreator:g6e,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("canvas"),i=n(),o=await mT(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!o)return;const{maskBlob:a}=o;if(!a){r.error("Problem getting mask layer blob"),t(nt({title:K("toast.problemSavingMask"),description:K("toast.problemSavingMaskDesc"),status:"error"}));return}const{autoAddBoardId:s}=i.gallery;t(ue.endpoints.uploadImage.initiate({file:new File([a],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:K("toast.maskSavedAssets")}}}))}})},IMe=()=>{pe({actionCreator:_6e,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("canvas"),i=n(),{id:o}=e.payload,a=await mT(i.canvas.layerState,i.canvas.boundingBoxCoordinates,i.canvas.boundingBoxDimensions,i.canvas.isMaskEnabled,i.canvas.shouldPreserveMaskedArea);if(!a)return;const{maskBlob:s}=a;if(!s){r.error("Problem getting mask layer blob"),t(nt({title:K("toast.problemImportingMask"),description:K("toast.problemImportingMaskDesc"),status:"error"}));return}const{autoAddBoardId:l}=i.gallery,u=await t(ue.endpoints.uploadImage.initiate({file:new File([s],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!1,board_id:l==="none"?void 0:l,crop_visible:!1,postUploadAction:{type:"TOAST",toastOptions:{title:K("toast.maskSentControlnetAssets")}}})).unwrap(),{image_name:c}=u;t(Hl({id:o,controlImage:c}))}})},MMe=async()=>{const e=xS();if(!e)return;const t=e.clone();return t.scale({x:1,y:1}),ob(t,t.getClientRect())},RMe=()=>{pe({actionCreator:v6e,effect:async(e,{dispatch:t})=>{const n=Q_.get().child({namespace:"canvasCopiedToClipboardListener"}),r=await MMe();if(!r){n.error("Problem getting base layer blob"),t(nt({title:K("toast.problemMergingCanvas"),description:K("toast.problemMergingCanvasDesc"),status:"error"}));return}const i=xS();if(!i){n.error("Problem getting canvas base layer"),t(nt({title:K("toast.problemMergingCanvas"),description:K("toast.problemMergingCanvasDesc"),status:"error"}));return}const o=i.getClientRect({relativeTo:i.getParent()??void 0}),a=await t(ue.endpoints.uploadImage.initiate({file:new File([r],"mergedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!0,postUploadAction:{type:"TOAST",toastOptions:{title:K("toast.canvasMerged")}}})).unwrap(),{image_name:s}=a;t(ble({kind:"image",layer:"base",imageName:s,...o}))}})},OMe=()=>{pe({actionCreator:p6e,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("canvas"),i=n();let o;try{o=await wS(i)}catch(s){r.error(String(s)),t(nt({title:K("toast.problemSavingCanvas"),description:K("toast.problemSavingCanvasDesc"),status:"error"}));return}const{autoAddBoardId:a}=i.gallery;t(ue.endpoints.uploadImage.initiate({file:new File([o],"savedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!1,board_id:a==="none"?void 0:a,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:K("toast.canvasSavedGallery")}}}))}})},$Me=(e,t,n)=>{if(!(Eie.match(e)||p6.match(e)||Hl.match(e)||Aie.match(e)||g6.match(e)))return!1;const{id:i}=e.payload,o=ui(n.controlAdapters,i),a=ui(t.controlAdapters,i);if(!o||!hi(o)||!a||!hi(a)||g6.match(e)&&o.shouldAutoConfig===!0)return!1;const{controlImage:s,processorType:l,shouldAutoConfig:u}=a;return p6.match(e)&&!u?!1:l!=="none"&&!!s},NMe=()=>{pe({predicate:$Me,effect:async(e,{dispatch:t,cancelActiveListeners:n,delay:r})=>{const i=ae("session"),{id:o}=e.payload;n(),i.trace("ControlNet auto-process triggered"),await r(300),t(wE({id:o}))}})},pG=e=>(e==null?void 0:e.type)==="image_output",DMe=()=>{pe({actionCreator:wE,effect:async(e,{dispatch:t,getState:n,take:r})=>{var u;const i=ae("session"),{id:o}=e.payload,a=ui(n().controlAdapters,o);if(!(a!=null&&a.controlImage)||!hi(a)){i.error("Unable to process ControlNet image");return}if(a.processorType==="none"||a.processorNode.type==="none")return;const s=a.processorNode.id,l={prepend:!0,batch:{graph:{nodes:{[a.processorNode.id]:{...a.processorNode,is_intermediate:!0,use_cache:!1,image:{image_name:a.controlImage}}}},runs:1}};try{const c=t(ln.endpoints.enqueueBatch.initiate(l,{fixedCacheKey:"enqueueBatch"})),d=await c.unwrap();c.reset(),i.debug({enqueueResult:ft(d)},K("queue.graphQueued"));const[f]=await r(h=>bE.match(h)&&h.payload.data.queue_batch_id===d.batch.batch_id&&h.payload.data.source_node_id===s);if(pG(f.payload.data.result)){const{image_name:h}=f.payload.data.result.image,[{payload:p}]=await r(_=>ue.endpoints.getImageDTO.matchFulfilled(_)&&_.payload.image_name===h),m=p;i.debug({controlNetId:e.payload,processedControlImage:m},"ControlNet image processed"),t(EE({id:o,processedControlImage:m.image_name}))}}catch(c){if(i.error({enqueueBatchArg:ft(l)},K("queue.graphFailedToQueue")),c instanceof Object&&"data"in c&&"status"in c&&c.status===403){const d=((u=c.data)==null?void 0:u.detail)||"Unknown Error";t(nt({title:K("queue.graphFailedToQueue"),status:"error",description:d,duration:15e3})),t(Pie()),t(Hl({id:o,controlImage:null}));return}t(nt({title:K("queue.graphFailedToQueue"),status:"error"}))}}})},yT=ge("app/enqueueRequested");ge("app/batchEnqueued");const LMe=e=>{const t=window.open("");t&&e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},dR=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=i=>t(r.result),r.onerror=i=>n(r.error),r.onabort=i=>n(new Error("Read aborted")),r.readAsDataURL(e)}),FMe=e=>{let t=!0,n=!1;const r=e.length;let i=3;for(i;i{const t=e.length;let n=0;for(n;n{const{isPartiallyTransparent:n,isFullyTransparent:r}=FMe(e.data),i=BMe(t.data);return n?r?"txt2img":"outpaint":i?"inpaint":"img2img"},Se="positive_conditioning",we="negative_conditioning",le="denoise_latents",Kc="denoise_latents_hrf",xe="latents_to_image",tl="latents_to_image_hrf_hr",_u="latents_to_image_hrf_lr",Ah="image_to_latents_hrf",Us="resize_hrf",Qh="esrgan_hrf",Wu="linear_ui_output",xl="nsfw_checker",Nu="invisible_watermark",ve="noise",Th="noise_hrf",Mo="main_model_loader",m2="onnx_model_loader",ci="vae_loader",gG="lora_loader",st="clip_skip",Ft="image_to_latents",oa="resize_image",Ku="img2img_resize",se="canvas_output",kt="inpaint_image",jMe="scaled_inpaint_image",Vn="inpaint_image_resize_up",ir="inpaint_image_resize_down",rt="inpaint_infill",ts="inpaint_infill_resize_down",VMe="inpaint_final_image",Tt="inpaint_create_mask",UMe="inpaint_mask",Re="canvas_coherence_denoise_latents",tt="canvas_coherence_noise",Dl="canvas_coherence_noise_increment",sn="canvas_coherence_mask_edge",Je="canvas_coherence_inpaint_create_mask",Hd="tomask",gr="mask_blur",nr="mask_combine",Pt="mask_resize_up",vr="mask_resize_down",GMe="img_paste",Ph="control_net_collect",my="ip_adapter_collect",kh="t2i_adapter_collect",mi="core_metadata",Yh="esrgan",HMe="scale_image",mr="sdxl_model_loader",oe="sdxl_denoise_latents",fu="sdxl_refiner_model_loader",yy="sdxl_refiner_positive_conditioning",vy="sdxl_refiner_negative_conditioning",qo="sdxl_refiner_denoise_latents",Fi="refiner_inpaint_create_mask",kn="seamless",wo="refiner_seamless",qMe=[se,xe,tl,xl,Nu,Yh,Qh,Us,_u,Ku,kt,jMe,Vn,ir,rt,ts,VMe,Tt,UMe,GMe,HMe],mG="text_to_image_graph",k3="image_to_image_graph",yG="canvas_text_to_image_graph",I3="canvas_image_to_image_graph",y2="canvas_inpaint_graph",v2="canvas_outpaint_graph",vT="sdxl_text_to_image_graph",cb="sxdl_image_to_image_graph",b2="sdxl_canvas_text_to_image_graph",Ug="sdxl_canvas_image_to_image_graph",Ll="sdxl_canvas_inpaint_graph",Fl="sdxl_canvas_outpaint_graph",ks=(e,t,n)=>{e.nodes[mi]={id:mi,type:"core_metadata",...t},e.edges.push({source:{node_id:mi,field:"metadata"},destination:{node_id:n,field:"metadata"}})},Do=(e,t)=>{const n=e.nodes[mi];n&&Object.assign(n,t)},Ih=(e,t)=>{const n=e.nodes[mi];n&&delete n[t]},Mh=e=>!!e.nodes[mi],WMe=(e,t)=>{e.edges=e.edges.filter(n=>n.source.node_id!==mi),e.edges.push({source:{node_id:mi,field:"metadata"},destination:{node_id:t,field:"metadata"}})},eo=(e,t,n)=>{const r=yie(e.controlAdapters).filter(o=>{var a,s;return((a=o.model)==null?void 0:a.base_model)===((s=e.generation.model)==null?void 0:s.base_model)}),i=[];if(r.length){const o={id:Ph,type:"collect",is_intermediate:!0};t.nodes[Ph]=o,t.edges.push({source:{node_id:Ph,field:"collection"},destination:{node_id:n,field:"control"}}),Re in t.nodes&&t.edges.push({source:{node_id:Ph,field:"collection"},destination:{node_id:Re,field:"control"}}),r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,controlMode:f,resizeMode:h,model:p,processorType:m,weight:_}=a,v={id:`control_net_${s}`,type:"controlnet",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,control_mode:f,resize_mode:h,control_model:p,control_weight:_};if(u&&m!=="none")v.image={image_name:u};else if(l)v.image={image_name:l};else return;t.nodes[v.id]=v,i.push($f(v,["id","type","is_intermediate"])),t.edges.push({source:{node_id:v.id,field:"control"},destination:{node_id:Ph,field:"item"}})}),Do(t,{controlnets:i})}},to=(e,t,n)=>{const r=bie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:my,type:"collect",is_intermediate:!0};t.nodes[my]=i,t.edges.push({source:{node_id:my,field:"collection"},destination:{node_id:n,field:"ip_adapter"}}),Re in t.nodes&&t.edges.push({source:{node_id:my,field:"collection"},destination:{node_id:Re,field:"ip_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,weight:l,model:u,beginStepPct:c,endStepPct:d}=a,f={id:`ip_adapter_${s}`,type:"ip_adapter",is_intermediate:!0,weight:l,ip_adapter_model:u,begin_step_percent:c,end_step_percent:d};if(a.controlImage)f.image={image_name:a.controlImage};else return;t.nodes[f.id]=f,o.push($f(f,["id","type","is_intermediate"])),t.edges.push({source:{node_id:f.id,field:"ip_adapter"},destination:{node_id:i.id,field:"item"}})}),Do(t,{ipAdapters:o})}},Uf=(e,t,n,r=Mo)=>{const{loras:i}=e.lora,o=n_(i);if(o===0)return;t.edges=t.edges.filter(u=>!(u.source.node_id===r&&["unet"].includes(u.source.field))),t.edges=t.edges.filter(u=>!(u.source.node_id===st&&["clip"].includes(u.source.field)));let a="",s=0;const l=[];ps(i,u=>{const{model_name:c,base_model:d,weight:f}=u,h=`${gG}_${c.replace(".","_")}`,p={type:"lora_loader",id:h,is_intermediate:!0,lora:{model_name:c,base_model:d},weight:f};l.push({lora:{model_name:c,base_model:d},weight:f}),t.nodes[h]=p,s===0?(t.edges.push({source:{node_id:r,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:st,field:"clip"},destination:{node_id:h,field:"clip"}})):(t.edges.push({source:{node_id:a,field:"unet"},destination:{node_id:h,field:"unet"}}),t.edges.push({source:{node_id:a,field:"clip"},destination:{node_id:h,field:"clip"}})),s===o-1&&(t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[y2,v2].includes(t.id)&&t.edges.push({source:{node_id:h,field:"unet"},destination:{node_id:Re,field:"unet"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:Se,field:"clip"}}),t.edges.push({source:{node_id:h,field:"clip"},destination:{node_id:we,field:"clip"}})),a=h,s+=1}),Do(t,{loras:l})},no=(e,t,n=xe)=>{const r=t.nodes[n];if(!r)return;r.is_intermediate=!0,r.use_cache=!0;const i={id:xl,type:"img_nsfw",is_intermediate:!0};t.nodes[xl]=i,t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:xl,field:"image"}})},KMe=["txt2img","img2img","unifiedCanvas","nodes","modelManager","queue"],bT=Gn(e=>e,({ui:e})=>hE(e.activeTab)?e.activeTab:"txt2img"),AUe=Gn(e=>e,({ui:e,config:t})=>{const r=KMe.filter(i=>!t.disabledTabs.includes(i)).indexOf(e.activeTab);return r===-1?0:r}),TUe=Gn(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:pE}}),ro=(e,t)=>{const r=bT(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,{autoAddBoardId:i}=e.gallery,o={id:Wu,type:"linear_ui_output",is_intermediate:r,use_cache:!1,board:i==="none"?void 0:{board_id:i}};t.nodes[Wu]=o;const a={node_id:Wu,field:"image"};Nu in t.nodes?t.edges.push({source:{node_id:Nu,field:"image"},destination:a}):xl in t.nodes?t.edges.push({source:{node_id:xl,field:"image"},destination:a}):se in t.nodes?t.edges.push({source:{node_id:se,field:"image"},destination:a}):tl in t.nodes?t.edges.push({source:{node_id:tl,field:"image"},destination:a}):xe in t.nodes&&t.edges.push({source:{node_id:xe,field:"image"},destination:a})},io=(e,t,n)=>{const{seamlessXAxis:r,seamlessYAxis:i}=e.generation;t.nodes[kn]={id:kn,type:"seamless",seamless_x:r,seamless_y:i},r&&Do(t,{seamless_x:r}),i&&Do(t,{seamless_y:i});let o=le;(t.id===vT||t.id===cb||t.id===b2||t.id===Ug||t.id===Ll||t.id===Fl)&&(o=oe),t.edges=t.edges.filter(a=>!(a.source.node_id===n&&["unet"].includes(a.source.field))&&!(a.source.node_id===n&&["vae"].includes(a.source.field))),t.edges.push({source:{node_id:n,field:"unet"},destination:{node_id:kn,field:"unet"}},{source:{node_id:n,field:"vae"},destination:{node_id:kn,field:"vae"}},{source:{node_id:kn,field:"unet"},destination:{node_id:o,field:"unet"}}),(t.id==y2||t.id===v2||t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:kn,field:"unet"},destination:{node_id:Re,field:"unet"}})},oo=(e,t,n)=>{const r=Sie(e.controlAdapters).filter(i=>{var o,a;return((o=i.model)==null?void 0:o.base_model)===((a=e.generation.model)==null?void 0:a.base_model)});if(r.length){const i={id:kh,type:"collect",is_intermediate:!0};t.nodes[kh]=i,t.edges.push({source:{node_id:kh,field:"collection"},destination:{node_id:n,field:"t2i_adapter"}}),Re in t.nodes&&t.edges.push({source:{node_id:kh,field:"collection"},destination:{node_id:Re,field:"t2i_adapter"}});const o=[];r.forEach(a=>{if(!a.model)return;const{id:s,controlImage:l,processedControlImage:u,beginStepPct:c,endStepPct:d,resizeMode:f,model:h,processorType:p,weight:m}=a,_={id:`t2i_adapter_${s}`,type:"t2i_adapter",is_intermediate:!0,begin_step_percent:c,end_step_percent:d,resize_mode:f,t2i_adapter_model:h,weight:m};if(u&&p!=="none")_.image={image_name:u};else if(l)_.image={image_name:l};else return;t.nodes[_.id]=_,o.push($f(_,["id","type","is_intermediate"])),t.edges.push({source:{node_id:_.id,field:"t2i_adapter"},destination:{node_id:kh,field:"item"}})}),Do(t,{t2iAdapters:o})}},ao=(e,t,n=Mo)=>{const{vae:r,canvasCoherenceMode:i}=e.generation,{boundingBoxScaleMethod:o}=e.canvas,{shouldUseSDXLRefiner:a}=e.sdxl,s=["auto","manual"].includes(o),l=!r;l||(t.nodes[ci]={type:"vae_loader",id:ci,is_intermediate:!0,vae_model:r});const u=n==m2;(t.id===mG||t.id===k3||t.id===vT||t.id===cb)&&t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:xe,field:"vae"}}),(t.id===yG||t.id===I3||t.id===b2||t.id==Ug)&&t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:s?xe:se,field:"vae"}}),(t.id===k3||t.id===cb||t.id===I3||t.id===Ug)&&t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Ft,field:"vae"}}),(t.id===y2||t.id===v2||t.id===Ll||t.id===Fl)&&(t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:kt,field:"vae"}},{source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Tt,field:"vae"}},{source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:xe,field:"vae"}}),i!=="unmasked"&&t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Je,field:"vae"}})),a&&(t.id===Ll||t.id===Fl)&&t.edges.push({source:{node_id:l?n:ci,field:l&&u?"vae_decoder":"vae"},destination:{node_id:Fi,field:"vae"}}),r&&Do(t,{vae:r})},so=(e,t,n=xe)=>{const i=bT(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,o=t.nodes[n],a=t.nodes[xl];if(!o)return;const s={id:Nu,type:"img_watermark",is_intermediate:i};t.nodes[Nu]=s,o.is_intermediate=!0,o.use_cache=!0,a?(a.is_intermediate=!0,t.edges.push({source:{node_id:xl,field:"image"},destination:{node_id:Nu,field:"image"}})):t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:Nu,field:"image"}})},XMe=(e,t)=>{const n=ae("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,img2imgStrength:c,vaePrecision:d,clipSkip:f,shouldUseCpuNoise:h,seamlessXAxis:p,seamlessYAxis:m}=e.generation,{width:_,height:v}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:y,boundingBoxScaleMethod:g}=e.canvas,b=d==="fp32",S=!0,x=["auto","manual"].includes(g);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let w=Mo;const C=h,T={id:I3,nodes:{[w]:{type:"main_model_loader",id:w,is_intermediate:S,model:o},[st]:{type:"clip_skip",id:st,is_intermediate:S,skipped_layers:f},[Se]:{type:"compel",id:Se,is_intermediate:S,prompt:r},[we]:{type:"compel",id:we,is_intermediate:S,prompt:i},[ve]:{type:"noise",id:ve,is_intermediate:S,use_cpu:C,seed:l,width:x?y.width:_,height:x?y.height:v},[Ft]:{type:"i2l",id:Ft,is_intermediate:S},[le]:{type:"denoise_latents",id:le,is_intermediate:S,cfg_scale:a,scheduler:s,steps:u,denoising_start:1-c,denoising_end:1},[se]:{type:"l2i",id:se,is_intermediate:S}},edges:[{source:{node_id:w,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:w,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}},{source:{node_id:Ft,field:"latents"},destination:{node_id:le,field:"latents"}}]};return x?(T.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:S,image:t,width:y.width,height:y.height},T.nodes[xe]={id:xe,type:"l2i",is_intermediate:S,fp32:b},T.nodes[se]={id:se,type:"img_resize",is_intermediate:S,width:_,height:v},T.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Ft,field:"image"}},{source:{node_id:le,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}})):(T.nodes[se]={type:"l2i",id:se,is_intermediate:S,fp32:b},T.nodes[Ft].image=t,T.edges.push({source:{node_id:le,field:"latents"},destination:{node_id:se,field:"latents"}})),ks(T,{generation_mode:"img2img",cfg_scale:a,width:x?y.width:_,height:x?y.height:v,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:C?"cpu":"cuda",scheduler:s,clip_skip:f,strength:c,init_image:t.image_name},se),(p||m)&&(io(e,T,w),w=kn),Uf(e,T,le),ao(e,T,w),eo(e,T,le),to(e,T,le),oo(e,T,le),e.system.shouldUseNSFWChecker&&no(e,T,se),e.system.shouldUseWatermarker&&so(e,T,se),ro(e,T),T},QMe=(e,t,n)=>{const r=ae("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,maskBlurMethod:m,canvasCoherenceMode:_,canvasCoherenceSteps:v,canvasCoherenceStrength:y,clipSkip:g,seamlessXAxis:b,seamlessYAxis:S}=e.generation;if(!a)throw r.error("No Image found in state"),new Error("No Image found in state");const{width:x,height:w}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:C,boundingBoxScaleMethod:T}=e.canvas,A=!0,I=f==="fp32",D=["auto","manual"].includes(T);let M=Mo;const E=h,P={id:y2,nodes:{[M]:{type:"main_model_loader",id:M,is_intermediate:A,model:a},[st]:{type:"clip_skip",id:st,is_intermediate:A,skipped_layers:g},[Se]:{type:"compel",id:Se,is_intermediate:A,prompt:i},[we]:{type:"compel",id:we,is_intermediate:A,prompt:o},[gr]:{type:"img_blur",id:gr,is_intermediate:A,radius:p,blur_type:m},[kt]:{type:"i2l",id:kt,is_intermediate:A,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:E,seed:d,is_intermediate:A},[Tt]:{type:"create_denoise_mask",id:Tt,is_intermediate:A,fp32:I},[le]:{type:"denoise_latents",id:le,is_intermediate:A,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[tt]:{type:"noise",id:tt,use_cpu:E,seed:d+1,is_intermediate:A},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:A},[Re]:{type:"denoise_latents",id:Re,is_intermediate:A,steps:v,cfg_scale:s,scheduler:l,denoising_start:1-y,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:A,fp32:I},[se]:{type:"color_correct",id:se,is_intermediate:A,reference:t}},edges:[{source:{node_id:M,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:M,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}},{source:{node_id:kt,field:"latents"},destination:{node_id:le,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:Tt,field:"mask"}},{source:{node_id:Tt,field:"denoise_mask"},destination:{node_id:le,field:"denoise_mask"}},{source:{node_id:M,field:"unet"},destination:{node_id:Re,field:"unet"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:Re,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:Re,field:"negative_conditioning"}},{source:{node_id:tt,field:"noise"},destination:{node_id:Re,field:"noise"}},{source:{node_id:le,field:"latents"},destination:{node_id:Re,field:"latents"}},{source:{node_id:Re,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(D){const N=C.width,L=C.height;P.nodes[Vn]={type:"img_resize",id:Vn,is_intermediate:A,width:N,height:L,image:t},P.nodes[Pt]={type:"img_resize",id:Pt,is_intermediate:A,width:N,height:L,image:n},P.nodes[ir]={type:"img_resize",id:ir,is_intermediate:A,width:x,height:w},P.nodes[vr]={type:"img_resize",id:vr,is_intermediate:A,width:x,height:w},P.nodes[ve].width=N,P.nodes[ve].height=L,P.nodes[tt].width=N,P.nodes[tt].height=L,P.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Pt,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Vn,field:"image"},destination:{node_id:Tt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:ir,field:"image"}},{source:{node_id:ir,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:se,field:"mask"}})}else P.nodes[ve].width=x,P.nodes[ve].height=w,P.nodes[tt].width=x,P.nodes[tt].height=w,P.nodes[kt]={...P.nodes[kt],image:t},P.nodes[gr]={...P.nodes[gr],image:n},P.nodes[Tt]={...P.nodes[Tt],image:t},P.edges.push({source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:se,field:"mask"}});return _!=="unmasked"&&(P.nodes[Je]={type:"create_denoise_mask",id:Je,is_intermediate:A,fp32:I},D?P.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:Je,field:"image"}}):P.nodes[Je]={...P.nodes[Je],image:t},_==="mask"&&(D?P.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:Je,field:"mask"}}):P.nodes[Je]={...P.nodes[Je],mask:n}),_==="edge"&&(P.nodes[sn]={type:"mask_edge",id:sn,is_intermediate:A,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},D?P.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:sn,field:"image"}}):P.nodes[sn]={...P.nodes[sn],image:n},P.edges.push({source:{node_id:sn,field:"image"},destination:{node_id:Je,field:"mask"}})),P.edges.push({source:{node_id:Je,field:"denoise_mask"},destination:{node_id:Re,field:"denoise_mask"}})),(b||S)&&(io(e,P,M),M=kn),ao(e,P,M),Uf(e,P,le,M),eo(e,P,le),to(e,P,le),oo(e,P,le),e.system.shouldUseNSFWChecker&&no(e,P,se),e.system.shouldUseWatermarker&&so(e,P,se),ro(e,P),P},YMe=(e,t,n)=>{const r=ae("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,img2imgStrength:c,seed:d,vaePrecision:f,shouldUseCpuNoise:h,maskBlur:p,canvasCoherenceMode:m,canvasCoherenceSteps:_,canvasCoherenceStrength:v,infillTileSize:y,infillPatchmatchDownscaleSize:g,infillMethod:b,clipSkip:S,seamlessXAxis:x,seamlessYAxis:w}=e.generation;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:C,height:T}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:A,boundingBoxScaleMethod:I}=e.canvas,D=f==="fp32",M=!0,E=["auto","manual"].includes(I);let P=Mo;const N=h,L={id:v2,nodes:{[P]:{type:"main_model_loader",id:P,is_intermediate:M,model:a},[st]:{type:"clip_skip",id:st,is_intermediate:M,skipped_layers:S},[Se]:{type:"compel",id:Se,is_intermediate:M,prompt:i},[we]:{type:"compel",id:we,is_intermediate:M,prompt:o},[Hd]:{type:"tomask",id:Hd,is_intermediate:M,image:t},[nr]:{type:"mask_combine",id:nr,is_intermediate:M,mask2:n},[kt]:{type:"i2l",id:kt,is_intermediate:M,fp32:D},[ve]:{type:"noise",id:ve,use_cpu:N,seed:d,is_intermediate:M},[Tt]:{type:"create_denoise_mask",id:Tt,is_intermediate:M,fp32:D},[le]:{type:"denoise_latents",id:le,is_intermediate:M,steps:u,cfg_scale:s,scheduler:l,denoising_start:1-c,denoising_end:1},[tt]:{type:"noise",id:tt,use_cpu:N,seed:d+1,is_intermediate:M},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:M},[Re]:{type:"denoise_latents",id:Re,is_intermediate:M,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-v,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:M,fp32:D},[se]:{type:"color_correct",id:se,is_intermediate:M}},edges:[{source:{node_id:P,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:P,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:rt,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:nr,field:"mask1"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}},{source:{node_id:kt,field:"latents"},destination:{node_id:le,field:"latents"}},{source:{node_id:E?Pt:nr,field:"image"},destination:{node_id:Tt,field:"mask"}},{source:{node_id:Tt,field:"denoise_mask"},destination:{node_id:le,field:"denoise_mask"}},{source:{node_id:P,field:"unet"},destination:{node_id:Re,field:"unet"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:Re,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:Re,field:"negative_conditioning"}},{source:{node_id:tt,field:"noise"},destination:{node_id:Re,field:"noise"}},{source:{node_id:le,field:"latents"},destination:{node_id:Re,field:"latents"}},{source:{node_id:rt,field:"image"},destination:{node_id:Tt,field:"image"}},{source:{node_id:Re,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(b==="patchmatch"&&(L.nodes[rt]={type:"infill_patchmatch",id:rt,is_intermediate:M,downscale:g}),b==="lama"&&(L.nodes[rt]={type:"infill_lama",id:rt,is_intermediate:M}),b==="cv2"&&(L.nodes[rt]={type:"infill_cv2",id:rt,is_intermediate:M}),b==="tile"&&(L.nodes[rt]={type:"infill_tile",id:rt,is_intermediate:M,tile_size:y}),E){const O=A.width,R=A.height;L.nodes[Vn]={type:"img_resize",id:Vn,is_intermediate:M,width:O,height:R,image:t},L.nodes[Pt]={type:"img_resize",id:Pt,is_intermediate:M,width:O,height:R},L.nodes[ir]={type:"img_resize",id:ir,is_intermediate:M,width:C,height:T},L.nodes[ts]={type:"img_resize",id:ts,is_intermediate:M,width:C,height:T},L.nodes[vr]={type:"img_resize",id:vr,is_intermediate:M,width:C,height:T},L.nodes[ve].width=O,L.nodes[ve].height=R,L.nodes[tt].width=O,L.nodes[tt].height=R,L.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:rt,field:"image"}},{source:{node_id:nr,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:ir,field:"image"}},{source:{node_id:Pt,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:rt,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:se,field:"reference"}},{source:{node_id:ir,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:se,field:"mask"}})}else L.nodes[rt]={...L.nodes[rt],image:t},L.nodes[ve].width=C,L.nodes[ve].height=T,L.nodes[tt].width=C,L.nodes[tt].height=T,L.nodes[kt]={...L.nodes[kt],image:t},L.edges.push({source:{node_id:rt,field:"image"},destination:{node_id:se,field:"reference"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:nr,field:"image"},destination:{node_id:se,field:"mask"}});return m!=="unmasked"&&(L.nodes[Je]={type:"create_denoise_mask",id:Je,is_intermediate:M,fp32:D},L.edges.push({source:{node_id:rt,field:"image"},destination:{node_id:Je,field:"image"}}),m==="mask"&&(E?L.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:Je,field:"mask"}}):L.edges.push({source:{node_id:nr,field:"image"},destination:{node_id:Je,field:"mask"}})),m==="edge"&&(L.nodes[sn]={type:"mask_edge",id:sn,is_intermediate:M,edge_blur:p,edge_size:p*2,low_threshold:100,high_threshold:200},E?L.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:sn,field:"image"}}):L.edges.push({source:{node_id:nr,field:"image"},destination:{node_id:sn,field:"image"}}),L.edges.push({source:{node_id:sn,field:"image"},destination:{node_id:Je,field:"mask"}})),L.edges.push({source:{node_id:Je,field:"denoise_mask"},destination:{node_id:Re,field:"denoise_mask"}})),(x||w)&&(io(e,L,P),P=kn),ao(e,L,P),Uf(e,L,le,P),eo(e,L,le),to(e,L,le),oo(e,L,le),e.system.shouldUseNSFWChecker&&no(e,L,se),e.system.shouldUseWatermarker&&so(e,L,se),ro(e,L),L},Gf=(e,t,n,r=mr)=>{const{loras:i}=e.lora,o=n_(i);if(o===0)return;const a=[],s=r;let l=r;[kn,Fi].includes(r)&&(l=mr),t.edges=t.edges.filter(d=>!(d.source.node_id===s&&["unet"].includes(d.source.field))&&!(d.source.node_id===l&&["clip"].includes(d.source.field))&&!(d.source.node_id===l&&["clip2"].includes(d.source.field)));let u="",c=0;ps(i,d=>{const{model_name:f,base_model:h,weight:p}=d,m=`${gG}_${f.replace(".","_")}`,_={type:"sdxl_lora_loader",id:m,is_intermediate:!0,lora:{model_name:f,base_model:h},weight:p};a.push(NF.parse({lora:{model_name:f,base_model:h},weight:p})),t.nodes[m]=_,c===0?(t.edges.push({source:{node_id:s,field:"unet"},destination:{node_id:m,field:"unet"}}),t.edges.push({source:{node_id:l,field:"clip"},destination:{node_id:m,field:"clip"}}),t.edges.push({source:{node_id:l,field:"clip2"},destination:{node_id:m,field:"clip2"}})):(t.edges.push({source:{node_id:u,field:"unet"},destination:{node_id:m,field:"unet"}}),t.edges.push({source:{node_id:u,field:"clip"},destination:{node_id:m,field:"clip"}}),t.edges.push({source:{node_id:u,field:"clip2"},destination:{node_id:m,field:"clip2"}})),c===o-1&&(t.edges.push({source:{node_id:m,field:"unet"},destination:{node_id:n,field:"unet"}}),t.id&&[Ll,Fl].includes(t.id)&&t.edges.push({source:{node_id:m,field:"unet"},destination:{node_id:Re,field:"unet"}}),t.edges.push({source:{node_id:m,field:"clip"},destination:{node_id:Se,field:"clip"}}),t.edges.push({source:{node_id:m,field:"clip"},destination:{node_id:we,field:"clip"}}),t.edges.push({source:{node_id:m,field:"clip2"},destination:{node_id:Se,field:"clip2"}}),t.edges.push({source:{node_id:m,field:"clip2"},destination:{node_id:we,field:"clip2"}})),u=m,c+=1}),Do(t,{loras:a})},wc=(e,t)=>{const{positivePrompt:n,negativePrompt:r}=e.generation,{positiveStylePrompt:i,negativeStylePrompt:o,shouldConcatSDXLStylePrompt:a}=e.sdxl,s=a||t?[n,i].join(" "):i,l=a||t?[r,o].join(" "):o;return{joinedPositiveStylePrompt:s,joinedNegativeStylePrompt:l}},Hf=(e,t,n,r,i,o)=>{const{refinerModel:a,refinerPositiveAestheticScore:s,refinerNegativeAestheticScore:l,refinerSteps:u,refinerScheduler:c,refinerCFGScale:d,refinerStart:f}=e.sdxl,{seamlessXAxis:h,seamlessYAxis:p,vaePrecision:m}=e.generation,{boundingBoxScaleMethod:_}=e.canvas,v=m==="fp32",y=["auto","manual"].includes(_);if(!a)return;Do(t,{refiner_model:a,refiner_positive_aesthetic_score:s,refiner_negative_aesthetic_score:l,refiner_cfg_scale:d,refiner_scheduler:c,refiner_start:f,refiner_steps:u});const g=r||mr,{joinedPositiveStylePrompt:b,joinedNegativeStylePrompt:S}=wc(e,!0);t.edges=t.edges.filter(x=>!(x.source.node_id===n&&["latents"].includes(x.source.field))),t.edges=t.edges.filter(x=>!(x.source.node_id===g&&["vae"].includes(x.source.field))),t.nodes[fu]={type:"sdxl_refiner_model_loader",id:fu,model:a},t.nodes[yy]={type:"sdxl_refiner_compel_prompt",id:yy,style:b,aesthetic_score:s},t.nodes[vy]={type:"sdxl_refiner_compel_prompt",id:vy,style:S,aesthetic_score:l},t.nodes[qo]={type:"denoise_latents",id:qo,cfg_scale:d,steps:u,scheduler:c,denoising_start:f,denoising_end:1},h||p?(t.nodes[wo]={id:wo,type:"seamless",seamless_x:h,seamless_y:p},t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:wo,field:"unet"}},{source:{node_id:fu,field:"vae"},destination:{node_id:wo,field:"vae"}},{source:{node_id:wo,field:"unet"},destination:{node_id:qo,field:"unet"}})):t.edges.push({source:{node_id:fu,field:"unet"},destination:{node_id:qo,field:"unet"}}),t.edges.push({source:{node_id:fu,field:"clip2"},destination:{node_id:yy,field:"clip2"}},{source:{node_id:fu,field:"clip2"},destination:{node_id:vy,field:"clip2"}},{source:{node_id:yy,field:"conditioning"},destination:{node_id:qo,field:"positive_conditioning"}},{source:{node_id:vy,field:"conditioning"},destination:{node_id:qo,field:"negative_conditioning"}},{source:{node_id:n,field:"latents"},destination:{node_id:qo,field:"latents"}}),(t.id===Ll||t.id===Fl)&&(t.nodes[Fi]={type:"create_denoise_mask",id:Fi,is_intermediate:!0,fp32:v},y?t.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:Fi,field:"image"}}):t.nodes[Fi]={...t.nodes[Fi],image:i},t.id===Ll&&(y?t.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:Fi,field:"mask"}}):t.nodes[Fi]={...t.nodes[Fi],mask:o}),t.id===Fl&&t.edges.push({source:{node_id:y?Pt:nr,field:"image"},destination:{node_id:Fi,field:"mask"}}),t.edges.push({source:{node_id:Fi,field:"denoise_mask"},destination:{node_id:qo,field:"denoise_mask"}})),t.id===b2||t.id===Ug?t.edges.push({source:{node_id:qo,field:"latents"},destination:{node_id:y?xe:se,field:"latents"}}):t.edges.push({source:{node_id:qo,field:"latents"},destination:{node_id:xe,field:"latents"}})},ZMe=(e,t)=>{const n=ae("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:a,scheduler:s,seed:l,steps:u,vaePrecision:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{shouldUseSDXLRefiner:p,refinerStart:m,sdxlImg2ImgDenoisingStrength:_}=e.sdxl,{width:v,height:y}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:g,boundingBoxScaleMethod:b}=e.canvas,S=c==="fp32",x=!0,w=["auto","manual"].includes(b);if(!o)throw n.error("No model found in state"),new Error("No model found in state");let C=mr;const T=d,{joinedPositiveStylePrompt:A,joinedNegativeStylePrompt:I}=wc(e),D={id:Ug,nodes:{[C]:{type:"sdxl_model_loader",id:C,model:o},[Se]:{type:"sdxl_compel_prompt",id:Se,prompt:r,style:A},[we]:{type:"sdxl_compel_prompt",id:we,prompt:i,style:I},[ve]:{type:"noise",id:ve,is_intermediate:x,use_cpu:T,seed:l,width:w?g.width:v,height:w?g.height:y},[Ft]:{type:"i2l",id:Ft,is_intermediate:x,fp32:S},[oe]:{type:"denoise_latents",id:oe,is_intermediate:x,cfg_scale:a,scheduler:s,steps:u,denoising_start:p?Math.min(m,1-_):1-_,denoising_end:p?m:1}},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:C,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}},{source:{node_id:Ft,field:"latents"},destination:{node_id:oe,field:"latents"}}]};return w?(D.nodes[Ku]={id:Ku,type:"img_resize",is_intermediate:x,image:t,width:g.width,height:g.height},D.nodes[xe]={id:xe,type:"l2i",is_intermediate:x,fp32:S},D.nodes[se]={id:se,type:"img_resize",is_intermediate:x,width:v,height:y},D.edges.push({source:{node_id:Ku,field:"image"},destination:{node_id:Ft,field:"image"}},{source:{node_id:oe,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}})):(D.nodes[se]={type:"l2i",id:se,is_intermediate:x,fp32:S},D.nodes[Ft].image=t,D.edges.push({source:{node_id:oe,field:"latents"},destination:{node_id:se,field:"latents"}})),ks(D,{generation_mode:"img2img",cfg_scale:a,width:w?g.width:v,height:w?g.height:y,positive_prompt:r,negative_prompt:i,model:o,seed:l,steps:u,rand_device:T?"cpu":"cuda",scheduler:s,strength:_,init_image:t.image_name},se),(f||h)&&(io(e,D,C),C=kn),p&&(Hf(e,D,oe,C),(f||h)&&(C=wo)),ao(e,D,C),Gf(e,D,oe,C),eo(e,D,oe),to(e,D,oe),oo(e,D,oe),e.system.shouldUseNSFWChecker&&no(e,D,se),e.system.shouldUseWatermarker&&so(e,D,se),ro(e,D),D},JMe=(e,t,n)=>{const r=ae("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,maskBlurMethod:p,canvasCoherenceMode:m,canvasCoherenceSteps:_,canvasCoherenceStrength:v,seamlessXAxis:y,seamlessYAxis:g}=e.generation,{sdxlImg2ImgDenoisingStrength:b,shouldUseSDXLRefiner:S,refinerStart:x}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:w,height:C}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:T,boundingBoxScaleMethod:A}=e.canvas,I=d==="fp32",D=!0,M=["auto","manual"].includes(A);let E=mr;const P=f,{joinedPositiveStylePrompt:N,joinedNegativeStylePrompt:L}=wc(e),O={id:Ll,nodes:{[E]:{type:"sdxl_model_loader",id:E,model:a},[Se]:{type:"sdxl_compel_prompt",id:Se,prompt:i,style:N},[we]:{type:"sdxl_compel_prompt",id:we,prompt:o,style:L},[gr]:{type:"img_blur",id:gr,is_intermediate:D,radius:h,blur_type:p},[kt]:{type:"i2l",id:kt,is_intermediate:D,fp32:I},[ve]:{type:"noise",id:ve,use_cpu:P,seed:c,is_intermediate:D},[Tt]:{type:"create_denoise_mask",id:Tt,is_intermediate:D,fp32:I},[oe]:{type:"denoise_latents",id:oe,is_intermediate:D,steps:u,cfg_scale:s,scheduler:l,denoising_start:S?Math.min(x,1-b):1-b,denoising_end:S?x:1},[tt]:{type:"noise",id:tt,use_cpu:P,seed:c+1,is_intermediate:D},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:D},[Re]:{type:"denoise_latents",id:Re,is_intermediate:D,steps:_,cfg_scale:s,scheduler:l,denoising_start:1-v,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:D,fp32:I},[se]:{type:"color_correct",id:se,is_intermediate:D,reference:t}},edges:[{source:{node_id:E,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:E,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:E,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:E,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:E,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}},{source:{node_id:kt,field:"latents"},destination:{node_id:oe,field:"latents"}},{source:{node_id:gr,field:"image"},destination:{node_id:Tt,field:"mask"}},{source:{node_id:Tt,field:"denoise_mask"},destination:{node_id:oe,field:"denoise_mask"}},{source:{node_id:E,field:"unet"},destination:{node_id:Re,field:"unet"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:Re,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:Re,field:"negative_conditioning"}},{source:{node_id:tt,field:"noise"},destination:{node_id:Re,field:"noise"}},{source:{node_id:oe,field:"latents"},destination:{node_id:Re,field:"latents"}},{source:{node_id:Re,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(M){const R=T.width,$=T.height;O.nodes[Vn]={type:"img_resize",id:Vn,is_intermediate:D,width:R,height:$,image:t},O.nodes[Pt]={type:"img_resize",id:Pt,is_intermediate:D,width:R,height:$,image:n},O.nodes[ir]={type:"img_resize",id:ir,is_intermediate:D,width:w,height:C},O.nodes[vr]={type:"img_resize",id:vr,is_intermediate:D,width:w,height:C},O.nodes[ve].width=R,O.nodes[ve].height=$,O.nodes[tt].width=R,O.nodes[tt].height=$,O.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Pt,field:"image"},destination:{node_id:gr,field:"image"}},{source:{node_id:Vn,field:"image"},destination:{node_id:Tt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:ir,field:"image"}},{source:{node_id:ir,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:se,field:"mask"}})}else O.nodes[ve].width=w,O.nodes[ve].height=C,O.nodes[tt].width=w,O.nodes[tt].height=C,O.nodes[kt]={...O.nodes[kt],image:t},O.nodes[gr]={...O.nodes[gr],image:n},O.nodes[Tt]={...O.nodes[Tt],image:t},O.edges.push({source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:gr,field:"image"},destination:{node_id:se,field:"mask"}});return m!=="unmasked"&&(O.nodes[Je]={type:"create_denoise_mask",id:Je,is_intermediate:D,fp32:I},M?O.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:Je,field:"image"}}):O.nodes[Je]={...O.nodes[Je],image:t},m==="mask"&&(M?O.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:Je,field:"mask"}}):O.nodes[Je]={...O.nodes[Je],mask:n}),m==="edge"&&(O.nodes[sn]={type:"mask_edge",id:sn,is_intermediate:D,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},M?O.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:sn,field:"image"}}):O.nodes[sn]={...O.nodes[sn],image:n},O.edges.push({source:{node_id:sn,field:"image"},destination:{node_id:Je,field:"mask"}})),O.edges.push({source:{node_id:Je,field:"denoise_mask"},destination:{node_id:Re,field:"denoise_mask"}})),(y||g)&&(io(e,O,E),E=kn),S&&(Hf(e,O,Re,E,t,n),(y||g)&&(E=wo)),ao(e,O,E),Gf(e,O,oe,E),eo(e,O,oe),to(e,O,oe),oo(e,O,oe),e.system.shouldUseNSFWChecker&&no(e,O,se),e.system.shouldUseWatermarker&&so(e,O,se),ro(e,O),O},eRe=(e,t,n)=>{const r=ae("nodes"),{positivePrompt:i,negativePrompt:o,model:a,cfgScale:s,scheduler:l,steps:u,seed:c,vaePrecision:d,shouldUseCpuNoise:f,maskBlur:h,canvasCoherenceMode:p,canvasCoherenceSteps:m,canvasCoherenceStrength:_,infillTileSize:v,infillPatchmatchDownscaleSize:y,infillMethod:g,seamlessXAxis:b,seamlessYAxis:S}=e.generation,{sdxlImg2ImgDenoisingStrength:x,shouldUseSDXLRefiner:w,refinerStart:C}=e.sdxl;if(!a)throw r.error("No model found in state"),new Error("No model found in state");const{width:T,height:A}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:I,boundingBoxScaleMethod:D}=e.canvas,M=d==="fp32",E=!0,P=["auto","manual"].includes(D);let N=mr;const L=f,{joinedPositiveStylePrompt:O,joinedNegativeStylePrompt:R}=wc(e),$={id:Fl,nodes:{[mr]:{type:"sdxl_model_loader",id:mr,model:a},[Se]:{type:"sdxl_compel_prompt",id:Se,prompt:i,style:O},[we]:{type:"sdxl_compel_prompt",id:we,prompt:o,style:R},[Hd]:{type:"tomask",id:Hd,is_intermediate:E,image:t},[nr]:{type:"mask_combine",id:nr,is_intermediate:E,mask2:n},[kt]:{type:"i2l",id:kt,is_intermediate:E,fp32:M},[ve]:{type:"noise",id:ve,use_cpu:L,seed:c,is_intermediate:E},[Tt]:{type:"create_denoise_mask",id:Tt,is_intermediate:E,fp32:M},[oe]:{type:"denoise_latents",id:oe,is_intermediate:E,steps:u,cfg_scale:s,scheduler:l,denoising_start:w?Math.min(C,1-x):1-x,denoising_end:w?C:1},[tt]:{type:"noise",id:tt,use_cpu:L,seed:c+1,is_intermediate:E},[Dl]:{type:"add",id:Dl,b:1,is_intermediate:E},[Re]:{type:"denoise_latents",id:Re,is_intermediate:E,steps:m,cfg_scale:s,scheduler:l,denoising_start:1-_,denoising_end:1},[xe]:{type:"l2i",id:xe,is_intermediate:E,fp32:M},[se]:{type:"color_correct",id:se,is_intermediate:E}},edges:[{source:{node_id:mr,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:mr,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:mr,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:mr,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:rt,field:"image"},destination:{node_id:kt,field:"image"}},{source:{node_id:Hd,field:"image"},destination:{node_id:nr,field:"mask1"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}},{source:{node_id:kt,field:"latents"},destination:{node_id:oe,field:"latents"}},{source:{node_id:P?Pt:nr,field:"image"},destination:{node_id:Tt,field:"mask"}},{source:{node_id:Tt,field:"denoise_mask"},destination:{node_id:oe,field:"denoise_mask"}},{source:{node_id:N,field:"unet"},destination:{node_id:Re,field:"unet"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:Re,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:Re,field:"negative_conditioning"}},{source:{node_id:tt,field:"noise"},destination:{node_id:Re,field:"noise"}},{source:{node_id:oe,field:"latents"},destination:{node_id:Re,field:"latents"}},{source:{node_id:rt,field:"image"},destination:{node_id:Tt,field:"image"}},{source:{node_id:Re,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(g==="patchmatch"&&($.nodes[rt]={type:"infill_patchmatch",id:rt,is_intermediate:E,downscale:y}),g==="lama"&&($.nodes[rt]={type:"infill_lama",id:rt,is_intermediate:E}),g==="cv2"&&($.nodes[rt]={type:"infill_cv2",id:rt,is_intermediate:E}),g==="tile"&&($.nodes[rt]={type:"infill_tile",id:rt,is_intermediate:E,tile_size:v}),P){const z=I.width,V=I.height;$.nodes[Vn]={type:"img_resize",id:Vn,is_intermediate:E,width:z,height:V,image:t},$.nodes[Pt]={type:"img_resize",id:Pt,is_intermediate:E,width:z,height:V},$.nodes[ir]={type:"img_resize",id:ir,is_intermediate:E,width:T,height:A},$.nodes[ts]={type:"img_resize",id:ts,is_intermediate:E,width:T,height:A},$.nodes[vr]={type:"img_resize",id:vr,is_intermediate:E,width:T,height:A},$.nodes[ve].width=z,$.nodes[ve].height=V,$.nodes[tt].width=z,$.nodes[tt].height=V,$.edges.push({source:{node_id:Vn,field:"image"},destination:{node_id:rt,field:"image"}},{source:{node_id:nr,field:"image"},destination:{node_id:Pt,field:"image"}},{source:{node_id:xe,field:"image"},destination:{node_id:ir,field:"image"}},{source:{node_id:Pt,field:"image"},destination:{node_id:vr,field:"image"}},{source:{node_id:rt,field:"image"},destination:{node_id:ts,field:"image"}},{source:{node_id:ts,field:"image"},destination:{node_id:se,field:"reference"}},{source:{node_id:ir,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:vr,field:"image"},destination:{node_id:se,field:"mask"}})}else $.nodes[rt]={...$.nodes[rt],image:t},$.nodes[ve].width=T,$.nodes[ve].height=A,$.nodes[tt].width=T,$.nodes[tt].height=A,$.nodes[kt]={...$.nodes[kt],image:t},$.edges.push({source:{node_id:rt,field:"image"},destination:{node_id:se,field:"reference"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}},{source:{node_id:nr,field:"image"},destination:{node_id:se,field:"mask"}});return p!=="unmasked"&&($.nodes[Je]={type:"create_denoise_mask",id:Je,is_intermediate:E,fp32:M},$.edges.push({source:{node_id:rt,field:"image"},destination:{node_id:Je,field:"image"}}),p==="mask"&&(P?$.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:Je,field:"mask"}}):$.edges.push({source:{node_id:nr,field:"image"},destination:{node_id:Je,field:"mask"}})),p==="edge"&&($.nodes[sn]={type:"mask_edge",id:sn,is_intermediate:E,edge_blur:h,edge_size:h*2,low_threshold:100,high_threshold:200},P?$.edges.push({source:{node_id:Pt,field:"image"},destination:{node_id:sn,field:"image"}}):$.edges.push({source:{node_id:nr,field:"image"},destination:{node_id:sn,field:"image"}}),$.edges.push({source:{node_id:sn,field:"image"},destination:{node_id:Je,field:"mask"}})),$.edges.push({source:{node_id:Je,field:"denoise_mask"},destination:{node_id:Re,field:"denoise_mask"}})),(b||S)&&(io(e,$,N),N=kn),w&&(Hf(e,$,Re,N,t),(b||S)&&(N=wo)),ao(e,$,N),Gf(e,$,oe,N),eo(e,$,oe),to(e,$,oe),oo(e,$,oe),e.system.shouldUseNSFWChecker&&no(e,$,se),e.system.shouldUseWatermarker&&so(e,$,se),ro(e,$),$},tRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,shouldUseCpuNoise:c,seamlessXAxis:d,seamlessYAxis:f}=e.generation,{width:h,height:p}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:m,boundingBoxScaleMethod:_}=e.canvas,v=u==="fp32",y=!0,g=["auto","manual"].includes(_),{shouldUseSDXLRefiner:b,refinerStart:S}=e.sdxl;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const x=c,w=i.model_type==="onnx";let C=w?m2:mr;const T=w?"onnx_model_loader":"sdxl_model_loader",A=w?{type:"t2l_onnx",id:oe,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:oe,is_intermediate:y,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:b?S:1},{joinedPositiveStylePrompt:I,joinedNegativeStylePrompt:D}=wc(e),M={id:b2,nodes:{[C]:{type:T,id:C,is_intermediate:y,model:i},[Se]:{type:w?"prompt_onnx":"sdxl_compel_prompt",id:Se,is_intermediate:y,prompt:n,style:I},[we]:{type:w?"prompt_onnx":"sdxl_compel_prompt",id:we,is_intermediate:y,prompt:r,style:D},[ve]:{type:"noise",id:ve,is_intermediate:y,seed:s,width:g?m.width:h,height:g?m.height:p,use_cpu:x},[A.id]:A},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:C,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}}]};return g?(M.nodes[xe]={id:xe,type:w?"l2i_onnx":"l2i",is_intermediate:y,fp32:v},M.nodes[se]={id:se,type:"img_resize",is_intermediate:y,width:h,height:p},M.edges.push({source:{node_id:oe,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}})):(M.nodes[se]={type:w?"l2i_onnx":"l2i",id:se,is_intermediate:y,fp32:v},M.edges.push({source:{node_id:oe,field:"latents"},destination:{node_id:se,field:"latents"}})),ks(M,{generation_mode:"txt2img",cfg_scale:o,width:g?m.width:h,height:g?m.height:p,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:x?"cpu":"cuda",scheduler:a},se),(d||f)&&(io(e,M,C),C=kn),b&&(Hf(e,M,oe,C),(d||f)&&(C=wo)),Gf(e,M,oe,C),ao(e,M,C),eo(e,M,oe),to(e,M,oe),oo(e,M,oe),e.system.shouldUseNSFWChecker&&no(e,M,se),e.system.shouldUseWatermarker&&so(e,M,se),ro(e,M),M},nRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,vaePrecision:u,clipSkip:c,shouldUseCpuNoise:d,seamlessXAxis:f,seamlessYAxis:h}=e.generation,{width:p,height:m}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:_,boundingBoxScaleMethod:v}=e.canvas,y=u==="fp32",g=!0,b=["auto","manual"].includes(v);if(!i)throw t.error("No model found in state"),new Error("No model found in state");const S=d,x=i.model_type==="onnx";let w=x?m2:Mo;const C=x?"onnx_model_loader":"main_model_loader",T=x?{type:"t2l_onnx",id:le,is_intermediate:g,cfg_scale:o,scheduler:a,steps:l}:{type:"denoise_latents",id:le,is_intermediate:g,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:1},A={id:yG,nodes:{[w]:{type:C,id:w,is_intermediate:g,model:i},[st]:{type:"clip_skip",id:st,is_intermediate:g,skipped_layers:c},[Se]:{type:x?"prompt_onnx":"compel",id:Se,is_intermediate:g,prompt:n},[we]:{type:x?"prompt_onnx":"compel",id:we,is_intermediate:g,prompt:r},[ve]:{type:"noise",id:ve,is_intermediate:g,seed:s,width:b?_.width:p,height:b?_.height:m,use_cpu:S},[T.id]:T},edges:[{source:{node_id:w,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:w,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}}]};return b?(A.nodes[xe]={id:xe,type:x?"l2i_onnx":"l2i",is_intermediate:g,fp32:y},A.nodes[se]={id:se,type:"img_resize",is_intermediate:g,width:p,height:m},A.edges.push({source:{node_id:le,field:"latents"},destination:{node_id:xe,field:"latents"}},{source:{node_id:xe,field:"image"},destination:{node_id:se,field:"image"}})):(A.nodes[se]={type:x?"l2i_onnx":"l2i",id:se,is_intermediate:g,fp32:y},A.edges.push({source:{node_id:le,field:"latents"},destination:{node_id:se,field:"latents"}})),ks(A,{generation_mode:"txt2img",cfg_scale:o,width:b?_.width:p,height:b?_.height:m,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:S?"cpu":"cuda",scheduler:a,clip_skip:c},se),(f||h)&&(io(e,A,w),w=kn),ao(e,A,w),Uf(e,A,le,w),eo(e,A,le),to(e,A,le),oo(e,A,le),e.system.shouldUseNSFWChecker&&no(e,A,se),e.system.shouldUseWatermarker&&so(e,A,se),ro(e,A),A},rRe=(e,t,n,r)=>{let i;if(t==="txt2img")e.generation.model&&e.generation.model.base_model==="sdxl"?i=tRe(e):i=nRe(e);else if(t==="img2img"){if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=ZMe(e,n):i=XMe(e,n)}else if(t==="inpaint"){if(!n||!r)throw new Error("Missing canvas init and mask images");e.generation.model&&e.generation.model.base_model==="sdxl"?i=JMe(e,n,r):i=QMe(e,n,r)}else{if(!n)throw new Error("Missing canvas init image");e.generation.model&&e.generation.model.base_model==="sdxl"?i=eRe(e,n,r):i=YMe(e,n,r)}return i},qw=({count:e,start:t,min:n=Rie,max:r=dp})=>{const i=t??yre(n,r),o=[];for(let a=i;a{const{iterations:r,model:i,shouldRandomizeSeed:o,seed:a}=e.generation,{shouldConcatSDXLStylePrompt:s,positiveStylePrompt:l}=e.sdxl,{prompts:u,seedBehaviour:c}=e.dynamicPrompts,d=[];if(u.length===1){const h=qw({count:r,start:o?void 0:a}),p=[];t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:h}),Mh(t)&&(Ih(t,"seed"),p.push({node_path:mi,field_name:"seed",items:h})),t.nodes[tt]&&p.push({node_path:tt,field_name:"seed",items:h.map(m=>(m+1)%dp)}),d.push(p)}else{const h=[],p=[];if(c==="PER_PROMPT"){const _=qw({count:u.length*r,start:o?void 0:a});t.nodes[ve]&&h.push({node_path:ve,field_name:"seed",items:_}),Mh(t)&&(Ih(t,"seed"),h.push({node_path:mi,field_name:"seed",items:_})),t.nodes[tt]&&h.push({node_path:tt,field_name:"seed",items:_.map(v=>(v+1)%dp)})}else{const _=qw({count:r,start:o?void 0:a});t.nodes[ve]&&p.push({node_path:ve,field_name:"seed",items:_}),Mh(t)&&(Ih(t,"seed"),p.push({node_path:mi,field_name:"seed",items:_})),t.nodes[tt]&&p.push({node_path:tt,field_name:"seed",items:_.map(v=>(v+1)%dp)}),d.push(p)}const m=c==="PER_PROMPT"?wre(r).flatMap(()=>u):u;if(t.nodes[Se]&&h.push({node_path:Se,field_name:"prompt",items:m}),Mh(t)&&(Ih(t,"positive_prompt"),h.push({node_path:mi,field_name:"positive_prompt",items:m})),s&&(i==null?void 0:i.base_model)==="sdxl"){const _=m.map(v=>[v,l].join(" "));t.nodes[Se]&&h.push({node_path:Se,field_name:"style",items:_}),Mh(t)&&(Ih(t,"positive_style_prompt"),h.push({node_path:mi,field_name:"positive_style_prompt",items:m}))}d.push(h)}return{prepend:n,batch:{graph:t,runs:1,data:d}}},iRe=()=>{pe({predicate:e=>yT.match(e)&&e.payload.tabName==="unifiedCanvas",effect:async(e,{getState:t,dispatch:n})=>{const r=ae("queue"),{prepend:i}=e.payload,o=t(),{layerState:a,boundingBoxCoordinates:s,boundingBoxDimensions:l,isMaskEnabled:u,shouldPreserveMaskedArea:c}=o.canvas,d=await mT(a,s,l,u,c);if(!d){r.error("Unable to create canvas data");return}const{baseBlob:f,baseImageData:h,maskBlob:p,maskImageData:m}=d,_=zMe(h,m);if(o.system.enableImageDebugging){const S=await dR(f),x=await dR(p);LMe([{base64:x,caption:"mask b64"},{base64:S,caption:"image b64"}])}r.debug(`Generation mode: ${_}`);let v,y;["img2img","inpaint","outpaint"].includes(_)&&(v=await n(ue.endpoints.uploadImage.initiate({file:new File([f],"canvasInitImage.png",{type:"image/png"}),image_category:"general",is_intermediate:!0})).unwrap()),["inpaint","outpaint"].includes(_)&&(y=await n(ue.endpoints.uploadImage.initiate({file:new File([p],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!0})).unwrap());const g=rRe(o,_,v,y);r.debug({graph:ft(g)},"Canvas graph built"),n(zz(g));const b=vG(o,g,i);try{const S=n(ln.endpoints.enqueueBatch.initiate(b,{fixedCacheKey:"enqueueBatch"})),x=await S.unwrap();S.reset();const w=x.batch.batch_id;o.canvas.layerState.stagingArea.boundingBox||n(_le({boundingBox:{...o.canvas.boundingBoxCoordinates,...o.canvas.boundingBoxDimensions}})),n(Sle(w))}catch{}}})},oRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,img2imgStrength:c,shouldFitToWidthHeight:d,width:f,height:h,clipSkip:p,shouldUseCpuNoise:m,vaePrecision:_,seamlessXAxis:v,seamlessYAxis:y}=e.generation;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const g=_==="fp32",b=!0;let S=Mo;const x=m,w={id:k3,nodes:{[S]:{type:"main_model_loader",id:S,model:i,is_intermediate:b},[st]:{type:"clip_skip",id:st,skipped_layers:p,is_intermediate:b},[Se]:{type:"compel",id:Se,prompt:n,is_intermediate:b},[we]:{type:"compel",id:we,prompt:r,is_intermediate:b},[ve]:{type:"noise",id:ve,use_cpu:x,seed:s,is_intermediate:b},[xe]:{type:"l2i",id:xe,fp32:g,is_intermediate:b},[le]:{type:"denoise_latents",id:le,cfg_scale:o,scheduler:a,steps:l,denoising_start:1-c,denoising_end:1,is_intermediate:b},[Ft]:{type:"i2l",id:Ft,fp32:g,is_intermediate:b}},edges:[{source:{node_id:S,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:S,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}},{source:{node_id:Ft,field:"latents"},destination:{node_id:le,field:"latents"}},{source:{node_id:le,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(d&&(u.width!==f||u.height!==h)){const C={id:oa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:f,height:h};w.nodes[oa]=C,w.edges.push({source:{node_id:oa,field:"image"},destination:{node_id:Ft,field:"image"}}),w.edges.push({source:{node_id:oa,field:"width"},destination:{node_id:ve,field:"width"}}),w.edges.push({source:{node_id:oa,field:"height"},destination:{node_id:ve,field:"height"}})}else w.nodes[Ft].image={image_name:u.imageName},w.edges.push({source:{node_id:Ft,field:"width"},destination:{node_id:ve,field:"width"}}),w.edges.push({source:{node_id:Ft,field:"height"},destination:{node_id:ve,field:"height"}});return ks(w,{generation_mode:"img2img",cfg_scale:o,height:h,width:f,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:x?"cpu":"cuda",scheduler:a,clip_skip:p,strength:c,init_image:u.imageName},xe),(v||y)&&(io(e,w,S),S=kn),ao(e,w,S),Uf(e,w,le,S),eo(e,w,le),to(e,w,le),oo(e,w,le),e.system.shouldUseNSFWChecker&&no(e,w),e.system.shouldUseWatermarker&&so(e,w),ro(e,w),w},aRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,initialImage:u,shouldFitToWidthHeight:c,width:d,height:f,shouldUseCpuNoise:h,vaePrecision:p,seamlessXAxis:m,seamlessYAxis:_}=e.generation,{positiveStylePrompt:v,negativeStylePrompt:y,shouldUseSDXLRefiner:g,refinerStart:b,sdxlImg2ImgDenoisingStrength:S}=e.sdxl;if(!u)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const x=p==="fp32",w=!0;let C=mr;const T=h,{joinedPositiveStylePrompt:A,joinedNegativeStylePrompt:I}=wc(e),D={id:cb,nodes:{[C]:{type:"sdxl_model_loader",id:C,model:i,is_intermediate:w},[Se]:{type:"sdxl_compel_prompt",id:Se,prompt:n,style:A,is_intermediate:w},[we]:{type:"sdxl_compel_prompt",id:we,prompt:r,style:I,is_intermediate:w},[ve]:{type:"noise",id:ve,use_cpu:T,seed:s,is_intermediate:w},[xe]:{type:"l2i",id:xe,fp32:x,is_intermediate:w},[oe]:{type:"denoise_latents",id:oe,cfg_scale:o,scheduler:a,steps:l,denoising_start:g?Math.min(b,1-S):1-S,denoising_end:g?b:1,is_intermediate:w},[Ft]:{type:"i2l",id:Ft,fp32:x,is_intermediate:w}},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:C,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}},{source:{node_id:Ft,field:"latents"},destination:{node_id:oe,field:"latents"}},{source:{node_id:oe,field:"latents"},destination:{node_id:xe,field:"latents"}}]};if(c&&(u.width!==d||u.height!==f)){const M={id:oa,type:"img_resize",image:{image_name:u.imageName},is_intermediate:!0,width:d,height:f};D.nodes[oa]=M,D.edges.push({source:{node_id:oa,field:"image"},destination:{node_id:Ft,field:"image"}}),D.edges.push({source:{node_id:oa,field:"width"},destination:{node_id:ve,field:"width"}}),D.edges.push({source:{node_id:oa,field:"height"},destination:{node_id:ve,field:"height"}})}else D.nodes[Ft].image={image_name:u.imageName},D.edges.push({source:{node_id:Ft,field:"width"},destination:{node_id:ve,field:"width"}}),D.edges.push({source:{node_id:Ft,field:"height"},destination:{node_id:ve,field:"height"}});return ks(D,{generation_mode:"sdxl_img2img",cfg_scale:o,height:f,width:d,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:T?"cpu":"cuda",scheduler:a,strength:S,init_image:u.imageName,positive_style_prompt:v,negative_style_prompt:y},xe),(m||_)&&(io(e,D,C),C=kn),g&&(Hf(e,D,oe),(m||_)&&(C=wo)),ao(e,D,C),Gf(e,D,oe,C),eo(e,D,oe),to(e,D,oe),oo(e,D,oe),e.system.shouldUseNSFWChecker&&no(e,D),e.system.shouldUseWatermarker&&so(e,D),ro(e,D),D},sRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,seed:s,steps:l,width:u,height:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p}=e.generation,{positiveStylePrompt:m,negativeStylePrompt:_,shouldUseSDXLRefiner:v,refinerStart:y}=e.sdxl,g=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const b=f==="fp32",S=!0,{joinedPositiveStylePrompt:x,joinedNegativeStylePrompt:w}=wc(e);let C=mr;const T={id:vT,nodes:{[C]:{type:"sdxl_model_loader",id:C,model:i,is_intermediate:S},[Se]:{type:"sdxl_compel_prompt",id:Se,prompt:n,style:x,is_intermediate:S},[we]:{type:"sdxl_compel_prompt",id:we,prompt:r,style:w,is_intermediate:S},[ve]:{type:"noise",id:ve,seed:s,width:u,height:c,use_cpu:g,is_intermediate:S},[oe]:{type:"denoise_latents",id:oe,cfg_scale:o,scheduler:a,steps:l,denoising_start:0,denoising_end:v?y:1,is_intermediate:S},[xe]:{type:"l2i",id:xe,fp32:b,is_intermediate:S}},edges:[{source:{node_id:C,field:"unet"},destination:{node_id:oe,field:"unet"}},{source:{node_id:C,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:Se,field:"clip2"}},{source:{node_id:C,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:C,field:"clip2"},destination:{node_id:we,field:"clip2"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:oe,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:oe,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:oe,field:"noise"}},{source:{node_id:oe,field:"latents"},destination:{node_id:xe,field:"latents"}}]};return ks(T,{generation_mode:"sdxl_txt2img",cfg_scale:o,height:c,width:u,positive_prompt:n,negative_prompt:r,model:i,seed:s,steps:l,rand_device:g?"cpu":"cuda",scheduler:a,positive_style_prompt:m,negative_style_prompt:_},xe),(h||p)&&(io(e,T,C),C=kn),v&&(Hf(e,T,oe),(h||p)&&(C=wo)),ao(e,T,C),Gf(e,T,oe,C),eo(e,T,oe),to(e,T,oe),oo(e,T,oe),e.system.shouldUseNSFWChecker&&no(e,T),e.system.shouldUseWatermarker&&so(e,T),ro(e,T),T};function lRe(e){const t=["vae","control","ip_adapter","metadata","unet","positive_conditioning","negative_conditioning"],n=[];e.edges.forEach(r=>{r.destination.node_id===le&&t.includes(r.destination.field)&&n.push({source:{node_id:r.source.node_id,field:r.source.field},destination:{node_id:Kc,field:r.destination.field}})}),e.edges=e.edges.concat(n)}function uRe(e,t,n){const r=t/n;let i;e=="sdxl"?i=1024:i=512;const o=Math.floor(i*.5),a=i*i;let s,l;r>1?(l=Math.max(o,Math.sqrt(a/r)),s=l*r):(s=Math.max(o,Math.sqrt(a*r)),l=s/r),s=Math.min(t,s),l=Math.min(n,l);const u=Mr(Math.floor(s),8),c=Mr(Math.floor(l),8);return{newWidth:u,newHeight:c}}const cRe=(e,t)=>{var _;if(!e.generation.hrfEnabled||e.config.disabledSDFeatures.includes("hrf")||((_=e.generation.model)==null?void 0:_.model_type)==="onnx")return;const n=ae("txt2img"),{vae:r,hrfStrength:i,hrfEnabled:o,hrfMethod:a}=e.generation,s=!r,l=e.generation.width,u=e.generation.height,c=e.generation.model?e.generation.model.base_model:"sd1",{newWidth:d,newHeight:f}=uRe(c,l,u),h=t.nodes[le],p=t.nodes[ve],m=t.nodes[xe];if(!h){n.error("originalDenoiseLatentsNode is undefined");return}if(!p){n.error("originalNoiseNode is undefined");return}if(!m){n.error("originalLatentsToImageNode is undefined");return}if(p&&(p.width=d,p.height=f),t.nodes[_u]={type:"l2i",id:_u,fp32:m==null?void 0:m.fp32,is_intermediate:!0},t.edges.push({source:{node_id:le,field:"latents"},destination:{node_id:_u,field:"latents"}},{source:{node_id:s?Mo:ci,field:"vae"},destination:{node_id:_u,field:"vae"}}),t.nodes[Us]={id:Us,type:"img_resize",is_intermediate:!0,width:l,height:u},a=="ESRGAN"){let v="RealESRGAN_x2plus.pth";l*u/(d*f)>2&&(v="RealESRGAN_x4plus.pth"),t.nodes[Qh]={id:Qh,type:"esrgan",model_name:v,is_intermediate:!0},t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Qh,field:"image"}},{source:{node_id:Qh,field:"image"},destination:{node_id:Us,field:"image"}})}else t.edges.push({source:{node_id:_u,field:"image"},destination:{node_id:Us,field:"image"}});t.nodes[Th]={type:"noise",id:Th,seed:p==null?void 0:p.seed,use_cpu:p==null?void 0:p.use_cpu,is_intermediate:!0},t.edges.push({source:{node_id:Us,field:"height"},destination:{node_id:Th,field:"height"}},{source:{node_id:Us,field:"width"},destination:{node_id:Th,field:"width"}}),t.nodes[Ah]={type:"i2l",id:Ah,is_intermediate:!0},t.edges.push({source:{node_id:s?Mo:ci,field:"vae"},destination:{node_id:Ah,field:"vae"}},{source:{node_id:Us,field:"image"},destination:{node_id:Ah,field:"image"}}),t.nodes[Kc]={type:"denoise_latents",id:Kc,is_intermediate:!0,cfg_scale:h==null?void 0:h.cfg_scale,scheduler:h==null?void 0:h.scheduler,steps:h==null?void 0:h.steps,denoising_start:1-e.generation.hrfStrength,denoising_end:1},t.edges.push({source:{node_id:Ah,field:"latents"},destination:{node_id:Kc,field:"latents"}},{source:{node_id:Th,field:"noise"},destination:{node_id:Kc,field:"noise"}}),lRe(t),t.nodes[tl]={type:"l2i",id:tl,fp32:m==null?void 0:m.fp32,is_intermediate:!0},t.edges.push({source:{node_id:s?Mo:ci,field:"vae"},destination:{node_id:tl,field:"vae"}},{source:{node_id:Kc,field:"latents"},destination:{node_id:tl,field:"latents"}}),Do(t,{hrf_strength:i,hrf_enabled:o,hrf_method:a}),WMe(t,tl)},dRe=e=>{const t=ae("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:a,steps:s,width:l,height:u,clipSkip:c,shouldUseCpuNoise:d,vaePrecision:f,seamlessXAxis:h,seamlessYAxis:p,seed:m}=e.generation,_=d;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const v=f==="fp32",y=!0,g=i.model_type==="onnx";let b=g?m2:Mo;const S=g?"onnx_model_loader":"main_model_loader",x=g?{type:"t2l_onnx",id:le,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s}:{type:"denoise_latents",id:le,is_intermediate:y,cfg_scale:o,scheduler:a,steps:s,denoising_start:0,denoising_end:1},w={id:mG,nodes:{[b]:{type:S,id:b,is_intermediate:y,model:i},[st]:{type:"clip_skip",id:st,skipped_layers:c,is_intermediate:y},[Se]:{type:g?"prompt_onnx":"compel",id:Se,prompt:n,is_intermediate:y},[we]:{type:g?"prompt_onnx":"compel",id:we,prompt:r,is_intermediate:y},[ve]:{type:"noise",id:ve,seed:m,width:l,height:u,use_cpu:_,is_intermediate:y},[x.id]:x,[xe]:{type:g?"l2i_onnx":"l2i",id:xe,fp32:v,is_intermediate:y}},edges:[{source:{node_id:b,field:"unet"},destination:{node_id:le,field:"unet"}},{source:{node_id:b,field:"clip"},destination:{node_id:st,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:Se,field:"clip"}},{source:{node_id:st,field:"clip"},destination:{node_id:we,field:"clip"}},{source:{node_id:Se,field:"conditioning"},destination:{node_id:le,field:"positive_conditioning"}},{source:{node_id:we,field:"conditioning"},destination:{node_id:le,field:"negative_conditioning"}},{source:{node_id:ve,field:"noise"},destination:{node_id:le,field:"noise"}},{source:{node_id:le,field:"latents"},destination:{node_id:xe,field:"latents"}}]};return ks(w,{generation_mode:"txt2img",cfg_scale:o,height:u,width:l,positive_prompt:n,negative_prompt:r,model:i,seed:m,steps:s,rand_device:_?"cpu":"cuda",scheduler:a,clip_skip:c},xe),(h||p)&&(io(e,w,b),b=kn),ao(e,w,b),Uf(e,w,le,b),eo(e,w,le),to(e,w,le),oo(e,w,le),e.generation.hrfEnabled&&!g&&cRe(e,w),e.system.shouldUseNSFWChecker&&no(e,w),e.system.shouldUseWatermarker&&so(e,w),ro(e,w),w},fRe=()=>{pe({predicate:e=>yT.match(e)&&(e.payload.tabName==="txt2img"||e.payload.tabName==="img2img"),effect:async(e,{getState:t,dispatch:n})=>{const r=t(),i=r.generation.model,{prepend:o}=e.payload;let a;i&&i.base_model==="sdxl"?e.payload.tabName==="txt2img"?a=sRe(r):a=aRe(r):e.payload.tabName==="txt2img"?a=dRe(r):a=oRe(r);const s=vG(r,a,o);n(ln.endpoints.enqueueBatch.initiate(s,{fixedCacheKey:"enqueueBatch"})).reset()}})},hRe=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function pRe(e){return e.length===1?e[0].toString():e.reduce((t,n)=>{if(typeof n=="number")return t+"["+n.toString()+"]";if(n.includes('"'))return t+'["'+gRe(n)+'"]';if(!hRe.test(n))return t+'["'+n+'"]';const r=t.length===0?"":".";return t+r+n},"")}function gRe(e){return e.replace(/"/g,'\\"')}function mRe(e){return e.length!==0}const yRe=99,bG="; ",_G=", or ",_T="Validation error",SG=": ";class xG extends Error{constructor(n,r=[]){super(n);W2(this,"details");W2(this,"name");this.details=r,this.name="ZodValidationError"}toString(){return this.message}}function ST(e,t,n){if(e.code==="invalid_union")return e.unionErrors.reduce((r,i)=>{const o=i.issues.map(a=>ST(a,t,n)).join(t);return r.includes(o)||r.push(o),r},[]).join(n);if(mRe(e.path)){if(e.path.length===1){const r=e.path[0];if(typeof r=="number")return`${e.message} at index ${r}`}return`${e.message} at "${pRe(e.path)}"`}return e.message}function wG(e,t,n){return t!==null?e.length>0?[t,e].join(n):t:e.length>0?e:_T}function PUe(e,t={}){const{issueSeparator:n=bG,unionSeparator:r=_G,prefixSeparator:i=SG,prefix:o=_T}=t,a=ST(e,n,r),s=wG(a,o,i);return new xG(s,[e])}function fR(e,t={}){const{maxIssuesInMessage:n=yRe,issueSeparator:r=bG,unionSeparator:i=_G,prefixSeparator:o=SG,prefix:a=_T}=t,s=e.errors.slice(0,n).map(u=>ST(u,r,i)).join(r),l=wG(s,a,o);return new xG(l,e.errors)}const vRe=e=>{const{workflow:t,nodes:n,edges:r}=e,i={...t,nodes:[],edges:[]};return n.filter(o=>["invocation","notes"].includes(o.type??"__UNKNOWN_NODE_TYPE__")).forEach(o=>{const a=FF.safeParse(o);if(!a.success){const{message:s}=fR(a.error,{prefix:ce.t("nodes.unableToParseNode")});ae("nodes").warn({node:ft(o)},s);return}i.nodes.push(a.data)}),r.forEach(o=>{const a=BF.safeParse(o);if(!a.success){const{message:s}=fR(a.error,{prefix:ce.t("nodes.unableToParseEdge")});ae("nodes").warn({edge:ft(o)},s);return}i.edges.push(a.data)}),i},bRe=e=>{if(e.type==="ColorField"&&e.value){const t=Ye(e.value),{r:n,g:r,b:i,a:o}=e.value,a=Math.max(0,Math.min(o*255,255));return Object.assign(t,{r:n,g:r,b:i,a}),t}return e.value},_Re=e=>{const{nodes:t,edges:n}=e,i=t.filter(on).reduce((l,u)=>{const{id:c,data:d}=u,{type:f,inputs:h,isIntermediate:p,embedWorkflow:m}=d,_=Jp(h,(y,g,b)=>{const S=bRe(g);return y[b]=S,y},{});_.use_cache=u.data.useCache;const v={type:f,id:c,..._,is_intermediate:p};return m&&Object.assign(v,{workflow:vRe(e)}),Object.assign(l,{[c]:v}),l},{}),a=n.filter(l=>l.type!=="collapsed").reduce((l,u)=>{const{source:c,target:d,sourceHandle:f,targetHandle:h}=u;return l.push({source:{node_id:c,field:f},destination:{node_id:d,field:h}}),l},[]);return a.forEach(l=>{const u=i[l.destination.node_id],c=l.destination.field;i[l.destination.node_id]=$f(u,c)}),{id:yl(),nodes:i,edges:a}},SRe=()=>{pe({predicate:e=>yT.match(e)&&e.payload.tabName==="nodes",effect:async(e,{getState:t,dispatch:n})=>{const r=t(),o={batch:{graph:_Re(r.nodes),runs:r.generation.iterations},prepend:e.payload.prepend};n(ln.endpoints.enqueueBatch.initiate(o,{fixedCacheKey:"enqueueBatch"})).reset()}})},xRe=()=>{pe({matcher:ue.endpoints.addImageToBoard.matchFulfilled,effect:e=>{const t=ae("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Image added to board")}})},wRe=()=>{pe({matcher:ue.endpoints.addImageToBoard.matchRejected,effect:e=>{const t=ae("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Problem adding image to board")}})},xT=ge("deleteImageModal/imageDeletionConfirmed"),kUe=Gn(e=>e,e=>e.gallery.selection[e.gallery.selection.length-1],zm),CG=Gn([e=>e],e=>{const{selectedBoardId:t,galleryView:n}=e.gallery;return{board_id:t,categories:n==="images"?Ln:Tr,offset:0,limit:Dle,is_intermediate:!1}},zm),CRe=()=>{pe({actionCreator:xT,effect:async(e,{dispatch:t,getState:n,condition:r})=>{var f;const{imageDTOs:i,imagesUsage:o}=e.payload;if(i.length!==1||o.length!==1)return;const a=i[0],s=o[0];if(!a||!s)return;t(jE(!1));const l=n(),u=(f=l.gallery.selection[l.gallery.selection.length-1])==null?void 0:f.image_name;if(a&&(a==null?void 0:a.image_name)===u){const{image_name:h}=a,p=CG(l),{data:m}=ue.endpoints.listImages.select(p)(l),_=m?Dt.getSelectors().selectAll(m):[],v=_.findIndex(S=>S.image_name===h),y=_.filter(S=>S.image_name!==h),g=al(v,0,y.length-1),b=y[g];t(ha(b||null))}s.isCanvasImage&&t(zE()),i.forEach(h=>{var p;((p=n().generation.initialImage)==null?void 0:p.imageName)===h.image_name&&t(kE()),ps(Aa(n().controlAdapters),m=>{(m.controlImage===h.image_name||hi(m)&&m.processedControlImage===h.image_name)&&(t(Hl({id:m.id,controlImage:null})),t(EE({id:m.id,processedControlImage:null})))}),n().nodes.nodes.forEach(m=>{on(m)&&ps(m.data.inputs,_=>{var v;_.type==="ImageField"&&((v=_.value)==null?void 0:v.image_name)===h.image_name&&t(rS({nodeId:m.data.id,fieldName:_.name,value:void 0}))})})});const{requestId:c}=t(ue.endpoints.deleteImage.initiate(a));await r(h=>ue.endpoints.deleteImage.matchFulfilled(h)&&h.meta.requestId===c,3e4)&&t(No.util.invalidateTags([{type:"Board",id:a.board_id??"none"}]))}})},ERe=()=>{pe({actionCreator:xT,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTOs:r,imagesUsage:i}=e.payload;if(!(r.length<=1||i.length<=1))try{await t(ue.endpoints.deleteImages.initiate({imageDTOs:r})).unwrap();const o=n(),a=CG(o),{data:s}=ue.endpoints.listImages.select(a)(o),l=s?Dt.getSelectors().selectAll(s)[0]:void 0;t(ha(l||null)),t(jE(!1)),i.some(u=>u.isCanvasImage)&&t(zE()),r.forEach(u=>{var c;((c=n().generation.initialImage)==null?void 0:c.imageName)===u.image_name&&t(kE()),ps(Aa(n().controlAdapters),d=>{(d.controlImage===u.image_name||hi(d)&&d.processedControlImage===u.image_name)&&(t(Hl({id:d.id,controlImage:null})),t(EE({id:d.id,processedControlImage:null})))}),n().nodes.nodes.forEach(d=>{on(d)&&ps(d.data.inputs,f=>{var h;f.type==="ImageField"&&((h=f.value)==null?void 0:h.image_name)===u.image_name&&t(rS({nodeId:d.data.id,fieldName:f.name,value:void 0}))})})})}catch{}}})},ARe=()=>{pe({matcher:ue.endpoints.deleteImage.matchPending,effect:()=>{}})},TRe=()=>{pe({matcher:ue.endpoints.deleteImage.matchFulfilled,effect:e=>{ae("images").debug({imageDTO:e.meta.arg.originalArgs},"Image deleted")}})},PRe=()=>{pe({matcher:ue.endpoints.deleteImage.matchRejected,effect:e=>{ae("images").debug({imageDTO:e.meta.arg.originalArgs},"Unable to delete image")}})},EG=ge("dnd/dndDropped"),kRe=()=>{pe({actionCreator:EG,effect:async(e,{dispatch:t})=>{const n=ae("dnd"),{activeData:r,overData:i}=e.payload;if(r.payloadType==="IMAGE_DTO"?n.debug({activeData:r,overData:i},"Image dropped"):r.payloadType==="IMAGE_DTOS"?n.debug({activeData:r,overData:i},`Images (${r.payload.imageDTOs.length}) dropped`):r.payloadType==="NODE_FIELD"?n.debug({activeData:ft(r),overData:ft(i)},"Node field dropped"):n.debug({activeData:r,overData:i},"Unknown payload dropped"),i.actionType==="ADD_FIELD_TO_LINEAR"&&r.payloadType==="NODE_FIELD"){const{nodeId:o,field:a}=r.payload;t(Zye({nodeId:o,fieldName:a.name}))}if(i.actionType==="SET_CURRENT_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(ha(r.payload.imageDTO));return}if(i.actionType==="SET_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(u_(r.payload.imageDTO));return}if(i.actionType==="SET_CONTROL_ADAPTER_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{id:o}=i.context;t(Hl({id:o,controlImage:r.payload.imageDTO.image_name})),t(AE({id:o,isEnabled:!0}));return}if(i.actionType==="SET_CANVAS_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(YL(r.payload.imageDTO));return}if(i.actionType==="SET_NODES_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{fieldName:o,nodeId:a}=i.context;t(rS({nodeId:a,fieldName:o,value:r.payload.imageDTO}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload,{boardId:a}=i.context;t(ue.endpoints.addImageToBoard.initiate({imageDTO:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload;t(ue.endpoints.removeImageFromBoard.initiate({imageDTO:o}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload,{boardId:a}=i.context;t(ue.endpoints.addImagesToBoard.initiate({imageDTOs:o,board_id:a}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload;t(ue.endpoints.removeImagesFromBoard.initiate({imageDTOs:o}));return}}})},IRe=()=>{pe({matcher:ue.endpoints.removeImageFromBoard.matchFulfilled,effect:e=>{const t=ae("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Image removed from board")}})},MRe=()=>{pe({matcher:ue.endpoints.removeImageFromBoard.matchRejected,effect:e=>{const t=ae("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Problem removing image from board")}})},RRe=()=>{pe({actionCreator:Tle,effect:async(e,{dispatch:t,getState:n})=>{const r=e.payload,i=n(),{shouldConfirmOnDelete:o}=i.system,a=d6e(n()),s=a.some(l=>l.isCanvasImage)||a.some(l=>l.isInitialImage)||a.some(l=>l.isControlImage)||a.some(l=>l.isNodesImage);if(o||s){t(jE(!0));return}t(xT({imageDTOs:r,imagesUsage:a}))}})},ORe=()=>{pe({matcher:ue.endpoints.uploadImage.matchFulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=ae("images"),i=e.payload,o=n(),{autoAddBoardId:a}=o.gallery;r.debug({imageDTO:i},"Image uploaded");const{postUploadAction:s}=e.meta.arg.originalArgs;if(e.payload.is_intermediate&&!s)return;const l={title:K("toast.imageUploaded"),status:"success"};if((s==null?void 0:s.type)==="TOAST"){const{toastOptions:u}=s;if(!a||a==="none")t(nt({...l,...u}));else{t(ue.endpoints.addImageToBoard.initiate({board_id:a,imageDTO:i}));const{data:c}=Qe.endpoints.listAllBoards.select()(o),d=c==null?void 0:c.find(h=>h.board_id===a),f=d?`${K("toast.addedToBoard")} ${d.board_name}`:`${K("toast.addedToBoard")} ${a}`;t(nt({...l,description:f}))}return}if((s==null?void 0:s.type)==="SET_CANVAS_INITIAL_IMAGE"){t(YL(i)),t(nt({...l,description:K("toast.setCanvasInitialImage")}));return}if((s==null?void 0:s.type)==="SET_CONTROL_ADAPTER_IMAGE"){const{id:u}=s;t(AE({id:u,isEnabled:!0})),t(Hl({id:u,controlImage:i.image_name})),t(nt({...l,description:K("toast.setControlImage")}));return}if((s==null?void 0:s.type)==="SET_INITIAL_IMAGE"){t(u_(i)),t(nt({...l,description:K("toast.setInitialImage")}));return}if((s==null?void 0:s.type)==="SET_NODES_IMAGE"){const{nodeId:u,fieldName:c}=s;t(rS({nodeId:u,fieldName:c,value:i})),t(nt({...l,description:`${K("toast.setNodeField")} ${c}`}));return}}})},$Re=()=>{pe({matcher:ue.endpoints.uploadImage.matchRejected,effect:(e,{dispatch:t})=>{const n=ae("images"),r={arg:{...$f(e.meta.arg.originalArgs,["file","postUploadAction"]),file:""}};n.error({...r},"Image upload failed"),t(nt({title:K("toast.imageUploadFailed"),description:e.error.message,status:"error"}))}})},NRe=()=>{pe({matcher:ue.endpoints.starImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!0}):a.push(s)}),t(VF(a))}})},DRe=()=>{pe({matcher:ue.endpoints.unstarImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{updated_image_names:r}=e.payload,i=n(),{selection:o}=i.gallery,a=[];o.forEach(s=>{r.includes(s.image_name)?a.push({...s,starred:!1}):a.push(s)}),t(VF(a))}})},LRe=ge("generation/initialImageSelected"),FRe=ge("generation/modelSelected"),BRe=()=>{pe({actionCreator:LRe,effect:(e,{dispatch:t})=>{if(!e.payload){t(nt(vs({title:K("toast.imageNotLoadedDesc"),status:"error"})));return}t(u_(e.payload)),t(nt(vs(K("toast.sentToImageToImage"))))}})},zRe=()=>{pe({actionCreator:FRe,effect:(e,{getState:t,dispatch:n})=>{var l,u;const r=ae("models"),i=t(),o=bm.safeParse(e.payload);if(!o.success){r.error({error:o.error.format()},"Failed to parse main model");return}const a=o.data,{base_model:s}=a;if(((l=i.generation.model)==null?void 0:l.base_model)!==s){let c=0;ps(i.lora.loras,(f,h)=>{f.base_model!==s&&(n(GF(h)),c+=1)});const{vae:d}=i.generation;d&&d.base_model!==s&&(n(cL(null)),c+=1),Aa(i.controlAdapters).forEach(f=>{var h;((h=f.model)==null?void 0:h.base_model)!==s&&(n(AE({id:f.id,isEnabled:!1})),c+=1)}),c>0&&n(nt(vs({title:K("toast.baseModelChangedCleared",{count:c}),status:"warning"})))}((u=i.generation.model)==null?void 0:u.base_model)!==a.base_model&&i.ui.shouldAutoChangeDimensions&&(["sdxl","sdxl-refiner"].includes(a.base_model)?(n(v6(1024)),n(b6(1024)),n(H6({width:1024,height:1024}))):(n(v6(512)),n(b6(512)),n(H6({width:512,height:512})))),n(sl(a))}})},Gg=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),hR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),pR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),gR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),mR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),yR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),vR=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),M3=Yi({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),jRe=({base_model:e,model_type:t,model_name:n})=>`${e}/${t}/${n}`,Bs=e=>{const t=[];return e.forEach(n=>{const r={...Ye(n),id:jRe(n)};t.push(r)}),t},Xo=No.injectEndpoints({endpoints:e=>({getOnnxModels:e.query({query:t=>{const n={model_type:"onnx",base_models:t};return`models/?${fp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"OnnxModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"OnnxModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return hR.setAll(hR.getInitialState(),n)}}),getMainModels:e.query({query:t=>{const n={model_type:"main",base_models:t};return`models/?${fp.stringify(n,{arrayFormat:"none"})}`},providesTags:t=>{const n=[{type:"MainModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"MainModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return Gg.setAll(Gg.getInitialState(),n)}}),updateMainModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/main/${n}`,method:"PATCH",body:r}),invalidatesTags:["Model"]}),importMainModels:e.mutation({query:({body:t})=>({url:"models/import",method:"POST",body:t}),invalidatesTags:["Model"]}),addMainModels:e.mutation({query:({body:t})=>({url:"models/add",method:"POST",body:t}),invalidatesTags:["Model"]}),deleteMainModels:e.mutation({query:({base_model:t,model_name:n,model_type:r})=>({url:`models/${t}/${r}/${n}`,method:"DELETE"}),invalidatesTags:["Model"]}),convertMainModels:e.mutation({query:({base_model:t,model_name:n,convert_dest_directory:r})=>({url:`models/convert/${t}/main/${n}`,method:"PUT",params:{convert_dest_directory:r}}),invalidatesTags:["Model"]}),mergeMainModels:e.mutation({query:({base_model:t,body:n})=>({url:`models/merge/${t}`,method:"PUT",body:n}),invalidatesTags:["Model"]}),syncModels:e.mutation({query:()=>({url:"models/sync",method:"POST"}),invalidatesTags:["Model"]}),getLoRAModels:e.query({query:()=>({url:"models/",params:{model_type:"lora"}}),providesTags:t=>{const n=[{type:"LoRAModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"LoRAModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return pR.setAll(pR.getInitialState(),n)}}),updateLoRAModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/lora/${n}`,method:"PATCH",body:r}),invalidatesTags:[{type:"LoRAModel",id:Pr}]}),deleteLoRAModels:e.mutation({query:({base_model:t,model_name:n})=>({url:`models/${t}/lora/${n}`,method:"DELETE"}),invalidatesTags:[{type:"LoRAModel",id:Pr}]}),getControlNetModels:e.query({query:()=>({url:"models/",params:{model_type:"controlnet"}}),providesTags:t=>{const n=[{type:"ControlNetModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"ControlNetModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return gR.setAll(gR.getInitialState(),n)}}),getIPAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"ip_adapter"}}),providesTags:t=>{const n=[{type:"IPAdapterModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"IPAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return mR.setAll(mR.getInitialState(),n)}}),getT2IAdapterModels:e.query({query:()=>({url:"models/",params:{model_type:"t2i_adapter"}}),providesTags:t=>{const n=[{type:"T2IAdapterModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"T2IAdapterModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return yR.setAll(yR.getInitialState(),n)}}),getVaeModels:e.query({query:()=>({url:"models/",params:{model_type:"vae"}}),providesTags:t=>{const n=[{type:"VaeModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"VaeModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return M3.setAll(M3.getInitialState(),n)}}),getTextualInversionModels:e.query({query:()=>({url:"models/",params:{model_type:"embedding"}}),providesTags:t=>{const n=[{type:"TextualInversionModel",id:Pr},"Model"];return t&&n.push(...t.ids.map(r=>({type:"TextualInversionModel",id:r}))),n},transformResponse:t=>{const n=Bs(t.models);return vR.setAll(vR.getInitialState(),n)}}),getModelsInFolder:e.query({query:t=>({url:`/models/search?${fp.stringify(t,{})}`})}),getCheckpointConfigs:e.query({query:()=>({url:"/models/ckpt_confs"})})})}),{useGetMainModelsQuery:IUe,useGetOnnxModelsQuery:MUe,useGetControlNetModelsQuery:RUe,useGetIPAdapterModelsQuery:OUe,useGetT2IAdapterModelsQuery:$Ue,useGetLoRAModelsQuery:NUe,useGetTextualInversionModelsQuery:DUe,useGetVaeModelsQuery:LUe,useUpdateMainModelsMutation:FUe,useDeleteMainModelsMutation:BUe,useImportMainModelsMutation:zUe,useAddMainModelsMutation:jUe,useConvertMainModelsMutation:VUe,useMergeMainModelsMutation:UUe,useDeleteLoRAModelsMutation:GUe,useUpdateLoRAModelsMutation:HUe,useSyncModelsMutation:qUe,useGetModelsInFolderQuery:WUe,useGetCheckpointConfigsQuery:KUe}=Xo,VRe=()=>{pe({predicate:e=>Xo.endpoints.getMainModels.matchFulfilled(e)&&!e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=ae("models");r.info({models:e.payload.entities},`Main models loaded (${e.payload.ids.length})`);const i=t().generation.model,o=Gg.getSelectors().selectAll(e.payload);if(o.length===0){n(sl(null));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=bm.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse main model");return}n(sl(s.data))}}),pe({predicate:e=>Xo.endpoints.getMainModels.matchFulfilled(e)&&e.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=ae("models");r.info({models:e.payload.entities},`SDXL Refiner models loaded (${e.payload.ids.length})`);const i=t().sdxl.refinerModel,o=Gg.getSelectors().selectAll(e.payload);if(o.length===0){n(d8(null)),n(nve(!1));return}if(i?o.some(l=>l.model_name===i.model_name&&l.base_model===i.base_model&&l.model_type===i.model_type):!1)return;const s=TE.safeParse(o[0]);if(!s.success){r.error({error:s.error.format()},"Failed to parse SDXL Refiner Model");return}n(d8(s.data))}}),pe({matcher:Xo.endpoints.getVaeModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const r=ae("models");r.info({models:e.payload.entities},`VAEs loaded (${e.payload.ids.length})`);const i=t().generation.vae;if(i===null||Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(i==null?void 0:i.model_name)&&(l==null?void 0:l.base_model)===(i==null?void 0:i.base_model)))return;const a=M3.getSelectors().selectAll(e.payload)[0];if(!a){n(sl(null));return}const s=lL.safeParse(a);if(!s.success){r.error({error:s.error.format()},"Failed to parse VAE model");return}n(cL(s.data))}}),pe({matcher:Xo.endpoints.getLoRAModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{ae("models").info({models:e.payload.entities},`LoRAs loaded (${e.payload.ids.length})`);const i=t().lora.loras;ps(i,(o,a)=>{Gc(e.payload.entities,l=>(l==null?void 0:l.model_name)===(o==null?void 0:o.model_name)&&(l==null?void 0:l.base_model)===(o==null?void 0:o.base_model))||n(GF(a))})}}),pe({matcher:Xo.endpoints.getControlNetModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{ae("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),mie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Rx({id:i.id}))})}}),pe({matcher:Xo.endpoints.getT2IAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{ae("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`),_ie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Rx({id:i.id}))})}}),pe({matcher:Xo.endpoints.getIPAdapterModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{ae("models").info({models:e.payload.entities},`IP Adapter models loaded (${e.payload.ids.length})`),vie(t().controlAdapters).forEach(i=>{Gc(e.payload.entities,a=>{var s,l;return(a==null?void 0:a.model_name)===((s=i==null?void 0:i.model)==null?void 0:s.model_name)&&(a==null?void 0:a.base_model)===((l=i==null?void 0:i.model)==null?void 0:l.base_model)})||n(Rx({id:i.id}))})}}),pe({matcher:Xo.endpoints.getTextualInversionModels.matchFulfilled,effect:async e=>{ae("models").info({models:e.payload.entities},`Embeddings loaded (${e.payload.ids.length})`)}})},URe=No.injectEndpoints({endpoints:e=>({dynamicPrompts:e.query({query:t=>({url:"utilities/dynamicprompts",body:t,method:"POST"}),keepUnusedDataFor:86400})})}),GRe=ai(Qoe,Rle,Ile,Mle,yE),HRe=()=>{pe({matcher:GRe,effect:async(e,{dispatch:t,getState:n,cancelActiveListeners:r,delay:i})=>{r(),await i(1e3);const o=n();if(o.config.disabledFeatures.includes("dynamicPrompting"))return;const{positivePrompt:a}=o.generation,{maxPrompts:s}=o.dynamicPrompts;t(Fx(!0));try{const l=t(URe.endpoints.dynamicPrompts.initiate({prompt:a,max_prompts:s})),u=await l.unwrap();l.unsubscribe(),t(Ole(u.prompts)),t($le(u.error)),t(q6(!1)),t(Fx(!1))}catch{t(q6(!0)),t(Fx(!1))}}})},zs=e=>e.$ref.split("/").slice(-1)[0],qRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"integer",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&ba(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&ba(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},WRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"IntegerPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&ba(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&ba(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},KRe=({schemaObject:e,baseField:t})=>{const n=ba(e.item_default)&&Lne(e.item_default)?e.item_default:0;return{...t,type:"IntegerCollection",default:e.default??[],item_default:n}},XRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"float",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&ba(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&ba(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},QRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"FloatPolymorphic",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&ba(e.exclusiveMaximum)&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&ba(e.exclusiveMinimum)&&(n.exclusiveMinimum=e.exclusiveMinimum),n},YRe=({schemaObject:e,baseField:t})=>{const n=ba(e.item_default)?e.item_default:0;return{...t,type:"FloatCollection",default:e.default??[],item_default:n}},ZRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"string",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},JRe=({schemaObject:e,baseField:t})=>{const n={...t,type:"StringPolymorphic",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},eOe=({schemaObject:e,baseField:t})=>{const n=hE(e.item_default)?e.item_default:"";return{...t,type:"StringCollection",default:e.default??[],item_default:n}},tOe=({schemaObject:e,baseField:t})=>({...t,type:"boolean",default:e.default??!1}),nOe=({schemaObject:e,baseField:t})=>({...t,type:"BooleanPolymorphic",default:e.default??!1}),rOe=({schemaObject:e,baseField:t})=>{const n=e.item_default&&Dne(e.item_default)?e.item_default:!1;return{...t,type:"BooleanCollection",default:e.default??[],item_default:n}},iOe=({schemaObject:e,baseField:t})=>({...t,type:"MainModelField",default:e.default??void 0}),oOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLMainModelField",default:e.default??void 0}),aOe=({schemaObject:e,baseField:t})=>({...t,type:"SDXLRefinerModelField",default:e.default??void 0}),sOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeModelField",default:e.default??void 0}),lOe=({schemaObject:e,baseField:t})=>({...t,type:"LoRAModelField",default:e.default??void 0}),uOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlNetModelField",default:e.default??void 0}),cOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterModelField",default:e.default??void 0}),dOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterModelField",default:e.default??void 0}),fOe=({schemaObject:e,baseField:t})=>({...t,type:"BoardField",default:e.default??void 0}),hOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageField",default:e.default??void 0}),pOe=({schemaObject:e,baseField:t})=>({...t,type:"ImagePolymorphic",default:e.default??void 0}),gOe=({schemaObject:e,baseField:t})=>({...t,type:"ImageCollection",default:e.default??[],item_default:e.item_default??void 0}),mOe=({schemaObject:e,baseField:t})=>({...t,type:"DenoiseMaskField",default:e.default??void 0}),yOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsField",default:e.default??void 0}),vOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsPolymorphic",default:e.default??void 0}),bOe=({schemaObject:e,baseField:t})=>({...t,type:"LatentsCollection",default:e.default??[],item_default:e.item_default??void 0}),_Oe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningField",default:e.default??void 0}),SOe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningPolymorphic",default:e.default??void 0}),xOe=({schemaObject:e,baseField:t})=>({...t,type:"ConditioningCollection",default:e.default??[],item_default:e.item_default??void 0}),wOe=({schemaObject:e,baseField:t})=>({...t,type:"UNetField",default:e.default??void 0}),COe=({schemaObject:e,baseField:t})=>({...t,type:"ClipField",default:e.default??void 0}),EOe=({schemaObject:e,baseField:t})=>({...t,type:"VaeField",default:e.default??void 0}),AOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlField",default:e.default??void 0}),TOe=({schemaObject:e,baseField:t})=>({...t,type:"ControlPolymorphic",default:e.default??void 0}),POe=({schemaObject:e,baseField:t})=>({...t,type:"ControlCollection",default:e.default??[],item_default:e.item_default??void 0}),kOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterField",default:e.default??void 0}),IOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterPolymorphic",default:e.default??void 0}),MOe=({schemaObject:e,baseField:t})=>({...t,type:"IPAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),ROe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterField",default:e.default??void 0}),OOe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterPolymorphic",default:e.default??void 0}),$Oe=({schemaObject:e,baseField:t})=>({...t,type:"T2IAdapterCollection",default:e.default??[],item_default:e.item_default??void 0}),NOe=({schemaObject:e,baseField:t})=>{const n=e.enum??[];return{...t,type:"enum",options:n,ui_choice_labels:e.ui_choice_labels,default:e.default??n[0]}},DOe=({baseField:e})=>({...e,type:"Collection",default:[]}),LOe=({baseField:e})=>({...e,type:"CollectionItem",default:void 0}),FOe=({baseField:e})=>({...e,type:"Any",default:void 0}),BOe=({baseField:e})=>({...e,type:"MetadataItemField",default:void 0}),zOe=({baseField:e})=>({...e,type:"MetadataItemCollection",default:void 0}),jOe=({baseField:e})=>({...e,type:"MetadataItemPolymorphic",default:void 0}),VOe=({baseField:e})=>({...e,type:"MetadataField",default:void 0}),UOe=({baseField:e})=>({...e,type:"MetadataCollection",default:void 0}),GOe=({schemaObject:e,baseField:t})=>({...t,type:"ColorField",default:e.default??{r:127,g:127,b:127,a:255}}),HOe=({schemaObject:e,baseField:t})=>({...t,type:"ColorPolymorphic",default:e.default??{r:127,g:127,b:127,a:255}}),qOe=({schemaObject:e,baseField:t})=>({...t,type:"ColorCollection",default:e.default??[]}),WOe=({schemaObject:e,baseField:t})=>({...t,type:"Scheduler",default:e.default??"euler"}),R3=e=>{if(O0(e)){if(e.type){if(e.enum)return"enum";if(e.type){if(e.type==="number")return"float";if(e.type==="array"){const t=O0(e.items)?e.items.type:zs(e.items);return En(t)?void 0:eye(t)?dA[t]:void 0}else if(!En(e.type))return e.type}}else if(e.allOf){const t=e.allOf;if(t&&t[0]&&au(t[0]))return zs(t[0])}else if(e.anyOf){const t=e.anyOf.filter(i=>!(O0(i)&&i.type==="null"));if(t.length===1){if(au(t[0]))return zs(t[0]);if(O0(t[0]))return R3(t[0])}let n,r;if(sI(t[0])){const i=t[0].items,o=t[1];au(i)&&au(o)?(n=zs(i),r=zs(o)):$0(i)&&$0(o)&&(n=i.type,r=o.type)}else if(sI(t[1])){const i=t[0],o=t[1].items;au(i)&&au(o)?(n=zs(i),r=zs(o)):$0(i)&&$0(o)&&(n=i.type,r=o.type)}if(n===r&&nye(n))return fz[n]}}else if(au(e))return zs(e)},AG={BoardField:fOe,Any:FOe,boolean:tOe,BooleanCollection:rOe,BooleanPolymorphic:nOe,ClipField:COe,Collection:DOe,CollectionItem:LOe,ColorCollection:qOe,ColorField:GOe,ColorPolymorphic:HOe,ConditioningCollection:xOe,ConditioningField:_Oe,ConditioningPolymorphic:SOe,ControlCollection:POe,ControlField:AOe,ControlNetModelField:uOe,ControlPolymorphic:TOe,DenoiseMaskField:mOe,enum:NOe,float:XRe,FloatCollection:YRe,FloatPolymorphic:QRe,ImageCollection:gOe,ImageField:hOe,ImagePolymorphic:pOe,integer:qRe,IntegerCollection:KRe,IntegerPolymorphic:WRe,IPAdapterCollection:MOe,IPAdapterField:kOe,IPAdapterModelField:cOe,IPAdapterPolymorphic:IOe,LatentsCollection:bOe,LatentsField:yOe,LatentsPolymorphic:vOe,LoRAModelField:lOe,MetadataItemField:BOe,MetadataItemCollection:zOe,MetadataItemPolymorphic:jOe,MetadataField:VOe,MetadataCollection:UOe,MainModelField:iOe,Scheduler:WOe,SDXLMainModelField:oOe,SDXLRefinerModelField:aOe,string:ZRe,StringCollection:eOe,StringPolymorphic:JRe,T2IAdapterCollection:$Oe,T2IAdapterField:ROe,T2IAdapterModelField:dOe,T2IAdapterPolymorphic:OOe,UNetField:wOe,VaeField:EOe,VaeModelField:sOe},KOe=e=>!!(e&&e in AG),XOe=(e,t,n,r)=>{var p;const{input:i,ui_hidden:o,ui_component:a,ui_type:s,ui_order:l,ui_choice_labels:u,item_default:c}=t,d={input:Vh.includes(r)?"connection":i,ui_hidden:o,ui_component:a,ui_type:s,required:((p=e.required)==null?void 0:p.includes(n))??!1,ui_order:l,ui_choice_labels:u,item_default:c},f={name:n,title:t.title??(n?mE(n):""),description:t.description??"",fieldKind:"input",...d};if(!KOe(r))return;const h=AG[r];if(h)return h({schemaObject:t,baseField:f})},QOe=["id","type","use_cache"],YOe=["type"],ZOe=["IsIntermediate"],JOe=["graph","linear_ui_output"],e7e=(e,t)=>!!(QOe.includes(t)||e==="collect"&&t==="collection"||e==="iterate"&&t==="index"),t7e=e=>!!ZOe.includes(e),n7e=(e,t)=>!YOe.includes(t),r7e=e=>!JOe.includes(e.properties.type.default),i7e=(e,t=void 0,n=void 0)=>{var o;return Object.values(((o=e.components)==null?void 0:o.schemas)??{}).filter(ufe).filter(r7e).filter(a=>t?t.includes(a.properties.type.default):!0).filter(a=>n?!n.includes(a.properties.type.default):!0).reduce((a,s)=>{var S,x;const l=s.properties.type.default,u=s.title.replace("Invocation",""),c=s.tags??[],d=s.description??"",f=s.version;let h=!1;const p=Jp(s.properties,(w,C,T)=>{if(e7e(l,T))return ae("nodes").trace({node:l,fieldName:T,field:ft(C)},"Skipped reserved input field"),w;if(!lI(C))return ae("nodes").warn({node:l,propertyName:T,property:ft(C)},"Unhandled input property"),w;const A=C.ui_type??R3(C);if(!A)return ae("nodes").warn({node:l,fieldName:T,fieldType:A,field:ft(C)},"Missing input field type"),w;if(A==="WorkflowField")return h=!0,w;if(t7e(A))return ae("nodes").trace({node:l,fieldName:T,fieldType:A,field:ft(C)},`Skipping reserved input field type: ${A}`),w;if(!aI(A))return ae("nodes").warn({node:l,fieldName:T,fieldType:A,field:ft(C)},`Skipping unknown input field type: ${A}`),w;const I=XOe(s,C,T,A);return I?(w[T]=I,w):(ae("nodes").warn({node:l,fieldName:T,fieldType:A,field:ft(C)},"Skipping input field with no template"),w)},{}),m=s.output.$ref.split("/").pop();if(!m)return ae("nodes").warn({outputRefObject:ft(s.output)},"No output schema name found in ref object"),a;const _=(x=(S=e.components)==null?void 0:S.schemas)==null?void 0:x[m];if(!_)return ae("nodes").warn({outputSchemaName:m},"Output schema not found"),a;if(!cfe(_))return ae("nodes").error({outputSchema:ft(_)},"Invalid output schema"),a;const v=_.properties.type.default,y=Jp(_.properties,(w,C,T)=>{if(!n7e(l,T))return ae("nodes").trace({type:l,propertyName:T,property:ft(C)},"Skipped reserved output field"),w;if(!lI(C))return ae("nodes").warn({type:l,propertyName:T,property:ft(C)},"Unhandled output property"),w;const A=C.ui_type??R3(C);return aI(A)?(w[T]={fieldKind:"output",name:T,title:C.title??(T?mE(T):""),description:C.description??"",type:A,ui_hidden:C.ui_hidden??!1,ui_type:C.ui_type,ui_order:C.ui_order},w):(ae("nodes").warn({fieldName:T,fieldType:A,field:ft(C)},"Skipping unknown output field type"),w)},{}),g=s.properties.use_cache.default,b={title:u,type:l,version:f,tags:c,description:d,outputType:v,inputs:p,outputs:y,useCache:g,withWorkflow:h};return Object.assign(a,{[l]:b}),a},{})},o7e=()=>{pe({actionCreator:Pg.fulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=ae("system"),i=e.payload;r.debug({schemaJSON:i},"Received OpenAPI schema");const{nodesAllowlist:o,nodesDenylist:a}=n().config,s=i7e(i,o,a);r.debug({nodeTemplates:ft(s)},`Built ${n_(s)} node templates`),t(wz(s))}}),pe({actionCreator:Pg.rejected,effect:e=>{ae("system").error({error:ft(e.error)},"Problem retrieving OpenAPI Schema")}})},a7e=()=>{pe({actionCreator:kD,effect:(e,{dispatch:t,getState:n})=>{ae("socketio").debug("Connected");const{nodes:i,config:o,system:a}=n(),{disabledTabs:s}=o;!n_(i.nodeTemplates)&&!s.includes("nodes")&&t(Pg()),a.isInitialized?t(No.util.resetApiState()):t(lve(!0)),t(yE(e.payload))}})},s7e=()=>{pe({actionCreator:ID,effect:(e,{dispatch:t})=>{ae("socketio").debug("Disconnected"),t(MD(e.payload))}})},l7e=()=>{pe({actionCreator:DD,effect:(e,{dispatch:t})=>{ae("socketio").trace(e.payload,"Generator progress"),t(SE(e.payload))}})},u7e=()=>{pe({actionCreator:$D,effect:(e,{dispatch:t})=>{ae("socketio").debug(e.payload,"Session complete"),t(ND(e.payload))}})},c7e=["load_image","image"],d7e=()=>{pe({actionCreator:bE,effect:async(e,{dispatch:t,getState:n})=>{const r=ae("socketio"),{data:i}=e.payload;r.debug({data:ft(i)},`Invocation complete (${e.payload.data.node.type})`);const{result:o,node:a,queue_batch_id:s,source_node_id:l}=i;if(pG(o)&&!c7e.includes(a.type)&&!qMe.includes(l)){const{image_name:u}=o.image,{canvas:c,gallery:d}=n(),f=t(ue.endpoints.getImageDTO.initiate(u,{forceRefetch:!0})),h=await f.unwrap();if(f.unsubscribe(),c.batchIds.includes(s)&&[Wu].includes(i.source_node_id)&&t(mle(h)),!h.is_intermediate){t(ue.util.updateQueryData("listImages",{board_id:h.board_id??"none",categories:Ln},m=>{Dt.addOne(m,h)})),t(Qe.util.updateQueryData("getBoardImagesTotal",h.board_id??"none",m=>{m.total+=1})),t(ue.util.invalidateTags([{type:"Board",id:h.board_id??"none"}]));const{shouldAutoSwitch:p}=d;p&&(d.galleryView!=="images"&&t(C5("images")),h.board_id&&h.board_id!==d.selectedBoardId&&t(I1({boardId:h.board_id,selectedImageName:h.image_name})),!h.board_id&&d.selectedBoardId!=="none"&&t(I1({boardId:"none",selectedImageName:h.image_name})),t(ha(h)))}}t(_E(e.payload))}})},f7e=()=>{pe({actionCreator:OD,effect:(e,{dispatch:t})=>{ae("socketio").error(e.payload,`Invocation error (${e.payload.data.node.type})`),t(r_(e.payload))}})},h7e=()=>{pe({actionCreator:UD,effect:(e,{dispatch:t})=>{ae("socketio").error(e.payload,`Invocation retrieval error (${e.payload.data.graph_execution_state_id})`),t(GD(e.payload))}})},p7e=()=>{pe({actionCreator:RD,effect:(e,{dispatch:t})=>{ae("socketio").debug(e.payload,`Invocation started (${e.payload.data.node.type})`),t(vE(e.payload))}})},g7e=()=>{pe({actionCreator:LD,effect:(e,{dispatch:t})=>{const n=ae("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load started: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(FD(e.payload))}}),pe({actionCreator:BD,effect:(e,{dispatch:t})=>{const n=ae("socketio"),{base_model:r,model_name:i,model_type:o,submodel:a}=e.payload.data;let s=`Model load complete: ${r}/${o}/${i}`;a&&(s=s.concat(`/${a}`)),n.debug(e.payload,s),t(zD(e.payload))}})},m7e=()=>{pe({actionCreator:HD,effect:async(e,{dispatch:t})=>{const n=ae("socketio"),{queue_item:r,batch_status:i,queue_status:o}=e.payload.data;n.debug(e.payload,`Queue item ${r.item_id} status updated: ${r.status}`),t(ln.util.updateQueryData("listQueueItems",void 0,a=>{xu.updateOne(a,{id:r.item_id,changes:r})})),t(ln.util.updateQueryData("getQueueStatus",void 0,a=>{a&&Object.assign(a.queue,o)})),t(ln.util.updateQueryData("getBatchStatus",{batch_id:i.batch_id},()=>i)),t(ln.util.updateQueryData("getQueueItem",r.item_id,a=>{a&&Object.assign(a,r)})),t(ln.util.invalidateTags(["CurrentSessionQueueItem","NextSessionQueueItem","InvocationCacheStatus"])),t(i_(e.payload))}})},y7e=()=>{pe({actionCreator:jD,effect:(e,{dispatch:t})=>{ae("socketio").error(e.payload,`Session retrieval error (${e.payload.data.graph_execution_state_id})`),t(VD(e.payload))}})},v7e=()=>{pe({actionCreator:Bre,effect:(e,{dispatch:t})=>{ae("socketio").debug(e.payload,"Subscribed"),t(zre(e.payload))}})},b7e=()=>{pe({actionCreator:jre,effect:(e,{dispatch:t})=>{ae("socketio").debug(e.payload,"Unsubscribed"),t(Vre(e.payload))}})},_7e=()=>{pe({actionCreator:b6e,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTO:r}=e.payload;try{const i=await t(ue.endpoints.changeImageIsIntermediate.initiate({imageDTO:r,is_intermediate:!1})).unwrap(),{autoAddBoardId:o}=n().gallery;o&&o!=="none"&&await t(ue.endpoints.addImageToBoard.initiate({imageDTO:i,board_id:o})),t(nt({title:K("toast.imageSaved"),status:"success"}))}catch(i){t(nt({title:K("toast.imageSavingFailed"),description:i==null?void 0:i.message,status:"error"}))}}})},XUe=["sd-1","sd-2","sdxl","sdxl-refiner"],S7e=["sd-1","sd-2","sdxl"],QUe=["sdxl"],YUe=["sd-1","sd-2"],ZUe=["sdxl-refiner"],x7e=()=>{pe({actionCreator:Nz,effect:async(e,{getState:t,dispatch:n})=>{var i;if(e.payload==="unifiedCanvas"){const o=(i=t().generation.model)==null?void 0:i.base_model;if(o&&["sd-1","sd-2","sdxl"].includes(o))return;try{const a=n(Xo.endpoints.getMainModels.initiate(S7e)),s=await a.unwrap();if(a.unsubscribe(),!s.ids.length){n(sl(null));return}const u=Gg.getSelectors().selectAll(s).filter(h=>["sd-1","sd-2","sxdl"].includes(h.base_model))[0];if(!u){n(sl(null));return}const{base_model:c,model_name:d,model_type:f}=u;n(sl({base_model:c,model_name:d,model_type:f}))}catch{n(sl(null))}}}})},w7e=({image_name:e,esrganModelName:t,autoAddBoardId:n})=>{const r={id:Yh,type:"esrgan",image:{image_name:e},model_name:t,is_intermediate:!0},i={id:Wu,type:"linear_ui_output",use_cache:!1,is_intermediate:!1,board:n==="none"?void 0:{board_id:n}},o={id:"adhoc-esrgan-graph",nodes:{[Yh]:r,[Wu]:i},edges:[{source:{node_id:Yh,field:"image"},destination:{node_id:Wu,field:"image"}}]};return ks(o,{},Yh),Do(o,{esrgan_model:t}),o},_2=()=>KL(),S2=zL;function C7e(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function _R(e,t,n){e.loadNamespaces(t,TG(e,n))}function SR(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,TG(e,r))}function E7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const u=t.services.backendConnector.state[`${s}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function A7e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(O3("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):E7e(e,t,n)}const T7e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,P7e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},k7e=e=>P7e[e],I7e=e=>e.replace(T7e,k7e);let $3={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:I7e};function M7e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$3={...$3,...e}}function R7e(){return $3}let PG;function O7e(e){PG=e}function $7e(){return PG}const N7e={type:"3rdParty",init(e){M7e(e.options.react),O7e(e)}},D7e=k.createContext();class L7e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const F7e=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function kG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(D7e)||{},o=n||r||$7e();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new L7e),!o){O3("You will need to pass in an i18next instance by using initReactI18next");const g=(S,x)=>typeof x=="string"?x:x&&typeof x=="object"&&typeof x.defaultValue=="string"?x.defaultValue:Array.isArray(S)?S[S.length-1]:S,b=[g,{},!1];return b.t=g,b.i18n={},b.ready=!1,b}o.options.react&&o.options.react.wait!==void 0&&O3("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...R7e(),...o.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let u=e||i||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(g=>A7e(g,o,a));function d(){return o.getFixedT(t.lng||null,a.nsMode==="fallback"?u:u[0],l)}const[f,h]=k.useState(d);let p=u.join();t.lng&&(p=`${t.lng}${p}`);const m=F7e(p),_=k.useRef(!0);k.useEffect(()=>{const{bindI18n:g,bindI18nStore:b}=a;_.current=!0,!c&&!s&&(t.lng?SR(o,t.lng,u,()=>{_.current&&h(d)}):_R(o,u,()=>{_.current&&h(d)})),c&&m&&m!==p&&_.current&&h(d);function S(){_.current&&h(d)}return g&&o&&o.on(g,S),b&&o&&o.store.on(b,S),()=>{_.current=!1,g&&o&&g.split(" ").forEach(x=>o.off(x,S)),b&&o&&b.split(" ").forEach(x=>o.store.off(x,S))}},[o,p]);const v=k.useRef(!0);k.useEffect(()=>{_.current&&!v.current&&h(d),v.current=!1},[o,l]);const y=[f,o,c];if(y.t=f,y.i18n=o,y.ready=c,c||!c&&!s)return y;throw new Promise(g=>{t.lng?SR(o,t.lng,u,()=>g()):_R(o,u,()=>g())})}const B7e=(e,t)=>{if(!e||!t)return;const{width:n,height:r}=e,i=r*4*n*4,o=r*2*n*2;return{x4:i,x2:o}},z7e=(e,t)=>{if(!e||!t)return{x4:!0,x2:!0};const n={x4:!1,x2:!1};return e.x4<=t&&(n.x4=!0),e.x2<=t&&(n.x2=!0),n},j7e=(e,t)=>{if(!(!e||!t)&&!(e.x4&&e.x2)){if(!e.x2&&!e.x4)return"parameters.isAllowedToUpscale.tooLarge";if(!e.x4&&e.x2&&t===4)return"parameters.isAllowedToUpscale.useX2Model"}},IG=e=>Gn(wT,({postprocessing:t,config:n})=>{const{esrganModelName:r}=t,{maxUpscalePixels:i}=n,o=B7e(e,i),a=z7e(o,i),s=r.includes("x2")?2:4,l=j7e(a,s);return{isAllowedToUpscale:s===2?a.x2:a.x4,detailTKey:l}},zm),JUe=e=>{const{t}=kG(),n=k.useMemo(()=>IG(e),[e]),{isAllowedToUpscale:r,detailTKey:i}=S2(n);return{isAllowedToUpscale:r,detail:i?t(i):void 0}},V7e=ge("upscale/upscaleRequested"),U7e=()=>{pe({actionCreator:V7e,effect:async(e,{dispatch:t,getState:n})=>{var f;const r=ae("session"),{imageDTO:i}=e.payload,{image_name:o}=i,a=n(),{isAllowedToUpscale:s,detailTKey:l}=IG(i)(a);if(!s){r.error({imageDTO:i},K(l??"parameters.isAllowedToUpscale.tooLarge")),t(nt({title:K(l??"parameters.isAllowedToUpscale.tooLarge"),status:"error"}));return}const{esrganModelName:u}=a.postprocessing,{autoAddBoardId:c}=a.gallery,d={prepend:!0,batch:{graph:w7e({image_name:o,esrganModelName:u,autoAddBoardId:c}),runs:1}};try{const h=t(ln.endpoints.enqueueBatch.initiate(d,{fixedCacheKey:"enqueueBatch"})),p=await h.unwrap();h.reset(),r.debug({enqueueResult:ft(p)},K("queue.graphQueued"))}catch(h){if(r.error({enqueueBatchArg:ft(d)},K("queue.graphFailedToQueue")),h instanceof Object&&"data"in h&&"status"in h&&h.status===403){const p=((f=h.data)==null?void 0:f.detail)||"Unknown Error";t(nt({title:K("queue.graphFailedToQueue"),status:"error",description:p,duration:15e3}));return}t(nt({title:K("queue.graphFailedToQueue"),status:"error"}))}}})},G7e=Ta(null),H7e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,db=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(H7e);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},xR=e=>e==="*"||e==="x"||e==="X",wR=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},q7e=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],W7e=(e,t)=>{if(xR(e)||xR(t))return 0;const[n,r]=q7e(wR(e),wR(t));return n>r?1:n{for(let n=0;n{const n=db(e),r=db(t),i=n.pop(),o=r.pop(),a=bd(n,r);return a!==0?a:i&&o?bd(i.split("."),o.split(".")):i||o?i?-1:1:0},K7e=(e,t,n)=>{X7e(n);const r=MG(e,t);return RG[n].includes(r)},RG={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},CR=Object.keys(RG),X7e=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(CR.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${CR.join("|")}`)},hv=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>hv(e,_));if(t.includes(" - ")){const[_,v]=t.split(" - ",2);return hv(e,`>=${_} <=${v}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>hv(e,_));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return K7e(e,t,r);const[i,o,a,,s]=db(e),[l,u,c,,d]=db(t),f=[i,o,a],h=[l,u??"x",c??"x"];if(d&&(!s||bd(f,h)!==0||bd(s.split("."),d.split("."))===-1))return!1;const p=h.findIndex(_=>_!=="0")+1,m=r==="~"?2:p>1?p:1;return!(bd(f.slice(0,m),h.slice(0,m))!==0||bd(f.slice(m),h.slice(m))===-1)},Q7e=(e,t)=>{const n=Ye(e),{nodes:r,edges:i}=n,o=[],a=r.filter(w5),s=gE(a,"id");return r.forEach(l=>{if(!w5(l))return;const u=t[l.data.type];if(!u){o.push({message:`${ce.t("nodes.node")} "${l.data.type}" ${ce.t("nodes.skipped")}`,issues:[`${ce.t("nodes.nodeType")}"${l.data.type}" ${ce.t("nodes.doesNotExist")}`],data:l});return}if(u.version&&l.data.version&&MG(u.version,l.data.version)!==0){o.push({message:`${ce.t("nodes.node")} "${l.data.type}" ${ce.t("nodes.mismatchedVersion")}`,issues:[`${ce.t("nodes.node")} "${l.data.type}" v${l.data.version} ${ce.t("nodes.maybeIncompatible")} v${u.version}`],data:{node:l,nodeTemplate:ft(u)}});return}}),i.forEach((l,u)=>{const c=s[l.source],d=s[l.target],f=[];if(c?l.type==="default"&&!(l.sourceHandle in c.data.outputs)&&f.push(`${ce.t("nodes.outputNode")} "${l.source}.${l.sourceHandle}" ${ce.t("nodes.doesNotExist")}`):f.push(`${ce.t("nodes.outputNode")} ${l.source} ${ce.t("nodes.doesNotExist")}`),d?l.type==="default"&&!(l.targetHandle in d.data.inputs)&&f.push(`${ce.t("nodes.inputField")} "${l.target}.${l.targetHandle}" ${ce.t("nodes.doesNotExist")}`):f.push(`${ce.t("nodes.inputNode")} ${l.target} ${ce.t("nodes.doesNotExist")}`),t[(c==null?void 0:c.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${ce.t("nodes.sourceNode")} "${l.source}" ${ce.t("nodes.missingTemplate")} "${c==null?void 0:c.data.type}"`),t[(d==null?void 0:d.data.type)??"__UNKNOWN_NODE_TYPE__"]||f.push(`${ce.t("nodes.sourceNode")}"${l.target}" ${ce.t("nodes.missingTemplate")} "${d==null?void 0:d.data.type}"`),f.length){delete i[u];const h=l.type==="default"?l.sourceHandle:l.source,p=l.type==="default"?l.targetHandle:l.target;o.push({message:`Edge "${h} -> ${p}" skipped`,issues:f,data:l})}}),{workflow:n,errors:o}},Y7e=()=>{pe({actionCreator:o1e,effect:(e,{dispatch:t,getState:n})=>{const r=ae("nodes"),i=e.payload,o=n().nodes.nodeTemplates,{workflow:a,errors:s}=Q7e(i,o);t(Jye(a)),s.length?(t(nt(vs({title:K("toast.loadedWithWarnings"),status:"warning"}))),s.forEach(({message:l,...u})=>{r.warn(u,l)})):t(nt(vs({title:K("toast.workflowLoaded"),status:"success"}))),t(Nz("nodes")),requestAnimationFrame(()=>{var l;(l=G7e.get())==null||l.fitView()})}})},Z7e={Any:void 0,enum:"",BoardField:void 0,boolean:!1,BooleanCollection:[],BooleanPolymorphic:!1,ClipField:void 0,Collection:[],CollectionItem:void 0,ColorCollection:[],ColorField:void 0,ColorPolymorphic:void 0,ConditioningCollection:[],ConditioningField:void 0,ConditioningPolymorphic:void 0,ControlCollection:[],ControlField:void 0,ControlNetModelField:void 0,ControlPolymorphic:void 0,DenoiseMaskField:void 0,float:0,FloatCollection:[],FloatPolymorphic:0,ImageCollection:[],ImageField:void 0,ImagePolymorphic:void 0,integer:0,IntegerCollection:[],IntegerPolymorphic:0,IPAdapterCollection:[],IPAdapterField:void 0,IPAdapterModelField:void 0,IPAdapterPolymorphic:void 0,LatentsCollection:[],LatentsField:void 0,LatentsPolymorphic:void 0,MetadataItemField:void 0,MetadataItemCollection:[],MetadataItemPolymorphic:void 0,MetadataField:void 0,MetadataCollection:[],LoRAModelField:void 0,MainModelField:void 0,ONNXModelField:void 0,Scheduler:"euler",SDXLMainModelField:void 0,SDXLRefinerModelField:void 0,string:"",StringCollection:[],StringPolymorphic:"",T2IAdapterCollection:[],T2IAdapterField:void 0,T2IAdapterModelField:void 0,T2IAdapterPolymorphic:void 0,UNetField:void 0,VaeField:void 0,VaeModelField:void 0},J7e=(e,t)=>{const n={id:e,name:t.name,type:t.type,label:"",fieldKind:"input"};return n.value=t.default??Z7e[t.type],n},Ww={dragHandle:`.${dz}`},e$e=(e,t,n)=>{const r=yl();if(e==="current_image")return{...Ww,id:r,type:"current_image",position:t,data:{id:r,type:"current_image",isOpen:!0,label:"Current Image"}};if(e==="notes")return{...Ww,id:r,type:"notes",position:t,data:{id:r,isOpen:!0,label:"Notes",notes:"",type:"notes"}};if(n===void 0){console.error(`Unable to find template ${e}.`);return}const i=Jp(n.inputs,(s,l,u)=>{const c=yl(),d=J7e(c,l);return s[u]=d,s},{}),o=Jp(n.outputs,(s,l,u)=>{const d={id:yl(),name:u,type:l.type,fieldKind:"output"};return s[u]=d,s},{});return{...Ww,id:r,type:"invocation",position:t,data:{id:r,type:e,version:n.version,label:"",notes:"",isOpen:!0,embedWorkflow:!1,isIntermediate:e!=="save_image",inputs:i,outputs:o,useCache:n.useCache}}},t$e=()=>{const e=_2(),t=S2(r=>r.system.toastQueue),n=rPe();return k.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(ove())},[e,n,t]),null},n$e=()=>{const e=_2();return k.useCallback(n=>e(nt(vs(n))),[e])},eGe=k.memo(t$e),fb=(e,t)=>!on(e)||!t?!1:e.data.version!==t.version,OG=(e,t)=>{if(!fb(e,t)||!on(e)||!t||!e.data.version)return!1;const r=gfe.parse(t.version).major;return hv(e.data.version,`^${r}`)},$G=(e,t)=>{if(!OG(e,t)||!on(e)||!t||!e.data.version)return;const r=e$e(e.data.type,e.position,t),i=Ye(e);return i.data.version=t.version,vD(i,r),i},tGe=e=>{const t=_2(),n=n$e(),{t:r}=kG(),i=k.useMemo(()=>Gn(wT,({nodes:c})=>{const d=c.nodes.find(h=>h.id===e),f=c.nodeTemplates[(d==null?void 0:d.data.type)??""];return{node:d,nodeTemplate:f}},zm),[e]),{node:o,nodeTemplate:a}=S2(i),s=k.useMemo(()=>fb(o,a),[o,a]),l=k.useMemo(()=>OG(o,a),[o,a]),u=k.useCallback(()=>{const c=fb(o,a),d=$G(o,a);if(!d){c&&n({title:r("nodes.unableToUpdateNodes",{count:1})});return}t(xz({nodeId:d.id,node:d}))},[t,o,a,r,n]);return{needsUpdate:s,mayUpdate:l,updateNode:u}},r$e=()=>{pe({actionCreator:a1e,effect:(e,{dispatch:t,getState:n})=>{const r=ae("nodes"),i=n().nodes.nodes,o=n().nodes.nodeTemplates;let a=0;i.forEach(s=>{const l=o[s.data.type],u=fb(s,l),c=$G(s,l);if(!c){u&&a++;return}t(xz({nodeId:c.id,node:c}))}),a&&(r.warn(`Unable to update ${a} nodes. Please report this issue.`),t(nt(vs({title:K("nodes.unableToUpdateNodes",{count:a})}))))}})},NG=iN(),pe=NG.startListening;ORe();$Re();BRe();CRe();ERe();ARe();TRe();PRe();f6e();RRe();NRe();DRe();iRe();SRe();fRe();h1e();c6e();OMe();kMe();P6e();IMe();T6e();E6e();RMe();_7e();d1e();l7e();u7e();d7e();f7e();p7e();a7e();s7e();v7e();b7e();g7e();y7e();h7e();m7e();DMe();NMe();xRe();wRe();IRe();MRe();h6e();o7e();Y7e();r$e();kRe();zRe();m1e();VRe();p1e();f1e();U7e();x7e();HRe();const i$e={canvas:wle,gallery:Cfe,generation:Zoe,nodes:eve,postprocessing:tve,system:uve,config:Fre,ui:pve,hotkeys:hve,controlAdapters:kie,dynamicPrompts:Nle,deleteImageModal:Ple,changeBoardModal:Ele,lora:Tfe,modelmanager:fve,sdxl:rve,queue:dae,[No.reducerPath]:No.reducer},o$e=Mf(i$e),a$e=Bve(o$e),s$e=["canvas","gallery","generation","sdxl","nodes","postprocessing","system","ui","controlAdapters","dynamicPrompts","lora","modelmanager"],DG=F$({reducer:a$e,enhancers:e=>e.concat(zve(window.localStorage,s$e,{persistDebounce:300,serialize:Zve,unserialize:e1e,prefix:jve})).concat(aN()),middleware:e=>e({serializableCheck:!1,immutableCheck:!1}).concat(No.middleware).concat(vve).prepend(NG.middleware),devTools:{actionSanitizer:s1e,stateSanitizer:u1e,trace:!0,predicate:(e,t)=>!l1e.includes(t.type)}}),wT=e=>e;PF.set(DG);const l$e=e=>{const{socket:t,storeApi:n}=e,{dispatch:r}=n;t.on("connect",()=>{ae("socketio").debug("Connected"),r(kD());const o=Nn.get();t.emit("subscribe_queue",{queue_id:o})}),t.on("connect_error",i=>{i&&i.message&&i.data==="ERR_UNAUTHENTICATED"&&r(nt(vs({title:i.message,status:"error",duration:1e4})))}),t.on("disconnect",()=>{r(ID())}),t.on("invocation_started",i=>{r(RD({data:i}))}),t.on("generator_progress",i=>{r(DD({data:i}))}),t.on("invocation_error",i=>{r(OD({data:i}))}),t.on("invocation_complete",i=>{r(bE({data:i}))}),t.on("graph_execution_state_complete",i=>{r($D({data:i}))}),t.on("model_load_started",i=>{r(LD({data:i}))}),t.on("model_load_completed",i=>{r(BD({data:i}))}),t.on("session_retrieval_error",i=>{r(jD({data:i}))}),t.on("invocation_retrieval_error",i=>{r(UD({data:i}))}),t.on("queue_item_status_changed",i=>{r(HD({data:i}))})},wa=Object.create(null);wa.open="0";wa.close="1";wa.ping="2";wa.pong="3";wa.message="4";wa.upgrade="5";wa.noop="6";const pv=Object.create(null);Object.keys(wa).forEach(e=>{pv[wa[e]]=e});const N3={type:"error",data:"parser error"},LG=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",FG=typeof ArrayBuffer=="function",BG=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CT=({type:e,data:t},n,r)=>LG&&t instanceof Blob?n?r(t):ER(t,r):FG&&(t instanceof ArrayBuffer||BG(t))?n?r(t):ER(new Blob([t]),r):r(wa[e]+(t||"")),ER=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function AR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Kw;function u$e(e,t){if(LG&&e.data instanceof Blob)return e.data.arrayBuffer().then(AR).then(t);if(FG&&(e.data instanceof ArrayBuffer||BG(e.data)))return t(AR(e.data));CT(e,!1,n=>{Kw||(Kw=new TextEncoder),t(Kw.encode(n))})}const TR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(a&15)<<4|s>>2,c[i++]=(s&3)<<6|l&63;return u},d$e=typeof ArrayBuffer=="function",ET=(e,t)=>{if(typeof e!="string")return{type:"message",data:zG(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:f$e(e.substring(1),t)}:pv[n]?e.length>1?{type:pv[n],data:e.substring(1)}:{type:pv[n]}:N3},f$e=(e,t)=>{if(d$e){const n=c$e(e);return zG(n,t)}else return{base64:!0,data:e}},zG=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},jG=String.fromCharCode(30),h$e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CT(o,!1,s=>{r[a]=s,++i===n&&t(r.join(jG))})})},p$e=(e,t)=>{const n=e.split(jG),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Xw;function by(e){return e.reduce((t,n)=>t+n.length,0)}function _y(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){s.enqueue(N3);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(by(n)e){s.enqueue(N3);break}}}})}const VG=4;function Cn(e){if(e)return y$e(e)}function y$e(e){for(var t in Cn.prototype)e[t]=Cn.prototype[t];return e}Cn.prototype.on=Cn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Cn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Cn.prototype.off=Cn.prototype.removeListener=Cn.prototype.removeAllListeners=Cn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function UG(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const v$e=Gi.setTimeout,b$e=Gi.clearTimeout;function x2(e,t){t.useNativeTimers?(e.setTimeoutFn=v$e.bind(Gi),e.clearTimeoutFn=b$e.bind(Gi)):(e.setTimeoutFn=Gi.setTimeout.bind(Gi),e.clearTimeoutFn=Gi.clearTimeout.bind(Gi))}const _$e=1.33;function S$e(e){return typeof e=="string"?x$e(e):Math.ceil((e.byteLength||e.size)*_$e)}function x$e(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function w$e(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function C$e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function HG(){const e=IR(+new Date);return e!==kR?(PR=0,kR=e):e+"."+IR(PR++)}for(;Sy{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};p$e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,h$e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=HG()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new qd(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let qd=class gv extends Cn{constructor(t,n){super(),x2(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=UG(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new WG(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=gv.requestsCount++,gv.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=P$e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete gv.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};qd.requestsCount=0;qd.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",MR);else if(typeof addEventListener=="function"){const e="onpagehide"in Gi?"pagehide":"unload";addEventListener(e,MR,!1)}}function MR(){for(let e in qd.requests)qd.requests.hasOwnProperty(e)&&qd.requests[e].abort()}const TT=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),xy=Gi.WebSocket||Gi.MozWebSocket,RR=!0,M$e="arraybuffer",OR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class R$e extends AT{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=OR?{}:UG(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=RR&&!OR?n?new xy(t,n):new xy(t):new xy(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{RR&&this.ws.send(o)}catch{}i&&TT(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=HG()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!xy}}class O$e extends AT{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=m$e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=g$e();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),o())}).catch(s=>{})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&TT(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const $$e={websocket:R$e,webtransport:O$e,polling:I$e},N$e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,D$e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function L3(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=N$e.exec(e||""),o={},a=14;for(;a--;)o[D$e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=L$e(o,o.path),o.queryKey=F$e(o,o.query),o}function L$e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function F$e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let KG=class Xc extends Cn{constructor(t,n={}){super(),this.binaryType=M$e,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=L3(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=L3(n.host).host),x2(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=C$e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=VG,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new $$e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Xc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Xc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const a=d=>{const f=new Error("probe error: "+d);f.transport=n.name,o(),this.emitReserved("upgradeError",f)};function s(){a("transport closed")}function l(){a("socket closed")}function u(d){n&&d.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Xc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Xc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,XG=Object.prototype.toString,V$e=typeof Blob=="function"||typeof Blob<"u"&&XG.call(Blob)==="[object BlobConstructor]",U$e=typeof File=="function"||typeof File<"u"&&XG.call(File)==="[object FileConstructor]";function PT(e){return z$e&&(e instanceof ArrayBuffer||j$e(e))||V$e&&e instanceof Blob||U$e&&e instanceof File}function mv(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(o),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((a,s)=>r?a?o(a):i(s):i(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ze.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}qf.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};qf.prototype.reset=function(){this.attempts=0};qf.prototype.setMin=function(e){this.ms=e};qf.prototype.setMax=function(e){this.max=e};qf.prototype.setJitter=function(e){this.jitter=e};class z3 extends Cn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,x2(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new qf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Q$e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new KG(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=vo(n,"open",function(){r.onopen(),t&&t()}),o=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=vo(n,"error",o);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vo(t,"ping",this.onping.bind(this)),vo(t,"data",this.ondata.bind(this)),vo(t,"error",this.onerror.bind(this)),vo(t,"close",this.onclose.bind(this)),vo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){TT(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new QG(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Rh={};function yv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=B$e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Rh[i]&&o in Rh[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new z3(r,t):(Rh[i]||(Rh[i]=new z3(r,t)),l=Rh[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(yv,{Manager:z3,Socket:QG,io:yv,connect:yv});const NR=()=>{let e=!1,n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`;const r={timeout:6e4,path:"/ws/socket.io",autoConnect:!1};if(["nodes","package"].includes("production")){const a=mg.get();a&&(n=a.replace(/^https?\:\/\//i,""));const s=gg.get();s&&(r.auth={token:s}),r.transports=["websocket","polling"]}const i=yv(n,r);return a=>s=>l=>{e||(l$e({storeApi:a,socket:i}),e=!0,i.connect()),s(l)}},Z$e=""+new URL("logo-13003d72.png",import.meta.url).href,J$e=()=>q.jsxs(eT,{position:"relative",width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#151519",children:[q.jsx(JA,{src:Z$e,w:"8rem",h:"8rem"}),q.jsx(QA,{label:"Loading",color:"grey",position:"absolute",size:"sm",width:"24px !important",height:"24px !important",right:"1.5rem",bottom:"1.5rem"})]}),eNe=k.memo(J$e);function j3(e){"@babel/helpers - typeof";return j3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j3(e)}var YG=[],tNe=YG.forEach,nNe=YG.slice;function V3(e){return tNe.call(nNe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function ZG(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":j3(XMLHttpRequest))==="object"}function rNe(e){return!!e&&typeof e.then=="function"}function iNe(e){return rNe(e)?e:Promise.resolve(e)}function oNe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var U3={exports:{}},wy={exports:{}},DR;function aNe(){return DR||(DR=1,function(e,t){var n=typeof self<"u"?self:Ve,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(E){return E&&DataView.prototype.isPrototypeOf(E)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(E){return E&&u.indexOf(Object.prototype.toString.call(E))>-1};function d(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(E))throw new TypeError("Invalid character in header field name");return E.toLowerCase()}function f(E){return typeof E!="string"&&(E=String(E)),E}function h(E){var P={next:function(){var N=E.shift();return{done:N===void 0,value:N}}};return s.iterable&&(P[Symbol.iterator]=function(){return P}),P}function p(E){this.map={},E instanceof p?E.forEach(function(P,N){this.append(N,P)},this):Array.isArray(E)?E.forEach(function(P){this.append(P[0],P[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(P){this.append(P,E[P])},this)}p.prototype.append=function(E,P){E=d(E),P=f(P);var N=this.map[E];this.map[E]=N?N+", "+P:P},p.prototype.delete=function(E){delete this.map[d(E)]},p.prototype.get=function(E){return E=d(E),this.has(E)?this.map[E]:null},p.prototype.has=function(E){return this.map.hasOwnProperty(d(E))},p.prototype.set=function(E,P){this.map[d(E)]=f(P)},p.prototype.forEach=function(E,P){for(var N in this.map)this.map.hasOwnProperty(N)&&E.call(P,this.map[N],N,this)},p.prototype.keys=function(){var E=[];return this.forEach(function(P,N){E.push(N)}),h(E)},p.prototype.values=function(){var E=[];return this.forEach(function(P){E.push(P)}),h(E)},p.prototype.entries=function(){var E=[];return this.forEach(function(P,N){E.push([N,P])}),h(E)},s.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function _(E){return new Promise(function(P,N){E.onload=function(){P(E.result)},E.onerror=function(){N(E.error)}})}function v(E){var P=new FileReader,N=_(P);return P.readAsArrayBuffer(E),N}function y(E){var P=new FileReader,N=_(P);return P.readAsText(E),N}function g(E){for(var P=new Uint8Array(E),N=new Array(P.length),L=0;L-1?P:E}function C(E,P){P=P||{};var N=P.body;if(E instanceof C){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,P.headers||(this.headers=new p(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!N&&E._bodyInit!=null&&(N=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new p(P.headers)),this.method=w(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&N)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(N)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function T(E){var P=new FormData;return E.trim().split("&").forEach(function(N){if(N){var L=N.split("="),O=L.shift().replace(/\+/g," "),R=L.join("=").replace(/\+/g," ");P.append(decodeURIComponent(O),decodeURIComponent(R))}}),P}function A(E){var P=new p,N=E.replace(/\r?\n[\t ]+/g," ");return N.split(/\r?\n/).forEach(function(L){var O=L.split(":"),R=O.shift().trim();if(R){var $=O.join(":").trim();P.append(R,$)}}),P}S.call(C.prototype);function I(E,P){P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in P?P.statusText:"OK",this.headers=new p(P.headers),this.url=P.url||"",this._initBody(E)}S.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},I.error=function(){var E=new I(null,{status:0,statusText:""});return E.type="error",E};var D=[301,302,303,307,308];I.redirect=function(E,P){if(D.indexOf(P)===-1)throw new RangeError("Invalid status code");return new I(null,{status:P,headers:{location:E}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(P,N){this.message=P,this.name=N;var L=Error(P);this.stack=L.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function M(E,P){return new Promise(function(N,L){var O=new C(E,P);if(O.signal&&O.signal.aborted)return L(new a.DOMException("Aborted","AbortError"));var R=new XMLHttpRequest;function $(){R.abort()}R.onload=function(){var z={status:R.status,statusText:R.statusText,headers:A(R.getAllResponseHeaders()||"")};z.url="responseURL"in R?R.responseURL:z.headers.get("X-Request-URL");var V="response"in R?R.response:R.responseText;N(new I(V,z))},R.onerror=function(){L(new TypeError("Network request failed"))},R.ontimeout=function(){L(new TypeError("Network request failed"))},R.onabort=function(){L(new a.DOMException("Aborted","AbortError"))},R.open(O.method,O.url,!0),O.credentials==="include"?R.withCredentials=!0:O.credentials==="omit"&&(R.withCredentials=!1),"responseType"in R&&s.blob&&(R.responseType="blob"),O.headers.forEach(function(z,V){R.setRequestHeader(V,z)}),O.signal&&(O.signal.addEventListener("abort",$),R.onreadystatechange=function(){R.readyState===4&&O.signal.removeEventListener("abort",$)}),R.send(typeof O._bodyInit>"u"?null:O._bodyInit)})}return M.polyfill=!0,o.fetch||(o.fetch=M,o.Headers=p,o.Request=C,o.Response=I),a.Headers=p,a.Request=C,a.Response=I,a.fetch=M,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(wy,wy.exports)),wy.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Ve<"u"&&Ve.fetch?n=Ve.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof oNe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||aNe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(U3,U3.exports);var JG=U3.exports;const eH=Bl(JG),LR=iO({__proto__:null,default:eH},[JG]);function hb(e){"@babel/helpers - typeof";return hb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hb(e)}var ls;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?ls=global.fetch:typeof window<"u"&&window.fetch?ls=window.fetch:ls=fetch);var Hg;ZG()&&(typeof global<"u"&&global.XMLHttpRequest?Hg=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Hg=window.XMLHttpRequest));var pb;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?pb=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(pb=window.ActiveXObject));!ls&&LR&&!Hg&&!pb&&(ls=eH||LR);typeof ls!="function"&&(ls=void 0);var G3=function(t,n){if(n&&hb(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},FR=function(t,n,r){ls(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},BR=!1,sNe=function(t,n,r,i){t.queryStringParams&&(n=G3(n,t.queryStringParams));var o=V3({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=V3({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},BR?{}:a);try{FR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),FR(n,s,i),BR=!0}catch(u){i(u)}}},lNe=function(t,n,r,i){r&&hb(r)==="object"&&(r=G3("",r).slice(1)),t.queryStringParams&&(n=G3(n,t.queryStringParams));try{var o;Hg?o=new Hg:o=new pb("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},uNe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},ls&&n.indexOf("file:")!==0)return sNe(t,n,r,i);if(ZG()||typeof ActiveXObject=="function")return lNe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function cNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zR(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};cNe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return dNe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=V3(i,this.options||{},pNe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=iNe(l),l.then(function(u){if(!u)return a(null,{});var c=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(c,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this,s=typeof i=="string"?[i]:i,l=typeof o=="string"?[o]:o,u=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,u,function(c,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&c&&c.message&&c.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+c.message,!0);if(c)return r(c,!1);var f,h;try{typeof d.data=="string"?f=a.options.parse(d.data,i,o):f=d.data}catch{h="failed parsing "+n+" to json"}if(h)return r(h,!1);r(null,f)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,c=[],d=[];n.forEach(function(f){var h=s.options.addPath;typeof s.options.addPath=="function"&&(h=s.options.addPath(f,r));var p=s.services.interpolator.interpolate(h,{lng:f,ns:r});s.options.request(s.options,p,l,function(m,_){u+=1,c.push(m),d.push(_),u===n.length&&typeof a=="function"&&a(c,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(d){var f=o.toResolveHierarchy(d);f.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),l.forEach(function(c){n.allOptions.ns.forEach(function(d){i.read(c,d,"read",null,null,function(f,h){f&&a.warn("loading namespace ".concat(d," for language ").concat(c," failed"),f),!f&&h&&a.log("loaded namespace ".concat(d," for language ").concat(c),h),i.loaded("".concat(c,"|").concat(d),f,h)})})})}}}]),e}();nH.type="backend";ce.use(nH).use(N7e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const w2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function IT(e){return"nodeType"in e}function zr(e){var t,n;return e?Wf(e)?e:IT(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function MT(e){const{Document:t}=zr(e);return e instanceof t}function qm(e){return Wf(e)?!1:e instanceof zr(e).HTMLElement}function gNe(e){return e instanceof zr(e).SVGElement}function Kf(e){return e?Wf(e)?e.document:IT(e)?MT(e)?e:qm(e)?e.ownerDocument:document:document:document}const Ca=w2?k.useLayoutEffect:k.useEffect;function C2(e){const t=k.useRef(e);return Ca(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{e.current=setInterval(r,i)},[]),n=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Wg(e,t){t===void 0&&(t=[e]);const n=k.useRef(e);return Ca(()=>{n.current!==e&&(n.current=e)},t),n}function Wm(e,t){const n=k.useRef();return k.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function gb(e){const t=C2(e),n=k.useRef(null),r=k.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function mb(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}let Qw={};function E2(e,t){return k.useMemo(()=>{if(t)return t;const n=Qw[e]==null?0:Qw[e]+1;return Qw[e]=n,e+"-"+n},[e,t])}function rH(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const s=Object.entries(a);for(const[l,u]of s){const c=o[l];c!=null&&(o[l]=c+e*u)}return o},{...t})}}const Wd=rH(1),yb=rH(-1);function yNe(e){return"clientX"in e&&"clientY"in e}function RT(e){if(!e)return!1;const{KeyboardEvent:t}=zr(e.target);return t&&e instanceof t}function vNe(e){if(!e)return!1;const{TouchEvent:t}=zr(e.target);return t&&e instanceof t}function Kg(e){if(vNe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return yNe(e)?{x:e.clientX,y:e.clientY}:null}const Xg=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Xg.Translate.toString(e),Xg.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),jR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bNe(e){return e.matches(jR)?e:e.querySelector(jR)}const _Ne={display:"none"};function SNe(e){let{id:t,value:n}=e;return bt.createElement("div",{id:t,style:_Ne},n)}const xNe={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function wNe(e){let{id:t,announcement:n}=e;return bt.createElement("div",{id:t,style:xNe,role:"status","aria-live":"assertive","aria-atomic":!0},n)}function CNe(){const[e,t]=k.useState("");return{announce:k.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const iH=k.createContext(null);function ENe(e){const t=k.useContext(iH);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function ANe(){const[e]=k.useState(()=>new Set),t=k.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[k.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const TNe={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},PNe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function kNe(e){let{announcements:t=PNe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=TNe}=e;const{announce:o,announcement:a}=CNe(),s=E2("DndLiveRegion"),[l,u]=k.useState(!1);if(k.useEffect(()=>{u(!0)},[]),ENe(k.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const c=bt.createElement(bt.Fragment,null,bt.createElement(SNe,{id:r,value:i.draggable}),bt.createElement(wNe,{id:s,announcement:a}));return n?pi.createPortal(c,n):c}var Pn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Pn||(Pn={}));function vb(){}function VR(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function INe(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Lo=Object.freeze({x:0,y:0});function MNe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function RNe(e,t){const n=Kg(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function ONe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function $Ne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function NNe(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function DNe(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function LNe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=LNe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort($Ne)};function BNe(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const zNe=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const o of t){const{id:a}=o,s=n.get(a);if(s&&BNe(r,s)){const u=NNe(s).reduce((d,f)=>d+MNe(r,f),0),c=Number((u/4).toFixed(4));i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(ONe)};function jNe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function oH(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Lo}function VNe(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const UNe=VNe(1);function aH(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function GNe(e,t,n){const r=aH(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}const HNe={ignoreTransform:!1};function Km(e,t){t===void 0&&(t=HNe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:c}=zr(e).getComputedStyle(e);u&&(n=GNe(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function UR(e){return Km(e,{ignoreTransform:!0})}function qNe(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function WNe(e,t){return t===void 0&&(t=zr(e).getComputedStyle(e)),t.position==="fixed"}function KNe(e,t){t===void 0&&(t=zr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function OT(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(MT(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!qm(i)||gNe(i)||n.includes(i))return n;const o=zr(e).getComputedStyle(i);return i!==e&&KNe(i,o)&&n.push(i),WNe(i,o)?n:r(i.parentNode)}return e?r(e):n}function sH(e){const[t]=OT(e,1);return t??null}function Yw(e){return!w2||!e?null:Wf(e)?e:IT(e)?MT(e)||e===Kf(e).scrollingElement?window:qm(e)?e:null:null}function lH(e){return Wf(e)?e.scrollX:e.scrollLeft}function uH(e){return Wf(e)?e.scrollY:e.scrollTop}function H3(e){return{x:lH(e),y:uH(e)}}var zn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(zn||(zn={}));function cH(e){return!w2||!e?!1:e===document.scrollingElement}function dH(e){const t={x:0,y:0},n=cH(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const XNe={x:.2,y:.2};function QNe(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=XNe);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=dH(e),h={x:0,y:0},p={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(h.y=zn.Backward,p.y=r*Math.abs((t.top+m.height-o)/m.height)):!c&&l>=t.bottom-m.height&&(h.y=zn.Forward,p.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(h.x=zn.Forward,p.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&a<=t.left+m.width&&(h.x=zn.Backward,p.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:h,speed:p}}function YNe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function fH(e){return e.reduce((t,n)=>Wd(t,H3(n)),Lo)}function ZNe(e){return e.reduce((t,n)=>t+lH(n),0)}function JNe(e){return e.reduce((t,n)=>t+uH(n),0)}function hH(e,t){if(t===void 0&&(t=Km),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);sH(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const eDe=[["x",["left","right"],ZNe],["y",["top","bottom"],JNe]];class $T{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=OT(n),i=fH(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of eDe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(r),c=i[o]-u;return this.rect[l]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class wp{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function tDe(e){const{EventTarget:t}=zr(e);return e instanceof t?e:Kf(e)}function Zw(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ji;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ji||(ji={}));function GR(e){e.preventDefault()}function nDe(e){e.stopPropagation()}var At;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(At||(At={}));const pH={start:[At.Space,At.Enter],cancel:[At.Esc],end:[At.Space,At.Enter]},rDe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case At.Right:return{...n,x:n.x+25};case At.Left:return{...n,x:n.x-25};case At.Down:return{...n,y:n.y+25};case At.Up:return{...n,y:n.y-25}}};class gH{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new wp(Kf(n)),this.windowListeners=new wp(zr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ji.Resize,this.handleCancel),this.windowListeners.add(ji.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ji.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&hH(r),n(Lo)}handleKeyDown(t){if(RT(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=pH,coordinateGetter:a=rDe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,c=u?{x:u.left,y:u.top}:Lo;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(t,{active:n,context:r.current,currentCoordinates:c});if(d){const f=yb(d,c),h={x:0,y:0},{scrollableAncestors:p}=r.current;for(const m of p){const _=t.code,{isTop:v,isRight:y,isLeft:g,isBottom:b,maxScroll:S,minScroll:x}=dH(m),w=YNe(m),C={x:Math.min(_===At.Right?w.right-w.width/2:w.right,Math.max(_===At.Right?w.left:w.left+w.width/2,d.x)),y:Math.min(_===At.Down?w.bottom-w.height/2:w.bottom,Math.max(_===At.Down?w.top:w.top+w.height/2,d.y))},T=_===At.Right&&!y||_===At.Left&&!g,A=_===At.Down&&!b||_===At.Up&&!v;if(T&&C.x!==d.x){const I=m.scrollLeft+f.x,D=_===At.Right&&I<=S.x||_===At.Left&&I>=x.x;if(D&&!f.y){m.scrollTo({left:I,behavior:s});return}D?h.x=m.scrollLeft-I:h.x=_===At.Right?m.scrollLeft-S.x:m.scrollLeft-x.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(A&&C.y!==d.y){const I=m.scrollTop+f.y,D=_===At.Down&&I<=S.y||_===At.Up&&I>=x.y;if(D&&!f.x){m.scrollTo({top:I,behavior:s});return}D?h.y=m.scrollTop-I:h.y=_===At.Down?m.scrollTop-S.y:m.scrollTop-x.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Wd(yb(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}gH.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=pH,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function HR(e){return!!(e&&"distance"in e)}function qR(e){return!!(e&&"delay"in e)}class NT{constructor(t,n,r){var i;r===void 0&&(r=tDe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=Kf(a),this.documentListeners=new wp(this.document),this.listeners=new wp(r),this.windowListeners=new wp(zr(a)),this.initialCoordinates=(i=Kg(o))!=null?i:Lo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(ji.Resize,this.handleCancel),this.windowListeners.add(ji.DragStart,GR),this.windowListeners.add(ji.VisibilityChange,this.handleCancel),this.windowListeners.add(ji.ContextMenu,GR),this.documentListeners.add(ji.Keydown,this.handleKeydown),n){if(HR(n))return;if(qR(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ji.Click,nDe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ji.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=Kg(t))!=null?n:Lo,u=yb(i,l);if(!r&&s){if(qR(s))return Zw(u,s.tolerance)?this.handleCancel():void 0;if(HR(s))return s.tolerance!=null&&Zw(u,s.tolerance)?this.handleCancel():Zw(u,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===At.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const iDe={move:{name:"pointermove"},end:{name:"pointerup"}};class mH extends NT{constructor(t){const{event:n}=t,r=Kf(n.target);super(t,iDe,r)}}mH.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const oDe={move:{name:"mousemove"},end:{name:"mouseup"}};var q3;(function(e){e[e.RightClick=2]="RightClick"})(q3||(q3={}));class yH extends NT{constructor(t){super(t,oDe,Kf(t.event.target))}}yH.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===q3.RightClick?!1:(r==null||r({event:n}),!0)}}];const Jw={move:{name:"touchmove"},end:{name:"touchend"}};class vH extends NT{constructor(t){super(t,Jw)}static setup(){return window.addEventListener(Jw.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Jw.move.name,t)};function t(){}}}vH.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Cp;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Cp||(Cp={}));var bb;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(bb||(bb={}));function aDe(e){let{acceleration:t,activator:n=Cp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=bb.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=e;const h=lDe({delta:d,disabled:!o}),[p,m]=mNe(),_=k.useRef({x:0,y:0}),v=k.useRef({x:0,y:0}),y=k.useMemo(()=>{switch(n){case Cp.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Cp.DraggableRect:return i}},[n,i,l]),g=k.useRef(null),b=k.useCallback(()=>{const x=g.current;if(!x)return;const w=_.current.x*v.current.x,C=_.current.y*v.current.y;x.scrollBy(w,C)},[]),S=k.useMemo(()=>s===bb.TreeOrder?[...u].reverse():u,[s,u]);k.useEffect(()=>{if(!o||!u.length||!y){m();return}for(const x of S){if((r==null?void 0:r(x))===!1)continue;const w=u.indexOf(x),C=c[w];if(!C)continue;const{direction:T,speed:A}=QNe(x,C,y,t,f);for(const I of["x","y"])h[I][T[I]]||(A[I]=0,T[I]=0);if(A.x>0||A.y>0){m(),g.current=x,p(b,a),_.current=A,v.current=T;return}}_.current={x:0,y:0},v.current={x:0,y:0},m()},[t,b,r,m,o,a,JSON.stringify(y),JSON.stringify(h),p,u,S,c,JSON.stringify(f)])}const sDe={x:{[zn.Backward]:!1,[zn.Forward]:!1},y:{[zn.Backward]:!1,[zn.Forward]:!1}};function lDe(e){let{delta:t,disabled:n}=e;const r=mb(t);return Wm(i=>{if(n||!r||!i)return sDe;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[zn.Backward]:i.x[zn.Backward]||o.x===-1,[zn.Forward]:i.x[zn.Forward]||o.x===1},y:{[zn.Backward]:i.y[zn.Backward]||o.y===-1,[zn.Forward]:i.y[zn.Forward]||o.y===1}}},[n,t,r])}function uDe(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Wm(i=>{var o;return t===null?null:(o=r??i)!=null?o:null},[r,t])}function cDe(e,t){return k.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Qg;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Qg||(Qg={}));var W3;(function(e){e.Optimized="optimized"})(W3||(W3={}));const WR=new Map;function dDe(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=k.useState(null),{frequency:s,measure:l,strategy:u}=i,c=k.useRef(e),d=_(),f=Wg(d),h=k.useCallback(function(v){v===void 0&&(v=[]),!f.current&&a(y=>y===null?v:y.concat(v.filter(g=>!y.includes(g))))},[f]),p=k.useRef(null),m=Wm(v=>{if(d&&!n)return WR;if(!v||v===WR||c.current!==e||o!=null){const y=new Map;for(let g of e){if(!g)continue;if(o&&o.length>0&&!o.includes(g.id)&&g.rect.current){y.set(g.id,g.rect.current);continue}const b=g.node.current,S=b?new $T(l(b),b):null;g.rect.current=S,S&&y.set(g.id,S)}return y}return v},[e,o,n,d,l]);return k.useEffect(()=>{c.current=e},[e]),k.useEffect(()=>{d||h()},[n,d]),k.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),k.useEffect(()=>{d||typeof s!="number"||p.current!==null||(p.current=setTimeout(()=>{h(),p.current=null},s))},[s,d,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:o!=null};function _(){switch(u){case Qg.Always:return!1;case Qg.BeforeDragging:return n;default:return!n}}}function DT(e,t){return Wm(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function fDe(e,t){return DT(e,t)}function hDe(e){let{callback:t,disabled:n}=e;const r=C2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function A2(e){let{callback:t,disabled:n}=e;const r=C2(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function pDe(e){return new $T(Km(e),e)}function KR(e,t,n){t===void 0&&(t=pDe);const[r,i]=k.useReducer(s,null),o=hDe({callback(l){if(e)for(const u of l){const{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=A2({callback:i});return Ca(()=>{i(),e?(a==null||a.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const c=t(e);return JSON.stringify(l)===JSON.stringify(c)?l:c}}function gDe(e){const t=DT(e);return oH(e,t)}const XR=[];function mDe(e){const t=k.useRef(e),n=Wm(r=>e?r&&r!==XR&&e&&t.current&&e.parentNode===t.current.parentNode?r:OT(e):XR,[e]);return k.useEffect(()=>{t.current=e},[e]),n}function yDe(e){const[t,n]=k.useState(null),r=k.useRef(e),i=k.useCallback(o=>{const a=Yw(o.target);a&&n(s=>s?(s.set(a,H3(a)),new Map(s)):null)},[]);return k.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const u=Yw(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,H3(u)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=Yw(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),k.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Wd(o,a),Lo):fH(e):Lo,[e,t])}function QR(e,t){t===void 0&&(t=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},t),k.useEffect(()=>{const r=e!==Lo;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?yb(e,n.current):Lo}function vDe(e){k.useEffect(()=>{if(!w2)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function bDe(e,t){return k.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function bH(e){return k.useMemo(()=>e?qNe(e):null,[e])}const eC=[];function _De(e,t){t===void 0&&(t=Km);const[n]=e,r=bH(n?zr(n):null),[i,o]=k.useReducer(s,eC),a=A2({callback:o});return e.length>0&&i===eC&&o(),Ca(()=>{e.length?e.forEach(l=>a==null?void 0:a.observe(l)):(a==null||a.disconnect(),o())},[e]),i;function s(){return e.length?e.map(l=>cH(l)?r:new $T(t(l),l)):eC}}function _H(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return qm(t)?t:e}function SDe(e){let{measure:t}=e;const[n,r]=k.useState(null),i=k.useCallback(u=>{for(const{target:c}of u)if(qm(c)){r(d=>{const f=t(c);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),o=A2({callback:i}),a=k.useCallback(u=>{const c=_H(u);o==null||o.disconnect(),c&&(o==null||o.observe(c)),r(c?t(c):null)},[t,o]),[s,l]=gb(a);return k.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const xDe=[{sensor:mH,options:{}},{sensor:gH,options:{}}],wDe={current:{}},vv={draggable:{measure:UR},droppable:{measure:UR,strategy:Qg.WhileDragging,frequency:W3.Optimized},dragOverlay:{measure:Km}};class Ep extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const CDe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ep,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:vb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:vv,measureDroppableContainers:vb,windowRect:null,measuringScheduled:!1},SH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:vb,draggableNodes:new Map,over:null,measureDroppableContainers:vb},Xm=k.createContext(SH),xH=k.createContext(CDe);function EDe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ep}}}function ADe(e,t){switch(t.type){case Pn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Pn.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Pn.DragEnd:case Pn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Pn.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ep(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Pn.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Ep(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Pn.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ep(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function TDe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=k.useContext(Xm),o=mb(r),a=mb(n==null?void 0:n.id);return k.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!RT(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const c of[l.current,u.current]){if(!c)continue;const d=bNe(c);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function wH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function PDe(e){return k.useMemo(()=>({draggable:{...vv.draggable,...e==null?void 0:e.draggable},droppable:{...vv.droppable,...e==null?void 0:e.droppable},dragOverlay:{...vv.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function kDe(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=k.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Ca(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const c=n(u),d=oH(c,r);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=sH(u);f&&f.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const T2=k.createContext({...Lo,scaleX:1,scaleY:1});var Xs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Xs||(Xs={}));const IDe=k.memo(function(t){var n,r,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:c=xDe,collisionDetection:d=FNe,measuring:f,modifiers:h,...p}=t;const m=k.useReducer(ADe,void 0,EDe),[_,v]=m,[y,g]=ANe(),[b,S]=k.useState(Xs.Uninitialized),x=b===Xs.Initialized,{draggable:{active:w,nodes:C,translate:T},droppable:{containers:A}}=_,I=w?C.get(w):null,D=k.useRef({initial:null,translated:null}),M=k.useMemo(()=>{var Kt;return w!=null?{id:w,data:(Kt=I==null?void 0:I.data)!=null?Kt:wDe,rect:D}:null},[w,I]),E=k.useRef(null),[P,N]=k.useState(null),[L,O]=k.useState(null),R=Wg(p,Object.values(p)),$=E2("DndDescribedBy",a),z=k.useMemo(()=>A.getEnabled(),[A]),V=PDe(f),{droppableRects:H,measureDroppableContainers:Q,measuringScheduled:Z}=dDe(z,{dragging:x,dependencies:[T.x,T.y],config:V.droppable}),J=uDe(C,w),j=k.useMemo(()=>L?Kg(L):null,[L]),X=nu(),ee=fDe(J,V.draggable.measure);kDe({activeNode:w?C.get(w):null,config:X.layoutShiftCompensation,initialRect:ee,measure:V.draggable.measure});const ne=KR(J,V.draggable.measure,ee),fe=KR(J?J.parentElement:null),de=k.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Be=A.getNodeFor((n=de.current.over)==null?void 0:n.id),$e=SDe({measure:V.dragOverlay.measure}),Ce=(r=$e.nodeRef.current)!=null?r:J,Ke=x?(i=$e.rect)!=null?i:ne:null,be=!!($e.nodeRef.current&&$e.rect),zt=gDe(be?null:ne),Wn=bH(Ce?zr(Ce):null),nn=mDe(x?Be??J:null),Rt=_De(nn),St=wH(h,{transform:{x:T.x-zt.x,y:T.y-zt.y,scaleX:1,scaleY:1},activatorEvent:L,active:M,activeNodeRect:ne,containerNodeRect:fe,draggingNodeRect:Ke,over:de.current.over,overlayNodeRect:$e.rect,scrollableAncestors:nn,scrollableAncestorRects:Rt,windowRect:Wn}),bn=j?Wd(j,T):null,jr=yDe(nn),lo=QR(jr),ki=QR(jr,[ne]),lr=Wd(St,lo),Kn=Ke?UNe(Ke,St):null,Sr=M&&Kn?d({active:M,collisionRect:Kn,droppableRects:H,droppableContainers:z,pointerCoordinates:bn}):null,rn=DNe(Sr,"id"),[Ot,si]=k.useState(null),Ii=be?St:Wd(St,ki),uo=jNe(Ii,(o=Ot==null?void 0:Ot.rect)!=null?o:null,ne),Ma=k.useCallback((Kt,xt)=>{let{sensor:Qn,options:$n}=xt;if(E.current==null)return;const ur=C.get(E.current);if(!ur)return;const xr=Kt.nativeEvent,Vr=new Qn({active:E.current,activeNode:ur,event:xr,options:$n,context:de,onStart(wr){const Yn=E.current;if(Yn==null)return;const Ra=C.get(Yn);if(!Ra)return;const{onDragStart:Is}=R.current,Ms={active:{id:Yn,data:Ra.data,rect:D}};pi.unstable_batchedUpdates(()=>{Is==null||Is(Ms),S(Xs.Initializing),v({type:Pn.DragStart,initialCoordinates:wr,active:Yn}),y({type:"onDragStart",event:Ms})})},onMove(wr){v({type:Pn.DragMove,coordinates:wr})},onEnd:Vo(Pn.DragEnd),onCancel:Vo(Pn.DragCancel)});pi.unstable_batchedUpdates(()=>{N(Vr),O(Kt.nativeEvent)});function Vo(wr){return async function(){const{active:Ra,collisions:Is,over:Ms,scrollAdjustedTranslate:Cc}=de.current;let Oa=null;if(Ra&&Cc){const{cancelDrop:Cr}=R.current;Oa={activatorEvent:xr,active:Ra,collisions:Is,delta:Cc,over:Ms},wr===Pn.DragEnd&&typeof Cr=="function"&&await Promise.resolve(Cr(Oa))&&(wr=Pn.DragCancel)}E.current=null,pi.unstable_batchedUpdates(()=>{v({type:wr}),S(Xs.Uninitialized),si(null),N(null),O(null);const Cr=wr===Pn.DragEnd?"onDragEnd":"onDragCancel";if(Oa){const ru=R.current[Cr];ru==null||ru(Oa),y({type:Cr,event:Oa})}})}}},[C]),Xn=k.useCallback((Kt,xt)=>(Qn,$n)=>{const ur=Qn.nativeEvent,xr=C.get($n);if(E.current!==null||!xr||ur.dndKit||ur.defaultPrevented)return;const Vr={active:xr};Kt(Qn,xt.options,Vr)===!0&&(ur.dndKit={capturedBy:xt.sensor},E.current=$n,Ma(Qn,xt))},[C,Ma]),co=cDe(c,Xn);vDe(c),Ca(()=>{ne&&b===Xs.Initializing&&S(Xs.Initialized)},[ne,b]),k.useEffect(()=>{const{onDragMove:Kt}=R.current,{active:xt,activatorEvent:Qn,collisions:$n,over:ur}=de.current;if(!xt||!Qn)return;const xr={active:xt,activatorEvent:Qn,collisions:$n,delta:{x:lr.x,y:lr.y},over:ur};pi.unstable_batchedUpdates(()=>{Kt==null||Kt(xr),y({type:"onDragMove",event:xr})})},[lr.x,lr.y]),k.useEffect(()=>{const{active:Kt,activatorEvent:xt,collisions:Qn,droppableContainers:$n,scrollAdjustedTranslate:ur}=de.current;if(!Kt||E.current==null||!xt||!ur)return;const{onDragOver:xr}=R.current,Vr=$n.get(rn),Vo=Vr&&Vr.rect.current?{id:Vr.id,rect:Vr.rect.current,data:Vr.data,disabled:Vr.disabled}:null,wr={active:Kt,activatorEvent:xt,collisions:Qn,delta:{x:ur.x,y:ur.y},over:Vo};pi.unstable_batchedUpdates(()=>{si(Vo),xr==null||xr(wr),y({type:"onDragOver",event:wr})})},[rn]),Ca(()=>{de.current={activatorEvent:L,active:M,activeNode:J,collisionRect:Kn,collisions:Sr,droppableRects:H,draggableNodes:C,draggingNode:Ce,draggingNodeRect:Ke,droppableContainers:A,over:Ot,scrollableAncestors:nn,scrollAdjustedTranslate:lr},D.current={initial:Ke,translated:Kn}},[M,J,Sr,Kn,C,Ce,Ke,H,A,Ot,nn,lr]),aDe({...X,delta:T,draggingRect:Kn,pointerCoordinates:bn,scrollableAncestors:nn,scrollableAncestorRects:Rt});const tu=k.useMemo(()=>({active:M,activeNode:J,activeNodeRect:ne,activatorEvent:L,collisions:Sr,containerNodeRect:fe,dragOverlay:$e,draggableNodes:C,droppableContainers:A,droppableRects:H,over:Ot,measureDroppableContainers:Q,scrollableAncestors:nn,scrollableAncestorRects:Rt,measuringConfiguration:V,measuringScheduled:Z,windowRect:Wn}),[M,J,ne,L,Sr,fe,$e,C,A,H,Ot,Q,nn,Rt,V,Z,Wn]),jo=k.useMemo(()=>({activatorEvent:L,activators:co,active:M,activeNodeRect:ne,ariaDescribedById:{draggable:$},dispatch:v,draggableNodes:C,over:Ot,measureDroppableContainers:Q}),[L,co,M,ne,v,$,C,Ot,Q]);return bt.createElement(iH.Provider,{value:g},bt.createElement(Xm.Provider,{value:jo},bt.createElement(xH.Provider,{value:tu},bt.createElement(T2.Provider,{value:uo},u)),bt.createElement(TDe,{disabled:(s==null?void 0:s.restoreFocus)===!1})),bt.createElement(kNe,{...s,hiddenTextDescribedById:$}));function nu(){const Kt=(P==null?void 0:P.autoScrollEnabled)===!1,xt=typeof l=="object"?l.enabled===!1:l===!1,Qn=x&&!Kt&&!xt;return typeof l=="object"?{...l,enabled:Qn}:{enabled:Qn}}}),MDe=k.createContext(null),YR="button",RDe="Droppable";function nGe(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=E2(RDe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=k.useContext(Xm),{role:h=YR,roleDescription:p="draggable",tabIndex:m=0}=i??{},_=(l==null?void 0:l.id)===t,v=k.useContext(_?T2:MDe),[y,g]=gb(),[b,S]=gb(),x=bDe(a,t),w=Wg(n);Ca(()=>(d.set(t,{id:t,key:o,node:y,activatorNode:b,data:w}),()=>{const T=d.get(t);T&&T.key===o&&d.delete(t)}),[d,t]);const C=k.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":_&&h===YR?!0:void 0,"aria-roledescription":p,"aria-describedby":c.draggable}),[r,h,m,_,p,c.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:C,isDragging:_,listeners:r?void 0:x,node:y,over:f,setNodeRef:g,setActivatorNodeRef:S,transform:v}}function ODe(){return k.useContext(xH)}const $De="Droppable",NDe={timeout:25};function rGe(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=E2($De),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=k.useContext(Xm),c=k.useRef({disabled:n}),d=k.useRef(!1),f=k.useRef(null),h=k.useRef(null),{disabled:p,updateMeasurementsFor:m,timeout:_}={...NDe,...i},v=Wg(m??r),y=k.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),h.current=null},_)},[_]),g=A2({callback:y,disabled:p||!a}),b=k.useCallback((C,T)=>{g&&(T&&(g.unobserve(T),d.current=!1),C&&g.observe(C))},[g]),[S,x]=gb(b),w=Wg(t);return k.useEffect(()=>{!g||!S.current||(g.disconnect(),d.current=!1,g.observe(S.current))},[S,g]),Ca(()=>(s({type:Pn.RegisterDroppable,element:{id:r,key:o,disabled:n,node:S,rect:f,data:w}}),()=>s({type:Pn.UnregisterDroppable,key:o,id:r})),[r]),k.useEffect(()=>{n!==c.current.disabled&&(s({type:Pn.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:f,isOver:(l==null?void 0:l.id)===r,node:S,over:l,setNodeRef:x}}function DDe(e){let{animation:t,children:n}=e;const[r,i]=k.useState(null),[o,a]=k.useState(null),s=mb(n);return!n&&!r&&s&&i(s),Ca(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),bt.createElement(bt.Fragment,null,n,r?k.cloneElement(r,{ref:a}):null)}const LDe={x:0,y:0,scaleX:1,scaleY:1};function FDe(e){let{children:t}=e;return bt.createElement(Xm.Provider,{value:SH},bt.createElement(T2.Provider,{value:LDe},t))}const BDe={position:"fixed",touchAction:"none"},zDe=e=>RT(e)?"transform 250ms ease":void 0,jDe=k.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:u,transition:c=zDe}=e;if(!s)return null;const d=i?u:{...u,scaleX:1,scaleY:1},f={...BDe,width:s.width,height:s.height,top:s.top,left:s.left,transform:Xg.Transform.toString(d),transformOrigin:i&&r?RNe(r,s):void 0,transition:typeof c=="function"?c(r):c,...l};return bt.createElement(n,{className:a,style:f,ref:t},o)}),VDe=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},UDe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Xg.Transform.toString(t)},{transform:Xg.Transform.toString(n)}]},GDe={duration:250,easing:"ease",keyframes:UDe,sideEffects:VDe({styles:{active:{opacity:"0"}}})};function HDe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return C2((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const u=_H(a);if(!u)return;const{transform:c}=zr(a).getComputedStyle(a),d=aH(c);if(!d)return;const f=typeof t=="function"?t:qDe(t);return hH(l,i.draggable.measure),f({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function qDe(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...GDe,...e};return o=>{let{active:a,dragOverlay:s,transform:l,...u}=o;if(!t)return;const c={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},f={x:l.x-c.x,y:l.y-c.y,...d},h=i({...u,active:a,dragOverlay:s,transform:{initial:l,final:f}}),[p]=h,m=h[h.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;const _=r==null?void 0:r({active:a,dragOverlay:s,...u}),v=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{v.onfinish=()=>{_==null||_(),y()}})}}let ZR=0;function WDe(e){return k.useMemo(()=>{if(e!=null)return ZR++,ZR},[e])}const KDe=bt.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:u=999}=e;const{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:p,droppableContainers:m,dragOverlay:_,over:v,measuringConfiguration:y,scrollableAncestors:g,scrollableAncestorRects:b,windowRect:S}=ODe(),x=k.useContext(T2),w=WDe(d==null?void 0:d.id),C=wH(a,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:_.rect,over:v,overlayNodeRect:_.rect,scrollableAncestors:g,scrollableAncestorRects:b,transform:x,windowRect:S}),T=DT(f),A=HDe({config:r,draggableNodes:p,droppableContainers:m,measuringConfiguration:y}),I=T?_.setRef:void 0;return bt.createElement(FDe,null,bt.createElement(DDe,{animation:A},d&&w?bt.createElement(jDe,{key:w,id:d.id,ref:I,as:s,activatorEvent:c,adjustScale:t,className:l,transition:o,rect:T,style:{zIndex:u,...i},transform:C},n):null))}),XDe=Gn([wT,bT],({nodes:e},t)=>t==="nodes"?e.viewport.zoom:1),QDe=()=>{const e=S2(XDe);return k.useCallback(({activatorEvent:n,draggingNodeRect:r,transform:i})=>{if(r&&n){const o=Kg(n);if(!o)return i;const a=o.x-r.left,s=o.y-r.top,l=i.x+a-r.width/2,u=i.y+s-r.height/2,c=i.scaleX*e,d=i.scaleY*e;return{x:l,y:u,scaleX:c,scaleY:d}}return i},[e])},YDe=e=>{if(!e.pointerCoordinates)return[];const t=document.elementsFromPoint(e.pointerCoordinates.x,e.pointerCoordinates.y),n=e.droppableContainers.filter(r=>r.node.current?t.includes(r.node.current):!1);return zNe({...e,droppableContainers:n})};function ZDe(e){return q.jsx(IDe,{...e})}const Cy=28,JR={w:Cy,h:Cy,maxW:Cy,maxH:Cy,shadow:"dark-lg",borderRadius:"lg",opacity:.3,bg:"base.800",color:"base.50",_dark:{borderColor:"base.200",bg:"base.900",color:"base.100"}},JDe=e=>{if(!e.dragData)return null;if(e.dragData.payloadType==="NODE_FIELD"){const{field:t,fieldTemplate:n}=e.dragData.payload;return q.jsx(ib,{sx:{position:"relative",p:2,px:3,opacity:.7,bg:"base.300",borderRadius:"base",boxShadow:"dark-lg",whiteSpace:"nowrap",fontSize:"sm"},children:q.jsx(wU,{children:t.label||n.title})})}if(e.dragData.payloadType==="IMAGE_DTO"){const{thumbnail_url:t,width:n,height:r}=e.dragData.payload.imageDTO;return q.jsx(ib,{sx:{position:"relative",width:"full",height:"full",display:"flex",alignItems:"center",justifyContent:"center"},children:q.jsx(JA,{sx:{...JR},objectFit:"contain",src:t,width:n,height:r})})}return e.dragData.payloadType==="IMAGE_DTOS"?q.jsxs(eT,{sx:{position:"relative",alignItems:"center",justifyContent:"center",flexDir:"column",...JR},children:[q.jsx(_3,{children:e.dragData.payload.imageDTOs.length}),q.jsx(_3,{size:"sm",children:"Images"})]}):null},eLe=k.memo(JDe),tLe=e=>{const[t,n]=k.useState(null),r=ae("images"),i=_2(),o=k.useCallback(d=>{r.trace({dragData:ft(d.active.data.current)},"Drag started");const f=d.active.data.current;f&&n(f)},[r]),a=k.useCallback(d=>{var h;r.trace({dragData:ft(d.active.data.current)},"Drag ended");const f=(h=d.over)==null?void 0:h.data.current;!t||!f||(i(EG({overData:f,activeData:t})),n(null))},[t,i,r]),s=VR(yH,{activationConstraint:{distance:10}}),l=VR(vH,{activationConstraint:{distance:10}}),u=INe(s,l),c=QDe();return q.jsxs(ZDe,{onDragStart:o,onDragEnd:a,sensors:u,collisionDetection:YDe,autoScroll:!1,children:[e.children,q.jsx(KDe,{dropAnimation:null,modifiers:[c],style:{width:"min-content",height:"min-content",cursor:"grabbing",userSelect:"none",padding:"10rem"},children:q.jsx(hU,{children:t&&q.jsx(dU.div,{layout:!0,initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1,transition:{duration:.1}},children:q.jsx(eLe,{dragData:t})},"overlay-drag-image")})})]})},nLe=k.memo(tLe),eO=Ta(void 0),tO=Ta(void 0),rLe=k.lazy(()=>v$(()=>import("./App-cd19f6f7.js"),["./App-cd19f6f7.js","./MantineProvider-094ba0de.js","./App-6125620a.css"],import.meta.url)),iLe=k.lazy(()=>v$(()=>import("./ThemeLocaleProvider-37ef62a0.js"),["./ThemeLocaleProvider-37ef62a0.js","./MantineProvider-094ba0de.js","./ThemeLocaleProvider-90f0fcd3.css"],import.meta.url)),oLe=({apiUrl:e,token:t,config:n,headerComponent:r,middleware:i,projectId:o,queueId:a,selectedImage:s,customStarUi:l})=>(k.useEffect(()=>(t&&gg.set(t),e&&mg.set(e),o&&S1.set(o),a&&Nn.set(a),Dz(),i&&i.length>0?H5(NR(),...i):H5(NR()),()=>{mg.set(void 0),gg.set(void 0),S1.set(void 0),Nn.set(fL)}),[e,t,i,o,a]),k.useEffect(()=>(l&&eO.set(l),()=>{eO.set(void 0)}),[l]),k.useEffect(()=>(r&&tO.set(r),()=>{tO.set(void 0)}),[r]),q.jsx(bt.StrictMode,{children:q.jsx(Vse,{store:DG,children:q.jsx(bt.Suspense,{fallback:q.jsx(eNe,{}),children:q.jsx(iLe,{children:q.jsx(nLe,{children:q.jsx(rLe,{config:n,selectedImage:s})})})})})})),aLe=k.memo(oLe);tC.createRoot(document.getElementById("root")).render(q.jsx(aLe,{}));export{_9 as $,qn as A,_o as B,lme as C,ri as D,vl as E,Qo as F,tje as G,aA as H,Pi as I,Bm as J,Im as K,sr as L,Kl as M,w3e as N,pUe as O,dme as P,dUe as Q,hU as R,Zp as S,dU as T,t3e as U,Mm as V,QA as W,Om as X,fUe as Y,hUe as Z,U1 as _,uN as a,Eze as a$,obe as a0,gUe as a1,la as a2,Bl as a3,v1 as a4,UK as a5,bt as a6,Vj as a7,vUe as a8,a3e as a9,Rze as aA,H1e as aB,vA as aC,Yz as aD,W1e as aE,pi as aF,XT as aG,uS as aH,_2 as aI,VVe as aJ,pze as aK,$ze as aL,Nze as aM,cze as aN,lze as aO,wU as aP,Gc as aQ,d6e as aR,IU as aS,OVe as aT,dze as aU,jE as aV,xT as aW,rUe as aX,JA as aY,Z$e as aZ,ce as a_,ma as aa,ij as ab,lS as ac,AAe as ad,_U as ae,mUe as af,Pe as ag,cUe as ah,yUe as ai,Gn as aj,wT as ak,pE as al,S2 as am,Sze as an,Cm as ao,tF as ap,TF as aq,Q_ as ar,ae as as,ib as at,eT as au,_3 as av,bT as aw,zm as ax,n$e as ay,kG as az,Wb as b,FRe as b$,Oze as b0,JFe as b1,Tie as b2,zE as b3,nt as b4,RLe as b5,YVe as b6,DVe as b7,iUe as b8,nUe as b9,K as bA,Gze as bB,Kze as bC,gze as bD,mze as bE,Pze as bF,I1 as bG,vze as bH,al as bI,y0 as bJ,Wze as bK,Hze as bL,qze as bM,lLe as bN,ELe as bO,ALe as bP,TLe as bQ,PLe as bR,Qoe as bS,rFe as bT,wVe as bU,CVe as bV,OLe as bW,cFe as bX,ILe as bY,ZLe as bZ,DLe as b_,jve as ba,NVe as bb,FVe as bc,ave as bd,sve as be,KVe as bf,QVe as bg,LVe as bh,JVe as bi,BVe as bj,$Ve as bk,_ze as bl,xUe as bm,nq as bn,dLe as bo,uLe as bp,cLe as bq,Ve as br,bze as bs,jze as bt,zze as bu,yze as bv,Xze as bw,rGe as bx,nGe as by,yl as bz,zQ as c,Aze as c$,MLe as c0,iFe as c1,FLe as c2,cL as c3,kLe as c4,gFe as c5,$Le as c6,v6 as c7,NLe as c8,b6 as c9,d8 as cA,TVe as cB,PVe as cC,kVe as cD,HLe as cE,IVe as cF,qLe as cG,MVe as cH,WLe as cI,RVe as cJ,Jze as cK,gg as cL,C6e as cM,kze as cN,Iu as cO,No as cP,wfe as cQ,ge as cR,eO as cS,Vze as cT,Uze as cU,Tle as cV,o1e as cW,Nz as cX,YL as cY,uze as cZ,CG as c_,ULe as ca,eFe as cb,KLe as cc,AFe as cd,TFe as ce,GLe as cf,PFe as cg,NUe as ch,BLe as ci,pR as cj,eje as ck,RUe as cl,zLe as cm,gR as cn,Su as co,hie as cp,wie as cq,$Ue as cr,yR as cs,pie as ct,OUe as cu,VLe as cv,mR as cw,gie as cx,LRe as cy,LLe as cz,Ane as d,Dje as d$,yg as d0,VF as d1,uUe as d2,Tze as d3,R0 as d4,C5 as d5,rBe as d6,QFe as d7,VFe as d8,UFe as d9,sje as dA,wze as dB,xze as dC,cje as dD,mE as dE,Mje as dF,ije as dG,Eje as dH,Aje as dI,Boe as dJ,Tje as dK,xLe as dL,Pje as dM,rS as dN,Foe as dO,Rje as dP,bm as dQ,qUe as dR,vs as dS,MUe as dT,YUe as dU,IUe as dV,Oje as dW,$je as dX,ZUe as dY,Nje as dZ,QUe as d_,KFe as da,on as db,sA as dc,ps as dd,Aa as de,hi as df,WFe as dg,XLe as dh,yT as di,XFe as dj,tUe as dk,hE as dl,Kje as dm,Cze as dn,Wje as dp,tGe as dq,yVe as dr,hVe as ds,pVe as dt,_Ve as du,gVe as dv,bVe as dw,vVe as dx,vRe as dy,jje as dz,cD as e,IFe as e$,Lje as e0,lL as e1,LUe as e2,Fje as e3,zoe as e4,kje as e5,joe as e6,Ije as e7,Cje as e8,mVe as e9,S6e as eA,_6e as eB,vLe as eC,bLe as eD,a_ as eE,_Le as eF,Aie as eG,SLe as eH,mLe as eI,gLe as eJ,AE as eK,xie as eL,vie as eM,bie as eN,mie as eO,yie as eP,_ie as eQ,Sie as eR,hLe as eS,DUe as eT,EVe as eU,TE as eV,nve as eW,S7e as eX,TUe as eY,MFe as eZ,Yoe as e_,Od as ea,$f as eb,tFe as ec,Ile as ed,Mle as ee,fze as ef,Yze as eg,Zze as eh,GF as ei,Qze as ej,n_ as ek,kFe as el,wFe as em,CFe as en,EFe as eo,Mie as ep,ui as eq,p6 as er,yLe as es,Fze as et,Dze as eu,Lze as ev,Hl as ew,H6 as ex,Eie as ey,g6 as ez,yN as f,dz as f$,Mr as f0,JLe as f1,fFe as f2,Rie as f3,dp as f4,pFe as f5,AVe as f6,sFe as f7,lFe as f8,uFe as f9,jVe as fA,zUe as fB,XUe as fC,WUe as fD,zVe as fE,UUe as fF,VUe as fG,FUe as fH,HUe as fI,CLe as fJ,BUe as fK,GUe as fL,wLe as fM,QB as fN,oje as fO,e$e as fP,Vje as fQ,hje as fR,pje as fS,rye as fT,l8 as fU,kB as fV,Pm as fW,nje as fX,wu as fY,Gje as fZ,eUe as f_,oFe as fa,aFe as fb,Xoe as fc,vFe as fd,yFe as fe,SBe as ff,FFe as fg,ize as fh,xBe as fi,SFe as fj,xFe as fk,_Fe as fl,kE as fm,YFe as fn,xVe as fo,JUe as fp,V7e as fq,HVe as fr,ue as fs,Qe as ft,Dt as fu,ha as fv,jLe as fw,kUe as fx,KUe as fy,jUe as fz,EN as g,ZBe as g$,zL as g0,Vh as g1,uje as g2,aje as g3,Uje as g4,Hje as g5,Zje as g6,rje as g7,qje as g8,z1 as g9,PUe as gA,fR as gB,ft as gC,Yye as gD,Pg as gE,Rl as gF,dVe as gG,aVe as gH,cVe as gI,sVe as gJ,iVe as gK,Xje as gL,uVe as gM,uz as gN,lUe as gO,oUe as gP,aUe as gQ,sUe as gR,iBe as gS,qFe as gT,eBe as gU,nBe as gV,xu as gW,OU as gX,Cq as gY,Ue as gZ,OBe as g_,Te as ga,K7e as gb,Zye as gc,G0 as gd,lje as ge,Jje as gf,Qje as gg,Sje as gh,vje as gi,yje as gj,mje as gk,xje as gl,Yje as gm,nVe as gn,tVe as go,fVe as gp,G7e as gq,bje as gr,_je as gs,SVe as gt,rVe as gu,eVe as gv,oVe as gw,Y0e as gx,fb as gy,a1e as gz,e_ as h,rze as h$,YBe as h0,yBe as h1,VBe as h2,eze as h3,x6e as h4,cBe as h5,PBe as h6,Eh as h7,EBe as h8,dBe as h9,bBe as hA,$Be as hB,RBe as hC,kBe as hD,NFe as hE,DFe as hF,sze as hG,CUe as hH,wUe as hI,NBe as hJ,g6e as hK,jBe as hL,DBe as hM,mBe as hN,uBe as hO,KBe as hP,WBe as hQ,BBe as hR,LBe as hS,FBe as hT,oze as hU,HBe as hV,aze as hW,aBe as hX,oBe as hY,CBe as hZ,wBe as h_,xS as ha,TBe as hb,sBe as hc,ABe as hd,lBe as he,hBe as hf,$Fe as hg,OFe as hh,RFe as hi,JBe as hj,wre as hk,ba as hl,dL as hm,tae as hn,BFe as ho,zFe as hp,jFe as hq,QBe as hr,gBe as hs,pBe as ht,yle as hu,XBe as hv,b6e as hw,vle as hx,mT as hy,zMe as hz,_ne as i,v6e as i0,p6e as i1,m6e as i2,y6e as i3,LFe as i4,vBe as i5,AUe as i6,rPe as i7,UVe as i8,GVe as i9,Lre as ia,g1e as ib,eGe as ic,tO as id,nj as ie,_A as ig,ua as ih,U5e as ii,v3e as ij,bUe as ik,ube as il,SUe as im,nPe as io,l6e as ip,u6e as iq,rbe as ir,En as j,eee as k,Jb as l,Of as m,gm as n,ni as o,Qb as p,tE as q,gN as r,sE as s,ym as t,rD as u,k as v,q as w,Ji as x,dn as y,Fd as z}; diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-ext-wght-normal-1c3007b8.woff2 deleted file mode 100644 index a61a0be57fbc830196e18e6c35fdf7ae5f59274e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27284 zcmV(_K-9l?Pew8T0RR910BV!~6951J0M0l70BR)w0RR9100000000000000000000 z0000QgC-l5avUl@NLE2og)|0WKT}jeRDn1EgD@{_5eN$UP~=MsgF*l>f!1UJHUcCA zhJFMf1%+G(k!cJE8zjIrir)Go+^wqOpdq9cY+RxDIEYm!Z6qStI0VpxFG>FYGm;xJ zL{{J|TfP5L#QV)zQcN67+n?i&i?m_lP9%g}4tK~bW*14zOe!pgX@@1K3`2PGm~kRa z44c@3B?uOueI$A4C4886_r}zw@7UbtJ5aw~|5!V2+&B5rQ{r`nhQ>t~0q*n=DeGyX zE~Vs5_=;0tnC7m9e`)r=+$1w?|Hi(0gvH_n!e?GtG(zDG#*#zKxR0odbYe9Bc~s}0 z`y^S;>YVwX{JGoxB+HH&-TRL<-m{g&P&X*SP(w{HS@j2#8fvHshPn`f+lC#+4rA;_ z8p_QIyL)#lDpg6@v>UV*ilsC_N&`$_;zO9g0BKl%o!C$O@w%6O)t;uW^Wk~7{U2B2 zsK|+f95~R8V?QCmU9N>Cu90ZY#?M9KD>sS@6%_|$6;Df_^v~*{YW=8g`tO>d*3gdSu)6IU`%m>aHFPcNvuvgp zHPSV%8m5c3sA>FT?hv6{|C4l^Zc8W&M2IC|z^JQBi1k7Q?KCN0chZTDo zA!6nCpkSH?h+L=vA_fQ$AwtAZLWvL|zyeEIFu+<;Sjqxx2_@1{ma>+mY*QZk)_UGs z-P1F>`w1l^#%DeN7!hHjGPU!9>=;!fN<5xW{u7073*upaPe13b)QAox-6b6z@@4=D zOzTMgpZ1*@*lz3{iN!TbdM>>hxk(~B^@O=+l*0&P3nM<7D`$fLGrLJXQL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ig_hgv}HC3;7J6O7tD7MxtHJT;vH(h*%ZJ! zz#R?`RBpu?Ie*|BB~8v6U~;bW4Y`DYd}Ju6oahv3C!4!mo=28l2Q+K03pIl4=8=!7 zSAQ9~e&l??4Wi_{8;0ha?hJle`MEQBK4V1w`s{{#R!Ke z3U59?APmPG3q(rb=CsErB%jii-7cK3RvwgPBq;4CYn7Ib^j&F8F_gbaj`=q0m8zv? zX*rF%MAZ_Y&qz^65_JRPh1Tiu>_}d%K`pn6Btv--hGW`W%cuOcmV(aULH~a literal 0 HcmV?d00001 diff --git a/invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 b/invokeai/frontend/web/dist/assets/inter-cyrillic-wght-normal-eba94878.woff2 deleted file mode 100644 index b655a438842b6890ff66d98ecfc76a04de64b15a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17600 zcmV)AK*YayPew8T0RR9107Sq56951J0EVCd07Os#0RR9100000000000000000000 z0000Qf-@VQbR2<3KS)+VQiEOwU_Vn-K~#Y_0D>$pY!L_w$Vj^p3xXs7F#QezHUcCA zghT`&1%+G(i#!Ym8-9Hi%56u$c>v<3mvg@(5yHj+hy+_a5+Q6HfFRlB$^V}Zmaz=NmO-{lLV&PkEMvvNJ8|$%9K7trK>{!B zkhI)QuRA&IUUtv!>BGrz<}f*Ar*o7ElV&nZn(inwvP~RJLB;FjoqZ%(`T>NZNoNkW z;jVcnI|NVxU`1F0urC7O3unGFyRw}`{^tQpKxiQ-;F9$ZT-*{~Op5)WKK3j7U5G#t zeONriFdP7>06Sn1dR=U6~jUgUtL7S8Wk0Bl`=(;q&gR~8@ zEqEAO@%M+;-yq1=Of#iZ3j_`U8*sH*vX*VJqrY@NYiWB)f<}7c zsZpan@zhjOj2Q8hfKg6}7`uq41bbrC6C*~A7%<{h0~tIAyvj!=FkSFwx6nH+OYQgD zD1MH@KU^Q{^BW>#sb2`~3Lu~Y4*uR$v;7YsFsn@963&q)3p0Qtd8y`w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2 b/invokeai/frontend/web/dist/assets/inter-greek-ext-wght-normal-fe977ddb.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..28a2d3a4c914f1a2e305652599d6491523ed9eb0 GIT binary patch literal 11952 zcmV;hE>F>SPew8T0RR9104}fq6951J0C6|~04_xU0RR9100000000000000000000 z0000Qfjk?B3LGjwNLE2ogi!`yKT}jeRDn1EgcvVu5eN#(e8YMRgbn~O>~sM(0we>7 z4g??tg5ahzwDT(oC@ssfbRrYY1|+-N zga*3X2+|EP;@j_&kRuq-2(y|Qy)1ri(oFgt&e>%TMh^jO5t9_WTmpcHpN{3j^?KBH zMDc(MNO+7V1*j&>;(rc+jGICs*}ZV1!!^BYIhPFBh#4~>0l|L$T6X00)Yx-AU*dsr zN^lTPDN%@Gdj$X9oK^Z?|NncsWdZG!V0CrHR2_S0jSZ4U=)BFYE=ii-NS{`NOiNtR zLbEG7#)4RbH1;=xMgzJ%XPwL%&U4EdYjf`-pZO@bAlz`X@Zt;7)HuIfzEYib^O6$}JI5dGUo2Hd0&5TTQj39a5_w125pG!)eIJ#2) zE561vM2LKfbd6_*U{GbV^Eog^@Gsa$LGaZ;+-W+*3>1XYgAfmS2;yP&5Km};Sjqsg z()$n}_!#079*AxBK-BIs9$BhnB9EsR`UoTAG(0wTr#@I?K#oVYIL;25i;gS0oQr{#N)@w# zVVwa39*OV3Qmnu#Jl}e_8(8(JkDKw^xOI0s46ZI_6qYg9JRC(#;Bw5yEQ~OYS(phJ zCcQW{7L(Cp8qCIJr)Bb}#W)zVuuiHadS(Gb?*ThEmI06%4jeE*^niGGq}8~}9%a+g zlf^U`&a@ur3ScFk&2W{&aCX=y)eM-wm$!fa85&{{VD+0E{08 z?{{hWlQ9MiFaT8IZ%LQbL0DR-LP<+U-GZ-rgSzA+SdXD%DM2f07DY=}P`Gph1!)c) z)?l|zT3W?#y>MC+&<1ig#HUT+^acZNCB+BkV>cfhu?&{CHg8(_FuSf?eD!;U2I`5Y z>S@$`yZzzlRqn}lZ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acp9X04QVju4DxLXk)1OL&-_`Pg)R`&`;-Y)@XqP9J8!j=FGMF^T?a6baho z_mzc3QJnLX8H5qbmO$q*y3A^vfnqVw=E))T38D-?8t{051_$eWWcysQc9>&l2fGk6 zdTbBOVy&sy#9efKcU;{p~x93orRdJx~Yt{+OQh*+G>vv`hVrASE%7 zuW0np%?~MVfPCji?gl0f2ty1MOetx&*)(yh2o^xAQ7AO@Y;J^^bv?x^!>G5G1PH!Z zOj*j)!XmS+7#XZ$anRZ}Y9m4~4hl!Hz?WcP`0p=xy8*glvGF<2*#+KWglqx+IVO$} zhA>pbmC%6=JN$Vy5EP9ASeQ4jP1kw9&9e0{{;<6$J~rpDP~y8>+2~!qw*lZ+w`o85BVBCW{?h3H&;kYk2;k4ahj-+NlFu`@ zu=z5CI5{YE22jtGQbeV@fIuB=p75D)Nh+<4-+~^ac9IK?nMo@YHQ|(2-G+(5N!JUT5zGV_SqmuLEnR1$AEl&DbenGdZZo z*IPR6*YzL=%^-m0)&Y*p@Va&$bbW-53}R4>IWcX(>!?#5;*dtFvV=_W8r^ZhVQz+| zc#Uigkjw%h3o!^Ghe|t5TLDN2n`s~jdGLS%nm~8mrdAD+<3)n{ze*ZODh!4r z-XA2C>l{3njv$t}vTM#8=6m@lZ-C#E7V@mP0uur>~N; zGF7&*hf~J0nJQHr6Jbd8u{`I`xf9=?(_>&^jc>oIrf1;p;pAaZr9x>UaJ!XTZ{rZE zKBy(CALspfSW?Amsi|rcRdN1!$nnc8!AI0_(1KO=mNk@PWXhoDe#Hd>jHRglG zoJGW02{Ew^9i{yCh|>?k1uBmjOJH7d&Sns9aUJfq=DrGex*s-otyJ|jKOmp?!3zN{ C!?95S literal 0 HcmV?d00001 diff --git a/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-89b4a3fe.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-89b4a3fe.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..53f099f8ca25bec22dbcc2252614e8eb1dae08da G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a|BU?L_2FIb za1*o?>*dxe?Z2DAIw8_uFJq~{*EvNA4=-O_mSw8Y@j=;Sm5yO$%bJnHOVX$^zNUA( z&OAB=inZ1fj#1`OrAKv$x$N*Vo6|+yz4nFY+|>q>wLDI literal 0 HcmV?d00001 diff --git a/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 b/invokeai/frontend/web/dist/assets/inter-greek-wght-normal-d92c6cbc.woff2 deleted file mode 100644 index eb38b38ea077b5d58f9c998955e33c8974eb527f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22480 zcmV(@K-Rx^Pew8T0RR9109Vie6951J0H2@$09RoE0RR9100000000000000000000 z0000Qf+ZWCbQ~%_NLE2ogdqlCKT}jeRDn1Ef@Cjj5eN#{0LKvvf<6E+fu1k{HUcCA zgmwfV1%+G(j6Mtp8>N&bY@1fI+X0|TFS`|s4CZ#AQWR`@BtqCY07&9%vj0C}IT^!^ z>cCR1>?JC>Dk@V9#i?*pVp8v*%1%A0gk+ECp(ZS%3Zfw)T1bS`!_e31J97r}^8?P~ zwv8*^6}M{>XL6?EW(Ymndk?XX7yL#sw~L!OIvpaoD75UU9*q$-Cgt ziAyJM=_G#H{QM!Q!0))s|FXTBwqAQLew81d?dhKKYW>N#XGE*W<{xe9!fDqz$AAm` zJ>|6CZ#9@ZIM>M>H`zHG1QotDxH$;b&VUG8#F903B0WFayLSYsJ4LWZTUK>`6Q zaiza%oqv7a<5}vnw7UFU@5>!0FU2WM#ux4egfB0n_FQk@&Jjprp{5IZvp~<~B7GoN zo|X>Y6da(JXn+sopWO#q0dVhrnoC^L>UOBe?afXY)PWH=#1qEe50=o506We7+CWs0 zJ{=1+vChTBj#jZ6>>>Uk=0gilID!MP>Jh%%{$A6x{f{(d$S3KO&PnCu+Bx0zss*WM6V`5s0hyJQwGSN0y0t`eB$2e(mZw@!ikwv96Pu#F$O0z_Km&9 z?o;#ivh{pw-g4i}m882YAFmmakCDNf$l#W0THA)R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mB|%Km0F|K z=?zAc*X-nMI~hwRW-zxx(0)(sm0RP(M8!DJ$FC^#c+b8Xolr@L6l@g)pWzO zY{&Kd3SU7BB8A_y?j%tDg{~Yk;4W8ST=3GDdkV)0M{SOX9GMvoJ6EpeJml6w_MH@7 zs+Jfo{naV-{U{s>6veSKe_$zD;N`S(yo|4XM~q_Oou$1L<0HT!j*MXl4ZU%VGFzDHeBVhSa)~saSg3sB4BTK>bP~%7ggYoPZO3%^LU5 zbGYA4iLG1NQd;IDyQGKIyIKk(``j0&gsjsha-mHQ@u1bo#|%@|)UIm)P=PH+88Ltn fjG|>FXG4PVX_}vnaEf7P_r=xXCx3DUX8`~JQJ%^J diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-45606f83.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-45606f83.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..80b17cbf1da9f46083ee0fe5ce6eed2840e2352d GIT binary patch literal 56968 zcmV)RK(oJhPew8T0RR910N#iI6951J0r^M(0Nxn@0RR9100000000000000000000 z0000Qgj*Ydfm9rNKS)+VQjjYKU_Vn-K~#Y_0Etj9Y!L_wf~5$7`dbT%Ish<)fFc1l z0we>Ja0DO)g7frgiVA6RqVV{EljN3*`;WGoq}*rF?UEQuc=E&FiA6~e#2dU9^shrg$vvrB?(ta zl~l>59(OYkvy~w0!&Fj#uwkN-iZJiYMAq}!0zb;L?+b|2;ZE@y{Tq(pM+`7g&ta7% zx{HDC9;Aay!Hr^8o{hJ5*kUyCljkx1CUK8Adh8Pdf_RAMb#p9ovrCYM5z|Hl!GSOS zp}y6MYgN{lsdLcS{`f1;Z`AOQPuVr-b++z^*=n&x6w32xl9j%G6VG`Phr zE)oYIVh43n#!2YR<{#g!{@zmjc9n6N9nLH>hn;2i_~!8Tc=oXW`2@sSXa8T$9{2Ni z|GruGZE356PIWt4ovIb9R;W-hO2L2yB7_oXT0#jWlu$w&Ae2zj5^8`@po+2G-an!m z3b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Xy zys_iUt_E12OJM~}qya(f;R zrH>5p-Z1ufEZUXV0Tg!t6w4vQ9d`y733M6MC&v+DzSUMqlyiUu<0z8NWz zZ6=r+H&a+@+DxV9)@C{OK6_}aiTqe5+se|A1@z`&Gn-Pyn>iG!-OR&pmKN-dO{_|O zCpN31*Rxq2yX%`ZDRg187`M+>rcJ3ahfO!bLbFU%V1hX$tXZzSMC<~2(IC^z`O>on z9ohNmCN(xEkoPh-`3a_1@!2E{6Yz7)n0RLvE*6;Rjn0+L{31TxR2G5!RI}AHG4W)h zEPS-QtB!L`k!2Q}L`znjxRiX1u$b%;IEC34&oF1O<~hVE%#|ruz(NFnp%QGT)@)1)ahf^bk~;8y7C_G` zdO`!nz0hHIwz(#nYpP?wRN32fQwq0nN4pQKcZQT4lTj?+=>O|*2>Jgol+^eudL4WC BWF-Iq literal 0 HcmV?d00001 diff --git a/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-ext-wght-normal-a2bfd9fe.woff2 deleted file mode 100644 index 3df865d7f007da9783223387e875bfc1b6f48c0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79940 zcmV)YK&-!aPew8T0RR910XRee6951J0?Hf!0XNYA0RR9100000000000000000000 z0000Qh$kC?wq_iJIzLEOK~j@(24Fu^R6$gMH~@=GFKiJA3WJ4Yg3MhDj8FhDg}GP( zHUcCAnH&Tl1%+G(zd#HJTm7YShjL?g@0=r~NH-ZoVPCs?)t?leC~Dm8dxb_tp!X=w!nL{(JWw(b8Pq5>0lMM#Jwm`aW| z;Ki#P0^0S5AtxNi3G*q?Vu=xbKb+0c<8tleM!d^iy7l$m<`!`)h|oF3GUvQ9W@b=E zmD7bIv(gn<}XhB~p?MQ@IvP#3x&xboJGl>%$+| zj$5f|tlczrD4i~FsLvX2->MeH@m$T%5J4G+_5#6{1Fq2b2?{IlB~F;hN8hb<40kfg z5oU&7NgW1EP~RGD9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D z1sc;EbdMa52DjbxBRGKx|GlX%@I#Eko+IyxFu@o5M2hzUZ3esCKW`0$N!}YTgdG$1(y=|0bisl<ee&cLVnftTU)|n7Mu4MwzQns zR4CU)oTR&SUo+Dm;D8E|IAgdh<_vM~_JpzPfbNd~AOP+-u*ltY=ew;7Uy+rQ008#? zv~W`f>fhpuS;e5P_Rj*(v1E%EEfqcBmzma(g}+Q~gal)mptCMq*OCu~Sq-io zby@WZ!}$rtD-*%RMPKD4je=JELKQ*xL<#sl8beS<8zbE--m58!vy2d=RujmmS-5A^ zM{)@KG6o8Syn6*Apa(#Q1%r;k)B$EWa@Mi$S{eb^y-FiC1HJ{*sMHV#0j2c@m^Sv{ z2UuLy?_uyQ5;SQ4Kqt(h2AyNvgGZmP;F&mD6hmgVCg4lOfo5u)1aAU#@Z1yQH2C8Z z=%Wj6Ou+FnIWZ)xMWztZf~-yea7ZETQ2v>XVR0o$;T%H@N*=!ICcYcmJ#?cV90I?% zn^#4+`hrFkTB`~X_3@YUVbxpnm_9z z-@t$rDoj4$is0*UI_?E%ZQ-|?sNfA523iSr90hSC7^$yPY6#di2LsK4-quTZ{TRMh zpucs}+q&p(t@O77y)}T&R;0TX@YVE{N95jF9o_hTj1mLoOb=wcu_DmDG(4?D?;-(t z7_bqzFfp7%XsDtC&@l{w*Hn1E5QoY*D0QAGmVUKT0K79jfUyxq5m~0jDKIBT6T#Qw zno1O?Z~6ABVC~>&28^dm%3F4qG-Z+{J5k{NTVdp zV!Z literal 0 HcmV?d00001 diff --git a/invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 b/invokeai/frontend/web/dist/assets/inter-latin-wght-normal-88df0b5a.woff2 deleted file mode 100644 index 40255432a3c6104bf0a82574eaa1d754ec55ab67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46704 zcmY(pW2`Vt&@6at+qP}nww`0#wr$(CZQHhOW8d%I-J83Wo=nm`=|6*Hs>)4Xj0pe` z;6Jq510er50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MYzTZ4Z;y)2EmHw?4dHm z@vkmJ1Pxf}1azT7DayWpjf+t;V)>r%+~Tfs=64wHQ@!+he+d2^tD zKmYjhpX>7FXTUH}1ltYTBXcP{Rt|$0Y0h{%i*b*K`?AFfaZKZ^_rIOp|Bv`I058c* Ang9R* diff --git a/invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 b/invokeai/frontend/web/dist/assets/inter-vietnamese-wght-normal-15df7612.woff2 deleted file mode 100644 index ce21ca172eabc84c2ad452ae1e254ad6ba5c30c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10540 zcmV+{Dbv<>Pew8T0RR9104Xd06951J09(8O04Tfw0RR9100000000000000000000 z0000Qf)X2(JRE}}KS)+VQi5y-U_Vn-K~#Y_0D^cgY!L_wuNbI)3xYNPFv(~EHUcCA zglGgH1%+G(j2jFG8zojHY@1d*=njzF`zW#*iLg(D6pW&5ao$n<|EB~_hDhlath!$~ zaAakfS!++p5)}r2*qcfUNBCgDA_@p$D7cNy&I4n?&RZs$l0pL=rFDCl+rA3r3YR1_ z5A6UZqAW%Top*ixU*|V}v&Mp@eC0kd_6UuAk_-R;t$pu4x4Pe(PaFgn4K(wEtN|@j z*Y8AVQeolaBGF~}WcjH0sqMq_zqbFi4+l8FaptJ#;E0NfN+TL7De9yL1{G~mvdN}t zG}2M=d#NTJby65exr)ZsN#{|MbaaLMAMFFI_S1A1d?+eqmmF6j*seNoGi`__ItcRsWG#Y3Xeppytm%-affpZ2Bl z2vM|T5idb?Y?w;f;S>Fi<49|vgkf#nKN>&t0mX*)P5OVwrvP<@N!BJ3F!9gexZtYR{ zLkVyP;t^+{VHkOs_d-=mr8nPFb_!TngsHfZ0XLuuX}yl{6quc%p<#-E8R3is4GjgE zF)}>y(`iHQUe`~$hr(!tty8Sa01lO?j%h1Q_jj#v=#tzgd97|Z#9DDo-}mQhuADW@ zAwth6LQgT^x^#`Nc3qk>H(qyb-Lc#rO2Bc58A4=ELma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