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

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

170 lines
960 KiB
JavaScript
Raw Normal View History

2023-10-14 14:14:35 +00:00
import{a as Tc,b as qj,S as Xj,c as Qj,d as Yj,e as u1,f as Zj,i as d1,g as ER,h as Jj,j as eI,k as MR,l as Hx,m as OR,n as RR,o as aw,p as tI,t as DR,q as AR,r as TR,s as $R,u as NR,v as d,w as a,x as Vx,y as Zp,z as LR,A as zR,B as FR,C as BR,P as HR,D as Wx,E as VR,F as WR,G as UR,H as GR,I as nI,J as _e,K as Tn,L as KR,M as qR,N as XR,O as Wt,Q as Se,R as et,T as un,U as Fe,V as Cd,W as fr,X as jn,Y as Gn,Z as on,_ as fa,$ as al,a0 as dt,a1 as yo,a2 as oc,a3 as pa,a4 as ma,a5 as yh,a6 as Ux,a7 as wd,a8 as fn,a9 as QR,aa as H,ab as lw,ac as YR,ad as rI,ae as f1,af as Sd,ag as $c,ah as ZR,ai as oI,aj as sI,ak as aI,al as Ho,am as JR,an as ae,ao as he,ap as Bt,aq as W,ar as eD,as as iw,at as tD,au as nD,av as rD,aw as ll,ax as te,ay as oD,az as lt,aA as Qt,aB as Ie,aC as N,aD as ur,aE as er,aF as Ce,aG as Z,aH as lI,aI as sD,aJ as aD,aK as lD,aL as iD,aM as qr,aN as Gx,aO as ha,aP as Nr,aQ as kd,aR as cD,aS as uD,aT as cw,aU as Kx,aV as be,aW as Vo,aX as dD,aY as iI,aZ as cI,a_ as uw,a$ as fD,b0 as pD,b1 as mD,b2 as ga,b3 as qx,b4 as bt,b5 as hD,b6 as gD,b7 as uI,b8 as dI,b9 as Ch,ba as vD,bb as dw,bc as fI,bd as xD,be as bD,bf as yD,bg as CD,bh as wD,bi as SD,bj as kD,bk as pI,bl as _D,bm as jD,bn as ID,bo as PD,bp as ED,bq as va,br as bc,bs as MD,bt as eo,bu as OD,bv as RD,bw as DD,bx as fw,by as AD,bz as TD,bA as Js,bB as mI,bC as hI,bD as wh,bE as Xx,bF as Qx,bG as wo,bH as gI,bI as $D,bJ as Bl,bK as Tu,bL as pw,bM as ND,bN as LD,bO as zD,bP as Qf,bQ as Yf,bR as Su,bS as tv,bT as Bu,bU as Hu,bV as Vu,bW as Wu,bX as mw,bY as Jp,bZ as nv,b_ as em,b$ as hw,c0 as p1,c1 as rv,c2 as m1,c3 as ov,c4 as tm,c5 as gw,c6 as Hl,c7 as vw,c8 as Vl,c9 as xw,ca as nm,cb as _d,cc as vI,cd as FD,ce as bw,cf as Yx,cg as rm,ch as xI,ci as Sr,cj as ku,ck as Mi,cl as Zx,cm as bI,cn as Zf,co as Jx,cp as BD,cq as yI,cr as sv,cs as Sh,ct as HD,cu as CI,cv as h1,cw as g1,cx as wI,cy as VD,cz as v1,cA as WD,cB as x1,cC as UD,cD as b1,cE as GD,cF as KD,cG as eb,cH as tb,cI as nb,cJ as rb,cK as ob,cL as kh,cM as sb,cN as Qs,cO as SI,cP as kI,cQ as ab,cR as _I,cS as qD,cT as _u,cU as aa,cV as jI,cW as II,cX as yw,cY as lb,cZ as PI,c_ as ib,c$ as cb,d0 as EI,d1 as Mn,d2 as XD,d3 as Un,d4 as QD,d5 as Nc,d6 as _h,d7 as ub,d8 as MI,d9 as OI,da as YD,db as ZD,dc as JD,dd as eA,de as tA,df as nA,dg as rA,dh as oA,di as sA,dj as aA,dk as Cw,dl as db,dm as lA,dn as iA,dp as jd,dq as cA,dr as uA,ds as jh,dt as dA,du as fA,dv as pA,dw as mA,dx as pn,dy as hA,dz as gA,dA as vA,dB as xA,dC as bA,dD as yA,dE as Zu,dF as ww,dG as Qo,dH as RI,dI as CA,dJ as fb,dK as wA,dL as Sw,dM as SA,dN as kA,dO as _A,dP as DI,dQ as jA,dR as IA,dS as PA,dT as EA,dU as MA,dV as OA,dW as AI,dX as RA,dY as DA,dZ as kw,d_ as AA,d$ as TA,e0 as $A,e1 as NA,e2 as LA,e3 as zA,e4 as FA,e5 as TI,e6 as BA,e7 as HA,e8 as VA,e9 as _w,ea as Jf,eb as _o,ec as WA,ed as UA,ee as GA,ef as KA,eg as qA,eh as XA,ei as Wo,ej as QA,ek as YA,el as ZA,em as JA,en as eT,eo as tT,ep as nT,eq as rT,er as oT,es as sT,et as aT,eu as lT,ev as iT,ew as cT,ex as uT,ey as dT,ez as fT,eA as pT,eB as mT,eC as hT,eD as gT,eE as vT,eF as xT,eG as bT,eH as yT,eI as jw,eJ as Iw,eK as $I,eL as CT,eM as zo,eN as Ju,eO as Wn,eP as wT,eQ as ST,eR as NI,eS as LI,eT as kT,eU as Pw,eV as _T,eW as Ew,eX as Mw,eY as Ow,eZ as jT,e_ as IT,e$ as Rw,f0 as Dw,f1 as PT,f2 as ET,f3 as om,f4 as MT,f5 as Aw,f6 as Tw,f7 as OT,f8 as $w,f9 as RT,fa as sm,fb as am,fc as DT,fd as AT,fe as zI,ff as TT,fg as $T,fh as FI,fi as NT,fj as LT,fk as Nw,fl as zT,fm as Lw,fn as FT,fo as BT,fp as BI,fq as HI,fr as Id,fs as VI,ft as Ol,fu as WI,fv as zw,fw as HT,fx as VT,fy as UI,fz as WT,fA as UT,fB as GT,fC as KT,fD as qT,fE as pb,fF as y1,fG as Fw,fH as ti,fI as XT,fJ as QT,fK as GI,fL as mb,fM as KI,fN as hb,fO as qI,fP as YT,fQ as Zs,fR as ZT,fS as XI,fT as JT,fU as gb,fV as QI,fW as e9,fX as t9,fY as n9,fZ as r9,f_ as o9,f$ as s9,g0 as a9,g1 as lm,g2 as $u,g3 as Yi,g4 as l9,g5 as i9,g6 as c9,g7 as u9,g8 as d9,g9 as f9,ga as p9,gb as m9,gc as Bw,gd as h9,ge as g9,gf as v9,gg as x9,gh as b9,gi as y9,gj as Hw,gk as C9,gl as w9,gm as S9,gn as k9
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fill:c,fillRule:"evenodd",stroke:p,strokeWidth:m,pointerEvents:"none"})]})})}s5.displayName="MiniMap";var IN=d.memo(s5),Uo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Uo||(Uo={}));function PN({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 EN({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const MN={[Uo.Dots]:"#91919a",[Uo.Lines]:"#eee",[Uo.Cross]:"#e2e2e2"},ON={[Uo.Dots]:1,[Uo.Lines]:1,[Uo.Cross]:6},RN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function a5({id:e,variant:t=Uo.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:l,style:i,className:c}){const p=d.useRef(null),{transform:m,patternId:h}=Zp(RN,Wx),g=l||MN[t],x=r||ON[t],y=t===Uo.Dots,b=t===Uo.Cross,C=Array.isArray(n)?n:[n,n],S=[C[0]*m[2]||1,C[1]*m[2]||1],_=x*m[2],j=b?[_,_]:S,E=y?[_/s,_/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:Vx(["react-flow__background",c]),style:{...i,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:h+e,x:m[0]%S[0],y:m[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:y?a.jsx(EN,{color:g,radius:_/s}):a.jsx(PN,{dimensions:j,color:g,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${h+e})`})]})}a5.displayName="Background";var DN=d.memo(a5);const Jw=(e,t,n)=>{AN(n);const r=nI(e,t);return l5[n].includes(r)},l5={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},eS=Object.keys(l5),AN=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(eS.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${eS.join("|")}`)};function TN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $N=TN();const i5=1/60*1e3,NN=typeof performance<"u"?()=>performance.now():()=>Date.now(),c5=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(NN()),i5);function LN(e){let t=[],n=[],r=0,o=!1,s=!1;const l=new WeakSet,i={schedule:(c,p=!1,m=!1)=>{const h=m&&o,g=h?t:n;return p&&l.add(c),g.indexOf(c)===-1&&(g.push(c),h&&o&&(r=t.length)),c},cancel:c=>{const p=n.indexOf(c);p!==-1&&n.splice(p,1),l.delete(c)},process:c=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p<r;p++){const m=t[p];m(c),l.has(m)&&(i.schedule(m),e())}o=!1,s&&(s=!1,i.process(c))}};return i}const zN=40;let S1=!0,ed=!1,k1=!1;const ac={delta:0,timestamp:0},Ed=["read","update","preRender","render","postRender"],Ih=Ed.reduce((e,t)=>(e[t]=LN(()=>ed=!0),e),{}),FN=Ed.reduce((e,t)=>{const n=Ih[t];return e[t]=(r,o=!1,s=!1)=>(ed||VN(),n.schedule(r,o,s)),e},{}),BN=Ed.reduce((e,t)=>(e[t]=Ih[t].cancel,e),{});Ed.reduce((e,t)=>(e[t]=()=>Ih[t].process(ac),e),{});const HN=e=>Ih[e].process(ac),u5=e=>{ed=!1,ac.delta=S1?i5:Math.max(Math.min(e-ac.timestamp,zN),1),ac.timestamp=e,k1=!0,Ed.forEach(HN),k1=!1,ed&&(S1=!1,c5(u5))},VN=()=>{ed=!0,S1=!0,k1||c5(u5)},tS=()=>ac;function Ph(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=d.Children.toArray(e.path),l=_e((i,c)=>a.jsx(Tn,{ref:c,viewBox:t,...o,...i,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return l.displayName=r,l}function d5(e){const{theme:t}=KR(),n=qR();return d.useMemo(()=>XR(t.direction,{...n,...e}),[e,t.direction,n])}var WN=Object.defineProperty,UN=(e,t,n)=>t in e?WN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t,n)=>(UN(e,typeof t!="symbol"?t+"":t,n),n);function nS(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var GN=e=>typeof e=="object"&&"nodeType"i
`})}function uL(e){Cd({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Vi(e){const{isOpen:t,isDisabled:n}=yb(),{reduceMotion:r}=Cb(),o=et("chakra-accordion__icon",e.className),s=Eh(),l={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return a.jsx(Tn,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:l,...e,children:a.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Vi.displayName="AccordionIcon";var Wi=_e(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...l}=aL(t),c={...Eh().container,overflowAnchor:"none"},p=d.useMemo(()=>l,[l]);return a.jsx(eL,{value:p,children:a.jsx(Se.div,{ref:n,...s,className:et("chakra-accordion__item",o),__css:c,children:typeof r=="function"?r({isExpanded:!!l.isOpen,isDisabled:!!l.isDisabled}):r})})});Wi.displayName="AccordionItem";var Zi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Al={enter:{duration:.2,ease:Zi.easeOut},exit:{duration:.1,ease:Zi.easeIn}},ea={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})},dL=e=>e!=null&&parseInt(e.toString(),10)>0,sS={exit:{height:{duration:.2,ease:Zi.ease},opacity:{duration:.3,ease:Zi.ease}},enter:{height:{duration:.3,ease:Zi.ease},opacity:{duration:.4,ease:Zi.ease}}},fL={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:dL(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:ea.exit(sS.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:ea.enter(sS.enter,o)}}},Od=d.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:l="auto",style:i,className:c,transition:p,transitionEnd:m,...h}=e,[g,x]=d.useState(!1);d.useEffect(()=>{const _=setTimeout(()=>{x(!0)});return()=>clearTimeout(_)},[]),Cd({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,b={startingHeight:s,endingHeight:l,animateOpacity:o,transition:g?p:{enter:{duration:0}},transitionEnd:{enter:m==null?void 0:m.enter,exit:r?m==null?void 0:m.exit:{...m==null?void 0:m.exit,display:y?"block":"none"}}},C=r?n:!0,S=n||r?"enter":"exit";return a.jsx(fr,{initial:!1,custom:b,children:C&&a.jsx(jn.div,{ref:t,...h,className:et("chakra-collapse",c),style:{overflow:"hidden",display:"block",...i},custom:b,variants:fL,initial:r?"exit":!1,animate:S,exit:"exit"})})});Od.displayName="Collapse";var pL={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:ea.enter(Al.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:ea.exit(Al.exit,n),transitionEnd:t==null?void 0:t.exit}}},p5={initial:"exit",animate:"enter",exit:"exit",variants:pL},mL=d.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:l,transitionEnd:i,delay:c,...p}=t,m=o||r?"enter":"exit",h=r?o&&r:!0,g={transition:l,transitionEnd:i,delay:c};return a.jsx(fr,{custom:g,children:h&&a.jsx(jn.div,{ref:n,className:et("chakra-fade",s),custom:g,...p5,animate:m,...p})})});mL.displayName="Fade";var hL={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:ea.exit(Al.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:ea.enter(Al.enter,n),transitionEnd:e==null?void 0:e.enter}}},m5={initial:"exit",animate
.`.concat(WH,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(i,"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(l,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(i,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Fp,` {
right: `).concat(i,"px ").concat(r,`;
}
.`).concat(Bp,` {
margin-right: `).concat(i,"px ").concat(r,`;
}
.`).concat(Fp," .").concat(Fp,` {
right: 0 `).concat(r,`;
}
.`).concat(Bp," .").concat(Bp,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(UH,": ").concat(i,`px;
}
`)},rV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=d.useMemo(function(){return eV(o)},[o]);return d.createElement(tV,{styles:nV(s,!t,o,n?"":"!important")})},V1=!1;if(typeof window<"u")try{var sp=Object.defineProperty({},"passive",{get:function(){return V1=!0,!0}});window.addEventListener("test",sp,sp),window.removeEventListener("test",sp,sp)}catch{V1=!1}var Ti=V1?{passive:!1}:!1,oV=function(e){return e.tagName==="TEXTAREA"},V3=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oV(e)&&n[t]==="visible")},sV=function(e){return V3(e,"overflowY")},aV=function(e){return V3(e,"overflowX")},AS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=W3(e,r);if(o){var s=U3(e,r),l=s[1],i=s[2];if(l>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},iV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},W3=function(e,t){return e==="v"?sV(t):aV(t)},U3=function(e,t){return e==="v"?lV(t):iV(t)},cV=function(e,t){return e==="h"&&t==="rtl"?-1:1},uV=function(e,t,n,r,o){var s=cV(e,window.getComputedStyle(t).direction),l=s*r,i=n.target,c=t.contains(i),p=!1,m=l>0,h=0,g=0;do{var x=U3(e,i),y=x[0],b=x[1],C=x[2],S=b-C-s*y;(y||S)&&W3(e,i)&&(h+=S,g+=y),i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(m&&(o&&h===0||!o&&l>h)||!m&&(o&&g===0||!o&&-l>g))&&(p=!0),p},ap=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},TS=function(e){return[e.deltaX,e.deltaY]},$S=function(e){return e&&"current"in e?e.current:e},dV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fV=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},pV=0,$i=[];function mV(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(pV++)[0],s=d.useState(H3)[0],l=d.useRef(e);d.useEffect(function(){l.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=A1([e.lockRef.current],(e.shards||[]).map($S),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=d.useCallback(function(b,C){if("touches"in b&&b.touches.length===2)return!l.current.allowPinchZoom;var S=ap(b),_=n.current,j="deltaX"in b?b.deltaX:_[0]-S[0],E="deltaY"in b?b.deltaY:_[1]-S[1],I,M=b.target,R=Math.abs(j)>Math.abs(E)?"h":"v";if("touches"in b&&R==="h"&&M.type==="range")return!1;var D=AS(R,M);if(!D)return!0;if(D?I=R:(I=R==="v"?"h":"v",D=AS(R,M)),!D)return!1;if(!r.current&&"changedTouches"in b&&(j||E)&&(r.current=I),!I)return!0;var A=r.current||I;return uV(A,C,b,A==="h"?j:E,!0)},[]),c=d.useCallback(function(b){var C=b;if(!(!$i.length||$i[$i.length-1]!==s)){var S="deltaY"in C?TS(C):ap(C),_=t.current.filter(function(I){return I.name===C.type&&I.target===C.target&&dV(I.delta,S)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var j=(l.current.shards||[]).map($S).filter(Boolean).filter(function(I){return I.contains(C.target)}),E=j.length>0?i(C,j[0]):!l.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),p=d.useCallback(function(b,C,S,_){var j={name:b,delta:C,target:S,should:_};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(E){return E!==j})},1)},[]),m=d.useCallback(function(b){n.current=ap(b),r.current=void 0},[]),h=d.useCallback(function(b){p(b.type,TS(b),b.target,i(b,e.lockRef.current))},[]),g=d.useCallback(function(b){p(b.type,ap(b),b.target,i(b,e.lockRef.current))},[]);d.useEffect(function(){return $i.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Ti),document.addEventListener("touchmove",c,Ti),document.addEventListener("touchstart",m,Ti),function(){$i=$i.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,Ti),document.removeEventListener("touchmove",c,Ti),document.removeEventListener("touchstart",m,Ti)}},[]);var x=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(s,{styles:fV(o)}):null,x?d.createElement(rV,{gapMode:e.gapMode}):null)}const hV=hz(B3,mV);var G3=d.forwardRef(function(e,t){return d.createElement(Bh,vs({},e,{ref:t,sideCar:hV}))});G3.classNames=Bh.classNames;const gV=G3;function vV(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:l,finalFocusRef:i,returnFocusOnClose:c,preserveScrollBarGap:p,lockFocusAcrossFrames:m,isOpen:h}=Kl(),[g,x]=ZR();d.useEffect(()=>{!g&&x&&setTimeout(x)},[g,x]);const y=z3(r,h);return a.jsx(m3,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:i,restoreFocus:c,contentRef:r,lockFocusAcrossFrames:m,children:a.jsx(gV,{removeScrollBar:!p,allowPinchZoom:l,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var Xl=_e((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...l}=e,{getDialogProps:i,getDialogContainerProps:c}=Kl(),p=i(l,t),m=c(o),h=et("chakra-modal__content",n),g=Bc(),x={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...g.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...g.dialogContainer},{motionPreset:b}=Kl();return a.jsx(vV,{children:a.jsx(Se.div,{...m,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(L3,{preset:b,motionProps:s,className:h,...p,__css:x,children:r})})})});Xl.displayName="ModalContent";function zd(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(ql,{...n,initialFocusRef:t})}var Fd=_e((e,t)=>a.jsx(Xl,{ref:t,role:"alertdialog",...e})),ks=_e((e,t)=>{const{className:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CU(e){if(Array.isArray(e))return Y1(e)}function US(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 GS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?US(Object(n),!0).forEach(function(r){jP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):US(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ld(e,t){return kU(e)||SU(e,t)||IP(e,t)||wU()}function wU(){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 Y1(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 Y1(e,t)}}function Y1(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 SU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,l,i;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));o=!0);}catch(c){s=!0,i=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw i}}return r}}function kU(e){if(Array.isArray(e))return e}var _U="file-invalid-type",jU="file-too-large",IU="file-too-small",PU="too-many-files",EU=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:_U,message:"File type must be ".concat(n)}},KS=function(t){return{code:jU,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},qS=function(t){return{code:IU,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},MU={code:PU,message:"Too many files"};function PP(e,t){var n=e.type==="application/x-moz-file"||xU(e,t);return[n,n?null:EU(t)]}function EP(e,t,n){if(El(e.size))if(El(t)&&El(n)){if(e.size>n)return[!1,KS(n)];if(e.size<t)return[!1,qS(t)]}else{if(El(t)&&e.size<t)return[!1,qS(t)];if(El(n)&&e.size>n)return[!1,KS(n)]}return[!0,null]}function El(e){return e!=null}function OU(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,l=e.maxFiles,i=e.validator;return!s&&t.length>1||s&&l>=1&&t.length>l?!1:t.every(function(c){var p=PP(c,n),m=ld(p,1),h=m[0],g=EP(c,r,o),x=ld(g,1),y=x[0],b=i?i(c):null;return h&&y&&!b})}function xm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ip(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 XS(e){e.preventDefault()}function RU(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function DU(e){return e.indexOf("Edge/")!==-1}function AU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return RU(e)||DU(e)}function ms(){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),l=1;l<o;l++)s[l-1]=arguments[l];return t.some(function(i){return!xm(r)&&i&&i.apply(void 0,[r].concat(s)),xm(r)})}}function TU(){return"showOpenFilePicker"in window}function $U(e){if(El(e)){var t=Object.entries(e).filter(function(n){var r=ld(n,2),o=r[0],s=r[1],l=!0;return MP(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.')),l=!1),(!Array.isArray(s)||!s.every(OP))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,r){var o=ld(r,2),s=o[0],l=o[1];return GS(GS({},n),{},jP({},s,l))},{});return[{description:"Files",accept:t}]}return e}function NU(e){if(El(e))return Object.entries(e).reduce(function(t,n){var r=ld(n,2),o=r[0],s=r[1];return[].concat(WS(t),[o],WS(s))},[]).filter(function(t){return MP(t)||OP(t)}).join(",")}function LU(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function zU(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function MP(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function OP(e){return/^.*\.[\w]+$/.test(e)}var FU=["children"],BU=["open"],HU=["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 GU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KU(e){if(Array.isArray(e))return Z1(e)}function jv(e,t){return QU(e)||XU(e,t)||RP(e,t)||qU()}function qU(){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 RP(e,t){if(e){if(typeof e=="string")return Z1(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 Z1(e,t)}}function Z1(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 XU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,l,i;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));o=!0);}catch(c){s=!0,i=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw i}}return r}}function QU(e){if(Array.isArray(e))return e}function QS(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 xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QS(Object(n),!0).forEach(function(r){J1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bm(e,t){if(e==null)return{};var n=YU(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 YU(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 oy=d.forwardRef(function(e,t){var n=e.children,r=bm(e,FU),o=sy(r),s=o.open,l=bm(o,BU);return d.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(d.Fragment,null,n(xn(xn({},l),{},{open:s})))});oy.displayName="Dropzone";var DP={disabled:!1,getFilesFromEvent:cU,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};oy.defaultProps=DP;oy.propTypes={children:en.func,accept:en.objectOf(en.arrayOf(en.string)),multiple:en.bool,preventDropOnDocument:en.bool,noClick:en.bool,noKeyboard:en.bool,noDrag:en.bool,noDragEventsBubbling:en.bool,minSize:en.number,maxSize:en.number,maxFiles:en.number,disabled:en.bool,getFilesFromEvent:en.func,onFileDialogCancel:en.func,onFileDialogOpen:en.func,useFsAccessApi:en.bool,autoFocus:en.bool,onDragEnter:en.func,onDragLeave:en.func,onDragOver:en.func,onDrop:en.func,onDropAccepted:en.func,onDropRejected:en.func,onError:en.func,validator:en.func};var ex={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=xn(xn({},DP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,l=t.minSize,i=t.multiple,c=t.maxFiles,p=t.onDragEnter,m=t.onDragLeave,h=t.onDragOver,g=t.onDrop,x=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,C=t.onFileDialogOpen,S=t.useFsAccessApi,_=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,I=t.noKeyboard,M=t.noDrag,R=t.noDragEventsBubbling,D=t.onError,A=t.validator,O=d.useMemo(function(){return NU(n)},[n]),$=d.useMemo(function(){return $U(n)},[n]),X=d.useMemo(function(){return typeof C=="function"?C:YS},[C]),z=d.useMemo(function(){return typeof b=="function"?b:YS},[b]),V=d.useRef(null),Q=d.useRef(null),G=d.useReducer(ZU,ex),F=jv(G,2),U=F[0],T=F[1],B=U.isFocused,Y=U.isFileDialogActive,re=d.useRef(typeof window<"u"&&window.isSecureContext&&S&&TU()),le=function(){!re.current&&Y&&setTimeout(function(){if(Q.current){var De=Q.current.files;De.length||(T({type:"closeDialog"}),z())}},300)};d.useEffect(function
`),status:"error"})},[s,o]),m=d.useCallback(async j=>{c({file:j,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,c]),h=d.useCallback((j,E)=>{if(E.length>1){o({title:s("toast.uploadFailed"),description:s("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}E.forEach(I=>{p(I)}),j.forEach(I=>{m(I)})},[s,o,m,p]),g=d.useCallback(()=>{i(!0)},[]),{getRootProps:x,getInputProps:y,isDragAccept:b,isDragReject:C,isDragActive:S,inputRef:_}=sy({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:g,multiple:!1});return d.useEffect(()=>{const j=async E=>{var I,M;_.current&&(I=E.clipboardData)!=null&&I.files&&(_.current.files=E.clipboardData.files,(M=_.current)==null||M.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",j),()=>{document.removeEventListener("paste",j)}},[_]),a.jsxs(Ie,{...x({style:{}}),onKeyDown:j=>{j.key},children:[a.jsx("input",{...y()}),t,a.jsx(fr,{children:S&&l&&a.jsx(jn.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(pG,{isDragAccept:b,isDragReject:C,setIsHandlingUpload:i})},"image-upload-overlay")})]})},gG=d.memo(hG),vG=_e((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...l}={},isChecked:i,...c}=e;return a.jsx(Vt,{label:r,placement:o,hasArrow:s,...l,children:a.jsx(Ja,{ref:t,colorScheme:i?"accent":"base",...c,children:n})})}),ot=d.memo(vG);function xG(e){const t=d.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=d.useContext(t);if(o===null)throw new Error(e);return o}]}function zP(e){return Array.isArray(e)?e:[e]}const bG=()=>{};function yG(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||bG:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function FP({data:e}){const t=[],n=[],r=e.reduce((o,s,l)=>(s.group?o[s.group]?o[s.group].push(l):o[s.group]=[l]:n.push(l),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function BP(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function HP(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=HP(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function VP(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=HP(t))&&(r&&(r+=" "),r+=n);return r}const CG={app:100,modal:200,popover:300,overlay:400,max:9999};function ly(e){return CG[e]}function wG(e,t){const n=d.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const SG=sD({key:"mantine",prepend:!0});function kG(){return r5()||SG}var _G=Object.defineProperty,JS=Object.getOwnPropertySymbols,jG=Object.prototype.hasOwnProperty,IG=Object.prototype.propertyIsEnumerable,e4=(e,t,n)=>t in e?_G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PG=(e,t)=>{for(var n in t||(t={}))jG.call(t,n)&&e4(e,n,t[n]);if(JS)for(var n of JS(t))IG.call(t,n)&&e4(e,n,t[n]);return e};const Ev="ref";function EG(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(!(Ev in n))return{args:e,ref:t};t=n[Ev];const r=PG({},n);return delete r[Ev],{args:[r],ref:t}}const{cssFactory:MG}=(()=>{function e(n,r,o){const s=[],l=iD(n,s,o);return s.length<2?o:l+r(s)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:i,args:c}=EG(l),p=aD(c,r.registered);return lD(r,p,!1),`${r.key}-${p.name}${i===void 0?"":` ${i}`}`};return{css:o,cx:(...l)=>e(r.registered,o,VP(l))}}return{cssFactory:t}})();function WP(){const e=kG();return wG(()=>MG({cache:e}),[e])}function OG({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const l=n.reduce((i,c)=>(Object.keys(c.classNames).forEach(p=>{typeof i[p]!="string"?i[p]=`${c.classNames[p]}`:i[p]=`${i[p]}
* OverlayScrollbars
* Version: 2.2.1
*
* Copyright (c) Rene Haas | KingSora.
* https://github.com/KingSora
*
* Released under the MIT license.
*/function Ft(e,t){if(gg(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Ft(Object.keys(e),n=>t(e[n],n,e));return e}function dr(e,t){const n=dl(t);if(ns(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?l_(e,s,t):t.reduce((l,i)=>(l[i]=l_(e,s,i),l),o)}return o}e&&Ft(no(t),o=>lte(e,o,t[o]))}const Fo=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,l;const i=(m,h)=>{const g=s,x=m,y=h||(r?!r(g,x):g!==x);return(y||o)&&(s=x,l=g),[s,y,l]};return[t?m=>i(t(s,l),m):i,m=>[s,!!m,l]]},Xd=()=>typeof window<"u",TM=Xd()&&Node.ELEMENT_NODE,{toString:Gee,hasOwnProperty:Nv}=Object.prototype,Ca=e=>e===void 0,hg=e=>e===null,Kee=e=>Ca(e)||hg(e)?`${e}`:Gee.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Qa=e=>typeof e=="number",dl=e=>typeof e=="string",Sy=e=>typeof e=="boolean",ts=e=>typeof e=="function",ns=e=>Array.isArray(e),ud=e=>typeof e=="object"&&!ns(e)&&!hg(e),gg=e=>{const t=!!e&&e.length,n=Qa(t)&&t>-1&&t%1==0;return ns(e)||!ts(e)&&n?t>0&&ud(e)?t-1 in e:!0:!1},px=e=>{if(!e||!ud(e)||Kee(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=Nv.call(e,n),l=o&&Nv.call(o,"isPrototypeOf");if(r&&!s&&!l)return!1;for(t in e);return Ca(t)||Nv.call(e,t)},sh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===TM:!1},vg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===TM:!1},ky=(e,t,n)=>e.indexOf(t,n),Xt=(e,t,n)=>(!n&&!dl(t)&&gg(t)?Array.prototype.push.apply(e,t):e.push(t),e),Zl=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Xt(n,r)}):Ft(e,r=>{Xt(n,r)}),n)},_y=e=>!!e&&e.length===0,Ts=(e,t,n)=>{Ft(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},xg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),no=e=>e?Object.keys(e):[],yn=(e,t,n,r,o,s,l)=>{const i=[t,n,r,o,s,l];return(typeof e!="object"||hg(e))&&!ts(e)&&(e={}),Ft(i,c=>{Ft(no(c),p=>{const m=c[p];if(e===m)return!0;const h=ns(m);if(m&&(px(m)||h)){const g=e[p];let x=g;h&&!ns(g)?x=[]:!h&&!px(g)&&(x={}),e[p]=yn(x,m)}else e[p]=m})}),e},jy=e=>{for(const t in e)return!1;return!0},$M=(e,t,n,r)=>{if(Ca(r))return n?n[e]:t;n&&(dl(r)||Qa(r))&&(n[e]=r)},cr=(e,t,n)=>{if(Ca(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},Rr=(e,t)=>{e&&e.removeAttribute(t)},Ll=(e,t,n,r)=>{if(n){const o=cr(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const l=Zl(s).join(" ").trim();cr(e,t,l)}},qee=(e,t,n)=>{const r=cr(e,t)||"";return new Set(r.split(" ")).has(n)},qo=(e,t)=>$M("scrollLeft",0,e,t),ra=(e,t)=>$M("scrollTop",0,e,t),mx=Xd()&&Element.prototype,NM=(e,t)=>{const n=[],r=t?vg(t)?t:null:document;return r?Xt(n,r.querySelectorAll(e)):n},Xee=(e,t)=>{const n=t?vg(t)?t:null:document;return n?n.querySelector(e):null},ah=(e,t)=>vg(e)?(mx.matches||mx.msMatchesSelector).call(e,t):!1,Iy=e=>e?Zl(e.childNodes):[],ca=e=>e?e.parentElement:null,ec=(e,t)=>{if(vg(e)){const n=mx.closest;if(n)return n.call(e,t);do{if(ah(e,t))return e;e=ca(e)}while(e)}return null},Qee=(e,t,n)=>{const r=e&&ec(e,t),o=e&&Xee(n,r),s=ec(o,t)===r;return r&&o?r===e||o===e||s&&ec(ec(e,n),t)!==r:!1},Py=(e,t,n)=>{if(n&&e){let r=t,o;gg(n)?(o=document.createDocumentFragment(),Ft(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)}},vo=(e,t)=>{Py(e,null,t)},Yee=(e,t)=>{Py(ca(e),e,t)},o_=(e,t)=>{Py(ca(e),e&&e.nextSibling,t)},js=e=>{if(gg(e))Ft(Zl(e),t=>js(t));else if(e){const t=ca(e);t&&t.removeChild(e)}},zl=e=>{const t=document.createElement("div");return e&&cr(t,"class",e),t},LM=e=>{const t=zl();return t.innerHTML=e.trim(),Ft(Iy(t),n=>js(n))},hx=e=>e.charAt(0).toUpperCase()+e.slice(1),Zee=()=>zl().style,Jee=["-webkit-","-moz-","-o-","-ms-"],ete=["WebKit","Moz","O","MS","webkit","moz","o","ms"],Lv={},zv={},tte=e=>{let t=zv[e];if(xg(zv,e))return t;const n=hx(e),r=Zee();return Ft(Jee,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,hx(s)+n].find(i=>r[i]!==void 0))}),zv[e]=t||""},Qd=e=>{if(Xd()){let t=Lv[e]||window[e];return xg(Lv,e)||(Ft(ete,n=>(t=t||window[n+hx(e)],!t)),Lv[e]=t),t}},nte=Qd("MutationObserver"),s_=Qd("IntersectionObserver"),tc=Qd("ResizeObserver"),zM=Qd("cancel
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var zge=function(t){var n={},r=d,o=Lp,s=Object.assign;function l(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,v=1;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=Symbol.for("react.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),y=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),I=Symbol.iterator;function M(u){return u===null||typeof u!="object"?null:(u=I&&u[I]||u["@@iterator"],typeof u=="function"?u:null)}function R(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case m:return"Fragment";case p:return"Portal";case g:return"Profiler";case h:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case y:return(u.displayName||"Context")+".Consumer";case x:return(u._context.displayName||"Context")+".Provider";case b:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case _:return f=u.displayName||null,f!==null?f:R(u.type)||"Memo";case j:f=u._payload,u=u._init;try{return R(u(f))}catch{}}return null}function D(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(f);case 8:return f===h?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function A(u){var f=u,v=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,f.flags&4098&&(v=f.return),u=f.return;while(u)}return f.tag===3?v:null}function O(u){if(A(u)!==u)throw Error(l(188))}function $(u){var f=u.alternate;if(!f){if(f=A(u),f===null)throw Error(l(188));return f!==u?null:u}for(var v=u,w=f;;){var k=v.return;if(k===null)break;var P=k.alternate;if(P===null){if(w=k.return,w!==null){v=w;continue}break}if(k.child===P.child){for(P=k.child;P;){if(P===v)return O(k),u;if(P===w)return O(k),f;P=P.sibling}throw Error(l(188))}if(v.return!==w.return)v=k,w=P;else{for(var L=!1,ne=k.child;ne;){if(ne===v){L=!0,v=k,w=P;break}if(ne===w){L=!0,w=k,v=P;break}ne=ne.sibling}if(!L){for(ne=P.child;ne;){if(ne===v){L=!0,v=P,w=k;break}if(ne===w){L=!0,w=P,v=k;break}ne=ne.sibling}if(!L)throw Error(l(189))}}if(v.alternate!==w)throw Error(l(190))}if(v.tag!==3)throw Error(l(188));return v.stateNode.current===v?u:f}function X(u){return u=$(u),u!==null?z(u):null}function z(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=z(u);if(f!==null)return f;u=u.sibling}return null}function V(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var f=V(u);if(f!==null)return f}u=u.sibling}return null}var Q=Array.isArray,G=t.getPublicInstance,F=t.getRootHostContext,U=t.getChildHostContext,T=t.prepareForCommit,B=t.resetAfterCommit,Y=t.createInstance,re=t.appendInitialChild,le=t.finalizeInitialChildren,oe=t.prepareUpdate,q=t.shouldSetTextContent,K=t.createTextInstance,ee=t.scheduleTimeout,ce=t.cancelTimeout,J=t.noTimeout,ie=t.isPrimaryRenderer,de=t.supportsMutation,xe=t.supportsPersistence,we=t.supportsHydrat
`+nu+u}var ru=!1;function ou(u,f){if(!u||ru)return"";ru=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Ee){var w=Ee}Reflect.construct(u,[],f)}else{try{f.call()}catch(Ee){w=Ee}u.call(f.prototype)}else{try{throw Error()}catch(Ee){w=Ee}u()}}catch(Ee){if(Ee&&w&&typeof Ee.stack=="string"){for(var k=Ee.stack.split(`
`),P=w.stack.split(`
`),L=k.length-1,ne=P.length-1;1<=L&&0<=ne&&k[L]!==P[ne];)ne--;for(;1<=L&&0<=ne;L--,ne--)if(k[L]!==P[ne]){if(L!==1||ne!==1)do if(L--,ne--,0>ne||k[L]!==P[ne]){var pe=`
`+k[L].replace(" at new "," at ");return u.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",u.displayName)),pe}while(1<=L&&0<=ne);break}}}finally{ru=!1,Error.prepareStackTrace=v}return(u=u?u.displayName||u.name:"")?vl(u):""}var Gg=Object.prototype.hasOwnProperty,Ia=[],rt=-1;function Et(u){return{current:u}}function _t(u){0>rt||(u.current=Ia[rt],Ia[rt]=null,rt--)}function Mt(u,f){rt++,Ia[rt]=u.current,u.current=f}var rr={},rn=Et(rr),Dn=Et(!1),vr=rr;function vi(u,f){var v=u.type.contextTypes;if(!v)return rr;var w=u.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===f)return w.__reactInternalMemoizedMaskedChildContext;var k={},P;for(P in v)k[P]=f[P];return w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=k),k}function Ir(u){return u=u.childContextTypes,u!=null}function of(){_t(Dn),_t(rn)}function k2(u,f,v){if(rn.current!==rr)throw Error(l(168));Mt(rn,f),Mt(Dn,v)}function _2(u,f,v){var w=u.stateNode;if(f=f.childContextTypes,typeof w.getChildContext!="function")return v;w=w.getChildContext();for(var k in w)if(!(k in f))throw Error(l(108,D(u)||"Unknown",k));return s({},v,w)}function sf(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||rr,vr=rn.current,Mt(rn,u),Mt(Dn,Dn.current),!0}function j2(u,f,v){var w=u.stateNode;if(!w)throw Error(l(169));v?(u=_2(u,f,vr),w.__reactInternalMemoizedMergedChildContext=u,_t(Dn),_t(rn),Mt(rn,u)):_t(Dn),Mt(Dn,v)}var Oo=Math.clz32?Math.clz32:F7,L7=Math.log,z7=Math.LN2;function F7(u){return u>>>=0,u===0?32:31-(L7(u)/z7|0)|0}var af=64,lf=4194304;function su(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function cf(u,f){var v=u.pendingLanes;if(v===0)return 0;var w=0,k=u.suspendedLanes,P=u.pingedLanes,L=v&268435455;if(L!==0){var ne=L&~k;ne!==0?w=su(ne):(P&=L,P!==0&&(w=su(P)))}else L=v&~k,L!==0?w=su(L):P!==0&&(w=su(P));if(w===0)return 0;if(f!==0&&f!==w&&!(f&k)&&(k=w&-w,P=f&-f,k>=P||k===16&&(P&4194240)!==0))return f;if(w&4&&(w|=v&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=w;0<f;)v=31-Oo(f),k=1<<v,w|=u[v],f&=~k;return w}function B7(u,f){switch(u){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H7(u,f){for(var v=u.suspendedLanes,w=u.pingedLanes,k=u.expirationTimes,P=u.pendingLanes;0<P;){var L=31-Oo(P),ne=1<<L,pe=k[L];pe===-1?(!(ne&v)||ne&w)&&(k[L]=B7(ne,f)):pe<=f&&(u.expiredLanes|=ne),P&=~ne}}function Kg(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function I2(){var u=af;return af<<=1,!(af&4194240)&&(af=64),u}function qg(u){for(var f=[],v=0;31>v;v++)f.push(u);return f}function au(u,f,v){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-Oo(f),u[f]=v}function V7(u,f){var v=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var w=u.eventTimes;for(u=u.expirationTimes;0<v;){var k=31-Oo(v),P=1<<k;f[k]=0,w[k]=-1,u[k]=-1,v&=~P}}function Xg(u,f){var v=u.entangledLanes|=f;for(u=u.entanglements;v;){var w=31-Oo(v),k=1<<w;k&f|u[w]&f&&(u[w]|=f),v&=~k}}var Nt=0;function P2(u){return u&=-u,1<u?4<u?u&268435455?16:536870912:4:1}var Qg=o.unstable_scheduleCallback,E2=o.unstable_cancelCallback,
Error generating stack: `+P.message+`
`+P.stack}return{value:u,source:f,stack:k,digest:null}}function _0(u,f,v){return{value:u,source:null,stack:v??null,digest:f??null}}function j0(u,f){try{console.error(f.value)}catch(v){setTimeout(function(){throw v})}}var aR=typeof WeakMap=="function"?WeakMap:Map;function gC(u,f,v){v=Vs(-1,v),v.tag=3,v.payload={element:null};var w=f.value;return v.callback=function(){Bf||(Bf=!0,G0=w),j0(u,f)},v}function vC(u,f,v){v=Vs(-1,v),v.tag=3;var w=u.type.getDerivedStateFromError;if(typeof w=="function"){var k=f.value;v.payload=function(){return w(k)},v.callback=function(){j0(u,f)}}var P=u.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(v.callback=function(){j0(u,f),typeof w!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})}),v}function xC(u,f,v){var w=u.pingCache;if(w===null){w=u.pingCache=new aR;var k=new Set;w.set(f,k)}else k=w.get(f),k===void 0&&(k=new Set,w.set(f,k));k.has(v)||(k.add(v),u=yR.bind(null,u,f,v),f.then(u,u))}function bC(u){do{var f;if((f=u.tag===13)&&(f=u.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return u;u=u.return}while(u!==null);return null}function yC(u,f,v,w,k){return u.mode&1?(u.flags|=65536,u.lanes=k,u):(u===f?u.flags|=65536:(u.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(f=Vs(-1,1),f.tag=2,Ea(v,f,1))),v.lanes|=1),u)}var lR=i.ReactCurrentOwner,Pr=!1;function xr(u,f,v,w){f.child=u===null?K2(f,null,v,w):Si(f,u.child,v,w)}function CC(u,f,v,w,k){v=v.render;var P=f.ref;return wi(f,k),w=b0(u,f,v,w,P,k),v=y0(),u!==null&&!Pr?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Ws(u,f,k)):(ln&&v&&e0(f),f.flags|=1,xr(u,f,w,k),f.child)}function wC(u,f,v,w,k){if(u===null){var P=v.type;return typeof P=="function"&&!Z0(P)&&P.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(f.tag=15,f.type=P,SC(u,f,P,w,k)):(u=Kf(v.type,null,w,f,f.mode,k),u.ref=f.ref,u.return=f,f.child=u)}if(P=u.child,!(u.lanes&k)){var L=P.memoizedProps;if(v=v.compare,v=v!==null?v:hf,v(L,w)&&u.ref===f.ref)return Ws(u,f,k)}return f.flags|=1,u=Aa(P,w),u.ref=f.ref,u.return=f,f.child=u}function SC(u,f,v,w,k){if(u!==null){var P=u.memoizedProps;if(hf(P,w)&&u.ref===f.ref)if(Pr=!1,f.pendingProps=w=P,(u.lanes&k)!==0)u.flags&131072&&(Pr=!0);else return f.lanes=u.lanes,Ws(u,f,k)}return I0(u,f,v,w,k)}function kC(u,f,v){var w=f.pendingProps,k=w.children,P=u!==null?u.memoizedState:null;if(w.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(Pi,Gr),Gr|=v;else{if(!(v&1073741824))return u=P!==null?P.baseLanes|v:v,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Mt(Pi,Gr),Gr|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=P!==null?P.baseLanes:v,Mt(Pi,Gr),Gr|=w}else P!==null?(w=P.baseLanes|v,f.memoizedState=null):w=v,Mt(Pi,Gr),Gr|=w;return xr(u,f,k,v),f.child}function _C(u,f){var v=f.ref;(u===null&&v!==null||u!==null&&u.ref!==v)&&(f.flags|=512,f.flags|=2097152)}function I0(u,f,v,w,k){var P=Ir(v)?vr:rn.current;return P=vi(f,P),wi(f,k),v=b0(u,f,v,w,P,k),w=y0(),u!==null&&!Pr?(f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~k,Ws(u,f,k)):(ln&&w&&e0(f),f.flags|=1,xr(u,f,v,k),f.child)}function jC(u,f,v,w,k){if(Ir(v)){var P=!0;sf(f)}else P=!1;if(wi(f,k),f.stateNode===null)Ef(u,f),V2(f,v,w),f0(f,v,w,k),w=!0;else if(u===null){var L=f.stateNode,ne=f.memoizedProps;L.props=ne;var pe=L.context,Ee=v.contextType;typeof Ee=="object"&&Ee!==null?Ee=ao(Ee):(Ee=Ir(v)?vr:rn.current,Ee=vi(f,Ee));var Xe=v.getDerivedStateFromProps,vt=typeof Xe=="function"||typeof L.getSnapshotBeforeUpdate=="function";vt||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(ne!==w||pe!==Ee)&&W2(f,L,w,Ee),Pa=!1;var We=f.memoizedState;L.state=We,bf(f,w,L,k),pe=f.memoizedState,ne!==w||We!==pe||Dn.current||Pa?(typeof Xe=="function"&&(d0(f,v,Xe,w),pe=f.memoizedState),(ne=Pa||H2(f,v,ne,w,We,pe,Ee))?(vt||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.component
`+(w.join(" > ")+`
No matching component was found for:
`)+u.join(" > ")}return null},n.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return G(u.child.stateNode);default:return u.child.stateNode}},n.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:i.ReactCurrentDispatcher,findHostInstanceByFiber:jR,findFiberByHostInstance:u.findFiberByHostInstance||IR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)u=!0;else{try{uf=f.inject(u),as=f}catch{}u=!!f.checkDCE}}return u},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(u,f,v,w){if(!Ve)throw Error(l(363));u=B0(u,f);var k=yt(u,v,w).disconnect;return{disconnect:function(){k()}}},n.registerMutableSourceForHydration=function(u,f){var v=f._getVersion;v=v(f._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[f,v]:u.mutableSourceEagerHydrationData.push(f,v)},n.runWithPriority=function(u,f){var v=Nt;try{return Nt=u,f()}finally{Nt=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(u,f,v,w){var k=f.current,P=lr(),L=Ra(k);return v=rw(v),f.context===null?f.context=v:f.pendingContext=v,f=Vs(P,L),f.payload={element:u},w=w===void 0?null:w,w!==null&&(f.callback=w),u=Ea(k,f,L),u!==null&&(co(u,k,L,P),xf(u,k,L)),L},n};_7.exports=zge;var Fge=_7.exports;const Bge=wd(Fge);var j7={exports:{}},pi={};/**
* @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.
*/pi.ConcurrentRoot=1;pi.ContinuousEventPriority=4;pi.DefaultEventPriority=16;pi.DiscreteEventPriority=1;pi.IdleEventPriority=536870912;pi.LegacyRoot=0;j7.exports=pi;var I7=j7.exports;const Nj={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Lj=!1,zj=!1;const C2=".react-konva-event",Hge=`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
`,Vge=`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
`,Wge={};function Vg(e,t,n=Wge){if(!Lj&&"zIndex"in t&&(console.warn(Vge),Lj=!0),!zj&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(Hge),zj=!0)}for(var s in n)if(!Nj[s]){var l=s.slice(0,2)==="on",i=n[s]!==t[s];if(l&&i){var c=s.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var m=t._useStrictMode,h={},g=!1;const x={};for(var s in t)if(!Nj[s]){var l=s.slice(0,2)==="on",y=n[s]!==t[s];if(l&&y){var c=s.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t[s]&&(x[c]=t[s])}!l&&(t[s]!==n[s]||m&&t[s]!==e.getAttr(s))&&(g=!0,h[s]=t[s])}g&&(e.setAttrs(h),gl(e));for(var c in x)e.on(c+C2,x[c])}function gl(e){if(!Q9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const P7={},Uge={};yd.Node.prototype._applyProps=Vg;function Gge(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),gl(e)}function Kge(e,t,n){let r=yd[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=yd.Group);const o={},s={};for(var l in t){var i=l.slice(0,2)==="on";i?s[l]=t[l]:o[l]=t[l]}const c=new r(o);return Vg(c,s),c}function qge(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Xge(e,t,n){return!1}function Qge(e){return e}function Yge(){return null}function Zge(){return null}function Jge(e,t,n,r){return Uge}function e0e(){}function t0e(e){}function n0e(e,t){return!1}function r0e(){return P7}function o0e(){return P7}const s0e=setTimeout,a0e=clearTimeout,l0e=-1;function i0e(e,t){return!1}const c0e=!1,u0e=!0,d0e=!0;function f0e(e,t){t.parent===e?t.moveToTop():e.add(t),gl(e)}function p0e(e,t){t.parent===e?t.moveToTop():e.add(t),gl(e)}function E7(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),gl(e)}function m0e(e,t,n){E7(e,t,n)}function h0e(e,t){t.destroy(),t.off(C2),gl(e)}function g0e(e,t){t.destroy(),t.off(C2),gl(e)}function v0e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function x0e(e,t,n){}function b0e(e,t,n,r,o){Vg(e,o,r)}function y0e(e){e.hide(),gl(e)}function C0e(e){}function w0e(e,t){(t.visible==null||t.visible)&&e.show()}function S0e(e,t){}function k0e(e){}function _0e(){}const j0e=()=>I7.DefaultEventPriority,I0e=Object.freeze(Object.defineProperty({__proto__:null,appendChild:f0e,appendChildToContainer:p0e,appendInitialChild:Gge,cancelTimeout:a0e,clearContainer:k0e,commitMount:x0e,commitTextUpdate:v0e,commitUpdate:b0e,createInstance:Kge,createTextInstance:qge,detachDeletedInstance:_0e,finalizeInitialChildren:Xge,getChildHostContext:o0e,getCurrentEventPriority:j0e,getPublicInstance:Qge,getRootHostContext:r0e,hideInstance:y0e,hideTextInstance:C0e,idlePriority:Lp.unstable_IdlePriority,insertBefore:E7,insertInContainerBefore:m0e,isPrimaryRenderer:c0e,noTimeout:l0e,now:Lp.unstable_now,prepareForCommit:Yge,preparePortalMount:Zge,prepareUpdate:Jge,removeChild:h0e,removeChildFromContainer:g0e,resetAfterCommit:e0e,resetTextContent:t0e,run:Lp.unstable_runWithPriority,scheduleTimeout:s0e,shouldDeprioritizeSubtree:n0e,shouldSetTextContent:i0e,supportsMutation:d0e,unhideInstance:w0e,unhideTextInstance:S0e,warnsIfNotActing:u0e},Symbol.toStringTag,{value:"Module"}));var P0e=Object.defineProperty,E0e=Object.defineProperties,M0e=Object.getOwnPropertyDescriptors,Fj=Object.getOwnPropertySymbols,O0e=Object.prototype.hasOwnProperty,R0e=Object.prototype.propertyIsEnumerable,Bj=(e,t,n)=>t in e?P0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hj=(e,t)=>{for(var n in t||(t={}))O0e.call(t,n)&&Bj(e,n,t[n]);if(Fj)for(var n of Fj(t))R0e.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),dve=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=W(uve),[l,i]=d.useState(null),[c,p]=d.useState(0),m=d.useRef(null),h=d.useCallback(()=>{p(c+1),setTimeout(h,500)},[c]);return d.useEffect(()=>{if(l)return;const g=new Image;g.onload=()=>{i(g)},g.src=Uj(n)},[l,n]),d.useEffect(()=>{l&&(l.src=Uj(n))},[l,n]),d.useEffect(()=>{const g=setInterval(()=>p(x=>(x+1)%5),50);return()=>clearInterval(g)},[]),!l||!Oi(r.x)||!Oi(r.y)||!Oi(s)||!Oi(o.width)||!Oi(o.height)?null:a.jsx(Rs,{ref:m,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:l,fillPatternOffsetY:Oi(c)?c:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},fve=d.memo(dve),pve=ae([wn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Bt}}),mve=e=>{const{...t}=e,{objects:n}=W(pve);return a.jsx(Os,{listening:!1,...t,children:n.filter(c$).map((r,o)=>a.jsx(bh,{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))})},hve=d.memo(mve);var Pl=d,gve=function(t,n,r){const o=Pl.useRef("loading"),s=Pl.useRef(),[l,i]=Pl.useState(0),c=Pl.useRef(),p=Pl.useRef(),m=Pl.useRef();return(c.current!==t||p.current!==n||m.current!==r)&&(o.current="loading",s.current=void 0,c.current=t,p.current=n,m.current=r),Pl.useLayoutEffect(function(){if(!t)return;var h=document.createElement("img");function g(){o.current="loaded",s.current=h,i(Math.random())}function x(){o.current="failed",s.current=void 0,i(Math.random())}return h.addEventListener("load",g),h.addEventListener("error",x),n&&(h.crossOrigin=n),r&&(h.referrerPolicy=r),h.src=t,function(){h.removeEventListener("load",g),h.removeEventListener("error",x)}},[t,n,r]),[s.current,o.current]};const vve=wd(gve),xve=({canvasImage:e})=>{const[t,n,r,o]=Ho("colors",["base.400","base.500","base.700","base.900"]),s=aa(t,n),l=aa(r,o),{t:i}=Z();return a.jsxs(Os,{children:[a.jsx(Rs,{x:e.x,y:e.y,width:e.width,height:e.height,fill:s}),a.jsx(z0e,{x:e.x,y:e.y,width:e.width,height:e.height,align:"center",verticalAlign:"middle",fontFamily:'"Inter Variable", sans-serif',fontSize:e.width/16,fontStyle:"600",text:i("common.imageFailedToLoad"),fill:l})]})},bve=d.memo(xve),yve=e=>{const{x:t,y:n,imageName:r}=e.canvasImage,{currentData:o,isError:s}=wo(r??eo.skipToken),[l,i]=vve((o==null?void 0:o.image_url)??"",u$.get()?"use-credentials":"anonymous");return s||i==="failed"?a.jsx(bve,{canvasImage:e.canvasImage}):a.jsx(D7,{x:t,y:n,image:l,listening:!1})},T7=d.memo(yve),Cve=ae([wn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Bt}}),wve=()=>{const{objects:e}=W(Cve);return e?a.jsx(Os,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(d$(t))return a.jsx(T7,{canvasImage:t},n);if(f$(t)){const r=a.jsx(bh,{points:t.points,stroke:t.color?Fl(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?a.jsx(Os,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(p$(t))return a.jsx(Rs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Fl(t.color)},n);if(m$(t))return a.jsx(Rs,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Sve=d.memo(wve),kve=ae([wn],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:o,boundingBoxDimensions:s}=e,{selectedImageIndex:l,images:i,boundingBox:c}=t.stagingArea;return{currentStagingAreaImage:i.length>0&&l!==void 0?i[l]:void 0,isOnFirstImage:l===0,isOnLastImage:l===i.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:(c==null?void 0:c.x)??o.x,y:(c==null?void 0:c.y)??o.y,width:(c==null?void 0:c.width)??s.width,he
${s}
\`\`\``),n({title:"Error Copied"})},[e,n]),o=d.useMemo(()=>R1e({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx(N,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs(N,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(ur,{children:"Something went wrong"}),a.jsx(N,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(be,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs(N,{sx:{gap:4},children:[a.jsx(ot,{leftIcon:a.jsx(Eoe,{}),onClick:t,children:"Reset UI"}),a.jsx(ot,{leftIcon:a.jsx(Uc,{}),onClick:r,children:"Copy Error"}),a.jsx(Nh,{href:o,isExternal:!0,children:a.jsx(ot,{leftIcon:a.jsx(wy,{}),children:"Create Issue"})})]})]})})},F1e=d.memo(z1e),B1e=ae([he],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:Bt}}),H1e=()=>{const e=te(),{shift:t,ctrl:n,meta:r}=W(B1e),{queueBack:o,isDisabled:s,isLoading:l}=eO();nt(["ctrl+enter","meta+enter"],o,{enabled:()=>!s&&!l,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[o,s,l]);const{queueFront:i,isDisabled:c,isLoading:p}=oO();return nt(["ctrl+shift+enter","meta+shift+enter"],i,{enabled:()=>!c&&!p,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,c,p]),nt("*",()=>{Gp("shift")?!t&&e(Nr(!0)):t&&e(Nr(!1)),Gp("ctrl")?!n&&e(Xw(!0)):n&&e(Xw(!1)),Gp("meta")?!r&&e(Qw(!0)):r&&e(Qw(!1))},{keyup:!0,keydown:!0},[t,n,r]),nt("1",()=>{e(Qs("txt2img"))}),nt("2",()=>{e(Qs("img2img"))}),nt("3",()=>{e(Qs("unifiedCanvas"))}),nt("4",()=>{e(Qs("nodes"))}),nt("5",()=>{e(Qs("modelManager"))}),null},V1e=d.memo(H1e),W1e=e=>{const t=te(),{recallAllParameters:n}=Pg(),r=si(),{currentData:o}=wo((e==null?void 0:e.imageName)??eo.skipToken),{currentData:s}=q$((e==null?void 0:e.imageName)??eo.skipToken),l=d.useCallback(()=>{o&&(t(SI(o)),t(Qs("unifiedCanvas")),r({title:mI("toast.sentToUnifiedCanvas"),status:"info",duration:2500,isClosable:!0}))},[t,r,o]),i=d.useCallback(()=>{o&&t(Sh(o))},[t,o]),c=d.useCallback(()=>{s&&n(s.metadata)},[s]);return d.useEffect(()=>{e&&e.action==="sendToCanvas"&&l()},[e,l]),d.useEffect(()=>{e&&e.action==="sendToImg2Img"&&i()},[e,i]),d.useEffect(()=>{e&&e.action==="useAllParameters"&&c()},[e,c]),{handleSendToCanvas:l,handleSendToImg2Img:i,handleUseAllMetadata:c}},U1e=e=>(W1e(e.selectedImage),null),G1e=d.memo(U1e),K1e={},q1e=({config:e=K1e,selectedImage:t})=>{const n=W(DM),r=SP("system"),o=te(),s=d.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);d.useEffect(()=>{bt.changeLanguage(n)},[n]),d.useEffect(()=>{TI(e)&&(r.info({config:e},"Received config"),o(X$(e)))},[o,e,r]),d.useEffect(()=>{o(Q$())},[o]);const l=og(Y$);return a.jsxs(M1e,{onReset:s,FallbackComponent:F1e,children:[a.jsx(el,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(gG,{children:a.jsxs(el,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[l||a.jsx(Uee,{}),a.jsx(N,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(P1e,{})})]})})}),a.jsx(RJ,{}),a.jsx(PJ,{}),a.jsx(sU,{}),a.jsx(V1e,{}),a.jsx(G1e,{selectedImage:t})]})},exe=d.memo(q1e);export{exe as default};