PageSourceSearch

https://www.gembawalk.ai/js/multicolumn-DjKT2S6S.js

js gembawalk.ai collected 2026-10-05 12:14:41 UTC 53,811 bytes, 1 lines download raw bytes

1import{j as u,w as C,T as k,s as N,V as st,W as nt,a3 as lt,Y as xe,Z as _,O as H,I as ee,S as je,L as rt,p as ot,z as at,av as ye,K as ct,a5 as be,at as dt,au as Ce,B as ht}from"./vendor-mui-BhcdUMHY.js";import{u as de,r as W,a as ut}from"./vendor-react-9_80szc8.js";import{E as ft,R as pt,u as He,a4 as mt,a as se,M as gt}from"./index-DcmnhvKq.js";import{L as St}from"./LeftOutlined-C-_ZnA3d.js";import xt from"./index-CXGymlBT.js";import{aa as ze,y as p,_ as I,ab as yt,ac as Pe,ad as P,B as T,ae as te,L as z,af as bt,ag as Ct,ah as wt,ai as ne,aj as vt,ak as Rt,al as Dt,am as we,an as kt,ao as X,ap as Tt,aq as Mt,ar as q,as as le,at as It,j as A,au as Et,av as O,aw as Wt,ax as ve,ay as Lt,az as jt,aA as Ht,aB as zt,aC as Pt,aD as Nt,aE as Re,aF as At,aG as Bt,aH as Ot,h as Ne,m as he,p as Ut,q as Gt,V as _t,s as Ft,n as Ae,aI as K,aJ as Be,z as V,E as U,A as re,r as Oe,N as Ue,aK as qt,aL as Vt,aM as Yt,a1 as ue,aN as fe,K as $t,M as Xt,U as Ge,X as _e,T as pe,aO as Kt,aP as Fe,aQ as qe,aR as Ve,o as Ye,P as De,aS as Zt,a0 as Qt,I as Jt,J as ei,aT as ti,a4 as ii,a5 as si,Y as ni,Z as li,$ as ri,a3 as oi,a2 as ai,l as ci,aU as di,aV as ie,a7 as hi,C as ui,i as fi,a as pi,b as mi}from"./CalendarStyled-CumcsMxi.js";import{T as gi,i as Si}from"./index-j8jCwDPF.js";import{F as xi}from"./FormTaskAdd-BBPtcQyG.js";import{u as oe}from"./useFirebaseTasks-BK5Uk2bC.js";import"./vendor-firebase-gcvaeGOS.js";import"./vendor-charts-DytGfyBM.js";import"./dataCache-BHBYso3_.js";import"./useAuditHistory-fRfQZXiq.js";import"./useFirebaseUsers-CyC3Rmz5.js";import"./useFirebaseAllFindings-B7WIHI3V.js";import"./issueState-C5MXbz7J.js";import"./mobileFormStyles-B38K1dbh.js";import"./AdapterDateFns-B_Ynpur6.js";import"./DatePicker-CYy5HxvZ.js";const yi=N(C)(({theme:i})=>({display:"flex",height:"600px",border:`1px solid ${i.palette.divider}`,borderRadius:i.shape.borderRadius,overflow:"hidden"})),bi=N(C)(({theme:i})=>({width:"400px",borderRight:`1px solid ${i.palette.divider}`,backgroundColor:i.palette.background.paper,overflow:"hidden"})),Ci=N(C)(({theme:i})=>({flex:1,overflow:"auto",backgroundColor:i.palette.background.default})),wi=N(C)(({theme:i})=>({height:"60px",borderBottom:`1px solid ${i.palette.divider}`,backgroundColor:i.palette.background.paper,display:"flex",alignItems:"center",position:"sticky",top:0,zIndex:2})),vi=N(C)({position:"relative"}),Ri=N(C)(({theme:i})=>({width:"40px",height:"60px",borderRight:`1px solid ${i.palette.divider}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"12px",backgroundColor:i.palette.background.paper})),Di=i=>{switch(i?.toLowerCase()){case"done":return"success.main";case"in progress":return"warning.main";case"review":return"info.main";case"to do":default:return"primary.main"}};function ki({status:i}){let e="default";switch(i?.toLowerCase()){case"to do":e="default";break;case"in progress":e="warning";break;case"review":e="info";break;case"done":e="success";break;default:e="primary"}return u.jsx(rt,{label:i||"To Do",color:e,variant:"outlined",size:"small"})}function Ti({data:i=[],loading:e=!1}){const t=de(),[n,s]=W.useState(new Date),l=W.useMemo(()=>{const c=[],d=new Date(n);d.setDate(d.getDate()-7);for(let f=0;f<30;f++){const g=new Date(d);g.setDate(d.getDate()+f),c.push(g)}return c},[n]),o=c=>{if(!c.dueDate)return{display:"none"};const d=c.dueDate.toDate?c.dueDate.toDate():new Date(c.dueDate),f=c.creationDate?c.creationDate.toDate?c.creationDate.toDate():new Date(c.creationDate):new Date(d.getTime()-7*24*60*60*1e3),g=l[0],m=l[l.length-1];if(d<g||f>m)return{display:"none"};const S=(m-g)/(24*60*60*1e3),b=Math.max(0,(f-g)/(24*60*60*1e3)),y=Math.min(S,(d-g)/(24*60*60*1e3))-b,v=b/S*100,D=Math.max(1,y/S*100);return{position:"absolute",left:`${v}%`,width:`${D}%`}},a=()=>{const c=new Date(n);c.setDate(c.getDate()-7),s(c)},r=()=>{const c=new Date(n);c.setDate(c.getDate()+7),s(c)},h=c=>{t(`/apps/tasks/edit/${c.id}`)};return e?u.jsx(C,{sx:{p:3,textAlign:"center"},children:u.jsx(k,{children:"Loading Gantt chart..."})}):u.jsxs(yi,{children:[u.jsxs(bi,{children:[u.jsxs(C,{sx:{height:"60px",borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",px:2,backgroundColor:"background.paper"},children:[u.jsx(C,{sx:{width:"50%",display:"flex",alignItems:"center"},children:u.jsx(k,{variant:"h6",sx:{fontWeight:600},children:"Title"})}),u.jsx(C,{sx:{width:"35%",display:"flex",alignItems:"center"},children:u.jsx(k,{variant:"h6",sx:{fontWeight:600},children:"Status"})}),u.jsx(C,{sx:{width:"15%",display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsx(k,{variant:"h6",sx:{fontWeight:600},children:"Actions"})})]}),u.jsx(st,{sx:{height:"calc(100% - 60px)"},children:u.jsx(nt,{stickyHeader:!0,size:"small",children:u.jsxs(lt,{children:[i.map((c,d)=>u.jsxs(xe,{sx:{height:"50px"},children:[u.jsx(_,{sx:{width:"50%"},children:u.jsxs(C,{children:[u.jsx(k,{variant:"body2",noWrap:!0,sx:{fontWeight:500},children:c.title}),c.assignee&&u.jsx(k,{variant:"caption",color:"text.secondary",noWrap:!0,children:c.assignee})]})}),u.jsx(_,{sx:{width:"35%"},children:u.jsx(ki,{status:c.status})}),u.jsx(_,{sx:{width:"15%",textAlign:"center"},children:u.jsx(H,{title:"Edit Task",children:u.jsx(ee,{size:"small",onClick:()=>h(c),children:u.jsx(ft,{})})})})]},c.id||d)),i.length===0&&u.jsx(xe,{children:u.jsx(_,{colSpan:3,sx:{textAlign:"center",py:4},children:u.jsx(k,{color:"text.secondary",children:"No tasks available"})})})]})})})]}),u.jsxs(Ci,{children:[u.jsx(wi,{children:u.jsxs(je,{direction:"row",alignItems:"center",sx:{width:"100%",px:1},children:[u.jsx(H,{title:"Previous week",children:u.jsx(ee,{onClick:a,size:"small",children:u.jsx(St,{})})}),u.jsx(C,{sx:{flex:1,display:"flex"},children:l.map((c,d)=>u.jsxs(Ri,{children:[u.jsx(k,{variant:"caption",sx:{fontWeight:500},children:c.getDate()}),u.jsx(k,{variant:"caption",color:"text.secondary",children:c.toLocaleDateString("en-US",{weekday:"short"})})]},d))}),u.jsx(H,{title:"Next week",children:u.jsx(ee,{onClick:r,size:"small",children:u.jsx(pt,{})})})]})}),u.jsxs(vi,{children:[(()=>{const c=new Date,d=l[0],f=l[l.length-1];if(c>=d&&c<=f){const g=(f-d)/864e5,S=(c-d)/(24*60*60*1e3)/g*100;return u.jsx(C,{sx:{position:"absolute",left:`${S}%`,top:0,height:`${i.length*50}px`,width:"2px",backgroundColor:"error.main",zIndex:10,opacity:.8}})}return null})(),i.map((c,d)=>u.jsx(C,{sx:{height:"50px",borderBottom:1,borderColor:"divider",display:"flex",alignItems:"center",position:"relative"},children:u.jsxs(C,{sx:{flex:1,position:"relative",height:"100%"},children:[u.jsxs(C,{sx:{...o(c),height:"24px",borderRadius:"4px",position:"absolute",opacity:.8,backgroundColor:Di(c.status),top:"13px"},children:[c.dueDate&&u.jsx(H,{title:`${c.title} - Due: ${new Date(c.dueDate.toDate?c.dueDate.toDate():c.dueDate).toLocaleDateString()}`,children:u.jsx(C,{sx:{width:"100%",height:"100%",cursor:"pointer"}})}),c.progress>0&&u.jsx(C,{sx:{position:"absolute",top:0,left:0,height:"100%",width:`${c.progress}%`,backgroundColor:"success.dark",borderRadius:"4px 0 0 4px",opacity:.7}})]}),l.map((f,g)=>u.jsx(C,{sx:{position:"absolute",left:`${g/l.length*100}%`,top:0,height:"100%",width:"1px",backgroundColor:"divider",opacity:.3}},g))]})},c.id||d))]})]})]})}const Mi="https://fullcalendar.io/docs/schedulerLicenseKey#invalid",Ii="https://fullcalendar.io/docs/schedulerLicenseKey#outdated",Ei=["GPL-My-Project-Is-Open-Source","CC-Attribution-NonCommercial-NoDerivatives"],Wi={position:"absolute",zIndex:99999,bottom:"1px",left:"1px",background:"#eee",borderColor:"#ddd",borderStyle:"solid",borderWidth:"1px 1px 0 0",padding:"2px 4px",fontSize:"12px",borderTopRightRadius:"3px"};function Li(i){let e=i.options.schedulerLicenseKey,t=typeof window<"u"?window.location.href:"";if(!Hi(t)){let n=ji(e,i.pluginHooks.premiumReleaseDate);
1if(n!=="valid")return p("div",{className:"fc-license-message",style:Wi},n==="outdated"?p(I,null,"Your license key is too old to work with this version. ",p("a",{href:Ii},"More Info")):p(I,null,"Your license key is invalid. ",p("a",{href:Mi},"More Info")))}return null}function ji(i,e){if(Ei.indexOf(i)!==-1)return"valid";const t=(i||"").match(/^(\d+)-fcs-(\d+)$/);if(t&&t[1].length===10){const n=new Date(parseInt(t[2],10)*1e3),s=P.mockSchedulerReleaseDate||e;if(yt(s))return Pe(s,-372)<n?"valid":"outdated"}return"invalid"}function Hi(i){return/\w+:\/\/fullcalendar\.io\/|\/examples\/[\w-]+\.html$/.test(i)}const zi={schedulerLicenseKey:String};var Pi=ze({name:"@fullcalendar/premium-common",premiumReleaseDate:"2025-06-30",optionRefiners:zi,viewContainerAppends:[Li]});function Ni(i){let e=i.getBoundingClientRect(),t=Ot(i);return{left:e.left+t.borderLeft+t.scrollbarLeft-Ai(i),top:e.top+t.borderTop-i.scrollTop}}function Ai(i){let e=i.scrollLeft;if(window.getComputedStyle(i).direction==="rtl")switch($e()){case"negative":e*=-1;case"reverse":e=i.scrollWidth-e-i.clientWidth}return e}function Bi(i,e){if(window.getComputedStyle(i).direction==="rtl")switch($e()){case"reverse":e=i.scrollWidth-e;break;case"negative":e=-(i.scrollWidth-e);break}i.scrollLeft=e}let ke;function $e(){return ke||(ke=Oi())}function Oi(){let i=document.createElement("div");i.style.position="absolute",i.style.top="-1000px",i.style.width="100px",i.style.height="100px",i.style.overflow="scroll",i.style.direction="rtl";let e=document.createElement("div");e.style.width="200px",e.style.height="200px",i.appendChild(e),document.body.appendChild(i);let t;return i.scrollLeft>0?t="positive":(i.scrollLeft=1,i.scrollLeft>0?t="reverse":t="negative"),Lt(i),t}const Ui=".fc-sticky";class Gi{constructor(e,t){this.scrollEl=e,this.isRtl=t,this.updateSize=()=>{let{scrollEl:n}=this,s=X(n,Ui),l=this.queryElGeoms(s),o=n.clientWidth;_i(s,l,o)}}queryElGeoms(e){let{scrollEl:t,isRtl:n}=this,s=Ni(t),l=[];for(let o of e){let a=Re(At(o.parentNode,!0,!0),-s.left,-s.top),r=o.getBoundingClientRect(),h=window.getComputedStyle(o),c=window.getComputedStyle(o.parentNode).textAlign,d=null;c==="start"?c=n?"right":"left":c==="end"&&(c=n?"left":"right"),h.position!=="sticky"&&(d=Re(r,-s.left-(parseFloat(h.left)||0),-s.top-(parseFloat(h.top)||0))),l.push({parentBound:a,naturalBound:d,elWidth:r.width,elHeight:r.height,textAlign:c})}return l}}function _i(i,e,t){i.forEach((n,s)=>{let{textAlign:l,elWidth:o,parentBound:a}=e[s],r=a.right-a.left,h;l==="center"&&r>t?h=(t-o)/2:h="",Bt(n,{left:h,right:h,top:0})})}class Fi extends T{constructor(){super(...arguments),this.elRef=A(),this.state={xScrollbarWidth:0,yScrollbarWidth:0},this.handleScroller=e=>{this.scroller=e,le(this.props.scrollerRef,e)},this.handleSizing=()=>{let{props:e}=this;e.overflowY==="scroll-hidden"&&this.setState({yScrollbarWidth:this.scroller.getYScrollbarWidth()}),e.overflowX==="scroll-hidden"&&this.setState({xScrollbarWidth:this.scroller.getXScrollbarWidth()})}}render(){let{props:e,state:t,context:n}=this,s=n.isRtl&&ne(),l=0,o=0,a=0,{overflowX:r,overflowY:h}=e;return e.forPrint&&(r="visible",h="visible"),r==="scroll-hidden"&&(a=t.xScrollbarWidth),h==="scroll-hidden"&&t.yScrollbarWidth!=null&&(s?l=t.yScrollbarWidth:o=t.yScrollbarWidth),p("div",{ref:this.elRef,className:"fc-scroller-harness"+(e.liquid?" fc-scroller-harness-liquid":"")},p(Et,{ref:this.handleScroller,elRef:this.props.scrollerElRef,overflowX:r==="scroll-hidden"?"scroll":r,overflowY:h==="scroll-hidden"?"scroll":h,overcomeLeft:l,overcomeRight:o,overcomeBottom:a,maxHeight:typeof e.maxHeight=="number"?e.maxHeight+(r==="scroll-hidden"?t.xScrollbarWidth:0):"",liquid:e.liquid,liquidIsAbsolute:!0},e.children))}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}getSnapshotBeforeUpdate(e){return this.props.forPrint&&!e.forPrint?{simulateScrollLeft:this.scroller.el.scrollLeft}:{}}componentDidUpdate(e,t,n){const{props:s,scroller:{el:l}}=this;if(O(e,s)||this.handleSizing(),n.simulateScrollLeft!==void 0)l.style.left=-n.simulateScrollLeft+"px";else if(!s.forPrint&&e.forPrint){const o=-parseInt(l.style.left);l.style.left="",l.scrollLeft=o}}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}needsXScrolling(){return this.scroller.needsXScrolling()}needsYScrolling(){return this.scroller.needsYScrolling()}}const Te="wheel mousewheel DomMouseScroll MozMousePixelScroll".split(" ");class qi{constructor(e){this.el=e,this.emitter=new Wt,this.isScrolling=!1,this.isTouching=!1,this.isRecentlyWheeled=!1,this.isRecentlyScrolled=!1,this.wheelWaiter=new ve(this._handleWheelWaited.bind(this)),this.scrollWaiter=new ve(this._handleScrollWaited.bind(this)),this.handleScroll=()=>{this.startScroll(),this.emitter.trigger("scroll",this.isRecentlyWheeled,this.isTouching),this.isRecentlyScrolled=!0,this.scrollWaiter.request(500)},this.handleWheel=()=>{this.isRecentlyWheeled=!0,this.wheelWaiter.request(500)},this.handleTouchStart=()=>{this.isTouching=!0},this.handleTouchEnd=()=>{this.isTouching=!1,this.isRecentlyScrolled||this.endScroll()},e.addEventListener("scroll",this.handleScroll),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd);for(let t of Te)e.addEventListener(t,this.handleWheel)}destroy(){let{el:e}=this;e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd);for(let t of Te)e.removeEventListener(t,this.handleWheel)}startScroll(){this.isScrolling||(this.isScrolling=!0,this.emitter.trigger("scrollStart",this.isRecentlyWheeled,this.isTouching))}endScroll(){this.isScrolling&&(this.emitter.trigger("scrollEnd"),this.isScrolling=!1,this.isRecentlyScrolled=!0,this.isRecentlyWheeled=!1,this.scrollWaiter.clear(),this.wheelWaiter.clear())}_handleScrollWaited(){this.isRecentlyScrolled=!1,this.isTouching||this.endScroll()}_handleWheelWaited(){this.isRecentlyWheeled=!1}}class Vi{constructor(e,t){this.isVertical=e,this.scrollEls=t,this.isPaused=!1,this.scrollListeners=t.map(n=>this.bindScroller(n))}destroy(){for(let e of this.scrollListeners)e.destroy()}bindScroller(e){let{scrollEls:t,isVertical:n}=this,s=new qi(e);const l=(a,r)=>{if(!this.isPaused&&((!this.masterEl||this.masterEl!==e&&(a||r))&&this.assignMaster(e),this.masterEl===e))for(let h of t)h!==e&&(n?h.scrollTop=e.scrollTop:h.scrollLeft=e.scrollLeft)},o=()=>{this.masterEl===e&&(this.masterEl=null)};return s.emitter.on("scroll",l),s.emitter.on("scrollEnd",o),s}assignMaster(e){this.masterEl=e;for(let t of this.scrollListeners)t.el!==e&&t.endScroll()}forceScrollLeft(e){this.isPaused=!0;for(let t of this.scrollListeners)Bi(t.el,e);this.isPaused=!1}forceScrollTop(e){this.isPaused=!0;for(let t of this.scrollListeners)t.el.scrollTop=e;this.isPaused=!1}}P.SCROLLGRID_RESIZE_INTERVAL=500;class Xe extends T{constructor(){super(...arguments),this.compileColGroupStats=te(Ki,Qi),this.renderMicroColGroups=te(jt),this.clippedScrollerRefs=new z,this.scrollerElRefs=new z(this._handleScrollerEl.bind(this)),this.chunkElRefs=new z(this._handleChunkEl.bind(this)),this.scrollSyncersBySection={},this.scrollSyncersByColumn={},this.rowUnstableMap=new Map,this.rowInnerMaxHeightMap=new Map,this.anyRowHeightsChanged=!1,this.recentSizingCnt=0,this.state={shrinkWidths:[],forceYScrollbars:!1,forceXScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{},sectionRowMaxHeights:[]},this.handleSizing=(e,t)=>
1{if(!this.allowSizing())return;t||(this.anyRowHeightsChanged=!0);let n={};(e||!t&&!this.rowUnstableMap.size)&&(n.sectionRowMaxHeights=this.computeSectionRowMaxHeights()),this.setState(Object.assign(Object.assign({shrinkWidths:this.computeShrinkWidths()},this.computeScrollerDims()),n),()=>{this.rowUnstableMap.size||this.updateStickyScrolling()})},this.handleRowHeightChange=(e,t)=>{let{rowUnstableMap:n,rowInnerMaxHeightMap:s}=this;if(!t)n.set(e,!0);else{n.delete(e);let l=Me(e);(!s.has(e)||s.get(e)!==l)&&(s.set(e,l),this.anyRowHeightsChanged=!0),!n.size&&this.anyRowHeightsChanged&&(this.anyRowHeightsChanged=!1,this.setState({sectionRowMaxHeights:this.computeSectionRowMaxHeights()}))}}}render(){let{props:e,state:t,context:n}=this,{shrinkWidths:s}=t,l=this.compileColGroupStats(e.colGroups.map(R=>[R])),o=this.renderMicroColGroups(l.map((R,y)=>[R.cols,s[y]])),a=bt(e.liquid,n);this.getDims();let r=e.sections,h=r.length,c=0,d,f=[],g=[],m=[];for(;c<h&&(d=r[c]).type==="header";)f.push(this.renderSection(d,c,l,o,t.sectionRowMaxHeights,!0)),c+=1;for(;c<h&&(d=r[c]).type==="body";)g.push(this.renderSection(d,c,l,o,t.sectionRowMaxHeights,!1)),c+=1;for(;c<h&&(d=r[c]).type==="footer";)m.push(this.renderSection(d,c,l,o,t.sectionRowMaxHeights,!0)),c+=1;const S=!Ct(),b={role:"rowgroup"};return p("table",{ref:e.elRef,role:"grid",className:a.join(" ")},Xi(l,s),!!(!S&&f.length)&&p("thead",b,...f),!!(!S&&g.length)&&p("tbody",b,...g),!!(!S&&m.length)&&p("tfoot",b,...m),S&&p("tbody",b,...f,...g,...m))}renderSection(e,t,n,s,l,o){return"outerContent"in e?p(I,{key:e.key},e.outerContent):p("tr",{key:e.key,role:"presentation",className:wt(e,this.props.liquid).join(" ")},e.chunks.map((a,r)=>this.renderChunk(e,t,n[r],s[r],a,r,(l[t]||[])[r]||[],o)))}renderChunk(e,t,n,s,l,o,a,r){if("outerContent"in l)return p(I,{key:l.key},l.outerContent);let{state:h}=this,{scrollerClientWidths:c,scrollerClientHeights:d}=h,[f,g]=this.getDims(),m=t*g+o,S=!this.context.isRtl||ne()?g-1:0,b=o===S,R=t===f-1,y=R&&h.forceXScrollbars,v=b&&h.forceYScrollbars,D=n&&n.allowXScrolling,E=vt(this.props,e),L=Rt(this.props,e),Z=e.expandRows&&L,Q=n&&n.totalColMinWidth||"",B=Dt(e,l,{tableColGroupNode:s,tableMinWidth:Q,clientWidth:c[m]!==void 0?c[m]:null,clientHeight:d[m]!==void 0?d[m]:null,expandRows:Z,syncRowHeights:!!e.syncRowHeights,rowSyncHeights:a,reportRowHeightChange:this.handleRowHeightChange},r),J=y?R?"scroll":"scroll-hidden":D?R?"auto":"scroll-hidden":"hidden",G=v?b?"scroll":"scroll-hidden":E?b?"auto":"scroll-hidden":"hidden";return B=p(Fi,{ref:this.clippedScrollerRefs.createRef(m),scrollerElRef:this.scrollerElRefs.createRef(m),overflowX:J,overflowY:G,forPrint:this.props.forPrint,liquid:L,maxHeight:e.maxHeight},B),p(r?"th":"td",{key:l.key,ref:this.chunkElRefs.createRef(m),role:"presentation"},B)}componentDidMount(){this.getStickyScrolling=te(Ji),this.getScrollSyncersBySection=we(Ee.bind(this,!0),null,F),this.get
vendor: 3,122 bytes, line 1
1ScrollSyncersByColumn=we(Ee.bind(this,!1),null,F),this.updateScrollSyncers(),this.handleSizing(!1),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(e,t){this.updateScrollSyncers(),this.handleSizing(!1,t.sectionRowMaxHeights!==this.state.sectionRowMaxHeights)}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing),this.destroyScrollSyncers()}allowSizing(){let e=new Date;return!this.lastSizingDate||e.valueOf()>this.lastSizingDate.valueOf()+P.SCROLLGRID_RESIZE_INTERVAL?(this.lastSizingDate=e,this.recentSizingCnt=0,!0):(this.recentSizingCnt+=1)<=10}computeShrinkWidths(){let e=this.compileColGroupStats(this.props.colGroups.map(o=>[o])),[t,n]=this.getDims(),s=t*n,l=[];return e.forEach((o,a)=>{if(o.hasShrinkCol){let r=this.chunkElRefs.collect(a,s,n);l[a]=kt(r)}}),l}computeSectionRowMaxHeights(){let e=new Map,[t,n]=this.getDims(),s=[];for(let l=0;l<t;l+=1){let o=this.props.sections[l],a=[];if(o&&o.syncRowHeights){let r=[];for(let d=0;d<n;d+=1){let f=l*n+d,g=[],m=this.chunkElRefs.currentMap[f];m?g=X(m,".fc-scrollgrid-sync-table tr").map(S=>{let b=Me(S);return e.set(S,b),b}):g=[],r.push(g)}let h=r[0].length,c=!0;for(let d=1;d<n;d+=1)if(!(o.chunks[d]&&o.chunks[d].outerContent!==void 0)&&r[d].length!==h){c=!1;break}if(c){for(let d=0;d<n;d+=1)a.push([]);for(let d=0;d<h;d+=1){let f=[];for(let m=0;m<n;m+=1){let S=r[m][d];S!=null&&f.push(S)}let g=Math.max(...f);for(let m=0;m<n;m+=1)a[m].push(g)}}else{let d=[];for(let g=0;g<n;g+=1)d.push(Yi(r[g])+r[g].length);let f=Math.max(...d);for(let g=0;g<n;g+=1){let m=r[g].length,S=f-m,b=Math.floor(S/m),R=S-b*(m-1),y=[],v=0;for(v<m&&(y.push(R),v+=1);v<m;)y.push(b),v+=1;a.push(y)}}}s.push(a)}return this.rowInnerMaxHeightMap=e,s}computeScrollerDims(){let e=Tt(),[t,n]=this.getDims(),s=!this.context.isRtl||ne()?n-1:0,l=t-1,o=this.clippedScrollerRefs.currentMap,a=this.scrollerElRefs.currentMap,r=!1,h=!1,c={},d={};for(let f=0;f<t;f+=1){let g=f*n+s,m=o[g];if(m&&m.needsYScrolling()){r=!0;break}}for(let f=0;f<n;f+=1){let g=l*n+f,m=o[g];if(m&&m.needsXScrolling()){h=!0;break}}for(let f=0;f<t;f+=1)for(let g=0;g<n;g+=1){let m=f*n+g,S=a[m];if(S){let b=S.parentNode;c[m]=Math.floor(b.getBoundingClientRect().width-(g===s&&r?e.y:0)),d[m]=Math.floor(b.getBoundingClientRect().height-(f===l&&h?e.x:0))}}return{forceYScrollbars:r,forceXScrollbars:h,scrollerClientWidths:c,scrollerClientHeights:d}}updateStickyScrolling(){let{isRtl:e}=this.context,t=this.scrollerElRefs.getAll().map(n=>[n,e]);this.getStickyScrolling(t).forEach(n=>n.updateSize())}updateScrollSyncers(){let[e,t]=this.getDims(),n=e*t,s={},l={},o=this.scrollerElRefs.currentMap;for(let a=0;a<e;a+=1){let r=a*t,h=r+t;s[a]=Mt(o,r,h,1)}for(let a=0;a<t;a+=1)l[a]=this.scrollerElRefs.collect(a,n,t);this.scrollSyncersBySection=this.getScrollSyncersBySection(s),this.scrollSyncersByColumn=this.getScrollSyncersByColumn(l)}destroyScrollSyncers(){q(this.scrollSyncersBySection,F),q(this.scrollSyncersByColumn,F)}getChunkConfigByIndex(e){let t=this.getDims()[1],n=Math.floor(e/t),s=e%t,l=this.props.sections[n];return l&&l.chunks[s]}forceScrollLeft(e,t){let n=this.scrollSyncersByColumn[e];
1n&&n.forceScrollLeft(t)}forceScrollTop(e,t){let n=this.scrollSyncersBySection[e];n&&n.forceScrollTop(t)}_handleChunkEl(e,t){let n=this.getChunkConfigByIndex(parseInt(t,10));n&&le(n.elRef,e)}_handleScrollerEl(e,t){let n=this.getChunkConfigByIndex(parseInt(t,10));n&&le(n.scrollerElRef,e)}getDims(){let e=this.props.sections.length,t=e?this.props.sections[0].chunks.length:0;return[e,t]}}Xe.addStateEquality({shrinkWidths:Ht,scrollerClientWidths:O,scrollerClientHeights:O});function Yi(i){let e=0;for(let t of i)e+=t;return e}function Me(i){let e=X(i,".fc-scrollgrid-sync-inner").map($i);return e.length?Math.max(...e):0}function $i(i){return i.offsetHeight}function Xi(i,e){let t=i.map((n,s)=>{let l=n.width;return l==="shrink"&&(l=n.totalColWidth+It(e[s])+1),p("col",{style:{width:l}})});return p("colgroup",{},...t)}function Ki(i){let e=Ie(i.cols,"width"),t=Ie(i.cols,"minWidth"),n=zt(i.cols),s=i.width!=="shrink"&&!!(e||t||n);return{hasShrinkCol:n,totalColWidth:e,totalColMinWidth:t,allowXScrolling:s,cols:i.cols,width:i.width}}function Ie(i,e){let t=0;for(let n of i){let s=n[e];typeof s=="number"&&(t+=s*(n.span||1))}return t}const Zi={cols:Nt};function Qi(i,e){return Pt(i,e,Zi)}function Ee(i,...e){return new Vi(i,e)}function F(i){i.destroy()}function Ji(i,e){return new Gi(i,e)}const es=18,Y=6,ts=200;P.MAX_TIMELINE_SLOTS=1e3;const ae=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];function is(i,e,t,n){let s={labelInterval:t.slotLabelInterval,slotDuration:t.slotDuration};ns(s,i,e),Ke(s,i,e),ls(s,i,e);let l=t.slotLabelFormat,o=Array.isArray(l)?l:l!=null?[l]:rs(s,i,e,t);s.headerFormats=o.map(D=>Ae(D)),s.isTimeScale=!!s.slotDuration.milliseconds;let a=null;if(!s.isTimeScale){const D=K(s.slotDuration).unit;/year|month|week/.test(D)&&(a=D)}s.largeUnit=a,s.emphasizeWeeks=Be(s.slotDuration)===1&&j("weeks",i,e)>=2&&!t.businessHours;let r=t.snapDuration,h,c;r&&(h=V(r),c=U(s.slotDuration,h)),c==null&&(h=s.slotDuration,c=1),s.snapDuration=h,s.snapsPerSlot=c;let d=re(i.slotMaxTime)-re(i.slotMinTime),f=We(i.renderRange.start,s,e),g=We(i.renderRange.end,s,e);s.isTimeScale&&(f=e.add(f,i.slotMinTime),g=e.add(Pe(g,-1),i.slotMaxTime)),s.timeWindowMs=d,s.normalizedRange={start:f,end:g};let m=[],S=f;for(;S<g;)$(S,s,i,n)&&m.push(S),S=e.add(S,s.slotDuration);s.slotDates=m;let b=-1,R=0;const y=[],v=[];for(S=f;S<g;)$(S,s,i,n)?(b+=1,y.push(b),v.push(R)):y.push(b+.5),S=e.add(S,s.snapDuration),R+=1;return s.snapDiffToIndex=y,s.snapIndexToDiff=v,s.snapCnt=b+1,s.slotCnt=s.snapCnt/s.snapsPerSlot,s.isWeekStarts=os(s,e),s.cellRows=as(s,e),s.slotsPerLabel=U(s.labelInterval,s.slotDuration),s}function We(i,e,t){let n=i;return e.isTimeScale||(n=ue(n),e.largeUnit&&(n=t.startOf(n,e.largeUnit))),n}function ss(i,e,t){if(!e.isTimeScale&&(i=di(i),e.largeUnit)){let n=i;i={start:t.startOf(i.start,e.largeUnit),end:t.startOf(i.end,e.largeUnit)},(i.end.valueOf()!==n.end.valueOf()||i.end<=i.start)&&(i={start:i.start,end:t.add(i.end,e.slotDuration)})}return i}function $(i,e,t,n){if(n.isHiddenDay(i))return!1;if(e.isTimeScale){let s=ue(i),o=i.valueOf()-s.valueOf()-re(t.slotMinTime);return o=(o%864e5+864e5)%864e5,o<e.timeWindowMs}return!0}function ns(i,e,t){const{currentRange:n}=e;if(i.labelInterval&&t.countDurationsBetween(n.start,n.end,i.labelInterval)>P.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),i.labelInterval=null),i.slotDuration&&t.countDurationsBetween(n.start,n.end,i.slotDuration)>P.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),i.slotDuration=null),i.labelInterval&&i.slotDuration){const s=U(i.labelInterval,i.slotDuration);(s===null||s<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),i.slotDuration=null)}}function Ke(i,e,t){const{currentRange:n}=e;let{labelInterval:s}=i;if(!s){let l;if(i.slotDuration){for(l of ae){const o=V(l),a=U(o,i.slotDuration);if(a!==null&&a<=Y){s=o;break}}s||(s=i.slotDuration)}else for(l of ae)if(s=V(l),t.countDurationsBetween(n.start,n.end,s)>=es)break;i.labelInterval=s}return s}function ls(i,e,t){const{currentRange:n}=e;let{slotDuration:s}=i;
1if(!s){const l=Ke(i,e,t);for(let o of ae){const a=V(o),r=U(l,a);if(r!==null&&r>1&&r<=Y){s=a;break}}s&&t.countDurationsBetween(n.start,n.end,s)>ts&&(s=null),s||(s=l),i.slotDuration=s}return s}function rs(i,e,t,n){let s,l;const{labelInterval:o}=i;let a=K(o).unit;const r=n.weekNumbers;let h=s=l=null;switch(a==="week"&&!r&&(a="day"),a){case"year":h={year:"numeric"};break;case"month":j("years",e,t)>1&&(h={year:"numeric"}),s={month:"short"};break;case"week":j("years",e,t)>1&&(h={year:"numeric"}),s={week:"narrow"};break;case"day":j("years",e,t)>1?h={year:"numeric",month:"long"}:j("months",e,t)>1&&(h={month:"long"}),r&&(s={week:"short"}),l={weekday:"narrow",day:"numeric"};break;case"hour":r&&(h={week:"short"}),j("days",e,t)>1&&(s={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),l={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":Vt(o)/60>=Y?(h={hour:"numeric",meridiem:"short"},s=c=>":"+ie(c.date.minute,2)):h={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":qt(o)/60>=Y?(h={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},s=c=>":"+ie(c.date.second,2)):h={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":h={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},s=c=>"."+ie(c.millisecond,3);break}return[].concat(h||[],s||[],l||[])}function j(i,e,t){let n=e.currentRange,s=null;return i==="years"?s=t.diffWholeYears(n.start,n.end):i==="months"||i==="weeks"?s=t.diffWholeMonths(n.start,n.end):i==="days"&&(s=Yt(n.start,n.end)),s||0}function os(i,e){let{slotDates:t,emphasizeWeeks:n}=i,s=null,l=[];for(let o of t){let a=e.computeWeekNumber(o),r=n&&s!==null&&s!==a;s=a,l.push(r)}return l}function as(i,e){let t=i.slotDates,n=i.headerFormats,s=n.map(()=>[]),l=Be(i.slotDuration),o=l===7?"week":l===1?"day":null,a=n.map(r=>r.getSmallestUnit?r.getSmallestUnit():null);for(let r=0;r<t.length;r+=1){let h=t[r],c=i.isWeekStarts[r];for(let d=0;d<n.length;d+=1){let f=n[d],g=s[d],m=g[g.length-1],S=d===n.length-1,b=n.length>1&&!S,R=null,y=a[d]||(S?o:null);if(b){let v=e.format(h,f);!m||m.text!==v?R=Le(h,v,y):m.colspan+=1}else if(!m||fe(e.countDurationsBetween(i.normalizedRange.start,h,i.labelInterval))){let v=e.format(h,f);R=Le(h,v,y)}else m.colspan+=1;R&&(R.weekStart=c,g.push(R))}}return s}function Le(i,e,t){return{date:i,text:e,rowUnit:t,colspan:1,isWeekStart:!1}}class cs extends T{constructor(){super(...arguments),this.refineRenderProps=Kt(us),this.buildCellNavLinkAttrs=he(ds)}render(){let{props:e,context:t}=this,{dateEnv:n,options:s}=t,{cell:l,dateProfile:o,tDateProfile:a}=e,r=Fe(l.date,e.todayRange,e.nowDate,o),h=this.refineRenderProps({level:e.rowLevel,dateMarker:l.date,text:l.text,dateEnv:t.dateEnv,viewApi:t.viewApi});return p(Ye,{elTag:"th",elClasses:["fc-timeline-slot","fc-timeline-slot-label",l.isWeekStart&&"fc-timeline-slot-em",...l.rowUnit==="time"?qe(r,t.theme):Ve(r,t.theme)],elAttrs:{colSpan:l.colspan,"data-date":n.formatIso(l.date,{omitTime:!a.isTimeScale,omitTimeZoneOffset:!0})},renderProps:h,generatorName:"slotLabelContent",customGenerator:s.slotLabelContent,defaultGenerator:hs,classNameGenerator:s.slotLabelClassNames,didMount:s.slotLabelDidMount,willUnmount:s.slotLabelWillUnmount},c=>p("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},p(c,{elTag:"a",elClasses:["fc-timeline-slot-cushion","fc-scrollgrid-sync-inner",e.isSticky&&"fc-sticky"],elAttrs:this.buildCellNavLinkAttrs(t,l.date,l.rowUnit)})))}}function ds(i,e,t){return t&&t!=="time"?ci(i,e,t):{}}function hs(i){return i.text}function us(i){return{level:i.level,date:i.dateEnv.toDate(i.dateMarker),view:i.viewApi,text:i.text}}class fs extends T{render(){let{dateProfile:e,tDateProfile:t,rowInnerHeights:n,todayRange:s,nowDate:l}=this.props,{cellRows:o}=t;return p(I,null,o.map((a,r)=>{let h=r===o.length-1,d=["fc-timeline-header-row",t.isTimeScale&&h?"fc-timeline-header-row-chrono":""];return p("tr",{key:r,className:d.join(" ")},a.map(f=>p(cs,{key:f.date.toISOString(),cell:f,rowLevel:r,dateProfile:e,tDateProfile:t,todayRange:s,nowDate:l,rowInnerHeight:n&&n[r],isSticky:!h})))}))}}class ps{constructor(e,t,n,s,l,o){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=s,this.dateEnv=l,this.isRtl=o,this.outerCoordCache=new De(e,t,!0,!1),this.innerCoordCache=new De(e,Zt(t,"div"),!0,!1)}isDateInRange(e){return Qt(this.dateProfile.currentRange,e)}dateToCoord(e){let{tDateProfile:t}=this,s=this.computeDateSnapCoverage(e)/t.snapsPerSlot,l=Math.floor(s);l=Math.min(l,t.slotCnt-1);let o=s-l,{innerCoordCache:a,outerCoordCache:r}=this;return this.isRtl?r.originClientRect.width-(r.rights[l]-a.getWidth(l)*o):r.lefts[l]+a.getWidth(l)*o}rangeToCoords(e){return{start:this.dateToCoord(e.start),end:this.dateToCoord(e.end)}}durationToCoord(e){let{dateProfile:t,tDateProfile:n,dateEnv:s,isRtl:l}=this,o=0;if(t){let a=s.add(t.activeRange.start,e);n.isTimeScale||(a=ue(a)),o=this.dateToCoord(a),!l&&o&&(o+=1)}return o}coordFromLeft(e){return this.isRtl?this.outerCoordCache.originClientRect.width-e:e}computeDateSnapCoverage(e){return ce(e,this.tDateProfile,this.dateEnv)}}function ce(i,e,t){let n=t.countDurationsBetween(e.normalizedRange.start,i,e.snapDuration);if(n<0)return 0;if(n>=e.snapDiffToIndex.length)return e.snapCnt;let s=Math.floor(n),l=e.snapDiffToIndex[s];return fe(l)?l+=n-s:l=Math.ceil(l),l}function Ze(i,e){return i===null?{left:"",right:""}:e?{right:i,left:""}:{left:i,right:""}}function me(i,e){return i?e?{right:i.start,left:-i.end}:{left:i.start,right:-i.end}:{left:"",right:""}}class ms extends T{constructor(){super(...arguments),this.rootElRef=A()}render(){let{props:e,context:t}=this,n=K(e.tDateProfile.slotDuration).unit,s=e.slatCoords&&e.slatCoords.dateProfile===e.dateProfile?e.slatCoords:null;return p(Ue,{unit:n},(l,o)=>p("div",{className:"fc-timeline-header",ref:this.rootElRef}
1,p("table",{"aria-hidden":!0,className:"fc-scrollgrid-sync-table",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,p("tbody",null,p(fs,{dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:l,todayRange:o,rowInnerHeights:e.rowInnerHeights}))),t.options.nowIndicator&&p("div",{className:"fc-timeline-now-indicator-container"},s&&s.isDateInRange(l)&&p(Oe,{elClasses:["fc-timeline-now-indicator-arrow"],elStyle:Ze(s.dateToCoord(l),t.isRtl),isAxis:!0,date:l}))))}componentDidMount(){this.updateSize()}componentDidUpdate(){this.updateSize()}updateSize(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())}computeMaxCushionWidth(){return Math.max(...X(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map(e=>e.getBoundingClientRect().width))}}class gs extends T{render(){let{props:e,context:t}=this,{dateEnv:n,options:s,theme:l}=t,{date:o,tDateProfile:a,isEm:r}=e,h=Fe(e.date,e.todayRange,e.nowDate,e.dateProfile),c=Object.assign(Object.assign({date:n.toDate(e.date)},h),{view:t.viewApi});return p(Ye,{elTag:"td",elRef:e.elRef,elClasses:["fc-timeline-slot","fc-timeline-slot-lane",r&&"fc-timeline-slot-em",a.isTimeScale?fe(n.countDurationsBetween(a.normalizedRange.start,e.date,a.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor":"",...e.isDay?Ve(h,l):qe(h,l)],elAttrs:{"data-date":n.formatIso(o,{omitTimeZoneOffset:!0,omitTime:!a.isTimeScale})},renderProps:c,generatorName:"slotLaneContent",customGenerator:s.slotLaneContent,classNameGenerator:s.slotLaneClassNames,didMount:s.slotLaneDidMount,willUnmount:s.slotLaneWillUnmount},d=>p(d,{elTag:"div"}))}}class Ss extends T{render(){let{props:e}=this,{tDateProfile:t,cellElRefs:n}=e,{slotDates:s,isWeekStarts:l}=t,o=!t.isTimeScale&&!t.largeUnit;return p("tbody",null,p("tr",null,s.map((a,r)=>{let h=a.toISOString();return p(gs,{key:h,elRef:n.createRef(h),date:a,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:l[r],isDay:o})})))}}class xs extends T{constructor(){super(...arguments),this.rootElRef=A(),this.cellElRefs=new z,this.handleScrollRequest=e=>{let{onScrollLeftRequest:t}=this.props,{coords:n}=this;if(t&&n){if(e.time){let s=n.coordFromLeft(n.durationToCoord(e.time));t(s)}return!0}return null}}render(){let{props:e,context:t}=this;return p("div",{className:"fc-timeline-slots",ref:this.rootElRef},p("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,p(Ss,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))}componentDidMount(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{props:e,context:t}=this;e.clientWidth!==null&&this.scrollResponder&&this.rootElRef.current.offsetWidth&&(this.coords=new ps(this.rootElRef.current,ys(this.cellElRefs.currentMap,e.tDateProfile.slotDates),e.dateProfile,e.tDateProfile,t.dateEnv,t.isRtl),e.onCoords&&e.onCoords(this.coords),this.scrollResponder.update(!1))}positionToHit(e){let{outerCoordCache:t}=this.coords,{dateEnv:n,isRtl:s}=this.context,{tDateProfile:l}=this.props,o=t.leftToIndex(e);if(o!=null){let a=t.getWidth(o),r=s?(t.rights[o]-e)/a:(e-t.lefts[o])/a,h=Math.floor(r*l.snapsPerSlot),c=n.add(l.slotDates[o],$t(l.snapDuration,h)),d=n.add(c,l.snapDuration);return{dateSpan:{range:{start:c,end:d},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[o],left:t.lefts[o],right:t.rights[o]}}return null}}function ys(i,e){return e.map(t=>{let n=t.toISOString();return i[n]})}function Qe(i,e,t){let n=[];if(t)for(let s of i){let l=t.rangeToCoords(s),o=Math.round(l.start),a=Math.round(l.end);a-o<e&&(a=o+e),n.push({start:o,end:a})}return n}function bs(i,e,t,n,s,l){let o=[],a=[];for(let y=0;y<i.length;y+=1){let v=i[y],D=v.eventRange.instance.instanceId,E=t[D],L=e[y];E&&L?o.push({index:y,span:L,thickness:E}):a.push({seg:v,hcoords:L,top:null})}let r=new ii;s!=null&&(r.strictOrder=s),l!=null&&(r.maxStackCnt=l);let h=r.addSegs(o),c=h.map(y=>({seg:i[y.index],hcoords:y.span,top:null})),d=si(h),f=[],g=[];const m=y=>i[y.index];for(let y=0;y<d.length;y+=1){let v=d[y],D=v.entries.map(m),E=n[Ge(_e(D))];E!=null?f.push({index:i.length+y,thickness:E,span:v.span}):g.push({seg:D,hcoords:v.span,top:null})}r.maxStackCnt=-1,r.addSegs(f);let S=r.toRects(),b=[],R=0;for(let y of S){let v=y.index;b.push({seg:v<i.length?i[v]:d[v-i.length].entries.map(m),hcoords:y.span,top:y.levelCoord}),R=Math.max(R,y.levelCoord+y.thickness)}return[b.concat(a,c,g),R]}class Cs extends T{render(){let{props:e}=this,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&p("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))}renderSegs(e,t,n){let{todayRange:s,nowDate:l}=this.props,{isRtl:o}=this.context,a=Qe(e,0,t),r=e.map((h,c)=>{let d=a[c],f=me(d,o);return p("div",{key:ri(h.eventRange),className:"fc-timeline-bg-harness",style:f},n==="bg-event"?p(li,Object.assign({seg:h},pe(h,s,l))):ni(n))});return p(I,null,r)}}class ws extends Jt{sliceRange(e,t,n,s,l){let o=ss(e,s,l),a=[];if(ce(o.start,s,l)<ce(o.end,s,l)){let r=ei(o,s.normalizedRange);r&&a.push({start:r.start,end:r.end,isStart:r.start.valueOf()===o.start.valueOf()&&$(r.start,s,t,n),isEnd:r.end.valueOf()===o.end.valueOf()&&$(ti(r.end,-1),s,t,n)})}return a}}
1const vs=Ae({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});class Je extends T{render(){let{props:e}=this;return p(ai,Object.assign({},e,{elClasses:["fc-timeline-event","fc-h-event"],defaultTimeFormat:vs,defaultDisplayEventTime:!e.isTimeScale}))}}class Rs extends T{render(){let{props:e,context:t}=this,{hiddenSegs:n,placement:s,resourceId:l}=e,{top:o,hcoords:a}=s,r=a&&o!==null,h=me(a,t.isRtl),c=l?{resourceId:l}:{};return p(oi,{elRef:e.elRef,elClasses:["fc-timeline-more-link"],elStyle:Object.assign({visibility:r?"":"hidden",top:o||0},h),allDayDate:null,moreCnt:n.length,allSegs:n,hiddenSegs:n,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:c,popoverContent:()=>p(I,null,n.map(d=>{let f=d.eventRange.instance.instanceId;return p("div",{key:f,style:{visibility:e.isForcedInvisible[f]?"hidden":""}},p(Je,Object.assign({isTimeScale:e.isTimeScale,seg:d,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:f===e.eventSelection},pe(d,e.todayRange,e.nowDate))))}))},d=>p(d,{elTag:"div",elClasses:["fc-timeline-more-link-inner","fc-sticky"]}))}}class et extends T{constructor(){super(...arguments),this.slicer=new ws,this.sortEventSegs=he(Xt),this.harnessElRefs=new z,this.moreElRefs=new z,this.innerElRef=A(),this.state={eventInstanceHeights:{},moreLinkHeights:{}},this.handleResize=e=>{e&&this.updateSize()}}render(){let{props:e,state:t,context:n}=this,{options:s}=n,{dateProfile:l,tDateProfile:o}=e,a=this.slicer.sliceProps(e,l,o.isTimeScale?null:e.nextDayThreshold,n,l,n.dateProfileGenerator,o,n.dateEnv),r=(a.eventDrag?a.eventDrag.segs:null)||(a.eventResize?a.eventResize.segs:null)||[],h=this.sortEventSegs(a.fgEventSegs,s.eventOrder),c=Qe(h,s.eventMinWidth,e.timelineCoords),[d,f]=bs(h,c,t.eventInstanceHeights,t.moreLinkHeights,s.eventOrderStrict,s.eventMaxStack),g=(a.eventDrag?a.eventDrag.affectedInstances:null)||(a.eventResize?a.eventResize.affectedInstances:null)||{};return p(I,null,p(Cs,{businessHourSegs:a.businessHourSegs,bgEventSegs:a.bgEventSegs,timelineCoords:e.timelineCoords,eventResizeSegs:a.eventResize?a.eventResize.segs:[],dateSelectionSegs:a.dateSelectionSegs,nowDate:e.nowDate,todayRange:e.todayRange}),p("div",{className:"fc-timeline-events fc-scrollgrid-sync-inner",ref:this.innerElRef,style:{height:f}},this.renderFgSegs(d,g,!1,!1,!1),this.renderFgSegs(Ds(r,e.timelineCoords,d),{},!!a.eventDrag,!!a.eventResize,!1)))}componentDidMount(){this.updateSize(),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){(e.eventStore!==this.props.eventStore||e.timelineCoords!==this.props.timelineCoords||t.moreLinkHeights!==this.state.moreLinkHeights)&&this.updateSize()}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateSize(){let{props:e}=this,{timelineCoords:t}=e;const n=this.innerElRef.current;e.onHeightChange&&e.onHeightChange(n,!1),t&&this.setState({eventInstanceHeights:q(this.harnessElRefs.currentMap,s=>Math.round(s.getBoundingClientRect().height)),moreLinkHeights:q(this.moreElRefs.currentMap,s=>Math.round(s.getBoundingClientRect().height))},()=>{e.onHeightChange&&e.onHeightChange(n,!0)}),e.syncParentMinHeight&&(n.parentElement.style.minHeight=n.style.height)}renderFgSegs(e,t,n,s,l){let{harnessElRefs:o,moreElRefs:a,props:r,context:h}=this,c=n||s||l;return p(I,null,e.map(d=>{let{seg:f,hcoords:g,top:m}=d;if(Array.isArray(f)){let y=Ge(_e(f));return p(Rs,{key:"m:"+y,elRef:a.createRef(y),hiddenSegs:f,placement:d,dateProfile:r.dateProfile,nowDate:r.nowDate,todayRange:r.todayRange,isTimeScale:r.tDateProfile.isTimeScale,eventSelection:r.eventSelection,resourceId:r.resourceId,isForcedInvisible:t})}let S=f.eventRange.instance.instanceId,b=c||!!(!t[S]&&g&&m!==null),R=me(g,h.isRtl);return p("div",{key:"e:"+S,ref:c?null:o.createRef(S),className:"fc-timeline-event-harness",style:Object.assign({visibility:b?"":"hidden",top:m||0},R)},p(Je,Object.assign({isTimeScale:r.tDateProfile.isTimeScale,seg:f,isDragging:n,isResizing:s,isDateSelecting:l,isSelected:S===r.eventSelection},pe(f,r.todayRange,r.nowDate))))}))}}et.addStateEquality({eventInstanceHeights:O,moreLinkHeights:O});function Ds(i,e,t){if(!i.length||!e)return[];let n=ks(t);return i.map(s=>({seg:s,hcoords:e.rangeToCoords(s),top:n[s.eventRange.instance.instanceId]}))}function ks(i){let e={};for(let t of i){let{seg:n}=t;Array.isArray(n)||(e[n.eventRange.instance.instanceId]=t.top)}return e}class Ts extends Ne{constructor(){super(...arguments),this.slatsRef=A(),this.state={coords:null},this.handeEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)},this.handleCoords=e=>{this.setState({coords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t,context:n}=this,{options:s}=n,{dateProfile:l,tDateProfile:o}=e,a=K(o.slotDuration).unit;return p("div",{className:"fc-timeline-body",ref:this.handeEl,style:{minWidth:e.tableMinWidth,height:e.clientHeight,width:e.clientWidth}},p(Ue,{unit:a},(r,h)=>p(I,null,p(xs,{ref:this.slatsRef,dateProfile:l,tDateProfile:o,nowDate:r,todayRange:h,clientWidth:e.clientWidth,tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,onCoords:this.handleCoords,onScrollLeftRequest:e.onScrollLeftRequest}),p(et,{dateProfile:l,tDateProfile:e.tDateProfile,nowDate:r,todayRange:h,nextDayThreshold:s.nextDayThreshold,businessHours:e.businessHours,eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,timelineCoords:t.coords,syncParentMinHeight:!0}
1),s.nowIndicator&&t.coords&&t.coords.isDateInRange(r)&&p("div",{className:"fc-timeline-now-indicator-container"},p(Oe,{elClasses:["fc-timeline-now-indicator-line"],elStyle:Ze(t.coords.dateToCoord(r),n.isRtl),isAxis:!1,date:r})))))}queryHit(e,t,n,s){let o=this.slatsRef.current.positionToHit(e);return o?{dateProfile:this.props.dateProfile,dateSpan:o.dateSpan,rect:{left:o.left,right:o.right,top:0,bottom:s},dayEl:o.dayEl,layer:0}:null}}class Ms extends Ne{constructor(){super(...arguments),this.buildTimelineDateProfile=he(is),this.scrollGridRef=A(),this.state={slatCoords:null,slotCushionMaxWidth:null},this.handleSlatCoords=e=>{this.setState({slatCoords:e})},this.handleScrollLeftRequest=e=>{this.scrollGridRef.current.forceScrollLeft(0,e)},this.handleMaxCushionWidth=e=>{this.setState({slotCushionMaxWidth:Math.ceil(e)})}}render(){let{props:e,state:t,context:n}=this,{options:s}=n,l=!e.forPrint&&Ut(s),o=!e.forPrint&&Gt(s),a=this.buildTimelineDateProfile(e.dateProfile,n.dateEnv,s,n.dateProfileGenerator),{slotMinWidth:r}=s,h=Is(a,r||this.computeFallbackSlotMinWidth(a)),c=[{type:"header",key:"header",isSticky:l,chunks:[{key:"timeline",content:d=>p(ms,{dateProfile:e.dateProfile,clientWidth:d.clientWidth,clientHeight:d.clientHeight,tableMinWidth:d.tableMinWidth,tableColGroupNode:d.tableColGroupNode,tDateProfile:a,slatCoords:t.slatCoords,onMaxCushionWidth:r?null:this.handleMaxCushionWidth})}]},{type:"body",key:"body",liquid:!0,chunks:[{key:"timeline",content:d=>p(Ts,Object.assign({},e,{clientWidth:d.clientWidth,clientHeight:d.clientHeight,tableMinWidth:d.tableMinWidth,tableColGroupNode:d.tableColGroupNode,tDateProfile:a,onSlatCoords:this.handleSlatCoords,onScrollLeftRequest:this.handleScrollLeftRequest}))}]}];return o&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"timeline",content:Ft}]}),p(_t,{elClasses:["fc-timeline",s.eventOverlap===!1?"fc-timeline-overlap-disabled":""],viewSpec:n.viewSpec},p(Xe,{ref:this.scrollGridRef,liquid:!e.isHeightAuto&&!e.forPrint,forPrint:e.forPrint,collapsibleWidth:!1,colGroups:[{cols:h}],sections:c}))}computeFallbackSlotMinWidth(e){return Math.max(30,(this.state.slotCushionMaxWidth||0)/e.slotsPerLabel)}}function Is(i,e){return[{span:i.slotCnt,minWidth:e||1}]}var Es='.fc .fc-timeline-body{min-height:100%;position:relative;z-index:1}.fc .fc-timeline-slots{bottom:0;position:absolute;top:0;z-index:1}.fc .fc-timeline-slots>table{height:100%}.fc .fc-timeline-slot-minor{border-style:dotted}.fc .fc-timeline-slot-frame{align-items:center;display:flex;justify-content:center}.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame{justify-content:flex-start}.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame{overflow:hidden}.fc .fc-timeline-slot-cushion{padding:4px 5px;white-space:nowrap}.fc-direction-ltr .fc-timeline-slot{border-right:0!important}.fc-direction-rtl .fc-timeline-slot{border-left:0!important}.fc .fc-timeline-now-indicator-container{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:4}.fc .fc-timeline-now-indicator-arrow,.fc .fc-timeline-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;pointer-events:none;position:absolute;top:0}.fc .fc-timeline-now-indicator-arrow{border-left-color:transparent;border-right-color:transparent;border-width:6px 5px 0;margin:0 -6px}.fc .fc-timeline-now-indicator-line{border-width:0 0 0 1px;bottom:0;margin:0 -1px}.fc .fc-timeline-events{position:relative;width:0;z-index:3}.fc .fc-timeline-event-harness,.fc .fc-timeline-more-link{position:absolute;top:0}.fc-timeline-event{z-index:1}.fc-timeline-event.fc-event-mirror{z-index:2}.fc-timeline-event{align-items:center;border-radius:0;display:flex;font-size:var(--fc-small-font-size);margin-bottom:1px;padding:2px 1px;position:relative}.fc-timeline-event .fc-event-main{flex-grow:1;flex-shrink:1;min-width:0}.fc-timeline-event .fc-event-time{font-weight:700}.fc-timeline-event .fc-event-time,.fc-timeline-event .fc-event-title{padding:0 2px;white-space:nowrap}.fc-direction-ltr .fc-timeline-event.fc-event-end,.fc-direction-ltr .fc-timeline-more-link{margin-right:1px}.fc-direction-rtl .fc-timeline-event.fc-event-end,.fc-direction-rtl .fc-timeline-more-link{margin-left:1px}.fc-timeline-overlap-disabled .fc-timeline-event{margin-bottom:0;padding-bottom:5px;padding-top:5px}.fc-timeline-event:not(.fc-event-end):after,.fc-timeline-event:not(.fc-event-start):before{border-color:transparent #000;border-style:solid;border-width:5px;content:"";flex-grow:0;flex-shrink:0;height:0;margin:0 1px;opacity:.5;width:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after{border-left:0}.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before{border-right:0}.fc-timeline-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;font-size:var(--fc-small-font-size);padding:1px}.fc-timeline-more-link-inner{display:inline-block;left:0;padding:2px;right:0}.fc .fc-timeline-bg{bottom:0;left:0;position:absolute;right:0;top:0;width:0;z-index:2}.fc .fc-timeline-bg .fc-non-business{z-index:1}.fc .fc-timeline-bg .fc-bg-event{z-index:2}.fc .fc-timeline-bg .fc-highlight{z-index:3}.fc .fc-timeline-bg-harness{bottom:0;position:absolute;top:0}';hi(Es);var Ws=ze({name:"@fullcalendar/timeline",premiumReleaseDate:"2025-06-30",deps:[Pi],initialView:"timelineDay",views:{timeline:{component:Ms,usesMinMaxTime:!0,eventResizableFromStart:!0},timelineDay:{type:"timeline",duration:{days:1}},timelineWeek:{type:"timeline",duration:{weeks:1}},timelineMonth:{type:"timeline",duration:{months:1}},timelineYear:{type:"timeline",duration:{years:1}}}});function Ls(){const i=ot(x=>x.breakpoints.down("sm")),{user:e}=He(),{canManageTasks:t}=oe(),n=de(),[s,l]=W.useState(!1),[o,a]=W.useState(),[r,h]=W.useState(),[c,d]=W.useState(new Date),[f,g]=W.useState(null),m=W.useRef(null),{tasks:S,loading:b,error:R,updateTask:y}=oe(),v=S.map(x=>{const M=(it=>{switch(it?.toLowerCase()){case"to do":return"#1890ff";case"in progress":return"#fa8c16";case"review":return"#722ed1";case"done":return"#52c41a";case"cancelled":return"#f5222d";default:return"#1890ff"}})(x.status),Se=x.dueDate?x.dueDate.toDate?x.dueDate.toDate():x.dueDate:x.creationDate?x.creationDate.toDate?x.creationDate.toDate():x.creationDate:new Date;return{id:x.id,title:x.title,start:Se,end:Se,allDay:!0,backgroundColor:M,borderColor:M,color:M,extendedProps:{...x,status:x.status,progress:x.progress||0,assignedTo:x.assignedTo,description:x.description}}}),D=x=>{const w=x.event;return u.jsxs(C,{sx:{p:.5,overflow:"hidden"},children:[u.jsx(C,{sx:{fontWeight:"bold",fontSize:"0.875rem",lineHeight:1.2},children:w.title}),w.extendedProps.status&&u.jsx(C,{sx:{fontSize:"0.75rem",opacity:.8,fontStyle:"italic",lineHeight:1.1,mt:.25},children:w.extendedProps.status}),w.extendedProps.progress>0&&u.jsxs(C,{sx:{fontSize:"0.7rem",opacity:.7,lineHeight:1,mt:.25},children:[w.extendedProps.progress,"% complete"]})]})};W.useEffect(()=>{const x=m.current;if(x){const w=x.getApi(),M=i?"listWeek":"dayGridMonth";w.changeView(M),h(M)}},[i]);const E=()=>{const x=m.current;if(x){const w=x.getApi();w.today(),d(w.getDate())}},L=x=>{const w=m.current;w&&(w.getApi().changeView(x),h(x))},Z=()=>{const x=m.current;if(x){const w=x.getApi();w.prev(),d(w.getDate())}},Q=()=>{const x=m.current;if(x){const w=x.getApi();w.next(),d(w.getDate())}},B=x=>
1{if(!t)return;const w=m.current;w&&w.getApi().unselect(),g({start:x.start,end:x.end}),l(!0)},J=x=>{if(x?.event?.id){const w=S.find(M=>M.id===x.event.id);w&&a(w)}l(!0)},G=async({event:x})=>{await y(x.id,{dueDate:x.start})},ge=()=>{s&&a(null),l(!s)},tt=()=>{const x=[{name:"To Do",color:"#1890ff"},{name:"In Progress",color:"#fa8c16"},{name:"Review",color:"#722ed1"},{name:"Done",color:"#52c41a"}];return u.jsxs(ct,{sx:{p:2,zIndex:1,minWidth:260,backgroundColor:"background.paper"},children:[u.jsx(k,{variant:"h6",sx:{mb:1.5,fontSize:"1rem",fontWeight:600},children:"Task Status"}),u.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:x.map(w=>u.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(C,{sx:{width:16,height:16,backgroundColor:w.color,borderRadius:1,flexShrink:0}}),u.jsx(k,{variant:"body2",sx:{fontSize:"0.875rem"},children:w.name})]},w.name))})]})};return b?u.jsx(C,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:400},children:u.jsx(k,{children:"Loading tasks..."})}):R?u.jsx(C,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:400},children:u.jsxs(k,{color:"error",children:["Error loading tasks: ",R]})}):u.jsxs(C,{sx:{position:"relative"},children:[u.jsxs(C,{sx:{display:"flex",gap:2,alignItems:"flex-start"},children:[u.jsxs(ui,{sx:{flex:1},children:[u.jsx(gi,{date:c,view:r,onClickNext:Q,onClickPrev:Z,onClickToday:E,onChangeView:L}),u.jsx(xt,{weekends:!0,editable:t,droppable:t,selectable:t,events:v,eventContent:D,ref:m,rerenderDelay:10,initialDate:c,initialView:r,dayMaxEventRows:3,eventDisplay:"block",headerToolbar:!1,allDayMaintainDuration:!0,eventResizableFromStart:!0,select:t?B:void 0,eventDrop:t?G:void 0,eventClick:J,eventResize:t?G:void 0,height:i?"auto":720,plugins:[fi,pi,Ws,Si,mi]})]}),u.jsx(C,{sx:{width:280,flexShrink:0},children:u.jsx(tt,{})})]}),u.jsx(at,{maxWidth:"sm",fullWidth:!0,onClose:ge,open:s,slots:{transition:mt},children:u.jsx(xi,{task:o,range:f,onCancel:ge})}),t?u.jsx(H,{title:"Add New Task",children:u.jsx(ye,{ariaLabel:"add-task-fab",sx:{display:"inline-flex",position:"sticky",bottom:24,left:"100%",transform:"translate(-50%, -50% )"},icon:u.jsx(se,{style:{fontSize:"1.5rem"}}),onClick:()=>n("/apps/tasks/add")})}):u.jsx(H,{title:"You don't have permission to add tasks",children:u.jsx(ye,{ariaLabel:"add-task-fab",sx:{display:"inline-flex",position:"sticky",bottom:24,left:"100%",transform:"translate(-50%, -50% )","& .MuiFab-root":{backgroundColor:"action.disabled",color:"action.disabled"}},icon:u.jsx(se,{style:{fontSize:"1.5rem"}}),disabled:!0})})]})}function Qs(){const{tasks:i,loading:e,error:t,canManageTasks:n}=oe(),{user:s}=He(),l=de(),o=()=>{l("/apps/tasks/add")},[a,r]=ut.useState(0),h=(c,d)=>{r(d)};return u.jsx(be,{container:!0,spacing:2.5,children:u.jsx(be,{size:12,children:u.jsxs(gt,{title:"Tasks",content:!1,secondary:n?u.jsx(ht,{variant:"contained",startIcon:u.jsx(se,{}),onClick:o,children:"Add Task"}):null,children:[u.jsx(C,{sx:{borderBottom:1,borderColor:"divider"},children:u.jsxs(dt,{value:a,onChange:h,"aria-label":"tasks tabs",children:[u.jsx(Ce,{label:"Gantt Chart"}),u.jsx(Ce,{label:"Calendar"})]})}),a===0&&u.jsx(u.Fragment,{children:t?u.jsxs(je,{sx:{p:3,alignItems:"center"},children:[u.jsx(k,{variant:"h6",color:"error",children:"Error loading tasks"}),u.jsx(k,{variant:"body2",color:"text.secondary",children:t.message||"Please try again later"})]}):u.jsx(Ti,{data:i||[],loading:e})}),a===1&&u.jsx(Ls,{})]})})})}export{Qs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.