mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
170 lines
901 KiB
JavaScript
170 lines
901 KiB
JavaScript
|
var H0=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Se=(e,t,n)=>(H0(e,t,"read from private field"),n?n.call(e):t.get(e)),Jt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Zr=(e,t,n,r)=>(H0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var vu=(e,t,n,r)=>({set _(o){Zr(e,t,o,n)},get _(){return Se(e,t,r)}}),os=(e,t,n)=>(H0(e,t,"access private method"),n);import{a as gd,b as bj,S as xj,c as yj,d as Cj,e as Jv,f as wj,i as e1,g as i7,k as l7,h as MC,j as Sj,t as c7,l as u7,m as d7,n as f7,o as p7,p as h7,q as m7,r as V0,s as g7,u,v as a,w as Db,x as Bp,y as v7,z as b7,A as x7,B as y7,P as C7,C as Rb,D as w7,E as S7,F as k7,G as _7,H as kj,I as Pe,J as j7,K as _e,L as et,M as Fe,N as vd,O as nr,Q as gn,R as Hn,T as Xt,U as Ki,V as Qa,W as at,X as lo,Y as Yl,Z as aa,_ as cm,$ as Ab,a0 as Dc,a1 as nn,a2 as P7,a3 as H,a4 as DC,a5 as I7,a6 as _j,a7 as t1,a8 as bd,a9 as E7,aa as jj,ab as Pj,ac as ds,ad as O7,ae,af as Ce,ag as kt,ah as F,ai as M7,aj as RC,ak as D7,al as R7,am as A7,an as qi,ao as J,ap as N7,aq as Nt,ar as zt,as as Ie,at as $,au as ro,av as be,aw as wn,ax as Ij,ay as T7,az as $7,aA as L7,aB as z7,aC as oo,aD as Nb,aE as ia,aF as Pr,aG as um,aH as F7,aI as B7,aJ as AC,aK as Tb,aL as xe,aM as Do,aN as H7,aO as Ej,aP as Oj,aQ as NC,aR as V7,aS as W7,aT as U7,aU as Xi,aV as Mj,aW as xn,aX as G7,aY as K7,aZ as q7,a_ as Dj,a$ as rr,b0 as dm,b1 as X7,b2 as TC,b3 as Rj,b4 as Y7,b5 as Q7,b6 as Z7,b7 as J7,b8 as eD,b9 as tD,ba as nD,bb as rD,bc as Aj,bd as oD,be as sD,bf as aD,bg as iD,bh as lD,bi as Lr,bj as cD,bk as uD,bl as dD,bm as $C,bn as fD,bo as pD,bp as Fa,bq as fm,br as Nj,bs as Tj,bt as fo,bu as $j,bv as hD,bw as Ri,bx as Eu,by as LC,bz as mD,bA as gD,bB as vD,bC as Hf,bD as Vf,bE as bu,bF as W0,bG as $u,bH as Lu,bI as zu,bJ as Fu,bK as zC,bL as Hp,bM as U0,bN as Vp,bO as FC,bP as n1,bQ as G0,bR as r1,bS as K0,bT as Wp,bU as BC,bV as Ai,bW as HC,bX as Ni,bY as VC,bZ as Up,b_ as pm,b$ as bD,c0 as Lj,c1 as o1,c2 as s1,c3 as zj,c4 as xD,c5 as a1,c6 as yD,c7 as i1,c8 as CD,c9 as l1,ca as $b,cb as Lb,cc as zb,cd as Fb,ce as hm,cf as Bb,cg as Fj,ch as Ra,ci as Bj,cj as Hb,ck as Hj,cl as wD,cm as xu,cn as Ti,co as Vj,cp as Wj,cq as WC,cr as SD,cs as kD,ct as _D,cu as Cn,cv as jD,cw as Tn,cx as xd,cy as mm,cz as PD,cA as ID,cB as ED,cC as OD,cD as MD,cE as DD,cF as RD,cG as AD,cH as ND,cI as TD,cJ as UC,cK as Vb,cL as $D,cM as LD,cN as yd,cO as zD,cP as FD,cQ as gm,cR as BD,cS as HD,cT as VD,cU as Wb,cV as WD,cW as un,cX as UD,cY as GD,cZ as KD,c_ as vm,c$ as qD,d0 as XD,d1 as YD,d2 as Xu,d3 as GC,d4 as Bo,d5 as Uj,d6 as QD,d7 as Ub,d8 as ZD,d9 as KC,da as JD,db as eR,dc as tR,dd as Gj,de as nR,df as rR,dg as oR,dh as sR,di as Kj,dj as aR,dk as iR,dl as lR,dm as cR,dn as uR,dp as dR,dq as fR,dr as pR,ds as qj,dt as Xj,du as hR,dv as mR,dw as gR,dx as vR,dy as bR,dz as Ro,dA as xR,dB as mo,dC as yR,dD as CR,dE as wR,dF as SR,dG as kR,dH as _R,dI as jR,dJ as PR,dK as IR,dL as ER,dM as OR,dN as MR,dO as DR,dP as RR,dQ as AR,dR as NR,dS as qC,dT as TR,dU as XC,dV as $R,dW as LR,dX as zR,dY as FR,dZ as BR,d_ as HR,d$ as YC,e0 as QC,e1 as ZC,e2 as Gb,e3 as VR,e4 as Eo,e5 as Yu,e6 as No,e7 as WR,e8 as UR,e9 as Yj,ea as Qj,eb as GR,ec as JC,ed as KR,ee as ew,ef as tw,eg as nw,eh as qR,ei as XR,ej as rw,ek as ow,el as YR,em as QR,en as Gp,eo as ZR,ep as sw,eq as Wf,er as aw,es as iw,et as JR,eu as eA,ev as tA,ew as Zj,ex as nA,ey as rA,ez as lw,eA as oA,eB as cw,eC as sA,eD as Jj,eE as e5,eF as Cd,eG as t5,eH as Ci,eI as n5,eJ as uw,eK as aA,eL as iA,eM as r5,eN as lA,eO as cA,eP as uA,eQ as dA,eR as fA,eS as Kb,eT as c1,eU as dw,eV as Yi,eW as pA,eX as hA,eY as o5,eZ as Us,e_ as Gs,e$ as s5,f0 as a5,f1 as qb,f2 as i5,f3 as mA,f4 as Ks,f5 as gA,f6 as l5,f7 as vA,f8 as bA,f9 as xA,fa as yA,fb as CA,fc as wA,fd as SA,fe as Kp,ff as Ou,fg as Vl,fh as kA,fi as _A,fj as jA,fk as PA,fl as IA,fm as EA,fn as OA,fo as MA,fp as DA,fq as RA,fr as AA,fs as NA,ft as TA,fu as $A,fv as LA,fw as zA,fx as FA,fy as BA,fz as HA,fA as VA,fB as
|
||
|
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fill:f,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}v5.displayName="MiniMap";var HN=u.memo(v5),To;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(To||(To={}));function VN({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 WN({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const UN={[To.Dots]:"#91919a",[To.Lines]:"#eee",[To.Cross]:"#e2e2e2"},GN={[To.Dots]:1,[To.Lines]:1,[To.Cross]:6},KN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function b5({id:e,variant:t=To.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:c,className:f}){const p=u.useRef(null),{transform:h,patternId:m}=Bp(KN,Rb),v=i||UN[t],b=r||GN[t],y=t===To.Dots,x=t===To.Cross,w=Array.isArray(n)?n:[n,n],k=[w[0]*h[2]||1,w[1]*h[2]||1],_=b*h[2],j=x?[_,_]:k,I=y?[_/s,_/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:Db(["react-flow__background",f]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background",children:[a.jsx("pattern",{id:m+e,x:h[0]%k[0],y:h[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${I[0]},-${I[1]})`,children:y?a.jsx(WN,{color:v,radius:_/s}):a.jsx(VN,{dimensions:j,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${m+e})`})]})}b5.displayName="Background";var qN=u.memo(b5);const ww=(e,t,n)=>{XN(n);const r=kj(e,t);return x5[n].includes(r)},x5={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Sw=Object.keys(x5),XN=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Sw.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Sw.join("|")}`)};function YN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var QN=YN();const y5=1/60*1e3,ZN=typeof performance<"u"?()=>performance.now():()=>Date.now(),C5=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(ZN()),y5);function JN(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,c={schedule:(f,p=!1,h=!1)=>{const m=h&&o,v=m?t:n;return p&&i.add(f),v.indexOf(f)===-1&&(v.push(f),m&&o&&(r=t.length)),f},cancel:f=>{const p=n.indexOf(f);p!==-1&&n.splice(p,1),i.delete(f)},process:f=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let p=0;p<r;p++){const h=t[p];h(f),i.has(h)&&(c.schedule(h),e())}o=!1,s&&(s=!1,c.process(f))}};return c}const eT=40;let f1=!0,Qu=!1,p1=!1;const Zl={delta:0,timestamp:0},Sd=["read","update","preRender","render","postRender"],bm=Sd.reduce((e,t)=>(e[t]=JN(()=>Qu=!0),e),{}),tT=Sd.reduce((e,t)=>{const n=bm[t];return e[t]=(r,o=!1,s=!1)=>(Qu||oT(),n.schedule(r,o,s)),e},{}),nT=Sd.reduce((e,t)=>(e[t]=bm[t].cancel,e),{});Sd.reduce((e,t)=>(e[t]=()=>bm[t].process(Zl),e),{});const rT=e=>bm[e].process(Zl),w5=e=>{Qu=!1,Zl.delta=f1?y5:Math.max(Math.min(e-Zl.timestamp,eT),1),Zl.timestamp=e,p1=!0,Sd.forEach(rT),p1=!1,Qu&&(f1=!1,C5(w5))},oT=()=>{Qu=!0,f1=!0,p1||C5(w5)},kw=()=>Zl;function kd(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,s=u.Children.toArray(e.path),i=Pe((c,f)=>a.jsx(An,{ref:f,viewBox:t,...o,...c,children:s.length?s:a.jsx("path",{fill:"currentColor",d:n})}));return i.displayName=r,i}function S5(e){const{theme:t}=j7(),n=cN();return u.useMemo(()=>uN(t.direction,{...n,...e}),[e,t.direction,n])}var sT=Object.defineProperty,aT=(e,t,n)=>t in e?sT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pn=(e,t,n)=>(aT(e,typeof t!="symbol"?t+"":t,n),n);function _w(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 iT=e=>typeof e=="object"&&"nodeType"i
|
||
|
`})}function _T(e){vd({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nl(e){const{isOpen:t,isDisabled:n}=Qb(),{reduceMotion:r}=Zb(),o=et("chakra-accordion__icon",e.className),s=xm(),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(An,{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"})})}Nl.displayName="AccordionIcon";var Tl=Pe(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=CT(t),f={...xm().container,overflowAnchor:"none"},p=u.useMemo(()=>i,[i]);return a.jsx(mT,{value:p,children:a.jsx(_e.div,{ref:n,...s,className:et("chakra-accordion__item",o),__css:f,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});Tl.displayName="AccordionItem";var Wl={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ki={enter:{duration:.2,ease:Wl.easeOut},exit:{duration:.1,ease:Wl.easeIn}},Xs={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})},jT=e=>e!=null&&parseInt(e.toString(),10)>0,Iw={exit:{height:{duration:.2,ease:Wl.ease},opacity:{duration:.3,ease:Wl.ease}},enter:{height:{duration:.3,ease:Wl.ease},opacity:{duration:.4,ease:Wl.ease}}},PT={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:jT(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:Xs.exit(Iw.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:Xs.enter(Iw.enter,o)}}},ym=u.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:c,className:f,transition:p,transitionEnd:h,...m}=e,[v,b]=u.useState(!1);u.useEffect(()=>{const _=setTimeout(()=>{b(!0)});return()=>clearTimeout(_)},[]),vd({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(s.toString())>0,x={startingHeight:s,endingHeight:i,animateOpacity:o,transition:v?p:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:y?"block":"none"}}},w=r?n:!0,k=n||r?"enter":"exit";return a.jsx(nr,{initial:!1,custom:x,children:w&&a.jsx(gn.div,{ref:t,...m,className:et("chakra-collapse",f),style:{overflow:"hidden",display:"block",...c},custom:x,variants:PT,initial:r?"exit":!1,animate:k,exit:"exit"})})});ym.displayName="Collapse";var IT={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Xs.enter(ki.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:Xs.exit(ki.exit,n),transitionEnd:t==null?void 0:t.exit}}},_5={initial:"exit",animate:"enter",exit:"exit",variants:IT},ET=u.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:c,delay:f,...p}=t,h=o||r?"enter":"exit",m=r?o&&r:!0,v={transition:i,transitionEnd:c,delay:f};return a.jsx(nr,{custom:v,children:m&&a.jsx(gn.div,{ref:n,className:et("chakra-fade",s),custom:v,..._5,animate:h,...p})})});ET.displayName="Fade";var OT={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:Xs.exit(ki.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:Xs.enter(ki.enter,n),transitionEnd:e==null?void 0:e.enter}}},j5={initial:"exit",animate
|
||
|
.`.concat(iB,` {
|
||
|
overflow: hidden `).concat(r,`;
|
||
|
padding-right: `).concat(c,"px ").concat(r,`;
|
||
|
}
|
||
|
body {
|
||
|
overflow: hidden `).concat(r,`;
|
||
|
overscroll-behavior: contain;
|
||
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
|
padding-left: `.concat(o,`px;
|
||
|
padding-top: `).concat(s,`px;
|
||
|
padding-right: `).concat(i,`px;
|
||
|
margin-left:0;
|
||
|
margin-top:0;
|
||
|
margin-right: `).concat(c,"px ").concat(r,`;
|
||
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
|
}
|
||
|
|
||
|
.`).concat(Op,` {
|
||
|
right: `).concat(c,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Mp,` {
|
||
|
margin-right: `).concat(c,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Op," .").concat(Op,` {
|
||
|
right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(Mp," .").concat(Mp,` {
|
||
|
margin-right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
`).concat(lB,": ").concat(c,`px;
|
||
|
}
|
||
|
`)},yB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=u.useMemo(function(){return vB(o)},[o]);return u.createElement(bB,{styles:xB(s,!t,o,n?"":"!important")})},M1=!1;if(typeof window<"u")try{var Yf=Object.defineProperty({},"passive",{get:function(){return M1=!0,!0}});window.addEventListener("test",Yf,Yf),window.removeEventListener("test",Yf,Yf)}catch{M1=!1}var Pl=M1?{passive:!1}:!1,CB=function(e){return e.tagName==="TEXTAREA"},nP=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CB(e)&&n[t]==="visible")},wB=function(e){return nP(e,"overflowY")},SB=function(e){return nP(e,"overflowX")},rS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=rP(e,r);if(o){var s=oP(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_B=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rP=function(e,t){return e==="v"?wB(t):SB(t)},oP=function(e,t){return e==="v"?kB(t):_B(t)},jB=function(e,t){return e==="h"&&t==="rtl"?-1:1},PB=function(e,t,n,r,o){var s=jB(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,f=t.contains(c),p=!1,h=i>0,m=0,v=0;do{var b=oP(e,c),y=b[0],x=b[1],w=b[2],k=x-w-s*y;(y||k)&&rP(e,c)&&(m+=k,v+=y),c=c.parentNode}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&v===0||!o&&-i>v))&&(p=!0),p},Qf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oS=function(e){return[e.deltaX,e.deltaY]},sS=function(e){return e&&"current"in e?e.current:e},IB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},EB=function(e){return`
|
||
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
|
`)},OB=0,Il=[];function MB(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(OB++)[0],s=u.useState(tP)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=w1([e.lockRef.current],(e.shards||[]).map(sS),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=u.useCallback(function(x,w){if("touches"in x&&x.touches.length===2)return!i.current.allowPinchZoom;var k=Qf(x),_=n.current,j="deltaX"in x?x.deltaX:_[0]-k[0],I="deltaY"in x?x.deltaY:_[1]-k[1],E,O=x.target,M=Math.abs(j)>Math.abs(I)?"h":"v";if("touches"in x&&M==="h"&&O.type==="range")return!1;var D=rS(M,O);if(!D)return!0;if(D?E=M:(E=M==="v"?"h":"v",D=rS(M,O)),!D)return!1;if(!r.current&&"changedTouches"in x&&(j||I)&&(r.current=E),!E)return!0;var A=r.current||E;return PB(A,w,x,A==="h"?j:I,!0)},[]),f=u.useCallback(function(x){var w=x;if(!(!Il.length||Il[Il.length-1]!==s)){var k="deltaY"in w?oS(w):Qf(w),_=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&IB(E.delta,k)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var j=(i.current.shards||[]).map(sS).filter(Boolean).filter(function(E){return E.contains(w.target)}),I=j.length>0?c(w,j[0]):!i.current.noIsolation;I&&w.cancelable&&w.preventDefault()}}},[]),p=u.useCallback(function(x,w,k,_){var j={name:x,delta:w,target:k,should:_};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(I){return I!==j})},1)},[]),h=u.useCallback(function(x){n.current=Qf(x),r.current=void 0},[]),m=u.useCallback(function(x){p(x.type,oS(x),x.target,c(x,e.lockRef.current))},[]),v=u.useCallback(function(x){p(x.type,Qf(x),x.target,c(x,e.lockRef.current))},[]);u.useEffect(function(){return Il.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Pl),document.addEventListener("touchmove",f,Pl),document.addEventListener("touchstart",h,Pl),function(){Il=Il.filter(function(x){return x!==s}),document.removeEventListener("wheel",f,Pl),document.removeEventListener("touchmove",f,Pl),document.removeEventListener("touchstart",h,Pl)}},[]);var b=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(s,{styles:EB(o)}):null,b?u.createElement(yB,{gapMode:e.gapMode}):null)}const DB=O$(eP,MB);var sP=u.forwardRef(function(e,t){return u.createElement(Om,us({},e,{ref:t,sideCar:DB}))});sP.classNames=Om.classNames;const RB=sP;function AB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:c,returnFocusOnClose:f,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=zi(),[v,b]=E7();u.useEffect(()=>{!v&&b&&setTimeout(b)},[v,b]);const y=Z3(r,m);return a.jsx(j3,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:c,restoreFocus:f,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(RB,{removeScrollBar:!p,allowPinchZoom:i,enabled:y===1&&s,forwardProps:!0,children:e.children})})}var Bi=Pe((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:c,getDialogContainerProps:f}=zi(),p=c(i,t),h=f(o),m=et("chakra-modal__content",n),v=$c(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:x}=zi();return a.jsx(AB,{children:a.jsx(_e.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:y,children:a.jsx(Q3,{preset:x,motionProps:s,className:m,...p,__css:b,children:r})})})});Bi.displayName="ModalContent";function Ad(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(Fi,{...n,initialFocusRef:t})}var Nd=Pe((e,t)=>a.jsx(Bi,{ref:t,role:"alertdialog",...e})),gs=Pe((e,t)=>{const{className:
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $V(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LV(e){if(Array.isArray(e))return z1(e)}function hS(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 mS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hS(Object(n),!0).forEach(function(r){AP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rd(e,t){return BV(e)||FV(e,t)||NP(e,t)||zV()}function zV(){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 NP(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 FV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(f){s=!0,c=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function BV(e){if(Array.isArray(e))return e}var HV="file-invalid-type",VV="file-too-large",WV="file-too-small",UV="too-many-files",GV=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:HV,message:"File type must be ".concat(n)}},gS=function(t){return{code:VV,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},vS=function(t){return{code:WV,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},KV={code:UV,message:"Too many files"};function TP(e,t){var n=e.type==="application/x-moz-file"||NV(e,t);return[n,n?null:GV(t)]}function $P(e,t,n){if(xi(e.size))if(xi(t)&&xi(n)){if(e.size>n)return[!1,gS(n)];if(e.size<t)return[!1,vS(t)]}else{if(xi(t)&&e.size<t)return[!1,vS(t)];if(xi(n)&&e.size>n)return[!1,gS(n)]}return[!0,null]}function xi(e){return e!=null}function qV(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,c=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(f){var p=TP(f,n),h=rd(p,1),m=h[0],v=$P(f,r,o),b=rd(v,1),y=b[0],x=c?c(f):null;return m&&y&&!x})}function ah(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Jf(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 bS(e){e.preventDefault()}function XV(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YV(e){return e.indexOf("Edge/")!==-1}function QV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return XV(e)||YV(e)}function ss(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(c){return!ah(r)&&c&&c.apply(void 0,[r].concat(s)),ah(r)})}}function ZV(){return"showOpenFilePicker"in window}function JV(e){if(xi(e)){var t=Object.entries(e).filter(function(n){var r=rd(n,2),o=r[0],s=r[1],i=!0;return LP(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(zP))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=rd(r,2),s=o[0],i=o[1];return mS(mS({},n),{},AP({},s,i))},{});return[{description:"Files",accept:t}]}return e}function eW(e){if(xi(e))return Object.entries(e).reduce(function(t,n){var r=rd(n,2),o=r[0],s=r[1];return[].concat(pS(t),[o],pS(s))},[]).filter(function(t){return LP(t)||zP(t)}).join(",")}function tW(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function nW(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function LP(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function zP(e){return/^.*\.[\w]+$/.test(e)}var rW=["children"],oW=["open"],sW=["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 cW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uW(e){if(Array.isArray(e))return F1(e)}function hv(e,t){return pW(e)||fW(e,t)||FP(e,t)||dW()}function dW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FP(e,t){if(e){if(typeof e=="string")return F1(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 F1(e,t)}}function F1(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 fW(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,c;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(f){s=!0,c=f}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function pW(e){if(Array.isArray(e))return e}function xS(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 an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xS(Object(n),!0).forEach(function(r){B1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ih(e,t){if(e==null)return{};var n=hW(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 hW(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 zx=u.forwardRef(function(e,t){var n=e.children,r=ih(e,rW),o=Fx(r),s=o.open,i=ih(o,oW);return u.useImperativeHandle(t,function(){return{open:s}},[s]),H.createElement(u.Fragment,null,n(an(an({},i),{},{open:s})))});zx.displayName="Dropzone";var BP={disabled:!1,getFilesFromEvent:jV,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};zx.defaultProps=BP;zx.propTypes={children:Bt.func,accept:Bt.objectOf(Bt.arrayOf(Bt.string)),multiple:Bt.bool,preventDropOnDocument:Bt.bool,noClick:Bt.bool,noKeyboard:Bt.bool,noDrag:Bt.bool,noDragEventsBubbling:Bt.bool,minSize:Bt.number,maxSize:Bt.number,maxFiles:Bt.number,disabled:Bt.bool,getFilesFromEvent:Bt.func,onFileDialogCancel:Bt.func,onFileDialogOpen:Bt.func,useFsAccessApi:Bt.bool,autoFocus:Bt.bool,onDragEnter:Bt.func,onDragLeave:Bt.func,onDragOver:Bt.func,onDrop:Bt.func,onDropAccepted:Bt.func,onDropRejected:Bt.func,onError:Bt.func,validator:Bt.func};var H1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Fx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=an(an({},BP),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,c=t.multiple,f=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,b=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,w=t.onFileDialogOpen,k=t.useFsAccessApi,_=t.autoFocus,j=t.preventDropOnDocument,I=t.noClick,E=t.noKeyboard,O=t.noDrag,M=t.noDragEventsBubbling,D=t.onError,A=t.validator,R=u.useMemo(function(){return eW(n)},[n]),T=u.useMemo(function(){return JV(n)},[n]),q=u.useMemo(function(){return typeof w=="function"?w:yS},[w]),B=u.useMemo(function(){return typeof x=="function"?x:yS},[x]),G=u.useRef(null),Y=u.useRef(null),V=u.useReducer(mW,H1),L=hv(V,2),X=L[0],z=L[1],K=X.isFocused,ne=X.isFileDialogActive,Q=u.useRef(typeof window<"u"&&window.isSecureContext&&k&&ZV()),ie=function(){!Q.current&&ne&&setTimeout(function(){if(Y.current){var Re=Y.current.files;Re.length||(z({type:"closeDialog"}),B())}},300)};u.useEffect(function
|
||
|
`),status:"error"})},[i,s]),m=u.useCallback(async j=>{p({file:j,image_category:"user",is_intermediate:!1,postUploadAction:r,board_id:n==="none"?void 0:n})},[n,r,p]),v=u.useCallback((j,I)=>{if(I.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(E=>{h(E)}),j.forEach(E=>{m(E)})},[i,s,m,h]),{getRootProps:b,getInputProps:y,isDragAccept:x,isDragReject:w,isDragActive:k,inputRef:_}=Fx({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>f(!0),disabled:o,multiple:!1});return u.useEffect(()=>{const j=async I=>{var E,O;_.current&&(E=I.clipboardData)!=null&&E.files&&(_.current.files=I.clipboardData.files,(O=_.current)==null||O.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",j),()=>{document.removeEventListener("paste",j)}},[_]),a.jsxs(Ie,{...b({style:{}}),onKeyDown:j=>{j.key},children:[a.jsx("input",{...y()}),t,a.jsx(nr,{children:k&&c&&a.jsx(gn.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.1}},exit:{opacity:0,transition:{duration:.1}},children:a.jsx(OW,{isDragAccept:x,isDragReject:w,setIsHandlingUpload:f})},"image-upload-overlay")})]})},RW=u.memo(DW),AW=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:{placement:o="top",hasArrow:s=!0,...i}={},isChecked:c,...f}=e;return a.jsx(Dt,{label:r,placement:o,hasArrow:s,...i,children:a.jsx(vc,{ref:t,colorScheme:c?"accent":"base",...f,children:n})})}),it=u.memo(AW);function NW(e){const t=u.createContext(null);return[({children:o,value:s})=>H.createElement(t.Provider,{value:s},o),()=>{const o=u.useContext(t);if(o===null)throw new Error(e);return o}]}function KP(e){return Array.isArray(e)?e:[e]}const TW=()=>{};function $W(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||TW:n=>{var r;n.key==="Escape"&&(e(n),(r=t.onTrigger)==null||r.call(t))}}function qP({data:e}){const t=[],n=[],r=e.reduce((o,s,i)=>(s.group?o[s.group]?o[s.group].push(i):o[s.group]=[i]:n.push(i),o),{});return Object.keys(r).forEach(o=>{t.push(...r[o].map(s=>e[s]))}),t.push(...n.map(o=>e[o])),t}function XP(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==H.Fragment:!1}function YP(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=YP(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function QP(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=YP(t))&&(r&&(r+=" "),r+=n);return r}const LW={app:100,modal:200,popover:300,overlay:400,max:9999};function Hx(e){return LW[e]}function zW(e,t){const n=u.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 FW=T7({key:"mantine",prepend:!0});function BW(){return m5()||FW}var HW=Object.defineProperty,wS=Object.getOwnPropertySymbols,VW=Object.prototype.hasOwnProperty,WW=Object.prototype.propertyIsEnumerable,SS=(e,t,n)=>t in e?HW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UW=(e,t)=>{for(var n in t||(t={}))VW.call(t,n)&&SS(e,n,t[n]);if(wS)for(var n of wS(t))WW.call(t,n)&&SS(e,n,t[n]);return e};const vv="ref";function GW(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(!(vv in n))return{args:e,ref:t};t=n[vv];const r=UW({},n);return delete r[vv],{args:[r],ref:t}}const{cssFactory:KW}=(()=>{function e(n,r,o){const s=[],i=z7(n,s,o);return s.length<2?o:i+r(s)}function t(n){const{cache:r}=n,o=(...i)=>{const{ref:c,args:f}=GW(i),p=$7(f,r.registered);return L7(r,p,!1),`${r.key}-${p.name}${c===void 0?"":` ${c}`}`};return{css:o,cx:(...i)=>e(r.registered,o,QP(i))}}return{cssFactory:t}})();function ZP(){const e=BW();return zW(()=>KW({cache:e}),[e])}function qW({cx:e,classes:t,context:n,classNames:r,name:o,cache:s}){const i=n.reduce((c,f)=>(Object.keys(f.classNames).forEach(p=>{typeof c[p]!="string"?c[p]=`${f.classNames[p]}`:c[p]=`${c[p]} ${f.classNam
|
||
|
* OverlayScrollbars
|
||
|
* Version: 2.2.1
|
||
|
*
|
||
|
* Copyright (c) Rene Haas | KingSora.
|
||
|
* https://github.com/KingSora
|
||
|
*
|
||
|
* Released under the MIT license.
|
||
|
*/function Mt(e,t){if(og(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&Mt(Object.keys(e),n=>t(e[n],n,e));return e}function er(e,t){const n=ni(t);if(Ko(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?Mk(e,s,t):t.reduce((i,c)=>(i[c]=Mk(e,s,c),i),o)}return o}e&&Mt(Br(t),o=>MJ(e,o,t[o]))}const Oo=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const c=(h,m)=>{const v=s,b=h,y=m||(r?!r(v,b):v!==b);return(y||o)&&(s=b,i=v),[s,y,i]};return[t?h=>c(t(s,i),h):c,h=>[s,!!h,i]]},Hd=()=>typeof window<"u",LE=Hd()&&Node.ELEMENT_NODE,{toString:gJ,hasOwnProperty:_v}=Object.prototype,fa=e=>e===void 0,rg=e=>e===null,vJ=e=>fa(e)||rg(e)?`${e}`:gJ.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase(),Va=e=>typeof e=="number",ni=e=>typeof e=="string",ry=e=>typeof e=="boolean",Go=e=>typeof e=="function",Ko=e=>Array.isArray(e),ad=e=>typeof e=="object"&&!Ko(e)&&!rg(e),og=e=>{const t=!!e&&e.length,n=Va(t)&&t>-1&&t%1==0;return Ko(e)||!Go(e)&&n?t>0&&ad(e)?t-1 in e:!0:!1},tb=e=>{if(!e||!ad(e)||vJ(e)!=="object")return!1;let t;const n="constructor",r=e[n],o=r&&r.prototype,s=_v.call(e,n),i=o&&_v.call(o,"isPrototypeOf");if(r&&!s&&!i)return!1;for(t in e);return fa(t)||_v.call(e,t)},Kh=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===LE:!1},sg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===LE:!1},oy=(e,t,n)=>e.indexOf(t,n),Lt=(e,t,n)=>(!n&&!ni(t)&&og(t)?Array.prototype.push.apply(e,t):e.push(t),e),Wi=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(r=>{Lt(n,r)}):Mt(e,r=>{Lt(n,r)}),n)},sy=e=>!!e&&e.length===0,js=(e,t,n)=>{Mt(e,o=>o&&o.apply(void 0,t||[])),!n&&(e.length=0)},ag=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Br=e=>e?Object.keys(e):[],cn=(e,t,n,r,o,s,i)=>{const c=[t,n,r,o,s,i];return(typeof e!="object"||rg(e))&&!Go(e)&&(e={}),Mt(c,f=>{Mt(Br(f),p=>{const h=f[p];if(e===h)return!0;const m=Ko(h);if(h&&(tb(h)||m)){const v=e[p];let b=v;m&&!Ko(v)?b=[]:!m&&!tb(v)&&(b={}),e[p]=cn(b,h)}else e[p]=h})}),e},ay=e=>{for(const t in e)return!1;return!0},zE=(e,t,n,r)=>{if(fa(r))return n?n[e]:t;n&&(ni(r)||Va(r))&&(n[e]=r)},Jn=(e,t,n)=>{if(fa(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},yr=(e,t)=>{e&&e.removeAttribute(t)},Ii=(e,t,n,r)=>{if(n){const o=Jn(e,t)||"",s=new Set(o.split(" "));s[r?"add":"delete"](n);const i=Wi(s).join(" ").trim();Jn(e,t,i)}},bJ=(e,t,n)=>{const r=Jn(e,t)||"";return new Set(r.split(" ")).has(n)},zo=(e,t)=>zE("scrollLeft",0,e,t),Zs=(e,t)=>zE("scrollTop",0,e,t),nb=Hd()&&Element.prototype,FE=(e,t)=>{const n=[],r=t?sg(t)?t:null:document;return r?Lt(n,r.querySelectorAll(e)):n},xJ=(e,t)=>{const n=t?sg(t)?t:null:document;return n?n.querySelector(e):null},qh=(e,t)=>sg(e)?(nb.matches||nb.msMatchesSelector).call(e,t):!1,iy=e=>e?Wi(e.childNodes):[],ra=e=>e?e.parentElement:null,Gl=(e,t)=>{if(sg(e)){const n=nb.closest;if(n)return n.call(e,t);do{if(qh(e,t))return e;e=ra(e)}while(e)}return null},yJ=(e,t,n)=>{const r=e&&Gl(e,t),o=e&&xJ(n,r),s=Gl(o,t)===r;return r&&o?r===e||o===e||s&&Gl(Gl(e,n),t)!==r:!1},ly=(e,t,n)=>{if(n&&e){let r=t,o;og(n)?(o=document.createDocumentFragment(),Mt(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)}},io=(e,t)=>{ly(e,null,t)},CJ=(e,t)=>{ly(ra(e),e,t)},Ik=(e,t)=>{ly(ra(e),e&&e.nextSibling,t)},bs=e=>{if(og(e))Mt(Wi(e),t=>bs(t));else if(e){const t=ra(e);t&&t.removeChild(e)}},Ei=e=>{const t=document.createElement("div");return e&&Jn(t,"class",e),t},BE=e=>{const t=Ei();return t.innerHTML=e.trim(),Mt(iy(t),n=>bs(n))},rb=e=>e.charAt(0).toUpperCase()+e.slice(1),wJ=()=>Ei().style,SJ=["-webkit-","-moz-","-o-","-ms-"],kJ=["WebKit","Moz","O","MS","webkit","moz","o","ms"],jv={},Pv={},_J=e=>{let t=Pv[e];if(ag(Pv,e))return t;const n=rb(e),r=wJ();return Mt(SJ,o=>{const s=o.replace(/-/g,"");return!(t=[e,o+e,s+n,rb(s)+n].find(c=>r[c]!==void 0))}),Pv[e]=t||""},Vd=e=>{if(Hd()){let t=jv[e]||window[e];return ag(jv,e)||(Mt(kJ,n=>(t=t||window[n+rb(e)],!t)),jv[e]=t),t}},jJ=Vd("MutationObserver"),Ek=Vd("IntersectionObserver"),Kl=Vd("ResizeObserver"),HE=Vd("cancelAnimationFrame"),V
|
||
|
* @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 the=function(t){var n={},r=u,o=Ip,s=Object.assign;function i(l){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),E=Symbol.iterator;function O(l){return l===null||typeof l!="object"?null:(l=E&&l[E]||l["@@iterator"],typeof l=="function"?l:null)}function M(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case p:return"Portal";case v:return"Profiler";case m:return"StrictMode";case w:return"Suspense";case k:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case y:return(l.displayName||"Context")+".Consumer";case b:return(l._context.displayName||"Context")+".Provider";case x:var d=l.render;return l=l.displayName,l||(l=d.displayName||d.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case _:return d=l.displayName||null,d!==null?d:M(l.type)||"Memo";case j:d=l._payload,l=l._init;try{return M(l(d))}catch{}}return null}function D(l){var d=l.type;switch(l.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=d.render,l=l.displayName||l.name||"",d.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(d);case 8:return d===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 d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function A(l){var d=l,g=l;if(l.alternate)for(;d.return;)d=d.return;else{l=d;do d=l,d.flags&4098&&(g=d.return),l=d.return;while(l)}return d.tag===3?g:null}function R(l){if(A(l)!==l)throw Error(i(188))}function T(l){var d=l.alternate;if(!d){if(d=A(l),d===null)throw Error(i(188));return d!==l?null:l}for(var g=l,C=d;;){var S=g.return;if(S===null)break;var P=S.alternate;if(P===null){if(C=S.return,C!==null){g=C;continue}break}if(S.child===P.child){for(P=S.child;P;){if(P===g)return R(S),l;if(P===C)return R(S),d;P=P.sibling}throw Error(i(188))}if(g.return!==C.return)g=S,C=P;else{for(var N=!1,Z=S.child;Z;){if(Z===g){N=!0,g=S,C=P;break}if(Z===C){N=!0,C=S,g=P;break}Z=Z.sibling}if(!N){for(Z=P.child;Z;){if(Z===g){N=!0,g=P,C=S;break}if(Z===C){N=!0,C=P,g=S;break}Z=Z.sibling}if(!N)throw Error(i(189))}}if(g.alternate!==C)throw Error(i(190))}if(g.tag!==3)throw Error(i(188));return g.stateNode.current===g?l:d}function q(l){return l=T(l),l!==null?B(l):null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var d=B(l);if(d!==null)return d;l=l.sibling}return null}function G(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var d=G(l);if(d!==null)return d}l=l.sibling}return null}var Y=Array.isArray,V=t.getPublicInstance,L=t.getRootHostContext,X=t.getChildHostContext,z=t.prepareForCommit,K=t.resetAfterCommit,ne=t.createInstance,Q=t.appendInitialChild,ie=t.finalizeInitialChildren,oe=t.prepareUpdate,W=t.shouldSetTextContent,U=t.createTextInstance,ee=t.scheduleTimeout,se=t.cancelTimeout,re=t.noTimeout,fe=t.isPrimaryRenderer,de=t.supportsMutation,me=t.supportsPersistence,ye=t.supportsHydration,he=t.ge
|
||
|
`+Yc+l}var Qc=!1;function Zc(l,d){if(!l||Qc)return"";Qc=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(Ee){var C=Ee}Reflect.construct(l,[],d)}else{try{d.call()}catch(Ee){C=Ee}l.call(d.prototype)}else{try{throw Error()}catch(Ee){C=Ee}l()}}catch(Ee){if(Ee&&C&&typeof Ee.stack=="string"){for(var S=Ee.stack.split(`
|
||
|
`),P=C.stack.split(`
|
||
|
`),N=S.length-1,Z=P.length-1;1<=N&&0<=Z&&S[N]!==P[Z];)Z--;for(;1<=N&&0<=Z;N--,Z--)if(S[N]!==P[Z]){if(N!==1||Z!==1)do if(N--,Z--,0>Z||S[N]!==P[Z]){var ce=`
|
||
|
`+S[N].replace(" at new "," at ");return l.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",l.displayName)),ce}while(1<=N&&0<=Z);break}}}finally{Qc=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?ai(l):""}var Rg=Object.prototype.hasOwnProperty,va=[],Je=-1;function wt(l){return{current:l}}function bt(l){0>Je||(l.current=va[Je],va[Je]=null,Je--)}function St(l,d){Je++,va[Je]=l.current,l.current=d}var Kn={},Vt=wt(Kn),kn=wt(!1),lr=Kn;function ul(l,d){var g=l.type.contextTypes;if(!g)return Kn;var C=l.stateNode;if(C&&C.__reactInternalMemoizedUnmaskedChildContext===d)return C.__reactInternalMemoizedMaskedChildContext;var S={},P;for(P in g)S[P]=d[P];return C&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=d,l.__reactInternalMemoizedMaskedChildContext=S),S}function mr(l){return l=l.childContextTypes,l!=null}function Yd(){bt(kn),bt(Vt)}function Xy(l,d,g){if(Vt.current!==Kn)throw Error(i(168));St(Vt,d),St(kn,g)}function Yy(l,d,g){var C=l.stateNode;if(d=d.childContextTypes,typeof C.getChildContext!="function")return g;C=C.getChildContext();for(var S in C)if(!(S in d))throw Error(i(108,D(l)||"Unknown",S));return s({},g,C)}function Qd(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Kn,lr=Vt.current,St(Vt,l),St(kn,kn.current),!0}function Qy(l,d,g){var C=l.stateNode;if(!C)throw Error(i(169));g?(l=Yy(l,d,lr),C.__reactInternalMemoizedMergedChildContext=l,bt(kn),bt(Vt),St(Vt,l)):bt(kn),St(kn,g)}var yo=Math.clz32?Math.clz32:b8,g8=Math.log,v8=Math.LN2;function b8(l){return l>>>=0,l===0?32:31-(g8(l)/v8|0)|0}var Zd=64,Jd=4194304;function Jc(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 ef(l,d){var g=l.pendingLanes;if(g===0)return 0;var C=0,S=l.suspendedLanes,P=l.pingedLanes,N=g&268435455;if(N!==0){var Z=N&~S;Z!==0?C=Jc(Z):(P&=N,P!==0&&(C=Jc(P)))}else N=g&~S,N!==0?C=Jc(N):P!==0&&(C=Jc(P));if(C===0)return 0;if(d!==0&&d!==C&&!(d&S)&&(S=C&-C,P=d&-d,S>=P||S===16&&(P&4194240)!==0))return d;if(C&4&&(C|=g&16),d=l.entangledLanes,d!==0)for(l=l.entanglements,d&=C;0<d;)g=31-yo(d),S=1<<g,C|=l[g],d&=~S;return C}function x8(l,d){switch(l){case 1:case 2:case 4:return d+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 d+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 y8(l,d){for(var g=l.suspendedLanes,C=l.pingedLanes,S=l.expirationTimes,P=l.pendingLanes;0<P;){var N=31-yo(P),Z=1<<N,ce=S[N];ce===-1?(!(Z&g)||Z&C)&&(S[N]=x8(Z,d)):ce<=d&&(l.expiredLanes|=Z),P&=~Z}}function Ag(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function Zy(){var l=Zd;return Zd<<=1,!(Zd&4194240)&&(Zd=64),l}function Ng(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function eu(l,d,g){l.pendingLanes|=d,d!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,d=31-yo(d),l[d]=g}function C8(l,d){var g=l.pendingLanes&~d;l.pendingLanes=d,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=d,l.mutableReadLanes&=d,l.entangledLanes&=d,d=l.entanglements;var C=l.eventTimes;for(l=l.expirationTimes;0<g;){var S=31-yo(g),P=1<<S;d[S]=0,C[S]=-1,l[S]=-1,g&=~P}}function Tg(l,d){var g=l.entangledLanes|=d;for(l=l.entanglements;g;){var C=31-yo(g),S=1<<C;S&d|l[C]&d&&(l[C]|=d),g&=~S}}var It=0;function Jy(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var $g=o.unstable_scheduleCallback,e2=o.unstable_cancelCallback,w8=o.unsta
|
||
|
Error generating stack: `+P.message+`
|
||
|
`+P.stack}return{value:l,source:d,stack:S,digest:null}}function f0(l,d,g){return{value:l,source:null,stack:g??null,digest:d??null}}function p0(l,d){try{console.error(d.value)}catch(g){setTimeout(function(){throw g})}}var L8=typeof WeakMap=="function"?WeakMap:Map;function B2(l,d,g){g=As(-1,g),g.tag=3,g.payload={element:null};var C=d.value;return g.callback=function(){Rf||(Rf=!0,R0=C),p0(l,d)},g}function H2(l,d,g){g=As(-1,g),g.tag=3;var C=l.type.getDerivedStateFromError;if(typeof C=="function"){var S=d.value;g.payload=function(){return C(S)},g.callback=function(){p0(l,d)}}var P=l.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){p0(l,d),typeof C!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var N=d.stack;this.componentDidCatch(d.value,{componentStack:N!==null?N:""})}),g}function V2(l,d,g){var C=l.pingCache;if(C===null){C=l.pingCache=new L8;var S=new Set;C.set(d,S)}else S=C.get(d),S===void 0&&(S=new Set,C.set(d,S));S.has(g)||(S.add(g),l=Z8.bind(null,l,d,g),d.then(l,l))}function W2(l){do{var d;if((d=l.tag===13)&&(d=l.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return l;l=l.return}while(l!==null);return null}function U2(l,d,g,C,S){return l.mode&1?(l.flags|=65536,l.lanes=S,l):(l===d?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(d=As(-1,1),d.tag=2,xa(g,d,1))),g.lanes|=1),l)}var z8=c.ReactCurrentOwner,gr=!1;function cr(l,d,g,C){d.child=l===null?b2(d,null,g,C):gl(d,l.child,g,C)}function G2(l,d,g,C,S){g=g.render;var P=d.ref;return ml(d,S),C=a0(l,d,g,C,P,S),g=i0(),l!==null&&!gr?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~S,Ns(l,d,S)):(Qt&&g&&Bg(d),d.flags|=1,cr(l,d,C,S),d.child)}function K2(l,d,g,C,S){if(l===null){var P=g.type;return typeof P=="function"&&!z0(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(d.tag=15,d.type=P,q2(l,d,P,C,S)):(l=zf(g.type,null,C,d,d.mode,S),l.ref=d.ref,l.return=d,d.child=l)}if(P=l.child,!(l.lanes&S)){var N=P.memoizedProps;if(g=g.compare,g=g!==null?g:af,g(N,C)&&l.ref===d.ref)return Ns(l,d,S)}return d.flags|=1,l=ka(P,C),l.ref=d.ref,l.return=d,d.child=l}function q2(l,d,g,C,S){if(l!==null){var P=l.memoizedProps;if(af(P,C)&&l.ref===d.ref)if(gr=!1,d.pendingProps=C=P,(l.lanes&S)!==0)l.flags&131072&&(gr=!0);else return d.lanes=l.lanes,Ns(l,d,S)}return h0(l,d,g,C,S)}function X2(l,d,g){var C=d.pendingProps,S=C.children,P=l!==null?l.memoizedState:null;if(C.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(Cl,Ar),Ar|=g;else{if(!(g&1073741824))return l=P!==null?P.baseLanes|g:g,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:l,cachePool:null,transitions:null},d.updateQueue=null,St(Cl,Ar),Ar|=l,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},C=P!==null?P.baseLanes:g,St(Cl,Ar),Ar|=C}else P!==null?(C=P.baseLanes|g,d.memoizedState=null):C=g,St(Cl,Ar),Ar|=C;return cr(l,d,S,g),d.child}function Y2(l,d){var g=d.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(d.flags|=512,d.flags|=2097152)}function h0(l,d,g,C,S){var P=mr(g)?lr:Vt.current;return P=ul(d,P),ml(d,S),g=a0(l,d,g,C,P,S),C=i0(),l!==null&&!gr?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~S,Ns(l,d,S)):(Qt&&C&&Bg(d),d.flags|=1,cr(l,d,g,S),d.child)}function Q2(l,d,g,C,S){if(mr(g)){var P=!0;Qd(d)}else P=!1;if(ml(d,S),d.stateNode===null)Cf(l,d),h2(d,g,C),Jg(d,g,C,S),C=!0;else if(l===null){var N=d.stateNode,Z=d.memoizedProps;N.props=Z;var ce=N.context,Ee=g.contextType;typeof Ee=="object"&&Ee!==null?Ee=Kr(Ee):(Ee=mr(g)?lr:Vt.current,Ee=ul(d,Ee));var Ke=g.getDerivedStateFromProps,pt=typeof Ke=="function"||typeof N.getSnapshotBeforeUpdate=="function";pt||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(Z!==C||ce!==Ee)&&m2(d,N,C,Ee),ba=!1;var He=d.memoizedState;N.state=He,df(d,C,N,S),ce=d.memoizedState,Z!==C||He!==ce||kn.current||ba?(typeof Ke=="function"&&(Zg(d,g,Ke,C),ce=d.memoizedState),(Z=ba||p2(d,g,Z,C,He,ce,Ee))?(pt||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMo
|
||
|
`+(C.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 V(l.child.stateNode);default:return l.child.stateNode}},n.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:o7,findFiberByHostInstance:l.findFiberByHostInstance||s7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)l=!0;else{try{tf=d.inject(l),Yo=d}catch{}l=!!d.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,d,g,C){if(!Ue)throw Error(i(363));l=I0(l,d);var S=mt(l,g,C).disconnect;return{disconnect:function(){S()}}},n.registerMutableSourceForHydration=function(l,d){var g=d._getVersion;g=g(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,g]:l.mutableSourceEagerHydrationData.push(d,g)},n.runWithPriority=function(l,d){var g=It;try{return It=l,d()}finally{It=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,d,g,C){var S=d.current,P=Qn(),N=wa(S);return g=IC(g),d.context===null?d.context=g:d.pendingContext=g,d=As(P,N),d.payload={element:l},C=C===void 0?null:C,C!==null&&(d.callback=C),l=xa(S,d,N),l!==null&&(Yr(l,S,N,P),uf(l,S,N)),N},n};o8.exports=the;var nhe=o8.exports;const rhe=Dc(nhe);var s8={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;s8.exports=al;var a8=s8.exports;const aj={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ij=!1,lj=!1;const Gy=".react-konva-event",ohe=`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
|
||
|
`,she=`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
|
||
|
`,ahe={};function Og(e,t,n=ahe){if(!ij&&"zIndex"in t&&(console.warn(she),ij=!0),!lj&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(ohe),lj=!0)}for(var s in n)if(!aj[s]){var i=s.slice(0,2)==="on",c=n[s]!==t[s];if(i&&c){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,n[s])}var p=!t.hasOwnProperty(s);p&&e.setAttr(s,void 0)}var h=t._useStrictMode,m={},v=!1;const b={};for(var s in t)if(!aj[s]){var i=s.slice(0,2)==="on",y=n[s]!==t[s];if(i&&y){var f=s.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),t[s]&&(b[f]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),si(e));for(var f in b)e.on(f+Gy,b[f])}function si(e){if(!o9.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const i8={},ihe={};dd.Node.prototype._applyProps=Og;function lhe(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),si(e)}function che(e,t,n){let r=dd[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=dd.Group);const o={},s={};for(var i in t){var c=i.slice(0,2)==="on";c?s[i]=t[i]:o[i]=t[i]}const f=new r(o);return Og(f,s),f}function uhe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function dhe(e,t,n){return!1}function fhe(e){return e}function phe(){return null}function hhe(){return null}function mhe(e,t,n,r){return ihe}function ghe(){}function vhe(e){}function bhe(e,t){return!1}function xhe(){return i8}function yhe(){return i8}const Che=setTimeout,whe=clearTimeout,She=-1;function khe(e,t){return!1}const _he=!1,jhe=!0,Phe=!0;function Ihe(e,t){t.parent===e?t.moveToTop():e.add(t),si(e)}function Ehe(e,t){t.parent===e?t.moveToTop():e.add(t),si(e)}function l8(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),si(e)}function Ohe(e,t,n){l8(e,t,n)}function Mhe(e,t){t.destroy(),t.off(Gy),si(e)}function Dhe(e,t){t.destroy(),t.off(Gy),si(e)}function Rhe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Ahe(e,t,n){}function Nhe(e,t,n,r,o){Og(e,o,r)}function The(e){e.hide(),si(e)}function $he(e){}function Lhe(e,t){(t.visible==null||t.visible)&&e.show()}function zhe(e,t){}function Fhe(e){}function Bhe(){}const Hhe=()=>a8.DefaultEventPriority,Vhe=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Ihe,appendChildToContainer:Ehe,appendInitialChild:lhe,cancelTimeout:whe,clearContainer:Fhe,commitMount:Ahe,commitTextUpdate:Rhe,commitUpdate:Nhe,createInstance:che,createTextInstance:uhe,detachDeletedInstance:Bhe,finalizeInitialChildren:dhe,getChildHostContext:yhe,getCurrentEventPriority:Hhe,getPublicInstance:fhe,getRootHostContext:xhe,hideInstance:The,hideTextInstance:$he,idlePriority:Ip.unstable_IdlePriority,insertBefore:l8,insertInContainerBefore:Ohe,isPrimaryRenderer:_he,noTimeout:She,now:Ip.unstable_now,prepareForCommit:phe,preparePortalMount:hhe,prepareUpdate:mhe,removeChild:Mhe,removeChildFromContainer:Dhe,resetAfterCommit:ghe,resetTextContent:vhe,run:Ip.unstable_runWithPriority,scheduleTimeout:Che,shouldDeprioritizeSubtree:bhe,shouldSetTextContent:khe,supportsMutation:Phe,unhideInstance:Lhe,unhideTextInstance:zhe,warnsIfNotActing:jhe},Symbol.toStringTag,{value:"Module"}));var Whe=Object.defineProperty,Uhe=Object.defineProperties,Ghe=Object.getOwnPropertyDescriptors,cj=Object.getOwnPropertySymbols,Khe=Object.prototype.hasOwnProperty,qhe=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?Whe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dj=(e,t)=>{for(var n in t||(t={}))Khe.call(t,n)&&uj(e,n,t[n]);if(cj)for(var n of cj(t))qhe.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),jme=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:o,stageScale:s}=F(_me),[i,c]=u.useState(null),[f,p]=u.useState(0),h=u.useRef(null),m=u.useCallback(()=>{p(f+1),setTimeout(m,500)},[f]);return u.useEffect(()=>{if(i)return;const v=new Image;v.onload=()=>{c(v)},v.src=hj(n)},[i,n]),u.useEffect(()=>{i&&(i.src=hj(n))},[i,n]),u.useEffect(()=>{const v=setInterval(()=>p(b=>(b+1)%5),50);return()=>clearInterval(v)},[]),!i||!Sl(r.x)||!Sl(r.y)||!Sl(s)||!Sl(o.width)||!Sl(o.height)?null:a.jsx(ks,{ref:h,offsetX:r.x/s,offsetY:r.y/s,height:o.height/s,width:o.width/s,fillPatternImage:i,fillPatternOffsetY:Sl(f)?f:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/s,y:1/s},listening:!0,globalCompositeOperation:"source-in",...t})},Pme=u.memo(jme),Ime=ae([$t],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:kt}}),Eme=e=>{const{...t}=e,{objects:n}=F(Ime);return a.jsx(sa,{listening:!1,...t,children:n.filter(v9).map((r,o)=>a.jsx(lm,{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))})},Ome=u.memo(Eme);var bi=u,Mme=function(t,n,r){const o=bi.useRef("loading"),s=bi.useRef(),[i,c]=bi.useState(0),f=bi.useRef(),p=bi.useRef(),h=bi.useRef();return(f.current!==t||p.current!==n||h.current!==r)&&(o.current="loading",s.current=void 0,f.current=t,p.current=n,h.current=r),bi.useLayoutEffect(function(){if(!t)return;var m=document.createElement("img");function v(){o.current="loaded",s.current=m,c(Math.random())}function b(){o.current="failed",s.current=void 0,c(Math.random())}return m.addEventListener("load",v),m.addEventListener("error",b),n&&(m.crossOrigin=n),r&&(m.referrerPolicy=r),m.src=t,function(){m.removeEventListener("load",v),m.removeEventListener("error",b)}},[t,n,r]),[s.current,o.current]};const Dme=Dc(Mme),Rme=e=>{const{width:t,height:n,x:r,y:o,imageName:s}=e.canvasImage,{currentData:i,isError:c}=fo(s??Lr.skipToken),[f]=Dme((i==null?void 0:i.image_url)??"",b9.get()?"use-credentials":"anonymous");return c?a.jsx(ks,{x:r,y:o,width:t,height:n,fill:"red"}):a.jsx(f8,{x:r,y:o,image:f,listening:!1})},h8=u.memo(Rme),Ame=ae([$t],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:kt}}),Nme=()=>{const{objects:e}=F(Ame);return e?a.jsx(sa,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(x9(t))return a.jsx(h8,{canvasImage:t},n);if(y9(t)){const r=a.jsx(lm,{points:t.points,stroke:t.color?Di(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(sa,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(C9(t))return a.jsx(ks,{x:t.x,y:t.y,width:t.width,height:t.height,fill:Di(t.color)},n);if(w9(t))return a.jsx(ks,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},Tme=u.memo(Nme),$me=ae([$t],e=>{const{layerState:t,shouldShowStagingImage:n,shouldShowStagingOutline:r,boundingBoxCoordinates:{x:o,y:s},boundingBoxDimensions:{width:i,height:c}}=e,{selectedImageIndex:f,images:p}=t.stagingArea;return{currentStagingAreaImage:p.length>0&&f!==void 0?p[f]:void 0,isOnFirstImage:f===0,isOnLastImage:f===p.length-1,shouldShowStagingImage:n,shouldShowStagingOutline:r,x:o,y:s,width:i,height:c}},{memoizeOptions:{resultEqualityCheck:kt}}),Lme=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:o,x:s,y:i,width:c,height:f}=F($me);return a.jsxs(sa,{...t,children:[r&&n&&a.jsx(h8,{canvasImage:n}),o&&a.jsxs(sa,{children:[a.jsx(ks,{x:s,y:i,width:c,height:f,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),a.jsx(ks,{x:s,y:i,width:c,height:f,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},zme=u.memo(Lme),Fme=ae([$t],e=>{const{la
|
||
|
${s}
|
||
|
\`\`\``),n({title:"Error Copied"})},[e,n]),o=u.useMemo(()=>Gge({user:"invoke-ai",repo:"InvokeAI",template:"BUG_REPORT.yml",title:`[bug]: ${e.name}: ${e.message}`}),[e.message,e.name]);return a.jsx($,{layerStyle:"body",sx:{w:"100vw",h:"100vh",alignItems:"center",justifyContent:"center",p:4},children:a.jsxs($,{layerStyle:"first",sx:{flexDir:"column",borderRadius:"base",justifyContent:"center",gap:8,p:16},children:[a.jsx(ro,{children:"Something went wrong"}),a.jsx($,{layerStyle:"second",sx:{px:8,py:4,borderRadius:"base",gap:4,justifyContent:"space-between",alignItems:"center"},children:a.jsxs(xe,{sx:{fontWeight:600,color:"error.500",_dark:{color:"error.400"}},children:[e.name,": ",e.message]})}),a.jsxs($,{sx:{gap:4},children:[a.jsx(it,{leftIcon:a.jsx(Lpe,{}),onClick:t,children:"Reset UI"}),a.jsx(it,{leftIcon:a.jsx(Hc,{}),onClick:r,children:"Copy Error"}),a.jsx(Im,{href:o,isExternal:!0,children:a.jsx(it,{leftIcon:a.jsx(jE,{}),children:"Create Issue"})})]})]})})},qge=u.memo(Kge),Xge=ae([be],({hotkeys:e})=>{const{shift:t,ctrl:n,meta:r}=e;return{shift:t,ctrl:n,meta:r}},{memoizeOptions:{resultEqualityCheck:kt}}),Yge=()=>{const e=J(),{shift:t,ctrl:n,meta:r}=F(Xge);return Qe("*",()=>{Tp("shift")?!t&&e(Pr(!0)):t&&e(Pr(!1)),Tp("ctrl")?!n&&e(gw(!0)):n&&e(gw(!1)),Tp("meta")?!r&&e(vw(!0)):r&&e(vw(!1))},{keyup:!0,keydown:!0},[t,n,r]),Qe("1",()=>{e(Ra("txt2img"))}),Qe("2",()=>{e(Ra("img2img"))}),Qe("3",()=>{e(Ra("unifiedCanvas"))}),Qe("4",()=>{e(Ra("nodes"))}),Qe("5",()=>{e(Ra("modelManager"))}),null},Qge=u.memo(Yge),Zge={},Jge=({config:e=Zge,headerComponent:t,selectedImage:n})=>{const r=F(OP),o=MP("system"),s=J(),{handlePreselectedImage:i}=Uge(),c=u.useCallback(()=>(localStorage.clear(),location.reload(),!1),[]);return u.useEffect(()=>{xn.changeLanguage(r)},[r]),u.useEffect(()=>{qj(e)&&(o.info({config:e},"Received config"),s(iN(e)))},[s,e,o]),u.useEffect(()=>{s(lN())},[s]),u.useEffect(()=>{i(n)},[i,n]),a.jsxs(Vge,{onReset:c,FallbackComponent:qge,children:[a.jsx(Ua,{w:"100vw",h:"100vh",position:"relative",overflow:"hidden",children:a.jsx(RW,{children:a.jsxs(Ua,{sx:{gap:4,p:4,gridAutoRows:"min-content auto",w:"full",h:"full"},children:[t||a.jsx(fJ,{}),a.jsx($,{sx:{gap:4,w:"full",h:"full"},children:a.jsx(Bge,{})})]})})}),a.jsx(QQ,{}),a.jsx(GQ,{}),a.jsx(wV,{}),a.jsx(Qge,{})]})},l0e=u.memo(Jge);export{l0e as default};
|