InvokeAI/invokeai/frontend/web/dist/assets/App-d620b60d.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

172 lines
1002 KiB
JavaScript
Raw Normal View History

import{a as Pu,b as pI,S as mI,c as hI,d as gI,e as A1,f as vI,i as D1,g as BA,h as xI,j as bI,k as HA,l as db,m as WA,n as VA,o as jw,p as yI,t as UA,q as GA,r as qA,s as KA,u as QA,v as d,w as a,x as fb,y as Rm,z as XA,A as YA,B as JA,C as ZA,P as eD,D as pb,E as tD,F as nD,G as rD,H as oD,I as CI,J as Oe,K as Lr,L as sD,M as aD,N as iD,O as Bn,Q as Ee,R as _t,T as pr,U as rt,V as ff,W as yo,X as Mr,Y as Kr,Z as ar,_ as vi,$ as il,a0 as qt,a1 as _s,a2 as Yc,a3 as xi,a4 as bi,a5 as eg,a6 as mb,a7 as pf,a8 as hr,a9 as lD,aa as H,ab as _w,ac as cD,ad as wI,ae as T1,af as mf,ag as Eu,ah as uD,ai as SI,aj as kI,ak as jI,al as Ks,am as dD,an as ce,ao as we,ap as Tn,aq as W,ar as fD,as as Iw,at as pD,au as mD,av as hD,aw as yi,ax as te,ay as gD,az as $t,aA as Gn,aB as De,aC as $,aD as xo,aE as ro,aF as je,aG as J,aH as _I,aI as vD,aJ as xD,aK as bD,aL as yD,aM as rs,aN as hb,aO as Ci,aP as Vo,aQ as hf,aR as CD,aS as wD,aT as Pw,aU as gb,aV as Se,aW as Qs,aX as SD,aY as II,aZ as PI,a_ as Ew,a$ as kD,b0 as jD,b1 as _D,b2 as wi,b3 as vb,b4 as on,b5 as ID,b6 as PD,b7 as Fa,b8 as EI,b9 as MI,ba as tg,bb as ED,bc as Mw,bd as OI,be as MD,bf as OD,bg as RD,bh as AD,bi as DD,bj as TD,bk as ND,bl as RI,bm as $D,bn as LD,bo as zD,bp as FD,bq as BD,br as fu,bs as xb,bt as HD,bu as WD,bv as VD,bw as wc,bx as UD,by as GD,bz as qD,bA as KD,bB as Ow,bC as QD,bD as XD,bE as oi,bF as AI,bG as DI,bH as ng,bI as bb,bJ as yb,bK as Ps,bL as TI,bM as YD,bN as Fl,bO as kd,bP as Rw,bQ as JD,bR as ZD,bS as e7,bT as Mp,bU as Op,bV as dd,bW as kv,bX as Md,bY as Od,bZ as Rd,b_ as Ad,b$ as Aw,c0 as Am,c1 as jv,c2 as Dm,c3 as Dw,c4 as N1,c5 as _v,c6 as $1,c7 as Iv,c8 as Tm,c9 as Tw,ca as Bl,cb as Nw,cc as Hl,cd as $w,ce as Nm,cf as gf,cg as NI,ch as t7,ci as Lw,cj as Cb,ck as $m,cl as $I,cm as Oo,cn as fd,co as Sc,cp as wb,cq as LI,cr as Rp,cs as Sb,ct as n7,cu as zI,cv as Pv,cw as rg,cx as r7,cy as FI,cz as L1,cA as z1,cB as BI,cC as o7,cD as F1,cE as s7,cF as B1,cG as a7,cH as H1,cI as i7,cJ as HI,cK as l7,cL as WI,cM as VI,cN as c7,cO as UI,cP as kb,cQ as jb,cR as _b,cS as Ib,cT as og,cU as Pb,cV as ti,cW as GI,cX as qI,cY as Eb,cZ as KI,c_ as u7,c$ as pd,d0 as di,d1 as QI,d2 as XI,d3 as zw,d4 as Mb,d5 as YI,d6 as Ob,d7 as Rb,d8 as JI,d9 as Or,da as d7,db as qr,dc as f7,dd as Mu,de as sg,df as Ab,dg as ZI,dh as eP,di as p7,dj as m7,dk as h7,dl as g7,dm as v7,dn as x7,dp as b7,dq as y7,dr as C7,ds as w7,dt as Fw,du as Db,dv as S7,dw as k7,dx as vf,dy as j7,dz as _7,dA as ag,dB as I7,dC as P7,dD as E7,dE as M7,dF as gr,dG as O7,dH as R7,dI as A7,dJ as D7,dK as T7,dL as N7,dM as Bd,dN as Bw,dO as na,dP as tP,dQ as $7,dR as Tb,dS as L7,dT as Hw,dU as z7,dV as F7,dW as B7,dX as nP,dY as H7,dZ as W7,d_ as V7,d$ as U7,e0 as G7,e1 as q7,e2 as rP,e3 as K7,e4 as Q7,e5 as Ww,e6 as X7,e7 as Y7,e8 as J7,e9 as Z7,ea as eT,eb as tT,ec as nT,ed as oP,ee as rT,ef as oT,eg as sT,eh as Vw,ei as Ap,ej as Rs,ek as aT,el as iT,em as lT,en as cT,eo as uT,ep as dT,eq as Xs,er as fT,es as pT,et as mT,eu as hT,ev as gT,ew as vT,ex as xT,ey as bT,ez as yT,eA as CT,eB as wT,eC as ST,eD as kT,eE as jT,eF as _T,eG as IT,eH as PT,eI as ET,eJ as MT,eK as OT,eL as RT,eM as AT,eN as DT,eO as TT,eP as NT,eQ as Uw,eR as Gw,eS as sP,eT as $T,eU as Us,eV as Hd,eW as Gr,eX as LT,eY as zT,eZ as aP,e_ as iP,e$ as FT,f0 as qw,f1 as BT,f2 as Kw,f3 as Qw,f4 as Xw,f5 as HT,f6 as WT,f7 as Yw,f8 as Jw,f9 as VT,fa as UT,fb as Lm,fc as GT,fd as Zw,fe as eS,ff as qT,fg as zm,fh as Fm,fi as tS,fj as KT,fk as QT,fl as lP,fm as XT,fn as YT,fo as cP,fp as JT,fq as ZT,fr as nS,fs as eN,ft as rS,fu as tN,fv as nN,fw as uP,fx as dP,fy as xf,fz as fP,fA as Ml,fB as pP,fC as oS,fD as rN,fE as oN,fF as mP,fG as sN,fH as aN,fI as iN,fJ as lN,fK as cN,fL as Nb,fM as W1,fN as sS,fO as ec,fP as uN,fQ as dN,fR as hP,fS as $b,fT as gP,fU as Lb,fV as vP,fW as fN,fX as ri,fY as pN,fZ as xP,f_ as mN,f$ as zb,g0 as bP,g1 as hN,g2 as gN,g3 as vN,g4 as xN,g5 as bN,g6 as yN,g7 as CN,g8 as Bm,g9 as jd,ga as Vc,gb as wN,gc as SN,gd as kN,ge as jN,gf as _N,gg as IN,gh as PN,gi as EN,gj as aS,gk as MN,gl as ON,gm as RN,gn as AN
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fill:u,fillRule:"evenodd",stroke:p,strokeWidth:m,pointerEvents:"none"})]})})}PP.displayName="MiniMap";var z$=d.memo(PP),Ys;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ys||(Ys={}));function F$({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 B$({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const H$={[Ys.Dots]:"#91919a",[Ys.Lines]:"#eee",[Ys.Cross]:"#e2e2e2"},W$={[Ys.Dots]:1,[Ys.Lines]:1,[Ys.Cross]:6},V$=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function EP({id:e,variant:t=Ys.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:l,className:u}){const p=d.useRef(null),{transform:m,patternId:h}=Rm(V$,pb),g=i||H$[t],x=r||W$[t],y=t===Ys.Dots,b=t===Ys.Cross,C=Array.isArray(n)?n:[n,n],S=[C[0]*m[2]||1,C[1]*m[2]||1],j=x*m[2],_=b?[j,j]:S,P=y?[j/s,j/s]:[_[0]/s,_[1]/s];return a.jsxs("svg",{className:fb(["react-flow__background",u]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:h+e,x:m[0]%S[0],y:m[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${P[0]},-${P[1]})`,children:y?a.jsx(B$,{color:g,radius:j/s}):a.jsx(F$,{dimensions:_,color:g,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${h+e})`})]})}EP.displayName="Background";var U$=d.memo(EP);const xS=(e,t,n)=>{G$(n);const r=CI(e,t);return MP[n].includes(r)},MP={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},bS=Object.keys(MP),G$=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(bS.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${bS.join("|")}`)};function q$(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var K$=q$();const OP=1/60*1e3,Q$=typeof performance<"u"?()=>performance.now():()=>Date.now(),RP=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Q$()),OP);function X$(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,l={schedule:(u,p=!1,m=!1)=>{const h=m&&o,g=h?t:n;return p&&i.add(u),g.indexOf(u)===-1&&(g.push(u),h&&o&&(r=t.length)),u},cancel:u=>{const p=n.indexOf(u);p!==-1&&n.splice(p,1),i.delete(u)},process:u=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p<r;p++){const m=t[p];m(u),i.has(m)&&(l.schedule(m),e())}o=!1,s&&(s=!1,l.process(u))}};return l}const Y$=40;let G1=!0,Vd=!1,q1=!1;const Zc={delta:0,timestamp:0},yf=["read","update","preRender","render","postRender"],ig=yf.reduce((e,t)=>(e[t]=X$(()=>Vd=!0),e),{}),J$=yf.reduce((e,t)=>{const n=ig[t];return e[t]=(r,o=!1,s=!1)=>(Vd||tL(),n.schedule(r,o,s)),e},{}),Z$=yf.reduce((e,t)=>(e[t]=ig[t].cancel,e),{});yf.reduce((e,t)=>(e[t]=()=>ig[t].process(Zc),e),{});const eL=e=>ig[e].process(Zc),AP=e=>{Vd=!1,Zc.delta=G1?OP:Math.max(Math.min(e-Zc.timestamp,Y$),1),Zc.timestamp=e,q1=!0,yf.forEach(eL),q1=!1,Vd&&(G1=!1,RP(AP))},tL=()=>{Vd=!0,G1=!0,q1||RP(AP)},yS=()=>Zc;function lg(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=d.Children.toArray(e.path),i=Oe((l,u)=>a.jsx(Lr,{ref:u,viewBox:t,...o,...l,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}function DP(e){const{theme:t}=sD(),n=aD();return d.useMemo(()=>iD(t.direction,{...n,...e}),[e,t.direction,n])}var nL=Object.defineProperty,rL=(e,t,n)=>t in e?nL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pr=(e,t,n)=>(rL(e,typeof t!="symbol"?t+"":t,n),n);function CS(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 oL=e=>typeof e=="object"&&"nodeType"i
`})}function wL(e){ff({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nc(e){const{isOpen:t,isDisabled:n}=Hb(),{reduceMotion:r}=Wb(),o=_t("chakra-accordion__icon",e.className),s=cg(),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(Lr,{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"})})}Nc.displayName="AccordionIcon";var $c=Oe(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=xL(t),u={...cg().container,overflowAnchor:"none"},p=d.useMemo(()=>i,[i]);return a.jsx(fL,{value:p,children:a.jsx(Ee.div,{ref:n,...s,className:_t("chakra-accordion__item",o),__css:u,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});$c.displayName="AccordionItem";var Uc={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Al={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})},SL=e=>e!=null&&parseInt(e.toString(),10)>0,kS={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}}},kL={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:SL(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:si.exit(kS.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(kS.enter,o)}}},wf=d.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:l,className:u,transition:p,transitionEnd:m,...h}=e,[g,x]=d.useState(!1);d.useEffect(()=>{const j=setTimeout(()=>{x(!0)});return()=>clearTimeout(j)},[]),ff({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,b={startingHeight:s,endingHeight:i,animateOpacity:o,transition:g?p:{enter:{duration:0}},transitionEnd:{enter:m==null?void 0:m.enter,exit:r?m==null?void 0:m.exit:{...m==null?void 0:m.exit,display:y?"block":"none"}}},C=r?n:!0,S=n||r?"enter":"exit";return a.jsx(yo,{initial:!1,custom:b,children:C&&a.jsx(Mr.div,{ref:t,...h,className:_t("chakra-collapse",u),style:{overflow:"hidden",display:"block",...l},custom:b,variants:kL,initial:r?"exit":!1,animate:S,exit:"exit"})})});wf.displayName="Collapse";var jL={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:si.enter(Al.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(Al.exit,n),transitionEnd:t==null?void 0:t.exit}}},NP={initial:"exit",animate:"enter",exit:"exit",variants:jL},_L=d.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:l,delay:u,...p}=t,m=o||r?"enter":"exit",h=r?o&&r:!0,g={transition:i,transitionEnd:l,delay:u};return a.jsx(yo,{custom:g,children:h&&a.jsx(Mr.div,{ref:n,className:_t("chakra-fade",s),custom:g,...NP,animate:m,...p})})});_L.displayName="Fade";var IL={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(Al.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(Al.enter,n),transitionEnd:e==null?void 0:e.enter}}},$P={initial:"exit",animate
.`.concat(nW,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"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(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(ym,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Cm,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(ym," .").concat(ym,` {
right: 0 `).concat(r,`;
}
.`).concat(Cm," .").concat(Cm,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(rW,": ").concat(l,`px;
}
`)},hW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=d.useMemo(function(){return fW(o)},[o]);return d.createElement(pW,{styles:mW(s,!t,o,n?"":"!important")})},fx=!1;if(typeof window<"u")try{var zp=Object.defineProperty({},"passive",{get:function(){return fx=!0,!0}});window.addEventListener("test",zp,zp),window.removeEventListener("test",zp,zp)}catch{fx=!1}var Pc=fx?{passive:!1}:!1,gW=function(e){return e.tagName==="TEXTAREA"},f5=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!gW(e)&&n[t]==="visible")},vW=function(e){return f5(e,"overflowY")},xW=function(e){return f5(e,"overflowX")},ZS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=p5(e,r);if(o){var s=m5(e,r),i=s[1],l=s[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},p5=function(e,t){return e==="v"?vW(t):xW(t)},m5=function(e,t){return e==="v"?bW(t):yW(t)},CW=function(e,t){return e==="h"&&t==="rtl"?-1:1},wW=function(e,t,n,r,o){var s=CW(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,u=t.contains(l),p=!1,m=i>0,h=0,g=0;do{var x=m5(e,l),y=x[0],b=x[1],C=x[2],S=b-C-s*y;(y||S)&&p5(e,l)&&(h+=S,g+=y),l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(m&&(o&&h===0||!o&&i>h)||!m&&(o&&g===0||!o&&-i>g))&&(p=!0),p},Fp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},e4=function(e){return[e.deltaX,e.deltaY]},t4=function(e){return e&&"current"in e?e.current:e},SW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kW=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},jW=0,Ec=[];function _W(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(jW++)[0],s=d.useState(d5)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=rx([e.lockRef.current],(e.shards||[]).map(t4),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(b,C){if("touches"in b&&b.touches.length===2)return!i.current.allowPinchZoom;var S=Fp(b),j=n.current,_="deltaX"in b?b.deltaX:j[0]-S[0],P="deltaY"in b?b.deltaY:j[1]-S[1],I,M=b.target,O=Math.abs(_)>Math.abs(P)?"h":"v";if("touches"in b&&O==="h"&&M.type==="range")return!1;var A=ZS(O,M);if(!A)return!0;if(A?I=O:(I=O==="v"?"h":"v",A=ZS(O,M)),!A)return!1;if(!r.current&&"changedTouches"in b&&(_||P)&&(r.current=I),!I)return!0;var D=r.current||I;return wW(D,C,b,D==="h"?_:P,!0)},[]),u=d.useCallback(function(b){var C=b;if(!(!Ec.length||Ec[Ec.length-1]!==s)){var S="deltaY"in C?e4(C):Fp(C),j=t.current.filter(function(I){return I.name===C.type&&I.target===C.target&&SW(I.delta,S)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var _=(i.current.shards||[]).map(t4).filter(Boolean).filter(function(I){return I.contains(C.target)}),P=_.length>0?l(C,_[0]):!i.current.noIsolation;P&&C.cancelable&&C.preventDefault()}}},[]),p=d.useCallback(function(b,C,S,j){var _={name:b,delta:C,target:S,should:j};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(P){return P!==_})},1)},[]),m=d.useCallback(function(b){n.current=Fp(b),r.current=void 0},[]),h=d.useCallback(function(b){p(b.type,e4(b),b.target,l(b,e.lockRef.current))},[]),g=d.useCallback(function(b){p(b.type,Fp(b),b.target,l(b,e.lockRef.current))},[]);d.useEffect(function(){return Ec.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Pc),document.addEventListener("touchmove",u,Pc),document.addEventListener("touchstart",m,Pc),function(){Ec=Ec.filter(function(b){return b!==s}),document.removeEventListener("wheel",u,Pc),document.removeEventListener("touchmove",u,Pc),document.removeEventListener("touchstart",m,Pc)}},[]);var x=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(s,{styles:kW(o)}):null,x?d.createElement(hW,{gapMode:e.gapMode}):null)}const IW=Iz(u5,_W);var h5=d.forwardRef(function(e,t){return d.createElement(Cg,ka({},e,{ref:t,sideCar:IW}))});h5.classNames=Cg.classNames;const PW=h5;function EW(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:l,returnFocusOnClose:u,preserveScrollBarGap:p,lockFocusAcrossFrames:m,isOpen:h}=Gl(),[g,x]=uD();d.useEffect(()=>{!g&&x&&setTimeout(x)},[g,x]);const y=l5(r,h);return a.jsx($3,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:l,restoreFocus:u,contentRef:r,lockFocusAcrossFrames:m,children:a.jsx(PW,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var Kl=Oe((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:l,getDialogContainerProps:u}=Gl(),p=l(i,t),m=u(o),h=_t("chakra-modal__content",n),g=Du(),x={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:b}=Gl();return a.jsx(EW,{children:a.jsx(Ee.div,{...m,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(i5,{preset:b,motionProps:s,className:h,...p,__css:x,children:r})})})});Kl.displayName="ModalContent";function Mf(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(ql,{...n,initialFocusRef:t})}var Of=Oe((e,t)=>a.jsx(Kl,{ref:t,role:"alertdialog",...e})),Oa=Oe((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AU(e){if(Array.isArray(e))return yx(e)}function u4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function d4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u4(Object(n),!0).forEach(function(r){Q5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yd(e,t){return NU(e)||TU(e,t)||X5(e,t)||DU()}function DU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X5(e,t){if(e){if(typeof e=="string")return yx(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 yx(e,t)}}function yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,l;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function NU(e){if(Array.isArray(e))return e}var $U="file-invalid-type",LU="file-too-large",zU="file-too-small",FU="too-many-files",BU=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:$U,message:"File type must be ".concat(n)}},f4=function(t){return{code:LU,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},p4=function(t){return{code:zU,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},HU={code:FU,message:"Too many files"};function Y5(e,t){var n=e.type==="application/x-moz-file"||MU(e,t);return[n,n?null:BU(t)]}function J5(e,t,n){if(Pl(e.size))if(Pl(t)&&Pl(n)){if(e.size>n)return[!1,f4(n)];if(e.size<t)return[!1,p4(t)]}else{if(Pl(t)&&e.size<t)return[!1,p4(t)];if(Pl(n)&&e.size>n)return[!1,f4(n)]}return[!0,null]}function Pl(e){return e!=null}function WU(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,l=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(u){var p=Y5(u,n),m=Yd(p,1),h=m[0],g=J5(u,r,o),x=Yd(g,1),y=x[0],b=l?l(u):null;return h&&y&&!b})}function Jm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Hp(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 m4(e){e.preventDefault()}function VU(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function UU(e){return e.indexOf("Edge/")!==-1}function GU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return VU(e)||UU(e)}function Ca(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(l){return!Jm(r)&&l&&l.apply(void 0,[r].concat(s)),Jm(r)})}}function qU(){return"showOpenFilePicker"in window}function KU(e){if(Pl(e)){var t=Object.entries(e).filter(function(n){var r=Yd(n,2),o=r[0],s=r[1],i=!0;return Z5(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(e6))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Yd(r,2),s=o[0],i=o[1];return d4(d4({},n),{},Q5({},s,i))},{});return[{description:"Files",accept:t}]}return e}function QU(e){if(Pl(e))return Object.entries(e).reduce(function(t,n){var r=Yd(n,2),o=r[0],s=r[1];return[].concat(c4(t),[o],c4(s))},[]).filter(function(t){return Z5(t)||e6(t)}).join(",")}function XU(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function YU(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Z5(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function e6(e){return/^.*\.[\w]+$/.test(e)}var JU=["children"],ZU=["open"],eG=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDr
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sG(e){if(Array.isArray(e))return Cx(e)}function Qv(e,t){return lG(e)||iG(e,t)||t6(e,t)||aG()}function aG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t6(e,t){if(e){if(typeof e=="string")return Cx(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 Cx(e,t)}}function Cx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,l;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function lG(e){if(Array.isArray(e))return e}function h4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h4(Object(n),!0).forEach(function(r){wx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zm(e,t){if(e==null)return{};var n=cG(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cG(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var _y=d.forwardRef(function(e,t){var n=e.children,r=Zm(e,JU),o=Iy(r),s=o.open,i=Zm(o,ZU);return d.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(d.Fragment,null,n(Cr(Cr({},i),{},{open:s})))});_y.displayName="Dropzone";var n6={disabled:!1,getFilesFromEvent:CU,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};_y.defaultProps=n6;_y.propTypes={children:Zn.func,accept:Zn.objectOf(Zn.arrayOf(Zn.string)),multiple:Zn.bool,preventDropOnDocument:Zn.bool,noClick:Zn.bool,noKeyboard:Zn.bool,noDrag:Zn.bool,noDragEventsBubbling:Zn.bool,minSize:Zn.number,maxSize:Zn.number,maxFiles:Zn.number,disabled:Zn.bool,getFilesFromEvent:Zn.func,onFileDialogCancel:Zn.func,onFileDialogOpen:Zn.func,useFsAccessApi:Zn.bool,autoFocus:Zn.bool,onDragEnter:Zn.func,onDragLeave:Zn.func,onDragOver:Zn.func,onDrop:Zn.func,onDropAccepted:Zn.func,onDropRejected:Zn.func,onError:Zn.func,validator:Zn.func};var Sx={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Iy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Cr(Cr({},n6),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,l=t.multiple,u=t.maxFiles,p=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,g=t.onDrop,x=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,C=t.onFileDialogOpen,S=t.useFsAccessApi,j=t.autoFocus,_=t.preventDropOnDocument,P=t.noClick,I=t.noKeyboard,M=t.noDrag,O=t.noDragEventsBubbling,A=t.onError,D=t.validator,R=d.useMemo(function(){return QU(n)},[n]),N=d.useMemo(function(){return KU(n)},[n]),Y=d.useMemo(function(){return typeof C=="function"?C:g4},[C]),F=d.useMemo(function(){return typeof b=="function"?b:g4},[b]),V=d.useRef(null),Q=d.useRef(null),q=d.useReducer(uG,Sx),z=Qv(q,2),G=z[0],T=z[1],B=G.isFocused,X=G.isFileDialogActive,re=d.useRef(typeof window<"u"&&window.isSecureContext&&S&&qU()),le=function(){!re.current&&X&&setTimeout(function(){if(Q.current){var We=Q.current.files;We.length||(T({type:"closeDialog"}),F())}},300)};d.useEffect(function
`),status:"error"})},[s,o]),m=d.useCallback(async _=>{u({file:_,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,u]),h=d.useCallback((_,P)=>{if(P.length>1){o({title:s("toast.uploadFailed"),description:s("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}P.forEach(I=>{p(I)}),_.forEach(I=>{m(I)})},[s,o,m,p]),g=d.useCallback(()=>{l(!0)},[]),{getRootProps:x,getInputProps:y,isDragAccept:b,isDragReject:C,isDragActive:S,inputRef:j}=Iy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:g,multiple:!1});return d.useEffect(()=>{const _=async P=>{var I,M;j.current&&(I=P.clipboardData)!=null&&I.files&&(j.current.files=P.clipboardData.files,(M=j.current)==null||M.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[j]),a.jsxs(De,{...x({style:{}}),onKeyDown:_=>{_.key},children:[a.jsx("input",{...y()}),t,a.jsx(yo,{children:S&&i&&a.jsx(Mr.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(jG,{isDragAccept:b,isDragReject:C,setIsHandlingUpload:l})},"image-upload-overlay")})]})},PG=d.memo(IG),EG=Oe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:l,...u}=e;return a.jsx(Fn,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(el,{ref:t,colorScheme:l?"accent":"base",...u,children:n})})}),Mt=d.memo(EG);function MG(e){const t=d.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=d.useContext(t);if(o===null)throw new Error(e);return o}]}function l6(e){return Array.isArray(e)?e:[e]}const OG=()=>{};function RG(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||OG:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function c6({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 u6(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function d6(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;t<e.length;t++)e[t]&&(n=d6(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function f6(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=d6(t))&&(r&&(r+=" "),r+=n);return r}const AG={app:100,modal:200,popover:300,overlay:400,max:9999};function Ey(e){return AG[e]}function DG(e,t){const n=d.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const TG=vD({key:"mantine",prepend:!0});function NG(){return _P()||TG}var $G=Object.defineProperty,x4=Object.getOwnPropertySymbols,LG=Object.prototype.hasOwnProperty,zG=Object.prototype.propertyIsEnumerable,b4=(e,t,n)=>t in e?$G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FG=(e,t)=>{for(var n in t||(t={}))LG.call(t,n)&&b4(e,n,t[n]);if(x4)for(var n of x4(t))zG.call(t,n)&&b4(e,n,t[n]);return e};const Jv="ref";function BG(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(!(Jv in n))return{args:e,ref:t};t=n[Jv];const r=FG({},n);return delete r[Jv],{args:[r],ref:t}}const{cssFactory:HG}=(()=>{function e(n,r,o){const s=[],i=yD(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:l,args:u}=BG(i),p=xD(u,r.registered);return bD(r,p,!1),`${r.key}-${p.name}${l===void 0?"":` ${l}`}`};return{css:o,cx:(...i)=>e(r.registered,o,f6(i))}}return{cssFactory:t}})();function p6(){const e=NG();return DG(()=>HG({cache:e}),[e])}function WG({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((l,u)=>(Object.keys(u.classNames).forEach(p=>{typeof l[p]!="string"?l[p]=`${u.classNames[p]}`:l[p]=`${l[p]}
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function Dn(e,t){if(Xg(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Dn(Object.keys(e),n=>t(e[n],n,e));return e}function bo(e,t){const n=dl(t);if(la(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?_j(e,s,t):t.reduce((i,l)=>(i[l]=_j(e,s,l),i),o)}return o}e&&Dn(us(t),o=>bte(e,o,t[o]))}const Gs=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const l=(m,h)=>{const g=s,x=m,y=h||(r?!r(g,x):g!==x);return(y||o)&&(s=x,i=g),[s,y,i]};return[t?m=>l(t(s,i),m):l,m=>[s,!!m,i]]},Ff=()=>typeof window<"u",oO=Ff()&&Node.ELEMENT_NODE,{toString:ote,hasOwnProperty:a1}=Object.prototype,_i=e=>e===void 0,Qg=e=>e===null,ste=e=>_i(e)||Qg(e)?`${e}`:ote.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Yi=e=>typeof e=="number",dl=e=>typeof e=="string",Uy=e=>typeof e=="boolean",ia=e=>typeof e=="function",la=e=>Array.isArray(e),ef=e=>typeof e=="object"&&!la(e)&&!Qg(e),Xg=e=>{const t=!!e&&e.length,n=Yi(t)&&t>-1&&t%1==0;return la(e)||!ia(e)&&n?t>0&&ef(e)?t-1 in e:!0:!1},Nx=e=>{if(!e||!ef(e)||ste(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=a1.call(e,n),i=o&&a1.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return _i(t)||a1.call(e,t)},zh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===oO:!1},Yg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===oO:!1},Gy=(e,t,n)=>e.indexOf(t,n),Un=(e,t,n)=>(!n&&!dl(t)&&Xg(t)?Array.prototype.push.apply(e,t):e.push(t),e),Yl=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Un(n,r)}):Dn(e,r=>{Un(n,r)}),n)},qy=e=>!!e&&e.length===0,Wa=(e,t,n)=>{Dn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},Jg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),us=e=>e?Object.keys(e):[],Sr=(e,t,n,r,o,s,i)=>{const l=[t,n,r,o,s,i];return(typeof e!="object"||Qg(e))&&!ia(e)&&(e={}),Dn(l,u=>{Dn(us(u),p=>{const m=u[p];if(e===m)return!0;const h=la(m);if(m&&(Nx(m)||h)){const g=e[p];let x=g;h&&!la(g)?x=[]:!h&&!Nx(g)&&(x={}),e[p]=Sr(x,m)}else e[p]=m})}),e},Ky=e=>{for(const t in e)return!1;return!0},sO=(e,t,n,r)=>{if(_i(r))return n?n[e]:t;n&&(dl(r)||Yi(r))&&(n[e]=r)},vo=(e,t,n)=>{if(_i(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},zo=(e,t)=>{e&&e.removeAttribute(t)},$l=(e,t,n,r)=>{if(n){const o=vo(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Yl(s).join(" ").trim();vo(e,t,i)}},ate=(e,t,n)=>{const r=vo(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),$x=Ff()&&Element.prototype,aO=(e,t)=>{const n=[],r=t?Yg(t)?t:null:document;return r?Un(n,r.querySelectorAll(e)):n},ite=(e,t)=>{const n=t?Yg(t)?t:null:document;return n?n.querySelector(e):null},Fh=(e,t)=>Yg(e)?($x.matches||$x.msMatchesSelector).call(e,t):!1,Qy=e=>e?Yl(e.childNodes):[],mi=e=>e?e.parentElement:null,qc=(e,t)=>{if(Yg(e)){const n=$x.closest;if(n)return n.call(e,t);do{if(Fh(e,t))return e;e=mi(e)}while(e)}return null},lte=(e,t,n)=>{const r=e&&qc(e,t),o=e&&ite(n,r),s=qc(o,t)===r;return r&&o?r===e||o===e||s&&qc(qc(e,n),t)!==r:!1},Xy=(e,t,n)=>{if(n&&e){let r=t,o;Xg(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)=>{Xy(e,null,t)},cte=(e,t)=>{Xy(mi(e),e,t)},Sj=(e,t)=>{Xy(mi(e),e&&e.nextSibling,t)},Aa=e=>{if(Xg(e))Dn(Yl(e),t=>Aa(t));else if(e){const t=mi(e);t&&t.removeChild(e)}},Ll=e=>{const t=document.createElement("div");return e&&vo(t,"class",e),t},iO=e=>{const t=Ll();return t.innerHTML=e.trim(),Dn(Qy(t),n=>Aa(n))},Lx=e=>e.charAt(0).toUpperCase()+e.slice(1),ute=()=>Ll().style,dte=["-webkit-","-moz-","-o-","-ms-"],fte=["WebKit","Moz","O","MS","webkit","moz","o","ms"],i1={},l1={},pte=e=>{let t=l1[e];if(Jg(l1,e))return t;const n=Lx(e),r=ute();return Dn(dte,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,Lx(s)+n].find(l=>r[l]!==void 0))}),l1[e]=t||""},Bf=e=>{if(Ff()){let t=i1[e]||window[e];return Jg(i1,e)||(Dn(fte,n=>(t=t||window[n+Lx(e)],!t)),i1[e]=t),t}},mte=Bf("MutationObserver"),kj=Bf("IntersectionObserver"),Kc=Bf("ResizeObserver"),lO=Bf("cancel
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.`)}}}({queryThunk:et,mutationThunk:Et,api:ne,serializeQueryArgs:pt,context:ve}),Fr=fn.buildInitiateQuery,cr=fn.buildInitiateMutation;return Xr(ne.util,{getRunningOperationPromises:fn.getRunningOperationPromises,getRunningOperationPromise:fn.removalWarning,getRunningMutationThunk:fn.getRunningMutationThunk,getRunningMutationsThunk:fn.getRunningMutationsThunk,getRunningQueryThunk:fn.getRunningQueryThunk,getRunningQueriesThunk:fn.getRunningQueriesThunk}),{name:Ls,injectEndpoint:function(Ot,$n){var Hn,ur=ne;(Hn=ur.endpoints)[Ot]!=null||(Hn[Ot]={}),Z($n)?Xr(ur.endpoints[Ot],{name:Ot,select:Jt(Ot,$n),initiate:Fr(Ot,$n)},an(et,Ot)):$n.type===U.mutation&&Xr(ur.endpoints[Ot],{name:Ot,select:vn(),initiate:cr(Ot)},an(Et,Ot))}}}}},pa=Ye(Ua())})(AO);RO.exports=AO;var Os=RO.exports;const jne=e=>{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=J(),o=W(j=>j.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:i}=UD((t==null?void 0:t.board_id)??Os.skipToken),l=d.useMemo(()=>ce([we],j=>{const _=(s??[]).map(I=>II(j,I));return{imageUsageSummary:{isInitialImage:Qs(_,I=>I.isInitialImage),isCanvasImage:Qs(_,I=>I.isCanvasImage),isNodesImage:Qs(_,I=>I.isNodesImage),isControlImage:Qs(_,I=>I.isControlImage)}}}),[s]),[u,{isLoading:p}]=GD(),[m,{isLoading:h}]=qD(),{imageUsageSummary:g}=W(l),x=d.useCallback(()=>{t&&(u(t.board_id),n(void 0))},[t,u,n]),y=d.useCallback(()=>{t&&(m(t.board_id),n(void 0))},[t,m,n]),b=d.useCallback(()=>{n(void 0)},[n]),C=d.useRef(null),S=d.useMemo(()=>h||p||i,[h,p,i]);return t?a.jsx(Mf,{isOpen:!!t,onClose:b,leastDestructiveRef:C,isCentered:!0,children:a.jsx(oa,{children:a.jsxs(Of,{children:[a.jsxs(ra,{fontSize:"lg",fontWeight:"bold",children:["Delete ",t.board_name]}),a.jsx(sa,{children:a.jsxs($,{direction:"column",gap:3,children:[i?a.jsx(Og,{children:a.jsx($,{sx:{w:"full",h:32}})}):a.jsx(TM,{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(Oa,{children:a.jsxs($,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[a.jsx(Mt,{ref:C,onClick:b,children:"Cancel"}),a.jsx(Mt,{colorScheme:"warning",isLoading:S,onClick:x,children:"Delete Board Only"}),a.jsx(Mt,{colorScheme:"error",isLoading:S,onClick:y,children:"Delete Board and Images"})]})})]})})}):null},_ne=d.memo(jne),Ine=()=>{const{t:e}=J(),[t,{isLoading:n}]=KD(),r=e("boards.myBoard"),o=d.useCallback(()=>{t(r)},[t,r]);return a.jsx(ot,{icon:a.jsx(Xi,{}),isLoading:n,tooltip:e("boards.addBoard"),"aria-label":e("boards.addBoard"),onClick:o,size:"sm","data-testid":"add-board-button"})},Pne=d.memo(Ine);var DO=lg({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"})]})}),t0=lg({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),Ene=lg({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"}),Mne=lg({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 One=ce([we],({gallery:e})=>{const{boardSearchTex
* @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 n0e=function(t){var n={},r=d,o=xm,s=Object.assign;function i(c){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),y=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),I=Symbol.iterator;function M(c){return c===null||typeof c!="object"?null:(c=I&&c[I]||c["@@iterator"],typeof c=="function"?c:null)}function O(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case m:return"Fragment";case p:return"Portal";case g:return"Profiler";case h:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case y:return(c.displayName||"Context")+".Consumer";case x:return(c._context.displayName||"Context")+".Provider";case b:var f=c.render;return c=c.displayName,c||(c=f.displayName||f.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case j:return f=c.displayName||null,f!==null?f:O(c.type)||"Memo";case _:f=c._payload,c=c._init;try{return O(c(f))}catch{}}return null}function A(c){var f=c.type;switch(c.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=f.render,c=c.displayName||c.name||"",f.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O(f);case 8:return f===h?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function D(c){var f=c,v=c;if(c.alternate)for(;f.return;)f=f.return;else{c=f;do f=c,f.flags&4098&&(v=f.return),c=f.return;while(c)}return f.tag===3?v:null}function R(c){if(D(c)!==c)throw Error(i(188))}function N(c){var f=c.alternate;if(!f){if(f=D(c),f===null)throw Error(i(188));return f!==c?null:c}for(var v=c,w=f;;){var k=v.return;if(k===null)break;var E=k.alternate;if(E===null){if(w=k.return,w!==null){v=w;continue}break}if(k.child===E.child){for(E=k.child;E;){if(E===v)return R(k),c;if(E===w)return R(k),f;E=E.sibling}throw Error(i(188))}if(v.return!==w.return)v=k,w=E;else{for(var L=!1,oe=k.child;oe;){if(oe===v){L=!0,v=k,w=E;break}if(oe===w){L=!0,w=k,v=E;break}oe=oe.sibling}if(!L){for(oe=E.child;oe;){if(oe===v){L=!0,v=E,w=k;break}if(oe===w){L=!0,w=E,v=k;break}oe=oe.sibling}if(!L)throw Error(i(189))}}if(v.alternate!==w)throw Error(i(190))}if(v.tag!==3)throw Error(i(188));return v.stateNode.current===v?c:f}function Y(c){return c=N(c),c!==null?F(c):null}function F(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var f=F(c);if(f!==null)return f;c=c.sibling}return null}function V(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){if(c.tag!==4){var f=V(c);if(f!==null)return f}c=c.sibling}return null}var Q=Array.isArray,q=t.getPublicInstance,z=t.getRootHostContext,G=t.getChildHostContext,T=t.prepareForCommit,B=t.resetAfterCommit,X=t.createInstance,re=t.appendInitialChild,le=t.finalizeInitialChildren,se=t.prepareUpdate,K=t.shouldSetTextContent,U=t.createTextInstance,ee=t.scheduleTimeout,de=t.cancelTimeout,Z=t.noTimeout,ue=t.isPrimaryRenderer,fe=t.supportsMutation,ge=t.supportsPersistence,_e=t.supportsHydrat
`+At+c}var Zt=!1;function ln(c,f){if(!c||Zt)return"";Zt=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Fe){var w=Fe}Reflect.construct(c,[],f)}else{try{f.call()}catch(Fe){w=Fe}c.call(f.prototype)}else{try{throw Error()}catch(Fe){w=Fe}c()}}catch(Fe){if(Fe&&w&&typeof Fe.stack=="string"){for(var k=Fe.stack.split(`
`),E=w.stack.split(`
`),L=k.length-1,oe=E.length-1;1<=L&&0<=oe&&k[L]!==E[oe];)oe--;for(;1<=L&&0<=oe;L--,oe--)if(k[L]!==E[oe]){if(L!==1||oe!==1)do if(L--,oe--,0>oe||k[L]!==E[oe]){var he=`
`+k[L].replace(" at new "," at ");return c.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",c.displayName)),he}while(1<=L&&0<=oe);break}}}finally{Zt=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?Ht(c):""}var an=Object.prototype.hasOwnProperty,Yt=[],Be=-1;function yt(c){return{current:c}}function Lt(c){0>Be||(c.current=Yt[Be],Yt[Be]=null,Be--)}function Qt(c,f){Be++,Yt[Be]=c.current,c.current=f}var Nn={},Jt=yt(Nn),vn=yt(!1),fn=Nn;function Fr(c,f){var v=c.type.contextTypes;if(!v)return Nn;var w=c.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===f)return w.__reactInternalMemoizedMaskedChildContext;var k={},E;for(E in v)k[E]=f[E];return w&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=f,c.__reactInternalMemoizedMaskedChildContext=k),k}function cr(c){return c=c.childContextTypes,c!=null}function Ot(){Lt(vn),Lt(Jt)}function $n(c,f,v){if(Jt.current!==Nn)throw Error(i(168));Qt(Jt,f),Qt(vn,v)}function Hn(c,f,v){var w=c.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(c)||"Unknown",k));return s({},v,w)}function ur(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Nn,fn=Jt.current,Qt(Jt,c),Qt(vn,vn.current),!0}function _r(c,f,v){var w=c.stateNode;if(!w)throw Error(i(169));v?(c=Hn(c,f,fn),w.__reactInternalMemoizedMergedChildContext=c,Lt(vn),Lt(Jt),Qt(Jt,c)):Lt(vn),Qt(vn,v)}var Qn=Math.clz32?Math.clz32:On,Xn=Math.log,xn=Math.LN2;function On(c){return c>>>=0,c===0?32:31-(Xn(c)/xn|0)|0}var Ln=64,In=4194304;function Pn(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Je(c,f){var v=c.pendingLanes;if(v===0)return 0;var w=0,k=c.suspendedLanes,E=c.pingedLanes,L=v&268435455;if(L!==0){var oe=L&~k;oe!==0?w=Pn(oe):(E&=L,E!==0&&(w=Pn(E)))}else L=v&~k,L!==0?w=Pn(L):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=c.entangledLanes,f!==0)for(c=c.entanglements,f&=w;0<f;)v=31-Qn(f),k=1<<v,w|=c[v],f&=~k;return w}function Dt(c,f){switch(c){case 1:case 2:case 4:return f+250;case 8:case 16:case 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 f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kt(c,f){for(var v=c.suspendedLanes,w=c.pingedLanes,k=c.expirationTimes,E=c.pendingLanes;0<E;){var L=31-Qn(E),oe=1<<L,he=k[L];he===-1?(!(oe&v)||oe&w)&&(k[L]=Dt(oe,f)):he<=f&&(c.expiredLanes|=oe),E&=~oe}}function lt(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function St(){var c=Ln;return Ln<<=1,!(Ln&4194240)&&(Ln=64),c}function Gt(c){for(var f=[],v=0;31>v;v++)f.push(c);return f}function vt(c,f,v){c.pendingLanes|=f,f!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,f=31-Qn(f),c[f]=v}function st(c,f){var v=c.pendingLanes&~f;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=f,c.mutableReadLanes&=f,c.entangledLanes&=f,f=c.entanglements;var w=c.eventTimes;for(c=c.expirationTimes;0<v;){var k=31-Qn(v),E=1<<k;f[k]=0,w[k]=-1,c[k]=-1,v&=~E}}function $e(c,f){var v=c.entangledLanes|=f;for(c=c.entanglements;v;){var w=31-Qn(v),k=1<<w;k&f|c[w]&f&&(c[w]|=f),v&=~k}}var Re=0;function ze(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var Ve=o.unstable_scheduleCallback,nt=o.unstable_cancelCallback,
Error generating stack: `+E.message+`
`+E.stack}return{value:c,source:f,stack:k,digest:null}}function K0(c,f,v){return{value:c,source:null,stack:v??null,digest:f??null}}function Q0(c,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var xA=typeof WeakMap=="function"?WeakMap:Map;function TC(c,f,v){v=Ka(-1,v),v.tag=3,v.payload={element:null};var w=f.value;return v.callback=function(){Cp||(Cp=!0,hv=w),Q0(c,f)},v}function NC(c,f,v){v=Ka(-1,v),v.tag=3;var w=c.type.getDerivedStateFromError;if(typeof w=="function"){var k=f.value;v.payload=function(){return w(k)},v.callback=function(){Q0(c,f)}}var E=c.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(v.callback=function(){Q0(c,f),typeof w!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})}),v}function $C(c,f,v){var w=c.pingCache;if(w===null){w=c.pingCache=new xA;var k=new Set;w.set(f,k)}else k=w.get(f),k===void 0&&(k=new Set,w.set(f,k));k.has(v)||(k.add(v),c=RA.bind(null,c,f,v),f.then(c,c))}function LC(c){do{var f;if((f=c.tag===13)&&(f=c.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return c;c=c.return}while(c!==null);return null}function zC(c,f,v,w,k){return c.mode&1?(c.flags|=65536,c.lanes=k,c):(c===f?c.flags|=65536:(c.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Ka(-1,1),f.tag=2,Mi(v,f,1))),v.lanes|=1),c)}var bA=l.ReactCurrentOwner,To=!1;function _o(c,f,v,w){f.child=c===null?fC(f,null,v,w):hc(f,c.child,v,w)}function FC(c,f,v,w,k){v=v.render;var E=f.ref;return mc(f,k),w=H0(c,f,v,w,E,k),v=W0(),c!==null&&!To?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~k,Qa(c,f,k)):(dr&&v&&S0(f),f.flags|=1,_o(c,f,w,k),f.child)}function BC(c,f,v,w,k){if(c===null){var E=v.type;return typeof E=="function"&&!Cv(E)&&E.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=E,HC(c,f,E,w,k)):(c=Ip(v.type,null,w,f,f.mode,k),c.ref=f.ref,c.return=f,f.child=c)}if(E=c.child,!(c.lanes&k)){var L=E.memoizedProps;if(v=v.compare,v=v!==null?v:Qf,v(L,w)&&c.ref===f.ref)return Qa(c,f,k)}return f.flags|=1,c=Ti(E,w),c.ref=f.ref,c.return=f,f.child=c}function HC(c,f,v,w,k){if(c!==null){var E=c.memoizedProps;if(Qf(E,w)&&c.ref===f.ref)if(To=!1,f.pendingProps=w=E,(c.lanes&k)!==0)c.flags&131072&&(To=!0);else return f.lanes=c.lanes,Qa(c,f,k)}return X0(c,f,v,w,k)}function WC(c,f,v){var w=f.pendingProps,k=w.children,E=c!==null?c.memoizedState:null;if(w.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qt(yc,es),es|=v;else{if(!(v&1073741824))return c=E!==null?E.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:c,cachePool:null,transitions:null},f.updateQueue=null,Qt(yc,es),es|=c,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=E!==null?E.baseLanes:v,Qt(yc,es),es|=w}else E!==null?(w=E.baseLanes|v,f.memoizedState=null):w=v,Qt(yc,es),es|=w;return _o(c,f,k,v),f.child}function VC(c,f){var v=f.ref;(c===null&&v!==null||c!==null&&c.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function X0(c,f,v,w,k){var E=cr(v)?fn:Jt.current;return E=Fr(f,E),mc(f,k),v=H0(c,f,v,w,E,k),w=W0(),c!==null&&!To?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~k,Qa(c,f,k)):(dr&&w&&S0(f),f.flags|=1,_o(c,f,v,k),f.child)}function UC(c,f,v,w,k){if(cr(v)){var E=!0;ur(f)}else E=!1;if(mc(f,k),f.stateNode===null)cp(c,f),lC(f,v,w),T0(f,v,w,k),w=!0;else if(c===null){var L=f.stateNode,oe=f.memoizedProps;L.props=oe;var he=L.context,Fe=v.contextType;typeof Fe=="object"&&Fe!==null?Fe=ps(Fe):(Fe=cr(v)?fn:Jt.current,Fe=Fr(f,Fe));var xt=v.getDerivedStateFromProps,nn=typeof xt=="function"||typeof L.getSnapshotBeforeUpdate=="function";nn||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(oe!==w||he!==Fe)&&cC(f,L,w,Fe),Ei=!1;var ut=f.memoizedState;L.state=ut,Zf(f,w,L,k),he=f.memoizedState,oe!==w||ut!==he||vn.current||Ei?(typeof xt=="function"&&(D0(f,v,xt,w),he=f.memoizedState),(oe=Ei||iC(f,v,oe,w,ut,he,Fe))?(nn||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.component
`+(w.join(" > ")+`
No matching component was found for:
`)+c.join(" > ")}return null},n.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return q(c.child.stateNode);default:return c.child.stateNode}},n.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:LA,findFiberByHostInstance:c.findFiberByHostInstance||zA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)c=!0;else{try{ir=f.inject(c),Sn=f}catch{}c=!!f.checkDCE}}return c},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(c,f,v,w){if(!tt)throw Error(i(363));c=uv(c,f);var k=Ut(c,v,w).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(c,f){var v=f._getVersion;v=v(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,v]:c.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(c,f){var v=Re;try{return Re=c,f()}finally{Re=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(c,f,v,w){var k=f.current,E=ho(),L=Ai(k);return v=ww(v),f.context===null?f.context=v:f.pendingContext=v,f=Ka(E,L),f.payload={element:c},w=w===void 0?null:w,w!==null&&(f.callback=w),c=Mi(k,f,L),c!==null&&(gs(c,k,L,E),Jf(c,k,L)),L},n};XR.exports=n0e;var r0e=XR.exports;const o0e=pf(r0e);var YR={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;YR.exports=dc;var JR=YR.exports;const nI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let rI=!1,oI=!1;const q2=".react-konva-event",s0e=`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
`,a0e=`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 w0(e,t,n=i0e){if(!rI&&"zIndex"in t&&(console.warn(a0e),rI=!0),!oI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(s0e),oI=!0)}for(var s in n)if(!nI[s]){var i=s.slice(0,2)==="on",l=n[s]!==t[s];if(i&&l){var u=s.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),e.off(u,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var m=t._useStrictMode,h={},g=!1;const x={};for(var s in t)if(!nI[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){var u=s.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),t[s]&&(x[u]=t[s])}!i&&(t[s]!==n[s]||m&&t[s]!==e.getAttr(s))&&(g=!0,h[s]=t[s])}g&&(e.setAttrs(h),vl(e));for(var u in x)e.on(u+q2,x[u])}function vl(e){if(!u9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const ZR={},l0e={};df.Node.prototype._applyProps=w0;function c0e(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),vl(e)}function u0e(e,t,n){let r=df[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=df.Group);const o={},s={};for(var i in t){var l=i.slice(0,2)==="on";l?s[i]=t[i]:o[i]=t[i]}const u=new r(o);return w0(u,s),u}function d0e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function f0e(e,t,n){return!1}function p0e(e){return e}function m0e(){return null}function h0e(){return null}function g0e(e,t,n,r){return l0e}function v0e(){}function x0e(e){}function b0e(e,t){return!1}function y0e(){return ZR}function C0e(){return ZR}const w0e=setTimeout,S0e=clearTimeout,k0e=-1;function j0e(e,t){return!1}const _0e=!1,I0e=!0,P0e=!0;function E0e(e,t){t.parent===e?t.moveToTop():e.add(t),vl(e)}function M0e(e,t){t.parent===e?t.moveToTop():e.add(t),vl(e)}function eA(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),vl(e)}function O0e(e,t,n){eA(e,t,n)}function R0e(e,t){t.destroy(),t.off(q2),vl(e)}function A0e(e,t){t.destroy(),t.off(q2),vl(e)}function D0e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function T0e(e,t,n){}function N0e(e,t,n,r,o){w0(e,o,r)}function $0e(e){e.hide(),vl(e)}function L0e(e){}function z0e(e,t){(t.visible==null||t.visible)&&e.show()}function F0e(e,t){}function B0e(e){}function H0e(){}const W0e=()=>JR.DefaultEventPriority,V0e=Object.freeze(Object.defineProperty({__proto__:null,appendChild:E0e,appendChildToContainer:M0e,appendInitialChild:c0e,cancelTimeout:S0e,clearContainer:B0e,commitMount:T0e,commitTextUpdate:D0e,commitUpdate:N0e,createInstance:u0e,createTextInstance:d0e,detachDeletedInstance:H0e,finalizeInitialChildren:f0e,getChildHostContext:C0e,getCurrentEventPriority:W0e,getPublicInstance:p0e,getRootHostContext:y0e,hideInstance:$0e,hideTextInstance:L0e,idlePriority:xm.unstable_IdlePriority,insertBefore:eA,insertInContainerBefore:O0e,isPrimaryRenderer:_0e,noTimeout:k0e,now:xm.unstable_now,prepareForCommit:m0e,preparePortalMount:h0e,prepareUpdate:g0e,removeChild:R0e,removeChildFromContainer:A0e,resetAfterCommit:v0e,resetTextContent:x0e,run:xm.unstable_runWithPriority,scheduleTimeout:w0e,shouldDeprioritizeSubtree:b0e,shouldSetTextContent:j0e,supportsMutation:P0e,unhideInstance:z0e,unhideTextInstance:F0e,warnsIfNotActing:I0e},Symbol.toStringTag,{value:"Module"}));var U0e=Object.defineProperty,G0e=Object.defineProperties,q0e=Object.getOwnPropertyDescriptors,sI=Object.getOwnPropertySymbols,K0e=Object.prototype.hasOwnProperty,Q0e=Object.prototype.propertyIsEnumerable,aI=(e,t,n)=>t in e?U0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iI=(e,t)=>{for(var n in t||(t={}))K0e.call(t,n)&&aI(e,n,t[n]);if(sI)for(var n of sI(t))Q0e.cal
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),Pve=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=W(Ive),[i,l]=d.useState(null),[u,p]=d.useState(0),m=d.useRef(null),h=d.useCallback(()=>{p(u+1),setTimeout(h,500)},[u]);return d.useEffect(()=>{if(i)return;const g=new Image;g.onload=()=>{l(g)},g.src=uI(n)},[i,n]),d.useEffect(()=>{i&&(i.src=uI(n))},[i,n]),d.useEffect(()=>{const g=setInterval(()=>p(x=>(x+1)%5),50);return()=>clearInterval(g)},[]),!i||!kc(r.x)||!kc(r.y)||!kc(s)||!kc(o.width)||!kc(o.height)?null:a.jsx(za,{ref:m,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:kc(u)?u:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Eve=d.memo(Pve),Mve=ce([jr],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Tn}}),Ove=e=>{const{...t}=e,{objects:n}=W(Mve);return a.jsx(La,{listening:!1,...t,children:n.filter(S9).map((r,o)=>a.jsx(Zh,{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))})},Rve=d.memo(Ove);var Il=d,Ave=function(t,n,r){const o=Il.useRef("loading"),s=Il.useRef(),[i,l]=Il.useState(0),u=Il.useRef(),p=Il.useRef(),m=Il.useRef();return(u.current!==t||p.current!==n||m.current!==r)&&(o.current="loading",s.current=void 0,u.current=t,p.current=n,m.current=r),Il.useLayoutEffect(function(){if(!t)return;var h=document.createElement("img");function g(){o.current="loaded",s.current=h,l(Math.random())}function x(){o.current="failed",s.current=void 0,l(Math.random())}return h.addEventListener("load",g),h.addEventListener("error",x),n&&(h.crossOrigin=n),r&&(h.referrerPolicy=r),h.src=t,function(){h.removeEventListener("load",g),h.removeEventListener("error",x)}},[t,n,r]),[s.current,o.current]};const Dve=pf(Ave),Tve=({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:l}=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(nve,{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:l("common.imageFailedToLoad"),fill:i})]})},Nve=d.memo(Tve),$ve=e=>{const{x:t,y:n,imageName:r}=e.canvasImage,{currentData:o,isError:s}=Ps(r??Os.skipToken),[i,l]=Dve((o==null?void 0:o.image_url)??"",HI.get()?"use-credentials":"anonymous");return s||l==="failed"?a.jsx(Nve,{canvasImage:e.canvasImage}):a.jsx(oA,{x:t,y:n,image:i,listening:!1})},aA=d.memo($ve),Lve=ce([jr],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Tn}}),zve=()=>{const{objects:e}=W(Lve);return e?a.jsx(La,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(k9(t))return a.jsx(aA,{canvasImage:t},n);if(j9(t)){const r=a.jsx(Zh,{points:t.points,stroke:t.color?zl(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(_9(t))return a.jsx(za,{x:t.x,y:t.y,width:t.width,height:t.height,fill:zl(t.color)},n);if(I9(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},Fve=d.memo(zve),Bve=ce([jr],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:o,boundingBoxDimensions:s}=e,{selectedImageIndex:i,images:l,boundingBox:u}=t.stagingArea;return{currentStagingAreaImage:l.length>0&&i!==void 0?l[i]:void 0,isOnFirstImage:i===0,isOnLastImage:i===l.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:(u==null?void 0:u.x)??o.x,y:(u==null?void 0:u.y)??o.y,width:(u==null?void 0:u.width)??s.width,he
${s}
\`\`\``),n({title:"Error Copied"})},[e,n]),o=d.useMemo(()=>Q1e({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx($,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs($,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(xo,{children:"Something went wrong"}),a.jsx($,{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($,{sx:{gap:4},children:[a.jsx(Mt,{leftIcon:a.jsx(Woe,{}),onClick:t,children:"Reset UI"}),a.jsx(Mt,{leftIcon:a.jsx(Lu,{}),onClick:r,children:"Copy Error"}),a.jsx(vg,{href:o,isExternal:!0,children:a.jsx(Mt,{leftIcon:a.jsx(Vy,{}),children:"Create Issue"})})]})]})})},rxe=d.memo(nxe),oxe=ce([we],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:Tn}}),sxe=()=>{const e=te(),{shift:t,ctrl:n,meta:r}=W(oxe),{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:l,isDisabled:u,isLoading:p}=E8();return It(["ctrl+shift+enter","meta+shift+enter"],l,{enabled:()=>!u&&!p,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[l,u,p]),It("*",()=>{_m("shift")?!t&&e(Vo(!0)):t&&e(Vo(!1)),_m("ctrl")?!n&&e(mS(!0)):n&&e(mS(!1)),_m("meta")?!r&&e(hS(!0)):r&&e(hS(!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},axe=d.memo(sxe),ixe=e=>{const t=te(),{recallAllParameters:n}=l0(),r=oc(),{currentData:o}=Ps((e==null?void 0:e.imageName)??Os.skipToken),{currentData:s}=WI((e==null?void 0:e.imageName)??Os.skipToken),i=d.useCallback(()=>{o&&(t(GI(o)),t(ti("unifiedCanvas")),r({title:AI("toast.sentToUnifiedCanvas"),status:"info",duration:2500,isClosable:!0}))},[t,r,o]),l=d.useCallback(()=>{o&&t(rg(o))},[t,o]),u=d.useCallback(()=>{s&&n(s.metadata)},[s]);return d.useEffect(()=>{e&&e.action==="sendToCanvas"&&i()},[e,i]),d.useEffect(()=>{e&&e.action==="sendToImg2Img"&&l()},[e,l]),d.useEffect(()=>{e&&e.action==="useAllParameters"&&u()},[e,u]),{handleSendToCanvas:i,handleSendToImg2Img:l,handleUseAllMetadata:u}},lxe=e=>(ixe(e.selectedImage),null),cxe=d.memo(lxe),uxe={},dxe=({config:e=uxe,selectedImage:t})=>{const n=W(nO),r=G5("system"),o=te(),s=d.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);d.useEffect(()=>{on.changeLanguage(n)},[n]),d.useEffect(()=>{oP(e)&&(r.info({config:e},"Received config"),o(i$(e)))},[o,e,r]),d.useEffect(()=>{o(l$())},[o]);const i=Lg(c$);return a.jsxs(q1e,{onReset:s,FallbackComponent:rxe,children:[a.jsx(tl,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(PG,{children:a.jsxs(tl,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[i||a.jsx(rte,{}),a.jsx($,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(U1e,{})})]})})}),a.jsx(VZ,{}),a.jsx(FZ,{}),a.jsx(vU,{}),a.jsx(axe,{}),a.jsx(cxe,{selectedImage:t})]})},vxe=d.memo(dxe);export{vxe as default};