2023-07-19 03:18:46 +00:00
import { t as Hg , r as XI , i as JI , a as pu , b as JC , S as ZC , c as e4 , d as t4 , e as Wg , f as n4 , g as Vg , h as ZI , j as eE , k as tE , l as nE , m as rE , n as oE , o as sE , p as aE , q as iE , s as f , u as et , v as a , I as lo , w as cr , x as Hn , y as He , z as kt , A as hu , B as ht , C as mu , D as ws , E as to , F as no , G as wr , H as lE , J as cE , K as Ha , L as Wc , M as Ni , N as on , O as ga , P as Hp , Q as J0 , R as Cl , T as Z0 , U as gu , _ as Qn , V as uE , W as N , X as r4 , Y as o4 , Z as Ab , $ as s4 , a0 as Wp , a1 as ev , a2 as Yl , a3 as dE , a4 as fE , a5 as pE , a6 as hE , a7 as a4 , a8 as i4 , a9 as Vp , aa as bf , ab as mE , ac as gE , ad as Bm , ae as Nb , af as vE , ag as l4 , ah as c4 , ai as Ql , aj as $b , ak as zb , al as yE , am as bE , an as xE , ao as wE , ap as SE , aq as Fm , ar as rl , as as Hm , at as CE , au as _E , av as kE , aw as tv , ax as Up , ay as xf , az as PE , aA as u4 , aB as d4 , aC as jE , aD as vu , aE as nv , aF as IE , aG as EE , aH as OE , aI as RE , aJ as ME , aK as DE , aL as TE , aM as Lb , aN as Ne , aO as F , aP as ta , aQ as be , aR as _o , aS as ur , aT as ee , aU as L , aV as Xl , aW as de , aX as f4 , aY as p4 , aZ as Jl , a _ as ko , a$ as Ve , b0 as Sn , b1 as wf , b2 as AE , b3 as Wa , b4 as rv , b5 as Sf , b6 as h4 , b7 as ov , b8 as Rt , b9 as sv , ba as NE , bb as $E , bc as zE , bd as ol , be as gs , bf as m4 , bg as LE , bh as BE , bi as yu , bj as it , bk as av , bl as Va , bm as Bb , bn as FE , bo as HE , bp as WE , bq as Cd , br as _d , bs as Vc , bt as Uc , bu as Fb , bv as Cf , bw as Hb , bx as _f , by as Wb , bz as Ug , bA as Vb , bB as Gg , bC as Ub , bD as kf , bE as Gb , bF as Al , bG as qb , bH as Nl , bI as Kb , bJ as Pf , bK as VE , bL as jf , bM as g4 , bN as iv , bO as lv , bP as UE , bQ as v4 , bR as GE , bS as qE , bT as Gp , bU as vl , bV as KE , bW as df , bX as je , bY as YE , bZ as QE , b _ as XE , b$ as If , c0 as Zl , c1 as y4 , c2 as JE , c3 as b4 , c4 as Yb , c5 as Qb , c6 as ZE , c7 as Ls , c8 as Xb , c9 as wt , ca as Ef , cb as e8 , cc as x4 , cd as qr , ce as t8 , cf as Xn , cg as Kt , ch as qg , ci as Bs , cj as Ss , ck as vs , cl as w4 , cm as n8 , cn as S4 , co as Jb , cp as r8 , cq as o8 , cr as s8 , cs as a8 , ct as vr , cu as C4 , cv as i8 , cw as l8 , cx as c8 , cy as u8 , cz as d8 , cA as cv , cB as qo , cC as _4 , cD as k4 , cE as f8 , cF as Zb , cG as p8 , cH as h8 , cI as m8 , cJ as g8 , cK as v8 , cL as y8 , cM as b8 , cN as P4 , cO as x8 , cP as w8 , cQ as S8 , cR as C8 , cS as _8 , cT as k8 , cU as Nr , cV as j4 , cW as P8 , cX as ex , cY as j8 , cZ as I8 , c _ as E8 , c$ as O8 , d0 as R8 , d1 as M8 , d2 as D8 , d3 as T8 , d4 as I4 , d5 as fo , d6 as A8 , d7 as N8 , d8 as $8 , d9 as qp , da as z8 , db as uv , dc as E4 , dd as L8 , de as B8 , df as F8 , dg as Yo , dh as H8 , di as tx , dj as nx , dk as _l , dl as W8 , dm as V8 , dn as U8 , dp as G8 , dq as q8 , dr as K8 , ds as Y8 , dt as Q8 , du as X8 , dv as J8 , dw as Z8 , dx as dv , dy as fv , dz as e7 , dA as rx , dB as t7 , dC as ox , dD as Qo , dE as n7 , dF as r7 , dG as sx , dH as ax , dI as o7 , dJ as ix , dK as s7 , dL as a7 , dM as i7 , dN as l7 , dO as c7 , dP as u7 , dQ as O4 , dR as R4 , dS as M4 , dT as D4 , dU as T4 , dV as bu , dW as lx , dX as d7 , dY as _i , dZ as A4 , d _ as f7 , d$ as N4 , e0 as cx , e1 as p7 , e2 as ls , e3 as h7 , e4 as m7 , e5 as $4 , e6 as z4 , e7 as g7 , e8 as L4 , e9 as B4 , ea as rr , eb as or , ec as xu , ed as F4 , ee as H4 , ef as ux , eg as v7 , eh as dx , ei as y7 , ej as W4 , ek as b7 , el as Kp , em as fx , en as V4 , eo as x7 , ep as px , eq as U4 , er as Ko , es as w7 , et as S7 , eu as G4 , ev as C7 , ew as _7 , ex as k7 , ey as P7 , ez as j7 , eA as I7 , eB as E7 , eC as O7 , eD as R7 , eE as M7 , eF as D7 , eG as T7 , eH as A7 , eI as N7 , eJ as $7 , eK as z7 , eL as L7 , eM as B7 , eN as F7 , eO as hx , eP as ff , eQ as H7 , eR as en , eS as Of , eT as q4 , eU as eu , eV as W7 , eW as V7 , eX as zs , eY as K4 , eZ as pv , e _ as wu , e$ as U7 , f0 as G7 , f1 as q7 , f2 as la , f3 as Y4 , f4 as K7 , f5 as Y7 , f6 as Q4 , f7 as Q7 , f8 as X7 , f9 as J7 , fa as Z7 , fb as eO , fc as tO , fd as nO , fe as rO , ff as oO , fg as sO , fh as aO , fi as mx , fj as iO , fk as lO , fl as cO , fm as uO , fn as dO , fo as fO , fp as Wm , fq as $s , fr as kd , fs as Vm , ft as Um , fu as Pd , fv as gx , fw as Kg , fx as pO , fy as hO , fz as mO , fA as gO , fB as vO , fC as Rf , fD as X4 , fE as J4 , fF as yO , fG as bO , fH as Z4 , fI as e3 , fJ as t3 , fK as n3 , fL as r3 , fM as o3 , fN as s3 , fO as a3 , fP as kl , fQ as Pl , fR as i3 , fS as l3 , fT as xO , fU as c3 , fV as u3 , fW as d3 , fX as f3 , fY as p3 , fZ as h3 , f _ as m3 , f$ as hv , g0 as wO , g1 as SO , g2 as vx , g3 as CO , g4 as _O , g5 as Mf , g6 as yx , g7 as bx , g8 as xx , g9 as wx , ga as kO , gb as PO , gc as jO , gd as IO , ge as EO , gf as OO , gg as RO , gh as MO , gi as DO , gj as TO } from "./index-ba194473.js" ; import { m
2023-07-19 03:07:31 +00:00
` })}function P9(e){mu({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function $ c(e){const{isOpen:t,isDisabled:n}=vv(),{reduceMotion:r}=yv(),o=kt("chakra-accordion__icon",e.className),s=Yp(),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(lo,{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"})})} $ c.displayName="AccordionIcon";var zc=et(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=S9(t),d={...Yp().container,overflowAnchor:"none"},p=f.useMemo(()=>i,[i]);return a.jsx(g9,{value:p,children:a.jsx(He.div,{ref:n,...s,className:kt("chakra-accordion__item",o),__css:d,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});zc.displayName="AccordionItem";var gi={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Pc={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function Qg(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return Pc.slideRight;case"left":return Pc.slideLeft;case"bottom":return Pc.slideDown;case"top":return Pc.slideUp;default:return Pc.slideRight}}var yi={enter:{duration:.2,ease:gi.easeOut},exit:{duration:.1,ease:gi.easeIn}},cs={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},j9=e=>e!=null&&parseInt(e.toString(),10)>0,Ix={exit:{height:{duration:.2,ease:gi.ease},opacity:{duration:.3,ease:gi.ease}},enter:{height:{duration:.3,ease:gi.ease},opacity:{duration:.4,ease:gi.ease}}},I9={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:j9(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:cs.exit(Ix.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:cs.enter(Ix.enter,o)}}},Qp=f.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:u,className:d,transition:p,transitionEnd:h,...m}=e,[v,b]=f.useState(!1);f.useEffect(()=>{const k=setTimeout(()=>{b(!0)});return()=>clearTimeout(k)},[]),mu({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(s.toString())>0,w={startingHeight:s,endingHeight:i,animateOpacity:o,transition:v?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:S?"block":"none"}}},C=r?n:!0,_=n||r?"enter":"exit";return a.jsx(ws,{initial:!1,custom:w,children:C&&a.jsx(to.div,{ref:t,...m,className:kt("chakra-collapse",d),style:{overflow:"hidden",display:"block",...u},custom:w,variants:I9,initial:r?"exit":!1,animate:_,exit:"exit"})})});Qp.displayName="Collapse";var E9={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:cs.enter(yi.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:cs.exit(yi.exit,n),transitionEnd:t==null?void 0:t.exi
. ` .concat(jD, ` {
overflow : hidden ` ).concat(r, ` ;
padding - right : ` ).concat(u,"px ").concat(r, ` ;
}
body {
overflow : hidden ` ).concat(r, ` ;
overscroll - behavior : contain ;
` ).concat([t&&"position: relative ".concat(r,";"),n==="margin"&& `
padding - left : ` .concat(o, ` px ;
padding - top : ` ).concat(s, ` px ;
padding - right : ` ).concat(i, ` px ;
margin - left : 0 ;
margin - top : 0 ;
margin - right : ` ).concat(u,"px ").concat(r, ` ;
` ),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""), `
}
. ` ).concat(hf, ` {
right : ` ).concat(u,"px ").concat(r, ` ;
}
. ` ).concat(mf, ` {
margin - right : ` ).concat(u,"px ").concat(r, ` ;
}
. ` ).concat(hf," .").concat(hf, ` {
right : 0 ` ).concat(r, ` ;
}
. ` ).concat(mf," .").concat(mf, ` {
margin - right : 0 ` ).concat(r, ` ;
}
body {
` ).concat(ID,": ").concat(u, ` px ;
}
` )},BD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,s=f.useMemo(function(){return $ D(o)},[o]);return f.createElement(zD,{styles:LD(s,!t,o,n?"":"!important")})},i0=!1;if(typeof window<"u")try{var Ed=Object.defineProperty({},"passive",{get:function(){return i0=!0,!0}});window.addEventListener("test",Ed,Ed),window.removeEventListener("test",Ed,Ed)}catch{i0=!1}var ll=i0?{passive:!1}:!1,FD=function(e){return e.tagName==="TEXTAREA"}, $ 6=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!FD(e)&&n[t]==="visible")},HD=function(e){return $ 6(e,"overflowY")},WD=function(e){return $ 6(e,"overflowX")},Ux=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=z6(e,r);if(o){var s=L6(e,r),i=s[1],u=s[2];if(i>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},VD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},UD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},z6=function(e,t){return e==="v"?HD(t):WD(t)},L6=function(e,t){return e==="v"?VD(t):UD(t)},GD=function(e,t){return e==="h"&&t==="rtl"?-1:1},qD=function(e,t,n,r,o){var s=GD(e,window.getComputedStyle(t).direction),i=s*r,u=n.target,d=t.contains(u),p=!1,h=i>0,m=0,v=0;do{var b=L6(e,u),S=b[0],w=b[1],C=b[2],_=w-C-s*S;(S||_)&&z6(e,u)&&(m+=_,v+=S),u=u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&(o&&m===0||!o&&i>m)||!h&&(o&&v===0||!o&&-i>v))&&(p=!0),p},Od=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gx=function(e){return[e.deltaX,e.deltaY]},qx=function(e){return e&&"current"in e?e.current:e},KD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},YD=function(e){return `
. block - interactivity - ` .concat(e, ` { pointer - events : none ; }
. allow - interactivity - ` ).concat(e, ` { pointer - events : all ; }
` )},QD=0,cl=[];function XD(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(QD++)[0],s=f.useState(N6)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=t0([e.lockRef.current],(e.shards||[]).map(qx),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=f.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!i.current.allowPinchZoom;var _=Od(w),k=n.current,j="deltaX"in w?w.deltaX:k[0]-_[0],E="deltaY"in w?w.deltaY:k[1]-_[1],I,O=w.target,R=Math.abs(j)>Math.abs(E)?"h":"v";if("touches"in w&&R==="h"&&O.type==="range")return!1;var T=Ux(R,O);if(!T)return!0;if(T?I=R:(I=R==="v"?"h":"v",T=Ux(R,O)),!T)return!1;if(!r.current&&"changedTouches"in w&&(j||E)&&(r.current=I),!I)return!0;var A=r.current||I;return qD(A,C,w,A==="h"?j:E,!0)},[]),d=f.useCallback(function(w){var C=w;if(!(!cl.length||cl[cl.length-1]!==s)){var _="deltaY"in C?Gx(C):Od(C),k=t.current.filter(function(I){return I.name===C.type&&I.target===C.target&&KD(I.delta,_)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var j=(i.current.shards||[]).map(qx).filter(Boolean).filter(function(I){return I.contains(C.target)}),E=j.length>0?u(C,j[0]):!i.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),p=f.useCallback(function(w,C,_,k){var j={name:w,delta:C,target:_,should:k};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(E){return E!==j})},1)},[]),h=f.useCallback(function(w){n.current=Od(w),r.current=void 0},[]),m=f.useCallback(function(w){p(w.type,Gx(w),w.target,u(w,e.lockRef.current))},[]),v=f.useCallback(function(w){p(w.type,Od(w),w.target,u(w,e.lockRef.current))},[]);f.useEffect(function(){return cl.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,ll),document.addEventListener("touchmove",d,ll),document.addEventListener("touchstart",h,ll),function(){cl=cl.filter(function(w){return w!==s}),document.removeEventListener("wheel",d,ll),document.removeEventListener("touchmove",d,ll),document.removeEventListener("touchstart",h,ll)}},[]);var b=e.removeScrollBar,S=e.inert;return f.createElement(f.Fragment,null,S?f.createElement(s,{styles:YD(o)}):null,b?f.createElement(BD,{gapMode:e.gapMode}):null)}const JD=CR(A6,XD);var B6=f.forwardRef(function(e,t){return f.createElement(eh,Ns({},e,{ref:t,sideCar:JD}))});B6.classNames=eh.classNames;const ZD=B6;function eT(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:u,returnFocusOnClose:d,preserveScrollBarGap:p,lockFocusAcrossFrames:h,isOpen:m}=ji(),[v,b]=mE();f.useEffect(()=>{!v&&b&&setTimeout(b)},[v,b]);const S=D6(r,m);return a.jsx(y6,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:u,restoreFocus:d,contentRef:r,lockFocusAcrossFrames:h,children:a.jsx(ZD,{removeScrollBar:!p,allowPinchZoom:i,enabled:S===1&&s,forwardProps:!0,children:e.children})})}var su=et((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:u,getDialogContainerProps:d}=ji(),p=u(i,t),h=d(o),m=kt("chakra-modal__content",n),v=rc(),b={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},S={display:"flex",width:"100vw",height:" $ 100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{motionPreset:w}=ji();return a.jsx(eT,{children:a.jsx(He.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S,children:a.jsx(M6,{preset:w,motionProps:s,className:m,...p,__css:b,children:r})})})});su.displayName="ModalContent";function Eu(e){const{leastDestructiveRef:t,...n}=e;return a.jsx(ou,{...n,initialFocusRef:t})}var Ou=et((e,t)=>a.jsx(su,{ref:t,role:"alertdialog",...e})),ca=et((e,t)=>{const{className:
M$ { O . x } , $ { O . y } h$ { O . width } v$ { O . height } h$ { - O . width } z ` ,fill:d,fillRule:"evenodd",stroke:p,strokeWidth:h,pointerEvents:"none"})]})})}r5.displayName="MiniMap";var oA=f.memo(r5),us;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(us||(us={}));function sA({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 aA({color:e,radius:t}){return a.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const iA={[us.Dots]:"#91919a",[us.Lines]:"#eee",[us.Cross]:"#e2e2e2"},lA={[us.Dots]:1,[us.Lines]:1,[us.Cross]:6},cA=e=>({transform:e.transform,patternId: ` pattern - $ { e . rfId } ` });function o5({id:e,variant:t=us.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:i,style:u,className:d}){const p=f.useRef(null),{transform:h,patternId:m}=xf(cA,nv),v=i||iA[t],b=r||lA[t],S=t===us.Dots,w=t===us.Cross,C=Array.isArray(n)?n:[n,n],_=[C[0]*h[2]||1,C[1]*h[2]||1],k=b*h[2],j=w?[k,k]:_,E=S?[k/s,k/s]:[j[0]/s,j[1]/s];return a.jsxs("svg",{className:Up(["react-flow__background",d]),style:{...u,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]%_[0],y:h[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform: ` translate ( - $ { E [ 0 ] } , - $ { E [ 1 ] } ) ` ,children:S?a.jsx(aA,{color:v,radius:k/s}):a.jsx(sA,{dimensions:j,color:v,lineWidth:o})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill: ` url ( # $ { m + e } ) ` })]})}o5.displayName="Background";var uA=f.memo(o5),Gc;(function(e){e.Line="line",e.Handle="handle"})(Gc||(Gc={}));function dA({width:e,prevWidth:t,height:n,prevHeight:r,invertX:o,invertY:s}){const i=e-t,u=n-r,d=[i>0?1:i<0?-1:0,u>0?1:u<0?-1:0];return i&&o&&(d[0]=d[0]*-1),u&&s&&(d[1]=d[1]*-1),d}const s5={width:0,height:0,x:0,y:0},fA={...s5,pointerX:0,pointerY:0,aspectRatio:1};function pA({nodeId:e,position:t,variant:n=Gc.Handle,className:r,style:o={},children:s,color:i,minWidth:u=10,minHeight:d=10,maxWidth:p=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:w}){const C=ME(),_=typeof e=="string"?e:C,k=u4(),j=f.useRef(null),E=f.useRef(fA),I=f.useRef(s5),O=DE(),R=n===Gc.Line?"right":"bottom-right",T=t??R;f.useEffect(()=>{if(!j.current||!_)return;const Z=d4(j.current),B=T.includes("right")||T.includes("left"),H=T.includes("bottom")||T.includes("top"),G=T.includes("left"),Y=T.includes("top"),M=TE().on("start",U=>{const V=k.getState().nodeInternals.get(_),{xSnapped:W,ySnapped:te}=O(U);I.current={width:(V==null?void 0:V.width)??0,height:(V==null?void 0:V.height)??0,x:(V==null?void 0:V.position.x)??0,y:(V==null?void 0:V.position.y)??0},E.current={...I.current,pointerX:W,pointerY:te,aspectRatio:I.current.width/I.current.height},b==null||b(U,{...I.current})}).on("drag",U=>{const{nodeInternals:V,triggerNodeChanges:W}=k.getState(),{xSnapped:te,ySnapped:ve}=O(U),le=V.get(_);if(le){const oe=[],{pointerX:J,pointerY:se,width:ue,height:ye,x:ne,y:me,aspectRatio:fe}=E.current,{x:Ce,y:Me,width:pe,height:Ee}=I.current,st=Math.floor(B?te-J:0), $ e=Math.floor(H?ve-se:0);let Ye=Lb(ue+(G?-st:st),u,p),Pt=Lb(ye+(Y?- $ e: $ e),d,h);if(m){const ze=Ye/Pt,jt=B&&H,Bt=B&&!H,Yt=H&&!B;Ye=ze<=fe&&jt||Yt?Pt*fe:Ye,Pt=ze>fe&&jt||Bt?Ye/fe:Pt,Ye>=p?(Ye=p,Pt=p/fe):Ye<=u&&(Ye=u,Pt=u/fe),Pt>=h?(Pt=h,Ye=h*fe):Pt<=d&&(Pt=d,Ye=d*fe)}const vt=Ye!==pe,Jn=Pt!==Ee;if(G||Y){const ze=G?ne-(Ye-ue):ne,jt=Y?me-(Pt-ye):me,Bt=ze!==Ce&&vt,Yt=jt!==Me&&Jn;if(Bt||Yt){const Pn={id:le.id,type:"position",position:{x:Bt?ze:Ce,y:Yt?jt:Me}};oe.push(Pn),I.current.x=Pn.position.x,I.current.y=Pn.position.y}}if(vt||Jn){const ze={id:_,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Ye,height:Pt}};oe.push(ze),I.current.width=Ye,I.current.height=Pt}if(oe.length===0)return;const $ t=dA({width:I.current.width,prevWidth:pe,height:I.current.height,prevHeight:Ee,invertX:G,invertY:Y}),Dt={...I.current,direction: $ t};if((v==null?void 0:v(U,Dt))===!1)return;S==null||S(U,Dt),W(oe)}}).on("end",U=>{const V={id:_,type:"dimensions",resizing:!1};w==null||w(U,{...I.current}),k.getState().tr
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}function EA(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OA(e){if(Array.isArray(e))return f0(e)}function Zx(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 e2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zx(Object(n),!0).forEach(function(r){l5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function au(e,t){return DA(e)||MA(e,t)||c5(e,t)||RA()}function RA(){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 c5(e,t){if(e){if(typeof e=="string")return f0(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 f0(e,t)}}function f0(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 MA(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,u;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function DA(e){if(Array.isArray(e))return e}var TA="file-invalid-type",AA="file-too-large",NA="file-too-small", $ A="too-many-files",zA=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:TA,message:"File type must be ".concat(n)}},t2=function(t){return{code:AA,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},n2=function(t){return{code:NA,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},LA={code: $ A,message:"Too many files"};function u5(e,t){var n=e.type==="application/x-moz-file"||jA(e,t);return[n,n?null:zA(t)]}function d5(e,t,n){if(hi(e.size))if(hi(t)&&hi(n)){if(e.size>n)return[!1,t2(n)];if(e.size<t)return[!1,n2(t)]}else{if(hi(t)&&e.size<t)return[!1,n2(t)];if(hi(n)&&e.size>n)return[!1,t2(n)]}return[!0,null]}function hi(e){return e!=null}function BA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(d){var p=u5(d,n),h=au(p,1),m=h[0],v=d5(d,r,o),b=au(v,1),S=b[0],w=u?u(d):null;return m&&S&&!w})}function Lf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Rd(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 r2(e){e.preventDefault()}function FA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function HA(e){return e.indexOf("Edge/")!==-1}function WA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FA(e)||HA(e)}function Ds(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(u){return!Lf(r)&&u&&u.apply(void 0,[r].concat(s)),Lf(r)})}}function VA(){return"showOpenFilePicker"in window}function UA(e){if(hi(e)){var t=Object.entries(e).filter(function(n){var r=au(n,2),o=r[0],s=r[1],i=!0;return f5(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(p5))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=au(r,2),s=o[0],i=o[1];return e2(e2({},n),{},l5({},s,i))},{});return[{description:"Files",accept:t}]}return e}function GA(e){if(hi(e))return Object.entries(e).reduce(function(t,n){var r=au(n,2),o=r[0],s=r[1];return[].concat(Jx(t),[o],Jx(s))},[]).filter(function(t){return f5(t)||p5(t)}).join(",")}function qA(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function KA(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function f5(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/ \w + \/ [-+. \w ]+/g.test(e)}function p5(e){return/^.* \. [ \w ]+ $ /.test(e)}var YA=["children"],QA=["open"],XA=["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 tN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nN(e){if(Array.isArray(e))return p0(e)}function ig(e,t){return sN(e)||oN(e,t)||h5(e,t)||rN()}function rN(){throw new TypeError( ` Invalid attempt to destructure non - iterable instance .
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}function h5(e,t){if(e){if(typeof e=="string")return p0(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 p0(e,t)}}function p0(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 oN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,u;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(d){s=!0,u=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function sN(e){if(Array.isArray(e))return e}function o2(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 tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o2(Object(n),!0).forEach(function(r){h0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bf(e,t){if(e==null)return{};var n=aN(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 aN(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 Bv=f.forwardRef(function(e,t){var n=e.children,r=Bf(e,YA),o=Fv(r),s=o.open,i=Bf(o,QA);return f.useImperativeHandle(t,function(){return{open:s}},[s]),N.createElement(f.Fragment,null,n(tr(tr({},i),{},{open:s})))});Bv.displayName="Dropzone";var m5={disabled:!1,getFilesFromEvent:yA,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};Bv.defaultProps=m5;Bv.propTypes={children:Tn.func,accept:Tn.objectOf(Tn.arrayOf(Tn.string)),multiple:Tn.bool,preventDropOnDocument:Tn.bool,noClick:Tn.bool,noKeyboard:Tn.bool,noDrag:Tn.bool,noDragEventsBubbling:Tn.bool,minSize:Tn.number,maxSize:Tn.number,maxFiles:Tn.number,disabled:Tn.bool,getFilesFromEvent:Tn.func,onFileDialogCancel:Tn.func,onFileDialogOpen:Tn.func,useFsAccessApi:Tn.bool,autoFocus:Tn.bool,onDragEnter:Tn.func,onDragLeave:Tn.func,onDragOver:Tn.func,onDrop:Tn.func,onDropAccepted:Tn.func,onDropRejected:Tn.func,onError:Tn.func,validator:Tn.func};var m0={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Fv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=tr(tr({},m5),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,u=t.multiple,d=t.maxFiles,p=t.onDragEnter,h=t.onDragLeave,m=t.onDragOver,v=t.onDrop,b=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,C=t.onFileDialogOpen,_=t.useFsAccessApi,k=t.autoFocus,j=t.preventDropOnDocument,E=t.noClick,I=t.noKeyboard,O=t.noDrag,R=t.noDragEventsBubbling,T=t.onError,A=t.validator,z=f.useMemo(function(){return GA(n)},[n]), $ =f.useMemo(function(){return UA(n)},[n]),Z=f.useMemo(function(){return typeof C=="function"?C:s2},[C]),B=f.useMemo(function(){return typeof w=="function"?w:s2},[w]),H=f.useRef(null),G=f.useRef(null),Y=f.useReducer(iN,m0),M=ig(Y,2),U=M[0],V=M[1],W=U.isFocused,te=U.isFileDialogActive,ve=f.useRef(typeof window<"u"&&window.isSecureContext&&_&&VA()),le=function(){!ve.current&&te&&setTimeout(function(){if(G.current){var ze=G.current.files;ze.length||(V({type:"closeDialog"}),B())}},300)};f.useEffect(functi
` ),status:"error"})},[i,s]),m=f.useCallback(async E=>{n(f4({file:E,image_category:"user",is_intermediate:!1,postUploadAction:{type:"TOAST_UPLOADED"}}))},[n]),v=f.useCallback((E,I)=>{if(I.length>1){s({title:i("toast.uploadFailed"),description:i("toast.uploadFailedInvalidUploadDesc"),status:"error"});return}I.forEach(O=>{h(O)}),E.forEach(O=>{m(O)})},[i,s,m,h]),{getRootProps:b,getInputProps:S,isDragAccept:w,isDragReject:C,isDragActive:_,inputRef:k,open:j}=Fv({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:v,onDragOver:()=>d(!0),disabled:r,multiple:!1});return f.useEffect(()=>{const E=async I=>{var O,R;k.current&&(O=I.clipboardData)!=null&&O.files&&(k.current.files=I.clipboardData.files,(R=k.current)==null||R.dispatchEvent(new Event("change",{bubbles:!0})))};return p(j),document.addEventListener("paste",E),()=>{document.removeEventListener("paste",E),p(()=>{})}},[k,j,p]),a.jsxs(Ne,{...b({style:{}}),onKeyDown:E=>{E.key},children:[a.jsx("input",{...S()}),t,_&&u&&a.jsx(wN,{isDragAccept:w,isDragReject:C,setIsHandlingUpload:d})]})},_N=f.memo(CN),kN=WO(e=>{e(p4(!0))},300),uo=()=>(e,t)=>{ur(t())==="unifiedCanvas"&&kN(e)};var PN=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yr=globalThis&&globalThis.__assign||function(){return yr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},yr.apply(this,arguments)},i2={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},l2={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Md={width:"20px",height:"20px",position:"absolute"},jN={top:yr(yr({},i2),{top:"-5px"}),right:yr(yr({},l2),{left:void 0,right:"-5px"}),bottom:yr(yr({},i2),{top:void 0,bottom:"-5px"}),left:yr(yr({},l2),{left:"-5px"}),topRight:yr(yr({},Md),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:yr(yr({},Md),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:yr(yr({},Md),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:yr(yr({},Md),{left:"-10px",top:"-10px",cursor:"nw-resize"})},IN=function(e){PN(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return f.createElement("div",{className:this.props.className||"",style:yr(yr({position:"absolute",userSelect:"none"},jN[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(f.PureComponent),EN=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ts=globalThis&&globalThis.__assign||function(){return Ts=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ts.apply(this,arguments)},ON={width:"auto",height:"auto"},Dd=function(e,t,n){return Math.max(Math.min(e,n),t)},c2=function(e,t){return Math.round(e/t)*t},dl=function(e,t){return new RegExp(e,"i").test(t)},Td=function(e){return!!(e.touches&&e.touches.length)},RN=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},u2=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(s,i,u){return Math.abs(i-e)<Math.abs(t[s]-e)?u:s},0),o=Math.abs(t[r]-e);return n===
* OverlayScrollbars
* Version : 2.2 . 0
*
* Copyright ( c ) Rene Haas | KingSora .
* https : //github.com/KingSora
*
* Released under the MIT license .
* /function vn(e,t){if(ph(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&vn(Object.keys(e),n=>t(e[n],n,e));return e}function Gr(e,t){const n=Za(t);if(bs(t)||n){let o=n?"":{};if(e){const s=window.getComputedStyle(e,null);o=n?g2(e,s,t):t.reduce((i,u)=>(i[u]=g2(e,s,u),i),o)}return o}e&&vn(Co(t),o=>U$(e,o,t[o]))}const as=(e,t)=>{const{o:n,u:r,_:o}=e;let s=n,i;const u=(h,m)=>{const v=s,b=h,S=m||(r?!r(v,b):v!==b);return(S||o)&&(s=b,i=v),[s,S,i]};return[t?h=>u(t(s,i),h):u,h=>[s,!!h,i]]},Au=()=>typeof window<"u",$5=Au()&&Node.ELEMENT_NODE,{toString:O$,hasOwnProperty:dg}=Object.prototype,ya=e=>e===void 0,fh=e=>e===null,R$=e=>ya(e)||fh(e)?`${e}`:O$.call(e).replace(/ ^ \ [ object ( . + ) \ ] $ / , "$1" ) . toLowerCase ( ) , Ga = e => typeof e == "number" , Za = e => typeof e == "string" , Yv = e => typeof e == "boolean" , ys = e => typeof e == "function" , bs = e => Array . isArray ( e ) , iu = e => typeof e == "object" && ! bs ( e ) && ! fh ( e ) , ph = e => { const t = ! ! e && e . length , n = Ga ( t ) && t > - 1 && t % 1 == 0 ; return bs ( e ) || ! ys ( e ) && n ? t > 0 && iu ( e ) ? t - 1 in e : ! 0 : ! 1 } , v0 = e => { if ( ! e || ! iu ( e ) || R$ ( e ) !== "object" ) return ! 1 ; let t ; const n = "constructor" , r = e [ n ] , o = r && r . prototype , s = dg . call ( e , n ) , i = o && dg . call ( o , "isPrototypeOf" ) ; if ( r && ! s && ! i ) return ! 1 ; for ( t in e ) ; return ya ( t ) || dg . call ( e , t ) } , Ff = e => { const t = HTMLElement ; return e ? t ? e instanceof t : e . nodeType === $5 : ! 1 } , hh = e => { const t = Element ; return e ? t ? e instanceof t : e . nodeType === $5 : ! 1 } , Qv = ( e , t , n ) => e . indexOf ( t , n ) , En = ( e , t , n ) => ( ! n && ! Za ( t ) && ph ( t ) ? Array . prototype . push . apply ( e , t ) : e . push ( t ) , e ) , Ii = e => { const t = Array . from , n = [ ] ; return t && e ? t ( e ) : ( e instanceof Set ? e . forEach ( r => { En ( n , r ) } ) : vn ( e , r => { En ( n , r ) } ) , n ) } , Xv = e => ! ! e && e . length === 0 , Vs = ( e , t , n ) => { vn ( e , o => o && o . apply ( void 0 , t || [ ] ) ) , ! n && ( e . length = 0 ) } , mh = ( e , t ) => Object . prototype . hasOwnProperty . call ( e , t ) , Co = e => e ? Object . keys ( e ) : [ ] , nr = ( e , t , n , r , o , s , i ) => { const u = [ t , n , r , o , s , i ] ; return ( typeof e != "object" || fh ( e ) ) && ! ys ( e ) && ( e = { } ) , vn ( u , d => { vn ( Co ( d ) , p => { const h = d [ p ] ; if ( e === h ) return ! 0 ; const m = bs ( h ) ; if ( h && ( v0 ( h ) || m ) ) { const v = e [ p ] ; let b = v ; m && ! bs ( v ) ? b = [ ] : ! m && ! v0 ( v ) && ( b = { } ) , e [ p ] = nr ( b , h ) } else e [ p ] = h } ) } ) , e } , Jv = e => { for ( const t in e ) return ! 1 ; return ! 0 } , z5 = ( e , t , n , r ) => { if ( ya ( r ) ) return n ? n [ e ] : t ; n && ( Za ( r ) || Ga ( r ) ) && ( n [ e ] = r ) } , Ur = ( e , t , n ) => { if ( ya ( n ) ) return e ? e . getAttribute ( t ) : null ; e && e . setAttribute ( t , n ) } , io = ( e , t ) => { e && e . removeAttribute ( t ) } , bi = ( e , t , n , r ) => { if ( n ) { const o = Ur ( e , t ) || "" , s = new Set ( o . split ( " " ) ) ; s [ r ? "add" : "delete" ] ( n ) ; const i = Ii ( s ) . join ( " " ) . trim ( ) ; Ur ( e , t , i ) } } , M$ = ( e , t , n ) => { const r = Ur ( e , t ) || "" ; return new Set ( r . split ( " " ) ) . has ( n ) } , ds = ( e , t ) => z5 ( "scrollLeft" , 0 , e , t ) , ra = ( e , t ) => z5 ( "scrollTop" , 0 , e , t ) , y0 = Au ( ) && Element . prototype , L5 = ( e , t ) => { const n = [ ] , r = t ? hh ( t ) ? t : null : document ; return r ? En ( n , r . querySelectorAll ( e ) ) : n } , D$ = ( e , t ) => { const n = t ? hh ( t ) ? t : null : document ; return n ? n . querySelector ( e ) : null } , Hf = ( e , t ) => hh ( e ) ? ( y0 . matches || y0 . msMatchesSelector ) . call ( e , t ) : ! 1 , Zv = e => e ? Ii ( e . childNodes ) : [ ] , pa = e => e ? e . parentElement : null , bl = ( e , t ) => { if ( hh ( e ) ) { const n = y0 . closest ; if ( n ) return n . call ( e , t ) ; do { if ( Hf ( e , t ) ) return e ; e = pa ( e ) } while ( e ) } return null } , T$ = ( e , t , n ) => { const r = e && bl ( e , t ) , o = e && D$ ( n , r ) , s = bl ( o , t ) === r ; return r && o ? r === e || o === e || s && bl ( bl ( e , n ) , t ) !== r : ! 1 } , e1 = ( e , t , n ) => { if ( n && e ) { let r = t , o ; ph ( n ) ? ( o = document . createDocumentFragment ( ) , vn ( 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 ) } } , Wo = ( e , t ) => { e1 ( e , null , t ) } , A$ = ( e , t ) => { e1 ( pa ( e ) , e , t ) } , p2 = ( e , t ) => { e1 ( pa ( e ) , e && e . nextSibling , t ) } , Fs = e => { if ( ph ( e ) ) vn ( Ii ( e ) , t => Fs ( t ) ) ; else if ( e ) { const t = pa ( e ) ; t && t . removeChild ( e ) } } , xi = e => { const t = document . createElement ( "div" ) ; return e && Ur ( t , "class" , e ) , t } , B5 = e => { const t = xi ( ) ; return t . innerHTML = e . trim ( ) , vn ( Zv ( t ) , n => Fs ( n ) ) } , b0 = e => e . charAt ( 0 ) . toUpperCase ( ) + e . slice ( 1 ) , N$ = ( ) => xi ( ) . style , $$ = [ "-webkit-" , "-moz-" , "-o-" , "-ms-" ] , z$ = [ "WebKit" , "Moz" , "O" , "MS" , "webkit" , "moz" , "o" , "ms" ] , fg = { } , pg = { } , L$ = e => { let t = pg [ e ] ; if ( mh ( pg , e ) ) return t ; const n = b0 ( e ) , r = N$ ( ) ; return vn ( $$ , o => { const s = o . replace ( /-/g , "" ) ; return ! ( t = [ e , o + e , s + n , b0 ( s ) + n ] . find ( u => r [ u ] !== void 0 ) ) } ) , pg [ e ] = t || "" } , Nu = e => { if ( Au ( ) ) { let t = fg [ e ] || window [ e ] ; return mh ( fg , e ) || ( vn ( z$ , n => ( t = t || window [ n + b0 ( e ) ] , ! t ) ) , fg [ e ] = t ) , t } } , B$ = Nu ( "MutationObserver" ) , h2 = Nu ( "IntersectionObserver" ) , xl = Nu ( "ResizeObserver" ) , F5 = Nu ( "cancelAnimationFrame" ) , H
Please see https : //github.com/reduxjs/redux-toolkit/pull/2481 for details.
See https : //redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}}}({queryThunk:Be,mutationThunk:mt,api:q,serializeQueryArgs:Ue,context:ie}),_r=wn.buildInitiateQuery,Wn=wn.buildInitiateMutation;return Cr(q.util,{getRunningOperationPromises:wn.getRunningOperationPromises,getRunningOperationPromise:wn.removalWarning,getRunningMutationThunk:wn.getRunningMutationThunk,getRunningMutationsThunk:wn.getRunningMutationsThunk,getRunningQueryThunk:wn.getRunningQueryThunk,getRunningQueriesThunk:wn.getRunningQueriesThunk}),{name:Gs,injectEndpoint:function(gt,bn){var kn,Vn=q;(kn=Vn.endpoints)[gt]!=null||(kn[gt]={}),ne(bn)?Cr(Vn.endpoints[gt],{name:gt,select:Wt(gt,bn),initiate:_r(gt,bn)},Lt(Be,gt)):bn.type===se.mutation&&Cr(Vn.endpoints[gt],{name:gt,select:Qt(),initiate:Wn(gt)},Lt(mt,gt))}}}}},es=nt(wa())})(m_);h_.exports=m_;var Vo=h_.exports;const g_=f.memo(({board:e,isSelected:t})=>{const n=ee(),{currentData:r}=gs(e.cover_image_name??Vo.skipToken),{colorMode:o}=ko(),{board_name:s,board_id:i}=e,{onClickDeleteBoardImages:u}=f.useContext(m4),d=f.useCallback(()=>{n(ov(i))},[i,n]),[p,{isLoading:h}]=LE(),[m,{isLoading:v}]=BE(),b=k=>{p({board_id:i,changes:{board_name:k}})},S=f.useCallback(()=>{m(i)},[i,m]),w=f.useCallback(()=>{},[]),C=f.useCallback(()=>{u(e)},[e,u]),_=f.useMemo(()=>({id:i,actionType:"MOVE_BOARD",context:{boardId:i}}),[i]);return a.jsx(Ne,{sx:{touchAction:"none",height:"full"},children:a.jsx(p_,{menuProps:{size:"sm",isLazy:!0},renderMenu:()=>a.jsxs(nc,{sx:{visibility:"visible !important"},children:[e.image_count>0&&a.jsxs(a.Fragment,{children:[a.jsx(Ir,{isDisabled:!e.image_count,icon:a.jsx(R5,{}),onClickCapture:w,children:"Add Board to Batch"}),a.jsx(Ir,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(po,{}),onClickCapture:C,children:"Delete Board and Images"})]}),a.jsx(Ir,{sx:{color:"error.600",_dark:{color:"error.300"}},icon:a.jsx(po,{}),onClickCapture:S,children:"Delete Board"})]}),children:k=>a.jsxs(F,{userSelect:"none",ref:k,sx:{flexDir:"column",justifyContent:"space-between",alignItems:"center",cursor:"pointer",w:"full",h:"full"},children:[a.jsxs(F,{onClick:d,sx:{position:"relative",justifyContent:"center",alignItems:"center",borderRadius:"base",w:"full",aspectRatio:"1/1",overflow:"hidden",shadow:t?"selected.light":void 0,_dark:{shadow:t?"selected.dark":void 0},flexShrink:0},children:[e.cover_image_name&&(r==null?void 0:r.image_url)&&a.jsx(yu,{src:r==null?void 0:r.image_url,draggable:!1}),!(e.cover_image_name&&(r!=null&&r.image_url))&&a.jsx(Li,{boxSize:8,icon:qc,sx:{border:"2px solid var(--invokeai-colors-base-200)",_dark:{border:"2px solid var(--invokeai-colors-base-800)"}}}),a.jsx(F,{sx:{position:"absolute",insetInlineEnd:0,top:0,p:1},children:a.jsx(Ka,{variant:"solid",children:e.image_count})}),a.jsx(d1,{data:_})]}),a.jsx(F,{sx:{width:"full",height:"full",justifyContent:"center",alignItems:"center"},children:a.jsxs(T3,{defaultValue:s,submitOnBlur:!1,onSubmit:j=>{b(j)},children:[a.jsx(R3,{sx:{color:t?_e("base.900","base.50")(o):_e("base.700","base.200")(o),fontWeight:t?600:void 0,fontSize:"xs",textAlign:"center",p:0},noOfLines:1}),a.jsx(O3,{sx:{color:_e("base.900","base.50")(o),fontSize:"xs",borderColor:_e("base.500","base.500")(o),p:0,outline:0}})]})})]},i)})})});g_.displayName="HoverableBoard";const br=e=>{const t=L(i=>i.config.disabledTabs),n=L(i=>i.config.disabledFeatures),r=L(i=>i.config.disabledSDFeatures),o=f.useMemo(()=>n.includes(e)||r.includes(e)||t.includes(e),[n,r,t,e]),s=f.useMemo(()=>!(n.includes(e)||r.includes(e)||t.includes(e)),[n,r,t,e]);return{isFeatureDisabled:o,isFeatureEnabled:s}},sL=be([Rt],({boards:e,gallery:t})=>{const{searchText:n}=e,{selectedBoardId:r}=t;return{selectedBoardId:r,searchText:n}},it),aL=e=>{const{isOpen:t}=e,n=ee(),{selectedBoardId:r,searchText:o}=L(sL),{data:s}=av(),i=br("batches").isFeatureEnabled,u=o?s==null?void 0:s.filter(v=>v.board_name.toLowerCase().includes(o.toLowerCase())):s,[d,p]=f.useState(!1),h=v=>{p(v.length>0),n(Bb(v))},m=()=>{p(!1),n(Bb(""))};return a.jsx(Qp,{in:t,animateOpacity:!0,children:a.jsxs(F,{layerStyl
* @ 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 Jee=function(t){var n={},r=f,o=ff,s=Object.assign;function i(l){for(var c="https:/ / reactjs . org / docs / error - decoder . html ? invariant = "+l,g=1;g<arguments.length;g++)c+=" & args [ ] = "+encodeURIComponent(arguments[g]);return" Minified React error # "+l+" ; visit "+c+" for the full message or use the non - minified dev environment for full errors and additional helpful warnings . "}var u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=Symbol.for(" react . element "),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 "),S=Symbol.for(" react . context "),w=Symbol.for(" react . forward _ref "),C=Symbol.for(" react . suspense "),_=Symbol.for(" react . suspense _list "),k=Symbol.for(" react . memo "),j=Symbol.for(" react . lazy "),E=Symbol.for(" react . offscreen "),I=Symbol.iterator;function O(l){return l===null||typeof l!=" object "?null:(l=I&&l[I]||l[" @ @ iterator "],typeof l==" function "?l:null)}function R(l){if(l==null)return null;if(typeof l==" function ")return l.displayName||l.name||null;if(typeof l==" string ")return l;switch(l){case h:return" Fragment ";case p:return" Portal ";case v:return" Profiler ";case m:return" StrictMode ";case C:return" Suspense ";case _:return" SuspenseList "}if(typeof l==" object ")switch(l.$$typeof){case S:return(l.displayName||" Context ")+" . Consumer ";case b:return(l._context.displayName||" Context ")+" . Provider ";case w:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||" ",l=l!==" "?" ForwardRef ( "+l+" ) ":" ForwardRef "),l;case k:return c=l.displayName||null,c!==null?c:R(l.type)||" Memo ";case j:c=l._payload,l=l._init;try{return R(l(c))}catch{}}return null}function T(l){var c=l.type;switch(l.tag){case 24:return" Cache ";case 9:return(c.displayName||" Context ")+" . Consumer ";case 10:return(c._context.displayName||" Context ")+" . Provider ";case 18:return" DehydratedFragment ";case 11:return l=c.render,l=l.displayName||l.name||" ",c.displayName||(l!==" "?" ForwardRef ( "+l+" ) ":" ForwardRef ");case 7:return" Fragment ";case 5:return c;case 4:return" Portal ";case 3:return" Root ";case 6:return" Text ";case 16:return R(c);case 8:return c===m?" StrictMode ":" Mode ";case 22:return" Offscreen ";case 12:return" Profiler ";case 21:return" Scope ";case 13:return" Suspense ";case 19:return" SuspenseList ";case 25:return" TracingMarker ";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c==" function ")return c.displayName||c.name||null;if(typeof c==" string " ) return c } return null } function A ( l ) { var c = l , g = l ; if ( l . alternate ) for ( ; c . return ; ) c = c . return ; else { l = c ; do c = l , c . flags & 4098 && ( g = c . return ) , l = c . return ; while ( l ) } return c . tag === 3 ? g : null } function z ( l ) { if ( A ( l ) !== l ) throw Error ( i ( 188 ) ) } function $ ( l ) { var c = l . alternate ; if ( ! c ) { if ( c = A ( l ) , c === null ) throw Error ( i ( 188 ) ) ; return c !== l ? null : l } for ( var g = l , y = c ; ; ) { var x = g . return ; if ( x === null ) break ; var P = x . alternate ; if ( P === null ) { if ( y = x . return , y !== null ) { g = y ; continue } break } if ( x . child === P . child ) { for ( P = x . child ; P ; ) { if ( P === g ) return z ( x ) , l ; if ( P === y ) return z ( x ) , c ; P = P . sibling } throw Error ( i ( 188 ) ) } if ( g . return !== y . return ) g = x , y = P ; else { for ( var D = ! 1 , K = x . child ; K ; ) { if ( K === g ) { D = ! 0 , g = x , y = P ; break } if ( K === y ) { D = ! 0 , y = x , g = P ; break } K = K . sibling } if ( ! D ) { for ( K = P . child ; K ; ) { if ( K === g ) { D = ! 0 , g = P , y = x ; break } if ( K === y ) { D = ! 0 , y = P , g = x ; break } K = K . sibling } if ( ! D ) throw Error ( i ( 189 ) ) } } if ( g . alternate !== y ) throw Error ( i ( 190 ) ) } if ( g . tag !== 3 ) throw Error ( i ( 188 ) ) ; return g . stateNode . current === g ? l : c } function Z ( l ) { return l = $ ( 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 c = B ( l ) ; if ( c !== null ) return c ; l = l . sibling } return null } function H ( l ) { if ( l . tag === 5 || l . tag === 6 ) return l ; for ( l = l . child ; l !== null ; ) { if ( l . tag !== 4 ) { var c = H ( l ) ; if ( c !== null ) return c } l = l . sibling } return null } var G = Array . isArray , Y = t . getPublicInstance , M = t . getRootHostContext , U = t . getChildHostContext , V = t . prepareForCommit , W = t . resetAfterCommit , te = t . createInstance , ve = t . appendInitialChild , le = t . finalizeInitialChildren , oe = t . prepareUpdate , J = t . shouldSetTextContent , se = t . createTextInstance , ue = t . scheduleTimeout , ye = t . cancelTimeout , ne = t . noTimeout , me = t . isPrimaryRenderer , fe = t . supportsMutation , Ce = t . supportsPersistence , Me = t . supportsHydration , pe = t .
` +yt+l}var zt=!1;function Vt(l,c){if(!l||zt)return"";zt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(Re){var y=Re}Reflect.construct(l,[],c)}else{try{c.call()}catch(Re){y=Re}l.call(c.prototype)}else{try{throw Error()}catch(Re){y=Re}l()}}catch(Re){if(Re&&y&&typeof Re.stack=="string"){for(var x=Re.stack.split( `
` ),P=y.stack.split( `
` ),D=x.length-1,K=P.length-1;1<=D&&0<=K&&x[D]!==P[K];)K--;for(;1<=D&&0<=K;D--,K--)if(x[D]!==P[K]){if(D!==1||K!==1)do if(D--,K--,0>K||x[D]!==P[K]){var ae= `
` +x[D].replace(" at new "," at ");return l.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",l.displayName)),ae}while(1<=D&&0<=K);break}}}finally{zt=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?_t(l):""}var Lt=Object.prototype.hasOwnProperty,ke=[],dt=-1;function It(l){return{current:l}}function Et(l){0>dt||(l.current=ke[dt],ke[dt]=null,dt--)}function Nt(l,c){dt++,ke[dt]=l.current,l.current=c}var cn={},Wt=It(cn),Qt=It(!1),wn=cn;function _r(l,c){var g=l.type.contextTypes;if(!g)return cn;var y=l.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===c)return y.__reactInternalMemoizedMaskedChildContext;var x={},P;for(P in g)x[P]=c[P];return y&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=x),x}function Wn(l){return l=l.childContextTypes,l!=null}function gt(){Et(Qt),Et(Wt)}function bn(l,c,g){if(Wt.current!==cn)throw Error(i(168));Nt(Wt,c),Nt(Qt,g)}function kn(l,c,g){var y=l.stateNode;if(c=c.childContextTypes,typeof y.getChildContext!="function")return g;y=y.getChildContext();for(var x in y)if(!(x in c))throw Error(i(108,T(l)||"Unknown",x));return s({},g,y)}function Vn(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||cn,wn=Wt.current,Nt(Wt,l),Nt(Qt,Qt.current),!0}function sr(l,c,g){var y=l.stateNode;if(!y)throw Error(i(169));g?(l=kn(l,c,wn),y.__reactInternalMemoizedMergedChildContext=l,Et(Qt),Et(Wt),Nt(Wt,l)):Et(Qt),Nt(Qt,g)}var On=Math.clz32?Math.clz32:hn,Rn=Math.log,tn=Math.LN2;function hn(l){return l>>>=0,l===0?32:31-(Rn(l)/tn|0)|0}var xn=64,un=4194304;function dn(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 Fe(l,c){var g=l.pendingLanes;if(g===0)return 0;var y=0,x=l.suspendedLanes,P=l.pingedLanes,D=g&268435455;if(D!==0){var K=D&~x;K!==0?y=dn(K):(P&=D,P!==0&&(y=dn(P)))}else D=g&~x,D!==0?y=dn(D):P!==0&&(y=dn(P));if(y===0)return 0;if(c!==0&&c!==y&&!(c&x)&&(x=y&-y,P=c&-c,x>=P||x===16&&(P&4194240)!==0))return c;if(y&4&&(y|=g&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=y;0<c;)g=31-On(c),x=1<<g,y|=l[g],c&=~x;return y}function bt(l,c){switch(l){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(l,c){for(var g=l.suspendedLanes,y=l.pingedLanes,x=l.expirationTimes,P=l.pendingLanes;0<P;){var D=31-On(P),K=1<<D,ae=x[D];ae===-1?(!(K&g)||K&y)&&(x[D]=bt(K,c)):ae<=c&&(l.expiredLanes|=K),P&=~K}}function Xe(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function ft(){var l=xn;return xn<<=1,!(xn&4194240)&&(xn=64),l}function Ot(l){for(var c=[],g=0;31>g;g++)c.push(l);return c}function lt(l,c,g){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-On(c),l[c]=g}function qe(l,c){var g=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var y=l.eventTimes;for(l=l.expirationTimes;0<g;){var x=31-On(g),P=1<<x;c[x]=0,y[x]=-1,l[x]=-1,g&=~P}}function Pe(l,c){var g=l.entangledLanes|=c;for(l=l.entanglements;g;){var y=31-On(g),x=1<<y;x&c|l[y]&c&&(l[y]|=c),g&=~x}}var Se=0;function Ie(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var De=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,St=o.unsta
Error generating stack : ` +P.message+ `
` +P.stack}return{value:l,source:c,stack:x,digest:null}}function um(l,c,g){return{value:l,source:null,stack:g??null,digest:c??null}}function dm(l,c){try{console.error(c.value)}catch(g){setTimeout(function(){throw g})}}var II=typeof WeakMap=="function"?WeakMap:Map;function Uy(l,c,g){g=Ys(-1,g),g.tag=3,g.payload={element:null};var y=c.value;return g.callback=function(){hd||(hd=!0,Rm=y),dm(l,c)},g}function Gy(l,c,g){g=Ys(-1,g),g.tag=3;var y=l.type.getDerivedStateFromError;if(typeof y=="function"){var x=c.value;g.payload=function(){return y(x)},g.callback=function(){dm(l,c)}}var P=l.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){dm(l,c),typeof y!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})}),g}function qy(l,c,g){var y=l.pingCache;if(y===null){y=l.pingCache=new II;var x=new Set;y.set(c,x)}else x=y.get(c),x===void 0&&(x=new Set,y.set(c,x));x.has(g)||(x.add(g),l=HI.bind(null,l,c,g),c.then(l,l))}function Ky(l){do{var c;if((c=l.tag===13)&&(c=l.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return l;l=l.return}while(l!==null);return null}function Yy(l,c,g,y,x){return l.mode&1?(l.flags|=65536,l.lanes=x,l):(l===c?l.flags|=65536:(l.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(c=Ys(-1,1),c.tag=2,_a(g,c,1))),g.lanes|=1),l)}var EI=u.ReactCurrentOwner,ro=!1;function Zr(l,c,g,y){c.child=l===null?Sy(c,null,g,y):Qi(c,l.child,g,y)}function Qy(l,c,g,y,x){g=g.render;var P=c.ref;return Yi(c,x),y=om(l,c,g,y,P,x),g=sm(),l!==null&&!ro?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,Qs(l,c,x)):(Un&&g&&Lh(c),c.flags|=1,Zr(l,c,y,x),c.child)}function Xy(l,c,g,y,x){if(l===null){var P=g.type;return typeof P=="function"&&! $ m(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(c.tag=15,c.type=P,Jy(l,c,P,y,x)):(l=xd(g.type,null,y,c,c.mode,x),l.ref=c.ref,l.return=c,c.child=l)}if(P=l.child,!(l.lanes&x)){var D=P.memoizedProps;if(g=g.compare,g=g!==null?g:Hu,g(D,y)&&l.ref===c.ref)return Qs(l,c,x)}return c.flags|=1,l=Ea(P,y),l.ref=c.ref,l.return=c,c.child=l}function Jy(l,c,g,y,x){if(l!==null){var P=l.memoizedProps;if(Hu(P,y)&&l.ref===c.ref)if(ro=!1,c.pendingProps=y=P,(l.lanes&x)!==0)l.flags&131072&&(ro=!0);else return c.lanes=l.lanes,Qs(l,c,x)}return fm(l,c,g,y,x)}function Zy(l,c,g){var y=c.pendingProps,x=y.children,P=l!==null?l.memoizedState:null;if(y.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nt(tl,xo),xo|=g;else{if(!(g&1073741824))return l=P!==null?P.baseLanes|g:g,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null,transitions:null},c.updateQueue=null,Nt(tl,xo),xo|=l,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=P!==null?P.baseLanes:g,Nt(tl,xo),xo|=y}else P!==null?(y=P.baseLanes|g,c.memoizedState=null):y=g,Nt(tl,xo),xo|=y;return Zr(l,c,x,g),c.child}function eb(l,c){var g=c.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(c.flags|=512,c.flags|=2097152)}function fm(l,c,g,y,x){var P=Wn(g)?wn:Wt.current;return P=_r(c,P),Yi(c,x),g=om(l,c,g,y,P,x),y=sm(),l!==null&&!ro?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~x,Qs(l,c,x)):(Un&&y&&Lh(c),c.flags|=1,Zr(l,c,g,x),c.child)}function tb(l,c,g,y,x){if(Wn(g)){var P=!0;Vn(c)}else P=!1;if(Yi(c,x),c.stateNode===null)nd(l,c),yy(c,g,y),Xh(c,g,y,x),y=!0;else if(l===null){var D=c.stateNode,K=c.memoizedProps;D.props=K;var ae=D.context,Re=g.contextType;typeof Re=="object"&&Re!==null?Re=Do(Re):(Re=Wn(g)?wn:Wt.current,Re=_r(c,Re));var ct=g.getDerivedStateFromProps,Ft=typeof ct=="function"||typeof D.getSnapshotBeforeUpdate=="function";Ft||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(K!==y||ae!==Re)&&by(c,D,y,Re),Ca=!1;var Je=c.memoizedState;D.state=Je,Gu(c,y,D,x),ae=c.memoizedState,K!==y||Je!==ae||Qt.current||Ca?(typeof ct=="function"&&(Qh(c,g,ct,y),ae=c.memoizedState),(K=Ca||vy(c,g,K,y,Je,ae,Re))?(Ft||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMo
` +(y.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 Y(l.child.stateNode);default:return l.child.stateNode}},n.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:KI,findFiberByHostInstance:l.findFiberByHostInstance||YI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Ln=c.inject(l),sn=c}catch{}l=!!c.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,c,g,y){if(!vt)throw Error(i(363));l=Pm(l,c);var x=Bt(l,g,y).disconnect;return{disconnect:function(){x()}}},n.registerMutableSourceForHydration=function(l,c){var g=c._getVersion;g=g(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,g]:l.mutableSourceEagerHydrationData.push(c,g)},n.runWithPriority=function(l,c){var g=Se;try{return Se=l,c()}finally{Se=g}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,c,g,y){var x=c.current,P=Vr(),D=ja(x);return g=Mb(g),c.context===null?c.context=g:c.pendingContext=g,c=Ys(P,D),c.payload={element:l},y=y===void 0?null:y,y!==null&&(c.callback=y),l=_a(x,c,D),l!==null&&(No(l,x,D,P),Uu(l,x,D)),D},n};tI.exports=Jee;var Zee=tI.exports;const ete=gu(Zee);var nI={exports:{}},Gi={};/**
* @ 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 .
* / G i . C o n c u r r e n t R o o t = 1 ; G i . C o n t i n u o u s E v e n t P r i o r i t y = 4 ; G i . D e f a u l t E v e n t P r i o r i t y = 1 6 ; G i . D i s c r e t e E v e n t P r i o r i t y = 1 ; G i . I d l e E v e n t P r i o r i t y = 5 3 6 8 7 0 9 1 2 ; G i . L e g a c y R o o t = 0 ; n I . e x p o r t s = G i ; v a r r I = n I . e x p o r t s ; c o n s t B C = { c h i l d r e n : ! 0 , r e f : ! 0 , k e y : ! 0 , s t y l e : ! 0 , f o r w a r d e d R e f : ! 0 , u n s t a b l e _ a p p l y C a c h e : ! 0 , u n s t a b l e _ a p p l y D r a w H i t F r o m C a c h e : ! 0 } ; l e t F C = ! 1 , H C = ! 1 ; c o n s t r y = " . r e a c t - k o n v a - e v e n t " , t t e = ` R e a c t K o n v a : Y o u h a v e a K o n v a n o d e w i t h d r a g g a b l e = t r u e a n d p o s i t i o n d e f i n e d b u t n o o n D r a g M o v e o r o n D r a g E n d e v e n t s a r e h a n d l e d .
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
` ,nte= ` 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
` ,rte={};function zh(e,t,n=rte){if(!FC&&"zIndex"in t&&(console.warn(nte),FC=!0),!HC&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(tte),HC=!0)}for(var s in n)if(!BC[s]){var i=s.slice(0,2)==="on",u=n[s]!==t[s];if(i&&u){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e.off(d,n[s])}var 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(!BC[s]){var i=s.slice(0,2)==="on",S=n[s]!==t[s];if(i&&S){var d=s.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),t[s]&&(b[d]=t[s])}!i&&(t[s]!==n[s]||h&&t[s]!==e.getAttr(s))&&(v=!0,m[s]=t[s])}v&&(e.setAttrs(m),ti(e));for(var d in b)e.on(d+ry,b[d])}function ti(e){if(!H7.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const oI={},ote={};fu.Node.prototype._applyProps=zh;function ste(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),ti(e)}function ate(e,t,n){let r=fu[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=fu.Group);const o={},s={};for(var i in t){var u=i.slice(0,2)===" on ";u?s[i]=t[i]:o[i]=t[i]}const d=new r(o);return zh(d,s),d}function ite(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: " $ { e } "`)}function lte(e,t,n){return!1}function cte(e){return e}function ute(){return null}function dte(){return null}function fte(e,t,n,r){return ote}function pte(){}function hte(e){}function mte(e,t){return!1}function gte(){return oI}function vte(){return oI}const yte=setTimeout,bte=clearTimeout,xte=-1;function wte(e,t){return!1}const Ste=!1,Cte=!0,_te=!0;function kte(e,t){t.parent===e?t.moveToTop():e.add(t),ti(e)}function Pte(e,t){t.parent===e?t.moveToTop():e.add(t),ti(e)}function sI(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),ti(e)}function jte(e,t,n){sI(e,t,n)}function Ite(e,t){t.destroy(),t.off(ry),ti(e)}function Ete(e,t){t.destroy(),t.off(ry),ti(e)}function Ote(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: " $ { n } "`)}function Rte(e,t,n){}function Mte(e,t,n,r,o){zh(e,o,r)}function Dte(e){e.hide(),ti(e)}function Tte(e){}function Ate(e,t){(t.visible==null||t.visible)&&e.show()}function Nte(e,t){}function $te(e){}function zte(){}const Lte=()=>rI.DefaultEventPriority,Bte=Object.freeze(Object.defineProperty({__proto__:null,appendChild:kte,appendChildToContainer:Pte,appendInitialChild:ste,cancelTimeout:bte,clearContainer:$te,commitMount:Rte,commitTextUpdate:Ote,commitUpdate:Mte,createInstance:ate,createTextInstance:ite,detachDeletedInstance:zte,finalizeInitialChildren:lte,getChildHostContext:vte,getCurrentEventPriority:Lte,getPublicInstance:cte,getRootHostContext:gte,hideInstance:Dte,hideTextInstance:Tte,idlePriority:ff.unstable_IdlePriority,insertBefore:sI,insertInContainerBefore:jte,isPrimaryRenderer:Ste,noTimeout:xte,now:ff.unstable_now,prepareForCommit:ute,preparePortalMount:dte,prepareUpdate:fte,removeChild:Ite,removeChildFromContainer:Ete,resetAfterCommit:pte,resetTextContent:hte,run:ff.unstable_runWithPriority,scheduleTimeout:yte,shouldDeprioritizeSubtree:mte,shouldSetTextContent:wte,supportsMutation:_te,unhideInstance:Ate,unhideTextInstance:Nte,warnsIfNotActing:Cte},Symbol.toStringTag,{value:" Module " } ) ) ; var Fte = Object . defineProperty , Hte = Object . defineProperties , Wte = Object . getOwnPropertyDescriptors , WC = Object . getOwnPropertySymbols , Vte = Object . prototype . hasOwnProperty , Ute = Object . prototype . propertyIsEnumerable , VC = ( e , t , n ) => t in e ? Fte ( e , t , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : n } ) : e [ t ] = n , UC = ( e , t ) => { for ( var n in t || ( t = { } ) ) Vte . call ( t , n ) && VC ( e , n , t [ n ] ) ; if ( WC ) for ( var n of WC ( t ) ) Ute . 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 >
< / s v g > ` . r e p l a c e A l l ( " b l a c k " , e ) , x n e = e = > { c o n s t { . . . t } = e , { m a s k C o l o r S t r i n g : n , s t a g e C o o r d i n a t e s : r , s t a g e D i m e n s i o n s : o , s t a g e S c a l e : s } = L ( b n e ) , [ i , u ] = f . u s e S t a t e ( n u l l ) , [ d , p ] = f . u s e S t a t e ( 0 ) , h = f . u s e R e f ( n u l l ) , m = f . u s e C a l l b a c k ( ( ) = > { p ( d + 1 ) , s e t T i m e o u t ( m , 5 0 0 ) } , [ d ] ) ; r e t u r n f . u s e E f f e c t ( ( ) = > { i f ( i ) r e t u r n ; c o n s t v = n e w I m a g e ; v . o n l o a d = ( ) = > { u ( v ) } , v . s r c = K C ( n ) } , [ i , n ] ) , f . u s e E f f e c t ( ( ) = > { i & & ( i . s r c = K C ( n ) ) } , [ i , n ] ) , f . u s e E f f e c t ( ( ) = > { c o n s t v = s e t I n t e r v a l ( ( ) = > p ( b = > ( b + 1 ) % 5 ) , 5 0 ) ; r e t u r n ( ) = > c l e a r I n t e r v a l ( v ) } , [ ] ) , ! i | | ! s l ( r . x ) | | ! s l ( r . y ) | | ! s l ( s ) | | ! s l ( o . w i d t h ) | | ! s l ( o . h e i g h t ) ? n u l l : a . j s x ( H s , { r e f : h , o f f s e t X : r . x / s , o f f s e t Y : r . y / s , h e i g h t : o . h e i g h t / s , w i d t h : o . w i d t h / s , f i l l P a t t e r n I m a g e : i , f i l l P a t t e r n O f f s e t Y : s l ( d ) ? d : 0 , f i l l P a t t e r n R e p e a t : " r e p e a t " , f i l l P a t t e r n S c a l e : { x : 1 / s , y : 1 / s } , l i s t e n i n g : ! 0 , g l o b a l C o m p o s i t e O p e r a t i o n : " s o u r c e - i n " , . . . t } ) } , w n e = b e ( [ e n ] , e = > ( { o b j e c t s : e . l a y e r S t a t e . o b j e c t s } ) , { m e m o i z e O p t i o n s : { r e s u l t E q u a l i t y C h e c k : K t } } ) , S n e = e = > { c o n s t { . . . t } = e , { o b j e c t s : n } = L ( w n e ) ; r e t u r n a . j s x ( m a , { l i s t e n i n g : ! 1 , . . . t , c h i l d r e n : n . f i l t e r ( t O ) . m a p ( ( r , o ) = > a . j s x ( B p , { p o i n t s : r . p o i n t s , s t r o k e : " r g b ( 0 , 0 , 0 ) " , s t r o k e W i d t h : r . s t r o k e W i d t h * 2 , t e n s i o n : 0 , l i n e C a p : " r o u n d " , l i n e J o i n : " r o u n d " , s h a d o w F o r S t r o k e E n a b l e d : ! 1 , l i s t e n i n g : ! 1 , g l o b a l C o m p o s i t e O p e r a t i o n : r . t o o l = = = " b r u s h " ? " s o u r c e - o v e r " : " d e s t i n a t i o n - o u t " } , o ) ) } ) } ; v a r d i = f , C n e = f u n c t i o n ( t , n , r ) { c o n s t o = d i . u s e R e f ( " l o a d i n g " ) , s = d i . u s e R e f ( ) , [ i , u ] = d i . u s e S t a t e ( 0 ) , d = d i . u s e R e f ( ) , p = d i . u s e R e f ( ) , h = d i . u s e R e f ( ) ; r e t u r n ( d . c u r r e n t ! = = t | | p . c u r r e n t ! = = n | | h . c u r r e n t ! = = r ) & & ( o . c u r r e n t = " l o a d i n g " , s . c u r r e n t = v o i d 0 , d . c u r r e n t = t , p . c u r r e n t = n , h . c u r r e n t = r ) , d i . u s e L a y o u t E f f e c t ( f u n c t i o n ( ) { i f ( ! t ) r e t u r n ; v a r m = d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; f u n c t i o n v ( ) { o . c u r r e n t = " l o a d e d " , s . c u r r e n t = m , u ( M a t h . r a n d o m ( ) ) } f u n c t i o n b ( ) { o . c u r r e n t = " f a i l e d " , s . c u r r e n t = v o i d 0 , u ( M a t h . r a n d o m ( ) ) } r e t u r n m . a d d E v e n t L i s t e n e r ( " l o a d " , v ) , m . a d d E v e n t L i s t e n e r ( " e r r o r " , b ) , n & & ( m . c r o s s O r i g i n = n ) , r & & ( m . r e f e r r e r P o l i c y = r ) , m . s r c = t , f u n c t i o n ( ) { m . r e m o v e E v e n t L i s t e n e r ( " l o a d " , v ) , m . r e m o v e E v e n t L i s t e n e r ( " e r r o r " , b ) } } , [ t , n , r ] ) , [ s . c u r r e n t , o . c u r r e n t ] } ; c o n s t _ n e = g u ( C n e ) , d I = e = > { c o n s t { w i d t h : t , h e i g h t : n , x : r , y : o , i m a g e N a m e : s } = e . c a n v a s I m a g e , { c u r r e n t D a t a : i , i s E r r o r : u } = g s ( s ? ? V o . s k i p T o k e n ) , [ d ] = _ n e ( ( i = = n u l l ? v o i d 0 : i . i m a g e _ u r l ) ? ? " " , n O . g e t ( ) ? " u s e - c r e d e n t i a l s " : " a n o n y m o u s " ) ; r e t u r n u ? a . j s x ( H s , { x : r , y : o , w i d t h : t , h e i g h t : n , f i l l : " r e d " } ) : a . j s x ( c I , { x : r , y : o , i m a g e : d , l i s t e n i n g : ! 1 } ) } , k n e = b e ( [ e n ] , e = > { c o n s t { l a y e r S t a t e : { o b j e c t s : t } } = e ; r e t u r n { o b j e c t s : t } } , { m e m o i z e O p t i o n s : { r e s u l t E q u a l i t y C h e c k : K t } } ) , P n e = ( ) = > { c o n s t { o b j e c t s : e } = L ( k n e ) ; r e t u r n e ? a . j s x ( m a , { n a m e : " o u t p a i n t i n g - o b j e c t s " , l i s t e n i n g : ! 1 , c h i l d r e n : e . m a p ( ( t , n ) = > { i f ( r O ( t ) ) r e t u r n a . j s x ( d I , { c a n v a s I m a g e : t } , n ) ; i f ( o O ( t ) ) { c o n s t r = a . j s x ( B p , { p o i n t s : t . p o i n t s , s t r o k e : t . c o l o r ? C i ( t . c o l o r ) : " r g b ( 0 , 0 , 0 ) " , s t r o k e W i d t h : t . s t r o k e W i d t h * 2 , t e n s i o n : 0 , l i n e C a p : " r o u n d " , l i n e J o i n : " r o u n d " , s h a d o w F o r S t r o k e E n a b l e d : ! 1 , l i s t e n i n g : ! 1 , g l o b a l C o m p o s i t e O p e r a t i o n : t . t o o l = = = " b r u s h " ? " s o u r c e - o v e r " : " d e s t i n a t i o n - o u t " } , n ) ; r e t u r n t . c l i p ? a . j s x ( m a , { c l i p X : t . c l i p . x , c l i p Y : t . c l i p . y , c l i p W i d t h : t . c l i p . w i d t h , c l i p H e i g h t : t . c l i p . h e i g h t , c h i l d r e n : r } , n ) : r } e l s e { i f ( s O ( t ) ) r e t u r n a . j s x ( H s , { x : t . x , y : t . y , w i d t h : t . w i d t h , h e i g h t : t . h e i g h t , f i l l : C i ( t . c o l o r ) } , n ) ; i f ( a O ( t ) ) r e t u r n a . j s x ( H s , { x : t . x , y : t . y , w i d t h : t . w i d t h , h e i g h t : t . h e i g h t , f i l l : " r g b ( 2 5 5 , 2 5 5 , 2 5 5 ) " , g l o b a l C o m p o s i t e O p e r a t i o n : " d e s t i n a t i o n - o u t " } , n ) } } ) } ) : n u l l } , j n e = b e ( [ e n ] , e = > { c o n s t { l a y e r S t a t e : t , s h o u l d S h o w S t a g i n g I m a g e : n , s h o u l d S h o w S t a g i n g O u t l i n e : r , b o u n d i n g B o x C o o r d i n a t e s : { x : o , y : s } , b o u n d i n g B o x D i m e n s i o n s : { w i d t h : i , h e i g h t : u } } = e , { s e l e c t e d I m a g e I n d e x : d , i m a g e s : p } = t . s t a g i n g A r e a ; r e t u r n { c u r r e n t S t a g i n g A r e a I m a g e : p . l e n g t h > 0 & & d ! = = v o i d 0 ? p [ d ] : v o i d 0 , i s O n F i r s t I m a g e : d = = = 0 , i s O n L a s t I m a g e : d = = = p . l e n g t h - 1 , s h o u l d S h o w S t a g i n g I m a g e : n , s h o u l d S h o w S t a g i n g O u t l i n e : r , x : o , y : s , w i d t h : i , h e i g h t : u } } , { m e m o i z e O p t i o n s : { r e s u l t E q u a l i t y C h e c k : K t } } ) , I n e = e = > { c o n s t { . . . t } = e , { c u r r e n t S t a g i n g A r e a I m a g e : n , s h o u l d S h o w S t a g i n g I m a g e : r , s h o u l d S h o w S t a g i n g O u t l i n e : o , x : s , y : i , w i d t h : u , h e i g h t : d } = L ( j n e ) ; r e t u r n a . j s x s ( m a , { . . . t , c h i l d r e n : [ r & & n & & a . j s x ( d I , { c a n v a s I m a g e : n } ) , o & & a . j s x s ( m a , { c h i l d r e n : [ a . j s x ( H s , { x : s , y : i , w i d t h : u , h e i g h t : d , s t r o k e W i d t h : 1 , s t r o k e : " w h i t e " , s t r o k e S c a l e E n a b l e d : ! 1 } ) , a . j s x ( H s , { x : s , y : i , w i d t h : u , h e i g h t : d , d a s h : [ 4 , 4 ] , s t r o k e W i d t h : 1 , s t r o k e : " b l a c k " , s t r o k e S c a l e E n a b l e d : ! 1 } ) ] } ) ] } ) } , E n e = b e ( [ e n ] , e = > { c o n s t { l a y e r S t a t e : { s t a g i n g A r e a : { i m a g e s : t , s e l e c t e d I m a g e I n d e x : n , s e s s i o n I d : r } } , s h o u l d S h o w S t a