InvokeAI/invokeai/frontend/web/dist/assets/App-4a928bb6.js

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

170 lines
913 KiB
JavaScript
Raw Normal View History

2023-08-09 01:19:05 +00:00
import{t as Cv,r as dR,i as kv,a as Tc,b as P_,S as j_,c as I_,d as E_,e as _v,f as O_,g as Pv,h as fR,j as pR,k as hR,l as mR,m as R_,n as gR,o as vR,p as bR,q as M_,s as yR,u as xR,v as wR,w as SR,x as CR,y as kR,z as _R,A as f,B as i,C as cm,D as Lp,E as PR,F as D_,G as A_,H as jR,P as vd,I as X1,J as IR,K as ER,L as OR,M as RR,N as MR,O as DR,Q as AR,R as V2,T as TR,U as Ae,V as je,W as Ct,X as et,Y as bd,Z as mo,_ as Er,$ as Fr,a0 as qn,a1 as hl,a2 as ia,a3 as Ft,a4 as rs,a5 as nc,a6 as za,a7 as um,a8 as Y1,a9 as yd,aa as sr,ab as NR,ac as H,ad as U2,ae as $R,af as jv,ag as Nc,ah as LR,ai as T_,aj as N_,ak as $c,al as zR,am as be,an as Je,ao as Zt,ap as B,aq as BR,ar as G2,as as FR,at as HR,au as q2,av as te,aw as WR,ax as On,ay as Mn,az as Re,aA as W,aB as Ys,aC as lt,aD as Kn,aE as $_,aF as VR,aG as UR,aH as GR,aI as qR,aJ as _i,aK as Q1,aL as Ds,aM as jo,aN as dm,aO as KR,aP as XR,aQ as K2,aR as J1,aS as wa,aT as YR,aU as L_,aV as z_,aW as X2,aX as QR,aY as JR,aZ as B_,a_ as F_,a$ as Z1,b0 as ZR,b1 as e7,b2 as t7,b3 as Al,b4 as n7,b5 as r7,b6 as o7,b7 as s7,b8 as Y2,b9 as fi,ba as eb,bb as zp,bc as fm,bd as H_,be as W_,bf as Is,bg as V_,bh as a7,bi as Lc,bj as U_,bk as G_,bl as Es,bm as Iu,bn as Bp,bo as i7,bp as l7,bq as c7,br as u7,bs as Lf,bt as zf,bu as pu,bv as v0,bw as Lu,bx as zu,by as Bu,bz as Fu,bA as Q2,bB as Fp,bC as b0,bD as Hp,bE as J2,bF as Iv,bG as y0,bH as Ev,bI as x0,bJ as Wp,bK as Z2,bL as vc,bM as ew,bN as bc,bO as tw,bP as Vp,bQ as tb,bR as d7,bS as q_,bT as Ov,bU as Rv,bV as K_,bW as f7,bX as Mv,bY as p7,bZ as Dv,b_ as nb,b$ as rb,c0 as pm,c1 as h7,c2 as hm,c3 as Yl,c4 as X_,c5 as m7,c6 as jp,c7 as ob,c8 as Y_,c9 as g7,ca as hu,cb as Q_,cc as J_,cd as nw,ce as Ba,cf as v7,cg as Av,ch as b7,ci as y7,cj as x7,ck as w7,cl as sb,cm as ab,cn as S7,co as Bn,cp as rw,cq as Z_,cr as C7,cs as k7,ct as _7,cu as P7,cv as j7,cw as I7,cx as E7,cy as O7,cz as R7,cA as e5,cB as M7,cC as D7,cD as A7,cE as T7,cF as N7,cG as $7,cH as L7,cI as z7,cJ as B7,cK as F7,cL as ow,cM as H7,cN as sw,cO as W7,cP as V7,cQ as U7,cR as G7,cS as Qu,cT as oo,cU as xd,cV as wd,cW as q7,cX as Qn,cY as K7,cZ as na,c_ as ib,c$ as Sd,d0 as X7,d1 as Y7,d2 as Q7,d3 as aw,d4 as J7,d5 as Up,d6 as Z7,d7 as t5,d8 as iw,d9 as eM,da as tM,db as ws,dc as nM,dd as rM,de as n5,df as r5,dg as oM,dh as lw,di as sM,dj as aM,dk as iM,dl as mm,dm as lM,dn as o5,dp as cM,dq as uM,dr as s5,ds as dM,dt as fM,du as cw,dv as pM,dw as uw,dx as hM,dy as dw,dz as Bf,dA as mM,dB as lb,dC as a5,dD as gM,dE as vM,dF as bM,dG as ls,dH as yM,dI as xM,dJ as wM,dK as SM,dL as CM,dM as kM,dN as _M,dO as PM,dP as jM,dQ as IM,dR as EM,dS as OM,dT as RM,dU as MM,dV as DM,dW as fw,dX as pw,dY as AM,dZ as i5,d_ as l5,d$ as Cd,e0 as c5,e1 as Gi,e2 as u5,e3 as hw,e4 as TM,e5 as NM,e6 as d5,e7 as $M,e8 as LM,e9 as zM,ea as BM,eb as FM,ec as cb,ed as mw,ee as f5,ef as HM,eg as gw,eh as p5,ei as As,ej as WM,ek as h5,el as vw,em as VM,en as UM,eo as GM,ep as qM,eq as KM,er as XM,es as YM,et as QM,eu as JM,ev as ZM,ew as eD,ex as tD,ey as nD,ez as rD,eA as oD,eB as sD,eC as aD,eD as iD,eE as lD,eF as cD,eG as bw,eH as Ip,eI as uD,eJ as Gp,eK as m5,eL as Ju,eM as dD,eN as fD,eO as ea,eP as g5,eQ as ub,eR as kd,eS as pD,eT as hD,eU as mD,eV as Oa,eW as v5,eX as gD,eY as vD,eZ as b5,e_ as bD,e$ as yD,f0 as xD,f1 as wD,f2 as SD,f3 as CD,f4 as kD,f5 as _D,f6 as PD,f7 as jD,f8 as yw,f9 as ID,fa as ED,fb as OD,fc as RD,fd as MD,fe as DD,ff as AD,fg as TD,fh as w0,fi as Js,fj as S0,fk as C0,fl as Ff,fm as xw,fn as Tv,fo as ND,fp as $D,fq as LD,fr as zD,fs as qp,ft as y5,fu as x5,fv as BD,fw as FD,fx as w5,fy as S5,fz as C5,fA as k5,fB as _5,fC as P5,fD as j5,fE as I5,fF as rc,fG as oc,fH as E5,fI as O5,fJ as HD,fK as R5,fL as M5,fM as D5,fN as A5,fO as T5,fP as N5,fQ as db,fR as WD,fS as ww,fT as VD,fU as UD,fV as Kp,fW as Sw,fX as Cw,fY as kw,fZ as _w,f_ as GD,f$ as qD,g0 as KD,g1 as XD,g2 as YD,g3 as QD,g4 as JD,g5 as ZD,g6 as e9}from"./index-dd054634.js";import{u as t9,c as n9,a as Dn,b as or,I as fo,d as Fa,P as Zu,C as r9,e as ye,f as $5,g as Ha,h as o9,r as Ue,i as s9,j as P
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}z5.displayName="MiniMap";var W9=f.memo(z5),Ss;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ss||(Ss={}));function V9({color:e,dimensions:t,lineWidth:n}){return i.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function U9({color:e,radius:t}){return i.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const G9={[Ss.Dots]:"#91919a",[Ss.Lines]:"#eee",[Ss.Cross]:"#e2e2e2"},q9={[Ss.Dots]:1,[Ss.Lines]:1,[Ss.Cross]:6},K9=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function B5({id:e,variant:t=Ss.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:a,style:c,className:d}){const p=f.useRef(null),{transform:h,patternId:m}=Lp(K9,X1),v=a||G9[t],b=r||q9[t],w=t===Ss.Dots,y=t===Ss.Cross,S=Array.isArray(n)?n:[n,n],k=[S[0]*h[2]||1,S[1]*h[2]||1],_=b*h[2],P=y?[_,_]:k,I=w?[_/s,_/s]:[P[0]/s,P[1]/s];return i.jsxs("svg",{className:cm(["react-flow__background",d]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[i.jsx("pattern",{id:m+e,x:h[0]%k[0],y:h[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${I[0]},-${I[1]})`,children:w?i.jsx(U9,{color:v,radius:_/s}):i.jsx(V9,{dimensions:P,color:v,lineWidth:o})}),i.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}B5.displayName="Background";var X9=f.memo(B5),Hu;(function(e){e.Line="line",e.Handle="handle"})(Hu||(Hu={}));function Y9({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const a=e-t,c=n-r,d=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&o&&(d[0]=d[0]*-1),c&&s&&(d[1]=d[1]*-1),d}const F5={width:0,height:0,x:0,y:0},Q9={...F5,pointerX:0,pointerY:0,aspectRatio:1};function J9({nodeId:e,position:t,variant:n=Hu.Handle,className:r,style:o={},children:s,color:a,minWidth:c=10,minHeight:d=10,maxWidth:p=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:v,onResizeStart:b,onResize:w,onResizeEnd:y}){const S=MR(),k=typeof e=="string"?e:S,_=D_(),P=f.useRef(null),I=f.useRef(Q9),E=f.useRef(F5),O=DR(),R=n===Hu.Line?"right":"bottom-right",M=t??R;f.useEffect(()=>{if(!P.current||!k)return;const Q=A_(P.current),F=M.includes("right")||M.includes("left"),V=M.includes("bottom")||M.includes("top"),q=M.includes("left"),G=M.includes("top"),T=AR().on("start",z=>{const $=_.getState().nodeInternals.get(k),{xSnapped:Y,ySnapped:ae}=O(z);E.current={width:($==null?void 0:$.width)??0,height:($==null?void 0:$.height)??0,x:($==null?void 0:$.position.x)??0,y:($==null?void 0:$.position.y)??0},I.current={...E.current,pointerX:Y,pointerY:ae,aspectRatio:E.current.width/E.current.height},b==null||b(z,{...E.current})}).on("drag",z=>{const{nodeInternals:$,triggerNodeChanges:Y}=_.getState(),{xSnapped:ae,ySnapped:fe}=O(z),ie=$.get(k);if(ie){const X=[],{pointerX:K,pointerY:U,width:se,height:re,x:oe,y:pe,aspectRatio:le}=I.current,{x:ge,y:ke,width:xe,height:de}=E.current,Te=Math.floor(F?ae-K:0),Ee=Math.floor(V?fe-U:0);let $e=V2(se+(q?-Te:Te),c,p),kt=V2(re+(G?-Ee:Ee),d,h);if(m){const Me=$e/kt,Pt=F&&V,Tt=F&&!V,we=V&&!F;$e=Me<=le&&Pt||we?kt*le:$e,kt=Me>le&&Pt||Tt?$e/le:kt,$e>=p?($e=p,kt=p/le):$e<=c&&($e=c,kt=c/le),kt>=h?(kt=h,$e=h*le):kt<=d&&(kt=d,$e=d*le)}const ct=$e!==xe,on=kt!==de;if(q||G){const Me=q?oe-($e-se):oe,Pt=G?pe-(kt-re):pe,Tt=Me!==ge&&ct,we=Pt!==ke&&on;if(Tt||we){const ht={id:ie.id,type:"position",position:{x:Tt?Me:ge,y:we?Pt:ke}};X.push(ht),E.current.x=ht.position.x,E.current.y=ht.position.y}}if(ct||on){const Me={id:k,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:$e,height:kt}};X.push(Me),E.current.width=$e,E.current.height=kt}if(X.length===0)return;const vt=Y9({width:E.current.width,prevWidth:xe,height:E.current.height,prevHeight:de,invertX:q,invertY:G}),bt={...E.current,direction:vt};if((v==null?void 0:v(z,bt))===!1)return;w==null||w(z,bt),Y(X)}}).on("end",z=>{const $={id:k,type:"dimensions",resizing:!1};y==null||y(z,{...E.current}),_.getState().triggerNo
`})}function RA(e){bd({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Ou(e){const{isOpen:t,isDisabled:n}=hb(),{reduceMotion:r}=mb(),o=Ct("chakra-accordion__icon",e.className),s=vm(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return i.jsx(fo,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:a,...e,children:i.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Ou.displayName="AccordionIcon";var Ru=Ae(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...a}=jA(t),d={...vm().container,overflowAnchor:"none"},p=f.useMemo(()=>a,[a]);return i.jsx(wA,{value:p,children:i.jsx(je.div,{ref:n,...s,className:Ct("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r})})});Ru.displayName="AccordionItem";var qi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},mu={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function zv(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return mu.slideRight;case"left":return mu.slideLeft;case"bottom":return mu.slideDown;case"top":return mu.slideUp;default:return mu.slideRight}}var Xi={enter:{duration:.2,ease:qi.easeOut},exit:{duration:.1,ease:qi.easeIn}},Cs={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})},MA=e=>e!=null&&parseInt(e.toString(),10)>0,Tw={exit:{height:{duration:.2,ease:qi.ease},opacity:{duration:.3,ease:qi.ease}},enter:{height:{duration:.3,ease:qi.ease},opacity:{duration:.4,ease:qi.ease}}},DA={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:MA(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Cs.exit(Tw.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:Cs.enter(Tw.enter,o)}}},bm=f.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:a="auto",style:c,className:d,transition:p,transitionEnd:h,...m}=e,[v,b]=f.useState(!1);f.useEffect(()=>{const _=setTimeout(()=>{b(!0)});return()=>clearTimeout(_)},[]),bd({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const w=parseFloat(s.toString())>0,y={startingHeight:s,endingHeight:a,animateOpacity:o,transition:v?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:w?"block":"none"}}},S=r?n:!0,k=n||r?"enter":"exit";return i.jsx(mo,{initial:!1,custom:y,children:S&&i.jsx(Er.div,{ref:t,...m,className:Ct("chakra-collapse",d),style:{overflow:"hidden",display:"block",...c},custom:y,variants:DA,initial:r?"exit":!1,animate:k,exit:"exit"})})});bm.displayName="Collapse";var AA={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Cs.enter(Xi.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:Cs.exit(Xi.exit,n),transitionEnd:t==null?void 0:t.exi
2023-08-04 22:12:56 +00:00
.`.concat(gz,` {
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(a,`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(""),`
}
2023-08-09 01:19:05 +00:00
.`).concat(Op,` {
2023-08-04 22:12:56 +00:00
right: `).concat(c,"px ").concat(r,`;
}
2023-08-09 01:19:05 +00:00
.`).concat(Rp,` {
2023-08-04 22:12:56 +00:00
margin-right: `).concat(c,"px ").concat(r,`;
}
2023-08-09 01:19:05 +00:00
.`).concat(Op," .").concat(Op,` {
2023-08-04 22:12:56 +00:00
right: 0 `).concat(r,`;
}
2023-08-09 01:19:05 +00:00
.`).concat(Rp," .").concat(Rp,` {
2023-08-04 22:12:56 +00:00
margin-right: 0 `).concat(r,`;
}
body {
`).concat(vz,": ").concat(c,`px;
}
2023-08-09 01:19:05 +00:00
`)},Ez=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=f.useMemo(function(){return Pz(o)},[o]);return f.createElement(jz,{styles:Iz(s,!t,o,n?"":"!important")})},n1=!1;if(typeof window<"u")try{var Uf=Object.defineProperty({},"passive",{get:function(){return n1=!0,!0}});window.addEventListener("test",Uf,Uf),window.removeEventListener("test",Uf,Uf)}catch{n1=!1}var zl=n1?{passive:!1}:!1,Oz=function(e){return e.tagName==="TEXTAREA"},I6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Oz(e)&&n[t]==="visible")},Rz=function(e){return I6(e,"overflowY")},Mz=function(e){return I6(e,"overflowX")},dS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=E6(e,r);if(o){var s=O6(e,r),a=s[1],c=s[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Az=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},E6=function(e,t){return e==="v"?Rz(t):Mz(t)},O6=function(e,t){return e==="v"?Dz(t):Az(t)},Tz=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nz=function(e,t,n,r,o){var s=Tz(e,window.getComputedStyle(t).direction),a=s*r,c=n.target,d=t.contains(c),p=!1,h=a>0,m=0,v=0;do{var b=O6(e,c),w=b[0],y=b[1],S=b[2],k=y-S-s*w;(w||k)&&E6(e,c)&&(m+=k,v+=w),c=c.parentNode}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&a>m)||!h&&(o&&v===0||!o&&-a>v))&&(p=!0),p},Gf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fS=function(e){return[e.deltaX,e.deltaY]},pS=function(e){return e&&"current"in e?e.current:e},$z=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lz=function(e){return`
2023-08-04 22:12:56 +00:00
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
2023-08-09 01:19:05 +00:00
`)},zz=0,Bl=[];function Bz(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(zz++)[0],s=f.useState(j6)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=qv([e.lockRef.current],(e.shards||[]).map(pS),!0).filter(Boolean);return y.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=f.useCallback(function(y,S){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var k=Gf(y),_=n.current,P="deltaX"in y?y.deltaX:_[0]-k[0],I="deltaY"in y?y.deltaY:_[1]-k[1],E,O=y.target,R=Math.abs(P)>Math.abs(I)?"h":"v";if("touches"in y&&R==="h"&&O.type==="range")return!1;var M=dS(R,O);if(!M)return!0;if(M?E=R:(E=R==="v"?"h":"v",M=dS(R,O)),!M)return!1;if(!r.current&&"changedTouches"in y&&(P||I)&&(r.current=E),!E)return!0;var D=r.current||E;return Nz(D,S,y,D==="h"?P:I,!0)},[]),d=f.useCallback(function(y){var S=y;if(!(!Bl.length||Bl[Bl.length-1]!==s)){var k="deltaY"in S?fS(S):Gf(S),_=t.current.filter(function(E){return E.name===S.type&&E.target===S.target&&$z(E.delta,k)})[0];if(_&&_.should){S.cancelable&&S.preventDefault();return}if(!_){var P=(a.current.shards||[]).map(pS).filter(Boolean).filter(function(E){return E.contains(S.target)}),I=P.length>0?c(S,P[0]):!a.current.noIsolation;I&&S.cancelable&&S.preventDefault()}}},[]),p=f.useCallback(function(y,S,k,_){var P={name:y,delta:S,target:k,should:_};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(I){return I!==P})},1)},[]),h=f.useCallback(function(y){n.current=Gf(y),r.current=void 0},[]),m=f.useCallback(function(y){p(y.type,fS(y),y.target,c(y,e.lockRef.current))},[]),v=f.useCallback(function(y){p(y.type,Gf(y),y.target,c(y,e.lockRef.current))},[]);f.useEffect(function(){return Bl.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,zl),document.addEventListener("touchmove",d,zl),document.addEventListener("touchstart",h,zl),function(){Bl=Bl.filter(function(y){return y!==s}),document.removeEventListener("wheel",d,zl),document.removeEventListener("touchmove",d,zl),document.removeEventListener("touchstart",h,zl)}},[]);var b=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(s,{styles:Lz(o)}):null,b?f.createElement(Ez,{gapMode:e.gapMode}):null)}const Fz=LT(P6,Bz);var R6=f.forwardRef(function(e,t){return f.createElement(Sm,Qs({},e,{ref:t,sideCar:Fz}))});R6.classNames=Sm.classNames;const Hz=R6;function Wz(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:a,finalFocusRef:c,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=ll(),[v,b]=LR();f.useEffect(()=>{!v&&b&&setTimeout(b)},[v,b]);const w=k6(r,m);return i.jsx(J3,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:i.jsx(Hz,{removeScrollBar:!p,allowPinchZoom:a,enabled:w===1&&s,forwardProps:!0,children:e.children})})}var ld=Ae((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...a}=e,{getDialogProps:c,getDialogContainerProps:d}=ll(),p=c(a,t),h=d(o),m=Ct("chakra-modal__content",n),v=Wc(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:y}=ll();return i.jsx(Wz,{children:i.jsx(je.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:w,children:i.jsx(C6,{preset:y,motionProps:s,className:m,...p,__css:b,children:r})})})});ld.displayName="ModalContent";function Td(e){const{leastDestructiveRef:t,...n}=e;return i.jsx(id,{...n,initialFocusRef:t})}var Nd=Ae((e,t)=>i.jsx(ld,{ref:t,role:"alertdialog",...e})),Ma=Ae((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qF(e){if(Array.isArray(e))return l1(e)}function SS(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 CS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SS(Object(n),!0).forEach(function(r){aP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cd(e,t){return YF(e)||XF(e,t)||iP(e,t)||KF()}function KF(){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 iP(e,t){if(e){if(typeof e=="string")return l1(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 l1(e,t)}}function l1(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 XF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.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 YF(e){if(Array.isArray(e))return e}var QF="file-invalid-type",JF="file-too-large",ZF="file-too-small",eH="too-many-files",tH=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:QF,message:"File type must be ".concat(n)}},kS=function(t){return{code:JF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_S=function(t){return{code:ZF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nH={code:eH,message:"Too many files"};function lP(e,t){var n=e.type==="application/x-moz-file"||VF(e,t);return[n,n?null:tH(t)]}function cP(e,t,n){if(Vi(e.size))if(Vi(t)&&Vi(n)){if(e.size>n)return[!1,kS(n)];if(e.size<t)return[!1,_S(t)]}else{if(Vi(t)&&e.size<t)return[!1,_S(t)];if(Vi(n)&&e.size>n)return[!1,kS(n)]}return[!0,null]}function Vi(e){return e!=null}function rH(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,a=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&a>=1&&t.length>a?!1:t.every(function(d){var p=lP(d,n),h=cd(p,1),m=h[0],v=cP(d,r,o),b=cd(v,1),w=b[0],y=c?c(d):null;return m&&w&&!y})}function ah(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Kf(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 PS(e){e.preventDefault()}function oH(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function sH(e){return e.indexOf("Edge/")!==-1}function aH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oH(e)||sH(e)}function Gs(){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),a=1;a<o;a++)s[a-1]=arguments[a];return t.some(function(c){return!ah(r)&&c&&c.apply(void 0,[r].concat(s)),ah(r)})}}function iH(){return"showOpenFilePicker"in window}function lH(e){if(Vi(e)){var t=Object.entries(e).filter(function(n){var r=cd(n,2),o=r[0],s=r[1],a=!0;return uP(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.')),a=!1),(!Array.isArray(s)||!s.every(dP))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=cd(r,2),s=o[0],a=o[1];return CS(CS({},n),{},aP({},s,a))},{});return[{description:"Files",accept:t}]}return e}function cH(e){if(Vi(e))return Object.entries(e).reduce(function(t,n){var r=cd(n,2),o=r[0],s=r[1];return[].concat(wS(t),[o],wS(s))},[]).filter(function(t){return uP(t)||dP(t)}).join(",")}function uH(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function dH(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function uP(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function dP(e){return/^.*\.[\w]+$/.test(e)}var fH=["children"],pH=["open"],hH=["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 bH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yH(e){if(Array.isArray(e))return c1(e)}function W0(e,t){return SH(e)||wH(e,t)||fP(e,t)||xH()}function xH(){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 fP(e,t){if(e){if(typeof e=="string")return c1(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 c1(e,t)}}function c1(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 wH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.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 SH(e){if(Array.isArray(e))return e}function jS(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 fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jS(Object(n),!0).forEach(function(r){u1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ih(e,t){if(e==null)return{};var n=CH(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 CH(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 ty=f.forwardRef(function(e,t){var n=e.children,r=ih(e,fH),o=ny(r),s=o.open,a=ih(o,pH);return f.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(f.Fragment,null,n(fr(fr({},a),{},{open:s})))});ty.displayName="Dropzone";var pP={disabled:!1,getFilesFromEvent:TF,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};ty.defaultProps=pP;ty.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 d1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ny(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=fr(fr({},pP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,c=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,b=t.onDropAccepted,w=t.onDropRejected,y=t.onFileDialogCancel,S=t.onFileDialogOpen,k=t.useFsAccessApi,_=t.autoFocus,P=t.preventDropOnDocument,I=t.noClick,E=t.noKeyboard,O=t.noDrag,R=t.noDragEventsBubbling,M=t.onError,D=t.validator,A=f.useMemo(function(){return cH(n)},[n]),L=f.useMemo(function(){return lH(n)},[n]),Q=f.useMemo(function(){return typeof S=="function"?S:IS},[S]),F=f.useMemo(function(){return typeof y=="function"?y:IS},[y]),V=f.useRef(null),q=f.useRef(null),G=f.useReducer(kH,d1),T=W0(G,2),z=T[0],$=T[1],Y=z.isFocused,ae=z.isFileDialogActive,fe=f.useRef(typeof window<"u"&&window.isSecureContext&&k&&iH()),ie=function(){!fe.current&&ae&&setTimeout(function(){if(q.current){var Me=q.current.files;Me.length||($({type:"closeDialog"}),F())}},300)};f.useEffect(functi
`),status:"error"})},[a,s]),m=f.useCallback(async P=>{p({file:P,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,p]),v=f.useCallback((P,I)=>{if(I.length>1){s({title:a("toast.uploadFailed"),description:a("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(E=>{h(E)}),P.forEach(E=>{m(E)})},[a,s,m,h]),{getRootProps:b,getInputProps:w,isDragAccept:y,isDragReject:S,isDragActive:k,inputRef:_}=ny({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>d(!0),disabled:o,multiple:!1});return f.useEffect(()=>{const P=async I=>{var E,O;_.current&&(E=I.clipboardData)!=null&&E.files&&(_.current.files=I.clipboardData.files,(O=_.current)==null||O.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",P),()=>{document.removeEventListener("paste",P)}},[_]),i.jsxs(Re,{...b({style:{}}),onKeyDown:P=>{P.key},children:[i.jsx("input",{...w()}),t,i.jsx(mo,{children:k&&c&&i.jsx(Er.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:i.jsx(LH,{isDragAccept:y,isDragReject:S,setIsHandlingUpload:d})},"image-upload-overlay")})]})},FH=f.memo(BH),HH=Ae((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...a}={},isChecked:c,...d}=e;return i.jsx(vn,{label:r,placement:o,hasArrow:s,...a,children:i.jsx(yc,{ref:t,colorScheme:c?"accent":"base",...d,children:n})})}),Yt=f.memo(HH);function WH(e){const t=f.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=f.useContext(t);if(o===null)throw new Error(e);return o}]}function xP(e){return Array.isArray(e)?e:[e]}const VH=()=>{};function UH(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||VH:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function wP({data:e}){const t=[],n=[],r=e.reduce((o,s,a)=>(s.group?o[s.group]?o[s.group].push(a):o[s.group]=[a]:n.push(a),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function SP(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function CP(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=CP(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function kP(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=CP(t))&&(r&&(r+=" "),r+=n);return r}const GH={app:100,modal:200,popover:300,overlay:400,max:9999};function ry(e){return GH[e]}function qH(e,t){const n=f.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 KH=VR({key:"mantine",prepend:!0});function XH(){return $5()||KH}var YH=Object.defineProperty,OS=Object.getOwnPropertySymbols,QH=Object.prototype.hasOwnProperty,JH=Object.prototype.propertyIsEnumerable,RS=(e,t,n)=>t in e?YH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZH=(e,t)=>{for(var n in t||(t={}))QH.call(t,n)&&RS(e,n,t[n]);if(OS)for(var n of OS(t))JH.call(t,n)&&RS(e,n,t[n]);return e};const G0="ref";function eW(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(!(G0 in n))return{args:e,ref:t};t=n[G0];const r=ZH({},n);return delete r[G0],{args:[r],ref:t}}const{cssFactory:tW}=(()=>{function e(n,r,o){const s=[],a=qR(n,s,o);return s.length<2?o:a+r(s)}function t(n){const{cache:r}=n,o=(...a)=>{const{ref:c,args:d}=eW(a),p=UR(d,r.registered);return GR(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...a)=>e(r.registered,o,kP(a))}}return{cssFactory:t}})();function _P(){const e=XH();return qH(()=>tW({cache:e}),[e])}function nW({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const a=n.reduce((c,d)=>(Object.keys(d.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${d.classNames[p]}`:c[p]=`${c[p]} ${d.classNam
2023-08-04 22:12:56 +00:00
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
2023-08-09 01:19:05 +00:00
*/function _n(e,t){if(qm(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&_n(Object.keys(e),n=>t(e[n],n,e));return e}function no(e,t){const n=Ei(t);if(Ms(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?z4(e,s,t):t.reduce((a,c)=>(a[c]=z4(e,s,c),a),o)}return o}e&&_n(Ho(t),o=>SQ(e,o,t[o]))}const ys=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,a;const c=(h,m)=>{const v=s,b=h,w=m||(r?!r(v,b):v!==b);return(w||o)&&(s=b,a=v),[s,w,a]};return[t?h=>c(t(s,a),h):c,h=>[s,!!h,a]]},Ud=()=>typeof window<"u",uE=Ud()&&Node.ELEMENT_NODE,{toString:iQ,hasOwnProperty:tv}=Object.prototype,Ua=e=>e===void 0,Gm=e=>e===null,lQ=e=>Ua(e)||Gm(e)?`${e}`:iQ.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),gi=e=>typeof e=="number",Ei=e=>typeof e=="string",ky=e=>typeof e=="boolean",Rs=e=>typeof e=="function",Ms=e=>Array.isArray(e),fd=e=>typeof e=="object"&&!Ms(e)&&!Gm(e),qm=e=>{const t=!!e&&e.length,n=gi(t)&&t>-1&&t%1==0;return Ms(e)||!Rs(e)&&n?t>0&&fd(e)?t-1 in e:!0:!1},k1=e=>{if(!e||!fd(e)||lQ(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=tv.call(e,n),a=o&&tv.call(o,"isPrototypeOf");if(r&&!s&&!a)return!1;for(t in e);return Ua(t)||tv.call(e,t)},qh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===uE:!1},Km=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===uE:!1},_y=(e,t,n)=>e.indexOf(t,n),An=(e,t,n)=>(!n&&!Ei(t)&&qm(t)?Array.prototype.push.apply(e,t):e.push(t),e),ul=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{An(n,r)}):_n(e,r=>{An(n,r)}),n)},Py=e=>!!e&&e.length===0,ca=(e,t,n)=>{_n(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},Xm=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ho=e=>e?Object.keys(e):[],hr=(e,t,n,r,o,s,a)=>{const c=[t,n,r,o,s,a];return(typeof e!="object"||Gm(e))&&!Rs(e)&&(e={}),_n(c,d=>{_n(Ho(d),p=>{const h=d[p];if(e===h)return!0;const m=Ms(h);if(h&&(k1(h)||m)){const v=e[p];let b=v;m&&!Ms(v)?b=[]:!m&&!k1(v)&&(b={}),e[p]=hr(b,h)}else e[p]=h})}),e},jy=e=>{for(const t in e)return!1;return!0},dE=(e,t,n,r)=>{if(Ua(r))return n?n[e]:t;n&&(Ei(r)||gi(r))&&(n[e]=r)},to=(e,t,n)=>{if(Ua(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},So=(e,t)=>{e&&e.removeAttribute(t)},Zi=(e,t,n,r)=>{if(n){const o=to(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const a=ul(s).join(" ").trim();to(e,t,a)}},cQ=(e,t,n)=>{const r=to(e,t)||"";return new Set(r.split(" ")).has(n)},Ps=(e,t)=>dE("scrollLeft",0,e,t),ja=(e,t)=>dE("scrollTop",0,e,t),_1=Ud()&&Element.prototype,fE=(e,t)=>{const n=[],r=t?Km(t)?t:null:document;return r?An(n,r.querySelectorAll(e)):n},uQ=(e,t)=>{const n=t?Km(t)?t:null:document;return n?n.querySelector(e):null},Kh=(e,t)=>Km(e)?(_1.matches||_1.msMatchesSelector).call(e,t):!1,Iy=e=>e?ul(e.childNodes):[],$a=e=>e?e.parentElement:null,Jl=(e,t)=>{if(Km(e)){const n=_1.closest;if(n)return n.call(e,t);do{if(Kh(e,t))return e;e=$a(e)}while(e)}return null},dQ=(e,t,n)=>{const r=e&&Jl(e,t),o=e&&uQ(n,r),s=Jl(o,t)===r;return r&&o?r===e||o===e||s&&Jl(Jl(e,n),t)!==r:!1},Ey=(e,t,n)=>{if(n&&e){let r=t,o;qm(n)?(o=document.createDocumentFragment(),_n(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)}},ns=(e,t)=>{Ey(e,null,t)},fQ=(e,t)=>{Ey($a(e),e,t)},N4=(e,t)=>{Ey($a(e),e&&e.nextSibling,t)},sa=e=>{if(qm(e))_n(ul(e),t=>sa(t));else if(e){const t=$a(e);t&&t.removeChild(e)}},el=e=>{const t=document.createElement("div");return e&&to(t,"class",e),t},pE=e=>{const t=el();return t.innerHTML=e.trim(),_n(Iy(t),n=>sa(n))},P1=e=>e.charAt(0).toUpperCase()+e.slice(1),pQ=()=>el().style,hQ=["-webkit-","-moz-","-o-","-ms-"],mQ=["WebKit","Moz","O","MS","webkit","moz","o","ms"],nv={},rv={},gQ=e=>{let t=rv[e];if(Xm(rv,e))return t;const n=P1(e),r=pQ();return _n(hQ,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,P1(s)+n].find(c=>r[c]!==void 0))}),rv[e]=t||""},Gd=e=>{if(Ud()){let t=nv[e]||window[e];return Xm(nv,e)||(_n(mQ,n=>(t=t||window[n+P1(e)],!t)),nv[e]=t),t}},vQ=Gd("MutationObserver"),$4=Gd("IntersectionObserver"),Zl=Gd("ResizeObserver"),hE=Gd("cancelAnimationFrame"),m
2023-08-04 22:12:56 +00:00
Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
2023-08-09 01:19:05 +00:00
See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}}}({queryThunk:Xe,mutationThunk:jt,api:J,serializeQueryArgs:ut,context:he}),Or=sn.buildInitiateQuery,Jn=sn.buildInitiateMutation;return $r(J.util,{getRunningOperationPromises:sn.getRunningOperationPromises,getRunningOperationPromise:sn.removalWarning,getRunningMutationThunk:sn.getRunningMutationThunk,getRunningMutationsThunk:sn.getRunningMutationsThunk,getRunningQueryThunk:sn.getRunningQueryThunk,getRunningQueriesThunk:sn.getRunningQueriesThunk}),{name:fs,injectEndpoint:function(It,In){var Rn,Zn=J;(Rn=Zn.endpoints)[It]!=null||(Rn[It]={}),oe(In)?$r(Zn.endpoints[It],{name:It,select:Gt(It,In),initiate:Or(It,In)},en(Xe,It)):In.type===U.mutation&&$r(Zn.endpoints[It],{name:It,select:un(),initiate:Jn(It)},en(jt,It))}}}}},Ls=Ke(da())})(FE);BE.exports=FE;var ro=BE.exports;const IJ=e=>{const{boardToDelete:t,setBoardToDelete:n}=e,{t:r}=ye(),o=B(_=>_.config.canRestoreDeletedImagesFromBin),{currentData:s,isFetching:a}=n7((t==null?void 0:t.board_id)??ro.skipToken),c=f.useMemo(()=>be([lt],_=>{const P=(s??[]).map(E=>L_(_,E));return{imageUsageSummary:{isInitialImage:wa(P,E=>E.isInitialImage),isCanvasImage:wa(P,E=>E.isCanvasImage),isNodesImage:wa(P,E=>E.isNodesImage),isControlNetImage:wa(P,E=>E.isControlNetImage)}}}),[s]),[d,{isLoading:p}]=r7(),[h,{isLoading:m}]=o7(),{imageUsageSummary:v}=B(c),b=f.useCallback(()=>{t&&(d(t.board_id),n(void 0))},[t,d,n]),w=f.useCallback(()=>{t&&(h(t.board_id),n(void 0))},[t,h,n]),y=f.useCallback(()=>{n(void 0)},[n]),S=f.useRef(null),k=f.useMemo(()=>m||p||a,[m,p,a]);return t?i.jsx(Td,{isOpen:!!t,onClose:y,leastDestructiveRef:S,isCentered:!0,children:i.jsx(Aa,{children:i.jsxs(Nd,{children:[i.jsxs(Da,{fontSize:"lg",fontWeight:"bold",children:["Delete ",t.board_name]}),i.jsx(Ta,{children:i.jsxs(W,{direction:"column",gap:3,children:[a?i.jsx(Em,{children:i.jsx(W,{sx:{w:"full",h:32}})}):i.jsx(UI,{imageUsage:v,topMessage:"This board contains images used in the following features:",bottomMessage:"Deleting this board and its images will reset any features currently using them."}),i.jsx(Qe,{children:"Deleted boards cannot be restored."}),i.jsx(Qe,{children:r(o?"gallery.deleteImageBin":"gallery.deleteImagePermanent")})]})}),i.jsx(Ma,{children:i.jsxs(W,{sx:{justifyContent:"space-between",width:"full",gap:2},children:[i.jsx(Yt,{ref:S,onClick:y,children:"Cancel"}),i.jsx(Yt,{colorScheme:"warning",isLoading:k,onClick:b,children:"Delete Board Only"}),i.jsx(Yt,{colorScheme:"error",isLoading:k,onClick:w,children:"Delete Board and Images"})]})})]})})}):null},EJ=f.memo(IJ),HE=Ae((e,t)=>{const{role:n,tooltip:r="",tooltipProps:o,isChecked:s,...a}=e;return i.jsx(vn,{label:r,hasArrow:!0,...o,...o!=null&&o.placement?{placement:o.placement}:{placement:"top"},children:i.jsx(ka,{ref:t,role:n,colorScheme:s?"accent":"base",...a})})});HE.displayName="IAIIconButton";const ze=f.memo(HE),OJ="My Board",RJ=()=>{const[e,{isLoading:t}]=s7(),n=f.useCallback(()=>{e(OJ)},[e]);return i.jsx(ze,{icon:i.jsx(yl,{}),isLoading:t,tooltip:"Add Board","aria-label":"Add Board",onClick:n,size:"sm"})};var lk={path:i.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[i.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),i.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),i.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},WE=Ae((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:s=!1,children:a,className:c,__css:d,...p}=e,h=Ct("chakra-icon",c),m=ia("Icon",e),v={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...d,...m},b={ref:t,focusable:s,className:h,__css:v},w=r??lk.viewBox;if(n&&typeof n!="string")return i.jsx(je.svg,{as:n,...b,...p});const y=a??lk.path;return i.jsx(je.svg,{verticalAlign:"middle",viewBox:w,...b,...p,children:y})});WE.displayName="Icon";function qd(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=f.Chil
2023-08-04 22:12:56 +00:00
* @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.
2023-08-09 01:19:05 +00:00
*/var cle=function(t){var n={},r=f,o=Ip,s=Object.assign;function a(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+u+" 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"),v=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),w=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),E=Symbol.iterator;function O(l){return l===null||typeof l!="object"?null:(l=E&&l[E]||l["@@iterator"],typeof l=="function"?l:null)}function R(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case p:return"Portal";case v:return"Profiler";case m:return"StrictMode";case S:return"Suspense";case k:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case w:return(l.displayName||"Context")+".Consumer";case b:return(l._context.displayName||"Context")+".Provider";case y:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case _:return u=l.displayName||null,u!==null?u:R(l.type)||"Memo";case P:u=l._payload,l=l._init;try{return R(l(u))}catch{}}return null}function M(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(u);case 8:return u===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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function D(l){var u=l,g=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,u.flags&4098&&(g=u.return),l=u.return;while(l)}return u.tag===3?g:null}function A(l){if(D(l)!==l)throw Error(a(188))}function L(l){var u=l.alternate;if(!u){if(u=D(l),u===null)throw Error(a(188));return u!==l?null:l}for(var g=l,x=u;;){var C=g.return;if(C===null)break;var j=C.alternate;if(j===null){if(x=C.return,x!==null){g=x;continue}break}if(C.child===j.child){for(j=C.child;j;){if(j===g)return A(C),l;if(j===x)return A(C),u;j=j.sibling}throw Error(a(188))}if(g.return!==x.return)g=C,x=j;else{for(var N=!1,Z=C.child;Z;){if(Z===g){N=!0,g=C,x=j;break}if(Z===x){N=!0,x=C,g=j;break}Z=Z.sibling}if(!N){for(Z=j.child;Z;){if(Z===g){N=!0,g=j,x=C;break}if(Z===x){N=!0,x=j,g=C;break}Z=Z.sibling}if(!N)throw Error(a(189))}}if(g.alternate!==x)throw Error(a(190))}if(g.tag!==3)throw Error(a(188));return g.stateNode.current===g?l:u}function Q(l){return l=L(l),l!==null?F(l):null}function F(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var u=F(l);if(u!==null)return u;l=l.sibling}return null}function V(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var u=V(l);if(u!==null)return u}l=l.sibling}return null}var q=Array.isArray,G=t.getPublicInstance,T=t.getRootHostContext,z=t.getChildHostContext,$=t.prepareForCommit,Y=t.resetAfterCommit,ae=t.createInstance,fe=t.appendInitialChild,ie=t.finalizeInitialChildren,X=t.prepareUpdate,K=t.shouldSetTextContent,U=t.createTextInstance,se=t.scheduleTimeout,re=t.cancelTimeout,oe=t.noTimeout,pe=t.isPrimaryRenderer,le=t.supportsMutation,ge=t.supportsPersistence,ke=t.supportsHydration,xe=t.ge
2023-08-04 22:12:56 +00:00
`+Et+l}var qt=!1;function tn(l,u){if(!l||qt)return"";qt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Ne){var x=Ne}Reflect.construct(l,[],u)}else{try{u.call()}catch(Ne){x=Ne}l.call(u.prototype)}else{try{throw Error()}catch(Ne){x=Ne}l()}}catch(Ne){if(Ne&&x&&typeof Ne.stack=="string"){for(var C=Ne.stack.split(`
`),j=x.stack.split(`
`),N=C.length-1,Z=j.length-1;1<=N&&0<=Z&&C[N]!==j[Z];)Z--;for(;1<=N&&0<=Z;N--,Z--)if(C[N]!==j[Z]){if(N!==1||Z!==1)do if(N--,Z--,0>Z||C[N]!==j[Z]){var ue=`
2023-08-09 01:19:05 +00:00
`+C[N].replace(" at new "," at ");return l.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",l.displayName)),ue}while(1<=N&&0<=Z);break}}}finally{qt=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?Nt(l):""}var en=Object.prototype.hasOwnProperty,Ut=[],Be=-1;function yt(l){return{current:l}}function Mt(l){0>Be||(l.current=Ut[Be],Ut[Be]=null,Be--)}function Wt(l,u){Be++,Ut[Be]=l.current,l.current=u}var jn={},Gt=yt(jn),un=yt(!1),sn=jn;function Or(l,u){var g=l.type.contextTypes;if(!g)return jn;var x=l.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===u)return x.__reactInternalMemoizedMaskedChildContext;var C={},j;for(j in g)C[j]=u[j];return x&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=C),C}function Jn(l){return l=l.childContextTypes,l!=null}function It(){Mt(un),Mt(Gt)}function In(l,u,g){if(Gt.current!==jn)throw Error(a(168));Wt(Gt,u),Wt(un,g)}function Rn(l,u,g){var x=l.stateNode;if(u=u.childContextTypes,typeof x.getChildContext!="function")return g;x=x.getChildContext();for(var C in x)if(!(C in u))throw Error(a(108,M(l)||"Unknown",C));return s({},g,x)}function Zn(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||jn,sn=Gt.current,Wt(Gt,l),Wt(un,un.current),!0}function mr(l,u,g){var x=l.stateNode;if(!x)throw Error(a(169));g?(l=Rn(l,u,sn),x.__reactInternalMemoizedMergedChildContext=l,Mt(un),Mt(Gt),Wt(Gt,l)):Mt(un),Wt(un,g)}var Tn=Math.clz32?Math.clz32:Sn,Nn=Math.log,dn=Math.LN2;function Sn(l){return l>>>=0,l===0?32:31-(Nn(l)/dn|0)|0}var En=64,bn=4194304;function yn(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function qe(l,u){var g=l.pendingLanes;if(g===0)return 0;var x=0,C=l.suspendedLanes,j=l.pingedLanes,N=g&268435455;if(N!==0){var Z=N&~C;Z!==0?x=yn(Z):(j&=N,j!==0&&(x=yn(j)))}else N=g&~C,N!==0?x=yn(N):j!==0&&(x=yn(j));if(x===0)return 0;if(u!==0&&u!==x&&!(u&C)&&(C=x&-x,j=u&-u,C>=j||C===16&&(j&4194240)!==0))return u;if(x&4&&(x|=g&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=x;0<u;)g=31-Tn(u),C=1<<g,x|=l[g],u&=~C;return x}function Ot(l,u){switch(l){case 1:case 2:case 4:return u+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 u+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 St(l,u){for(var g=l.suspendedLanes,x=l.pingedLanes,C=l.expirationTimes,j=l.pendingLanes;0<j;){var N=31-Tn(j),Z=1<<N,ue=C[N];ue===-1?(!(Z&g)||Z&x)&&(C[N]=Ot(Z,u)):ue<=u&&(l.expiredLanes|=Z),j&=~Z}}function st(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function wt(){var l=En;return En<<=1,!(En&4194240)&&(En=64),l}function Bt(l){for(var u=[],g=0;31>g;g++)u.push(l);return u}function mt(l,u,g){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-Tn(u),l[u]=g}function rt(l,u){var g=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var x=l.eventTimes;for(l=l.expirationTimes;0<g;){var C=31-Tn(g),j=1<<C;u[C]=0,x[C]=-1,l[C]=-1,g&=~j}}function Oe(l,u){var g=l.entangledLanes|=u;for(l=l.entanglements;g;){var x=31-Tn(g),C=1<<x;C&u|l[x]&u&&(l[x]|=u),g&=~C}}var Ie=0;function De(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var We=o.unstable_scheduleCallback,Ze=o.unstable_cancelCallback,Dt=o.unsta
2023-08-04 22:12:56 +00:00
Error generating stack: `+j.message+`
2023-08-09 01:19:05 +00:00
`+j.stack}return{value:l,source:u,stack:C,digest:null}}function Fg(l,u,g){return{value:l,source:null,stack:g??null,digest:u??null}}function Hg(l,u){try{console.error(u.value)}catch(g){setTimeout(function(){throw g})}}var H8=typeof WeakMap=="function"?WeakMap:Map;function e2(l,u,g){g=ha(-1,g),g.tag=3,g.payload={element:null};var x=u.value;return g.callback=function(){Ef||(Ef=!0,l0=x),Hg(l,u)},g}function t2(l,u,g){g=ha(-1,g),g.tag=3;var x=l.type.getDerivedStateFromError;if(typeof x=="function"){var C=u.value;g.payload=function(){return x(C)},g.callback=function(){Hg(l,u)}}var j=l.stateNode;return j!==null&&typeof j.componentDidCatch=="function"&&(g.callback=function(){Hg(l,u),typeof x!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})}),g}function n2(l,u,g){var x=l.pingCache;if(x===null){x=l.pingCache=new H8;var C=new Set;x.set(u,C)}else C=x.get(u),C===void 0&&(C=new Set,x.set(u,C));C.has(g)||(C.add(g),l=nR.bind(null,l,u,g),u.then(l,l))}function r2(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function o2(l,u,g,x,C){return l.mode&1?(l.flags|=65536,l.lanes=C,l):(l===u?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(u=ha(-1,1),u.tag=2,Ka(g,u,1))),g.lanes|=1),l)}var W8=c.ReactCurrentOwner,bo=!1;function uo(l,u,g,x){u.child=l===null?Rx(u,null,g,x):jl(u,l.child,g,x)}function s2(l,u,g,x,C){g=g.render;var j=u.ref;return Pl(u,C),x=Tg(l,u,g,x,j,C),g=Ng(),l!==null&&!bo?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~C,ma(l,u,C)):(er&&g&&gg(u),u.flags|=1,uo(l,u,x,C),u.child)}function a2(l,u,g,x,C){if(l===null){var j=g.type;return typeof j=="function"&&!h0(j)&&j.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(u.tag=15,u.type=j,i2(l,u,j,x,C)):(l=Tf(g.type,null,x,u,u.mode,C),l.ref=u.ref,l.return=u,u.child=l)}if(j=l.child,!(l.lanes&C)){var N=j.memoizedProps;if(g=g.compare,g=g!==null?g:nf,g(N,x)&&l.ref===u.ref)return ma(l,u,C)}return u.flags|=1,l=Za(j,x),l.ref=u.ref,l.return=u,u.child=l}function i2(l,u,g,x,C){if(l!==null){var j=l.memoizedProps;if(nf(j,x)&&l.ref===u.ref)if(bo=!1,u.pendingProps=x=j,(l.lanes&C)!==0)l.flags&131072&&(bo=!0);else return u.lanes=l.lanes,ma(l,u,C)}return Wg(l,u,g,x,C)}function l2(l,u,g){var x=u.pendingProps,C=x.children,j=l!==null?l.memoizedState:null;if(x.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wt(Ml,$o),$o|=g;else{if(!(g&1073741824))return l=j!==null?j.baseLanes|g:g,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null,transitions:null},u.updateQueue=null,Wt(Ml,$o),$o|=l,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=j!==null?j.baseLanes:g,Wt(Ml,$o),$o|=x}else j!==null?(x=j.baseLanes|g,u.memoizedState=null):x=g,Wt(Ml,$o),$o|=x;return uo(l,u,C,g),u.child}function c2(l,u){var g=u.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(u.flags|=512,u.flags|=2097152)}function Wg(l,u,g,x,C){var j=Jn(g)?sn:Gt.current;return j=Or(u,j),Pl(u,C),g=Tg(l,u,g,x,j,C),x=Ng(),l!==null&&!bo?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~C,ma(l,u,C)):(er&&x&&gg(u),u.flags|=1,uo(l,u,g,C),u.child)}function u2(l,u,g,x,C){if(Jn(g)){var j=!0;Zn(u)}else j=!1;if(Pl(u,C),u.stateNode===null)vf(l,u),jx(u,g,x),Ig(u,g,x,C),x=!0;else if(l===null){var N=u.stateNode,Z=u.memoizedProps;N.props=Z;var ue=N.context,Ne=g.contextType;typeof Ne=="object"&&Ne!==null?Ne=Uo(Ne):(Ne=Jn(g)?sn:Gt.current,Ne=Or(u,Ne));var gt=g.getDerivedStateFromProps,Qt=typeof gt=="function"||typeof N.getSnapshotBeforeUpdate=="function";Qt||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Z!==x||ue!==Ne)&&Ix(u,N,x,Ne),qa=!1;var at=u.memoizedState;N.state=at,af(u,x,N,C),ue=u.memoizedState,Z!==x||at!==ue||un.current||qa?(typeof gt=="function"&&(jg(u,g,gt,x),ue=u.memoizedState),(Z=qa||Px(u,g,Z,x,at,ue,Ne))?(Qt||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMo
2023-08-04 22:12:56 +00:00
`+(x.join(" > ")+`
No matching component was found for:
2023-08-09 01:19:05 +00:00
`)+l.join(" > ")}return null},n.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return G(l.child.stateNode);default:return l.child.stateNode}},n.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:lR,findFiberByHostInstance:l.findFiberByHostInstance||cR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{Xn=u.inject(l),gn=u}catch{}l=!!u.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,u,g,x){if(!ct)throw Error(a(363));l=r0(l,u);var C=Tt(l,g,x).disconnect;return{disconnect:function(){C()}}},n.registerMutableSourceForHydration=function(l,u){var g=u._getVersion;g=g(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,g]:l.mutableSourceEagerHydrationData.push(u,g)},n.runWithPriority=function(l,u){var g=Ie;try{return Ie=l,u()}finally{Ie=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,u,g,x){var C=u.current,j=eo(),N=Qa(C);return g=F2(g),u.context===null?u.context=g:u.pendingContext=g,u=ha(j,N),u.payload={element:l},x=x===void 0?null:x,x!==null&&(u.callback=x),l=Ka(C,u,N),l!==null&&(Ko(l,C,N,j),sf(l,C,N)),N},n};m8.exports=cle;var ule=m8.exports;const dle=yd(ule);var g8={exports:{}},Cl={};/**
2023-08-04 22:12:56 +00:00
* @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.
*/Cl.ConcurrentRoot=1;Cl.ContinuousEventPriority=4;Cl.DefaultEventPriority=16;Cl.DiscreteEventPriority=1;Cl.IdleEventPriority=536870912;Cl.LegacyRoot=0;g8.exports=Cl;var v8=g8.exports;const h_={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let m_=!1,g_=!1;const fx=".react-konva-event",fle=`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
`,ple=`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
2023-08-09 01:19:05 +00:00
`,hle={};function mg(e,t,n=hle){if(!m_&&"zIndex"in t&&(console.warn(ple),m_=!0),!g_&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(fle),g_=!0)}for(var s in n)if(!h_[s]){var a=s.slice(0,2)==="on",c=n[s]!==t[s];if(a&&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={},v=!1;const b={};for(var s in t)if(!h_[s]){var a=s.slice(0,2)==="on",w=n[s]!==t[s];if(a&&w){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])}!a&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),Di(e));for(var d in b)e.on(d+fx,b[d])}function Di(e){if(!uD.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const b8={},mle={};gd.Node.prototype._applyProps=mg;function gle(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),Di(e)}function vle(e,t,n){let r=gd[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=gd.Group);const o={},s={};for(var a in t){var c=a.slice(0,2)==="on";c?s[a]=t[a]:o[a]=t[a]}const d=new r(o);return mg(d,s),d}function ble(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function yle(e,t,n){return!1}function xle(e){return e}function wle(){return null}function Sle(){return null}function Cle(e,t,n,r){return mle}function kle(){}function _le(e){}function Ple(e,t){return!1}function jle(){return b8}function Ile(){return b8}const Ele=setTimeout,Ole=clearTimeout,Rle=-1;function Mle(e,t){return!1}const Dle=!1,Ale=!0,Tle=!0;function Nle(e,t){t.parent===e?t.moveToTop():e.add(t),Di(e)}function $le(e,t){t.parent===e?t.moveToTop():e.add(t),Di(e)}function y8(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Di(e)}function Lle(e,t,n){y8(e,t,n)}function zle(e,t){t.destroy(),t.off(fx),Di(e)}function Ble(e,t){t.destroy(),t.off(fx),Di(e)}function Fle(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Hle(e,t,n){}function Wle(e,t,n,r,o){mg(e,o,r)}function Vle(e){e.hide(),Di(e)}function Ule(e){}function Gle(e,t){(t.visible==null||t.visible)&&e.show()}function qle(e,t){}function Kle(e){}function Xle(){}const Yle=()=>v8.DefaultEventPriority,Qle=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Nle,appendChildToContainer:$le,appendInitialChild:gle,cancelTimeout:Ole,clearContainer:Kle,commitMount:Hle,commitTextUpdate:Fle,commitUpdate:Wle,createInstance:vle,createTextInstance:ble,detachDeletedInstance:Xle,finalizeInitialChildren:yle,getChildHostContext:Ile,getCurrentEventPriority:Yle,getPublicInstance:xle,getRootHostContext:jle,hideInstance:Vle,hideTextInstance:Ule,idlePriority:Ip.unstable_IdlePriority,insertBefore:y8,insertInContainerBefore:Lle,isPrimaryRenderer:Dle,noTimeout:Rle,now:Ip.unstable_now,prepareForCommit:wle,preparePortalMount:Sle,prepareUpdate:Cle,removeChild:zle,removeChildFromContainer:Ble,resetAfterCommit:kle,resetTextContent:_le,run:Ip.unstable_runWithPriority,scheduleTimeout:Ele,shouldDeprioritizeSubtree:Ple,shouldSetTextContent:Mle,supportsMutation:Tle,unhideInstance:Gle,unhideTextInstance:qle,warnsIfNotActing:Ale},Symbol.toStringTag,{value:"Module"}));var Jle=Object.defineProperty,Zle=Object.defineProperties,ece=Object.getOwnPropertyDescriptors,v_=Object.getOwnPropertySymbols,tce=Object.prototype.hasOwnProperty,nce=Object.prototype.propertyIsEnumerable,b_=(e,t,n)=>t in e?Jle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y_=(e,t)=>{for(var n in t||(t={}))tce.call(t,n)&&b_(e,n,t[n]);if(v_)for(var n of v_(t))nce.cal
2023-08-04 22:12:56 +00:00
<!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>
2023-08-09 01:19:05 +00:00
</svg>`.replaceAll("black",e),Rce=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=B(Oce),[a,c]=f.useState(null),[d,p]=f.useState(0),h=f.useRef(null),m=f.useCallback(()=>{p(d+1),setTimeout(m,500)},[d]);return f.useEffect(()=>{if(a)return;const v=new Image;v.onload=()=>{c(v)},v.src=S_(n)},[a,n]),f.useEffect(()=>{a&&(a.src=S_(n))},[a,n]),f.useEffect(()=>{const v=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(v)},[]),!a||!Tl(r.x)||!Tl(r.y)||!Tl(s)||!Tl(o.width)||!Tl(o.height)?null:i.jsx(aa,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:a,fillPatternOffsetY:Tl(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Mce=be([mn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Zt}}),Dce=e=>{const{...t}=e,{objects:n}=B(Mce);return i.jsx(La,{listening:!1,...t,children:n.filter(CD).map((r,o)=>i.jsx(im,{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))})};var Wi=f,Ace=function(t,n,r){const o=Wi.useRef("loading"),s=Wi.useRef(),[a,c]=Wi.useState(0),d=Wi.useRef(),p=Wi.useRef(),h=Wi.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),Wi.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){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",v),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Tce=yd(Ace),_8=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:a,isError:c}=Is(s??ro.skipToken),[d]=Tce((a==null?void 0:a.image_url)??"",kD.get()?"use-credentials":"anonymous");return c?i.jsx(aa,{x:r,y:o,width:t,height:n,fill:"red"}):i.jsx(C8,{x:r,y:o,image:d,listening:!1})},Nce=be([mn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Zt}}),$ce=()=>{const{objects:e}=B(Nce);return e?i.jsx(La,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(B_(t))return i.jsx(_8,{canvasImage:t},n);if(_D(t)){const r=i.jsx(im,{points:t.points,stroke:t.color?rl(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?i.jsx(La,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(PD(t))return i.jsx(aa,{x:t.x,y:t.y,width:t.width,height:t.height,fill:rl(t.color)},n);if(jD(t))return i.jsx(aa,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Lce=be([mn],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:a,height:c}}=e,{selectedImageIndex:d,images:p}=t.stagingArea;return{currentStagingAreaImage:p.length>0&&d!==void 0?p[d]:void 0,isOnFirstImage:d===0,isOnLastImage:d===p.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:a,height:c}},{memoizeOptions:{resultEqualityCheck:Zt}}),zce=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:a,width:c,height:d}=B(Lce);return i.jsxs(La,{...t,children:[r&&n&&i.jsx(_8,{canvasImage:n}),o&&i.jsxs(La,{children:[i.jsx(aa,{x:s,y:a,width:c,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),i.jsx(aa,{x:s,y:a,width:c,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Bce=be([mn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n,sessionId:r}},shouldShowSta