mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
172 lines
1004 KiB
JavaScript
172 lines
1004 KiB
JavaScript
|
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
|
||
|
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<r;p++){const h=t[p];h(d),i.has(h)&&(c.schedule(h),e())}o=!1,s&&(s=!1,c.process(d))}};return c}const Q$=40;let Y1=!0,Ud=!1,J1=!1;const eu={delta:0,timestamp:0},Cf=["read","update","preRender","render","postRender"],dg=Cf.reduce((e,t)=>(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.ass
|
||
|
`})}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
|
||
|
.`.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:
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EU(e){if(Array.isArray(e))return jb(e)}function fk(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 pk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fk(Object(n),!0).forEach(function(r){X3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jd(e,t){return RU(e)||OU(e,t)||Y3(e,t)||MU()}function MU(){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 Y3(e,t){if(e){if(typeof e=="string")return jb(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 jb(e,t)}}function jb(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 OU(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,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function RU(e){if(Array.isArray(e))return e}var AU="file-invalid-type",DU="file-too-large",TU="file-too-small",NU="too-many-files",$U=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:AU,message:"File type must be ".concat(n)}},hk=function(t){return{code:DU,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},mk=function(t){return{code:TU,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},LU={code:NU,message:"Too many files"};function J3(e,t){var n=e.type==="application/x-moz-file"||_U(e,t);return[n,n?null:$U(t)]}function Z3(e,t,n){if(El(e.size))if(El(t)&&El(n)){if(e.size>n)return[!1,hk(n)];if(e.size<t)return[!1,mk(t)]}else{if(El(t)&&e.size<t)return[!1,mk(t)];if(El(n)&&e.size>n)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;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(c){return!nm(r)&&c&&c.apply(void 0,[r].concat(s)),nm(r)})}}function WU(){return"showOpenFilePicker"in window}function VU(e){if(El(e)){var t=Object.entries(e).filter(function(n){var r=Jd(n,2),o=r[0],s=r[1],i=!0;return e6(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(t6))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Jd(r,2),s=o[0],i=o[1];return pk(pk({},n),{},X3({},s,i))},{});return[{description:"Files",accept:t}]}return e}function UU(e){if(El(e))return Object.entries(e).reduce(function(t,n){var r=Jd(n,2),o=r[0],s=r[1];return[].concat(dk(t),[o],dk(s))},[]).filter(function(t){return e6(t)||t6(t)}).join(",")}function GU(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function qU(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function e6(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function t6(e){return/^.*\.[\w]+$/.test(e)}var KU=["children"],QU=["open"],XU=["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 eG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tG(e){if(Array.isArray(e))return _b(e)}function Zv(e,t){return oG(e)||rG(e,t)||n6(e,t)||nG()}function nG(){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 n6(e,t){if(e){if(typeof e=="string")return _b(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 _b(e,t)}}function _b(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 rG(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,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function oG(e){if(Array.isArray(e))return e}function vk(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 wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(n),!0).forEach(function(r){Ib(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ib(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rm(e,t){if(e==null)return{};var n=sG(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 sG(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 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(func
|
||
|
`),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;t<e.length;t++)e[t]&&(n=f6(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function p6(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=f6(t))&&(r&&(r+=" "),r+=n);return r}const EG={app:100,modal:200,popover:300,overlay:400,max:9999};function Ay(e){return EG[e]}function MG(e,t){const n=l.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 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.c
|
||
|
* 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;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=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("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:re,serializeQueryArgs:ft,context:be}),Br=fn.buildInitiateQuery,cr=fn.buildInitiateMutation;return Yr(re.util,{getRunningOperationPromises:fn.getRunningOperationPromises,getRunningOperationPromise:fn.removalWarning,getRunningMutationThunk:fn.getRunningMutationThunk,getRunningMutationsThunk:fn.getRunningMutationsThunk,getRunningQueryThunk:fn.getRunningQueryThunk,getRunningQueriesThunk:fn.getRunningQueriesThunk}),{name:Ls,injectEndpoint:function(Dt,$n){var Wn,ur=re;(Wn=ur.endpoints)[Dt]!=null||(Wn[Dt]={}),q($n)?Yr(ur.endpoints[Dt],{name:Dt,select:Jt(Dt,$n),initiate:Br(Dt,$n)},sn(et,Dt)):$n.type===F.mutation&&Yr(ur.endpoints[Dt],{name:Dt,select:vn(),initiate:cr(Dt)},sn(Et,Dt))}}}}},ua=Ye(Ua())})(AO);RO.exports=AO;var Os=RO.exports;const Cne=e=>{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{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 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;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=Symbol.for("react.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=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"),I=Symbol.for("react.offscreen"),P=Symbol.iterator;function M(u){return u===null||typeof u!="object"?null:(u=P&&u[P]||u["@@iterator"],typeof u=="function"?u:null)}function R(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case h:return"Fragment";case p:return"Portal";case g:return"Profiler";case m:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case y:return(u.displayName||"Context")+".Consumer";case b:return(u._context.displayName||"Context")+".Provider";case x:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case j:return f=u.displayName||null,f!==null?f:R(u.type)||"Memo";case _:f=u._payload,u=u._init;try{return R(u(f))}catch{}}return null}function A(u){var f=u.type;switch(u.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 u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(f);case 8:return f===m?"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(u){var f=u,v=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,f.flags&4098&&(v=f.return),u=f.return;while(u)}return f.tag===3?v:null}function O(u){if(D(u)!==u)throw Error(i(188))}function T(u){var f=u.alternate;if(!f){if(f=D(u),f===null)throw Error(i(188));return f!==u?null:u}for(var v=u,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 O(k),u;if(E===w)return O(k),f;E=E.sibling}throw Error(i(188))}if(v.return!==w.return)v=k,w=E;else{for(var $=!1,ae=k.child;ae;){if(ae===v){$=!0,v=k,w=E;break}if(ae===w){$=!0,w=k,v=E;break}ae=ae.sibling}if(!$){for(ae=E.child;ae;){if(ae===v){$=!0,v=E,w=k;break}if(ae===w){$=!0,w=E,v=k;break}ae=ae.sibling}if(!$)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?u:f}function Y(u){return u=T(u),u!==null?z(u):null}function z(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=z(u);if(f!==null)return f;u=u.sibling}return null}function W(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var f=W(u);if(f!==null)return f}u=u.sibling}return null}var Q=Array.isArray,U=t.getPublicInstance,L=t.getRootHostContext,ee=t.getChildHostContext,K=t.prepareForCommit,Z=t.resetAfterCommit,se=t.createInstance,fe=t.appendInitialChild,G=t.finalizeInitialChildren,te=t.prepareUpdate,V=t.shouldSetTextContent,F=t.createTextInstance,X=t.scheduleTimeout,ue=t.cancelTimeout,q=t.noTimeout,ne=t.isPrimaryRenderer,pe=t.supportsMutation,le=t.supportsPersistence,we=t.supportsHydrat
|
||
|
`+Tt+u}var Zt=!1;function ln(u,f){if(!u||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(u,[],f)}else{try{f.call()}catch(Fe){w=Fe}u.call(f.prototype)}else{try{throw Error()}catch(Fe){w=Fe}u()}}catch(Fe){if(Fe&&w&&typeof Fe.stack=="string"){for(var k=Fe.stack.split(`
|
||
|
`),E=w.stack.split(`
|
||
|
`),$=k.length-1,ae=E.length-1;1<=$&&0<=ae&&k[$]!==E[ae];)ae--;for(;1<=$&&0<=ae;$--,ae--)if(k[$]!==E[ae]){if($!==1||ae!==1)do if($--,ae--,0>ae||k[$]!==E[ae]){var ge=`
|
||
|
`+k[$].replace(" at new "," at ");return u.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",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;0<f;)v=31-Kn(f),k=1<<v,w|=u[v],f&=~k;return w}function Nt(u,f){switch(u){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(u,f){for(var v=u.suspendedLanes,w=u.pingedLanes,k=u.expirationTimes,E=u.pendingLanes;0<E;){var $=31-Kn(E),ae=1<<$,ge=k[$];ge===-1?(!(ae&v)||ae&w)&&(k[$]=Nt(ae,f)):ge<=f&&(u.expiredLanes|=ae),E&=~ae}}function lt(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function St(){var u=Ln;return Ln<<=1,!(Ln&4194240)&&(Ln=64),u}function Gt(u){for(var f=[],v=0;31>v;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<v;){var k=31-Kn(v),E=1<<k;f[k]=0,w[k]=-1,u[k]=-1,v&=~E}}function Le(u,f){var v=u.entangledLanes|=f;for(u=u.entanglements;v;){var w=31-Kn(v),k=1<<w;k&f|u[w]&f&&(u[w]|=f),v&=~k}}var Ae=0;function ze(u){return u&=-u,1<u?4<u?u&268435455?16:536870912:4:1}var Ve=o.unstable_scheduleCallback,nt=o.unstable_cancelCallback,
|
||
|
Error generating stack: `+E.message+`
|
||
|
`+E.stack}return{value:u,source:f,stack:k,digest:null}}function J0(u,f,v){return{value:u,source:null,stack:v??null,digest:f??null}}function Z0(u,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var bA=typeof WeakMap=="function"?WeakMap:Map;function zC(u,f,v){v=Ka(-1,v),v.tag=3,v.payload={element:null};var w=f.value;return v.callback=function(){kp||(kp=!0,xv=w),Z0(u,f)},v}function FC(u,f,v){v=Ka(-1,v),v.tag=3;var w=u.type.getDerivedStateFromError;if(typeof w=="function"){var k=f.value;v.payload=function(){return w(k)},v.callback=function(){Z0(u,f)}}var E=u.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(v.callback=function(){Z0(u,f),typeof w!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var $=f.stack;this.componentDidCatch(f.value,{componentStack:$!==null?$:""})}),v}function BC(u,f,v){var w=u.pingCache;if(w===null){w=u.pingCache=new bA;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),u=RA.bind(null,u,f,v),f.then(u,u))}function HC(u){do{var f;if((f=u.tag===13)&&(f=u.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return u;u=u.return}while(u!==null);return null}function WC(u,f,v,w,k){return u.mode&1?(u.flags|=65536,u.lanes=k,u):(u===f?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Ka(-1,1),f.tag=2,Oi(v,f,1))),v.lanes|=1),u)}var xA=c.ReactCurrentOwner,To=!1;function _o(u,f,v,w){f.child=u===null?gC(f,null,v,w):hc(f,u.child,v,w)}function VC(u,f,v,w,k){v=v.render;var E=f.ref;return pc(f,k),w=G0(u,f,v,w,E,k),v=q0(),u!==null&&!To?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Qa(u,f,k)):(dr&&v&&I0(f),f.flags|=1,_o(u,f,w,k),f.child)}function UC(u,f,v,w,k){if(u===null){var E=v.type;return typeof E=="function"&&!jv(E)&&E.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=E,GC(u,f,E,w,k)):(u=Mp(v.type,null,w,f,f.mode,k),u.ref=f.ref,u.return=f,f.child=u)}if(E=u.child,!(u.lanes&k)){var $=E.memoizedProps;if(v=v.compare,v=v!==null?v:Jf,v($,w)&&u.ref===f.ref)return Qa(u,f,k)}return f.flags|=1,u=Ni(E,w),u.ref=f.ref,u.return=f,f.child=u}function GC(u,f,v,w,k){if(u!==null){var E=u.memoizedProps;if(Jf(E,w)&&u.ref===f.ref)if(To=!1,f.pendingProps=w=E,(u.lanes&k)!==0)u.flags&131072&&(To=!0);else return f.lanes=u.lanes,Qa(u,f,k)}return ev(u,f,v,w,k)}function qC(u,f,v){var w=f.pendingProps,k=w.children,E=u!==null?u.memoizedState:null;if(w.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qt(xc,es),es|=v;else{if(!(v&1073741824))return u=E!==null?E.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Qt(xc,es),es|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=E!==null?E.baseLanes:v,Qt(xc,es),es|=w}else E!==null?(w=E.baseLanes|v,f.memoizedState=null):w=v,Qt(xc,es),es|=w;return _o(u,f,k,v),f.child}function KC(u,f){var v=f.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function ev(u,f,v,w,k){var E=cr(v)?fn:Jt.current;return E=Br(f,E),pc(f,k),v=G0(u,f,v,w,E,k),w=q0(),u!==null&&!To?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Qa(u,f,k)):(dr&&w&&I0(f),f.flags|=1,_o(u,f,v,k),f.child)}function QC(u,f,v,w,k){if(cr(v)){var E=!0;ur(f)}else E=!1;if(pc(f,k),f.stateNode===null)fp(u,f),fC(f,v,w),z0(f,v,w,k),w=!0;else if(u===null){var $=f.stateNode,ae=f.memoizedProps;$.props=ae;var ge=$.context,Fe=v.contextType;typeof Fe=="object"&&Fe!==null?Fe=ps(Fe):(Fe=cr(v)?fn:Jt.current,Fe=Br(f,Fe));var xt=v.getDerivedStateFromProps,nn=typeof xt=="function"||typeof $.getSnapshotBeforeUpdate=="function";nn||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(ae!==w||ge!==Fe)&&pC(f,$,w,Fe),Mi=!1;var ct=f.memoizedState;$.state=ct,np(f,w,$,k),ge=f.memoizedState,ae!==w||ct!==ge||vn.current||Mi?(typeof xt=="function"&&(L0(f,v,xt,w),ge=f.memoizedState),(ae=Mi||dC(f,v,ae,w,ct,ge,Fe))?(nn||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.component
|
||
|
`+(w.join(" > ")+`
|
||
|
|
||
|
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.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),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,he
|
||
|
${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};
|