Socket
Socket
Sign inDemoInstall

v-gantt-chart

Package Overview
Dependencies
12
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.5 to 1.3.6

2

dist/v-gantt-chart.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("vGanttChart",[],e):"object"==typeof exports?exports.vGanttChart=e():t.vGanttChart=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=19)}([function(t,e,n){"use strict";function r(t,e,n,r,i,a,s,o){var c="function"==typeof t?t.options:t;e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId="data-v-"+a);var l;if(s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}e.a=r},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",a="week",s="month",o="quarter",c="year",l=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,u=/\[([^\]]+)]|Y{2,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,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},h={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,s),i=e-r<0,a=t.clone().add(n+(i?-1:1),s);return Number(-(n+(e-r)/(i?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(l){return{M:s,y:c,w:a,d:i,h:r,m:n,s:e,ms:t,Q:o}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={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("_")},p="en",g={};g[p]=d;var v=function(t){return t instanceof _},m=function(t,e,n){var r;if(!t)return null;if("string"==typeof t)g[t]&&(r=t),e&&(g[t]=e,r=t);else{var i=t.name;g[i]=t,r=i}return n||(p=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new _(r)},b=h;b.l=m,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var _=function(){function f(t){this.$L=this.$L||m(t.locale,null,!0)||p,this.parse(t)}var h=f.prototype;return h.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},h.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},h.$utils=function(){return b},h.isValid=function(){return!("Invalid Date"===this.$d.toString())},h.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},h.isAfter=function(t,e){return y(t)<this.startOf(e)},h.isBefore=function(t,e){return this.endOf(e)<y(t)},h.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},h.year=function(t){return this.$g(t,"$y",c)},h.month=function(t){return this.$g(t,"$M",s)},h.day=function(t){return this.$g(t,"$W",i)},h.date=function(t){return this.$g(t,"$D","date")},h.hour=function(t){return this.$g(t,"$H",r)},h.minute=function(t){return this.$g(t,"$m",n)},h.second=function(t){return this.$g(t,"$s",e)},h.millisecond=function(e){return this.$g(e,"$ms",t)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(t,o){var l=this,u=!!b.u(o)||o,f=b.p(t),h=function(t,e){var n=b.w(l.$u?Date.UTC(l.$y,e,t):new Date(l.$y,e,t),l);return u?n:n.endOf(i)},d=function(t,e){return b.w(l.toDate()[t].apply(l.toDate(),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),l)},p=this.$W,g=this.$M,v=this.$D,m="set"+(this.$u?"UTC":"");switch(f){case c:return u?h(1,0):h(31,11);case s:return u?h(1,g):h(0,g+1);case a:var y=this.$locale().weekStart||0,_=(p<y?p+7:p)-y;return h(u?v-_:v+(6-_),g);case i:case"date":return d(m+"Hours",0);case r:return d(m+"Minutes",1);case n:return d(m+"Seconds",2);case e:return d(m+"Milliseconds",3);default:return this.clone()}},h.endOf=function(t){return this.startOf(t,!1)},h.$set=function(a,o){var l,u=b.p(a),f="set"+(this.$u?"UTC":""),h=(l={},l[i]=f+"Date",l.date=f+"Date",l[s]=f+"Month",l[c]=f+"FullYear",l[r]=f+"Hours",l[n]=f+"Minutes",l[e]=f+"Seconds",l[t]=f+"Milliseconds",l)[u],d=u===i?this.$D+(o-this.$W):o;if(u===s||u===c){var p=this.clone().set("date",1);p.$d[h](d),p.init(),this.$d=p.set("date",Math.min(this.$D,p.daysInMonth())).toDate()}else h&&this.$d[h](d);return this.init(),this},h.set=function(t,e){return this.clone().$set(t,e)},h.get=function(t){return this[b.p(t)]()},h.add=function(t,o){var l,u=this;t=Number(t);var f=b.p(o),h=function(e){var n=new Date(u.$d);return n.setDate(n.getDate()+e*t),b.w(n,u)};if(f===s)return this.set(s,this.$M+t);if(f===c)return this.set(c,this.$y+t);if(f===i)return h(1);if(f===a)return h(7);var d=(l={},l[n]=6e4,l[r]=36e5,l[e]=1e3,l)[f]||1,p=this.valueOf()+t*d;return b.w(p,this)},h.subtract=function(t,e){return this.add(-1*t,e)},h.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),i=this.$locale(),a=i.weekdays,s=i.months,o=function(t,e,n,r){return t&&t[e]||n[e].substr(0,r)},c=function(t){return b.s(e.$H%12||12,t,"0")},l={YY:String(this.$y).slice(-2),YYYY:String(this.$y),M:String(this.$M+1),MM:b.s(this.$M+1,2,"0"),MMM:o(i.monthsShort,this.$M,s,3),MMMM:s[this.$M],D:String(this.$D),DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:o(i.weekdaysMin,this.$W,a,2),ddd:o(i.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(this.$H),HH:b.s(this.$H,2,"0"),h:c(1),hh:c(2),a:this.$H<12?"am":"pm",A:this.$H<12?"AM":"PM",m:String(this.$m),mm:b.s(this.$m,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:r};return n.replace(u,function(t,e){return e||l[t]||r.replace(":","")})},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(t,l,u){var f,h=b.p(l),d=y(t),p=6e4*(d.utcOffset()-this.utcOffset()),g=this-d,v=b.m(this,d);return v=(f={},f[c]=v/12,f[s]=v,f[o]=v/3,f[a]=(g-p)/6048e5,f[i]=(g-p)/864e5,f[r]=g/36e5,f[n]=g/6e4,f[e]=g/1e3,f)[h]||g,u?v:b.a(v)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return g[this.$L]},h.locale=function(t,e){if(!t)return this.$L;var n=this.clone();return n.$L=m(t,e,!0),n},h.clone=function(){return b.w(this.toDate(),this)},h.toDate=function(){return new Date(this.$d)},h.toJSON=function(){return this.toISOString()},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},f}();return y.prototype=_.prototype,y.extend=function(t,e){return t(e,_,y),y},y.locale=m,y.isDayjs=v,y.unix=function(t){return y(1e3*t)},y.en=g[p],y.Ls=g,y})},function(t,e,n){"use strict";var r=n(3);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r),a=n(23),s=n(4),o=n(5),c=n(25),l=n(26),u=n(27),f=n(30),h=n(35),d=n(38),p=n(10);e.a={name:"Gantt",components:{Timeline:u.a,LeftBar:h.a,Blocks:d.a,MarkLine:p.a,CurrentTime:f.a},props:{startTime:{default:function(){return i()()},validator:function(t){var e=i()(t).isValid();return e||Object(o.c)("非法的开始时间 "+t),e}},endTime:{default:function(){return i()()},validator:function(t){var e=i()(t).isValid();return e||Object(o.c)("非法的结束时间 "+t),e}},cellWidth:{type:Number,default:50},cellHeight:{type:Number,default:20},titleHeight:{type:Number,default:40},titleWidth:{type:Number,default:200},scale:{type:Number,default:60,validator:function(t){return s.c.includes(t)}},datas:{type:Array,default:function(){return[]}},dataKey:{type:String,default:void 0},itemKey:{type:String,default:void 0},arrayKeys:{type:Array,default:function(){return[]}},showCurrentTime:{type:Boolean,default:!1},timeLines:{type:Array},scrollToTime:{validator:function(t){return i()(t).isValid()}},scrollToPostion:{validator:function(t){var e=!Object(o.a)(t.x)||!Number.isNaN(t.x),n=!Object(o.a)(t.y)||!Number.isNaN(t.y);return!(!e&&!n)||(Object(o.c)("scrollToPostion x或y 有值为非Number类型"),!1)}},hideHeader:{type:Boolean,default:!1},hideXScrollBar:{type:Boolean,default:!1},hideYScrollBar:{type:Boolean,default:!1},customGenerateBlocks:{type:Boolean,default:!1}},data:function(){return{selector:{gantt_leftbar:{},gantt_table:{},gantt_scroll_y:{},gantt_timeline:{},gantt_scroll_x:{},gantt_markArea:{}},scrollTop:0,scrollLeft:0,heightOfRenderAera:0,widthOfRenderAera:0,startTimeOfRenderArea:null,endTimeOfRenderArea:null,scrollBarWitdh:17}},computed:{start:function(){return i()(this.startTime)},end:function(){var t=this.start,e=this.widthOfRenderAera,n=this.scale,r=this.cellWidth,a=i()(this.endTime),o=Object(s.a)(t,a,n)*r;return(t.isAfter(a)||o<=e)&&(a=t.add(e/r*n,"minute")),a},totalWidth:function(){return this.cellWidth*this.totalScales},totalScales:function(){var t=this.start,e=this.end,n=this.scale;return Object(s.a)(t,e,n)},totalHeight:function(){var t=this.datas,e=this.cellHeight;return t.length*e},beginTimeOfTimeLine:function(){return Object(s.b)(this.start,this.scale)},beginTimeOfTimeLineToString:function(){return this.beginTimeOfTimeLine.toString()},avialableScrollLeft:function(){return this.totalWidth-this.widthOfRenderAera-1},avialableScrollTop:function(){return this.totalHeight-this.heightOfRenderAera-1},scrollXBarHeight:function(){return this.hideXScrollBar?0:this.scrollBarWitdh},scrollYBarWidth:function(){return this.hideYScrollBar?0:this.scrollBarWitdh},actualHeaderHeight:function(){return this.hideHeader?0:this.titleHeight}},watch:{scrollLeft:function(){this.getTimeRange()},widthOfRenderAera:function(){this.getTimeRange()},cellWidth:function(){this.getTimeRange()},scrollToTime:{handler:function(t){var e=this;if(t){var n=this.start,r=this.end,a=i()(t);if(!a.isAfter(n)||!a.isBefore(r))return void Object(o.c)("当前滚动至"+t+"不在"+n+"和"+r+"的范围之内");var s=this.getPositonOffset(t);this.$nextTick(function(){return e.syncScrollX({target:{scrollLeft:s}},!0)})}},immediate:!0},scrollToPostion:{handler:function(t){var e=this;if(t){var n=Number.isNaN(t.x)?void 0:t.x,r=Number.isNaN(t.y)?void 0:t.y;this.$nextTick(function(){Object(o.a)(n)&&n!==e.scrollLeft&&e.syncScrollX({target:{scrollLeft:n}},!0),Object(o.a)(r)&&r!==e.scrollTop&&e.syncScrollY({target:{scrollTop:r}},!0)})}},immediate:!0}},mounted:function(){var t=this;this.getSelector();var e=Object(l.a)(function(e){e.forEach(function(e){var n=e.contentRect;t.heightOfRenderAera=n.height,t.widthOfRenderAera=n.width})});new a.a(e).observe(this.$refs.blocksWrapper)},methods:{getTimeRange:function(){if(0!==this.heightOfRenderAera){var t=this.beginTimeOfTimeLine,e=this.scrollLeft,n=this.cellWidth,r=this.scale,i=this.widthOfRenderAera;this.startTimeOfRenderArea=t.add(e/n*r,"minute").toDate().getTime(),this.endTimeOfRenderArea=t.add((e+i)/n*r,"minute").toDate().getTime()}},getWidthAbout2Times:function(t,e){var n={scale:this.scale,cellWidth:this.cellWidth};return Object(c.b)(t,e,n)},getPositonOffset:function(t){var e={scale:this.scale,cellWidth:this.cellWidth};return Object(c.a)(t,this.beginTimeOfTimeLineToString,e)},getSelector:function(){this.selector.gantt_leftbar=this.$refs.leftbarWrapper,this.selector.gantt_table=this.$refs.blocksWrapper,this.selector.gantt_scroll_y=this.$refs.scrollYBar,this.selector.gantt_timeline=this.$refs.headerTimeline,this.selector.gantt_scroll_x=this.$refs.scrollXBar,this.selector.gantt_markArea=this.$refs.marklineArea},wheelHandle:function(t){var e=this,n=t.deltaX,r=t.deltaY;this.$nextTick(function(){var t=e.scrollTop,i=e.scrollLeft,a=e.avialableScrollLeft,s=e.avialableScrollTop;0!==r&&(t+r>=s&&t!==s?e.syncScrollY({target:{scrollTop:s}},!0):t+r<0&&0!==t?e.syncScrollY({target:{scrollTop:0}},!0):e.syncScrollY({target:{scrollTop:t+r}},!0)),0!==n&&(i+n>=a&&i!==a?e.syncScrollX({target:{scrollLeft:a}},!0):i+n<0&&0!==i?e.syncScrollX({target:{scrollLeft:0}},!0):e.syncScrollX({target:{scrollLeft:i+n}},!0))})},syncScrollY:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.selector,r=n.gantt_leftbar,i=n.gantt_table,a=n.gantt_scroll_y,s=t.target.scrollTop;if(e)return void(a.scrollTop=s);r.scrollTop=s,i.scrollTop=s,this.scrollTop=s,this.$emit("scrollTop",s)},syncScrollX:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.selector,r=n.gantt_table,i=n.gantt_timeline,a=n.gantt_markArea,s=n.gantt_scroll_x,o=t.target.scrollLeft;if(e)return void(s.scrollLeft=o);r.scrollLeft=o,i.scrollLeft=o,a.style.left="-"+o+"px",this.scrollLeft=o,this.$emit("scrollLeft",o)}}}},function(t,e,n){"use strict";function r(t){if(!o.includes(t))throw new RangeError("错误的scale值,输入值为"+t+",可用的scale值为"+o.join(","));return!0}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;r(e);var n=void 0,i=t.clone(),a=e/60;return e>60?(n=Math.floor(t.hour()/a),i=i.hour(n*a).minute(0).second(0)):(n=Math.floor(t.minute()/e),i=i.minute(n*e).second(0)),i}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;if(t.isAfter(e))throw new TypeError("错误的参数顺序,函数calcScalesAbout2Times的第一个时间参数必须大于第二个时间参数");r(n);for(var a=i(t,n),s=0;!a.isAfter(e);)s++,a=a.add(n,"minute");return s}n.d(e,"c",function(){return o}),e.b=i,e.a=a;var s=n(1),o=(n.n(s),[1,2,3,4,5,6,10,12,15,20,30,60,120,180,240,360,720,1440])},function(t,e,n){"use strict";function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function a(t){console.warn(t)}e.b=r,e.a=i,e.c=a},function(t,e,n){"use strict";var r=n(7);e.a=r.a},function(t,e,n){"use strict";function r(t,e){return t.isSame(e,"day")}var i=n(1),a=n.n(i),s=n(4),o=Symbol(),c=Symbol(),l=Symbol();e.a={name:"Timeline",props:{start:{type:a.a},end:{type:a.a},cellWidth:{type:Number},titleHeight:{type:Number},scale:{type:Number}},computed:{getDays:function(){for(var t=[],e=this.start,n=this.end;!r(e,n);e=e.add(1,"day"))t.push(e);return t.push(e),t},cellWidthStyle:function(){return{width:this.cellWidth+"px"}},heightStyle:function(){return{height:this.titleHeight/2+"px","line-height":this.titleHeight/2+"px"}}},methods:{getTimeScales:function(t){var e=this.start,n=this.end;return r(t,e)?this.generateTimeScale(o):r(t,n)?this.generateTimeScale(l):this.generateTimeScale(c)},generateTimeScale:function(t){var e=[],n=this.start,i=this.end,a=this.scale,u=void 0,f=void 0;switch(t){case o:u=Object(s.b)(n,a),f=r(n,i)?i:n.endOf("day");break;case l:u=i.startOf("day"),f=i;break;case c:u=n.startOf("day"),f=n.endOf("day");break;default:throw new TypeError("错误的计算类型")}for(;!u.isAfter(f);)a>=60?e.push(u.format("HH")):e.push(u.format("HH:mm")),u=u.add(a,"minute");return e}}}},function(t,e,n){"use strict";var r=n(9);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r),a=n(10);e.a={name:"CurrentTime",components:{MarkLine:a.a},props:{getPositonOffset:{type:Function,required:!0}},data:function(){return{currentTime:i()().toString()}},created:function(){var t=this,e=setInterval(function(){t.currentTime=i()().toString()},1e3);this.$once("hook:beforeDestroy",function(){clearInterval(e)})}}},function(t,e,n){"use strict";var r=n(33),i=n(11),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(12);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r);e.a={name:"MarkLine",props:{markLineTime:{validator:function(t){return i()(t).isValid()}},color:{type:String,default:"#0ca30a"},getPositonOffset:{type:Function,required:!0}},data:function(){return{visible:!1,dayjs:i.a}},methods:{getPosition:function(){return null==this.markLineTime?(this.visible=!1,0):(this.visible=!0,this.getPositonOffset(this.markLineTime))}}}},function(t,e,n){"use strict";var r=n(14);e.a=r.a},function(t,e,n){"use strict";var r=n(15);e.a={name:"LeftBar",mixins:[r.a],props:{dataKey:String,datas:{type:Array,required:!0}},computed:{cellHeightStyle:function(){return{height:this.cellHeight+"px"}}}}},function(t,e,n){"use strict";var r={props:{scrollTop:{type:Number,required:!0},heightOfRenderAera:{type:Number,required:!0},cellHeight:{type:Number,required:!0},datas:{type:Array,required:!0}},data:function(){return{oldTopIndex:0,preload:1,startRenderNum:0,endRenderNum:0}},computed:{blockHeight:function(){var t=this.datas,e=this.cellHeight;return t.length*e},currentTopIndex:function(){return Math.ceil(this.scrollTop/this.cellHeight)},showDatas:function(){var t=this.startRenderNum,e=this.endRenderNum;return this.datas.slice(t,e)},topSpace:function(){var t=this.oldTopIndex,e=this.cellHeight,n=this.preload;return(t-n>0?t-n:0)*e}},watch:{currentTopIndex:function(t){var e=this.oldTopIndex,n=this.preload;if(0===n)return void this.sliceData();if(e!==t){(t<e-(n-1)||t>e+(n-1))&&(this.oldTopIndex=t,this.sliceData())}},datas:function(){this.sliceData()},heightOfRenderAera:function(){this.sliceData()},cellHeight:function(){this.sliceData()}},created:function(){this.sliceData()},methods:{sliceData:function(){var t=this.heightOfRenderAera,e=this.currentTopIndex,n=this.cellHeight,r=this.preload;return 0===t||0===n?(this.endRenderNum=0,void(this.startRenderNum=0)):0===r?(this.endRenderNum=1/0,void(this.startRenderNum=-1/0)):(this.endRenderNum=e+Math.ceil(t/n)+r,void(this.startRenderNum=e-r>0?e-r:0))}}};e.a=r},function(t,e,n){"use strict";var r=n(17);e.a=r.a},function(t,e,n){"use strict";var r=n(15),i=n(5);e.a={name:"Blocks",mixins:[r.a],props:{dataKey:String,itemKey:String,arrayKeys:{type:Array},scrollLeft:Number,cellWidth:{type:Number,required:!0},scale:{type:Number,required:!0},widthOfRenderAera:{type:Number,required:!0},endTimeOfRenderArea:[Number,null],startTimeOfRenderArea:[Number,null],getPositonOffset:Function,getWidthAbout2Times:Function,customGenerateBlocks:Boolean},computed:{renderAarrys:function(){var t=this.arrayKeys;return t.length>0?t:["gtArray"]},blockStyle:function(){return{backgroundSize:this.cellWidth+"px "+this.cellHeight+"px",height:this.cellHeight+"px"}}},methods:{concatArray:function(t){return this.renderAarrys.reduce(function(e,n){return Array.isArray(t[n])?e.concat(t[n]):e},[])},isInRenderingTimeRange:function(t){if(0===this.heightOfRenderAera)return!1;var e=this.startTimeOfRenderArea,n=this.endTimeOfRenderArea;if(Object(i.b)(e)||Object(i.b)(n))return!1;var r=new Date(t).getTime();return e<=r||r<=n},getWidth:function(t){return Object(i.b)(t.start)||Object(i.b)(t.end)?0:this.getWidthAbout2Times(t.start,t.end)},getPosition:function(t){return Object(i.b)(t.start)?(Object(i.c)("错误,该数据项不含start 值 "+JSON.stringify(t)+",无法计算偏移值。"),0):this.getPositonOffset(t.start)}}}},function(t,e,n){var r=n(42);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n(46).default;i("cf90de1c",r,!0,{})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20),i={install:function(t,e){t.component("v-gantt-chart",r.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(i),e.default=i},function(t,e,n){"use strict";var r=n(21),i=n(2),a=(n(41),n(0)),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(22);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-chart",on:{wheel:t.wheelHandle}},[n("div",{staticClass:"gantt-container",style:{height:"calc(100% - "+t.scrollXBarHeight+"px)",width:"calc(100% - "+t.scrollYBarWidth+"px)"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.hideHeader,expression:"!hideHeader"}],staticClass:"gantt-header",style:{width:"calc(100% + "+t.scrollYBarWidth+"px)"}},[n("div",{staticClass:"gantt-header-title",style:{"line-height":t.titleHeight+"px",height:t.titleHeight+"px",width:t.titleWidth+"px"}},[t._t("title",[t._v("welcome v-gantt-chart")])],2),t._v(" "),n("div",{ref:"headerTimeline",staticClass:"gantt-header-timeline"},[n("div",{staticClass:"gantt-timeline-wrapper",style:{width:t.totalWidth+t.scrollYBarWidth+"px"}},[n("timeline",{attrs:{start:t.start,end:t.end,cellWidth:t.cellWidth,titleHeight:t.titleHeight,scale:t.scale}})],1)])]),t._v(" "),n("div",{staticClass:"gantt-body",style:{height:"calc(100% - "+t.actualHeaderHeight+"px)"}},[n("div",{staticClass:"gantt-table"},[n("div",{ref:"marklineArea",staticClass:"gantt-markline-area",style:{marginLeft:t.titleWidth+"px"}},[t.showCurrentTime?n("CurrentTime",{attrs:{getPositonOffset:t.getPositonOffset}}):t._e(),t._v(" "),t._l(t.timeLines,function(e,r){return n("mark-line",{key:r,attrs:{markLineTime:e.time,getPositonOffset:t.getPositonOffset,color:e.color}})})],2),t._v(" "),n("div",{ref:"leftbarWrapper",staticClass:"gantt-leftbar-wrapper",style:{width:t.titleWidth+"px",height:"calc(100% + "+t.scrollXBarHeight+"px)"}},[n("LeftBar",{style:{height:t.totalHeight+t.scrollXBarHeight+"px"},attrs:{datas:t.datas,dataKey:t.dataKey,scrollTop:t.scrollTop,heightOfRenderAera:t.heightOfRenderAera,widthOfRenderAera:t.widthOfRenderAera,cellHeight:t.cellHeight},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.data;return[t._t("left",null,{data:n})]}}],null,!0)})],1),t._v(" "),n("div",{ref:"blocksWrapper",staticClass:"gantt-blocks-wrapper"},[n("blocks",{style:{width:t.totalWidth+"px"},attrs:{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,heightOfRenderAera:t.heightOfRenderAera,widthOfRenderAera:t.widthOfRenderAera,arrayKeys:t.arrayKeys,itemKey:t.itemKey,dataKey:t.dataKey,datas:t.datas,cellWidth:t.cellWidth,cellHeight:t.cellHeight,scale:t.scale,getPositonOffset:t.getPositonOffset,getWidthAbout2Times:t.getWidthAbout2Times,customGenerateBlocks:t.customGenerateBlocks,startTimeOfRenderArea:t.startTimeOfRenderArea,endTimeOfRenderArea:t.endTimeOfRenderArea},scopedSlots:t._u([t.customGenerateBlocks?{key:"default",fn:function(e){var n=e.data,r=e.getPositonOffset,i=e.getWidthAbout2Times,a=e.isInRenderingTimeRange;return[t._t("block",null,{data:n,getPositonOffset:r,getWidthAbout2Times:i,isInRenderingTimeRange:a,startTimeOfRenderArea:t.startTimeOfRenderArea,endTimeOfRenderArea:t.endTimeOfRenderArea})]}}:{key:"default",fn:function(e){var n=e.data,r=e.item;return[t._t("block",null,{data:n,item:r})]}}],null,!0)})],1)])])]),t._v(" "),n("div",{ref:"scrollYBar",staticClass:"gantt-scroll-y",style:{width:t.scrollYBarWidth+"px",height:"calc(100% - "+t.actualHeaderHeight+"px",marginTop:t.actualHeaderHeight+"px"},on:{scroll:t.syncScrollY}},[n("div",{style:{height:t.totalHeight+"px"}})]),t._v(" "),n("div",{ref:"scrollXBar",staticClass:"gantt-scroll-x",style:{height:t.scrollXBarHeight+"px",width:"calc(100% - "+t.titleWidth+"px )",marginLeft:t.titleWidth+"px"},on:{scroll:t.syncScrollX}},[n("div",{style:{width:t.totalWidth+"px"}})])])},i=[]},function(t,e,n){"use strict";(function(t){function n(t,e){function n(){a&&(a=!1,t()),s&&i()}function r(){g(n)}function i(){var t=Date.now();if(a){if(t-o<v)return;s=!0}else a=!0,s=!1,setTimeout(r,e);o=t}var a=!1,s=!1,o=0;return i}function r(t){return parseFloat(t)||0}function i(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+r(t["border-"+n+"-width"])},0)}function a(t){for(var e=["top","right","bottom","left"],n={},i=0,a=e;i<a.length;i++){var s=a[i],o=t["padding-"+s];n[s]=r(o)}return n}function s(t){var e=t.getBBox();return f(0,0,e.width,e.height)}function o(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return T;var s=O(t).getComputedStyle(t),o=a(s),l=o.left+o.right,u=o.top+o.bottom,h=r(s.width),d=r(s.height);if("border-box"===s.boxSizing&&(Math.round(h+l)!==e&&(h-=i(s,"left","right")+l),Math.round(d+u)!==n&&(d-=i(s,"top","bottom")+u)),!c(t)){var p=Math.round(h+l)-e,g=Math.round(d+u)-n;1!==Math.abs(p)&&(h-=p),1!==Math.abs(g)&&(d-=g)}return f(o.left,o.top,h,d)}function c(t){return t===O(t).document.documentElement}function l(t){return d?x(t)?s(t):o(t):T}function u(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(a.prototype);return w(s,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),s}function f(t,e,n,r){return{x:t,y:e,width:n,height:r}}var h=function(){function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map:function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),d="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,p=function(){return void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),g=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(p):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),v=2,m=20,y=["top","right","bottom","left","width","height","size","weight"],b="undefined"!=typeof MutationObserver,_=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=n(this.refresh.bind(this),m)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),b?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){d&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;y.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),w=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},O=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||p},T=f(0,0,0,0),x=function(){return"undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof O(t).SVGGraphicsElement}:function(t){return t instanceof O(t).SVGElement&&"function"==typeof t.getBBox}}(),A=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=l(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),S=function(){function t(t,e){var n=u(e);w(this,{target:t,contentRect:n})}return t}(),$=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new h,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof O(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new A(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof O(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new S(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),k="undefined"!=typeof WeakMap?new WeakMap:new h,R=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=_.getInstance(),r=new $(e,n,this);k.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){R.prototype[t]=function(){var e;return(e=k.get(this))[t].apply(e,arguments)}});var M=function(){return void 0!==p.ResizeObserver?p.ResizeObserver:R}();e.a=M}).call(e,n(24))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){var r=n.scale,i=n.cellWidth;return s(o("pStart",t),a(e))/r*i}function i(t,e,n){var r=n.scale,i=n.cellWidth,a=o("pStart",t);return s(o("pBeginTimeOfTimeLine",e),a)/r*i}function a(t){return new Date(t)}function s(t,e){return(e.getTime()-t.getTime())/1e3/60}e.b=r,e.a=i;var o=function(){var t={},e={};return function(n,r){return t[n]!==r&&(t[n]=r,e[n]=a(r)),e[n]}}()},function(t,e,n){"use strict";function r(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=t,i=!0;return function(){var t=arguments,a=this;return i?(r.apply(a,t),i=!1):!e&&void(e=setTimeout(function(){clearTimeout(e),e=null,r.apply(a,t)},n))}}e.a=r},function(t,e,n){"use strict";var r=n(28),i=n(6),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(29);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-timeline",style:{"margin-left":-t.cellWidth/2+"px"}},t._l(t.getDays,function(e,r){return n("div",{key:r,staticClass:"gantt-timeline-block",style:{width:t.getTimeScales(e).length*t.cellWidth+"px"}},[n("div",{staticClass:"gantt-timeline-day ",style:t.heightStyle},[t._v("\n "+t._s(e.format("MM/DD")))]),t._v(" "),n("div",{staticClass:"gantt-timeline-scale ",style:t.heightStyle},t._l(t.getTimeScales(e),function(e,r){return n("div",{key:r,style:t.cellWidthStyle},[t._v("\n "+t._s(e)+"\n ")])}),0)])}),0)},i=[]},function(t,e,n){"use strict";var r=n(31),i=n(8),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(32);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement;return(t._self._c||e)("mark-line",{attrs:{markLineTime:t.currentTime,getPositonOffset:t.getPositonOffset,color:"rgba(255,0,0,.4)"}})},i=[]},function(t,e,n){"use strict";var r=n(34);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"gantt-markline",style:{"background-color":t.color,left:t.getPosition()+"px"}},[n("div",{staticClass:"gantt-markline-label",style:{"background-color":t.color}},[t._v(t._s(t.dayjs(t.markLineTime).format("HH:mm:ss")))])])},i=[]},function(t,e,n){"use strict";var r=n(36),i=n(13),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(37);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-leftbar"},[n("div",{staticClass:"gantt-leftbar-item gantt-block-top-space",style:{height:t.topSpace+"px"}}),t._v(" "),t._l(t.showDatas,function(e,r){return n("div",{key:t.dataKey?e[t.dataKey]:r,staticClass:"gantt-leftbar-item",style:t.cellHeightStyle},[t._t("default",[n("div",{staticClass:"gantt-leftbar-defalutItem"},[t._v("need slot")])],{data:e})],2)})],2)},i=[]},function(t,e,n){"use strict";var r=n(39),i=n(16),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(40);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-blocks",style:{height:t.blockHeight+"px"}},[n("div",{staticClass:"gantt-block gantt-block-top-space",style:{height:t.topSpace+"px"}}),t._v(" "),t._l(t.showDatas,function(e,r){return n("div",{key:t.dataKey?e[t.dataKey]:r,staticClass:"gantt-block",style:t.blockStyle},[t.customGenerateBlocks?[t._t("default",[t._v("need slot")],{data:e,getPositonOffset:t.getPositonOffset,getWidthAbout2Times:t.getWidthAbout2Times,isInRenderingTimeRange:t.isInRenderingTimeRange})]:t._l(t.concatArray(e),function(r,i){return t.isInRenderingTimeRange(r.start)||t.isInRenderingTimeRange(r.end)?n("div",{key:t.itemKey?r[t.itemKey]:i,staticClass:"gantt-block-item",style:{left:t.getPosition(r)+"px",width:t.getWidth(r)+"px"}},[t._t("default",[n("div",{staticClass:"gantt-block-defaultBlock"},[t._v("need slot")])],{data:e,item:r})],2):t._e()})],2)})],2)},i=[]},function(t,e,n){"use strict";var r=n(18),i=n.n(r);i.a},function(t,e,n){var r=n(43);e=t.exports=n(44)(!1),e.push([t.i,".gantt-chart{position:relative;overflow:hidden;outline:1px solid #f0f0f0}.gantt-chart,.gantt-container{height:100%;width:100%}.gantt-header{display:flex;background-color:#fff;outline:1px solid #f0f0f0}.gantt-header-title{flex:none;width:100%;background:#747e80;color:#fff;text-align:center}.gantt-header-timeline{overflow:hidden}.gantt-body,.gantt-timeline{position:relative}.gantt-timeline{text-align:center;display:flex}.gantt-timeline-day{overflow:hidden;font-weight:700;color:#777}.gantt-timeline-scale{display:flex}.gantt-timeline-scale>div{height:100%;font-size:.8rem;font-weight:700;color:#777}.gantt-timeline-block:first-child .gantt-timeline-scale div:first-child{visibility:hidden}.gantt-leftbar{width:100%;height:100%;background:#fff;color:#777;font-size:.8rem}.gantt-leftbar-wrapper{flex:none;position:relative;overflow:hidden;background:#fff;outline:1px solid #f0f0f0;z-index:100}.gantt-leftbar-defalutItem{width:100%;height:100%;outline:1px solid #f0f0f0}.gantt-table{display:flex;width:100%;height:100%}.gantt-markline-area{position:absolute;z-index:99}.gantt-markline{position:absolute;z-index:100;width:2px;height:100vh}.gantt-markline-label{padding:3px;float:left;color:#fff;font-size:.7rem}.gantt-blocks-wrapper{overflow:hidden}.gantt-block{position:relative;background-image:url("+r(n(45))+");background-repeat:repeat}.gantt-block-container{position:relative;height:100%}.gantt-block-item{position:absolute;height:100%}.gantt-block-defaultBlock{width:100%;height:100%;outline:1px solid #f0f0f0;background:#f0f0f0}.gantt-scroll-y{overflow-y:scroll;position:absolute;z-index:1000;top:0;right:0;height:100%;width:17px}.gantt-scroll-y>div{width:17px}.gantt-scroll-x{overflow-x:scroll;position:absolute;z-index:1000;left:0;bottom:0;width:100%;height:17px}.gantt-scroll-x>div{height:17px}",""])},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var a=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([a]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<t.length;i++){var s=t[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAXCAYAAACVp2gDAAAAbElEQVRYR+3SMQ3AMBAEQRtZoAXwk7DCYVN5DsAWo9vLMoGZeXdWE1pA4xMABRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkP/QP0U427N+eeAzRXSxcMkEWCAAAAAElFTkSuQmCC"},function(t,e,n){"use strict";function r(t,e,n,r){g=n,m=r||{};var a=Object(l.a)(t,e);return i(a),function(e){for(var n=[],r=0;r<a.length;r++){var s=a[r],o=f[s.id];o.refs--,n.push(o)}e?(a=Object(l.a)(t,e),i(a)):a=[];for(var r=0;r<n.length;r++){var o=n[r];if(0===o.refs){for(var c=0;c<o.parts.length;c++)o.parts[c]();delete f[o.id]}}}}function i(t){for(var e=0;e<t.length;e++){var n=t[e],r=f[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(s(n.parts[i]));f[n.id]={id:n.id,refs:1,parts:a}}}}function a(){var t=document.createElement("style");return t.type="text/css",h.appendChild(t),t}function s(t){var e,n,r=document.querySelector("style["+y+'~="'+t.id+'"]');if(r){if(g)return v;r.parentNode.removeChild(r)}if(b){var i=p++;r=d||(d=a()),e=o.bind(null,r,i,!1),n=o.bind(null,r,i,!0)}else r=a(),e=c.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function o(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var a=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(a,s[e]):t.appendChild(a)}}function c(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),m.ssrId&&t.setAttribute(y,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var l=n(47),u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var f={},h=u&&(document.head||document.getElementsByTagName("head")[0]),d=null,p=0,g=!1,v=function(){},m=null,y="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase()),_=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],s=a[0],o=a[1],c=a[2],l=a[3],u={id:t+":"+i,css:o,media:c,sourceMap:l};r[s]?r[s].parts.push(u):n.push(r[s]={id:s,parts:[u]})}return n}e.a=r}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("vGanttChart",[],e):"object"==typeof exports?exports.vGanttChart=e():t.vGanttChart=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=19)}([function(t,e,n){"use strict";function r(t,e,n,r,i,a,s,o){var c="function"==typeof t?t.options:t;e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId="data-v-"+a);var l;if(s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}e.a=r},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",a="week",s="month",o="quarter",c="year",l=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,u=/\[([^\]]+)]|Y{2,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,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},d={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,s),i=e-r<0,a=t.clone().add(n+(i?-1:1),s);return Number(-(n+(e-r)/(i?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(l){return{M:s,y:c,w:a,d:i,h:r,m:n,s:e,ms:t,Q:o}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},h={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("_")},g="en",p={};p[g]=h;var m=function(t){return t instanceof _},v=function(t,e,n){var r;if(!t)return null;if("string"==typeof t)p[t]&&(r=t),e&&(p[t]=e,r=t);else{var i=t.name;p[i]=t,r=i}return n||(g=r),r},b=function(t,e,n){if(m(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new _(r)},y=d;y.l=v,y.i=m,y.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u})};var _=function(){function f(t){this.$L=this.$L||v(t.locale,null,!0)||g,this.parse(t)}var d=f.prototype;return d.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return y},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},d.isAfter=function(t,e){return b(t)<this.startOf(e)},d.isBefore=function(t,e){return this.endOf(e)<b(t)},d.$g=function(t,e,n){return y.u(t)?this[e]:this.set(n,t)},d.year=function(t){return this.$g(t,"$y",c)},d.month=function(t){return this.$g(t,"$M",s)},d.day=function(t){return this.$g(t,"$W",i)},d.date=function(t){return this.$g(t,"$D","date")},d.hour=function(t){return this.$g(t,"$H",r)},d.minute=function(t){return this.$g(t,"$m",n)},d.second=function(t){return this.$g(t,"$s",e)},d.millisecond=function(e){return this.$g(e,"$ms",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,o){var l=this,u=!!y.u(o)||o,f=y.p(t),d=function(t,e){var n=y.w(l.$u?Date.UTC(l.$y,e,t):new Date(l.$y,e,t),l);return u?n:n.endOf(i)},h=function(t,e){return y.w(l.toDate()[t].apply(l.toDate(),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),l)},g=this.$W,p=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case c:return u?d(1,0):d(31,11);case s:return u?d(1,p):d(0,p+1);case a:var b=this.$locale().weekStart||0,_=(g<b?g+7:g)-b;return d(u?m-_:m+(6-_),p);case i:case"date":return h(v+"Hours",0);case r:return h(v+"Minutes",1);case n:return h(v+"Seconds",2);case e:return h(v+"Milliseconds",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(a,o){var l,u=y.p(a),f="set"+(this.$u?"UTC":""),d=(l={},l[i]=f+"Date",l.date=f+"Date",l[s]=f+"Month",l[c]=f+"FullYear",l[r]=f+"Hours",l[n]=f+"Minutes",l[e]=f+"Seconds",l[t]=f+"Milliseconds",l)[u],h=u===i?this.$D+(o-this.$W):o;if(u===s||u===c){var g=this.clone().set("date",1);g.$d[d](h),g.init(),this.$d=g.set("date",Math.min(this.$D,g.daysInMonth())).toDate()}else d&&this.$d[d](h);return this.init(),this},d.set=function(t,e){return this.clone().$set(t,e)},d.get=function(t){return this[y.p(t)]()},d.add=function(t,o){var l,u=this;t=Number(t);var f=y.p(o),d=function(e){var n=new Date(u.$d);return n.setDate(n.getDate()+e*t),y.w(n,u)};if(f===s)return this.set(s,this.$M+t);if(f===c)return this.set(c,this.$y+t);if(f===i)return d(1);if(f===a)return d(7);var h=(l={},l[n]=6e4,l[r]=36e5,l[e]=1e3,l)[f]||1,g=this.valueOf()+t*h;return y.w(g,this)},d.subtract=function(t,e){return this.add(-1*t,e)},d.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=y.z(this),i=this.$locale(),a=i.weekdays,s=i.months,o=function(t,e,n,r){return t&&t[e]||n[e].substr(0,r)},c=function(t){return y.s(e.$H%12||12,t,"0")},l={YY:String(this.$y).slice(-2),YYYY:String(this.$y),M:String(this.$M+1),MM:y.s(this.$M+1,2,"0"),MMM:o(i.monthsShort,this.$M,s,3),MMMM:s[this.$M],D:String(this.$D),DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:o(i.weekdaysMin,this.$W,a,2),ddd:o(i.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(this.$H),HH:y.s(this.$H,2,"0"),h:c(1),hh:c(2),a:this.$H<12?"am":"pm",A:this.$H<12?"AM":"PM",m:String(this.$m),mm:y.s(this.$m,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:r};return n.replace(u,function(t,e){return e||l[t]||r.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,l,u){var f,d=y.p(l),h=b(t),g=6e4*(h.utcOffset()-this.utcOffset()),p=this-h,m=y.m(this,h);return m=(f={},f[c]=m/12,f[s]=m,f[o]=m/3,f[a]=(p-g)/6048e5,f[i]=(p-g)/864e5,f[r]=p/36e5,f[n]=p/6e4,f[e]=p/1e3,f)[d]||p,u?m:y.a(m)},d.daysInMonth=function(){return this.endOf(s).$D},d.$locale=function(){return p[this.$L]},d.locale=function(t,e){if(!t)return this.$L;var n=this.clone();return n.$L=v(t,e,!0),n},d.clone=function(){return y.w(this.toDate(),this)},d.toDate=function(){return new Date(this.$d)},d.toJSON=function(){return this.toISOString()},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},f}();return b.prototype=_.prototype,b.extend=function(t,e){return t(e,_,b),b},b.locale=v,b.isDayjs=m,b.unix=function(t){return b(1e3*t)},b.en=p[g],b.Ls=p,b})},function(t,e,n){"use strict";var r=n(3);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r),a=n(23),s=n(4),o=n(5),c=n(25),l=n(26),u=n(27),f=n(30),d=n(35),h=n(38),g=n(10);e.a={name:"Gantt",components:{Timeline:u.a,LeftBar:d.a,Blocks:h.a,MarkLine:g.a,CurrentTime:f.a},props:{startTime:{default:function(){return i()()},validator:function(t){var e=i()(t).isValid();return e||Object(o.c)("非法的开始时间 "+t),e}},endTime:{default:function(){return i()()},validator:function(t){var e=i()(t).isValid();return e||Object(o.c)("非法的结束时间 "+t),e}},cellWidth:{type:Number,default:50},cellHeight:{type:Number,default:20},titleHeight:{type:Number,default:40},titleWidth:{type:Number,default:200},scale:{type:Number,default:60,validator:function(t){return s.c.includes(t)}},datas:{type:Array,default:function(){return[]}},dataKey:{type:String,default:void 0},itemKey:{type:String,default:void 0},arrayKeys:{type:Array,default:function(){return[]}},showCurrentTime:{type:Boolean,default:!1},timeLines:{type:Array},scrollToTime:{validator:function(t){return i()(t).isValid()}},scrollToPostion:{validator:function(t){var e=!Object(o.a)(t.x)||!Number.isNaN(t.x),n=!Object(o.a)(t.y)||!Number.isNaN(t.y);return!(!e&&!n)||(Object(o.c)("scrollToPostion x或y 有值为非Number类型"),!1)}},hideHeader:{type:Boolean,default:!1},hideXScrollBar:{type:Boolean,default:!1},hideYScrollBar:{type:Boolean,default:!1},customGenerateBlocks:{type:Boolean,default:!1}},data:function(){return{selector:{gantt_leftbar:{},gantt_table:{},gantt_scroll_y:{},gantt_timeline:{},gantt_scroll_x:{},gantt_markArea:{}},scrollTop:0,scrollLeft:0,heightOfRenderAera:0,widthOfRenderAera:0,startTimeOfRenderArea:null,endTimeOfRenderArea:null,scrollBarWitdh:17}},computed:{start:function(){return i()(this.startTime)},end:function(){var t=this.start,e=this.widthOfRenderAera,n=this.scale,r=this.cellWidth,a=i()(this.endTime),o=Object(s.a)(t,a,n)*r;return(t.isAfter(a)||o<=e)&&(a=t.add(e/r*n,"minute")),a},totalWidth:function(){return this.cellWidth*this.totalScales},totalScales:function(){var t=this.start,e=this.end,n=this.scale;return Object(s.a)(t,e,n)},totalHeight:function(){var t=this.datas,e=this.cellHeight;return t.length*e},beginTimeOfTimeLine:function(){return Object(s.b)(this.start,this.scale)},beginTimeOfTimeLineToString:function(){return this.beginTimeOfTimeLine.toString()},avialableScrollLeft:function(){return this.totalWidth-this.widthOfRenderAera-1},avialableScrollTop:function(){return this.totalHeight-this.heightOfRenderAera-1},scrollXBarHeight:function(){return this.hideXScrollBar?0:this.scrollBarWitdh},scrollYBarWidth:function(){return this.hideYScrollBar?0:this.scrollBarWitdh},actualHeaderHeight:function(){return this.hideHeader?0:this.titleHeight}},watch:{scrollLeft:function(){this.getTimeRange()},widthOfRenderAera:function(){this.getTimeRange()},cellWidth:function(){this.getTimeRange()},scrollToTime:{handler:function(t){var e=this;if(t){var n=this.start,r=this.end,a=i()(t);if(!a.isAfter(n)||!a.isBefore(r))return void Object(o.c)("当前滚动至"+t+"不在"+n+"和"+r+"的范围之内");var s=this.getPositonOffset(t);this.$nextTick(function(){return e.syncScrollX({target:{scrollLeft:s}},!0)})}},immediate:!0},scrollToPostion:{handler:function(t){var e=this;if(t){var n=Number.isNaN(t.x)?void 0:t.x,r=Number.isNaN(t.y)?void 0:t.y;this.$nextTick(function(){Object(o.a)(n)&&n!==e.scrollLeft&&e.syncScrollX({target:{scrollLeft:n}},!0),Object(o.a)(r)&&r!==e.scrollTop&&e.syncScrollY({target:{scrollTop:r}},!0)})}},immediate:!0}},mounted:function(){var t=this;this.getSelector();var e=Object(l.a)(function(e){e.forEach(function(e){var n=e.contentRect;t.heightOfRenderAera=n.height,t.widthOfRenderAera=n.width})});new a.a(e).observe(this.$refs.blocksWrapper)},methods:{getTimeRange:function(){if(0!==this.heightOfRenderAera){var t=this.beginTimeOfTimeLine,e=this.scrollLeft,n=this.cellWidth,r=this.scale,i=this.widthOfRenderAera;this.startTimeOfRenderArea=t.add(e/n*r,"minute").toDate().getTime(),this.endTimeOfRenderArea=t.add((e+i)/n*r,"minute").toDate().getTime()}},getWidthAbout2Times:function(t,e){var n={scale:this.scale,cellWidth:this.cellWidth};return Object(c.b)(t,e,n)},getPositonOffset:function(t){var e={scale:this.scale,cellWidth:this.cellWidth};return Object(c.a)(t,this.beginTimeOfTimeLineToString,e)},getSelector:function(){this.selector.gantt_leftbar=this.$refs.leftbarWrapper,this.selector.gantt_table=this.$refs.blocksWrapper,this.selector.gantt_scroll_y=this.$refs.scrollYBar,this.selector.gantt_timeline=this.$refs.headerTimeline,this.selector.gantt_scroll_x=this.$refs.scrollXBar,this.selector.gantt_markArea=this.$refs.marklineArea},wheelHandle:function(t){var e=this,n=t.deltaX,r=t.deltaY;this.$nextTick(function(){var t=e.scrollTop,i=e.scrollLeft,a=e.avialableScrollLeft,s=e.avialableScrollTop;0!==r&&(t+r>=s&&t!==s?e.syncScrollY({target:{scrollTop:s}},!0):t+r<0&&0!==t?e.syncScrollY({target:{scrollTop:0}},!0):e.syncScrollY({target:{scrollTop:t+r}},!0)),0!==n&&(i+n>=a&&i!==a?e.syncScrollX({target:{scrollLeft:a}},!0):i+n<0&&0!==i?e.syncScrollX({target:{scrollLeft:0}},!0):e.syncScrollX({target:{scrollLeft:i+n}},!0))})},syncScrollY:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.selector,r=n.gantt_leftbar,i=n.gantt_table,a=n.gantt_scroll_y,s=t.target.scrollTop;if(e)return void(a.scrollTop=s);r.scrollTop=s,i.scrollTop=s,this.scrollTop=s,this.$emit("scrollTop",s)},syncScrollX:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.selector,r=n.gantt_table,i=n.gantt_timeline,a=n.gantt_markArea,s=n.gantt_scroll_x,o=t.target.scrollLeft;if(e)return void(s.scrollLeft=o);r.scrollLeft=o,i.scrollLeft=o,a.style.left="-"+o+"px",this.scrollLeft=o,this.$emit("scrollLeft",o)}}}},function(t,e,n){"use strict";function r(t){if(!o.includes(t))throw new RangeError("错误的scale值,输入值为"+t+",可用的scale值为"+o.join(","));return!0}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;r(e);var n=void 0,i=t.clone(),a=e/60;return e>60?(n=Math.floor(t.hour()/a),i=i.hour(n*a).minute(0).second(0)):(n=Math.floor(t.minute()/e),i=i.minute(n*e).second(0)),i}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;if(t.isAfter(e))throw new TypeError("错误的参数顺序,函数calcScalesAbout2Times的第一个时间参数必须大于第二个时间参数");r(n);for(var a=i(t,n),s=0;!a.isAfter(e);)s++,a=a.add(n,"minute");return s}n.d(e,"c",function(){return o}),e.b=i,e.a=a;var s=n(1),o=(n.n(s),[1,2,3,4,5,6,10,12,15,20,30,60,120,180,240,360,720,1440])},function(t,e,n){"use strict";function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function a(t){console.warn(t)}e.b=r,e.a=i,e.c=a},function(t,e,n){"use strict";var r=n(7);e.a=r.a},function(t,e,n){"use strict";function r(t,e){return t.isSame(e,"day")}var i=n(1),a=n.n(i),s=n(4),o=Symbol(),c=Symbol(),l=Symbol();e.a={name:"Timeline",props:{start:{type:a.a},end:{type:a.a},cellWidth:{type:Number},titleHeight:{type:Number},scale:{type:Number}},computed:{getDays:function(){for(var t=[],e=this.start,n=this.end;!r(e,n);e=e.add(1,"day"))t.push(e);return t.push(e),t},cellWidthStyle:function(){return{width:this.cellWidth+"px"}},heightStyle:function(){return{height:this.titleHeight/2+"px","line-height":this.titleHeight/2+"px"}}},methods:{getTimeScales:function(t){var e=this.start,n=this.end;return r(t,e)?this.generateTimeScale(o):r(t,n)?this.generateTimeScale(l):this.generateTimeScale(c)},generateTimeScale:function(t){var e=[],n=this.start,i=this.end,a=this.scale,u=void 0,f=void 0;switch(t){case o:u=Object(s.b)(n,a),f=r(n,i)?i:n.endOf("day");break;case l:u=i.startOf("day"),f=i;break;case c:u=n.startOf("day"),f=n.endOf("day");break;default:throw new TypeError("错误的计算类型")}for(;!u.isAfter(f);)a>=60?e.push(u.format("HH")):e.push(u.format("HH:mm")),u=u.add(a,"minute");return e}}}},function(t,e,n){"use strict";var r=n(9);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r),a=n(10);e.a={name:"CurrentTime",components:{MarkLine:a.a},props:{getPositonOffset:{type:Function,required:!0}},data:function(){return{currentTime:i()().toString()}},created:function(){var t=this,e=setInterval(function(){t.currentTime=i()().toString()},1e3);this.$once("hook:beforeDestroy",function(){clearInterval(e)})}}},function(t,e,n){"use strict";var r=n(33),i=n(11),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(12);e.a=r.a},function(t,e,n){"use strict";var r=n(1),i=n.n(r);e.a={name:"MarkLine",props:{markLineTime:{validator:function(t){return i()(t).isValid()}},color:{type:String,default:"#0ca30a"},getPositonOffset:{type:Function,required:!0}},data:function(){return{visible:!1,dayjs:i.a}},methods:{getPosition:function(){return null==this.markLineTime?(this.visible=!1,0):(this.visible=!0,this.getPositonOffset(this.markLineTime))}}}},function(t,e,n){"use strict";var r=n(14);e.a=r.a},function(t,e,n){"use strict";var r=n(15);e.a={name:"LeftBar",mixins:[r.a],props:{dataKey:String,datas:{type:Array,required:!0}},computed:{cellHeightStyle:function(){return{height:this.cellHeight+"px"}}}}},function(t,e,n){"use strict";var r={props:{scrollTop:{type:Number,required:!0},heightOfRenderAera:{type:Number,required:!0},cellHeight:{type:Number,required:!0},datas:{type:Array,required:!0}},data:function(){return{oldTopIndex:0,preload:1,startRenderNum:0,endRenderNum:0}},computed:{blockHeight:function(){var t=this.datas,e=this.cellHeight;return t.length*e},currentTopIndex:function(){return Math.ceil(this.scrollTop/this.cellHeight)},showDatas:function(){var t=this.startRenderNum,e=this.endRenderNum;return this.datas.slice(t,e)},topSpace:function(){var t=this.oldTopIndex,e=this.cellHeight,n=this.preload;return(t-n>0?t-n:0)*e}},watch:{currentTopIndex:function(t){var e=this.oldTopIndex,n=this.preload;if(0===n)return void this.sliceData();if(e!==t){(t<e-(n-1)||t>e+(n-1))&&(this.oldTopIndex=t,this.sliceData())}},datas:function(){this.sliceData()},heightOfRenderAera:function(){this.sliceData()},cellHeight:function(){this.sliceData()}},created:function(){this.sliceData()},methods:{sliceData:function(){var t=this.heightOfRenderAera,e=this.currentTopIndex,n=this.cellHeight,r=this.preload;return 0===t||0===n?(this.endRenderNum=0,void(this.startRenderNum=0)):0===r?(this.endRenderNum=1/0,void(this.startRenderNum=-1/0)):(this.endRenderNum=e+Math.ceil(t/n)+r,void(this.startRenderNum=e-r>0?e-r:0))}}};e.a=r},function(t,e,n){"use strict";var r=n(17);e.a=r.a},function(t,e,n){"use strict";var r=n(15),i=n(5);e.a={name:"Blocks",mixins:[r.a],props:{dataKey:String,itemKey:String,arrayKeys:{type:Array},scrollLeft:Number,cellWidth:{type:Number,required:!0},scale:{type:Number,required:!0},widthOfRenderAera:{type:Number,required:!0},endTimeOfRenderArea:[Number,null],startTimeOfRenderArea:[Number,null],getPositonOffset:Function,getWidthAbout2Times:Function,customGenerateBlocks:Boolean},computed:{renderAarrys:function(){var t=this.arrayKeys;return t.length>0?t:["gtArray"]},blockStyle:function(){return{backgroundSize:this.cellWidth+"px "+this.cellHeight+"px",height:this.cellHeight+"px"}}},methods:{concatArray:function(t){return this.renderAarrys.reduce(function(e,n){return Array.isArray(t[n])?e.concat(t[n]):e},[])},isInRenderingTimeRangeOrIsAcrossRenderingTimeRange:function(t,e){if(0===this.heightOfRenderAera)return!1;var n=this.startTimeOfRenderArea,r=this.endTimeOfRenderArea;if(Object(i.b)(n)||Object(i.b)(r))return!1;var a=new Date(t).getTime(),s=new Date(e).getTime();return n>=a&&s>=r||(n<=a&&a<=r||n<=s&&s<=r)},isInRenderingTimeRange:function(t){if(0===this.heightOfRenderAera)return!1;var e=this.startTimeOfRenderArea,n=this.endTimeOfRenderArea;if(Object(i.b)(e)||Object(i.b)(n))return!1;var r=new Date(t).getTime();return e<=r&&r<=n},isAcrossRenderingTimeRange:function(t,e){if(0===this.heightOfRenderAera)return!1;var n=this.startTimeOfRenderArea,r=this.endTimeOfRenderArea;if(Object(i.b)(n)||Object(i.b)(r))return!1;var a=new Date(t).getTime(),s=new Date(e).getTime();return n>=a&&s>=r},getWidth:function(t){return Object(i.b)(t.start)||Object(i.b)(t.end)?0:this.getWidthAbout2Times(t.start,t.end)},getPosition:function(t){return Object(i.b)(t.start)?(Object(i.c)("错误,该数据项不含start 值 "+JSON.stringify(t)+",无法计算偏移值。"),0):this.getPositonOffset(t.start)}}}},function(t,e,n){var r=n(42);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n(46).default;i("cf90de1c",r,!0,{})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20),i={install:function(t,e){t.component("v-gantt-chart",r.a)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(i),e.default=i},function(t,e,n){"use strict";var r=n(21),i=n(2),a=(n(41),n(0)),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(22);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-chart",on:{"&wheel":function(e){return t.wheelHandle(e)}}},[n("div",{staticClass:"gantt-container",style:{height:"calc(100% - "+t.scrollXBarHeight+"px)",width:"calc(100% - "+t.scrollYBarWidth+"px)"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.hideHeader,expression:"!hideHeader"}],staticClass:"gantt-header",style:{width:"calc(100% + "+t.scrollYBarWidth+"px)"}},[n("div",{staticClass:"gantt-header-title",style:{"line-height":t.titleHeight+"px",height:t.titleHeight+"px",width:t.titleWidth+"px"}},[t._t("title",[t._v("welcome v-gantt-chart")])],2),t._v(" "),n("div",{ref:"headerTimeline",staticClass:"gantt-header-timeline"},[n("div",{staticClass:"gantt-timeline-wrapper",style:{width:t.totalWidth+t.scrollYBarWidth+"px"}},[n("timeline",{attrs:{start:t.start,end:t.end,cellWidth:t.cellWidth,titleHeight:t.titleHeight,scale:t.scale}})],1)])]),t._v(" "),n("div",{staticClass:"gantt-body",style:{height:"calc(100% - "+t.actualHeaderHeight+"px)"}},[n("div",{staticClass:"gantt-table"},[n("div",{ref:"marklineArea",staticClass:"gantt-markline-area",style:{marginLeft:t.titleWidth+"px"}},[t.showCurrentTime?n("CurrentTime",{attrs:{getPositonOffset:t.getPositonOffset}}):t._e(),t._v(" "),t._l(t.timeLines,function(e,r){return n("mark-line",{key:r,attrs:{markLineTime:e.time,getPositonOffset:t.getPositonOffset,color:e.color}})})],2),t._v(" "),n("div",{ref:"leftbarWrapper",staticClass:"gantt-leftbar-wrapper",style:{width:t.titleWidth+"px",height:"calc(100% + "+t.scrollXBarHeight+"px)"}},[n("LeftBar",{style:{height:t.totalHeight+t.scrollXBarHeight+"px"},attrs:{datas:t.datas,dataKey:t.dataKey,scrollTop:t.scrollTop,heightOfRenderAera:t.heightOfRenderAera,widthOfRenderAera:t.widthOfRenderAera,cellHeight:t.cellHeight},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.data;return[t._t("left",null,{data:n})]}}],null,!0)})],1),t._v(" "),n("div",{ref:"blocksWrapper",staticClass:"gantt-blocks-wrapper"},[n("blocks",{style:{width:t.totalWidth+"px"},attrs:{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,heightOfRenderAera:t.heightOfRenderAera,widthOfRenderAera:t.widthOfRenderAera,arrayKeys:t.arrayKeys,itemKey:t.itemKey,dataKey:t.dataKey,datas:t.datas,cellWidth:t.cellWidth,cellHeight:t.cellHeight,scale:t.scale,getPositonOffset:t.getPositonOffset,getWidthAbout2Times:t.getWidthAbout2Times,customGenerateBlocks:t.customGenerateBlocks,startTimeOfRenderArea:t.startTimeOfRenderArea,endTimeOfRenderArea:t.endTimeOfRenderArea},scopedSlots:t._u([t.customGenerateBlocks?{key:"default",fn:function(e){var n=e.data,r=e.getPositonOffset,i=e.getWidthAbout2Times,a=e.isInRenderingTimeRange,s=e.isAcrossRenderingTimeRange;return[t._t("block",null,{data:n,getPositonOffset:r,getWidthAbout2Times:i,isInRenderingTimeRange:a,isAcrossRenderingTimeRange:s,startTimeOfRenderArea:t.startTimeOfRenderArea,endTimeOfRenderArea:t.endTimeOfRenderArea})]}}:{key:"default",fn:function(e){var n=e.data,r=e.item;return[t._t("block",null,{data:n,item:r})]}}],null,!0)})],1)])])]),t._v(" "),n("div",{ref:"scrollYBar",staticClass:"gantt-scroll-y",style:{width:t.scrollYBarWidth+"px",height:"calc(100% - "+t.actualHeaderHeight+"px",marginTop:t.actualHeaderHeight+"px"},on:{"&scroll":function(e){return t.syncScrollY(e)}}},[n("div",{style:{height:t.totalHeight+"px"}})]),t._v(" "),n("div",{ref:"scrollXBar",staticClass:"gantt-scroll-x",style:{height:t.scrollXBarHeight+"px",width:"calc(100% - "+t.titleWidth+"px )",marginLeft:t.titleWidth+"px"},on:{"&scroll":function(e){return t.syncScrollX(e)}}},[n("div",{style:{width:t.totalWidth+"px"}})])])},i=[]},function(t,e,n){"use strict";(function(t){function n(t,e){function n(){a&&(a=!1,t()),s&&i()}function r(){p(n)}function i(){var t=Date.now();if(a){if(t-o<m)return;s=!0}else a=!0,s=!1,setTimeout(r,e);o=t}var a=!1,s=!1,o=0;return i}function r(t){return parseFloat(t)||0}function i(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+r(t["border-"+n+"-width"])},0)}function a(t){for(var e=["top","right","bottom","left"],n={},i=0,a=e;i<a.length;i++){var s=a[i],o=t["padding-"+s];n[s]=r(o)}return n}function s(t){var e=t.getBBox();return f(0,0,e.width,e.height)}function o(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return w;var s=T(t).getComputedStyle(t),o=a(s),l=o.left+o.right,u=o.top+o.bottom,d=r(s.width),h=r(s.height);if("border-box"===s.boxSizing&&(Math.round(d+l)!==e&&(d-=i(s,"left","right")+l),Math.round(h+u)!==n&&(h-=i(s,"top","bottom")+u)),!c(t)){var g=Math.round(d+l)-e,p=Math.round(h+u)-n;1!==Math.abs(g)&&(d-=g),1!==Math.abs(p)&&(h-=p)}return f(o.left,o.top,d,h)}function c(t){return t===T(t).document.documentElement}function l(t){return h?A(t)?s(t):o(t):w}function u(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(a.prototype);return O(s,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),s}function f(t,e,n,r){return{x:t,y:e,width:n,height:r}}var d=function(){function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map:function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),h="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,g=function(){return void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),p=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(g):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),m=2,v=20,b=["top","right","bottom","left","width","height","size","weight"],y="undefined"!=typeof MutationObserver,_=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=n(this.refresh.bind(this),v)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){h&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),y?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){h&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;b.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),O=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},T=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||g},w=f(0,0,0,0),A=function(){return"undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof T(t).SVGGraphicsElement}:function(t){return t instanceof T(t).SVGElement&&"function"==typeof t.getBBox}}(),x=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=l(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),R=function(){function t(t,e){var n=u(e);O(this,{target:t,contentRect:n})}return t}(),S=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new d,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof T(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new x(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof T(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new R(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),$="undefined"!=typeof WeakMap?new WeakMap:new d,k=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=_.getInstance(),r=new S(e,n,this);$.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){k.prototype[t]=function(){var e;return(e=$.get(this))[t].apply(e,arguments)}});var M=function(){return void 0!==g.ResizeObserver?g.ResizeObserver:k}();e.a=M}).call(e,n(24))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){var r=n.scale,i=n.cellWidth;return s(o("pStart",t),a(e))/r*i}function i(t,e,n){var r=n.scale,i=n.cellWidth,a=o("pStart",t);return s(o("pBeginTimeOfTimeLine",e),a)/r*i}function a(t){return new Date(t)}function s(t,e){return(e.getTime()-t.getTime())/1e3/60}e.b=r,e.a=i;var o=function(){var t={},e={};return function(n,r){return t[n]!==r&&(t[n]=r,e[n]=a(r)),e[n]}}()},function(t,e,n){"use strict";function r(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=t,i=!0;return function(){var t=arguments,a=this;return i?(r.apply(a,t),i=!1):!e&&void(e=setTimeout(function(){clearTimeout(e),e=null,r.apply(a,t)},n))}}e.a=r},function(t,e,n){"use strict";var r=n(28),i=n(6),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(29);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-timeline",style:{"margin-left":-t.cellWidth/2+"px"}},t._l(t.getDays,function(e,r){return n("div",{key:r,staticClass:"gantt-timeline-block",style:{width:t.getTimeScales(e).length*t.cellWidth+"px"}},[n("div",{staticClass:"gantt-timeline-day ",style:t.heightStyle},[t._v("\n "+t._s(e.format("MM/DD")))]),t._v(" "),n("div",{staticClass:"gantt-timeline-scale ",style:t.heightStyle},t._l(t.getTimeScales(e),function(e,r){return n("div",{key:r,style:t.cellWidthStyle},[t._v("\n "+t._s(e)+"\n ")])}),0)])}),0)},i=[]},function(t,e,n){"use strict";var r=n(31),i=n(8),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(32);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement;return(t._self._c||e)("mark-line",{attrs:{markLineTime:t.currentTime,getPositonOffset:t.getPositonOffset,color:"rgba(255,0,0,.4)"}})},i=[]},function(t,e,n){"use strict";var r=n(34);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"gantt-markline",style:{"background-color":t.color,left:t.getPosition()+"px"}},[n("div",{staticClass:"gantt-markline-label",style:{"background-color":t.color}},[t._v(t._s(t.dayjs(t.markLineTime).format("HH:mm:ss")))])])},i=[]},function(t,e,n){"use strict";var r=n(36),i=n(13),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(37);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-leftbar"},[n("div",{staticClass:"gantt-leftbar-item gantt-block-top-space",style:{height:t.topSpace+"px"}}),t._v(" "),t._l(t.showDatas,function(e,r){return n("div",{key:t.dataKey?e[t.dataKey]:r,staticClass:"gantt-leftbar-item",style:t.cellHeightStyle},[t._t("default",[n("div",{staticClass:"gantt-leftbar-defalutItem"},[t._v("need slot")])],{data:e})],2)})],2)},i=[]},function(t,e,n){"use strict";var r=n(39),i=n(16),a=n(0),s=Object(a.a)(i.a,r.a,r.b,!1,null,null,null);e.a=s.exports},function(t,e,n){"use strict";var r=n(40);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gantt-blocks",style:{height:t.blockHeight+"px"}},[n("div",{staticClass:"gantt-block gantt-block-top-space",style:{height:t.topSpace+"px"}}),t._v(" "),t._l(t.showDatas,function(e,r){return n("div",{key:t.dataKey?e[t.dataKey]:r,staticClass:"gantt-block",style:t.blockStyle},[t.customGenerateBlocks?[t._t("default",[t._v("need slot")],{data:e,getPositonOffset:t.getPositonOffset,getWidthAbout2Times:t.getWidthAbout2Times,isInRenderingTimeRange:t.isInRenderingTimeRange,isAcrossRenderingTimeRange:t.isAcrossRenderingTimeRange})]:t._l(t.concatArray(e),function(r,i){return t.isInRenderingTimeRangeOrIsAcrossRenderingTimeRange(r.start,r.end)?n("div",{key:t.itemKey?r[t.itemKey]:i,staticClass:"gantt-block-item",style:{left:t.getPosition(r)+"px",width:t.getWidth(r)+"px"}},[t._t("default",[n("div",{staticClass:"gantt-block-defaultBlock"},[t._v("need slot")])],{data:e,item:r})],2):t._e()})],2)})],2)},i=[]},function(t,e,n){"use strict";var r=n(18),i=n.n(r);i.a},function(t,e,n){var r=n(43);e=t.exports=n(44)(!1),e.push([t.i,".gantt-chart{position:relative;overflow:hidden;outline:1px solid #f0f0f0}.gantt-chart,.gantt-container{height:100%;width:100%}.gantt-header{display:flex;background-color:#fff;outline:1px solid #f0f0f0}.gantt-header-title{flex:none;width:100%;background:#747e80;color:#fff;text-align:center}.gantt-header-timeline{overflow:hidden}.gantt-body,.gantt-timeline{position:relative}.gantt-timeline{text-align:center;display:flex}.gantt-timeline-day{overflow:hidden;font-weight:700;color:#777}.gantt-timeline-scale{display:flex}.gantt-timeline-scale>div{height:100%;font-size:.8rem;font-weight:700;color:#777}.gantt-timeline-block:first-child .gantt-timeline-scale div:first-child{visibility:hidden}.gantt-leftbar{width:100%;height:100%;background:#fff;color:#777;font-size:.8rem}.gantt-leftbar-wrapper{flex:none;position:relative;overflow:hidden;background:#fff;outline:1px solid #f0f0f0;z-index:100}.gantt-leftbar-defalutItem{width:100%;height:100%;outline:1px solid #f0f0f0}.gantt-table{display:flex;width:100%;height:100%}.gantt-markline-area{position:absolute;z-index:99}.gantt-markline{position:absolute;z-index:100;width:2px;height:100vh}.gantt-markline-label{padding:3px;float:left;color:#fff;font-size:.7rem}.gantt-blocks-wrapper{overflow:hidden}.gantt-block{position:relative;background-image:url("+r(n(45))+");background-repeat:repeat}.gantt-block-container{position:relative;height:100%}.gantt-block-item{position:absolute;height:100%}.gantt-block-defaultBlock{width:100%;height:100%;outline:1px solid #f0f0f0;background:#f0f0f0}.gantt-scroll-y{overflow-y:scroll;position:absolute;z-index:1000;top:0;right:0;height:100%;width:17px}.gantt-scroll-y>div{width:17px}.gantt-scroll-x{overflow-x:scroll;position:absolute;z-index:1000;left:0;bottom:0;width:100%;height:17px}.gantt-scroll-x>div{height:17px}",""])},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var a=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([a]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<t.length;i++){var s=t[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAXCAYAAACVp2gDAAAAbElEQVRYR+3SMQ3AMBAEQRtZoAXwk7DCYVN5DsAWo9vLMoGZeXdWE1pA4xMABRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkPBRoLxDkP/QP0U427N+eeAzRXSxcMkEWCAAAAAElFTkSuQmCC"},function(t,e,n){"use strict";function r(t,e,n,r){p=n,v=r||{};var a=Object(l.a)(t,e);return i(a),function(e){for(var n=[],r=0;r<a.length;r++){var s=a[r],o=f[s.id];o.refs--,n.push(o)}e?(a=Object(l.a)(t,e),i(a)):a=[];for(var r=0;r<n.length;r++){var o=n[r];if(0===o.refs){for(var c=0;c<o.parts.length;c++)o.parts[c]();delete f[o.id]}}}}function i(t){for(var e=0;e<t.length;e++){var n=t[e],r=f[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(s(n.parts[i]));f[n.id]={id:n.id,refs:1,parts:a}}}}function a(){var t=document.createElement("style");return t.type="text/css",d.appendChild(t),t}function s(t){var e,n,r=document.querySelector("style["+b+'~="'+t.id+'"]');if(r){if(p)return m;r.parentNode.removeChild(r)}if(y){var i=g++;r=h||(h=a()),e=o.bind(null,r,i,!1),n=o.bind(null,r,i,!0)}else r=a(),e=c.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function o(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var a=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(a,s[e]):t.appendChild(a)}}function c(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),v.ssrId&&t.setAttribute(b,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var l=n(47),u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var f={},d=u&&(document.head||document.getElementsByTagName("head")[0]),h=null,g=0,p=!1,m=function(){},v=null,b="data-vue-ssr-id",y="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase()),_=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],s=a[0],o=a[1],c=a[2],l=a[3],u={id:t+":"+i,css:o,media:c,sourceMap:l};r[s]?r[s].parts.push(u):n.push(r[s]={id:s,parts:[u]})}return n}e.a=r}])});
//# sourceMappingURL=v-gantt-chart.js.map
{
"name": "v-gantt-chart",
"version": "1.3.5",
"version": "1.3.6",
"description": "display gantt-like vaule,like use this to order bus schedule.",

@@ -5,0 +5,0 @@ "main": "dist/v-gantt-chart.js",

@@ -8,5 +8,8 @@ <p align="center"><img src="https://raw.githubusercontent.com/w1301625107/vue-gantt-chart/master/screenshot/icon.png" alt="logo" width="180"></p>

[![npm](https://img.shields.io/npm/v/v-gantt-chart.svg)](https://www.npmjs.com/package/v-gantt-chart)
[![total](https://img.shields.io/npm/dt/v-gantt-chart.svg)](https://img.shields.io/npm/dt/v-gantt-chart.svg)
![](https://img.shields.io/badge/license-MIT-000000.svg)
[![HitCount](http://hits.dwyl.io/w1301625107/Vue-Gantt-chart.svg)](http://hits.dwyl.io/w1301625107/Vue-Gantt-chart)
[![v-gantt-chart](https://nodei.co/npm/v-gantt-chart.png)](https://npmjs.org/package/v-gantt-chart)
## [React版本](https://github.com/w1301625107/React-Gantt-chart)

@@ -81,3 +84,3 @@

<!-- 再引入v-gantt-chart.js -->
<script src="https://unpkg.com/v-gantt-chart/dist/v-gantt-chart.js"></script>
<script src="./v-gantt-chart.js"></script>
<script>

@@ -235,6 +238,7 @@ new Vue({

startTimeOfRenderArea,
isAcrossRenderingTimeRange,
endTimeOfRenderArea}">
<div class="myBlockContainer"
v-for="item in data.gtArray"
v-if="isInRenderingTimeRange(item.start)
v-if="isInRenderingTimeRange(item.start)||isAcrossRenderingTimeRange(item.start,item.end)
||isInRenderingTimeRange(item.end)"

@@ -276,2 +280,5 @@ :key="item.id"

判定给定的时间是否在屏幕显示的时间轴范围之内
`isAcrossRenderingTimeRange(timeStart,timeEnd):boolean`
判定给定的时间是否跨越了屏幕显示的时间轴范围之内

@@ -398,2 +405,4 @@

## Update
1.3.6
- 修复甘特条显示判定条件,slot添加新的api:isAcrossRenderingTimeRange

@@ -400,0 +409,0 @@ 1.3.5

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc