mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
200 lines
855 KiB
JavaScript
200 lines
855 KiB
JavaScript
|
import{t as Sv,b as qI,r as KI,i as YI,a as XI,c as QI,d as Z4,e as J4,f as e3,g as ZI,h as JI,j as eO,k as tO,l as nO,m as rO,n as oO,o as sO,s as aO,p as iO,q as p,u as rt,v as a,I as go,w as ur,x as Un,y as Ve,z as Ot,A as Ou,B as bt,C as Ru,D as No,E as bo,F as Zr,G as xr,H as lO,J as L0,K as cO,L as ni,M as ou,N as el,O as sn,P as Ea,Q as ih,R as F0,S as zl,T as B0,U as fc,_ as rr,V as uO,W as L,X as t3,Y as n3,Z as xx,$ as r3,a0 as lh,a1 as H0,a2 as pc,a3 as dO,a4 as fO,a5 as pO,a6 as hO,a7 as o3,a8 as s3,a9 as ch,aa as $f,ab as mO,ac as gO,ad as fg,ae as Sx,af as a3,ag as i3,ah as tl,ai as wx,aj as Cx,ak as vO,al as yO,am as bO,an as xO,ao as SO,ap as pg,aq as vl,ar as hg,as as wO,at as CO,au as kO,av as W0,aw as uh,ax as Lf,ay as PO,az as l3,aA as c3,aB as _O,aC as Tu,aD as V0,aE as jO,aF as EO,aG as IO,aH as OO,aI as RO,aJ as TO,aK as MO,aL as kx,aM as Ge,aN as H,aO as ua,aP as Ce,aQ as xo,aR as Sr,aS as ne,aT as F,aU as Mu,aV as pe,aW as u3,aX as So,aY as st,aZ as d3,a_ as ui,a$ as U0,b0 as DO,b1 as AO,b2 as NO,b3 as yl,b4 as Ai,b5 as Ks,b6 as f3,b7 as p3,b8 as zO,b9 as $O,ba as Du,bb as Au,bc as Kl,bd as qn,be as Ff,bf as LO,bg as FO,bh as rn,bi as Ct,bj as dh,bk as ri,bl as Px,bm as G0,bn as BO,bo as HO,bp as Of,bq as je,br as Ld,bs as Fd,bt as su,bu as au,bv as _x,bw as Bf,bx as jx,by as Hf,bz as Ex,bA as wv,bB as Ix,bC as Cv,bD as Ox,bE as Wf,bF as Rx,bG as Yl,bH as Tx,bI as Xl,bJ as Mx,bK as Vf,bL as WO,bM as Uf,bN as q0,bO as fh,bP as K0,bQ as VO,bR as h3,bS as UO,bT as m3,bU as g3,bV as ph,bW as Ti,bX as kv,bY as GO,bZ as v3,b_ as qO,b$ as y3,c0 as ya,c1 as Dx,c2 as KO,c3 as Ax,c4 as YO,c5 as vt,c6 as Gf,c7 as XO,c8 as b3,c9 as hc,ca as Wt,cb as Hr,cc as or,cd as Pv,ce as Ys,cf as lr,cg as mr,ch as x3,ci as QO,cj as S3,ck as Nx,cl as ZO,cm as JO,cn as e8,co as t8,cp as n8,cq as r8,cr as Y0,cs as rs,ct as o8,cu as s8,cv as zx,cw as $x,cx as Lx,cy as Fx,cz as a8,cA as i8,cB as l8,cC as mu,cD as w3,cE as Bx,cF as c8,cG as u8,cH as d8,cI as f8,cJ as p8,cK as h8,cL as m8,cM as g8,cN as Pr,cO as C3,cP as v8,cQ as k3,cR as P3,cS as y8,cT as Hx,cU as b8,cV as x8,cW as S8,cX as w8,cY as C8,cZ as k8,c_ as P8,c$ as _8,d0 as j8,d1 as E8,d2 as I8,d3 as O8,d4 as R8,d5 as T8,d6 as M8,d7 as D8,d8 as A8,d9 as N8,da as z8,db as $8,dc as L8,dd as F8,de as Nu,df as _3,dg as Xs,dh as B8,di as j3,dj as H8,dk as W8,dl as V8,dm as U8,dn as G8,dp as q8,dq as K8,dr as E3,ds as Y8,dt as X8,du as os,dv as Q8,dw as Wx,dx as Vx,dy as oi,dz as Z8,dA as J8,dB as e7,dC as I3,dD as t7,dE as n7,dF as r7,dG as o7,dH as X0,dI as Q0,dJ as s7,dK as Ux,dL as a7,dM as Gx,dN as ss,dO as i7,dP as l7,dQ as qx,dR as Kx,dS as c7,dT as Yx,dU as u7,dV as d7,dW as f7,dX as p7,dY as h7,dZ as m7,d_ as O3,d$ as R3,e0 as T3,e1 as M3,e2 as D3,e3 as zu,e4 as Xx,e5 as A3,e6 as mg,e7 as g7,e8 as v7,e9 as ys,ea as y7,eb as b7,ec as N3,ed as z3,ee as x7,ef as Qx,eg as S7,eh as w7,ei as C7,ej as To,ek as qf,el as k7,em as Zx,en as $3,eo as P7,ep as Jx,eq as L3,er as hh,es as _s,et as _7,eu as F3,ev as j7,ew as _v,ex as jv,ey as E7,ez as I7,eA as O7,eB as R7,eC as T7,eD as e2,eE as M7,eF as D7,eG as A7,eH as N7,eI as z7,eJ as $7,eK as L7,eL as F7,eM as B7,eN as H7,eO as W7,eP as t2,eQ as V7,eR as n2,eS as Rf,eT as U7,eU as en,eV as Kf,eW as B3,eX as Yf,eY as G7,eZ as q7,e_ as qs,e$ as H3,f0 as Z0,f1 as $u,f2 as K7,f3 as Y7,f4 as X7,f5 as ba,f6 as W3,f7 as Q7,f8 as Z7,f9 as V3,fa as J7,fb as eR,fc as tR,fd as nR,fe as rR,ff as oR,fg as sR,fh as aR,fi as iR,fj as lR,fk as cR,fl as r2,fm as uR,fn as dR,fo as fR,fp as pR,fq as hR,fr as mR,fs as gg,ft as Gs,fu as Bd,fv as vg,fw as yg,fx as Hd,fy as o2,fz as Ev,fA as gR,fB as vR,fC as yR,fD as bR,fE as xR,fF as Xf,fG as U3,fH as G3,fI as SR,fJ as wR,fK as q3,fL as K3,fM as Y3,fN as X3,fO as Q3,fP as Z3,fQ as J3,fR as e5,fS as $l,fT as Ll,fU as t5,fV as n5,fW as CR,fX as r5,fY as o5,fZ as s5,f_ as a5,f$ as i5,g0 as l5,g1 as c5,g2 as J0,g3 as kR,g4 as PR,g5 as s2,g6 as _R,g7 as jR,g8 as Qf,g9 as a2,ga as i2,gb as l2,gc as c2,gd as ER,ge as IR,gf as OR,gg as RR,gh as TR,gi as MR,gj as DR,gk as AR,gl as NR,gm as zR}from"./
|
||
|
`})}function CT(e){Ru({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Zc(e){const{isOpen:t,isDisabled:n}=n1(),{reduceMotion:r}=r1(),o=Ot("chakra-accordion__icon",e.className),s=mh(),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(go,{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"})})}Zc.displayName="AccordionIcon";var Jc=rt(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=bT(t),d={...mh().container,overflowAnchor:"none"},f=p.useMemo(()=>i,[i]);return a.jsx(pT,{value:f,children:a.jsx(Ve.div,{ref:n,...s,className:Ot("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Jc.displayName="AccordionItem";var Mi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Fc={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 Ov(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return Fc.slideRight;case"left":return Fc.slideLeft;case"bottom":return Fc.slideDown;case"top":return Fc.slideUp;default:return Fc.slideRight}}var Ni={enter:{duration:.2,ease:Mi.easeOut},exit:{duration:.1,ease:Mi.easeIn}},bs={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})},kT=e=>e!=null&&parseInt(e.toString(),10)>0,v2={exit:{height:{duration:.2,ease:Mi.ease},opacity:{duration:.3,ease:Mi.ease}},enter:{height:{duration:.3,ease:Mi.ease},opacity:{duration:.4,ease:Mi.ease}}},PT={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:kT(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:bs.exit(v2.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:bs.enter(v2.enter,o)}}},gh=p.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:u,className:d,transition:f,transitionEnd:h,...m}=e,[v,y]=p.useState(!1);p.useEffect(()=>{const P=setTimeout(()=>{y(!0)});return()=>clearTimeout(P)},[]),Ru({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(s.toString())>0,w={startingHeight:s,endingHeight:i,animateOpacity:o,transition:v?f:{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:S?"block":"none"}}},C=r?n:!0,k=n||r?"enter":"exit";return a.jsx(No,{initial:!1,custom:w,children:C&&a.jsx(bo.div,{ref:t,...m,className:Ot("chakra-collapse",d),style:{overflow:"hidden",display:"block",...u},custom:w,variants:PT,initial:r?"exit":!1,animate:k,exit:"exit"})})});gh.displayName="Collapse";var _T={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:bs.enter(Ni.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:bs.exit(Ni.exit,n),transitionEnd:t==null?void 0:t.exi
|
||
|
.`.concat(j9,` {
|
||
|
overflow: hidden `).concat(r,`;
|
||
|
padding-right: `).concat(u,"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(u,"px ").concat(r,`;
|
||
|
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
|
}
|
||
|
|
||
|
.`).concat(Tf,` {
|
||
|
right: `).concat(u,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Mf,` {
|
||
|
margin-right: `).concat(u,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Tf," .").concat(Tf,` {
|
||
|
right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Mf," .").concat(Mf,` {
|
||
|
margin-right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
`).concat(E9,": ").concat(u,`px;
|
||
|
}
|
||
|
`)},F9=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=p.useMemo(function(){return z9(o)},[o]);return p.createElement($9,{styles:L9(s,!t,o,n?"":"!important")})},Hv=!1;if(typeof window<"u")try{var Ud=Object.defineProperty({},"passive",{get:function(){return Hv=!0,!0}});window.addEventListener("test",Ud,Ud),window.removeEventListener("test",Ud,Ud)}catch{Hv=!1}var wl=Hv?{passive:!1}:!1,B9=function(e){return e.tagName==="TEXTAREA"},O6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B9(e)&&n[t]==="visible")},H9=function(e){return O6(e,"overflowY")},W9=function(e){return O6(e,"overflowX")},D2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=R6(e,r);if(o){var s=T6(e,r),i=s[1],u=s[2];if(i>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},V9=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},U9=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},R6=function(e,t){return e==="v"?H9(t):W9(t)},T6=function(e,t){return e==="v"?V9(t):U9(t)},G9=function(e,t){return e==="h"&&t==="rtl"?-1:1},q9=function(e,t,n,r,o){var s=G9(e,window.getComputedStyle(t).direction),i=s*r,u=n.target,d=t.contains(u),f=!1,h=i>0,m=0,v=0;do{var y=T6(e,u),S=y[0],w=y[1],C=y[2],k=w-C-s*S;(S||k)&&R6(e,u)&&(m+=k,v+=S),u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&v===0||!o&&-i>v))&&(f=!0),f},Gd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},A2=function(e){return[e.deltaX,e.deltaY]},N2=function(e){return e&&"current"in e?e.current:e},K9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Y9=function(e){return`
|
||
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
|
`)},X9=0,Cl=[];function Q9(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(X9++)[0],s=p.useState(I6)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=Av([e.lockRef.current],(e.shards||[]).map(N2),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=p.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!i.current.allowPinchZoom;var k=Gd(w),P=n.current,j="deltaX"in w?w.deltaX:P[0]-k[0],E="deltaY"in w?w.deltaY:P[1]-k[1],O,I=w.target,R=Math.abs(j)>Math.abs(E)?"h":"v";if("touches"in w&&R==="h"&&I.type==="range")return!1;var T=D2(R,I);if(!T)return!0;if(T?O=R:(O=R==="v"?"h":"v",T=D2(R,I)),!T)return!1;if(!r.current&&"changedTouches"in w&&(j||E)&&(r.current=O),!O)return!0;var D=r.current||O;return q9(D,C,w,D==="h"?j:E,!0)},[]),d=p.useCallback(function(w){var C=w;if(!(!Cl.length||Cl[Cl.length-1]!==s)){var k="deltaY"in C?A2(C):Gd(C),P=t.current.filter(function(O){return O.name===C.type&&O.target===C.target&&K9(O.delta,k)})[0];if(P&&P.should){C.cancelable&&C.preventDefault();return}if(!P){var j=(i.current.shards||[]).map(N2).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=j.length>0?u(C,j[0]):!i.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),f=p.useCallback(function(w,C,k,P){var j={name:w,delta:C,target:k,should:P};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(E){return E!==j})},1)},[]),h=p.useCallback(function(w){n.current=Gd(w),r.current=void 0},[]),m=p.useCallback(function(w){f(w.type,A2(w),w.target,u(w,e.lockRef.current))},[]),v=p.useCallback(function(w){f(w.type,Gd(w),w.target,u(w,e.lockRef.current))},[]);p.useEffect(function(){return Cl.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,wl),document.addEventListener("touchmove",d,wl),document.addEventListener("touchstart",h,wl),function(){Cl=Cl.filter(function(w){return w!==s}),document.removeEventListener("wheel",d,wl),document.removeEventListener("touchmove",d,wl),document.removeEventListener("touchstart",h,wl)}},[]);var y=e.removeScrollBar,S=e.inert;return p.createElement(p.Fragment,null,S?p.createElement(s,{styles:Y9(o)}):null,y?p.createElement(F9,{gapMode:e.gapMode}):null)}const Z9=CM(E6,Q9);var M6=p.forwardRef(function(e,t){return p.createElement(wh,Vs({},e,{ref:t,sideCar:Z9}))});M6.classNames=wh.classNames;const J9=M6;function eA(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:u,returnFocusOnClose:d,preserveScrollBarGap:f,lockFocusAcrossFrames:h,isOpen:m}=Ui(),[v,y]=mO();p.useEffect(()=>{!v&&y&&setTimeout(y)},[v,y]);const S=_6(r,m);return a.jsx(f6,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:u,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(J9,{removeScrollBar:!f,allowPinchZoom:i,enabled:S===1&&s,forwardProps:!0,children:e.children})})}var xu=rt((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:u,getDialogContainerProps:d}=Ui(),f=u(i,t),h=d(o),m=Ot("chakra-modal__content",n),v=yc(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:w}=Ui();return a.jsx(eA,{children:a.jsx(Ve.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S,children:a.jsx(P6,{preset:w,motionProps:s,className:m,...f,__css:y,children:r})})})});xu.displayName="ModalContent";function Vu(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(bu,{...n,initialFocusRef:t})}var Uu=rt((e,t)=>a.jsx(xu,{ref:t,role:"alertdialog",...e})),Sa=rt((e,t)=>{const{className:
|
||
|
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fill:d,fillRule:"evenodd",stroke:f,strokeWidth:h,pointerEvents:"none"})]})})}K6.displayName="MiniMap";var oN=p.memo(K6),xs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xs||(xs={}));function sN({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 aN({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const iN={[xs.Dots]:"#91919a",[xs.Lines]:"#eee",[xs.Cross]:"#e2e2e2"},lN={[xs.Dots]:1,[xs.Lines]:1,[xs.Cross]:6},cN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Y6({id:e,variant:t=xs.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:u,className:d}){const f=p.useRef(null),{transform:h,patternId:m}=Lf(cN,V0),v=i||iN[t],y=r||lN[t],S=t===xs.Dots,w=t===xs.Cross,C=Array.isArray(n)?n:[n,n],k=[C[0]*h[2]||1,C[1]*h[2]||1],P=y*h[2],j=w?[P,P]:k,E=S?[P/s,P/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:uh(["react-flow__background",d]),style:{...u,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background",children:[a.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(-${E[0]},-${E[1]})`,children:S?a.jsx(aN,{color:v,radius:P/s}):a.jsx(sN,{dimensions:j,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}Y6.displayName="Background";var uN=p.memo(Y6),iu;(function(e){e.Line="line",e.Handle="handle"})(iu||(iu={}));function dN({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const i=e-t,u=n-r,d=[i>0?1:i<0?-1:0,u>0?1:u<0?-1:0];return i&&o&&(d[0]=d[0]*-1),u&&s&&(d[1]=d[1]*-1),d}const X6={width:0,height:0,x:0,y:0},fN={...X6,pointerX:0,pointerY:0,aspectRatio:1};function pN({nodeId:e,position:t,variant:n=iu.Handle,className:r,style:o={},children:s,color:i,minWidth:u=10,minHeight:d=10,maxWidth:f=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:v,onResizeStart:y,onResize:S,onResizeEnd:w}){const C=RO(),k=typeof e=="string"?e:C,P=l3(),j=p.useRef(null),E=p.useRef(fN),O=p.useRef(X6),I=TO(),R=n===iu.Line?"right":"bottom-right",T=t??R;p.useEffect(()=>{if(!j.current||!k)return;const J=c3(j.current),z=T.includes("right")||T.includes("left"),B=T.includes("bottom")||T.includes("top"),G=T.includes("left"),K=T.includes("top"),N=MO().on("start",V=>{const W=P.getState().nodeInternals.get(k),{xSnapped:U,ySnapped:re}=I(V);O.current={width:(W==null?void 0:W.width)??0,height:(W==null?void 0:W.height)??0,x:(W==null?void 0:W.position.x)??0,y:(W==null?void 0:W.position.y)??0},E.current={...O.current,pointerX:U,pointerY:re,aspectRatio:O.current.width/O.current.height},y==null||y(V,{...O.current})}).on("drag",V=>{const{nodeInternals:W,triggerNodeChanges:U}=P.getState(),{xSnapped:re,ySnapped:ve}=I(V),le=W.get(k);if(le){const se=[],{pointerX:Y,pointerY:ae,width:ue,height:xe,x:oe,y:ge,aspectRatio:fe}=E.current,{x:Pe,y:Ae,width:ye,height:Oe}=O.current,at=Math.floor(z?re-Y:0),Fe=Math.floor(B?ve-ae:0);let Ye=kx(ue+(G?-at:at),u,f),jt=kx(xe+(K?-Fe:Fe),d,h);if(m){const he=Ye/jt,Ne=z&&B,Xe=z&&!B,yt=B&&!z;Ye=he<=fe&&Ne||yt?jt*fe:Ye,jt=he>fe&&Ne||Xe?Ye/fe:jt,Ye>=f?(Ye=f,jt=f/fe):Ye<=u&&(Ye=u,jt=u/fe),jt>=h?(jt=h,Ye=h*fe):jt<=d&&(jt=d,Ye=d*fe)}const xt=Ye!==ye,Fn=jt!==Oe;if(G||K){const he=G?oe-(Ye-ue):oe,Ne=K?ge-(jt-xe):ge,Xe=he!==Pe&&xt,yt=Ne!==Ae&&Fn;if(Xe||yt){const Xt={id:le.id,type:"position",position:{x:Xe?he:Pe,y:yt?Ne:Ae}};se.push(Xt),O.current.x=Xt.position.x,O.current.y=Xt.position.y}}if(xt||Fn){const he={id:k,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Ye,height:jt}};se.push(he),O.current.width=Ye,O.current.height=jt}if(se.length===0)return;const X=dN({width:O.current.width,prevWidth:ye,height:O.current.height,prevHeight:Oe,invertX:G,invertY:K}),we={...O.current,direction:X};if((v==null?void 0:v(V,we))===!1)return;S==null||S(V,we),U(se)}}).on("end",V=>{const W={id:k,type:"dimensions",resizing:!1};w==null||w(V,{...O.current}),P.getState().trig
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ON(e){if(Array.isArray(e))return qv(e)}function H2(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 W2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H2(Object(n),!0).forEach(function(r){J6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wu(e,t){return MN(e)||TN(e,t)||ek(e,t)||RN()}function RN(){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 ek(e,t){if(e){if(typeof e=="string")return qv(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 qv(e,t)}}function qv(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 TN(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,u;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,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function MN(e){if(Array.isArray(e))return e}var DN="file-invalid-type",AN="file-too-large",NN="file-too-small",zN="too-many-files",$N=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:DN,message:"File type must be ".concat(n)}},V2=function(t){return{code:AN,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},U2=function(t){return{code:NN,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},LN={code:zN,message:"Too many files"};function tk(e,t){var n=e.type==="application/x-moz-file"||jN(e,t);return[n,n?null:$N(t)]}function nk(e,t,n){if(Oi(e.size))if(Oi(t)&&Oi(n)){if(e.size>n)return[!1,V2(n)];if(e.size<t)return[!1,U2(t)]}else{if(Oi(t)&&e.size<t)return[!1,U2(t)];if(Oi(n)&&e.size>n)return[!1,V2(n)]}return[!0,null]}function Oi(e){return e!=null}function FN(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var f=tk(d,n),h=wu(f,1),m=h[0],v=nk(d,r,o),y=wu(v,1),S=y[0],w=u?u(d):null;return m&&S&&!w})}function rp(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function qd(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 G2(e){e.preventDefault()}function BN(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function HN(e){return e.indexOf("Edge/")!==-1}function WN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return BN(e)||HN(e)}function Bs(){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(u){return!rp(r)&&u&&u.apply(void 0,[r].concat(s)),rp(r)})}}function VN(){return"showOpenFilePicker"in window}function UN(e){if(Oi(e)){var t=Object.entries(e).filter(function(n){var r=wu(n,2),o=r[0],s=r[1],i=!0;return rk(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(ok))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=wu(r,2),s=o[0],i=o[1];return W2(W2({},n),{},J6({},s,i))},{});return[{description:"Files",accept:t}]}return e}function GN(e){if(Oi(e))return Object.entries(e).reduce(function(t,n){var r=wu(n,2),o=r[0],s=r[1];return[].concat(B2(t),[o],B2(s))},[]).filter(function(t){return rk(t)||ok(t)}).join(",")}function qN(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function KN(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function rk(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ok(e){return/^.*\.[\w]+$/.test(e)}var YN=["children"],XN=["open"],QN=["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 tz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nz(e){if(Array.isArray(e))return Kv(e)}function Dg(e,t){return sz(e)||oz(e,t)||sk(e,t)||rz()}function rz(){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 sk(e,t){if(e){if(typeof e=="string")return Kv(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 Kv(e,t)}}function Kv(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 oz(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,u;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,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function sz(e){if(Array.isArray(e))return e}function q2(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 ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q2(Object(n),!0).forEach(function(r){Yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function op(e,t){if(e==null)return{};var n=az(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 az(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 j1=p.forwardRef(function(e,t){var n=e.children,r=op(e,YN),o=E1(r),s=o.open,i=op(o,XN);return p.useImperativeHandle(t,function(){return{open:s}},[s]),L.createElement(p.Fragment,null,n(ir(ir({},i),{},{open:s})))});j1.displayName="Dropzone";var ak={disabled:!1,getFilesFromEvent:yN,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};j1.defaultProps=ak;j1.propTypes={children:An.func,accept:An.objectOf(An.arrayOf(An.string)),multiple:An.bool,preventDropOnDocument:An.bool,noClick:An.bool,noKeyboard:An.bool,noDrag:An.bool,noDragEventsBubbling:An.bool,minSize:An.number,maxSize:An.number,maxFiles:An.number,disabled:An.bool,getFilesFromEvent:An.func,onFileDialogCancel:An.func,onFileDialogOpen:An.func,useFsAccessApi:An.bool,autoFocus:An.bool,onDragEnter:An.func,onDragLeave:An.func,onDragOver:An.func,onDrop:An.func,onDropAccepted:An.func,onDropRejected:An.func,onError:An.func,validator:An.func};var Xv={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function E1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ir(ir({},ak),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,u=t.multiple,d=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,y=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,C=t.onFileDialogOpen,k=t.useFsAccessApi,P=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,O=t.noKeyboard,I=t.noDrag,R=t.noDragEventsBubbling,T=t.onError,D=t.validator,$=p.useMemo(function(){return GN(n)},[n]),A=p.useMemo(function(){return UN(n)},[n]),J=p.useMemo(function(){return typeof C=="function"?C:K2},[C]),z=p.useMemo(function(){return typeof w=="function"?w:K2},[w]),B=p.useRef(null),G=p.useRef(null),K=p.useReducer(iz,Xv),N=Dg(K,2),V=N[0],W=N[1],U=V.isFocused,re=V.isFileDialogActive,ve=p.useRef(typeof window<"u"&&window.isSecureContext&&k&&VN()),le=function(){!ve.current&&re&&setTimeout(function(){if(G.current){var he=G.current.files;he.length||(W({type:"closeDialog"}),z())}},300)};p.useEffect(functi
|
||
|
`),status:"error"})},[i,s]),m=p.useCallback(async E=>{n(u3({file:E,image_category:"user",is_intermediate:!1,postUploadAction:{type:"TOAST_UPLOADED"}}))},[n]),v=p.useCallback((E,O)=>{if(O.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}O.forEach(I=>{h(I)}),E.forEach(I=>{m(I)})},[i,s,m,h]),{getRootProps:y,getInputProps:S,isDragAccept:w,isDragReject:C,isDragActive:k,inputRef:P,open:j}=E1({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>d(!0),disabled:r,multiple:!1});return p.useEffect(()=>{const E=async O=>{var I,R;P.current&&(I=O.clipboardData)!=null&&I.files&&(P.current.files=O.clipboardData.files,(R=P.current)==null||R.dispatchEvent(new Event("change",{bubbles:!0})))};return f(j),document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E),f(()=>{})}},[P,j,f]),a.jsxs(Ge,{...y({style:{}}),onKeyDown:E=>{E.key},children:[a.jsx("input",{...S()}),t,k&&u&&a.jsx(Sz,{isDragAccept:w,isDragReject:C,setIsHandlingUpload:d})]})},kz=p.memo(Cz),pk=e=>e.gallery;const Pz=e=>{const{triggerComponent:t,children:n,hasArrow:r=!0,isLazy:o=!0,...s}=e;return a.jsxs(w1,{isLazy:o,...s,children:[a.jsx(S1,{children:t}),a.jsxs(C1,{shadow:"dark-lg",children:[r&&a.jsx(D6,{}),n]})]})},fa=p.memo(Pz),Te=(e,t)=>n=>n==="light"?e:t,_z=e=>{const{label:t,...n}=e,{colorMode:r}=So();return a.jsx(x5,{colorScheme:"accent",...n,children:a.jsx(Ue,{sx:{fontSize:"sm",color:Te("base.800","base.200")(r)},children:t})})},In=p.memo(_z);function hk(e){return st({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function mk(e){return st({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function jz(e){return st({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0
|
||
|
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:He,mutationThunk:St,api:q,serializeQueryArgs:Qe,context:de}),Ir=Cn.buildInitiateQuery,Xn=Cn.buildInitiateMutation;return Er(q.util,{getRunningOperationPromises:Cn.getRunningOperationPromises,getRunningOperationPromise:Cn.removalWarning,getRunningMutationThunk:Cn.getRunningMutationThunk,getRunningMutationsThunk:Cn.getRunningMutationsThunk,getRunningQueryThunk:Cn.getRunningQueryThunk,getRunningQueriesThunk:Cn.getRunningQueriesThunk}),{name:na,injectEndpoint:function(wt,Sn){var _n,Qn=q;(_n=Qn.endpoints)[wt]!=null||(_n[wt]={}),oe(Sn)?Er(Qn.endpoints[wt],{name:wt,select:Vt(wt,Sn),initiate:Ir(wt,Sn)},Ft(He,wt)):Sn.type===ae.mutation&&Er(Qn.endpoints[wt],{name:wt,select:Qt(),initiate:Xn(wt)},Ft(St,wt))}}}}},cs=it(Aa())})(_k);Pk.exports=_k;var Do=Pk.exports;const m$=e=>{const{isOver:t,label:n="Drop"}=e,r=p.useRef(Ai()),{colorMode:o}=So();return a.jsx(bo.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsxs(H,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full"},children:[a.jsx(H,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",bg:Te("base.700","base.900")(o),opacity:.7,borderRadius:"base",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"0.1s"}}),a.jsx(H,{sx:{position:"absolute",top:0,insetInlineStart:0,w:"full",h:"full",opacity:1,borderWidth:3,borderColor:t?Te("base.50","base.200")(o):Te("base.100","base.500")(o),borderRadius:"base",borderStyle:"dashed",transitionProperty:"common",transitionDuration:"0.1s",alignItems:"center",justifyContent:"center"},children:a.jsx(Ue,{sx:{fontSize:"2xl",fontWeight:600,transform:t?"scale(1.02)":"scale(1)",color:t?Te("base.50","base.50")(o):Te("base.100","base.200")(o),transitionProperty:"common",transitionDuration:"0.1s"},children:n})})]})},r.current)},Zl=p.memo(m$),jk=p.memo(({board:e,isSelected:t})=>{const n=ne(),{currentData:r}=Ks(e.cover_image_name??Do.skipToken),{colorMode:o}=So(),{board_name:s,board_id:i}=e,{onClickDeleteBoardImages:u}=p.useContext(f3),d=p.useCallback(()=>{n(p3(i))},[i,n]),[f,{isLoading:h}]=zO(),[m,{isLoading:v}]=$O(),y=E=>{f({board_id:i,changes:{board_name:E}})},S=p.useCallback(()=>{m(i)},[i,m]),w=p.useCallback(()=>{console.log({board:e}),u(e)},[e,u]),C={id:i,actionType:"MOVE_BOARD",context:{boardId:i}},{isOver:k,setNodeRef:P,active:j}=Du({id:`board_droppable_${i}`,data:C});return a.jsx(Ge,{sx:{touchAction:"none",height:"full"},children:a.jsx(kk,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>a.jsxs(Wu,{sx:{visibility:"visible !important"},children:[e.image_count>0&&a.jsx(Yr,{sx:{color:"error.300"},icon:a.jsx(io,{}),onClickCapture:w,children:"Delete Board and Images"}),a.jsx(Yr,{sx:{color:Te("error.700","error.300")(o)},icon:a.jsx(io,{}),onClickCapture:S,children:"Delete Board"})]}),children:E=>a.jsxs(H,{userSelect:"none",ref:E,sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full"},children:[a.jsxs(H,{ref:P,onClick:d,sx:{position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",w:"full",aspectRatio:"1/1",overflow:"hidden",shadow:t?"selected.light":void 0,_dark:{shadow:t?"selected.dark":void 0},flexShrink:0},children:[e.cover_image_name&&(r==null?void 0:r.image_url)&&a.jsx(Au,{src:r==null?void 0:r.image_url,draggable:!1}),!(e.cover_image_name&&(r!=null&&r.image_url))&&a.jsx(xc,{boxSize:8,icon:lu,sx:{border:"2px solid var(--invokeai-colors-base-200)",_dark:{border:"2px solid var(--invokeai-colors-base-800)"}}}),a.jsx(H,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Ql,{variant:"solid",children:e.image_count})}),a.jsx(No,{children:Kl(C,j)&&a.jsx(Zl,{isOver:k})})]}),a.jsx(H,{sx:{width:"full",height:"full",justifyContent:"center",alignItems:"center"},children:a.jsxs(E5,{defaultValue:s,submitOnBlur:!1,onSubmit:O=>{y(O)},children:[a.jsx(P5,{sx:{color:t?Te("base.900","base.50")(o):Te("base.700","base.200")(o),fontW
|
||
|
* OverlayScrollbars
|
||
|
* Version: 2.2.0
|
||
|
*
|
||
|
* Copyright (c) Rene Haas | KingSora.
|
||
|
* https://github.com/KingSora
|
||
|
*
|
||
|
* Released under the MIT license.
|
||
|
*/function bn(e,t){if(Nh(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&bn(Object.keys(e),n=>t(e[n],n,e));return e}function Qr(e,t){const n=di(t);if(Is(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?eS(e,s,t):t.reduce((i,u)=>(i[u]=eS(e,s,u),i),o)}return o}e&&bn(Ao(t),o=>R$(e,o,t[o]))}const gs=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const u=(h,m)=>{const v=s,y=h,S=m||(r?!r(v,y):v!==y);return(S||o)&&(s=y,i=v),[s,S,i]};return[t?h=>u(t(s,i),h):u,h=>[s,!!h,i]]},Xu=()=>typeof window<"u",Ek=Xu()&&Node.ELEMENT_NODE,{toString:g$,hasOwnProperty:zg}=Object.prototype,Ta=e=>e===void 0,Ah=e=>e===null,v$=e=>Ta(e)||Ah(e)?`${e}`:g$.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),si=e=>typeof e=="number",di=e=>typeof e=="string",z1=e=>typeof e=="boolean",Es=e=>typeof e=="function",Is=e=>Array.isArray(e),Cu=e=>typeof e=="object"&&!Is(e)&&!Ah(e),Nh=e=>{const t=!!e&&e.length,n=si(t)&&t>-1&&t%1==0;return Is(e)||!Es(e)&&n?t>0&&Cu(e)?t-1 in e:!0:!1},Zv=e=>{if(!e||!Cu(e)||v$(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=zg.call(e,n),i=o&&zg.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return Ta(t)||zg.call(e,t)},ap=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===Ek:!1},zh=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===Ek:!1},$1=(e,t,n)=>e.indexOf(t,n),On=(e,t,n)=>(!n&&!di(t)&&Nh(t)?Array.prototype.push.apply(e,t):e.push(t),e),Gi=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{On(n,r)}):bn(e,r=>{On(n,r)}),n)},L1=e=>!!e&&e.length===0,ea=(e,t,n)=>{bn(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},$h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ao=e=>e?Object.keys(e):[],cr=(e,t,n,r,o,s,i)=>{const u=[t,n,r,o,s,i];return(typeof e!="object"||Ah(e))&&!Es(e)&&(e={}),bn(u,d=>{bn(Ao(d),f=>{const h=d[f];if(e===h)return!0;const m=Is(h);if(h&&(Zv(h)||m)){const v=e[f];let y=v;m&&!Is(v)?y=[]:!m&&!Zv(v)&&(y={}),e[f]=cr(y,h)}else e[f]=h})}),e},F1=e=>{for(const t in e)return!1;return!0},Ik=(e,t,n,r)=>{if(Ta(r))return n?n[e]:t;n&&(di(r)||si(r))&&(n[e]=r)},Xr=(e,t,n)=>{if(Ta(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},po=(e,t)=>{e&&e.removeAttribute(t)},$i=(e,t,n,r)=>{if(n){const o=Xr(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Gi(s).join(" ").trim();Xr(e,t,i)}},y$=(e,t,n)=>{const r=Xr(e,t)||"";return new Set(r.split(" ")).has(n)},Ss=(e,t)=>Ik("scrollLeft",0,e,t),pa=(e,t)=>Ik("scrollTop",0,e,t),Jv=Xu()&&Element.prototype,Ok=(e,t)=>{const n=[],r=t?zh(t)?t:null:document;return r?On(n,r.querySelectorAll(e)):n},b$=(e,t)=>{const n=t?zh(t)?t:null:document;return n?n.querySelector(e):null},ip=(e,t)=>zh(e)?(Jv.matches||Jv.msMatchesSelector).call(e,t):!1,B1=e=>e?Gi(e.childNodes):[],Pa=e=>e?e.parentElement:null,Tl=(e,t)=>{if(zh(e)){const n=Jv.closest;if(n)return n.call(e,t);do{if(ip(e,t))return e;e=Pa(e)}while(e)}return null},x$=(e,t,n)=>{const r=e&&Tl(e,t),o=e&&b$(n,r),s=Tl(o,t)===r;return r&&o?r===e||o===e||s&&Tl(Tl(e,n),t)!==r:!1},H1=(e,t,n)=>{if(n&&e){let r=t,o;Nh(n)?(o=document.createDocumentFragment(),bn(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)}},Jo=(e,t)=>{H1(e,null,t)},S$=(e,t)=>{H1(Pa(e),e,t)},Q2=(e,t)=>{H1(Pa(e),e&&e.nextSibling,t)},Qs=e=>{if(Nh(e))bn(Gi(e),t=>Qs(t));else if(e){const t=Pa(e);t&&t.removeChild(e)}},Li=e=>{const t=document.createElement("div");return e&&Xr(t,"class",e),t},Rk=e=>{const t=Li();return t.innerHTML=e.trim(),bn(B1(t),n=>Qs(n))},e0=e=>e.charAt(0).toUpperCase()+e.slice(1),w$=()=>Li().style,C$=["-webkit-","-moz-","-o-","-ms-"],k$=["WebKit","Moz","O","MS","webkit","moz","o","ms"],$g={},Lg={},P$=e=>{let t=Lg[e];if($h(Lg,e))return t;const n=e0(e),r=w$();return bn(C$,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,e0(s)+n].find(u=>r[u]!==void 0))}),Lg[e]=t||""},Qu=e=>{if(Xu()){let t=$g[e]||window[e];return $h($g,e)||(bn(k$,n=>(t=t||window[n+e0(e)],!t)),$g[e]=t),t}},_$=Qu("MutationObserver"),Z2=Qu("IntersectionObserver"),Ml=Qu("ResizeObserver"),Tk=Qu("cancelAnimationFrame"),M
|
||
|
position: relative;
|
||
|
width: -moz-fit-content;
|
||
|
width: fit-content;
|
||
|
height: -moz-fit-content;
|
||
|
height: fit-content;
|
||
|
overflow: hidden;
|
||
|
-webkit-touch-callout: none; /* iOS Safari */
|
||
|
-webkit-user-select: none; /* Safari */
|
||
|
-khtml-user-select: none; /* Konqueror HTML */
|
||
|
-moz-user-select: none; /* Firefox */
|
||
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||
|
user-select: none;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
}
|
||
|
.transform-component-module_content__FBWxo {
|
||
|
display: flex;
|
||
|
flex-wrap: wrap;
|
||
|
width: -moz-fit-content;
|
||
|
width: fit-content;
|
||
|
height: -moz-fit-content;
|
||
|
height: fit-content;
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
transform-origin: 0% 0%;
|
||
|
}
|
||
|
.transform-component-module_content__FBWxo img {
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
`,UC={wrapper:"transform-component-module_wrapper__SPB86",content:"transform-component-module_content__FBWxo"};iX(lX);var cX=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,o=e.contentClass,s=o===void 0?"":o,i=e.wrapperStyle,u=e.contentStyle,d=e.wrapperProps,f=d===void 0?{}:d,h=e.contentProps,m=h===void 0?{}:h,v=p.useContext(tm).init,y=p.useRef(null),S=p.useRef(null);return p.useEffect(function(){var w=y.current,C=S.current;w!==null&&C!==null&&v&&v(w,C)},[]),L.createElement("div",ii({},f,{ref:y,className:"react-transform-wrapper ".concat(UC.wrapper," ").concat(r),style:i}),L.createElement("div",ii({},m,{ref:S,className:"react-transform-component ".concat(UC.content," ").concat(s),style:u}),t))},oE=function(){var e=p.useContext(tm);if(!e)throw new Error("Transform context must be placed inside TransformWrapper");return e};const GC=1.5,yy="28rem",uX=()=>{const[e,t]=p.useState(0),[n,r]=p.useState(1),[o,s]=p.useState(1);return{rotation:e,scaleX:n,scaleY:o,flipHorizontally:()=>{r(n*-1)},flipVertically:()=>{s(o*-1)},rotateCounterClockwise:()=>{t(e===-270?0:e-90)},rotateClockwise:()=>{t(e===270?0:e+90)},reset:()=>{t(0),r(1),s(1)}}};function dX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"}},{tag:"path",attr:{d:"M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z"}}]})(e)}function fX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}}]})(e)}function pX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}}]})(e)}function qC(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function hX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"}}]})(e)}function mX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function gX(e){return st({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7
|
||
|
* @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 bre=function(t){var n={},r=p,o=Rf,s=Object.assign;function i(l){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)c+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=Symbol.for("react.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),S=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),O=Symbol.iterator;function I(l){return l===null||typeof l!="object"?null:(l=O&&l[O]||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 f:return"Portal";case v:return"Profiler";case m:return"StrictMode";case C:return"Suspense";case k:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case S:return(l.displayName||"Context")+".Consumer";case y:return(l._context.displayName||"Context")+".Provider";case w:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case P:return c=l.displayName||null,c!==null?c:R(l.type)||"Memo";case j:c=l._payload,l=l._init;try{return R(l(c))}catch{}}return null}function T(l){var c=l.type;switch(l.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=c.render,l=l.displayName||l.name||"",c.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(c);case 8:return c===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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function D(l){var c=l,g=l;if(l.alternate)for(;c.return;)c=c.return;else{l=c;do c=l,c.flags&4098&&(g=c.return),l=c.return;while(l)}return c.tag===3?g:null}function $(l){if(D(l)!==l)throw Error(i(188))}function A(l){var c=l.alternate;if(!c){if(c=D(l),c===null)throw Error(i(188));return c!==l?null:l}for(var g=l,b=c;;){var x=g.return;if(x===null)break;var _=x.alternate;if(_===null){if(b=x.return,b!==null){g=b;continue}break}if(x.child===_.child){for(_=x.child;_;){if(_===g)return $(x),l;if(_===b)return $(x),c;_=_.sibling}throw Error(i(188))}if(g.return!==b.return)g=x,b=_;else{for(var M=!1,Q=x.child;Q;){if(Q===g){M=!0,g=x,b=_;break}if(Q===b){M=!0,b=x,g=_;break}Q=Q.sibling}if(!M){for(Q=_.child;Q;){if(Q===g){M=!0,g=_,b=x;break}if(Q===b){M=!0,b=_,g=x;break}Q=Q.sibling}if(!M)throw Error(i(189))}}if(g.alternate!==b)throw Error(i(190))}if(g.tag!==3)throw Error(i(188));return g.stateNode.current===g?l:c}function J(l){return l=A(l),l!==null?z(l):null}function z(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var c=z(l);if(c!==null)return c;l=l.sibling}return null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var c=B(l);if(c!==null)return c}l=l.sibling}return null}var G=Array.isArray,K=t.getPublicInstance,N=t.getRootHostContext,V=t.getChildHostContext,W=t.prepareForCommit,U=t.resetAfterCommit,re=t.createInstance,ve=t.appendInitialChild,le=t.finalizeInitialChildren,se=t.prepareUpdate,Y=t.shouldSetTextContent,ae=t.createTextInstance,ue=t.scheduleTimeout,xe=t.cancelTimeout,oe=t.noTimeout,ge=t.isPrimaryRenderer,fe=t.supportsMutation,Pe=t.supportsPersistence,Ae=t.supportsHydration,ye=t.
|
||
|
`+kt+l}var Lt=!1;function Ut(l,c){if(!l||Lt)return"";Lt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(De){var b=De}Reflect.construct(l,[],c)}else{try{c.call()}catch(De){b=De}l.call(c.prototype)}else{try{throw Error()}catch(De){b=De}l()}}catch(De){if(De&&b&&typeof De.stack=="string"){for(var x=De.stack.split(`
|
||
|
`),_=b.stack.split(`
|
||
|
`),M=x.length-1,Q=_.length-1;1<=M&&0<=Q&&x[M]!==_[Q];)Q--;for(;1<=M&&0<=Q;M--,Q--)if(x[M]!==_[Q]){if(M!==1||Q!==1)do if(M--,Q--,0>Q||x[M]!==_[Q]){var ce=`
|
||
|
`+x[M].replace(" at new "," at ");return l.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",l.displayName)),ce}while(1<=M&&0<=Q);break}}}finally{Lt=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?Rt(l):""}var Ft=Object.prototype.hasOwnProperty,Ee=[],ht=-1;function Tt(l){return{current:l}}function Mt(l){0>ht||(l.current=Ee[ht],Ee[ht]=null,ht--)}function $t(l,c){ht++,Ee[ht]=l.current,l.current=c}var fn={},Vt=Tt(fn),Qt=Tt(!1),Cn=fn;function Ir(l,c){var g=l.type.contextTypes;if(!g)return fn;var b=l.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===c)return b.__reactInternalMemoizedMaskedChildContext;var x={},_;for(_ in g)x[_]=c[_];return b&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=x),x}function Xn(l){return l=l.childContextTypes,l!=null}function wt(){Mt(Qt),Mt(Vt)}function Sn(l,c,g){if(Vt.current!==fn)throw Error(i(168));$t(Vt,c),$t(Qt,g)}function _n(l,c,g){var b=l.stateNode;if(c=c.childContextTypes,typeof b.getChildContext!="function")return g;b=b.getChildContext();for(var x in b)if(!(x in c))throw Error(i(108,T(l)||"Unknown",x));return s({},g,b)}function Qn(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||fn,Cn=Vt.current,$t(Vt,l),$t(Qt,Qt.current),!0}function dr(l,c,g){var b=l.stateNode;if(!b)throw Error(i(169));g?(l=_n(l,c,Cn),b.__reactInternalMemoizedMergedChildContext=l,Mt(Qt),Mt(Vt),$t(Vt,l)):Mt(Qt),$t(Qt,g)}var Rn=Math.clz32?Math.clz32:gn,Tn=Math.log,tn=Math.LN2;function gn(l){return l>>>=0,l===0?32:31-(Tn(l)/tn|0)|0}var wn=64,pn=4194304;function hn(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 We(l,c){var g=l.pendingLanes;if(g===0)return 0;var b=0,x=l.suspendedLanes,_=l.pingedLanes,M=g&268435455;if(M!==0){var Q=M&~x;Q!==0?b=hn(Q):(_&=M,_!==0&&(b=hn(_)))}else M=g&~x,M!==0?b=hn(M):_!==0&&(b=hn(_));if(b===0)return 0;if(c!==0&&c!==b&&!(c&x)&&(x=b&-b,_=c&-c,x>=_||x===16&&(_&4194240)!==0))return c;if(b&4&&(b|=g&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=b;0<c;)g=31-Rn(c),x=1<<g,b|=l[g],c&=~x;return b}function Pt(l,c){switch(l){case 1:case 2:case 4:return c+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 c+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 gt(l,c){for(var g=l.suspendedLanes,b=l.pingedLanes,x=l.expirationTimes,_=l.pendingLanes;0<_;){var M=31-Rn(_),Q=1<<M,ce=x[M];ce===-1?(!(Q&g)||Q&b)&&(x[M]=Pt(Q,c)):ce<=c&&(l.expiredLanes|=Q),_&=~Q}}function tt(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function mt(){var l=wn;return wn<<=1,!(wn&4194240)&&(wn=64),l}function Dt(l){for(var c=[],g=0;31>g;g++)c.push(l);return c}function dt(l,c,g){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-Rn(c),l[c]=g}function Je(l,c){var g=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var b=l.eventTimes;for(l=l.expirationTimes;0<g;){var x=31-Rn(g),_=1<<x;c[x]=0,b[x]=-1,l[x]=-1,g&=~_}}function Ie(l,c){var g=l.entangledLanes|=c;for(l=l.entanglements;g;){var b=31-Rn(g),x=1<<b;x&c|l[b]&c&&(l[b]|=c),g&=~x}}var _e=0;function Me(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var ze=o.unstable_scheduleCallback,Ze=o.unstable_cancelCallback,Et=o.unsta
|
||
|
Error generating stack: `+_.message+`
|
||
|
`+_.stack}return{value:l,source:c,stack:x,digest:null}}function Nm(l,c,g){return{value:l,source:null,stack:g??null,digest:c??null}}function zm(l,c){try{console.error(c.value)}catch(g){setTimeout(function(){throw g})}}var kI=typeof WeakMap=="function"?WeakMap:Map;function Ob(l,c,g){g=sa(-1,g),g.tag=3,g.payload={element:null};var b=c.value;return g.callback=function(){Od||(Od=!0,rg=b),zm(l,c)},g}function Rb(l,c,g){g=sa(-1,g),g.tag=3;var b=l.type.getDerivedStateFromError;if(typeof b=="function"){var x=c.value;g.payload=function(){return b(x)},g.callback=function(){zm(l,c)}}var _=l.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(g.callback=function(){zm(l,c),typeof b!="function"&&(La===null?La=new Set([this]):La.add(this));var M=c.stack;this.componentDidCatch(c.value,{componentStack:M!==null?M:""})}),g}function Tb(l,c,g){var b=l.pingCache;if(b===null){b=l.pingCache=new kI;var x=new Set;b.set(c,x)}else x=b.get(c),x===void 0&&(x=new Set,b.set(c,x));x.has(g)||(x.add(g),l=$I.bind(null,l,c,g),c.then(l,l))}function Mb(l){do{var c;if((c=l.tag===13)&&(c=l.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return l;l=l.return}while(l!==null);return null}function Db(l,c,g,b,x){return l.mode&1?(l.flags|=65536,l.lanes=x,l):(l===c?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(c=sa(-1,1),c.tag=2,$a(g,c,1))),g.lanes|=1),l)}var PI=u.ReactCurrentOwner,lo=!1;function oo(l,c,g,b){c.child=l===null?ib(c,null,g,b):ul(c,l.child,g,b)}function Ab(l,c,g,b,x){g=g.render;var _=c.ref;return cl(c,x),b=Om(l,c,g,b,_,x),g=Rm(),l!==null&&!lo?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,aa(l,c,x)):(Zn&&g&&dm(c),c.flags|=1,oo(l,c,b,x),c.child)}function Nb(l,c,g,b,x){if(l===null){var _=g.type;return typeof _=="function"&&!cg(_)&&_.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(c.tag=15,c.type=_,zb(l,c,_,b,x)):(l=Nd(g.type,null,b,c,c.mode,x),l.ref=c.ref,l.return=c,c.child=l)}if(_=l.child,!(l.lanes&x)){var M=_.memoizedProps;if(g=g.compare,g=g!==null?g:od,g(M,b)&&l.ref===c.ref)return aa(l,c,x)}return c.flags|=1,l=Wa(_,b),l.ref=c.ref,l.return=c,c.child=l}function zb(l,c,g,b,x){if(l!==null){var _=l.memoizedProps;if(od(_,b)&&l.ref===c.ref)if(lo=!1,c.pendingProps=b=_,(l.lanes&x)!==0)l.flags&131072&&(lo=!0);else return c.lanes=l.lanes,aa(l,c,x)}return $m(l,c,g,b,x)}function $b(l,c,g){var b=c.pendingProps,x=b.children,_=l!==null?l.memoizedState:null;if(b.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},$t(ml,Eo),Eo|=g;else{if(!(g&1073741824))return l=_!==null?_.baseLanes|g:g,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null,transitions:null},c.updateQueue=null,$t(ml,Eo),Eo|=l,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=_!==null?_.baseLanes:g,$t(ml,Eo),Eo|=b}else _!==null?(b=_.baseLanes|g,c.memoizedState=null):b=g,$t(ml,Eo),Eo|=b;return oo(l,c,x,g),c.child}function Lb(l,c){var g=c.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(c.flags|=512,c.flags|=2097152)}function $m(l,c,g,b,x){var _=Xn(g)?Cn:Vt.current;return _=Ir(c,_),cl(c,x),g=Om(l,c,g,b,_,x),b=Rm(),l!==null&&!lo?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,aa(l,c,x)):(Zn&&b&&dm(c),c.flags|=1,oo(l,c,g,x),c.child)}function Fb(l,c,g,b,x){if(Xn(g)){var _=!0;Qn(c)}else _=!1;if(cl(c,x),c.stateNode===null)yd(l,c),rb(c,g,b),Cm(c,g,b,x),b=!0;else if(l===null){var M=c.stateNode,Q=c.memoizedProps;M.props=Q;var ce=M.context,De=g.contextType;typeof De=="object"&&De!==null?De=Ho(De):(De=Xn(g)?Cn:Vt.current,De=Ir(c,De));var ft=g.getDerivedStateFromProps,Bt=typeof ft=="function"||typeof M.getSnapshotBeforeUpdate=="function";Bt||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(Q!==b||ce!==De)&&ob(c,M,b,De),za=!1;var nt=c.memoizedState;M.state=nt,ld(c,b,M,x),ce=c.memoizedState,Q!==b||nt!==ce||Qt.current||za?(typeof ft=="function"&&(wm(c,g,ft,b),ce=c.memoizedState),(Q=za||nb(c,g,Q,b,nt,ce,De))?(Bt||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMo
|
||
|
`+(b.join(" > ")+`
|
||
|
|
||
|
No matching component was found for:
|
||
|
`)+l.join(" > ")}return null},n.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return K(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:u.ReactCurrentDispatcher,findHostInstanceByFiber:VI,findFiberByHostInstance:l.findFiberByHostInstance||UI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Bn=c.inject(l),an=c}catch{}l=!!c.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,c,g,b){if(!xt)throw Error(i(363));l=Zm(l,c);var x=Xe(l,g,b).disconnect;return{disconnect:function(){x()}}},n.registerMutableSourceForHydration=function(l,c){var g=c._getVersion;g=g(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,g]:l.mutableSourceEagerHydrationData.push(c,g)},n.runWithPriority=function(l,c){var g=_e;try{return _e=l,c()}finally{_e=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,c,g,b){var x=c.current,_=Kr(),M=Ba(x);return g=vx(g),c.context===null?c.context=g:c.pendingContext=g,c=sa(_,M),c.payload={element:l},b=b===void 0?null:b,b!==null&&(c.callback=b),l=$a(x,c,M),l!==null&&(Uo(l,x,M,_),id(l,x,M)),M},n};QE.exports=bre;var xre=QE.exports;const Sre=fc(xre);var ZE={exports:{}},al={};/**
|
||
|
* @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.
|
||
|
*/al.ConcurrentRoot=1;al.ContinuousEventPriority=4;al.DefaultEventPriority=16;al.DiscreteEventPriority=1;al.IdleEventPriority=536870912;al.LegacyRoot=0;ZE.exports=al;var JE=ZE.exports;const F4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let B4=!1,H4=!1;const Hy=".react-konva-event",wre=`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
|
||
|
`,Cre=`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
|
||
|
`,kre={};function um(e,t,n=kre){if(!B4&&"zIndex"in t&&(console.warn(Cre),B4=!0),!H4&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(wre),H4=!0)}for(var s in n)if(!F4[s]){var i=s.slice(0,2)==="on",u=n[s]!==t[s];if(i&&u){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 f=!t.hasOwnProperty(s);f&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},v=!1;const y={};for(var s in t)if(!F4[s]){var i=s.slice(0,2)==="on",S=n[s]!==t[s];if(i&&S){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(y[d]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),mi(e));for(var d in y)e.on(d+Hy,y[d])}function mi(e){if(!U7.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const eI={},Pre={};Iu.Node.prototype._applyProps=um;function _re(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),mi(e)}function jre(e,t,n){let r=Iu[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=Iu.Group);const o={},s={};for(var i in t){var u=i.slice(0,2)==="on";u?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return um(d,s),d}function Ere(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Ire(e,t,n){return!1}function Ore(e){return e}function Rre(){return null}function Tre(){return null}function Mre(e,t,n,r){return Pre}function Dre(){}function Are(e){}function Nre(e,t){return!1}function zre(){return eI}function $re(){return eI}const Lre=setTimeout,Fre=clearTimeout,Bre=-1;function Hre(e,t){return!1}const Wre=!1,Vre=!0,Ure=!0;function Gre(e,t){t.parent===e?t.moveToTop():e.add(t),mi(e)}function qre(e,t){t.parent===e?t.moveToTop():e.add(t),mi(e)}function tI(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),mi(e)}function Kre(e,t,n){tI(e,t,n)}function Yre(e,t){t.destroy(),t.off(Hy),mi(e)}function Xre(e,t){t.destroy(),t.off(Hy),mi(e)}function Qre(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Zre(e,t,n){}function Jre(e,t,n,r,o){um(e,o,r)}function eoe(e){e.hide(),mi(e)}function toe(e){}function noe(e,t){(t.visible==null||t.visible)&&e.show()}function roe(e,t){}function ooe(e){}function soe(){}const aoe=()=>JE.DefaultEventPriority,ioe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Gre,appendChildToContainer:qre,appendInitialChild:_re,cancelTimeout:Fre,clearContainer:ooe,commitMount:Zre,commitTextUpdate:Qre,commitUpdate:Jre,createInstance:jre,createTextInstance:Ere,detachDeletedInstance:soe,finalizeInitialChildren:Ire,getChildHostContext:$re,getCurrentEventPriority:aoe,getPublicInstance:Ore,getRootHostContext:zre,hideInstance:eoe,hideTextInstance:toe,idlePriority:Rf.unstable_IdlePriority,insertBefore:tI,insertInContainerBefore:Kre,isPrimaryRenderer:Wre,noTimeout:Bre,now:Rf.unstable_now,prepareForCommit:Rre,preparePortalMount:Tre,prepareUpdate:Mre,removeChild:Yre,removeChildFromContainer:Xre,resetAfterCommit:Dre,resetTextContent:Are,run:Rf.unstable_runWithPriority,scheduleTimeout:Lre,shouldDeprioritizeSubtree:Nre,shouldSetTextContent:Hre,supportsMutation:Ure,unhideInstance:noe,unhideTextInstance:roe,warnsIfNotActing:Vre},Symbol.toStringTag,{value:"Module"}));var loe=Object.defineProperty,coe=Object.defineProperties,uoe=Object.getOwnPropertyDescriptors,W4=Object.getOwnPropertySymbols,doe=Object.prototype.hasOwnProperty,foe=Object.prototype.propertyIsEnumerable,V4=(e,t,n)=>t in e?loe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U4=(e,t)=>{for(var n in t||(t={}))doe.call(t,n)&&V4(e,n,t[n]);if(W4)for(var n of W4(t))foe.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),Boe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=F(Foe),[i,u]=p.useState(null),[d,f]=p.useState(0),h=p.useRef(null),m=p.useCallback(()=>{f(d+1),setTimeout(m,500)},[d]);return p.useEffect(()=>{if(i)return;const v=new Image;v.onload=()=>{u(v)},v.src=K4(n)},[i,n]),p.useEffect(()=>{i&&(i.src=K4(n))},[i,n]),p.useEffect(()=>{const v=setInterval(()=>f(y=>(y+1)%5),50);return()=>clearInterval(v)},[]),!i||!bl(r.x)||!bl(r.y)||!bl(s)||!bl(o.width)||!bl(o.height)?null:a.jsx(Zs,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:bl(d)?d:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Hoe=Ce([en],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Wt}}),Woe=e=>{const{...t}=e,{objects:n}=F(Hoe);return a.jsx(ja,{listening:!1,...t,children:n.filter(oR).map((r,o)=>a.jsx(sh,{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 _i=p,Voe=function(t,n,r){const o=_i.useRef("loading"),s=_i.useRef(),[i,u]=_i.useState(0),d=_i.useRef(),f=_i.useRef(),h=_i.useRef();return(d.current!==t||f.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,d.current=t,f.current=n,h.current=r),_i.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,u(Math.random())}function y(){o.current="failed",s.current=void 0,u(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",y),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",y)}},[t,n,r]),[s.current,o.current]};const Uoe=fc(Voe),iI=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:i,isError:u}=Ks(s??Do.skipToken),[d]=Uoe((i==null?void 0:i.image_url)??"",sR.get()?"use-credentials":"anonymous");return u?a.jsx(Zs,{x:r,y:o,width:t,height:n,fill:"red"}):a.jsx(sI,{x:r,y:o,image:d,listening:!1})},Goe=Ce([en],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Wt}}),qoe=()=>{const{objects:e}=F(Goe);return e?a.jsx(ja,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(aR(t))return a.jsx(iI,{canvasImage:t},n);if(iR(t)){const r=a.jsx(sh,{points:t.points,stroke:t.color?Wi(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(ja,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(lR(t))return a.jsx(Zs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Wi(t.color)},n);if(cR(t))return a.jsx(Zs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Koe=Ce([en],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:i,height:u}}=e,{selectedImageIndex:d,images:f}=t.stagingArea;return{currentStagingAreaImage:f.length>0&&d!==void 0?f[d]:void 0,isOnFirstImage:d===0,isOnLastImage:d===f.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:i,height:u}},{memoizeOptions:{resultEqualityCheck:Wt}}),Yoe=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:u,height:d}=F(Koe);return a.jsxs(ja,{...t,children:[r&&n&&a.jsx(iI,{canvasImage:n}),o&&a.jsxs(ja,{children:[a.jsx(Zs,{x:s,y:i,width:u,height:d,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(Zs,{x:s,y:i,width:u,height:d,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},Xoe=Ce([en],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n,sessionId:r}},shouldShowSta
|