@jaeungkim/gantt-chart 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react");function it(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return s.default=n,Object.freeze(s)}const Ne=it(C);function te(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ye={exports:{}},$e={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react");function it(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return s.default=n,Object.freeze(s)}const Ne=it(C);function te(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Se={exports:{}},$e={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -14,18 +14,18 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var qe;function ct(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){function n(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===x?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case T:return"Fragment";case k:return"Portal";case B:return"Profiler";case _:return"StrictMode";case G:return"Suspense";case fe:return"SuspenseList"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case l:return(t.displayName||"Context")+".Provider";case $:return(t._context.displayName||"Context")+".Consumer";case I:var b=t.render;return t=t.displayName,t||(t=b.displayName||b.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L:return b=t.displayName||null,b!==null?b:n(t.type)||"Memo";case S:b=t._payload,t=t._init;try{return n(t(b))}catch{}}return null}function s(t){return""+t}function r(t){try{s(t);var b=!1}catch{b=!0}if(b){b=console;var w=b.error,q=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return w.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",q),s(t)}}function o(){}function i(){if(Y===0){J=console.log,ae=console.info,ne=console.warn,ue=console.error,re=console.group,V=console.groupCollapsed,ee=console.groupEnd;var t={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Y++}function e(){if(Y--,Y===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},t,{value:J}),info:N({},t,{value:ae}),warn:N({},t,{value:ne}),error:N({},t,{value:ue}),group:N({},t,{value:re}),groupCollapsed:N({},t,{value:V}),groupEnd:N({},t,{value:ee})})}0>Y&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function f(t){if(se===void 0)try{throw Error()}catch(w){var b=w.stack.trim().match(/\n( *(at )?)/);se=b&&b[1]||"",le=-1<w.stack.indexOf(`
17
+ */var qe;function ct(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){function n(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===x?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case T:return"Fragment";case k:return"Portal";case B:return"Profiler";case _:return"StrictMode";case G:return"Suspense";case fe:return"SuspenseList"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case l:return(t.displayName||"Context")+".Provider";case $:return(t._context.displayName||"Context")+".Consumer";case I:var b=t.render;return t=t.displayName,t||(t=b.displayName||b.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L:return b=t.displayName||null,b!==null?b:n(t.type)||"Memo";case y:b=t._payload,t=t._init;try{return n(t(b))}catch{}}return null}function s(t){return""+t}function r(t){try{s(t);var b=!1}catch{b=!0}if(b){b=console;var w=b.error,q=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return w.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",q),s(t)}}function o(){}function i(){if(Y===0){J=console.log,ae=console.info,ne=console.warn,ue=console.error,re=console.group,V=console.groupCollapsed,ee=console.groupEnd;var t={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Y++}function e(){if(Y--,Y===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},t,{value:J}),info:N({},t,{value:ae}),warn:N({},t,{value:ne}),error:N({},t,{value:ue}),group:N({},t,{value:re}),groupCollapsed:N({},t,{value:V}),groupEnd:N({},t,{value:ee})})}0>Y&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function f(t){if(se===void 0)try{throw Error()}catch(w){var b=w.stack.trim().match(/\n( *(at )?)/);se=b&&b[1]||"",le=-1<w.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<w.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+se+t+le}function u(t,b){if(!t||Fe)return"";var w=Le.get(t);if(w!==void 0)return w;Fe=!0,w=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var q=null;q=F.H,F.H=null,i();try{var X={DetermineComponentFrameRoot:function(){try{if(b){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var De=ie}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ie){De=ie}t.call(ce.prototype)}}else{try{throw Error()}catch(ie){De=ie}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&De&&typeof ie.stack=="string")return[ie.stack,De.stack]}return[null,null]}};X.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var z=Object.getOwnPropertyDescriptor(X.DetermineComponentFrameRoot,"name");z&&z.configurable&&Object.defineProperty(X.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=X.DetermineComponentFrameRoot(),oe=P[0],me=P[1];if(oe&&me){var Q=oe.split(`
20
- `),de=me.split(`
21
- `);for(P=z=0;z<Q.length&&!Q[z].includes("DetermineComponentFrameRoot");)z++;for(;P<de.length&&!de[P].includes("DetermineComponentFrameRoot");)P++;if(z===Q.length||P===de.length)for(z=Q.length-1,P=de.length-1;1<=z&&0<=P&&Q[z]!==de[P];)P--;for(;1<=z&&0<=P;z--,P--)if(Q[z]!==de[P]){if(z!==1||P!==1)do if(z--,P--,0>P||Q[z]!==de[P]){var he=`
22
- `+Q[z].replace(" at new "," at ");return t.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",t.displayName)),typeof t=="function"&&Le.set(t,he),he}while(1<=z&&0<=P);break}}}finally{Fe=!1,F.H=q,e(),Error.prepareStackTrace=w}return Q=(Q=t?t.displayName||t.name:"")?f(Q):"",typeof t=="function"&&Le.set(t,Q),Q}function m(t){if(t==null)return"";if(typeof t=="function"){var b=t.prototype;return u(t,!(!b||!b.isReactComponent))}if(typeof t=="string")return f(t);switch(t){case G:return f("Suspense");case fe:return f("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case I:return t=u(t.render,!1),t;case L:return m(t.type);case S:b=t._payload,t=t._init;try{return m(t(b))}catch{}}return""}function h(){var t=F.A;return t===null?null:t.getOwner()}function p(t){if(Z.call(t,"key")){var b=Object.getOwnPropertyDescriptor(t,"key").get;if(b&&b.isReactWarning)return!1}return t.key!==void 0}function a(t,b){function w(){Ze||(Ze=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}w.isReactWarning=!0,Object.defineProperty(t,"key",{get:w,configurable:!0})}function c(){var t=n(this.type);return Pe[t]||(Pe[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function v(t,b,w,q,X,z){return w=z.ref,t={$$typeof:R,type:t,key:b,props:z,_owner:X},(w!==void 0?w:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:c}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function g(t,b,w,q,X,z){if(typeof t=="string"||typeof t=="function"||t===T||t===B||t===_||t===G||t===fe||t===D||typeof t=="object"&&t!==null&&(t.$$typeof===S||t.$$typeof===L||t.$$typeof===l||t.$$typeof===$||t.$$typeof===I||t.$$typeof===U||t.getModuleId!==void 0)){var P=b.children;if(P!==void 0)if(q)if(H(P)){for(q=0;q<P.length;q++)d(P[q],t);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(P,t)}else P="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),t===null?q="null":H(t)?q="array":t!==void 0&&t.$$typeof===R?(q="<"+(n(t.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):q=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,P);if(Z.call(b,"key")){P=n(t);var oe=Object.keys(b).filter(function(Q){return Q!=="key"});q=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",_e[P+q]||(oe=0<oe.length?"{"+oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
+ `+se+t+le}function u(t,b){if(!t||Fe)return"";var w=Le.get(t);if(w!==void 0)return w;Fe=!0,w=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var q=null;q=F.H,F.H=null,i();try{var X={DetermineComponentFrameRoot:function(){try{if(b){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var De=ie}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ie){De=ie}t.call(ce.prototype)}}else{try{throw Error()}catch(ie){De=ie}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&De&&typeof ie.stack=="string")return[ie.stack,De.stack]}return[null,null]}};X.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var H=Object.getOwnPropertyDescriptor(X.DetermineComponentFrameRoot,"name");H&&H.configurable&&Object.defineProperty(X.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=X.DetermineComponentFrameRoot(),oe=P[0],pe=P[1];if(oe&&pe){var Q=oe.split(`
20
+ `),de=pe.split(`
21
+ `);for(P=H=0;H<Q.length&&!Q[H].includes("DetermineComponentFrameRoot");)H++;for(;P<de.length&&!de[P].includes("DetermineComponentFrameRoot");)P++;if(H===Q.length||P===de.length)for(H=Q.length-1,P=de.length-1;1<=H&&0<=P&&Q[H]!==de[P];)P--;for(;1<=H&&0<=P;H--,P--)if(Q[H]!==de[P]){if(H!==1||P!==1)do if(H--,P--,0>P||Q[H]!==de[P]){var he=`
22
+ `+Q[H].replace(" at new "," at ");return t.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",t.displayName)),typeof t=="function"&&Le.set(t,he),he}while(1<=H&&0<=P);break}}}finally{Fe=!1,F.H=q,e(),Error.prepareStackTrace=w}return Q=(Q=t?t.displayName||t.name:"")?f(Q):"",typeof t=="function"&&Le.set(t,Q),Q}function p(t){if(t==null)return"";if(typeof t=="function"){var b=t.prototype;return u(t,!(!b||!b.isReactComponent))}if(typeof t=="string")return f(t);switch(t){case G:return f("Suspense");case fe:return f("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case I:return t=u(t.render,!1),t;case L:return p(t.type);case y:b=t._payload,t=t._init;try{return p(t(b))}catch{}}return""}function h(){var t=F.A;return t===null?null:t.getOwner()}function m(t){if(Z.call(t,"key")){var b=Object.getOwnPropertyDescriptor(t,"key").get;if(b&&b.isReactWarning)return!1}return t.key!==void 0}function a(t,b){function w(){Ze||(Ze=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}w.isReactWarning=!0,Object.defineProperty(t,"key",{get:w,configurable:!0})}function c(){var t=n(this.type);return Pe[t]||(Pe[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function v(t,b,w,q,X,H){return w=H.ref,t={$$typeof:R,type:t,key:b,props:H,_owner:X},(w!==void 0?w:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:c}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function g(t,b,w,q,X,H){if(typeof t=="string"||typeof t=="function"||t===T||t===B||t===_||t===G||t===fe||t===D||typeof t=="object"&&t!==null&&(t.$$typeof===y||t.$$typeof===L||t.$$typeof===l||t.$$typeof===$||t.$$typeof===I||t.$$typeof===U||t.getModuleId!==void 0)){var P=b.children;if(P!==void 0)if(q)if(z(P)){for(q=0;q<P.length;q++)d(P[q],t);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(P,t)}else P="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),t===null?q="null":z(t)?q="array":t!==void 0&&t.$$typeof===R?(q="<"+(n(t.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):q=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,P);if(Z.call(b,"key")){P=n(t);var oe=Object.keys(b).filter(function(Q){return Q!=="key"});q=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",_e[P+q]||(oe=0<oe.length?"{"+oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
23
  let props = %s;
24
24
  <%s {...props} />
25
25
  React keys must be passed directly to JSX without using spread:
26
26
  let props = %s;
27
- <%s key={someKey} {...props} />`,q,P,oe,P),_e[P+q]=!0)}if(P=null,w!==void 0&&(r(w),P=""+w),p(b)&&(r(b.key),P=""+b.key),"key"in b){w={};for(var me in b)me!=="key"&&(w[me]=b[me])}else w=b;return P&&a(w,typeof t=="function"?t.displayName||t.name||"Unknown":t),v(t,P,z,X,h(),w)}function d(t,b){if(typeof t=="object"&&t&&t.$$typeof!==ot){if(H(t))for(var w=0;w<t.length;w++){var q=t[w];y(q)&&M(q,b)}else if(y(t))t._store&&(t._store.validated=1);else if(t===null||typeof t!="object"?w=null:(w=E&&t[E]||t["@@iterator"],w=typeof w=="function"?w:null),typeof w=="function"&&w!==t.entries&&(w=w.call(t),w!==t))for(;!(t=w.next()).done;)y(t.value)&&M(t.value,b)}}function y(t){return typeof t=="object"&&t!==null&&t.$$typeof===R}function M(t,b){if(t._store&&!t._store.validated&&t.key==null&&(t._store.validated=1,b=j(b),!Ce[b])){Ce[b]=!0;var w="";t&&t._owner!=null&&t._owner!==h()&&(w=null,typeof t._owner.tag=="number"?w=n(t._owner.type):typeof t._owner.name=="string"&&(w=t._owner.name),w=" It was passed a child from "+w+".");var q=F.getCurrentStack;F.getCurrentStack=function(){var X=m(t.type);return q&&(X+=q()||""),X},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',b,w),F.getCurrentStack=q}}function j(t){var b="",w=h();return w&&(w=n(w.type))&&(b=`
27
+ <%s key={someKey} {...props} />`,q,P,oe,P),_e[P+q]=!0)}if(P=null,w!==void 0&&(r(w),P=""+w),m(b)&&(r(b.key),P=""+b.key),"key"in b){w={};for(var pe in b)pe!=="key"&&(w[pe]=b[pe])}else w=b;return P&&a(w,typeof t=="function"?t.displayName||t.name||"Unknown":t),v(t,P,H,X,h(),w)}function d(t,b){if(typeof t=="object"&&t&&t.$$typeof!==ot){if(z(t))for(var w=0;w<t.length;w++){var q=t[w];S(q)&&M(q,b)}else if(S(t))t._store&&(t._store.validated=1);else if(t===null||typeof t!="object"?w=null:(w=E&&t[E]||t["@@iterator"],w=typeof w=="function"?w:null),typeof w=="function"&&w!==t.entries&&(w=w.call(t),w!==t))for(;!(t=w.next()).done;)S(t.value)&&M(t.value,b)}}function S(t){return typeof t=="object"&&t!==null&&t.$$typeof===R}function M(t,b){if(t._store&&!t._store.validated&&t.key==null&&(t._store.validated=1,b=j(b),!Ce[b])){Ce[b]=!0;var w="";t&&t._owner!=null&&t._owner!==h()&&(w=null,typeof t._owner.tag=="number"?w=n(t._owner.type):typeof t._owner.name=="string"&&(w=t._owner.name),w=" It was passed a child from "+w+".");var q=F.getCurrentStack;F.getCurrentStack=function(){var X=p(t.type);return q&&(X+=q()||""),X},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',b,w),F.getCurrentStack=q}}function j(t){var b="",w=h();return w&&(w=n(w.type))&&(b=`
28
28
 
29
29
  Check the render method of \``+w+"`."),b||(t=n(t))&&(b=`
30
30
 
31
- Check the top-level render call using <`+t+">."),b}var O=C,R=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),l=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),E=Symbol.iterator,x=Symbol.for("react.client.reference"),F=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,N=Object.assign,U=Symbol.for("react.client.reference"),H=Array.isArray,Y=0,J,ae,ne,ue,re,V,ee;o.__reactDisabledLog=!0;var se,le,Fe=!1,Le=new(typeof WeakMap=="function"?WeakMap:Map),ot=Symbol.for("react.client.reference"),Ze,Pe={},_e={},Ce={};ge.Fragment=T,ge.jsx=function(t,b,w,q,X){return g(t,b,w,!1,q,X)},ge.jsxs=function(t,b,w,q,X){return g(t,b,w,!0,q,X)}}()),ge}var We;function lt(){return We||(We=1,process.env.NODE_ENV==="production"?ye.exports=ut():ye.exports=ct()),ye.exports}var A=lt();const at=2.375*16,Ue=3,K={day:{labelUnit:"day",tickUnit:"hour",unitPerTick:1,dragStepUnit:"minute",dragStepAmount:15,basePxPerDragStep:16,formatTickLabel:n=>n.format("h A"),formatHeaderLabel:n=>n.format("MMM D")},week:{labelUnit:"week",tickUnit:"day",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:6,basePxPerDragStep:32,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("MMM")},month:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:64,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("MMM YYYY")},year:{labelUnit:"year",tickUnit:"day",unitPerTick:7,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:16,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("YYYY")}};var Se={exports:{}},dt=Se.exports,ze;function ft(){return ze||(ze=1,function(n,s){(function(r,o){n.exports=o()})(dt,function(){var r=1e3,o=6e4,i=36e5,e="millisecond",f="second",u="minute",m="hour",h="day",p="week",a="month",c="quarter",v="year",g="date",d="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var S=["th","st","nd","rd"],D=L%100;return"["+L+(S[(D-20)%10]||S[D]||S[0])+"]"}},O=function(L,S,D){var E=String(L);return!E||E.length>=S?L:""+Array(S+1-E.length).join(D)+L},R={s:O,z:function(L){var S=-L.utcOffset(),D=Math.abs(S),E=Math.floor(D/60),x=D%60;return(S<=0?"+":"-")+O(E,2,"0")+":"+O(x,2,"0")},m:function L(S,D){if(S.date()<D.date())return-L(D,S);var E=12*(D.year()-S.year())+(D.month()-S.month()),x=S.clone().add(E,a),F=D-x<0,Z=S.clone().add(E+(F?-1:1),a);return+(-(E+(D-x)/(F?x-Z:Z-x))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:a,y:v,w:p,d:h,D:g,h:m,m:u,s:f,ms:e,Q:c}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},k="en",T={};T[k]=j;var _="$isDayjsObject",B=function(L){return L instanceof G||!(!L||!L[_])},$=function L(S,D,E){var x;if(!S)return k;if(typeof S=="string"){var F=S.toLowerCase();T[F]&&(x=F),D&&(T[F]=D,x=F);var Z=S.split("-");if(!x&&Z.length>1)return L(Z[0])}else{var N=S.name;T[N]=S,x=N}return!E&&x&&(k=x),x||!E&&k},l=function(L,S){if(B(L))return L.clone();var D=typeof S=="object"?S:{};return D.date=L,D.args=arguments,new G(D)},I=R;I.l=$,I.i=B,I.w=function(L,S){return l(L,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var G=function(){function L(D){this.$L=$(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[_]=!0}var S=L.prototype;return S.parse=function(D){this.$d=function(E){var x=E.date,F=E.utc;if(x===null)return new Date(NaN);if(I.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var Z=x.match(y);if(Z){var N=Z[2]-1||0,U=(Z[7]||"0").substring(0,3);return F?new Date(Date.UTC(Z[1],N,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,U)):new Date(Z[1],N,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,U)}}return new Date(x)}(D),this.init()},S.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},S.$utils=function(){return I},S.isValid=function(){return this.$d.toString()!==d},S.isSame=function(D,E){var x=l(D);return this.startOf(E)<=x&&x<=this.endOf(E)},S.isAfter=function(D,E){return l(D)<this.startOf(E)},S.isBefore=function(D,E){return this.endOf(E)<l(D)},S.$g=function(D,E,x){return I.u(D)?this[E]:this.set(x,D)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(D,E){var x=this,F=!!I.u(E)||E,Z=I.p(D),N=function(re,V){var ee=I.w(x.$u?Date.UTC(x.$y,V,re):new Date(x.$y,V,re),x);return F?ee:ee.endOf(h)},U=function(re,V){return I.w(x.toDate()[re].apply(x.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(V)),x)},H=this.$W,Y=this.$M,J=this.$D,ae="set"+(this.$u?"UTC":"");switch(Z){case v:return F?N(1,0):N(31,11);case a:return F?N(1,Y):N(0,Y+1);case p:var ne=this.$locale().weekStart||0,ue=(H<ne?H+7:H)-ne;return N(F?J-ue:J+(6-ue),Y);case h:case g:return U(ae+"Hours",0);case m:return U(ae+"Minutes",1);case u:return U(ae+"Seconds",2);case f:return U(ae+"Milliseconds",3);default:return this.clone()}},S.endOf=function(D){return this.startOf(D,!1)},S.$set=function(D,E){var x,F=I.p(D),Z="set"+(this.$u?"UTC":""),N=(x={},x[h]=Z+"Date",x[g]=Z+"Date",x[a]=Z+"Month",x[v]=Z+"FullYear",x[m]=Z+"Hours",x[u]=Z+"Minutes",x[f]=Z+"Seconds",x[e]=Z+"Milliseconds",x)[F],U=F===h?this.$D+(E-this.$W):E;if(F===a||F===v){var H=this.clone().set(g,1);H.$d[N](U),H.init(),this.$d=H.set(g,Math.min(this.$D,H.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},S.set=function(D,E){return this.clone().$set(D,E)},S.get=function(D){return this[I.p(D)]()},S.add=function(D,E){var x,F=this;D=Number(D);var Z=I.p(E),N=function(Y){var J=l(F);return I.w(J.date(J.date()+Math.round(Y*D)),F)};if(Z===a)return this.set(a,this.$M+D);if(Z===v)return this.set(v,this.$y+D);if(Z===h)return N(1);if(Z===p)return N(7);var U=(x={},x[u]=o,x[m]=i,x[f]=r,x)[Z]||1,H=this.$d.getTime()+D*U;return I.w(H,this)},S.subtract=function(D,E){return this.add(-1*D,E)},S.format=function(D){var E=this,x=this.$locale();if(!this.isValid())return x.invalidDate||d;var F=D||"YYYY-MM-DDTHH:mm:ssZ",Z=I.z(this),N=this.$H,U=this.$m,H=this.$M,Y=x.weekdays,J=x.months,ae=x.meridiem,ne=function(V,ee,se,le){return V&&(V[ee]||V(E,F))||se[ee].slice(0,le)},ue=function(V){return I.s(N%12||12,V,"0")},re=ae||function(V,ee,se){var le=V<12?"AM":"PM";return se?le.toLowerCase():le};return F.replace(M,function(V,ee){return ee||function(se){switch(se){case"YY":return String(E.$y).slice(-2);case"YYYY":return I.s(E.$y,4,"0");case"M":return H+1;case"MM":return I.s(H+1,2,"0");case"MMM":return ne(x.monthsShort,H,J,3);case"MMMM":return ne(J,H);case"D":return E.$D;case"DD":return I.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ne(x.weekdaysMin,E.$W,Y,2);case"ddd":return ne(x.weekdaysShort,E.$W,Y,3);case"dddd":return Y[E.$W];case"H":return String(N);case"HH":return I.s(N,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(N,U,!0);case"A":return re(N,U,!1);case"m":return String(U);case"mm":return I.s(U,2,"0");case"s":return String(E.$s);case"ss":return I.s(E.$s,2,"0");case"SSS":return I.s(E.$ms,3,"0");case"Z":return Z}return null}(V)||Z.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(D,E,x){var F,Z=this,N=I.p(E),U=l(D),H=(U.utcOffset()-this.utcOffset())*o,Y=this-U,J=function(){return I.m(Z,U)};switch(N){case v:F=J()/12;break;case a:F=J();break;case c:F=J()/3;break;case p:F=(Y-H)/6048e5;break;case h:F=(Y-H)/864e5;break;case m:F=Y/i;break;case u:F=Y/o;break;case f:F=Y/r;break;default:F=Y}return x?F:I.a(F)},S.daysInMonth=function(){return this.endOf(a).$D},S.$locale=function(){return T[this.$L]},S.locale=function(D,E){if(!D)return this.$L;var x=this.clone(),F=$(D,E,!0);return F&&(x.$L=F),x},S.clone=function(){return I.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},L}(),fe=G.prototype;return l.prototype=fe,[["$ms",e],["$s",f],["$m",u],["$H",m],["$W",h],["$M",a],["$y",v],["$D",g]].forEach(function(L){fe[L[1]]=function(S){return this.$g(S,L[0],L[1])}}),l.extend=function(L,S){return L.$i||(L(S,G,l),L.$i=!0),l},l.locale=$,l.isDayjs=B,l.unix=function(L){return l(1e3*L)},l.en=T[k],l.Ls=T,l.p={},l})}(Se)),Se.exports}var mt=ft();const W=te(mt);function pt(n,s,r,o){if(!r.length)return{barMarginLeftAmount:0,barWidthSize:0};const{tickUnit:i,unitPerTick:e}=K[o],f=r.reduce((d,y)=>d+y.widthPx,0),u=r[0].startDate,m=r[r.length-1].startDate,h=W(m).add(e,i).diff(u),p=f/h,a=n.diff(u),c=s.diff(u),v=a*p,g=Math.max(c-a,1)*p;return{barMarginLeftAmount:v,barWidthSize:g}}function ht(n){let s=1/0,r=-1/0;for(const{startDate:o,endDate:i}of Object.values(n)){const e=W(o).valueOf(),f=W(i).valueOf();Number.isNaN(e)||(s=Math.min(s,e)),Number.isNaN(f)||(r=Math.max(r,f))}return{minDate:W(s),maxDate:W(r)}}function $t(n,s,r){const{tickUnit:o,unitPerTick:i}=K[r];return{paddedMinDate:n.subtract(Ue*i,o),paddedMaxDate:s.add(Ue*i,o)}}function gt(n,s,r){const{tickUnit:o,unitPerTick:i,basePxPerDragStep:e,dragStepUnit:f,dragStepAmount:u}=K[r],m=[];let h=n.startOf(o);for(;h.isBefore(s);){const p=W(h).add(i,o).diff(h,f)/u;m.push({startDate:h,widthPx:p*e}),h=h.add(i,o)}return m}function st(n,s){const{labelUnit:r,formatHeaderLabel:o}=K[s],i=[];let e=null,f="",u=0,m=null;return n.forEach((h,p)=>{const a=h.startDate.startOf(r),c=a.valueOf(),v=(o==null?void 0:o(a))??a.format();c===e?u+=h.widthPx:(e!==null&&i.push({label:f,widthPx:u,startDate:m}),e=c,f=v,u=h.widthPx,m=a),p===n.length-1&&i.push({label:f,widthPx:u,startDate:m})}),i}function vt(n,s,r,o,i,e){const{minDate:f,maxDate:u}=ht(n);r(f),o(u);const{paddedMinDate:m,paddedMaxDate:h}=$t(f,u,s),p=gt(m,h,s),a=st(p,s);i(p),e(a)}const Dt=({bottomRowCells:n,selectedScale:s,scrollRef:r})=>{var p;const o=K[s],[i,e]=C.useState(0),f=C.useMemo(()=>st(n,s),[n,s]),u=C.useMemo(()=>{const a=[];for(const c of f){const v=a[a.length-1];v&&v.label===c.label?v.widthPx+=c.widthPx:a.push({...c})}return a},[f]),m=C.useMemo(()=>{let a=0;return u.map(c=>{const v={...c,left:a};return a+=c.widthPx,v})},[u]);C.useEffect(()=>{const a=r.current;if(!a)return;const c=()=>{const v=a.scrollLeft;for(let g=m.length-1;g>=0;g--)if(v>=m[g].left){e(g);break}};return a.addEventListener("scroll",c),c(),()=>a.removeEventListener("scroll",c)},[m]);const h=((p=m[i])==null?void 0:p.label)??"";return A.jsx("div",{className:"sticky top-0 z-30",style:{backgroundColor:"#F0F1F2"},children:A.jsxs("div",{className:"flex min-w-max flex-col",children:[A.jsxs("div",{className:"relative flex h-8",children:[A.jsx("div",{className:"sticky left-0 z-40 flex w-24 shrink-0 items-center justify-center border-b border-solid text-sm font-bold",style:{backgroundColor:"#F0F1F2",borderColor:"#D6D6D8"},children:h}),A.jsx("div",{className:"flex",children:m.map((a,c)=>A.jsx("div",{className:"border-b border-solid py-2 pr-4 text-left text-sm font-bold",style:{width:`${a.widthPx}px`,borderColor:"#D6D6D8",backgroundColor:"#F0F1F2"},children:A.jsx("p",{className:"px-4",children:c===0?"":a.label})},c))})]}),A.jsx("div",{className:"flex",children:n.map((a,c)=>{var g;const v=((g=o.formatTickLabel)==null?void 0:g.call(o,a.startDate))||"";return A.jsx("div",{className:"relative p-1 text-center text-xs",style:{width:`${a.widthPx}px`},children:v},c)})})]})})};var xe={exports:{}},yt=xe.exports,He;function St(){return He||(He=1,function(n,s){(function(r,o){n.exports=o()})(yt,function(){return function(r,o,i){o.prototype.isBetween=function(e,f,u,m){var h=i(e),p=i(f),a=(m=m||"()")[0]==="(",c=m[1]===")";return(a?this.isAfter(h,u):!this.isBefore(h,u))&&(c?this.isBefore(p,u):!this.isAfter(p,u))||(a?this.isBefore(h,u):!this.isAfter(h,u))&&(c?this.isAfter(p,u):!this.isBefore(p,u))}}})}(xe)),xe.exports}var xt=St();const bt=te(xt);var be={exports:{}},wt=be.exports,Ye;function Tt(){return Ye||(Ye=1,function(n,s){(function(r,o){n.exports=o()})(wt,function(){var r="day";return function(o,i,e){var f=function(h){return h.add(4-h.isoWeekday(),r)},u=i.prototype;u.isoWeekYear=function(){return f(this).year()},u.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),r);var p,a,c,v,g=f(this),d=(p=this.isoWeekYear(),a=this.$u,c=(a?e.utc:e)().year(p).startOf("year"),v=4-c.isoWeekday(),c.isoWeekday()>4&&(v+=7),c.add(v,r));return g.diff(d,"week")+1},u.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var m=u.startOf;u.startOf=function(h,p){var a=this.$utils(),c=!!a.u(p)||p;return a.p(h)==="isoweek"?c?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(h,p)}}})}(be)),be.exports}var Et=Tt();const kt=te(Et);var we={exports:{}},Mt=we.exports,Be;function Ot(){return Be||(Be=1,function(n,s){(function(r,o){n.exports=o()})(Mt,function(){return function(r,o){o.prototype.isSameOrAfter=function(i,e){return this.isSame(i,e)||this.isAfter(i,e)}}})}(we)),we.exports}var It=Ot();const Rt=te(It);var Te={exports:{}},Ft=Te.exports,Ge;function Lt(){return Ge||(Ge=1,function(n,s){(function(r,o){n.exports=o()})(Ft,function(){return function(r,o){o.prototype.isSameOrBefore=function(i,e){return this.isSame(i,e)||this.isBefore(i,e)}}})}(Te)),Te.exports}var jt=Lt();const Zt=te(jt);var Ee={exports:{}},Pt=Ee.exports,Ve;function _t(){return Ve||(Ve=1,function(n,s){(function(r,o){n.exports=o()})(Pt,function(){return function(r,o,i){o.prototype.isToday=function(){var e="YYYY-MM-DD",f=i();return this.format(e)===f.format(e)}}})}(Ee)),Ee.exports}var Ct=_t();const Nt=te(Ct);var ke={exports:{}},At=ke.exports,Xe;function qt(){return Xe||(Xe=1,function(n,s){(function(r,o){n.exports=o()})(At,function(){return function(r,o,i){var e=o.prototype,f=function(a){return a&&(a.indexOf?a:a.s)},u=function(a,c,v,g,d){var y=a.name?a:a.$locale(),M=f(y[c]),j=f(y[v]),O=M||j.map(function(k){return k.slice(0,g)});if(!d)return O;var R=y.weekStart;return O.map(function(k,T){return O[(T+(R||0))%7]})},m=function(){return i.Ls[i.locale()]},h=function(a,c){return a.formats[c]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,d,y){return d||y.slice(1)})}(a.formats[c.toUpperCase()])},p=function(){var a=this;return{months:function(c){return c?c.format("MMMM"):u(a,"months")},monthsShort:function(c){return c?c.format("MMM"):u(a,"monthsShort","months",3)},firstDayOfWeek:function(){return a.$locale().weekStart||0},weekdays:function(c){return c?c.format("dddd"):u(a,"weekdays")},weekdaysMin:function(c){return c?c.format("dd"):u(a,"weekdaysMin","weekdays",2)},weekdaysShort:function(c){return c?c.format("ddd"):u(a,"weekdaysShort","weekdays",3)},longDateFormat:function(c){return h(a.$locale(),c)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};e.localeData=function(){return p.bind(this)()},i.localeData=function(){var a=m();return{firstDayOfWeek:function(){return a.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(c){return h(a,c)},meridiem:a.meridiem,ordinal:a.ordinal}},i.months=function(){return u(m(),"months")},i.monthsShort=function(){return u(m(),"monthsShort","months",3)},i.weekdays=function(a){return u(m(),"weekdays",null,null,a)},i.weekdaysShort=function(a){return u(m(),"weekdaysShort","weekdays",3,a)},i.weekdaysMin=function(a){return u(m(),"weekdaysMin","weekdays",2,a)}}})}(ke)),ke.exports}var Wt=qt();const Ut=te(Wt);var Me={exports:{}},zt=Me.exports,Je;function Ht(){return Je||(Je=1,function(n,s){(function(r,o){n.exports=o()})(zt,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},o={};return function(i,e,f){var u,m=function(c,v,g){g===void 0&&(g={});var d=new Date(c),y=function(M,j){j===void 0&&(j={});var O=j.timeZoneName||"short",R=M+"|"+O,k=o[R];return k||(k=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:M,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:O}),o[R]=k),k}(v,g);return y.formatToParts(d)},h=function(c,v){for(var g=m(c,v),d=[],y=0;y<g.length;y+=1){var M=g[y],j=M.type,O=M.value,R=r[j];R>=0&&(d[R]=parseInt(O,10))}var k=d[3],T=k===24?0:k,_=d[0]+"-"+d[1]+"-"+d[2]+" "+T+":"+d[4]+":"+d[5]+":000",B=+c;return(f.utc(_).valueOf()-(B-=B%1e3))/6e4},p=e.prototype;p.tz=function(c,v){c===void 0&&(c=u);var g,d=this.utcOffset(),y=this.toDate(),M=y.toLocaleString("en-US",{timeZone:c}),j=Math.round((y-new Date(M))/1e3/60),O=15*-Math.round(y.getTimezoneOffset()/15)-j;if(!Number(O))g=this.utcOffset(0,v);else if(g=f(M,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(O,!0),v){var R=g.utcOffset();g=g.add(d-R,"minute")}return g.$x.$timezone=c,g},p.offsetName=function(c){var v=this.$x.$timezone||f.tz.guess(),g=m(this.valueOf(),v,{timeZoneName:c}).find(function(d){return d.type.toLowerCase()==="timezonename"});return g&&g.value};var a=p.startOf;p.startOf=function(c,v){if(!this.$x||!this.$x.$timezone)return a.call(this,c,v);var g=f(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return a.call(g,c,v).tz(this.$x.$timezone,!0)},f.tz=function(c,v,g){var d=g&&v,y=g||v||u,M=h(+f(),y);if(typeof c!="string")return f(c).tz(y);var j=function(T,_,B){var $=T-60*_*1e3,l=h($,B);if(_===l)return[$,_];var I=h($-=60*(l-_)*1e3,B);return l===I?[$,l]:[T-60*Math.min(l,I)*1e3,Math.max(l,I)]}(f.utc(c,d).valueOf(),M,y),O=j[0],R=j[1],k=f(O).utcOffset(R);return k.$x.$timezone=y,k},f.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},f.tz.setDefault=function(c){u=c}}})}(Me)),Me.exports}var Yt=Ht();const Bt=te(Yt);var Oe={exports:{}},Gt=Oe.exports,Qe;function Vt(){return Qe||(Qe=1,function(n,s){(function(r,o){n.exports=o()})(Gt,function(){return function(r,o,i){i.updateLocale=function(e,f){var u=i.Ls[e];if(u)return(f?Object.keys(f):[]).forEach(function(m){u[m]=f[m]}),u}}})}(Oe)),Oe.exports}var Xt=Vt();const Jt=te(Xt);var Ie={exports:{}},Qt=Ie.exports,Ke;function Kt(){return Ke||(Ke=1,function(n,s){(function(r,o){n.exports=o()})(Qt,function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(e,f,u){var m=f.prototype;u.utc=function(d){var y={date:d,utc:!0,args:arguments};return new f(y)},m.utc=function(d){var y=u(this.toDate(),{locale:this.$L,utc:!0});return d?y.add(this.utcOffset(),r):y},m.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=m.parse;m.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),h.call(this,d)};var p=m.init;m.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else p.call(this)};var a=m.utcOffset;m.utcOffset=function(d,y){var M=this.$utils().u;if(M(d))return this.$u?0:M(this.$offset)?a.call(this):this.$offset;if(typeof d=="string"&&(d=function(k){k===void 0&&(k="");var T=k.match(o);if(!T)return null;var _=(""+T[0]).match(i)||["-",0,0],B=_[0],$=60*+_[1]+ +_[2];return $===0?0:B==="+"?$:-$}(d),d===null))return this;var j=Math.abs(d)<=16?60*d:d,O=this;if(y)return O.$offset=j,O.$u=d===0,O;if(d!==0){var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(O=this.local().add(j+R,r)).$offset=j,O.$x.$localOffset=R}else O=this.utc();return O};var c=m.format;m.format=function(d){var y=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,y)},m.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},m.isUTC=function(){return!!this.$u},m.toISOString=function(){return this.toDate().toISOString()},m.toString=function(){return this.toDate().toUTCString()};var v=m.toDate;m.toDate=function(d){return d==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var g=m.diff;m.diff=function(d,y,M){if(d&&this.$u===d.$u)return g.call(this,d,y,M);var j=this.local(),O=u(d).local();return g.call(j,O,y,M)}}})}(Ie)),Ie.exports}var en=Kt();const tn=te(en);var Re={exports:{}},nn=Re.exports,et;function rn(){return et||(et=1,function(n,s){(function(r,o){n.exports=o()})(nn,function(){return function(r,o){o.prototype.weekday=function(i){var e=this.$locale().weekStart||0,f=this.$W,u=(f<e?f+7:f)-e;return this.$utils().u(i)?u:this.subtract(u,"day").add(i,"day")}}})}(Re)),Re.exports}var an=rn();const sn=te(an);W.extend(sn);W.extend(Nt);W.extend(tn);W.extend(Bt);W.extend(Rt);W.extend(Zt);W.extend(bt);W.extend(Ut);W.extend(Jt);W.extend(kt);function on(n){return[...n].sort((s,r)=>{const o=s.sequence.split(".").map(Number),i=r.sequence.split(".").map(Number);for(let e=0;e<Math.max(o.length,i.length);e++){const f=o[e]||0,u=i[e]||0;if(f!==u)return f-u}return 0})}function un(n){return n.split(".").length-1}function je(n,s,r){const o=on(n);let i=0;return o.map(e=>{i++;const f=un(e.sequence),{barMarginLeftAmount:u,barWidthSize:m}=pt(W(e.startDate),W(e.endDate),s,r);return{...e,barLeft:u,barWidth:m,depth:f,order:i,originalOrder:i}})}const tt=n=>{let s;const r=new Set,o=(h,p)=>{const a=typeof h=="function"?h(s):h;if(!Object.is(a,s)){const c=s;s=p??(typeof a!="object"||a===null)?a:Object.assign({},s,a),r.forEach(v=>v(s,c))}},i=()=>s,u={setState:o,getState:i,getInitialState:()=>m,subscribe:h=>(r.add(h),()=>r.delete(h))},m=s=n(o,i,u);return u},cn=n=>n?tt(n):tt,ln=n=>n;function dn(n,s=ln){const r=C.useSyncExternalStore(n.subscribe,()=>s(n.getState()),()=>s(n.getInitialState()));return C.useDebugValue(r),r}const nt=n=>{const s=cn(n),r=o=>dn(s,o);return Object.assign(r,s),r},fn=n=>n?nt(n):nt,ve=fn((n,s)=>({rawTasks:[],transformedTasks:[],bottomRowCells:[],topHeaderGroups:[],selectedScale:"month",minDate:W(),maxDate:W(),draggingTaskMeta:null,setSelectedScale:r=>{const{rawTasks:o,bottomRowCells:i}=s(),e=je(o,i,r);n({selectedScale:r,transformedTasks:e})},setRawTasks:r=>{const{bottomRowCells:o,selectedScale:i}=s(),e=je(r,o,i);n({rawTasks:r,transformedTasks:e})},setBottomRowCells:r=>{const{rawTasks:o,selectedScale:i}=s(),e=je(o,r,i);n({bottomRowCells:r,transformedTasks:e})},setTopHeaderGroups:r=>n({topHeaderGroups:r}),setMinDate:r=>n({minDate:r}),setMaxDate:r=>n({maxDate:r}),setDraggingTaskMeta:r=>n({draggingTaskMeta:r}),clearDraggingTaskMeta:()=>n({draggingTaskMeta:null})})),mn=[{id:"1",name:"Project Kickoff",startDate:"2024-06-01T09:00:00Z",endDate:"2024-06-01T11:00:00Z",parentId:null,sequence:"1",dependencies:[]},{id:"2",name:"Requirement Gathering",startDate:"2024-06-02T09:00:00Z",endDate:"2024-06-05T17:00:00Z",parentId:null,sequence:"2",dependencies:[{targetId:"1",type:"FS"}]},{id:"3",name:"Stakeholder Interviews",startDate:"2024-06-02T10:00:00Z",endDate:"2024-06-03T17:00:00Z",parentId:"2",sequence:"2.1",dependencies:[{targetId:"1",type:"SF"}]},{id:"4",name:"Market Analysis",startDate:"2024-06-06T09:00:00Z",endDate:"2024-06-07T17:00:00Z",parentId:null,sequence:"3",dependencies:[{targetId:"2",type:"FS"}]},{id:"5",name:"Design System Creation",startDate:"2024-06-08T09:00:00Z",endDate:"2024-06-12T17:00:00Z",parentId:null,sequence:"4",dependencies:[{targetId:"2",type:"FS"},{targetId:"3",type:"SS"}]},{id:"6",name:"UI/UX Design",startDate:"2024-06-13T09:00:00Z",endDate:"2024-06-16T17:00:00Z",parentId:"5",sequence:"4.1",dependencies:[{targetId:"5",type:"FS"}]},{id:"7",name:"Prototyping",startDate:"2024-06-17T09:00:00Z",endDate:"2024-06-20T17:00:00Z",parentId:"6",sequence:"4.1.1",dependencies:[{targetId:"6",type:"FS"}]},{id:"8",name:"Frontend Development",startDate:"2024-06-21T09:00:00Z",endDate:"2024-06-30T17:00:00Z",parentId:null,sequence:"5",dependencies:[{targetId:"7",type:"FS"}]},{id:"9",name:"Backend Development",startDate:"2024-07-01T09:00:00Z",endDate:"2024-07-10T17:00:00Z",parentId:null,sequence:"6",dependencies:[{targetId:"7",type:"FS"}]},{id:"10",name:"API Integration",startDate:"2024-07-11T09:00:00Z",endDate:"2024-07-15T17:00:00Z",parentId:"9",sequence:"6.1",dependencies:[{targetId:"9",type:"FS"}]},{id:"11",name:"Module Development",startDate:"2024-07-16T09:00:00Z",endDate:"2024-07-20T17:00:00Z",parentId:"8",sequence:"5.1",dependencies:[{targetId:"8",type:"FS"}]},{id:"12",name:"Unit Testing",startDate:"2024-07-21T09:00:00Z",endDate:"2024-07-25T17:00:00Z",parentId:"8",sequence:"5.2",dependencies:[{targetId:"8",type:"FS"}]},{id:"13",name:"Integration Testing",startDate:"2024-07-26T09:00:00Z",endDate:"2024-07-30T17:00:00Z",parentId:"10",sequence:"6.1.1",dependencies:[{targetId:"10",type:"FS"}]},{id:"14",name:"Code Review",startDate:"2024-07-31T09:00:00Z",endDate:"2024-08-04T17:00:00Z",parentId:"10",sequence:"6.1.2",dependencies:[{targetId:"13",type:"FS"}]},{id:"15",name:"Community Feedback",startDate:"2024-08-05T09:00:00Z",endDate:"2024-08-08T17:00:00Z",parentId:null,sequence:"7",dependencies:[{targetId:"14",type:"FS"}]},{id:"16",name:"Documentation Drafting",startDate:"2024-08-09T09:00:00Z",endDate:"2024-08-12T17:00:00Z",parentId:null,sequence:"8",dependencies:[{targetId:"14",type:"FS"}]},{id:"17",name:"Documentation Finalization",startDate:"2024-08-13T09:00:00Z",endDate:"2024-08-16T17:00:00Z",parentId:"16",sequence:"8.1",dependencies:[{targetId:"16",type:"FS"}]},{id:"18",name:"Pre-release Demo",startDate:"2024-08-17T09:00:00Z",endDate:"2024-08-20T17:00:00Z",parentId:null,sequence:"9",dependencies:[{targetId:"15",type:"FS"}]},{id:"19",name:"Bug Fixing",startDate:"2024-08-21T09:00:00Z",endDate:"2024-08-25T17:00:00Z",parentId:null,sequence:"10",dependencies:[{targetId:"15",type:"FS"}]},{id:"20",name:"Release Candidate",startDate:"2024-08-26T09:00:00Z",endDate:"2024-08-30T17:00:00Z",parentId:null,sequence:"11",dependencies:[{targetId:"18",type:"FS"}]},{id:"21",name:"Final Release",startDate:"2024-08-31T09:00:00Z",endDate:"2024-09-02T17:00:00Z",parentId:null,sequence:"12",dependencies:[{targetId:"20",type:"FS"}]},{id:"22",name:"Post-release Monitoring",startDate:"2024-09-03T09:00:00Z",endDate:"2024-09-04T17:00:00Z",parentId:null,sequence:"13",dependencies:[{targetId:"21",type:"FS"}]},{id:"23",name:"Community Engagement",startDate:"2024-09-05T09:00:00Z",endDate:"2024-09-06T17:00:00Z",parentId:null,sequence:"14",dependencies:[{targetId:"21",type:"FS"}]},{id:"24",name:"Feature Iteration Planning",startDate:"2024-09-07T09:00:00Z",endDate:"2024-09-08T17:00:00Z",parentId:null,sequence:"15",dependencies:[{targetId:"22",type:"FS"}]},{id:"25",name:"Additional Module Development",startDate:"2024-09-09T09:00:00Z",endDate:"2024-09-10T17:00:00Z",parentId:"24",sequence:"15.1",dependencies:[{targetId:"24",type:"FS"}]},{id:"26",name:"Additional Testing",startDate:"2024-09-11T09:00:00Z",endDate:"2024-09-12T17:00:00Z",parentId:"25",sequence:"15.1.1",dependencies:[{targetId:"25",type:"FS"}]},{id:"27",name:"Code Refactoring",startDate:"2024-09-13T09:00:00Z",endDate:"2024-09-14T17:00:00Z",parentId:null,sequence:"16",dependencies:[{targetId:"26",type:"FS"}]},{id:"28",name:"Performance Optimization",startDate:"2024-09-15T09:00:00Z",endDate:"2024-09-16T17:00:00Z",parentId:"27",sequence:"16.1",dependencies:[{targetId:"27",type:"FS"}]},{id:"29",name:"Security Audit",startDate:"2024-09-17T09:00:00Z",endDate:"2024-09-18T17:00:00Z",parentId:null,sequence:"17",dependencies:[{targetId:"28",type:"FS"}]},{id:"30",name:"Final QA",startDate:"2024-09-19T09:00:00Z",endDate:"2024-09-20T17:00:00Z",parentId:null,sequence:"18",dependencies:[{targetId:"29",type:"FS"}]},{id:"31",name:"Launch Webinar",startDate:"2024-09-21T09:00:00Z",endDate:"2024-09-22T17:00:00Z",parentId:null,sequence:"19",dependencies:[{targetId:"21",type:"SS"}]},{id:"32",name:"Marketing Campaign",startDate:"2024-09-23T09:00:00Z",endDate:"2024-09-24T17:00:00Z",parentId:null,sequence:"20",dependencies:[{targetId:"21",type:"SF"}]},{id:"33",name:"Post-release Bug Fixing",startDate:"2024-09-25T09:00:00Z",endDate:"2024-09-26T17:00:00Z",parentId:null,sequence:"21",dependencies:[{targetId:"22",type:"SS"}]},{id:"34",name:"Version 1.1 Planning",startDate:"2024-09-27T09:00:00Z",endDate:"2024-09-28T17:00:00Z",parentId:null,sequence:"22",dependencies:[{targetId:"24",type:"FS"}]},{id:"35",name:"Feature Implementation",startDate:"2024-09-29T09:00:00Z",endDate:"2024-09-30T17:00:00Z",parentId:"34",sequence:"22.1",dependencies:[{targetId:"34",type:"FS"}]},{id:"36",name:"Beta Testing",startDate:"2024-10-01T09:00:00Z",endDate:"2024-10-02T17:00:00Z",parentId:"35",sequence:"22.1.1",dependencies:[{targetId:"35",type:"FS"}]},{id:"37",name:"Community Beta Feedback",startDate:"2024-10-03T09:00:00Z",endDate:"2024-10-04T17:00:00Z",parentId:"36",sequence:"22.1.2",dependencies:[{targetId:"36",type:"FS"}]},{id:"38",name:"Final Beta Fixes",startDate:"2024-10-05T09:00:00Z",endDate:"2024-10-06T17:00:00Z",parentId:"37",sequence:"22.1.3",dependencies:[{targetId:"37",type:"FS"}]},{id:"39",name:"Documentation Update",startDate:"2024-10-07T09:00:00Z",endDate:"2024-10-08T17:00:00Z",parentId:"17",sequence:"8.1.1",dependencies:[{targetId:"17",type:"FS"}]},{id:"40",name:"Final Release Version 1.1",startDate:"2024-10-09T09:00:00Z",endDate:"2024-10-10T17:00:00Z",parentId:null,sequence:"23",dependencies:[{targetId:"38",type:"FS"}]},{id:"41",name:"Project Retrospective",startDate:"2024-10-11T09:00:00Z",endDate:"2024-10-12T17:00:00Z",parentId:null,sequence:"24",dependencies:[{targetId:"40",type:"FS"}]}],rt=n=>Ne.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},Ne.createElement("path",{d:"M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z"}));function pe(n,s){const{basePxPerDragStep:r}=K[s];return Math.round(n/r)}function pn(n,s,r){const{rawTasks:o,selectedScale:i,setRawTasks:e,setDraggingTaskMeta:f,clearDraggingTaskMeta:u}=ve(),[m,h]=C.useState(s),p=C.useRef(s),a=C.useRef(null),c=C.useRef(s),v=C.useRef(n.startDate),g=C.useRef(n.endDate),d=j=>{a.current=j.clientX,c.current=s,v.current=n.startDate,g.current=n.endDate,h(s),p.current=s,f({taskId:n.id,type:"bar"}),document.addEventListener("mousemove",y),document.addEventListener("mouseup",M)},y=j=>{if(a.current===null)return;const O=j.clientX-a.current,k=pe(O,i)*K[i].basePxPerDragStep,T=c.current+k;h(T),p.current=T},M=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",M);const j=p.current-c.current,O=pe(j,i),{dragStepUnit:R,dragStepAmount:k}=K[i],T=o.map(_=>_.id===n.id?{..._,startDate:W(v.current).add(O*k,R).toISOString(),endDate:W(g.current).add(O*k,R).toISOString()}:_);e(T),r==null||r(T),u(),a.current=null};return{onDragStart:d,tempLeft:m}}function hn(n,s,r,o){const{rawTasks:i,selectedScale:e,setRawTasks:f,setDraggingTaskMeta:u,clearDraggingTaskMeta:m}=ve(),[h,p]=C.useState(s),[a,c]=C.useState(r),v=C.useRef(s),g=C.useRef(r),d=C.useRef(null),y=C.useRef(s),M=C.useRef(r),j=C.useRef(n.startDate),O=T=>{T.stopPropagation(),d.current=T.clientX,y.current=s,M.current=r,j.current=n.startDate,p(s),c(r),v.current=s,g.current=r,u({taskId:n.id,type:"left"}),document.addEventListener("mousemove",R),document.addEventListener("mouseup",k)},R=T=>{if(d.current==null)return;const _=T.clientX-d.current,$=pe(_,e)*K[e].basePxPerDragStep,l=y.current+$,I=M.current-$;I<1||(p(l),c(I),v.current=l,g.current=I)},k=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",k);const T=v.current-y.current,_=pe(T,e),{dragStepUnit:B,dragStepAmount:$}=K[e],l=i.map(I=>{if(I.id!==n.id)return I;const G=W(j.current).add(_*$,B);return G.isAfter(W(I.endDate))?I:{...I,startDate:G.toISOString()}});f(l),o==null||o(l),m(),d.current=null};return{onDragStart:O,tempLeft:h,tempWidth:a}}function $n(n,s,r){const{rawTasks:o,selectedScale:i,setRawTasks:e,setDraggingTaskMeta:f,clearDraggingTaskMeta:u}=ve(),[m,h]=C.useState(s),p=C.useRef(s),a=C.useRef(null),c=C.useRef(s),v=C.useRef(n.endDate),g=M=>{M.stopPropagation(),a.current=M.clientX,c.current=s,v.current=n.endDate,h(s),p.current=s,f({taskId:n.id,type:"right"}),document.addEventListener("mousemove",d),document.addEventListener("mouseup",y)},d=M=>{if(a.current===null)return;const j=M.clientX-a.current,R=pe(j,i)*K[i].basePxPerDragStep,k=c.current+R;k<1||(h(k),p.current=k)},y=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",y);const M=p.current-c.current,j=pe(M,i),{dragStepUnit:O,dragStepAmount:R}=K[i],k=o.map(T=>{if(T.id!==n.id)return T;const _=W(v.current).add(j*R,O);return _.isBefore(W(T.startDate))?T:{...T,endDate:_.toISOString()}});e(k),r==null||r(k),u(),a.current=null};return{onDragStart:g,tempWidth:m}}function gn(n,s,r,o,i){if(r<0||i<0)return`M ${s} ${r} h ${(o-s)/2}`;const e=7,f=11,u=25,m=20,h=`M ${s} ${r}`,p=o-s,a=i-r,c=Math.abs(p),v=Math.abs(a),g=i<=r,d=i>=r,y=o>=s,M=o<=s,j=c>m,O=Math.abs(p/2),R=Math.abs(a/2);function k(){function $(){return(y||M)&&d&&!j?"downSmallHorizontal":(y||M)&&g&&!j?"upSmallHorizontal":d&&M?"downLeft":d&&y?"downRight":g&&M?"upLeft":g&&y?"upRight":""}let l=h;switch($()){case"downRight":{l+=` h ${O-e}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${a-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${O-e}`;break}case"upRight":{l+=` h ${O-e}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v -${v-e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${O-e}`;break}case"downLeft":case"downSmallHorizontal":{const G=r+a/2;l+=` h ${f}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${G-r-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h ${p-2*f}`,l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${G-r-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${f}`;break}case"upLeft":case"upSmallHorizontal":{const G=r+a/2;l+=` h ${f}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v -${r-G-e*2}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h ${p-2*f}`,l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v -${r-G-e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${f}`;break}default:return l}return l}function T(){let $=h;return d&&M?($+=` h ${u-f}`,$+=` a ${e} ${e} 0 0 1 ${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 1 -${e} ${e}`,$+=` h ${p-e*2}`):d&&y?($+=` h ${p+u-f}`,$+=` a ${e} ${e} 0 0 1 ${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 1 -${e} ${e}`,$+=` h -${u-f}`):g&&M?($+=` h ${u-f}`,$+=` a ${e} ${e} 0 0 0 ${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 0 -${e} -${e}`,$+=` h ${p-u+f}`):g&&y&&($+=` h ${p+u-f}`,$+=` a ${e} ${e} 0 0 0 ${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 0 -${e} -${e}`,$+=` h -${u-f}`),$}function _(){function $(){return(y||M)&&d&&!j?"downSmallHorizontal":(y||M)&&g&&!j?"upSmallHorizontal":d&&M?"downLeft":d&&y?"downRight":g&&M?"upLeft":g&&y?"upRight":""}let l=h;switch($()){case"downRight":case"downSmallHorizontal":{l+=" h -11",l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${R-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${f*2+p}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${R-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=" h -11";break}case"upRight":case"upSmallHorizontal":{l+=" h -11",l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${-(R-e*2)}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${f*2+p}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v ${-(R-e*2)}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=" h -11";break}case"downLeft":{l+=` h ${-O+e}`,l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${v-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h ${-O+e}`;break}case"upLeft":{l+=` h ${-(O-e)}`,l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${-(v-e*2)}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h ${-O+e}`;break}default:return l}return l}function B(){let $=h;return d&&M?($+=` h ${p-u}`,$+=` a ${e} ${e} 0 0 0 -${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 0 ${e} ${e}`,$+=` h ${u}`):d&&y?($+=" h -25",$+=` a ${e} ${e} 0 0 0 -${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 0 ${e} ${e}`,$+=` h ${p+u}`):g&&M?($+=` h ${p-u}`,$+=` a ${e} ${e} 0 0 1 -${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 1 ${e} -${e}`,$+=` h ${u}`):g&&y&&($+=" h -25",$+=` a ${e} ${e} 0 0 1 -${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 1 ${e} -${e}`,$+=` h ${p+u}`),$}switch(n){case"FS":return k();case"FF":return T();case"SF":return _();case"SS":return B();default:return`${h} L ${o} ${i}`}}function vn({allTasks:n,currentTask:s,onTasksChange:r}){const{onDragStart:o,tempLeft:i}=pn(s,s.barLeft,r),{onDragStart:e,tempLeft:f,tempWidth:u}=hn(s,s.barLeft,s.barWidth,r),{onDragStart:m,tempWidth:h}=$n(s,s.barWidth,r),{draggingTaskMeta:p}=ve(),a=(p==null?void 0:p.taskId)===s.id;let c=!1,v=!1,g=!1;a&&((p==null?void 0:p.type)==="left"?c=!0:(p==null?void 0:p.type)==="right"?v=!0:(p==null?void 0:p.type)==="bar"&&(g=!0));let d=s.barLeft,y=s.barWidth;c?(d=f,y=u):v?y=h:g&&(d=i);const M=()=>A.jsx("button",{type:"button",onMouseDown:e,className:"absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",style:{left:"-1.15rem",width:"2rem",height:"100%"},children:A.jsx(rt,{className:"size-6",style:{fill:"#919294"}})}),j=()=>A.jsx("button",{type:"button",onMouseDown:m,className:"absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",style:{right:"-1.15rem",width:"2rem",height:"100%"},children:A.jsx(rt,{className:"size-6",style:{fill:"#919294"}})}),O=(s.dependencies||[]).map(R=>{const k=n.find(I=>I.id===R.targetId);if(!k)return null;const T=at,_=(k.order-1)*T+T/2,B=(s.order-1)*T+T/2;let $,l;switch(R.type){case"FS":$=k.barLeft+k.barWidth,l=s.barLeft;break;case"SS":$=k.barLeft,l=s.barLeft;break;case"FF":$=k.barLeft+k.barWidth,l=s.barLeft+s.barWidth;break;case"SF":$=k.barLeft,l=s.barLeft+s.barWidth;break;default:return console.warn(`Unknown dependency type: ${R.type}`),null}return{...R,fromX:$,fromY:_,toX:l,toY:B}}).filter(Boolean);return A.jsxs(A.Fragment,{children:[A.jsxs("div",{role:"button",tabIndex:0,className:"relative flex items-center",onMouseDown:o,style:{backgroundColor:"#D6D6D8",marginLeft:`${d}px`,width:`${y}px`,height:"1rem"},children:[M(),j()]}),A.jsxs("svg",{className:"pointer-events-none absolute top-0 left-0 z-10 size-full",children:[A.jsx("defs",{children:A.jsx("marker",{id:"arrowhead",markerWidth:"6",markerHeight:"6",refX:"5.25",refY:"3",orient:"auto",children:A.jsx("polygon",{points:"0 0, 6 3, 0 6",fill:"#000"})})}),O.map((R,k)=>A.jsx("path",{d:gn(R.type,R.fromX,R.fromY,R.toX,R.toY),fill:"none",markerEnd:"url(#arrowhead)",style:{stroke:"#000",strokeWidth:.75}},k))]})]})}function Dn({tasks:n,onTasksChange:s,ganttHeight:r,columnWidth:o}){const[i,e]=C.useState(r||500),[f,u]=C.useState(o||1e3),[m,h]=C.useState(n||[]),p=C.useRef(null),{rawTasks:a,transformedTasks:c,selectedScale:v,setSelectedScale:g,bottomRowCells:d,topHeaderGroups:y,setRawTasks:M,setBottomRowCells:j,setTopHeaderGroups:O,setMinDate:R,setMaxDate:k}=ve();return C.useEffect(()=>{n.length===0?h(mn):h(n)},[n]),C.useEffect(()=>{if(!m.length)return;const T=Object.fromEntries(m.map(_=>[_.id,{startDate:_.startDate,endDate:_.endDate}]));vt(T,v,R,k,j,O)},[m,v]),C.useEffect(()=>{!d.length||!m.length||a.length===0&&M(m)},[d,m]),A.jsx("section",{style:{position:"relative",overflow:"auto",height:`${i}px`,width:`${f}px`,backgroundColor:"#FFF",fontFamily:"sans-serif"},children:A.jsx("div",{className:"size-full",style:{backgroundColor:"#FFF"},children:A.jsxs("section",{className:"relative flex h-full w-full flex-col",children:[A.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"4px 8px",backgroundColor:"#FFF",borderBottom:"1px solid #E6E7E9"},children:A.jsx("select",{style:{backgroundColor:"#FFF",padding:"4px 8px",fontSize:"0.875rem",borderRadius:"6px",border:"1px solid #E6E7E9"},value:v,onChange:T=>{const _=T.target.value;g(_)},children:Object.keys(K).map(T=>A.jsx("option",{value:T,children:K[T].labelUnit},T))})}),A.jsx("div",{ref:p,className:"grow overflow-x-auto",children:A.jsxs("div",{className:"flex min-w-max flex-col",children:[A.jsx(Dt,{topHeaderGroups:y,bottomRowCells:d,selectedScale:v,scrollRef:p}),A.jsx("div",{className:"relative flex",children:A.jsx("div",{className:"flex grow flex-col",children:c.map(T=>A.jsx("div",{className:"flex w-full items-center border-b border-solid",style:{height:`${at}px`,backgroundColor:"#FFF",borderColor:"#E6E7E9"},children:A.jsx(vn,{allTasks:c,currentTask:T,onTasksChange:s})},T.id))})})]})})]})})})}exports.ReactGanttChart=Dn;
31
+ Check the top-level render call using <`+t+">."),b}var O=C,R=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),l=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),E=Symbol.iterator,x=Symbol.for("react.client.reference"),F=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,N=Object.assign,U=Symbol.for("react.client.reference"),z=Array.isArray,Y=0,J,ae,ne,ue,re,V,ee;o.__reactDisabledLog=!0;var se,le,Fe=!1,Le=new(typeof WeakMap=="function"?WeakMap:Map),ot=Symbol.for("react.client.reference"),Ze,Pe={},_e={},Ce={};ge.Fragment=T,ge.jsx=function(t,b,w,q,X){return g(t,b,w,!1,q,X)},ge.jsxs=function(t,b,w,q,X){return g(t,b,w,!0,q,X)}}()),ge}var We;function lt(){return We||(We=1,process.env.NODE_ENV==="production"?Se.exports=ut():Se.exports=ct()),Se.exports}var A=lt();const at=2.375*16,Ue=3,K={day:{labelUnit:"day",tickUnit:"hour",unitPerTick:1,dragStepUnit:"minute",dragStepAmount:15,basePxPerDragStep:16,formatTickLabel:n=>n.format("h A"),formatHeaderLabel:n=>n.format("MMM D")},week:{labelUnit:"week",tickUnit:"day",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:6,basePxPerDragStep:32,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("MMM")},month:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:64,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("MMM YYYY")},year:{labelUnit:"year",tickUnit:"day",unitPerTick:7,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:16,formatTickLabel:n=>n.format("D"),formatHeaderLabel:n=>n.format("YYYY")}};var ye={exports:{}},dt=ye.exports,He;function ft(){return He||(He=1,function(n,s){(function(r,o){n.exports=o()})(dt,function(){var r=1e3,o=6e4,i=36e5,e="millisecond",f="second",u="minute",p="hour",h="day",m="week",a="month",c="quarter",v="year",g="date",d="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var y=["th","st","nd","rd"],D=L%100;return"["+L+(y[(D-20)%10]||y[D]||y[0])+"]"}},O=function(L,y,D){var E=String(L);return!E||E.length>=y?L:""+Array(y+1-E.length).join(D)+L},R={s:O,z:function(L){var y=-L.utcOffset(),D=Math.abs(y),E=Math.floor(D/60),x=D%60;return(y<=0?"+":"-")+O(E,2,"0")+":"+O(x,2,"0")},m:function L(y,D){if(y.date()<D.date())return-L(D,y);var E=12*(D.year()-y.year())+(D.month()-y.month()),x=y.clone().add(E,a),F=D-x<0,Z=y.clone().add(E+(F?-1:1),a);return+(-(E+(D-x)/(F?x-Z:Z-x))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:a,y:v,w:m,d:h,D:g,h:p,m:u,s:f,ms:e,Q:c}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},k="en",T={};T[k]=j;var _="$isDayjsObject",B=function(L){return L instanceof G||!(!L||!L[_])},$=function L(y,D,E){var x;if(!y)return k;if(typeof y=="string"){var F=y.toLowerCase();T[F]&&(x=F),D&&(T[F]=D,x=F);var Z=y.split("-");if(!x&&Z.length>1)return L(Z[0])}else{var N=y.name;T[N]=y,x=N}return!E&&x&&(k=x),x||!E&&k},l=function(L,y){if(B(L))return L.clone();var D=typeof y=="object"?y:{};return D.date=L,D.args=arguments,new G(D)},I=R;I.l=$,I.i=B,I.w=function(L,y){return l(L,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var G=function(){function L(D){this.$L=$(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[_]=!0}var y=L.prototype;return y.parse=function(D){this.$d=function(E){var x=E.date,F=E.utc;if(x===null)return new Date(NaN);if(I.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var Z=x.match(S);if(Z){var N=Z[2]-1||0,U=(Z[7]||"0").substring(0,3);return F?new Date(Date.UTC(Z[1],N,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,U)):new Date(Z[1],N,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,U)}}return new Date(x)}(D),this.init()},y.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},y.$utils=function(){return I},y.isValid=function(){return this.$d.toString()!==d},y.isSame=function(D,E){var x=l(D);return this.startOf(E)<=x&&x<=this.endOf(E)},y.isAfter=function(D,E){return l(D)<this.startOf(E)},y.isBefore=function(D,E){return this.endOf(E)<l(D)},y.$g=function(D,E,x){return I.u(D)?this[E]:this.set(x,D)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(D,E){var x=this,F=!!I.u(E)||E,Z=I.p(D),N=function(re,V){var ee=I.w(x.$u?Date.UTC(x.$y,V,re):new Date(x.$y,V,re),x);return F?ee:ee.endOf(h)},U=function(re,V){return I.w(x.toDate()[re].apply(x.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(V)),x)},z=this.$W,Y=this.$M,J=this.$D,ae="set"+(this.$u?"UTC":"");switch(Z){case v:return F?N(1,0):N(31,11);case a:return F?N(1,Y):N(0,Y+1);case m:var ne=this.$locale().weekStart||0,ue=(z<ne?z+7:z)-ne;return N(F?J-ue:J+(6-ue),Y);case h:case g:return U(ae+"Hours",0);case p:return U(ae+"Minutes",1);case u:return U(ae+"Seconds",2);case f:return U(ae+"Milliseconds",3);default:return this.clone()}},y.endOf=function(D){return this.startOf(D,!1)},y.$set=function(D,E){var x,F=I.p(D),Z="set"+(this.$u?"UTC":""),N=(x={},x[h]=Z+"Date",x[g]=Z+"Date",x[a]=Z+"Month",x[v]=Z+"FullYear",x[p]=Z+"Hours",x[u]=Z+"Minutes",x[f]=Z+"Seconds",x[e]=Z+"Milliseconds",x)[F],U=F===h?this.$D+(E-this.$W):E;if(F===a||F===v){var z=this.clone().set(g,1);z.$d[N](U),z.init(),this.$d=z.set(g,Math.min(this.$D,z.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},y.set=function(D,E){return this.clone().$set(D,E)},y.get=function(D){return this[I.p(D)]()},y.add=function(D,E){var x,F=this;D=Number(D);var Z=I.p(E),N=function(Y){var J=l(F);return I.w(J.date(J.date()+Math.round(Y*D)),F)};if(Z===a)return this.set(a,this.$M+D);if(Z===v)return this.set(v,this.$y+D);if(Z===h)return N(1);if(Z===m)return N(7);var U=(x={},x[u]=o,x[p]=i,x[f]=r,x)[Z]||1,z=this.$d.getTime()+D*U;return I.w(z,this)},y.subtract=function(D,E){return this.add(-1*D,E)},y.format=function(D){var E=this,x=this.$locale();if(!this.isValid())return x.invalidDate||d;var F=D||"YYYY-MM-DDTHH:mm:ssZ",Z=I.z(this),N=this.$H,U=this.$m,z=this.$M,Y=x.weekdays,J=x.months,ae=x.meridiem,ne=function(V,ee,se,le){return V&&(V[ee]||V(E,F))||se[ee].slice(0,le)},ue=function(V){return I.s(N%12||12,V,"0")},re=ae||function(V,ee,se){var le=V<12?"AM":"PM";return se?le.toLowerCase():le};return F.replace(M,function(V,ee){return ee||function(se){switch(se){case"YY":return String(E.$y).slice(-2);case"YYYY":return I.s(E.$y,4,"0");case"M":return z+1;case"MM":return I.s(z+1,2,"0");case"MMM":return ne(x.monthsShort,z,J,3);case"MMMM":return ne(J,z);case"D":return E.$D;case"DD":return I.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ne(x.weekdaysMin,E.$W,Y,2);case"ddd":return ne(x.weekdaysShort,E.$W,Y,3);case"dddd":return Y[E.$W];case"H":return String(N);case"HH":return I.s(N,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(N,U,!0);case"A":return re(N,U,!1);case"m":return String(U);case"mm":return I.s(U,2,"0");case"s":return String(E.$s);case"ss":return I.s(E.$s,2,"0");case"SSS":return I.s(E.$ms,3,"0");case"Z":return Z}return null}(V)||Z.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(D,E,x){var F,Z=this,N=I.p(E),U=l(D),z=(U.utcOffset()-this.utcOffset())*o,Y=this-U,J=function(){return I.m(Z,U)};switch(N){case v:F=J()/12;break;case a:F=J();break;case c:F=J()/3;break;case m:F=(Y-z)/6048e5;break;case h:F=(Y-z)/864e5;break;case p:F=Y/i;break;case u:F=Y/o;break;case f:F=Y/r;break;default:F=Y}return x?F:I.a(F)},y.daysInMonth=function(){return this.endOf(a).$D},y.$locale=function(){return T[this.$L]},y.locale=function(D,E){if(!D)return this.$L;var x=this.clone(),F=$(D,E,!0);return F&&(x.$L=F),x},y.clone=function(){return I.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},L}(),fe=G.prototype;return l.prototype=fe,[["$ms",e],["$s",f],["$m",u],["$H",p],["$W",h],["$M",a],["$y",v],["$D",g]].forEach(function(L){fe[L[1]]=function(y){return this.$g(y,L[0],L[1])}}),l.extend=function(L,y){return L.$i||(L(y,G,l),L.$i=!0),l},l.locale=$,l.isDayjs=B,l.unix=function(L){return l(1e3*L)},l.en=T[k],l.Ls=T,l.p={},l})}(ye)),ye.exports}var pt=ft();const W=te(pt);function mt(n,s,r,o){if(!r.length)return{barMarginLeftAmount:0,barWidthSize:0};const{tickUnit:i,unitPerTick:e}=K[o],f=r.reduce((d,S)=>d+S.widthPx,0),u=r[0].startDate,p=r[r.length-1].startDate,h=W(p).add(e,i).diff(u),m=f/h,a=n.diff(u),c=s.diff(u),v=a*m,g=Math.max(c-a,1)*m;return{barMarginLeftAmount:v,barWidthSize:g}}function ht(n){let s=1/0,r=-1/0;for(const{startDate:o,endDate:i}of Object.values(n)){const e=W(o).valueOf(),f=W(i).valueOf();Number.isNaN(e)||(s=Math.min(s,e)),Number.isNaN(f)||(r=Math.max(r,f))}return{minDate:W(s),maxDate:W(r)}}function $t(n,s,r){const{tickUnit:o,unitPerTick:i}=K[r];return{paddedMinDate:n.subtract(Ue*i,o),paddedMaxDate:s.add(Ue*i,o)}}function gt(n,s,r){const{tickUnit:o,unitPerTick:i,basePxPerDragStep:e,dragStepUnit:f,dragStepAmount:u}=K[r],p=[];let h=n.startOf(o);for(;h.isBefore(s);){const m=W(h).add(i,o).diff(h,f)/u;p.push({startDate:h,widthPx:m*e}),h=h.add(i,o)}return p}function st(n,s){const{labelUnit:r,formatHeaderLabel:o}=K[s],i=[];let e=null,f="",u=0,p=null;return n.forEach((h,m)=>{const a=h.startDate.startOf(r),c=a.valueOf(),v=(o==null?void 0:o(a))??a.format();c===e?u+=h.widthPx:(e!==null&&i.push({label:f,widthPx:u,startDate:p}),e=c,f=v,u=h.widthPx,p=a),m===n.length-1&&i.push({label:f,widthPx:u,startDate:p})}),i}function vt(n,s,r,o,i,e){const{minDate:f,maxDate:u}=ht(n);r(f),o(u);const{paddedMinDate:p,paddedMaxDate:h}=$t(f,u,s),m=gt(p,h,s),a=st(m,s);i(m),e(a)}const Dt=({bottomRowCells:n,selectedScale:s,scrollRef:r})=>{var m;const o=K[s],[i,e]=C.useState(0),f=C.useMemo(()=>st(n,s),[n,s]),u=C.useMemo(()=>{const a=[];for(const c of f){const v=a[a.length-1];v&&v.label===c.label?v.widthPx+=c.widthPx:a.push({...c})}return a},[f]),p=C.useMemo(()=>{let a=0;return u.map(c=>{const v={...c,left:a};return a+=c.widthPx,v})},[u]);C.useEffect(()=>{const a=r.current;if(!a)return;const c=()=>{const v=a.scrollLeft;for(let g=p.length-1;g>=0;g--)if(v>=p[g].left){e(g);break}};return a.addEventListener("scroll",c),c(),()=>a.removeEventListener("scroll",c)},[p]);const h=((m=p[i])==null?void 0:m.label)??"";return A.jsx("div",{className:"sticky top-0 z-30",style:{backgroundColor:"#F0F1F2"},children:A.jsxs("div",{className:"flex min-w-max flex-col",children:[A.jsxs("div",{className:"relative flex h-8",children:[A.jsx("div",{className:"sticky left-0 z-40 flex w-24 shrink-0 items-center justify-center border-b border-solid text-sm font-bold",style:{backgroundColor:"#F0F1F2",borderColor:"#D6D6D8"},children:h}),A.jsx("div",{className:"flex",children:p.map((a,c)=>A.jsx("div",{className:"border-b border-solid py-2 pr-4 text-left text-sm font-bold",style:{width:`${a.widthPx}px`,borderColor:"#D6D6D8",backgroundColor:"#F0F1F2"},children:A.jsx("p",{className:"px-4",children:c===0?"":a.label})},c))})]}),A.jsx("div",{className:"flex",children:n.map((a,c)=>{var g;const v=((g=o.formatTickLabel)==null?void 0:g.call(o,a.startDate))||"";return A.jsx("div",{className:"relative p-1 text-center text-xs",style:{width:`${a.widthPx}px`},children:v},c)})})]})})};var xe={exports:{}},St=xe.exports,ze;function yt(){return ze||(ze=1,function(n,s){(function(r,o){n.exports=o()})(St,function(){return function(r,o,i){o.prototype.isBetween=function(e,f,u,p){var h=i(e),m=i(f),a=(p=p||"()")[0]==="(",c=p[1]===")";return(a?this.isAfter(h,u):!this.isBefore(h,u))&&(c?this.isBefore(m,u):!this.isAfter(m,u))||(a?this.isBefore(h,u):!this.isAfter(h,u))&&(c?this.isAfter(m,u):!this.isBefore(m,u))}}})}(xe)),xe.exports}var xt=yt();const bt=te(xt);var be={exports:{}},wt=be.exports,Ye;function Tt(){return Ye||(Ye=1,function(n,s){(function(r,o){n.exports=o()})(wt,function(){var r="day";return function(o,i,e){var f=function(h){return h.add(4-h.isoWeekday(),r)},u=i.prototype;u.isoWeekYear=function(){return f(this).year()},u.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),r);var m,a,c,v,g=f(this),d=(m=this.isoWeekYear(),a=this.$u,c=(a?e.utc:e)().year(m).startOf("year"),v=4-c.isoWeekday(),c.isoWeekday()>4&&(v+=7),c.add(v,r));return g.diff(d,"week")+1},u.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var p=u.startOf;u.startOf=function(h,m){var a=this.$utils(),c=!!a.u(m)||m;return a.p(h)==="isoweek"?c?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):p.bind(this)(h,m)}}})}(be)),be.exports}var Et=Tt();const kt=te(Et);var we={exports:{}},Mt=we.exports,Be;function Ot(){return Be||(Be=1,function(n,s){(function(r,o){n.exports=o()})(Mt,function(){return function(r,o){o.prototype.isSameOrAfter=function(i,e){return this.isSame(i,e)||this.isAfter(i,e)}}})}(we)),we.exports}var It=Ot();const Rt=te(It);var Te={exports:{}},Ft=Te.exports,Ge;function Lt(){return Ge||(Ge=1,function(n,s){(function(r,o){n.exports=o()})(Ft,function(){return function(r,o){o.prototype.isSameOrBefore=function(i,e){return this.isSame(i,e)||this.isBefore(i,e)}}})}(Te)),Te.exports}var jt=Lt();const Zt=te(jt);var Ee={exports:{}},Pt=Ee.exports,Ve;function _t(){return Ve||(Ve=1,function(n,s){(function(r,o){n.exports=o()})(Pt,function(){return function(r,o,i){o.prototype.isToday=function(){var e="YYYY-MM-DD",f=i();return this.format(e)===f.format(e)}}})}(Ee)),Ee.exports}var Ct=_t();const Nt=te(Ct);var ke={exports:{}},At=ke.exports,Xe;function qt(){return Xe||(Xe=1,function(n,s){(function(r,o){n.exports=o()})(At,function(){return function(r,o,i){var e=o.prototype,f=function(a){return a&&(a.indexOf?a:a.s)},u=function(a,c,v,g,d){var S=a.name?a:a.$locale(),M=f(S[c]),j=f(S[v]),O=M||j.map(function(k){return k.slice(0,g)});if(!d)return O;var R=S.weekStart;return O.map(function(k,T){return O[(T+(R||0))%7]})},p=function(){return i.Ls[i.locale()]},h=function(a,c){return a.formats[c]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,d,S){return d||S.slice(1)})}(a.formats[c.toUpperCase()])},m=function(){var a=this;return{months:function(c){return c?c.format("MMMM"):u(a,"months")},monthsShort:function(c){return c?c.format("MMM"):u(a,"monthsShort","months",3)},firstDayOfWeek:function(){return a.$locale().weekStart||0},weekdays:function(c){return c?c.format("dddd"):u(a,"weekdays")},weekdaysMin:function(c){return c?c.format("dd"):u(a,"weekdaysMin","weekdays",2)},weekdaysShort:function(c){return c?c.format("ddd"):u(a,"weekdaysShort","weekdays",3)},longDateFormat:function(c){return h(a.$locale(),c)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};e.localeData=function(){return m.bind(this)()},i.localeData=function(){var a=p();return{firstDayOfWeek:function(){return a.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(c){return h(a,c)},meridiem:a.meridiem,ordinal:a.ordinal}},i.months=function(){return u(p(),"months")},i.monthsShort=function(){return u(p(),"monthsShort","months",3)},i.weekdays=function(a){return u(p(),"weekdays",null,null,a)},i.weekdaysShort=function(a){return u(p(),"weekdaysShort","weekdays",3,a)},i.weekdaysMin=function(a){return u(p(),"weekdaysMin","weekdays",2,a)}}})}(ke)),ke.exports}var Wt=qt();const Ut=te(Wt);var Me={exports:{}},Ht=Me.exports,Je;function zt(){return Je||(Je=1,function(n,s){(function(r,o){n.exports=o()})(Ht,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},o={};return function(i,e,f){var u,p=function(c,v,g){g===void 0&&(g={});var d=new Date(c),S=function(M,j){j===void 0&&(j={});var O=j.timeZoneName||"short",R=M+"|"+O,k=o[R];return k||(k=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:M,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:O}),o[R]=k),k}(v,g);return S.formatToParts(d)},h=function(c,v){for(var g=p(c,v),d=[],S=0;S<g.length;S+=1){var M=g[S],j=M.type,O=M.value,R=r[j];R>=0&&(d[R]=parseInt(O,10))}var k=d[3],T=k===24?0:k,_=d[0]+"-"+d[1]+"-"+d[2]+" "+T+":"+d[4]+":"+d[5]+":000",B=+c;return(f.utc(_).valueOf()-(B-=B%1e3))/6e4},m=e.prototype;m.tz=function(c,v){c===void 0&&(c=u);var g,d=this.utcOffset(),S=this.toDate(),M=S.toLocaleString("en-US",{timeZone:c}),j=Math.round((S-new Date(M))/1e3/60),O=15*-Math.round(S.getTimezoneOffset()/15)-j;if(!Number(O))g=this.utcOffset(0,v);else if(g=f(M,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(O,!0),v){var R=g.utcOffset();g=g.add(d-R,"minute")}return g.$x.$timezone=c,g},m.offsetName=function(c){var v=this.$x.$timezone||f.tz.guess(),g=p(this.valueOf(),v,{timeZoneName:c}).find(function(d){return d.type.toLowerCase()==="timezonename"});return g&&g.value};var a=m.startOf;m.startOf=function(c,v){if(!this.$x||!this.$x.$timezone)return a.call(this,c,v);var g=f(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return a.call(g,c,v).tz(this.$x.$timezone,!0)},f.tz=function(c,v,g){var d=g&&v,S=g||v||u,M=h(+f(),S);if(typeof c!="string")return f(c).tz(S);var j=function(T,_,B){var $=T-60*_*1e3,l=h($,B);if(_===l)return[$,_];var I=h($-=60*(l-_)*1e3,B);return l===I?[$,l]:[T-60*Math.min(l,I)*1e3,Math.max(l,I)]}(f.utc(c,d).valueOf(),M,S),O=j[0],R=j[1],k=f(O).utcOffset(R);return k.$x.$timezone=S,k},f.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},f.tz.setDefault=function(c){u=c}}})}(Me)),Me.exports}var Yt=zt();const Bt=te(Yt);var Oe={exports:{}},Gt=Oe.exports,Qe;function Vt(){return Qe||(Qe=1,function(n,s){(function(r,o){n.exports=o()})(Gt,function(){return function(r,o,i){i.updateLocale=function(e,f){var u=i.Ls[e];if(u)return(f?Object.keys(f):[]).forEach(function(p){u[p]=f[p]}),u}}})}(Oe)),Oe.exports}var Xt=Vt();const Jt=te(Xt);var Ie={exports:{}},Qt=Ie.exports,Ke;function Kt(){return Ke||(Ke=1,function(n,s){(function(r,o){n.exports=o()})(Qt,function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(e,f,u){var p=f.prototype;u.utc=function(d){var S={date:d,utc:!0,args:arguments};return new f(S)},p.utc=function(d){var S=u(this.toDate(),{locale:this.$L,utc:!0});return d?S.add(this.utcOffset(),r):S},p.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=p.parse;p.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),h.call(this,d)};var m=p.init;p.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else m.call(this)};var a=p.utcOffset;p.utcOffset=function(d,S){var M=this.$utils().u;if(M(d))return this.$u?0:M(this.$offset)?a.call(this):this.$offset;if(typeof d=="string"&&(d=function(k){k===void 0&&(k="");var T=k.match(o);if(!T)return null;var _=(""+T[0]).match(i)||["-",0,0],B=_[0],$=60*+_[1]+ +_[2];return $===0?0:B==="+"?$:-$}(d),d===null))return this;var j=Math.abs(d)<=16?60*d:d,O=this;if(S)return O.$offset=j,O.$u=d===0,O;if(d!==0){var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(O=this.local().add(j+R,r)).$offset=j,O.$x.$localOffset=R}else O=this.utc();return O};var c=p.format;p.format=function(d){var S=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,S)},p.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},p.isUTC=function(){return!!this.$u},p.toISOString=function(){return this.toDate().toISOString()},p.toString=function(){return this.toDate().toUTCString()};var v=p.toDate;p.toDate=function(d){return d==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var g=p.diff;p.diff=function(d,S,M){if(d&&this.$u===d.$u)return g.call(this,d,S,M);var j=this.local(),O=u(d).local();return g.call(j,O,S,M)}}})}(Ie)),Ie.exports}var en=Kt();const tn=te(en);var Re={exports:{}},nn=Re.exports,et;function rn(){return et||(et=1,function(n,s){(function(r,o){n.exports=o()})(nn,function(){return function(r,o){o.prototype.weekday=function(i){var e=this.$locale().weekStart||0,f=this.$W,u=(f<e?f+7:f)-e;return this.$utils().u(i)?u:this.subtract(u,"day").add(i,"day")}}})}(Re)),Re.exports}var an=rn();const sn=te(an);W.extend(sn);W.extend(Nt);W.extend(tn);W.extend(Bt);W.extend(Rt);W.extend(Zt);W.extend(bt);W.extend(Ut);W.extend(Jt);W.extend(kt);function on(n){return[...n].sort((s,r)=>{const o=s.sequence.split(".").map(Number),i=r.sequence.split(".").map(Number);for(let e=0;e<Math.max(o.length,i.length);e++){const f=o[e]||0,u=i[e]||0;if(f!==u)return f-u}return 0})}function un(n){return n.split(".").length-1}function je(n,s,r){const o=on(n);let i=0;return o.map(e=>{i++;const f=un(e.sequence),{barMarginLeftAmount:u,barWidthSize:p}=mt(W(e.startDate),W(e.endDate),s,r);return{...e,barLeft:u,barWidth:p,depth:f,order:i,originalOrder:i}})}const tt=n=>{let s;const r=new Set,o=(h,m)=>{const a=typeof h=="function"?h(s):h;if(!Object.is(a,s)){const c=s;s=m??(typeof a!="object"||a===null)?a:Object.assign({},s,a),r.forEach(v=>v(s,c))}},i=()=>s,u={setState:o,getState:i,getInitialState:()=>p,subscribe:h=>(r.add(h),()=>r.delete(h))},p=s=n(o,i,u);return u},cn=n=>n?tt(n):tt,ln=n=>n;function dn(n,s=ln){const r=C.useSyncExternalStore(n.subscribe,()=>s(n.getState()),()=>s(n.getInitialState()));return C.useDebugValue(r),r}const nt=n=>{const s=cn(n),r=o=>dn(s,o);return Object.assign(r,s),r},fn=n=>n?nt(n):nt,ve=fn((n,s)=>({rawTasks:[],transformedTasks:[],bottomRowCells:[],topHeaderGroups:[],selectedScale:"month",minDate:W(),maxDate:W(),draggingTaskMeta:null,setSelectedScale:r=>{const{rawTasks:o,bottomRowCells:i}=s(),e=je(o,i,r);n({selectedScale:r,transformedTasks:e})},setRawTasks:r=>{const{bottomRowCells:o,selectedScale:i}=s(),e=je(r,o,i);n({rawTasks:r,transformedTasks:e})},setBottomRowCells:r=>{const{rawTasks:o,selectedScale:i}=s(),e=je(o,r,i);n({bottomRowCells:r,transformedTasks:e})},setTopHeaderGroups:r=>n({topHeaderGroups:r}),setMinDate:r=>n({minDate:r}),setMaxDate:r=>n({maxDate:r}),setDraggingTaskMeta:r=>n({draggingTaskMeta:r}),clearDraggingTaskMeta:()=>n({draggingTaskMeta:null})})),pn=[{id:"1",name:"Project Kickoff",startDate:"2024-06-01T09:00:00Z",endDate:"2024-06-01T11:00:00Z",parentId:null,sequence:"1",dependencies:[]},{id:"2",name:"Requirement Gathering",startDate:"2024-06-02T09:00:00Z",endDate:"2024-06-05T17:00:00Z",parentId:null,sequence:"2",dependencies:[{targetId:"1",type:"FS"}]},{id:"3",name:"Stakeholder Interviews",startDate:"2024-06-02T10:00:00Z",endDate:"2024-06-03T17:00:00Z",parentId:"2",sequence:"2.1",dependencies:[{targetId:"1",type:"SF"}]},{id:"4",name:"Market Analysis",startDate:"2024-06-06T09:00:00Z",endDate:"2024-06-07T17:00:00Z",parentId:null,sequence:"3",dependencies:[{targetId:"2",type:"FS"}]},{id:"5",name:"Design System Creation",startDate:"2024-06-08T09:00:00Z",endDate:"2024-06-12T17:00:00Z",parentId:null,sequence:"4",dependencies:[{targetId:"2",type:"FS"},{targetId:"3",type:"SS"}]},{id:"6",name:"UI/UX Design",startDate:"2024-06-13T09:00:00Z",endDate:"2024-06-16T17:00:00Z",parentId:"5",sequence:"4.1",dependencies:[{targetId:"5",type:"FS"}]},{id:"7",name:"Prototyping",startDate:"2024-06-17T09:00:00Z",endDate:"2024-06-20T17:00:00Z",parentId:"6",sequence:"4.1.1",dependencies:[{targetId:"6",type:"FS"}]},{id:"8",name:"Frontend Development",startDate:"2024-06-21T09:00:00Z",endDate:"2024-06-30T17:00:00Z",parentId:null,sequence:"5",dependencies:[{targetId:"7",type:"FS"}]},{id:"9",name:"Backend Development",startDate:"2024-07-01T09:00:00Z",endDate:"2024-07-10T17:00:00Z",parentId:null,sequence:"6",dependencies:[{targetId:"7",type:"FS"}]},{id:"10",name:"API Integration",startDate:"2024-07-11T09:00:00Z",endDate:"2024-07-15T17:00:00Z",parentId:"9",sequence:"6.1",dependencies:[{targetId:"9",type:"FS"}]},{id:"11",name:"Module Development",startDate:"2024-07-16T09:00:00Z",endDate:"2024-07-20T17:00:00Z",parentId:"8",sequence:"5.1",dependencies:[{targetId:"8",type:"FS"}]},{id:"12",name:"Unit Testing",startDate:"2024-07-21T09:00:00Z",endDate:"2024-07-25T17:00:00Z",parentId:"8",sequence:"5.2",dependencies:[{targetId:"8",type:"FS"}]},{id:"13",name:"Integration Testing",startDate:"2024-07-26T09:00:00Z",endDate:"2024-07-30T17:00:00Z",parentId:"10",sequence:"6.1.1",dependencies:[{targetId:"10",type:"FS"}]},{id:"14",name:"Code Review",startDate:"2024-07-31T09:00:00Z",endDate:"2024-08-04T17:00:00Z",parentId:"10",sequence:"6.1.2",dependencies:[{targetId:"13",type:"FS"}]},{id:"15",name:"Community Feedback",startDate:"2024-08-05T09:00:00Z",endDate:"2024-08-08T17:00:00Z",parentId:null,sequence:"7",dependencies:[{targetId:"14",type:"FS"}]},{id:"16",name:"Documentation Drafting",startDate:"2024-08-09T09:00:00Z",endDate:"2024-08-12T17:00:00Z",parentId:null,sequence:"8",dependencies:[{targetId:"14",type:"FS"}]},{id:"17",name:"Documentation Finalization",startDate:"2024-08-13T09:00:00Z",endDate:"2024-08-16T17:00:00Z",parentId:"16",sequence:"8.1",dependencies:[{targetId:"16",type:"FS"}]},{id:"18",name:"Pre-release Demo",startDate:"2024-08-17T09:00:00Z",endDate:"2024-08-20T17:00:00Z",parentId:null,sequence:"9",dependencies:[{targetId:"15",type:"FS"}]},{id:"19",name:"Bug Fixing",startDate:"2024-08-21T09:00:00Z",endDate:"2024-08-25T17:00:00Z",parentId:null,sequence:"10",dependencies:[{targetId:"15",type:"FS"}]},{id:"20",name:"Release Candidate",startDate:"2024-08-26T09:00:00Z",endDate:"2024-08-30T17:00:00Z",parentId:null,sequence:"11",dependencies:[{targetId:"18",type:"FS"}]},{id:"21",name:"Final Release",startDate:"2024-08-31T09:00:00Z",endDate:"2024-09-02T17:00:00Z",parentId:null,sequence:"12",dependencies:[{targetId:"20",type:"FS"}]},{id:"22",name:"Post-release Monitoring",startDate:"2024-09-03T09:00:00Z",endDate:"2024-09-04T17:00:00Z",parentId:null,sequence:"13",dependencies:[{targetId:"21",type:"FS"}]},{id:"23",name:"Community Engagement",startDate:"2024-09-05T09:00:00Z",endDate:"2024-09-06T17:00:00Z",parentId:null,sequence:"14",dependencies:[{targetId:"21",type:"FS"}]},{id:"24",name:"Feature Iteration Planning",startDate:"2024-09-07T09:00:00Z",endDate:"2024-09-08T17:00:00Z",parentId:null,sequence:"15",dependencies:[{targetId:"22",type:"FS"}]},{id:"25",name:"Additional Module Development",startDate:"2024-09-09T09:00:00Z",endDate:"2024-09-10T17:00:00Z",parentId:"24",sequence:"15.1",dependencies:[{targetId:"24",type:"FS"}]},{id:"26",name:"Additional Testing",startDate:"2024-09-11T09:00:00Z",endDate:"2024-09-12T17:00:00Z",parentId:"25",sequence:"15.1.1",dependencies:[{targetId:"25",type:"FS"}]},{id:"27",name:"Code Refactoring",startDate:"2024-09-13T09:00:00Z",endDate:"2024-09-14T17:00:00Z",parentId:null,sequence:"16",dependencies:[{targetId:"26",type:"FS"}]},{id:"28",name:"Performance Optimization",startDate:"2024-09-15T09:00:00Z",endDate:"2024-09-16T17:00:00Z",parentId:"27",sequence:"16.1",dependencies:[{targetId:"27",type:"FS"}]},{id:"29",name:"Security Audit",startDate:"2024-09-17T09:00:00Z",endDate:"2024-09-18T17:00:00Z",parentId:null,sequence:"17",dependencies:[{targetId:"28",type:"FS"}]},{id:"30",name:"Final QA",startDate:"2024-09-19T09:00:00Z",endDate:"2024-09-20T17:00:00Z",parentId:null,sequence:"18",dependencies:[{targetId:"29",type:"FS"}]},{id:"31",name:"Launch Webinar",startDate:"2024-09-21T09:00:00Z",endDate:"2024-09-22T17:00:00Z",parentId:null,sequence:"19",dependencies:[{targetId:"21",type:"SS"}]},{id:"32",name:"Marketing Campaign",startDate:"2024-09-23T09:00:00Z",endDate:"2024-09-24T17:00:00Z",parentId:null,sequence:"20",dependencies:[{targetId:"21",type:"SF"}]},{id:"33",name:"Post-release Bug Fixing",startDate:"2024-09-25T09:00:00Z",endDate:"2024-09-26T17:00:00Z",parentId:null,sequence:"21",dependencies:[{targetId:"22",type:"SS"}]},{id:"34",name:"Version 1.1 Planning",startDate:"2024-09-27T09:00:00Z",endDate:"2024-09-28T17:00:00Z",parentId:null,sequence:"22",dependencies:[{targetId:"24",type:"FS"}]},{id:"35",name:"Feature Implementation",startDate:"2024-09-29T09:00:00Z",endDate:"2024-09-30T17:00:00Z",parentId:"34",sequence:"22.1",dependencies:[{targetId:"34",type:"FS"}]},{id:"36",name:"Beta Testing",startDate:"2024-10-01T09:00:00Z",endDate:"2024-10-02T17:00:00Z",parentId:"35",sequence:"22.1.1",dependencies:[{targetId:"35",type:"FS"}]},{id:"37",name:"Community Beta Feedback",startDate:"2024-10-03T09:00:00Z",endDate:"2024-10-04T17:00:00Z",parentId:"36",sequence:"22.1.2",dependencies:[{targetId:"36",type:"FS"}]},{id:"38",name:"Final Beta Fixes",startDate:"2024-10-05T09:00:00Z",endDate:"2024-10-06T17:00:00Z",parentId:"37",sequence:"22.1.3",dependencies:[{targetId:"37",type:"FS"}]},{id:"39",name:"Documentation Update",startDate:"2024-10-07T09:00:00Z",endDate:"2024-10-08T17:00:00Z",parentId:"17",sequence:"8.1.1",dependencies:[{targetId:"17",type:"FS"}]},{id:"40",name:"Final Release Version 1.1",startDate:"2024-10-09T09:00:00Z",endDate:"2024-10-10T17:00:00Z",parentId:null,sequence:"23",dependencies:[{targetId:"38",type:"FS"}]},{id:"41",name:"Project Retrospective",startDate:"2024-10-11T09:00:00Z",endDate:"2024-10-12T17:00:00Z",parentId:null,sequence:"24",dependencies:[{targetId:"40",type:"FS"}]}],rt=n=>Ne.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},Ne.createElement("path",{d:"M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z"}));function me(n,s){const{basePxPerDragStep:r}=K[s];return Math.round(n/r)}function mn(n,s,r){const{rawTasks:o,selectedScale:i,setRawTasks:e,setDraggingTaskMeta:f,clearDraggingTaskMeta:u}=ve(),[p,h]=C.useState(s),m=C.useRef(s),a=C.useRef(null),c=C.useRef(s),v=C.useRef(n.startDate),g=C.useRef(n.endDate),d=j=>{a.current=j.clientX,c.current=s,v.current=n.startDate,g.current=n.endDate,h(s),m.current=s,f({taskId:n.id,type:"bar"}),document.addEventListener("mousemove",S),document.addEventListener("mouseup",M)},S=j=>{if(a.current===null)return;const O=j.clientX-a.current,k=me(O,i)*K[i].basePxPerDragStep,T=c.current+k;h(T),m.current=T},M=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",M);const j=m.current-c.current,O=me(j,i),{dragStepUnit:R,dragStepAmount:k}=K[i],T=o.map(_=>_.id===n.id?{..._,startDate:W(v.current).add(O*k,R).toISOString(),endDate:W(g.current).add(O*k,R).toISOString()}:_);e(T),r==null||r(T),u(),a.current=null};return{onDragStart:d,tempLeft:p}}function hn(n,s,r,o){const{rawTasks:i,selectedScale:e,setRawTasks:f,setDraggingTaskMeta:u,clearDraggingTaskMeta:p}=ve(),[h,m]=C.useState(s),[a,c]=C.useState(r),v=C.useRef(s),g=C.useRef(r),d=C.useRef(null),S=C.useRef(s),M=C.useRef(r),j=C.useRef(n.startDate),O=T=>{T.stopPropagation(),d.current=T.clientX,S.current=s,M.current=r,j.current=n.startDate,m(s),c(r),v.current=s,g.current=r,u({taskId:n.id,type:"left"}),document.addEventListener("mousemove",R),document.addEventListener("mouseup",k)},R=T=>{if(d.current==null)return;const _=T.clientX-d.current,$=me(_,e)*K[e].basePxPerDragStep,l=S.current+$,I=M.current-$;I<1||(m(l),c(I),v.current=l,g.current=I)},k=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",k);const T=v.current-S.current,_=me(T,e),{dragStepUnit:B,dragStepAmount:$}=K[e],l=i.map(I=>{if(I.id!==n.id)return I;const G=W(j.current).add(_*$,B);return G.isAfter(W(I.endDate))?I:{...I,startDate:G.toISOString()}});f(l),o==null||o(l),p(),d.current=null};return{onDragStart:O,tempLeft:h,tempWidth:a}}function $n(n,s,r){const{rawTasks:o,selectedScale:i,setRawTasks:e,setDraggingTaskMeta:f,clearDraggingTaskMeta:u}=ve(),[p,h]=C.useState(s),m=C.useRef(s),a=C.useRef(null),c=C.useRef(s),v=C.useRef(n.endDate),g=M=>{M.stopPropagation(),a.current=M.clientX,c.current=s,v.current=n.endDate,h(s),m.current=s,f({taskId:n.id,type:"right"}),document.addEventListener("mousemove",d),document.addEventListener("mouseup",S)},d=M=>{if(a.current===null)return;const j=M.clientX-a.current,R=me(j,i)*K[i].basePxPerDragStep,k=c.current+R;k<1||(h(k),m.current=k)},S=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",S);const M=m.current-c.current,j=me(M,i),{dragStepUnit:O,dragStepAmount:R}=K[i],k=o.map(T=>{if(T.id!==n.id)return T;const _=W(v.current).add(j*R,O);return _.isBefore(W(T.startDate))?T:{...T,endDate:_.toISOString()}});e(k),r==null||r(k),u(),a.current=null};return{onDragStart:g,tempWidth:p}}function gn(n,s,r,o,i){if(r<0||i<0)return`M ${s} ${r} h ${(o-s)/2}`;const e=7,f=11,u=25,p=20,h=`M ${s} ${r}`,m=o-s,a=i-r,c=Math.abs(m),v=Math.abs(a),g=i<=r,d=i>=r,S=o>=s,M=o<=s,j=c>p,O=Math.abs(m/2),R=Math.abs(a/2);function k(){function $(){return(S||M)&&d&&!j?"downSmallHorizontal":(S||M)&&g&&!j?"upSmallHorizontal":d&&M?"downLeft":d&&S?"downRight":g&&M?"upLeft":g&&S?"upRight":""}let l=h;switch($()){case"downRight":{l+=` h ${O-e}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${a-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${O-e}`;break}case"upRight":{l+=` h ${O-e}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v -${v-e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${O-e}`;break}case"downLeft":case"downSmallHorizontal":{const G=r+a/2;l+=` h ${f}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${G-r-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h ${m-2*f}`,l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${G-r-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${f}`;break}case"upLeft":case"upSmallHorizontal":{const G=r+a/2;l+=` h ${f}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v -${r-G-e*2}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h ${m-2*f}`,l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v -${r-G-e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${f}`;break}default:return l}return l}function T(){let $=h;return d&&M?($+=` h ${u-f}`,$+=` a ${e} ${e} 0 0 1 ${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 1 -${e} ${e}`,$+=` h ${m-e*2}`):d&&S?($+=` h ${m+u-f}`,$+=` a ${e} ${e} 0 0 1 ${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 1 -${e} ${e}`,$+=` h -${u-f}`):g&&M?($+=` h ${u-f}`,$+=` a ${e} ${e} 0 0 0 ${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 0 -${e} -${e}`,$+=` h ${m-u+f}`):g&&S&&($+=` h ${m+u-f}`,$+=` a ${e} ${e} 0 0 0 ${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 0 -${e} -${e}`,$+=` h -${u-f}`),$}function _(){function $(){return(S||M)&&d&&!j?"downSmallHorizontal":(S||M)&&g&&!j?"upSmallHorizontal":d&&M?"downLeft":d&&S?"downRight":g&&M?"upLeft":g&&S?"upRight":""}let l=h;switch($()){case"downRight":case"downSmallHorizontal":{l+=" h -11",l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${R-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${f*2+m}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${R-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=" h -11";break}case"upRight":case"upSmallHorizontal":{l+=" h -11",l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${-(R-e*2)}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${f*2+m}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v ${-(R-e*2)}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=" h -11";break}case"downLeft":{l+=` h ${-O+e}`,l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${v-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h ${-O+e}`;break}case"upLeft":{l+=` h ${-(O-e)}`,l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${-(v-e*2)}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h ${-O+e}`;break}default:return l}return l}function B(){let $=h;return d&&M?($+=` h ${m-u}`,$+=` a ${e} ${e} 0 0 0 -${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 0 ${e} ${e}`,$+=` h ${u}`):d&&S?($+=" h -25",$+=` a ${e} ${e} 0 0 0 -${e} ${e}`,$+=` v ${a-e*2}`,$+=` a ${e} ${e} 0 0 0 ${e} ${e}`,$+=` h ${m+u}`):g&&M?($+=` h ${m-u}`,$+=` a ${e} ${e} 0 0 1 -${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 1 ${e} -${e}`,$+=` h ${u}`):g&&S&&($+=" h -25",$+=` a ${e} ${e} 0 0 1 -${e} -${e}`,$+=` v ${a+e*2}`,$+=` a ${e} ${e} 0 0 1 ${e} -${e}`,$+=` h ${m+u}`),$}switch(n){case"FS":return k();case"FF":return T();case"SF":return _();case"SS":return B();default:return`${h} L ${o} ${i}`}}function vn({allTasks:n,currentTask:s,onTasksChange:r}){const{onDragStart:o,tempLeft:i}=mn(s,s.barLeft,r),{onDragStart:e,tempLeft:f,tempWidth:u}=hn(s,s.barLeft,s.barWidth,r),{onDragStart:p,tempWidth:h}=$n(s,s.barWidth,r),{draggingTaskMeta:m}=ve(),a=(m==null?void 0:m.taskId)===s.id;let c=!1,v=!1,g=!1;a&&((m==null?void 0:m.type)==="left"?c=!0:(m==null?void 0:m.type)==="right"?v=!0:(m==null?void 0:m.type)==="bar"&&(g=!0));let d=s.barLeft,S=s.barWidth;c?(d=f,S=u):v?S=h:g&&(d=i);const M=()=>A.jsx("button",{type:"button",onMouseDown:e,className:"absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",style:{left:"-1.15rem",width:"2rem",height:"100%"},children:A.jsx(rt,{className:"size-6",style:{fill:"#919294"}})}),j=()=>A.jsx("button",{type:"button",onMouseDown:p,className:"absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",style:{right:"-1.15rem",width:"2rem",height:"100%"},children:A.jsx(rt,{className:"size-6",style:{fill:"#919294"}})}),O=(s.dependencies||[]).map(R=>{const k=n.find(I=>I.id===R.targetId);if(!k)return null;const T=at,_=(k.order-1)*T+T/2,B=(s.order-1)*T+T/2;let $,l;switch(R.type){case"FS":$=k.barLeft+k.barWidth,l=s.barLeft;break;case"SS":$=k.barLeft,l=s.barLeft;break;case"FF":$=k.barLeft+k.barWidth,l=s.barLeft+s.barWidth;break;case"SF":$=k.barLeft,l=s.barLeft+s.barWidth;break;default:return console.warn(`Unknown dependency type: ${R.type}`),null}return{...R,fromX:$,fromY:_,toX:l,toY:B}}).filter(Boolean);return A.jsxs(A.Fragment,{children:[A.jsxs("div",{role:"button",tabIndex:0,className:"relative flex items-center",onMouseDown:o,style:{backgroundColor:"#D6D6D8",marginLeft:`${d}px`,width:`${S}px`,height:"1rem"},children:[M(),j()]}),A.jsxs("svg",{className:"pointer-events-none absolute top-0 left-0 z-10 size-full",children:[A.jsx("defs",{children:A.jsx("marker",{id:"arrowhead",markerWidth:"6",markerHeight:"6",refX:"5.25",refY:"3",orient:"auto",children:A.jsx("polygon",{points:"0 0, 6 3, 0 6",fill:"#000"})})}),O.map((R,k)=>A.jsx("path",{d:gn(R.type,R.fromX,R.fromY,R.toX,R.toY),fill:"none",markerEnd:"url(#arrowhead)",style:{stroke:"#000",strokeWidth:.75}},k))]})]})}function Dn({tasks:n,onTasksChange:s,ganttHeight:r,columnWidth:o}){const[i,e]=C.useState(r||500),[f,u]=C.useState(o||1e3),[p,h]=C.useState(n||[]),m=C.useRef(null),{rawTasks:a,transformedTasks:c,selectedScale:v,setSelectedScale:g,bottomRowCells:d,topHeaderGroups:S,setRawTasks:M,setBottomRowCells:j,setTopHeaderGroups:O,setMinDate:R,setMaxDate:k}=ve();return C.useEffect(()=>{n.length===0?h(pn):h(n)},[n]),C.useEffect(()=>{if(!p.length)return;const T=Object.fromEntries(p.map(_=>[_.id,{startDate:_.startDate,endDate:_.endDate}]));vt(T,v,R,k,j,O)},[p,v]),C.useEffect(()=>{!d.length||!p.length||a.length===0&&M(p)},[d,p]),A.jsx("section",{style:{position:"relative",overflow:"auto",height:`${i}px`,width:`${f}px`,backgroundColor:"#FFF"},children:A.jsx("div",{className:"h-full w-full overflow-hidden",style:{backgroundColor:"#FFF"},children:A.jsxs("section",{className:"relative flex h-full w-full flex-col",children:[A.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"4px 8px",backgroundColor:"#FFF",borderBottom:"1px solid #E6E7E9"},children:A.jsx("select",{style:{backgroundColor:"#FFF",padding:"4px 8px",fontSize:"0.875rem",borderRadius:"6px",border:"1px solid #E6E7E9"},value:v,onChange:T=>{const _=T.target.value;g(_)},children:Object.keys(K).map(T=>A.jsx("option",{value:T,children:K[T].labelUnit},T))})}),A.jsx("div",{ref:m,className:"grow overflow-x-auto",children:A.jsxs("div",{className:"flex min-w-max flex-col",children:[A.jsx(Dt,{topHeaderGroups:S,bottomRowCells:d,selectedScale:v,scrollRef:m}),A.jsx("div",{className:"relative flex",children:A.jsx("div",{className:"flex grow flex-col",children:c.map(T=>A.jsx("div",{className:"flex w-full items-center border-b border-solid",style:{height:`${at}px`,backgroundColor:"#FFF",borderColor:"#E6E7E9"},children:A.jsx(vn,{allTasks:c,currentTask:T,onTasksChange:s})},T.id))})})]})})]})})})}exports.ReactGanttChart=Dn;
package/dist/index.es.js CHANGED
@@ -64,7 +64,7 @@ function ft() {
64
64
  return "StrictMode";
65
65
  case B:
66
66
  return "Suspense";
67
- case me:
67
+ case he:
68
68
  return "SuspenseList";
69
69
  }
70
70
  if (typeof t == "object")
@@ -221,10 +221,10 @@ function ft() {
221
221
  "name",
222
222
  { value: "DetermineComponentFrameRoot" }
223
223
  );
224
- var _ = V.DetermineComponentFrameRoot(), oe = _[0], he = _[1];
225
- if (oe && he) {
224
+ var _ = V.DetermineComponentFrameRoot(), oe = _[0], me = _[1];
225
+ if (oe && me) {
226
226
  var Q = oe.split(`
227
- `), fe = he.split(`
227
+ `), fe = me.split(`
228
228
  `);
229
229
  for (_ = U = 0; U < Q.length && !Q[U].includes(
230
230
  "DetermineComponentFrameRoot"
@@ -258,7 +258,7 @@ function ft() {
258
258
  }
259
259
  return Q = (Q = t ? t.displayName || t.name : "") ? f(Q) : "", typeof t == "function" && Ze.set(t, Q), Q;
260
260
  }
261
- function m(t) {
261
+ function h(t) {
262
262
  if (t == null) return "";
263
263
  if (typeof t == "function") {
264
264
  var b = t.prototype;
@@ -271,7 +271,7 @@ function ft() {
271
271
  switch (t) {
272
272
  case B:
273
273
  return f("Suspense");
274
- case me:
274
+ case he:
275
275
  return f("SuspenseList");
276
276
  }
277
277
  if (typeof t == "object")
@@ -279,11 +279,11 @@ function ft() {
279
279
  case I:
280
280
  return t = u(t.render, !1), t;
281
281
  case L:
282
- return m(t.type);
282
+ return h(t.type);
283
283
  case S:
284
284
  b = t._payload, t = t._init;
285
285
  try {
286
- return m(t(b));
286
+ return h(t(b));
287
287
  } catch {
288
288
  }
289
289
  }
@@ -293,7 +293,7 @@ function ft() {
293
293
  var t = F.A;
294
294
  return t === null ? null : t.getOwner();
295
295
  }
296
- function h(t) {
296
+ function m(t) {
297
297
  if (Z.call(t, "key")) {
298
298
  var b = Object.getOwnPropertyDescriptor(t, "key").get;
299
299
  if (b && b.isReactWarning) return !1;
@@ -341,7 +341,7 @@ function ft() {
341
341
  }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
342
342
  }
343
343
  function g(t, b, w, A, V, U) {
344
- if (typeof t == "string" || typeof t == "function" || t === T || t === Y || t === P || t === B || t === me || t === D || typeof t == "object" && t !== null && (t.$$typeof === S || t.$$typeof === L || t.$$typeof === d || t.$$typeof === $ || t.$$typeof === I || t.$$typeof === W || t.getModuleId !== void 0)) {
344
+ if (typeof t == "string" || typeof t == "function" || t === T || t === Y || t === P || t === B || t === he || t === D || typeof t == "object" && t !== null && (t.$$typeof === S || t.$$typeof === L || t.$$typeof === d || t.$$typeof === $ || t.$$typeof === I || t.$$typeof === W || t.getModuleId !== void 0)) {
345
345
  var _ = b.children;
346
346
  if (_ !== void 0)
347
347
  if (A)
@@ -378,10 +378,10 @@ React keys must be passed directly to JSX without using spread:
378
378
  _
379
379
  ), qe[_ + A] = !0);
380
380
  }
381
- if (_ = null, w !== void 0 && (a(w), _ = "" + w), h(b) && (a(b.key), _ = "" + b.key), "key" in b) {
381
+ if (_ = null, w !== void 0 && (a(w), _ = "" + w), m(b) && (a(b.key), _ = "" + b.key), "key" in b) {
382
382
  w = {};
383
- for (var he in b)
384
- he !== "key" && (w[he] = b[he]);
383
+ for (var me in b)
384
+ me !== "key" && (w[me] = b[me]);
385
385
  } else w = b;
386
386
  return _ && r(
387
387
  w,
@@ -412,7 +412,7 @@ React keys must be passed directly to JSX without using spread:
412
412
  t && t._owner != null && t._owner !== p() && (w = null, typeof t._owner.tag == "number" ? w = n(t._owner.type) : typeof t._owner.name == "string" && (w = t._owner.name), w = " It was passed a child from " + w + ".");
413
413
  var A = F.getCurrentStack;
414
414
  F.getCurrentStack = function() {
415
- var V = m(t.type);
415
+ var V = h(t.type);
416
416
  return A && (V += A() || ""), V;
417
417
  }, console.error(
418
418
  'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
@@ -429,7 +429,7 @@ Check the render method of \`` + w + "`."), b || (t = n(t)) && (b = `
429
429
 
430
430
  Check the top-level render call using <` + t + ">."), b;
431
431
  }
432
- var O = Ce, R = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), d = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), me = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), k = Symbol.iterator, x = Symbol.for("react.client.reference"), F = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, C = Object.assign, W = Symbol.for("react.client.reference"), H = Array.isArray, z = 0, J, ae, ne, ue, re, G, ee;
432
+ var O = Ce, R = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), d = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), he = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), k = Symbol.iterator, x = Symbol.for("react.client.reference"), F = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, C = Object.assign, W = Symbol.for("react.client.reference"), H = Array.isArray, z = 0, J, ae, ne, ue, re, G, ee;
433
433
  i.__reactDisabledLog = !0;
434
434
  var se, le, je = !1, Ze = new (typeof WeakMap == "function" ? WeakMap : Map)(), dt = Symbol.for("react.client.reference"), Ne, Ae = {}, qe = {}, We = {};
435
435
  ve.Fragment = T, ve.jsx = function(t, b, w, A, V) {
@@ -440,10 +440,10 @@ Check the top-level render call using <` + t + ">."), b;
440
440
  }()), ve;
441
441
  }
442
442
  var Ye;
443
- function mt() {
443
+ function ht() {
444
444
  return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? Se.exports = lt() : Se.exports = ft()), Se.exports;
445
445
  }
446
- var N = mt();
446
+ var N = ht();
447
447
  const ut = 2.375 * 16, Be = 3, K = {
448
448
  day: {
449
449
  labelUnit: "day",
@@ -494,13 +494,13 @@ const ut = 2.375 * 16, Be = 3, K = {
494
494
  // 2024
495
495
  }
496
496
  };
497
- var be = { exports: {} }, ht = be.exports, Ge;
497
+ var be = { exports: {} }, mt = be.exports, Ge;
498
498
  function pt() {
499
499
  return Ge || (Ge = 1, function(n, s) {
500
500
  (function(a, i) {
501
501
  n.exports = i();
502
- })(ht, function() {
503
- var a = 1e3, i = 6e4, o = 36e5, e = "millisecond", f = "second", u = "minute", m = "hour", p = "day", h = "week", r = "month", c = "quarter", v = "year", g = "date", l = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, M = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, j = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(L) {
502
+ })(mt, function() {
503
+ var a = 1e3, i = 6e4, o = 36e5, e = "millisecond", f = "second", u = "minute", h = "hour", p = "day", m = "week", r = "month", c = "quarter", v = "year", g = "date", l = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, M = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, j = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(L) {
504
504
  var S = ["th", "st", "nd", "rd"], D = L % 100;
505
505
  return "[" + L + (S[(D - 20) % 10] || S[D] || S[0]) + "]";
506
506
  } }, O = function(L, S, D) {
@@ -516,7 +516,7 @@ function pt() {
516
516
  }, a: function(L) {
517
517
  return L < 0 ? Math.ceil(L) || 0 : Math.floor(L);
518
518
  }, p: function(L) {
519
- return { M: r, y: v, w: h, d: p, D: g, h: m, m: u, s: f, ms: e, Q: c }[L] || String(L || "").toLowerCase().replace(/s$/, "");
519
+ return { M: r, y: v, w: m, d: p, D: g, h, m: u, s: f, ms: e, Q: c }[L] || String(L || "").toLowerCase().replace(/s$/, "");
520
520
  }, u: function(L) {
521
521
  return L === void 0;
522
522
  } }, E = "en", T = {};
@@ -596,13 +596,13 @@ function pt() {
596
596
  return F ? C(1, 0) : C(31, 11);
597
597
  case r:
598
598
  return F ? C(1, z) : C(0, z + 1);
599
- case h:
599
+ case m:
600
600
  var ne = this.$locale().weekStart || 0, ue = (H < ne ? H + 7 : H) - ne;
601
601
  return C(F ? J - ue : J + (6 - ue), z);
602
602
  case p:
603
603
  case g:
604
604
  return W(ae + "Hours", 0);
605
- case m:
605
+ case h:
606
606
  return W(ae + "Minutes", 1);
607
607
  case u:
608
608
  return W(ae + "Seconds", 2);
@@ -614,7 +614,7 @@ function pt() {
614
614
  }, S.endOf = function(D) {
615
615
  return this.startOf(D, !1);
616
616
  }, S.$set = function(D, k) {
617
- var x, F = I.p(D), Z = "set" + (this.$u ? "UTC" : ""), C = (x = {}, x[p] = Z + "Date", x[g] = Z + "Date", x[r] = Z + "Month", x[v] = Z + "FullYear", x[m] = Z + "Hours", x[u] = Z + "Minutes", x[f] = Z + "Seconds", x[e] = Z + "Milliseconds", x)[F], W = F === p ? this.$D + (k - this.$W) : k;
617
+ var x, F = I.p(D), Z = "set" + (this.$u ? "UTC" : ""), C = (x = {}, x[p] = Z + "Date", x[g] = Z + "Date", x[r] = Z + "Month", x[v] = Z + "FullYear", x[h] = Z + "Hours", x[u] = Z + "Minutes", x[f] = Z + "Seconds", x[e] = Z + "Milliseconds", x)[F], W = F === p ? this.$D + (k - this.$W) : k;
618
618
  if (F === r || F === v) {
619
619
  var H = this.clone().set(g, 1);
620
620
  H.$d[C](W), H.init(), this.$d = H.set(g, Math.min(this.$D, H.daysInMonth())).$d;
@@ -634,8 +634,8 @@ function pt() {
634
634
  if (Z === r) return this.set(r, this.$M + D);
635
635
  if (Z === v) return this.set(v, this.$y + D);
636
636
  if (Z === p) return C(1);
637
- if (Z === h) return C(7);
638
- var W = (x = {}, x[u] = i, x[m] = o, x[f] = a, x)[Z] || 1, H = this.$d.getTime() + D * W;
637
+ if (Z === m) return C(7);
638
+ var W = (x = {}, x[u] = i, x[h] = o, x[f] = a, x)[Z] || 1, H = this.$d.getTime() + D * W;
639
639
  return I.w(H, this);
640
640
  }, S.subtract = function(D, k) {
641
641
  return this.add(-1 * D, k);
@@ -721,13 +721,13 @@ function pt() {
721
721
  case c:
722
722
  F = J() / 3;
723
723
  break;
724
- case h:
724
+ case m:
725
725
  F = (z - H) / 6048e5;
726
726
  break;
727
727
  case p:
728
728
  F = (z - H) / 864e5;
729
729
  break;
730
- case m:
730
+ case h:
731
731
  F = z / o;
732
732
  break;
733
733
  case u:
@@ -759,9 +759,9 @@ function pt() {
759
759
  }, S.toString = function() {
760
760
  return this.$d.toUTCString();
761
761
  }, L;
762
- }(), me = B.prototype;
763
- return d.prototype = me, [["$ms", e], ["$s", f], ["$m", u], ["$H", m], ["$W", p], ["$M", r], ["$y", v], ["$D", g]].forEach(function(L) {
764
- me[L[1]] = function(S) {
762
+ }(), he = B.prototype;
763
+ return d.prototype = he, [["$ms", e], ["$s", f], ["$m", u], ["$H", h], ["$W", p], ["$M", r], ["$y", v], ["$D", g]].forEach(function(L) {
764
+ he[L[1]] = function(S) {
765
765
  return this.$g(S, L[0], L[1]);
766
766
  };
767
767
  }), d.extend = function(L, S) {
@@ -777,7 +777,7 @@ const q = /* @__PURE__ */ te($t);
777
777
  function gt(n, s, a, i) {
778
778
  if (!a.length)
779
779
  return { barMarginLeftAmount: 0, barWidthSize: 0 };
780
- const { tickUnit: o, unitPerTick: e } = K[i], f = a.reduce((l, y) => l + y.widthPx, 0), u = a[0].startDate, m = a[a.length - 1].startDate, p = q(m).add(e, o).diff(u), h = f / p, r = n.diff(u), c = s.diff(u), v = r * h, g = Math.max(c - r, 1) * h;
780
+ const { tickUnit: o, unitPerTick: e } = K[i], f = a.reduce((l, y) => l + y.widthPx, 0), u = a[0].startDate, h = a[a.length - 1].startDate, p = q(h).add(e, o).diff(u), m = f / p, r = n.diff(u), c = s.diff(u), v = r * m, g = Math.max(c - r, 1) * m;
781
781
  return { barMarginLeftAmount: v, barWidthSize: g };
782
782
  }
783
783
  function vt(n) {
@@ -799,53 +799,53 @@ function Dt(n, s, a) {
799
799
  };
800
800
  }
801
801
  function yt(n, s, a) {
802
- const { tickUnit: i, unitPerTick: o, basePxPerDragStep: e, dragStepUnit: f, dragStepAmount: u } = K[a], m = [];
802
+ const { tickUnit: i, unitPerTick: o, basePxPerDragStep: e, dragStepUnit: f, dragStepAmount: u } = K[a], h = [];
803
803
  let p = n.startOf(i);
804
804
  for (; p.isBefore(s); ) {
805
- const h = q(p).add(o, i).diff(p, f) / u;
806
- m.push({
805
+ const m = q(p).add(o, i).diff(p, f) / u;
806
+ h.push({
807
807
  startDate: p,
808
- widthPx: h * e
808
+ widthPx: m * e
809
809
  }), p = p.add(o, i);
810
810
  }
811
- return m;
811
+ return h;
812
812
  }
813
813
  function ct(n, s) {
814
814
  const { labelUnit: a, formatHeaderLabel: i } = K[s], o = [];
815
- let e = null, f = "", u = 0, m = null;
816
- return n.forEach((p, h) => {
815
+ let e = null, f = "", u = 0, h = null;
816
+ return n.forEach((p, m) => {
817
817
  const r = p.startDate.startOf(a), c = r.valueOf(), v = (i == null ? void 0 : i(r)) ?? r.format();
818
818
  c === e ? u += p.widthPx : (e !== null && o.push({
819
819
  label: f,
820
820
  widthPx: u,
821
- startDate: m
822
- }), e = c, f = v, u = p.widthPx, m = r), h === n.length - 1 && o.push({
821
+ startDate: h
822
+ }), e = c, f = v, u = p.widthPx, h = r), m === n.length - 1 && o.push({
823
823
  label: f,
824
824
  widthPx: u,
825
- startDate: m
825
+ startDate: h
826
826
  });
827
827
  }), o;
828
828
  }
829
829
  function St(n, s, a, i, o, e) {
830
830
  const { minDate: f, maxDate: u } = vt(n);
831
831
  a(f), i(u);
832
- const { paddedMinDate: m, paddedMaxDate: p } = Dt(
832
+ const { paddedMinDate: h, paddedMaxDate: p } = Dt(
833
833
  f,
834
834
  u,
835
835
  s
836
- ), h = yt(
837
- m,
836
+ ), m = yt(
837
+ h,
838
838
  p,
839
839
  s
840
- ), r = ct(h, s);
841
- o(h), e(r);
840
+ ), r = ct(m, s);
841
+ o(m), e(r);
842
842
  }
843
843
  const xt = ({
844
844
  bottomRowCells: n,
845
845
  selectedScale: s,
846
846
  scrollRef: a
847
847
  }) => {
848
- var h;
848
+ var m;
849
849
  const i = K[s], [o, e] = de(0), f = _e(
850
850
  () => ct(n, s),
851
851
  [n, s]
@@ -856,7 +856,7 @@ const xt = ({
856
856
  v && v.label === c.label ? v.widthPx += c.widthPx : r.push({ ...c });
857
857
  }
858
858
  return r;
859
- }, [f]), m = _e(() => {
859
+ }, [f]), h = _e(() => {
860
860
  let r = 0;
861
861
  return u.map((c) => {
862
862
  const v = { ...c, left: r };
@@ -868,15 +868,15 @@ const xt = ({
868
868
  if (!r) return;
869
869
  const c = () => {
870
870
  const v = r.scrollLeft;
871
- for (let g = m.length - 1; g >= 0; g--)
872
- if (v >= m[g].left) {
871
+ for (let g = h.length - 1; g >= 0; g--)
872
+ if (v >= h[g].left) {
873
873
  e(g);
874
874
  break;
875
875
  }
876
876
  };
877
877
  return r.addEventListener("scroll", c), c(), () => r.removeEventListener("scroll", c);
878
- }, [m]);
879
- const p = ((h = m[o]) == null ? void 0 : h.label) ?? "";
878
+ }, [h]);
879
+ const p = ((m = h[o]) == null ? void 0 : m.label) ?? "";
880
880
  return /* @__PURE__ */ N.jsx(
881
881
  "div",
882
882
  {
@@ -897,7 +897,7 @@ const xt = ({
897
897
  children: p
898
898
  }
899
899
  ),
900
- /* @__PURE__ */ N.jsx("div", { className: "flex", children: m.map((r, c) => /* @__PURE__ */ N.jsx(
900
+ /* @__PURE__ */ N.jsx("div", { className: "flex", children: h.map((r, c) => /* @__PURE__ */ N.jsx(
901
901
  "div",
902
902
  {
903
903
  className: "border-b border-solid py-2 pr-4 text-left text-sm font-bold",
@@ -935,9 +935,9 @@ function wt() {
935
935
  n.exports = i();
936
936
  })(bt, function() {
937
937
  return function(a, i, o) {
938
- i.prototype.isBetween = function(e, f, u, m) {
939
- var p = o(e), h = o(f), r = (m = m || "()")[0] === "(", c = m[1] === ")";
940
- return (r ? this.isAfter(p, u) : !this.isBefore(p, u)) && (c ? this.isBefore(h, u) : !this.isAfter(h, u)) || (r ? this.isBefore(p, u) : !this.isAfter(p, u)) && (c ? this.isAfter(h, u) : !this.isBefore(h, u));
938
+ i.prototype.isBetween = function(e, f, u, h) {
939
+ var p = o(e), m = o(f), r = (h = h || "()")[0] === "(", c = h[1] === ")";
940
+ return (r ? this.isAfter(p, u) : !this.isBefore(p, u)) && (c ? this.isBefore(m, u) : !this.isAfter(m, u)) || (r ? this.isBefore(p, u) : !this.isAfter(p, u)) && (c ? this.isAfter(m, u) : !this.isBefore(m, u));
941
941
  };
942
942
  };
943
943
  });
@@ -960,15 +960,15 @@ function Mt() {
960
960
  return f(this).year();
961
961
  }, u.isoWeek = function(p) {
962
962
  if (!this.$utils().u(p)) return this.add(7 * (p - this.isoWeek()), a);
963
- var h, r, c, v, g = f(this), l = (h = this.isoWeekYear(), r = this.$u, c = (r ? e.utc : e)().year(h).startOf("year"), v = 4 - c.isoWeekday(), c.isoWeekday() > 4 && (v += 7), c.add(v, a));
963
+ var m, r, c, v, g = f(this), l = (m = this.isoWeekYear(), r = this.$u, c = (r ? e.utc : e)().year(m).startOf("year"), v = 4 - c.isoWeekday(), c.isoWeekday() > 4 && (v += 7), c.add(v, a));
964
964
  return g.diff(l, "week") + 1;
965
965
  }, u.isoWeekday = function(p) {
966
966
  return this.$utils().u(p) ? this.day() || 7 : this.day(this.day() % 7 ? p : p - 7);
967
967
  };
968
- var m = u.startOf;
969
- u.startOf = function(p, h) {
970
- var r = this.$utils(), c = !!r.u(h) || h;
971
- return r.p(p) === "isoweek" ? c ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : m.bind(this)(p, h);
968
+ var h = u.startOf;
969
+ u.startOf = function(p, m) {
970
+ var r = this.$utils(), c = !!r.u(m) || m;
971
+ return r.p(p) === "isoweek" ? c ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : h.bind(this)(p, m);
972
972
  };
973
973
  };
974
974
  });
@@ -1043,7 +1043,7 @@ function Ht() {
1043
1043
  return O.map(function(E, T) {
1044
1044
  return O[(T + (R || 0)) % 7];
1045
1045
  });
1046
- }, m = function() {
1046
+ }, h = function() {
1047
1047
  return o.Ls[o.locale()];
1048
1048
  }, p = function(r, c) {
1049
1049
  return r.formats[c] || function(v) {
@@ -1051,7 +1051,7 @@ function Ht() {
1051
1051
  return l || y.slice(1);
1052
1052
  });
1053
1053
  }(r.formats[c.toUpperCase()]);
1054
- }, h = function() {
1054
+ }, m = function() {
1055
1055
  var r = this;
1056
1056
  return { months: function(c) {
1057
1057
  return c ? c.format("MMMM") : u(r, "months");
@@ -1070,9 +1070,9 @@ function Ht() {
1070
1070
  }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
1071
1071
  };
1072
1072
  e.localeData = function() {
1073
- return h.bind(this)();
1073
+ return m.bind(this)();
1074
1074
  }, o.localeData = function() {
1075
- var r = m();
1075
+ var r = h();
1076
1076
  return { firstDayOfWeek: function() {
1077
1077
  return r.weekStart || 0;
1078
1078
  }, weekdays: function() {
@@ -1089,15 +1089,15 @@ function Ht() {
1089
1089
  return p(r, c);
1090
1090
  }, meridiem: r.meridiem, ordinal: r.ordinal };
1091
1091
  }, o.months = function() {
1092
- return u(m(), "months");
1092
+ return u(h(), "months");
1093
1093
  }, o.monthsShort = function() {
1094
- return u(m(), "monthsShort", "months", 3);
1094
+ return u(h(), "monthsShort", "months", 3);
1095
1095
  }, o.weekdays = function(r) {
1096
- return u(m(), "weekdays", null, null, r);
1096
+ return u(h(), "weekdays", null, null, r);
1097
1097
  }, o.weekdaysShort = function(r) {
1098
- return u(m(), "weekdaysShort", "weekdays", 3, r);
1098
+ return u(h(), "weekdaysShort", "weekdays", 3, r);
1099
1099
  }, o.weekdaysMin = function(r) {
1100
- return u(m(), "weekdaysMin", "weekdays", 2, r);
1100
+ return u(h(), "weekdaysMin", "weekdays", 2, r);
1101
1101
  };
1102
1102
  };
1103
1103
  });
@@ -1113,7 +1113,7 @@ function Gt() {
1113
1113
  })(Bt, function() {
1114
1114
  var a = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, i = {};
1115
1115
  return function(o, e, f) {
1116
- var u, m = function(c, v, g) {
1116
+ var u, h = function(c, v, g) {
1117
1117
  g === void 0 && (g = {});
1118
1118
  var l = new Date(c), y = function(M, j) {
1119
1119
  j === void 0 && (j = {});
@@ -1122,14 +1122,14 @@ function Gt() {
1122
1122
  }(v, g);
1123
1123
  return y.formatToParts(l);
1124
1124
  }, p = function(c, v) {
1125
- for (var g = m(c, v), l = [], y = 0; y < g.length; y += 1) {
1125
+ for (var g = h(c, v), l = [], y = 0; y < g.length; y += 1) {
1126
1126
  var M = g[y], j = M.type, O = M.value, R = a[j];
1127
1127
  R >= 0 && (l[R] = parseInt(O, 10));
1128
1128
  }
1129
1129
  var E = l[3], T = E === 24 ? 0 : E, P = l[0] + "-" + l[1] + "-" + l[2] + " " + T + ":" + l[4] + ":" + l[5] + ":000", Y = +c;
1130
1130
  return (f.utc(P).valueOf() - (Y -= Y % 1e3)) / 6e4;
1131
- }, h = e.prototype;
1132
- h.tz = function(c, v) {
1131
+ }, m = e.prototype;
1132
+ m.tz = function(c, v) {
1133
1133
  c === void 0 && (c = u);
1134
1134
  var g, l = this.utcOffset(), y = this.toDate(), M = y.toLocaleString("en-US", { timeZone: c }), j = Math.round((y - new Date(M)) / 1e3 / 60), O = 15 * -Math.round(y.getTimezoneOffset() / 15) - j;
1135
1135
  if (!Number(O)) g = this.utcOffset(0, v);
@@ -1138,14 +1138,14 @@ function Gt() {
1138
1138
  g = g.add(l - R, "minute");
1139
1139
  }
1140
1140
  return g.$x.$timezone = c, g;
1141
- }, h.offsetName = function(c) {
1142
- var v = this.$x.$timezone || f.tz.guess(), g = m(this.valueOf(), v, { timeZoneName: c }).find(function(l) {
1141
+ }, m.offsetName = function(c) {
1142
+ var v = this.$x.$timezone || f.tz.guess(), g = h(this.valueOf(), v, { timeZoneName: c }).find(function(l) {
1143
1143
  return l.type.toLowerCase() === "timezonename";
1144
1144
  });
1145
1145
  return g && g.value;
1146
1146
  };
1147
- var r = h.startOf;
1148
- h.startOf = function(c, v) {
1147
+ var r = m.startOf;
1148
+ m.startOf = function(c, v) {
1149
1149
  if (!this.$x || !this.$x.$timezone) return r.call(this, c, v);
1150
1150
  var g = f(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1151
1151
  return r.call(g, c, v).tz(this.$x.$timezone, !0);
@@ -1179,8 +1179,8 @@ function Qt() {
1179
1179
  return function(a, i, o) {
1180
1180
  o.updateLocale = function(e, f) {
1181
1181
  var u = o.Ls[e];
1182
- if (u) return (f ? Object.keys(f) : []).forEach(function(m) {
1183
- u[m] = f[m];
1182
+ if (u) return (f ? Object.keys(f) : []).forEach(function(h) {
1183
+ u[h] = f[h];
1184
1184
  }), u;
1185
1185
  };
1186
1186
  };
@@ -1197,29 +1197,29 @@ function nn() {
1197
1197
  })(tn, function() {
1198
1198
  var a = "minute", i = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
1199
1199
  return function(e, f, u) {
1200
- var m = f.prototype;
1200
+ var h = f.prototype;
1201
1201
  u.utc = function(l) {
1202
1202
  var y = { date: l, utc: !0, args: arguments };
1203
1203
  return new f(y);
1204
- }, m.utc = function(l) {
1204
+ }, h.utc = function(l) {
1205
1205
  var y = u(this.toDate(), { locale: this.$L, utc: !0 });
1206
1206
  return l ? y.add(this.utcOffset(), a) : y;
1207
- }, m.local = function() {
1207
+ }, h.local = function() {
1208
1208
  return u(this.toDate(), { locale: this.$L, utc: !1 });
1209
1209
  };
1210
- var p = m.parse;
1211
- m.parse = function(l) {
1210
+ var p = h.parse;
1211
+ h.parse = function(l) {
1212
1212
  l.utc && (this.$u = !0), this.$utils().u(l.$offset) || (this.$offset = l.$offset), p.call(this, l);
1213
1213
  };
1214
- var h = m.init;
1215
- m.init = function() {
1214
+ var m = h.init;
1215
+ h.init = function() {
1216
1216
  if (this.$u) {
1217
1217
  var l = this.$d;
1218
1218
  this.$y = l.getUTCFullYear(), this.$M = l.getUTCMonth(), this.$D = l.getUTCDate(), this.$W = l.getUTCDay(), this.$H = l.getUTCHours(), this.$m = l.getUTCMinutes(), this.$s = l.getUTCSeconds(), this.$ms = l.getUTCMilliseconds();
1219
- } else h.call(this);
1219
+ } else m.call(this);
1220
1220
  };
1221
- var r = m.utcOffset;
1222
- m.utcOffset = function(l, y) {
1221
+ var r = h.utcOffset;
1222
+ h.utcOffset = function(l, y) {
1223
1223
  var M = this.$utils().u;
1224
1224
  if (M(l)) return this.$u ? 0 : M(this.$offset) ? r.call(this) : this.$offset;
1225
1225
  if (typeof l == "string" && (l = function(E) {
@@ -1237,26 +1237,26 @@ function nn() {
1237
1237
  } else O = this.utc();
1238
1238
  return O;
1239
1239
  };
1240
- var c = m.format;
1241
- m.format = function(l) {
1240
+ var c = h.format;
1241
+ h.format = function(l) {
1242
1242
  var y = l || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1243
1243
  return c.call(this, y);
1244
- }, m.valueOf = function() {
1244
+ }, h.valueOf = function() {
1245
1245
  var l = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1246
1246
  return this.$d.valueOf() - 6e4 * l;
1247
- }, m.isUTC = function() {
1247
+ }, h.isUTC = function() {
1248
1248
  return !!this.$u;
1249
- }, m.toISOString = function() {
1249
+ }, h.toISOString = function() {
1250
1250
  return this.toDate().toISOString();
1251
- }, m.toString = function() {
1251
+ }, h.toString = function() {
1252
1252
  return this.toDate().toUTCString();
1253
1253
  };
1254
- var v = m.toDate;
1255
- m.toDate = function(l) {
1254
+ var v = h.toDate;
1255
+ h.toDate = function(l) {
1256
1256
  return l === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : v.call(this);
1257
1257
  };
1258
- var g = m.diff;
1259
- m.diff = function(l, y, M) {
1258
+ var g = h.diff;
1259
+ h.diff = function(l, y, M) {
1260
1260
  if (l && this.$u === l.$u) return g.call(this, l, y, M);
1261
1261
  var j = this.local(), O = u(l).local();
1262
1262
  return g.call(j, O, y, M);
@@ -1312,7 +1312,7 @@ function Pe(n, s, a) {
1312
1312
  let o = 0;
1313
1313
  return i.map((e) => {
1314
1314
  o++;
1315
- const f = ln(e.sequence), { barMarginLeftAmount: u, barWidthSize: m } = gt(
1315
+ const f = ln(e.sequence), { barMarginLeftAmount: u, barWidthSize: h } = gt(
1316
1316
  q(e.startDate),
1317
1317
  q(e.endDate),
1318
1318
  s,
@@ -1321,7 +1321,7 @@ function Pe(n, s, a) {
1321
1321
  return {
1322
1322
  ...e,
1323
1323
  barLeft: u,
1324
- barWidth: m,
1324
+ barWidth: h,
1325
1325
  depth: f,
1326
1326
  order: o,
1327
1327
  originalOrder: o
@@ -1330,16 +1330,16 @@ function Pe(n, s, a) {
1330
1330
  }
1331
1331
  const st = (n) => {
1332
1332
  let s;
1333
- const a = /* @__PURE__ */ new Set(), i = (p, h) => {
1333
+ const a = /* @__PURE__ */ new Set(), i = (p, m) => {
1334
1334
  const r = typeof p == "function" ? p(s) : p;
1335
1335
  if (!Object.is(r, s)) {
1336
1336
  const c = s;
1337
- s = h ?? (typeof r != "object" || r === null) ? r : Object.assign({}, s, r), a.forEach((v) => v(s, c));
1337
+ s = m ?? (typeof r != "object" || r === null) ? r : Object.assign({}, s, r), a.forEach((v) => v(s, c));
1338
1338
  }
1339
- }, o = () => s, u = { setState: i, getState: o, getInitialState: () => m, subscribe: (p) => (a.add(p), () => a.delete(p)) }, m = s = n(i, o, u);
1339
+ }, o = () => s, u = { setState: i, getState: o, getInitialState: () => h, subscribe: (p) => (a.add(p), () => a.delete(p)) }, h = s = n(i, o, u);
1340
1340
  return u;
1341
- }, fn = (n) => n ? st(n) : st, mn = (n) => n;
1342
- function hn(n, s = mn) {
1341
+ }, fn = (n) => n ? st(n) : st, hn = (n) => n;
1342
+ function mn(n, s = hn) {
1343
1343
  const a = Ce.useSyncExternalStore(
1344
1344
  n.subscribe,
1345
1345
  () => s(n.getState()),
@@ -1348,7 +1348,7 @@ function hn(n, s = mn) {
1348
1348
  return Ce.useDebugValue(a), a;
1349
1349
  }
1350
1350
  const ot = (n) => {
1351
- const s = fn(n), a = (i) => hn(s, i);
1351
+ const s = fn(n), a = (i) => mn(s, i);
1352
1352
  return Object.assign(a, s), a;
1353
1353
  }, pn = (n) => n ? ot(n) : ot, De = pn((n, s) => ({
1354
1354
  rawTasks: [],
@@ -1388,15 +1388,15 @@ function gn(n, s, a) {
1388
1388
  setRawTasks: e,
1389
1389
  setDraggingTaskMeta: f,
1390
1390
  clearDraggingTaskMeta: u
1391
- } = De(), [m, p] = de(s), h = X(s), r = X(null), c = X(s), v = X(n.startDate), g = X(n.endDate), l = (j) => {
1392
- r.current = j.clientX, c.current = s, v.current = n.startDate, g.current = n.endDate, p(s), h.current = s, f({ taskId: n.id, type: "bar" }), document.addEventListener("mousemove", y), document.addEventListener("mouseup", M);
1391
+ } = De(), [h, p] = de(s), m = X(s), r = X(null), c = X(s), v = X(n.startDate), g = X(n.endDate), l = (j) => {
1392
+ r.current = j.clientX, c.current = s, v.current = n.startDate, g.current = n.endDate, p(s), m.current = s, f({ taskId: n.id, type: "bar" }), document.addEventListener("mousemove", y), document.addEventListener("mouseup", M);
1393
1393
  }, y = (j) => {
1394
1394
  if (r.current === null) return;
1395
1395
  const O = j.clientX - r.current, E = pe(O, o) * K[o].basePxPerDragStep, T = c.current + E;
1396
- p(T), h.current = T;
1396
+ p(T), m.current = T;
1397
1397
  }, M = () => {
1398
1398
  document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", M);
1399
- const j = h.current - c.current, O = pe(j, o), { dragStepUnit: R, dragStepAmount: E } = K[o], T = i.map(
1399
+ const j = m.current - c.current, O = pe(j, o), { dragStepUnit: R, dragStepAmount: E } = K[o], T = i.map(
1400
1400
  (P) => P.id === n.id ? {
1401
1401
  ...P,
1402
1402
  startDate: q(v.current).add(O * E, R).toISOString(),
@@ -1405,7 +1405,7 @@ function gn(n, s, a) {
1405
1405
  );
1406
1406
  e(T), a == null || a(T), u(), r.current = null;
1407
1407
  };
1408
- return { onDragStart: l, tempLeft: m };
1408
+ return { onDragStart: l, tempLeft: h };
1409
1409
  }
1410
1410
  function vn(n, s, a, i) {
1411
1411
  const {
@@ -1413,13 +1413,13 @@ function vn(n, s, a, i) {
1413
1413
  selectedScale: e,
1414
1414
  setRawTasks: f,
1415
1415
  setDraggingTaskMeta: u,
1416
- clearDraggingTaskMeta: m
1417
- } = De(), [p, h] = de(s), [r, c] = de(a), v = X(s), g = X(a), l = X(null), y = X(s), M = X(a), j = X(n.startDate), O = (T) => {
1418
- T.stopPropagation(), l.current = T.clientX, y.current = s, M.current = a, j.current = n.startDate, h(s), c(a), v.current = s, g.current = a, u({ taskId: n.id, type: "left" }), document.addEventListener("mousemove", R), document.addEventListener("mouseup", E);
1416
+ clearDraggingTaskMeta: h
1417
+ } = De(), [p, m] = de(s), [r, c] = de(a), v = X(s), g = X(a), l = X(null), y = X(s), M = X(a), j = X(n.startDate), O = (T) => {
1418
+ T.stopPropagation(), l.current = T.clientX, y.current = s, M.current = a, j.current = n.startDate, m(s), c(a), v.current = s, g.current = a, u({ taskId: n.id, type: "left" }), document.addEventListener("mousemove", R), document.addEventListener("mouseup", E);
1419
1419
  }, R = (T) => {
1420
1420
  if (l.current == null) return;
1421
1421
  const P = T.clientX - l.current, $ = pe(P, e) * K[e].basePxPerDragStep, d = y.current + $, I = M.current - $;
1422
- I < 1 || (h(d), c(I), v.current = d, g.current = I);
1422
+ I < 1 || (m(d), c(I), v.current = d, g.current = I);
1423
1423
  }, E = () => {
1424
1424
  document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", E);
1425
1425
  const T = v.current - y.current, P = pe(T, e), { dragStepUnit: Y, dragStepAmount: $ } = K[e], d = o.map((I) => {
@@ -1430,7 +1430,7 @@ function vn(n, s, a, i) {
1430
1430
  );
1431
1431
  return B.isAfter(q(I.endDate)) ? I : { ...I, startDate: B.toISOString() };
1432
1432
  });
1433
- f(d), i == null || i(d), m(), l.current = null;
1433
+ f(d), i == null || i(d), h(), l.current = null;
1434
1434
  };
1435
1435
  return { onDragStart: O, tempLeft: p, tempWidth: r };
1436
1436
  }
@@ -1441,15 +1441,15 @@ function Dn(n, s, a) {
1441
1441
  setRawTasks: e,
1442
1442
  setDraggingTaskMeta: f,
1443
1443
  clearDraggingTaskMeta: u
1444
- } = De(), [m, p] = de(s), h = X(s), r = X(null), c = X(s), v = X(n.endDate), g = (M) => {
1445
- M.stopPropagation(), r.current = M.clientX, c.current = s, v.current = n.endDate, p(s), h.current = s, f({ taskId: n.id, type: "right" }), document.addEventListener("mousemove", l), document.addEventListener("mouseup", y);
1444
+ } = De(), [h, p] = de(s), m = X(s), r = X(null), c = X(s), v = X(n.endDate), g = (M) => {
1445
+ M.stopPropagation(), r.current = M.clientX, c.current = s, v.current = n.endDate, p(s), m.current = s, f({ taskId: n.id, type: "right" }), document.addEventListener("mousemove", l), document.addEventListener("mouseup", y);
1446
1446
  }, l = (M) => {
1447
1447
  if (r.current === null) return;
1448
1448
  const j = M.clientX - r.current, R = pe(j, o) * K[o].basePxPerDragStep, E = c.current + R;
1449
- E < 1 || (p(E), h.current = E);
1449
+ E < 1 || (p(E), m.current = E);
1450
1450
  }, y = () => {
1451
1451
  document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", y);
1452
- const M = h.current - c.current, j = pe(M, o), { dragStepUnit: O, dragStepAmount: R } = K[o], E = i.map((T) => {
1452
+ const M = m.current - c.current, j = pe(M, o), { dragStepUnit: O, dragStepAmount: R } = K[o], E = i.map((T) => {
1453
1453
  if (T.id !== n.id) return T;
1454
1454
  const P = q(v.current).add(
1455
1455
  j * R,
@@ -1459,12 +1459,12 @@ function Dn(n, s, a) {
1459
1459
  });
1460
1460
  e(E), a == null || a(E), u(), r.current = null;
1461
1461
  };
1462
- return { onDragStart: g, tempWidth: m };
1462
+ return { onDragStart: g, tempWidth: h };
1463
1463
  }
1464
1464
  function yn(n, s, a, i, o) {
1465
1465
  if (a < 0 || o < 0)
1466
1466
  return `M ${s} ${a} h ${(i - s) / 2}`;
1467
- const e = 7, f = 11, u = 25, m = 20, p = `M ${s} ${a}`, h = i - s, r = o - a, c = Math.abs(h), v = Math.abs(r), g = o <= a, l = o >= a, y = i >= s, M = i <= s, j = c > m, O = Math.abs(h / 2), R = Math.abs(r / 2);
1467
+ const e = 7, f = 11, u = 25, h = 20, p = `M ${s} ${a}`, m = i - s, r = o - a, c = Math.abs(m), v = Math.abs(r), g = o <= a, l = o >= a, y = i >= s, M = i <= s, j = c > h, O = Math.abs(m / 2), R = Math.abs(r / 2);
1468
1468
  function E() {
1469
1469
  function $() {
1470
1470
  return (y || M) && l && !j ? "downSmallHorizontal" : (y || M) && g && !j ? "upSmallHorizontal" : l && M ? "downLeft" : l && y ? "downRight" : g && M ? "upLeft" : g && y ? "upRight" : "";
@@ -1482,13 +1482,13 @@ function yn(n, s, a, i, o) {
1482
1482
  case "downLeft":
1483
1483
  case "downSmallHorizontal": {
1484
1484
  const B = a + r / 2;
1485
- d += ` h ${f}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${h - 2 * f}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${f}`;
1485
+ d += ` h ${f}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${m - 2 * f}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${f}`;
1486
1486
  break;
1487
1487
  }
1488
1488
  case "upLeft":
1489
1489
  case "upSmallHorizontal": {
1490
1490
  const B = a + r / 2;
1491
- d += ` h ${f}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${h - 2 * f}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${f}`;
1491
+ d += ` h ${f}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${m - 2 * f}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${f}`;
1492
1492
  break;
1493
1493
  }
1494
1494
  default:
@@ -1498,7 +1498,7 @@ function yn(n, s, a, i, o) {
1498
1498
  }
1499
1499
  function T() {
1500
1500
  let $ = p;
1501
- return l && M ? ($ += ` h ${u - f}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h ${h - e * 2}`) : l && y ? ($ += ` h ${h + u - f}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h -${u - f}`) : g && M ? ($ += ` h ${u - f}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h ${h - u + f}`) : g && y && ($ += ` h ${h + u - f}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h -${u - f}`), $;
1501
+ return l && M ? ($ += ` h ${u - f}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h ${m - e * 2}`) : l && y ? ($ += ` h ${m + u - f}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h -${u - f}`) : g && M ? ($ += ` h ${u - f}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h ${m - u + f}`) : g && y && ($ += ` h ${m + u - f}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h -${u - f}`), $;
1502
1502
  }
1503
1503
  function P() {
1504
1504
  function $() {
@@ -1508,12 +1508,12 @@ function yn(n, s, a, i, o) {
1508
1508
  switch ($()) {
1509
1509
  case "downRight":
1510
1510
  case "downSmallHorizontal": {
1511
- d += " h -11", d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${R - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${f * 2 + h}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${R - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += " h -11";
1511
+ d += " h -11", d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${R - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${f * 2 + m}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${R - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += " h -11";
1512
1512
  break;
1513
1513
  }
1514
1514
  case "upRight":
1515
1515
  case "upSmallHorizontal": {
1516
- d += " h -11", d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(R - e * 2)}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${f * 2 + h}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v ${-(R - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += " h -11";
1516
+ d += " h -11", d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(R - e * 2)}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${f * 2 + m}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v ${-(R - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += " h -11";
1517
1517
  break;
1518
1518
  }
1519
1519
  case "downLeft": {
@@ -1531,7 +1531,7 @@ function yn(n, s, a, i, o) {
1531
1531
  }
1532
1532
  function Y() {
1533
1533
  let $ = p;
1534
- return l && M ? ($ += ` h ${h - u}`, $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${u}`) : l && y ? ($ += " h -25", $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${h + u}`) : g && M ? ($ += ` h ${h - u}`, $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${u}`) : g && y && ($ += " h -25", $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${h + u}`), $;
1534
+ return l && M ? ($ += ` h ${m - u}`, $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${u}`) : l && y ? ($ += " h -25", $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${m + u}`) : g && M ? ($ += ` h ${m - u}`, $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${u}`) : g && y && ($ += " h -25", $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${m + u}`), $;
1535
1535
  }
1536
1536
  switch (n) {
1537
1537
  case "FS":
@@ -1556,13 +1556,13 @@ function Sn({ allTasks: n, currentTask: s, onTasksChange: a }) {
1556
1556
  s.barLeft,
1557
1557
  s.barWidth,
1558
1558
  a
1559
- ), { onDragStart: m, tempWidth: p } = Dn(
1559
+ ), { onDragStart: h, tempWidth: p } = Dn(
1560
1560
  s,
1561
1561
  s.barWidth,
1562
1562
  a
1563
- ), { draggingTaskMeta: h } = De(), r = (h == null ? void 0 : h.taskId) === s.id;
1563
+ ), { draggingTaskMeta: m } = De(), r = (m == null ? void 0 : m.taskId) === s.id;
1564
1564
  let c = !1, v = !1, g = !1;
1565
- r && ((h == null ? void 0 : h.type) === "left" ? c = !0 : (h == null ? void 0 : h.type) === "right" ? v = !0 : (h == null ? void 0 : h.type) === "bar" && (g = !0));
1565
+ r && ((m == null ? void 0 : m.type) === "left" ? c = !0 : (m == null ? void 0 : m.type) === "right" ? v = !0 : (m == null ? void 0 : m.type) === "bar" && (g = !0));
1566
1566
  let l = s.barLeft, y = s.barWidth;
1567
1567
  c ? (l = f, y = u) : v ? y = p : g && (l = o);
1568
1568
  const M = () => /* @__PURE__ */ N.jsx(
@@ -1590,7 +1590,7 @@ function Sn({ allTasks: n, currentTask: s, onTasksChange: a }) {
1590
1590
  "button",
1591
1591
  {
1592
1592
  type: "button",
1593
- onMouseDown: m,
1593
+ onMouseDown: h,
1594
1594
  className: "absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",
1595
1595
  style: {
1596
1596
  right: "-1.15rem",
@@ -1689,7 +1689,7 @@ function Sn({ allTasks: n, currentTask: s, onTasksChange: a }) {
1689
1689
  ] });
1690
1690
  }
1691
1691
  function bn({ tasks: n, onTasksChange: s, ganttHeight: a, columnWidth: i }) {
1692
- const [o, e] = de(a || 500), [f, u] = de(i || 1e3), [m, p] = de(n || []), h = X(null), {
1692
+ const [o, e] = de(a || 500), [f, u] = de(i || 1e3), [h, p] = de(n || []), m = X(null), {
1693
1693
  rawTasks: r,
1694
1694
  transformedTasks: c,
1695
1695
  selectedScale: v,
@@ -1705,9 +1705,9 @@ function bn({ tasks: n, onTasksChange: s, ganttHeight: a, columnWidth: i }) {
1705
1705
  return xe(() => {
1706
1706
  n.length === 0 ? p($n) : p(n);
1707
1707
  }, [n]), xe(() => {
1708
- if (!m.length) return;
1708
+ if (!h.length) return;
1709
1709
  const T = Object.fromEntries(
1710
- m.map((P) => [
1710
+ h.map((P) => [
1711
1711
  P.id,
1712
1712
  { startDate: P.startDate, endDate: P.endDate }
1713
1713
  ])
@@ -1720,9 +1720,9 @@ function bn({ tasks: n, onTasksChange: s, ganttHeight: a, columnWidth: i }) {
1720
1720
  j,
1721
1721
  O
1722
1722
  );
1723
- }, [m, v]), xe(() => {
1724
- !l.length || !m.length || r.length === 0 && M(m);
1725
- }, [l, m]), /* @__PURE__ */ N.jsx(
1723
+ }, [h, v]), xe(() => {
1724
+ !l.length || !h.length || r.length === 0 && M(h);
1725
+ }, [l, h]), /* @__PURE__ */ N.jsx(
1726
1726
  "section",
1727
1727
  {
1728
1728
  style: {
@@ -1730,13 +1730,12 @@ function bn({ tasks: n, onTasksChange: s, ganttHeight: a, columnWidth: i }) {
1730
1730
  overflow: "auto",
1731
1731
  height: `${o}px`,
1732
1732
  width: `${f}px`,
1733
- backgroundColor: "#FFF",
1734
- fontFamily: "sans-serif"
1733
+ backgroundColor: "#FFF"
1735
1734
  },
1736
1735
  children: /* @__PURE__ */ N.jsx(
1737
1736
  "div",
1738
1737
  {
1739
- className: "size-full",
1738
+ className: "h-full w-full overflow-hidden",
1740
1739
  style: {
1741
1740
  backgroundColor: "#FFF"
1742
1741
  },
@@ -1772,14 +1771,14 @@ function bn({ tasks: n, onTasksChange: s, ganttHeight: a, columnWidth: i }) {
1772
1771
  )
1773
1772
  }
1774
1773
  ),
1775
- /* @__PURE__ */ N.jsx("div", { ref: h, className: "grow overflow-x-auto", children: /* @__PURE__ */ N.jsxs("div", { className: "flex min-w-max flex-col", children: [
1774
+ /* @__PURE__ */ N.jsx("div", { ref: m, className: "grow overflow-x-auto", children: /* @__PURE__ */ N.jsxs("div", { className: "flex min-w-max flex-col", children: [
1776
1775
  /* @__PURE__ */ N.jsx(
1777
1776
  xt,
1778
1777
  {
1779
1778
  topHeaderGroups: y,
1780
1779
  bottomRowCells: l,
1781
1780
  selectedScale: v,
1782
- scrollRef: h
1781
+ scrollRef: m
1783
1782
  }
1784
1783
  ),
1785
1784
  /* @__PURE__ */ N.jsx("div", { className: "relative flex", children: /* @__PURE__ */ N.jsx("div", { className: "flex grow flex-col", children: c.map((T) => /* @__PURE__ */ N.jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaeungkim/gantt-chart",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",