@wimi/gantt 0.1.0

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.
@@ -0,0 +1,2 @@
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["VanillaGantt"]=e():t["VanillaGantt"]=e()})("undefined"!==typeof self?self:this,function(){return function(){"use strict";var t={2481:function(t,e,r){var n=r(8252),i=r(1958),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},7938:function(t,e,r){var n=r(2666),i=r(3369),o=r(1250).f,s=n("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},462:function(t,e,r){var n=r(8130),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},3162:function(t,e,r){var n=r(8271),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},8658:function(t,e,r){var n=r(2364),i=r(9283),o=r(6013),s=function(t){return function(e,r,s){var a=n(e),l=o(a);if(0===l)return!t&&-1;var c,u=i(s,l);if(t&&r!==r){while(l>u)if(c=a[u++],c!==c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===r)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},592:function(t,e,r){var n=r(7101),i=r(8431),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},9836:function(t,e,r){var n=r(3162),i=r(1380);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(s){i(t,"throw",s)}}},7409:function(t,e,r){var n=r(2289),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},110:function(t,e,r){var n=r(1153),i=r(8252),o=r(7409),s=r(2666),a=s("toStringTag"),l=Object,c="Arguments"===o(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(e=l(t),a))?r:c?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},4993:function(t,e,r){var n=r(9522),i=r(5456),o=r(6056),s=r(1250);t.exports=function(t,e,r){for(var a=i(e),l=s.f,c=o.f,u=0;u<a.length;u++){var d=a[u];n(t,d)||r&&n(r,d)||l(t,d,c(e,d))}}},6280:function(t,e,r){var n=r(8930);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},4992:function(t){t.exports=function(t,e){return{value:t,done:e}}},232:function(t,e,r){var n=r(7101),i=r(1250),o=r(9299);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9299:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},721:function(t,e,r){var n=r(7101),i=r(1250),o=r(9299);t.exports=function(t,e,r){n?i.f(t,e,o(0,r)):t[e]=r}},7893:function(t,e,r){var n=r(4034),i=r(1250);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},3589:function(t,e,r){var n=r(8252),i=r(1250),o=r(4034),s=r(7214);t.exports=function(t,e,r,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(n(r)&&o(r,c,a),a.global)l?t[e]=r:s(e,r);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(u){}l?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},2976:function(t,e,r){var n=r(3589);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},7214:function(t,e,r){var n=r(3405),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},7101:function(t,e,r){var n=r(8930);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},2998:function(t,e,r){var n=r(3405),i=r(8271),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},6994:function(t){var e=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw new e("Maximum allowed index exceeded");return t}},7658:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6332:function(t,e,r){var n=r(3405),i=n.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},5168:function(t,e,r){var n,i,o=r(3405),s=r(6332),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(n=u.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},7725:function(t,e,r){var n=r(3405),i=r(6056).f,o=r(232),s=r(3589),a=r(7214),l=r(4993),c=r(5129);t.exports=function(t,e){var r,u,d,h,p,f,g=t.target,y=t.global,v=t.stat;if(u=y?n:v?n[g]||a(g,{}):n[g]&&n[g].prototype,u)for(d in e){if(p=e[d],t.dontCallGetSet?(f=i(u,d),h=f&&f.value):h=u[d],r=c(y?d:g+(v?".":"#")+d,t.forced),!r&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(t.sham||h&&h.sham)&&o(p,"sham",!0),s(u,d,p,t)}}},8930:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},5990:function(t,e,r){var n=r(5647),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},4445:function(t,e,r){var n=r(9995),i=r(2481),o=r(5647),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},5647:function(t,e,r){var n=r(8930);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},3176:function(t,e,r){var n=r(5647),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},3743:function(t,e,r){var n=r(7101),i=r(9522),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},9995:function(t,e,r){var n=r(7409),i=r(2289);t.exports=function(t){if("Function"===n(t))return i(t)}},2289:function(t,e,r){var n=r(5647),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},3220:function(t,e,r){var n=r(3405),i=r(8252),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},6226:function(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},8258:function(t,e,r){var n=r(110),i=r(3377),o=r(3022),s=r(4988),a=r(2666),l=a("iterator");t.exports=function(t){if(!o(t))return i(t,l)||i(t,"@@iterator")||s[n(t)]}},4750:function(t,e,r){var n=r(3176),i=r(2481),o=r(3162),s=r(1958),a=r(8258),l=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(i(r))return o(n(r,t));throw new l(s(t)+" is not iterable")}},3377:function(t,e,r){var n=r(2481),i=r(3022);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},3405:function(t,e,r){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9522:function(t,e,r){var n=r(2289),i=r(1724),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},4036:function(t){t.exports={}},9810:function(t,e,r){var n=r(3220);t.exports=n("document","documentElement")},1782:function(t,e,r){var n=r(7101),i=r(8930),o=r(2998);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1792:function(t,e,r){var n=r(2289),i=r(8930),o=r(7409),s=Object,a=n("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?a(t,""):s(t)}:s},4117:function(t,e,r){var n=r(2289),i=r(8252),o=r(8486),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},4206:function(t,e,r){var n,i,o,s=r(3337),a=r(3405),l=r(8271),c=r(232),u=r(9522),d=r(8486),h=r(4040),p=r(4036),f="Object already initialized",g=a.TypeError,y=a.WeakMap,v=function(t){return o(t)?i(t):n(t,{})},m=function(t){return function(e){var r;if(!l(e)||(r=i(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return r}};if(s||d.state){var k=d.state||(d.state=new y);k.get=k.get,k.has=k.has,k.set=k.set,n=function(t,e){if(k.has(t))throw new g(f);return e.facade=t,k.set(t,e),e},i=function(t){return k.get(t)||{}},o=function(t){return k.has(t)}}else{var b=h("state");p[b]=!0,n=function(t,e){if(u(t,b))throw new g(f);return e.facade=t,c(t,b,e),e},i=function(t){return u(t,b)?t[b]:{}},o=function(t){return u(t,b)}}t.exports={set:n,get:i,has:o,enforce:v,getterFor:m}},450:function(t,e,r){var n=r(2666),i=r(4988),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},8431:function(t,e,r){var n=r(7409);t.exports=Array.isArray||function(t){return"Array"===n(t)}},8252:function(t){var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},5129:function(t,e,r){var n=r(8930),i=r(8252),o=/#|\.prototype\./,s=function(t,e){var r=l[a(t)];return r===u||r!==c&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},3022:function(t){t.exports=function(t){return null===t||void 0===t}},8271:function(t,e,r){var n=r(8252);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},4214:function(t){t.exports=!1},8944:function(t,e,r){var n=r(3220),i=r(8252),o=r(8130),s=r(5537),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,a(t))}},6841:function(t,e,r){var n=r(4445),i=r(3176),o=r(3162),s=r(1958),a=r(450),l=r(6013),c=r(8130),u=r(4750),d=r(8258),h=r(1380),p=TypeError,f=function(t,e){this.stopped=t,this.result=e},g=f.prototype;t.exports=function(t,e,r){var y,v,m,k,b,T,w,x=r&&r.that,S=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),L=!(!r||!r.IS_ITERATOR),D=!(!r||!r.INTERRUPTED),C=n(e,x),R=function(t){var e=y;return y=void 0,e&&h(e,"normal"),new f(!0,t)},I=function(t){return S?(o(t),D?C(t[0],t[1],R):C(t[0],t[1])):D?C(t,R):C(t)};if(E)y=t.iterator;else if(L)y=t;else{if(v=d(t),!v)throw new p(s(t)+" is not iterable");if(a(v)){for(m=0,k=l(t);k>m;m++)if(b=I(t[m]),b&&c(g,b))return b;return new f(!1)}y=u(t,v)}T=E?t.next:y.next;while(!(w=i(T,y)).done){var H=w.value;try{b=I(H)}catch(B){if(!y)throw B;h(y,"throw",B)}if("object"==typeof b&&b&&c(g,b))return b}return new f(!1)}},7462:function(t,e,r){var n=r(1380);t.exports=function(t,e,r){for(var i=t.length-1;i>=0;i--)if(void 0!==t[i])try{r=n(t[i].iterator,e,r)}catch(o){e="throw",r=o}if("throw"===e)throw r;return r}},1380:function(t,e,r){var n=r(3176),i=r(3162),o=r(3377);t.exports=function(t,e,r){var s,a;i(t);try{if(s=o(t,"return"),!s){if("throw"===e)throw r;return r}s=n(s,t)}catch(l){a=!0,s=l}if("throw"===e)throw r;if(a)throw s;return i(s),r}},7211:function(t,e,r){var n=r(3176),i=r(3369),o=r(232),s=r(2976),a=r(2666),l=r(4206),c=r(3377),u=r(2274).IteratorPrototype,d=r(4992),h=r(1380),p=r(7462),f=a("toStringTag"),g="IteratorHelper",y="WrapForValidIterator",v="normal",m="throw",k=l.set,b=function(t){var e=l.getterFor(t?y:g);return s(i(u),{next:function(){var r=e(this);if(t)return r.nextHandler();if(r.done)return d(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:d(n,r.done)}catch(i){throw r.done=!0,i}},return:function(){var r=e(this),i=r.iterator,o=r.done;if(r.done=!0,t){var s=c(i,"return");return s?n(s,i):d(void 0,!0)}if(o)return d(void 0,!0);if(r.inner)try{h(r.inner.iterator,v)}catch(a){return h(i,m,a)}if(r.openIters)try{p(r.openIters,v)}catch(a){if(i)return h(i,m,a);throw a}return i&&h(i,v),d(void 0,!0)}})},T=b(!0),w=b(!1);o(w,f,"Iterator Helper"),t.exports=function(t,e,r){var n=function(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=e?y:g,i.returnHandlerResult=!!r,i.nextHandler=t,i.counter=0,i.done=!1,k(this,i)};return n.prototype=e?T:w,n}},6483:function(t){t.exports=function(t,e){var r="function"==typeof Iterator&&Iterator.prototype[t];if(r)try{r.call({next:null},e).next()}catch(n){return!0}}},2229:function(t,e,r){var n=r(3405);t.exports=function(t,e){var r=n.Iterator,i=r&&r.prototype,o=i&&i[t],s=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(a){a instanceof e||(s=!1)}if(!s)return o}},2274:function(t,e,r){var n,i,o,s=r(8930),a=r(8252),l=r(8271),c=r(3369),u=r(8778),d=r(3589),h=r(2666),p=r(4214),f=h("iterator"),g=!1;[].keys&&(o=[].keys(),"next"in o?(i=u(u(o)),i!==Object.prototype&&(n=i)):g=!0);var y=!l(n)||s(function(){var t={};return n[f].call(t)!==t});y?n={}:p&&(n=c(n)),a(n[f])||d(n,f,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},4988:function(t){t.exports={}},6013:function(t,e,r){var n=r(5531);t.exports=function(t){return n(t.length)}},4034:function(t,e,r){var n=r(2289),i=r(8930),o=r(8252),s=r(9522),a=r(7101),l=r(3743).CONFIGURABLE,c=r(4117),u=r(4206),d=u.enforce,h=u.get,p=String,f=Object.defineProperty,g=n("".slice),y=n("".replace),v=n([].join),m=a&&!i(function(){return 8!==f(function(){},"length",{value:8}).length}),k=String(String).split("String"),b=t.exports=function(t,e,r){"Symbol("===g(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?f(t,"name",{value:e,configurable:!0}):t.name=e),m&&r&&s(r,"arity")&&t.length!==r.arity&&f(t,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?a&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=d(t);return s(n,"source")||(n.source=v(k,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return o(this)&&h(this).source||c(this)},"toString")},7966:function(t){var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},3369:function(t,e,r){var n,i=r(3162),o=r(5422),s=r(7658),a=r(4036),l=r(9810),c=r(2998),u=r(4040),d=">",h="<",p="prototype",f="script",g=u("IE_PROTO"),y=function(){},v=function(t){return h+f+d+t+h+"/"+f+d},m=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},k=function(){var t,e=c("iframe"),r="java"+f+":";return e.style.display="none",l.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(v("document.F=Object")),t.close(),t.F},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&n?m(n):k():m(n);var t=s.length;while(t--)delete b[p][s[t]];return b()};a[g]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(y[p]=i(t),r=new y,y[p]=null,r[g]=t):r=b(),void 0===e?r:o.f(r,e)}},5422:function(t,e,r){var n=r(7101),i=r(3667),o=r(1250),s=r(3162),a=r(2364),l=r(7185);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);var r,n=a(e),i=l(e),c=i.length,u=0;while(c>u)o.f(t,r=i[u++],n[r]);return t}},1250:function(t,e,r){var n=r(7101),i=r(1782),o=r(3667),s=r(3162),a=r(3704),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";e.f=n?o?function(t,e,r){if(s(t),e=a(e),s(r),"function"===typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=u(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:d in r?r[d]:n[d],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(s(t),e=a(e),s(r),i)try{return c(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},6056:function(t,e,r){var n=r(7101),i=r(3176),o=r(6640),s=r(9299),a=r(2364),l=r(3704),c=r(9522),u=r(1782),d=Object.getOwnPropertyDescriptor;e.f=n?d:function(t,e){if(t=a(t),e=l(e),u)try{return d(t,e)}catch(r){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},7469:function(t,e,r){var n=r(6067),i=r(7658),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},4540:function(t,e){e.f=Object.getOwnPropertySymbols},8778:function(t,e,r){var n=r(9522),i=r(8252),o=r(1724),s=r(4040),a=r(6280),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?u:null}},8130:function(t,e,r){var n=r(2289);t.exports=n({}.isPrototypeOf)},6067:function(t,e,r){var n=r(2289),i=r(9522),o=r(2364),s=r(8658).indexOf,a=r(4036),l=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,u=[];for(r in n)!i(a,r)&&i(n,r)&&l(u,r);while(e.length>c)i(n,r=e[c++])&&(~s(u,r)||l(u,r));return u}},7185:function(t,e,r){var n=r(6067),i=r(7658);t.exports=Object.keys||function(t){return n(t,i)}},6640:function(t,e){var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},5519:function(t,e,r){var n=r(3176),i=r(8252),o=r(8271),s=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!o(a=n(r,t)))return a;if(i(r=t.valueOf)&&!o(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!o(a=n(r,t)))return a;throw new s("Can't convert object to primitive value")}},5456:function(t,e,r){var n=r(3220),i=r(2289),o=r(7469),s=r(4540),a=r(3162),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=s.f;return r?l(e,r(t)):e}},2341:function(t,e,r){var n=r(3022),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},4040:function(t,e,r){var n=r(8762),i=r(2161),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},8486:function(t,e,r){var n=r(4214),i=r(3405),o=r(7214),s="__core-js_shared__",a=t.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},8762:function(t,e,r){var n=r(8486);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},1520:function(t,e,r){var n=r(5168),i=r(8930),o=r(3405),s=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},9283:function(t,e,r){var n=r(136),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},2364:function(t,e,r){var n=r(1792),i=r(2341);t.exports=function(t){return n(i(t))}},136:function(t,e,r){var n=r(7966);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},5531:function(t,e,r){var n=r(136),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},1724:function(t,e,r){var n=r(2341),i=Object;t.exports=function(t){return i(n(t))}},4610:function(t,e,r){var n=r(3176),i=r(8271),o=r(8944),s=r(3377),a=r(5519),l=r(2666),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,l=s(t,u);if(l){if(void 0===e&&(e="default"),r=n(l,t,e),!i(r)||o(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},3704:function(t,e,r){var n=r(4610),i=r(8944);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},1153:function(t,e,r){var n=r(2666),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},1958:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},2161:function(t,e,r){var n=r(2289),i=0,o=Math.random(),s=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},5537:function(t,e,r){var n=r(1520);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3667:function(t,e,r){var n=r(7101),i=r(8930);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3337:function(t,e,r){var n=r(3405),i=r(8252),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},2666:function(t,e,r){var n=r(3405),i=r(8762),o=r(9522),s=r(2161),a=r(1520),l=r(5537),c=n.Symbol,u=i("wks"),d=l?c["for"]||c:c&&c.withoutSetter||s;t.exports=function(t){return o(u,t)||(u[t]=a&&o(c,t)?c[t]:d("Symbol."+t)),u[t]}},9690:function(t,e,r){var n=r(7725),i=r(8658).includes,o=r(8930),s=r(7938),a=o(function(){return!Array(1).includes()}),l=o(function(){return[,1].includes(void 0,1)});n({target:"Array",proto:!0,forced:a||l},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},4495:function(t,e,r){var n=r(7725),i=r(1724),o=r(6013),s=r(592),a=r(6994),l=r(8930),c=l(function(){return 4294967297!==[].push.call({length:4294967296},1)}),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=c||!u();n({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=i(this),r=o(e),n=arguments.length;a(r+n);for(var l=0;l<n;l++)e[r]=arguments[l],r++;return s(e,r),r}})},7622:function(t,e,r){var n=r(7725),i=r(3405),o=r(462),s=r(3162),a=r(8252),l=r(8778),c=r(7893),u=r(721),d=r(8930),h=r(9522),p=r(2666),f=r(2274).IteratorPrototype,g=r(7101),y=r(4214),v="constructor",m="Iterator",k=p("toStringTag"),b=TypeError,T=i[m],w=y||!a(T)||T.prototype!==f||!d(function(){T({})}),x=function(){if(o(this,f),l(this)===f)throw new b("Abstract class Iterator not directly constructable")},S=function(t,e){g?c(f,t,{configurable:!0,get:function(){return e},set:function(e){if(s(this),this===f)throw new b("You can't redefine this property");h(this,t)?this[t]=e:u(this,t,e)}}):f[t]=e};h(f,k)||S(k,m),!w&&h(f,v)&&f[v]!==Object||S(v,x),x.prototype=f,n({global:!0,constructor:!0,forced:w},{Iterator:x})},3149:function(t,e,r){var n=r(7725),i=r(3176),o=r(6841),s=r(2481),a=r(3162),l=r(6226),c=r(1380),u=r(2229),d=u("every",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{every:function(t){a(this);try{s(t)}catch(n){c(this,"throw",n)}if(d)return i(d,this,t);var e=l(this),r=0;return!o(e,function(e,n){if(!t(e,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},746:function(t,e,r){var n=r(7725),i=r(3176),o=r(2481),s=r(3162),a=r(6226),l=r(7211),c=r(9836),u=r(4214),d=r(1380),h=r(6483),p=r(2229),f=!u&&!h("filter",function(){}),g=!u&&!f&&p("filter",TypeError),y=u||f||g,v=l(function(){var t,e,r,n=this.iterator,o=this.predicate,a=this.next;while(1){if(t=s(i(a,n)),e=this.done=!!t.done,e)return;if(r=t.value,c(n,o,[r,this.counter++],!0))return r}});n({target:"Iterator",proto:!0,real:!0,forced:y},{filter:function(t){s(this);try{o(t)}catch(e){d(this,"throw",e)}return g?i(g,this,t):new v(a(this),{predicate:t})}})},4059:function(t,e,r){var n=r(7725),i=r(3176),o=r(6841),s=r(2481),a=r(3162),l=r(6226),c=r(1380),u=r(2229),d=u("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{find:function(t){a(this);try{s(t)}catch(n){c(this,"throw",n)}if(d)return i(d,this,t);var e=l(this),r=0;return o(e,function(e,n){if(t(e,r++))return n(e)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},1119:function(t,e,r){var n=r(7725),i=r(3176),o=r(6841),s=r(2481),a=r(3162),l=r(6226),c=r(1380),u=r(2229),d=u("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{forEach:function(t){a(this);try{s(t)}catch(n){c(this,"throw",n)}if(d)return i(d,this,t);var e=l(this),r=0;o(e,function(e){t(e,r++)},{IS_RECORD:!0})}})},8660:function(t,e,r){var n=r(7725),i=r(3176),o=r(2481),s=r(3162),a=r(6226),l=r(7211),c=r(9836),u=r(1380),d=r(6483),h=r(2229),p=r(4214),f=!p&&!d("map",function(){}),g=!p&&!f&&h("map",TypeError),y=p||f||g,v=l(function(){var t=this.iterator,e=s(i(this.next,t)),r=this.done=!!e.done;if(!r)return c(t,this.mapper,[e.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:y},{map:function(t){s(this);try{o(t)}catch(e){u(this,"throw",e)}return g?i(g,this,t):new v(a(this),{mapper:t})}})},882:function(t,e,r){var n=r(7725),i=r(6841),o=r(2481),s=r(3162),a=r(6226),l=r(1380),c=r(2229),u=r(5990),d=r(8930),h=TypeError,p=d(function(){[].keys().reduce(function(){},void 0)}),f=!p&&c("reduce",h);n({target:"Iterator",proto:!0,real:!0,forced:p||f},{reduce:function(t){s(this);try{o(t)}catch(d){l(this,"throw",d)}var e=arguments.length<2,r=e?void 0:arguments[1];if(f)return u(f,this,e?[t]:[t,r]);var n=a(this),c=0;if(i(n,function(n){e?(e=!1,r=n):r=t(r,n,c),c++},{IS_RECORD:!0}),e)throw new h("Reduce of empty iterator with no initial value");return r}})},5528:function(t,e,r){var n=r(7725),i=r(3176),o=r(6841),s=r(2481),a=r(3162),l=r(6226),c=r(1380),u=r(2229),d=u("some",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{some:function(t){a(this);try{s(t)}catch(n){c(this,"throw",n)}if(d)return i(d,this,t);var e=l(this),r=0;return o(e,function(e,n){if(t(e,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}!function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}();var n={};if(r.r(n),r.d(n,{VanillaGantt:function(){return u}}),"undefined"!==typeof window){var i=window.document.currentScript,o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(r.p=o[1])}r(9690),r(4495),r(7622),r(3149),r(746),r(4059),r(1119),r(8660),r(882),r(5528);const s="http://www.w3.org/2000/svg",a=36e5,l={visible:!0,customLayout:null,className:"",offsetX:12,offsetY:12},c={records:[],recordKeyField:"id",taskKeyField:"id",minDate:"",maxDate:"",rowHeight:78,taskHeight:36,headerRowHeight:24,taskListTable:{tableWidth:"auto",minTableWidth:120,maxTableWidth:640,columnResizable:!0,headerStyle:null,columns:[{field:"name",title:"工位",width:170,tree:!0}],renderHeader:null,renderCell:null},timelineHeader:{backgroundColor:"#fff",colWidth:56,style:null,scales:[{unit:"day",step:1,rowHeight:24},{unit:"hour",step:2,rowHeight:24,colWidth:56}]},taskBar:{tasksField:"tasks",startDateField:"startDate",endDateField:"endDate",progressField:"progress",laneField:"lane",statusField:"status",labelText:"title",subLabelText:"subtitle",barStyle:null,projectStyle:null,customLayout:null,clip:!0,draggable:!0,dragStep:6e4,tooltip:!1,onClick:null,onContextMenu:null,onMouseEnter:null,onMouseLeave:null,onDragStart:null,onDrag:null,onDragEnd:null,lanes:[{key:"plan",offset:8,height:36},{key:"load",offset:52,height:6},{key:"unload",offset:66,height:6}]},dependency:{links:[],linkLineStyle:null,showLinks:!1,highlightConnected:!1,dimOpacity:.18},grid:{backgroundColor:"#f7fbfb",alternatingBackgroundColor:"#f8fbfb",verticalLine:{lineColor:"#e8eeee"},horizontalLine:{lineColor:"#edf1f2"},backgroundRanges:[],rowBackgroundRanges:[]},markLine:null,onScroll:null};class u{constructor(t,e={}){if(this.container="string"===typeof t?document.querySelector(t):t,!this.container)throw new Error("VanillaGantt requires a valid container.");this.options=d(c,e),this.expandedRows={},this.scrollTop=0,this.scrollLeft=0,this.disposers=[],this.activeDrag=null,this.activeLinkTaskKey=null,this.activeLinkGroupKey=null,this.suppressClickUntil=0,this.suppressClickTaskKey=null,this.seedExpandedRows(this.options.records),this.render()}setOptions(t={}){const e=this.options.records;this.options=d(this.options,t),t.records&&t.records!==e&&this.seedExpandedRows(t.records,!0),this.render()}destroy(){this.cleanup(),this.container.innerHTML=""}cleanup(){this.hideTaskTooltip(),this.disposers.forEach(t=>t()),this.disposers=[]}render(){this.cleanup();const t=m("div","vg");t.style.setProperty("--vg-left-width",`${this.tableWidth}px`),this.rootEl=t;const e=m("div","vg-left"),r=m("div","vg-right");e.append(this.renderLeftHeader(),this.renderLeftBody(),this.renderResizeHandle(t)),r.append(this.renderTimeline(),this.renderBody()),t.append(e,r),this.container.innerHTML="",this.container.append(t),this.scrollEl&&(this.scrollEl.scrollTop=this.scrollTop,this.scrollEl.scrollLeft=this.scrollLeft)}renderLeftHeader(){const t=m("div","vg-left-header");t.style.height=`${this.headerHeight}px`,t.style.gridTemplateColumns=this.tableGridTemplateColumns,p(t,this.taskListTable.headerStyle),this.leftHeaderEl=t;const e=this.resolveContent(this.taskListTable.renderHeader,{gantt:this});return e?t.append(e):this.tableColumns.forEach((e,r)=>{t.append(this.renderTableHeaderCell(e,r))}),t}renderTableHeaderCell(t,e){const r=m("div","vg-table-header-cell"+(t.className?` ${t.className}`:"")),n={...this.taskListTable.headerStyle||{},...t.headerStyle||{}};p(r,n);const i=m("div","vg-table-header-content");i.style.justifyContent=y(t.headerAlign||n.textAlign||t.align||"left");const o=this.resolveContent(t.renderHeader,{column:t,columnIndex:e,gantt:this});return o?i.append(o):i.textContent=t.title||t.field||"",r.append(i),this.isColumnResizable(t)&&r.append(this.renderColumnResizeHandle(t,e)),r}renderColumnResizeHandle(t,e){const r=m("span","vg-column-resize-handle"),n=r=>{const n=r.clientX,i=this.columnWidth(t),o=t=>{const r=i+t.clientX-n;this.resizeColumn(e,r)},s=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",s),r.preventDefault(),r.stopPropagation()};return r.addEventListener("mousedown",n),this.disposers.push(()=>r.removeEventListener("mousedown",n)),r}resizeColumn(t,e){const r=this.sourceTableColumns[t];if(!r)return;const n=Number(r.minWidth||48),i=Number(r.maxWidth||600);r.width=Math.min(i,Math.max(n,Math.round(e))),"number"===typeof this.taskListTable.tableWidth&&(this.taskListTable.tableWidth=this.sourceTableColumns.reduce((t,e)=>t+this.columnWidth(e),0)),this.syncTableLayout()}syncTableLayout(){const t=this.tableWidth;this.rootEl&&this.rootEl.style.setProperty("--vg-left-width",`${t}px`),this.leftHeaderEl&&(this.leftHeaderEl.style.gridTemplateColumns=this.tableGridTemplateColumns),this.leftBodyInner&&Array.from(this.leftBodyInner.children).forEach(t=>{t.style.gridTemplateColumns=this.tableGridTemplateColumns})}renderLeftBody(){const t=m("div","vg-left-body"),e=m("div","vg-left-body-inner");e.style.height=`${this.bodyHeight}px`,e.style.transform=`translateY(-${this.scrollTop}px)`,this.leftBodyInner=e,this.visibleRows.forEach(t=>{const r=m("div","vg-row"+(t.children?" vg-row--group":""));r.style.height=`${t.height||this.options.rowHeight}px`,r.style.gridTemplateColumns=this.tableGridTemplateColumns,this.tableColumns.forEach((e,n)=>{r.append(this.renderTableCell(t,e,n))}),e.append(r)}),t.append(e);const r=t=>{this.scrollEl&&t.deltaY&&(this.scrollEl.scrollTop+=t.deltaY,t.preventDefault())};return t.addEventListener("wheel",r,{passive:!1}),this.disposers.push(()=>t.removeEventListener("wheel",r)),t}renderTableCell(t,e,r){const n=m("div","vg-table-cell"+(e.className?` ${e.className}`:""));n.style.justifyContent=y(e.align||"left");const i=this.getCellValue(t,e,r),o={value:i,record:t,row:t,column:e,columnIndex:r,expanded:this.isExpanded(t),toggle:()=>this.toggleRow(t),gantt:this},s=this.resolveContent(e.renderCell||this.taskListTable.renderCell,o);return s?(n.append(s),this.bindTemplateToggle(n,t),n):(this.isTreeColumn(e,r)?n.append(this.renderTreeCell(t,i)):"load"===e.field?n.append(this.renderLoadCell(t,i)):n.textContent=void 0===i||null===i?"":String(i),n)}renderTreeCell(t,e){const r=m("div","vg-row-name"+(t.children?" vg-row-name--toggle":""));if(r.style.paddingLeft=16*t.level+"px",t.children){const e=m("button","vg-row-toggle");e.type="button",e.setAttribute("aria-label",this.isExpanded(t)?"收起":"展开"),e.setAttribute("aria-expanded",String(this.isExpanded(t))),this.isExpanded(t)&&e.classList.add("vg-row-toggle--expanded"),r.append(e),r.addEventListener("click",()=>this.toggleRow(t))}return r.append(document.createTextNode(void 0===e||null===e?"":String(e))),r}renderLoadCell(t,e){const r=void 0===e?t.load:e;if(void 0===r||null===r)return document.createTextNode("");const n=m("div","vg-row-load"),i=m("i");i.style.width=`${r}%`,i.style.background=this.loadColor(r);const o=m("b");return o.textContent=`${r}%`,o.style.color=this.loadColor(r),n.append(i,o),n}getCellValue(t,e,r){return"function"===typeof e.valueGetter?e.valueGetter({record:t,row:t,column:e,columnIndex:r,gantt:this}):e.field?t[e.field]:void 0}isTreeColumn(t,e){return!0===t.tree||!1!==t.tree&&0===e&&"name"===t.field}isColumnResizable(t){return!1!==t.resizable&&!1!==this.taskListTable.columnResizable}bindTemplateToggle(t,e){e.children&&t.querySelectorAll("[data-vg-toggle]").forEach(t=>{const r=t=>{t.preventDefault(),t.stopPropagation(),this.toggleRow(e)};t.addEventListener("click",r),this.disposers.push(()=>t.removeEventListener("click",r))})}renderResizeHandle(t){const e=m("span","vg-resize-handle"),r=e=>{const r=e.clientX,n=this.tableWidth,i=e=>{const i=n+e.clientX-r;this.taskListTable.tableWidth=Math.min(this.taskListTable.maxTableWidth,Math.max(this.taskListTable.minTableWidth,i)),t.style.setProperty("--vg-left-width",`${this.taskListTable.tableWidth}px`)},o=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",o),e.preventDefault()};return e.addEventListener("mousedown",r),this.disposers.push(()=>e.removeEventListener("mousedown",r)),e}renderTimeline(){const t=m("div","vg-timeline-viewport");t.style.height=`${this.headerHeight}px`,this.timelineHeader.backgroundColor&&(t.style.background=this.timelineHeader.backgroundColor);const e=m("div","vg-timeline-stage");e.style.width=`${this.chartWidth}px`,e.style.transform=`translateX(-${this.scrollLeft}px)`,this.timelineStage=e;const r=k("svg","vg-timeline-svg");b(r,{width:this.chartWidth,height:this.headerHeight,viewBox:`0 0 ${this.chartWidth} ${this.headerHeight}`}),this.timelineHeader.backgroundColor&&(r.style.background=this.timelineHeader.backgroundColor);let n=0;return this.timelineUnitsByScale.forEach((t,e)=>{const i=this.timelineScales[e],o=this.scaleRowHeight(i);t.forEach(t=>{r.append(this.renderTimelineUnit(t,n,o,i,e))}),n+=o}),e.append(r),t.append(e),t}renderTimelineUnit(t,e,r,n,i){const o=k("foreignObject");b(o,{x:t.x,y:e,width:t.width,height:r});const s=this.resolveContent(n.customLayout||this.timelineHeader.customLayout,{dateInfo:t,unit:t,scale:n,scaleIndex:i,major:0===i,gantt:this}),a=this.timelineCellStyle(n);if(s)g(s,this.timelineCustomCellStyle(n)),o.append(s);else{const e=m("div","vg-timeline-cell"+(0===i?" vg-timeline-cell--major":""));f(e,a),e.textContent=t.label,o.append(e)}return o}renderBody(){const t=m("div","vg-scroll"),e=m("div","vg-stage");e.style.width=`${this.chartWidth}px`,e.style.minWidth=`${this.chartWidth}px`;const r=k("svg","vg-svg");b(r,{width:this.chartWidth,height:this.bodyHeight,viewBox:`0 0 ${this.chartWidth} ${this.bodyHeight}`}),r.append(this.renderDefs()),this.appendGrid(r);const n=()=>{this.clearActiveLinkGroup()&&this.render()};r.addEventListener("click",n),this.disposers.push(()=>r.removeEventListener("click",n)),e.append(r),t.append(e);const i=()=>{this.scrollTop=t.scrollTop,this.scrollLeft=t.scrollLeft,this.leftBodyInner&&(this.leftBodyInner.style.transform=`translateY(-${this.scrollTop}px)`),this.timelineStage&&(this.timelineStage.style.transform=`translateX(-${this.scrollLeft}px)`),"function"===typeof this.options.onScroll&&this.options.onScroll({scrollLeft:this.scrollLeft,scrollTop:this.scrollTop})};return t.addEventListener("scroll",i),this.disposers.push(()=>t.removeEventListener("scroll",i)),this.scrollEl=t,t}renderDefs(){const t=k("defs"),e=k("pattern");b(e,{id:"vg-diagonal-stripe",patternUnits:"userSpaceOnUse",width:8,height:8});const r=k("path");return b(r,{d:"M-2,2 l4,-4 M0,8 l8,-8 M6,10 l4,-4",stroke:"#86ddd4","stroke-width":1}),e.append(r),t.append(e),t}appendGrid(t){this.grid.backgroundColor&&t.append(this.rect(0,0,this.chartWidth,this.bodyHeight,this.grid.backgroundColor)),this.backgroundShades.forEach(e=>{t.append(this.rect(e.x,0,e.width,this.bodyHeight,e.fill))}),this.visibleBackgroundRanges.forEach(e=>{const r=this.rect(this.timeToX(e.startDate),0,this.durationWidth(e.startDate,e.endDate),this.bodyHeight,e.color||e.fill||"#edf1f1");r.setAttribute("opacity",void 0===e.opacity?1:e.opacity),t.append(r)}),this.verticalLines.forEach((e,r)=>{const n=this.resolveStyle(this.grid.verticalLine,{index:r,dateIndex:r,date:e.startDate,ganttInstance:this}),i=this.line(e.x,0,e.x,this.bodyHeight,n.lineColor||"#e8eeee");this.applyLineStyle(i,n),t.append(i)}),this.rowLines.forEach((e,r)=>{const n=this.resolveStyle(this.grid.horizontalLine,{index:r,ganttInstance:this}),i=this.line(0,e.y,this.chartWidth,e.y,n.lineColor||"#edf1f2");this.applyLineStyle(i,n),t.append(i)}),this.markLines.forEach(e=>{this.appendMarkLine(t,e)}),this.visibleRowBackgroundRanges.forEach(e=>{const r=this.rect(this.timeToX(e.startDate),this.rowTop(e.recordKey)+(e.offsetY||0),this.durationWidth(e.startDate,e.endDate),e.height||this.options.rowHeight,e.color||e.fill||"#dcf8c9");r.setAttribute("opacity",void 0===e.opacity?1:e.opacity),t.append(r)}),this.stripedTasks.forEach(e=>{const r=this.rect(this.timeToX(this.taskStart(e)),this.taskY(e),this.durationWidth(this.taskStart(e),this.taskEnd(e)),this.taskRenderHeight(e),"url(#vg-diagonal-stripe)");t.append(r)}),this.renderTasks.forEach(e=>{t.append(this.renderTask(e))}),this.visibleLinks.forEach(e=>{this.appendLink(t,e)})}appendMarkLine(t,e){const r=this.timeToX(e.date);if(r<0||r>this.chartWidth)return;const n=e.style||{},i=this.line(r,0,r,this.bodyHeight,n.lineColor||"#35cce0");if(this.applyLineStyle(i,{lineDash:[4,4],...n}),t.append(i),!e.content)return;const o=k("text","vg-mark-line-text");b(o,{x:r+6,y:16,fill:e.contentStyle&&e.contentStyle.color?e.contentStyle.color:n.lineColor||"#35cce0"}),o.textContent=e.content,t.append(o)}appendLink(t,e){const r=this.taskLayoutByKey[e.from],n=this.taskLayoutByKey[e.to];if(!r||!n)return;const i=this.linkRoute(e.type,r,n),o={...this.dependency.linkLineStyle||{},...e.linkLineStyle||{}},s=o.lineColor||e.color||"#168dff",a=this.path(i.d,s);b(a,{fill:"none","stroke-linejoin":"round","stroke-linecap":"round"}),this.applyLineStyle(a,{lineWidth:2,...o}),e.dashed&&a.setAttribute("stroke-dasharray","6 4"),t.append(a),t.append(this.circle(i.start.x,i.start.y,4,s)),t.append(this.arrow(i.end.x,i.end.y,i.direction,s))}linkRoute(t,e,r){const n=e.x,i=e.x+e.width,o=r.x,s=r.x+r.width,a=t||"finish_to_start";let l,c;"start_to_start"===a?(l={x:n,y:e.centerY},c={x:o,y:r.centerY}):"finish_to_finish"===a?(l={x:i,y:e.centerY},c={x:s,y:r.centerY}):"start_to_finish"===a?(l={x:n,y:e.centerY},c={x:s,y:r.centerY}):(l={x:i,y:e.centerY},c={x:o,y:r.centerY});const u=c.x>=l.x?1:-1,d=Math.abs(c.x-l.x),h=u>0?l.x+Math.max(20,d/2):l.x+28;return{start:l,end:c,direction:u,d:`M ${l.x} ${l.y} H ${h} V ${c.y} H ${c.x}`}}renderTask(t){const e=this.durationWidth(this.taskStart(t),this.taskEnd(t)),r=this.taskRenderHeight(t),n=k("foreignObject","vg-task-fo");b(n,{x:this.timeToX(this.taskStart(t)),y:this.taskY(t),width:e,height:r});const i=this.rowById[t.__rowId],o=this.createTaskPayload(t,{row:i,width:e,height:r,x:this.timeToX(this.taskStart(t)),y:this.taskY(t)}),s=this.resolveContent(this.taskBar.customLayout,o);return n.append(s||this.renderDefaultTask(t)),this.isTaskDimmed(t)&&(n.classList.add("vg-task-fo--dimmed"),n.style.opacity=String(void 0===this.dependency.dimOpacity?.18:this.dependency.dimOpacity)),this.bindTaskInteractions(n,t),n}bindTaskInteractions(t,e){this.isTaskDraggable(e)&&t.classList.add("vg-task-fo--draggable");const r=t=>{const r=this.taskKey(e);if(this.suppressClickTaskKey===r&&Date.now()<this.suppressClickUntil)return t.preventDefault(),void t.stopPropagation();const n=this.activateTaskLinkGroup(e);this.callTaskCallback("onClick",e,t),t.stopPropagation(),n&&this.render()},n=t=>{"function"===typeof this.taskBar.onContextMenu&&(t.preventDefault(),this.callTaskCallback("onContextMenu",e,t))},i=t=>{this.callTaskCallback("onMouseEnter",e,t),this.showTaskTooltip(e,t)},o=t=>{this.positionTaskTooltip(t)},s=t=>{this.callTaskCallback("onMouseLeave",e,t),this.hideTaskTooltip()},a=r=>{this.startTaskDrag(t,e,r)};t.addEventListener("click",r),t.addEventListener("contextmenu",n),t.addEventListener("mouseenter",i),t.addEventListener("mousemove",o),t.addEventListener("mouseleave",s),t.addEventListener("pointerdown",a),this.disposers.push(()=>{t.removeEventListener("click",r),t.removeEventListener("contextmenu",n),t.removeEventListener("mouseenter",i),t.removeEventListener("mousemove",o),t.removeEventListener("mouseleave",s),t.removeEventListener("pointerdown",a)})}startTaskDrag(t,e,r){if(!this.isTaskDraggable(e))return;if(void 0!==r.button&&0!==r.button)return;if(r.target&&r.target.closest&&r.target.closest("[data-vg-no-drag]"))return;const n=this.findSourceTask(e);if(!n)return;const i=T(this.taskStart(n)),o=T(this.taskEnd(n));if(!Number.isFinite(i)||!Number.isFinite(o))return;const s=this.createTaskPayload(e,{event:r,sourceTask:n,startDate:new Date(i),endDate:new Date(o),originalStartDate:new Date(i),originalEndDate:new Date(o)});if(!1===this.callTaskCallback("onDragStart",e,r,s))return;this.hideTaskTooltip(),t.classList.add("vg-task-fo--dragging"),t.setPointerCapture&&void 0!==r.pointerId&&t.setPointerCapture(r.pointerId);const a={node:t,task:e,sourceTask:n,pointerId:r.pointerId,startClientX:r.clientX,originalStartTime:i,originalEndTime:o,nextStartTime:i,nextEndTime:o,moved:!1};this.activeDrag=a;const l=t=>this.moveTaskDrag(t),c=t=>{document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c),this.endTaskDrag(t)};document.addEventListener("pointermove",l),document.addEventListener("pointerup",c),document.addEventListener("pointercancel",c),this.disposers.push(()=>{document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c)}),r.preventDefault(),r.stopPropagation()}moveTaskDrag(t){const e=this.activeDrag;if(!e)return;if(void 0!==e.pointerId&&void 0!==t.pointerId&&e.pointerId!==t.pointerId)return;const r=t.clientX-e.startClientX;if(Math.abs(r)<2&&!e.moved)return;const n=this.snapDragDelta(r/this.pxPerMs),i=this.clampDragRange(e.originalStartTime+n,e.originalEndTime+n);e.nextStartTime=i.start,e.nextEndTime=i.end,e.moved=!0,e.node.setAttribute("x",this.timeToX(i.start)),this.callTaskCallback("onDrag",e.task,t,this.createTaskPayload(e.task,{event:t,sourceTask:e.sourceTask,startDate:new Date(i.start),endDate:new Date(i.end),originalStartDate:new Date(e.originalStartTime),originalEndDate:new Date(e.originalEndTime)})),t.preventDefault()}endTaskDrag(t){const e=this.activeDrag;if(e){if(this.activeDrag=null,e.node.classList.remove("vg-task-fo--dragging"),e.node.releasePointerCapture&&void 0!==e.pointerId)try{e.node.releasePointerCapture(e.pointerId)}catch(r){}e.moved&&(this.updateTaskTime(e.sourceTask,e.nextStartTime,e.nextEndTime),this.suppressClickTaskKey=this.taskKey(e.task),this.suppressClickUntil=Date.now()+300,this.callTaskCallback("onDragEnd",e.task,t,this.createTaskPayload(e.task,{event:t,sourceTask:e.sourceTask,startDate:new Date(e.nextStartTime),endDate:new Date(e.nextEndTime),originalStartDate:new Date(e.originalStartTime),originalEndDate:new Date(e.originalEndTime)})),this.render())}}showTaskTooltip(t,e){const r=this.taskTooltip;if(!r||!1===r.visible)return;const n=this.createTaskPayload(t,{event:e}),i=this.resolveContent(r.customLayout,n)||this.renderDefaultTaskTooltip(n);if(!i)return;this.hideTaskTooltip();const o=m("div","vg-tooltip"+(r.className?` ${r.className}`:""));o.append(i),document.body.append(o),this.tooltipEl=o,this.positionTaskTooltip(e)}positionTaskTooltip(t){if(!this.tooltipEl||!t)return;const e=this.taskTooltip||{},r=void 0===e.offsetX?12:Number(e.offsetX),n=void 0===e.offsetY?12:Number(e.offsetY),i=this.tooltipEl.getBoundingClientRect(),o=window.innerWidth-i.width-8,s=window.innerHeight-i.height-8,a=Math.max(8,Math.min(o,t.clientX+r)),l=Math.max(8,Math.min(s,t.clientY+n));this.tooltipEl.style.left=`${a}px`,this.tooltipEl.style.top=`${l}px`}hideTaskTooltip(){this.tooltipEl&&(this.tooltipEl.remove(),this.tooltipEl=null)}renderDefaultTaskTooltip(t){const e=m("div","vg-tooltip-default"),r=m("div","vg-tooltip-title");r.textContent=this.taskLabel(t.task,this.taskBar.labelText);const n=m("div","vg-tooltip-time");n.textContent=`${w(t.startDate)} - ${w(t.endDate)}`,e.append(r,n);const i=this.taskLabel(t.task,this.taskBar.subLabelText);if(i){const t=m("div","vg-tooltip-meta");t.textContent=i,e.append(t)}return e}createTaskPayload(t,e={}){const r=e.row||this.rowById[t.__rowId],n=e.sourceTask||this.findSourceTask(t)||t,i=e.startDate?e.startDate.getTime():T(this.taskStart(n)),o=e.endDate?e.endDate.getTime():T(this.taskEnd(n)),s=void 0===e.width?this.durationWidth(this.taskStart(t),this.taskEnd(t)):e.width,a=void 0===e.height?this.taskRenderHeight(t):e.height;return{taskRecord:n,task:t,sourceTask:n,rowRecord:r,row:r,taskKey:this.taskKey(t),rowKey:t.__rowId,x:void 0===e.x?this.timeToX(this.taskStart(t)):e.x,y:void 0===e.y?this.taskY(t):e.y,width:s,height:a,startDate:new Date(i),endDate:new Date(o),originalStartDate:e.originalStartDate,originalEndDate:e.originalEndDate,progress:this.taskProgress(t),event:e.event,ganttInstance:this,gantt:this}}callTaskCallback(t,e,r,n){const i=this.taskBar[t];if("function"===typeof i)return i(n||this.createTaskPayload(e,{event:r}))}isTaskDraggable(t){if(void 0!==t.draggable)return!1!==t.draggable;if(t.parentAggregate)return!1;const e=this.taskBar.draggable;return"function"===typeof e?!1!==e(this.createTaskPayload(t)):!1!==e}findSourceTask(t){const e=t.__rowId,r=this.taskKey(t);if(!e||!r)return null;const n=this.findRecordByKey(e),i=n&&Array.isArray(n[this.taskBar.tasksField])?n[this.taskBar.tasksField]:[];return i.find(t=>this.taskKey(t)===r)||null}findRecordByKey(t,e=this.options.records){for(const r of e||[]){if(this.recordKey(r)===t)return r;if(r.children){const e=this.findRecordByKey(t,r.children);if(e)return e}}return null}snapDragDelta(t){const e=Number(this.taskBar.dragStep||0);return e?Math.round(t/e)*e:t}clampDragRange(t,e){const r=e-t;if(r>=this.rangeMs)return{start:this.startTime,end:this.endTime};let n=t,i=e;return n<this.startTime&&(n=this.startTime,i=n+r),i>this.endTime&&(i=this.endTime,n=i-r),{start:n,end:i}}updateTaskTime(t,e,r){const n=this.taskBar.startDateField,i=this.taskBar.endDateField;t[n]=this.createTimeValueLike(t[n],e),t[i]=this.createTimeValueLike(t[i],r)}createTimeValueLike(t,e){return t instanceof Date?new Date(e):"number"===typeof t?e:x(new Date(e))}renderDefaultTask(t){const e=this.taskStatus(t),r=m("div",`vg-task vg-task--${e||"normal"}`),n=this.taskStyle(t);this.applyTaskStyle(r,n,t);const i=m("div","vg-task-title");i.textContent=this.taskLabel(t,this.taskBar.labelText);const o=m("div","vg-task-meta");o.textContent=this.taskLabel(t,this.taskBar.subLabelText),r.append(i,o);const s=this.taskProgress(t);if(void 0!==s){const t=m("div","vg-task-progress"),e=m("i");e.style.width=`${s}%`,n.completedBarColor&&(e.style.background=n.completedBarColor),t.append(e),r.append(t)}if(t.locked){const t=m("span","vg-task-lock");t.textContent="▣",r.append(t)}return r}applyTaskStyle(t,e,r){if(!e)return;const n=this.taskProgress(r),i=n>=100&&e.completedBarColor?e.completedBarColor:e.barColor;i&&(t.style.background=i),e.borderColor&&(t.style.borderColor=e.borderColor),void 0!==e.borderLineWidth&&(t.style.borderWidth=`${e.borderLineWidth}px`),void 0!==e.borderWidth&&(t.style.borderWidth=`${e.borderWidth}px`),void 0!==e.cornerRadius&&(t.style.borderRadius=`${e.cornerRadius}px`)}rect(t,e,r,n,i){const o=k("rect");return b(o,{x:t,y:e,width:r,height:n,fill:i}),o}line(t,e,r,n,i){const o=k("line");return b(o,{x1:t,y1:e,x2:r,y2:n,stroke:i}),o}circle(t,e,r,n){const i=k("circle");return b(i,{cx:t,cy:e,r:r,fill:n}),i}path(t,e){const r=k("path","vg-link-path");return b(r,{d:t,stroke:e}),r}arrow(t,e,r,n){const i=k("path","vg-link-arrow"),o=r>=0?`M ${t} ${e} l -8 -4 v 8 Z`:`M ${t} ${e} l 8 -4 v 8 Z`;return b(i,{d:o,fill:n}),i}applyLineStyle(t,e={}){void 0!==e.lineWidth&&t.setAttribute("stroke-width",e.lineWidth),e.lineDash&&t.setAttribute("stroke-dasharray",e.lineDash.join(" "))}resolveStyle(t,e){return"function"===typeof t?t(e)||{}:t||{}}resolveContent(t,e){if("function"!==typeof t)return null;const r=t(e);if(void 0===r||null===r)return null;if(r instanceof Node)return r;if(r.rootContainer instanceof Node)return r.rootContainer;const n=document.createElement("template");return n.innerHTML=String(r).trim(),n.content}seedExpandedRows(t,e=!1){t.forEach(t=>{if(t.children){const r=this.recordKey(t);(e&&void 0!==t.expanded||void 0===this.expandedRows[r])&&(this.expandedRows[r]=!1!==t.expanded),this.seedExpandedRows(t.children,e)}})}isExpanded(t){return!!t.children&&!1!==this.expandedRows[this.recordKey(t)]}toggleRow(t){if(!t.children)return;const e=this.recordKey(t);this.expandedRows[e]=!this.isExpanded(t),this.render()}recordKey(t){return t.__recordKey||t[this.options.recordKeyField]}taskKey(t){return t[this.options.taskKeyField]}taskStart(t){return t[this.taskBar.startDateField]}taskEnd(t){return t[this.taskBar.endDateField]}taskProgress(t){return t[this.taskBar.progressField]}taskLane(t){return t[this.taskBar.laneField]}taskStatus(t){return t[this.taskBar.statusField]}taskLabel(t,e){return e?"function"===typeof e?e(t):void 0===t[e]?String(e):String(t[e]):""}taskStyle(t){const e=t.parentAggregate?this.taskBar.projectStyle:this.taskBar.barStyle;return this.resolveStyle(e,{taskRecord:t,index:this.renderTasks.findIndex(e=>this.taskKey(e)===this.taskKey(t)),startDate:new Date(T(this.taskStart(t))),endDate:new Date(T(this.taskEnd(t))),ganttInstance:this})}isTaskDimmed(t){if(!this.dependency.highlightConnected)return!1;const e=this.taskKey(t);return!!e&&(!!this.visibleLinks.length&&!this.connectedTaskKeys[e])}activateTaskLinkGroup(t){const e=this.taskKey(t),r=this.firstLinkGroupKeyByTask(e),n=r?e:null,i=this.activeLinkTaskKey!==n||this.activeLinkGroupKey!==r;return this.activeLinkTaskKey=n,this.activeLinkGroupKey=r,i}clearActiveLinkGroup(){return!(!this.activeLinkTaskKey&&!this.activeLinkGroupKey)&&(this.activeLinkTaskKey=null,this.activeLinkGroupKey=null,!0)}timeToX(t){return(T(t)-this.startTime)*this.pxPerMs}durationWidth(t,e){return Math.max(this.taskMinWidth,this.timeToX(e)-this.timeToX(t))}rowTop(t){let e=0;for(const r of this.visibleRows){if(this.recordKey(r)===t)return e;e+=r.height||this.options.rowHeight}return 0}taskY(t){return this.rowTop(t.__rowId)+this.taskOffsetY(t)}taskOffsetY(t){if(t.parentAggregate&&void 0!==t.offsetY)return t.offsetY;const e=this.taskLane(t);return e&&this.laneByKey[e]?this.laneByKey[e].offset:void 0===t.offsetY?10:t.offsetY}taskRenderHeight(t){if(t.parentAggregate&&void 0!==t.height)return t.height;const e=this.taskLane(t);if(e&&this.laneByKey[e])return this.laneByKey[e].height;if(t.height)return t.height;const r=this.taskStyle(t);return r.width||this.options.taskHeight}createUnits(t,e){const r=[],n=t.unit||"hour",i=t.step||1;let o=this.floorDate(new Date(this.startTime),n,t.startOfWeek),s=0;while(o.getTime()<this.endTime){const l=Math.max(o.getTime(),this.startTime),c=this.addUnit(o,n,i),u=Math.min(c.getTime(),this.endTime);if(u>l){const c={type:n,unit:n,step:i,scaleIndex:e,dateIndex:s,key:`${n}-${o.toISOString()}`,title:this.formatUnitLabel(o,n),startDate:new Date(l),endDate:new Date(u),days:Math.max(1,Math.ceil((u-l)/(24*a))),x:this.timeToX(l),width:Math.max(1,this.timeToX(u)-this.timeToX(l))};c.label=this.formatTimelineLabel(t,c),r.push(c),s+=1}o=c}return r}formatTimelineLabel(t,e){return"function"===typeof t.format?t.format(e):this.formatUnitLabel(e.startDate,t.unit)}floorDate(t,e,r="monday"){const n=new Date(t);if(n.setSeconds(0,0),"minute"!==e&&n.setMinutes(0),["minute","hour"].includes(e)||n.setHours(0),"week"===e){const t=n.getDay()||7,e="sunday"===r?n.getDay():t-1;n.setDate(n.getDate()-e)}return"month"===e&&n.setDate(1),"year"===e&&(n.setMonth(0),n.setDate(1)),n}addUnit(t,e,r=1){const n=new Date(t);return"minute"===e?n.setMinutes(n.getMinutes()+r):"hour"===e?n.setHours(n.getHours()+r):"day"===e?n.setDate(n.getDate()+r):"week"===e?n.setDate(n.getDate()+7*r):"month"===e?n.setMonth(n.getMonth()+r):"year"===e&&n.setFullYear(n.getFullYear()+r),n}unitToMs(t){return"year"===t?8760*a:"month"===t?720*a:"week"===t?168*a:"day"===t?24*a:"minute"===t?6e4:a}formatUnitLabel(t,e){const r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return"year"===e?`${t.getFullYear()}`:"month"===e?`${t.getFullYear()}-${r}`:"week"===e?`${r}-${n}周`:"day"===e?`${r}-${n}`:"minute"===e?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:String(t.getHours()).padStart(2,"0")}scaleRowHeight(t){return t.rowHeight||this.options.headerRowHeight}timelineCellStyle(t){const e={...this.timelineHeader.style||{},...t.style||{}};return!e.backgroundColor&&this.timelineHeader.backgroundColor&&(e.backgroundColor=this.timelineHeader.backgroundColor),e}timelineCustomCellStyle(t){return{...this.timelineHeader.style||{},...t.style||{}}}getDescendantRecordKeys(t){const e=[],r=t=>{t.forEach(t=>{e.push(this.recordKey(t)),t.children&&r(t.children)})};return r(t.children||[]),e}overlapsRange(t,e){return T(e)>this.startTime&&T(t)<this.endTime}isPrimaryTask(t){if(t.logistics)return!1;const e=this.taskLane(t);return!e||("plan"===e||String(e).startsWith("plan-"))}isExpandedParentRow(t){const e=this.rowById[t];return e&&e.children&&this.isExpanded(e)}aggregateWorkStatus(t){return t.some(t=>"severe-delay"===t.workStatus)?"severe-delay":t.some(t=>"slight-delay"===t.workStatus)?"slight-delay":t.every(t=>"not-started"===t.workStatus)?"not-started":"progress-normal"}loadColor(t){return t>=90?"#ff4d5a":t>=70?"#f7a600":"#43c51a"}get taskListTable(){return this.options.taskListTable||{}}get timelineHeader(){return this.options.timelineHeader||{}}get taskBar(){return this.options.taskBar||{}}get taskTooltip(){const t=this.taskBar.tooltip;return!1===t||void 0===t||null===t?null:!0===t?l:{...l,...t}}get dependency(){return this.options.dependency||{}}get grid(){return this.options.grid||{}}get tableWidth(){return"number"===typeof this.taskListTable.tableWidth?this.taskListTable.tableWidth:this.tableColumns.reduce((t,e)=>t+this.columnWidth(e),0)}get tableColumns(){return this.sourceTableColumns.map(t=>({width:120,...t}))}get sourceTableColumns(){return this.taskListTable.columns&&this.taskListTable.columns.length?this.taskListTable.columns:c.taskListTable.columns}get tableGridTemplateColumns(){return this.tableColumns.map((t,e)=>{const r=this.columnWidth(t);return e===this.tableColumns.length-1?`minmax(${r}px, 1fr)`:`${r}px`}).join(" ")}columnWidth(t){return Number(t.width||t.minWidth||120)}get startTime(){const t=this.options.minDate||this.derivedStartTime;return T(t)}get endTime(){const t=this.options.maxDate||this.derivedEndTime;return T(t)}get derivedStartTime(){const t=this.allTasks.map(t=>T(this.taskStart(t))).filter(Number.isFinite);return t.length?Math.min(...t):Date.now()}get derivedEndTime(){const t=this.allTasks.map(t=>T(this.taskEnd(t))).filter(Number.isFinite);return t.length?Math.max(...t):this.derivedStartTime+24*a}get headerHeight(){return this.timelineScales.reduce((t,e)=>t+this.scaleRowHeight(e),0)}get bodyHeight(){return this.visibleRows.reduce((t,e)=>t+(e.height||this.options.rowHeight),0)}get rangeMs(){return Math.max(1,this.endTime-this.startTime)}get baseTimelineScale(){const t=this.timelineScales;return t[t.length-1]||c.timelineHeader.scales[1]}get scaleMs(){return this.unitToMs(this.baseTimelineScale.unit)*(this.baseTimelineScale.step||1)}get scalePx(){return this.baseTimelineScale.colWidth||this.timelineHeader.colWidth||c.timelineHeader.colWidth}get pxPerMs(){return this.scalePx/this.scaleMs}get chartWidth(){return Math.max(1,Math.ceil(this.rangeMs/this.scaleMs*this.scalePx))}get timelineScales(){return(this.timelineHeader.scales||[]).filter(t=>!1!==t.visible)}get timelineUnitsByScale(){return this.timelineScales.map((t,e)=>this.createUnits(t,e))}get majorUnits(){return this.timelineUnitsByScale[0]||[]}get baseUnits(){const t=this.timelineUnitsByScale;return t[t.length-1]||[]}get verticalLines(){return this.baseUnits.map(t=>({key:`line-${t.key}`,x:t.x,startDate:t.startDate}))}get rowLines(){let t=0;return this.visibleRows.map(e=>(t+=e.height||this.options.rowHeight,{key:this.recordKey(e),y:t}))}get backgroundShades(){const t=this.grid.alternatingBackgroundColor;return t?this.majorUnits.filter((t,e)=>e%2===0).map(e=>({key:`shade-${e.key}`,x:e.x,width:e.width,fill:t})):[]}get flatRows(){const t=[],e=(r,n=0)=>{r.forEach(r=>{t.push({...r,__recordKey:this.recordKey(r),level:n}),r.children&&e(r.children,n+1)})};return e(this.options.records),t}get visibleRows(){const t=[],e=(r,n=0)=>{r.forEach(r=>{const i={...r,__recordKey:this.recordKey(r),level:n};t.push(i),r.children&&this.isExpanded(i)&&e(r.children,n+1)})};return e(this.options.records),t}get visibleRowIds(){return this.visibleRows.reduce((t,e)=>(t[this.recordKey(e)]=!0,t),{})}get rowById(){return this.flatRows.reduce((t,e)=>(t[this.recordKey(e)]=e,t),{})}get laneByKey(){return(this.taskBar.lanes||[]).reduce((t,e)=>(t[e.key]=e,t),{})}get allTasks(){const t=[],e=this.taskBar.tasksField,r=n=>{n.forEach(n=>{const i=this.recordKey(n),o=Array.isArray(n[e])?n[e]:[];o.forEach(e=>{t.push({...e,__rowId:i})}),n.children&&r(n.children)})};return r(this.options.records),t}get renderTasks(){return[...this.parentTimelineTasks,...this.visibleTasks]}get stripedTasks(){return this.renderTasks.filter(t=>t.striped)}get visibleTasks(){return this.allTasks.filter(t=>{const e=this.rowById[t.__rowId];return e&&!e.children&&this.visibleRowIds[t.__rowId]&&this.overlapsRange(this.taskStart(t),this.taskEnd(t))})}get parentTimelineTasks(){const t=[];return this.visibleRows.forEach(e=>{if(!e.children||this.isExpanded(e))return;const r=this.getDescendantRecordKeys(e),n=this.allTasks.filter(t=>r.includes(t.__rowId)&&this.isPrimaryTask(t)&&this.overlapsRange(this.taskStart(t),this.taskEnd(t)));if(!n.length)return;const i=Math.min(...n.map(t=>T(this.taskStart(t)))),o=Math.max(...n.map(t=>T(this.taskEnd(t)))),s=n.filter(t=>void 0!==this.taskProgress(t)),a=s.length?Math.round(s.reduce((t,e)=>t+this.taskProgress(e),0)/s.length):void 0;t.push({[this.options.taskKeyField]:`${this.recordKey(e)}__aggregate`,[this.taskBar.startDateField]:i,[this.taskBar.endDateField]:o,[this.taskBar.progressField]:a,[this.taskBar.statusField]:this.taskStatus(n[0]),title:e.name,subtitle:`${n.length} 个工单`,workStatus:this.aggregateWorkStatus(n),completed:n.every(t=>t.completed),predecessorIncomplete:n.some(t=>t.predecessorIncomplete),height:Math.max(28,(e.height||this.options.rowHeight)-12),offsetY:6,parentAggregate:!0,__rowId:this.recordKey(e)})}),t}get visibleBackgroundRanges(){return(this.grid.backgroundRanges||[]).filter(t=>T(t.endDate)>this.startTime&&T(t.startDate)<this.endTime)}get visibleRowBackgroundRanges(){return(this.grid.rowBackgroundRanges||[]).filter(t=>this.visibleRowIds[t.recordKey]&&!this.isExpandedParentRow(t.recordKey)&&T(t.endDate)>this.startTime&&T(t.startDate)<this.endTime)}get markLines(){return this.options.markLine&&!0!==this.options.markLine?Array.isArray(this.options.markLine)?this.options.markLine:[this.options.markLine]:[]}get taskLayoutByKey(){return this.renderTasks.reduce((t,e)=>{const r=this.taskKey(e);if(!r)return t;const n=this.taskY(e),i=this.taskRenderHeight(e);return t[r]={task:e,x:this.timeToX(this.taskStart(e)),y:n,width:this.durationWidth(this.taskStart(e),this.taskEnd(e)),height:i,centerY:n+i/2},t},{})}get visibleLinks(){return this.activeNormalizedLinks.filter(t=>this.taskLayoutByKey[t.from]&&this.taskLayoutByKey[t.to])}get activeNormalizedLinks(){return this.activeLinkGroupKey?this.normalizedLinks.filter(t=>t.__groupKey===this.activeLinkGroupKey):!0===this.dependency.showLinks?this.normalizedLinks:[]}get normalizedLinks(){const t=[];return(this.dependency.links||[]).forEach((e,r)=>{const n=v(e.from),i=v(e.to),o=void 0===e.id||null===e.id?`link-${r}`:String(e.id);n.forEach(r=>{i.forEach(n=>{void 0!==r&&null!==r&&void 0!==n&&null!==n&&t.push({...e,from:r,to:n,__groupKey:o})})})}),t}firstLinkGroupKeyByTask(t){if(void 0===t||null===t)return null;const e=this.normalizedLinks.find(e=>e.from===t||e.to===t);return e?e.__groupKey:null}get connectedTaskKeys(){return this.visibleLinks.reduce((t,e)=>(t[e.from]=!0,t[e.to]=!0,t),{})}get taskMinWidth(){if("function"===typeof this.taskBar.barStyle)return 4;const t=this.resolveStyle(this.taskBar.barStyle,{});return t.minSize||4}}function d(t,e){const r=t.taskBar||{},n=e.taskBar||{};return{...t,...e,taskListTable:{...t.taskListTable||{},...e.taskListTable||{}},timelineHeader:{...t.timelineHeader||{},...e.timelineHeader||{},scales:e.timelineHeader&&e.timelineHeader.scales?e.timelineHeader.scales:t.timelineHeader&&t.timelineHeader.scales||[]},taskBar:{...r,...n,tooltip:h(r.tooltip,n.tooltip),lanes:n.lanes?n.lanes:r.lanes||[]},dependency:{...t.dependency||{},...e.dependency||{},links:e.dependency&&e.dependency.links?e.dependency.links:t.dependency&&t.dependency.links||[]},grid:{...t.grid||{},...e.grid||{},backgroundRanges:e.grid&&e.grid.backgroundRanges?e.grid.backgroundRanges:t.grid&&t.grid.backgroundRanges||[],rowBackgroundRanges:e.grid&&e.grid.rowBackgroundRanges?e.grid.rowBackgroundRanges:t.grid&&t.grid.rowBackgroundRanges||[]},records:e.records||t.records||[]}}function h(t,e){return void 0===e?t:!1===e||!0===e||null===e||"object"!==typeof e||Array.isArray(e)?e:{..."object"===typeof t&&t?t:{},...e}}function p(t,e={}){e&&(e.backgroundColor&&(t.style.background=e.backgroundColor),e.color&&(t.style.color=e.color),e.fontSize&&(t.style.fontSize=`${e.fontSize}px`),e.fontWeight&&(t.style.fontWeight=e.fontWeight))}function f(t,e={}){e.backgroundColor&&(t.style.background=e.backgroundColor),e.color&&(t.style.color=e.color),e.fontSize&&(t.style.fontSize=`${e.fontSize}px`),e.fontWeight&&(t.style.fontWeight=e.fontWeight),e.textAlign&&(t.style.justifyContent=y(e.textAlign))}function g(t,e={}){if(!e||!Object.keys(e).length)return;const r=11===t.nodeType?t.firstElementChild:t;r instanceof HTMLElement&&f(r,e)}function y(t){return"left"===t||"start"===t?"flex-start":"right"===t||"end"===t?"flex-end":"center"}function v(t){return Array.isArray(t)?t:void 0===t||null===t?[]:[t]}function m(t,e=""){const r=document.createElement(t);return e&&(r.className=e),r}function k(t,e=""){const r=document.createElementNS(s,t);return e&&r.setAttribute("class",e),r}function b(t,e){Object.keys(e).forEach(r=>{void 0!==e[r]&&null!==e[r]&&t.setAttribute(r,e[r])})}function T(t){return"number"===typeof t?t:t instanceof Date?t.getTime():new Date(t).getTime()}function w(t){const e=t instanceof Date?t:new Date(t),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0");return`${e.getFullYear()}-${r}-${n} ${i}:${o}`}function x(t){const e=t instanceof Date?t:new Date(t),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return`${e.getFullYear()}-${r}-${n}T${i}:${o}:${s}`}return n}()});
2
+ //# sourceMappingURL=VanillaGantt.umd.min.js.map