=n))for(o=x;o=r||(a=(n*o+i)*4,u+=T[a+0],c+=T[a+1],d+=T[a+2],h+=T[a+3],k+=1);for(u=u/k,c=c/k,d=d/k,h=h/k,i=C;i=n))for(o=x;o=r||(a=(n*o+i)*4,T[a+0]=u,T[a+1]=c,T[a+2]=d,T[a+3]=h)}};H.addGetterSetter(Te,"pixelSize",8,ke(),H.afterSetFilter);const QM=function(t){var e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,i=255/e,o;for(o=0;o255?255:t<0?0:Math.round(t)});H.addGetterSetter(Te,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});H.addGetterSetter(Te,"blue",0,FE,H.afterSetFilter);const eR=function(t){var e=t.data,n=e.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),u,c;for(u=0;u255?255:t<0?0:Math.round(t)});H.addGetterSetter(Te,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});H.addGetterSetter(Te,"blue",0,FE,H.afterSetFilter);H.addGetterSetter(Te,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const tR=function(t){var e=t.data,n=e.length,r,i,o,a;for(r=0;r127&&(d=255-d),h>127&&(h=255-h),m>127&&(m=255-m),e[c]=d,e[c+1]=h,e[c+2]=m}while(--u)}while(--o)},rR=function(t){var e=this.threshold()*255,n=t.data,r=n.length,i;for(i=0;iZ||y[R]!==O[Z]){var le="\n"+y[R].replace(" at new "," at ");return l.displayName&&le.includes("")&&(le=le.replace("",l.displayName)),le}while(1<=R&&0<=Z);break}}}finally{sa=!1,Error.prepareStackTrace=f}return(l=l?l.displayName||l.name:"")?ll(l):""}var G1=Object.prototype.hasOwnProperty,uc=[],ua=-1;function Ii(l){return{current:l}}function Ft(l){0>ua||(l.current=uc[ua],uc[ua]=null,ua--)}function Bt(l,s){ua++,uc[ua]=l.current,l.current=s}var to={},Fn=Ii(to),rr=Ii(!1),Po=to;function ca(l,s){var f=l.type.contextTypes;if(!f)return to;var g=l.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===s)return g.__reactInternalMemoizedMaskedChildContext;var y={},O;for(O in f)y[O]=s[O];return g&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=s,l.__reactInternalMemoizedMaskedChildContext=y),y}function ir(l){return l=l.childContextTypes,l!=null}function ms(){Ft(rr),Ft(Fn)}function Cf(l,s,f){if(Fn.current!==to)throw Error(a(168));Bt(Fn,s),Bt(rr,f)}function sl(l,s,f){var g=l.stateNode;if(s=s.childContextTypes,typeof g.getChildContext!="function")return f;g=g.getChildContext();for(var y in g)if(!(y in s))throw Error(a(108,j(l)||"Unknown",y));return o({},f,g)}function da(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||to,Po=Fn.current,Bt(Fn,l),Bt(rr,rr.current),!0}function Sf(l,s,f){var g=l.stateNode;if(!g)throw Error(a(169));f?(l=sl(l,s,Po),g.__reactInternalMemoizedMergedChildContext=l,Ft(rr),Ft(Fn),Bt(Fn,l)):Ft(rr),Bt(rr,f)}var Ur=Math.clz32?Math.clz32:X1,xf=Math.log,U1=Math.LN2;function X1(l){return l>>>=0,l===0?32:31-(xf(l)/U1|0)|0}var vs=64,ul=4194304;function cl(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 ys(l,s){var f=l.pendingLanes;if(f===0)return 0;var g=0,y=l.suspendedLanes,O=l.pingedLanes,R=f&268435455;if(R!==0){var Z=R&~y;Z!==0?g=cl(Z):(O&=R,O!==0&&(g=cl(O)))}else R=f&~y,R!==0?g=cl(R):O!==0&&(g=cl(O));if(g===0)return 0;if(s!==0&&s!==g&&!(s&y)&&(y=g&-g,O=s&-s,y>=O||y===16&&(O&4194240)!==0))return s;if(g&4&&(g|=f&16),s=l.entangledLanes,s!==0)for(l=l.entanglements,s&=g;0f;f++)s.push(l);return s}function no(l,s,f){l.pendingLanes|=s,s!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,s=31-Ur(s),l[s]=f}function pc(l,s){var f=l.pendingLanes&~s;l.pendingLanes=s,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=s,l.mutableReadLanes&=s,l.entangledLanes&=s,s=l.entanglements;var g=l.eventTimes;for(l=l.expirationTimes;0>=R,y-=R,si=1<<32-Ur(s)+y|f<bt?(Un=tt,tt=null):Un=tt.sibling;var Ot=je(oe,tt,fe[bt],Ne);if(Ot===null){tt===null&&(tt=Un);break}l&&tt&&Ot.alternate===null&&s(oe,tt),K=O(Ot,K,bt),st===null?Ke=Ot:st.sibling=Ot,st=Ot,tt=Un}if(bt===fe.length)return f(oe,tt),rn&&fl(oe,bt),Ke;if(tt===null){for(;btbt?(Un=tt,tt=null):Un=tt.sibling;var wa=je(oe,tt,Ot.value,Ne);if(wa===null){tt===null&&(tt=Un);break}l&&tt&&wa.alternate===null&&s(oe,tt),K=O(wa,K,bt),st===null?Ke=wa:st.sibling=wa,st=wa,tt=Un}if(Ot.done)return f(oe,tt),rn&&fl(oe,bt),Ke;if(tt===null){for(;!Ot.done;bt++,Ot=fe.next())Ot=et(oe,Ot.value,Ne),Ot!==null&&(K=O(Ot,K,bt),st===null?Ke=Ot:st.sibling=Ot,st=Ot);return rn&&fl(oe,bt),Ke}for(tt=g(oe,tt);!Ot.done;bt++,Ot=fe.next())Ot=Kt(tt,oe,bt,Ot.value,Ne),Ot!==null&&(l&&Ot.alternate!==null&&tt.delete(Ot.key===null?bt:Ot.key),K=O(Ot,K,bt),st===null?Ke=Ot:st.sibling=Ot,st=Ot);return l&&tt.forEach(function(Vk){return s(oe,Vk)}),rn&&fl(oe,bt),Ke}function Ao(oe,K,fe,Ne){if(typeof fe=="object"&&fe!==null&&fe.type===h&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case c:e:{for(var Ke=fe.key,st=K;st!==null;){if(st.key===Ke){if(Ke=fe.type,Ke===h){if(st.tag===7){f(oe,st.sibling),K=y(st,fe.props.children),K.return=oe,oe=K;break e}}else if(st.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===k&&py(Ke)===st.type){f(oe,st.sibling),K=y(st,fe.props),K.ref=vc(oe,st,fe),K.return=oe,oe=K;break e}f(oe,st);break}else s(oe,st);st=st.sibling}fe.type===h?(K=wl(fe.props.children,oe.mode,Ne,fe.key),K.return=oe,oe=K):(Ne=sp(fe.type,fe.key,fe.props,null,oe.mode,Ne),Ne.ref=vc(oe,K,fe),Ne.return=oe,oe=Ne)}return R(oe);case d:e:{for(st=fe.key;K!==null;){if(K.key===st)if(K.tag===4&&K.stateNode.containerInfo===fe.containerInfo&&K.stateNode.implementation===fe.implementation){f(oe,K.sibling),K=y(K,fe.children||[]),K.return=oe,oe=K;break e}else{f(oe,K);break}else s(oe,K);K=K.sibling}K=Kg(fe,oe.mode,Ne),K.return=oe,oe=K}return R(oe);case k:return st=fe._init,Ao(oe,K,st(fe._payload),Ne)}if(ve(fe))return $t(oe,K,fe,Ne);if(A(fe))return Tr(oe,K,fe,Ne);jf(oe,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"?(fe=""+fe,K!==null&&K.tag===6?(f(oe,K.sibling),K=y(K,fe),K.return=oe,oe=K):(f(oe,K),K=Yg(fe,oe.mode,Ne),K.return=oe,oe=K),R(oe)):f(oe,K)}return Ao}var Os=hy(!0),gy=hy(!1),yc={},di=Ii(yc),wc=Ii(yc),Ps=Ii(yc);function io(l){if(l===yc)throw Error(a(174));return l}function ug(l,s){Bt(Ps,s),Bt(wc,l),Bt(di,yc),l=pe(s),Ft(di),Bt(di,l)}function ks(){Ft(di),Ft(wc),Ft(Ps)}function my(l){var s=io(Ps.current),f=io(di.current);s=Y(f,l.type,s),f!==s&&(Bt(wc,l),Bt(di,s))}function cg(l){wc.current===l&&(Ft(di),Ft(wc))}var sn=Ii(0);function Nf(l){for(var s=l;s!==null;){if(s.tag===13){var f=s.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Ln(f)||Or(f)))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break;for(;s.sibling===null;){if(s.return===null||s.return===l)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var dg=[];function fg(){for(var l=0;lf?f:4,l(!0);var g=pg.transition;pg.transition={};try{l(!1),s()}finally{mt=f,pg.transition=g}}function Ry(){return fi().memoizedState}function vk(l,s,f){var g=ma(l);if(f={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null},zy(l))jy(s,f);else if(f=oy(l,s,f,g),f!==null){var y=ur();pi(f,l,g,y),Ny(f,s,g)}}function yk(l,s,f){var g=ma(l),y={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null};if(zy(l))jy(s,y);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=s.lastRenderedReducer,O!==null))try{var R=s.lastRenderedState,Z=O(R,f);if(y.hasEagerState=!0,y.eagerState=Z,N(Z,R)){var le=s.interleaved;le===null?(y.next=y,og(s)):(y.next=le.next,le.next=y),s.interleaved=y;return}}catch{}finally{}f=oy(l,s,y,g),f!==null&&(y=ur(),pi(f,l,g,y),Ny(f,s,g))}}function zy(l){var s=l.alternate;return l===un||s!==null&&s===un}function jy(l,s){Cc=Bf=!0;var f=l.pending;f===null?s.next=s:(s.next=f.next,f.next=s),l.pending=s}function Ny(l,s,f){if(f&4194240){var g=s.lanes;g&=l.pendingLanes,f|=g,s.lanes=f,dl(l,f)}}var $f={readContext:ci,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},wk={readContext:ci,useCallback:function(l,s){return oo().memoizedState=[l,s===void 0?null:s],l},useContext:ci,useEffect:Py,useImperativeHandle:function(l,s,f){return f=f!=null?f.concat([l]):null,Hf(4194308,4,Ty.bind(null,s,l),f)},useLayoutEffect:function(l,s){return Hf(4194308,4,l,s)},useInsertionEffect:function(l,s){return Hf(4,2,l,s)},useMemo:function(l,s){var f=oo();return s=s===void 0?null:s,l=l(),f.memoizedState=[l,s],l},useReducer:function(l,s,f){var g=oo();return s=f!==void 0?f(s):s,g.memoizedState=g.baseState=s,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:s},g.queue=l,l=l.dispatch=vk.bind(null,un,l),[g.memoizedState,l]},useRef:function(l){var s=oo();return l={current:l},s.memoizedState=l},useState:by,useDebugValue:Cg,useDeferredValue:function(l){return oo().memoizedState=l},useTransition:function(){var l=by(!1),s=l[0];return l=mk.bind(null,l[1]),oo().memoizedState=l,[s,l]},useMutableSource:function(){},useSyncExternalStore:function(l,s,f){var g=un,y=oo();if(rn){if(f===void 0)throw Error(a(407));f=f()}else{if(f=s(),Gn===null)throw Error(a(349));hl&30||wy(g,s,f)}y.memoizedState=f;var O={value:f,getSnapshot:s};return y.queue=O,Py(Sy.bind(null,g,O,l),[l]),g.flags|=2048,Ec(9,Cy.bind(null,g,O,f,s),void 0,null),f},useId:function(){var l=oo(),s=Gn.identifierPrefix;if(rn){var f=_o,g=si;f=(g&~(1<<32-Ur(g)-1)).toString(32)+f,s=":"+s+"R"+f,f=Sc++,0Fg&&(s.flags|=128,g=!0,Pc(y,!1),s.lanes=4194304)}else{if(!g)if(l=Nf(O),l!==null){if(s.flags|=128,g=!0,l=l.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Pc(y,!0),y.tail===null&&y.tailMode==="hidden"&&!O.alternate&&!rn)return lr(s),null}else 2*nn()-y.renderingStartTime>Fg&&f!==1073741824&&(s.flags|=128,g=!0,Pc(y,!1),s.lanes=4194304);y.isBackwards?(O.sibling=s.child,s.child=O):(l=y.last,l!==null?l.sibling=O:s.child=O,y.last=O)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=nn(),s.sibling=null,l=sn.current,Bt(sn,g?l&1|2:l&1),s):(lr(s),null);case 22:case 23:return Ug(),f=s.memoizedState!==null,l!==null&&l.memoizedState!==null!==f&&(s.flags|=8192),f&&s.mode&1?Zr&1073741824&&(lr(s),xe&&s.subtreeFlags&6&&(s.flags|=8192)):lr(s),null;case 24:return null;case 25:return null}throw Error(a(156,s.tag))}function kk(l,s){switch(q1(s),s.tag){case 1:return ir(s.type)&&ms(),l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 3:return ks(),Ft(rr),Ft(Fn),fg(),l=s.flags,l&65536&&!(l&128)?(s.flags=l&-65537|128,s):null;case 5:return cg(s),null;case 13:if(Ft(sn),l=s.memoizedState,l!==null&&l.dehydrated!==null){if(s.alternate===null)throw Error(a(340));xs()}return l=s.flags,l&65536?(s.flags=l&-65537|128,s):null;case 19:return Ft(sn),null;case 4:return ks(),null;case 10:return rg(s.type._context),null;case 22:case 23:return Ug(),null;case 24:return null;default:return null}}var Xf=!1,sr=!1,_k=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Ts(l,s){var f=l.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){on(l,s,g)}else f.current=null}function Tg(l,s,f){try{f()}catch(g){on(l,s,g)}}var n6=!1;function Tk(l,s){for(de(l.containerInfo),Be=s;Be!==null;)if(l=Be,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Be=s;else for(;Be!==null;){l=Be;try{var f=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var g=f.memoizedProps,y=f.memoizedState,O=l.stateNode,R=O.getSnapshotBeforeUpdate(l.elementType===l.type?g:Mi(l.type,g),y);O.__reactInternalSnapshotBeforeUpdate=R}break;case 3:xe&&Nt(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Z){on(l,l.return,Z)}if(s=l.sibling,s!==null){s.return=l.return,Be=s;break}Be=l.return}return f=n6,n6=!1,f}function kc(l,s,f){var g=s.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&l)===l){var O=y.destroy;y.destroy=void 0,O!==void 0&&Tg(s,f,O)}y=y.next}while(y!==g)}}function Zf(l,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var f=s=s.next;do{if((f.tag&l)===l){var g=f.create;f.destroy=g()}f=f.next}while(f!==s)}}function Ig(l){var s=l.ref;if(s!==null){var f=l.stateNode;switch(l.tag){case 5:l=te(f);break;default:l=f}typeof s=="function"?s(l):s.current=l}}function r6(l){var s=l.alternate;s!==null&&(l.alternate=null,r6(s)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(s=l.stateNode,s!==null&&$e(s)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function i6(l){return l.tag===5||l.tag===3||l.tag===4}function o6(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||i6(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Lg(l,s,f){var g=l.tag;if(g===5||g===6)l=l.stateNode,s?En(f,l,s):Ae(f,l);else if(g!==4&&(l=l.child,l!==null))for(Lg(l,s,f),l=l.sibling;l!==null;)Lg(l,s,f),l=l.sibling}function Ag(l,s,f){var g=l.tag;if(g===5||g===6)l=l.stateNode,s?_t(f,l,s):Ye(f,l);else if(g!==4&&(l=l.child,l!==null))for(Ag(l,s,f),l=l.sibling;l!==null;)Ag(l,s,f),l=l.sibling}var qn=null,Ri=!1;function lo(l,s,f){for(f=f.child;f!==null;)Mg(l,s,f),f=f.sibling}function Mg(l,s,f){if(li&&typeof li.onCommitFiberUnmount=="function")try{li.onCommitFiberUnmount(Ss,f)}catch{}switch(f.tag){case 5:sr||Ts(f,s);case 6:if(xe){var g=qn,y=Ri;qn=null,lo(l,s,f),qn=g,Ri=y,qn!==null&&(Ri?In(qn,f.stateNode):ln(qn,f.stateNode))}else lo(l,s,f);break;case 18:xe&&qn!==null&&(Ri?W1(qn,f.stateNode):$1(qn,f.stateNode));break;case 4:xe?(g=qn,y=Ri,qn=f.stateNode.containerInfo,Ri=!0,lo(l,s,f),qn=g,Ri=y):(ye&&(g=f.stateNode.containerInfo,y=tn(g),eo(g,y)),lo(l,s,f));break;case 0:case 11:case 14:case 15:if(!sr&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var O=y,R=O.destroy;O=O.tag,R!==void 0&&(O&2||O&4)&&Tg(f,s,R),y=y.next}while(y!==g)}lo(l,s,f);break;case 1:if(!sr&&(Ts(f,s),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(Z){on(f,s,Z)}lo(l,s,f);break;case 21:lo(l,s,f);break;case 22:f.mode&1?(sr=(g=sr)||f.memoizedState!==null,lo(l,s,f),sr=g):lo(l,s,f);break;default:lo(l,s,f)}}function a6(l){var s=l.updateQueue;if(s!==null){l.updateQueue=null;var f=l.stateNode;f===null&&(f=l.stateNode=new _k),s.forEach(function(g){var y=Dk.bind(null,l,g);f.has(g)||(f.add(g),g.then(y,y))})}}function zi(l,s){var f=s.deletions;if(f!==null)for(var g=0;g";case Kf:return":has("+(jg(l)||"")+")";case qf:return'[role="'+l.value+'"]';case Jf:return'"'+l.value+'"';case Qf:return'[data-testname="'+l.value+'"]';default:throw Error(a(365))}}function f6(l,s){var f=[];l=[l,0];for(var g=0;gy&&(y=R),g&=~O}if(g=y,g=nn()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*Lk(g/1960))-g,10l?16:l,ga===null)var g=!1;else{if(l=ga,ga=null,ip=0,ht&6)throw Error(a(331));var y=ht;for(ht|=4,Be=l.current;Be!==null;){var O=Be,R=O.child;if(Be.flags&16){var Z=O.deletions;if(Z!==null){for(var le=0;lenn()-Hg?ml(l,0):Bg|=f),_r(l,s)}function S6(l,s){s===0&&(l.mode&1?(s=ul,ul<<=1,!(ul&130023424)&&(ul=4194304)):s=1);var f=ur();l=ro(l,s),l!==null&&(no(l,s,f),_r(l,f))}function Nk(l){var s=l.memoizedState,f=0;s!==null&&(f=s.retryLane),S6(l,f)}function Dk(l,s){var f=0;switch(l.tag){case 13:var g=l.stateNode,y=l.memoizedState;y!==null&&(f=y.retryLane);break;case 19:g=l.stateNode;break;default:throw Error(a(314))}g!==null&&g.delete(s),S6(l,f)}var x6;x6=function(l,s,f){if(l!==null)if(l.memoizedProps!==s.pendingProps||rr.current)Pr=!0;else{if(!(l.lanes&f)&&!(s.flags&128))return Pr=!1,Ok(l,s,f);Pr=!!(l.flags&131072)}else Pr=!1,rn&&s.flags&1048576&&J4(s,$n,s.index);switch(s.lanes=0,s.tag){case 2:var g=s.type;Vf(l,s),l=s.pendingProps;var y=ca(s,Fn.current);bs(s,f),y=gg(null,s,g,l,y,f);var O=mg();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,ir(g)?(O=!0,da(s)):O=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,ag(s),y.updater=zf,s.stateNode=y,y._reactInternals=s,sg(s,g,l,f),s=bg(null,s,g,!0,O,f)):(s.tag=0,rn&&O&&K1(s),yr(null,s,y,f),s=s.child),s;case 16:g=s.elementType;e:{switch(Vf(l,s),l=s.pendingProps,y=g._init,g=y(g._payload),s.type=g,y=s.tag=Hk(g),l=Mi(g,l),y){case 0:s=Eg(null,s,g,l,f);break e;case 1:s=Zy(null,s,g,l,f);break e;case 11:s=Wy(null,s,g,l,f);break e;case 14:s=Vy(null,s,g,Mi(g.type,l),f);break e}throw Error(a(306,g,""))}return s;case 0:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:Mi(g,y),Eg(l,s,g,y,f);case 1:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:Mi(g,y),Zy(l,s,g,y,f);case 3:e:{if(Yy(s),l===null)throw Error(a(387));g=s.pendingProps,O=s.memoizedState,y=O.element,ay(l,s),Rf(s,g,null,f);var R=s.memoizedState;if(g=R.element,Ge&&O.isDehydrated)if(O={element:g,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},s.updateQueue.baseState=O,s.memoizedState=O,s.flags&256){y=_s(Error(a(423)),s),s=Ky(l,s,g,f,y);break e}else if(g!==y){y=_s(Error(a(424)),s),s=Ky(l,s,g,f,y);break e}else for(Ge&&(ui=z1(s.stateNode.containerInfo),Xr=s,rn=!0,Ai=null,mc=!1),f=gy(s,null,g,f),s.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(xs(),g===y){s=Io(l,s,f);break e}yr(l,s,g,f)}s=s.child}return s;case 5:return my(s),l===null&&J1(s),g=s.type,y=s.pendingProps,O=l!==null?l.memoizedProps:null,R=y.children,Ee(g,y)?R=null:O!==null&&Ee(g,O)&&(s.flags|=32),Xy(l,s),yr(l,s,R,f),s.child;case 6:return l===null&&J1(s),null;case 13:return qy(l,s,f);case 4:return ug(s,s.stateNode.containerInfo),g=s.pendingProps,l===null?s.child=Os(s,null,g,f):yr(l,s,g,f),s.child;case 11:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:Mi(g,y),Wy(l,s,g,y,f);case 7:return yr(l,s,s.pendingProps,f),s.child;case 8:return yr(l,s,s.pendingProps.children,f),s.child;case 12:return yr(l,s,s.pendingProps.children,f),s.child;case 10:e:{if(g=s.type._context,y=s.pendingProps,O=s.memoizedProps,R=y.value,iy(s,g,R),O!==null)if(N(O.value,R)){if(O.children===y.children&&!rr.current){s=Io(l,s,f);break e}}else for(O=s.child,O!==null&&(O.return=s);O!==null;){var Z=O.dependencies;if(Z!==null){R=O.child;for(var le=Z.firstContext;le!==null;){if(le.context===g){if(O.tag===1){le=To(-1,f&-f),le.tag=2;var _e=O.updateQueue;if(_e!==null){_e=_e.shared;var We=_e.pending;We===null?le.next=le:(le.next=We.next,We.next=le),_e.pending=le}}O.lanes|=f,le=O.alternate,le!==null&&(le.lanes|=f),ig(O.return,f,s),Z.lanes|=f;break}le=le.next}}else if(O.tag===10)R=O.type===s.type?null:O.child;else if(O.tag===18){if(R=O.return,R===null)throw Error(a(341));R.lanes|=f,Z=R.alternate,Z!==null&&(Z.lanes|=f),ig(R,f,s),R=O.sibling}else R=O.child;if(R!==null)R.return=O;else for(R=O;R!==null;){if(R===s){R=null;break}if(O=R.sibling,O!==null){O.return=R.return,R=O;break}R=R.return}O=R}yr(l,s,y.children,f),s=s.child}return s;case 9:return y=s.type,g=s.pendingProps.children,bs(s,f),y=ci(y),g=g(y),s.flags|=1,yr(l,s,g,f),s.child;case 14:return g=s.type,y=Mi(g,s.pendingProps),y=Mi(g.type,y),Vy(l,s,g,y,f);case 15:return Gy(l,s,s.type,s.pendingProps,f);case 17:return g=s.type,y=s.pendingProps,y=s.elementType===g?y:Mi(g,y),Vf(l,s),s.tag=1,ir(g)?(l=!0,da(s)):l=!1,bs(s,f),dy(s,g,y),sg(s,g,y,f),bg(null,s,g,!0,l,f);case 19:return Jy(l,s,f);case 22:return Uy(l,s,f)}throw Error(a(156,s.tag))};function E6(l,s){return ws(l,s)}function Bk(l,s,f,g){this.tag=l,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hi(l,s,f,g){return new Bk(l,s,f,g)}function Zg(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Hk(l){if(typeof l=="function")return Zg(l)?1:0;if(l!=null){if(l=l.$$typeof,l===x)return 11;if(l===E)return 14}return 2}function ya(l,s){var f=l.alternate;return f===null?(f=hi(l.tag,s,l.key,l.mode),f.elementType=l.elementType,f.type=l.type,f.stateNode=l.stateNode,f.alternate=l,l.alternate=f):(f.pendingProps=s,f.type=l.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=l.flags&14680064,f.childLanes=l.childLanes,f.lanes=l.lanes,f.child=l.child,f.memoizedProps=l.memoizedProps,f.memoizedState=l.memoizedState,f.updateQueue=l.updateQueue,s=l.dependencies,f.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},f.sibling=l.sibling,f.index=l.index,f.ref=l.ref,f}function sp(l,s,f,g,y,O){var R=2;if(g=l,typeof l=="function")Zg(l)&&(R=1);else if(typeof l=="string")R=5;else e:switch(l){case h:return wl(f.children,y,O,s);case m:R=8,y|=8;break;case v:return l=hi(12,f,s,y|2),l.elementType=v,l.lanes=O,l;case P:return l=hi(13,f,s,y),l.elementType=P,l.lanes=O,l;case b:return l=hi(19,f,s,y),l.elementType=b,l.lanes=O,l;case T:return up(f,y,O,s);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case C:R=10;break e;case w:R=9;break e;case x:R=11;break e;case E:R=14;break e;case k:R=16,g=null;break e}throw Error(a(130,l==null?l:typeof l,""))}return s=hi(R,f,s,y),s.elementType=l,s.type=g,s.lanes=O,s}function wl(l,s,f,g){return l=hi(7,l,g,s),l.lanes=f,l}function up(l,s,f,g){return l=hi(22,l,g,s),l.elementType=T,l.lanes=f,l.stateNode={isHidden:!1},l}function Yg(l,s,f){return l=hi(6,l,null,s),l.lanes=f,l}function Kg(l,s,f){return s=hi(4,l.children!==null?l.children:[],l.key,s),s.lanes=f,s.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},s}function Fk(l,s,f,g,y){this.tag=s,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ze,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fc(0),this.expirationTimes=fc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fc(0),this.identifierPrefix=g,this.onRecoverableError=y,Ge&&(this.mutableSourceEagerHydrationData=null)}function b6(l,s,f,g,y,O,R,Z,le){return l=new Fk(l,s,f,Z,le),s===1?(s=1,O===!0&&(s|=8)):s=0,O=hi(3,null,null,s),l.current=O,O.stateNode=l,O.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},ag(O),l}function O6(l){if(!l)return to;l=l._reactInternals;e:{if(D(l)!==l||l.tag!==1)throw Error(a(170));var s=l;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(ir(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(a(171))}if(l.tag===1){var f=l.type;if(ir(f))return sl(l,f,s)}return s}function P6(l){var s=l._reactInternals;if(s===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=G(s),l===null?null:l.stateNode}function k6(l,s){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var f=l.retryLane;l.retryLane=f!==0&&f=_e&&O>=et&&y<=We&&R<=je){l.splice(s,1);break}else if(g!==_e||f.width!==le.width||jeR){if(!(O!==et||f.height!==le.height||Wey)){_e>g&&(le.width+=_e-g,le.x=g),WeO&&(le.height+=et-O,le.y=O),jef&&(f=R)),R ")+"\n\nNo matching component was found for:\n ")+l.join(" > ")}return null},n.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return te(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:$k,findFiberByHostInstance:l.findFiberByHostInstance||Wk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(s.isDisabled||!s.supportsFiber)l=!0;else{try{Ss=s.inject(l),li=s}catch{}l=!!s.checkDCE}}return l},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(l,s,f,g){if(!qe)throw Error(a(363));l=Ng(l,s);var y=Tn(l,f,g).disconnect;return{disconnect:function(){y()}}},n.registerMutableSourceForHydration=function(l,s){var f=s._getVersion;f=f(s._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[s,f]:l.mutableSourceEagerHydrationData.push(s,f)},n.runWithPriority=function(l,s){var f=mt;try{return mt=l,s()}finally{mt=f}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(l,s,f,g){var y=s.current,O=ur(),R=ma(y);return f=O6(f),s.context===null?s.context=f:s.pendingContext=f,s=To(O,R),s.payload={element:l},g=g===void 0?null:g,g!==null&&(s.callback=g),l=pa(y,s,R),l!==null&&(pi(l,y,R,O),Mf(l,y,R)),R},n};wb.exports=iR;var oR=wb.exports;const aR=rf(oR);var Cb={exports:{}},os={};/**
+ * @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.
+ */os.ConcurrentRoot=1;os.ContinuousEventPriority=4;os.DefaultEventPriority=16;os.DiscreteEventPriority=1;os.IdleEventPriority=536870912;os.LegacyRoot=0;Cb.exports=os;var Sb=Cb.exports;const k7={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let _7=!1,T7=!1;const X3=".react-konva-event";let xb=!1;function lR(t){xb=t}const sR="ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n",uR='ReactKonva: You are using "zIndex" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n',cR={};function m1(t,e,n=cR){if(!_7&&"zIndex"in e&&(console.warn(uR),_7=!0),!T7&&e.draggable){var r=e.x!==void 0||e.y!==void 0,i=e.onDragEnd||e.onDragMove;r&&!i&&(console.warn(sR),T7=!0)}for(var o in n)if(!k7[o]){var a=o.slice(0,2)==="on",u=n[o]!==e[o];if(a&&u){var c=o.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t.off(c,n[o])}var d=!e.hasOwnProperty(o);d&&t.setAttr(o,void 0)}var h=xb||e._useStrictMode,m={},v=!1;const C={};for(var o in e)if(!k7[o]){var a=o.slice(0,2)==="on",w=n[o]!==e[o];if(a&&w){var c=o.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e[o]&&(C[c]=e[o])}!a&&(e[o]!==n[o]||h&&e[o]!==t.getAttr(o))&&(v=!0,m[o]=e[o])}v&&(t.setAttrs(m),Ja(t));for(var c in C)t.on(c+X3,C[c])}function Ja(t){if(!Fe.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}const Eb={},dR={};Yl.Node.prototype._applyProps=m1;function fR(t,e){if(typeof e=="string"){console.error("Do not use plain text as child of Konva.Node. You are using text: ".concat(e));return}t.add(e),Ja(t)}function pR(t,e,n){let r=Yl[t];r||(console.error("Konva has no node with the type ".concat(t,'. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/').concat(t,'" 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=Yl.Group);const i={},o={};for(var a in e){var u=a.slice(0,2)==="on";u?o[a]=e[a]:i[a]=e[a]}const c=new r(i);return m1(c,o),c}function hR(t,e,n){console.error('Text components are not supported for now in ReactKonva. Your text is: "'.concat(t,'"'))}function gR(t,e,n){return!1}function mR(t){return t}function vR(){return null}function yR(){return null}function wR(t,e,n,r){return dR}function CR(){}function SR(t){}function xR(t,e){return!1}function ER(){return Eb}function bR(){return Eb}const OR=setTimeout,PR=clearTimeout,kR=-1;function _R(t,e){return!1}const TR=!1,IR=!0,LR=!0;function AR(t,e){e.parent===t?e.moveToTop():t.add(e),Ja(t)}function MR(t,e){e.parent===t?e.moveToTop():t.add(e),Ja(t)}function bb(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),Ja(t)}function RR(t,e,n){bb(t,e,n)}function zR(t,e){e.destroy(),e.off(X3),Ja(t)}function jR(t,e){e.destroy(),e.off(X3),Ja(t)}function NR(t,e,n){console.error('Text components are not yet supported in ReactKonva. You text is: "'.concat(n,'"'))}function DR(t,e,n){}function BR(t,e,n,r,i){m1(t,i,r)}function HR(t){t.hide(),Ja(t)}function FR(t){}function $R(t,e){(e.visible==null||e.visible)&&t.show()}function WR(t,e){}function VR(t){}function GR(){}const UR=()=>Sb.DefaultEventPriority,XR=Object.freeze(Object.defineProperty({__proto__:null,appendChild:AR,appendChildToContainer:MR,appendInitialChild:fR,cancelTimeout:PR,clearContainer:VR,commitMount:DR,commitTextUpdate:NR,commitUpdate:BR,createInstance:pR,createTextInstance:hR,detachDeletedInstance:GR,finalizeInitialChildren:gR,getChildHostContext:bR,getCurrentEventPriority:UR,getPublicInstance:mR,getRootHostContext:ER,hideInstance:HR,hideTextInstance:FR,idlePriority:gd.unstable_IdlePriority,insertBefore:bb,insertInContainerBefore:RR,isPrimaryRenderer:TR,noTimeout:kR,now:gd.unstable_now,prepareForCommit:vR,preparePortalMount:yR,prepareUpdate:wR,removeChild:zR,removeChildFromContainer:jR,resetAfterCommit:CR,resetTextContent:SR,run:gd.unstable_runWithPriority,scheduleTimeout:OR,shouldDeprioritizeSubtree:xR,shouldSetTextContent:_R,supportsMutation:LR,unhideInstance:$R,unhideTextInstance:WR,warnsIfNotActing:IR},Symbol.toStringTag,{value:"Module"}));var ZR=Object.defineProperty,YR=Object.defineProperties,KR=Object.getOwnPropertyDescriptors,I7=Object.getOwnPropertySymbols,qR=Object.prototype.hasOwnProperty,QR=Object.prototype.propertyIsEnumerable,L7=(t,e,n)=>e in t?ZR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A7=(t,e)=>{for(var n in e||(e={}))qR.call(e,n)&&L7(t,n,e[n]);if(I7)for(var n of I7(e))QR.call(e,n)&&L7(t,n,e[n]);return t},JR=(t,e)=>YR(t,KR(e)),M7,R7;typeof window<"u"&&((M7=window.document)!=null&&M7.createElement||((R7=window.navigator)==null?void 0:R7.product)==="ReactNative")?z.useLayoutEffect:z.useEffect;function Ob(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=Ob(r,e,n);if(i)return i;r=e?null:r.sibling}}function Pb(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const z7=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=z7;return}return z7.apply(this,arguments)};const Z3=Pb(z.createContext(null));class kb extends z.Component{render(){return z.createElement(Z3.Provider,{value:this._reactInternals},this.props.children)}}function ez(){const t=z.useContext(Z3);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=z.useId();return z.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=Ob(r,!1,o=>{let a=o.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(i)return i}},[t,e])}function tz(){const t=ez(),[e]=z.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==Z3&&!e.has(i)&&e.set(i,z.useContext(Pb(i)))}n=n.return}return e}function nz(){const t=tz();return z.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>z.createElement(e,null,z.createElement(n.Provider,JR(A7({},r),{value:t.get(n)}))),e=>z.createElement(kb,A7({},e))),[t])}function rz(t){const e=p.useRef({});return p.useLayoutEffect(()=>{e.current=t}),p.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const iz=t=>{const e=p.useRef(),n=p.useRef(),r=p.useRef(),i=rz(t),o=nz(),a=u=>{const{forwardedRef:c}=t;c&&(typeof c=="function"?c(u):c.current=u)};return p.useLayoutEffect(()=>(n.current=new Yl.Stage({width:t.width,height:t.height,container:e.current}),a(n.current),r.current=fd.createContainer(n.current,Sb.LegacyRoot,!1,null),fd.updateContainer(p.createElement(o,{},t.children),r.current),()=>{Yl.isBrowser&&(a(null),fd.updateContainer(null,r.current,null),n.current.destroy())}),[]),p.useLayoutEffect(()=>{a(n.current),m1(n.current,t,i),fd.updateContainer(p.createElement(o,{},t.children),r.current,null)}),p.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},Y3="Layer",oz="Group",_b="Rect",Tb="Ellipse",az="Line",v1="Image",lz="Text",sz="RegularPolygon",uz="Arrow",Ib="Transformer",fd=aR(XR);fd.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:p.version,rendererPackageName:"react-konva"});const Lb=p.forwardRef((t,e)=>p.createElement(kb,{},p.createElement(iz,{...t,forwardedRef:e}))),cz=lR;var Cv=function(t,e,n,r){return Math.min(t/n,e/r)||1},C0="FIE_root",dz="FIE_design-layer",Ab="FIE_transformers-layer",Mb="FIE_original-image",Rb="FIE_nodes-transformer",Va="watermark",Sv="353297d2-40b4-4684-a875-45a2178a8157",zb=.92,Vt={FINETUNE:"Finetune",FILTERS:"Filters",ADJUST:"Adjust",WATERMARK:"Watermark",ANNOTATE:"Annotate",RESIZE:"Resize"},Q={CROP:"Crop",ROTATE:"Rotate",FLIP_X:"Flip_X",FLIP_Y:"Flip_Y",BRIGHTNESS:"Brightness",CONTRAST:"Contrast",HSV:"HueSaturationValue",WARMTH:"Warmth",BLUR:"Blur",THRESHOLD:"Threshold",POSTERIZE:"Posterize",PIXELATE:"Pixelate",NOISE:"Noise",FILTERS:"Filters",RECT:"Rect",ELLIPSE:"Ellipse",POLYGON:"Polygon",TEXT:"Text",LINE:"Line",IMAGE:"Image",ARROW:"Arrow",WATERMARK:"Watermark",PEN:"Pen",RESIZE:"Resize"},K3={X:"X",Y:"Y"},Qo=1,Vu=["png","jpeg","jpg","webp"],fz=[].concat(Vu,["svg","gif","avif","apng"]),j7=Vu[0],Go={DEFAULT:"default",DRAW:"crosshair",SELECT:"pointer",MOVE:"move",DRAG:"GRAB"},qd="Crop",jb="custom",as="ellipse",Pn={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",MIDDLE_LEFT:"middle-left",MIDDLE_CENTER:"middle-center",MIDDLE_RIGHT:"middle-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right"},N7={WIDTH:14,HEIGHT:14},Nb={AFTER_SAVE:"after-saving",CLOSE_BUTTON:"close-button-clicked",BACK_BUTTON:"back-button-clicked"},Gu={WARNING:"warning",ERROR:"error"},D7={top:"north",bottom:"south",left:"west",center:"center",right:"east"},pz={northwest:"top-left",northcenter:"top-center",northeast:"top-right",centerwest:"center-left",centercenter:"center-center",centereast:"center-right",southwest:"bottom-left",southcenter:"bottom-center",southeast:"bottom-right"},hz=function(t,e){var n=2=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(c){throw c},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var c=n.next();return o=c.done,c},e:function(c){a=!0},f:function u(){try{o||n.return==null||n.return()}finally{if(a)throw u}}}}function yz(t,e){if(t){if(typeof t=="string")return W7(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W7(t,e):void 0}}function W7(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nr?-1:r,r=~~(255*r),[n[0]+r,n[1]+r,n[2]+r]}},contrast:function(e){return function(n){var r=e;r*=255;var i=259*(r+255)/(255*(259-r));return[i*(n[0]-128)+128,i*(n[1]-128)+128,i*(n[2]-128)+128]}},saturation:function(e){return function(n){var r=e;r=-1>r?-1:r;var i=n[0],o=n[1],a=n[2],u=.2989*i+.587*o+.114*a;return[-u*r+i*(1+r),-u*r+o*(1+r),-u*r+a*(1+r)]}},grayscale:function(){return function(e){var n=e[0],r=e[1],i=e[2];return[,,,].fill(.2126*n+.7152*r+.0722*i)}},sepia:function(e){return function(n){var r=n[0],i=n[1],o=n[2];return[r*(1-.607*e)+.769*i*e+.189*o*e,.349*r*e+i*(1-.314*e)+.168*o*e,.272*r*e+.534*i*e+o*(1-.869*e)]}},adjustRGB:function(e){return function(n){return[n[0]*e[0],n[1]*e[1],n[2]*e[2]]}},colorFilter:function(e){return function(n){var r=n[0],i=n[1],o=n[2],a=e[3];return[r-(r-e[0])*a,i-(i-e[1])*a,o-(o-e[2])*a]}}};function q3(t){ge.apply(t,function(e){var n=(e[0]+e[1]+e[2])/3>100,r=n?255:0;return[r,r,r]})}q3.filterName="BlackAndWhite";var wz=.1,Cz=.1,Sz=.15;function Q3(t){ge.apply(t,ge.brightness(wz),ge.contrast(Cz),ge.saturation(Sz))}Q3.filterName="Clarendon";var xz=.04,Ez=-.15;function J3(t){ge.apply(t,ge.sepia(xz),ge.contrast(Ez))}J3.filterName="Gingham";var bz=.1;function e5(t){ge.apply(t,ge.grayscale(),ge.brightness(bz));var e=t.data;e.length}e5.filterName="Moon";var Oz=.08,Pz=[1,1.03,1.05],kz=.12;function t5(t){ge.apply(t,ge.brightness(Oz),ge.adjustRGB(Pz),ge.saturation(kz))}t5.filterName="Lark";var _z=.4,Tz=.13,Iz=-.05;function n5(t){ge.apply(t,ge.sepia(_z),ge.brightness(Tz),ge.contrast(Iz))}n5.filterName="Reyes";var Lz=[1.01,1.04,1],Az=.3;function r5(t){ge.apply(t,ge.adjustRGB(Lz),ge.saturation(Az))}r5.filterName="Juno";var Mz=.1,Rz=-.5;function i5(t){ge.apply(t,ge.brightness(Mz),ge.saturation(Rz))}i5.filterName="Slumber";var zz=[1.04,1,1.02],jz=-.05;function o5(t){ge.apply(t,ge.adjustRGB(zz),ge.saturation(jz))}o5.filterName="Crema";var Nz=.05,Dz=-.03;function a5(t){ge.apply(t,ge.brightness(Nz),ge.saturation(Dz))}a5.filterName="Ludwig";var Bz=[228,130,225,.13],Hz=-.2;function l5(t){ge.apply(t,ge.colorFilter(Bz),ge.saturation(Hz))}l5.filterName="Aden";var Fz=[1.05,1.1,1];function s5(t){ge.apply(t,ge.adjustRGB(Fz))}s5.filterName="Perpetua";var $z=.3,Wz=.15;function u5(t){ge.apply(t,ge.saturation($z),ge.brightness(Wz))}u5.filterName="Amaro";var Vz=[230,115,108,.05],Gz=.15;function c5(t){ge.apply(t,ge.colorFilter(Vz),ge.saturation(Gz))}c5.filterName="Mayfair";var Uz=[255,170,0,.1],Xz=.09,Zz=.1;function d5(t){ge.apply(t,ge.colorFilter(Uz),ge.brightness(Xz),ge.saturation(Zz))}d5.filterName="Rise";var Yz=[1,1,1.25],Kz=.1,qz=.15;function f5(t){ge.apply(t,ge.adjustRGB(Yz),ge.contrast(Kz),ge.brightness(qz))}f5.filterName="Hudson";var Qz=[255,225,80,.08],Jz=.1,ej=.05;function p5(t){ge.apply(t,ge.colorFilter(Qz),ge.saturation(Jz),ge.contrast(ej))}p5.filterName="Valencia";var tj=[255,255,0,.07],nj=.2,rj=.15;function h5(t){ge.apply(t,ge.colorFilter(tj),ge.saturation(nj),ge.contrast(rj))}h5.filterName="XPro2";var ij=-.15,oj=.1;function g5(t){ge.apply(t,ge.contrast(ij),ge.saturation(oj))}g5.filterName="Sierra";var aj=[100,28,210,.03],lj=.1;function m5(t){ge.apply(t,ge.grayscale(),ge.colorFilter(aj),ge.brightness(lj))}m5.filterName="Willow";var sj=.15,uj=.2;function v5(t){ge.apply(t,ge.contrast(sj),ge.saturation(uj))}v5.filterName="LoFi";var cj=.1,dj=.15;function y5(t){ge.apply(t,ge.contrast(cj),ge.saturation(dj))}y5.filterName="Hefe";var fj=[220,115,188,.12],pj=-.05;function w5(t){ge.apply(t,ge.colorFilter(fj),ge.contrast(pj))}w5.filterName="Nashville";var hj=.1,gj=.3;function C5(t){ge.apply(t,ge.brightness(hj),ge.sepia(gj))}C5.filterName="Stinson";var mj=[255,225,0,.05],vj=.06,yj=.06;function S5(t){ge.apply(t,ge.colorFilter(mj),ge.brightness(vj),ge.contrast(yj))}S5.filterName="Vesper";var wj=[255,165,40,.2];function x5(t){ge.apply(t,ge.colorFilter(wj))}x5.filterName="Earlybird";var Cj=.2,Sj=[140,10,185,.1];function E5(t){ge.apply(t,ge.contrast(Cj),ge.colorFilter(Sj))}E5.filterName="Brannan";var xj=-.1,Ej=-.1;function b5(t){ge.apply(t,ge.brightness(xj),ge.saturation(Ej))}b5.filterName="Sutro";var bj=.1,Oj=[255,145,0,.2];function O5(t){ge.apply(t,ge.sepia(bj),ge.colorFilter(Oj))}O5.filterName="Toaster";var Pj=.1,kj=[255,255,0,.2];function P5(t){ge.apply(t,ge.brightness(Pj),ge.colorFilter(kj))}P5.filterName="Walden";var _j=[255,25,0,.15],Tj=.1;function k5(t){ge.apply(t,ge.colorFilter(_j),ge.brightness(Tj))}k5.filterName="NinteenSeventySeven";var Ij=[255,140,0,.1],Lj=[1.15,1.05,1],Aj=.35;function _5(t){ge.apply(t,ge.colorFilter(Ij),ge.adjustRGB(Lj),ge.saturation(Aj))}_5.filterName="Kelvin";var Mj=[225,240,0,.1],Rj=.25,zj=.05;function T5(t){ge.apply(t,ge.colorFilter(Mj),ge.saturation(Rj),ge.contrast(zj))}T5.filterName="Maven";var jj=.06,Nj=.1;function I5(t){ge.apply(t,ge.sepia(jj),ge.brightness(Nj))}I5.filterName="Ginza";var Dj=.35,Bj=.1;function L5(t){ge.apply(t,ge.saturation(Dj),ge.brightness(Bj))}L5.filterName="Skyline";var Hj=.15,Fj=.1;function A5(t){ge.apply(t,ge.contrast(Hj),ge.brightness(Fj))}A5.filterName="Dogpatch";var $j=[25,240,252,.05],Wj=.3;function M5(t){ge.apply(t,ge.colorFilter($j),ge.sepia(Wj))}M5.filterName="Brooklyn";var Vj=[208,208,86,.2],Gj=.15;function R5(t){ge.apply(t,ge.colorFilter(Vj),ge.contrast(Gj))}R5.filterName="Helena";var Uj=[255,160,25,.1],Xj=.1;function z5(t){ge.apply(t,ge.colorFilter(Uj),ge.brightness(Xj))}z5.filterName="Ashby";var Zj=[255,50,80,.12],Yj=.05;function j5(t){ge.apply(t,ge.colorFilter(Zj),ge.contrast(Yj))}j5.filterName="Charmes";const Kj=Object.freeze(Object.defineProperty({__proto__:null,Aden:l5,Amaro:u5,Ashby:z5,BlackAndWhite:q3,Brannan:E5,Brooklyn:M5,Charmes:j5,Clarendon:Q3,Crema:o5,Dogpatch:A5,Earlybird:x5,Gingham:J3,Ginza:I5,Hefe:y5,Helena:R5,Hudson:f5,Juno:r5,Kelvin:_5,Lark:t5,LoFi:v5,Ludwig:a5,Maven:T5,Mayfair:c5,Moon:e5,Nashville:w5,NinteenSeventySeven:k5,Perpetua:s5,Reyes:n5,Rise:d5,Sierra:g5,Skyline:L5,Slumber:i5,Stinson:C5,Sutro:b5,Toaster:O5,Valencia:p5,Vesper:S5,Walden:P5,Willow:m5,XPro2:h5},Symbol.toStringTag,{value:"Module"}));var Fb=function(t){return t?Kj[t]||fn.Filters[t]:null};function N5(t){for(var e=this.warmth(),n=t.data,r=n.length,i=0;i=e?255:0,n[i+1]=n[i+1]>=e?255:0,n[i+2]=n[i+2]>=e?255:0)}$b.finetuneName="CustomThreshold";H.addGetterSetter(fn.Image,"threshold",0,ke,H.afterSetFilter);const qj=Object.freeze(Object.defineProperty({__proto__:null,CustomThreshold:$b,Warmth:N5},Symbol.toStringTag,{value:"Module"}));var Wb=function(t){return Array.isArray(t)&&0r.status)e(r.response);else{var i;console.warn("Error in sending translation key to backend ".concat((i=r.response)===null||i===void 0?void 0:i.hint,", ").concat(r.status)),n()}},r.onerror=function(){var i;console.warn("Error in sending translation key to backend ".concat((i=r.response)===null||i===void 0?void 0:i.hint,", ").concat(r.status)),n()},r.open("POST","https://neo.wordplex.io/api/import/request-translations?grid_uuid=".concat(Sv)),r.send(JSON.stringify({grid_uuid:Sv,translations_requests:t}))})},aN=function(){var t=0o.status){(o.response||[]).forEach(function(h){Dh[i]=Ev(Ev({},Dh[i]),{},S({},h.translation_key,h.translations[i]))});var a=[];Object.keys(xv).forEach(function(h){var m;h&&!((m=Dh[i])!==null&&m!==void 0&&m[h])&&a.push({key:h,lang:i,default:xv[h]})}),0r,m=0>i;switch(e){case Q.RECT:n?(u.width=Math.sqrt(c*c+d*d),u.height=u.width,u.x-=h?u.width-c:0,u.y-=m?u.height-d:0):(u.width=c,u.height=d);break;case Q.ELLIPSE:n?(u.radiusX=Math.sqrt(c*c+d*d)/2,u.radiusY=u.radiusX,u.x-=h?2*u.radiusX-c:0,u.y-=m?2*u.radiusY-d:0):(u.radiusX=c/2,u.radiusY=d/2),u.offsetX=-u.radiusX,u.offsetY=-u.radiusY;break;case Q.POLYGON:u.radius=(c+d)/2,u.x-=h?2*u.radius-c:0,u.y-=m?2*u.radius-d:0,u.offsetX=-u.radius,u.offsetY=-u.radius;break;case Q.LINE:case Q.ARROW:u.x=o,u.y=a,u.points=[0,0],n?u.points.push(c>=d?r:0,d>c?i:0):u.points=[0,0,r,i];break;default:u.width=c,u.height=d}return u},gN=["id","x","y","points"],mN=["startedX","startedY","offsetX","offsetY","width","height"];function l9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ds(t){for(var e,n=1;n=Uc&&Ar.height>=Uc||Ar.radiusX>=Uc&&Ar.radiusY>=Uc||(x=Ar.points)!==null&&x!==void 0&&x[2]||(P=Ar.points)!==null&&P!==void 0&&P[3]||Ar.radius>=Uc)){var b=Ar;b.startedX,b.startedY,b.offsetX,b.offsetY;var E=b.width,k=b.height,T=se(b,mN);pN.includes(e.name)||(T.width=E,T.height=k),r(T,!0)}Bs=null,Xc=null,Ar=null,t.setAttrs({isDrawing:!1}),t.off("mousemove touchmove",h),t.off("mouseleave touchcancel",m),document.removeEventListener("mouseup",v,Lr),document.removeEventListener("touchend",v,Lr),document.removeEventListener("mouseleave",v,Lr),document.removeEventListener("touchcancel",v,Lr),document.removeEventListener("mousemove",c,Lr),document.removeEventListener("touchmove",c,Lr),co.isOutOfCanvas=!1},C=function(x){var P;if(x.evt.preventDefault(),!(x.target.attrs.draggable||1<((P=x.evt.touches)===null||P===void 0?void 0:P.length))){d();var b=Bh(n,i());co.startedX=b.offsetX,co.startedY=b.offsetY,co.isOutOfCanvas=!1,t.on("mousemove touchmove",h),t.on("mouseleave touchcancel",m),document.addEventListener("mouseup",v,Lr),document.addEventListener("touchend",v,Lr),document.addEventListener("mouseleave",v,Lr),document.addEventListener("touchcancel",v,Lr)}};return t.on("mousedown touchstart",C),function(){d(),t.off("mousedown touchstart",C)}},Kb=function(t,e){var n=2=i?0:function(){return 0>i&&-90=i&&-90<=i?0:function(){return 90>>32-e},Zc=function(t){var e,n,r="";for(e=7;0<=e;e--)n=15&t>>>4*e,r+=n.toString(16);return r},ON=function(t){for(var e,n=t.replace(/\r\n/g,"\n"),r="",i=0;ie?r+=String.fromCharCode(e):127e?(r+=String.fromCharCode(192|e>>6),r+=String.fromCharCode(128|63&e)):(r+=String.fromCharCode(224|e>>12),r+=String.fromCharCode(128|63&e>>6),r+=String.fromCharCode(128|63&e));return r},PN=function(t){var e,n,r,i,o,a,u,c,d,h=t,m=Array(80),v=1732584193,C=4023233417,w=2562383102,x=271733878,P=3285377520;h=ON(h);var b=h.length,E=[];for(n=0;n>>29),E.push(4294967295&b<<3),e=0;en;n++)m[n]=E[e+n];for(n=16;79>=n;n++)m[n]=jo(m[n-3]^m[n-8]^m[n-14]^m[n-16],1);for(i=v,o=C,a=w,u=x,c=P,n=0;19>=n;n++)d=4294967295&jo(i,5)+(o&a|~o&u)+c+m[n]+1518500249,c=u,u=a,a=jo(o,30),o=i,i=d;for(n=20;39>=n;n++)d=4294967295&jo(i,5)+(o^a^u)+c+m[n]+1859775393,c=u,u=a,a=jo(o,30),o=i,i=d;for(n=40;59>=n;n++)d=4294967295&jo(i,5)+(o&a|o&u|a&u)+c+m[n]+2400959708,c=u,u=a,a=jo(o,30),o=i,i=d;for(n=60;79>=n;n++)d=4294967295&jo(i,5)+(o^a^u)+c+m[n]+3395469782,c=u,u=a,a=jo(o,30),o=i,i=d;v=4294967295&v+i,C=4294967295&C+o,w=4294967295&w+a,x=4294967295&x+u,P=4294967295&P+c}return d=Zc(v)+Zc(C)+Zc(w)+Zc(x)+Zc(P),d.toLowerCase()},kN=function(t){return btoa(t).replace(/=*$/g,"")},_N=function(t,e){return PN(t).slice(0,e)},TN=function(t,e,n,r){var i=kN(t),o=_N(e+i+n,r);return[o?"ci_seal=".concat(o):"",i?"ci_eqs=".concat(i):""].filter(function(a){return a}).join("&")},IN=function(t,e,n){var r=e||{},i=r.salt,o=r.charCount,a=r.includeParams,u=a===void 0?[]:a,c=!u||(u==null?void 0:u.length)===0,d="",h="",m=[],v=[];return t.split("&").forEach(function(C){var w=C.split("="),x=Le(w,1),P=x[0];-1<(u==null?void 0:u.indexOf(P))||c?m.push(C):v.push(C)}),0 input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"]),oD=$.span.attrs({className:we(oc,"label")}).withConfig({componentId:"sc-jjink6-4"})(function(t){var e=t.theme,n=t.open,r=n===void 0?!1:n,i=t.disabled,o=i===void 0?!1:i;return F(["display:flex;align-items:center;justify-content:center;padding:6px 6px;border-radius:2px;position:absolute;top:-10px;font-size:10px;z-index:1;white-space:nowrap;transition:transform 150ms cubic-bezier(0.4,0,0.2,1) 0ms;transform-origin:bottom center;transform:",";background-color:",";color:#fff;cursor:pointer;transition:all 100ms ease-out;&::before{position:absolute;content:'';background-color:inherit;width:8px;height:8px;bottom:0px;left:50%;transform:translate(-50%,50%) rotate(45deg);}"],r?"translateY(-100%) scale(1)":"translateY(-100%) scale(0)",o?e.palette[_.AccentPrimaryDisabled]:e.palette[_.LinkStateless])}),aD=$.div.attrs({className:we(oc,"annotation")}).withConfig({componentId:"sc-jjink6-5"})(function(t){var e=t.theme;return F(["display:flex;justify-content:space-between;margin-top:12px;color:",";"],e.palette[_.TextSecondary])}),lD=It({Slider:tD,Rail:nD,Track:rD,Thumb:iD,SliderAnnotation:aD,LabelTooltip:oD});const Fs=lD;var sD=["defaultValue","disabled","disableSwap","hideTrack","hideAnnotation","value","min","max","onChange","onMouseDown","onMouseUp","step","labelTooltip","annotation","components","componentsProps"];function g9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ni(t){for(var e=1;euD&&Ee(!0),Ct(rt,Dt,tn)}}),At=Hs(function(rt){var lt=Ap(rt,ae);Ee(!1),lt&&(pe(-1),rt.type==="touchend"&&me(-1),E&&E(rt),ae.current=void 0,Tn())}),ft=Hs(function(rt){var lt=rt.changedTouches[0];lt!=null&&(ae.current=lt.identifier);var Nt=Ap(rt,ae),Dt=dt({finger:Nt,values:$e}),tn=Dt.newValue,Hn=Dt.activeIndex;Mp({sliderRef:ze,activeIndex:Hn,setActive:pe}),Ze(tn),Ct(rt,tn,Hn),W.current=0;var bo=Rh(ze.current);bo.addEventListener("touchmove",St),bo.addEventListener("touchend",At)}),Re=Hs(function(rt){var lt=Number(rt.currentTarget.getAttribute(m9));me(lt)}),Xe=Hs(function(){me(-1)}),Ut=Hs(function(rt){if(i)rt.preventDefault();else{if(b&&b(rt),rt.button!==0)return;rt.preventDefault();var lt=Ap(rt,ae),Nt=dt({finger:lt,values:$e}),Dt=Nt.newValue,tn=Nt.activeIndex;Mp({sliderRef:ze,activeIndex:tn,setActive:pe}),Ze(Dt),Ct(rt,Dt,tn),W.current=0;var Hn=Rh(ze.current);Hn.addEventListener("mousemove",St),Hn.addEventListener("mouseup",At)}}),Tn=z.useCallback(function(){var rt=Rh(ze.current);rt.removeEventListener("mousemove",St),rt.removeEventListener("mouseup",At),rt.removeEventListener("touchmove",St),rt.removeEventListener("touchend",At)},[At,St]);z.useEffect(function(){var rt=ze.current;if(rt)return function(){Tn()}},[Tn,ft]),z.useEffect(function(){i&&Tn()},[i,Tn]),i&&te!==-1&&pe(-1);var Ye=k2(ot?$e[0]:C,C,x),Ae=k2($e[$e.length-1],C,x)-Ye,at=Ni(Ni({},T2[Ve].offset(Ye)),T2[Ve].leap(Ae)),pt=G.rail,Et=typeof B.Rail=="function"?p.createElement(B.Rail,J({},pt,{style:Ni({},pt==null?void 0:pt.style)})):p.createElement(Fs.Rail,J({},pt,{style:Ni({},pt==null?void 0:pt.style)})),_t=G.track,En=!c&&(typeof B.Track=="function"?p.createElement(B.Track,J({},_t,{style:Ni(Ni({},at),_t==null?void 0:_t.style)})):p.createElement(Fs.Track,J({},_t,{style:Ni(Ni({},at),_t==null?void 0:_t.style)}))),ln=G.thumb,In=B.Thumb||Fs.Thumb,Vr=B.LabelTooltip||Fs.LabelTooltip,Ji=G.labelTooltip,Ti=j?" ".concat(j):"";return p.createElement(Fs.Slider,J({ref:Ie,disabled:i,onTouchStart:ft,onMouseDown:Ut},V),Et,En,$e.map(function(rt,lt){var Nt=k2(rt,C,x),Dt=T2[Ve].offset(Nt);return p.createElement(p.Fragment,{key:lt},p.createElement(In,J({"data-index":lt,onMouseOver:Re,onMouseLeave:Xe},ln,{style:Ni(Ni({},Dt),{},{pointerEvents:a&&te!==lt?"none":void 0},ln==null?void 0:ln.style)}),p.createElement("input",{"data-index":lt,type:"range",min:C,max:x,value:$e[lt],step:T,disabled:i,onChange:qe}),p.createElement(Vr,{open:(ce===lt||te===lt||A==="on")&&A!=="off",disabled:i,style:Ni({},Ji==null?void 0:Ji.style)},$e[lt],Ti)))}),!h&&p.createElement(Fs.SliderAnnotation,null,p.createElement("span",null,C,Ti),p.createElement("span",null,x,Ti)))});Z5.defaultProps={annotation:"MB",min:0,max:100,step:1,labelTooltip:ic.Off};Z5.propTypes={defaultValue:I.oneOfType([I.array,I.number]),value:I.oneOfType([I.array,I.number]),min:I.number,max:I.number,onChange:I.func,onMouseDown:I.func,onMouseUp:I.func,step:I.number,annotation:I.string,disabled:I.bool,disableSwap:I.bool,hideTrack:I.bool,hideAnnotation:I.bool,labelTooltip:I.oneOf(ut(ic)),components:I.shape({Rail:I.elementType,Track:I.elementType,Thumb:I.elementType,LabelTooltip:I.elementType}),componentsProps:I.object};const iO=Z5;var cD=$(iO).withConfig({componentId:"sc-1wort0h-0"})(["width:",";max-width:",";user-select:none;padding:0;margin-bottom:",";.SfxSlider-annotation{display:none;}.SfxSlider-thumb{background-color:",";}.SfxSlider-Track{height:2px;color:",";}.SfxSlider-rail{height:2px;background-color:",";}"],function(t){var e=t.width;return e||"104px"},function(t){var e=t.width;return e||"104px"},function(t){var e=t.noMargin;return e?"":"16px"},function(t){var e=t.theme.palette;return e[_.AccentStateless]},function(t){var e=t.theme.palette;return e[_.AccentStateless]},function(t){var e=t.theme.palette;return e[_.BordersItem]}),dD=["onChange"],Nn=function(t){var e=t.onChange,n=se(t,dD);return p.createElement(cD,J({annotation:"",onChange:function(i,o){return e?e(o):void 0}},n))},Y5={size:I.number,width:I.oneOfType([I.string,I.number]),height:I.oneOfType([I.string,I.number]),color:I.string,color2:I.string,stroke:I.string,stroke2:I.string,viewBox:I.string},fD=["color","size"],pD=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,fD);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8468 3.13984C11.0457 3.33138 11.0517 3.64791 10.8602 3.84682L6.04534 8.84682C5.95332 8.94238 5.82709 8.99746 5.69445 8.99991C5.5618 9.00237 5.43362 8.95201 5.33812 8.85992L0.152931 3.85992C-0.0458479 3.66824 -0.0516033 3.35171 0.140078 3.15293C0.331758 2.95415 0.648288 2.9484 0.847067 3.14008L5.67208 7.79277L10.1398 3.15318C10.3314 2.95427 10.6479 2.9483 10.8468 3.13984Z",fill:r}))});const hD=pD;var $s,gD=($s={},S($s,Uo.Right,F(["svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}"])),S($s,Uo.Left,F(["svg{transform:rotate(90deg);transition:transform 150ms ease-out;}"])),S($s,Uo.Top,F(["svg{transform:rotate(180deg);transition:transform 150ms ease-out;}"])),S($s,Uo.Bottom,F(["svg{transform:rotate(0);transition:transform 150ms ease-out;}"])),$s),mD="ArrowTick",vD=$.span.attrs({className:we(mD,"root")}).withConfig({componentId:"sc-tlypde-0"})(function(t){var e=t.type,n=e===void 0?Uo.Right:e;return F(["display:inline-flex;",""],gD[n])}),yD=It({ArrowTick:vD});const wD=yD;var CD=["IconProps"],K5=ct(function(t,e){var n=t.IconProps,r=se(t,CD);return p.createElement(wD.ArrowTick,J({},r,{ref:e}),p.createElement(hD,n))});K5.defaultProps={type:Uo.Right};K5.propTypes={type:I.oneOf(ut(Uo)),IconProps:I.exact(Y5)};const oO=K5;var S1="AccordionHeader",SD=$.span.attrs({className:we(S1,"icon")}).withConfig({componentId:"sc-1dtjsgt-0"})(function(){return F(["display:inline-flex;padding-left:8px;"])}),xD=$.span.attrs({className:we(S1,"label")}).withConfig({componentId:"sc-1dtjsgt-1"})(function(t){var e=t.theme;return F(["",""],e.typography.font[Pe.ButtonSm])}),ED=$.div.attrs({className:we(S1,"root")}).withConfig({componentId:"sc-1dtjsgt-2"})(function(t){var e=t.theme,n=t.fullWidth;return F(["display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:",";color:",";user-select:none;"],n?"100%":"auto",e.palette[_.LinkPrimary])}),bD=$.div.attrs({className:we(S1,"wrapper")}).withConfig({componentId:"sc-1dtjsgt-3"})(function(t){var e=t.theme;return F(["color:",";"],e.palette[_.LinkPrimary])}),OD=It({Header:ED,Wrapper:bD,Icon:SD,Label:xD});const Tu=OD;var PD=["expanded","label","onChange","onClick","onContextMenu","hideIcon","fullWidth","iconProps"];function v9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kD(t){for(var e=1;e"u")return!1;var e=ni(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function EB(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Ei(o)||!So(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var u=i[a];u===!1?o.removeAttribute(a):o.setAttribute(a,u===!0?"":u)}))})}function bB(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),u=a.reduce(function(c,d){return c[d]="",c},{});!Ei(i)||!So(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const OB={name:"applyStyles",enabled:!0,phase:"write",fn:EB,effect:bB,requires:["computeStyles"]};function Co(t){return t.split("-")[0]}var jl=Math.max,x0=Math.min,Zu=Math.round;function Pv(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function CO(){return!/^((?!chrome|android).)*safari/i.test(Pv())}function Yu(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&Ei(t)&&(i=t.offsetWidth>0&&Zu(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Zu(r.height)/t.offsetHeight||1);var a=Kl(t)?ni(t):window,u=a.visualViewport,c=!CO()&&n,d=(r.left+(c&&u?u.offsetLeft:0))/i,h=(r.top+(c&&u?u.offsetTop:0))/o,m=r.width/i,v=r.height/o;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function i4(t){var e=Yu(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function SO(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&r4(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jo(t){return ni(t).getComputedStyle(t)}function PB(t){return["table","td","th"].indexOf(So(t))>=0}function nl(t){return((Kl(t)?t.ownerDocument:t.document)||window.document).documentElement}function x1(t){return So(t)==="html"?t:t.assignedSlot||t.parentNode||(r4(t)?t.host:null)||nl(t)}function x9(t){return!Ei(t)||Jo(t).position==="fixed"?null:t.offsetParent}function kB(t){var e=/firefox/i.test(Pv()),n=/Trident/i.test(Pv());if(n&&Ei(t)){var r=Jo(t);if(r.position==="fixed")return null}var i=x1(t);for(r4(i)&&(i=i.host);Ei(i)&&["html","body"].indexOf(So(i))<0;){var o=Jo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function hf(t){for(var e=ni(t),n=x9(t);n&&PB(n)&&Jo(n).position==="static";)n=x9(n);return n&&(So(n)==="html"||So(n)==="body"&&Jo(n).position==="static")?e:n||kB(t)||e}function o4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Id(t,e,n){return jl(t,x0(e,n))}function _B(t,e,n){var r=Id(t,e,n);return r>n?n:r}function xO(){return{top:0,right:0,bottom:0,left:0}}function EO(t){return Object.assign({},xO(),t)}function bO(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var TB=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,EO(typeof e!="number"?e:bO(e,pf))};function IB(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,u=Co(n.placement),c=o4(u),d=[Wr,ki].indexOf(u)>=0,h=d?"height":"width";if(!(!o||!a)){var m=TB(i.padding,n),v=i4(o),C=c==="y"?$r:Wr,w=c==="y"?Pi:ki,x=n.rects.reference[h]+n.rects.reference[c]-a[c]-n.rects.popper[h],P=a[c]-n.rects.reference[c],b=hf(o),E=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,k=x/2-P/2,T=m[C],L=E-v[h]-m[w],A=E/2-v[h]/2+k,M=Id(T,A,L),j=c;n.modifiersData[r]=(e={},e[j]=M,e.centerOffset=M-A,e)}}function LB(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||SO(e.elements.popper,i)&&(e.elements.arrow=i))}const AB={name:"arrow",enabled:!0,phase:"main",fn:IB,effect:LB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ku(t){return t.split("-")[1]}var MB={top:"auto",right:"auto",bottom:"auto",left:"auto"};function RB(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Zu(n*i)/i||0,y:Zu(r*i)/i||0}}function E9(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,u=t.position,c=t.gpuAcceleration,d=t.adaptive,h=t.roundOffsets,m=t.isFixed,v=a.x,C=v===void 0?0:v,w=a.y,x=w===void 0?0:w,P=typeof h=="function"?h({x:C,y:x}):{x:C,y:x};C=P.x,x=P.y;var b=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),k=Wr,T=$r,L=window;if(d){var A=hf(n),M="clientHeight",j="clientWidth";if(A===ni(n)&&(A=nl(n),Jo(A).position!=="static"&&u==="absolute"&&(M="scrollHeight",j="scrollWidth")),A=A,i===$r||(i===Wr||i===ki)&&o===Jd){T=Pi;var D=m&&A===L&&L.visualViewport?L.visualViewport.height:A[M];x-=D-r.height,x*=c?1:-1}if(i===Wr||(i===$r||i===Pi)&&o===Jd){k=ki;var B=m&&A===L&&L.visualViewport?L.visualViewport.width:A[j];C-=B-r.width,C*=c?1:-1}}var X=Object.assign({position:u},d&&MB),G=h===!0?RB({x:C,y:x},ni(n)):{x:C,y:x};if(C=G.x,x=G.y,c){var V;return Object.assign({},X,(V={},V[T]=E?"0":"",V[k]=b?"0":"",V.transform=(L.devicePixelRatio||1)<=1?"translate("+C+"px, "+x+"px)":"translate3d("+C+"px, "+x+"px, 0)",V))}return Object.assign({},X,(e={},e[T]=E?x+"px":"",e[k]=b?C+"px":"",e.transform="",e))}function zB(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,d={placement:Co(e.placement),variation:Ku(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,E9(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,E9(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const jB={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zB,data:{}};var Qp={passive:!0};function NB(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,u=a===void 0?!0:a,c=ni(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Qp)}),u&&c.addEventListener("resize",n.update,Qp),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Qp)}),u&&c.removeEventListener("resize",n.update,Qp)}}const DB={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:NB,data:{}};var BB={left:"right",right:"left",bottom:"top",top:"bottom"};function $h(t){return t.replace(/left|right|bottom|top/g,function(e){return BB[e]})}var HB={start:"end",end:"start"};function b9(t){return t.replace(/start|end/g,function(e){return HB[e]})}function a4(t){var e=ni(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function l4(t){return Yu(nl(t)).left+a4(t).scrollLeft}function FB(t,e){var n=ni(t),r=nl(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;var d=CO();(d||!d&&e==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u+l4(t),y:c}}function $B(t){var e,n=nl(t),r=a4(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=jl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+l4(t),c=-r.scrollTop;return Jo(i||n).direction==="rtl"&&(u+=jl(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}function s4(t){var e=Jo(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function OO(t){return["html","body","#document"].indexOf(So(t))>=0?t.ownerDocument.body:Ei(t)&&s4(t)?t:OO(x1(t))}function Ld(t,e){var n;e===void 0&&(e=[]);var r=OO(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=ni(r),a=i?[o].concat(o.visualViewport||[],s4(r)?r:[]):r,u=e.concat(a);return i?u:u.concat(Ld(x1(a)))}function kv(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function WB(t,e){var n=Yu(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function O9(t,e,n){return e===yO?kv(FB(t,n)):Kl(e)?WB(e,n):kv($B(nl(t)))}function VB(t){var e=Ld(x1(t)),n=["absolute","fixed"].indexOf(Jo(t).position)>=0,r=n&&Ei(t)?hf(t):t;return Kl(r)?e.filter(function(i){return Kl(i)&&SO(i,r)&&So(i)!=="body"}):[]}function GB(t,e,n,r){var i=e==="clippingParents"?VB(t):[].concat(e),o=[].concat(i,[n]),a=o[0],u=o.reduce(function(c,d){var h=O9(t,d,r);return c.top=jl(h.top,c.top),c.right=x0(h.right,c.right),c.bottom=x0(h.bottom,c.bottom),c.left=jl(h.left,c.left),c},O9(t,a,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function PO(t){var e=t.reference,n=t.element,r=t.placement,i=r?Co(r):null,o=r?Ku(r):null,a=e.x+e.width/2-n.width/2,u=e.y+e.height/2-n.height/2,c;switch(i){case $r:c={x:a,y:e.y-n.height};break;case Pi:c={x:a,y:e.y+e.height};break;case ki:c={x:e.x+e.width,y:u};break;case Wr:c={x:e.x-n.width,y:u};break;default:c={x:e.x,y:e.y}}var d=i?o4(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Xu:c[d]=c[d]-(e[h]/2-n[h]/2);break;case Jd:c[d]=c[d]+(e[h]/2-n[h]/2);break}}return c}function ef(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,a=o===void 0?t.strategy:o,u=n.boundary,c=u===void 0?dB:u,d=n.rootBoundary,h=d===void 0?yO:d,m=n.elementContext,v=m===void 0?Yc:m,C=n.altBoundary,w=C===void 0?!1:C,x=n.padding,P=x===void 0?0:x,b=EO(typeof P!="number"?P:bO(P,pf)),E=v===Yc?fB:Yc,k=t.rects.popper,T=t.elements[w?E:v],L=GB(Kl(T)?T:T.contextElement||nl(t.elements.popper),c,h,a),A=Yu(t.elements.reference),M=PO({reference:A,element:k,strategy:"absolute",placement:i}),j=kv(Object.assign({},k,M)),D=v===Yc?j:A,B={top:L.top-D.top+b.top,bottom:D.bottom-L.bottom+b.bottom,left:L.left-D.left+b.left,right:D.right-L.right+b.right},X=t.modifiersData.offset;if(v===Yc&&X){var G=X[i];Object.keys(B).forEach(function(V){var ne=[ki,Pi].indexOf(V)>=0?1:-1,ve=[$r,Pi].indexOf(V)>=0?"y":"x";B[V]+=G[ve]*ne})}return B}function UB(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?wO:c,h=Ku(r),m=h?u?S9:S9.filter(function(w){return Ku(w)===h}):pf,v=m.filter(function(w){return d.indexOf(w)>=0});v.length===0&&(v=m);var C=v.reduce(function(w,x){return w[x]=ef(t,{placement:x,boundary:i,rootBoundary:o,padding:a})[Co(x)],w},{});return Object.keys(C).sort(function(w,x){return C[w]-C[x]})}function XB(t){if(Co(t)===n4)return[];var e=$h(t);return[b9(t),e,b9(e)]}function ZB(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,u=a===void 0?!0:a,c=n.fallbackPlacements,d=n.padding,h=n.boundary,m=n.rootBoundary,v=n.altBoundary,C=n.flipVariations,w=C===void 0?!0:C,x=n.allowedAutoPlacements,P=e.options.placement,b=Co(P),E=b===P,k=c||(E||!w?[$h(P)]:XB(P)),T=[P].concat(k).reduce(function(ue,Ee){return ue.concat(Co(Ee)===n4?UB(e,{placement:Ee,boundary:h,rootBoundary:m,padding:d,flipVariations:w,allowedAutoPlacements:x}):Ee)},[]),L=e.rects.reference,A=e.rects.popper,M=new Map,j=!0,D=T[0],B=0;B=0,ve=ne?"width":"height",te=ef(e,{placement:X,boundary:h,rootBoundary:m,altBoundary:v,padding:d}),pe=ne?V?ki:Wr:V?Pi:$r;L[ve]>A[ve]&&(pe=$h(pe));var Y=$h(pe),de=[];if(o&&de.push(te[G]<=0),u&&de.push(te[pe]<=0,te[Y]<=0),de.every(function(ue){return ue})){D=X,j=!1;break}M.set(X,de)}if(j)for(var ce=w?3:1,me=function(Ee){var W=T.find(function(Se){var ae=M.get(Se);if(ae)return ae.slice(0,Ee).every(function(ze){return ze})});if(W)return D=W,"break"},re=ce;re>0;re--){var ee=me(re);if(ee==="break")break}e.placement!==D&&(e.modifiersData[r]._skip=!0,e.placement=D,e.reset=!0)}}const YB={name:"flip",enabled:!0,phase:"main",fn:ZB,requiresIfExists:["offset"],data:{_skip:!1}};function P9(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function k9(t){return[$r,ki,Pi,Wr].some(function(e){return t[e]>=0})}function KB(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=ef(e,{elementContext:"reference"}),u=ef(e,{altBoundary:!0}),c=P9(a,r),d=P9(u,i,o),h=k9(c),m=k9(d);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const qB={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:KB};function QB(t,e,n){var r=Co(t),i=[Wr,$r].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],u=o[1];return a=a||0,u=(u||0)*i,[Wr,ki].indexOf(r)>=0?{x:u,y:a}:{x:a,y:u}}function JB(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=wO.reduce(function(h,m){return h[m]=QB(m,e.rects,o),h},{}),u=a[e.placement],c=u.x,d=u.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=a}const eH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JB};function tH(t){var e=t.state,n=t.name;e.modifiersData[n]=PO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const nH={name:"popperOffsets",enabled:!0,phase:"read",fn:tH,data:{}};function rH(t){return t==="x"?"y":"x"}function iH(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,u=a===void 0?!1:a,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,m=n.padding,v=n.tether,C=v===void 0?!0:v,w=n.tetherOffset,x=w===void 0?0:w,P=ef(e,{boundary:c,rootBoundary:d,padding:m,altBoundary:h}),b=Co(e.placement),E=Ku(e.placement),k=!E,T=o4(b),L=rH(T),A=e.modifiersData.popperOffsets,M=e.rects.reference,j=e.rects.popper,D=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,B=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),X=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,G={x:0,y:0};if(A){if(o){var V,ne=T==="y"?$r:Wr,ve=T==="y"?Pi:ki,te=T==="y"?"height":"width",pe=A[T],Y=pe+P[ne],de=pe-P[ve],ce=C?-j[te]/2:0,me=E===Xu?M[te]:j[te],re=E===Xu?-j[te]:-M[te],ee=e.elements.arrow,ue=C&&ee?i4(ee):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:xO(),W=Ee[ne],Se=Ee[ve],ae=Id(0,M[te],ue[te]),ze=k?M[te]/2-ce-ae-W-B.mainAxis:me-ae-W-B.mainAxis,Ie=k?-M[te]/2+ce+ae+Se+B.mainAxis:re+ae+Se+B.mainAxis,xe=e.elements.arrow&&hf(e.elements.arrow),ye=xe?T==="y"?xe.clientTop||0:xe.clientLeft||0:0,Ge=(V=X==null?void 0:X[T])!=null?V:0,Ze=pe+ze-Ge-ye,Ve=pe+Ie-Ge,ot=Id(C?x0(Y,Ze):Y,pe,C?jl(de,Ve):de);A[T]=ot,G[T]=ot-pe}if(u){var $e,dt=T==="x"?$r:Wr,Ct=T==="x"?Pi:ki,qe=A[L],St=L==="y"?"height":"width",At=qe+P[dt],ft=qe-P[Ct],Re=[$r,Wr].indexOf(b)!==-1,Xe=($e=X==null?void 0:X[L])!=null?$e:0,Ut=Re?At:qe-M[St]-j[St]-Xe+B.altAxis,Tn=Re?qe+M[St]+j[St]-Xe-B.altAxis:ft,Ye=C&&Re?_B(Ut,qe,Tn):Id(C?Ut:At,qe,C?Tn:ft);A[L]=Ye,G[L]=Ye-qe}e.modifiersData[r]=G}}const oH={name:"preventOverflow",enabled:!0,phase:"main",fn:iH,requiresIfExists:["offset"]};function aH(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function lH(t){return t===ni(t)||!Ei(t)?a4(t):aH(t)}function sH(t){var e=t.getBoundingClientRect(),n=Zu(e.width)/t.offsetWidth||1,r=Zu(e.height)/t.offsetHeight||1;return n!==1||r!==1}function uH(t,e,n){n===void 0&&(n=!1);var r=Ei(e),i=Ei(e)&&sH(e),o=nl(e),a=Yu(t,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((So(e)!=="body"||s4(o))&&(u=lH(e)),Ei(e)?(c=Yu(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=l4(o))),{x:a.left+u.scrollLeft-c.x,y:a.top+u.scrollTop-c.y,width:a.width,height:a.height}}function cH(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(u){if(!n.has(u)){var c=e.get(u);c&&i(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function dH(t){var e=cH(t);return xB.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function fH(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function pH(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var _9={placement:"bottom",modifiers:[],strategy:"absolute"};function T9(){for(var t=arguments.length,e=new Array(t),n=0;n svg{path{fill:",";}}color:",";"],i.palette[_.ButtonDisabledText],i.palette[_.ButtonDisabledText]))}),$H=$.div.attrs({className:we(rl,"prefix")}).withConfig({componentId:"sc-rrzye0-5"})(function(){return F(["display:flex;"])}),WH=$.div.attrs({className:we(rl,"content")}).withConfig({componentId:"sc-rrzye0-6"})(function(){return F(["flex-grow:1;line-height:16px;"])}),VH=$.div.attrs({className:we(rl,"suffix")}).withConfig({componentId:"sc-rrzye0-7"})(function(){return F(["display:flex;margin-left:8px;"])}),GH=It({MenuItemWrapper:HH,MenuItem:FH,MenuPrefix:$H,MenuContent:WH,MenuSuffix:VH,Label:BH,Icon:AO,Actions:DH});const Hi=GH;var UH=["list","depth","children","disableHover","noOptionsText","disabled","enableScrollIntoView"];function A9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function XH(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:0;return B.map(function(G){var V=G.subList&&G.subList.length>0,ne;if(E[X]===G.key&&V){var ve=X+1;ne=p.createElement(ls,J({key:G.key,position:"right",open:!!w,anchorEl:w,enableOverlay:!1},G.subMenuProps),p.createElement(gf,J({list:G.subList,depth:ve},h)))}return G.content==="divider"?p.createElement(Hi.MenuItemWrapper,{divider:!0,key:G.key}):p.createElement(Hi.MenuItemWrapper,J({disabled:!1,key:G.key,onMouseLeave:function(){return M(X)}},h),p.createElement(Hi.MenuItem,J({},h,{className:G.className,ref:e,active:!!G.active,onClick:G.onClick?function(te){return G.onClick(XH({event:te},h))}:void 0,onMouseEnter:function(pe){return A(pe,G.key,X)},disableHover:a||G.disableHover}),G.prefix&&p.createElement(Hi.MenuPrefix,null,typeof G.prefix=="function"?G.prefix(h):G.prefix),G.content&&p.createElement(Hi.MenuContent,null,typeof G.content=="function"?G.content(h):G.content),(G.suffix||G.subList)&&p.createElement(Hi.MenuSuffix,null,typeof G.suffix=="function"?G.suffix(h):G.suffix,G.subList&&p.createElement(FD,{size:10,color:"#768A9F"}))),ne)})};return n?p.createElement(p.Fragment,null,j(n,i)):p.createElement(Hi.MenuItemWrapper,{noOptionsText:!!u,disabled:!!c},p.createElement(Hi.MenuItem,J({},h,{ref:m,disableHover:a,noOptionsText:u,disabled:c}),o))});gf.displayName="MenuItem";var ZH={size:vr.Sm,active:!1};gf.defaultProps=ZH;gf.propTypes={size:I.oneOf(ut(vr)),children:I.oneOfType([I.node,I.func]),active:I.bool,value:I.oneOfType([I.string,I.number,I.oneOf([null])]),depth:I.number,disableHover:I.bool,noOptionsText:I.bool,disabled:I.bool,enableScrollIntoView:I.bool};const ql=gf;var YH=["children","disabled","size"],KH=function(e){switch(e){case vr.Md:return 16;case vr.Sm:default:return 14}},d4=ct(function(t,e){var n=t.children,r=t.disabled,i=t.size,o=i===void 0?vr.Md:i,a=se(t,YH);return p.createElement(Hi.Icon,J({disabled:r},a,{ref:e}),n&&typeof n=="function"?n({size:KH(o)}):n)});d4.defaultProps={size:vr.Md};d4.propTypes={size:I.oneOf(ut(vr)),children:I.oneOfType([I.node,I.func]).isRequired,disabled:I.bool};const qH=d4;var QH=["children"],MO=ct(function(t,e){var n=t.children,r=se(t,QH);return p.createElement(Hi.Label,J({},r,{ref:e}),n)});MO.displayName="MenuItemLabel";const f4=MO;var JH=["children"],b1=ct(function(t,e){var n=t.children,r=se(t,JH);return p.createElement(Hi.Actions,J({},r,{ref:e}),n&&typeof n=="function"?n({size:r.size}):n)});b1.displayName="MenuItemActions";b1.defaultProps={size:vr.Md};b1.propTypes={size:I.oneOf(ut(vr)),children:I.oneOfType([I.node,I.func]).isRequired};const eF=b1;var tF=["color","size"],nF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,tF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M43.3196 40.0403C44.2253 40.9461 44.2253 42.4146 43.3196 43.3204C42.4138 44.2262 40.9453 44.2262 40.0396 43.3204L21.9997 25.2802L3.95952 43.3207C3.05376 44.2264 1.58525 44.2264 0.679494 43.3207C-0.226258 42.4149 -0.226258 40.9464 0.679495 40.0406L18.7197 22.0001L0.679313 3.95941C-0.226437 3.05364 -0.226439 1.5851 0.679314 0.679328C1.58507 -0.226442 3.05358 -0.226443 3.95934 0.679328L21.9997 18.72L40.0398 0.679604C40.9455 -0.226163 42.414 -0.226165 43.3198 0.679605C44.2255 1.58537 44.2255 3.05392 43.3198 3.95969L25.2797 22.0001L43.3196 40.0403Z",fill:r}))});const RO=nF;var Kc,rF=(Kc={},S(Kc,Td.Primary,function(t){var e=t.theme.palette;return F(["background-color:",";color:",";"],e[_.AccentPrimary],e[_.ButtonPrimaryText])}),S(Kc,Td.White,function(t){var e=t.theme.palette;return F(["background-color:",";color:",";"],e[_.ButtonPrimaryText],e[_.AccentPrimary])}),S(Kc,Td.Secondary,function(t){var e=t.theme.palette;return F(["background-color:",";color:",";"],e[_.Accent_1_2_Opacity],e[_.TextPrimary])}),Kc),zO="Badge",G2=20,iF=$.span.attrs({className:we(zO,"root")}).withConfig({componentId:"sc-1rfm40m-0"})(["position:relative;display:inline-flex;flex-shrink:0;vertical-align:middle;"]),oF=$.span.attrs({className:we(zO)}).withConfig({componentId:"sc-1rfm40m-1"})(function(t){var e=t.size,n=t.color,r=n===void 0?"secondary":n,i=t.fontSize,o=t.padding,a=o===void 0?"0 6px":o,u=t.inline;return F([""," display:flex;flex-wrap:wrap;flex-direction:row;justify-content:center;align-items:center;align-content:center;height:","px;min-width:","px;line-height:1;padding:",";font-size:",";box-sizing:border-box;transition:transform 225ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:","px;z-index:1;",""],u?"":"position: absolute;",e||G2,e||G2,typeof a=="number"?"".concat(a,"px"):a,typeof i=="number"?"".concat(i,"px"):i,(e||G2)/2,rF[r])}),aF=It({BadgeRoot:iF,Badge:oF});const Wt=aF;var lF=["badgeContent"],p4=ct(function(t,e){var n=t.badgeContent,r=se(t,lF);return p.createElement(Wt.BadgeRoot,{ref:e},p.createElement(Wt.Badge,r,n))});p4.defaultProps={color:Td.Secondary,inline:!1};p4.propTypes={color:I.oneOf(ut(Td)),badgeContent:I.node,size:I.oneOfType([I.number]),fontSize:I.oneOfType([I.number,I.string]),padding:I.oneOfType([I.number,I.string]),inline:I.bool};const sF=p4;var uF=["color","size"],cF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?28:i,a=se(t,uF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M41.3465 44.355C33.5656 50.7844 22.9687 51.6268 14.3708 47.3665L17.8949 44.4545C24.754 47.117 32.7424 46.1093 38.709 41.1792C44.6755 36.249 47.1546 28.6071 45.8085 21.3893L49.3325 18.4773C51.9291 27.6967 49.1274 37.9256 41.3465 44.355Z",fill:r}),p.createElement("path",{d:"M36.1749 2.63356L32.6509 5.54555C25.821 2.91828 17.838 3.86187 11.8366 8.82088C5.87009 13.7511 3.42028 21.4282 4.7372 28.6107L1.21311 31.5227C-1.38344 22.3034 1.45314 12.0456 9.19916 5.64502C16.9801 -0.784402 27.5768 -1.62682 36.1749 2.63356Z",fill:r}))});const U2=cF;var dF=["color","size"],fF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,dF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M5.74299 0.152553C5.95998 -0.056404 6.30528 -0.0498885 6.51424 0.167105C6.7232 0.384099 6.71668 0.7294 6.49969 0.938357L1.43832 5.81227L6.51398 11.0759C6.72309 11.2928 6.71681 11.6381 6.49996 11.8472C6.28311 12.0563 5.9378 12.05 5.7287 11.8332L0.274151 6.1766C0.17369 6.07242 0.118752 5.93258 0.121433 5.78788C0.124113 5.64317 0.184193 5.50547 0.288444 5.40508L5.74299 0.152553Z",fill:r}),p.createElement("path",{d:"M10.9549 0.152554C11.1719 -0.0564031 11.5172 -0.0498876 11.7262 0.167106C11.9351 0.3841 11.9286 0.729401 11.7116 0.938357L6.65023 5.81227L11.7259 11.0759C11.935 11.2928 11.9287 11.6381 11.7119 11.8472C11.495 12.0563 11.1497 12.05 10.9406 11.8332L5.48606 6.1766C5.3856 6.07242 5.33067 5.93258 5.33335 5.78788C5.33603 5.64317 5.39611 5.50547 5.50036 5.40508L10.9549 0.152554Z",fill:r}))});const M9=fF;var pF=["color","size"],hF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,pF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M6.25714 11.8474C6.04014 12.0564 5.69484 12.0499 5.48588 11.8329C5.27693 11.6159 5.28344 11.2706 5.50043 11.0616L10.5618 6.18773L5.48614 0.924074C5.27704 0.707224 5.28331 0.361919 5.50016 0.152813C5.71701 -0.0562931 6.06232 -0.0500145 6.27143 0.166835L11.726 5.8234C11.8264 5.92758 11.8814 6.06742 11.8787 6.21212C11.876 6.35683 11.8159 6.49453 11.7117 6.59492L6.25714 11.8474Z",fill:r}),p.createElement("path",{d:"M1.04522 11.8474C0.828227 12.0564 0.482925 12.0499 0.273969 11.8329C0.065012 11.6159 0.0715275 11.2706 0.288521 11.0616L5.34989 6.18773L0.274227 0.924074C0.0651226 0.707224 0.0714006 0.361919 0.28825 0.152813C0.5051 -0.0562931 0.850407 -0.0500145 1.05951 0.166835L6.51406 5.8234C6.61452 5.92758 6.66946 6.06742 6.66678 6.21212C6.6641 6.35683 6.60402 6.49453 6.49977 6.59492L1.04522 11.8474Z",fill:r}))});const R9=hF;var Iu={Default:"default",Sidebar:"sidebar"},$o={Left:"left",Right:"right"},ru=function(e){switch(e){case nt.Lg:return 18;case nt.Md:return 16;case nt.Sm:return 14;case nt.Xs:return 12;default:return 16}},gF=function(e){switch(e){case nt.Lg:return 12;case nt.Md:return 11;case nt.Sm:return 10;default:return 11}},wr,Ws,Vs,Gs,Us,Xs,Zs,mF=(wr={},S(wr,On.Primary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;","{color:",";background:transparent;}}"],e[_.AccentStateless],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],n&&F(["background-color:",";&:hover,&:focus{background-color:",";}"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.Secondary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";border:1px solid ",";","{color:",";background:transparent;}&:hover{color:",";background-color:",";","{color:",";}}&:focus{color:",";background-color:",";border:1px solid ",";","{color:",";}}&:active{color:",";background-color:",";","{color:",";}}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[_.BackgroundStateless],e[_.AccentStateless],e[_.AccentStateless],Wt.Badge,e[_.AccentStateless],e[_.ButtonPrimaryText],e[_.AccentPrimaryHover],Wt.Badge,e[_.ButtonPrimaryText],e[_.AccentPrimaryActive],e[_.Accent_1_2_Opacity],e[_.AccentPrimaryActive],Wt.Badge,e[_.AccentPrimaryActive],e[_.ButtonPrimaryText],e[_.AccentPrimaryActive],Wt.Badge,e[_.ButtonPrimaryText],n&&F(["color:",";background-color:",";","{color:",";}&:hover,&:focus{color:",";background-color:",";","{color:",";}}"],e[_.ButtonPrimaryText],e[_.AccentPrimaryActive],Wt.Badge,e[_.ButtonPrimaryText],e[_.ButtonPrimaryText],e[_.AccentPrimaryActive],Wt.Badge,e[_.ButtonPrimaryText]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.Basic,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:transparent;border:1px solid ",";color:",";","{background-color:transparent;color:",";}&:hover{background-color:",";color:",";","{color:",";}}&:active{background-color:",";color:",";","{color:",";}}"," &:disabled{background-color:",";color:",";cursor:default;border:none;","{color:",";}}"],e[_.BordersButton],e[_.LinkStateless],Wt.Badge,e[_.LinkStateless],e[_.BackgroundHover],e[_.LinkHover],Wt.Badge,e[_.LinkHover],e[_.BackgroundActive],e[_.LinkHover],Wt.Badge,e[_.LinkHover],n&&F(["background-color:",";color:",";","{color:",";}&:hover,&:focus{background-color:",";color:",";}"],e[_.BackgroundActive],e[_.LinkHover],Wt.Badge,e[_.LinkHover],e[_.BackgroundActive],e[_.LinkHover]),e[_.Accent_1_2_Opacity],e[_.BordersDisabled],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.LinkPrimary,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[_.AccentStateless],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],n&&F(["color:",";&:hover,&:focus{color:",";"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled])}),S(wr,On.LinkSecondary,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[_.LinkStateless],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],n&&F(["color:",";&:hover,&:focus{color:",";}"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled])}),S(wr,On.LinkBasicPrimary,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[_.AccentStateless],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],n&&F(["color:",";&:hover,&:focus{color:",";}"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled])}),S(wr,On.LinkBasicSecondary,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[_.LinkStateless],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],n&&F(["color:",";&:hover,&:focus{color:",";}"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled])}),S(wr,On.ErrorPrimary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],e[_.Error],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.ErrorHover],e[_.ErrorActive],n&&F(["background-color:",";&:hover,&:focus{background-color:",";}"],e[_.ErrorActive],e[_.ErrorActive]),e[_.Accent_1_2_Opacity],e[_.BordersDisabled],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.ErrorSecondary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[_.BackgroundStateless],e[_.LinkStateless],e[_.BordersButton],Wt.Badge,e[_.LinkStateless],e[_.ErrorHover],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.ErrorActive],e[_.ButtonPrimaryText],n&&F(["background-color:",";color:",";border:none;&:hover,&:focus{background-color:",";}"],e[_.ErrorActive],e[_.ButtonPrimaryText],e[_.ErrorActive]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.ErrorBasic,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],e[_.LinkStateless],e[_.ErrorHover],e[_.ErrorActive],n&&F(["color:",";&:hover,&:focus{color:",";}"],e[_.ErrorActive],e[_.ErrorActive]),e[_.BordersDisabled])}),S(wr,On.WarningPrimary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],e[_.Warning],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.WarningHover],e[_.WarningActive],n&&F(["background-color:",";&:hover,&:focus{background-color:",";}"],e[_.WarningActive],e[_.WarningActive]),e[_.Accent_1_2_Opacity],e[_.BordersDisabled],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.WarningSecondary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[_.BackgroundStateless],e[_.LinkStateless],e[_.BordersButton],Wt.Badge,e[_.LinkStateless],e[_.WarningHover],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.WarningActive],e[_.ButtonPrimaryText],n&&F(["background-color:",";color:",";border:none;","{color:",";background-color:transparent;}&:hover,&:focus{background-color:",";}"],e[_.WarningActive],e[_.ButtonPrimaryText],Wt.Badge,e[_.ButtonPrimaryText],e[_.WarningActive]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity],Wt.Badge,e[_.BordersDisabled])}),S(wr,On.WarningBasic,function(t){var e=t.theme.palette,n=t.active;return F(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],e[_.LinkStateless],e[_.WarningHover],e[_.WarningActive],n&&F(["color:",";&:hover,&:focus{color:",";}"],e[_.WarningActive],e[_.WarningActive]),e[_.BordersDisabled])}),wr),vF=(Ws={},S(Ws,nt.Xs,F(["padding:5px 10px;"])),S(Ws,nt.Sm,F(["padding:8px 12px;"])),S(Ws,nt.Md,F(["padding:11px 16px;"])),S(Ws,nt.Lg,F(["padding:14px 24px;"])),Ws),yF=(Vs={},S(Vs,nt.Xs,F(["padding:4px 10px;"])),S(Vs,nt.Sm,F(["padding:7px 12px;"])),S(Vs,nt.Md,F(["padding:10px 16px;"])),S(Vs,nt.Lg,F(["padding:13px 24px;"])),Vs),wF=(Gs={},S(Gs,nt.Xs,F(["padding:5px 10px;"])),S(Gs,nt.Sm,F(["padding:8px 12px;"])),S(Gs,nt.Md,F(["padding:11px 14px;"])),S(Gs,nt.Lg,F(["padding:14px 16px;"])),Gs),CF=(Us={},S(Us,nt.Xs,F(["height:14px;"])),S(Us,nt.Sm,F(["height:16px;"])),S(Us,nt.Md,F(["height:18px;"])),S(Us,nt.Lg,F(["height:20px;"])),Us),SF=(Xs={},S(Xs,nt.Xs,F(["margin-right:5px;"])),S(Xs,nt.Sm,F(["margin-right:6px;"])),S(Xs,nt.Md,F(["margin-right:7px;"])),S(Xs,nt.Lg,F(["margin-right:8px;"])),Xs),z9=(Zs={},S(Zs,nt.Xs,function(t){var e=t.theme.typography.font;return F(e[Pe.ButtonSm])}),S(Zs,nt.Sm,function(t){var e=t.theme.typography.font;return F(e[Pe.ButtonMd])}),S(Zs,nt.Md,function(t){var e=t.theme.typography.font;return F(e[Pe.ButtonLg])}),S(Zs,nt.Lg,function(t){var e=t.theme.typography.font;return F(e[Pe.ButtonLgUp])}),Zs),il="Button",jO=$.span.attrs({className:we(il,"Label")}).withConfig({componentId:"sc-lxwit0-0"})(["display:flex;"]),NO=$.span.attrs({className:we(il,"Badge")}).withConfig({componentId:"sc-lxwit0-1"})(["display:flex;margin-left:5px;"]),xF=$.span.attrs({className:we(il,"Body")}).withConfig({componentId:"sc-lxwit0-2"})(function(){return F(["display:flex;align-items:center;"])}),EF=$.button.attrs({className:we(il,"root")}).withConfig({componentId:"sc-lxwit0-3"})(function(t){var e=t.color,n=e===void 0?On.Secondary:e,r=t.size,i=r===void 0?nt.Md:r,o=t.buttonType,a=t.active,u=t.theme;return F(["display:inline-flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;border-radius:",";transition:all 100ms ease-out;border:0;cursor:pointer;outline:none;"," "," "," ","{"," ","}","{","}",""],u.shape.borderRadius[Xi.Md],o!==Iu.Sidebar&&mF[n],o===Iu.Sidebar?wF[i]:vF[i],n===On.Secondary&&yF[i],jO,z9[i],(n===On.LinkBasicPrimary||n===On.LinkBasicSecondary)&&"font-weight: 400",NO,z9[i],o===Iu.Sidebar&&F(["background-color:",";color:",";border:1px solid ",";"," "," &:disabled{color:",";background:",";border:none;cursor:default;}"],u.palette[_.ButtonPrimaryText],u.palette[_.LinkStateless],u.palette[_.BordersButton],!a&&F(["&:hover{color:",";background-color:",";border:none;}&:active{color:",";background-color:",";border:none;}"],u.palette[_.ButtonPrimaryText],u.palette[_.AccentPrimaryHover],u.palette[_.ButtonPrimaryText],u.palette[_.AccentPrimaryActive]),a&&F(["background-color:",";color:",";border:1px solid ",";"],u.palette[_.Accent_1_2_Opacity],u.palette[_.AccentPrimaryActive],u.palette[_.AccentPrimaryActive]),u.palette[_.BordersDisabled],u.palette[_.AccentPrimaryDisabled]))}),bF=$.span.attrs({className:we(il,"StartIcon")}).withConfig({componentId:"sc-lxwit0-4"})(function(t){var e=t.$loading,n=t.size,r=n===void 0?nt.Md:n;return F(["display:flex;svg{animation:",";}",""],e?"spinner 1.2s linear infinite":"1.2s",SF[r])}),OF=$.span.attrs({className:we(il,"SideBar")}).withConfig({componentId:"sc-lxwit0-5"})(function(t){var e=t.sideBarType;return F(["display:flex;",":12px;"],"margin-".concat(e===$o.Left?"right":"left"))}),PF=$.span.attrs({className:we(il,"Divider")}).withConfig({componentId:"sc-lxwit0-6"})(function(t){var e=t.sideBarType,n=t.size,r=n===void 0?nt.Md:n;return F(["border-left-style:solid;border-width:1px;"," ",":12px;"],CF[r],"margin-".concat(e===$o.Left?"right":"left"))}),kF=$.span.attrs({className:we(il,"EndIcon")}).withConfig({componentId:"sc-lxwit0-7"})(["display:flex;margin-left:6px;"]),_F=It({Button:EF,Wrapper:xF,Label:jO,SideArrows:OF,Divider:PF,StartIcon:bF,EndIcon:kF,Badge:NO});const po=_F;var TF=["children","startIcon","endIcon","badge","color","active","buttonType","sideBarType","size","loading","disabled"],h4=ct(function(t,e){var n=t.children,r=t.startIcon,i=t.endIcon,o=t.badge,a=t.color,u=t.active,c=t.buttonType,d=t.sideBarType,h=d===void 0?$o.Left:d,m=t.size,v=t.loading,C=t.disabled,w=se(t,TF),x=function(E){switch(h){case $o.Right:return u?p.createElement(R9,E):p.createElement(M9,E);case $o.Left:return u?p.createElement(M9,E):p.createElement(R9,E)}},P=function(){var E=[p.createElement(po.SideArrows,{key:"arrows",sideBarType:h},x({size:gF(m)}))],k=p.createElement(po.Divider,{key:"divider",size:m,sideBarType:h});return h===$o.Right?E.unshift(k):E.push(k),c===Iu.Sidebar&&E};return p.createElement(po.Button,J({type:"button",buttonType:c},w,{disabled:v||C,sideBarType:h,color:a,active:u,size:m,ref:e}),h===$o.Left&&P(),p.createElement(po.Wrapper,null,r&&p.createElement(po.StartIcon,{$loading:v,size:m},typeof r=="function"?v?p.createElement(U2,{size:ru(m)}):r({size:ru(m)}):v?p.createElement(U2,{size:ru(m)}):r),v&&!r&&p.createElement(po.StartIcon,{$loading:v},p.createElement(U2,{size:ru(m)})),p.createElement(po.Label,null,n),i&&p.createElement(po.EndIcon,null,typeof i=="function"?i({size:ru(m)}):i)),h===$o.Right&&P(),o&&p.createElement(po.Badge,null,p.createElement(sF,{inline:!0,size:14,padding:"0 1px",badgeContent:o,color:a===On.Primary?"white":"secondary"})))});h4.defaultProps={size:nt.Md,color:On.Secondary,buttonType:Iu.Default,active:!1};h4.propTypes={size:I.oneOf(ut(nt)),color:I.oneOf(ut(On)),buttonType:I.oneOf(ut(Iu)),sideBarType:I.oneOf(ut($o)),startIcon:I.oneOfType([I.node,I.func]),endIcon:I.oneOfType([I.node,I.func]),badge:I.node,active:I.bool,loading:I.bool,disabled:I.bool};const ea=h4;var IF=["color","size"],LF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,IF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0.483002 4.49014V37.5097C0.483002 38.5725 0.90519 39.5917 1.65669 40.3432C2.40819 41.0947 3.42745 41.5169 4.49023 41.5169H37.5098C38.5726 41.5169 39.5918 41.0947 40.3433 40.3432C41.0948 39.5917 41.517 38.5725 41.517 37.5097V4.49014C41.517 3.42735 41.0948 2.4081 40.3433 1.6566C39.5918 0.905099 38.5726 0.48291 37.5098 0.48291H4.49023C3.42745 0.48291 2.40819 0.905099 1.65669 1.6566C0.90519 2.4081 0.483002 3.42735 0.483002 4.49014ZM38.9272 5.87776V31.3044L26.3817 19.5446L21.8068 22.3356L14.8048 15.3337L3.07279 23.0543V6.06233C3.07279 5.2695 3.38775 4.50913 3.94836 3.94851C4.50898 3.38789 5.26935 3.07294 6.06218 3.07294H36.1222C36.8661 3.07294 37.5795 3.36844 38.1055 3.89444C38.6316 4.42044 38.9272 5.13385 38.9272 5.87776Z",fill:r}),p.createElement("path",{d:"M30.4602 15.6943C33.066 15.6943 35.1784 13.5819 35.1784 10.976C35.1784 8.37021 33.066 6.25777 30.4602 6.25777C27.8543 6.25777 25.7419 8.37021 25.7419 10.976C25.7419 13.5819 27.8543 15.6943 30.4602 15.6943Z",fill:r}))}),AF=["color","size"],MF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,AF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M39.5112 31.2036C39.5112 41.568 31.0785 50 20.7148 50H14.0613C12.9587 50 12.0652 49.1066 12.0652 48.004V47.3386C12.0652 46.2359 12.9586 45.3425 14.0613 45.3425H20.7148C28.5107 45.3425 34.8537 38.9995 34.8537 31.2036C34.8537 23.4078 28.5107 17.0648 20.7148 17.0648H8.4394L16.8935 25.5189C17.8015 26.4266 17.8015 27.9042 16.8935 28.8119C16.0124 29.6923 14.479 29.691 13.5999 28.8119L1.17111 16.3828C0.731285 15.943 0.488892 15.3581 0.488892 14.7359C0.488892 14.1142 0.731285 13.529 1.17111 13.0894L13.6006 0.65976C14.4797 -0.220001 16.0144 -0.220001 16.8936 0.65976C17.8016 1.56722 17.8016 3.04511 16.8936 3.95246L8.43951 12.4072H20.7148C31.0785 12.4072 39.5112 20.8395 39.5112 31.2036Z",fill:r}))});const RF=MF;var zF=["color","size"],jF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,zF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0.98 31.2037C0.98 41.568 9.41216 50 19.7752 50H26.4284C27.5309 50 28.4244 49.1066 28.4244 48.004V47.3386C28.4244 46.2359 27.531 45.3425 26.4284 45.3425H19.7752C11.9798 45.3425 5.6372 38.9995 5.6372 31.2037C5.6372 23.4079 11.9798 17.0648 19.7752 17.0648H32.05L23.5964 25.5189C22.6884 26.4266 22.6884 27.9043 23.5964 28.812C24.4774 29.6924 26.0107 29.6911 26.8897 28.812L39.3178 16.3828C39.7576 15.943 40 15.3582 40 14.736C40 14.1142 39.7576 13.5291 39.3178 13.0895L26.8891 0.659821C26.01 -0.21994 24.4754 -0.21994 23.5962 0.659821C22.6883 1.56728 22.6883 3.04517 23.5962 3.95252L32.0498 12.4073H19.7752C9.41216 12.4073 0.98 20.8396 0.98 31.2037Z",fill:r}))});const NF=jF;var DF=["color","size"],BF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,DF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M40.1901 7.27549L7.59689 39.8687C6.83412 40.6315 6.83412 41.8681 7.59689 42.6308C8.35965 43.3936 9.59626 43.3936 10.359 42.6308L42.9522 10.0376C43.715 9.27486 43.715 8.03825 42.9522 7.27549C42.1895 6.51272 40.9529 6.51272 40.1901 7.27549Z",fill:r}))});const HF=BF;var FF=["color","size"],$F=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,FF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M41.2229 16.7653C41.3215 12.426 39.7436 8.284 36.6864 5.02956C33.6292 1.77513 29.4872 -2.09808e-05 25.0493 -2.09808e-05C20.6114 -2.09808e-05 16.3708 1.77513 13.3136 5.02956C10.2564 8.18538 8.6785 12.3274 8.77712 16.7653C3.45168 19.5266 0 25.1479 0 31.1637C0 37.2781 3.25444 42.6035 8.57988 45.4635C11.0454 46.7455 13.7081 47.4359 16.2722 47.4359C19.3294 47.4359 22.288 46.5483 24.9507 44.8718C29.9803 48.1262 36.0947 48.3234 41.4201 45.4635C46.7456 42.6035 50 37.2781 50 31.1637C50 25.0493 46.6469 19.5266 41.2229 16.7653ZM22.7811 43.0966C18.6391 45.3649 13.7081 45.3649 9.56607 42.998C5.22682 40.5325 2.66272 36.1933 2.66272 31.1637C2.66272 26.43 5.12821 22.0907 9.1716 19.6252C10.1578 24.359 13.3136 28.501 17.6529 30.6706C17.4556 35.4043 19.3294 39.8422 22.7811 43.0966ZM32.1499 27.8106C31.4596 24.5562 29.783 21.499 27.3176 19.2307C30.6706 17.357 34.8126 17.0611 38.4615 18.3432C37.7712 22.2879 35.503 25.7396 32.1499 27.8106ZM20.6114 28.1065C21.3018 25.2465 22.8797 22.6824 25.0493 20.8087C27.5148 22.8797 29.1913 25.8382 29.6844 28.9941C26.7258 30.0789 23.4714 30.0789 20.4142 28.9941C20.4142 28.6982 20.5128 28.4023 20.6114 28.1065ZM25.0493 17.4556C23.57 16.4694 21.8935 15.7791 20.1183 15.3846C19.428 15.1874 18.6391 15.6805 18.5404 16.3708C18.4418 16.7653 18.5404 17.0611 18.7377 17.357C18.9349 17.6528 19.2308 17.8501 19.5266 17.9487C20.7101 18.2446 21.7949 18.639 22.7811 19.2307C20.3156 21.499 18.6391 24.4576 17.9487 27.8106C14.5957 25.7396 12.2288 22.2879 11.6371 18.3432C11.9329 18.2446 12.1302 18.1459 12.426 18.0473C12.7219 17.9487 13.0178 17.7515 13.215 17.357C13.4122 17.0611 13.4122 16.6666 13.3136 16.3708C13.1164 15.6805 12.3274 15.286 11.6371 15.4832C11.5385 15.4832 11.5385 15.4832 11.4398 15.5818C11.8343 8.48124 17.7515 2.6627 25.0493 2.6627C32.3471 2.6627 38.2643 8.38262 38.6588 15.5818C34.0237 14.2012 28.9941 14.8915 25.0493 17.4556ZM29.783 31.7554C29.5858 35.5029 27.9093 39.0532 25.0493 41.5187C22.1893 39.0532 20.4142 35.6016 20.3156 31.7554C23.3728 32.7416 26.7258 32.7416 29.783 31.7554ZM32.4458 30.6706C36.785 28.4023 39.8422 24.359 40.927 19.6252C44.9704 22.0907 47.4359 26.43 47.4359 31.1637C47.4359 36.0947 44.8718 40.5325 40.5325 42.998C36.3905 45.3649 31.4596 45.3649 27.3176 43.0966C30.7692 39.8422 32.643 35.4043 32.4458 30.6706Z",fill:r}),p.createElement("path",{d:"M15.5819 14.8915C14.9901 14.9901 14.497 15.5818 14.497 16.1735C14.497 16.8639 15.0888 17.5542 15.8777 17.5542C16.6667 17.5542 17.2584 16.9625 17.2584 16.1735C17.2584 15.7791 17.0611 15.3846 16.7653 15.1874C16.3708 14.9901 15.9763 14.8915 15.5819 14.8915Z",fill:r}))}),WF=["color","size"],VF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,WF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.00049C3.34315 2.00049 2 3.34364 2 5.00049V16.7505H5.5V5.50049H16.75V2.00049H5ZM45 2.00049H33.25V5.50049H44.5V16.7505H48V5.00049C48 3.34363 46.6569 2.00049 45 2.00049ZM5.5 33.2505H2V45.0005C2 46.6573 3.34315 48.0005 5 48.0005H16.75V44.5005H5.5V33.2505ZM48 33.2505H44.5V44.5005H33.25V48.0005H45C46.6569 48.0005 48 46.6573 48 45.0005V33.2505Z",fill:r}))}),GF=["color","size"],UF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,GF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 53 37",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93799V32.063H47.8684V3.93799H4.11841ZM3.49341 0.812988C2.1127 0.812988 0.993408 1.91229 0.993408 3.26835V32.7326C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7326V3.26835C50.9934 1.91229 49.8741 0.812988 48.4934 0.812988H3.49341Z",fill:r}))}),XF=["color","size"],ZF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,XF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 21.125H3V21.2693H24.7308V43H24.875V45.5L0.5 45.5001V21.125ZM22.2308 43L3 43.0001V23.7693H22.2308V43Z",fill:r}),p.createElement("path",{d:"M43 45.5H45.5V43H43.625V43.625H43V45.5Z",fill:r}),p.createElement("path",{d:"M45.5 3V0.5H43V2.375H43.625V3H45.5Z",fill:r}),p.createElement("path",{d:"M6.125 0.5V3H9.875V0.5H6.125Z",fill:r}),p.createElement("path",{d:"M13.625 0.5V3H17.375V0.5H13.625Z",fill:r}),p.createElement("path",{d:"M21.125 0.5V3H24.875V0.5H21.125Z",fill:r}),p.createElement("path",{d:"M28.625 0.5V3H32.375V0.5H28.625Z",fill:r}),p.createElement("path",{d:"M36.125 0.5V3H39.875V0.5H36.125Z",fill:r}),p.createElement("path",{d:"M45.5 6.125H43V9.875H45.5V6.125Z",fill:r}),p.createElement("path",{d:"M45.5 13.625H43V17.375H45.5V13.625Z",fill:r}),p.createElement("path",{d:"M45.5 21.125H43V24.875H45.5V21.125Z",fill:r}),p.createElement("path",{d:"M45.5 28.625H43V32.375H45.5V28.625Z",fill:r}),p.createElement("path",{d:"M45.5 36.125H43V39.875H45.5V36.125Z",fill:r}),p.createElement("path",{d:"M39.875 45.5V43H36.125V45.5H39.875Z",fill:r}),p.createElement("path",{d:"M32.375 45.5V43H28.625V45.5H32.375Z",fill:r}),p.createElement("path",{d:"M0.5 17.375H3V13.625H0.5V17.375Z",fill:r}),p.createElement("path",{d:"M0.5 9.875H3V6.125H0.5V9.875Z",fill:r}),p.createElement("path",{d:"M35.1391 9.23718L26.3209 17.8619C25.8274 18.3446 25.8186 19.136 26.3013 19.6295C26.784 20.1231 27.5754 20.1319 28.069 19.6492L37.1012 10.815V16.9907C37.1012 17.681 37.6609 18.2407 38.3512 18.2407C39.0416 18.2407 39.6012 17.681 39.6012 16.9907V7.98718C39.6012 7.29683 39.0416 6.73718 38.3512 6.73718L29.3477 6.73718C28.6574 6.73718 28.0977 7.29683 28.0977 7.98718C28.0977 8.67754 28.6574 9.23718 29.3477 9.23718L35.1391 9.23718Z",fill:r}))}),YF=["color","size"],KF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,YF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M42.1323 0.500031H2.73399C1.42693 0.500031 0.399963 1.527 0.399963 2.83406V43.166C0.399963 44.4731 1.42693 45.5 2.73399 45.5H42.1323C43.4394 45.5 44.4664 44.4731 44.4664 43.166V2.83406C44.4664 1.527 43.4394 0.500031 42.1323 0.500031ZM41.6655 3.30086V25.8942L36.624 21.693C36.1572 21.2262 35.4103 21.2262 34.8502 21.5996L28.595 26.2677L15.5244 11.2365C15.3377 10.9565 14.9643 10.7697 14.5908 10.7697C14.2174 10.7697 13.8439 10.9565 13.5639 11.1432L3.20079 21.693V3.30086H41.6655ZM3.20079 42.6992V39.8984C4.22776 40.3652 5.72154 40.832 7.58876 40.832C9.36262 40.832 10.483 40.2718 11.3232 39.805C12.0701 39.4316 12.5369 39.1515 13.3771 39.2448C14.3108 39.3382 14.8709 39.5249 15.4311 39.805C16.2713 40.0851 17.2049 40.4585 18.9788 40.4585V38.3112C17.6717 38.3112 17.0182 38.0312 16.178 37.7511C15.5244 37.471 14.6842 37.1909 13.5639 37.0975C12.0701 36.9108 11.1365 37.471 10.2962 37.8444C9.54934 38.2179 8.80245 38.5913 7.4954 38.5913C5.06801 38.5913 3.6676 37.7511 3.10743 37.2843V35.0436C4.1344 35.5104 5.62818 35.9772 7.4954 35.9772C9.26926 35.9772 10.3896 35.417 11.2298 34.9502C11.9767 34.5768 12.4435 34.2967 13.2838 34.3901C14.2174 34.4834 14.7776 34.6702 15.3377 34.9502C16.178 35.2303 17.1116 35.6038 18.8854 35.6038V33.4565C17.5784 33.4565 16.9249 33.1764 16.0846 32.8963C15.4311 32.6162 14.5908 32.3361 13.4705 32.2428C11.9767 32.056 11.0431 32.6162 10.2029 32.9897C9.45598 33.3631 8.70909 33.7365 7.40204 33.7365C4.97465 33.7365 3.57424 32.8963 3.01407 32.4295V30.1888C4.04104 30.6556 5.53482 31.1224 7.40204 31.1224C9.1759 31.1224 10.2962 30.5623 11.1365 30.0955C11.8834 29.722 12.3502 29.4419 13.1904 29.5353C14.124 29.6287 14.6842 29.8154 15.2444 30.0955C16.0846 30.3755 17.0182 30.749 18.7921 30.749V28.6017C17.485 28.6017 16.8315 28.3216 15.9912 28.0415C15.3377 27.7614 14.4975 27.4814 13.3771 27.388C11.8834 27.2013 10.9498 27.7614 10.1095 28.1349C9.36262 28.5083 8.61573 28.8818 7.30868 28.8818C4.88129 28.8818 3.48088 28.0415 2.92071 27.5747V25.7075L14.124 14.2241L27.1012 29.0685C27.568 29.6287 28.4083 29.722 28.9684 29.2552L35.4103 24.4004L41.3854 29.4419V42.6058H3.20079V42.6992Z",fill:r}),p.createElement("path",{d:"M32.7029 15.7179C35.4103 15.7179 37.651 13.4772 37.651 10.7697C37.651 8.06227 35.4103 5.82161 32.7029 5.82161C29.9954 5.82161 27.7547 8.06227 27.7547 10.7697C27.7547 13.4772 29.9954 15.7179 32.7029 15.7179ZM32.7029 8.15563C34.1966 8.15563 35.317 9.36933 35.317 10.7697C35.317 12.1702 34.1033 13.3838 32.7029 13.3838C31.3025 13.3838 30.0888 12.1702 30.0888 10.7697C30.0888 9.36933 31.2091 8.15563 32.7029 8.15563Z",fill:r}))}),qF=["color","size"],QF=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,qF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M43.4164 5.98527H1.06762C0.533808 5.98527 0 6.53674 0 7.08821V49C0 49.7353 0.533808 50.1029 1.06762 50.1029H43.4164C44.1281 50.1029 44.484 49.7353 44.484 49V7.08821C44.484 6.53674 44.1281 5.98527 43.4164 5.98527ZM35.7651 13.1544C37.9004 13.1544 39.5 15.0809 39.5 17.1029C39.5 19.3088 37.7224 20.6029 35.7651 20.6029C33.8078 20.6029 32 19.125 32 17.1029C31.8221 14.897 33.6299 13.1544 35.7651 13.1544ZM1.9573 45.875C2.13523 45.6912 14.2349 30.9853 16.548 27.8603C16.726 27.4926 17.2598 27.4926 17.4377 27.8603L29.7153 43.4853L35.0534 37.4191C35.4093 37.0514 35.7651 37.2353 35.9431 37.4191L42.5267 45.875H1.9573Z",fill:r}),p.createElement("path",{d:"M48.9164 -3.8147e-06H6.74555C6.03381 -3.8147e-06 5.5 0.367643 5.5 1.10294V4.29294H7.5V2.20588H47.6892V39H46.2473V44.1176H48.9164C49.6281 44.1176 49.984 43.75 49.984 43.0147V1.10294C49.984 0.367643 49.6281 -3.8147e-06 48.9164 -3.8147e-06Z",fill:r}))}),JF=["color","size"],DO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,JF);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M25 0C38.8071 0 50 11.1929 50 25C50 38.807 38.8071 50 25 50C14.111 50 4.854 43.0397 1.42326 33.333C0.963005 32.0312 1.6455 30.603 2.94725 30.143C4.249 29.6828 5.67725 30.365 6.1375 31.667C8.88425 39.4382 16.2957 45 25 45C36.0457 45 45 36.0457 45 25C45 13.9543 36.0457 5 25 5C21.121 5 17.8345 6.40292 14.7095 8.6015C12.6078 10.0803 10.663 11.8526 8.6895 13.75H16.25C17.6308 13.75 18.75 14.8693 18.75 16.25C18.75 17.6307 17.6308 18.75 16.25 18.75H2.5C1.11926 18.75 0 17.6307 0 16.25V2.5C0 1.1193 1.11926 0 2.5 0C3.88075 0 5 1.1193 5 2.5V10.3593C7.12075 8.31457 9.38601 6.23342 11.8325 4.51222C15.5128 1.9229 19.7882 0 25 0Z",fill:r}))}),e$=["color","size"],BO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,e$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M39.4229 8.89453L39.7891 16.6582H38.8613C38.6823 15.291 38.4382 14.3145 38.1289 13.7285C37.6243 12.7845 36.9489 12.0928 36.1025 11.6533C35.2725 11.1976 34.1738 10.9697 32.8066 10.9697H28.1436V36.2627C28.1436 38.2972 28.3633 39.5667 28.8027 40.0713C29.4212 40.7549 30.3734 41.0967 31.6592 41.0967H32.8066V42H18.7686V41.0967H19.9404C21.3402 41.0967 22.333 40.6735 22.9189 39.8271C23.277 39.3063 23.4561 38.1182 23.4561 36.2627V10.9697H19.4766C17.9303 10.9697 16.8317 11.0837 16.1807 11.3115C15.3343 11.6208 14.61 12.2148 14.0078 13.0938C13.4056 13.9727 13.0475 15.1608 12.9336 16.6582H12.0059L12.3965 8.89453H39.4229Z",fill:r}))});const t$=BO;var n$=["color","size"],j9=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,n$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 45 29",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0 1.89502C0 1.20466 0.559644 0.64502 1.25 0.64502H28.75C29.4404 0.64502 30 1.20466 30 1.89502C30 2.58538 29.4404 3.14502 28.75 3.14502H1.25C0.559645 3.14502 0 2.58538 0 1.89502Z",fill:r}),p.createElement("path",{d:"M0 14.395C0 13.7047 0.559644 13.145 1.25 13.145H43.75C44.4404 13.145 45 13.7047 45 14.395C45 15.0854 44.4404 15.645 43.75 15.645H1.25C0.559645 15.645 0 15.0854 0 14.395Z",fill:r}),p.createElement("path",{d:"M1.25 25.645C0.559644 25.645 0 26.2047 0 26.895C0 27.5854 0.559645 28.145 1.25 28.145H28.75C29.4404 28.145 30 27.5854 30 26.895C30 26.2047 29.4404 25.645 28.75 25.645H1.25Z",fill:r}))}),r$=["color","size"],HO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,r$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 46 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M38 1.50049C38 0.810132 37.4404 0.250488 36.75 0.250488H9.25C8.55964 0.250488 8 0.810132 8 1.50049C8 2.19084 8.55964 2.75049 9.25 2.75049H36.75C37.4404 2.75049 38 2.19084 38 1.50049Z",fill:r}),p.createElement("path",{d:"M45.5 14.0005C45.5 13.3101 44.9404 12.7505 44.25 12.7505H1.75C1.05964 12.7505 0.5 13.3101 0.5 14.0005C0.5 14.6908 1.05964 15.2505 1.75 15.2505H44.25C44.9404 15.2505 45.5 14.6908 45.5 14.0005Z",fill:r}),p.createElement("path",{d:"M36.75 25.2505C37.4404 25.2505 38 25.8101 38 26.5005C38 27.1908 37.4404 27.7505 36.75 27.7505H9.25C8.55964 27.7505 8 27.1908 8 26.5005C8 25.8101 8.55964 25.2505 9.25 25.2505H36.75Z",fill:r}))}),i$=["color","size"],FO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,i$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 45 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M2.66027 14.6997L3.59752 14.4437L3.09232 3.93218C3.05918 3.24262 2.47331 2.71049 1.78375 2.74363C1.09419 2.77677 0.562061 3.36263 0.595202 4.05219L1.16041 15.8123C1.19355 16.5018 1.77942 17.034 2.46898 17.0008L14.2291 16.4356C14.9186 16.4025 15.4508 15.8166 15.4176 15.1271C15.3845 14.4375 14.7986 13.9054 14.1091 13.9385L5.48447 14.353C8.23224 7.41077 15.0052 2.50049 22.925 2.50049C33.2802 2.50049 41.6748 10.8951 41.6748 21.2503C41.6748 22.4035 41.5706 23.5324 41.3713 24.6281L43.7968 25.261C44.0449 23.9622 44.1748 22.6214 44.1748 21.2503C44.1748 9.51435 34.6609 0.000488281 22.925 0.000488281C15.0467 0.000488281 8.16974 4.28779 4.50001 10.6566L2.66027 14.6997Z",fill:r}),p.createElement("path",{d:"M9.88491 34.708L8.27773 36.6309C8.82614 37.1539 9.40248 37.6479 10.0043 38.1103L11.5276 36.128C10.9528 35.6863 10.4043 35.2121 9.88491 34.708Z",fill:r}),p.createElement("path",{d:"M12.3142 39.6567C13.9038 40.5764 15.6235 41.2961 17.439 41.7814L18.0846 39.3662C16.4846 38.9385 14.9685 38.3041 13.5662 37.4928L12.3142 39.6567Z",fill:r}),p.createElement("path",{d:"M20.1654 42.3209C21.0738 42.4394 22.0002 42.5005 22.9408 42.5005C23.8815 42.5005 24.8079 42.4394 25.7162 42.3209L25.3929 39.8419C24.5915 39.9465 23.7731 40.0005 22.9408 40.0005C22.1086 40.0005 21.2902 39.9465 20.4888 39.8419L20.1654 42.3209Z",fill:r}),p.createElement("path",{d:"M28.4427 41.7814C30.2582 41.2961 31.9779 40.5764 33.5674 39.6567L32.3154 37.4928C30.9132 38.3041 29.397 38.9385 27.7971 39.3662L28.4427 41.7814Z",fill:r}),p.createElement("path",{d:"M35.8774 38.1103C37.3494 36.9791 38.6692 35.6594 39.8004 34.1873L37.8181 32.664C36.8193 33.9638 35.6538 35.1292 34.354 36.128L35.8774 38.1103Z",fill:r}),p.createElement("path",{d:"M41.3468 31.8773C42.2665 30.2878 42.9862 28.5681 43.4715 26.7526L41.0563 26.107C40.6286 27.707 39.9942 29.2231 39.1829 30.6253L41.3468 31.8773Z",fill:r}))});const o$=FO;var a$=["color","size"],l$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,a$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("g",{clipPath:"url(#clip0)"},p.createElement("path",{d:"M50.2753 26.8064H24.4689L36.5656 14.7096C32.735 11.0806 28.7027 9.66933 23.6624 9.66933C13.3802 9.66933 6.32372 15.3145 3.50118 25.5967L0.275391 24.7903C3.50118 13.0968 11.9689 6.44355 23.6625 6.44355C29.7109 6.44355 34.348 8.25806 38.9851 12.2903L50.2754 1L50.2753 26.8064Z",fill:r}),p.createElement("path",{d:"M34.5495 46.3628L33.1382 44.3467C33.743 43.9435 34.3479 43.3386 34.9527 42.9355L36.5656 44.75C35.9608 45.1532 35.3559 45.758 34.5495 46.3628Z",fill:r}),p.createElement("path",{d:"M27.2913 49.387C26.6865 49.5886 26.0817 49.5886 25.4768 49.7903L25.0736 47.3709C26.4848 47.1693 27.8962 46.7661 29.3074 46.3628L30.1139 48.5806C29.1058 48.9838 28.2994 49.1854 27.2913 49.387ZM20.4365 49.9919C18.8235 49.7903 17.2107 49.5886 15.5978 48.9838L16.4042 46.766C17.8155 47.1693 19.2268 47.5724 20.6381 47.5724L20.4365 49.9919ZM11.1623 46.9677C9.75104 46.1612 8.33971 45.1532 7.13003 43.9435L8.74296 42.129C9.75104 43.137 10.9607 43.9435 12.372 44.7499L11.1623 46.9677ZM3.90425 40.3144C2.89617 38.9032 2.08974 37.2903 1.6865 35.879L3.90425 35.0726C4.50909 36.4838 5.11393 37.6935 5.92036 38.9032L3.90425 40.3144Z",fill:r}),p.createElement("path",{d:"M3.2996 30.0322L0.880241 30.2338C0.678647 29.2257 0.678647 28.4193 0.678647 27.4112H3.09801C3.09801 28.4193 3.2996 29.2258 3.2996 30.0322Z",fill:r})),p.createElement("defs",null,p.createElement("rect",{width:"50",height:"50",fill:"white",transform:"translate(0.275391)"})))});const s$=l$;var u$=["color","size"],c$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,u$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 51 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M40.5 20H38V12.5C38 5.6 32.4 0 25.5 0C18.6 0 13 5.6 13 12.5V20H10.5C9.1 20 8 21.1 8 22.5V47.5C8 48.9 9.1 50 10.5 50H40.5C41.9 50 43 48.9 43 47.5V22.5C43 21.1 41.9 20 40.5 20ZM15.5 12.5C15.5 7 20 2.5 25.5 2.5C31 2.5 35.5 7 35.5 12.5V20H15.5V12.5ZM40.5 47.5H10.5V22.5H40.5V47.5Z",fill:r}),p.createElement("path",{d:"M24.3 37.3V41.3H26.8V37.3C28.3 36.8 29.3 35.4 29.3 33.8C29.3 31.7 27.6 30 25.5 30C23.4 30 21.7 31.7 21.7 33.8C21.8 35.4 22.8 36.8 24.3 37.3ZM25.5 32.5C26.2 32.5 26.8 33.1 26.8 33.8C26.8 34.5 26.2 35.1 25.5 35.1C24.8 35.1 24.2 34.5 24.2 33.8C24.3 33.1 24.8 32.5 25.5 32.5Z",fill:r}))});const d$=c$;var f$=["color","size"],p$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,f$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M36.2754 7.5C34.2754 3.1 29.8754 0 24.7754 0C17.8754 0 12.2754 5.6 12.2754 12.5V20H9.77539C8.37539 20 7.27539 21.1 7.27539 22.5V47.5C7.27539 48.9 8.37539 50 9.77539 50H39.7754C41.1754 50 42.2754 48.9 42.2754 47.5V22.5C42.2754 21.1 41.1754 20 39.7754 20H14.7754V12.5C14.7754 7 19.2754 2.5 24.7754 2.5C28.4754 2.5 31.7754 4.5 33.4754 7.6L36.2754 7.5ZM39.7754 47.5H9.77539V22.5H39.7754V47.5Z",fill:r}),p.createElement("path",{d:"M24.7754 30C22.6754 30 20.9754 31.7 20.9754 33.7C20.9754 35.3 21.9754 36.7 23.4754 37.2V41.2H25.9754V37.2C27.4754 36.7 28.4754 35.3 28.4754 33.7C28.5754 31.7 26.8754 30 24.7754 30ZM24.7754 35C24.0754 35 23.4754 34.4 23.4754 33.7C23.4754 33 24.0754 32.4 24.7754 32.4C25.4754 32.4 25.9754 33 25.9754 33.7C25.9754 34.4 25.4754 35 24.7754 35Z",fill:r}))});const h$=p$;var g$=["color","size"],m$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,g$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("circle",{cx:"25",cy:"25",r:"8.33333",fill:r}))}),v$=["color","size"],y$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,v$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M42.6793 7.32203C32.916 -2.44013 17.0863 -2.44122 7.32197 7.32203C-2.44128 17.0853 -2.4402 32.915 7.32197 42.6793C17.0852 52.4404 32.9149 52.4415 42.6793 42.6793C52.4414 32.915 52.4403 17.0864 42.6793 7.32203ZM28.2605 35.8705C28.2605 37.6716 26.8007 39.1314 24.9995 39.1314C23.1984 39.1314 21.7386 37.6716 21.7386 35.8705V22.8267C21.7386 21.0256 23.1984 19.5658 24.9995 19.5658C26.8007 19.5658 28.2605 21.0256 28.2605 22.8267V35.8705ZM24.9419 17.2527C23.0636 17.2527 21.8114 15.9222 21.8506 14.2798C21.8114 12.558 23.0636 11.2678 24.98 11.2678C26.8974 11.2678 28.1105 12.5591 28.1507 14.2798C28.1496 15.9222 26.8985 17.2527 24.9419 17.2527Z",fill:r}))}),w$=["color","size"],$O=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,w$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M48.9856 38.314L31.3034 3.80423C29.9688 1.42247 27.6118 0 24.9985 0C22.3852 0 20.0282 1.42247 18.6936 3.80423C18.6836 3.82245 18.6751 3.84067 18.665 3.8589L1.04158 38.2594C-0.321602 40.6914 -0.347383 43.612 0.971367 46.0713C2.29314 48.5321 4.67439 50 7.345 50H42.5544C45.225 50 47.7041 48.5321 49.0258 46.0713C50.3445 43.6121 50.3188 40.6913 48.9856 38.314ZM22.0659 15.8013C22.0659 14.0842 23.3789 12.6924 24.9985 12.6924C26.6182 12.6924 27.9311 14.0843 27.9311 15.8013V28.2372C27.9311 29.9541 26.6181 31.3462 24.9985 31.3462C23.3789 31.3462 22.0659 29.954 22.0659 28.2372V15.8013ZM24.9985 43.7821C22.5728 43.7821 20.5995 41.6902 20.5995 39.1186C20.5995 36.5471 22.5727 34.4552 24.9985 34.4552C27.4242 34.4552 29.3974 36.5471 29.3974 39.1186C29.3975 41.6901 27.4243 43.7821 24.9985 43.7821Z",fill:r}))}),C$=["color","size"],S$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,C$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M25 50C11.2033 50 0 38.7967 0 25C0 11.2033 11.2033 0 25 0C38.7967 0 50 11.2033 50 25C50 38.7967 38.6929 50 25 50ZM25 3.52697C13.1743 3.52697 3.63071 13.1743 3.63071 24.8963C3.63071 36.6183 13.278 46.2656 25 46.2656C36.8257 46.2656 46.3693 36.6183 46.3693 24.8963C46.3693 13.1743 36.8257 3.52697 25 3.52697Z",fill:r}),p.createElement("path",{d:"M28.3755 13.125C28.3755 11.3992 26.9765 10 25.2505 10C23.5245 10 22.1255 11.3992 22.1255 13.125C22.1255 14.8516 23.5245 16.25 25.2505 16.25C26.9765 16.25 28.3755 14.8516 28.3755 13.125Z",fill:r}),p.createElement("path",{d:"M20.563 38.5H29.938C30.8009 38.5 31.5005 37.8012 31.5005 36.9375C31.5005 36.0746 30.8009 35.375 29.938 35.375H28.3755V20.9375C28.3755 20.0746 27.6759 19.375 26.813 19.375H20.563C19.7001 19.375 19.0005 20.0746 19.0005 20.9375C19.0005 21.8012 19.7001 22.5 20.563 22.5H22.1255V35.375H20.563C19.7001 35.375 19.0005 36.0746 19.0005 36.9375C19.0005 37.8012 19.7001 38.5 20.563 38.5Z",fill:r}))}),x$=["color","size"],WO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,x$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.3032 17.8662C34.0646 17.8662 36.3032 15.6276 36.3032 12.8662C36.3032 10.1048 34.0646 7.86618 31.3032 7.86618C28.5418 7.86618 26.3032 10.1048 26.3032 12.8662C26.3032 15.6276 28.5418 17.8662 31.3032 17.8662ZM31.3032 15.3662C32.6839 15.3662 33.8032 14.2469 33.8032 12.8662C33.8032 11.4855 32.6839 10.3662 31.3032 10.3662C29.9225 10.3662 28.8032 11.4855 28.8032 12.8662C28.8032 14.2469 29.9225 15.3662 31.3032 15.3662Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9372 15.1063C16.3967 15.0794 16.8338 15.3071 17.075 15.6991L25.0831 28.7141L29.8357 24.4289C30.0935 24.1966 30.4362 24.0818 30.7819 24.1121C31.1276 24.1424 31.4452 24.3151 31.6586 24.5887L40.2822 35.6497C40.5759 36.0264 40.6292 36.5376 40.4196 36.9668C40.21 37.396 39.7741 37.6683 39.2964 37.6683H6.70331C6.2766 37.6683 5.87937 37.4506 5.64974 37.091C5.42011 36.7313 5.38981 36.2794 5.56937 35.8923L14.8765 15.8282C15.0702 15.4106 15.4777 15.1333 15.9372 15.1063ZM16.1652 18.991L8.66108 35.1683H36.7368L30.5126 27.1848L25.6422 31.5761C25.3666 31.8246 24.9947 31.9378 24.6274 31.885C24.26 31.8322 23.9351 31.6189 23.7406 31.3027L16.1652 18.991Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:r}))});const E$=WO;var b$=["color","size"],O$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,b$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.562515 0.562512H3.68752V2.90626H2.90627V3.68751H0.562515V0.562512ZM0.562515 44.3125V47.4375H3.68752V45.0938H2.90627V44.3125H0.562515ZM44.3125 47.4375H47.4375V44.3125H45.0938V45.0938H44.3125V47.4375ZM47.4375 3.68751V0.562512H44.3125V2.90626H45.0938V3.68751H47.4375ZM7.59376 0.562512V3.68751H12.2813V0.562512H7.59376ZM16.9688 0.562512V3.68751H21.6563V0.562512H16.9688ZM26.3438 0.562512V3.68751H31.0313V0.562512H26.3438ZM35.7188 0.562512V3.68751H40.4063V0.562512H35.7188ZM47.4375 7.59376H44.3125V12.2813H47.4375V7.59376ZM47.4375 16.9688H44.3125V21.6563H47.4375V16.9688ZM47.4375 26.3438H44.3125V31.0313H47.4375V26.3438ZM47.4375 35.7188H44.3125V40.4063H47.4375V35.7188ZM40.4063 47.4375V44.3125H35.7188V47.4375H40.4063ZM31.0313 47.4375V44.3125H26.3438V47.4375H31.0313ZM21.6563 47.4375V44.3125H16.9688V47.4375H21.6563ZM12.2813 47.4375V44.3125H7.59377V47.4375H12.2813ZM0.562515 40.4063H3.68752V35.7188H0.562515V40.4063ZM0.562515 31.0313H3.68752V26.3438H0.562515V31.0313ZM0.562515 21.6563H3.68752V16.9688H0.562515V21.6563ZM0.562515 12.2813H3.68752V7.59376H0.562515V12.2813Z",fill:r}))});const P$=O$;var k$=["color","size"],_$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,k$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.5001 24.0625C38.2086 24.0625 38.8284 23.5858 39.0102 22.901C39.1921 22.2162 38.8904 21.4948 38.2753 21.1433L3.27531 1.14333C2.79171 0.866989 2.19757 0.868973 1.71583 1.14854C1.23409 1.4281 0.937592 1.94298 0.937592 2.49996V22.5C0.937592 23.3629 1.63715 24.0625 2.50009 24.0625L37.5001 24.0625ZM4.06259 20.9375L4.06259 5.19243L31.6164 20.9375L4.06259 20.9375Z",fill:r}),p.createElement("path",{d:"M38.2753 28.8566C38.8904 28.5051 39.1921 27.7837 39.0102 27.0989C38.8284 26.4142 38.2086 25.9375 37.5001 25.9375H35.3126V26.9504L34.5374 27.3933L35.3126 28.75V29.0625H35.4912L36.0878 30.1066L38.2753 28.8566Z",fill:r}),p.createElement("path",{d:"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z",fill:r}),p.createElement("path",{d:"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z",fill:r}),p.createElement("path",{d:"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z",fill:r}),p.createElement("path",{d:"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z",fill:r}),p.createElement("path",{d:"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z",fill:r}),p.createElement("path",{d:"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z",fill:r}),p.createElement("path",{d:"M3.27531 48.8566L5.46281 47.6066L4.06259 45.1562V45H3.97331L3.91238 44.8933L3.72578 45H0.937592V47.5C0.937592 48.0569 1.23409 48.5718 1.71583 48.8514C2.19758 49.1309 2.79171 49.1329 3.27531 48.8566Z",fill:r}),p.createElement("path",{d:"M4.6876 25.9375L2.50009 25.9375C1.63715 25.9375 0.937592 26.637 0.937592 27.5V30H4.06259V29.0625H4.6876V25.9375Z",fill:r}),p.createElement("path",{d:"M0.937592 35V40L4.06259 40V35H0.937592Z",fill:r}))}),T$=["color","size"],I$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,T$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0625 1.93758C24.0625 1.22909 23.5858 0.609274 22.901 0.427427C22.2163 0.245581 21.4949 0.547225 21.1434 1.16237L1.14337 39.2874C0.867028 39.771 0.869012 40.3651 1.14858 40.8468C1.42814 41.3286 1.94302 41.6251 2.5 41.6251H22.5C23.3629 41.6251 24.0625 40.9255 24.0625 40.0626V1.93758ZM20.9375 38.5001H5.19247L20.9375 7.82128V38.5001Z",fill:r}),p.createElement("path",{d:"M28.8566 1.16237C28.5051 0.547225 27.7837 0.245581 27.099 0.427428C26.4142 0.609274 25.9375 1.22909 25.9375 1.93758V4.12508H26.9504L27.3934 4.9003L28.75 4.12508H29.0625V3.94651L30.1066 3.34986L28.8566 1.16237Z",fill:r}),p.createElement("path",{d:"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z",fill:r}),p.createElement("path",{d:"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z",fill:r}),p.createElement("path",{d:"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z",fill:r}),p.createElement("path",{d:"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z",fill:r}),p.createElement("path",{d:"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z",fill:r}),p.createElement("path",{d:"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z",fill:r}),p.createElement("path",{d:"M48.8566 39.2874L47.6066 37.0999L45.1562 38.5001H45V38.5894L44.8934 38.6503L45 38.8369V41.6251H47.5C48.057 41.6251 48.5719 41.3286 48.8514 40.8468C49.131 40.3651 49.133 39.771 48.8566 39.2874Z",fill:r}),p.createElement("path",{d:"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z",fill:r}),p.createElement("path",{d:"M35 41.6251H40V38.5001H35V41.6251Z",fill:r}))}),L$=["color","size"],VO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,L$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2047 46.875C37.2859 46.875 47.0797 37.0812 47.0797 25C47.0797 12.9188 37.2859 3.125 25.2047 3.125C13.1235 3.125 3.32968 12.9188 3.32968 25C3.32968 37.0812 13.1235 46.875 25.2047 46.875ZM25.2047 50C39.0118 50 50.2047 38.8071 50.2047 25C50.2047 11.1929 39.0118 0 25.2047 0C11.3976 0 0.204681 11.1929 0.204681 25C0.204681 38.8071 11.3976 50 25.2047 50Z",fill:r}))});const A$=VO;var M$=["color","size"],R$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,M$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 51 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93805V32.063H47.8684V3.93805H4.11841ZM3.49341 0.813049C2.1127 0.813049 0.993408 1.91235 0.993408 3.26841V32.7327C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7327V3.26841C50.9934 1.91235 49.8741 0.813049 48.4934 0.813049H3.49341Z",fill:r}))});const z$=R$;var j$=["color","size"],N$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,j$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50015 7.9997C5.50015 6.61898 6.61944 5.49969 8.00015 5.49969H38.0002C39.3809 5.49969 40.5002 6.61898 40.5002 7.99969V37.9997C40.5002 39.3804 39.3809 40.4997 38.0002 40.4997H8.00015C6.61944 40.4997 5.50015 39.3804 5.50015 37.9997V7.9997ZM8.00015 7.99969H38.0002V37.9997H8.00015V7.99969Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:r}))});const D$=N$;var B$=["color","size"],H$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,B$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8333 8.5H8.50001V16.8333H0.166672V25.1667H8.50001V33.5H0.166672V41.8333H8.50001V33.5H16.8333V41.8333H25.1667V33.5H33.5V41.8333H41.8333V33.5H33.5V25.1667H41.8333V16.8333H33.5V8.5H41.8333V0.166664H33.5V8.5H25.1667V0.166664H16.8333V8.5ZM16.8333 16.8333V8.5H25.1667V16.8333H16.8333ZM16.8333 25.1667V33.5H25.1667V25.1667H33.5V16.8333H25.1667V25.1667H16.8333ZM16.8333 25.1667H8.50001V16.8333H16.8333V25.1667Z",fill:r}))});const F$=H$;var $$=["color","size"],W$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,$$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.95831 0.458374C1.5776 0.458374 0.458313 1.57766 0.458313 2.95837V35.4584C0.458313 36.8391 1.5776 37.9584 2.95831 37.9584H7.54167V43.7917C7.54167 45.8627 9.2206 47.5417 11.2917 47.5417H43.7917C45.8627 47.5417 47.5417 45.8627 47.5417 43.7917V11.2917C47.5417 9.22059 45.8627 7.54166 43.7917 7.54166H37.9583V2.95837C37.9583 1.57766 36.839 0.458374 35.4583 0.458374H2.95831ZM35.4583 2.95837H2.95831L2.95831 35.4584H35.4583V2.95837ZM15.7267 37.9584L10.0417 43.746V37.9584H15.7267ZM11.5135 45.0417L18.4712 37.9584H28.5529L21.4696 45.0417H11.5135ZM24.4159 45.0417H34.2932L45.0417 34.1339V24.0207L37.9583 31.3242V35.4584C37.9583 36.8391 36.839 37.9584 35.4583 37.9584H31.4912C31.4689 37.9859 31.445 38.0126 31.4194 38.0382L24.4159 45.0417ZM45.0417 21.3515L37.9583 28.655V18.9107L45.0417 11.8338V21.3515ZM37.0311 45.0417H43.7917C44.482 45.0417 45.0417 44.482 45.0417 43.7917V36.9124L37.0311 45.0417ZM43.8844 10.045C43.8538 10.0428 43.8229 10.0417 43.7917 10.0417H37.9583V15.9657L43.8844 10.045Z",fill:r}))});const V$=W$;var G$=["color","size"],U$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,G$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M3 3H23V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V23H43V43H3V3Z",fill:r}),p.createElement("path",{d:"M45.5 7.25076H43V5.50076C43 5.15718 42.9321 4.83576 42.8113 4.54446L45.1206 3.58682C45.3651 4.17636 45.5 4.82281 45.5 5.50076V7.25076Z",fill:r}),p.createElement("path",{d:"M24.75 0.500763V3.00076H28.25V0.500763H24.75Z",fill:r}),p.createElement("path",{d:"M31.75 0.500763V3.00076H35.25V0.500763H31.75Z",fill:r}),p.createElement("path",{d:"M38.75 0.500763V3.00076H40.5C40.8436 3.00076 41.165 3.06868 41.4563 3.18948L42.414 0.880166C41.8244 0.635694 41.178 0.500763 40.5 0.500763H38.75Z",fill:r}),p.createElement("path",{d:"M45.5 10.7508H43V14.2508H45.5V10.7508Z",fill:r}),p.createElement("path",{d:"M45.5 17.7508H43V21.2508H45.5V17.7508Z",fill:r}))});const X$=U$;var Z$=["color","size"],Y$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,Z$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z",fill:r}),p.createElement("path",{d:"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z",fill:r}),p.createElement("path",{d:"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z",fill:r}),p.createElement("path",{d:"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z",fill:r}),p.createElement("path",{d:"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z",fill:r}),p.createElement("path",{d:"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z",fill:r}),p.createElement("path",{d:"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z",fill:r}),p.createElement("path",{d:"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z",fill:r}),p.createElement("path",{d:"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z",fill:r}),p.createElement("path",{d:"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z",fill:r}),p.createElement("path",{d:"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z",fill:r}),p.createElement("path",{d:"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z",fill:r}),p.createElement("path",{d:"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z",fill:r}),p.createElement("path",{d:"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z",fill:r}),p.createElement("path",{d:"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z",fill:r}),p.createElement("path",{d:"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z",fill:r}),p.createElement("path",{d:"M23.0002 26.7497C25.0712 26.7497 26.7502 25.0708 26.7502 22.9997C26.7502 20.9286 25.0712 19.2497 23.0002 19.2497C20.9291 19.2497 19.2502 20.9286 19.2502 22.9997C19.2502 25.0708 20.9291 26.7497 23.0002 26.7497Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:r}))});const K$=Y$;var q$=["color","size"],Q$=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,q$);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.29986 0.991788C4.78802 0.503633 5.57947 0.503633 6.06763 0.991788L9.367 4.29116C9.85516 4.77932 9.85516 5.57077 9.367 6.05893C8.87885 6.54708 8.08739 6.54708 7.59924 6.05893L6.43374 4.89344V34.0829L7.59924 32.9174C8.08739 32.4293 8.87885 32.4293 9.367 32.9174C9.85516 33.4056 9.85516 34.197 9.367 34.6852L6.06763 37.9846C5.8332 38.219 5.51524 38.3507 5.18371 38.3507C4.85217 38.3507 4.53422 38.219 4.29981 37.9845L1.00084 34.6851C0.512712 34.1969 0.512761 33.4055 1.00095 32.9174C1.48913 32.4292 2.28059 32.4293 2.76871 32.9175L3.93374 34.0827V4.89344L2.76825 6.05893C2.2801 6.54708 1.48864 6.54708 1.00049 6.05893C0.51233 5.57077 0.51233 4.77932 1.00049 4.29116L4.29986 0.991788ZM13.1588 8.34109V1.49725H46.3156V8.34102H43.398V7.19776C43.398 5.54595 42.0562 4.20442 40.4047 4.20442H31.8516V26.0992C31.8516 28.1387 33.5088 29.7957 35.5481 29.7957H36.5137V32.4599H23.01V29.7957H23.9756C26.0151 29.7957 27.6721 28.1387 27.6721 26.0992V4.20448H19.0697C17.418 4.20448 16.0763 5.54604 16.0763 7.19783V8.34109H13.1588ZM46.9995 39.7088C47.4877 39.2207 47.4877 38.4292 46.9995 37.9411L43.7001 34.6417C43.212 34.1535 42.4205 34.1535 41.9324 34.6417C41.4442 35.1298 41.4442 35.9213 41.9324 36.4095L43.0979 37.5749L15.0832 37.5749L16.2484 36.4099C16.7366 35.9218 16.7366 35.1303 16.2485 34.6421C15.7604 34.154 14.9689 34.1539 14.4807 34.642L11.1814 37.941C10.9469 38.1754 10.8152 38.4934 10.8152 38.8249C10.8152 39.1564 10.9469 39.4744 11.1813 39.7088L14.4807 43.0082C14.9688 43.4964 15.7603 43.4964 16.2485 43.0082C16.7366 42.5201 16.7366 41.7286 16.2485 41.2404L15.083 40.0749L43.0979 40.0749L41.9324 41.2404C41.4442 41.7286 41.4442 42.5201 41.9324 43.0082C42.4205 43.4964 43.212 43.4964 43.7001 43.0082L46.9995 39.7088Z",fill:r}))});const J$=Q$;var eW=["color","size"],tW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,eW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M13.8334 9.19949C13.8334 8.50914 14.3931 7.94949 15.0834 7.94949H31.3334C32.0238 7.94949 32.5834 8.50914 32.5834 9.19949C32.5834 9.88985 32.0238 10.4495 31.3334 10.4495H15.0834C14.3931 10.4495 13.8334 9.88985 13.8334 9.19949Z",fill:r}),p.createElement("path",{d:"M15.0834 35.5496C14.3931 35.5496 13.8334 36.1092 13.8334 36.7996C13.8334 37.4899 14.3931 38.0496 15.0834 38.0496H31.3334C32.0238 38.0496 32.5834 37.4899 32.5834 36.7996C32.5834 36.1092 32.0238 35.5496 31.3334 35.5496H15.0834Z",fill:r}),p.createElement("path",{d:"M36.8001 13.4163C37.4905 13.4163 38.0501 13.9759 38.0501 14.6663V30.9163C38.0501 31.6066 37.4905 32.1663 36.8001 32.1663C36.1098 32.1663 35.5501 31.6066 35.5501 30.9163V14.6663C35.5501 13.9759 36.1098 13.4163 36.8001 13.4163Z",fill:r}),p.createElement("path",{d:"M10.45 14.6663C10.45 13.9759 9.89038 13.4163 9.20003 13.4163C8.50967 13.4163 7.95003 13.9759 7.95003 14.6663L7.95003 30.9163C7.95003 31.6066 8.50967 32.1663 9.20003 32.1663C9.89038 32.1663 10.45 31.6066 10.45 30.9163L10.45 14.6663Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:r}))});const nW=tW;var rW=["color","size"],iW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,rW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.103 18.4866L24.0002 3.8811L3.89749 18.4866L11.5761 42.1188H36.4244L44.103 18.4866ZM25.8371 1.35293C24.7418 0.557164 23.2587 0.557162 22.1634 1.35292L2.06066 15.9584C0.96539 16.7542 0.507082 18.1647 0.925439 19.4523L8.604 43.0845C9.02236 44.372 10.2222 45.2438 11.5761 45.2438H36.4244C37.7782 45.2438 38.9781 44.372 39.3965 43.0845L47.075 19.4523C47.4934 18.1647 47.0351 16.7542 45.9398 15.9584L25.8371 1.35293Z",fill:r}))}),oW=["color","size"],aW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,oW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.0078 29.9669H25.835L24.7803 35.9727H27.4609L28.5156 29.9669H32.2363V27.4473H28.9551L29.6875 23.2872H33.3496V20.7383H30.1416L31.2109 14.6446H28.5303L27.4609 20.7383H24.6191L25.6885 14.6446H23.0225L21.9531 20.7383H18.1006V23.2872H21.499L20.7666 27.4473H17.002V29.9669H20.3271L19.2725 35.9727H21.9531L23.0078 29.9669ZM26.2744 27.4473H23.4473L24.165 23.2872H27.0068L26.2744 27.4473Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5448 0.821208C24.421 0.184598 25.6075 0.184597 26.4837 0.821207L48.4803 16.8026C49.3565 17.4392 49.7231 18.5677 49.3885 19.5977L40.9865 45.4562C40.6518 46.4862 39.692 47.1836 38.6089 47.1836H11.4197C10.3366 47.1836 9.37672 46.4862 9.04204 45.4562L0.640107 19.5977C0.305422 18.5677 0.672067 17.4392 1.54829 16.8026L23.5448 0.821208ZM25.0143 2.84375L47.0108 18.8252L38.6089 44.6836H11.4197L3.01775 18.8252L25.0143 2.84375Z",fill:r}))});const lW=aW;var sW=["color","size"],uW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,sW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 46 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.5 15.0005C45.5 15.7079 45.2003 16.3822 44.6753 16.8562L30.8291 29.3562C29.8042 30.2814 28.2234 30.2006 27.2982 29.1758C26.373 28.1509 26.4537 26.57 27.4786 25.6448L36.5 17.5005L3 17.5005C1.61928 17.5005 0.499999 16.3812 0.499999 15.0005C0.499999 13.6198 1.61929 12.5005 3 12.5005L36.5 12.5005L27.4786 4.35618C26.4537 3.43096 26.373 1.85011 27.2982 0.82525C28.2234 -0.199608 29.8042 -0.280382 30.8291 0.644837L44.6753 13.1448C45.2003 13.6189 45.5 14.2931 45.5 15.0005Z",fill:r}))}),cW=["color","size"],dW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,cW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 48L26.9931 2H31.2019L23.2087 48H19Z",fill:r}))});const fW=dW;var pW=["color","size"],hW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,pW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M0.214966 17.4813V0.518677H6.61123C8.82693 0.518677 10.5075 0.914783 11.653 1.70699C12.7985 2.49144 13.3712 3.64481 13.3712 5.16709C13.3712 5.99814 13.1413 6.7321 12.6814 7.36898C12.2216 7.99809 11.5819 8.46021 10.7625 8.75535C11.699 8.97282 12.4348 9.41164 12.9699 10.0718C13.5133 10.732 13.7851 11.5397 13.7851 12.4951C13.7851 14.1261 13.2249 15.361 12.1045 16.1998C10.9841 17.0386 9.38713 17.4658 7.31357 17.4813H0.214966ZM3.97748 10.0951V14.6736H7.20069C8.08697 14.6736 8.77677 14.4795 9.27007 14.0911C9.77174 13.695 10.0226 13.1513 10.0226 12.4601C10.0226 10.9067 9.1572 10.1184 7.42644 10.0951H3.97748ZM3.97748 7.62528H6.76173C8.65971 7.59421 9.6087 6.89132 9.6087 5.5166C9.6087 4.74769 9.36623 4.19625 8.88128 3.86228C8.4047 3.52054 7.64801 3.34967 6.61123 3.34967H3.97748V7.62528Z",fill:r}))});const gW=hW;var mW=["color","size"],GO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,mW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M17.5911 1.54582C16.7075 0.680052 15.2937 0.680014 14.4101 1.54573L4.05296 11.6925C3.15635 12.5709 3.14159 14.0098 4.01999 14.9064C4.89839 15.8031 6.33733 15.8178 7.23394 14.9394L13.7278 8.57741V30.4419C13.7278 31.6971 14.7454 32.7147 16.0006 32.7147C17.2558 32.7147 18.2733 31.6971 18.2733 30.4419V8.57782L24.766 14.9393C25.6625 15.8178 27.1015 15.8031 27.9799 14.9065C28.8584 14.01 28.8437 12.571 27.9471 11.6926L17.5911 1.54582Z",fill:r}),p.createElement("path",{d:"M2.78827 36.5543C1.53308 36.5543 0.515541 37.5719 0.515541 38.827C0.515541 40.0822 1.53308 41.0998 2.78827 41.0998H29.1519C30.4071 41.0998 31.4246 40.0822 31.4246 38.827C31.4246 37.5719 30.4071 36.5543 29.1519 36.5543H2.78827Z",fill:r}))});const vW=GO;var yW=["color","size"],UO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,yW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.907 0.71085C25.7493 -0.292553 23.9445 -0.224769 22.8758 0.862251L0.931376 23.1837C-0.0773525 24.2097 -0.0773525 25.7913 0.931376 26.8173L22.8758 49.1388C23.9445 50.2258 25.7493 50.2936 26.907 49.2902C28.0647 48.2868 28.1369 46.5921 27.0683 45.5051L6.90997 25.0005L27.0683 4.49589C28.1369 3.40888 28.0647 1.71425 26.907 0.71085Z",fill:r}))}),wW=["color","size"],CW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,wW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.09286 0.71085C2.25057 -0.292553 4.05541 -0.224769 5.12407 0.862251L27.0685 23.1837C28.0772 24.2097 28.0772 25.7913 27.0685 26.8173L5.12407 49.1388C4.05541 50.2258 2.25057 50.2936 1.09286 49.2902C-0.0648579 48.2868 -0.137051 46.5921 0.93161 45.5051L21.0899 25.0005L0.93161 4.49589C-0.137051 3.40888 -0.0648579 1.71425 1.09286 0.71085Z",fill:r}))}),SW=["color","size"],xW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,SW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 38 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M16.9167 21.0838L16.9167 35.6672C16.9167 36.8177 17.8494 37.7505 19 37.7505C20.1506 37.7505 21.0833 36.8177 21.0833 35.6672L21.0833 21.0838H35.6667C36.8173 21.0838 37.75 20.1511 37.75 19.0005C37.75 17.8499 36.8173 16.9172 35.6667 16.9172L21.0833 16.9172L21.0833 2.33382C21.0833 1.18323 20.1506 0.250488 19 0.250488C17.8494 0.250488 16.9167 1.18323 16.9167 2.33382L16.9167 16.9172H2.33333C1.18274 16.9172 0.25 17.8499 0.25 19.0005C0.25 20.1511 1.18274 21.0838 2.33333 21.0838H16.9167Z",fill:r}))}),EW=["color","size"],bW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,EW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.04757 38.9503C0.437373 38.3401 0.437373 37.3508 1.04757 36.7406L33.9229 3.86697L23.8354 3.33584C22.9736 3.29047 22.3118 2.5551 22.3572 1.69335C22.4026 0.831601 23.138 0.169794 23.9997 0.215167L37.5909 0.930759C38.3892 0.972794 39.027 1.61063 39.0691 2.40894L39.7846 16.0001C39.83 16.8619 39.1682 17.5972 38.3065 17.6426C37.4447 17.688 36.7093 17.0262 36.664 16.1644L36.1328 6.07651L3.25728 38.9503C2.64708 39.5605 1.65776 39.5605 1.04757 38.9503Z",fill:r}))}),OW=["color","size"],PW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,OW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.1607 4.16667V2.08333C27.1607 0.93274 26.2279 0 25.0773 0C23.9267 0 22.994 0.932741 22.994 2.08333V4.16667H4.244C1.94281 4.16667 0.0773315 6.03215 0.0773315 8.33333V41.6667C0.0773315 43.9679 1.94281 45.8333 4.244 45.8333H22.994V47.9167C22.994 49.0673 23.9267 50 25.0773 50C26.2279 50 27.1607 49.0673 27.1607 47.9167V45.8333H45.9107C48.2118 45.8333 50.0773 43.9678 50.0773 41.6667V8.33333C50.0773 6.03215 48.2119 4.16667 45.9107 4.16667H27.1607ZM22.994 8.33333H4.244L4.244 41.6667H22.994V8.33333ZM27.1607 41.6667V8.33333H45.9107V41.6667H27.1607Z",fill:r}))});const kW=PW;var _W=["color","size"],TW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,_W);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 38 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.835 5.0769L2.16498 5.0769C1.00277 5.0769 0.0606079 4.14726 0.0606079 3.00048C0.060608 1.85371 1.00277 0.924072 2.16498 0.924072L35.835 0.924074C36.9972 0.924074 37.9394 1.85372 37.9394 3.00049C37.9394 4.14726 36.9972 5.0769 35.835 5.0769Z",fill:r}))}),IW=["color","size"],LW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,IW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.48799 3.125H17.0311L17.0311 24.4063C17.0311 26.6148 18.1889 28.4084 19.5429 29.5401C21.7011 31.3438 23.0656 34.0456 23.0656 37.069C23.0656 42.4847 18.6753 46.875 13.2595 46.875C7.84382 46.875 3.45351 42.4847 3.45351 37.069C3.45351 34.0456 4.81799 31.3438 6.97617 29.5401C8.33021 28.4084 9.48799 26.6148 9.48799 24.4063V3.125ZM20.1561 3.125C20.1561 1.39911 18.757 0 17.0311 0H9.48799C7.7621 0 6.36299 1.39911 6.36299 3.125V24.4063C6.36299 25.4785 5.79482 26.4547 4.97216 27.1423C2.13398 29.5143 0.328506 33.0808 0.328506 37.069C0.328506 44.2106 6.11793 50 13.2595 50C20.4012 50 26.1906 44.2106 26.1906 37.069C26.1906 33.0808 24.3851 29.5143 21.5469 27.1423C20.7243 26.4547 20.1561 25.4785 20.1561 24.4063V3.125ZM35.6715 1.25C35.6715 0.559645 35.1119 0 34.4215 0H28.1715C27.4812 0 26.9215 0.559644 26.9215 1.25C26.9215 1.94036 27.4812 2.5 28.1715 2.5L34.4215 2.5C35.1119 2.5 35.6715 1.94036 35.6715 1.25ZM35.6715 8.24951C35.6715 7.55916 35.1119 6.99951 34.4215 6.99951H28.1715C27.4812 6.99951 26.9215 7.55916 26.9215 8.24951C26.9215 8.93987 27.4812 9.49951 28.1715 9.49951H34.4215C35.1119 9.49951 35.6715 8.93987 35.6715 8.24951ZM34.4215 13.999C35.1119 13.999 35.6715 14.5587 35.6715 15.249C35.6715 15.9394 35.1119 16.499 34.4215 16.499H28.1715C27.4812 16.499 26.9215 15.9394 26.9215 15.249C26.9215 14.5587 27.4812 13.999 28.1715 13.999H34.4215ZM13.2594 43.7501C16.366 43.7501 18.8844 41.2317 18.8844 38.1251C18.8844 35.4037 16.9519 33.1337 14.3844 32.6126V10.3662C14.3844 9.67582 13.8247 9.11617 13.1344 9.11617C12.444 9.11617 11.8844 9.67582 11.8844 10.3662V32.6694C9.44245 33.2829 7.63441 35.4928 7.63441 38.1251C7.63441 41.2317 10.1528 43.7501 13.2594 43.7501Z",fill:r}))}),AW=["color","size"],MW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,AW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4376 40.6858V38.5625V4.18746V3.31418C10.8133 4.10816 3.25006 12.1708 3.25006 22C3.25006 31.8292 10.8133 39.8918 20.4376 40.6858ZM40.7501 22C40.7501 31.8292 33.1868 39.8918 23.5626 40.6858V38.5625V4.18746V3.31418C33.1868 4.10816 40.7501 12.1708 40.7501 22ZM43.8751 22C43.8751 34.0812 34.0813 43.875 22.0001 43.875C9.91883 43.875 0.125061 34.0812 0.125061 22C0.125061 9.91877 9.91883 0.125 22.0001 0.125C34.0813 0.125 43.8751 9.91877 43.8751 22Z",fill:r}))}),RW=["color","size"],zW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,RW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3679 7.50003C15.7995 10.005 13.5592 11.875 10.8823 11.875C8.20528 11.875 5.96506 10.005 5.39665 7.50003H1.5448C0.854444 7.50003 0.2948 6.94039 0.2948 6.25003C0.2948 5.55967 0.854444 5.00003 1.5448 5.00003H5.39665C5.96506 2.49504 8.20528 0.625031 10.8823 0.625031C13.5592 0.625031 15.7995 2.49504 16.3679 5.00003H48.4557C49.1461 5.00003 49.7057 5.55967 49.7057 6.25003C49.7057 6.94039 49.1461 7.50003 48.4557 7.50003H16.3679ZM14.0073 6.25003C14.0073 7.97592 12.6082 9.37503 10.8823 9.37503C9.15637 9.37503 7.75726 7.97592 7.75726 6.25003C7.75726 4.52414 9.15637 3.12503 10.8823 3.12503C12.6082 3.12503 14.0073 4.52414 14.0073 6.25003Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M34.5715 27.625C37.2485 27.625 39.4887 25.755 40.0571 23.25H48.4554C49.1458 23.25 49.7054 22.6904 49.7054 22C49.7054 21.3096 49.1458 20.75 48.4554 20.75H40.0571C39.4887 18.245 37.2485 16.375 34.5715 16.375C31.8946 16.375 29.6543 18.245 29.0859 20.75H1.5448C0.854444 20.75 0.2948 21.3096 0.2948 22C0.2948 22.6904 0.854444 23.25 1.5448 23.25H29.0859C29.6543 25.755 31.8946 27.625 34.5715 27.625ZM34.5715 25.125C36.2974 25.125 37.6965 23.7259 37.6965 22C37.6965 20.2741 36.2974 18.875 34.5715 18.875C32.8456 18.875 31.4465 20.2741 31.4465 22C31.4465 23.7259 32.8456 25.125 34.5715 25.125Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7702 39C22.2018 41.505 19.9615 43.375 17.2845 43.375C14.6076 43.375 12.3673 41.505 11.7989 39H1.5448C0.854444 39 0.2948 38.4403 0.2948 37.75C0.2948 37.0596 0.854444 36.5 1.5448 36.5H11.7989C12.3673 33.995 14.6076 32.125 17.2845 32.125C19.9615 32.125 22.2018 33.995 22.7702 36.5H48.4554C49.1458 36.5 49.7054 37.0596 49.7054 37.75C49.7054 38.4403 49.1458 39 48.4554 39H22.7702ZM20.4095 37.75C20.4095 39.4759 19.0104 40.875 17.2845 40.875C15.5587 40.875 14.1595 39.4759 14.1595 37.75C14.1595 36.0241 15.5587 34.625 17.2845 34.625C19.0104 34.625 20.4095 36.0241 20.4095 37.75Z",fill:r}))}),jW=["color","size"],NW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,jW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2341 37.6984H37.5121V37.4237C41.4447 33.4687 43.875 28.0182 43.875 22C43.875 15.9819 41.4447 10.5314 37.5121 6.57632V6.30045H37.2328C33.2942 2.47819 27.9219 0.125031 22 0.125031C9.91877 0.125031 0.125 9.9188 0.125 22C0.125 34.0813 9.91877 43.875 22 43.875C24.718 43.875 27.3203 43.3793 29.7213 42.4733H30.5303V42.1494C33.0389 41.0861 35.308 39.5679 37.2341 37.6984ZM20.4257 3.31519C10.807 4.1148 3.25 12.1749 3.25 22C3.25 31.8252 10.807 39.8853 20.4257 40.6849V3.31519ZM34.3871 36.0759C33.221 37.1029 31.9263 37.9873 30.5303 38.7017V5.29836C31.9263 6.01281 33.221 6.89715 34.3871 7.92411V36.0759ZM37.5121 11.4641C39.5556 14.4669 40.75 18.094 40.75 22C40.75 25.9061 39.5556 29.5332 37.5121 32.536V11.4641ZM23.5507 40.6868C24.8796 40.578 26.1693 40.3307 27.4053 39.9592V4.04089C26.1693 3.66941 24.8796 3.42203 23.5507 3.31324V40.6868Z",fill:r}))}),DW=["color","size"],BW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,DW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M46.1442 31.379C45.4585 31.379 44.8974 31.9429 44.8974 32.6321V43.7349C44.8974 45.8025 43.2267 47.4817 41.157 47.4943H6.22156C4.16433 47.4943 2.49361 45.8151 2.48114 43.7349V11.1283C2.48114 9.06067 4.15186 7.38147 6.22156 7.36894H17.2807C17.9665 7.36894 18.5275 6.80503 18.5275 6.1158C18.5275 5.42658 17.9665 4.86267 17.2807 4.86267H6.22156C2.79284 4.8752 0 7.66969 0 11.1283V43.7349C0 47.1935 2.79284 50.0005 6.22156 50.0005H41.157C44.5982 50.0005 47.3786 47.1935 47.3786 43.7474V32.6321C47.391 31.9429 46.83 31.379 46.1442 31.379Z",fill:r}),p.createElement("path",{d:"M46.8923 1.65462C44.698 -0.55089 41.157 -0.55089 38.9627 1.65462L16.7571 23.9729C16.6075 24.1233 16.4953 24.3113 16.4329 24.5243L13.5154 35.1258C13.3907 35.5644 13.5154 36.0281 13.8396 36.3413C14.1513 36.6546 14.6251 36.7799 15.049 36.6672L25.5969 33.7348C25.8089 33.6722 25.9959 33.5719 26.1455 33.409L48.3636 11.0782C50.5455 8.87267 50.5455 5.31377 48.3636 3.10826L46.8923 1.65462ZM19.4751 24.7875L37.6535 6.51678L43.5135 12.4065L25.3351 30.6897L19.4751 24.7875ZM18.3031 27.1559L22.9911 31.8677L16.5077 33.6722L18.3031 27.1559ZM46.5931 9.31127L45.2715 10.6396L39.4115 4.74986L40.7331 3.42154C41.9425 2.206 43.9249 2.206 45.1343 3.42154L46.5931 4.88771C47.815 6.11578 47.815 8.09573 46.5931 9.31127Z",fill:r}))}),HW=["color","size"],FW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,HW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M18.3626 41.293C17.5103 41.4285 16.7096 40.8474 16.5742 39.9952C16.4387 39.143 17.0198 38.3423 17.872 38.2068C18.2902 38.1403 18.6988 38.0456 19.0958 37.9246C21.9368 37.059 24.1957 34.8468 25.1254 32.0335C25.2671 31.6049 25.378 31.1621 25.4555 30.7076C25.6005 29.857 26.4076 29.2849 27.2583 29.4299C28.109 29.5749 28.681 30.3821 28.536 31.2327C28.432 31.8429 28.283 32.4379 28.0926 33.0142C26.8449 36.7893 23.8206 39.7519 20.0065 40.914C19.4728 41.0766 18.9239 41.2038 18.3626 41.293Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.9356 31.0645C33.9356 23.9644 24.1764 8.59028 19.4747 1.59549C18.2785 -0.184172 15.7216 -0.184172 14.5254 1.59548C9.82374 8.59028 0.0645752 23.9644 0.0645752 31.0645C0.0645752 40.4177 7.64685 48 17.0001 48C26.3533 48 33.9356 40.4177 33.9356 31.0645ZM30.8106 31.0645C30.8106 29.8836 30.375 28.0316 29.4236 25.578C28.5 23.1959 27.1988 20.5159 25.7187 17.7756C22.8106 12.3913 19.3287 6.98743 17.0001 3.51586C14.6715 6.98743 11.1895 12.3913 8.28145 17.7756C6.80135 20.5159 5.50017 23.1959 4.57655 25.578C3.62517 28.0316 3.18958 29.8836 3.18958 31.0645C3.18958 38.6918 9.37274 44.875 17.0001 44.875C24.6274 44.875 30.8106 38.6918 30.8106 31.0645Z",fill:r}))}),$W=["color","size"],WW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,$W);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.0081 15.2287L36.7869 17.6214L28.935 29.9601C30.5809 33.9266 30.3662 38.0903 27.1408 41.3158L26.5656 41.8909C25.9554 42.5011 24.9661 42.5011 24.3559 41.8909L14.4122 31.9472L2.99211 43.3673C2.38192 43.9775 1.3926 43.9775 0.782403 43.3673C0.17221 42.7571 0.172211 41.7678 0.782403 41.1576L12.2025 29.7375L2.25883 19.7938C1.64864 19.1836 1.64864 18.1943 2.25883 17.5841L2.50512 17.3378C5.73058 14.1123 10.2231 13.5688 14.1897 15.2147L26.5283 7.36283L28.9211 1.14165C29.327 0.0863053 30.6847 -0.201832 31.4843 0.597706L43.552 12.6655C44.3516 13.465 44.0634 14.8228 43.0081 15.2287ZM29.0752 9.44618L30.9747 4.50752L39.6422 13.1751L34.7035 15.0745L25.4251 29.655L26.0486 31.1577C27.234 34.0146 27.0773 36.5309 25.4342 38.5498L5.64209 18.7576C7.75439 17.2384 10.4304 17.0382 12.992 18.1011L14.4948 18.7246L29.0752 9.44618Z",fill:r}))}),VW=["color","size"],GW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,VW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.312012 34.847V3.39883C0.312012 1.67294 1.71112 0.273834 3.43701 0.273834H26.807C28.5329 0.273834 29.932 1.67294 29.932 3.39883V34.847C29.932 36.5729 28.5329 37.972 26.807 37.972H3.43701C1.71112 37.972 0.312012 36.5729 0.312012 34.847ZM3.43701 34.847V3.39883L26.807 3.39883L26.807 34.847L3.43701 34.847Z",fill:r}),p.createElement("path",{d:"M35.6874 12.5434C35.6874 11.6805 34.9878 10.9809 34.1249 10.9809C33.2619 10.9809 32.5624 11.6805 32.5624 12.5434V40.6009H9.89033C9.02739 40.6009 8.32783 41.3005 8.32783 42.1634C8.32783 43.0263 9.02739 43.7259 9.89033 43.7259H34.1249C34.9878 43.7259 35.6874 43.0263 35.6874 42.1634V12.5434Z",fill:r}))});const UW=GW;var XW=["color","size"],XO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,XW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M15.75 17.3125C15.75 16.4496 16.4496 15.75 17.3125 15.75C18.1754 15.75 18.875 16.4496 18.875 17.3125L18.875 32.9375C18.875 33.8005 18.1754 34.5 17.3125 34.5C16.4496 34.5 15.75 33.8005 15.75 32.9375L15.75 17.3125Z",fill:r}),p.createElement("path",{d:"M26.6875 15.75C25.8246 15.75 25.125 16.4496 25.125 17.3125L25.125 32.9375C25.125 33.8005 25.8246 34.5 26.6875 34.5C27.5504 34.5 28.25 33.8005 28.25 32.9375V17.3125C28.25 16.4496 27.5504 15.75 26.6875 15.75Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.625 6.37503V3.25003C12.625 1.52414 14.0241 0.125031 15.75 0.125031H28.25C29.9759 0.125031 31.375 1.52414 31.375 3.25003V6.37503H42.3125C43.1754 6.37503 43.875 7.07459 43.875 7.93753C43.875 8.80048 43.1754 9.50003 42.3125 9.50003H39.1875V40.75C39.1875 42.4759 37.7884 43.875 36.0625 43.875H7.9375C6.21161 43.875 4.8125 42.4759 4.8125 40.75V9.50003L1.6875 9.50003C0.824554 9.50003 0.125 8.80048 0.125 7.93753C0.125 7.07459 0.824555 6.37503 1.6875 6.37503H12.625ZM15.75 3.25003H28.25V6.37503H15.75V3.25003ZM7.9375 9.50003L7.9375 40.75H36.0625V9.50003H7.9375Z",fill:r}))});const ZW=XO;var YW=["color","size"],KW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,YW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z",fill:r}),p.createElement("path",{d:"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z",fill:r}),p.createElement("path",{d:"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z",fill:r}),p.createElement("path",{d:"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z",fill:r}))}),qW=["color","size"],QW=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,qW);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 36 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.0559 46.8755L32.0559 3.12555L3.93091 3.12555L3.93091 46.8755H32.0559ZM35.1809 3.12555C35.1809 1.39966 33.7818 0.000549316 32.0559 0.000549316H3.93091C2.20502 0.000549316 0.805908 1.39966 0.805908 3.12555V46.8755C0.805908 48.6014 2.20502 50.0005 3.93091 50.0005H32.0559C33.7818 50.0005 35.1809 48.6014 35.1809 46.8755L35.1809 3.12555Z",fill:r}))});const JW=QW;var eV=["color","size"],tV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,eV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.961 39.0119L28.2837 7.27185C27.5934 6.17538 26.3971 5.5 24.9981 5.5C23.5956 5.5 22.3967 6.17887 21.7073 7.28034L4.06571 38.9613L4.03009 39.0197C3.33595 40.159 3.32316 41.4697 3.9939 42.6216C4.67405 43.786 5.89 44.5 7.34459 44.5H42.554C44.0596 44.5 45.3464 43.7436 46.0016 42.6231C46.6817 41.4564 46.652 40.1455 45.9968 39.0706L45.961 39.0119ZM49.0254 44.3856C47.7038 46.6495 45.2246 48 42.554 48H7.34459C4.67398 48 2.29272 46.6495 0.970942 44.3856C-0.347811 42.1231 -0.322029 39.4361 1.04116 37.1987L18.6646 5.55018C18.6697 5.5418 18.6743 5.53342 18.6789 5.52504C18.6836 5.51666 18.6882 5.50828 18.6932 5.49989C20.0278 3.30867 22.3849 2 24.9981 2C27.6114 2 29.9685 3.30867 31.303 5.49989L48.9853 37.2489C50.3185 39.436 50.3442 42.1232 49.0254 44.3856Z",fill:r}),p.createElement("path",{d:"M22.0001 16C22.0001 14.3431 23.3433 13 25.0001 13C26.657 13 28.0001 14.3431 28.0001 16V28C28.0001 29.6569 26.657 31 25.0001 31C23.3433 31 22.0001 29.6569 22.0001 28V16Z",fill:r}),p.createElement("path",{d:"M28.0001 37C28.0001 38.6569 26.657 40 25.0001 40C23.3433 40 22.0001 38.6569 22.0001 37C22.0001 35.3431 23.3433 34 25.0001 34C26.657 34 28.0001 35.3431 28.0001 37Z",fill:r}))}),nV=["color","size"],rV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,nV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 10.5001C20.5 16.023 16.0228 20.5001 10.5 20.5001C4.97714 20.5001 0.5 16.023 0.5 10.5001C0.5 4.97727 4.97714 0.500122 10.5 0.500122C16.0228 0.500122 20.5 4.97727 20.5 10.5001ZM7.88239 9.56904C8.00439 9.62145 8.11473 9.69763 8.20698 9.79314L9.49998 11.0861L12.793 7.79314C12.8852 7.69763 12.9956 7.62145 13.1176 7.56904C13.2396 7.51663 13.3708 7.48905 13.5036 7.48789C13.6363 7.48674 13.768 7.51204 13.8909 7.56232C14.0138 7.6126 14.1255 7.68686 14.2194 7.78075C14.3133 7.87464 14.3875 7.98629 14.4378 8.10919C14.4881 8.23208 14.5134 8.36376 14.5122 8.49654C14.5111 8.62932 14.4835 8.76054 14.4311 8.88255C14.3787 9.00455 14.3025 9.1149 14.207 9.20714L10.207 13.2071C10.0194 13.3946 9.76514 13.4999 9.49998 13.4999C9.23482 13.4999 8.98051 13.3946 8.79298 13.2071L6.79298 11.2071C6.69747 11.1149 6.62129 11.0046 6.56888 10.8825C6.51647 10.7605 6.48889 10.6293 6.48773 10.4965C6.48658 10.3638 6.51188 10.2321 6.56216 10.1092C6.61244 9.98629 6.6867 9.87464 6.78059 9.78075C6.87448 9.68686 6.98613 9.6126 7.10903 9.56232C7.23193 9.51204 7.3636 9.48674 7.49638 9.48789C7.62916 9.48905 7.76038 9.51663 7.88239 9.56904Z",fill:r}))}),iV=["color","size"],oV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,iV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 20.5001C16.0228 20.5001 20.5 16.023 20.5 10.5001C20.5 4.97727 16.0228 0.500122 10.5 0.500122C4.97715 0.500122 0.5 4.97727 0.5 10.5001C0.5 16.023 4.97715 20.5001 10.5 20.5001ZM15.4375 7.0912L11.8155 10.7132L15.4638 14.309C15.6213 14.4665 15.7 14.6503 15.7 14.8865C15.7 15.1227 15.6213 15.3064 15.4638 15.4639C15.3063 15.6214 15.1226 15.7001 14.8864 15.7001C14.6501 15.7001 14.4664 15.6214 14.3089 15.4639L10.6869 11.8419L7.06483 15.4639C6.77612 15.7789 6.25118 15.7789 5.93622 15.4639C5.77874 15.3064 5.7 15.0964 5.7 14.8865C5.7 14.6765 5.77874 14.4928 5.93622 14.3353L9.55827 10.7132L5.93622 7.0912C5.77874 6.93372 5.7 6.72374 5.7 6.51377C5.7 6.3038 5.77874 6.12007 5.93622 5.96259C6.25118 5.64763 6.74987 5.64763 7.06483 5.96259L10.6869 9.58464L14.3089 5.93634C14.5976 5.62138 15.1226 5.62138 15.4375 5.93634C15.595 6.09382 15.6738 6.27755 15.6738 6.51377C15.6738 6.74999 15.595 6.93372 15.4375 7.0912Z",fill:r}))}),aV=["color","size"],lV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,aV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M37.3438 16.4782L28.2887 25.5333L37.4095 34.5228C37.8032 34.9165 38 35.3758 38 35.9664C38 36.5569 37.8032 37.0162 37.4095 37.4099C37.0158 37.8036 36.5564 38.0005 35.9659 38.0005C35.3753 38.0005 34.916 37.8036 34.5223 37.4099L25.4672 28.3548L16.4121 37.4099C15.6903 38.1973 14.378 38.1973 13.5906 37.4099C13.1969 37.0162 13 36.4913 13 35.9664C13 35.4414 13.1969 34.9821 13.5906 34.5884L22.6457 25.5333L13.5906 16.4782C13.1969 16.0845 13 15.5595 13 15.0346C13 14.5097 13.1969 14.0504 13.5906 13.6567C14.378 12.8693 15.6247 12.8693 16.4121 13.6567L25.4672 22.7118L34.5223 13.591C35.2441 12.8036 36.5564 12.8036 37.3438 13.591C37.7375 13.9847 37.9344 14.4441 37.9344 15.0346C37.9344 15.6252 37.7375 16.0845 37.3438 16.4782Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-0.000488281 25.0005C-0.000488281 38.7972 11.2028 50.0005 24.9995 50.0005C38.6925 50.0005 49.9995 38.7972 49.9995 25.0005C49.9995 11.2038 38.7962 0.000488281 24.9995 0.000488281C11.2028 0.000488281 -0.000488281 11.2038 -0.000488281 25.0005ZM3.63022 24.8968C3.63022 13.1748 13.1738 3.52746 24.9995 3.52746C36.8252 3.52746 46.3688 13.1748 46.3688 24.8968C46.3688 36.6187 36.8252 46.266 24.9995 46.266C13.2775 46.266 3.63022 36.6187 3.63022 24.8968Z",fill:r}))}),sV=["color","size"],uV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,sV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M29.9338 5.26853C27.8524 4.75154 25.7006 4.56814 23.5381 4.72351C22.4874 4.799 21.4379 4.95535 20.4183 5.18855L19.3724 0.636496C20.6245 0.350265 21.9128 0.158175 23.2017 0.065597C25.8579 -0.125223 28.5034 0.100753 31.0653 0.737277L29.9338 5.26853Z",fill:r}),p.createElement("path",{opacity:"0.9",d:"M40.6131 11.9278C38.5498 9.48098 35.9044 7.52805 32.963 6.2805L34.7952 1.98303C38.4106 3.51633 41.6615 5.91575 44.1962 8.922L40.6131 11.9278Z",fill:r}),p.createElement("path",{opacity:"0.8",d:"M45.3329 23.5739L45.3303 23.5392C45.097 20.3085 44.1359 17.275 42.4734 14.5227L46.4838 12.1129C48.5302 15.501 49.7133 19.2325 50 23.2036L45.3329 23.5739Z",fill:r}),p.createElement("path",{opacity:"0.7",d:"M46.2688 38.2308L42.2981 35.7565C43.9958 33.0458 45.0372 29.9357 45.3095 26.7618L49.9744 27.1604C49.639 31.0674 48.3577 34.8958 46.2688 38.2308Z",fill:r}),p.createElement("path",{opacity:"0.6",d:"M34.4209 48.1735L32.6626 43.8456C35.6192 42.6505 38.2938 40.7405 40.3975 38.3222L43.9338 41.3828C41.3483 44.3551 38.0588 46.7033 34.4209 48.1735V48.1735Z",fill:r}),p.createElement("path",{opacity:"0.5",d:"M26.8033 49.9345C24.1593 50.1242 21.5262 49.9011 18.9766 49.2716L20.1013 44.7386C22.1729 45.25 24.3148 45.4309 26.4673 45.2766C27.5283 45.2004 28.5879 45.0416 29.6165 44.8049L30.6697 49.3551C29.4061 49.6459 28.1052 49.841 26.8033 49.9345V49.9345Z",fill:r}),p.createElement("path",{opacity:"0.4",d:"M15.2449 48.0311C11.6272 46.5033 8.37276 44.1086 5.83362 41.1063L9.412 38.0952C11.479 40.5388 14.1272 42.4877 17.0704 43.7306L15.2449 48.0311Z",fill:r}),p.createElement("path",{opacity:"0.3",d:"M3.54069 37.9198C1.48217 34.5223 0.292537 30.78 0.00479729 26.7959L0 26.7274L4.66972 26.3918L4.67579 26.478C4.90861 29.7017 5.87511 32.7443 7.54751 35.504L3.54069 37.9198Z",fill:r}),p.createElement("path",{opacity:"0.2",d:"M4.69761 23.2075L0.0335693 22.802C0.374666 18.8955 1.66191 15.0691 3.75587 11.7373L7.72274 14.2175C6.02088 16.9257 4.97478 20.0344 4.69761 23.2075V23.2075Z",fill:r}))}),cV=["color","color2","size"],dV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n;t.color2;var i=t.size,o=i===void 0?14:i,a=se(t,cV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M42.0001 6.11477C42.0001 4.48089 41.3639 2.94468 40.2086 1.78931C37.8238 -0.595528 33.9433 -0.595878 31.5582 1.78931L25.666 7.68191L22.9908 5.00654C22.5351 4.5509 21.7965 4.5509 21.3407 5.00654L17.8405 8.50695C17.3849 8.96259 17.3849 9.70141 17.8405 10.1572L20.5157 12.8325L3.63971 29.7097C3.5116 29.8378 3.41511 29.9939 3.35783 30.1658L2.27826 33.4048L1.30626 34.3769C-0.435198 36.1186 -0.435314 38.9525 1.30626 40.6943C3.04783 42.436 5.88157 42.4359 7.62314 40.6943L8.59514 39.7223L11.834 38.6426C12.0058 38.5853 12.1619 38.4888 12.29 38.3607L29.1661 21.4835L31.8413 24.1588C32.297 24.6145 33.0357 24.6145 33.4914 24.1588L36.9916 20.6584C37.4472 20.2028 37.4472 19.464 36.9916 19.0082L34.3164 16.3328L40.2086 10.4402C41.3639 9.28486 42.0001 7.74876 42.0001 6.11477ZM20.5157 26.8341H9.81507L22.1658 14.4826L27.516 19.8333L20.5157 26.8341ZM32.6663 21.6836L20.3156 9.332L22.1657 7.48168L34.5163 19.8333L32.6663 21.6836ZM38.5585 8.79014L32.6663 14.6827L27.316 9.332L33.2081 3.4394C34.6833 1.96421 37.0835 1.96409 38.5584 3.4394C40.0263 4.84774 40.0261 7.3818 38.5585 8.79014Z",fill:r}))});const fV=dV;var pV=["color","size"],ZO=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,pV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 7.75049C0 6.92206 0.671573 6.25049 1.5 6.25049H48.5C49.3284 6.25049 50 6.92206 50 7.75049V9.43806C50 10.2665 49.3284 10.9381 48.5 10.9381H1.5C0.671571 10.9381 0 10.2665 0 9.43806V7.75049ZM0 24.1567C0 23.3283 0.671573 22.6567 1.5 22.6567H48.5C49.3284 22.6567 50 23.3283 50 24.1567V25.8443C50 26.6727 49.3284 27.3443 48.5 27.3443H1.5C0.671571 27.3443 0 26.6727 0 25.8443V24.1567ZM1.5 39.0629C0.671573 39.0629 0 39.7345 0 40.5629V42.2505C0 43.0789 0.671571 43.7505 1.5 43.7505H48.5C49.3284 43.7505 50 43.0789 50 42.2505V40.5629C50 39.7345 49.3284 39.0629 48.5 39.0629H1.5Z",fill:r}))}),hV=["color","size"],gV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,hV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.23229 1.23267C2.20863 0.256387 3.79154 0.256434 4.76782 1.23277L22.9989 19.465L41.2323 1.23267C42.2086 0.256387 43.7915 0.256434 44.7678 1.23277C45.7441 2.20911 45.7441 3.79203 44.7677 4.76831L24.7665 24.7683C24.2977 25.2371 23.6618 25.5005 22.9987 25.5005C22.3357 25.5005 21.6998 25.2371 21.231 24.7682L1.23218 4.7682C0.255899 3.79186 0.255946 2.20895 1.23229 1.23267Z",fill:r}))}),mV=["color","size"],vV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,mV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2326 1.23271C22.2089 0.256404 23.7918 0.256417 24.7681 1.23274L44.7678 21.2327C45.7441 22.2091 45.7441 23.792 44.7678 24.7683C43.7914 25.7446 42.2085 25.7446 41.2322 24.7682L23.0003 6.53602L4.76775 24.7683C3.79143 25.7446 2.20852 25.7446 1.23222 24.7682C0.255916 23.7919 0.255928 22.209 1.23225 21.2327L21.2326 1.23271Z",fill:r}))}),yV=["color","size"],wV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,yV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.7355 35.1357C27.1751 35.7705 26.2217 35.7926 25.6359 35.1773L17.3026 26.423C17.0301 26.1368 16.8819 25.755 16.8752 25.3647C16.8686 24.9745 17.0037 24.5881 17.2652 24.2923L25.5985 14.8647C26.1593 14.2302 27.1128 14.2089 27.6981 14.8247C28.2539 15.4093 28.2679 16.3516 27.7348 16.9546L20.36 25.2978L27.6974 33.0057C28.2536 33.59 28.2681 34.5323 27.7355 35.1357ZM26.6695 34.3756C26.7058 34.3748 26.753 34.3599 26.7984 34.3085C26.9042 34.1886 26.8989 33.9798 26.792 33.8676L19.0594 25.7444C18.8357 25.5095 18.829 25.1425 19.0438 24.8995L26.7983 16.1268C26.9041 16.007 26.899 15.7983 26.7921 15.6859C26.7464 15.6377 26.7001 15.6249 26.6639 15.6256C26.6276 15.6263 26.5805 15.6412 26.5351 15.6926L18.2017 25.1202C18.1562 25.1717 18.1235 25.2514 18.1251 25.3435C18.1266 25.4356 18.1619 25.5128 18.208 25.5612L26.5413 34.3154C26.5871 34.3635 26.6334 34.3763 26.6695 34.3756Z",fill:r}),p.createElement("path",{d:"M26.7984 34.3085C26.753 34.3599 26.7058 34.3748 26.6695 34.3756C26.6334 34.3763 26.5871 34.3635 26.5413 34.3154L18.208 25.5612C18.1619 25.5128 18.1266 25.4356 18.1251 25.3435C18.1235 25.2514 18.1562 25.1717 18.2017 25.1202L26.5351 15.6926C26.5805 15.6412 26.6276 15.6263 26.6639 15.6256C26.7001 15.6249 26.7464 15.6377 26.7921 15.6859C26.899 15.7983 26.9041 16.007 26.7983 16.1268L19.0438 24.8995C18.829 25.1425 18.8357 25.5095 19.0594 25.7444L26.792 33.8676C26.8989 33.9798 26.9042 34.1886 26.7984 34.3085Z",fill:r}))});const CV=wV;var SV=["color","size"],xV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,SV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.2645 14.8655C22.8249 14.2307 23.7783 14.2086 24.3641 14.8239L32.6974 23.5781C32.9699 23.8644 33.1181 24.2461 33.1248 24.6364C33.1314 25.0267 32.9963 25.4131 32.7348 25.7089L24.4015 35.1365C23.8406 35.7709 22.8872 35.7923 22.3019 35.1765C21.7461 34.5919 21.7321 33.6496 22.2652 33.0465L29.6399 24.7034L22.3026 16.9954C21.7464 16.4112 21.7319 15.4689 22.2645 14.8655ZM23.3305 15.6256C23.2942 15.6264 23.247 15.6413 23.2016 15.6927C23.0958 15.8126 23.1011 16.0214 23.208 16.1336L30.9406 24.2568C31.1643 24.4917 31.171 24.8586 30.9562 25.1016L23.2017 33.8744C23.0959 33.9942 23.101 34.2029 23.2079 34.3153C23.2536 34.3634 23.2999 34.3763 23.3361 34.3756C23.3724 34.3748 23.4195 34.36 23.4649 34.3086L31.7983 24.881C31.8438 24.8295 31.8765 24.7497 31.8749 24.6577C31.8734 24.5656 31.838 24.4883 31.792 24.44L23.4587 15.6858C23.4129 15.6377 23.3666 15.6249 23.3305 15.6256Z",fill:r}),p.createElement("path",{d:"M23.2016 15.6927C23.247 15.6413 23.2942 15.6264 23.3305 15.6256C23.3666 15.6249 23.4129 15.6377 23.4587 15.6858L31.792 24.44C31.838 24.4883 31.8734 24.5656 31.8749 24.6577C31.8765 24.7497 31.8438 24.8295 31.7983 24.881L23.4649 34.3086C23.4195 34.36 23.3724 34.3748 23.3361 34.3756C23.2999 34.3763 23.2536 34.3634 23.2079 34.3153C23.101 34.2029 23.0959 33.9942 23.2017 33.8744L30.9562 25.1016C31.171 24.8586 31.1643 24.4917 30.9406 24.2568L23.208 16.1336C23.1011 16.0214 23.0958 15.8126 23.2016 15.6927Z",fill:r}))});const EV=xV;var bV=["color","size"],OV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,bV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M48.5577 38.9423H34.8557C31.8069 38.9423 29.327 41.4224 29.327 44.4712C29.327 45.9293 28.1406 47.1157 26.6827 47.1157H5.52902C4.07066 47.1157 2.88467 45.9293 2.88467 44.4712V42.5459C2.88467 41.0886 4.07028 39.9025 5.5275 39.9018L9.33952 39.8999C9.34067 39.8999 9.34219 39.8995 9.34334 39.8995C9.38683 39.8995 9.43031 39.8968 9.47418 39.893C9.49211 39.8915 9.50966 39.8884 9.52759 39.8861C9.54628 39.8835 9.56535 39.8819 9.58405 39.8789L19.7636 38.1229C19.7689 38.1217 19.7739 38.1206 19.7788 38.1195C19.7948 38.1164 19.8105 38.113 19.8261 38.1095C19.8517 38.1038 19.8769 38.0981 19.9017 38.0908C19.9192 38.0863 19.9368 38.0809 19.9543 38.0756C19.9776 38.068 20.0008 38.0599 20.0241 38.0512C20.0409 38.0447 20.0581 38.039 20.0748 38.0321C20.1107 38.0168 20.1458 38.0008 20.1805 37.9829C20.1942 37.9756 20.208 37.9672 20.2217 37.9596C20.2461 37.9459 20.2702 37.9321 20.2938 37.9169C20.3083 37.9077 20.3228 37.8978 20.3373 37.8879C20.3602 37.8719 20.3831 37.8551 20.4052 37.8375C20.417 37.8284 20.4292 37.8192 20.4411 37.8093C20.4746 37.7815 20.5074 37.7525 20.5383 37.7212L46.2479 12.0109C48.3097 9.94895 48.3097 6.59377 46.2479 4.53146L43.2632 1.54708C41.2014 -0.515234 37.846 -0.514853 35.7841 1.54708L10.075 27.2574C10.0437 27.2883 10.0147 27.3215 9.9865 27.355C9.97696 27.3665 9.9678 27.3783 9.95865 27.3901C9.9411 27.4127 9.92432 27.4355 9.90829 27.4588C9.89838 27.4729 9.88846 27.4874 9.8793 27.5019C9.86443 27.5252 9.85069 27.5488 9.83734 27.5729C9.82857 27.5885 9.81941 27.6042 9.81102 27.6198C9.79424 27.653 9.77898 27.6862 9.76448 27.7205C9.75723 27.7377 9.75113 27.7556 9.74426 27.7732C9.73625 27.7953 9.72824 27.8178 9.72099 27.8403C9.71527 27.8586 9.70993 27.8769 9.70497 27.8952C9.69849 27.9189 9.69276 27.9429 9.68742 27.9673C9.68361 27.9841 9.67979 28.0009 9.67674 28.0177C9.6756 28.0226 9.67445 28.0272 9.67369 28.0318L8.12378 37.0158L5.52597 37.017C2.47879 37.0185 0 39.4989 0 42.5459V44.4712C0 47.5201 2.48032 50.0005 5.52902 50.0005H26.6827C29.7314 50.0005 32.2117 47.5201 32.2117 44.4712C32.2117 43.0132 33.3977 41.8267 34.8557 41.8267H48.5577C49.3542 41.8267 50 41.1813 50 40.3847C50 39.5878 49.3542 38.9423 48.5577 38.9423ZM12.043 31.2653L16.5306 35.7531L11.1076 36.6885L12.043 31.2653ZM33.5567 7.85382L35.7288 10.026L15.3065 30.4493L13.1344 28.2771L33.5567 7.85382ZM19.5183 34.6613L17.3462 32.4891L37.7689 12.0658L39.941 14.238L19.5183 34.6613ZM37.8239 3.58651C38.7611 2.64958 40.2859 2.64958 41.2235 3.58651L44.2078 6.57126C45.145 7.50858 45.145 9.03376 44.2078 9.97108L41.9804 12.1986L35.5965 5.81401L37.8239 3.58651Z",fill:r}))}),PV=["color","size"],kV=Me(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?14:i,a=se(t,PV);return p.createElement("svg",J({ref:e,width:o,height:o,viewBox:"0 0 52 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),p.createElement("path",{d:"M46.4326 40.0282C46.1217 40.5666 45.6098 40.9595 45.0093 41.1204C44.4088 41.2813 43.7691 41.197 43.2307 40.8862C42.6923 40.5754 42.2995 40.0634 42.1386 39.463C41.9777 38.8625 42.0619 38.2227 42.3727 37.6843C45.2819 32.6454 46.0703 26.6571 44.5644 21.0369C43.0584 15.4167 39.3816 10.6249 34.3426 7.71563C25.1427 2.4043 13.7736 4.38306 6.93632 12.1744L14.5457 12.0831H14.5744C15.196 12.0795 15.7937 12.3229 16.2358 12.7599C16.678 13.1969 16.9284 13.7916 16.9321 14.4133C16.9357 15.0349 16.6923 15.6326 16.2553 16.0747C15.8183 16.5169 15.2236 16.7673 14.6019 16.771L2.37222 16.9175H2.34409C2.03391 16.9175 1.72681 16.856 1.44059 16.7364C1.15437 16.6169 0.894721 16.4417 0.676697 16.2211C0.458674 16.0004 0.28661 15.7387 0.170478 15.4511C0.0543471 15.1635 -0.00354164 14.8557 0.000167612 14.5455L0.147346 2.31591C0.151046 2.00811 0.215338 1.70404 0.336549 1.42108C0.457761 1.13812 0.633519 0.881802 0.853788 0.666765C1.07406 0.451728 1.33453 0.282182 1.62032 0.167807C1.90611 0.0534328 2.21164 -0.00353076 2.51944 0.000169355C2.82725 0.00386947 3.13132 0.0681609 3.41428 0.189372C3.69724 0.310584 3.95356 0.486342 4.16859 0.706611C4.38363 0.926881 4.55318 1.18735 4.66755 1.47314C4.78193 1.75894 4.83889 2.06446 4.83519 2.37227L4.77171 7.65586C9.37537 3.16334 15.4496 0.489016 21.8718 0.127065C28.2941 -0.234886 34.6303 1.74001 39.7096 5.6868C44.7889 9.63359 48.2679 15.2855 49.5038 21.5981C50.7397 27.9107 49.6485 34.4574 46.4326 40.0282Z",fill:r}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 28C26.6569 28 28 26.6569 28 25C28 23.3431 26.6569 22 25 22C23.3431 22 22 23.3431 22 25C22 26.6569 23.3431 28 25 28ZM25 32C28.866 32 32 28.866 32 25C32 21.134 28.866 18 25 18C21.134 18 18 21.134 18 25C18 28.866 21.134 32 25 32Z",fill:r}))}),ss="Select",_V=$.span.attrs({className:we(ss,"Icon")}).withConfig({componentId:"sc-mfrapg-0"})(function(t){var e=t.theme.palette,n=t.size;return F(["display:flex;flex-shrink:0;color:",";padding:",";margin-left:6px;"],e[_.IconsPrimary],n===vr.Md?"2.5px":"2px")}),TV=$.span.attrs({className:we(ss,"tickIcon")}).withConfig({componentId:"sc-mfrapg-1"})(function(t){var e=t.theme.palette;return F(["color:",";"],e[_.AccentStateless])}),IV=$.div.attrs({className:we(ss,"Container")}).withConfig({componentId:"sc-mfrapg-2"})(function(t){var e=t.fullWidth,n=e===void 0?!1:e;return F(["position:relative;display:inline-flex;",""],n?"width: 100%":"")}),LV=$(zr.Input).attrs({className:we(ss,"root")}).withConfig({componentId:"sc-mfrapg-3"})(function(t){var e=t.theme.palette,n=t.disabled,r=t.readOnly,i=t.size,o=i===void 0?"sm":i;return F(["cursor:",";user-select:none;background:",";",";"],n||r?"default":"pointer",n?e[_.BackgroundHover]:e[_.BackgroundStateless],eO[o])}),AV=$.label.attrs({className:we(ss,"Label")}).withConfig({componentId:"sc-mfrapg-4"})(["flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),MV=$.span.attrs({className:we(ss,"Placeholder")}).withConfig({componentId:"sc-mfrapg-5"})(function(t){var e=t.theme.palette,n=t.size;return F(["width:100%;color:",";margin-right:","px;"],e[_.TextPlaceholder],n===vr.Md?10:6)}),RV=$.input.attrs({className:we(ss,"Input"),"aria-hidden":"true",tabindex:"-1"}).withConfig({componentId:"sc-mfrapg-6"})(["left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;"]),zV=It({Container:IV,Select:LV,Label:AV,Icon:_V,TickIcon:TV,Input:RV,Placeholder:MV});const Il=zV;function N9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jV(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=p.createElement(f4,null,e);if(n&&e){var a=p.createElement(eF,null,p.createElement(Il.TickIcon,null,p.createElement(sO,{size:NV(r)})));if(p.Children.count(e)===1)return p.createElement(p.Fragment,null,o,!i&&a);if(p.Children.count(e)>1&&!p.Children.toArray(e).some(function(u){var c;return(u==null||(c=u.type)===null||c===void 0?void 0:c.displayName)==="MenuItemActions"}))return p.createElement(p.Fragment,null,e,a)}return o},BV=function(e,n){var r,i,o,a,u=n.value,c=n.multiple,d=c===void 0?!1:c,h=n.size,m=h===void 0?vt.Md:h,v=n.hideMenuItemsActions,C=v===void 0?!1:v,w=n.onClose,x=n.onChange;if(!p.isValidElement(e))return e;if(((r=e.type)===null||r===void 0?void 0:r.displayName)!=="MenuItem")return p.cloneElement(e);var P=e==null||(i=e.props)===null||i===void 0?void 0:i.value,b=d?Array.isArray(u)?u:[]:[u],E=b.length>0&&b.includes(P),k=e==null||(o=e.props)===null||o===void 0?void 0:o.disabled;return p.cloneElement(e,{active:E,size:m,children:DV(e==null||(a=e.props)===null||a===void 0?void 0:a.children,E,m,C),onClick:function(){var L;if(!d&&typeof w=="function"&&w(),typeof x=="function"&&!k&&(P!=null&&(L=P.toString())!==null&&L!==void 0&&L.length)){var A=P;if(d){A=en(Array.isArray(u)?u:[]);var M=A.indexOf(P);M>-1?A.splice(M,1):A.push(P)}x(A)}}})},D9=function t(e){var n=e.props?e.props.children:e;return Array.isArray(n)?n.map(function(r){return t(r)}).join(" "):xr(n)==="object"?t(n.props.children):n},HV=function(e,n){if(e&&e.children){for(var r=n?e.value:e.children;typeof r!="string";)Array.isArray(r)?r=D9(r[1]):r=D9(r);return r}},FV=function(e){var n=e.value,r=e.multiple,i=r===void 0?!1:r,o=e.children,a=e.showSelectionKey,u=a===void 0?!1:a,c=[];p.Children.forEach(o,function(h){if(p.isValidElement(h)){var m=h==null?void 0:h.type,v=m.displayName;v==="MenuItem"&&h.props&&c.push(jV({},h.props))}});var d=i?c.filter(function(h){return Array.isArray(n)&&n.includes(h.value)}):[c.find(function(h){return h.value===n})];return d.length>0?d.map(function(h){return HV(h,u)}).join(", "):Array.isArray(n)?n.join(", "):n},$V=["children","size","error","multiple","onChange","value","fullWidth","selectProps","MenuProps","readOnly","disabled","scroll","placeholder","showSelectionKey","hideMenuItemsActions","renderLabel","onRequestClose"],g4=ct(function(t,e){var n,r=t.children,i=t.size,o=t.error,a=t.multiple,u=t.onChange,c=t.value,d=t.fullWidth,h=t.selectProps,m=t.MenuProps,v=t.readOnly,C=t.disabled,w=t.scroll,x=w===void 0?!0:w,P=t.placeholder,b=t.showSelectionKey,E=t.hideMenuItemsActions,k=t.renderLabel,T=t.onRequestClose,L=se(t,$V),A=z.useState(void 0),M=Le(A,2),j=M[0],D=M[1],B=!!j,X=function(ve){return D(ve.currentTarget)},G=Array.isArray(c)?!!c.length:!!(c!=null&&(n=c.toString())!==null&&n!==void 0&&n.length),V=function(){T&&T(),D(void 0)};return p.createElement(Il.Container,{ref:e,fullWidth:!!d},p.createElement(Il.Select,J({},L,{disabled:C,size:i,error:o,fullWidth:!!d,readOnly:v,showSelectionKey:b,onClick:v||C?void 0:X}),G&&p.createElement(Il.Label,null,typeof k=="function"?k(c):FV({value:c,multiple:a,children:r,showSelectionKey:b})),!G&&p.createElement(Il.Placeholder,{size:i},P),p.createElement(Il.Icon,{size:i},p.createElement(oO,{type:B?"top":"bottom",IconProps:{size:i===vr.Md?11:10}})),p.createElement(Il.Input,h)),p.createElement(ls,J({onClose:V,scroll:x,open:B,anchorEl:j},m),p.Children.map(r,function(ne){return BV(ne,{value:c,multiple:a,size:i,hideMenuItemsActions:E,onClose:V,onChange:v||C?void 0:u})})))}),WV={size:vt.Md,error:!1,multiple:!1,fullWidth:!1,readOnly:!1,disabled:!1,scroll:!0,hideMenuItemsActions:!1};g4.defaultProps=WV;var VV=I.oneOfType([I.string,I.number,I.oneOf([null])]),O1={size:I.oneOf(ut(vt)),error:I.bool,multiple:I.bool,fullWidth:I.bool,children:I.oneOfType([I.element,I.arrayOf(I.element)]),value:I.oneOfType([I.string,I.number,I.oneOf([null]),I.arrayOf(VV)]),onChange:I.func,MenuProps:I.exact(LO),selectProps:I.object,readOnly:I.bool,disabled:I.bool,hideMenuItemsActions:I.bool,showSelectionKey:I.bool,scroll:I.bool,renderLabel:I.func,onRequestClose:I.func};g4.propTypes=O1;const m4=g4;function B9(t,e,n){var r=function(u){if(typeof t=="function"){var c;t(((c=u.touches)===null||c===void 0?void 0:c[0])||u)}},i=function a(u){if(document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",a),document.removeEventListener("mouseleave",a),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",a),document.removeEventListener("touchcancel",a),typeof n=="function"){var c;n(((c=u.touches)===null||c===void 0?void 0:c[0])||u)}},o=function(u){if(document.addEventListener("mousemove",r),document.addEventListener("mouseup",i),document.addEventListener("mouseleave",i),document.addEventListener("touchmove",r),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),typeof e=="function"){var c;e(((c=u.touches)===null||c===void 0?void 0:c[0])||u)}};return{onMouseDown:o,onTouchStart:o}}function H9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function GV(t){for(var e=1;e .item{margin-right:8px;display:flex;justify-content:center;}"]),oG=$.div.attrs({className:we(Qi,"select")}).withConfig({componentId:"sc-qj4xo5-12"})(function(t){var e=t.value;return F(["width:",";"],e==="rgb"?"25%":"35%")}),aG=It({ColorPickerWrapper:XV,RangePickerWrapper:YV,WhiteGradient:KV,BlackGradient:qV,ColorPointer:QV,BarWrapper:JV,Bar:eG,BarColorStop:tG,ColorPickerAction:nG,ColorPickerIcon:ZV,ColorItemsContainer:iG,ColorItemWrapper:rG,Select:oG});const Mr=aG;var v4=ct(function(t,e){var n=t.value,r=t.onChange,i=t.checked,o=t.size,a=o===void 0?24:o,u=z.useMemo(function(){return n==="#ffffff"||n==="rgba(0,0,0,0)"?"black":"white"},[n]);return p.createElement(Mr.ColorItemWrapper,{ref:e,color:n,size:a,stroke:n==="rgba(0,0,0,0)"?"#a8a8a8":"#E9EEF2",value:n},p.createElement("input",{type:"radio",value:n,checked:i,onChange:r}),i&&p.createElement(sO,{color:u}))});v4.defaultProps={};v4.propTypes={value:I.string.isRequired,checked:I.bool,onChange:I.func.isRequired,size:I.number};const lG=v4;var sG=["defaultColor","onChange","pinnedColors","showTransparentColor","containerProps"];function F9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function X2(t){for(var e=1;e255||Number.isNaN(Ae))){var pt=ve;pt[at]=Ae;var Et=LE.apply(void 0,en(pt));te(en(pt)),e7(Et)&&(T(X2(X2({},k),{},{color:Et})),Ge(Et))}},Ve=function(Ae){Ae.includes("rgb")?te(H3(Ae)):te(Mh(Ae))},ot=function(Ae){return v(Ae)?nh:Ae},$e=function(Ae){if(Se!==null){var at=xl(Se),pt=at.width,Et=at.height,_t=P2(Ae),En=PL(_t[0],_t[1]/100,_t[2]/100),ln=O2(En[1],0,100,0,pt),In=Et-O2(En[2],0,100,0,Et);T({color:ot(Ae),pointer:{left:ln,top:In}}),Ge(Ae),Ve(Ae),typeof i=="function"&&i(ot(Ae),xe(Ae),Ie(M))}},dt=function(Ae,at,pt){if(Se!==null){var Et=xl(Se),_t=Et.width,En=Et.height,ln=P2(pt),In=Le(ln,1),Vr=In[0],Ji=Ms(Ae,0,_t)||0,Ti=Ms(at,0,En)||0,rt=OL(Vr,Ji/_t,(En-Ti)/En),lt=bL(rt[0],rt[1],rt[2]);T({color:lt,pointer:{left:Ji,top:Ti}}),typeof i=="function"&&i(lt,"rgb(".concat(Mh(lt).join(", "),")"),Ie(M))}},Ct=function(Ae){var at=ee;if(at!==null){var pt=xl(at),Et=pt.width,_t=Ms(Math.round(O2(Ae,0,Et,0,Z2)),0,Z2),En=at.querySelector("[data-hue='".concat(_t,"']")),ln=En.style.backgroundColor;return P({color:ln,pointerLeft:Ms(Ae,0,Et)}),ln}return x.color},qe=function(Ae){var at=ee;if(at!==null){var pt,Et=xl(at),_t=Et.left,En=((pt=Ae.touches)===null||pt===void 0?void 0:pt[0])||Ae,ln=Ct(En.pageX-_t);dt(k.pointer.left,k.pointer.top,ln)}},St=function(Ae){var at=Se;if(at!==null){var pt=xl(at),Et=pt.left,_t=pt.top,En=pt.height,ln=pt.width,In=Ae?Ms(Ae.pageX-Et,0,ln):k.pointer.left||0,Vr=Ae?Ms(Ae.pageY-_t,0,En):k.pointer.left||0;dt(In,Vr,x.color)}},At=function(Ae){Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight"||Ct(x.pointerLeft+(Ae.key==="ArrowLeft"?-1:1))},ft=function(Ae){var at=0;Ae.key==="ArrowLeft"||Ae.key==="ArrowUp"?at=-1:(Ae.key==="ArrowRight"||Ae.key==="ArrowDown")&&(at=1),at&&dt((k.pointer.left||0)+(["ArrowLeft","ArrowRight"].includes(Ae.key)?at:0),(k.pointer.top||0)+(["ArrowUp","ArrowDown"].includes(Ae.key)?at:0),x.color)},Re=function(Ae){var at=e7(Ae);at&&$e(Ae),ce(Ae)};z.useEffect(function(){Ge(k.color),$e(k.color)},[ee]),z.useEffect(function(){ce(k.color),Ve(k.color)},[k.color]);var Xe=z.useMemo(function(){return en(new Array(Z2+1)).map(function(Ye,Ae){return p.createElement(Mr.BarColorStop,{key:Ae,$color:"hsl(".concat(Ae,", 100%, 50%)"),"data-hue":Ae})})},[]),Ut=B9(qe,qe,null),Tn=B9(St,St,null);return p.createElement(Mr.ColorPickerWrapper,J({ref:e},h),p.createElement(Mr.ColorPickerAction,null,p.createElement(Mr.Select,{value:X},p.createElement(m4,{size:"sm",value:X,MenuProps:X2({zIndex:11112},d),onChange:function(Ae){return G(Ae)},fullWidth:!0},p.createElement(ql,{value:"hex"},"Hex"),p.createElement(ql,{value:"rgb"},"RGB"))),X==="hex"?p.createElement(Qd,{size:"sm",error:!/^#([\da-f]{3}){1,2}$/i.test(k.color),value:de,onChange:function(Ae){return Re(Ae.target.value)},style:{width:"45%"}}):ve.map(function(Ye,Ae){return p.createElement(Qd,{key:Ae,size:"sm",value:Ye,onChange:function(pt){var Et;return Ze(Number((Et=pt.target)===null||Et===void 0?void 0:Et.value),Ae)},style:{width:"20%"}})}),k.color!==nh&&p.createElement(Mr.ColorPickerIcon,{onClick:function(){return M.some(function(Ae){return ze(Ae)})?ye(k.color,"delete"):ye(k.color,"add")}},M.some(function(Ye){return ze(Ye)})?p.createElement(XO,null):p.createElement(WW,null))),p.createElement(Mr.RangePickerWrapper,J({ref:ae,color:x.color},Tn),p.createElement(Mr.WhiteGradient,null),p.createElement(Mr.BlackGradient,null),p.createElement(Mr.ColorPointer,{tabIndex:-1,left:k.pointer.left||0,top:k.pointer.top||0,onKeyDown:ft,pointerColor:de,considerTopWidth:!0})),p.createElement(Mr.BarWrapper,Ut,p.createElement(Mr.Bar,{ref:ue},p.createElement("tbody",null,p.createElement("tr",null,Xe))),p.createElement(Mr.ColorPointer,{tabIndex:-1,left:x.pointerLeft,onKeyDown:At,considerTopWidth:!1,pointerColor:de,style:{top:-3}})),p.createElement(Mr.ColorItemsContainer,null,M.map(function(Ye){return p.createElement("div",{className:"item",key:Ye},p.createElement(lG,{value:Ye,checked:ze(Ye),onChange:function(at){return $e(at.target.value)}}))})))});y4.defaultProps={defaultColor:"#000000",pinnedColors:[],showTransparentColor:!1};y4.propTypes={defaultColor:I.string,onChange:I.func,pinnedColors:I.array,showTransparentColor:I.bool};const uG=y4;var qc,Ys,cG=(qc={},S(qc,_u.Primary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";&:hover{background-color:",";}&:focus{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;}"],e[_.AccentStateless],e[_.IconsInvert],e[_.AccentPrimaryHover],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive],n&&F(["background-color:",";&:hover,&:focus{background-color:",";}"],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity])}),S(qc,_u.Secondary,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:",";color:",";border:1px solid ",";&:hover{color:",";background-color:",";}&:focus{background-color:",";color:",";border:1px solid ",";}&:active{color:",";background-color:",";}"," &:disabled{color:",";background:",";border:none;cursor:default;}"],e[_.BackgroundStateless],e[_.AccentStateless],e[_.AccentStateless],e[_.IconsInvert],e[_.AccentPrimaryHover],e[_.Accent_1_2_Opacity],e[_.AccentPrimaryActive],e[_.AccentPrimaryActive],e[_.IconsInvert],e[_.AccentPrimaryActive],n&&F(["color:",";background-color:",";&:hover,&:focus{color:",";background-color:",";}"],e[_.IconsInvert],e[_.AccentPrimaryActive],e[_.IconsInvert],e[_.AccentPrimaryActive]),e[_.BordersDisabled],e[_.Accent_1_2_Opacity])}),S(qc,_u.Basic,function(t){var e=t.theme.palette,n=t.active;return F(["background-color:transparent;color:",";border:none;&:hover{background-color:",";color:",";}&:focus{background-color:",";color:",";}&:active{background-color:",";color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[_.IconsPrimary],e[_.BackgroundHover],e[_.IconsPrimaryHover],e[_.BackgroundActive],e[_.LinkActive],e[_.BackgroundActive],e[_.LinkActive],n&&F(["background-color:",";color:",";&:hover,&:focus{background-color:",";color:",";}"],e[_.BackgroundActive],e[_.LinkActive],e[_.BackgroundActive],e[_.LinkActive]),e[_.BordersDisabled])}),qc),dG=(Ys={},S(Ys,nt.Xs,F(["padding:6px;"])),S(Ys,nt.Sm,F(["padding:9px;"])),S(Ys,nt.Md,F(["padding:12px;"])),S(Ys,nt.Lg,F(["padding:11px;"])),Ys),fG="IconButton",pG=$(po.Button).attrs({className:we(fG,"root")}).withConfig({componentId:"sc-10edh45-0"})(function(t){var e=t.color,n=e===void 0?_u.Secondary:e,r=t.size,i=r===void 0?nt.Md:r;return F([""," ",""],dG[i],cG[n])}),hG=It({IconButton:pG});const gG=hG;var mG=["children"],w4=ct(function(t,e){var n=t.children,r=se(t,mG);return p.createElement(gG.IconButton,J({},r,{ref:e}),n&&(typeof n=="function"?n({size:ru(r.size)}):n))});w4.defaultProps={size:nt.Md,color:_u.Secondary,active:!1};w4.propTypes={children:I.oneOfType([I.node,I.func]).isRequired,size:I.oneOf(ut(nt)),color:I.oneOf(ut(_u)),disabled:I.bool,active:I.bool};const Ua=w4;var rh,vG=function(e){var n=e.theme.palette;return F(["background:"," !important;border:1px solid "," !important;"],n[_.BackgroundSecondary],n[_.Error])},yG=(rh={},S(rh,vt.Sm,function(t){var e=t.theme.typography.font;return F(["padding:6px 12px;height:64px;",""],e[Pe.InputMd])}),S(rh,vt.Md,function(t){var e=t.theme.typography.font;return F(["padding:9px 16px;height:80px;",""],e[Pe.InputLg])}),rh),C4="Textarea",wG=$.div.attrs({className:we(C4,"root")}).withConfig({componentId:"sc-1usif6k-0"})(function(t){var e=t.size,n=e===void 0?vt.Md:e,r=t.error,i=r===void 0?!1:r,o=t.fullWidth,a=o===void 0?!1:o,u=t.readOnly,c=u===void 0?!1:u,d=t.disabled,h=d===void 0?!1:d,m=t.autoSize,v=m===void 0?!1:m,C=t.theme;return F(["position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:space-between;cursor:text;box-sizing:border-box;transition:all 100ms ease-out;width:",";pointer-events:",";background-color:",";border-radius:",";border:1px solid ",";color:",";"," "," &:hover{color:",";}"," ",""],a?"100%":"300px",h?"none":"auto",cO(c,h),C.shape.borderRadius[Xi.Md],fO(c,h),h?C.palette[_.TextPlaceholder]:C.palette[_.TextPrimary],yG[n],!c&&!h&&F(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";}}&:hover{background-color:",";border:1px solid ",";}"],C.palette[_.BackgroundSecondary],C.palette[_.AccentStateless],C.palette[_.AccentStateless],C.palette[_.BackgroundStateless],C.palette[_.BordersPrimaryHover]),dO(c,h),i&&vG,v&&F(["width:auto;height:auto;"]))}),CG=$.textarea.attrs({className:we(C4,"Base")}).withConfig({componentId:"sc-1usif6k-1"})(function(t){var e=t.theme.palette;return F(["display:block;width:100%;height:100%;color:inherit;outline:none;resize:none;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;font-family:inherit;&::placeholder{color:",";}"],e[_.TextPlaceholder])}),SG=$.span.attrs({className:we(C4,"CopyIcon")}).withConfig({componentId:"sc-1usif6k-2"})(function(t){var e=t.theme.palette;return F(["display:flex;color:",";cursor:pointer;"],e[_.IconsPrimary])}),xG=It({Textarea:wG,CopyIcon:SG,Base:CG});const Y2=xG;var EG=["fullWidth","size","value","readOnly","disabled","error","cols","rows","copyTextMessage","copySuccessIcon"],S4=ct(function(t,e){var n=t.fullWidth,r=t.size,i=t.value,o=t.readOnly,a=t.disabled,u=t.error,c=t.cols,d=t.rows,h=t.copyTextMessage,m=h===void 0?"":h,v=t.copySuccessIcon,C=se(t,EG),w=z.useState(!1),x=Le(w,2),P=x[0],b=x[1],E=z.useState(!1),k=Le(E,2),T=k[0],L=k[1];z.useEffect(function(){setTimeout(function(){return L(!1)},2e3)},[T]);var A=function(){setTimeout(function(){b(!0)},150)},M=function(){setTimeout(function(){b(!1)},200)},j=function(){return p.createElement(zr.NotificationBox,{size:r,style:{bottom:r===vr.Md?83:68}},p.createElement(zr.NotificationIcon,null,v),p.createElement(zr.NotificationText,null,m))};return p.createElement(Y2.Textarea,{size:r,value:i,onMouseEnter:A,onMouseLeave:M,readOnly:o,disabled:a,fullWidth:!!n,error:u,autoSize:!!c||!!d},p.createElement(Y2.Base,J({},C,{value:i,ref:e,readOnly:o,disabled:a})),P&&o?p.createElement(Y2.CopyIcon,{onClick:function(){return pO(i,L)}},p.createElement(uO,{size:16})):void 0,T&&j())});S4.defaultProps={size:vt.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1};var YO={error:I.bool,readOnly:I.bool,disabled:I.bool,fullWidth:I.bool,value:I.any,size:I.oneOf(ut(vt)),copySuccessIcon:I.oneOfType([I.node,I.func]),copyTextMessage:I.string,cols:I.number,rows:I.number};S4.propTypes=YO;var E0={Input:"input",Textarea:"textarea"},bG="InputGroup",OG=$.div.attrs({className:we(bG,"root")}).withConfig({componentId:"sc-zhtjwh-0"})(["","{margin-top:4px;}","{margin-bottom:4px;}"],mO.FormHint,Fh.Label),PG=It({InputGroup:OG});const KO=PG;var kG=["children","type","error","label","hint","LabelProps","InputProps","inputProps","inputRef","TextareaProps","readOnly","disabled","size","value"];function $9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _G(t){for(var e=1;e *:not(:first-child){margin-left:8px;}"],n===b0.Right?"flex-end":n)}),WG=It({ModalActions:$G});const VG=WG;var GG=["children"],k1=ct(function(t,e){var n=t.children,r=se(t,GG);return p.createElement(VG.ModalActions,J({},r,{ref:e}),n)});k1.defaultProps={align:b0.Center};k1.propTypes={children:I.node.isRequired,align:I.oneOf(ut(b0))};k1.displayName="ModalActions";const eP=k1;var UG="ModalContent",XG=$.div.attrs({className:we(UG,"root")}).withConfig({componentId:"sc-1ng1w0v-0"})(function(){return F(["position:relative;padding:12px 24px 0px;"])}),ZG=It({ModalContent:XG});const YG=ZG;var KG=["children"],_1=ct(function(t,e){var n=t.children,r=se(t,KG);return p.createElement(YG.ModalContent,J({},r,{ref:e}),n)});_1.defaultProps={};_1.propTypes={children:I.node.isRequired};_1.displayName="ModalContent";const tP=_1;var Ha={Sm:"sm",Md:"md",Lg:"lg"},Qc,qG="CrossButton",QG=(Qc={},S(Qc,Ha.Sm,F(["padding:6px;"])),S(Qc,Ha.Md,F(["padding:9px;"])),S(Qc,Ha.Lg,F(["padding:12px;"])),Qc),JG=$.button.attrs({className:we(qG,"root")}).withConfig({componentId:"sc-ygfku-0"})(function(t){var e=t.size,n=e===void 0?Ha.Lg:e,r=t.theme;return F(["display:flex;justify-content:center;align-items:center;cursor:pointer;"," color:",";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:",";background:",";;}&:active{color:",";background:",";}"],QG[n],r.palette[_.IconsSecondary],r.palette[_.IconsPrimary],r.palette[_.BackgroundHover],r.palette[_.IconsPrimaryHover],r.palette[_.BackgroundActive])}),eU=It({CrossButton:JG});const tU=eU;var nU=function(e){switch(e){case Ha.Lg:return 16;case Ha.Sm:default:return 12}},b4=ct(function(t,e){var n=J({},(QO(t),t));return p.createElement(tU.CrossButton,J({},n,{ref:e}),p.createElement(RO,{size:nU(n.size)}))});b4.defaultProps={size:Ha.Lg};b4.propTypes={size:I.oneOf(ut(Ha))};const O4=b4;var Nr={Default:"default",WithIcon:"with-icon"},mf="ModalTitle",rU=$.div.attrs({className:we(mf,"Icon")}).withConfig({componentId:"sc-l3tf49-0"})(function(t){var e=t.theme.palette;return F(["display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:",";color:",";"],e[_.Accent_1_2_Opacity],e[_.AccentStateless])}),iU=$.div.attrs({className:we(mf,"LabelPrimary")}).withConfig({componentId:"sc-l3tf49-1"})(function(t){var e=t.variant,n=e===void 0?Nr.Default:e;return F(["font-size:18px;line-height:27px;font-weight:",";"],n===Nr.Default?400:500)}),oU=$.div.attrs({className:we(mf,"LabelSecondary")}).withConfig({componentId:"sc-l3tf49-2"})(["font-size:12px;line-height:14px;margin-top:4px;"]),aU=$.div.attrs({className:we(mf,"Close")}).withConfig({componentId:"sc-l3tf49-3"})(function(t){var e=t.variant,n=e===void 0?Nr.Default:e,r=t.theme.palette;return F(["position:absolute;display:flex;top:","px;right:","px;color:",";&:hover{color:",";}cursor:pointer;"],n===Nr.WithIcon?2:8,n===Nr.WithIcon?2:8,r[_.IconsSecondary],r[_.AccentPrimary])}),lU=$.div.attrs({className:we(mf,"root")}).withConfig({componentId:"sc-l3tf49-4"})(function(t){var e=t.variant,n=e===void 0?Nr.Default:e,r=t.theme,i=r.palette,o=r.shape.borderRadius;return F(["position:relative;color:",";border-radius:"," "," 0px 0px;"," "," ",""],i[_.TextPrimary],o[Xi.Md],o[Xi.Md],function(){var a=n===Nr.WithIcon?26:14,u=n===Nr.WithIcon?12:14,c=18,d=n===Nr.WithIcon?c:40;return F(["padding:","px ","px ","px ","px;"],a,d,u,c)},n===Nr.Default&&F(["background:",";border-bottom:1px solid ",";"],i[_.BackgroundPrimary],i[_.BordersSecondary]),n===Nr.WithIcon&&F(["display:flex;align-items:center;flex-direction:column;"]))}),sU=It({ModalTitle:lU,LabelPrimary:iU,LabelSecondary:oU,Close:aU,Icon:rU});const Jc=sU;var uU=["secondary","onClose"],T1=ct(function(t,e){var n=t.secondary,r=t.onClose,i=se(t,uU);return p.createElement(Jc.ModalTitle,J({},i,{ref:e}),i.icon&&p.createElement(Jc.Icon,{iconShadow:!!i.iconShadow},i.icon),p.createElement(Jc.LabelPrimary,i,i.primary),i.variant===Nr.WithIcon&&n&&p.createElement(Jc.LabelSecondary,null,n),p.createElement(Jc.Close,{variant:i.variant},p.createElement(O4,{size:"lg",onClick:r})))});T1.defaultProps={iconShadow:!0,variant:Nr.Default};T1.propTypes={primary:I.node.isRequired,secondary:I.node,icon:I.node,iconShadow:I.bool,onClose:I.func,variant:I.oneOf(ut(Nr))};T1.displayName="ModalTitle";const nP=T1;var vo={Success:"success",Info:"info",Error:"error",Warning:"warning"},cU="PopupStatus",dU=$.span.attrs({className:we(cU,"root")}).withConfig({componentId:"sc-qash56-0"})(function(){return F(["display:flex;"])}),fU=It({PopupStatus:dU});const pU=fU;var hU=["status","notificationBackground"],gU=function(e,n){switch(e){case vo.Warning:return n?p.createElement($O,{color:hr[_.Warning],size:20}):p.createElement(tV,{color:hr[_.Warning],size:12});case vo.Error:return n?p.createElement(oV,{color:hr[_.Error],size:20}):p.createElement(lV,{color:hr[_.Error],size:12});case vo.Info:return n?p.createElement(y$,{color:hr[_.Info],size:20}):p.createElement(S$,{color:hr[_.Info],size:12});case vo.Success:default:return p.createElement(rV,{color:hr[_.Success],size:20})}},P4=ct(function(t,e){var n=t.status,r=t.notificationBackground,i=r===void 0?!0:r,o=se(t,hU);return p.createElement(pU.PopupStatus,J({status:n},o,{ref:e}),gU(n,i))}),rP={status:vo.Success};P4.defaultProps=rP;var iP={status:I.oneOf(ut(vo))};P4.propTypes=iP;const mU=P4;var Ks,vU=(Ks={},S(Ks,vo.Success,function(t){var e=t.theme.palette;return F(["background-color:",";"],e[_.BackgroundGreen])}),S(Ks,vo.Info,function(t){var e=t.theme.palette;return F(["background-color:",";"],e[_.BackgroundBlue])}),S(Ks,vo.Error,function(t){var e=t.theme.palette;return F(["background-color:",";"],e[_.BackgroundRed])}),S(Ks,vo.Warning,function(t){var e=t.theme.palette;return F(["background-color:",";"],e[_.BackgroundOrange])}),Ks),vf="PopupContent",yU=$.span.attrs({className:we(vf,"LabelWrapper")}).withConfig({componentId:"sc-njbmnt-0"})(function(t){var e=t.theme.palette;return F(["display:flex;flex-grow:1;margin-left:44px;margin-right:28px;padding:16px;padding-right:0;overflow:hidden;background:",";"],e[_.ButtonPrimaryText])}),wU=$.span.attrs({className:we(vf,"Label")}).withConfig({componentId:"sc-njbmnt-1"})(function(t){var e=t.theme,n=e.palette,r=e.typography.font;return F(["max-width:100%;overflow:hidden;text-overflow:ellipsis;color:",";",""],n[_.TextPrimary],r[Pe.TextSmallUp])}),CU=$.div.attrs({className:we(vf,"PopupContent")}).withConfig({componentId:"sc-njbmnt-2"})(function(t){var e=t.theme;return F(["position:relative;display:flex;align-items:center;width:360px;border-radius:4px;box-shadow:0px 2px 6px ",";"],e.palette[_.LargeShadow])}),SU=$.div.attrs({className:we(vf,"PopupContent")}).withConfig({componentId:"sc-njbmnt-3"})(function(t){var e=t.theme;return F(["position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;padding:2px;height:fit-content;cursor:pointer;background:",";border-radius:0 4px 4px 0;"],e.palette[_.BackgroundStateless])}),xU=$.div.attrs({className:we(vf,"PopupStatus")}).withConfig({componentId:"sc-njbmnt-4"})(function(t){var e=t.status,n=e===void 0?"success":e;return F(["position:absolute;display:flex;left:0;z-index:1;height:100%;min-width:44px;align-items:center;justify-content:center;box-sizing:border-box;border-radius:4px 0 0 4px;",""],vU[n])}),EU=It({PopupContent:CU,PopupStatus:xU,LabelWrapper:yU,CloseWrapper:SU,Label:wU});const ed=EU;var bU=["onClose","message","status"];function G9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _v(t){for(var e=1;e input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"],e[_.LinkActive])}),DU=$.div.attrs({className:we(us,"mark")}).withConfig({componentId:"sc-1xuruq0-5"})(["padding:4px;"]),BU=$.span.attrs({className:we(us,"mark-text")}).withConfig({componentId:"sc-1xuruq0-6"})(function(t){var e=t.theme.palette;return F(["position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:",";"],e[_.TextPrimary])}),HU=It({RotationSliderList:MU,RotationSliderBigDot:RU,RotationSliderSmallDotWrapper:zU,RotationSliderSmallDot:jU,RotationSliderControl:NU,RotationSliderMark:DU,RotationSliderMarkText:BU});const Pl=HU;var FU=["min","max","angle","onChange","onMouseDown","onMouseUp","step","labelTooltipOptions","annotation","hideMarkText","showCurrentMarkText","value","railProps","trackProps","thumbProps","labelTooltipProps","markStyles","markTextStyles"];function X9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fr(t){for(var e=1;eo?o:k *{color:",";}}",""],n?"none":"flex",e[_.BackgroundActive],e[_.AccentStateless],r&&F(["background-color:",";& > *{color:"," !important;}"],e[_.BackgroundActive],e[_.AccentStateless]))}),uX=$.div.attrs({className:we(ai,"text")}).withConfig({componentId:"sc-1riasfx-8"})(function(t){var e=t.theme,n=e.palette,r=e.typography.font,i=t.font,o=t.isCollapsed;return F(["flex:1 1 auto;color:",";",";transition:color 100ms ease-out;display:",";user-select:none;"],n[_.TextPrimary],r[i||Pe.LabelLarge],o&&"none")}),cX=$.div.attrs({className:we(ai,"icon")}).withConfig({componentId:"sc-1riasfx-9"})(function(t){var e=t.theme.palette,n=t.isCollapsed;return F(["display:flex;flex-shrink:0;color:",";margin-right:",";transition:color 100ms ease-out;"],e[_.IconsPrimary],n?"0px":"12px")}),lP=$.div.attrs({className:we(ai,"item-button")}).withConfig({componentId:"sc-1riasfx-10"})(function(t){var e=t.theme.palette,n=t.isCollapsed,r=t.selected;return F(["display:flex;justify-content:",";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:",";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;margin-bottom:8px;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],n?"center":"flex-start",n?"13px":"13px 16px",e[_.BackgroundActive],e[_.AccentStateless],r&&F(["background-color:",";& > *{color:",";}"],e[_.BackgroundActive],e[_.AccentStateless]))}),dX=$(lP).attrs({className:we(ai,"item-button")}).withConfig({componentId:"sc-1riasfx-11"})(function(t){var e=t.isCollapsed;return F(["",""],!e&&F(["padding:13px 24px;"]))}),fX=$(lO).attrs({className:we(ai,"accordion")}).withConfig({componentId:"sc-1riasfx-12"})(function(t){var e=t.theme,n=e.palette,r=e.typography.font,i=t.selected;return F(["","{padding:13px 16px;transition:background-color 100ms ease-out;","{",";color:",";}&:hover{background-color:",";& > *{color:",";}}","}","{padding:0px 16px;}"],Tu.Header,Tu.Label,r[Pe.LabelLargeEmphasis],n[_.TextPrimary],n[_.BackgroundActive],n[_.AccentStateless],i&&F(["","{color:",";}"],Tu.Label,n[_.AccentStateless]),aO.AccordionDetails)}),pX=It({TemporaryDrawer:tX,PersistentDrawer:nX,Drawer:rX,Header:iX,Body:oX,Footer:aX,List:lX,Item:sX,ItemButton:lP,Icon:cX,ItemText:uX,DrawerAccordion:fX,CollapsedButton:dX});const Wi=pX;var hX=z.createContext({isCollapsed:!1,size:20});const yf=hX;var gX=["children","font"],A4=ct(function(t,e){var n=t.children,r=t.font,i=se(t,gX),o=z.useContext(yf),a=o.isCollapsed;return p.createElement(Wi.ItemText,J({font:r,isCollapsed:a},i,{ref:e}),n)});A4.defaultProps={};A4.propTypes={font:I.oneOf(ut(Pe))};const mX=A4;var vX=["children","size"],M4=ct(function(t,e){var n=t.children,r=t.size,i=se(t,vX),o=z.useContext(yf),a=o.isCollapsed,u=o.size;return p.createElement(Wi.Icon,J({},i,{isCollapsed:a,ref:e}),n&&typeof n=="function"?n({size:u||r}):n)});M4.defaultProps={size:20};M4.propTypes={size:I.number,children:I.oneOfType([I.node,I.func]).isRequired};const yX=M4;var wu={Auto:"auto",Temporary:"temporary",Persistent:"persistent"},wX=["children","open","iconsSize","collapsed","top","hideBackdrop","disablePortal","collapseButtonLabel","persistentDrawerStyles","temproryDrawerStyles","variant","onClose","onCollapse","onCollapseClick"];function K9(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function K2(t){for(var e=1;e0}Ee.key==="Escape"&&W&&pe()};z.useEffect(function(){return document.addEventListener("keydown",Y),function(){return document.removeEventListener("keydown",Y)}},[]);var de=function(Ee){return p.createElement(Wi.Drawer,J({open:r,top:c},A,{isCollapsed:Ee?X:!1,ref:e}),n,Ee&&p.createElement(Wi.CollapsedButton,{onClick:te,isCollapsed:X},p.createElement(yX,null,X?function(W){return p.createElement(EV,J({},W,{size:o}))}:function(W){return p.createElement(CV,J({},W,{size:o}))}),p.createElement(mX,null,v)))},ce=function(){return!d&&r?p.createElement(eX,{onClick:k}):null},me=function(){return h?p.createElement(Wi.TemporaryDrawer,{ref:V,style:K2({},P),open:r},ce(),de(!1)):cf.createPortal(p.createElement(Wi.TemporaryDrawer,{ref:V,style:K2({},P),open:r},ce(),de(!1)),ve)},re=function(){return p.createElement(Wi.PersistentDrawer,{style:K2({},w)},de(!0))},ee=function(){switch(E){case wu.Auto:return j?me():re();case wu.Temporary:return me();case wu.Persistent:return re();default:return j?me():re()}};return p.createElement(yf.Provider,{value:{isCollapsed:j?!1:X,size:ne}},ee())}),CX={open:!1,hideBackdrop:!1,iconsSize:20,variant:wu.Auto};R4.defaultProps=CX;var SX={onClose:I.func.isRequired,onCollapse:I.func,onCollapseClick:I.func,children:I.node.isRequired,top:I.number,iconsSize:I.number,open:I.bool,hideBackdrop:I.bool,collapsed:I.bool,disablePortal:I.bool,collapseButtonLabel:I.string,persistentDrawerStyles:I.object,temproryDrawerStyles:I.object,variant:I.oneOf(ut(wu))};R4.propTypes=SX;const xX=R4;var EX=["children"],z4=ct(function(t,e){var n=t.children,r=se(t,EX),i=z.useContext(yf),o=i.isCollapsed;return p.createElement(Wi.Header,J({},r,{isCollapsed:o,ref:e}),n)});z4.defaultProps={};z4.propTypes={};const bX=z4;var OX=["children"],j4=ct(function(t,e){var n=t.children,r=se(t,OX);return p.createElement(Wi.Body,J({},r,{ref:e}),n)});j4.defaultProps={};j4.propTypes={};const PX=j4;var kX=["children"],N4=ct(function(t,e){var n=t.children,r=se(t,kX);return p.createElement(Wi.List,J({},r,{ref:e}),n)});N4.defaultProps={};N4.propTypes={};const _X=N4;var TX=["children","selected"],D4=ct(function(t,e){var n=t.children,r=t.selected,i=se(t,TX),o=z.useContext(yf),a=o.isCollapsed;return p.createElement(Wi.Item,J({selected:r,isCollapsed:a},i,{ref:e}),n)});D4.defaultProps={selected:!1};D4.propTypes={selected:I.bool};const IX=D4;var LX=$.div.withConfig({componentId:"sc-1rfxjvn-0"})(["display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}",""],function(t){var e=t.isPhoneScreen;return e&&"\n flex-direction: column;\n\n .SfxSlider-root {\n min-width: 230px;\n }\n "}),Nl=$.div.withConfig({componentId:"sc-1rfxjvn-1"})(["display:flex;flex-direction:column;"]),Dl=$(Qt).withConfig({componentId:"sc-1rfxjvn-2"})(["",";"],function(t){var e=t.theme;return e.typography.font[Pe.LabelExtraSmallUp]}),Bl=$.div.withConfig({componentId:"sc-1rfxjvn-3"})(["display:flex;align-items:center;"]),Hl=$(Qd).withConfig({componentId:"sc-1rfxjvn-4"})(["display:inline-block;width:40px;height:28px;padding:6px 2px;margin-left:10px;border:none;.SfxInput-Base{text-align:center;}"]),q9=-1,q2={brightness:0},Q9=1,AX={width:150,padding:0,margin:0},MX=function(t){var e,n,r=t.t,i=ff(fn.Filters.Brighten,q2),o=Le(i,2),a=o[0],u=o[1],c=function(d){u({brightness:_n(d,q9,Q9)})};return p.createElement(Nl,{className:"FIE_brightness-option-wrapper"},p.createElement(Dl,{className:"FIE_brightness-option-label"},r("brightness")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_brightness-option",min:q9,step:.05,max:Q9,width:"124px",value:(e=a.brightness)!==null&&e!==void 0?e:q2.brightness,onChange:c,style:AX}),p.createElement(Hl,{value:(n=a.brightness)!==null&&n!==void 0?n:q2.brightness,onChange:function(h){var m=h.target.value;return c(m)}})))},P0=function(t,e){return Math.min(t.width/e.width,t.height/e.height)||Qo},J9=[{titleKey:"custom",ratio:jb,icon:P$,hide:function(){var e=0C.width||A.height>C.height?P0(C,A):Qo}})),n()};return p.createElement(p.Fragment,null,p.createElement(RX,null,p.createElement(X5,{className:"FIE_crop-tool-label FIE_selected-crop-preset-label",isPhoneScreen:b},o(m||"cropTool")),p.createElement(zX,{className:"FIE_crop-presets-opener-button",color:"link-secondary",size:"lg"},e?p.createElement(vV,{size:10}):p.createElement(gV,{size:10}))),p.createElement(ls,{className:"FIE_crop-presets-menu",anchorEl:e,enableOverlay:!0,onClose:n,open:!!e,position:"top",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,4]}}]},maxHeight:"100%"},p.createElement(NX,null,E.map(function(L){var A=L.titleKey,M=L.descriptionKey,j=L.ratio,D=L.width,B=L.height,X=L.groups,G=L.icon,V=L.disableManualResize,ne=L.noEffect;return X?p.createElement(cP,{key:A,titleKey:A,groups:X,Icon:G,theme:x,onItemSelect:k,t:o,disableManualResize:V}):p.createElement(B4,{key:j,ratio:j!=null?j:Zt(D/B),titleKey:A,t:o,description:o(M),Icon:G,isActive:(h||qd)===(j!=null?j:Zt(D/B))&&!v,theme:x,width:D,height:B,onClick:k,disableManualResize:V,noEffect:ne})}))))};dP.defaultProps={anchorEl:null};var fP=function(t){var e=t.selectTool,n=t.isSelected,r=Qe(),i=r.config,o=r.t,a=z.useState(),u=Le(a,2),c=u[0],d=u[1];return p.createElement(Dn,{className:"FIE_crop-tool",id:Q.CROP,Icon:VF,onClick:function(m,v){e(m),d(v.currentTarget)},isSelected:n},i[Q.CROP].noPresets?p.createElement(X5,{className:"FIE_crop-tool-label"},o("cropTool")):p.createElement(dP,{anchorEl:c,onClose:function(){d(null)}}))};fP.defaultProps={isSelected:!1};var FX={transform:"scaleX(-1)"},pP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t,i=Qe(),o=i.dispatch,a=i.adjustments.isFlippedX,u=Ki(320),c=z.useMemo(function(){return{reverseLabelOfCurrXFlipDir:r(a?"unFlipX":"flipX"),reverseIconOfCurrXFlipDir:function(){return p.createElement(I$,{size:u?20:16,style:a?FX:void 0})}}},[a]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,m=z.useCallback(function(){o({type:G4,payload:{direction:K3.X}})},[]),v=z.useCallback(function(C){e(C),m()},[]);return p.createElement(Dn,{className:"FIE_flip-x-tool-button",id:Q.FLIP_X,label:d,Icon:h,onClick:v,isSelected:n})};pP.defaultProps={isSelected:!1};var $X={transform:"scaleY(-1)"},hP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t,i=Qe(),o=i.dispatch,a=i.adjustments.isFlippedY,u=Ki(320),c=z.useMemo(function(){return{reverseLabelOfCurrXFlipDir:r(a?"unFlipY":"flipY"),reverseIconOfCurrXFlipDir:function(){return p.createElement(_$,{size:u?20:16,style:a?$X:void 0})}}},[a]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,m=z.useCallback(function(){o({type:G4,payload:{direction:K3.Y}})},[]),v=z.useCallback(function(C){e(C),m()},[]);return p.createElement(Dn,{className:"FIE_flip-y-tool-button",id:Q.FLIP_Y,label:d,Icon:h,onClick:v,isSelected:n})};hP.defaultProps={isSelected:!1};var gP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_rotate-tool-button",id:Q.ROTATE,label:r("rotateTool"),Icon:FO,onClick:e,isSelected:n})};gP.defaultProps={isSelected:!1};var WX=$.div.withConfig({componentId:"sc-wbx58r-0"})(["display:flex;align-items:center;gap:16px;"]),VX=$($U).withConfig({componentId:"sc-wbx58r-1"})([".SfxRotationSlider-control{width:1px;height:10px;background-color:",";&:before{box-shadow:unset;}}.SfxRotationSlider-mark,.SfxRotationSlider-small-dot-wrapper{padding:0;.SfxRotationSlider-mark-text{top:10px;}.SfxRotationSlider-big-dot{width:4px;height:4px;}.SfxRotationSlider-small-dot{width:1px;height:1px;}}.SfxRotationSlider-list{gap:4px;}"],function(t){var e=t.theme.palette;return e[_.IconsSecondary]}),GX=$(Ua).withConfig({componentId:"sc-wbx58r-2"})([""]),UX=function(){var t=Qe(),e=t.dispatch,n=t.adjustments.rotation,r=n===void 0?0:n,i=t.resize,o=i===void 0?{}:i,a=t.config,u=a[Q.ROTATE],c=Ki(),d=Kb(function(h,m){var v=_n(m,-180,180);if(e({type:BP,payload:{rotation:v}}),o.width&&o.height){var C=Ga(o.width,o.height,v);e({type:Au,payload:{width:C.width,height:C.height}})}},20);return u.componentType==="buttons"?p.createElement(p.Fragment,null,p.createElement(Dn,{className:"FIE_rotate_button_left",id:Q.IMAGE,label:"-".concat(u.angle,"°"),Icon:o$,onClick:function(m){var v=r-u.angle;d(m,v)}}),p.createElement(Dn,{className:"FIE_rotate_button_right",id:Q.IMAGE,label:"+".concat(u.angle,"°"),Icon:s$,onClick:function(m){var v=r+u.angle;d(m,v)}})):p.createElement(WX,null,p.createElement(VX,{className:"FIE_rotate-slider",showCurrentMarkText:!0,min:-180,max:180,step:c?u.angle/3:1,value:r,angle:u.angle||90,onChange:d}),p.createElement(GX,{size:"sm",color:"basic",onClick:function(m){return d(m,r+90)}},p.createElement(kV,{width:15})))},mP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_contrast-tool-button",id:Q.CONTRAST,label:r("contrastTool"),Icon:MW,onClick:e,isSelected:n})};mP.defaultProps={isSelected:!1};var iw=-100,Q2={contrast:0},ow=100,XX={width:150,padding:0,margin:0},ZX=function(t){var e,n,r=t.t,i=ff(fn.Filters.Contrast,Q2),o=Le(i,2),a=o[0],u=o[1],c=function(d){u({contrast:_n(d,iw,ow)})};return p.createElement(Nl,{className:"FIE_contrast-option-wrapper"},p.createElement(Dl,{className:"FIE_contrast-option-label"},r("contrastTool")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_contrast-option",min:iw,max:ow,width:"124px",value:(e=a.contrast)!==null&&e!==void 0?e:Q2.contrast,onChange:c,style:XX}),p.createElement(Hl,{value:(n=a.contrast)!==null&&n!==void 0?n:Q2.contrast,onChange:function(h){var m=h.target.value;return c(m)}})))},vP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_hsv-tool-button",id:Q.HSV,label:r("hsvTool"),Icon:NW,onClick:e,isSelected:n})};vP.defaultProps={isSelected:!1};var kl={hue:0,saturation:0,value:0},aw={hue:259,saturation:10,value:2},J2={padding:0,margin:0},YX=Ki(),KX=function(t){var e,n,r,i,o,a,u=t.t,c=ff(fn.Filters.HSV,kl),d=Le(c,2),h=d[0],m=d[1],v=function(C,w){m(S({},C,w>aw[C]?aw[C]:+w))};return p.createElement(LX,{isPhoneScreen:YX},p.createElement(Nl,{className:"FIE_hue-option-wrapper"},p.createElement(Dl,{className:"FIE_hue-option-label"},u("hue")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_hue-option",min:0,step:1,max:259,value:(e=h.hue)!==null&&e!==void 0?e:kl.hue,onChange:function(w){return v("hue",w)},style:J2}),p.createElement(Hl,{value:(n=h.hue)!==null&&n!==void 0?n:kl.hue,onChange:function(w){var x=w.target.value;return v("hue",x)}}))),p.createElement(Nl,{className:"FIE_saturation-option-wrapper"},p.createElement(Dl,{className:"FIE_saturation-option-label"},u("saturation")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_saturation-option",min:-2,step:.5,max:10,value:(r=h.saturation)!==null&&r!==void 0?r:kl.saturation,onChange:function(w){return v("saturation",w)},style:J2}),p.createElement(Hl,{value:(i=h.saturation)!==null&&i!==void 0?i:kl.saturation,onChange:function(w){var x=w.target.value;return v("saturation",x)}}))),p.createElement(Nl,{className:"FIE_value-option-wrapper"},p.createElement(Dl,{className:"FIE_value-option-label"},u("value")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_value-option",min:-2,step:.1,max:2,value:(o=h.value)!==null&&o!==void 0?o:kl.value,onChange:function(w){return v("value",w)},style:J2}),p.createElement(Hl,{value:(a=h.value)!==null&&a!==void 0?a:kl.value,onChange:function(w){var x=w.target.value;return v("value",x)}}))))},yP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_blur-tool-button",id:Q.BLUR,label:r("blurTool"),Icon:FW,onClick:e,isSelected:n})};yP.defaultProps={isSelected:!1};var lw=0,em={blurRadius:0},sw=100,qX={width:150,padding:0,margin:0},QX=function(t){var e,n,r=t.t,i=ff(fn.Filters.Blur,em),o=Le(i,2),a=o[0],u=o[1],c=function(d){u({blurRadius:_n(d,lw,sw)})};return p.createElement(Nl,{className:"FIE_blur-option-wrapper"},p.createElement(Dl,{className:"FIE_blur-option-label"},r("blur")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_blur-option",min:lw,max:sw,width:"124px",value:(e=a.blurRadius)!==null&&e!==void 0?e:em.blurRadius,onChange:c,style:qX}),p.createElement(Hl,{value:(n=a.blurRadius)!==null&&n!==void 0?n:em.blurRadius,onChange:function(h){var m=h.target.value;return c(m)}})))},wP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_warmth-tool-button",id:Q.WARMTH,label:r("warmthTool"),Icon:LW,onClick:e,isSelected:n})};wP.defaultProps={isSelected:!1};var uw=0,tm={warmth:0},cw=200,JX={width:150,padding:0,margin:0},eZ=function(t){var e,n,r=t.t,i=ff(N5,tm),o=Le(i,2),a=o[0],u=o[1],c=function(d){u({warmth:_n(d,uw,cw)})};return p.createElement(Nl,{className:"FIE_warmth-option-wrapper"},p.createElement(Dl,{className:"FIE_warmth-option-label"},r("warmthTool")),p.createElement(Bl,null,p.createElement(Nn,{className:"FIE_warmth-option",min:uw,max:cw,width:"124px",value:(e=a.warmth)!==null&&e!==void 0?e:tm.warmth,onChange:c,style:JX}),p.createElement(Hl,{value:(n=a.warmth)!==null&&n!==void 0?n:tm.warmth,onChange:function(h){var m=h.target.value;return c(m)}})))},tZ=$.div.withConfig({componentId:"sc-1nr0bka-0"})(["max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;"]),nZ=$.ul.withConfig({componentId:"sc-1nr0bka-1"})(["padding:0;margin:0;white-space:nowrap;overflow:hidden;"]),rZ=$.li.withConfig({componentId:"sc-1nr0bka-2"})(["padding:4px;display:inline-block;list-style-type:none;user-select:none;"]),CP=F(["position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:",";}"],function(t){var e=t.theme.palette;return e[_.IconsSecondary]}),iZ=$.div.withConfig({componentId:"sc-1nr0bka-3"})([""," left:0;justify-content:flex-start;background:linear-gradient( 90deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],CP),oZ=$.div.withConfig({componentId:"sc-1nr0bka-4"})([""," right:0;justify-content:flex-end;background:linear-gradient( 270deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],CP),I1=function(t){var e=t.children,n=t.style,r=t.className,i=z.useRef(!1),o=z.useRef(),a=W5(),u=Le(a,1),c=u[0],d=z.useState(!1),h=Le(d,2),m=h[0],v=h[1],C=z.useState(!1),w=Le(C,2),x=w[0],P=w[1],b=z.Children.toArray(e),E=function(){if(o.current){var M=o.current,j=M.scrollWidth,D=M.offsetWidth,B=M.scrollLeft,X=Math.round(j-D),G=Math.round(X-B);v(0d,m=h?ah:lh*d,v=h?ah/d:lh;return p.createElement(aZ,{className:"FIE_filters-item",onClick:u,"aria-selected":i},p.createElement(lZ,{className:"FIE_filters-item-preview",width:ah,height:lh},p.createElement(Y3,{onTap:u},p.createElement(v1,{image:o,filters:n?[n]:[],width:m,height:v,x:-(m-ah)/2,y:-(v-lh)/2,ref:a}))),p.createElement(sZ,{className:"FIE_filters-item-label"},e))};SP.defaultProps={filterFn:void 0};const uZ=z.memo(SP);var sh=fn.Filters,cZ=[{label:"Original",filterFn:null},{label:"Invert",filterFn:sh.Invert},{label:"Black & White",filterFn:q3},{label:"Sepia",filterFn:sh.Sepia},{label:"Solarize",filterFn:sh.Solarize},{label:"Clarendon",filterFn:Q3},{label:"Gingham",filterFn:J3},{label:"Moon",filterFn:e5},{label:"Lark",filterFn:t5},{label:"Reyes",filterFn:n5},{label:"Juno",filterFn:r5},{label:"Slumber",filterFn:i5},{label:"Crema",filterFn:o5},{label:"Ludwig",filterFn:a5},{label:"Aden",filterFn:l5},{label:"Perpetua",filterFn:s5},{label:"Amaro",filterFn:u5},{label:"Mayfair",filterFn:c5},{label:"Rise",filterFn:d5},{label:"Hudson",filterFn:f5},{label:"Valencia",filterFn:p5},{label:"X-Pro II",filterFn:h5},{label:"Sierra",filterFn:g5},{label:"Willow",filterFn:m5},{label:"Lo-Fi",filterFn:v5},{label:"Inkwell",filterFn:sh.Grayscale},{label:"Hefe",filterFn:y5},{label:"Nashville",filterFn:w5},{label:"Stinson",filterFn:C5},{label:"Vesper",filterFn:S5},{label:"Earlybird",filterFn:x5},{label:"Brannan",filterFn:E5},{label:"Sutro",filterFn:b5},{label:"Toaster",filterFn:O5},{label:"Walden",filterFn:P5},{label:"1977",filterFn:k5},{label:"Kelvin",filterFn:_5},{label:"Maven",filterFn:T5},{label:"Ginza",filterFn:I5},{label:"Skyline",filterFn:L5},{label:"Dogpatch",filterFn:A5},{label:"Brooklyn",filterFn:M5},{label:"Helena",filterFn:R5},{label:"Ashby",filterFn:z5},{label:"Charmes",filterFn:j5}],dZ={maxWidth:"100%",width:"100%"},fZ=function(){var t=Qe(),e=t.originalImage,n=cN(),r=Le(n,2),i=r[0],o=r[1];return p.createElement(I1,{className:"FIE_filters",style:dZ},cZ.map(function(a){return p.createElement(uZ,{key:a.label,filterLabel:a.label,filterFn:a.filterFn,applyFilter:o,isActive:i===a.filterFn,image:e})}))},xP=function(t){var e=t.selectTool,n=t.isSelected,r=t.t;return p.createElement(Dn,{className:"FIE_text-tool-button",id:Q.TEXT,label:r("textTool"),Icon:BO,onClick:e,isSelected:n})};xP.defaultProps={isSelected:!1};var pZ=$.div.withConfig({componentId:"sc-qvjmv1-0"})(["display:flex;align-items:center;justify-content:center;padding:8px 16px;margin-top:4px;gap:8px;flex-wrap:wrap;"," svg{color:",";}"],function(t){var e=t.isPhoneScreen;return e&&"\n max-width: 315px;\n padding: 0;\n "},function(t){var e=t.theme.palette;return e[_.IconsPrimary]}),hZ=$.div.withConfig({componentId:"sc-qvjmv1-1"})(["display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}"]),k0=$.div.withConfig({componentId:"sc-qvjmv1-2"})(["background:",";border-radius:4px;display:flex;flex-direction:column;padding:8px 12px;overflow:visible;"," "," *{font-family:'Roboto',sans-serif;}"],function(t){var e=t.theme;return e.palette["bg-secondary"]},function(t){var e=t.position;return e&&"\n display: grid;\n grid-template-columns: repeat(4, auto);\n padding: 0;\n margin-top: 8px;\n box-shadow: 0px 1px 2px ".concat(function(n){var r=n.theme;return r.palette["light-shadow"]},";\n ")},function(t){var e=t.disablePadding;return e&&"\n padding: 0;\n "}),ol=$.div.withConfig({componentId:"sc-qvjmv1-3"})(["display:flex;align-items:center;gap:8px;",""],function(t){var e=t.preventFlex;return e&&"\n display: block;\n \n label {\n margin-bottom: 8px;\n }\n "}),dw=$.div.withConfig({componentId:"sc-qvjmv1-4"})(["display:flex;align-items:center;justify-content:space-between;"]),uh=$.div.withConfig({componentId:"sc-qvjmv1-5"})(["&:not(:first-child){margin-left:12px;}"]),Fa=$.div.withConfig({componentId:"sc-qvjmv1-6"})(function(t){var e=t.theme,n=t.addThinBorder,r=t.secondaryIconColor,i=t.active,o=t.watermarkTool;return"\n cursor: pointer;\n padding: ".concat(o?"6px":"8px 12px",";\n border-radius: 2px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n\n svg {\n vertical-align: middle;\n margin: 0 auto;\n }\n\n ").concat(n?"border: 0.5px solid ".concat(e.palette["borders-secondary"],";\n padding: 8px 8px;"):"",";\n color: ").concat(r?e.palette[_.IconsSecondary]:"",";\n\n ").concat(i&&"\n border-radius: 4px;\n border-color: ".concat(e.palette[_.AccentStateless],";\n background-color: ").concat(e.palette[_.BackgroundActive],";\n\n * {\n color: ").concat(e.palette[_.AccentStateless],";\n }\n "),"\n\n :hover {\n background: ").concat(e.palette["bg-primary-active"],";\n }\n ")}),EP=$(Qt).withConfig({componentId:"sc-qvjmv1-7"})(["color:",";"],function(t){var e=t.theme.palette;return e[_.TextPrimary]}),gZ=0,mZ=1,vZ=function(t){var e=t.annotation,n=t.updateAnnotation,r=t.t,i=e.opacity,o=Math.round(100*i);return p.createElement(k0,{disablePadding:!0},p.createElement(Qt,null,r("transparency")),p.createElement(ol,null,p.createElement(Nn,{annotation:"%",onChange:function(u){n({opacity:_n(u/100,gZ,mZ)})},value:o,noMargin:!0}),p.createElement(EP,null,"".concat(o,"%"))))},yZ=$(JO).withConfig({componentId:"sc-7tf41j-0"})(["max-width:350px;"]),wZ=$.div.withConfig({componentId:"sc-7tf41j-1"})([".SfxColorPicker-root{max-width:100%;padding:0;box-shadow:none;border:none;","}.SfxColorPicker-action{display:flex;gap:12px;.SfxColorPicker-select{width:100px;}.SfxInput-root{width:190px !important;}}.SfxColorPicker-icon{color:",";}.SfxColorPicker-range-picker,.SfxColorPicker-bar-wrapper{width:100%;}"],function(t){var e=t.hideModalTitle;return e&&"padding-top: 12px;"},function(t){var e=t.theme.palette;return e[_.IconsPrimary]}),CZ=$(eP).withConfig({componentId:"sc-7tf41j-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),nm={ColorPickerModal:yZ,ColorPickerWrap:wZ,ModalActions:CZ},SZ={zIndex:1301},bP=function(t){var e=t.hideModalTitle,n=t.defaultColor,r=n===void 0?"":n,i=t.onChange,o=t.open,a=t.pinnedColors,u=t.onClose,c=Qe(),d=c.t;return o?p.createElement(nm.ColorPickerModal,{onClose:u,open:o,fullWidth:!0,modalStyles:SZ},!e&&p.createElement(nP,{onClose:u,primary:d("colorPickerModalTitleLabel","Pick color"),icon:p.createElement(fV,{size:29}),iconShadow:!0,variant:"with-icon"}),p.createElement(tP,null,p.createElement(nm.ColorPickerWrap,{hideModalTitle:e},p.createElement(uG,{onChange:i,pinnedColors:a,defaultColor:r,showTransparentColor:!0}))),p.createElement(nm.ModalActions,null,p.createElement(ea,{color:"basic",onClick:u},d("cancel")),p.createElement(ea,{color:"primary",onClick:u},d("apply")))):null};bP.defaultProps={defaultColor:"",pinnedColors:[],onChange:function(){},open:!1,hideModalTitle:!1,onClose:function(){}};var xZ=$.div.attrs(function(t){var e=t.$color;return{style:{background:e==="rgba(0,0,0,0)"?"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px":e}}}).withConfig({componentId:"sc-zmv0gj-0"})(["background:",";border-radius:4px;width:32px;height:32px;border:1px solid ",";cursor:pointer;box-sizing:border-box;"],function(t){var e=t.theme;return e.palette["icons-primary"]},function(t){var e=t.theme;return e.palette[_.BorderPrimaryStateless]}),rm="FIE_pinnedColors",L1=function(t){var e,n=t.onChange,r=t.color,i=t.colorFor,o=Qe(),a=o.selectionsIds,u=a===void 0?[]:a,c=o.config.annotationsCommon,d=c===void 0?{}:c,h=o.dispatch,m=o.latestColors,v=m===void 0?{}:m,C=v[i],w=z.useState(),x=Le(w,2),P=x[0],b=x[1],E=z.useState(function(){return C||r||d.fill}),k=Le(E,2),T=k[0],L=k[1],A=z.useState((e=window)!==null&&e!==void 0&&e.localStorage?JSON.parse(localStorage.getItem(rm)||"[]"):[]),M=Le(A,2),j=M[0],D=M[1],B=function(G){var V;if((V=window)!==null&&V!==void 0&&V.localStorage){var ne=window.localStorage.getItem(rm);if(JSON.stringify(G)!==ne){var ve=G.slice(-9);window.localStorage.setItem(rm,JSON.stringify(ve)),D(ve)}}},X=function(G){b(P?null:G.currentTarget)};return z.useEffect(function(){var G=u.length===0&&C||r;L(G),n(G)},[r,u]),p.createElement(p.Fragment,null,p.createElement(xZ,{className:"FIE_color-picker-triggerer",onClick:X,$color:T,onChange:n}),p.createElement(bP,{hideModalTitle:!0,onChange:function(V,ne,ve){L(ne),n(ne),B(ve),C!==ne&&h({type:UP,payload:{latestColors:S({},i,ne)}})},defaultColor:T,pinnedColors:j,open:!!P,onClose:X}))};L1.defaultProps={color:void 0};var EZ=0,bZ=100,OZ=function(t){var e=t.annotation,n=t.updateAnnotation,r=e.stroke,i=e.strokeWidth;return p.createElement(ol,null,p.createElement(Nn,{annotation:"px",onChange:function(a){n({strokeWidth:_n(a,EZ,bZ)})},value:i,noMargin:!0}),p.createElement(L1,{color:r,onChange:function(a){n({stroke:a})},colorFor:"stroke"}))},PZ=function(t){var e=t.annotation,n=t.updateAnnotation,r=t.t,i=e.shadowOffsetX,o=e.shadowOffsetY,a=e.shadowBlur,u=e.shadowColor,c=e.shadowOpacity,d=function(h,m){var v=2parseFloat(X))){var G=Math.min(10*c.width,10*c.height),V=Ga(c.width,c.height,w),ne=S({},B,X&&_n(X,0,G)),ve=B==="height",te=ve?"width":"height",pe=(j=n.ratioUnlocked)!==null&&j!==void 0?j:d.ratioUnlocked;if(!pe){var Y=V.width/V.height;ne[te]=Math.round(ve?ne[B]*Y:ne[B]/Y)}if(ne[B]!==d[B]||ne[te]!==d[te]){if(typeof e=="function")return void e(ne);u({type:Au,payload:ne});var de=v.width&&v.height&&v||h,ce=Pw(Pw({},d),ne);u({type:Qu,payload:{factor:ce.width&&ce.height?P0(de,ce):Qo,isAbsoluteZoom:!0}})}}},E=typeof d.width>"u"&&typeof d.height>"u"||c.width===d.width&&c.height===d.height,k=zP((n.width||n.height)&&n||d,v,h,c,w),T=d.manualChangeDisabled,L=typeof d.width<"u"&&!d.width,A=typeof d.height<"u"&&!d.height;return p.createElement(dY,{className:"FIE_resize-tool-options",alignment:i,disableWrap:o},p.createElement(bw,{className:"FIE_resize-width-option",value:L?"":k.width,name:"width",onChange:T?void 0:b,inputMode:"numeric",title:P("resizeWidthTitle"),label:P("width"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Width",disableWrap:o,disabled:T}),p.createElement(fY,{className:"FIE_resize-ratio-locker",title:P("toggleRatioLockTitle"),onClick:T?void 0:function(){return typeof e=="function"?void e({ratioUnlocked:!n.ratioUnlocked}):void u({type:Au,payload:{ratioUnlocked:!d.ratioUnlocked}})},color:"basic",size:"sm",disabled:T},n.ratioUnlocked||d.ratioUnlocked?p.createElement(h$,{size:16,color:x.palette.success}):p.createElement(d$,{size:16,color:x.palette.error})),p.createElement(bw,{className:"FIE_resize-height-option",value:A?"":k.height,name:"height",onChange:T?void 0:b,inputMode:"numeric",title:P("resizeHeightTitle"),label:P("height"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Height",disableWrap:o,disabled:T}),!r&&p.createElement(pY,{className:"FIE_resize-reset-button",size:"sm",color:"basic",onClick:E||T?void 0:function(){u({type:Au,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var j=v.width&&v.height&&v||h;u({type:Qu,payload:{factor:P0(j,j)}})},disabled:E||T},p.createElement(DO,null)))};$4.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:"center",disableWrap:!1};var hY=$.div.withConfig({componentId:"sc-fvaj5j-0"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;",";"],function(t){var e=t.noWrap;return e?"flex-wrap: nowrap;":""}),kw=$.div.withConfig({componentId:"sc-fvaj5j-1"})(["margin-bottom:8px;"]),gY=$.div.withConfig({componentId:"sc-fvaj5j-2"})(function(t){var e=t.theme;return"\n padding: 6px 4px;\n border: 1px solid ".concat(e.palette["borders-secondary"],";\n width: fit-content;\n height: 32px;\n border-radius: 2px;\n overflow: hidden;\n cursor: pointer;\n border-radius: 4px;\n\n :hover {\n background: ").concat(e.palette["bg-primary-active"],";\n }\n\n &[aria-selected='true'] {\n background: ").concat(e.palette["bg-primary-active"],";\n border-color: ").concat(e.palette["accent-primary-active"],";\n }\n\n img {\n max-width: 100%;\n max-height: 100%;\n }\n ")}),jP=function(t){var e=t.addImgWatermark,n=t.loadAndSetWatermarkImg,r=t.style,i=Qe(),o=i.config,a=i.annotations,u=i.dispatch,c=i.t,d=z.useMemo(function(){var w;return(w=(a[Va]||{}).image)===null||w===void 0?void 0:w.src},[a[Va]]),h=function(w){var x=w.currentTarget.children[0];if(x.complete){if(!x.naturalWidth)return void u({type:el,payload:{feedback:{message:c("mutualizedFailedToLoadImg"),duration:2e3}}});e(x)}},m=o[Q.WATERMARK]||{},v=m.gallery,C=v===void 0?[]:v;return C.length===0?null:p.createElement(I1,{className:"FIE_watermark-gallery",style:r},C.map(function(w){var x=(w==null?void 0:w.url)||w,P=(w==null?void 0:w.previewUrl)||x;return p.createElement(gY,{className:"FIE_watermark-selected-item",onClick:function(E){return x===P?h(E):n(x)},key:x,"aria-selected":x===d},p.createElement("img",{src:P,alt:"Failed to load.",crossOrigin:"Anonymous",draggable:!1}))}))};jP.defaultProps={style:void 0};var mY=function(t){var e=t.watermark,n=t.saveWatermark,r=t.t,i=z.useState(null),o=Le(i,2),a=o[0],u=o[1],c=e.padding||0;return p.createElement(p.Fragment,null,p.createElement(Fa,{className:"FIE_watermark-padding-triggerer",title:r("padding"),onClick:function(h){u(h.currentTarget)},active:a},p.createElement(nW,{size:20})),p.createElement(ls,{className:"FIE_watermark-padding-popup",anchorEl:a,open:!!a,onClose:function(){u(null)},position:"top"},p.createElement(k0,null,p.createElement(Qt,null,r("padding")),p.createElement(ol,null,p.createElement(Nn,{annotation:"px",onChange:function(h){n({padding:_n(h,0,100)})},value:c,noMargin:!0}),p.createElement(EP,null,"".concat(c,"px"))))))};function _w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fo(t){for(var e,n=1;nb){var te=E*A/V.height;ve.height=V.height*te,ve.width=ve.height*ne}else{var pe=b*A/V.width;ve.width=V.width*pe,ve.height=ve.width/ne}var Y=fo(fo(fo(fo({},i.annotationsCommon),i[Q.IMAGE]),ve),{},{padding:1,image:V,x:k+b/2-ve.width/2,y:T+E/2-ve.height/2,id:qs,name:Q.IMAGE,replaceCurrent:!0});o({type:Fl,payload:Y})},j=function(V){o({type:Fl,payload:fo(fo({},typeof V=="function"?V(P):V),{},{id:qs})})},D=function(V){o({type:el,payload:{feedback:{message:V,status:Gu.WARNING}}})},B=function(V,ne){if(V){C(!0);var ve=new Image;ve.onload=function(){M(ve),ne&&URL.revokeObjectURL(V),C(!1)},ve.onerror=function(){D(a("mutualizedFailedToLoadImg")),ne&&URL.revokeObjectURL(V),C(!1)},ve.src=V}};z.useEffect(function(){P&&(o({type:V4}),o({type:qu,payload:{annotationId:"watermark"}}))},[P]),z.useEffect(function(){P&&(r.length===0||r[0].id!==qs)&&o({type:qu,payload:{annotationId:"watermark"}})},[r]);var X=[(!i.useCloudimage||typeof x.onUploadWatermarkImgClick=="function")&&{key:"upload-watermark",label:a("uploadWatermark"),icon:vW,onClick:function(){if(typeof x.onUploadWatermarkImgClick=="function"){var ne=x.onUploadWatermarkImgClick(B);return void(ne instanceof Promise&&ne.then(function(){var ve=0e.factor,o={x:(t.x-e.x||0)/e.factor,y:(t.y-e.y||0)/e.factor},a={x:t.x-o.x*t.factor,y:t.y-o.y*t.factor};if(i&&e.factor===1||(a.x=Math.min(0,Math.max(a.x,n*(1-e.factor))),a.y=Math.min(0,Math.max(a.y,r*(1-e.factor)))),1>t.factor){var u=n-n*t.factor,c=r-r*t.factor;a.x+=u/2,a.y+=c/2}return Yw(Yw({},a),{},{factor:t.factor})},AY=["preparedDimensions"];function Kw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eu(t){for(var e,n=1;no.x+o.width&&(a.width=o.x+o.width-a.x),a.y+a.height>o.y+o.height&&(a.height=o.y+o.height-a.y),typeof r=="number"&&!gK(a.width/a.height,r)){var u=a.height*r,c=a.width/r;Zt(a.y+c)<=o.y+o.height?a.height=c:a.width=u}if((i.minWidth&&a.width<=i.minWidth||i.maxWidth&&a.width>=i.maxWidth)&&(a.width=_n(a.width,i.minWidth,i.maxWidth),a.x=t.x,a.y=t.y,typeof r=="number"&&(a.height=a.width/r)),(i.minHeight&&e.height<=i.minHeight||i.maxHeight&&e.height>=i.maxHeight)&&(a.height=_n(a.height,i.minHeight,i.maxHeight),a.x=t.x,a.y=t.y,typeof r=="number"&&(a.width=a.height*r)),typeof i.lockCropAreaAt=="string"){var d=yK(i.lockCropAreaAt,o,a),h=d.x,m=d.y;a.x=h,a.y=m}return a};function AC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Yr(t){for(var e,n=1;n=C.width&&d.height>=C.height;C.width&&C.height&&(aeo.scaledBy?o.scaledBy:1,pe=Yr(Yr({},o),{},{width:o.width/te,height:o.height/te});V=sm(pe,Yr(Yr({},pe),{},{x:0,y:0}),Yr(Yr({},pe),{},{abstractX:0,abstractY:0}),!(j||D)&&B(),L)}else V=d;var Y=V,de=Y.x,ce=de===void 0?0:de,me=Y.y,re=me===void 0?0:me,ee=Y.width,ue=Y.height,Ee={x:h?o.width-ce-ee:ce,y:m?o.height-re-ue:re,ref:P,fill:"#FFFFFF",scaleX:1,scaleY:1,globalCompositeOperation:"destination-out",onDragEnd:A?void 0:ve,onDragMove:A?void 0:function(Se){var ae=Se.target;ae.setAttrs(vK(ae.attrs,k.current))},onTransformEnd:A?void 0:ve,draggable:!A};return p.createElement(p.Fragment,null,p.createElement(v1,{image:i,x:h?o.width:0,y:m?o.height:0,width:o.width,height:o.height,filters:[fn.Filters.Blur,fn.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:h?-1:1,scaleY:m?-1:1,ref:E}),D?p.createElement(Tb,J({},Ee,{radiusX:ee/2,radiusY:ue/2,offset:{x:-ee/2,y:-ue/2}})):p.createElement(_b,J({},Ee,{width:d.noEffect?0:ee,height:d.noEffect?0:ue})),d.noEffect&&p.createElement(Z4,{name:"Text",id:"no-preview-text-node",text:x("cropItemNoEffect"),x:o.width/2-mh.width/2,y:o.height/2-mh.height/2,fontSize:20,fill:"#ffffff",stroke:"#ff0000",strokeWidth:.2,shadowColor:"#ff0000",shadowBlur:10,annotationEvents:{},align:"center",width:mh.width,height:mh.height}),p.createElement(Ib,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:P.current?[P.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:ne,ignoreStroke:!1,anchorStroke:n.palette["accent-primary"],anchorFill:n.palette["access-primary"],anchorStrokeWidth:2,borderStroke:n.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],keepRatio:!j||!D,ref:b,boundBoxFunc:function(Se,ae){return sm(Se,ae,k.current,!(j||D)&&B(),L)}}))},CK=function(){var t,e=Qe(),n=e.selectionsIds,r=n===void 0?[]:n,i=e.theme,o=e.designLayer,a=e.dispatch,u=e.config.useCloudimage,c=z.useMemo(function(){return o!=null&&o.findOne?r.map(function(m){return o.findOne("#".concat(m))}).filter(Boolean):[]},[r]),d=function(){c.length===1&&c[0].name()===Q.TEXT&&a({type:X4,payload:{textIdOfEditableContent:c[0].id()}})},h=u?["top-left","bottom-left","top-right","bottom-right"]:void 0;return p.createElement(Ib,{id:Rb,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:c,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:c.length===1&&(t=c[0].attrs.padding)!==null&&t!==void 0?t:1,ignoreStroke:!1,anchorStroke:i.palette["accent-primary"],anchorFill:i.palette["access-primary"],anchorStrokeWidth:2,borderStroke:i.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!u,onMouseOver:function(){a({type:nf,payload:{pointerCssIcon:Go.MOVE}})},onMouseLeave:function(){a({type:nf,payload:{pointerCssIcon:Go.DRAW}})},onDblClick:d,onDblTap:d,enabledAnchors:h,flipEnabled:!u,shouldOverdrawWholeArea:!0})},SK=function(){var t=Qe(),e=t.toolId,n=t.shownImageDimensions;return p.createElement(Y3,{id:Ab,x:n.abstractX||0,y:n.abstractY||0},p.createElement(CK,null),e===Q.CROP&&p.createElement(wK,null))},xK=$.div.withConfig({componentId:"sc-1tst9ex-0"})(function(t){var e=t.theme,n=t.top,r=t.left;return"\n position: absolute;\n z-index: 1;\n background: ".concat(e.palette["bg-secondary"],";\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0px 1px 2px ").concat(e.palette["light-shadow"],";\n top: ").concat((n||0)+8,"px;\n left: ").concat((r||0)+4,"px;\n transform: translateX(-50%);\n height: 32px;\n")}),EK=function(){var t=Qe(),e=t.selectionsIds,n=e===void 0?[]:e,r=t.designLayer,i=t.annotations,o=t.dispatch,a=z.useState({left:0,top:0}),u=Le(a,2),c=u[0],d=u[1],h=z.useMemo(function(){var C;return r==null||(C=r.getStage())===null||C===void 0?void 0:C.findOne("#".concat(Rb))},[r]),m=n.length,v=C1(function(){h&&d({left:(h.x()+h.width()/2)*h.scaleX(),top:(h.y()+h.height())*h.scaleY()})},0);return z.useEffect(function(){v()},[n,h,i]),m===0||!h?null:p.createElement(xK,{className:"FIE_annotation-controls-overlay",left:c.left,top:c.top},n[0]!==Va&&p.createElement(Ua,{color:"basic",size:"sm",onClick:function(){o({type:VP,payload:{annotationsIds:n}})}},p.createElement(UW,null)),p.createElement(Ua,{color:"basic",size:"sm",onClick:function(){o({type:WP,payload:{annotationsIds:n}})}},p.createElement(ZW,null)))};function RC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zC(t){for(var e,n=1;nE),L=Le(T,2),A=L[0],M=L[1],j=z.useMemo(function(){return{cursor:o===Go.DEFAULT&&a===Vt.ANNOTATE?Go.DRAW:o}},[a,o]),D=function(te){i({type:Qu,payload:te})},B=z.useCallback(function(te){var pe,Y;te.evt.preventDefault(),(pe=(Y=te.currentTarget).container)===null||pe===void 0||pe.call(Y).focus(),te.target instanceof fn.Stage&&0E&&k&&(te.preventDefault(),M(!0),i({type:nf,payload:{pointerCssIcon:Go.DRAG}}))},V=function(te){te.code==="Space"&&(te.preventDefault(),X())},ne=function(){n.current&&n.current.container().focus()};z.useEffect(function(){i({type:nf,payload:{pointerCssIcon:Go[A?"DRAG":"DEFAULT"]}})},[A]),z.useEffect(function(){M(a!==Vt.ANNOTATE&&a!==Vt.WATERMARK&&w.factor>E);var te;return n.current&&(te=n.current.container(),te.addEventListener("mouseenter",ne),te.addEventListener("keydown",G),te.addEventListener("keyup",V)),function(){te&&(te.removeEventListener("mouseenter",ne),te.removeEventListener("keydown",G),te.removeEventListener("keyup",V))}},[a,w.factor,E]);var ve=h*(k&&w.factor||E);return p.createElement(TK,{className:"FIE_canvas-node",tabIndex:-1,ref:n,width:c,height:d,scaleX:ve,scaleY:ve,x:k&&w.x||null,y:k&&w.y||null,zoomFactor:k&&w.factor||E,onWheel:k?function(pe){pe.evt.preventDefault();var Y=(w.factor||E)+pe.evt.deltaY*-IK,de=pe.currentTarget.getPointerPosition();D(DC(DC({},de),{},{factor:Y}))}:void 0,onTap:B,onClick:B,onTouchMove:k?function(te){return OK(te,D)}:void 0,onDragStart:function(pe){var Y;1<((Y=pe.evt.touches)===null||Y===void 0?void 0:Y.length)&&M(!1)},onTouchEnd:k?function(){PK(X)}:void 0,dragBoundFunc:function(pe){var Y=Math.min(0,Math.max(pe.x,c*(1-w.factor))),de=Math.min(0,Math.max(pe.y,d*(1-w.factor)));return{x:Y,y:de}},draggable:k&&A,onDragEnd:function(pe){pe.currentTarget.draggable()&&pe.target.nodeType.toLowerCase()==="stage"&&k&&A&&D({factor:w.factor,x:pe.target.x(),y:pe.target.y(),preparedDimensions:!0})},style:j},e)};const AK=z.memo(LK);var MK=function(){var t=W5(),e=Le(t,1),n=e[0],r=Qe(),i=z.useRef(null),o=z.useCallback(function(a){var u=a.width,c=a.height;r.dispatch({type:HP,payload:{canvasWidth:u,canvasHeight:c}})},[]);return z.useEffect(function(){n(i.current,o)},[]),p.createElement(kK,{className:"FIE_canvas-container",ref:i},!r.textIdOfEditableContent&&p.createElement(EK,null),r.isShowOriginalImage&&p.createElement(_K,{className:"FIE_original-image-compare",src:r.originalImage.src}),p.createElement(AK,null,p.createElement(uN,{overridingValue:r},p.createElement(hK,null),p.createElement(SK,null))))},RK=$.div.withConfig({componentId:"sc-etsyb6-0"})(["display:inline-block;height:",";width:",";border-radius:1px;background:",";"],function(t){return t.height},function(t){return t.width},function(t){var e=t.theme.palette;return e[_.BordersSecondary]}),Y4=function(t){var e=t.height,n=t.width;return p.createElement(RK,{height:e,width:n})};Y4.defaultProps={height:"24px",width:"1px"};var zK=$.div.withConfig({componentId:"sc-21g986-0"})(["padding:16px;box-sizing:border-box;position:relative;width:100%;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-bottom:1px solid ",";[data-phone='true'] &{padding:6px 6px 4px 6px;","}"],function(t){var e=t.theme.palette;return e[_.BordersSecondary]},function(t){var e=t.isPhoneScreen;return e&&"\n padding: 12px 12px 0px;\n gap: 12px;\n "}),jK=$.div.withConfig({componentId:"sc-21g986-1"})(["display:flex;align-items:center;order:1;"]),NK=$.div.withConfig({componentId:"sc-21g986-2"})(["display:flex;align-items:center;order:3;gap:4px;"]),K4=$(Ua).withConfig({componentId:"sc-21g986-3"})(["margin:",";svg{color:",";}"],function(t){var e=t.margin;return e!=null?e:"0 4px"},function(t){var e=t.theme.palette,n=t.disabled;return n?e[_.IconsMuted]:e[_.IconsPrimary]}),DK=$.div.withConfig({componentId:"sc-21g986-4"})(["display:flex;align-items:center;gap:2px;"]),BK=$(Qt).withConfig({componentId:"sc-21g986-5"})(["flex-shrink:0;color:",";",";"],function(t){var e=t.theme.palette;return e[_.TextPlaceholder]},function(t){var e=t.theme.typography;return e.font[Pe.LabelMedium]}),Mv=$(Ua).withConfig({componentId:"sc-21g986-6"})(["padding:8px;svg{color:",";}"],function(t){var e=t.theme.palette,n=t.showBackButton;return n?e[_.IconsPrimary]:e[_.IconsMuted]}),HK=$.div.withConfig({componentId:"sc-21g986-7"})(["width:",";height:32px;display:block;width:100%;order:4;",";@media (min-width:761px){display:flex;align-items:center;justify-content:center;width:fit-content;order:2;}"],function(t){var e=t.showBackButton;return e?"318px":"384px"},function(t){var e=t.reverseDirection;return e?"flex-direction: row-reverse":""}),FK=$(Qt).withConfig({componentId:"sc-21g986-8"})(["cursor:pointer;color:",";",";"],function(t){var e=t.theme.palette;return e[_.TextPrimary]},function(t){var e=t.theme.typography;return e.font[Pe.InputMd]}),$K=$.span.withConfig({componentId:"sc-21g986-9"})(["",";"],function(t){var e=t.theme.typography;return e.font[Pe.ButtonMdEmphasis]}),WK=$(O4).withConfig({componentId:"sc-21g986-10"})(["padding:8px;z-index:111;"]);$(ea).withConfig({componentId:"sc-21g986-11"})(["padding:4px 12px;"]);var VK=$(qO).withConfig({componentId:"sc-21g986-12"})([""]),GK=$(YU).withConfig({componentId:"sc-21g986-13"})(["margin-top:16px;"]),UK=$.div.withConfig({componentId:"sc-21g986-14"})(["width:100%;margin-top:16px;"]),XK=$.div.withConfig({componentId:"sc-21g986-15"})(["margin-top:16px;width:100%;"]),ZK=$(Qt).withConfig({componentId:"sc-21g986-16"})(["margin-bottom:4px;"]),YK=$.div.withConfig({componentId:"sc-21g986-17"})(["display:flex;gap:6px;"]),KK=$.div.withConfig({componentId:"sc-21g986-18"})(["display:flex;gap:12px;justify-content:",";"],function(t){var e=t.isPhoneScreen;return e?"space-between":"center"}),qK=$(Ua).withConfig({componentId:"sc-21g986-19"})(["@media (min-width:761px){display:none;}"]),QK=$.div.withConfig({componentId:"sc-21g986-20"})(["display:flex;gap:12px;align-items:center;"]),JK=$(JO).withConfig({componentId:"sc-kpjpf5-0"})(["width:",";max-width:unset;"],function(t){var e=t.width;return e||"300px"}),eq=$(nP).withConfig({componentId:"sc-kpjpf5-1"})(function(t){var e=t.theme,n=t.isWarning;return F(["padding-bottom:0;.SfxModalTitle-Icon{background-color:",";}.SfxModalTitle-LabelPrimary{margin-bottom:24px;",";}.SfxModalTitle-LabelSecondary{",";text-align:center;}"],n&&e.palette[_.Orange_0_1_Overlay],e.typography.font[Pe.TitleH3],e.typography.font[Pe.TextLarge])}),tq=$(eP).withConfig({componentId:"sc-kpjpf5-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),q4=function(t){var e=t.title,n=t.hint,r=t.Icon,i=t.onDone,o=t.onCancel,a=t.doneLabel,u=t.cancelLabel,c=t.isOpened,d=t.doneButtonStyle,h=t.doneButtonColor,m=h===void 0?"basic":h,v=t.cancelButtonColor,C=v===void 0?"basic":v,w=t.children,x=t.areButtonsDisabled,P=t.zIndex,b=t.className,E=t.width,k=t.isWarning;return p.createElement(JK,{className:b,open:c,onClose:o,style:{zIndex:P},onKeyUp:function(L){L.key==="Enter"&&i(L)},width:E},p.createElement(eq,{icon:p.createElement(r,{size:25}),iconShadow:!0,isWarning:k,onClose:o,primary:e,secondary:n,variant:"with-icon"}),w&&p.createElement(tP,null,w),p.createElement(tq,{align:"center"},p.createElement(ea,{color:C,onClick:o,size:"md",disabled:x},u),p.createElement(ea,{color:m,onClick:i,size:"md",warning:k,style:d,disabled:x},a)))};q4.defaultProps={hint:"",isOpened:!1,doneLabel:"Yes",cancelLabel:"No",doneButtonStyle:void 0,doneButtonColor:"basic",cancelButtonColor:"basic",children:void 0,areButtonsDisabled:!1,zIndex:void 0,className:void 0,width:"",isWarning:!1};var M1=function(t){var e=t.children,n=t.isReset,r=Qe(),i=r.t,o=r.theme,a=r.config,u=r.dispatch,c=r.isResetted,d=r.haveNotSavedChanges,h=r.config.onClose,m=z.useState(!1),v=Le(m,2),C=v[0],w=v[1];if(typeof h!="function"&&!n)return p.createElement("span",null);var x=function(){w(!1)},P=z.useCallback(function(){u({type:B5,payload:{config:a}}),x()},[a]),b=function(){n||(h(Nb.CLOSE_BUTTON,d),P())};return p.createElement(p.Fragment,null,p.cloneElement(e,{onClick:c===void 0||c?b:function(){w(!0)}}),C&&p.createElement(q4,{title:i(n?"warning":"discardChanges"),hint:i(n?"changesLoseWarningHint":"discardChangesWarningHint"),isOpened:C,onCancel:x,onDone:n?P:b,Icon:function(){return p.createElement($O,{color:o.palette.warning,size:25})},doneLabel:i("confirm"),doneButtonColor:"warning-primary",cancelLabel:i("cancel"),width:"400px",isWarning:!0}))};M1.defaultProps={isReset:!1};var nq=function(){var t=Qe(),e=t.config.onClose;return typeof e=="function"?p.createElement(p.Fragment,null,p.createElement(Y4,null),p.createElement(M1,null,p.createElement(WK,{className:"FIE_topbar-close-button",color:"basic",size:"md"},p.createElement(RO,null)))):null},rq=function(t){return 0>=t||1 svg:not([color]){color:",'}:disabled,[aria-disabled="true"]{cursor:not-allowed;}&::-webkit-scrollbar{width:4px;height:4px;}&::-webkit-scrollbar-track{background:rgba(203,211,218,0.35);}&::-webkit-scrollbar-thumb{background:rgba(203,211,218,1);border-radius:10px;}}'],C0,C0,function(t){var e=t.theme;return e.palette["icons-primary"]}),fk=function(t){var e=t.img,n=t.source,r=t.useCloudimage,i=t.cloudimage;if(e)throw new Error("`img` is renamed to `source` please consider renaming it from your configurations.");if(!n||typeof n!="string"&&!(n instanceof HTMLImageElement))throw new Error("`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.");if(r){var o,a;if(i!=null&&(o=i.imageSealing)!==null&&o!==void 0&&o.enable&&!(i!=null&&(a=i.imageSealing)!==null&&a!==void 0&&a.salt))throw new Error("`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.")}var u=wf(Hb,t);return p.createElement(p.StrictMode,null,p.createElement(UL,{theme:u.theme},p.createElement(_q,null),p.createElement(Tq,null),p.createElement(Xb,{config:u},p.createElement(kq,null))))};fk.defaultProps={useCloudimage:!1,cloudimage:{},img:void 0};const Iq=z.memo(fk);function GC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function UC(t){for(var e,n=1;n>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 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(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useLayoutEffect as l}from\"react\";import d from\"shallowequal\";import h from\"@emotion/stylis\";import p from\"@emotion/unitless\";import f from\"@emotion/is-prop-valid\";import m from\"hoist-non-react-statics\";function y(){return(y=Object.assign||function(e){for(var t=1;t ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n1?t-1:0),r=1;r0?\" Args: \"+n.join(\", \"):\"\")):new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s1<<30)&&D(16,\"\"+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M=\"style[\"+N+'][data-styled-version=\"5.3.11\"]',G=new RegExp(\"^\"+N+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),L=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.11\");var i=Y();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,\"$1-$2\")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l=\"\",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),se=/^\\s*\\/\\/.*$/gm,ie=[\":\",\"[\",\".\",\"#\"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new h(a),d=[],p=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(se,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():\"\",m}var ce=r.createContext(),ue=ce.Consumer,le=r.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return s(ce)||de}function fe(){return s(le)||he}function me(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){d(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ce.Provider,{value:u},r.createElement(le.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return\"-\"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,\"-ms-\"):e}var be=function(e){return null==e||!1===e||\"\"===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r1?t-1:0),i=1;i?@[\\\\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,\"-\").replace(De,\"\")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,\"toString\",{value:function(){return\".\"+A.styledComponentId}}),i&&m(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!n(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Pe(a),r.memo(d)}function We(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\"+t+\"\"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]=\"\",t[\"data-styled-version\"]=\"5.3.11\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[r.createElement(\"style\",y({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):r.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+b(e)+'\"'),r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName=\"WithTheme(\"+b(e)+\")\",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default qe;export{Ue as ServerStyleSheet,ue as StyleSheetConsumer,ce as StyleSheetContext,me as StyleSheetManager,Ge as ThemeConsumer,Me as ThemeContext,Le as ThemeProvider,Ze as __PRIVATE__,$e as createGlobalStyle,Ae as css,_ as isStyledComponent,We as keyframes,Xe as useTheme,A as version,Je as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = merge;\n","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nexport var record = function record(keys, valueType) {\n return keys.reduce(function (toObject, key) {\n return Object.assign(toObject, _defineProperty({}, key, valueType));\n }, {});\n};","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport function generateClassNames(componentName, subClassNames) {\n var generateClassName = function generateClassName(subClassName) {\n return \"Sfx\".concat(componentName).concat(subClassName ? \"-\".concat(subClassName) : '');\n };\n var classNameArray = [];\n if (subClassNames) {\n if (Array.isArray(subClassNames)) {\n classNameArray.push.apply(classNameArray, _toConsumableArray(subClassNames.filter(function (subClassName) {\n return typeof subClassName === 'string';\n }).map(function (subClassName) {\n return generateClassName(subClassName);\n })));\n } else if (typeof subClassNames === 'string') {\n classNameArray.push(generateClassName(subClassNames));\n }\n }\n if (classNameArray.length === 0) {\n classNameArray.push(generateClassName());\n }\n return classNameArray.join(' ');\n}","import { forwardRef } from 'react';\n/**\r\n * Wrapper around React's `forwardRef` function, which adds a `displayName` to each component\r\n * created using it\r\n */\nexport function intrinsicComponent(render, displayName) {\n var component = /*#__PURE__*/forwardRef(render);\n // eslint-disable-next-line immutable/no-mutation\n component.displayName = displayName || render.name;\n return component;\n}","/**\r\n * Type-safe Object.keys\r\n */\nexport function objectKeys(object) {\n return Object.keys(object);\n}","/**\r\n * Type-safe Object.values\r\n */\nexport function objectValues(object) {\n return Object.values(object);\n}","/**\r\n * If your prop can be either a function or a plain value, this function handles\r\n * its usage for you – just provide the reference for a 'maybe function' and the arguments\r\n * to call it with\r\n */\nexport function applyPolymorphicFunctionProp(prop) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return typeof prop === 'function' ? prop.apply(void 0, args) : prop;\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n/**\r\n * If you are using a namespace for your styled components, this can come in handy giving each\r\n * styled component in this namespace a displayName which gives better debugging experience\r\n */\nexport function applyDisplayNames(styledObject) {\n return Object.keys(styledObject).reduce(function (newStyledObject, styledComponentName) {\n var styledComponent = styledObject[styledComponentName];\n styledComponent.displayName = \"\".concat(styledComponentName);\n return Object.assign(newStyledObject, _defineProperty({}, styledComponentName, styledComponent));\n }, {});\n}","/**\r\n * passes {value} to {ref}\r\n * Useful if you want to expose the ref of an inner component to the public API\r\n * while still using it inside the component.\r\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\r\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import * as React from 'react';\nimport setRef from './set-ref';\nexport function useForkRef(refA, refB) {\n /**\r\n * This will create a new function if the ref props change and are defined.\r\n * This means react will call the old forkRef with `null` and the new forkRef\r\n * with the ref. Cleanup naturally emerges from this behavior.\r\n */\n return React.useMemo(function () {\n if (refA == null && refB == null) {\n return null;\n }\n return function (refValue) {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","export function restrictNumber(number) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 ? arguments[2] : undefined;\n // we are not assigning default value for it as if max was null it will override the default value.\n var currentMax = max || 1000000;\n var convertedNumber = +number;\n return Math.min(Math.max(min, convertedNumber), currentMax);\n}","export function mapNumber(number, oldMin, oldMax, newMin, newMax) {\n return (number - oldMin) * (newMax - newMin) / (oldMax - oldMin) + newMin;\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport var rgbStringToArray = function rgbStringToArray(rgbColorString) {\n return rgbColorString.replaceAll(/[^\\d,]/gi, '').split(',').map(function (n) {\n return +n;\n });\n};\nexport var hexToRgb = function hexToRgb(hexColor) {\n // if (!hexColor) return { r: 0, g: 0, b: 0 };\n if (!hexColor) return [0, 0, 0];\n return [Number.parseInt(hexColor.slice(1, 3), 16), Number.parseInt(hexColor.slice(3, 5), 16), Number.parseInt(hexColor.slice(5, 7), 16)];\n};\nvar rgbChannelToHex = function rgbChannelToHex(channel) {\n return channel.toString(16).padStart(2, '0');\n};\nexport var rgbToHex = function rgbToHex() {\n for (var _len = arguments.length, rgbColor = new Array(_len), _key = 0; _key < _len; _key++) {\n rgbColor[_key] = arguments[_key];\n }\n return \"#\".concat(rgbColor.map(rgbChannelToHex).join(''));\n};\nexport var hslToHex = function hslToHex(h, s, l) {\n var dividedL = l / 100;\n var a = s * Math.min(dividedL, 1 - dividedL) / 100;\n var f = function f(n) {\n var k = (n + h / 30) % 12;\n var color = dividedL - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return rgbChannelToHex(Math.round(255 * color));\n };\n return \"#\".concat(f(0)).concat(f(8)).concat(f(4));\n};\nexport var rgbToHsl = function rgbToHsl() {\n for (var _len2 = arguments.length, rgbColor = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n rgbColor[_key2] = arguments[_key2];\n }\n var r = rgbColor[0],\n g = rgbColor[1],\n b = rgbColor[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n if (max === min) {\n h = 0;\n s = 0;\n } else {\n var diff = max - min;\n s = l > 0.5 ? diff / (2 - max - min) : diff / (max + min);\n switch (max) {\n case r:\n h = (g - b) / diff + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / diff + 2;\n break;\n case b:\n h = (r - g) / diff + 4;\n break;\n default:\n h = 0;\n }\n h /= 6;\n }\n\n // * 360 for having the hue in degrees\n return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];\n};\nexport var colorToHsl = function colorToHsl(color) {\n if (color.startsWith('#')) {\n var hex = color;\n if (color.length === 4) {\n hex = \"#\".concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]).concat(color[3]).concat(color[3]);\n }\n return rgbToHsl.apply(void 0, _toConsumableArray(hexToRgb(hex)));\n }\n if (color.startsWith('rgb')) {\n var colorInRgb = rgbStringToArray(color);\n return rgbToHsl.apply(void 0, _toConsumableArray(colorInRgb));\n }\n\n // if the color is in text and no one from previous then return the default color which is black\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToRgb = function colorToRgb(color) {\n // we are not handling (hsl/color name) here cause we are accepting only HEX and RGB colors as default colors from user.\n if (color.startsWith('#')) {\n return hexToRgb(color);\n }\n if (color.startsWith('rgb')) {\n return rgbStringToArray(color);\n }\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToHex = function colorToHex(color) {\n if (color.startsWith('#')) {\n if (color.length === 7) {\n return color;\n }\n return \"#\".concat(color[0]).concat(color[0]).concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]);\n }\n if (color.startsWith('rgb')) {\n return rgbToHex.apply(void 0, _toConsumableArray(rgbStringToArray(color)));\n }\n if (typeof color === 'string') {\n return '#000000';\n }\n return color;\n};\nvar checkIsBlack = function checkIsBlack(s, l) {\n return l === 0 && (s === 0 || s === 1);\n};\nvar checkIsWhite = function checkIsWhite(s, l) {\n return s === 0 && l === 1;\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hsvToHsl = function hsvToHsl(h, s, v) {\n var newS = s;\n var l = (2 - s) * v / 2;\n if (l !== 0) {\n if (l === 1) {\n newS = 0;\n } else if (l < 0.5) {\n newS = newS * v / (l * 2);\n } else {\n newS = newS * v / (2 - l * 2);\n }\n }\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(l * 100)];\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hslToHsv = function hslToHsv(h, s, l) {\n var newS = s;\n var newL = l * 2;\n newS *= newL <= 1 ? newL : 2 - newL;\n var v = (newL + newS) / 2;\n newS = 2 * newS / (newL + newS);\n\n // return [h, newS, v];\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(v * 100)];\n};\n\n// TODO: validating 3 color code for Hex\n// /^#([\\da-f]{3}){1,2}$/i.test(color)colorToHex\nexport var validateHex = function validateHex(color) {\n return /^#[\\da-f]{6}$/i.test(color);\n};","export function getElemDocumentCoords(elem) {\n if (!elem) {\n return null;\n }\n var box = elem.getBoundingClientRect();\n var _document = document,\n body = _document.body;\n var docEl = document.documentElement;\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var top = box.top + scrollTop - clientTop;\n var left = box.left + scrollLeft - clientLeft;\n return {\n top: Math.round(top),\n left: Math.round(left),\n width: box.width,\n height: box.height\n };\n}","export function asc(a, b) {\n return a - b;\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nexport function percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + Number.parseInt(parts[1], 10);\n }\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nexport function roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nexport function setValueIndex(_ref) {\n var values = _ref.values,\n newValue = _ref.newValue,\n index = _ref.index;\n var output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nexport function findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n return closestIndex;\n}\nexport function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\nexport function clamp(value, min, max) {\n if (value == null) {\n return min;\n }\n return Math.min(Math.max(min, value), max);\n}\nexport function trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport var axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\nexport function focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n var doc = ownerDocument(sliderRef.current);\n if (!sliderRef.current.contains(doc.activeElement) || Number(doc.activeElement.getAttribute('data-index')) !== activeIndex) {\n var _sliderRef$current$qu;\n (_sliderRef$current$qu = sliderRef.current.querySelector(\"[type=\\\"range\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\"))) === null || _sliderRef$current$qu === void 0 ? void 0 : _sliderRef$current$qu.focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}","export var Color = {\n TextPrimary: 'txt-primary',\n TextSecondary: 'txt-secondary',\n TextSecondaryInvert: 'txt-secondary-invert',\n TextPlaceholder: 'txt-placeholder',\n TextWarning: 'txt-warning',\n TextError: 'txt-error',\n TextInfo: 'txt-info',\n AccentPrimary: 'accent-primary',\n AccentPrimaryHover: 'accent-primary-hover',\n AccentPrimaryActive: 'accent-primary-active',\n AccentPrimaryDisabled: 'accent-primary-disabled',\n AccentSecondaryDisabled: 'accent-secondary-disabled',\n AccentStateless: 'accent-stateless',\n AccentStateless_0_4_Opacity: 'accent-stateless_0_4_opacity',\n Accent_0_5_Opacity: 'accent_0_5_opacity',\n Accent_1_2_Opacity: 'accent_1_2_opacity',\n Accent_1_8_Opacity: 'accent_1_8_opacity',\n Accent_2_8_Opacity: 'accent_2_8_opacity',\n Accent_4_0_Opacity: 'accent_4_0_opacity',\n BackgroundGrey: 'bg-grey',\n BackgroundStateless: 'bg-stateless',\n BackgroundActive: 'bg-active',\n BackgroundBaseLight: 'bg-base-light',\n BackgroundBaseMedium: 'bg-base-medium',\n BackgroundPrimary: 'bg-primary',\n BackgroundPrimaryLight: 'bg-primary-light',\n BackgroundPrimaryHover: 'bg-primary-hover',\n BackgroundPrimaryActive: 'bg-primary-active',\n BackgroundPrimaryStateless: 'bg-primary-stateless',\n BackgroundPrimary_0_5_Opacity: 'bg-primary-0-5-opacity',\n BackgroundSecondary: 'bg-secondary',\n BackgroundHover: 'bg-hover',\n BackgroundGreen: 'bg-green',\n BackgroundGreenMedium: 'bg-green-medium',\n BackgroundBlue: 'bg-blue',\n BackgroundRed: 'bg-red',\n BackgroundRedMedium: 'background-red-medium',\n BackgroundOrange: 'bg-orange',\n BackgroundTooltip: 'bg-tooltip',\n IconsPrimary: 'icon-primary',\n IconsPrimaryOpacity_0_6: 'icons-primary-opacity-0-6',\n IconsSecondary: 'icons-secondary',\n IconsPlaceholder: 'icons-placeholder',\n IconsInvert: 'icons-invert',\n IconsMuted: 'icons-muted',\n IconsPrimaryHover: 'icons-primary-hover',\n IconsSecondaryHover: 'icons-secondary-hover',\n ButtonPrimaryText: 'btn-primary-text',\n ButtonPrimaryText_0_6: 'btn-primary-text-0-6',\n ButtonPrimaryText_0_4: 'btn-primary-text-0-4',\n ButtonDisabledText: 'btn-disabled-text',\n ButtonSecondaryText: 'btn-secondary-text',\n LinkPrimary: 'link-primary',\n LinkStateless: 'link-stateless',\n LinkHover: 'link-hover',\n LinkActive: 'link-active',\n LinkMuted: 'link-muted',\n LinkPressed: 'link-pressed',\n BordersPrimary: 'borders-primary',\n BordersPrimaryHover: 'borders-primary-hover',\n BordersSecondary: 'borders-secondary',\n BordersStrong: 'borders-strong',\n BordersInvert: 'borders-invert',\n BorderHoverBottom: 'border-hover-bottom',\n BorderActiveBottom: 'border-active-bottom',\n BorderPrimaryStateless: 'border-primary-stateless',\n BordersDisabled: 'borders-disabled',\n BordersButton: 'borders-button',\n BordersItem: 'borders-item',\n BordersBaseLight: 'borders-base-light',\n BordersBaseMedium: 'borders-base-medium',\n BordersGreen: 'borders-green',\n BordersGreenMedium: 'borders-green-medium',\n BordersRed: 'borders-red',\n ActiveSecondary: 'active-secondary',\n ActiveSecondaryHover: 'active-secondary-hover',\n Tag: 'tag',\n StatesErrorDisabledText: 'states-error-disabled-text',\n Error: 'error',\n Error_0_28_Opacity: 'error-0-28-opacity',\n Error_0_12_Opacity: 'error-0-12-opacity',\n ErrorHover: 'error-hover',\n ErrorActive: 'error-active',\n Success: 'success',\n SuccessHover: 'success-hover',\n SuccessActive: 'success-Active',\n Warning: 'warning',\n WarningHover: 'warning-hover',\n WarningActive: 'warning-active',\n Info: 'info',\n Modified: 'modified',\n Red: 'red',\n Orange: 'orange',\n Salad: 'salad',\n Green: 'green',\n Blue: 'blue',\n Indigo: 'indigo',\n Violet: 'violet',\n Pink: 'pink',\n GradientRight: 'gradient-right',\n Extra_0_3_Overlay: 'extra-0-3-overlay',\n GradientRightActive: 'gradient-right-active',\n GradientRightHover: 'gradient-right-hover',\n Extra_0_5_Overlay: 'extra-0-5-overlay',\n Extra_0_7_Overlay: 'extra-0-7-overlay',\n Extra_0_9_Overlay: 'extra-0-9-overlay',\n Red_0_1_Overlay: 'red-0-1-overlay',\n Orange_0_1_Overlay: 'orange-0-1-overlay',\n Accent_0_8_Overlay: 'accent-0-8-overlay',\n Link: 'link',\n Camera: 'camera',\n GoogleDrive: 'google-drive',\n Dropbox: 'dropbox',\n OneDrive: 'one-drive',\n Device: 'device',\n Instagram: 'instagram',\n FreeImages: 'free-images',\n FreeIcons: 'free-icons',\n Canvas: 'canvas',\n Box: 'box',\n ScreenCast: 'screen-cast',\n LightShadow: 'light-shadow',\n MediumShadow: 'medium-shadow',\n LargeShadow: 'large-shadow',\n XLargeShadow: 'x-large-shadow'\n};","import { css } from 'styled-components';\nimport { Color as PaletteColor } from '../types/palette';\nexport var scrollBar = function scrollBar(_ref) {\n var palette = _ref.theme.palette;\n return css([\"scrollbar-color:\", \" \", \";scrollbar-width:thin;::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{margin-block:6px;}::-webkit-scrollbar-thumb{background:\", \";border:4px solid \", \";border-radius:99px;padding:4px 6px;background-clip:padding-box;}\"], palette[PaletteColor.IconsMuted], palette[PaletteColor.ActiveSecondary], palette[PaletteColor.Extra_0_3_Overlay], palette[PaletteColor.ActiveSecondary]);\n};","export var Breakpoint = {\n Xs: 'xs',\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg',\n Xl: 'xl',\n Xxl: 'xxl',\n Xxxl: 'xxxl'\n};\nexport var BreakpointClass = {\n Xs: '.sfx-breakpoint-xs',\n Sm: '.sfx-breakpoint-sm',\n Md: '.sfx-breakpoint-md',\n Lg: '.sfx-breakpoint-lg',\n Xl: '.sfx-breakpoint-xl',\n Xxl: '.sfx-breakpoint-xxl',\n Xxxl: '.sfx-breakpoint-xxxl'\n};","export var Shadows = {\n ShadowSm: 'shadow-sm',\n ShadowMd: 'shadow-md',\n ShadowLg: 'shadow-lg',\n ShadowXl: 'shadow-xl',\n Label: 'label',\n Header: 'header',\n HeaderPopup: 'header-popup',\n FooterPopup: 'footer-popup',\n LeftPanelMd: 'left-panel-md',\n RightPanelMd: 'right-panel-md',\n LeftPanelSm: 'left-panel-sm',\n RightPanelSm: 'right-panel-sm'\n};","export var FontWeight = {\n Thin: 100,\n ExtraLight: 200,\n Light: 300,\n Regular: 400,\n Medium: 500,\n SemiBold: 600,\n Bold: 700,\n ExtraBold: 800,\n Black: 900\n};","export var FontVariant = {\n TextExtraSmall: 'text-extra-small',\n TextSmall: 'text-small',\n TextSmallUp: 'text-small-up',\n TextMedium: 'text-medium',\n TextLarge: 'text-large',\n TextExtraLarge: 'text-extra-large',\n TextXExtraLarge: 'text-x-extra-large',\n TitleH6: 'title-h6',\n TitleH5: 'title-h5',\n TitleH4: 'title-h4',\n TitleH3: 'title-h3',\n TitleH2: 'title-h2',\n TitleH1: 'title-h1',\n LabelExtraSmall: 'label-extra-small',\n LabelExtraSmallEmphasis: 'label-extra-small-emphasis',\n LabelExtraSmallUp: 'label-extra-small-up',\n LabelSmall: 'label-small',\n LabelSmallEmphasis: 'label-small-emphasis',\n LabelSmallUp: 'label-small-up',\n LabelSmallUpEmphasis: 'label-small-up-emphasis',\n LabelMedium: 'label-medium',\n LabelMediumEmphasis: 'label-medium-emphasis',\n LabelLarge: 'label-large',\n LabelLargeEmphasis: 'label-large-emphasis',\n LabelLargeUp: 'label-large-up',\n LabelExtraLargeEmphasis: 'label-extra-large-emphasis',\n LabelExtraLarge: 'label-extra-large',\n LabelXExtraLargeEmphasis: 'label-x-extra-large-emphasis',\n LabelXExtraLarge: 'label-x-extra-large',\n LabelXXExtraLargeEmphasis: 'label-x-x-extra-large-emphasis',\n LabelXXExtraLarge: 'label-x-x-extra-large',\n LabelXXXExtraLarge: 'label-x-x-x-extra-large',\n ButtonSmEmphasis: 'btn-sm-emphasis',\n ButtonSm: 'btn-sm',\n ButtonSmUpEmphasis: 'btn-sm-up-emphasis',\n ButtonSmUp: 'btn-sm-up',\n ButtonMdEmphasis: 'btn-md-emphasis',\n ButtonMd: 'btn-md',\n ButtonLgEmphasis: 'btn-lg-emphasis',\n ButtonLg: 'btn-lg',\n ButtonLgUpEmphasis: 'btn-lg-up-emphasis',\n ButtonLgUp: 'btn-lg-up',\n LinkSmall: 'link-small',\n LinkSmallEmphasis: 'link-small-emphasis',\n LinkSmallUp: 'link-small-up',\n LinkSmallUpEmphasis: 'link-small-up-emphasis',\n LinkMedium: 'link-medium',\n LinkMediumEmphasis: 'link-medium-emphasis',\n LinkLarge: 'link-large',\n LinkLargeEmphasis: 'link-large-emphasis',\n LinkLargeUp: 'link-large-up',\n LinkLargeUpEmphasis: 'link-large-up-emphasis',\n InputSm: 'input-sm',\n InputSmUp: 'input-sm-up',\n InputMd: 'input-md',\n InputLg: 'input-lg'\n};","export var BorderRadiusSize = {\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg'\n};","import { createGlobalStyle, css } from 'styled-components';\nvar Typography = /*#__PURE__*/createGlobalStyle([\"\", \";\"], function (_ref) {\n var theme = _ref.theme;\n var baseLineHeight = theme.typography.baseLineHeight;\n return css([\"h1,h2,h3,h4,h5,h6,p,small{line-height:\", \";}\"], baseLineHeight);\n});\nexport default Typography;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _labelFontVariants, _textFontVariants, _buttonFontVariants, _linkFontVariants, _inputFontVariants, _titleFontVariants;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { FontVariant, FontWeight } from '../../../../utils/types/typography';\nvar fontFamily = '\"Roboto\"';\nvar defaultFontValue = {\n fontFamily: fontFamily,\n fontStyle: 'normal',\n fontWeight: FontWeight.Regular\n};\nvar labelFontVariants = (_labelFontVariants = {}, _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: 'Bold',\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '11px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '60px',\n lineHeight: '68px'\n})), _labelFontVariants);\nvar textFontVariants = (_textFontVariants = {}, _defineProperty(_textFontVariants, FontVariant.TextExtraSmall, _objectSpread(_objectSpread({}, labelFontVariants[FontVariant.LabelExtraSmallUp]), {}, {\n lineHeight: '14px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '20px'\n})), _defineProperty(_textFontVariants, FontVariant.TextLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '22px'\n})), _defineProperty(_textFontVariants, FontVariant.TextExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '26px'\n})), _defineProperty(_textFontVariants, FontVariant.TextXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '28px',\n lineHeight: '40px'\n})), _textFontVariants);\nvar buttonFontVariants = (_buttonFontVariants = {}, _defineProperty(_buttonFontVariants, FontVariant.ButtonSmEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMdEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _buttonFontVariants);\nvar linkFontVariants = (_linkFontVariants = {}, _defineProperty(_linkFontVariants, FontVariant.LinkSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _linkFontVariants);\nvar inputFontVariants = (_inputFontVariants = {}, _defineProperty(_inputFontVariants, FontVariant.InputSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _inputFontVariants);\nvar titleFontVariants = (_titleFontVariants = {}, _defineProperty(_titleFontVariants, FontVariant.TitleH6, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH5, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '21px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH4, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '24px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH3, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '27px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH2, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '20px',\n lineHeight: '30px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH1, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '28px',\n lineHeight: '42px'\n})), _titleFontVariants);\nexport var defaultTypography = {\n // htmlFontSize: '14px',\n fontFamily: fontFamily,\n baseLineHeight: 1.375,\n font: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, labelFontVariants), textFontVariants), buttonFontVariants), linkFontVariants), inputFontVariants), titleFontVariants)\n};","import { createGlobalStyle /* , css */ } from 'styled-components';\n\n// Example with theme: ${({ theme }) => css``;\n\nvar CommonStyles = /*#__PURE__*/createGlobalStyle([\"@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}\"]);\nexport default CommonStyles;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _lightPalette;\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { Color } from '../../../../utils/types/palette';\nexport var lightPalette = (_lightPalette = {}, _defineProperty(_lightPalette, Color.TextPrimary, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.TextSecondary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.TextSecondaryInvert, 'rgba(213, 216, 220, 1)'), _defineProperty(_lightPalette, Color.TextPlaceholder, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.TextWarning, 'rgba(196, 110, 0, 1)'), _defineProperty(_lightPalette, Color.TextError, 'rgba(170, 32, 0, 1)'), _defineProperty(_lightPalette, Color.TextInfo, 'rgba(35, 117, 171, 1)'), _defineProperty(_lightPalette, Color.AccentPrimary, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryHover, 'rgba(96, 111, 209, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryActive, 'rgba(73, 88, 188, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryDisabled, 'rgba(233, 238, 242, 1)'), _defineProperty(_lightPalette, Color.AccentSecondaryDisabled, '#F9FBFC'), _defineProperty(_lightPalette, Color.AccentStateless, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentStateless_0_4_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.Accent_0_5_Opacity, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Accent_1_2_Opacity, 'rgba(104, 121, 235, 0.12)'), _defineProperty(_lightPalette, Color.Accent_1_8_Opacity, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.Accent_2_8_Opacity, 'rgba(104, 121, 235, 0.28)'), _defineProperty(_lightPalette, Color.Accent_4_0_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.BackgroundGrey, 'rgba(216, 224, 232, 1)'), _defineProperty(_lightPalette, Color.BackgroundStateless, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundActive, 'rgba(243, 247, 250, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseLight, 'rgba(235, 239, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseMedium, 'rgba(227, 231, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary, 'rgba(248, 250, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryLight, 'rgba(243, 245, 247, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryHover, 'rgba(239, 243, 246, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryActive, 'rgba(93, 109, 126, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary_0_5_Opacity, 'rgba(255, 255, 255, 0.500)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryStateless, '#CCD6DE'), _defineProperty(_lightPalette, Color.BackgroundSecondary, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundHover, 'rgba(249, 251, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreen, 'rgba(237, 250, 244, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreenMedium, 'rgba(227, 250, 239, 1)'), _defineProperty(_lightPalette, Color.BackgroundBlue, 'rgba(244, 249, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundRed, 'rgba(253, 244, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundRedMedium, 'rgba(247, 228, 230, 1)'), _defineProperty(_lightPalette, Color.BackgroundOrange, 'rgba(255, 249, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundTooltip, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryOpacity_0_6, 'rgba(93, 109, 126, 0.600)'), _defineProperty(_lightPalette, Color.IconsSecondary, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.IconsPlaceholder, 'rgba(223, 231, 237, 1)'), _defineProperty(_lightPalette, Color.IconsInvert, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.IconsMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsSecondaryHover, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_6, 'rgba(255, 255, 255, 0.6)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_4, 'rgba(255, 255, 255, 0.4)'), _defineProperty(_lightPalette, Color.ButtonDisabledText, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.ButtonSecondaryText, 'rgba(0, 0, 0, 1)'), _defineProperty(_lightPalette, Color.LinkPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkStateless, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.LinkActive, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.LinkPressed, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.LinkMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.BordersPrimary, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersPrimaryHover, 'rgba(104, 118, 134, 1)'), _defineProperty(_lightPalette, Color.BordersSecondary, 'rgba(236, 240, 243, 1)'), _defineProperty(_lightPalette, Color.BordersStrong, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersInvert, 'rgba(85, 99, 115, 1)'), _defineProperty(_lightPalette, Color.BorderHoverBottom, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.BorderActiveBottom, '#4958BC'), _defineProperty(_lightPalette, Color.BorderPrimaryStateless, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersDisabled, 'rgba(73, 88, 188, 0.4)'), _defineProperty(_lightPalette, Color.BordersButton, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.BordersItem, 'rgba(226, 232, 236, 1)'), _defineProperty(_lightPalette, Color.BordersBaseLight, 'rgba(211, 219, 250, 1)'), _defineProperty(_lightPalette, Color.BordersBaseMedium, 'rgba(164, 175, 227, 1)'), _defineProperty(_lightPalette, Color.BordersGreen, 'rgba(27, 161, 99, 0.22)'), _defineProperty(_lightPalette, Color.BordersGreenMedium, 'rgba(27, 161, 99, 0.4)'), _defineProperty(_lightPalette, Color.BordersRed, 'rgba(185, 33, 46, 0.4)'), _defineProperty(_lightPalette, Color.ActiveSecondary, '#FFFFFF'), _defineProperty(_lightPalette, Color.ActiveSecondaryHover, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Error, 'rgba(246, 61, 61, 1)'), _defineProperty(_lightPalette, Color.Error_0_28_Opacity, 'rgba(185, 33, 46, 0.28)'), _defineProperty(_lightPalette, Color.Error_0_12_Opacity, 'rgba(255, 86, 78, 0.1)'), _defineProperty(_lightPalette, Color.ErrorHover, 'rgba(216, 46, 46, 1)'), _defineProperty(_lightPalette, Color.ErrorActive, 'rgba(185, 33, 46, 1)'), _defineProperty(_lightPalette, Color.Success, 'rgba(38, 193, 122, 1)'), _defineProperty(_lightPalette, Color.SuccessHover, 'rgba(30, 154, 98, 1)'), _defineProperty(_lightPalette, Color.SuccessActive, 'rgba(23, 116, 73, 1)'), _defineProperty(_lightPalette, Color.Warning, 'rgba(255, 172, 74, 1)'), _defineProperty(_lightPalette, Color.WarningHover, 'rgba(237, 145, 7, 1)'), _defineProperty(_lightPalette, Color.WarningActive, 'rgba(224, 135, 0, 1)'), _defineProperty(_lightPalette, Color.Info, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Modified, 'rgba(165, 166, 246, 1)'), _defineProperty(_lightPalette, Color.Red, 'rgba(219, 46, 50, 1)'), _defineProperty(_lightPalette, Color.Orange, 'rgba(255, 168, 0, 1)'), _defineProperty(_lightPalette, Color.Salad, 'rgba(143, 176, 33, 1)'), _defineProperty(_lightPalette, Color.Green, 'rgba(22, 160, 134, 1)'), _defineProperty(_lightPalette, Color.Blue, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Indigo, 'rgba(91, 72, 162, 1)'), _defineProperty(_lightPalette, Color.Violet, 'rgba(141, 68, 173, 1)'), _defineProperty(_lightPalette, Color.Pink, 'rgba(211, 92, 158, 1)'), _defineProperty(_lightPalette, Color.GradientRight, 'linear-gradient(270deg, #FFFFFF 1.56%, rgba(255, 255, 255, 0.89) 52.4%, rgba(255, 255, 255, 0.532165) 76.04%, rgba(255, 255, 255, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_3_Overlay, 'rgba(79, 98, 118, 0.3)'), _defineProperty(_lightPalette, Color.GradientRightActive, 'linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)'), _defineProperty(_lightPalette, Color.GradientRightHover, 'linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_5_Overlay, 'rgba(79, 98, 118, 0.5)'), _defineProperty(_lightPalette, Color.Extra_0_7_Overlay, 'rgba(79, 98, 118, 0.7)'), _defineProperty(_lightPalette, Color.Extra_0_9_Overlay, 'rgba(79, 98, 118, 0.9)'), _defineProperty(_lightPalette, Color.Red_0_1_Overlay, 'rgba(232, 91, 70, 0.1)'), _defineProperty(_lightPalette, Color.Orange_0_1_Overlay, 'rgba(250, 157, 47, 0.1)'), _defineProperty(_lightPalette, Color.Accent_0_8_Overlay, 'rgba(104, 121, 235, 0.08)'), _defineProperty(_lightPalette, Color.Link, 'rgba(250, 166, 68, 1)'), _defineProperty(_lightPalette, Color.Camera, 'rgba(73, 186, 224, 1)'), _defineProperty(_lightPalette, Color.GoogleDrive, 'rgba(81, 136, 238, 1)'), _defineProperty(_lightPalette, Color.Dropbox, 'rgba(17, 40, 124, 1)'), _defineProperty(_lightPalette, Color.OneDrive, 'rgba(40, 100, 186, 1)'), _defineProperty(_lightPalette, Color.Device, 'rgba(102, 73, 209, 1)'), _defineProperty(_lightPalette, Color.Instagram, 'rgba(173, 38, 220, 1)'), _defineProperty(_lightPalette, Color.FreeImages, 'rgba(16, 163, 135, 1)'), _defineProperty(_lightPalette, Color.FreeIcons, 'rgba(62, 207, 139, 1)'), _defineProperty(_lightPalette, Color.Canvas, 'rgba(36, 190, 202, 1)'), _defineProperty(_lightPalette, Color.Box, 'rgba(0, 97, 213, 1)'), _defineProperty(_lightPalette, Color.ScreenCast, 'rgba(48, 61, 78, 1)'), _defineProperty(_lightPalette, Color.Tag, '#889AAC'), _defineProperty(_lightPalette, Color.StatesErrorDisabledText, 'rgba(185, 33, 46, 0.3)'), _defineProperty(_lightPalette, Color.LightShadow, 'rgba(146, 166, 188, 0.2)'), _defineProperty(_lightPalette, Color.MediumShadow, 'rgba(146, 166, 188, 0.24)'), _defineProperty(_lightPalette, Color.LargeShadow, 'rgba(146, 166, 188, 0.32)'), _defineProperty(_lightPalette, Color.XLargeShadow, 'rgba(146, 166, 188, 0.5)'), _lightPalette);\nexport var defaultPalette = lightPalette;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _shadows;\nimport { Shadows } from '../../../../utils/types/shadows';\nexport var shadows = (_shadows = {}, _defineProperty(_shadows, Shadows.ShadowSm, '0px 1px 2px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.ShadowMd, ' 0px 1px 4px 0px rgba(146, 166, 188, 0.24)'), _defineProperty(_shadows, Shadows.ShadowLg, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.32)'), _defineProperty(_shadows, Shadows.ShadowXl, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.5)'), _defineProperty(_shadows, Shadows.Label, ' 0px 1px 3px 0px rgba(77, 78, 78, 0.15)'), _defineProperty(_shadows, Shadows.Header, ' 0px 6px 10px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.HeaderPopup, ' 0px 3px 7px 0px rgba(146, 166, 188, 0.16)'), _defineProperty(_shadows, Shadows.FooterPopup, ' 0px -4px 8px 0px rgba(208, 215, 220, 0.22)'), _defineProperty(_shadows, Shadows.LeftPanelMd, ' 6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelMd, '-6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.LeftPanelSm, '6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelSm, '-6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _shadows);\nexport var defaultShadows = shadows;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _values, _classes;\nimport { Breakpoint } from '../../../../utils/types/css';\nexport var defaultBreakpoints = {\n keys: [Breakpoint.Xs, Breakpoint.Sm, Breakpoint.Md, Breakpoint.Lg, Breakpoint.Xl],\n values: (_values = {}, _defineProperty(_values, Breakpoint.Xs, 0), _defineProperty(_values, Breakpoint.Sm, 576), _defineProperty(_values, Breakpoint.Md, 768), _defineProperty(_values, Breakpoint.Lg, 1084), _defineProperty(_values, Breakpoint.Xl, 1342), _defineProperty(_values, Breakpoint.Xxl, 1600), _defineProperty(_values, Breakpoint.Xxxl, 1920), _values),\n classes: (_classes = {}, _defineProperty(_classes, Breakpoint.Xs, '.sfx-breakpoint-xs'), _defineProperty(_classes, Breakpoint.Sm, '.sfx-breakpoint-sm'), _defineProperty(_classes, Breakpoint.Md, '.sfx-breakpoint-md'), _defineProperty(_classes, Breakpoint.Lg, '.sfx-breakpoint-lg'), _defineProperty(_classes, Breakpoint.Xl, '.sfx-breakpoint-xl'), _defineProperty(_classes, Breakpoint.Xxl, '.sfx-breakpoint-xxl'), _defineProperty(_classes, Breakpoint.Xxxl, '.sfx-breakpoint-xxxl'), _classes),\n getBreakpointClass: function getBreakpointClass() {\n return '';\n },\n up: function up() {\n return '';\n },\n down: function down() {\n return '';\n },\n between: function between() {\n return '';\n },\n only: function only() {\n return '';\n }\n};","import { defaultBreakpoints } from './default-breakpoints';\nvar createBreakpoints = function createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? defaultBreakpoints.values : _breakpoints$values,\n _breakpoints$classes = breakpoints.classes,\n classes = _breakpoints$classes === void 0 ? defaultBreakpoints.classes : _breakpoints$classes;\n var unit = 'px';\n var keys = Object.keys(values);\n var up = function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n };\n var down = function down(key) {\n var value = values[key];\n return \"@media (max-width:\".concat(value).concat(unit, \")\");\n };\n var between = function between(start, end) {\n var endIndex = keys.indexOf(end);\n return \"@media (min-width:\".concat(values[start]).concat(unit, \") and (max-width:\").concat(values[keys[endIndex]]).concat(unit, \")\");\n };\n var only = function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n };\n var getBreakpointClass = function getBreakpointClass(width, hideSelector) {\n var removeSelector = function removeSelector(str) {\n return str.slice(1);\n };\n if (width >= values.xs && width < values.sm) {\n return hideSelector ? removeSelector(classes.xs) : classes.xs;\n }\n if (width >= values.sm && width < values.md) {\n return hideSelector ? removeSelector(classes.sm) : classes.sm;\n }\n if (width >= values.md && width < values.lg) {\n return hideSelector ? removeSelector(classes.md) : classes.md;\n }\n if (width >= values.lg && width < values.xl) {\n return hideSelector ? removeSelector(classes.lg) : classes.lg;\n }\n if (width >= values.xl && width < values.xxl) {\n return hideSelector ? removeSelector(classes.xl) : classes.xl;\n }\n if (width >= values.xxl && width < values.xxxl) {\n return hideSelector ? removeSelector(classes.xxl) : classes.xxl;\n }\n if (width >= values.xxxl) {\n return hideSelector ? removeSelector(classes.xxxl) : classes.xxxl;\n }\n return hideSelector ? removeSelector(classes.md) : classes.md;\n };\n return {\n keys: keys,\n values: values,\n classes: classes,\n getBreakpointClass: getBreakpointClass,\n up: up,\n down: down,\n between: between,\n only: only\n };\n};\nexport default createBreakpoints;","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _borderRadius;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useMemo } from 'react';\nimport PT from 'prop-types';\nimport { ThemeProvider as SCThemeProvider } from 'styled-components';\nimport merge from 'lodash.merge';\nimport { record } from '../../utils/types/prop-types';\nimport { applyPolymorphicFunctionProp, objectKeys, objectValues } from '../../utils/functions';\nimport { Breakpoint } from '../../utils/types/css';\nimport { Color } from '../../utils/types/palette';\nimport { Shadows } from '../../utils/types/shadows';\nimport { FontVariant } from '../../utils/types/typography';\nimport { BorderRadiusSize } from '../../utils/types/shape';\nimport { Typography, CommonStyles } from '../roots';\nimport { defaultPalette } from '../roots/palette';\nimport { defaultShadows } from '../roots/shadows';\nimport { defaultTypography } from '../roots/typography';\nimport createBreakpoints from '../roots/breakpoints/entity/create-breakpoints';\nvar defaultShape = {\n borderRadius: (_borderRadius = {}, _defineProperty(_borderRadius, BorderRadiusSize.Sm, '2px'), _defineProperty(_borderRadius, BorderRadiusSize.Md, '4px'), _defineProperty(_borderRadius, BorderRadiusSize.Lg, '8px'), _borderRadius)\n};\nvar ThemeProvider = function ThemeProvider(_ref) {\n var children = _ref.children,\n _ref$theme = _ref.theme,\n theme = _ref$theme === void 0 ? {} : _ref$theme;\n var _theme$palette = theme.palette,\n paletteOverride = _theme$palette === void 0 ? {} : _theme$palette,\n _theme$breakpoints = theme.breakpoints,\n breakpointsOverride = _theme$breakpoints === void 0 ? {} : _theme$breakpoints,\n _theme$typography = theme.typography,\n typographyOverride = _theme$typography === void 0 ? {} : _theme$typography,\n _theme$shape = theme.shape,\n shapeOverride = _theme$shape === void 0 ? {} : _theme$shape,\n _theme$shadows = theme.shadows,\n shadowsOverride = _theme$shadows === void 0 ? {} : _theme$shadows;\n var finalTheme = useMemo(function () {\n var palette = _objectSpread(_objectSpread({}, defaultPalette), paletteOverride);\n var breakpoints = createBreakpoints(breakpointsOverride);\n var shadows = _objectSpread(_objectSpread({}, defaultShadows), shadowsOverride);\n return {\n palette: palette,\n breakpoints: breakpoints,\n typography: _objectSpread({}, merge(_objectSpread({}, defaultTypography), _objectSpread({}, typographyOverride))),\n shape: _objectSpread({}, merge(_objectSpread({}, defaultShape), _objectSpread({}, shapeOverride))),\n shadows: shadows\n };\n return {};\n }, [JSON.stringify(theme)]);\n return /*#__PURE__*/React.createElement(SCThemeProvider, {\n theme: finalTheme\n }, /*#__PURE__*/React.createElement(React.Fragment, null, applyPolymorphicFunctionProp(children, finalTheme), /*#__PURE__*/React.createElement(CommonStyles, null), /*#__PURE__*/React.createElement(Typography, null)));\n};\nvar baseLineHeight = defaultTypography.baseLineHeight,\n font = defaultTypography.font,\n typography = _objectWithoutProperties(defaultTypography, [\"baseLineHeight\", \"font\"]);\nThemeProvider.propTypes = {\n children: PT.oneOfType([PT.node, PT.func, PT.arrayOf(PT.node)]).isRequired,\n theme: PT.exact({\n breakpoints: PT.exact({\n keys: PT.arrayOf(PT.string),\n values: PT.exact(record(objectValues(Breakpoint), PT.number)),\n classes: PT.exact(record(objectValues(Breakpoint), PT.string)),\n getBreakpointClass: PT.func,\n up: PT.func,\n down: PT.func,\n between: PT.func,\n only: PT.func\n }),\n palette: PT.exact(record(objectValues(Color), PT.string)),\n shadows: PT.exact(record(objectValues(Shadows), PT.string)),\n shape: PT.exact({\n borderRadius: PT.exact(record(objectValues(BorderRadiusSize), PT.string))\n }),\n typography: PT.exact(_objectSpread({\n baseLineHeight: PT.oneOfType([PT.string, PT.number]),\n font: PT.exact(record(objectValues(FontVariant), PT.object))\n }, record(objectKeys(typography), PT.string)))\n })\n};\nexport default ThemeProvider;","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","var PI_OVER_180 = Math.PI / 180;\nfunction detectBrowser() {\n return (typeof window !== 'undefined' &&\n ({}.toString.call(window) === '[object Window]' ||\n {}.toString.call(window) === '[object global]'));\n}\nexport const glob = typeof global !== 'undefined'\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof WorkerGlobalScope !== 'undefined'\n ? self\n : {};\nexport const Konva = {\n _global: glob,\n version: '8.4.3',\n isBrowser: detectBrowser(),\n isUnminified: /param/.test(function (param) { }.toString()),\n dblClickWindow: 400,\n getAngle(angle) {\n return Konva.angleDeg ? angle * PI_OVER_180 : angle;\n },\n enableTrace: false,\n pointerEventsEnabled: true,\n autoDrawEnabled: true,\n hitOnDragEnabled: false,\n capturePointerEventsEnabled: false,\n _mouseListenClick: false,\n _touchListenClick: false,\n _pointerListenClick: false,\n _mouseInDblClickWindow: false,\n _touchInDblClickWindow: false,\n _pointerInDblClickWindow: false,\n _mouseDblClickPointerId: null,\n _touchDblClickPointerId: null,\n _pointerDblClickPointerId: null,\n pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1,\n dragDistance: 3,\n angleDeg: true,\n showWarnings: true,\n dragButtons: [0, 1],\n isDragging() {\n return Konva['DD'].isDragging;\n },\n isDragReady() {\n return !!Konva['DD'].node;\n },\n releaseCanvasOnDestroy: true,\n document: glob.document,\n _injectGlobal(Konva) {\n glob.Konva = Konva;\n },\n};\nexport const _registerNode = (NodeClass) => {\n Konva[NodeClass.prototype.getClassName()] = NodeClass;\n};\nKonva._injectGlobal(Konva);\n","import { Konva } from './Global.js';\nexport class Transform {\n constructor(m = [1, 0, 0, 1, 0, 0]) {\n this.dirty = false;\n this.m = (m && m.slice()) || [1, 0, 0, 1, 0, 0];\n }\n reset() {\n this.m[0] = 1;\n this.m[1] = 0;\n this.m[2] = 0;\n this.m[3] = 1;\n this.m[4] = 0;\n this.m[5] = 0;\n }\n copy() {\n return new Transform(this.m);\n }\n copyInto(tr) {\n tr.m[0] = this.m[0];\n tr.m[1] = this.m[1];\n tr.m[2] = this.m[2];\n tr.m[3] = this.m[3];\n tr.m[4] = this.m[4];\n tr.m[5] = this.m[5];\n }\n point(point) {\n var m = this.m;\n return {\n x: m[0] * point.x + m[2] * point.y + m[4],\n y: m[1] * point.x + m[3] * point.y + m[5],\n };\n }\n translate(x, y) {\n this.m[4] += this.m[0] * x + this.m[2] * y;\n this.m[5] += this.m[1] * x + this.m[3] * y;\n return this;\n }\n scale(sx, sy) {\n this.m[0] *= sx;\n this.m[1] *= sx;\n this.m[2] *= sy;\n this.m[3] *= sy;\n return this;\n }\n rotate(rad) {\n var c = Math.cos(rad);\n var s = Math.sin(rad);\n var m11 = this.m[0] * c + this.m[2] * s;\n var m12 = this.m[1] * c + this.m[3] * s;\n var m21 = this.m[0] * -s + this.m[2] * c;\n var m22 = this.m[1] * -s + this.m[3] * c;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n getTranslation() {\n return {\n x: this.m[4],\n y: this.m[5],\n };\n }\n skew(sx, sy) {\n var m11 = this.m[0] + this.m[2] * sy;\n var m12 = this.m[1] + this.m[3] * sy;\n var m21 = this.m[2] + this.m[0] * sx;\n var m22 = this.m[3] + this.m[1] * sx;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n multiply(matrix) {\n var m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];\n var m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];\n var m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];\n var m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];\n var dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];\n var dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n this.m[4] = dx;\n this.m[5] = dy;\n return this;\n }\n invert() {\n var d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);\n var m0 = this.m[3] * d;\n var m1 = -this.m[1] * d;\n var m2 = -this.m[2] * d;\n var m3 = this.m[0] * d;\n var m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);\n var m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);\n this.m[0] = m0;\n this.m[1] = m1;\n this.m[2] = m2;\n this.m[3] = m3;\n this.m[4] = m4;\n this.m[5] = m5;\n return this;\n }\n getMatrix() {\n return this.m;\n }\n decompose() {\n var a = this.m[0];\n var b = this.m[1];\n var c = this.m[2];\n var d = this.m[3];\n var e = this.m[4];\n var f = this.m[5];\n var delta = a * d - b * c;\n let result = {\n x: e,\n y: f,\n rotation: 0,\n scaleX: 0,\n scaleY: 0,\n skewX: 0,\n skewY: 0,\n };\n if (a != 0 || b != 0) {\n var r = Math.sqrt(a * a + b * b);\n result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);\n result.scaleX = r;\n result.scaleY = delta / r;\n result.skewX = (a * c + b * d) / delta;\n result.skewY = 0;\n }\n else if (c != 0 || d != 0) {\n var s = Math.sqrt(c * c + d * d);\n result.rotation =\n Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n result.scaleX = delta / s;\n result.scaleY = s;\n result.skewX = 0;\n result.skewY = (a * c + b * d) / delta;\n }\n else {\n }\n result.rotation = Util._getRotation(result.rotation);\n return result;\n }\n}\nvar OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 132, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 255, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n grey: [128, 128, 128],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 203],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n rebeccapurple: [102, 51, 153],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [119, 128, 144],\n slategrey: [119, 128, 144],\n snow: [255, 255, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n transparent: [255, 255, 255, 0],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 5],\n}, RGB_REGEX = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/, animQueue = [];\nconst req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||\n function (f) {\n setTimeout(f, 60);\n };\nexport const Util = {\n _isElement(obj) {\n return !!(obj && obj.nodeType == 1);\n },\n _isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n },\n _isPlainObject(obj) {\n return !!obj && obj.constructor === Object;\n },\n _isArray(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_ARRAY;\n },\n _isNumber(obj) {\n return (Object.prototype.toString.call(obj) === OBJECT_NUMBER &&\n !isNaN(obj) &&\n isFinite(obj));\n },\n _isString(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_STRING;\n },\n _isBoolean(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_BOOLEAN;\n },\n isObject(val) {\n return val instanceof Object;\n },\n isValidSelector(selector) {\n if (typeof selector !== 'string') {\n return false;\n }\n var firstChar = selector[0];\n return (firstChar === '#' ||\n firstChar === '.' ||\n firstChar === firstChar.toUpperCase());\n },\n _sign(number) {\n if (number === 0) {\n return 1;\n }\n if (number > 0) {\n return 1;\n }\n else {\n return -1;\n }\n },\n requestAnimFrame(callback) {\n animQueue.push(callback);\n if (animQueue.length === 1) {\n req(function () {\n const queue = animQueue;\n animQueue = [];\n queue.forEach(function (cb) {\n cb();\n });\n });\n }\n },\n createCanvasElement() {\n var canvas = document.createElement('canvas');\n try {\n canvas.style = canvas.style || {};\n }\n catch (e) { }\n return canvas;\n },\n createImageElement() {\n return document.createElement('img');\n },\n _isInDocument(el) {\n while ((el = el.parentNode)) {\n if (el == document) {\n return true;\n }\n }\n return false;\n },\n _urlToImage(url, callback) {\n var imageObj = Util.createImageElement();\n imageObj.onload = function () {\n callback(imageObj);\n };\n imageObj.src = url;\n },\n _rgbToHex(r, g, b) {\n return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n },\n _hexToRgb(hex) {\n hex = hex.replace(HASH, EMPTY_STRING);\n var bigint = parseInt(hex, 16);\n return {\n r: (bigint >> 16) & 255,\n g: (bigint >> 8) & 255,\n b: bigint & 255,\n };\n },\n getRandomColor() {\n var randColor = ((Math.random() * 0xffffff) << 0).toString(16);\n while (randColor.length < 6) {\n randColor = ZERO + randColor;\n }\n return HASH + randColor;\n },\n getRGB(color) {\n var rgb;\n if (color in COLORS) {\n rgb = COLORS[color];\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2],\n };\n }\n else if (color[0] === HASH) {\n return this._hexToRgb(color.substring(1));\n }\n else if (color.substr(0, 4) === RGB_PAREN) {\n rgb = RGB_REGEX.exec(color.replace(/ /g, ''));\n return {\n r: parseInt(rgb[1], 10),\n g: parseInt(rgb[2], 10),\n b: parseInt(rgb[3], 10),\n };\n }\n else {\n return {\n r: 0,\n g: 0,\n b: 0,\n };\n }\n },\n colorToRGBA(str) {\n str = str || 'black';\n return (Util._namedColorToRBA(str) ||\n Util._hex3ColorToRGBA(str) ||\n Util._hex4ColorToRGBA(str) ||\n Util._hex6ColorToRGBA(str) ||\n Util._hex8ColorToRGBA(str) ||\n Util._rgbColorToRGBA(str) ||\n Util._rgbaColorToRGBA(str) ||\n Util._hslColorToRGBA(str));\n },\n _namedColorToRBA(str) {\n var c = COLORS[str.toLowerCase()];\n if (!c) {\n return null;\n }\n return {\n r: c[0],\n g: c[1],\n b: c[2],\n a: 1,\n };\n },\n _rgbColorToRGBA(str) {\n if (str.indexOf('rgb(') === 0) {\n str = str.match(/rgb\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map(Number);\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: 1,\n };\n }\n },\n _rgbaColorToRGBA(str) {\n if (str.indexOf('rgba(') === 0) {\n str = str.match(/rgba\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map((n, index) => {\n if (n.slice(-1) === '%') {\n return index === 3 ? parseInt(n) / 100 : (parseInt(n) / 100) * 255;\n }\n return Number(n);\n });\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: parts[3],\n };\n }\n },\n _hex8ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 9) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: parseInt(str.slice(7, 9), 16) / 0xff,\n };\n }\n },\n _hex6ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 7) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: 1,\n };\n }\n },\n _hex4ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 5) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: parseInt(str[4] + str[4], 16) / 0xff,\n };\n }\n },\n _hex3ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 4) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: 1,\n };\n }\n },\n _hslColorToRGBA(str) {\n if (/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.test(str)) {\n const [_, ...hsl] = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(str);\n const h = Number(hsl[0]) / 360;\n const s = Number(hsl[1]) / 100;\n const l = Number(hsl[2]) / 100;\n let t2;\n let t3;\n let val;\n if (s === 0) {\n val = l * 255;\n return {\n r: Math.round(val),\n g: Math.round(val),\n b: Math.round(val),\n a: 1,\n };\n }\n if (l < 0.5) {\n t2 = l * (1 + s);\n }\n else {\n t2 = l + s - l * s;\n }\n const t1 = 2 * l - t2;\n const rgb = [0, 0, 0];\n for (let i = 0; i < 3; i++) {\n t3 = h + (1 / 3) * -(i - 1);\n if (t3 < 0) {\n t3++;\n }\n if (t3 > 1) {\n t3--;\n }\n if (6 * t3 < 1) {\n val = t1 + (t2 - t1) * 6 * t3;\n }\n else if (2 * t3 < 1) {\n val = t2;\n }\n else if (3 * t3 < 2) {\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n }\n else {\n val = t1;\n }\n rgb[i] = val * 255;\n }\n return {\n r: Math.round(rgb[0]),\n g: Math.round(rgb[1]),\n b: Math.round(rgb[2]),\n a: 1,\n };\n }\n },\n haveIntersection(r1, r2) {\n return !(r2.x > r1.x + r1.width ||\n r2.x + r2.width < r1.x ||\n r2.y > r1.y + r1.height ||\n r2.y + r2.height < r1.y);\n },\n cloneObject(obj) {\n var retObj = {};\n for (var key in obj) {\n if (this._isPlainObject(obj[key])) {\n retObj[key] = this.cloneObject(obj[key]);\n }\n else if (this._isArray(obj[key])) {\n retObj[key] = this.cloneArray(obj[key]);\n }\n else {\n retObj[key] = obj[key];\n }\n }\n return retObj;\n },\n cloneArray(arr) {\n return arr.slice(0);\n },\n degToRad(deg) {\n return deg * PI_OVER_DEG180;\n },\n radToDeg(rad) {\n return rad * DEG180_OVER_PI;\n },\n _degToRad(deg) {\n Util.warn('Util._degToRad is removed. Please use public Util.degToRad instead.');\n return Util.degToRad(deg);\n },\n _radToDeg(rad) {\n Util.warn('Util._radToDeg is removed. Please use public Util.radToDeg instead.');\n return Util.radToDeg(rad);\n },\n _getRotation(radians) {\n return Konva.angleDeg ? Util.radToDeg(radians) : radians;\n },\n _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n throw(str) {\n throw new Error(KONVA_ERROR + str);\n },\n error(str) {\n console.error(KONVA_ERROR + str);\n },\n warn(str) {\n if (!Konva.showWarnings) {\n return;\n }\n console.warn(KONVA_WARNING + str);\n },\n each(obj, func) {\n for (var key in obj) {\n func(key, obj[key]);\n }\n },\n _inRange(val, left, right) {\n return left <= val && val < right;\n },\n _getProjectionToSegment(x1, y1, x2, y2, x3, y3) {\n var x, y, dist;\n var pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);\n if (pd2 == 0) {\n x = x1;\n y = y1;\n dist = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);\n }\n else {\n var u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;\n if (u < 0) {\n x = x1;\n y = y1;\n dist = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);\n }\n else if (u > 1.0) {\n x = x2;\n y = y2;\n dist = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);\n }\n else {\n x = x1 + u * (x2 - x1);\n y = y1 + u * (y2 - y1);\n dist = (x - x3) * (x - x3) + (y - y3) * (y - y3);\n }\n }\n return [x, y, dist];\n },\n _getProjectionToLine(pt, line, isClosed) {\n var pc = Util.cloneObject(pt);\n var dist = Number.MAX_VALUE;\n line.forEach(function (p1, i) {\n if (!isClosed && i === line.length - 1) {\n return;\n }\n var p2 = line[(i + 1) % line.length];\n var proj = Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);\n var px = proj[0], py = proj[1], pdist = proj[2];\n if (pdist < dist) {\n pc.x = px;\n pc.y = py;\n dist = pdist;\n }\n });\n return pc;\n },\n _prepareArrayForTween(startArray, endArray, isClosed) {\n var n, start = [], end = [];\n if (startArray.length > endArray.length) {\n var temp = endArray;\n endArray = startArray;\n startArray = temp;\n }\n for (n = 0; n < startArray.length; n += 2) {\n start.push({\n x: startArray[n],\n y: startArray[n + 1],\n });\n }\n for (n = 0; n < endArray.length; n += 2) {\n end.push({\n x: endArray[n],\n y: endArray[n + 1],\n });\n }\n var newStart = [];\n end.forEach(function (point) {\n var pr = Util._getProjectionToLine(point, start, isClosed);\n newStart.push(pr.x);\n newStart.push(pr.y);\n });\n return newStart;\n },\n _prepareToStringify(obj) {\n var desc;\n obj.visitedByCircularReferenceRemoval = true;\n for (var key in obj) {\n if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {\n continue;\n }\n desc = Object.getOwnPropertyDescriptor(obj, key);\n if (obj[key].visitedByCircularReferenceRemoval ||\n Util._isElement(obj[key])) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n else if (Util._prepareToStringify(obj[key]) === null) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n }\n delete obj.visitedByCircularReferenceRemoval;\n return obj;\n },\n _assign(target, source) {\n for (var key in source) {\n target[key] = source[key];\n }\n return target;\n },\n _getFirstPointerId(evt) {\n if (!evt.touches) {\n return evt.pointerId || 999;\n }\n else {\n return evt.changedTouches[0].identifier;\n }\n },\n releaseCanvas(...canvases) {\n if (!Konva.releaseCanvasOnDestroy)\n return;\n canvases.forEach(c => {\n c.width = 0;\n c.height = 0;\n });\n },\n drawRoundedRectPath(context, width, height, cornerRadius) {\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft = topRight = bottomLeft = bottomRight = Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.moveTo(topLeft, 0);\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n }\n};\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nfunction _formatValue(val) {\n if (Util._isString(val)) {\n return '\"' + val + '\"';\n }\n if (Object.prototype.toString.call(val) === '[object Number]') {\n return val;\n }\n if (Util._isBoolean(val)) {\n return val;\n }\n return Object.prototype.toString.call(val);\n}\nexport function RGBComponent(val) {\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n return Math.round(val);\n}\nexport function alphaComponent(val) {\n if (val > 1) {\n return 1;\n }\n else if (val < 0.0001) {\n return 0.0001;\n }\n return val;\n}\nexport function getNumberValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isNumber(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number.');\n }\n return val;\n };\n }\n}\nexport function getNumberOrArrayOfNumbersValidator(noOfElements) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n let isNumber = Util._isNumber(val);\n let isValidArray = Util._isArray(val) && val.length == noOfElements;\n if (!isNumber && !isValidArray) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or Array(' +\n noOfElements +\n ')');\n }\n return val;\n };\n }\n}\nexport function getNumberOrAutoValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isNumber = Util._isNumber(val);\n var isAuto = val === 'auto';\n if (!(isNumber || isAuto)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or \"auto\".');\n }\n return val;\n };\n }\n}\nexport function getStringValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isString(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string.');\n }\n return val;\n };\n }\n}\nexport function getStringOrGradientValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const isString = Util._isString(val);\n const isGradient = Object.prototype.toString.call(val) === '[object CanvasGradient]' ||\n (val && val.addColorStop);\n if (!(isString || isGradient)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string or a native gradient.');\n }\n return val;\n };\n }\n}\nexport function getFunctionValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isFunction(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a function.');\n }\n return val;\n };\n }\n}\nexport function getNumberArrayValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null;\n if (TypedArray && val instanceof TypedArray) {\n return val;\n }\n if (!Util._isArray(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a array of numbers.');\n }\n else {\n val.forEach(function (item) {\n if (!Util._isNumber(item)) {\n Util.warn('\"' +\n attr +\n '\" attribute has non numeric element ' +\n item +\n '. Make sure that all elements are numbers.');\n }\n });\n }\n return val;\n };\n }\n}\nexport function getBooleanValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isBool = val === true || val === false;\n if (!isBool) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a boolean.');\n }\n return val;\n };\n }\n}\nexport function getComponentValidator(components) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (val === undefined || val === null) {\n return val;\n }\n if (!Util.isObject(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be an object with properties ' +\n components);\n }\n return val;\n };\n }\n}\n","import { Util } from './Util.js';\nimport { getComponentValidator } from './Validators.js';\nvar GET = 'get', SET = 'set';\nexport const Factory = {\n addGetterSetter(constructor, attr, def, validator, after) {\n Factory.addGetter(constructor, attr, def);\n Factory.addSetter(constructor, attr, validator, after);\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addGetter(constructor, attr, def) {\n var method = GET + Util._capitalize(attr);\n constructor.prototype[method] =\n constructor.prototype[method] ||\n function () {\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n },\n addSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n if (!constructor.prototype[method]) {\n Factory.overWriteSetter(constructor, attr, validator, after);\n }\n },\n overWriteSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n constructor.prototype[method] = function (val) {\n if (validator && val !== undefined && val !== null) {\n val = validator.call(this, val, attr);\n }\n this._setAttr(attr, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n },\n addComponentsGetterSetter(constructor, attr, components, validator, after) {\n var len = components.length, capitalize = Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;\n constructor.prototype[getter] = function () {\n var ret = {};\n for (n = 0; n < len; n++) {\n component = components[n];\n ret[component] = this.getAttr(attr + capitalize(component));\n }\n return ret;\n };\n var basicValidator = getComponentValidator(components);\n constructor.prototype[setter] = function (val) {\n var oldVal = this.attrs[attr], key;\n if (validator) {\n val = validator.call(this, val);\n }\n if (basicValidator) {\n basicValidator.call(this, val, attr);\n }\n for (key in val) {\n if (!val.hasOwnProperty(key)) {\n continue;\n }\n this._setAttr(attr + capitalize(key), val[key]);\n }\n if (!val) {\n components.forEach((component) => {\n this._setAttr(attr + capitalize(component), undefined);\n });\n }\n this._fireChangeEvent(attr, oldVal, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addOverloadedGetterSetter(constructor, attr) {\n var capitalizedAttr = Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;\n constructor.prototype[attr] = function () {\n if (arguments.length) {\n this[setter](arguments[0]);\n return this;\n }\n return this[getter]();\n };\n },\n addDeprecatedGetterSetter(constructor, attr, def, validator) {\n Util.error('Adding deprecated ' + attr);\n var method = GET + Util._capitalize(attr);\n var message = attr +\n ' property is deprecated and will be removed soon. Look at Konva change log for more information.';\n constructor.prototype[method] = function () {\n Util.error(message);\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n Factory.addSetter(constructor, attr, validator, function () {\n Util.error(message);\n });\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n backCompat(constructor, methods) {\n Util.each(methods, function (oldMethodName, newMethodName) {\n var method = constructor.prototype[newMethodName];\n var oldGetter = GET + Util._capitalize(oldMethodName);\n var oldSetter = SET + Util._capitalize(oldMethodName);\n function deprecated() {\n method.apply(this, arguments);\n Util.error('\"' +\n oldMethodName +\n '\" method is deprecated and will be removed soon. Use \"\"' +\n newMethodName +\n '\" instead.');\n }\n constructor.prototype[oldMethodName] = deprecated;\n constructor.prototype[oldGetter] = deprecated;\n constructor.prototype[oldSetter] = deprecated;\n });\n },\n afterSetFilter() {\n this._filterUpToDate = false;\n },\n};\n","import { Util } from './Util.js';\nimport { Konva } from './Global.js';\nfunction simplifyArray(arr) {\n var retArr = [], len = arr.length, util = Util, n, val;\n for (n = 0; n < len; n++) {\n val = arr[n];\n if (util._isNumber(val)) {\n val = Math.round(val * 1000) / 1000;\n }\n else if (!util._isString(val)) {\n val = val + '';\n }\n retArr.push(val);\n }\n return retArr;\n}\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n 'arc',\n 'arcTo',\n 'beginPath',\n 'bezierCurveTo',\n 'clearRect',\n 'clip',\n 'closePath',\n 'createLinearGradient',\n 'createPattern',\n 'createRadialGradient',\n 'drawImage',\n 'ellipse',\n 'fill',\n 'fillText',\n 'getImageData',\n 'createImageData',\n 'lineTo',\n 'moveTo',\n 'putImageData',\n 'quadraticCurveTo',\n 'rect',\n 'restore',\n 'rotate',\n 'save',\n 'scale',\n 'setLineDash',\n 'setTransform',\n 'stroke',\n 'strokeText',\n 'transform',\n 'translate',\n];\nvar CONTEXT_PROPERTIES = [\n 'fillStyle',\n 'strokeStyle',\n 'shadowColor',\n 'shadowBlur',\n 'shadowOffsetX',\n 'shadowOffsetY',\n 'lineCap',\n 'lineDashOffset',\n 'lineJoin',\n 'lineWidth',\n 'miterLimit',\n 'font',\n 'textAlign',\n 'textBaseline',\n 'globalAlpha',\n 'globalCompositeOperation',\n 'imageSmoothingEnabled',\n];\nconst traceArrMax = 100;\nexport class Context {\n constructor(canvas) {\n this.canvas = canvas;\n if (Konva.enableTrace) {\n this.traceArr = [];\n this._enableTrace();\n }\n }\n fillShape(shape) {\n if (shape.fillEnabled()) {\n this._fill(shape);\n }\n }\n _fill(shape) {\n }\n strokeShape(shape) {\n if (shape.hasStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n }\n fillStrokeShape(shape) {\n if (shape.attrs.fillAfterStrokeEnabled) {\n this.strokeShape(shape);\n this.fillShape(shape);\n }\n else {\n this.fillShape(shape);\n this.strokeShape(shape);\n }\n }\n getTrace(relaxed, rounded) {\n var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n for (n = 0; n < len; n++) {\n trace = traceArr[n];\n method = trace.method;\n if (method) {\n args = trace.args;\n str += method;\n if (relaxed) {\n str += DOUBLE_PAREN;\n }\n else {\n if (Util._isArray(args[0])) {\n str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n }\n else {\n if (rounded) {\n args = args.map((a) => typeof a === 'number' ? Math.floor(a) : a);\n }\n str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n }\n }\n }\n else {\n str += trace.property;\n if (!relaxed) {\n str += EQUALS + trace.val;\n }\n }\n str += SEMICOLON;\n }\n return str;\n }\n clearTrace() {\n this.traceArr = [];\n }\n _trace(str) {\n var traceArr = this.traceArr, len;\n traceArr.push(str);\n len = traceArr.length;\n if (len >= traceArrMax) {\n traceArr.shift();\n }\n }\n reset() {\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n }\n getCanvas() {\n return this.canvas;\n }\n clear(bounds) {\n var canvas = this.getCanvas();\n if (bounds) {\n this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n }\n else {\n this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n }\n }\n _applyLineCap(shape) {\n const lineCap = shape.attrs.lineCap;\n if (lineCap) {\n this.setAttr('lineCap', lineCap);\n }\n }\n _applyOpacity(shape) {\n var absOpacity = shape.getAbsoluteOpacity();\n if (absOpacity !== 1) {\n this.setAttr('globalAlpha', absOpacity);\n }\n }\n _applyLineJoin(shape) {\n const lineJoin = shape.attrs.lineJoin;\n if (lineJoin) {\n this.setAttr('lineJoin', lineJoin);\n }\n }\n setAttr(attr, val) {\n this._context[attr] = val;\n }\n arc(a0, a1, a2, a3, a4, a5) {\n this._context.arc(a0, a1, a2, a3, a4, a5);\n }\n arcTo(a0, a1, a2, a3, a4) {\n this._context.arcTo(a0, a1, a2, a3, a4);\n }\n beginPath() {\n this._context.beginPath();\n }\n bezierCurveTo(a0, a1, a2, a3, a4, a5) {\n this._context.bezierCurveTo(a0, a1, a2, a3, a4, a5);\n }\n clearRect(a0, a1, a2, a3) {\n this._context.clearRect(a0, a1, a2, a3);\n }\n clip() {\n this._context.clip();\n }\n closePath() {\n this._context.closePath();\n }\n createImageData(a0, a1) {\n var a = arguments;\n if (a.length === 2) {\n return this._context.createImageData(a0, a1);\n }\n else if (a.length === 1) {\n return this._context.createImageData(a0);\n }\n }\n createLinearGradient(a0, a1, a2, a3) {\n return this._context.createLinearGradient(a0, a1, a2, a3);\n }\n createPattern(a0, a1) {\n return this._context.createPattern(a0, a1);\n }\n createRadialGradient(a0, a1, a2, a3, a4, a5) {\n return this._context.createRadialGradient(a0, a1, a2, a3, a4, a5);\n }\n drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n var a = arguments, _context = this._context;\n if (a.length === 3) {\n _context.drawImage(a0, a1, a2);\n }\n else if (a.length === 5) {\n _context.drawImage(a0, a1, a2, a3, a4);\n }\n else if (a.length === 9) {\n _context.drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8);\n }\n }\n ellipse(a0, a1, a2, a3, a4, a5, a6, a7) {\n this._context.ellipse(a0, a1, a2, a3, a4, a5, a6, a7);\n }\n isPointInPath(x, y, path, fillRule) {\n if (path) {\n return this._context.isPointInPath(path, x, y, fillRule);\n }\n return this._context.isPointInPath(x, y, fillRule);\n }\n fill(path2d) {\n if (path2d) {\n this._context.fill(path2d);\n }\n else {\n this._context.fill();\n }\n }\n fillRect(x, y, width, height) {\n this._context.fillRect(x, y, width, height);\n }\n strokeRect(x, y, width, height) {\n this._context.strokeRect(x, y, width, height);\n }\n fillText(text, x, y, maxWidth) {\n if (maxWidth) {\n this._context.fillText(text, x, y, maxWidth);\n }\n else {\n this._context.fillText(text, x, y);\n }\n }\n measureText(text) {\n return this._context.measureText(text);\n }\n getImageData(a0, a1, a2, a3) {\n return this._context.getImageData(a0, a1, a2, a3);\n }\n lineTo(a0, a1) {\n this._context.lineTo(a0, a1);\n }\n moveTo(a0, a1) {\n this._context.moveTo(a0, a1);\n }\n rect(a0, a1, a2, a3) {\n this._context.rect(a0, a1, a2, a3);\n }\n putImageData(a0, a1, a2) {\n this._context.putImageData(a0, a1, a2);\n }\n quadraticCurveTo(a0, a1, a2, a3) {\n this._context.quadraticCurveTo(a0, a1, a2, a3);\n }\n restore() {\n this._context.restore();\n }\n rotate(a0) {\n this._context.rotate(a0);\n }\n save() {\n this._context.save();\n }\n scale(a0, a1) {\n this._context.scale(a0, a1);\n }\n setLineDash(a0) {\n if (this._context.setLineDash) {\n this._context.setLineDash(a0);\n }\n else if ('mozDash' in this._context) {\n this._context['mozDash'] = a0;\n }\n else if ('webkitLineDash' in this._context) {\n this._context['webkitLineDash'] = a0;\n }\n }\n getLineDash() {\n return this._context.getLineDash();\n }\n setTransform(a0, a1, a2, a3, a4, a5) {\n this._context.setTransform(a0, a1, a2, a3, a4, a5);\n }\n stroke(path2d) {\n if (path2d) {\n this._context.stroke(path2d);\n }\n else {\n this._context.stroke();\n }\n }\n strokeText(a0, a1, a2, a3) {\n this._context.strokeText(a0, a1, a2, a3);\n }\n transform(a0, a1, a2, a3, a4, a5) {\n this._context.transform(a0, a1, a2, a3, a4, a5);\n }\n translate(a0, a1) {\n this._context.translate(a0, a1);\n }\n _enableTrace() {\n var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;\n var func = function (methodName) {\n var origMethod = that[methodName], ret;\n that[methodName] = function () {\n args = simplifyArray(Array.prototype.slice.call(arguments, 0));\n ret = origMethod.apply(that, arguments);\n that._trace({\n method: methodName,\n args: args,\n });\n return ret;\n };\n };\n for (n = 0; n < len; n++) {\n func(CONTEXT_METHODS[n]);\n }\n that.setAttr = function () {\n origSetter.apply(that, arguments);\n var prop = arguments[0];\n var val = arguments[1];\n if (prop === 'shadowOffsetX' ||\n prop === 'shadowOffsetY' ||\n prop === 'shadowBlur') {\n val = val / this.canvas.getPixelRatio();\n }\n that._trace({\n property: prop,\n val: val,\n });\n };\n }\n _applyGlobalCompositeOperation(node) {\n const op = node.attrs.globalCompositeOperation;\n var def = !op || op === 'source-over';\n if (!def) {\n this.setAttr('globalCompositeOperation', op);\n }\n }\n}\nCONTEXT_PROPERTIES.forEach(function (prop) {\n Object.defineProperty(Context.prototype, prop, {\n get() {\n return this._context[prop];\n },\n set(val) {\n this._context[prop] = val;\n },\n });\n});\nexport class SceneContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d');\n }\n _fillColor(shape) {\n var fill = shape.fill();\n this.setAttr('fillStyle', fill);\n shape._fillFunc(this);\n }\n _fillPattern(shape) {\n this.setAttr('fillStyle', shape._getFillPattern());\n shape._fillFunc(this);\n }\n _fillLinearGradient(shape) {\n var grd = shape._getLinearGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fillRadialGradient(shape) {\n const grd = shape._getRadialGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fill(shape) {\n const hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n if (hasColor && fillPriority === 'color') {\n this._fillColor(shape);\n return;\n }\n const hasPattern = shape.getFillPatternImage();\n if (hasPattern && fillPriority === 'pattern') {\n this._fillPattern(shape);\n return;\n }\n const hasLinearGradient = shape.getFillLinearGradientColorStops();\n if (hasLinearGradient && fillPriority === 'linear-gradient') {\n this._fillLinearGradient(shape);\n return;\n }\n const hasRadialGradient = shape.getFillRadialGradientColorStops();\n if (hasRadialGradient && fillPriority === 'radial-gradient') {\n this._fillRadialGradient(shape);\n return;\n }\n if (hasColor) {\n this._fillColor(shape);\n }\n else if (hasPattern) {\n this._fillPattern(shape);\n }\n else if (hasLinearGradient) {\n this._fillLinearGradient(shape);\n }\n else if (hasRadialGradient) {\n this._fillRadialGradient(shape);\n }\n }\n _strokeLinearGradient(shape) {\n const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n if (colorStops) {\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n this.setAttr('strokeStyle', grd);\n }\n }\n _stroke(shape) {\n var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (shape.hasStroke()) {\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n if (dash && shape.dashEnabled()) {\n this.setLineDash(dash);\n this.setAttr('lineDashOffset', shape.dashOffset());\n }\n this.setAttr('lineWidth', shape.strokeWidth());\n if (!shape.getShadowForStrokeEnabled()) {\n this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n }\n var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n if (hasLinearGradient) {\n this._strokeLinearGradient(shape);\n }\n else {\n this.setAttr('strokeStyle', shape.stroke());\n }\n shape._strokeFunc(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n _applyShadow(shape) {\n var _a, _b, _c;\n var color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {\n x: 0,\n y: 0,\n }, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n this.setAttr('shadowColor', color);\n this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n this.setAttr('shadowOffsetX', offset.x * scaleX);\n this.setAttr('shadowOffsetY', offset.y * scaleY);\n }\n}\nexport class HitContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d', {\n willReadFrequently: true,\n });\n }\n _fill(shape) {\n this.save();\n this.setAttr('fillStyle', shape.colorKey);\n shape._fillFuncHit(this);\n this.restore();\n }\n strokeShape(shape) {\n if (shape.hasHitStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n if (shape.hasHitStroke()) {\n const strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n var hitStrokeWidth = shape.hitStrokeWidth();\n var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n this.setAttr('lineWidth', strokeWidth);\n this.setAttr('strokeStyle', shape.colorKey);\n shape._strokeFuncHit(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n}\n","import { Util } from './Util.js';\nimport { SceneContext, HitContext } from './Context.js';\nimport { Konva } from './Global.js';\nimport { Factory } from './Factory.js';\nimport { getNumberValidator } from './Validators.js';\nvar _pixelRatio;\nfunction getDevicePixelRatio() {\n if (_pixelRatio) {\n return _pixelRatio;\n }\n var canvas = Util.createCanvasElement();\n var context = canvas.getContext('2d');\n _pixelRatio = (function () {\n var devicePixelRatio = Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n context.mozBackingStorePixelRatio ||\n context.msBackingStorePixelRatio ||\n context.oBackingStorePixelRatio ||\n context.backingStorePixelRatio ||\n 1;\n return devicePixelRatio / backingStoreRatio;\n })();\n Util.releaseCanvas(canvas);\n return _pixelRatio;\n}\nexport class Canvas {\n constructor(config) {\n this.pixelRatio = 1;\n this.width = 0;\n this.height = 0;\n this.isCache = false;\n var conf = config || {};\n var pixelRatio = conf.pixelRatio || Konva.pixelRatio || getDevicePixelRatio();\n this.pixelRatio = pixelRatio;\n this._canvas = Util.createCanvasElement();\n this._canvas.style.padding = '0';\n this._canvas.style.margin = '0';\n this._canvas.style.border = '0';\n this._canvas.style.background = 'transparent';\n this._canvas.style.position = 'absolute';\n this._canvas.style.top = '0';\n this._canvas.style.left = '0';\n }\n getContext() {\n return this.context;\n }\n getPixelRatio() {\n return this.pixelRatio;\n }\n setPixelRatio(pixelRatio) {\n var previousRatio = this.pixelRatio;\n this.pixelRatio = pixelRatio;\n this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n }\n setWidth(width) {\n this.width = this._canvas.width = width * this.pixelRatio;\n this._canvas.style.width = width + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n setHeight(height) {\n this.height = this._canvas.height = height * this.pixelRatio;\n this._canvas.style.height = height + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n getWidth() {\n return this.width;\n }\n getHeight() {\n return this.height;\n }\n setSize(width, height) {\n this.setWidth(width || 0);\n this.setHeight(height || 0);\n }\n toDataURL(mimeType, quality) {\n try {\n return this._canvas.toDataURL(mimeType, quality);\n }\n catch (e) {\n try {\n return this._canvas.toDataURL();\n }\n catch (err) {\n Util.error('Unable to get data URL. ' +\n err.message +\n ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n return '';\n }\n }\n }\n}\nFactory.addGetterSetter(Canvas, 'pixelRatio', undefined, getNumberValidator());\nexport class SceneCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.context = new SceneContext(this);\n this.setSize(config.width, config.height);\n }\n}\nexport class HitCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.hitCanvas = true;\n this.context = new HitContext(this);\n this.setSize(config.width, config.height);\n }\n}\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nexport const DD = {\n get isDragging() {\n var flag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus === 'dragging') {\n flag = true;\n }\n });\n return flag;\n },\n justDragged: false,\n get node() {\n var node;\n DD._dragElements.forEach((elem) => {\n node = elem.node;\n });\n return node;\n },\n _dragElements: new Map(),\n _drag(evt) {\n const nodesToFireEvents = [];\n DD._dragElements.forEach((elem, key) => {\n const { node } = elem;\n const stage = node.getStage();\n stage.setPointersPositions(evt);\n if (elem.pointerId === undefined) {\n elem.pointerId = Util._getFirstPointerId(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus !== 'dragging') {\n var dragDistance = node.dragDistance();\n var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n if (distance < dragDistance) {\n return;\n }\n node.startDrag({ evt });\n if (!node.isDragging()) {\n return;\n }\n }\n node._setDragPosition(evt, elem);\n nodesToFireEvents.push(node);\n });\n nodesToFireEvents.forEach((node) => {\n node.fire('dragmove', {\n type: 'dragmove',\n target: node,\n evt: evt,\n }, true);\n });\n },\n _endDragBefore(evt) {\n const drawNodes = [];\n DD._dragElements.forEach((elem) => {\n const { node } = elem;\n const stage = node.getStage();\n if (evt) {\n stage.setPointersPositions(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n DD.justDragged = true;\n Konva._mouseListenClick = false;\n Konva._touchListenClick = false;\n Konva._pointerListenClick = false;\n elem.dragStatus = 'stopped';\n }\n const drawNode = elem.node.getLayer() ||\n (elem.node instanceof Konva['Stage'] && elem.node);\n if (drawNode && drawNodes.indexOf(drawNode) === -1) {\n drawNodes.push(drawNode);\n }\n });\n drawNodes.forEach((drawNode) => {\n drawNode.draw();\n });\n },\n _endDragAfter(evt) {\n DD._dragElements.forEach((elem, key) => {\n if (elem.dragStatus === 'stopped') {\n elem.node.fire('dragend', {\n type: 'dragend',\n target: elem.node,\n evt: evt,\n }, true);\n }\n if (elem.dragStatus !== 'dragging') {\n DD._dragElements.delete(key);\n }\n });\n },\n};\nif (Konva.isBrowser) {\n window.addEventListener('mouseup', DD._endDragBefore, true);\n window.addEventListener('touchend', DD._endDragBefore, true);\n window.addEventListener('mousemove', DD._drag);\n window.addEventListener('touchmove', DD._drag);\n window.addEventListener('mouseup', DD._endDragAfter, false);\n window.addEventListener('touchend', DD._endDragAfter, false);\n}\n","import { Util, Transform } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { Konva } from './Global.js';\nimport { DD } from './DragAndDrop.js';\nimport { getNumberValidator, getStringValidator, getBooleanValidator, } from './Validators.js';\nvar ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [\n 'xChange.konva',\n 'yChange.konva',\n 'scaleXChange.konva',\n 'scaleYChange.konva',\n 'skewXChange.konva',\n 'skewYChange.konva',\n 'rotationChange.konva',\n 'offsetXChange.konva',\n 'offsetYChange.konva',\n 'transformsEnabledChange.konva',\n].join(SPACE);\nlet idCounter = 1;\nexport class Node {\n constructor(config) {\n this._id = idCounter++;\n this.eventListeners = {};\n this.attrs = {};\n this.index = 0;\n this._allEventListeners = null;\n this.parent = null;\n this._cache = new Map();\n this._attachedDepsListeners = new Map();\n this._lastPos = null;\n this._batchingTransformChange = false;\n this._needClearTransformCache = false;\n this._filterUpToDate = false;\n this._isUnderCache = false;\n this._dragEventId = null;\n this._shouldFireChangeEvents = false;\n this.setAttrs(config);\n this._shouldFireChangeEvents = true;\n }\n hasChildren() {\n return false;\n }\n _clearCache(attr) {\n if ((attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM) &&\n this._cache.get(attr)) {\n this._cache.get(attr).dirty = true;\n }\n else if (attr) {\n this._cache.delete(attr);\n }\n else {\n this._cache.clear();\n }\n }\n _getCache(attr, privateGetter) {\n var cache = this._cache.get(attr);\n var isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;\n var invalid = cache === undefined || (isTransform && cache.dirty === true);\n if (invalid) {\n cache = privateGetter.call(this);\n this._cache.set(attr, cache);\n }\n return cache;\n }\n _calculate(name, deps, getter) {\n if (!this._attachedDepsListeners.get(name)) {\n const depsString = deps.map((dep) => dep + 'Change.konva').join(SPACE);\n this.on(depsString, () => {\n this._clearCache(name);\n });\n this._attachedDepsListeners.set(name, true);\n }\n return this._getCache(name, getter);\n }\n _getCanvasCache() {\n return this._cache.get(CANVAS);\n }\n _clearSelfAndDescendantCache(attr) {\n this._clearCache(attr);\n if (attr === ABSOLUTE_TRANSFORM) {\n this.fire('absoluteTransformChange');\n }\n }\n clearCache() {\n if (this._cache.has(CANVAS)) {\n const { scene, filter, hit } = this._cache.get(CANVAS);\n Util.releaseCanvas(scene, filter, hit);\n this._cache.delete(CANVAS);\n }\n this._clearSelfAndDescendantCache();\n this._requestDraw();\n return this;\n }\n cache(config) {\n var conf = config || {};\n var rect = {};\n if (conf.x === undefined ||\n conf.y === undefined ||\n conf.width === undefined ||\n conf.height === undefined) {\n rect = this.getClientRect({\n skipTransform: true,\n relativeTo: this.getParent(),\n });\n }\n var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;\n if (!width || !height) {\n Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');\n return;\n }\n width += offset * 2 + 1;\n height += offset * 2 + 1;\n x -= offset;\n y -= offset;\n var cachedSceneCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: width,\n height: height,\n }), cachedFilterCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: 0,\n height: 0,\n }), cachedHitCanvas = new HitCanvas({\n pixelRatio: hitCanvasPixelRatio,\n width: width,\n height: height,\n }), sceneContext = cachedSceneCanvas.getContext(), hitContext = cachedHitCanvas.getContext();\n cachedHitCanvas.isCache = true;\n cachedSceneCanvas.isCache = true;\n this._cache.delete(CANVAS);\n this._filterUpToDate = false;\n if (conf.imageSmoothingEnabled === false) {\n cachedSceneCanvas.getContext()._context.imageSmoothingEnabled = false;\n cachedFilterCanvas.getContext()._context.imageSmoothingEnabled = false;\n }\n sceneContext.save();\n hitContext.save();\n sceneContext.translate(-x, -y);\n hitContext.translate(-x, -y);\n this._isUnderCache = true;\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this.drawScene(cachedSceneCanvas, this);\n this.drawHit(cachedHitCanvas, this);\n this._isUnderCache = false;\n sceneContext.restore();\n hitContext.restore();\n if (drawBorder) {\n sceneContext.save();\n sceneContext.beginPath();\n sceneContext.rect(0, 0, width, height);\n sceneContext.closePath();\n sceneContext.setAttr('strokeStyle', 'red');\n sceneContext.setAttr('lineWidth', 5);\n sceneContext.stroke();\n sceneContext.restore();\n }\n this._cache.set(CANVAS, {\n scene: cachedSceneCanvas,\n filter: cachedFilterCanvas,\n hit: cachedHitCanvas,\n x: x,\n y: y,\n });\n this._requestDraw();\n return this;\n }\n isCached() {\n return this._cache.has(CANVAS);\n }\n getClientRect(config) {\n throw new Error('abstract \"getClientRect\" method call');\n }\n _transformedRect(rect, top) {\n var points = [\n { x: rect.x, y: rect.y },\n { x: rect.x + rect.width, y: rect.y },\n { x: rect.x + rect.width, y: rect.y + rect.height },\n { x: rect.x, y: rect.y + rect.height },\n ];\n var minX, minY, maxX, maxY;\n var trans = this.getAbsoluteTransform(top);\n points.forEach(function (point) {\n var transformed = trans.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n _drawCachedSceneCanvas(context) {\n context.save();\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n const canvasCache = this._getCanvasCache();\n context.translate(canvasCache.x, canvasCache.y);\n var cacheCanvas = this._getCachedSceneCanvas();\n var ratio = cacheCanvas.pixelRatio;\n context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);\n context.restore();\n }\n _drawCachedHitCanvas(context) {\n var canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;\n context.save();\n context.translate(canvasCache.x, canvasCache.y);\n context.drawImage(hitCanvas._canvas, 0, 0, hitCanvas.width / hitCanvas.pixelRatio, hitCanvas.height / hitCanvas.pixelRatio);\n context.restore();\n }\n _getCachedSceneCanvas() {\n var filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;\n if (filters) {\n if (!this._filterUpToDate) {\n var ratio = sceneCanvas.pixelRatio;\n filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);\n try {\n len = filters.length;\n filterContext.clear();\n filterContext.drawImage(sceneCanvas._canvas, 0, 0, sceneCanvas.getWidth() / ratio, sceneCanvas.getHeight() / ratio);\n imageData = filterContext.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());\n for (n = 0; n < len; n++) {\n filter = filters[n];\n if (typeof filter !== 'function') {\n Util.error('Filter should be type of function, but got ' +\n typeof filter +\n ' instead. Please check correct filters');\n continue;\n }\n filter.call(this, imageData);\n filterContext.putImageData(imageData, 0, 0);\n }\n }\n catch (e) {\n Util.error('Unable to apply filter. ' +\n e.message +\n ' This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n }\n this._filterUpToDate = true;\n }\n return filterCanvas;\n }\n return sceneCanvas;\n }\n on(evtStr, handler) {\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (arguments.length === 3) {\n return this._delegate.apply(this, arguments);\n }\n var events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1] || '';\n if (!this.eventListeners[baseEvent]) {\n this.eventListeners[baseEvent] = [];\n }\n this.eventListeners[baseEvent].push({\n name: name,\n handler: handler,\n });\n }\n return this;\n }\n off(evtStr, callback) {\n var events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (!evtStr) {\n for (t in this.eventListeners) {\n this._off(t);\n }\n }\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1];\n if (baseEvent) {\n if (this.eventListeners[baseEvent]) {\n this._off(baseEvent, name, callback);\n }\n }\n else {\n for (t in this.eventListeners) {\n this._off(t, name, callback);\n }\n }\n }\n return this;\n }\n dispatchEvent(evt) {\n var e = {\n target: this,\n type: evt.type,\n evt: evt,\n };\n this.fire(evt.type, e);\n return this;\n }\n addEventListener(type, handler) {\n this.on(type, function (evt) {\n handler.call(this, evt.evt);\n });\n return this;\n }\n removeEventListener(type) {\n this.off(type);\n return this;\n }\n _delegate(event, selector, handler) {\n var stopNode = this;\n this.on(event, function (evt) {\n var targets = evt.target.findAncestors(selector, true, stopNode);\n for (var i = 0; i < targets.length; i++) {\n evt = Util.cloneObject(evt);\n evt.currentTarget = targets[i];\n handler.call(targets[i], evt);\n }\n });\n }\n remove() {\n if (this.isDragging()) {\n this.stopDrag();\n }\n DD._dragElements.delete(this._id);\n this._remove();\n return this;\n }\n _clearCaches() {\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this._clearSelfAndDescendantCache(STAGE);\n this._clearSelfAndDescendantCache(VISIBLE);\n this._clearSelfAndDescendantCache(LISTENING);\n }\n _remove() {\n this._clearCaches();\n var parent = this.getParent();\n if (parent && parent.children) {\n parent.children.splice(this.index, 1);\n parent._setChildrenIndices();\n this.parent = null;\n }\n }\n destroy() {\n this.remove();\n this.clearCache();\n return this;\n }\n getAttr(attr) {\n var method = 'get' + Util._capitalize(attr);\n if (Util._isFunction(this[method])) {\n return this[method]();\n }\n return this.attrs[attr];\n }\n getAncestors() {\n var parent = this.getParent(), ancestors = [];\n while (parent) {\n ancestors.push(parent);\n parent = parent.getParent();\n }\n return ancestors;\n }\n getAttrs() {\n return this.attrs || {};\n }\n setAttrs(config) {\n this._batchTransformChanges(() => {\n var key, method;\n if (!config) {\n return this;\n }\n for (key in config) {\n if (key === CHILDREN) {\n continue;\n }\n method = SET + Util._capitalize(key);\n if (Util._isFunction(this[method])) {\n this[method](config[key]);\n }\n else {\n this._setAttr(key, config[key]);\n }\n }\n });\n return this;\n }\n isListening() {\n return this._getCache(LISTENING, this._isListening);\n }\n _isListening(relativeTo) {\n const listening = this.listening();\n if (!listening) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isListening(relativeTo);\n }\n else {\n return true;\n }\n }\n isVisible() {\n return this._getCache(VISIBLE, this._isVisible);\n }\n _isVisible(relativeTo) {\n const visible = this.visible();\n if (!visible) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isVisible(relativeTo);\n }\n else {\n return true;\n }\n }\n shouldDrawHit(top, skipDragCheck = false) {\n if (top) {\n return this._isVisible(top) && this._isListening(top);\n }\n var layer = this.getLayer();\n var layerUnderDrag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus !== 'dragging') {\n return;\n }\n else if (elem.node.nodeType === 'Stage') {\n layerUnderDrag = true;\n }\n else if (elem.node.getLayer() === layer) {\n layerUnderDrag = true;\n }\n });\n var dragSkip = !skipDragCheck && !Konva.hitOnDragEnabled && layerUnderDrag;\n return this.isListening() && this.isVisible() && !dragSkip;\n }\n show() {\n this.visible(true);\n return this;\n }\n hide() {\n this.visible(false);\n return this;\n }\n getZIndex() {\n return this.index || 0;\n }\n getAbsoluteZIndex() {\n var depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;\n function addChildren(children) {\n nodes = [];\n len = children.length;\n for (n = 0; n < len; n++) {\n child = children[n];\n index++;\n if (child.nodeType !== SHAPE) {\n nodes = nodes.concat(child.getChildren().slice());\n }\n if (child._id === that._id) {\n n = len;\n }\n }\n if (nodes.length > 0 && nodes[0].getDepth() <= depth) {\n addChildren(nodes);\n }\n }\n if (that.nodeType !== UPPER_STAGE) {\n addChildren(that.getStage().getChildren());\n }\n return index;\n }\n getDepth() {\n var depth = 0, parent = this.parent;\n while (parent) {\n depth++;\n parent = parent.parent;\n }\n return depth;\n }\n _batchTransformChanges(func) {\n this._batchingTransformChange = true;\n func();\n this._batchingTransformChange = false;\n if (this._needClearTransformCache) {\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n }\n this._needClearTransformCache = false;\n }\n setPosition(pos) {\n this._batchTransformChanges(() => {\n this.x(pos.x);\n this.y(pos.y);\n });\n return this;\n }\n getPosition() {\n return {\n x: this.x(),\n y: this.y(),\n };\n }\n getRelativePointerPosition() {\n if (!this.getStage()) {\n return null;\n }\n var pos = this.getStage().getPointerPosition();\n if (!pos) {\n return null;\n }\n var transform = this.getAbsoluteTransform().copy();\n transform.invert();\n return transform.point(pos);\n }\n getAbsolutePosition(top) {\n let haveCachedParent = false;\n let parent = this.parent;\n while (parent) {\n if (parent.isCached()) {\n haveCachedParent = true;\n break;\n }\n parent = parent.parent;\n }\n if (haveCachedParent && !top) {\n top = true;\n }\n var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Transform(), offset = this.offset();\n absoluteTransform.m = absoluteMatrix.slice();\n absoluteTransform.translate(offset.x, offset.y);\n return absoluteTransform.getTranslation();\n }\n setAbsolutePosition(pos) {\n var origTrans = this._clearTransform();\n this.attrs.x = origTrans.x;\n this.attrs.y = origTrans.y;\n delete origTrans.x;\n delete origTrans.y;\n this._clearCache(TRANSFORM);\n var it = this._getAbsoluteTransform().copy();\n it.invert();\n it.translate(pos.x, pos.y);\n pos = {\n x: this.attrs.x + it.getTranslation().x,\n y: this.attrs.y + it.getTranslation().y,\n };\n this._setTransform(origTrans);\n this.setPosition({ x: pos.x, y: pos.y });\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n return this;\n }\n _setTransform(trans) {\n var key;\n for (key in trans) {\n this.attrs[key] = trans[key];\n }\n }\n _clearTransform() {\n var trans = {\n x: this.x(),\n y: this.y(),\n rotation: this.rotation(),\n scaleX: this.scaleX(),\n scaleY: this.scaleY(),\n offsetX: this.offsetX(),\n offsetY: this.offsetY(),\n skewX: this.skewX(),\n skewY: this.skewY(),\n };\n this.attrs.x = 0;\n this.attrs.y = 0;\n this.attrs.rotation = 0;\n this.attrs.scaleX = 1;\n this.attrs.scaleY = 1;\n this.attrs.offsetX = 0;\n this.attrs.offsetY = 0;\n this.attrs.skewX = 0;\n this.attrs.skewY = 0;\n return trans;\n }\n move(change) {\n var changeX = change.x, changeY = change.y, x = this.x(), y = this.y();\n if (changeX !== undefined) {\n x += changeX;\n }\n if (changeY !== undefined) {\n y += changeY;\n }\n this.setPosition({ x: x, y: y });\n return this;\n }\n _eachAncestorReverse(func, top) {\n var family = [], parent = this.getParent(), len, n;\n if (top && top._id === this._id) {\n return;\n }\n family.unshift(this);\n while (parent && (!top || parent._id !== top._id)) {\n family.unshift(parent);\n parent = parent.parent;\n }\n len = family.length;\n for (n = 0; n < len; n++) {\n func(family[n]);\n }\n }\n rotate(theta) {\n this.rotation(this.rotation() + theta);\n return this;\n }\n moveToTop() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToTop function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.push(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveUp() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveUp function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index + 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveDown() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveDown function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index - 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToBottom function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.unshift(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n setZIndex(zIndex) {\n if (!this.parent) {\n Util.warn('Node has no parent. zIndex parameter is ignored.');\n return this;\n }\n if (zIndex < 0 || zIndex >= this.parent.children.length) {\n Util.warn('Unexpected value ' +\n zIndex +\n ' for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to ' +\n (this.parent.children.length - 1) +\n '.');\n }\n var index = this.index;\n this.parent.children.splice(index, 1);\n this.parent.children.splice(zIndex, 0, this);\n this.parent._setChildrenIndices();\n return this;\n }\n getAbsoluteOpacity() {\n return this._getCache(ABSOLUTE_OPACITY, this._getAbsoluteOpacity);\n }\n _getAbsoluteOpacity() {\n var absOpacity = this.opacity();\n var parent = this.getParent();\n if (parent && !parent._isUnderCache) {\n absOpacity *= parent.getAbsoluteOpacity();\n }\n return absOpacity;\n }\n moveTo(newContainer) {\n if (this.getParent() !== newContainer) {\n this._remove();\n newContainer.add(this);\n }\n return this;\n }\n toObject() {\n var obj = {}, attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;\n obj.attrs = {};\n for (key in attrs) {\n val = attrs[key];\n nonPlainObject =\n Util.isObject(val) && !Util._isPlainObject(val) && !Util._isArray(val);\n if (nonPlainObject) {\n continue;\n }\n getter = typeof this[key] === 'function' && this[key];\n delete attrs[key];\n defaultValue = getter ? getter.call(this) : null;\n attrs[key] = val;\n if (defaultValue !== val) {\n obj.attrs[key] = val;\n }\n }\n obj.className = this.getClassName();\n return Util._prepareToStringify(obj);\n }\n toJSON() {\n return JSON.stringify(this.toObject());\n }\n getParent() {\n return this.parent;\n }\n findAncestors(selector, includeSelf, stopNode) {\n var res = [];\n if (includeSelf && this._isMatch(selector)) {\n res.push(this);\n }\n var ancestor = this.parent;\n while (ancestor) {\n if (ancestor === stopNode) {\n return res;\n }\n if (ancestor._isMatch(selector)) {\n res.push(ancestor);\n }\n ancestor = ancestor.parent;\n }\n return res;\n }\n isAncestorOf(node) {\n return false;\n }\n findAncestor(selector, includeSelf, stopNode) {\n return this.findAncestors(selector, includeSelf, stopNode)[0];\n }\n _isMatch(selector) {\n if (!selector) {\n return false;\n }\n if (typeof selector === 'function') {\n return selector(this);\n }\n var selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;\n for (n = 0; n < len; n++) {\n sel = selectorArr[n];\n if (!Util.isValidSelector(sel)) {\n Util.warn('Selector \"' +\n sel +\n '\" is invalid. Allowed selectors examples are \"#foo\", \".bar\" or \"Group\".');\n Util.warn('If you have a custom shape with such className, please change it to start with upper letter like \"Triangle\".');\n Util.warn('Konva is awesome, right?');\n }\n if (sel.charAt(0) === '#') {\n if (this.id() === sel.slice(1)) {\n return true;\n }\n }\n else if (sel.charAt(0) === '.') {\n if (this.hasName(sel.slice(1))) {\n return true;\n }\n }\n else if (this.className === sel || this.nodeType === sel) {\n return true;\n }\n }\n return false;\n }\n getLayer() {\n var parent = this.getParent();\n return parent ? parent.getLayer() : null;\n }\n getStage() {\n return this._getCache(STAGE, this._getStage);\n }\n _getStage() {\n var parent = this.getParent();\n if (parent) {\n return parent.getStage();\n }\n else {\n return undefined;\n }\n }\n fire(eventType, evt = {}, bubble) {\n evt.target = evt.target || this;\n if (bubble) {\n this._fireAndBubble(eventType, evt);\n }\n else {\n this._fire(eventType, evt);\n }\n return this;\n }\n getAbsoluteTransform(top) {\n if (top) {\n return this._getAbsoluteTransform(top);\n }\n else {\n return this._getCache(ABSOLUTE_TRANSFORM, this._getAbsoluteTransform);\n }\n }\n _getAbsoluteTransform(top) {\n var at;\n if (top) {\n at = new Transform();\n this._eachAncestorReverse(function (node) {\n var transformsEnabled = node.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(node.getTransform());\n }\n else if (transformsEnabled === 'position') {\n at.translate(node.x() - node.offsetX(), node.y() - node.offsetY());\n }\n }, top);\n return at;\n }\n else {\n at = this._cache.get(ABSOLUTE_TRANSFORM) || new Transform();\n if (this.parent) {\n this.parent.getAbsoluteTransform().copyInto(at);\n }\n else {\n at.reset();\n }\n var transformsEnabled = this.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(this.getTransform());\n }\n else if (transformsEnabled === 'position') {\n const x = this.attrs.x || 0;\n const y = this.attrs.y || 0;\n const offsetX = this.attrs.offsetX || 0;\n const offsetY = this.attrs.offsetY || 0;\n at.translate(x - offsetX, y - offsetY);\n }\n at.dirty = false;\n return at;\n }\n }\n getAbsoluteScale(top) {\n var parent = this;\n while (parent) {\n if (parent._isUnderCache) {\n top = parent;\n }\n parent = parent.getParent();\n }\n const transform = this.getAbsoluteTransform(top);\n const attrs = transform.decompose();\n return {\n x: attrs.scaleX,\n y: attrs.scaleY,\n };\n }\n getAbsoluteRotation() {\n return this.getAbsoluteTransform().decompose().rotation;\n }\n getTransform() {\n return this._getCache(TRANSFORM, this._getTransform);\n }\n _getTransform() {\n var _a, _b;\n var m = this._cache.get(TRANSFORM) || new Transform();\n m.reset();\n var x = this.x(), y = this.y(), rotation = Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;\n if (x !== 0 || y !== 0) {\n m.translate(x, y);\n }\n if (rotation !== 0) {\n m.rotate(rotation);\n }\n if (skewX !== 0 || skewY !== 0) {\n m.skew(skewX, skewY);\n }\n if (scaleX !== 1 || scaleY !== 1) {\n m.scale(scaleX, scaleY);\n }\n if (offsetX !== 0 || offsetY !== 0) {\n m.translate(-1 * offsetX, -1 * offsetY);\n }\n m.dirty = false;\n return m;\n }\n clone(obj) {\n var attrs = Util.cloneObject(this.attrs), key, allListeners, len, n, listener;\n for (key in obj) {\n attrs[key] = obj[key];\n }\n var node = new this.constructor(attrs);\n for (key in this.eventListeners) {\n allListeners = this.eventListeners[key];\n len = allListeners.length;\n for (n = 0; n < len; n++) {\n listener = allListeners[n];\n if (listener.name.indexOf(KONVA) < 0) {\n if (!node.eventListeners[key]) {\n node.eventListeners[key] = [];\n }\n node.eventListeners[key].push(listener);\n }\n }\n }\n return node;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n var box = this.getClientRect();\n var stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new SceneCanvas({\n width: config.width || Math.ceil(box.width) || (stage ? stage.width() : 0),\n height: config.height ||\n Math.ceil(box.height) ||\n (stage ? stage.height() : 0),\n pixelRatio: pixelRatio,\n }), context = canvas.getContext();\n if (config.imageSmoothingEnabled === false) {\n context._context.imageSmoothingEnabled = false;\n }\n context.save();\n if (x || y) {\n context.translate(-1 * x, -1 * y);\n }\n this.drawScene(canvas);\n context.restore();\n return canvas;\n }\n toCanvas(config) {\n return this._toKonvaCanvas(config)._canvas;\n }\n toDataURL(config) {\n config = config || {};\n var mimeType = config.mimeType || null, quality = config.quality || null;\n var url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);\n if (config.callback) {\n config.callback(url);\n }\n return url;\n }\n toImage(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n Util._urlToImage(this.toDataURL(config), function (img) {\n resolve(img);\n callback === null || callback === void 0 ? void 0 : callback(img);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n toBlob(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n this.toCanvas(config).toBlob((blob) => {\n resolve(blob);\n callback === null || callback === void 0 ? void 0 : callback(blob);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n setSize(size) {\n this.width(size.width);\n this.height(size.height);\n return this;\n }\n getSize() {\n return {\n width: this.width(),\n height: this.height(),\n };\n }\n getClassName() {\n return this.className || this.nodeType;\n }\n getType() {\n return this.nodeType;\n }\n getDragDistance() {\n if (this.attrs.dragDistance !== undefined) {\n return this.attrs.dragDistance;\n }\n else if (this.parent) {\n return this.parent.getDragDistance();\n }\n else {\n return Konva.dragDistance;\n }\n }\n _off(type, name, callback) {\n var evtListeners = this.eventListeners[type], i, evtName, handler;\n for (i = 0; i < evtListeners.length; i++) {\n evtName = evtListeners[i].name;\n handler = evtListeners[i].handler;\n if ((evtName !== 'konva' || name === 'konva') &&\n (!name || evtName === name) &&\n (!callback || callback === handler)) {\n evtListeners.splice(i, 1);\n if (evtListeners.length === 0) {\n delete this.eventListeners[type];\n break;\n }\n i--;\n }\n }\n }\n _fireChangeEvent(attr, oldVal, newVal) {\n this._fire(attr + CHANGE, {\n oldVal: oldVal,\n newVal: newVal,\n });\n }\n addName(name) {\n if (!this.hasName(name)) {\n var oldName = this.name();\n var newName = oldName ? oldName + ' ' + name : name;\n this.name(newName);\n }\n return this;\n }\n hasName(name) {\n if (!name) {\n return false;\n }\n const fullName = this.name();\n if (!fullName) {\n return false;\n }\n var names = (fullName || '').split(/\\s/g);\n return names.indexOf(name) !== -1;\n }\n removeName(name) {\n var names = (this.name() || '').split(/\\s/g);\n var index = names.indexOf(name);\n if (index !== -1) {\n names.splice(index, 1);\n this.name(names.join(' '));\n }\n return this;\n }\n setAttr(attr, val) {\n var func = this[SET + Util._capitalize(attr)];\n if (Util._isFunction(func)) {\n func.call(this, val);\n }\n else {\n this._setAttr(attr, val);\n }\n return this;\n }\n _requestDraw() {\n if (Konva.autoDrawEnabled) {\n const drawNode = this.getLayer() || this.getStage();\n drawNode === null || drawNode === void 0 ? void 0 : drawNode.batchDraw();\n }\n }\n _setAttr(key, val) {\n var oldVal = this.attrs[key];\n if (oldVal === val && !Util.isObject(val)) {\n return;\n }\n if (val === undefined || val === null) {\n delete this.attrs[key];\n }\n else {\n this.attrs[key] = val;\n }\n if (this._shouldFireChangeEvents) {\n this._fireChangeEvent(key, oldVal, val);\n }\n this._requestDraw();\n }\n _setComponentAttr(key, component, val) {\n var oldVal;\n if (val !== undefined) {\n oldVal = this.attrs[key];\n if (!oldVal) {\n this.attrs[key] = this.getAttr(key);\n }\n this.attrs[key][component] = val;\n this._fireChangeEvent(key, oldVal, val);\n }\n }\n _fireAndBubble(eventType, evt, compareShape) {\n if (evt && this.nodeType === SHAPE) {\n evt.target = this;\n }\n var shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n ((compareShape &&\n (this === compareShape ||\n (this.isAncestorOf && this.isAncestorOf(compareShape)))) ||\n (this.nodeType === 'Stage' && !compareShape));\n if (!shouldStop) {\n this._fire(eventType, evt);\n var stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n compareShape &&\n compareShape.isAncestorOf &&\n compareShape.isAncestorOf(this) &&\n !compareShape.isAncestorOf(this.parent);\n if (((evt && !evt.cancelBubble) || !evt) &&\n this.parent &&\n this.parent.isListening() &&\n !stopBubble) {\n if (compareShape && compareShape.parent) {\n this._fireAndBubble.call(this.parent, eventType, evt, compareShape);\n }\n else {\n this._fireAndBubble.call(this.parent, eventType, evt);\n }\n }\n }\n }\n _getProtoListeners(eventType) {\n let listeners = this._cache.get(ALL_LISTENERS);\n if (!listeners) {\n listeners = {};\n let obj = Object.getPrototypeOf(this);\n while (obj) {\n if (!obj.eventListeners) {\n obj = Object.getPrototypeOf(obj);\n continue;\n }\n for (var event in obj.eventListeners) {\n const newEvents = obj.eventListeners[event];\n const oldEvents = listeners[event] || [];\n listeners[event] = newEvents.concat(oldEvents);\n }\n obj = Object.getPrototypeOf(obj);\n }\n this._cache.set(ALL_LISTENERS, listeners);\n }\n return listeners[eventType];\n }\n _fire(eventType, evt) {\n evt = evt || {};\n evt.currentTarget = this;\n evt.type = eventType;\n const topListeners = this._getProtoListeners(eventType);\n if (topListeners) {\n for (var i = 0; i < topListeners.length; i++) {\n topListeners[i].handler.call(this, evt);\n }\n }\n const selfListeners = this.eventListeners[eventType];\n if (selfListeners) {\n for (var i = 0; i < selfListeners.length; i++) {\n selfListeners[i].handler.call(this, evt);\n }\n }\n }\n draw() {\n this.drawScene();\n this.drawHit();\n return this;\n }\n _createDragElement(evt) {\n var pointerId = evt ? evt.pointerId : undefined;\n var stage = this.getStage();\n var ap = this.getAbsolutePosition();\n var pos = stage._getPointerById(pointerId) ||\n stage._changedPointerPositions[0] ||\n ap;\n DD._dragElements.set(this._id, {\n node: this,\n startPointerPos: pos,\n offset: {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n },\n dragStatus: 'ready',\n pointerId,\n });\n }\n startDrag(evt, bubbleEvent = true) {\n if (!DD._dragElements.has(this._id)) {\n this._createDragElement(evt);\n }\n const elem = DD._dragElements.get(this._id);\n elem.dragStatus = 'dragging';\n this.fire('dragstart', {\n type: 'dragstart',\n target: this,\n evt: evt && evt.evt,\n }, bubbleEvent);\n }\n _setDragPosition(evt, elem) {\n const pos = this.getStage()._getPointerById(elem.pointerId);\n if (!pos) {\n return;\n }\n var newNodePos = {\n x: pos.x - elem.offset.x,\n y: pos.y - elem.offset.y,\n };\n var dbf = this.dragBoundFunc();\n if (dbf !== undefined) {\n const bounded = dbf.call(this, newNodePos, evt);\n if (!bounded) {\n Util.warn('dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.');\n }\n else {\n newNodePos = bounded;\n }\n }\n if (!this._lastPos ||\n this._lastPos.x !== newNodePos.x ||\n this._lastPos.y !== newNodePos.y) {\n this.setAbsolutePosition(newNodePos);\n this._requestDraw();\n }\n this._lastPos = newNodePos;\n }\n stopDrag(evt) {\n const elem = DD._dragElements.get(this._id);\n if (elem) {\n elem.dragStatus = 'stopped';\n }\n DD._endDragBefore(evt);\n DD._endDragAfter(evt);\n }\n setDraggable(draggable) {\n this._setAttr('draggable', draggable);\n this._dragChange();\n }\n isDragging() {\n const elem = DD._dragElements.get(this._id);\n return elem ? elem.dragStatus === 'dragging' : false;\n }\n _listenDrag() {\n this._dragCleanup();\n this.on('mousedown.konva touchstart.konva', function (evt) {\n var shouldCheckButton = evt.evt['button'] !== undefined;\n var canDrag = !shouldCheckButton || Konva.dragButtons.indexOf(evt.evt['button']) >= 0;\n if (!canDrag) {\n return;\n }\n if (this.isDragging()) {\n return;\n }\n var hasDraggingChild = false;\n DD._dragElements.forEach((elem) => {\n if (this.isAncestorOf(elem.node)) {\n hasDraggingChild = true;\n }\n });\n if (!hasDraggingChild) {\n this._createDragElement(evt);\n }\n });\n }\n _dragChange() {\n if (this.attrs.draggable) {\n this._listenDrag();\n }\n else {\n this._dragCleanup();\n var stage = this.getStage();\n if (!stage) {\n return;\n }\n const dragElement = DD._dragElements.get(this._id);\n const isDragging = dragElement && dragElement.dragStatus === 'dragging';\n const isReady = dragElement && dragElement.dragStatus === 'ready';\n if (isDragging) {\n this.stopDrag();\n }\n else if (isReady) {\n DD._dragElements.delete(this._id);\n }\n }\n }\n _dragCleanup() {\n this.off('mousedown.konva');\n this.off('touchstart.konva');\n }\n isClientRectOnScreen(margin = { x: 0, y: 0 }) {\n const stage = this.getStage();\n if (!stage) {\n return false;\n }\n const screenRect = {\n x: -margin.x,\n y: -margin.y,\n width: stage.width() + 2 * margin.x,\n height: stage.height() + 2 * margin.y,\n };\n return Util.haveIntersection(screenRect, this.getClientRect());\n }\n static create(data, container) {\n if (Util._isString(data)) {\n data = JSON.parse(data);\n }\n return this._createNode(data, container);\n }\n static _createNode(obj, container) {\n var className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;\n if (container) {\n obj.attrs.container = container;\n }\n if (!Konva[className]) {\n Util.warn('Can not find a node with class name \"' +\n className +\n '\". Fallback to \"Shape\".');\n className = 'Shape';\n }\n const Class = Konva[className];\n no = new Class(obj.attrs);\n if (children) {\n len = children.length;\n for (n = 0; n < len; n++) {\n no.add(Node._createNode(children[n]));\n }\n }\n return no;\n }\n}\nNode.prototype.nodeType = 'Node';\nNode.prototype._attrsAffectingSize = [];\nNode.prototype.eventListeners = {};\nNode.prototype.on.call(Node.prototype, TRANSFORM_CHANGE_STR, function () {\n if (this._batchingTransformChange) {\n this._needClearTransformCache = true;\n return;\n }\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n});\nNode.prototype.on.call(Node.prototype, 'visibleChange.konva', function () {\n this._clearSelfAndDescendantCache(VISIBLE);\n});\nNode.prototype.on.call(Node.prototype, 'listeningChange.konva', function () {\n this._clearSelfAndDescendantCache(LISTENING);\n});\nNode.prototype.on.call(Node.prototype, 'opacityChange.konva', function () {\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n});\nconst addGetterSetter = Factory.addGetterSetter;\naddGetterSetter(Node, 'zIndex');\naddGetterSetter(Node, 'absolutePosition');\naddGetterSetter(Node, 'position');\naddGetterSetter(Node, 'x', 0, getNumberValidator());\naddGetterSetter(Node, 'y', 0, getNumberValidator());\naddGetterSetter(Node, 'globalCompositeOperation', 'source-over', getStringValidator());\naddGetterSetter(Node, 'opacity', 1, getNumberValidator());\naddGetterSetter(Node, 'name', '', getStringValidator());\naddGetterSetter(Node, 'id', '', getStringValidator());\naddGetterSetter(Node, 'rotation', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);\naddGetterSetter(Node, 'scaleX', 1, getNumberValidator());\naddGetterSetter(Node, 'scaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);\naddGetterSetter(Node, 'skewX', 0, getNumberValidator());\naddGetterSetter(Node, 'skewY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);\naddGetterSetter(Node, 'offsetX', 0, getNumberValidator());\naddGetterSetter(Node, 'offsetY', 0, getNumberValidator());\naddGetterSetter(Node, 'dragDistance', null, getNumberValidator());\naddGetterSetter(Node, 'width', 0, getNumberValidator());\naddGetterSetter(Node, 'height', 0, getNumberValidator());\naddGetterSetter(Node, 'listening', true, getBooleanValidator());\naddGetterSetter(Node, 'preventDefault', true, getBooleanValidator());\naddGetterSetter(Node, 'filters', null, function (val) {\n this._filterUpToDate = false;\n return val;\n});\naddGetterSetter(Node, 'visible', true, getBooleanValidator());\naddGetterSetter(Node, 'transformsEnabled', 'all', getStringValidator());\naddGetterSetter(Node, 'size');\naddGetterSetter(Node, 'dragBoundFunc');\naddGetterSetter(Node, 'draggable', false, getBooleanValidator());\nFactory.backCompat(Node, {\n rotateDeg: 'rotate',\n setRotationDeg: 'setRotation',\n getRotationDeg: 'getRotation',\n});\n","import { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator } from './Validators.js';\nexport class Container extends Node {\n constructor() {\n super(...arguments);\n this.children = [];\n }\n getChildren(filterFunc) {\n if (!filterFunc) {\n return this.children || [];\n }\n const children = this.children || [];\n var results = [];\n children.forEach(function (child) {\n if (filterFunc(child)) {\n results.push(child);\n }\n });\n return results;\n }\n hasChildren() {\n return this.getChildren().length > 0;\n }\n removeChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.remove();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n destroyChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.destroy();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n add(...children) {\n if (children.length === 0) {\n return this;\n }\n if (children.length > 1) {\n for (var i = 0; i < children.length; i++) {\n this.add(children[i]);\n }\n return this;\n }\n const child = children[0];\n if (child.getParent()) {\n child.moveTo(this);\n return this;\n }\n this._validateAdd(child);\n child.index = this.getChildren().length;\n child.parent = this;\n child._clearCaches();\n this.getChildren().push(child);\n this._fire('add', {\n child: child,\n });\n this._requestDraw();\n return this;\n }\n destroy() {\n if (this.hasChildren()) {\n this.destroyChildren();\n }\n super.destroy();\n return this;\n }\n find(selector) {\n return this._generalFind(selector, false);\n }\n findOne(selector) {\n var result = this._generalFind(selector, true);\n return result.length > 0 ? result[0] : undefined;\n }\n _generalFind(selector, findOne) {\n var retArr = [];\n this._descendants((node) => {\n const valid = node._isMatch(selector);\n if (valid) {\n retArr.push(node);\n }\n if (valid && findOne) {\n return true;\n }\n return false;\n });\n return retArr;\n }\n _descendants(fn) {\n let shouldStop = false;\n const children = this.getChildren();\n for (const child of children) {\n shouldStop = fn(child);\n if (shouldStop) {\n return true;\n }\n if (!child.hasChildren()) {\n continue;\n }\n shouldStop = child._descendants(fn);\n if (shouldStop) {\n return true;\n }\n }\n return false;\n }\n toObject() {\n var obj = Node.prototype.toObject.call(this);\n obj.children = [];\n this.getChildren().forEach((child) => {\n obj.children.push(child.toObject());\n });\n return obj;\n }\n isAncestorOf(node) {\n var parent = node.getParent();\n while (parent) {\n if (parent._id === this._id) {\n return true;\n }\n parent = parent.getParent();\n }\n return false;\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n this.getChildren().forEach(function (no) {\n node.add(no.clone());\n });\n return node;\n }\n getAllIntersections(pos) {\n var arr = [];\n this.find('Shape').forEach(function (shape) {\n if (shape.isVisible() && shape.intersects(pos)) {\n arr.push(shape);\n }\n });\n return arr;\n }\n _clearSelfAndDescendantCache(attr) {\n var _a;\n super._clearSelfAndDescendantCache(attr);\n if (this.isCached()) {\n return;\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {\n node._clearSelfAndDescendantCache(attr);\n });\n }\n _setChildrenIndices() {\n var _a;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child, n) {\n child.index = n;\n });\n this._requestDraw();\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n var caching = canvas && canvas.isCache;\n if (!this.isVisible() && !caching) {\n return this;\n }\n if (cachedSceneCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawScene', canvas, top);\n }\n return this;\n }\n drawHit(can, top) {\n if (!this.shouldDrawHit(top)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawHit', canvas, top);\n }\n return this;\n }\n _drawChildren(drawMethod, canvas, top) {\n var _a;\n var context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (clipWidth && clipHeight) || clipFunc;\n const selfCache = top === this;\n if (hasClip) {\n context.save();\n var transform = this.getAbsoluteTransform(top);\n var m = transform.getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n context.beginPath();\n if (clipFunc) {\n clipFunc.call(this, context, this);\n }\n else {\n var clipX = this.clipX();\n var clipY = this.clipY();\n context.rect(clipX, clipY, clipWidth, clipHeight);\n }\n context.clip();\n m = transform.copy().invert().getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n }\n var hasComposition = !selfCache &&\n this.globalCompositeOperation() !== 'source-over' &&\n drawMethod === 'drawScene';\n if (hasComposition) {\n context.save();\n context._applyGlobalCompositeOperation(this);\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n child[drawMethod](canvas, top);\n });\n if (hasComposition) {\n context.restore();\n }\n if (hasClip) {\n context.restore();\n }\n }\n getClientRect(config) {\n var _a;\n config = config || {};\n var skipTransform = config.skipTransform;\n var relativeTo = config.relativeTo;\n var minX, minY, maxX, maxY;\n var selfRect = {\n x: Infinity,\n y: Infinity,\n width: 0,\n height: 0,\n };\n var that = this;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n if (!child.visible()) {\n return;\n }\n var rect = child.getClientRect({\n relativeTo: that,\n skipShadow: config.skipShadow,\n skipStroke: config.skipStroke,\n });\n if (rect.width === 0 && rect.height === 0) {\n return;\n }\n if (minX === undefined) {\n minX = rect.x;\n minY = rect.y;\n maxX = rect.x + rect.width;\n maxY = rect.y + rect.height;\n }\n else {\n minX = Math.min(minX, rect.x);\n minY = Math.min(minY, rect.y);\n maxX = Math.max(maxX, rect.x + rect.width);\n maxY = Math.max(maxY, rect.y + rect.height);\n }\n });\n var shapes = this.find('Shape');\n var hasVisible = false;\n for (var i = 0; i < shapes.length; i++) {\n var shape = shapes[i];\n if (shape._isVisible(this)) {\n hasVisible = true;\n break;\n }\n }\n if (hasVisible && minX !== undefined) {\n selfRect = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n else {\n selfRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n if (!skipTransform) {\n return this._transformedRect(selfRect, relativeTo);\n }\n return selfRect;\n }\n}\nFactory.addComponentsGetterSetter(Container, 'clip', [\n 'x',\n 'y',\n 'width',\n 'height',\n]);\nFactory.addGetterSetter(Container, 'clipX', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipY', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipWidth', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipHeight', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipFunc');\n","import { Konva } from './Global.js';\nconst Captures = new Map();\nconst SUPPORT_POINTER_EVENTS = Konva._global['PointerEvent'] !== undefined;\nexport function getCapturedShape(pointerId) {\n return Captures.get(pointerId);\n}\nexport function createEvent(evt) {\n return {\n evt,\n pointerId: evt.pointerId,\n };\n}\nexport function hasPointerCapture(pointerId, shape) {\n return Captures.get(pointerId) === shape;\n}\nexport function setPointerCapture(pointerId, shape) {\n releaseCapture(pointerId);\n const stage = shape.getStage();\n if (!stage)\n return;\n Captures.set(pointerId, shape);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n }\n}\nexport function releaseCapture(pointerId, target) {\n const shape = Captures.get(pointerId);\n if (!shape)\n return;\n const stage = shape.getStage();\n if (stage && stage.content) {\n }\n Captures.delete(pointerId);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n }\n}\n","import { Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Container } from './Container.js';\nimport { Konva } from './Global.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { DD } from './DragAndDrop.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [\n [MOUSEENTER, '_pointerenter'],\n [MOUSEDOWN, '_pointerdown'],\n [MOUSEMOVE, '_pointermove'],\n [MOUSEUP, '_pointerup'],\n [MOUSELEAVE, '_pointerleave'],\n [TOUCHSTART, '_pointerdown'],\n [TOUCHMOVE, '_pointermove'],\n [TOUCHEND, '_pointerup'],\n [TOUCHCANCEL, '_pointercancel'],\n [MOUSEOVER, '_pointerover'],\n [WHEEL, '_wheel'],\n [CONTEXTMENU, '_contextmenu'],\n [POINTERDOWN, '_pointerdown'],\n [POINTERMOVE, '_pointermove'],\n [POINTERUP, '_pointerup'],\n [POINTERCANCEL, '_pointercancel'],\n [LOSTPOINTERCAPTURE, '_lostpointercapture'],\n];\nconst EVENTS_MAP = {\n mouse: {\n [POINTEROUT]: MOUSEOUT,\n [POINTERLEAVE]: MOUSELEAVE,\n [POINTEROVER]: MOUSEOVER,\n [POINTERENTER]: MOUSEENTER,\n [POINTERMOVE]: MOUSEMOVE,\n [POINTERDOWN]: MOUSEDOWN,\n [POINTERUP]: MOUSEUP,\n [POINTERCANCEL]: 'mousecancel',\n pointerclick: 'click',\n pointerdblclick: 'dblclick',\n },\n touch: {\n [POINTEROUT]: 'touchout',\n [POINTERLEAVE]: 'touchleave',\n [POINTEROVER]: 'touchover',\n [POINTERENTER]: 'touchenter',\n [POINTERMOVE]: TOUCHMOVE,\n [POINTERDOWN]: TOUCHSTART,\n [POINTERUP]: TOUCHEND,\n [POINTERCANCEL]: TOUCHCANCEL,\n pointerclick: 'tap',\n pointerdblclick: 'dbltap',\n },\n pointer: {\n [POINTEROUT]: POINTEROUT,\n [POINTERLEAVE]: POINTERLEAVE,\n [POINTEROVER]: POINTEROVER,\n [POINTERENTER]: POINTERENTER,\n [POINTERMOVE]: POINTERMOVE,\n [POINTERDOWN]: POINTERDOWN,\n [POINTERUP]: POINTERUP,\n [POINTERCANCEL]: POINTERCANCEL,\n pointerclick: 'pointerclick',\n pointerdblclick: 'pointerdblclick',\n },\n};\nconst getEventType = (type) => {\n if (type.indexOf('pointer') >= 0) {\n return 'pointer';\n }\n if (type.indexOf('touch') >= 0) {\n return 'touch';\n }\n return 'mouse';\n};\nconst getEventsMap = (eventType) => {\n const type = getEventType(eventType);\n if (type === 'pointer') {\n return Konva.pointerEventsEnabled && EVENTS_MAP.pointer;\n }\n if (type === 'touch') {\n return EVENTS_MAP.touch;\n }\n if (type === 'mouse') {\n return EVENTS_MAP.mouse;\n }\n};\nfunction checkNoClip(attrs = {}) {\n if (attrs.clipFunc || attrs.clipWidth || attrs.clipHeight) {\n Util.warn('Stage does not support clipping. Please use clip for Layers or Groups.');\n }\n return attrs;\n}\nconst NO_POINTERS_MESSAGE = `Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`;\nexport const stages = [];\nexport class Stage extends Container {\n constructor(config) {\n super(checkNoClip(config));\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n this._buildDOM();\n this._bindContentEvents();\n stages.push(this);\n this.on('widthChange.konva heightChange.konva', this._resizeDOM);\n this.on('visibleChange.konva', this._checkVisibility);\n this.on('clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva', () => {\n checkNoClip(this.attrs);\n });\n this._checkVisibility();\n }\n _validateAdd(child) {\n const isLayer = child.getType() === 'Layer';\n const isFastLayer = child.getType() === 'FastLayer';\n const valid = isLayer || isFastLayer;\n if (!valid) {\n Util.throw('You may only add layers to the stage.');\n }\n }\n _checkVisibility() {\n if (!this.content) {\n return;\n }\n const style = this.visible() ? '' : 'none';\n this.content.style.display = style;\n }\n setContainer(container) {\n if (typeof container === STRING) {\n if (container.charAt(0) === '.') {\n var className = container.slice(1);\n container = document.getElementsByClassName(className)[0];\n }\n else {\n var id;\n if (container.charAt(0) !== '#') {\n id = container;\n }\n else {\n id = container.slice(1);\n }\n container = document.getElementById(id);\n }\n if (!container) {\n throw 'Can not find container in document with id ' + id;\n }\n }\n this._setAttr('container', container);\n if (this.content) {\n if (this.content.parentElement) {\n this.content.parentElement.removeChild(this.content);\n }\n container.appendChild(this.content);\n }\n return this;\n }\n shouldDrawHit() {\n return true;\n }\n clear() {\n var layers = this.children, len = layers.length, n;\n for (n = 0; n < len; n++) {\n layers[n].clear();\n }\n return this;\n }\n clone(obj) {\n if (!obj) {\n obj = {};\n }\n obj.container =\n typeof document !== 'undefined' && document.createElement('div');\n return Container.prototype.clone.call(this, obj);\n }\n destroy() {\n super.destroy();\n var content = this.content;\n if (content && Util._isInDocument(content)) {\n this.container().removeChild(content);\n }\n var index = stages.indexOf(this);\n if (index > -1) {\n stages.splice(index, 1);\n }\n Util.releaseCanvas(this.bufferCanvas._canvas, this.bufferHitCanvas._canvas);\n return this;\n }\n getPointerPosition() {\n const pos = this._pointerPositions[0] || this._changedPointerPositions[0];\n if (!pos) {\n Util.warn(NO_POINTERS_MESSAGE);\n return null;\n }\n return {\n x: pos.x,\n y: pos.y,\n };\n }\n _getPointerById(id) {\n return this._pointerPositions.find((p) => p.id === id);\n }\n getPointersPositions() {\n return this._pointerPositions;\n }\n getStage() {\n return this;\n }\n getContent() {\n return this.content;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.x = config.x || 0;\n config.y = config.y || 0;\n config.width = config.width || this.width();\n config.height = config.height || this.height();\n var canvas = new SceneCanvas({\n width: config.width,\n height: config.height,\n pixelRatio: config.pixelRatio || 1,\n });\n var _context = canvas.getContext()._context;\n var layers = this.children;\n if (config.x || config.y) {\n _context.translate(-1 * config.x, -1 * config.y);\n }\n layers.forEach(function (layer) {\n if (!layer.isVisible()) {\n return;\n }\n var layerCanvas = layer._toKonvaCanvas(config);\n _context.drawImage(layerCanvas._canvas, config.x, config.y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());\n });\n return canvas;\n }\n getIntersection(pos) {\n if (!pos) {\n return null;\n }\n var layers = this.children, len = layers.length, end = len - 1, n;\n for (n = end; n >= 0; n--) {\n const shape = layers[n].getIntersection(pos);\n if (shape) {\n return shape;\n }\n }\n return null;\n }\n _resizeDOM() {\n var width = this.width();\n var height = this.height();\n if (this.content) {\n this.content.style.width = width + PX;\n this.content.style.height = height + PX;\n }\n this.bufferCanvas.setSize(width, height);\n this.bufferHitCanvas.setSize(width, height);\n this.children.forEach((layer) => {\n layer.setSize({ width, height });\n layer.draw();\n });\n }\n add(layer, ...rest) {\n if (arguments.length > 1) {\n for (var i = 0; i < arguments.length; i++) {\n this.add(arguments[i]);\n }\n return this;\n }\n super.add(layer);\n var length = this.children.length;\n if (length > MAX_LAYERS_NUMBER) {\n Util.warn('The stage has ' +\n length +\n ' layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.');\n }\n layer.setSize({ width: this.width(), height: this.height() });\n layer.draw();\n if (Konva.isBrowser) {\n this.content.appendChild(layer.canvas._canvas);\n }\n return this;\n }\n getParent() {\n return null;\n }\n getLayer() {\n return null;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n getLayers() {\n return this.children;\n }\n _bindContentEvents() {\n if (!Konva.isBrowser) {\n return;\n }\n EVENTS.forEach(([event, methodName]) => {\n this.content.addEventListener(event, (evt) => {\n this[methodName](evt);\n }, { passive: false });\n });\n }\n _pointerenter(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerenter, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _pointerover(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _getTargetShape(evenType) {\n let shape = this[evenType + 'targetShape'];\n if (shape && !shape.getStage()) {\n shape = null;\n }\n return shape;\n }\n _pointerleave(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var targetShape = this._getTargetShape(eventType);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (targetShape && eventsEnabled) {\n targetShape._fireAndBubble(events.pointerout, { evt: evt });\n targetShape._fireAndBubble(events.pointerleave, { evt: evt });\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this[eventType + 'targetShape'] = null;\n }\n else if (eventsEnabled) {\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this._fire(events.pointerout, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n this.pointerPos = undefined;\n this._pointerPositions = [];\n }\n _pointerdown(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n var shape = this.getIntersection(pos);\n DD.justDragged = false;\n Konva['_' + eventType + 'ListenClick'] = true;\n const hasShape = shape && shape.isListening();\n if (!hasShape) {\n return;\n }\n if (Konva.capturePointerEventsEnabled) {\n shape.setPointerCapture(pos.id);\n }\n this[eventType + 'ClickStartShape'] = shape;\n shape._fireAndBubble(events.pointerdown, {\n evt: evt,\n pointerId: pos.id,\n });\n triggeredOnShape = true;\n const isTouch = evt.type.indexOf('touch') >= 0;\n if (shape.preventDefault() && evt.cancelable && isTouch) {\n evt.preventDefault();\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerdown, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._pointerPositions[0].id,\n });\n }\n }\n _pointermove(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n if (DD.isDragging && DD.node.preventDefault() && evt.cancelable) {\n evt.preventDefault();\n }\n this.setPointersPositions(evt);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (!eventsEnabled) {\n return;\n }\n var processedShapesIds = {};\n let triggeredOnShape = false;\n var targetShape = this._getTargetShape(eventType);\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n var differentTarget = targetShape !== shape;\n if (differentTarget && targetShape) {\n targetShape._fireAndBubble(events.pointerout, Object.assign({}, event), shape);\n targetShape._fireAndBubble(events.pointerleave, Object.assign({}, event), shape);\n }\n if (shape) {\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n if (differentTarget) {\n shape._fireAndBubble(events.pointerover, Object.assign({}, event), targetShape);\n shape._fireAndBubble(events.pointerenter, Object.assign({}, event), targetShape);\n this[eventType + 'targetShape'] = shape;\n }\n shape._fireAndBubble(events.pointermove, Object.assign({}, event));\n }\n else {\n if (targetShape) {\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n this[eventType + 'targetShape'] = null;\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointermove, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n }\n _pointerup(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n const clickStartShape = this[eventType + 'ClickStartShape'];\n const clickEndShape = this[eventType + 'ClickEndShape'];\n var processedShapesIds = {};\n let triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n if (shape) {\n shape.releaseCapture(pos.id);\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n let fireDblClick = false;\n if (Konva['_' + eventType + 'InDblClickWindow']) {\n fireDblClick = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n else if (!DD.justDragged) {\n Konva['_' + eventType + 'InDblClickWindow'] = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n this[eventType + 'DblTimeout'] = setTimeout(function () {\n Konva['_' + eventType + 'InDblClickWindow'] = false;\n }, Konva.dblClickWindow);\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n this[eventType + 'ClickEndShape'] = shape;\n shape._fireAndBubble(events.pointerup, Object.assign({}, event));\n if (Konva['_' + eventType + 'ListenClick'] &&\n clickStartShape &&\n clickStartShape === shape) {\n shape._fireAndBubble(events.pointerclick, Object.assign({}, event));\n if (fireDblClick && clickEndShape && clickEndShape === shape) {\n shape._fireAndBubble(events.pointerdblclick, Object.assign({}, event));\n }\n }\n }\n else {\n this[eventType + 'ClickEndShape'] = null;\n if (Konva['_' + eventType + 'ListenClick']) {\n this._fire(events.pointerclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n if (fireDblClick) {\n this._fire(events.pointerdblclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerup, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n Konva['_' + eventType + 'ListenClick'] = false;\n if (evt.cancelable && eventType !== 'touch') {\n evt.preventDefault();\n }\n }\n _contextmenu(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(CONTEXTMENU, { evt: evt });\n }\n else {\n this._fire(CONTEXTMENU, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _wheel(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(WHEEL, { evt: evt });\n }\n else {\n this._fire(WHEEL, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _pointercancel(evt) {\n this.setPointersPositions(evt);\n const shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n this.getIntersection(this.getPointerPosition());\n if (shape) {\n shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n }\n PointerEvents.releaseCapture(evt.pointerId);\n }\n _lostpointercapture(evt) {\n PointerEvents.releaseCapture(evt.pointerId);\n }\n setPointersPositions(evt) {\n var contentPosition = this._getContentPosition(), x = null, y = null;\n evt = evt ? evt : window.event;\n if (evt.touches !== undefined) {\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n Array.prototype.forEach.call(evt.touches, (touch) => {\n this._pointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n Array.prototype.forEach.call(evt.changedTouches || evt.touches, (touch) => {\n this._changedPointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n }\n else {\n x = (evt.clientX - contentPosition.left) / contentPosition.scaleX;\n y = (evt.clientY - contentPosition.top) / contentPosition.scaleY;\n this.pointerPos = {\n x: x,\n y: y,\n };\n this._pointerPositions = [{ x, y, id: Util._getFirstPointerId(evt) }];\n this._changedPointerPositions = [\n { x, y, id: Util._getFirstPointerId(evt) },\n ];\n }\n }\n _setPointerPosition(evt) {\n Util.warn('Method _setPointerPosition is deprecated. Use \"stage.setPointersPositions(event)\" instead.');\n this.setPointersPositions(evt);\n }\n _getContentPosition() {\n if (!this.content || !this.content.getBoundingClientRect) {\n return {\n top: 0,\n left: 0,\n scaleX: 1,\n scaleY: 1,\n };\n }\n var rect = this.content.getBoundingClientRect();\n return {\n top: rect.top,\n left: rect.left,\n scaleX: rect.width / this.content.clientWidth || 1,\n scaleY: rect.height / this.content.clientHeight || 1,\n };\n }\n _buildDOM() {\n this.bufferCanvas = new SceneCanvas({\n width: this.width(),\n height: this.height(),\n });\n this.bufferHitCanvas = new HitCanvas({\n pixelRatio: 1,\n width: this.width(),\n height: this.height(),\n });\n if (!Konva.isBrowser) {\n return;\n }\n var container = this.container();\n if (!container) {\n throw 'Stage has no container. A container is required.';\n }\n container.innerHTML = '';\n this.content = document.createElement('div');\n this.content.style.position = 'relative';\n this.content.style.userSelect = 'none';\n this.content.className = 'konvajs-content';\n this.content.setAttribute('role', 'presentation');\n container.appendChild(this.content);\n this._resizeDOM();\n }\n cache() {\n Util.warn('Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.');\n return this;\n }\n clearCache() {\n return this;\n }\n batchDraw() {\n this.getChildren().forEach(function (layer) {\n layer.batchDraw();\n });\n return this;\n }\n}\nStage.prototype.nodeType = STAGE;\n_registerNode(Stage);\nFactory.addGetterSetter(Stage, 'container');\n","import { Konva } from './Global.js';\nimport { Transform, Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator, getNumberOrAutoValidator, getStringValidator, getBooleanValidator, getStringOrGradientValidator, } from './Validators.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar HAS_SHADOW = 'hasShadow';\nvar SHADOW_RGBA = 'shadowRGBA';\nvar patternImage = 'patternImage';\nvar linearGradient = 'linearGradient';\nvar radialGradient = 'radialGradient';\nlet dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext('2d');\n return dummyContext;\n}\nexport const shapes = {};\nfunction _fillFunc(context) {\n context.fill();\n}\nfunction _strokeFunc(context) {\n context.stroke();\n}\nfunction _fillFuncHit(context) {\n context.fill();\n}\nfunction _strokeFuncHit(context) {\n context.stroke();\n}\nfunction _clearHasShadowCache() {\n this._clearCache(HAS_SHADOW);\n}\nfunction _clearGetShadowRGBACache() {\n this._clearCache(SHADOW_RGBA);\n}\nfunction _clearFillPatternCache() {\n this._clearCache(patternImage);\n}\nfunction _clearLinearGradientCache() {\n this._clearCache(linearGradient);\n}\nfunction _clearRadialGradientCache() {\n this._clearCache(radialGradient);\n}\nexport class Shape extends Node {\n constructor(config) {\n super(config);\n let key;\n while (true) {\n key = Util.getRandomColor();\n if (key && !(key in shapes)) {\n break;\n }\n }\n this.colorKey = key;\n shapes[key] = this;\n }\n getContext() {\n Util.warn('shape.getContext() method is deprecated. Please do not use it.');\n return this.getLayer().getContext();\n }\n getCanvas() {\n Util.warn('shape.getCanvas() method is deprecated. Please do not use it.');\n return this.getLayer().getCanvas();\n }\n getSceneFunc() {\n return this.attrs.sceneFunc || this['_sceneFunc'];\n }\n getHitFunc() {\n return this.attrs.hitFunc || this['_hitFunc'];\n }\n hasShadow() {\n return this._getCache(HAS_SHADOW, this._hasShadow);\n }\n _hasShadow() {\n return (this.shadowEnabled() &&\n this.shadowOpacity() !== 0 &&\n !!(this.shadowColor() ||\n this.shadowBlur() ||\n this.shadowOffsetX() ||\n this.shadowOffsetY()));\n }\n _getFillPattern() {\n return this._getCache(patternImage, this.__getFillPattern);\n }\n __getFillPattern() {\n if (this.fillPatternImage()) {\n var ctx = getDummyContext();\n const pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');\n if (pattern && pattern.setTransform) {\n const tr = new Transform();\n tr.translate(this.fillPatternX(), this.fillPatternY());\n tr.rotate(Konva.getAngle(this.fillPatternRotation()));\n tr.scale(this.fillPatternScaleX(), this.fillPatternScaleY());\n tr.translate(-1 * this.fillPatternOffsetX(), -1 * this.fillPatternOffsetY());\n const m = tr.getMatrix();\n const matrix = typeof DOMMatrix === 'undefined'\n ? {\n a: m[0],\n b: m[1],\n c: m[2],\n d: m[3],\n e: m[4],\n f: m[5],\n }\n : new DOMMatrix(m);\n pattern.setTransform(matrix);\n }\n return pattern;\n }\n }\n _getLinearGradient() {\n return this._getCache(linearGradient, this.__getLinearGradient);\n }\n __getLinearGradient() {\n var colorStops = this.fillLinearGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillLinearGradientStartPoint();\n var end = this.fillLinearGradientEndPoint();\n var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n _getRadialGradient() {\n return this._getCache(radialGradient, this.__getRadialGradient);\n }\n __getRadialGradient() {\n var colorStops = this.fillRadialGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillRadialGradientStartPoint();\n var end = this.fillRadialGradientEndPoint();\n var grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n getShadowRGBA() {\n return this._getCache(SHADOW_RGBA, this._getShadowRGBA);\n }\n _getShadowRGBA() {\n if (!this.hasShadow()) {\n return;\n }\n var rgba = Util.colorToRGBA(this.shadowColor());\n if (rgba) {\n return ('rgba(' +\n rgba.r +\n ',' +\n rgba.g +\n ',' +\n rgba.b +\n ',' +\n rgba.a * (this.shadowOpacity() || 1) +\n ')');\n }\n }\n hasFill() {\n return this._calculate('hasFill', [\n 'fillEnabled',\n 'fill',\n 'fillPatternImage',\n 'fillLinearGradientColorStops',\n 'fillRadialGradientColorStops',\n ], () => {\n return (this.fillEnabled() &&\n !!(this.fill() ||\n this.fillPatternImage() ||\n this.fillLinearGradientColorStops() ||\n this.fillRadialGradientColorStops()));\n });\n }\n hasStroke() {\n return this._calculate('hasStroke', [\n 'strokeEnabled',\n 'strokeWidth',\n 'stroke',\n 'strokeLinearGradientColorStops',\n ], () => {\n return (this.strokeEnabled() &&\n this.strokeWidth() &&\n !!(this.stroke() || this.strokeLinearGradientColorStops()));\n });\n }\n hasHitStroke() {\n const width = this.hitStrokeWidth();\n if (width === 'auto') {\n return this.hasStroke();\n }\n return this.strokeEnabled() && !!width;\n }\n intersects(point) {\n var stage = this.getStage(), bufferHitCanvas = stage.bufferHitCanvas, p;\n bufferHitCanvas.getContext().clear();\n this.drawHit(bufferHitCanvas, null, true);\n p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;\n return p[3] > 0;\n }\n destroy() {\n Node.prototype.destroy.call(this);\n delete shapes[this.colorKey];\n delete this.colorKey;\n return this;\n }\n _useBufferCanvas(forceFill) {\n var _a;\n if (!this.getStage()) {\n return false;\n }\n const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== void 0 ? _a : true;\n if (!perfectDrawEnabled) {\n return false;\n }\n const hasFill = forceFill || this.hasFill();\n const hasStroke = this.hasStroke();\n const isTransparent = this.getAbsoluteOpacity() !== 1;\n if (hasFill && hasStroke && isTransparent) {\n return true;\n }\n const hasShadow = this.hasShadow();\n const strokeForShadow = this.shadowForStrokeEnabled();\n if (hasFill && hasStroke && hasShadow && strokeForShadow) {\n return true;\n }\n return false;\n }\n setStrokeHitEnabled(val) {\n Util.warn('strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.');\n if (val) {\n this.hitStrokeWidth('auto');\n }\n else {\n this.hitStrokeWidth(0);\n }\n }\n getStrokeHitEnabled() {\n if (this.hitStrokeWidth() === 0) {\n return false;\n }\n else {\n return true;\n }\n }\n getSelfRect() {\n var size = this.size();\n return {\n x: this._centroid ? -size.width / 2 : 0,\n y: this._centroid ? -size.height / 2 : 0,\n width: size.width,\n height: size.height,\n };\n }\n getClientRect(config = {}) {\n const skipTransform = config.skipTransform;\n const relativeTo = config.relativeTo;\n const fillRect = this.getSelfRect();\n const applyStroke = !config.skipStroke && this.hasStroke();\n const strokeWidth = (applyStroke && this.strokeWidth()) || 0;\n const fillAndStrokeWidth = fillRect.width + strokeWidth;\n const fillAndStrokeHeight = fillRect.height + strokeWidth;\n const applyShadow = !config.skipShadow && this.hasShadow();\n const shadowOffsetX = applyShadow ? this.shadowOffsetX() : 0;\n const shadowOffsetY = applyShadow ? this.shadowOffsetY() : 0;\n const preWidth = fillAndStrokeWidth + Math.abs(shadowOffsetX);\n const preHeight = fillAndStrokeHeight + Math.abs(shadowOffsetY);\n const blurRadius = (applyShadow && this.shadowBlur()) || 0;\n const width = preWidth + blurRadius * 2;\n const height = preHeight + blurRadius * 2;\n const rect = {\n width: width,\n height: height,\n x: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetX, 0) +\n fillRect.x,\n y: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetY, 0) +\n fillRect.y,\n };\n if (!skipTransform) {\n return this._transformedRect(rect, relativeTo);\n }\n return rect;\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferCanvas, bufferContext;\n var skipBuffer = canvas.isCache;\n var cachingSelf = top === this;\n if (!this.isVisible() && !cachingSelf) {\n return this;\n }\n if (cachedCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n if (this._useBufferCanvas() && !skipBuffer) {\n stage = this.getStage();\n bufferCanvas = stage.bufferCanvas;\n bufferContext = bufferCanvas.getContext();\n bufferContext.clear();\n bufferContext.save();\n bufferContext._applyLineJoin(this);\n var o = this.getAbsoluteTransform(top).getMatrix();\n bufferContext.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n drawFunc.call(this, bufferContext, this);\n bufferContext.restore();\n var ratio = bufferCanvas.pixelRatio;\n if (hasShadow) {\n context._applyShadow(this);\n }\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n context.drawImage(bufferCanvas._canvas, 0, 0, bufferCanvas.width / ratio, bufferCanvas.height / ratio);\n }\n else {\n context._applyLineJoin(this);\n if (!cachingSelf) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n }\n if (hasShadow) {\n context._applyShadow(this);\n }\n drawFunc.call(this, context, this);\n }\n context.restore();\n return this;\n }\n drawHit(can, top, skipDragCheck = false) {\n if (!this.shouldDrawHit(top, skipDragCheck)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (!this.colorKey) {\n Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()');\n }\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n context._applyLineJoin(this);\n const selfCache = this === top;\n if (!selfCache) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n }\n drawFunc.call(this, context, this);\n context.restore();\n return this;\n }\n drawHitFromCache(alphaThreshold = 0) {\n var cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;\n hitContext.clear();\n hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);\n try {\n hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);\n hitData = hitImageData.data;\n len = hitData.length;\n rgbColorKey = Util._hexToRgb(this.colorKey);\n for (i = 0; i < len; i += 4) {\n alpha = hitData[i + 3];\n if (alpha > alphaThreshold) {\n hitData[i] = rgbColorKey.r;\n hitData[i + 1] = rgbColorKey.g;\n hitData[i + 2] = rgbColorKey.b;\n hitData[i + 3] = 255;\n }\n else {\n hitData[i + 3] = 0;\n }\n }\n hitContext.putImageData(hitImageData, 0, 0);\n }\n catch (e) {\n Util.error('Unable to draw hit graph from cached scene canvas. ' + e.message);\n }\n return this;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n}\nShape.prototype._fillFunc = _fillFunc;\nShape.prototype._strokeFunc = _strokeFunc;\nShape.prototype._fillFuncHit = _fillFuncHit;\nShape.prototype._strokeFuncHit = _strokeFuncHit;\nShape.prototype._centroid = false;\nShape.prototype.nodeType = 'Shape';\n_registerNode(Shape);\nShape.prototype.eventListeners = {};\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearHasShadowCache);\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearGetShadowRGBACache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva', _clearFillPatternCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva', _clearLinearGradientCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva', _clearRadialGradientCache);\nFactory.addGetterSetter(Shape, 'stroke', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'strokeWidth', 2, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillAfterStrokeEnabled', false);\nFactory.addGetterSetter(Shape, 'hitStrokeWidth', 'auto', getNumberOrAutoValidator());\nFactory.addGetterSetter(Shape, 'strokeHitEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'perfectDrawEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'shadowForStrokeEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'lineJoin');\nFactory.addGetterSetter(Shape, 'lineCap');\nFactory.addGetterSetter(Shape, 'sceneFunc');\nFactory.addGetterSetter(Shape, 'hitFunc');\nFactory.addGetterSetter(Shape, 'dash');\nFactory.addGetterSetter(Shape, 'dashOffset', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowColor', undefined, getStringValidator());\nFactory.addGetterSetter(Shape, 'shadowBlur', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOpacity', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'shadowOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOffsetY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternImage');\nFactory.addGetterSetter(Shape, 'fill', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'fillPatternX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'strokeLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');\nFactory.addGetterSetter(Shape, 'fillEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeEnabled', true);\nFactory.addGetterSetter(Shape, 'shadowEnabled', true);\nFactory.addGetterSetter(Shape, 'dashEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeScaleEnabled', true);\nFactory.addGetterSetter(Shape, 'fillPriority', 'color');\nFactory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternOffsetY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternScaleX', 1, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternScaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'fillPatternRotation', 0);\nFactory.backCompat(Shape, {\n dashArray: 'dash',\n getDashArray: 'getDash',\n setDashArray: 'getDash',\n drawFunc: 'sceneFunc',\n getDrawFunc: 'getSceneFunc',\n setDrawFunc: 'setSceneFunc',\n drawHitFunc: 'hitFunc',\n getDrawHitFunc: 'getHitFunc',\n setDrawHitFunc: 'setHitFunc',\n});\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { Node } from './Node.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { getBooleanValidator } from './Validators.js';\nimport { shapes } from './Shape.js';\nimport { _registerNode } from './Global.js';\nvar HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n { x: 0, y: 0 },\n { x: -1, y: -1 },\n { x: 1, y: -1 },\n { x: 1, y: 1 },\n { x: -1, y: 1 },\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nexport class Layer extends Container {\n constructor(config) {\n super(config);\n this.canvas = new SceneCanvas();\n this.hitCanvas = new HitCanvas({\n pixelRatio: 1,\n });\n this._waitingForDraw = false;\n this.on('visibleChange.konva', this._checkVisibility);\n this._checkVisibility();\n this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);\n this._setSmoothEnabled();\n }\n createPNGStream() {\n const c = this.canvas._canvas;\n return c.createPNGStream();\n }\n getCanvas() {\n return this.canvas;\n }\n getNativeCanvasElement() {\n return this.canvas._canvas;\n }\n getHitCanvas() {\n return this.hitCanvas;\n }\n getContext() {\n return this.getCanvas().getContext();\n }\n clear(bounds) {\n this.getContext().clear(bounds);\n this.getHitCanvas().getContext().clear(bounds);\n return this;\n }\n setZIndex(index) {\n super.setZIndex(index);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n if (index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n }\n return this;\n }\n moveToTop() {\n Node.prototype.moveToTop.call(this);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveUp() {\n var moved = Node.prototype.moveUp.call(this);\n if (!moved) {\n return false;\n }\n var stage = this.getStage();\n if (!stage || !stage.content) {\n return false;\n }\n stage.content.removeChild(this.getNativeCanvasElement());\n if (this.index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[this.index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveDown() {\n if (Node.prototype.moveDown.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[this.index + 1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (Node.prototype.moveToBottom.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n getLayer() {\n return this;\n }\n remove() {\n var _canvas = this.getNativeCanvasElement();\n Node.prototype.remove.call(this);\n if (_canvas && _canvas.parentNode && Util._isInDocument(_canvas)) {\n _canvas.parentNode.removeChild(_canvas);\n }\n return this;\n }\n getStage() {\n return this.parent;\n }\n setSize({ width, height }) {\n this.canvas.setSize(width, height);\n this.hitCanvas.setSize(width, height);\n this._setSmoothEnabled();\n return this;\n }\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to a layer.');\n }\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.width = config.width || this.getWidth();\n config.height = config.height || this.getHeight();\n config.x = config.x !== undefined ? config.x : this.x();\n config.y = config.y !== undefined ? config.y : this.y();\n return Node.prototype._toKonvaCanvas.call(this, config);\n }\n _checkVisibility() {\n const visible = this.visible();\n if (visible) {\n this.canvas._canvas.style.display = 'block';\n }\n else {\n this.canvas._canvas.style.display = 'none';\n }\n }\n _setSmoothEnabled() {\n this.getContext()._context.imageSmoothingEnabled =\n this.imageSmoothingEnabled();\n }\n getWidth() {\n if (this.parent) {\n return this.parent.width();\n }\n }\n setWidth() {\n Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n }\n getHeight() {\n if (this.parent) {\n return this.parent.height();\n }\n }\n setHeight() {\n Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n }\n batchDraw() {\n if (!this._waitingForDraw) {\n this._waitingForDraw = true;\n Util.requestAnimFrame(() => {\n this.draw();\n this._waitingForDraw = false;\n });\n }\n return this;\n }\n getIntersection(pos) {\n if (!this.isListening() || !this.isVisible()) {\n return null;\n }\n var spiralSearchDistance = 1;\n var continueSearch = false;\n while (true) {\n for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n const intersectionOffset = INTERSECTION_OFFSETS[i];\n const obj = this._getIntersection({\n x: pos.x + intersectionOffset.x * spiralSearchDistance,\n y: pos.y + intersectionOffset.y * spiralSearchDistance,\n });\n const shape = obj.shape;\n if (shape) {\n return shape;\n }\n continueSearch = !!obj.antialiased;\n if (!obj.antialiased) {\n break;\n }\n }\n if (continueSearch) {\n spiralSearchDistance += 1;\n }\n else {\n return null;\n }\n }\n }\n _getIntersection(pos) {\n const ratio = this.hitCanvas.pixelRatio;\n const p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data;\n const p3 = p[3];\n if (p3 === 255) {\n const colorKey = Util._rgbToHex(p[0], p[1], p[2]);\n const shape = shapes[HASH + colorKey];\n if (shape) {\n return {\n shape: shape,\n };\n }\n return {\n antialiased: true,\n };\n }\n else if (p3 > 0) {\n return {\n antialiased: true,\n };\n }\n return {};\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n this._fire(BEFORE_DRAW, {\n node: this,\n });\n if (this.clearBeforeDraw()) {\n canvas.getContext().clear();\n }\n Container.prototype.drawScene.call(this, canvas, top);\n this._fire(DRAW, {\n node: this,\n });\n return this;\n }\n drawHit(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n if (layer && layer.clearBeforeDraw()) {\n layer.getHitCanvas().getContext().clear();\n }\n Container.prototype.drawHit.call(this, canvas, top);\n return this;\n }\n enableHitGraph() {\n this.hitGraphEnabled(true);\n return this;\n }\n disableHitGraph() {\n this.hitGraphEnabled(false);\n return this;\n }\n setHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n this.listening(val);\n }\n getHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n return this.listening();\n }\n toggleHitCanvas() {\n if (!this.parent || !this.parent['content']) {\n return;\n }\n var parent = this.parent;\n var added = !!this.hitCanvas._canvas.parentNode;\n if (added) {\n parent.content.removeChild(this.hitCanvas._canvas);\n }\n else {\n parent.content.appendChild(this.hitCanvas._canvas);\n }\n }\n destroy() {\n Util.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas);\n return super.destroy();\n }\n}\nLayer.prototype.nodeType = 'Layer';\n_registerNode(Layer);\nFactory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);\nFactory.addGetterSetter(Layer, 'clearBeforeDraw', true);\nFactory.addGetterSetter(Layer, 'hitGraphEnabled', true, getBooleanValidator());\n","import { Util } from './Util.js';\nimport { Layer } from './Layer.js';\nimport { _registerNode } from './Global.js';\nexport class FastLayer extends Layer {\n constructor(attrs) {\n super(attrs);\n this.listening(false);\n Util.warn('Konva.Fast layer is deprecated. Please use \"new Konva.Layer({ listening: false })\" instead.');\n }\n}\nFastLayer.prototype.nodeType = 'FastLayer';\n_registerNode(FastLayer);\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { _registerNode } from './Global.js';\nexport class Group extends Container {\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to groups.');\n }\n }\n}\nGroup.prototype.nodeType = 'Group';\n_registerNode(Group);\n","import { glob } from './Global.js';\nimport { Util } from './Util.js';\nvar now = (function () {\n if (glob.performance && glob.performance.now) {\n return function () {\n return glob.performance.now();\n };\n }\n return function () {\n return new Date().getTime();\n };\n})();\nexport class Animation {\n constructor(func, layers) {\n this.id = Animation.animIdCounter++;\n this.frame = {\n time: 0,\n timeDiff: 0,\n lastTime: now(),\n frameRate: 0,\n };\n this.func = func;\n this.setLayers(layers);\n }\n setLayers(layers) {\n var lays = [];\n if (!layers) {\n lays = [];\n }\n else if (layers.length > 0) {\n lays = layers;\n }\n else {\n lays = [layers];\n }\n this.layers = lays;\n return this;\n }\n getLayers() {\n return this.layers;\n }\n addLayer(layer) {\n var layers = this.layers, len = layers.length, n;\n for (n = 0; n < len; n++) {\n if (layers[n]._id === layer._id) {\n return false;\n }\n }\n this.layers.push(layer);\n return true;\n }\n isRunning() {\n var a = Animation, animations = a.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === this.id) {\n return true;\n }\n }\n return false;\n }\n start() {\n this.stop();\n this.frame.timeDiff = 0;\n this.frame.lastTime = now();\n Animation._addAnimation(this);\n return this;\n }\n stop() {\n Animation._removeAnimation(this);\n return this;\n }\n _updateFrameObject(time) {\n this.frame.timeDiff = time - this.frame.lastTime;\n this.frame.lastTime = time;\n this.frame.time += this.frame.timeDiff;\n this.frame.frameRate = 1000 / this.frame.timeDiff;\n }\n static _addAnimation(anim) {\n this.animations.push(anim);\n this._handleAnimation();\n }\n static _removeAnimation(anim) {\n var id = anim.id, animations = this.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === id) {\n this.animations.splice(n, 1);\n break;\n }\n }\n }\n static _runFrames() {\n var layerHash = {}, animations = this.animations, anim, layers, func, n, i, layersLen, layer, key, needRedraw;\n for (n = 0; n < animations.length; n++) {\n anim = animations[n];\n layers = anim.layers;\n func = anim.func;\n anim._updateFrameObject(now());\n layersLen = layers.length;\n if (func) {\n needRedraw = func.call(anim, anim.frame) !== false;\n }\n else {\n needRedraw = true;\n }\n if (!needRedraw) {\n continue;\n }\n for (i = 0; i < layersLen; i++) {\n layer = layers[i];\n if (layer._id !== undefined) {\n layerHash[layer._id] = layer;\n }\n }\n }\n for (key in layerHash) {\n if (!layerHash.hasOwnProperty(key)) {\n continue;\n }\n layerHash[key].batchDraw();\n }\n }\n static _animationLoop() {\n var Anim = Animation;\n if (Anim.animations.length) {\n Anim._runFrames();\n Util.requestAnimFrame(Anim._animationLoop);\n }\n else {\n Anim.animRunning = false;\n }\n }\n static _handleAnimation() {\n if (!this.animRunning) {\n this.animRunning = true;\n Util.requestAnimFrame(this._animationLoop);\n }\n }\n}\nAnimation.animations = [];\nAnimation.animIdCounter = 0;\nAnimation.animRunning = false;\n","import { Util } from './Util.js';\nimport { Animation } from './Animation.js';\nimport { Node } from './Node.js';\nimport { Konva } from './Global.js';\nvar blacklist = {\n node: 1,\n duration: 1,\n easing: 1,\n onFinish: 1,\n yoyo: 1,\n}, PAUSED = 1, PLAYING = 2, REVERSING = 3, idCounter = 0, colorAttrs = ['fill', 'stroke', 'shadowColor'];\nclass TweenEngine {\n constructor(prop, propFunc, func, begin, finish, duration, yoyo) {\n this.prop = prop;\n this.propFunc = propFunc;\n this.begin = begin;\n this._pos = begin;\n this.duration = duration;\n this._change = 0;\n this.prevPos = 0;\n this.yoyo = yoyo;\n this._time = 0;\n this._position = 0;\n this._startTime = 0;\n this._finish = 0;\n this.func = func;\n this._change = finish - this.begin;\n this.pause();\n }\n fire(str) {\n var handler = this[str];\n if (handler) {\n handler();\n }\n }\n setTime(t) {\n if (t > this.duration) {\n if (this.yoyo) {\n this._time = this.duration;\n this.reverse();\n }\n else {\n this.finish();\n }\n }\n else if (t < 0) {\n if (this.yoyo) {\n this._time = 0;\n this.play();\n }\n else {\n this.reset();\n }\n }\n else {\n this._time = t;\n this.update();\n }\n }\n getTime() {\n return this._time;\n }\n setPosition(p) {\n this.prevPos = this._pos;\n this.propFunc(p);\n this._pos = p;\n }\n getPosition(t) {\n if (t === undefined) {\n t = this._time;\n }\n return this.func(t, this.begin, this._change, this.duration);\n }\n play() {\n this.state = PLAYING;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onPlay');\n }\n reverse() {\n this.state = REVERSING;\n this._time = this.duration - this._time;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onReverse');\n }\n seek(t) {\n this.pause();\n this._time = t;\n this.update();\n this.fire('onSeek');\n }\n reset() {\n this.pause();\n this._time = 0;\n this.update();\n this.fire('onReset');\n }\n finish() {\n this.pause();\n this._time = this.duration;\n this.update();\n this.fire('onFinish');\n }\n update() {\n this.setPosition(this.getPosition(this._time));\n this.fire('onUpdate');\n }\n onEnterFrame() {\n var t = this.getTimer() - this._startTime;\n if (this.state === PLAYING) {\n this.setTime(t);\n }\n else if (this.state === REVERSING) {\n this.setTime(this.duration - t);\n }\n }\n pause() {\n this.state = PAUSED;\n this.fire('onPause');\n }\n getTimer() {\n return new Date().getTime();\n }\n}\nexport class Tween {\n constructor(config) {\n var that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || Easings.Linear, yoyo = !!config.yoyo, key;\n if (typeof config.duration === 'undefined') {\n duration = 0.3;\n }\n else if (config.duration === 0) {\n duration = 0.001;\n }\n else {\n duration = config.duration;\n }\n this.node = node;\n this._id = idCounter++;\n var layers = node.getLayer() ||\n (node instanceof Konva['Stage'] ? node.getLayers() : null);\n if (!layers) {\n Util.error('Tween constructor have `node` that is not in a layer. Please add node into layer first.');\n }\n this.anim = new Animation(function () {\n that.tween.onEnterFrame();\n }, layers);\n this.tween = new TweenEngine(key, function (i) {\n that._tweenFunc(i);\n }, easing, 0, 1, duration * 1000, yoyo);\n this._addListeners();\n if (!Tween.attrs[nodeId]) {\n Tween.attrs[nodeId] = {};\n }\n if (!Tween.attrs[nodeId][this._id]) {\n Tween.attrs[nodeId][this._id] = {};\n }\n if (!Tween.tweens[nodeId]) {\n Tween.tweens[nodeId] = {};\n }\n for (key in config) {\n if (blacklist[key] === undefined) {\n this._addAttr(key, config[key]);\n }\n }\n this.reset();\n this.onFinish = config.onFinish;\n this.onReset = config.onReset;\n this.onUpdate = config.onUpdate;\n }\n _addAttr(key, end) {\n var node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;\n tweenId = Tween.tweens[nodeId][key];\n if (tweenId) {\n delete Tween.attrs[nodeId][tweenId][key];\n }\n start = node.getAttr(key);\n if (Util._isArray(end)) {\n diff = [];\n len = Math.max(end.length, start.length);\n if (key === 'points' && end.length !== start.length) {\n if (end.length > start.length) {\n trueStart = start;\n start = Util._prepareArrayForTween(start, end, node.closed());\n }\n else {\n trueEnd = end;\n end = Util._prepareArrayForTween(end, start, node.closed());\n }\n }\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n diff.push(end[n] - start[n]);\n }\n else {\n var startRGBA = Util.colorToRGBA(start[n]);\n endRGBA = Util.colorToRGBA(end[n]);\n start[n] = startRGBA;\n diff.push({\n r: endRGBA.r - startRGBA.r,\n g: endRGBA.g - startRGBA.g,\n b: endRGBA.b - startRGBA.b,\n a: endRGBA.a - startRGBA.a,\n });\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n diff.push(end[n] - start[n]);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n start = Util.colorToRGBA(start);\n endRGBA = Util.colorToRGBA(end);\n diff = {\n r: endRGBA.r - start.r,\n g: endRGBA.g - start.g,\n b: endRGBA.b - start.b,\n a: endRGBA.a - start.a,\n };\n }\n else {\n diff = end - start;\n }\n Tween.attrs[nodeId][this._id][key] = {\n start: start,\n diff: diff,\n end: end,\n trueEnd: trueEnd,\n trueStart: trueStart,\n };\n Tween.tweens[nodeId][key] = this._id;\n }\n _tweenFunc(i) {\n var node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;\n for (key in attrs) {\n attr = attrs[key];\n start = attr.start;\n diff = attr.diff;\n end = attr.end;\n if (Util._isArray(start)) {\n newVal = [];\n len = Math.max(start.length, end.length);\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n else {\n newVal.push('rgba(' +\n Math.round(start[n].r + diff[n].r * i) +\n ',' +\n Math.round(start[n].g + diff[n].g * i) +\n ',' +\n Math.round(start[n].b + diff[n].b * i) +\n ',' +\n (start[n].a + diff[n].a * i) +\n ')');\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n newVal =\n 'rgba(' +\n Math.round(start.r + diff.r * i) +\n ',' +\n Math.round(start.g + diff.g * i) +\n ',' +\n Math.round(start.b + diff.b * i) +\n ',' +\n (start.a + diff.a * i) +\n ')';\n }\n else {\n newVal = start + diff * i;\n }\n node.setAttr(key, newVal);\n }\n }\n _addListeners() {\n this.tween.onPlay = () => {\n this.anim.start();\n };\n this.tween.onReverse = () => {\n this.anim.start();\n };\n this.tween.onPause = () => {\n this.anim.stop();\n };\n this.tween.onFinish = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueEnd) {\n node.setAttr('points', attrs.points.trueEnd);\n }\n if (this.onFinish) {\n this.onFinish.call(this);\n }\n };\n this.tween.onReset = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueStart) {\n node.points(attrs.points.trueStart);\n }\n if (this.onReset) {\n this.onReset();\n }\n };\n this.tween.onUpdate = () => {\n if (this.onUpdate) {\n this.onUpdate.call(this);\n }\n };\n }\n play() {\n this.tween.play();\n return this;\n }\n reverse() {\n this.tween.reverse();\n return this;\n }\n reset() {\n this.tween.reset();\n return this;\n }\n seek(t) {\n this.tween.seek(t * 1000);\n return this;\n }\n pause() {\n this.tween.pause();\n return this;\n }\n finish() {\n this.tween.finish();\n return this;\n }\n destroy() {\n var nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;\n this.pause();\n for (key in attrs) {\n delete Tween.tweens[nodeId][key];\n }\n delete Tween.attrs[nodeId][thisId];\n }\n}\nTween.attrs = {};\nTween.tweens = {};\nNode.prototype.to = function (params) {\n var onFinish = params.onFinish;\n params.node = this;\n params.onFinish = function () {\n this.destroy();\n if (onFinish) {\n onFinish();\n }\n };\n var tween = new Tween(params);\n tween.play();\n};\nexport const Easings = {\n BackEaseIn(t, b, c, d) {\n var s = 1.70158;\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n BackEaseOut(t, b, c, d) {\n var s = 1.70158;\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n BackEaseInOut(t, b, c, d) {\n var s = 1.70158;\n if ((t /= d / 2) < 1) {\n return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n }\n return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n },\n ElasticEaseIn(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (-(a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + b);\n },\n ElasticEaseOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) +\n c +\n b);\n },\n ElasticEaseInOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d / 2) === 2) {\n return b + c;\n }\n if (!p) {\n p = d * (0.3 * 1.5);\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n if (t < 1) {\n return (-0.5 *\n (a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +\n b);\n }\n return (a *\n Math.pow(2, -10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p) *\n 0.5 +\n c +\n b);\n },\n BounceEaseOut(t, b, c, d) {\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n }\n else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n }\n else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n }\n else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n }\n },\n BounceEaseIn(t, b, c, d) {\n return c - Easings.BounceEaseOut(d - t, 0, c, d) + b;\n },\n BounceEaseInOut(t, b, c, d) {\n if (t < d / 2) {\n return Easings.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n }\n else {\n return Easings.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n }\n },\n EaseIn(t, b, c, d) {\n return c * (t /= d) * t + b;\n },\n EaseOut(t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n },\n EaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t + b;\n }\n return (-c / 2) * (--t * (t - 2) - 1) + b;\n },\n StrongEaseIn(t, b, c, d) {\n return c * (t /= d) * t * t * t * t + b;\n },\n StrongEaseOut(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n StrongEaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t * t * t * t + b;\n }\n return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;\n },\n Linear(t, b, c, d) {\n return (c * t) / d + b;\n },\n};\n","import { Konva as Global } from './Global.js';\nimport { Util, Transform } from './Util.js';\nimport { Node } from './Node.js';\nimport { Container } from './Container.js';\nimport { Stage, stages } from './Stage.js';\nimport { Layer } from './Layer.js';\nimport { FastLayer } from './FastLayer.js';\nimport { Group } from './Group.js';\nimport { DD } from './DragAndDrop.js';\nimport { Shape, shapes } from './Shape.js';\nimport { Animation } from './Animation.js';\nimport { Tween, Easings } from './Tween.js';\nimport { Context } from './Context.js';\nimport { Canvas } from './Canvas.js';\nexport const Konva = Util._assign(Global, {\n Util,\n Transform,\n Node,\n Container,\n Stage,\n stages,\n Layer,\n FastLayer,\n Group,\n DD,\n Shape,\n shapes,\n Animation,\n Tween,\n Easings,\n Context,\n Canvas,\n});\nexport default Konva;\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator, getBooleanValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Arc extends Shape {\n _sceneFunc(context) {\n var angle = Konva.getAngle(this.angle()), clockwise = this.clockwise();\n context.beginPath();\n context.arc(0, 0, this.outerRadius(), 0, angle, clockwise);\n context.arc(0, 0, this.innerRadius(), angle, 0, !clockwise);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n getSelfRect() {\n const innerRadius = this.innerRadius();\n const outerRadius = this.outerRadius();\n const clockwise = this.clockwise();\n const angle = Konva.getAngle(clockwise ? 360 - this.angle() : this.angle());\n const boundLeftRatio = Math.cos(Math.min(angle, Math.PI));\n const boundRightRatio = 1;\n const boundTopRatio = Math.sin(Math.min(Math.max(Math.PI, angle), (3 * Math.PI) / 2));\n const boundBottomRatio = Math.sin(Math.min(angle, Math.PI / 2));\n const boundLeft = boundLeftRatio * (boundLeftRatio > 0 ? innerRadius : outerRadius);\n const boundRight = boundRightRatio * (boundRightRatio > 0 ? outerRadius : innerRadius);\n const boundTop = boundTopRatio * (boundTopRatio > 0 ? innerRadius : outerRadius);\n const boundBottom = boundBottomRatio * (boundBottomRatio > 0 ? outerRadius : innerRadius);\n return {\n x: boundLeft,\n y: clockwise ? -1 * boundBottom : boundTop,\n width: boundRight - boundLeft,\n height: boundBottom - boundTop,\n };\n }\n}\nArc.prototype._centroid = true;\nArc.prototype.className = 'Arc';\nArc.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Arc);\nFactory.addGetterSetter(Arc, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'outerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'clockwise', false, getBooleanValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getNumberArrayValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nfunction getControlPoints(x0, y0, x1, y1, x2, y2, t) {\n var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n return [p1x, p1y, p2x, p2y];\n}\nfunction expandPoints(p, tension) {\n var len = p.length, allPoints = [], n, cp;\n for (n = 2; n < len - 2; n += 2) {\n cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n if (isNaN(cp[0])) {\n continue;\n }\n allPoints.push(cp[0]);\n allPoints.push(cp[1]);\n allPoints.push(p[n]);\n allPoints.push(p[n + 1]);\n allPoints.push(cp[2]);\n allPoints.push(cp[3]);\n }\n return allPoints;\n}\nexport class Line extends Shape {\n constructor(config) {\n super(config);\n this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n this._clearCache('tensionPoints');\n });\n }\n _sceneFunc(context) {\n var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n if (!length) {\n return;\n }\n context.beginPath();\n context.moveTo(points[0], points[1]);\n if (tension !== 0 && length > 4) {\n tp = this.getTensionPoints();\n len = tp.length;\n n = closed ? 0 : 4;\n if (!closed) {\n context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n }\n while (n < len - 2) {\n context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n }\n if (!closed) {\n context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n }\n }\n else if (bezier) {\n n = 2;\n while (n < length) {\n context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n }\n }\n else {\n for (n = 2; n < length; n += 2) {\n context.lineTo(points[n], points[n + 1]);\n }\n }\n if (closed) {\n context.closePath();\n context.fillStrokeShape(this);\n }\n else {\n context.strokeShape(this);\n }\n }\n getTensionPoints() {\n return this._getCache('tensionPoints', this._getTensionPoints);\n }\n _getTensionPoints() {\n if (this.closed()) {\n return this._getTensionPointsClosed();\n }\n else {\n return expandPoints(this.points(), this.tension());\n }\n }\n _getTensionPointsClosed() {\n var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n .concat(middle)\n .concat([\n lastControlPoints[0],\n lastControlPoints[1],\n p[len - 2],\n p[len - 1],\n lastControlPoints[2],\n lastControlPoints[3],\n firstControlPoints[0],\n firstControlPoints[1],\n p[0],\n p[1],\n ]);\n return tp;\n }\n getWidth() {\n return this.getSelfRect().width;\n }\n getHeight() {\n return this.getSelfRect().height;\n }\n getSelfRect() {\n var points = this.points();\n if (points.length < 4) {\n return {\n x: points[0] || 0,\n y: points[1] || 0,\n width: 0,\n height: 0,\n };\n }\n if (this.tension() !== 0) {\n points = [\n points[0],\n points[1],\n ...this._getTensionPoints(),\n points[points.length - 2],\n points[points.length - 1],\n ];\n }\n else {\n points = this.points();\n }\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n}\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\n_registerNode(Line);\nFactory.addGetterSetter(Line, 'closed', false);\nFactory.addGetterSetter(Line, 'bezier', false);\nFactory.addGetterSetter(Line, 'tension', 0, getNumberValidator());\nFactory.addGetterSetter(Line, 'points', [], getNumberArrayValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nexport class Path extends Shape {\n constructor(config) {\n super(config);\n this.dataArray = [];\n this.pathLength = 0;\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n });\n }\n _sceneFunc(context) {\n var ca = this.dataArray;\n context.beginPath();\n var isClosed = false;\n for (var n = 0; n < ca.length; n++) {\n var c = ca[n].command;\n var p = ca[n].points;\n switch (c) {\n case 'L':\n context.lineTo(p[0], p[1]);\n break;\n case 'M':\n context.moveTo(p[0], p[1]);\n break;\n case 'C':\n context.bezierCurveTo(p[0], p[1], p[2], p[3], p[4], p[5]);\n break;\n case 'Q':\n context.quadraticCurveTo(p[0], p[1], p[2], p[3]);\n break;\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6], fs = p[7];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n case 'z':\n isClosed = true;\n context.closePath();\n break;\n }\n }\n if (!isClosed && !this.hasFill()) {\n context.strokeShape(this);\n }\n else {\n context.fillStrokeShape(this);\n }\n }\n getSelfRect() {\n var points = [];\n this.dataArray.forEach(function (data) {\n if (data.command === 'A') {\n var start = data.points[4];\n var dTheta = data.points[5];\n var end = data.points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n if (dTheta < 0) {\n for (let t = start - inc; t > end; t -= inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n else {\n for (let t = start + inc; t < end; t += inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n }\n else if (data.command === 'C') {\n for (let t = 0.0; t <= 1; t += 0.01) {\n const point = Path.getPointOnCubicBezier(t, data.start.x, data.start.y, data.points[0], data.points[1], data.points[2], data.points[3], data.points[4], data.points[5]);\n points.push(point.x, point.y);\n }\n }\n else {\n points = points.concat(data.points);\n }\n });\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n if (!isNaN(x)) {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n }\n if (!isNaN(y)) {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getLength() {\n return this.pathLength;\n }\n getPointAtLength(length) {\n var point, i = 0, ii = this.dataArray.length;\n if (!ii) {\n return null;\n }\n while (i < ii && length > this.dataArray[i].pathLength) {\n length -= this.dataArray[i].pathLength;\n ++i;\n }\n if (i === ii) {\n point = this.dataArray[i - 1].points.slice(-2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n if (length < 0.01) {\n point = this.dataArray[i].points.slice(0, 2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n var cp = this.dataArray[i];\n var p = cp.points;\n switch (cp.command) {\n case 'L':\n return Path.getPointOnLine(length, cp.start.x, cp.start.y, p[0], p[1]);\n case 'C':\n return Path.getPointOnCubicBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3], p[4], p[5]);\n case 'Q':\n return Path.getPointOnQuadraticBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3]);\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6];\n theta += (dTheta * length) / cp.pathLength;\n return Path.getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi);\n }\n return null;\n }\n static getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n static getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX, fromY) {\n if (fromX === undefined) {\n fromX = P1x;\n }\n if (fromY === undefined) {\n fromY = P1y;\n }\n var m = (P2y - P1y) / (P2x - P1x + 0.00000001);\n var run = Math.sqrt((dist * dist) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n var rise = m * run;\n var pt;\n if (P2x === P1x) {\n pt = {\n x: fromX,\n y: fromY + rise,\n };\n }\n else if ((fromY - P1y) / (fromX - P1x + 0.00000001) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise,\n };\n }\n else {\n var ix, iy;\n var len = this.getLineLength(P1x, P1y, P2x, P2y);\n var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);\n u = u / (len * len);\n ix = P1x + u * (P2x - P1x);\n iy = P1y + u * (P2y - P1y);\n var pRise = this.getLineLength(fromX, fromY, ix, iy);\n var pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt((pRun * pRun) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise,\n };\n }\n return pt;\n }\n static getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {\n function CB1(t) {\n return t * t * t;\n }\n function CB2(t) {\n return 3 * t * t * (1 - t);\n }\n function CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n }\n function CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n }\n var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);\n var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {\n function QB1(t) {\n return t * t;\n }\n function QB2(t) {\n return 2 * t * (1 - t);\n }\n function QB3(t) {\n return (1 - t) * (1 - t);\n }\n var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);\n var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n var cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);\n var pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta),\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi),\n };\n }\n static parsePathData(data) {\n if (!data) {\n return [];\n }\n var cs = data;\n var cc = [\n 'm',\n 'M',\n 'l',\n 'L',\n 'v',\n 'V',\n 'h',\n 'H',\n 'z',\n 'Z',\n 'c',\n 'C',\n 'q',\n 'Q',\n 't',\n 'T',\n 's',\n 'S',\n 'a',\n 'A',\n ];\n cs = cs.replace(new RegExp(' ', 'g'), ',');\n for (var n = 0; n < cc.length; n++) {\n cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n }\n var arr = cs.split('|');\n var ca = [];\n var coords = [];\n var cpx = 0;\n var cpy = 0;\n var re = /([-+]?((\\d+\\.\\d+)|((\\d+)|(\\.\\d+)))(?:e[-+]?\\d+)?)/gi;\n var match;\n for (n = 1; n < arr.length; n++) {\n var str = arr[n];\n var c = str.charAt(0);\n str = str.slice(1);\n coords.length = 0;\n while ((match = re.exec(str))) {\n coords.push(match[0]);\n }\n var p = [];\n for (var j = 0, jlen = coords.length; j < jlen; j++) {\n if (coords[j] === '00') {\n p.push(0, 0);\n continue;\n }\n var parsed = parseFloat(coords[j]);\n if (!isNaN(parsed)) {\n p.push(parsed);\n }\n else {\n p.push(0);\n }\n }\n while (p.length > 0) {\n if (isNaN(p[0])) {\n break;\n }\n var cmd = null;\n var points = [];\n var startX = cpx, startY = cpy;\n var prevCmd, ctlPtx, ctlPty;\n var rx, ry, psi, fa, fs, x1, y1;\n switch (c) {\n case 'l':\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'L':\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'm':\n var dx = p.shift();\n var dy = p.shift();\n cpx += dx;\n cpy += dy;\n cmd = 'M';\n if (ca.length > 2 && ca[ca.length - 1].command === 'z') {\n for (var idx = ca.length - 2; idx >= 0; idx--) {\n if (ca[idx].command === 'M') {\n cpx = ca[idx].points[0] + dx;\n cpy = ca[idx].points[1] + dy;\n break;\n }\n }\n }\n points.push(cpx, cpy);\n c = 'l';\n break;\n case 'M':\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'M';\n points.push(cpx, cpy);\n c = 'L';\n break;\n case 'h':\n cpx += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'H':\n cpx = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'v':\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'V':\n cpy = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'C':\n points.push(p.shift(), p.shift(), p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'c':\n points.push(cpx + p.shift(), cpy + p.shift(), cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'Q':\n points.push(p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'q':\n points.push(cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(cpx, cpy);\n break;\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 'A':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n case 'a':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n }\n ca.push({\n command: cmd || c,\n points: points,\n start: {\n x: startX,\n y: startY,\n },\n pathLength: this.calcLength(startX, startY, cmd || c, points),\n });\n }\n if (c === 'z' || c === 'Z') {\n ca.push({\n command: 'z',\n points: [],\n start: undefined,\n pathLength: 0,\n });\n }\n }\n return ca;\n }\n static calcLength(x, y, cmd, points) {\n var len, p1, p2, t;\n var path = Path;\n switch (cmd) {\n case 'L':\n return path.getLineLength(x, y, points[0], points[1]);\n case 'C':\n len = 0.0;\n p1 = path.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'Q':\n len = 0.0;\n p1 = path.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'A':\n len = 0.0;\n var start = points[4];\n var dTheta = points[5];\n var end = points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n p1 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for (t = start - inc; t > end; t -= inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n else {\n for (t = start + inc; t < end; t += inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n return 0;\n }\n static convertEndpointToCenterParameterization(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg) {\n var psi = psiDeg * (Math.PI / 180.0);\n var xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +\n (Math.cos(psi) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /\n (rx * rx * (yp * yp) + ry * ry * (xp * xp)));\n if (fa === fs) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n var cxp = (f * rx * yp) / ry;\n var cyp = (f * -ry * xp) / rx;\n var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n var vMag = function (v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n };\n var vRatio = function (u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n };\n var vAngle = function (u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n };\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return [cx, cy, rx, ry, theta, dTheta, psi, fs];\n }\n}\nPath.prototype.className = 'Path';\nPath.prototype._attrsAffectingSize = ['data'];\n_registerNode(Path);\nFactory.addGetterSetter(Path, 'data');\n","import { Factory } from '../Factory.js';\nimport { Line } from './Line.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nimport { Path } from './Path.js';\nexport class Arrow extends Line {\n _sceneFunc(ctx) {\n super._sceneFunc(ctx);\n var PI2 = Math.PI * 2;\n var points = this.points();\n var tp = points;\n var fromTension = this.tension() !== 0 && points.length > 4;\n if (fromTension) {\n tp = this.getTensionPoints();\n }\n var length = this.pointerLength();\n var n = points.length;\n var dx, dy;\n if (fromTension) {\n const lp = [\n tp[tp.length - 4],\n tp[tp.length - 3],\n tp[tp.length - 2],\n tp[tp.length - 1],\n points[n - 2],\n points[n - 1],\n ];\n const lastLength = Path.calcLength(tp[tp.length - 4], tp[tp.length - 3], 'C', lp);\n const previous = Path.getPointOnQuadraticBezier(Math.min(1, 1 - length / lastLength), lp[0], lp[1], lp[2], lp[3], lp[4], lp[5]);\n dx = points[n - 2] - previous.x;\n dy = points[n - 1] - previous.y;\n }\n else {\n dx = points[n - 2] - points[n - 4];\n dy = points[n - 1] - points[n - 3];\n }\n var radians = (Math.atan2(dy, dx) + PI2) % PI2;\n var width = this.pointerWidth();\n if (this.pointerAtEnding()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[n - 2], points[n - 1]);\n ctx.rotate(radians);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n if (this.pointerAtBeginning()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[0], points[1]);\n if (fromTension) {\n dx = (tp[0] + tp[2]) / 2 - points[0];\n dy = (tp[1] + tp[3]) / 2 - points[1];\n }\n else {\n dx = points[2] - points[0];\n dy = points[3] - points[1];\n }\n ctx.rotate((Math.atan2(-dy, -dx) + PI2) % PI2);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n }\n __fillStroke(ctx) {\n var isDashEnabled = this.dashEnabled();\n if (isDashEnabled) {\n this.attrs.dashEnabled = false;\n ctx.setLineDash([]);\n }\n ctx.fillStrokeShape(this);\n if (isDashEnabled) {\n this.attrs.dashEnabled = true;\n }\n }\n getSelfRect() {\n const lineRect = super.getSelfRect();\n const offset = this.pointerWidth() / 2;\n return {\n x: lineRect.x - offset,\n y: lineRect.y - offset,\n width: lineRect.width + offset * 2,\n height: lineRect.height + offset * 2,\n };\n }\n}\nArrow.prototype.className = 'Arrow';\n_registerNode(Arrow);\nFactory.addGetterSetter(Arrow, 'pointerLength', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerWidth', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerAtBeginning', false);\nFactory.addGetterSetter(Arrow, 'pointerAtEnding', true);\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Circle extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.attrs.radius || 0, 0, Math.PI * 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n if (this.radius() !== width / 2) {\n this.radius(width / 2);\n }\n }\n setHeight(height) {\n if (this.radius() !== height / 2) {\n this.radius(height / 2);\n }\n }\n}\nCircle.prototype._centroid = true;\nCircle.prototype.className = 'Circle';\nCircle.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Circle);\nFactory.addGetterSetter(Circle, 'radius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Ellipse extends Shape {\n _sceneFunc(context) {\n var rx = this.radiusX(), ry = this.radiusY();\n context.beginPath();\n context.save();\n if (rx !== ry) {\n context.scale(1, ry / rx);\n }\n context.arc(0, 0, rx, 0, Math.PI * 2, false);\n context.restore();\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radiusX() * 2;\n }\n getHeight() {\n return this.radiusY() * 2;\n }\n setWidth(width) {\n this.radiusX(width / 2);\n }\n setHeight(height) {\n this.radiusY(height / 2);\n }\n}\nEllipse.prototype.className = 'Ellipse';\nEllipse.prototype._centroid = true;\nEllipse.prototype._attrsAffectingSize = ['radiusX', 'radiusY'];\n_registerNode(Ellipse);\nFactory.addComponentsGetterSetter(Ellipse, 'radius', ['x', 'y']);\nFactory.addGetterSetter(Ellipse, 'radiusX', 0, getNumberValidator());\nFactory.addGetterSetter(Ellipse, 'radiusY', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nexport class Image extends Shape {\n constructor(attrs) {\n super(attrs);\n this.on('imageChange.konva', () => {\n this._setImageLoad();\n });\n this._setImageLoad();\n }\n _setImageLoad() {\n const image = this.image();\n if (image && image.complete) {\n return;\n }\n if (image && image.readyState === 4) {\n return;\n }\n if (image && image['addEventListener']) {\n image['addEventListener']('load', () => {\n this._requestDraw();\n });\n }\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _sceneFunc(context) {\n const width = this.getWidth();\n const height = this.getHeight();\n const cornerRadius = this.cornerRadius();\n const image = this.attrs.image;\n let params;\n if (image) {\n const cropWidth = this.attrs.cropWidth;\n const cropHeight = this.attrs.cropHeight;\n if (cropWidth && cropHeight) {\n params = [\n image,\n this.cropX(),\n this.cropY(),\n cropWidth,\n cropHeight,\n 0,\n 0,\n width,\n height,\n ];\n }\n else {\n params = [image, 0, 0, width, height];\n }\n }\n if (this.hasFill() || this.hasStroke() || cornerRadius) {\n context.beginPath();\n cornerRadius\n ? Util.drawRoundedRectPath(context, width, height, cornerRadius)\n : context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (cornerRadius) {\n context.clip();\n }\n context.drawImage.apply(context, params);\n }\n }\n _hitFunc(context) {\n var width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n var _a, _b;\n return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.width;\n }\n getHeight() {\n var _a, _b;\n return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.height;\n }\n static fromURL(url, callback, onError = null) {\n var img = Util.createImageElement();\n img.onload = function () {\n var image = new Image({\n image: img,\n });\n callback(image);\n };\n img.onerror = onError;\n img.crossOrigin = 'Anonymous';\n img.src = url;\n }\n}\nImage.prototype.className = 'Image';\n_registerNode(Image);\nFactory.addGetterSetter(Image, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\nFactory.addGetterSetter(Image, 'image');\nFactory.addComponentsGetterSetter(Image, 'crop', ['x', 'y', 'width', 'height']);\nFactory.addGetterSetter(Image, 'cropX', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropY', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropHeight', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Group } from '../Group.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'padding',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'pointerDirection',\n 'pointerWidth',\n 'pointerHeight',\n], CHANGE_KONVA = 'Change.konva', NONE = 'none', UP = 'up', RIGHT = 'right', DOWN = 'down', LEFT = 'left', attrChangeListLen = ATTR_CHANGE_LIST.length;\nexport class Label extends Group {\n constructor(config) {\n super(config);\n this.on('add.konva', function (evt) {\n this._addListeners(evt.child);\n this._sync();\n });\n }\n getText() {\n return this.find('Text')[0];\n }\n getTag() {\n return this.find('Tag')[0];\n }\n _addListeners(text) {\n var that = this, n;\n var func = function () {\n that._sync();\n };\n for (n = 0; n < attrChangeListLen; n++) {\n text.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, func);\n }\n }\n getWidth() {\n return this.getText().width();\n }\n getHeight() {\n return this.getText().height();\n }\n _sync() {\n var text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;\n if (text && tag) {\n width = text.width();\n height = text.height();\n pointerDirection = tag.pointerDirection();\n pointerWidth = tag.pointerWidth();\n pointerHeight = tag.pointerHeight();\n x = 0;\n y = 0;\n switch (pointerDirection) {\n case UP:\n x = width / 2;\n y = -1 * pointerHeight;\n break;\n case RIGHT:\n x = width + pointerWidth;\n y = height / 2;\n break;\n case DOWN:\n x = width / 2;\n y = height + pointerHeight;\n break;\n case LEFT:\n x = -1 * pointerWidth;\n y = height / 2;\n break;\n }\n tag.setAttrs({\n x: -1 * x,\n y: -1 * y,\n width: width,\n height: height,\n });\n text.setAttrs({\n x: -1 * x,\n y: -1 * y,\n });\n }\n }\n}\nLabel.prototype.className = 'Label';\n_registerNode(Label);\nexport class Tag extends Shape {\n _sceneFunc(context) {\n var width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = this.cornerRadius();\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft =\n topRight =\n bottomLeft =\n bottomRight =\n Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.beginPath();\n context.moveTo(topLeft, 0);\n if (pointerDirection === UP) {\n context.lineTo((width - pointerWidth) / 2, 0);\n context.lineTo(width / 2, -1 * pointerHeight);\n context.lineTo((width + pointerWidth) / 2, 0);\n }\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n if (pointerDirection === RIGHT) {\n context.lineTo(width, (height - pointerHeight) / 2);\n context.lineTo(width + pointerWidth, height / 2);\n context.lineTo(width, (height + pointerHeight) / 2);\n }\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n if (pointerDirection === DOWN) {\n context.lineTo((width + pointerWidth) / 2, height);\n context.lineTo(width / 2, height + pointerHeight);\n context.lineTo((width - pointerWidth) / 2, height);\n }\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n if (pointerDirection === LEFT) {\n context.lineTo(0, (height + pointerHeight) / 2);\n context.lineTo(-1 * pointerWidth, height / 2);\n context.lineTo(0, (height - pointerHeight) / 2);\n }\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getSelfRect() {\n var x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();\n if (direction === UP) {\n y -= pointerHeight;\n height += pointerHeight;\n }\n else if (direction === DOWN) {\n height += pointerHeight;\n }\n else if (direction === LEFT) {\n x -= pointerWidth * 1.5;\n width += pointerWidth;\n }\n else if (direction === RIGHT) {\n width += pointerWidth * 1.5;\n }\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n };\n }\n}\nTag.prototype.className = 'Tag';\n_registerNode(Tag);\nFactory.addGetterSetter(Tag, 'pointerDirection', NONE);\nFactory.addGetterSetter(Tag, 'pointerWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'pointerHeight', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { Util } from '../Util.js';\nimport { getNumberOrArrayOfNumbersValidator } from '../Validators.js';\nexport class Rect extends Shape {\n _sceneFunc(context) {\n var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n}\nRect.prototype.className = 'Rect';\n_registerNode(Rect);\nFactory.addGetterSetter(Rect, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class RegularPolygon extends Shape {\n _sceneFunc(context) {\n const points = this._getPoints();\n context.beginPath();\n context.moveTo(points[0].x, points[0].y);\n for (var n = 1; n < points.length; n++) {\n context.lineTo(points[n].x, points[n].y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n _getPoints() {\n const sides = this.attrs.sides;\n const radius = this.attrs.radius || 0;\n const points = [];\n for (var n = 0; n < sides; n++) {\n points.push({\n x: radius * Math.sin((n * 2 * Math.PI) / sides),\n y: -1 * radius * Math.cos((n * 2 * Math.PI) / sides),\n });\n }\n return points;\n }\n getSelfRect() {\n const points = this._getPoints();\n var minX = points[0].x;\n var maxX = points[0].y;\n var minY = points[0].x;\n var maxY = points[0].y;\n points.forEach((point) => {\n minX = Math.min(minX, point.x);\n maxX = Math.max(maxX, point.x);\n minY = Math.min(minY, point.y);\n maxY = Math.max(maxY, point.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nRegularPolygon.prototype.className = 'RegularPolygon';\nRegularPolygon.prototype._centroid = true;\nRegularPolygon.prototype._attrsAffectingSize = ['radius'];\n_registerNode(RegularPolygon);\nFactory.addGetterSetter(RegularPolygon, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(RegularPolygon, 'sides', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar PIx2 = Math.PI * 2;\nexport class Ring extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.innerRadius(), 0, PIx2, false);\n context.moveTo(this.outerRadius(), 0);\n context.arc(0, 0, this.outerRadius(), PIx2, 0, true);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nRing.prototype.className = 'Ring';\nRing.prototype._centroid = true;\nRing.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Ring);\nFactory.addGetterSetter(Ring, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Ring, 'outerRadius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Animation } from '../Animation.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Sprite extends Shape {\n constructor(config) {\n super(config);\n this._updated = true;\n this.anim = new Animation(() => {\n var updated = this._updated;\n this._updated = false;\n return updated;\n });\n this.on('animationChange.konva', function () {\n this.frameIndex(0);\n });\n this.on('frameIndexChange.konva', function () {\n this._updated = true;\n });\n this.on('frameRateChange.konva', function () {\n if (!this.anim.isRunning()) {\n return;\n }\n clearInterval(this.interval);\n this._setInterval();\n });\n }\n _sceneFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();\n if (this.hasFill() || this.hasStroke()) {\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (offsets) {\n var offset = offsets[anim], ix2 = index * 2;\n context.drawImage(image, x, y, width, height, offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.drawImage(image, x, y, width, height, 0, 0, width, height);\n }\n }\n }\n _hitFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];\n context.beginPath();\n if (offsets) {\n var offset = offsets[anim];\n var ix2 = index * 2;\n context.rect(offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.rect(0, 0, width, height);\n }\n context.closePath();\n context.fillShape(this);\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _setInterval() {\n var that = this;\n this.interval = setInterval(function () {\n that._updateIndex();\n }, 1000 / this.frameRate());\n }\n start() {\n if (this.isRunning()) {\n return;\n }\n var layer = this.getLayer();\n this.anim.setLayers(layer);\n this._setInterval();\n this.anim.start();\n }\n stop() {\n this.anim.stop();\n clearInterval(this.interval);\n }\n isRunning() {\n return this.anim.isRunning();\n }\n _updateIndex() {\n var index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;\n if (index < len - 1) {\n this.frameIndex(index + 1);\n }\n else {\n this.frameIndex(0);\n }\n }\n}\nSprite.prototype.className = 'Sprite';\n_registerNode(Sprite);\nFactory.addGetterSetter(Sprite, 'animation');\nFactory.addGetterSetter(Sprite, 'animations');\nFactory.addGetterSetter(Sprite, 'frameOffsets');\nFactory.addGetterSetter(Sprite, 'image');\nFactory.addGetterSetter(Sprite, 'frameIndex', 0, getNumberValidator());\nFactory.addGetterSetter(Sprite, 'frameRate', 17, getNumberValidator());\nFactory.backCompat(Sprite, {\n index: 'frameIndex',\n getIndex: 'getFrameIndex',\n setIndex: 'setFrameIndex',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Star extends Shape {\n _sceneFunc(context) {\n var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();\n context.beginPath();\n context.moveTo(0, 0 - outerRadius);\n for (var n = 1; n < numPoints * 2; n++) {\n var radius = n % 2 === 0 ? outerRadius : innerRadius;\n var x = radius * Math.sin((n * Math.PI) / numPoints);\n var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);\n context.lineTo(x, y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nStar.prototype.className = 'Star';\nStar.prototype._centroid = true;\nStar.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Star);\nFactory.addGetterSetter(Star, 'numPoints', 5, getNumberValidator());\nFactory.addGetterSetter(Star, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Star, 'outerRadius', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getStringValidator, getNumberOrAutoValidator, getBooleanValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport function stringToArray(string) {\n return Array.from(string);\n}\nvar AUTO = 'auto', CENTER = 'center', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontVariant',\n 'padding',\n 'align',\n 'verticalAlign',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'wrap',\n 'ellipsis',\n 'letterSpacing',\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nfunction normalizeFontFamily(fontFamily) {\n return fontFamily\n .split(',')\n .map((family) => {\n family = family.trim();\n const hasSpace = family.indexOf(' ') >= 0;\n const hasQuotes = family.indexOf('\"') >= 0 || family.indexOf(\"'\") >= 0;\n if (hasSpace && !hasQuotes) {\n family = `\"${family}\"`;\n }\n return family;\n })\n .join(', ');\n}\nvar dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext(CONTEXT_2D);\n return dummyContext;\n}\nfunction _fillFunc(context) {\n context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n config = config || {};\n if (!config.fillLinearGradientColorStops &&\n !config.fillRadialGradientColorStops &&\n !config.fillPatternImage) {\n config.fill = config.fill || 'black';\n }\n return config;\n}\nexport class Text extends Shape {\n constructor(config) {\n super(checkDefaultFill(config));\n this._partialTextX = 0;\n this._partialTextY = 0;\n for (var n = 0; n < attrChangeListLen; n++) {\n this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);\n }\n this._setTextData();\n }\n _sceneFunc(context) {\n var textArr = this.textArr, textArrLen = textArr.length;\n if (!this.text()) {\n return;\n }\n var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n var translateY = 0;\n var translateY = lineHeightPx / 2;\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', MIDDLE);\n context.setAttr('textAlign', LEFT);\n if (verticalAlign === MIDDLE) {\n alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n }\n else if (verticalAlign === BOTTOM) {\n alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n }\n context.translate(padding, alignY + padding);\n for (n = 0; n < textArrLen; n++) {\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, oneWord, lineWidth;\n context.save();\n if (align === RIGHT) {\n lineTranslateX += totalWidth - width - padding * 2;\n }\n else if (align === CENTER) {\n lineTranslateX += (totalWidth - width - padding * 2) / 2;\n }\n if (shouldUnderline) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY + Math.round(fontSize / 2));\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + Math.round(fontSize / 2));\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (shouldLineThrough) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY);\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && lastLine && !oneWord\n ? totalWidth - padding * 2\n : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY);\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (letterSpacing !== 0 || align === JUSTIFY) {\n spacesNumber = text.split(' ').length - 1;\n var array = stringToArray(text);\n for (var li = 0; li < array.length; li++) {\n var letter = array[li];\n if (letter === ' ' && !lastLine && align === JUSTIFY) {\n lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;\n }\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = letter;\n context.fillStrokeShape(this);\n lineTranslateX += this.measureSize(letter).width + letterSpacing;\n }\n }\n else {\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = text;\n context.fillStrokeShape(this);\n }\n context.restore();\n if (textArrLen > 1) {\n translateY += lineHeightPx;\n }\n }\n }\n _hitFunc(context) {\n var width = this.getWidth(), height = this.getHeight();\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n setText(text) {\n var str = Util._isString(text)\n ? text\n : text === null || text === undefined\n ? ''\n : text + '';\n this._setAttr(TEXT, str);\n return this;\n }\n getWidth() {\n var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n }\n getHeight() {\n var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n return isAuto\n ? this.fontSize() * this.textArr.length * this.lineHeight() +\n this.padding() * 2\n : this.attrs.height;\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n measureSize(text) {\n var _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n _context.save();\n _context.font = this._getContextFont();\n metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: fontSize,\n };\n }\n _getContextFont() {\n return (this.fontStyle() +\n SPACE +\n this.fontVariant() +\n SPACE +\n (this.fontSize() + PX_SPACE) +\n normalizeFontFamily(this.fontFamily()));\n }\n _addTextLine(line) {\n const align = this.align();\n if (align === JUSTIFY) {\n line = line.trim();\n }\n var width = this._getTextWidth(line);\n return this.textArr.push({\n text: line,\n width: width,\n lastInParagraph: false,\n });\n }\n _getTextWidth(text) {\n var letterSpacing = this.letterSpacing();\n var length = text.length;\n return (getDummyContext().measureText(text).width +\n (length ? letterSpacing * (length - 1) : 0));\n }\n _setTextData() {\n var lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();\n this.textArr = [];\n getDummyContext().font = this._getContextFont();\n var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;\n for (var i = 0, max = lines.length; i < max; ++i) {\n var line = lines[i];\n var lineWidth = this._getTextWidth(line);\n if (fixedWidth && lineWidth > maxWidth) {\n while (line.length > 0) {\n var low = 0, high = line.length, match = '', matchWidth = 0;\n while (low < high) {\n var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;\n if (substrWidth <= maxWidth) {\n low = mid + 1;\n match = substr;\n matchWidth = substrWidth;\n }\n else {\n high = mid;\n }\n }\n if (match) {\n if (wrapAtWord) {\n var wrapIndex;\n var nextChar = line[match.length];\n var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n wrapIndex = match.length;\n }\n else {\n wrapIndex =\n Math.max(match.lastIndexOf(SPACE), match.lastIndexOf(DASH)) +\n 1;\n }\n if (wrapIndex > 0) {\n low = wrapIndex;\n match = match.slice(0, low);\n matchWidth = this._getTextWidth(match);\n }\n }\n match = match.trimRight();\n this._addTextLine(match);\n textWidth = Math.max(textWidth, matchWidth);\n currentHeightPx += lineHeightPx;\n var shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);\n if (shouldHandleEllipsis) {\n this._tryToAddEllipsisToLastLine();\n break;\n }\n line = line.slice(low);\n line = line.trimLeft();\n if (line.length > 0) {\n lineWidth = this._getTextWidth(line);\n if (lineWidth <= maxWidth) {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n break;\n }\n }\n }\n else {\n break;\n }\n }\n }\n else {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) {\n this._tryToAddEllipsisToLastLine();\n }\n }\n if (this.textArr[this.textArr.length - 1]) {\n this.textArr[this.textArr.length - 1].lastInParagraph = true;\n }\n if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n break;\n }\n }\n this.textHeight = fontSize;\n this.textWidth = textWidth;\n }\n _shouldHandleEllipsis(currentHeightPx) {\n var fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;\n return (!shouldWrap ||\n (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));\n }\n _tryToAddEllipsisToLastLine() {\n var width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();\n var lastLine = this.textArr[this.textArr.length - 1];\n if (!lastLine || !shouldAddEllipsis) {\n return;\n }\n if (fixedWidth) {\n var haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;\n if (!haveSpace) {\n lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);\n }\n }\n this.textArr.splice(this.textArr.length - 1, 1);\n this._addTextLine(lastLine.text + ELLIPSIS);\n }\n getStrokeScaleEnabled() {\n return true;\n }\n}\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n 'text',\n 'fontSize',\n 'padding',\n 'wrap',\n 'lineHeight',\n 'letterSpacing',\n];\n_registerNode(Text);\nFactory.overWriteSetter(Text, 'width', getNumberOrAutoValidator());\nFactory.overWriteSetter(Text, 'height', getNumberOrAutoValidator());\nFactory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory.addGetterSetter(Text, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory.addGetterSetter(Text, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'align', LEFT);\nFactory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory.addGetterSetter(Text, 'lineHeight', 1, getNumberValidator());\nFactory.addGetterSetter(Text, 'wrap', WORD);\nFactory.addGetterSetter(Text, 'ellipsis', false, getBooleanValidator());\nFactory.addGetterSetter(Text, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'text', '', getStringValidator());\nFactory.addGetterSetter(Text, 'textDecoration', '');\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Path } from './Path.js';\nimport { Text, stringToArray } from './Text.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EMPTY_STRING = '', NORMAL = 'normal';\nfunction _fillFunc(context) {\n context.fillText(this.partialText, 0, 0);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this.partialText, 0, 0);\n}\nexport class TextPath extends Shape {\n constructor(config) {\n super(config);\n this.dummyCanvas = Util.createCanvasElement();\n this.dataArray = [];\n this.dataArray = Path.parsePathData(this.attrs.data);\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.attrs.data);\n this._setTextData();\n });\n this.on('textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva', this._setTextData);\n this._setTextData();\n }\n _sceneFunc(context) {\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', this.textBaseline());\n context.setAttr('textAlign', 'left');\n context.save();\n var textDecoration = this.textDecoration();\n var fill = this.fill();\n var fontSize = this.fontSize();\n var glyphInfo = this.glyphInfo;\n if (textDecoration === 'underline') {\n context.beginPath();\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n context.save();\n var p0 = glyphInfo[i].p0;\n context.translate(p0.x, p0.y);\n context.rotate(glyphInfo[i].rotation);\n this.partialText = glyphInfo[i].text;\n context.fillStrokeShape(this);\n if (textDecoration === 'underline') {\n if (i === 0) {\n context.moveTo(0, fontSize / 2 + 1);\n }\n context.lineTo(fontSize, fontSize / 2 + 1);\n }\n context.restore();\n }\n if (textDecoration === 'underline') {\n context.strokeStyle = fill;\n context.lineWidth = fontSize / 20;\n context.stroke();\n }\n context.restore();\n }\n _hitFunc(context) {\n context.beginPath();\n var glyphInfo = this.glyphInfo;\n if (glyphInfo.length >= 1) {\n var p0 = glyphInfo[0].p0;\n context.moveTo(p0.x, p0.y);\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n var p1 = glyphInfo[i].p1;\n context.lineTo(p1.x, p1.y);\n }\n context.setAttr('lineWidth', this.fontSize());\n context.setAttr('strokeStyle', this.colorKey);\n context.stroke();\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n setText(text) {\n return Text.prototype.setText.call(this, text);\n }\n _getContextFont() {\n return Text.prototype._getContextFont.call(this);\n }\n _getTextSize(text) {\n var dummyCanvas = this.dummyCanvas;\n var _context = dummyCanvas.getContext('2d');\n _context.save();\n _context.font = this._getContextFont();\n var metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: parseInt(this.attrs.fontSize, 10),\n };\n }\n _setTextData() {\n var that = this;\n var size = this._getTextSize(this.attrs.text);\n var letterSpacing = this.letterSpacing();\n var align = this.align();\n var kerningFunc = this.kerningFunc();\n this.textWidth = size.width;\n this.textHeight = size.height;\n var textFullWidth = Math.max(this.textWidth + ((this.attrs.text || '').length - 1) * letterSpacing, 0);\n this.glyphInfo = [];\n var fullPathWidth = 0;\n for (var l = 0; l < that.dataArray.length; l++) {\n if (that.dataArray[l].pathLength > 0) {\n fullPathWidth += that.dataArray[l].pathLength;\n }\n }\n var offset = 0;\n if (align === 'center') {\n offset = Math.max(0, fullPathWidth / 2 - textFullWidth / 2);\n }\n if (align === 'right') {\n offset = Math.max(0, fullPathWidth - textFullWidth);\n }\n var charArr = stringToArray(this.text());\n var spacesNumber = this.text().split(' ').length - 1;\n var p0, p1, pathCmd;\n var pIndex = -1;\n var currentT = 0;\n var getNextPathSegment = function () {\n currentT = 0;\n var pathData = that.dataArray;\n for (var j = pIndex + 1; j < pathData.length; j++) {\n if (pathData[j].pathLength > 0) {\n pIndex = j;\n return pathData[j];\n }\n else if (pathData[j].command === 'M') {\n p0 = {\n x: pathData[j].points[0],\n y: pathData[j].points[1],\n };\n }\n }\n return {};\n };\n var findSegmentToFitCharacter = function (c) {\n var glyphWidth = that._getTextSize(c).width + letterSpacing;\n if (c === ' ' && align === 'justify') {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n var currLen = 0;\n var attempts = 0;\n p1 = undefined;\n while (Math.abs(glyphWidth - currLen) / glyphWidth > 0.01 &&\n attempts < 20) {\n attempts++;\n var cumulativePathLength = currLen;\n while (pathCmd === undefined) {\n pathCmd = getNextPathSegment();\n if (pathCmd &&\n cumulativePathLength + pathCmd.pathLength < glyphWidth) {\n cumulativePathLength += pathCmd.pathLength;\n pathCmd = undefined;\n }\n }\n if (Object.keys(pathCmd).length === 0 || p0 === undefined) {\n return undefined;\n }\n var needNewSegment = false;\n switch (pathCmd.command) {\n case 'L':\n if (Path.getLineLength(p0.x, p0.y, pathCmd.points[0], pathCmd.points[1]) > glyphWidth) {\n p1 = Path.getPointOnLine(glyphWidth, p0.x, p0.y, pathCmd.points[0], pathCmd.points[1], p0.x, p0.y);\n }\n else {\n pathCmd = undefined;\n }\n break;\n case 'A':\n var start = pathCmd.points[4];\n var dTheta = pathCmd.points[5];\n var end = pathCmd.points[4] + dTheta;\n if (currentT === 0) {\n currentT = start + 0.00000001;\n }\n else if (glyphWidth > currLen) {\n currentT += ((Math.PI / 180.0) * dTheta) / Math.abs(dTheta);\n }\n else {\n currentT -= ((Math.PI / 360.0) * dTheta) / Math.abs(dTheta);\n }\n if ((dTheta < 0 && currentT < end) ||\n (dTheta >= 0 && currentT > end)) {\n currentT = end;\n needNewSegment = true;\n }\n p1 = Path.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);\n break;\n case 'C':\n if (currentT === 0) {\n if (glyphWidth > pathCmd.pathLength) {\n currentT = 0.00000001;\n }\n else {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength / 2;\n }\n else {\n currentT = Math.max(currentT - (currLen - glyphWidth) / pathCmd.pathLength / 2, 0);\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);\n break;\n case 'Q':\n if (currentT === 0) {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength;\n }\n else {\n currentT -= (currLen - glyphWidth) / pathCmd.pathLength;\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);\n break;\n }\n if (p1 !== undefined) {\n currLen = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n }\n if (needNewSegment) {\n needNewSegment = false;\n pathCmd = undefined;\n }\n }\n };\n var testChar = 'C';\n var glyphWidth = that._getTextSize(testChar).width + letterSpacing;\n var lettersInOffset = offset / glyphWidth - 1;\n for (var k = 0; k < lettersInOffset; k++) {\n findSegmentToFitCharacter(testChar);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n p0 = p1;\n }\n for (var i = 0; i < charArr.length; i++) {\n findSegmentToFitCharacter(charArr[i]);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n var width = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n var kern = 0;\n if (kerningFunc) {\n try {\n kern = kerningFunc(charArr[i - 1], charArr[i]) * this.fontSize();\n }\n catch (e) {\n kern = 0;\n }\n }\n p0.x += kern;\n p1.x += kern;\n this.textWidth += kern;\n var midpoint = Path.getPointOnLine(kern + width / 2.0, p0.x, p0.y, p1.x, p1.y);\n var rotation = Math.atan2(p1.y - p0.y, p1.x - p0.x);\n this.glyphInfo.push({\n transposeX: midpoint.x,\n transposeY: midpoint.y,\n text: charArr[i],\n rotation: rotation,\n p0: p0,\n p1: p1,\n });\n p0 = p1;\n }\n }\n getSelfRect() {\n if (!this.glyphInfo.length) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n var points = [];\n this.glyphInfo.forEach(function (info) {\n points.push(info.p0.x);\n points.push(info.p0.y);\n points.push(info.p1.x);\n points.push(info.p1.y);\n });\n var minX = points[0] || 0;\n var maxX = points[0] || 0;\n var minY = points[1] || 0;\n var maxY = points[1] || 0;\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n var fontSize = this.fontSize();\n return {\n x: minX - fontSize / 2,\n y: minY - fontSize / 2,\n width: maxX - minX + fontSize,\n height: maxY - minY + fontSize,\n };\n }\n destroy() {\n Util.releaseCanvas(this.dummyCanvas);\n return super.destroy();\n }\n}\nTextPath.prototype._fillFunc = _fillFunc;\nTextPath.prototype._strokeFunc = _strokeFunc;\nTextPath.prototype._fillFuncHit = _fillFunc;\nTextPath.prototype._strokeFuncHit = _strokeFunc;\nTextPath.prototype.className = 'TextPath';\nTextPath.prototype._attrsAffectingSize = ['text', 'fontSize', 'data'];\n_registerNode(TextPath);\nFactory.addGetterSetter(TextPath, 'data');\nFactory.addGetterSetter(TextPath, 'fontFamily', 'Arial');\nFactory.addGetterSetter(TextPath, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'fontStyle', NORMAL);\nFactory.addGetterSetter(TextPath, 'align', 'left');\nFactory.addGetterSetter(TextPath, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'textBaseline', 'middle');\nFactory.addGetterSetter(TextPath, 'fontVariant', NORMAL);\nFactory.addGetterSetter(TextPath, 'text', EMPTY_STRING);\nFactory.addGetterSetter(TextPath, 'textDecoration', null);\nFactory.addGetterSetter(TextPath, 'kerningFunc', null);\n","import { Util, Transform } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Shape } from '../Shape.js';\nimport { Rect } from './Rect.js';\nimport { Group } from '../Group.js';\nimport { Konva } from '../Global.js';\nimport { getBooleanValidator, getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EVENTS_NAME = 'tr-konva';\nvar ATTR_CHANGE_LIST = [\n 'resizeEnabledChange',\n 'rotateAnchorOffsetChange',\n 'rotateEnabledChange',\n 'enabledAnchorsChange',\n 'anchorSizeChange',\n 'borderEnabledChange',\n 'borderStrokeChange',\n 'borderStrokeWidthChange',\n 'borderDashChange',\n 'anchorStrokeChange',\n 'anchorStrokeWidthChange',\n 'anchorFillChange',\n 'anchorCornerRadiusChange',\n 'ignoreStrokeChange',\n]\n .map((e) => e + `.${EVENTS_NAME}`)\n .join(' ');\nvar NODES_RECT = 'nodesRect';\nvar TRANSFORM_CHANGE_STR = [\n 'widthChange',\n 'heightChange',\n 'scaleXChange',\n 'scaleYChange',\n 'skewXChange',\n 'skewYChange',\n 'rotationChange',\n 'offsetXChange',\n 'offsetYChange',\n 'transformsEnabledChange',\n 'strokeWidthChange',\n];\nvar ANGLES = {\n 'top-left': -45,\n 'top-center': 0,\n 'top-right': 45,\n 'middle-right': -90,\n 'middle-left': 90,\n 'bottom-left': -135,\n 'bottom-center': 180,\n 'bottom-right': 135,\n};\nconst TOUCH_DEVICE = 'ontouchstart' in Konva._global;\nfunction getCursor(anchorName, rad) {\n if (anchorName === 'rotater') {\n return 'crosshair';\n }\n rad += Util.degToRad(ANGLES[anchorName] || 0);\n var angle = ((Util.radToDeg(rad) % 360) + 360) % 360;\n if (Util._inRange(angle, 315 + 22.5, 360) || Util._inRange(angle, 0, 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 45 - 22.5, 45 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 90 - 22.5, 90 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 135 - 22.5, 135 + 22.5)) {\n return 'nwse-resize';\n }\n else if (Util._inRange(angle, 180 - 22.5, 180 + 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 225 - 22.5, 225 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 270 - 22.5, 270 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 315 - 22.5, 315 + 22.5)) {\n return 'nwse-resize';\n }\n else {\n Util.error('Transformer has unknown angle for cursor detection: ' + angle);\n return 'pointer';\n }\n}\nvar ANCHORS_NAMES = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'middle-right',\n 'middle-left',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n];\nvar MAX_SAFE_INTEGER = 100000000;\nfunction getCenter(shape) {\n return {\n x: shape.x +\n (shape.width / 2) * Math.cos(shape.rotation) +\n (shape.height / 2) * Math.sin(-shape.rotation),\n y: shape.y +\n (shape.height / 2) * Math.cos(shape.rotation) +\n (shape.width / 2) * Math.sin(shape.rotation),\n };\n}\nfunction rotateAroundPoint(shape, angleRad, point) {\n const x = point.x +\n (shape.x - point.x) * Math.cos(angleRad) -\n (shape.y - point.y) * Math.sin(angleRad);\n const y = point.y +\n (shape.x - point.x) * Math.sin(angleRad) +\n (shape.y - point.y) * Math.cos(angleRad);\n return Object.assign(Object.assign({}, shape), { rotation: shape.rotation + angleRad, x,\n y });\n}\nfunction rotateAroundCenter(shape, deltaRad) {\n const center = getCenter(shape);\n return rotateAroundPoint(shape, deltaRad, center);\n}\nfunction getSnap(snaps, newRotationRad, tol) {\n let snapped = newRotationRad;\n for (let i = 0; i < snaps.length; i++) {\n const angle = Konva.getAngle(snaps[i]);\n const absDiff = Math.abs(angle - newRotationRad) % (Math.PI * 2);\n const dif = Math.min(absDiff, Math.PI * 2 - absDiff);\n if (dif < tol) {\n snapped = angle;\n }\n }\n return snapped;\n}\nexport class Transformer extends Group {\n constructor(config) {\n super(config);\n this._transforming = false;\n this._createElements();\n this._handleMouseMove = this._handleMouseMove.bind(this);\n this._handleMouseUp = this._handleMouseUp.bind(this);\n this.update = this.update.bind(this);\n this.on(ATTR_CHANGE_LIST, this.update);\n if (this.getNode()) {\n this.update();\n }\n }\n attachTo(node) {\n this.setNode(node);\n return this;\n }\n setNode(node) {\n Util.warn('tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.');\n return this.setNodes([node]);\n }\n getNode() {\n return this._nodes && this._nodes[0];\n }\n _getEventNamespace() {\n return EVENTS_NAME + this._id;\n }\n setNodes(nodes = []) {\n if (this._nodes && this._nodes.length) {\n this.detach();\n }\n const filteredNodes = nodes.filter((node) => {\n if (node.isAncestorOf(this)) {\n Util.error('Konva.Transformer cannot be an a child of the node you are trying to attach');\n return false;\n }\n return true;\n });\n this._nodes = nodes = filteredNodes;\n if (nodes.length === 1 && this.useSingleNodeRotation()) {\n this.rotation(nodes[0].getAbsoluteRotation());\n }\n else {\n this.rotation(0);\n }\n this._nodes.forEach((node) => {\n const onChange = () => {\n if (this.nodes().length === 1 && this.useSingleNodeRotation()) {\n this.rotation(this.nodes()[0].getAbsoluteRotation());\n }\n this._resetTransformCache();\n if (!this._transforming && !this.isDragging()) {\n this.update();\n }\n };\n const additionalEvents = node._attrsAffectingSize\n .map((prop) => prop + 'Change.' + this._getEventNamespace())\n .join(' ');\n node.on(additionalEvents, onChange);\n node.on(TRANSFORM_CHANGE_STR.map((e) => e + `.${this._getEventNamespace()}`).join(' '), onChange);\n node.on(`absoluteTransformChange.${this._getEventNamespace()}`, onChange);\n this._proxyDrag(node);\n });\n this._resetTransformCache();\n var elementsCreated = !!this.findOne('.top-left');\n if (elementsCreated) {\n this.update();\n }\n return this;\n }\n _proxyDrag(node) {\n let lastPos;\n node.on(`dragstart.${this._getEventNamespace()}`, (e) => {\n lastPos = node.getAbsolutePosition();\n if (!this.isDragging() && node !== this.findOne('.back')) {\n this.startDrag(e, false);\n }\n });\n node.on(`dragmove.${this._getEventNamespace()}`, (e) => {\n if (!lastPos) {\n return;\n }\n const abs = node.getAbsolutePosition();\n const dx = abs.x - lastPos.x;\n const dy = abs.y - lastPos.y;\n this.nodes().forEach((otherNode) => {\n if (otherNode === node) {\n return;\n }\n if (otherNode.isDragging()) {\n return;\n }\n const otherAbs = otherNode.getAbsolutePosition();\n otherNode.setAbsolutePosition({\n x: otherAbs.x + dx,\n y: otherAbs.y + dy,\n });\n otherNode.startDrag(e);\n });\n lastPos = null;\n });\n }\n getNodes() {\n return this._nodes || [];\n }\n getActiveAnchor() {\n return this._movingAnchorName;\n }\n detach() {\n if (this._nodes) {\n this._nodes.forEach((node) => {\n node.off('.' + this._getEventNamespace());\n });\n }\n this._nodes = [];\n this._resetTransformCache();\n }\n _resetTransformCache() {\n this._clearCache(NODES_RECT);\n this._clearCache('transform');\n this._clearSelfAndDescendantCache('absoluteTransform');\n }\n _getNodeRect() {\n return this._getCache(NODES_RECT, this.__getNodeRect);\n }\n __getNodeShape(node, rot = this.rotation(), relative) {\n var rect = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var absScale = node.getAbsoluteScale(relative);\n var absPos = node.getAbsolutePosition(relative);\n var dx = rect.x * absScale.x - node.offsetX() * absScale.x;\n var dy = rect.y * absScale.y - node.offsetY() * absScale.y;\n const rotation = (Konva.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %\n (Math.PI * 2);\n const box = {\n x: absPos.x + dx * Math.cos(rotation) + dy * Math.sin(-rotation),\n y: absPos.y + dy * Math.cos(rotation) + dx * Math.sin(rotation),\n width: rect.width * absScale.x,\n height: rect.height * absScale.y,\n rotation: rotation,\n };\n return rotateAroundPoint(box, -Konva.getAngle(rot), {\n x: 0,\n y: 0,\n });\n }\n __getNodeRect() {\n var node = this.getNode();\n if (!node) {\n return {\n x: -MAX_SAFE_INTEGER,\n y: -MAX_SAFE_INTEGER,\n width: 0,\n height: 0,\n rotation: 0,\n };\n }\n const totalPoints = [];\n this.nodes().map((node) => {\n const box = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var points = [\n { x: box.x, y: box.y },\n { x: box.x + box.width, y: box.y },\n { x: box.x + box.width, y: box.y + box.height },\n { x: box.x, y: box.y + box.height },\n ];\n var trans = node.getAbsoluteTransform();\n points.forEach(function (point) {\n var transformed = trans.point(point);\n totalPoints.push(transformed);\n });\n });\n const tr = new Transform();\n tr.rotate(-Konva.getAngle(this.rotation()));\n var minX, minY, maxX, maxY;\n totalPoints.forEach(function (point) {\n var transformed = tr.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n tr.invert();\n const p = tr.point({ x: minX, y: minY });\n return {\n x: p.x,\n y: p.y,\n width: maxX - minX,\n height: maxY - minY,\n rotation: Konva.getAngle(this.rotation()),\n };\n }\n getX() {\n return this._getNodeRect().x;\n }\n getY() {\n return this._getNodeRect().y;\n }\n getWidth() {\n return this._getNodeRect().width;\n }\n getHeight() {\n return this._getNodeRect().height;\n }\n _createElements() {\n this._createBack();\n ANCHORS_NAMES.forEach(function (name) {\n this._createAnchor(name);\n }.bind(this));\n this._createAnchor('rotater');\n }\n _createAnchor(name) {\n var anchor = new Rect({\n stroke: 'rgb(0, 161, 255)',\n fill: 'white',\n strokeWidth: 1,\n name: name + ' _anchor',\n dragDistance: 0,\n draggable: true,\n hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto',\n });\n var self = this;\n anchor.on('mousedown touchstart', function (e) {\n self._handleMouseDown(e);\n });\n anchor.on('dragstart', (e) => {\n anchor.stopDrag();\n e.cancelBubble = true;\n });\n anchor.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n anchor.on('mouseenter', () => {\n var rad = Konva.getAngle(this.rotation());\n var cursor = getCursor(name, rad);\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = cursor);\n this._cursorChange = true;\n });\n anchor.on('mouseout', () => {\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = '');\n this._cursorChange = false;\n });\n this.add(anchor);\n }\n _createBack() {\n var back = new Shape({\n name: 'back',\n width: 0,\n height: 0,\n draggable: true,\n sceneFunc(ctx) {\n var tr = this.getParent();\n var padding = tr.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, this.width() + padding * 2, this.height() + padding * 2);\n ctx.moveTo(this.width() / 2, -padding);\n if (tr.rotateEnabled()) {\n ctx.lineTo(this.width() / 2, -tr.rotateAnchorOffset() * Util._sign(this.height()) - padding);\n }\n ctx.fillStrokeShape(this);\n },\n hitFunc: (ctx, shape) => {\n if (!this.shouldOverdrawWholeArea()) {\n return;\n }\n var padding = this.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);\n ctx.fillStrokeShape(shape);\n },\n });\n this.add(back);\n this._proxyDrag(back);\n back.on('dragstart', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragmove', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n this.on('dragmove', (e) => {\n this.update();\n });\n }\n _handleMouseDown(e) {\n this._movingAnchorName = e.target.name().split(' ')[0];\n var attrs = this._getNodeRect();\n var width = attrs.width;\n var height = attrs.height;\n var hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));\n this.sin = Math.abs(height / hypotenuse);\n this.cos = Math.abs(width / hypotenuse);\n if (typeof window !== 'undefined') {\n window.addEventListener('mousemove', this._handleMouseMove);\n window.addEventListener('touchmove', this._handleMouseMove);\n window.addEventListener('mouseup', this._handleMouseUp, true);\n window.addEventListener('touchend', this._handleMouseUp, true);\n }\n this._transforming = true;\n var ap = e.target.getAbsolutePosition();\n var pos = e.target.getStage().getPointerPosition();\n this._anchorDragOffset = {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n };\n this._fire('transformstart', { evt: e.evt, target: this.getNode() });\n this._nodes.forEach((target) => {\n target._fire('transformstart', { evt: e.evt, target });\n });\n }\n _handleMouseMove(e) {\n var x, y, newHypotenuse;\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n var stage = anchorNode.getStage();\n stage.setPointersPositions(e);\n const pp = stage.getPointerPosition();\n let newNodePos = {\n x: pp.x - this._anchorDragOffset.x,\n y: pp.y - this._anchorDragOffset.y,\n };\n const oldAbs = anchorNode.getAbsolutePosition();\n if (this.anchorDragBoundFunc()) {\n newNodePos = this.anchorDragBoundFunc()(oldAbs, newNodePos, e);\n }\n anchorNode.setAbsolutePosition(newNodePos);\n const newAbs = anchorNode.getAbsolutePosition();\n if (oldAbs.x === newAbs.x && oldAbs.y === newAbs.y) {\n return;\n }\n if (this._movingAnchorName === 'rotater') {\n var attrs = this._getNodeRect();\n x = anchorNode.x() - attrs.width / 2;\n y = -anchorNode.y() + attrs.height / 2;\n let delta = Math.atan2(-y, x) + Math.PI / 2;\n if (attrs.height < 0) {\n delta -= Math.PI;\n }\n var oldRotation = Konva.getAngle(this.rotation());\n const newRotation = oldRotation + delta;\n const tol = Konva.getAngle(this.rotationSnapTolerance());\n const snappedRot = getSnap(this.rotationSnaps(), newRotation, tol);\n const diff = snappedRot - attrs.rotation;\n const shape = rotateAroundCenter(attrs, diff);\n this._fitNodesInto(shape, e);\n return;\n }\n var keepProportion = this.keepRatio() || e.shiftKey;\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (this._movingAnchorName === 'top-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-right').x(),\n y: this.findOne('.bottom-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-left').x() > comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-left').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-left').x(comparePoint.x - x);\n this.findOne('.top-left').y(comparePoint.y - y);\n }\n }\n else if (this._movingAnchorName === 'top-center') {\n this.findOne('.top-left').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'top-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-left').x(),\n y: this.findOne('.bottom-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-right').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-right').x(comparePoint.x + x);\n this.findOne('.top-right').y(comparePoint.y - y);\n }\n var pos = anchorNode.position();\n this.findOne('.top-left').y(pos.y);\n this.findOne('.bottom-right').x(pos.x);\n }\n else if (this._movingAnchorName === 'middle-left') {\n this.findOne('.top-left').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'middle-right') {\n this.findOne('.bottom-right').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'bottom-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-right').x(),\n y: this.findOne('.top-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = comparePoint.x < anchorNode.x() ? -1 : 1;\n var reverseY = anchorNode.y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n anchorNode.x(comparePoint.x - x);\n anchorNode.y(comparePoint.y + y);\n }\n pos = anchorNode.position();\n this.findOne('.top-left').x(pos.x);\n this.findOne('.bottom-right').y(pos.y);\n }\n else if (this._movingAnchorName === 'bottom-center') {\n this.findOne('.bottom-right').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'bottom-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-left').x(),\n y: this.findOne('.top-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = this.findOne('.bottom-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.bottom-right').y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.bottom-right').x(comparePoint.x + x);\n this.findOne('.bottom-right').y(comparePoint.y + y);\n }\n }\n else {\n console.error(new Error('Wrong position argument of selection resizer: ' +\n this._movingAnchorName));\n }\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (centeredScaling) {\n var topLeft = this.findOne('.top-left');\n var bottomRight = this.findOne('.bottom-right');\n var topOffsetX = topLeft.x();\n var topOffsetY = topLeft.y();\n var bottomOffsetX = this.getWidth() - bottomRight.x();\n var bottomOffsetY = this.getHeight() - bottomRight.y();\n bottomRight.move({\n x: -topOffsetX,\n y: -topOffsetY,\n });\n topLeft.move({\n x: bottomOffsetX,\n y: bottomOffsetY,\n });\n }\n var absPos = this.findOne('.top-left').getAbsolutePosition();\n x = absPos.x;\n y = absPos.y;\n var width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();\n var height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();\n this._fitNodesInto({\n x: x,\n y: y,\n width: width,\n height: height,\n rotation: Konva.getAngle(this.rotation()),\n }, e);\n }\n _handleMouseUp(e) {\n this._removeEvents(e);\n }\n getAbsoluteTransform() {\n return this.getTransform();\n }\n _removeEvents(e) {\n if (this._transforming) {\n this._transforming = false;\n if (typeof window !== 'undefined') {\n window.removeEventListener('mousemove', this._handleMouseMove);\n window.removeEventListener('touchmove', this._handleMouseMove);\n window.removeEventListener('mouseup', this._handleMouseUp, true);\n window.removeEventListener('touchend', this._handleMouseUp, true);\n }\n var node = this.getNode();\n this._fire('transformend', { evt: e, target: node });\n if (node) {\n this._nodes.forEach((target) => {\n target._fire('transformend', { evt: e, target });\n });\n }\n this._movingAnchorName = null;\n }\n }\n _fitNodesInto(newAttrs, evt) {\n var oldAttrs = this._getNodeRect();\n const minSize = 1;\n if (Util._inRange(newAttrs.width, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n if (Util._inRange(newAttrs.height, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n const allowNegativeScale = this.flipEnabled();\n var t = new Transform();\n t.rotate(Konva.getAngle(this.rotation()));\n if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('left') >= 0) {\n const offset = t.point({\n x: -this.padding() * 2,\n y: 0,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n newAttrs.width += this.padding() * 2;\n this._movingAnchorName = this._movingAnchorName.replace('left', 'right');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('right') >= 0) {\n const offset = t.point({\n x: this.padding() * 2,\n y: 0,\n });\n this._movingAnchorName = this._movingAnchorName.replace('right', 'left');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.width += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('top') >= 0) {\n const offset = t.point({\n x: 0,\n y: -this.padding() * 2,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n this._movingAnchorName = this._movingAnchorName.replace('top', 'bottom');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('bottom') >= 0) {\n const offset = t.point({\n x: 0,\n y: this.padding() * 2,\n });\n this._movingAnchorName = this._movingAnchorName.replace('bottom', 'top');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this.boundBoxFunc()) {\n const bounded = this.boundBoxFunc()(oldAttrs, newAttrs);\n if (bounded) {\n newAttrs = bounded;\n }\n else {\n Util.warn('boundBoxFunc returned falsy. You should return new bound rect from it!');\n }\n }\n const baseSize = 10000000;\n const oldTr = new Transform();\n oldTr.translate(oldAttrs.x, oldAttrs.y);\n oldTr.rotate(oldAttrs.rotation);\n oldTr.scale(oldAttrs.width / baseSize, oldAttrs.height / baseSize);\n const newTr = new Transform();\n newTr.translate(newAttrs.x, newAttrs.y);\n newTr.rotate(newAttrs.rotation);\n newTr.scale(newAttrs.width / baseSize, newAttrs.height / baseSize);\n const delta = newTr.multiply(oldTr.invert());\n this._nodes.forEach((node) => {\n var _a;\n const parentTransform = node.getParent().getAbsoluteTransform();\n const localTransform = node.getTransform().copy();\n localTransform.translate(node.offsetX(), node.offsetY());\n const newLocalTransform = new Transform();\n newLocalTransform\n .multiply(parentTransform.copy().invert())\n .multiply(delta)\n .multiply(parentTransform)\n .multiply(localTransform);\n const attrs = newLocalTransform.decompose();\n node.setAttrs(attrs);\n this._fire('transform', { evt: evt, target: node });\n node._fire('transform', { evt: evt, target: node });\n (_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n });\n this.rotation(Util._getRotation(newAttrs.rotation));\n this._resetTransformCache();\n this.update();\n this.getLayer().batchDraw();\n }\n forceUpdate() {\n this._resetTransformCache();\n this.update();\n }\n _batchChangeChild(selector, attrs) {\n const anchor = this.findOne(selector);\n anchor.setAttrs(attrs);\n }\n update() {\n var _a;\n var attrs = this._getNodeRect();\n this.rotation(Util._getRotation(attrs.rotation));\n var width = attrs.width;\n var height = attrs.height;\n var enabledAnchors = this.enabledAnchors();\n var resizeEnabled = this.resizeEnabled();\n var padding = this.padding();\n var anchorSize = this.anchorSize();\n this.find('._anchor').forEach((node) => {\n node.setAttrs({\n width: anchorSize,\n height: anchorSize,\n offsetX: anchorSize / 2,\n offsetY: anchorSize / 2,\n stroke: this.anchorStroke(),\n strokeWidth: this.anchorStrokeWidth(),\n fill: this.anchorFill(),\n cornerRadius: this.anchorCornerRadius(),\n });\n });\n this._batchChangeChild('.top-left', {\n x: 0,\n y: 0,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-left') >= 0,\n });\n this._batchChangeChild('.top-center', {\n x: width / 2,\n y: 0,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-center') >= 0,\n });\n this._batchChangeChild('.top-right', {\n x: width,\n y: 0,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-right') >= 0,\n });\n this._batchChangeChild('.middle-left', {\n x: 0,\n y: height / 2,\n offsetX: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-left') >= 0,\n });\n this._batchChangeChild('.middle-right', {\n x: width,\n y: height / 2,\n offsetX: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-right') >= 0,\n });\n this._batchChangeChild('.bottom-left', {\n x: 0,\n y: height,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-left') >= 0,\n });\n this._batchChangeChild('.bottom-center', {\n x: width / 2,\n y: height,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-center') >= 0,\n });\n this._batchChangeChild('.bottom-right', {\n x: width,\n y: height,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-right') >= 0,\n });\n this._batchChangeChild('.rotater', {\n x: width / 2,\n y: -this.rotateAnchorOffset() * Util._sign(height) - padding,\n visible: this.rotateEnabled(),\n });\n this._batchChangeChild('.back', {\n width: width,\n height: height,\n visible: this.borderEnabled(),\n stroke: this.borderStroke(),\n strokeWidth: this.borderStrokeWidth(),\n dash: this.borderDash(),\n x: 0,\n y: 0,\n });\n (_a = this.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n }\n isTransforming() {\n return this._transforming;\n }\n stopTransform() {\n if (this._transforming) {\n this._removeEvents();\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n if (anchorNode) {\n anchorNode.stopDrag();\n }\n }\n }\n destroy() {\n if (this.getStage() && this._cursorChange) {\n this.getStage().content && (this.getStage().content.style.cursor = '');\n }\n Group.prototype.destroy.call(this);\n this.detach();\n this._removeEvents();\n return this;\n }\n toObject() {\n return Node.prototype.toObject.call(this);\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n return node;\n }\n getClientRect() {\n if (this.nodes().length > 0) {\n return super.getClientRect();\n }\n else {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n }\n}\nfunction validateAnchors(val) {\n if (!(val instanceof Array)) {\n Util.warn('enabledAnchors value should be an array');\n }\n if (val instanceof Array) {\n val.forEach(function (name) {\n if (ANCHORS_NAMES.indexOf(name) === -1) {\n Util.warn('Unknown anchor name: ' +\n name +\n '. Available names are: ' +\n ANCHORS_NAMES.join(', '));\n }\n });\n }\n return val || [];\n}\nTransformer.prototype.className = 'Transformer';\n_registerNode(Transformer);\nFactory.addGetterSetter(Transformer, 'enabledAnchors', ANCHORS_NAMES, validateAnchors);\nFactory.addGetterSetter(Transformer, 'flipEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Transformer, 'resizeEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorSize', 10, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotateEnabled', true);\nFactory.addGetterSetter(Transformer, 'rotationSnaps', []);\nFactory.addGetterSetter(Transformer, 'rotateAnchorOffset', 50, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotationSnapTolerance', 5, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'anchorStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'anchorFill', 'white');\nFactory.addGetterSetter(Transformer, 'anchorCornerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'borderStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderDash');\nFactory.addGetterSetter(Transformer, 'keepRatio', true);\nFactory.addGetterSetter(Transformer, 'centeredScaling', false);\nFactory.addGetterSetter(Transformer, 'ignoreStroke', false);\nFactory.addGetterSetter(Transformer, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'node');\nFactory.addGetterSetter(Transformer, 'nodes');\nFactory.addGetterSetter(Transformer, 'boundBoxFunc');\nFactory.addGetterSetter(Transformer, 'anchorDragBoundFunc');\nFactory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);\nFactory.addGetterSetter(Transformer, 'useSingleNodeRotation', true);\nFactory.backCompat(Transformer, {\n lineEnabled: 'borderEnabled',\n rotateHandlerOffset: 'rotateAnchorOffset',\n enabledHandlers: 'enabledAnchors',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Wedge extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.radius(), 0, Konva.getAngle(this.angle()), this.clockwise());\n context.lineTo(0, 0);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nWedge.prototype.className = 'Wedge';\nWedge.prototype._centroid = true;\nWedge.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Wedge);\nFactory.addGetterSetter(Wedge, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'clockwise', false);\nFactory.backCompat(Wedge, {\n angleDeg: 'angle',\n getAngleDeg: 'getAngle',\n setAngleDeg: 'setAngle',\n});\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction BlurStack() {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n}\nvar mul_table = [\n 512,\n 512,\n 456,\n 512,\n 328,\n 456,\n 335,\n 512,\n 405,\n 328,\n 271,\n 456,\n 388,\n 335,\n 292,\n 512,\n 454,\n 405,\n 364,\n 328,\n 298,\n 271,\n 496,\n 456,\n 420,\n 388,\n 360,\n 335,\n 312,\n 292,\n 273,\n 512,\n 482,\n 454,\n 428,\n 405,\n 383,\n 364,\n 345,\n 328,\n 312,\n 298,\n 284,\n 271,\n 259,\n 496,\n 475,\n 456,\n 437,\n 420,\n 404,\n 388,\n 374,\n 360,\n 347,\n 335,\n 323,\n 312,\n 302,\n 292,\n 282,\n 273,\n 265,\n 512,\n 497,\n 482,\n 468,\n 454,\n 441,\n 428,\n 417,\n 405,\n 394,\n 383,\n 373,\n 364,\n 354,\n 345,\n 337,\n 328,\n 320,\n 312,\n 305,\n 298,\n 291,\n 284,\n 278,\n 271,\n 265,\n 259,\n 507,\n 496,\n 485,\n 475,\n 465,\n 456,\n 446,\n 437,\n 428,\n 420,\n 412,\n 404,\n 396,\n 388,\n 381,\n 374,\n 367,\n 360,\n 354,\n 347,\n 341,\n 335,\n 329,\n 323,\n 318,\n 312,\n 307,\n 302,\n 297,\n 292,\n 287,\n 282,\n 278,\n 273,\n 269,\n 265,\n 261,\n 512,\n 505,\n 497,\n 489,\n 482,\n 475,\n 468,\n 461,\n 454,\n 447,\n 441,\n 435,\n 428,\n 422,\n 417,\n 411,\n 405,\n 399,\n 394,\n 389,\n 383,\n 378,\n 373,\n 368,\n 364,\n 359,\n 354,\n 350,\n 345,\n 341,\n 337,\n 332,\n 328,\n 324,\n 320,\n 316,\n 312,\n 309,\n 305,\n 301,\n 298,\n 294,\n 291,\n 287,\n 284,\n 281,\n 278,\n 274,\n 271,\n 268,\n 265,\n 262,\n 259,\n 257,\n 507,\n 501,\n 496,\n 491,\n 485,\n 480,\n 475,\n 470,\n 465,\n 460,\n 456,\n 451,\n 446,\n 442,\n 437,\n 433,\n 428,\n 424,\n 420,\n 416,\n 412,\n 408,\n 404,\n 400,\n 396,\n 392,\n 388,\n 385,\n 381,\n 377,\n 374,\n 370,\n 367,\n 363,\n 360,\n 357,\n 354,\n 350,\n 347,\n 344,\n 341,\n 338,\n 335,\n 332,\n 329,\n 326,\n 323,\n 320,\n 318,\n 315,\n 312,\n 310,\n 307,\n 304,\n 302,\n 299,\n 297,\n 294,\n 292,\n 289,\n 287,\n 285,\n 282,\n 280,\n 278,\n 275,\n 273,\n 271,\n 269,\n 267,\n 265,\n 263,\n 261,\n 259,\n];\nvar shg_table = [\n 9,\n 11,\n 12,\n 13,\n 13,\n 14,\n 14,\n 15,\n 15,\n 15,\n 15,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n];\nfunction filterGaussBlurRGBA(imageData, radius) {\n var pixels = imageData.data, width = imageData.width, height = imageData.height;\n var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;\n var div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];\n for (i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n stack.next = stackStart;\n yw = yi = 0;\n for (y = 0; y < height; y++) {\n r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n for (i = 1; i < radiusPlus1; i++) {\n p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);\n r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[p + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[p + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[p + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n }\n stackIn = stackStart;\n stackOut = stackEnd;\n for (x = 0; x < width; x++) {\n pixels[yi + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa !== 0) {\n pa = 255 / pa;\n pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;\n r_in_sum += stackIn.r = pixels[p];\n g_in_sum += stackIn.g = pixels[p + 1];\n b_in_sum += stackIn.b = pixels[p + 2];\n a_in_sum += stackIn.a = pixels[p + 3];\n r_sum += r_in_sum;\n g_sum += g_in_sum;\n b_sum += b_in_sum;\n a_sum += a_in_sum;\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += 4;\n }\n yw += width;\n }\n for (x = 0; x < width; x++) {\n g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\n yi = x << 2;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n yp = width;\n for (i = 1; i <= radius; i++) {\n yi = (yp + x) << 2;\n r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[yi + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n if (i < heightMinus1) {\n yp += width;\n }\n }\n yi = x;\n stackIn = stackStart;\n stackOut = stackEnd;\n for (y = 0; y < height; y++) {\n p = yi << 2;\n pixels[p + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa > 0) {\n pa = 255 / pa;\n pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[p] = pixels[p + 1] = pixels[p + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p =\n (x +\n ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width) <<\n 2;\n r_sum += r_in_sum += stackIn.r = pixels[p];\n g_sum += g_in_sum += stackIn.g = pixels[p + 1];\n b_sum += b_in_sum += stackIn.b = pixels[p + 2];\n a_sum += a_in_sum += stackIn.a = pixels[p + 3];\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n}\nexport const Blur = function Blur(imageData) {\n var radius = Math.round(this.blurRadius());\n if (radius > 0) {\n filterGaussBlurRGBA(imageData, radius);\n }\n};\nFactory.addGetterSetter(Node, 'blurRadius', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Brighten = function (imageData) {\n var brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] += brightness;\n data[i + 1] += brightness;\n data[i + 2] += brightness;\n }\n};\nFactory.addGetterSetter(Node, 'brightness', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Contrast = function (imageData) {\n var adjust = Math.pow((this.contrast() + 100) / 100, 2);\n var data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;\n for (i = 0; i < nPixels; i += 4) {\n red = data[i];\n green = data[i + 1];\n blue = data[i + 2];\n red /= 255;\n red -= 0.5;\n red *= adjust;\n red += 0.5;\n red *= 255;\n green /= 255;\n green -= 0.5;\n green *= adjust;\n green += 0.5;\n green *= 255;\n blue /= 255;\n blue -= 0.5;\n blue *= adjust;\n blue += 0.5;\n blue *= 255;\n red = red < 0 ? 0 : red > 255 ? 255 : red;\n green = green < 0 ? 0 : green > 255 ? 255 : green;\n blue = blue < 0 ? 0 : blue > 255 ? 255 : blue;\n data[i] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n }\n};\nFactory.addGetterSetter(Node, 'contrast', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Emboss = function (imageData) {\n var strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n switch (direction) {\n case 'top-left':\n dirY = -1;\n dirX = -1;\n break;\n case 'top':\n dirY = -1;\n dirX = 0;\n break;\n case 'top-right':\n dirY = -1;\n dirX = 1;\n break;\n case 'right':\n dirY = 0;\n dirX = 1;\n break;\n case 'bottom-right':\n dirY = 1;\n dirX = 1;\n break;\n case 'bottom':\n dirY = 1;\n dirX = 0;\n break;\n case 'bottom-left':\n dirY = 1;\n dirX = -1;\n break;\n case 'left':\n dirY = 0;\n dirX = -1;\n break;\n default:\n Util.error('Unknown emboss direction: ' + direction);\n }\n do {\n var offsetY = (y - 1) * w4;\n var otherY = dirY;\n if (y + otherY < 1) {\n otherY = 0;\n }\n if (y + otherY > h) {\n otherY = 0;\n }\n var offsetYOther = (y - 1 + otherY) * w * 4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var otherX = dirX;\n if (x + otherX < 1) {\n otherX = 0;\n }\n if (x + otherX > w) {\n otherX = 0;\n }\n var offsetOther = offsetYOther + (x - 1 + otherX) * 4;\n var dR = data[offset] - data[offsetOther];\n var dG = data[offset + 1] - data[offsetOther + 1];\n var dB = data[offset + 2] - data[offsetOther + 2];\n var dif = dR;\n var absDif = dif > 0 ? dif : -dif;\n var absG = dG > 0 ? dG : -dG;\n var absB = dB > 0 ? dB : -dB;\n if (absG > absDif) {\n dif = dG;\n }\n if (absB > absDif) {\n dif = dB;\n }\n dif *= strength;\n if (blend) {\n var r = data[offset] + dif;\n var g = data[offset + 1] + dif;\n var b = data[offset + 2] + dif;\n data[offset] = r > 255 ? 255 : r < 0 ? 0 : r;\n data[offset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;\n data[offset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;\n }\n else {\n var grey = greyLevel - dif;\n if (grey < 0) {\n grey = 0;\n }\n else if (grey > 255) {\n grey = 255;\n }\n data[offset] = data[offset + 1] = data[offset + 2] = grey;\n }\n } while (--x);\n } while (--y);\n};\nFactory.addGetterSetter(Node, 'embossStrength', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossWhiteLevel', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossDirection', 'top-left', null, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossBlend', false, null, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction remap(fromValue, fromMin, fromMax, toMin, toMax) {\n var fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;\n if (fromRange === 0) {\n return toMin + toRange / 2;\n }\n if (toRange === 0) {\n return toMin;\n }\n toValue = (fromValue - fromMin) / fromRange;\n toValue = toRange * toValue + toMin;\n return toValue;\n}\nexport const Enhance = function (imageData) {\n var data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;\n var enhanceAmount = this.enhance();\n if (enhanceAmount === 0) {\n return;\n }\n for (i = 0; i < nSubPixels; i += 4) {\n r = data[i + 0];\n if (r < rMin) {\n rMin = r;\n }\n else if (r > rMax) {\n rMax = r;\n }\n g = data[i + 1];\n if (g < gMin) {\n gMin = g;\n }\n else if (g > gMax) {\n gMax = g;\n }\n b = data[i + 2];\n if (b < bMin) {\n bMin = b;\n }\n else if (b > bMax) {\n bMax = b;\n }\n }\n if (rMax === rMin) {\n rMax = 255;\n rMin = 0;\n }\n if (gMax === gMin) {\n gMax = 255;\n gMin = 0;\n }\n if (bMax === bMin) {\n bMax = 255;\n bMin = 0;\n }\n var rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;\n if (enhanceAmount > 0) {\n rGoalMax = rMax + enhanceAmount * (255 - rMax);\n rGoalMin = rMin - enhanceAmount * (rMin - 0);\n gGoalMax = gMax + enhanceAmount * (255 - gMax);\n gGoalMin = gMin - enhanceAmount * (gMin - 0);\n bGoalMax = bMax + enhanceAmount * (255 - bMax);\n bGoalMin = bMin - enhanceAmount * (bMin - 0);\n }\n else {\n rMid = (rMax + rMin) * 0.5;\n rGoalMax = rMax + enhanceAmount * (rMax - rMid);\n rGoalMin = rMin + enhanceAmount * (rMin - rMid);\n gMid = (gMax + gMin) * 0.5;\n gGoalMax = gMax + enhanceAmount * (gMax - gMid);\n gGoalMin = gMin + enhanceAmount * (gMin - gMid);\n bMid = (bMax + bMin) * 0.5;\n bGoalMax = bMax + enhanceAmount * (bMax - bMid);\n bGoalMin = bMin + enhanceAmount * (bMin - bMid);\n }\n for (i = 0; i < nSubPixels; i += 4) {\n data[i + 0] = remap(data[i + 0], rMin, rMax, rGoalMin, rGoalMax);\n data[i + 1] = remap(data[i + 1], gMin, gMax, gGoalMin, gGoalMax);\n data[i + 2] = remap(data[i + 2], bMin, bMax, bGoalMin, bGoalMax);\n }\n};\nFactory.addGetterSetter(Node, 'enhance', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Grayscale = function (imageData) {\n var data = imageData.data, len = data.length, i, brightness;\n for (i = 0; i < len; i += 4) {\n brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];\n data[i] = brightness;\n data[i + 1] = brightness;\n data[i + 2] = brightness;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'luminance', 0, getNumberValidator(), Factory.afterSetFilter);\nexport const HSL = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b + l;\n data[i + 1] = gr * r + gg * g + gb * b + l;\n data[i + 2] = br * r + bg * g + bb * b + l;\n data[i + 3] = a;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const HSV = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b;\n data[i + 1] = gr * r + gg * g + gb * b;\n data[i + 2] = br * r + bg * g + bb * b;\n data[i + 3] = a;\n }\n};\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'value', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Invert = function (imageData) {\n var data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] = 255 - data[i];\n data[i + 1] = 255 - data[i + 1];\n data[i + 2] = 255 - data[i + 2];\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nvar ToPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta;\n var conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;\n for (theta = 0; theta < tSize; theta += 1) {\n sin = Math.sin(theta * conversion);\n cos = Math.cos(theta * conversion);\n for (radius = 0; radius < rSize; radius += 1) {\n x = Math.floor(xMid + ((rMax * radius) / rSize) * cos);\n y = Math.floor(yMid + ((rMax * radius) / rSize) * sin);\n i = (y * xSize + x) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (theta + radius * xSize) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nvar FromPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;\n var x1, y1;\n for (x = 0; x < xSize; x += 1) {\n for (y = 0; y < ySize; y += 1) {\n dx = x - xMid;\n dy = y - yMid;\n radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;\n theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;\n theta = (theta * tSize) / 360;\n x1 = Math.floor(theta);\n y1 = Math.floor(radius);\n i = (y1 * xSize + x1) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (y * xSize + x) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nexport const Kaleidoscope = function (imageData) {\n var xSize = imageData.width, ySize = imageData.height;\n var x, y, xoff, i, r, g, b, a, srcPos, dstPos;\n var power = Math.round(this.kaleidoscopePower());\n var angle = Math.round(this.kaleidoscopeAngle());\n var offset = Math.floor((xSize * (angle % 360)) / 360);\n if (power < 1) {\n return;\n }\n var tempCanvas = Util.createCanvasElement();\n tempCanvas.width = xSize;\n tempCanvas.height = ySize;\n var scratchData = tempCanvas\n .getContext('2d')\n .getImageData(0, 0, xSize, ySize);\n Util.releaseCanvas(tempCanvas);\n ToPolar(imageData, scratchData, {\n polarCenterX: xSize / 2,\n polarCenterY: ySize / 2,\n });\n var minSectionSize = xSize / Math.pow(2, power);\n while (minSectionSize <= 8) {\n minSectionSize = minSectionSize * 2;\n power -= 1;\n }\n minSectionSize = Math.ceil(minSectionSize);\n var sectionSize = minSectionSize;\n var xStart = 0, xEnd = sectionSize, xDelta = 1;\n if (offset + minSectionSize > xSize) {\n xStart = sectionSize;\n xEnd = 0;\n xDelta = -1;\n }\n for (y = 0; y < ySize; y += 1) {\n for (x = xStart; x !== xEnd; x += xDelta) {\n xoff = Math.round(x + offset) % xSize;\n srcPos = (xSize * y + xoff) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + x) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n }\n for (y = 0; y < ySize; y += 1) {\n sectionSize = Math.floor(minSectionSize);\n for (i = 0; i < power; i += 1) {\n for (x = 0; x < sectionSize + 1; x += 1) {\n srcPos = (xSize * y + x) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + sectionSize * 2 - x - 1) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n sectionSize *= 2;\n }\n }\n FromPolar(scratchData, imageData, { polarRotation: 0 });\n};\nFactory.addGetterSetter(Node, 'kaleidoscopePower', 2, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'kaleidoscopeAngle', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction pixelAt(idata, x, y) {\n var idx = (y * idata.width + x) * 4;\n var d = [];\n d.push(idata.data[idx++], idata.data[idx++], idata.data[idx++], idata.data[idx++]);\n return d;\n}\nfunction rgbDistance(p1, p2) {\n return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +\n Math.pow(p1[1] - p2[1], 2) +\n Math.pow(p1[2] - p2[2], 2));\n}\nfunction rgbMean(pTab) {\n var m = [0, 0, 0];\n for (var i = 0; i < pTab.length; i++) {\n m[0] += pTab[i][0];\n m[1] += pTab[i][1];\n m[2] += pTab[i][2];\n }\n m[0] /= pTab.length;\n m[1] /= pTab.length;\n m[2] /= pTab.length;\n return m;\n}\nfunction backgroundMask(idata, threshold) {\n var rgbv_no = pixelAt(idata, 0, 0);\n var rgbv_ne = pixelAt(idata, idata.width - 1, 0);\n var rgbv_so = pixelAt(idata, 0, idata.height - 1);\n var rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);\n var thres = threshold || 10;\n if (rgbDistance(rgbv_no, rgbv_ne) < thres &&\n rgbDistance(rgbv_ne, rgbv_se) < thres &&\n rgbDistance(rgbv_se, rgbv_so) < thres &&\n rgbDistance(rgbv_so, rgbv_no) < thres) {\n var mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);\n var mask = [];\n for (var i = 0; i < idata.width * idata.height; i++) {\n var d = rgbDistance(mean, [\n idata.data[i * 4],\n idata.data[i * 4 + 1],\n idata.data[i * 4 + 2],\n ]);\n mask[i] = d < thres ? 0 : 255;\n }\n return mask;\n }\n}\nfunction applyMask(idata, mask) {\n for (var i = 0; i < idata.width * idata.height; i++) {\n idata.data[4 * i + 3] = mask[i];\n }\n}\nfunction erodeMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a === 255 * 8 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction dilateMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a >= 255 * 4 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction smoothEdgeMask(mask, sw, sh) {\n var weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a;\n }\n }\n return maskResult;\n}\nexport const Mask = function (imageData) {\n var threshold = this.threshold(), mask = backgroundMask(imageData, threshold);\n if (mask) {\n mask = erodeMask(mask, imageData.width, imageData.height);\n mask = dilateMask(mask, imageData.width, imageData.height);\n mask = smoothEdgeMask(mask, imageData.width, imageData.height);\n applyMask(imageData, mask);\n }\n return imageData;\n};\nFactory.addGetterSetter(Node, 'threshold', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Noise = function (imageData) {\n var amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2, i;\n for (i = 0; i < nPixels; i += 4) {\n data[i + 0] += half - 2 * half * Math.random();\n data[i + 1] += half - 2 * half * Math.random();\n data[i + 2] += half - 2 * half * Math.random();\n }\n};\nFactory.addGetterSetter(Node, 'noise', 0.2, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Util } from '../Util.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Pixelate = function (imageData) {\n var pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;\n if (pixelSize <= 0) {\n Util.error('pixelSize value can not be <= 0');\n return;\n }\n for (xBin = 0; xBin < nBinsX; xBin += 1) {\n for (yBin = 0; yBin < nBinsY; yBin += 1) {\n red = 0;\n green = 0;\n blue = 0;\n alpha = 0;\n xBinStart = xBin * pixelSize;\n xBinEnd = xBinStart + pixelSize;\n yBinStart = yBin * pixelSize;\n yBinEnd = yBinStart + pixelSize;\n pixelsInBin = 0;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n red += data[i + 0];\n green += data[i + 1];\n blue += data[i + 2];\n alpha += data[i + 3];\n pixelsInBin += 1;\n }\n }\n red = red / pixelsInBin;\n green = green / pixelsInBin;\n blue = blue / pixelsInBin;\n alpha = alpha / pixelsInBin;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n data[i + 0] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n data[i + 3] = alpha;\n }\n }\n }\n }\n};\nFactory.addGetterSetter(Node, 'pixelSize', 8, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Posterize = function (imageData) {\n var levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;\n for (i = 0; i < len; i += 1) {\n data[i] = Math.floor(data[i] / scale) * scale;\n }\n};\nFactory.addGetterSetter(Node, 'levels', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGB = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;\n for (i = 0; i < nPixels; i += 4) {\n brightness =\n (0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;\n data[i] = brightness * red;\n data[i + 1] = brightness * green;\n data[i + 2] = brightness * blue;\n data[i + 3] = data[i + 3];\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGBA = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha(), i, ia;\n for (i = 0; i < nPixels; i += 4) {\n ia = 1 - alpha;\n data[i] = red * alpha + data[i] * ia;\n data[i + 1] = green * alpha + data[i + 1] * ia;\n data[i + 2] = blue * alpha + data[i + 2] * ia;\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'alpha', 1, function (val) {\n this._filterUpToDate = false;\n if (val > 1) {\n return 1;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return val;\n }\n});\n","export const Sepia = function (imageData) {\n var data = imageData.data, nPixels = data.length, i, r, g, b;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n data[i + 0] = Math.min(255, r * 0.393 + g * 0.769 + b * 0.189);\n data[i + 1] = Math.min(255, r * 0.349 + g * 0.686 + b * 0.168);\n data[i + 2] = Math.min(255, r * 0.272 + g * 0.534 + b * 0.131);\n }\n};\n","export const Solarize = function (imageData) {\n var data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n do {\n var offsetY = (y - 1) * w4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var r = data[offset];\n var g = data[offset + 1];\n var b = data[offset + 2];\n if (r > 127) {\n r = 255 - r;\n }\n if (g > 127) {\n g = 255 - g;\n }\n if (b > 127) {\n b = 255 - b;\n }\n data[offset] = r;\n data[offset + 1] = g;\n data[offset + 2] = b;\n } while (--x);\n } while (--y);\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Threshold = function (imageData) {\n var level = this.threshold() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 1) {\n data[i] = data[i] < level ? 0 : 255;\n }\n};\nFactory.addGetterSetter(Node, 'threshold', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Konva as Core } from './_CoreInternals.js';\nimport { Arc } from './shapes/Arc.js';\nimport { Arrow } from './shapes/Arrow.js';\nimport { Circle } from './shapes/Circle.js';\nimport { Ellipse } from './shapes/Ellipse.js';\nimport { Image } from './shapes/Image.js';\nimport { Label, Tag } from './shapes/Label.js';\nimport { Line } from './shapes/Line.js';\nimport { Path } from './shapes/Path.js';\nimport { Rect } from './shapes/Rect.js';\nimport { RegularPolygon } from './shapes/RegularPolygon.js';\nimport { Ring } from './shapes/Ring.js';\nimport { Sprite } from './shapes/Sprite.js';\nimport { Star } from './shapes/Star.js';\nimport { Text } from './shapes/Text.js';\nimport { TextPath } from './shapes/TextPath.js';\nimport { Transformer } from './shapes/Transformer.js';\nimport { Wedge } from './shapes/Wedge.js';\nimport { Blur } from './filters/Blur.js';\nimport { Brighten } from './filters/Brighten.js';\nimport { Contrast } from './filters/Contrast.js';\nimport { Emboss } from './filters/Emboss.js';\nimport { Enhance } from './filters/Enhance.js';\nimport { Grayscale } from './filters/Grayscale.js';\nimport { HSL } from './filters/HSL.js';\nimport { HSV } from './filters/HSV.js';\nimport { Invert } from './filters/Invert.js';\nimport { Kaleidoscope } from './filters/Kaleidoscope.js';\nimport { Mask } from './filters/Mask.js';\nimport { Noise } from './filters/Noise.js';\nimport { Pixelate } from './filters/Pixelate.js';\nimport { Posterize } from './filters/Posterize.js';\nimport { RGB } from './filters/RGB.js';\nimport { RGBA } from './filters/RGBA.js';\nimport { Sepia } from './filters/Sepia.js';\nimport { Solarize } from './filters/Solarize.js';\nimport { Threshold } from './filters/Threshold.js';\nexport const Konva = Core.Util._assign(Core, {\n Arc,\n Arrow,\n Circle,\n Ellipse,\n Image,\n Label,\n Tag,\n Line,\n Path,\n Rect,\n RegularPolygon,\n Ring,\n Sprite,\n Star,\n Text,\n TextPath,\n Transformer,\n Wedge,\n Filters: {\n Blur,\n Brighten,\n Contrast,\n Emboss,\n Enhance,\n Grayscale,\n HSL,\n HSV,\n Invert,\n Kaleidoscope,\n Mask,\n Noise,\n Pixelate,\n Posterize,\n RGB,\n RGBA,\n Sepia,\n Solarize,\n Threshold,\n },\n});\n","/**\n * @license React\n * react-reconciler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nmodule.exports = function $$$reconciler($$$hostConfig) {\n var exports = {};\n'use strict';var aa=require(\"react\"),ba=require(\"scheduler\"),ca=Object.assign;function m(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;ch||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{dc=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?cc(a):\"\"}var fc=Object.prototype.hasOwnProperty,gc=[],hc=-1;function ic(a){return{current:a}}\nfunction q(a){0>hc||(a.current=gc[hc],gc[hc]=null,hc--)}function v(a,b){hc++;gc[hc]=a.current;a.current=b}var jc={},x=ic(jc),z=ic(!1),kc=jc;function lc(a,b){var c=a.type.contextTypes;if(!c)return jc;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction A(a){a=a.childContextTypes;return null!==a&&void 0!==a}function mc(){q(z);q(x)}function nc(a,b,c){if(x.current!==jc)throw Error(m(168));v(x,b);v(z,c)}function oc(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,va(a)||\"Unknown\",e));return ca({},c,d)}\nfunction pc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||jc;kc=x.current;v(x,a);v(z,z.current);return!0}function rc(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=oc(a,b,kc),d.__reactInternalMemoizedMergedChildContext=a,q(z),q(x),v(x,a)):q(z);v(z,c)}var tc=Math.clz32?Math.clz32:sc,uc=Math.log,vc=Math.LN2;function sc(a){a>>>=0;return 0===a?32:31-(uc(a)/vc|0)|0}var wc=64,xc=4194304;\nfunction yc(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function zc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=yc(h):(f&=g,0!==f&&(d=yc(f)))}else g=c&~e,0!==g?d=yc(g):0!==f&&(d=yc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Fc(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-tc(b);a[b]=c}function Gc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0>=g;e-=g;id=1<<32-tc(b)+e|c<u?(E=r,r=null):E=r.sibling;var y=p(e,r,h[u],k);if(null===y){null===r&&(r=E);break}a&&r&&null===y.alternate&&b(e,r);g=f(y,g,u);null===n?l=y:n.sibling=y;n=y;r=E}if(u===h.length)return c(e,r),F&&kd(e,u),l;if(null===r){for(;uu?(E=r,r=null):E=r.sibling;var w=p(e,r,y.value,k);if(null===w){null===r&&(r=E);break}a&&r&&null===w.alternate&&b(e,r);g=f(w,g,u);null===n?l=w:n.sibling=w;n=w;r=E}if(y.done)return c(e,\nr),F&&kd(e,u),l;if(null===r){for(;!y.done;u++,y=h.next())y=t(e,y.value,k),null!==y&&(g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);F&&kd(e,u);return l}for(r=d(e,r);!y.done;u++,y=h.next())y=B(r,e,u,y.value,k),null!==y&&(a&&null!==y.alternate&&r.delete(null===y.key?u:y.key),g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);a&&r.forEach(function(a){return b(e,a)});F&&kd(e,u);return l}function za(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ha&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==\nf){switch(f.$$typeof){case ea:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ha){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===qa&&oe(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=me(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ha?(d=ue(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=se(f.type,f.key,f.props,null,a.mode,h),h.ref=me(a,d,f),h.return=\na,a=h)}return g(a);case fa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=te(f,a.mode,h);d.return=a;a=d}return g(a);case qa:return l=f._init,za(a,d,l(f._payload),h)}if(Da(f))return w(a,d,f,h);if(ta(f))return Z(a,d,f,h);ne(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&\n6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=re(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return za}var ve=pe(!0),we=pe(!1),xe={},ye=ic(xe),ze=ic(xe),Ae=ic(xe);function Be(a){if(a===xe)throw Error(m(174));return a}function Ce(a,b){v(Ae,b);v(ze,a);v(ye,xe);a=Fa(b);q(ye);v(ye,a)}function De(){q(ye);q(ze);q(Ae)}function Ee(a){var b=Be(Ae.current),c=Be(ye.current);b=Ga(c,a.type,b);c!==b&&(v(ze,a),v(ye,b))}function Fe(a){ze.current===a&&(q(ye),q(ze))}var J=ic(0);\nfunction Ge(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||Jb(c)||Kb(c)))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var He=[];\nfunction Ie(){for(var a=0;ac?c:4;a(!0);var d=Ke.transition;Ke.transition={};try{a(!1),b()}finally{C=c,Ke.transition=d}}function Af(){return Ye().memoizedState}\nfunction Bf(a,b,c){var d=fe(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,c);else if(c=Sd(a,b,c,d),null!==c){var e=I();ge(c,a,d,e);Ef(c,b,d)}}\nfunction mf(a,b,c){var d=fe(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(Vc(h,g)){var k=b.interleaved;null===k?(e.next=e,Rd(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Sd(a,b,e,d);null!==c&&(e=I(),ge(c,a,d,e),Ef(c,b,d))}}\nfunction Cf(a){var b=a.alternate;return a===K||null!==b&&b===K}function Df(a,b){Ne=Me=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ef(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Hc(a,c)}}\nvar Ve={readContext:Pd,useCallback:N,useContext:N,useEffect:N,useImperativeHandle:N,useInsertionEffect:N,useLayoutEffect:N,useMemo:N,useReducer:N,useRef:N,useState:N,useDebugValue:N,useDeferredValue:N,useTransition:N,useMutableSource:N,useSyncExternalStore:N,useId:N,unstable_isNewReconciler:!1},Se={readContext:Pd,useCallback:function(a,b){Xe().memoizedState=[a,void 0===b?null:b];return a},useContext:Pd,useEffect:qf,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return of(4194308,\n4,tf.bind(null,b,a),c)},useLayoutEffect:function(a,b){return of(4194308,4,a,b)},useInsertionEffect:function(a,b){return of(4,2,a,b)},useMemo:function(a,b){var c=Xe();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Xe();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Bf.bind(null,K,a);return[d.memoizedState,a]},useRef:function(a){var b=\nXe();a={current:a};return b.memoizedState=a},useState:lf,useDebugValue:vf,useDeferredValue:function(a){return Xe().memoizedState=a},useTransition:function(){var a=lf(!1),b=a[0];a=zf.bind(null,a[1]);Xe().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=K,e=Xe();if(F){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(Le&30)||hf(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;qf(ef.bind(null,d,\nf,a),[a]);d.flags|=2048;ff(9,gf.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Xe(),b=O.identifierPrefix;if(F){var c=jd;var d=id;c=(d&~(1<<32-tc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Oe++;0Eg&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=4194304)}else{if(!d)if(a=Ge(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Bg(e,!0),null===e.tail&&\"hidden\"===e.tailMode&&!f.alternate&&!F)return Q(b),null}else 2*D()-e.renderingStartTime>Eg&&1073741824!==c&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=\n4194304);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=D(),b.sibling=null,a=J.current,v(J,d?a&1|2:a&1),b;Q(b);return null;case 22:case 23:return Fg(),c=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==c&&(b.flags|=8192),c&&0!==(b.mode&1)?0!==(ag&1073741824)&&(Q(b),Ta&&b.subtreeFlags&6&&(b.flags|=8192)):Q(b),null;case 24:return null;case 25:return null}throw Error(m(156,\nb.tag));}\nfunction Gg(a,b){nd(b);switch(b.tag){case 1:return A(b.type)&&mc(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return De(),q(z),q(x),Ie(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Fe(b),null;case 13:q(J);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Ad()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return q(J),null;case 4:return De(),null;case 10:return Md(b.type._context),null;case 22:case 23:return Fg(),\nnull;case 24:return null;default:return null}}var Hg=!1,S=!1,Ig=\"function\"===typeof WeakSet?WeakSet:Set,T=null;function Jg(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){U(a,b,d)}else c.current=null}function Kg(a,b,c){try{c()}catch(d){U(a,b,d)}}var Lg=!1;\nfunction Mg(a,b){Ha(a.containerInfo);for(T=b;null!==T;)if(a=T,b=a.child,0!==(a.subtreeFlags&1028)&&null!==b)b.return=a,T=b;else for(;null!==T;){a=T;try{var c=a.alternate;if(0!==(a.flags&1024))switch(a.tag){case 0:case 11:case 15:break;case 1:if(null!==c){var d=c.memoizedProps,e=c.memoizedState,f=a.stateNode,g=f.getSnapshotBeforeUpdate(a.elementType===a.type?d:Fd(a.type,d),e);f.__reactInternalSnapshotBeforeUpdate=g}break;case 3:Ta&&xb(a.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;\ndefault:throw Error(m(163));}}catch(h){U(a,a.return,h)}b=a.sibling;if(null!==b){b.return=a.return;T=b;break}T=a.return}c=Lg;Lg=!1;return c}function Ng(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Kg(b,c,f)}e=e.next}while(e!==d)}}function Og(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Pg(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=Ea(c);break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}function Qg(a){var b=a.alternate;null!==b&&(a.alternate=null,Qg(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&Za(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}\nfunction Rg(a){return 5===a.tag||3===a.tag||4===a.tag}function Sg(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Rg(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Tg(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?pb(c,a,b):kb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Tg(a,b,c),a=a.sibling;null!==a;)Tg(a,b,c),a=a.sibling}function Ug(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?ob(c,a,b):jb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Ug(a,b,c),a=a.sibling;null!==a;)Ug(a,b,c),a=a.sibling}var V=null,Vg=!1;function Wg(a,b,c){for(c=c.child;null!==c;)Xg(a,b,c),c=c.sibling}\nfunction Xg(a,b,c){if(Sc&&\"function\"===typeof Sc.onCommitFiberUnmount)try{Sc.onCommitFiberUnmount(Rc,c)}catch(h){}switch(c.tag){case 5:S||Jg(c,b);case 6:if(Ta){var d=V,e=Vg;V=null;Wg(a,b,c);V=d;Vg=e;null!==V&&(Vg?rb(V,c.stateNode):qb(V,c.stateNode))}else Wg(a,b,c);break;case 18:Ta&&null!==V&&(Vg?Yb(V,c.stateNode):Xb(V,c.stateNode));break;case 4:Ta?(d=V,e=Vg,V=c.stateNode.containerInfo,Vg=!0,Wg(a,b,c),V=d,Vg=e):(Ua&&(d=c.stateNode.containerInfo,e=zb(d),Cb(d,e)),Wg(a,b,c));break;case 0:case 11:case 14:case 15:if(!S&&\n(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Kg(c,b,g):0!==(f&4)&&Kg(c,b,g));e=e.next}while(e!==d)}Wg(a,b,c);break;case 1:if(!S&&(Jg(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){U(c,b,h)}Wg(a,b,c);break;case 21:Wg(a,b,c);break;case 22:c.mode&1?(S=(d=S)||null!==c.memoizedState,Wg(a,b,c),S=d):Wg(a,b,c);break;default:Wg(a,b,\nc)}}function Yg(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ig);b.forEach(function(b){var d=Zg.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction $g(a,b){var c=b.deletions;if(null!==c)for(var d=0;d