",a=[];for(var o in t.config.constraint_types)a.push({key:t.config.constraint_types[o],label:t.locale.labels[t.config.constraint_types[o]]});return e.options=e.options||a,i+=""+r.getHtmlSelect(e.options,[{key:"data-type",value:"constraint-type"}])+"",i+="",i+=""},a.prototype.set_value=function(e,n,i,r){var a=e.querySelector("[data-constraint-type-select] select"),o=e.querySelectorAll("[data-constraint-time-select] select"),l=r._time_format_order,c=t._resolve_default_mapping(r);a._eventsInitialized||(a.addEventListener("change",function(t){s(o,t.target.value)}),a._eventsInitialized=!0);var u=i[c.constraint_date]||new Date;t.form_blocks._fill_lightbox_select(o,0,u,l,r);var d=i[c.constraint_type]||t.getConstraintType(i);a.value=d,s(o,d)},a.prototype.get_value=function(e,n,i){var r=e.querySelector("[data-constraint-type-select] select"),a=e.querySelectorAll("[data-constraint-time-select] select"),s=r.value,l=null;return o(s)||(l=t.form_blocks.getTimePickerValue(a,i)),{constraint_type:s,constraint_date:l}},a.prototype.focus=function(e){t._focus(e.querySelector("select"))},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(12)(t);function r(){return e.apply(this,arguments)||this}function a(e,n){var i=[],r=[];n&&(i=t.getTaskByTime(),e.allow_root&&i.unshift({id:t.config.root_id,text:e.root_label||""}),i=function(e,n,i){var r=n.filter||function(){return!0};e=e.slice(0);for(var a=0;a",i=" "+t.locale.labels[t.config.duration_unit+"s"]+" ",r=e.single_date?" style='display:none'":"",a=e.readonly?" disabled='disabled'":"",o=t._waiAria.lightboxDurationInputAttrString(e),s="gantt_duration_value";e.formatter&&(i="",s+=" gantt_duration_value_formatted");var l=""+i+"
";return""+n+" "+l+"
"},a.prototype.set_value=function(e,n,i,r){var a,c,u,d,h=e.getElementsByTagName("select"),f=e.getElementsByTagName("input"),_=f[1],g=[f[0],f[2]],p=e.getElementsByTagName("span")[0],v=r._time_format_order;function m(){var n=s.call(t,e,r),a=l.call(t,e,r),o=t.calculateEndDate({start_date:n,duration:a,task:i}),c=t.templates.task_end_date||t.templates.task_date;p.innerHTML=c(o)}function y(t){var e=_.value;e=o(r).parse(e),window.isNaN(e)&&(e=0),(e+=t)<1&&(e=1),_.value=o(r).format(e),m()}g[0].onclick=t.bind(function(){y(-1*t.config.duration_step)},this),g[1].onclick=t.bind(function(){y(1*t.config.duration_step)},this),h[0].onchange=m,h[1].onchange=m,h[2].onchange=m,h[3]&&(h[3].onchange=m),_.onkeydown=t.bind(function(e){var n;return(n=(e=e||window.event).charCode||e.keyCode||e.which)==t.constants.KEY_CODES.DOWN?(y(-1*t.config.duration_step),!1):n==t.constants.KEY_CODES.UP?(y(1*t.config.duration_step),!1):void window.setTimeout(m,1)},this),_.onchange=t.bind(m,this),"string"==typeof(a=t._resolve_default_mapping(r))&&(a={start_date:a}),c=i[a.start_date]||new Date,u=i[a.end_date]||t.calculateEndDate({start_date:c,duration:1,task:i}),d=Math.round(i[a.duration])||t.calculateDuration({start_date:c,end_date:u,task:i}),d=o(r).format(d),t.form_blocks._fill_lightbox_select(h,0,c,v,r),_.value=d,m()},a.prototype.get_value=function(e,n,i){var r=s(e,i),a=l(e,i),o=t.calculateEndDate({start_date:r,duration:a,task:n});return"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:o,duration:a}},a.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(6)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){var e="";if(t.options&&t.options.length)for(var n=0;n"+t.options[n].label+"";return e+="
"},r.prototype.set_value=function(t,e,n,i){var r;i.options&&i.options.length&&(r=t.querySelector("input[type=radio][value='"+e+"']")||t.querySelector("input[type=radio][value='"+i.default_value+"']"))&&(!t._dhx_onchange&&i.onchange&&(t.onchange=i.onchange,t._dhx_onchange=!0),r.checked=!0)},r.prototype.get_value=function(t,e){var n=t.querySelector("input[type=radio]:checked");return n?n.value:""},r.prototype.focus=function(e){t._focus(e.querySelector("input[type=radio]"))},r}},function(t,e,n){var i=n(2),r=n(3);t.exports=function(t){var e=n(6)(t);function a(){return e.apply(this,arguments)||this}return r(a,e),a.prototype.render=function(t){var e="";if(t.options&&t.options.length)for(var n=0;n"+t.options[n].label+"";else t.single_value=!0,e+="";return e+="
"},a.prototype.set_value=function(t,e,n,r){var a=Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]"));(!t._dhx_onchange&&r.onchange&&(t.onchange=r.onchange,t._dhx_onchange=!0),r.single_value)?a[0].checked=!!e:i.forEach(a,function(t){t.checked=!!e&&e.indexOf(t.value)>=0})},a.prototype.get_value=function(t,e,n){return n.single_value?t.querySelector("input[type=checkbox]").checked:i.arrayMap(Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]:checked")),function(t){return t.value})},a.prototype.focus=function(e){t._focus(e.querySelector("input[type=checkbox]"))},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(6)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(e){var n=t.form_blocks.getTimePicker.call(this,e),i="";return i+=n,e.single_date?(n=t.form_blocks.getTimePicker.call(this,e,!0),i+=""):i+=" – ",i+=n,i+="
"},r.prototype.set_value=function(e,n,i,r){var a=r,o=e.getElementsByTagName("select"),s=r._time_format_order;if(a.auto_end_date)for(var l=function(){d=new Date(o[s[2]].value,o[s[1]].value,o[s[0]].value,0,0),h=t.calculateEndDate({start_date:d,duration:1,task:i}),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},c=0;c<4;c++)o[c].onchange=l;var u=t._resolve_default_mapping(r);"string"==typeof u&&(u={start_date:u});var d=i[u.start_date]||new Date,h=i[u.end_date]||t.calculateEndDate({start_date:d,duration:1,task:i});t.form_blocks._fill_lightbox_select(o,0,d,s,a),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},r.prototype.get_value=function(e,n,i){var r,a=e.getElementsByTagName("select"),o=i._time_format_order;return r=t.form_blocks.getTimePickerValue(a,i),"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:function(e,n,r){var a=t.form_blocks.getTimePickerValue(e,i,n.size);return a<=r&&(!1!==i.autofix_end||i.single_date)?t.date.add(r,t._get_timepicker_step(),"minute"):a}(a,o,r)}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(6)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){return""},r.prototype.set_value=function(e,n){t.form_blocks.textarea._get_input(e).value=n||""},r.prototype.get_value=function(e){return t.form_blocks.textarea._get_input(e).value},r.prototype.focus=function(e){var n=t.form_blocks.textarea._get_input(e);t._focus(n,!0)},r.prototype._get_input=function(t){return t.querySelector("textarea")},r}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(6)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){return""},r.prototype.set_value=function(t,e){t.innerHTML=e||""},r.prototype.get_value=function(t){return t.innerHTML||""},r.prototype.focus=function(){},r}},function(t,e,n){function i(t){"@babel/helpers - typeof";return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(1),r=n(2),a=n(54)(t),o=n(53)(t),s=n(52)(t),l=n(12)(t),c=n(51)(t),u=n(50)(t),d=n(49)(t),h=n(48)(t),f=n(12)(t),_=n(47)(t),g=n(46)(t);function p(e,n){var i,r,a="";for(r=0;r"+t.locale.labels[i]+"
";return a}function v(e,n,i){var r,a,o,s,l,c,u="";switch(i.timeFormat[n]){case"%Y":for(e._time_format_order[2]=n,e._time_format_order.size++,e.year_range&&(isNaN(e.year_range)?e.year_range.push&&(o=e.year_range[0],s=e.year_range[1]):r=e.year_range),r=r||10,a=a||Math.floor(r/2),o=o||i.date.getFullYear()-a,s=s||o+r,l=o;l"+l+"";break;case"%m":for(e._time_format_order[1]=n,e._time_format_order.size++,l=0;l<12;l++)u+="";break;case"%d":for(e._time_format_order[0]=n,e._time_format_order.size++,l=1;l<32;l++)u+="";break;case"%H:%i":for(e._time_format_order[3]=n,e._time_format_order.size++,l=i.first,c=i.date.getDate(),e._time_values=[];l"+t.templates.time_picker(i.date)+"",e._time_values.push(l),i.date.setTime(i.date.valueOf()+60*t._get_timepicker_step()*1e3),l=24*(i.date.getDate()!=c?1:0)*60+60*i.date.getHours()+i.date.getMinutes()}return u}t._lightbox_methods={},t._lightbox_template="
",t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(t){if(this.callEvent("onBeforeLightbox",[t])){var e=this.getTask(t),n=this.getLightbox(this.getTaskType(e.type));this._center_lightbox(n),this.showCover(),this._fill_lightbox(t,n),this._waiAria.lightboxVisibleAttr(n),this.callEvent("onLightbox",[t])}},t._get_timepicker_step=function(){if(this.config.round_dnd_dates){var e;if(function(t){var e=t.$ui.getView("timeline");return!(!e||!e.isVisible())}(this)){var n=t.getScale();e=r.getSecondsInUnit(n.unit)*n.step/60}return(!e||e>=1440)&&(e=this.config.time_step),e}return this.config.time_step},t.getLabel=function(t,e){for(var n=this._get_typed_lightbox_config(),i=0;i"+this.locale.labels["button_"+t[n].button]+"
"),this.config.wide_form&&(e+=""),e+="
"+i.render.call(this,t[n]),e+="
"}}return e},t.resizeLightbox=function(){if(this._lightbox){var t=this._lightbox.querySelector(".gantt_cal_larea");t.style.height="0px",t.style.height=t.scrollHeight+"px",this._lightbox.style.height=t.scrollHeight+this.config.lightbox_additional_height+"px",t.style.height=t.scrollHeight+"px"}},t._center_lightbox=function(t){if(t){t.style.display="block";var e=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,n=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,i=window.innerHeight||document.documentElement.clientHeight;t.style.top=e?Math.round(e+Math.max((i-t.offsetHeight)/2,0))+"px":Math.round(Math.max((i-t.offsetHeight)/2,0)+9)+"px",document.documentElement.scrollWidth>document.body.offsetWidth?t.style.left=Math.round(n+(document.body.offsetWidth-t.offsetWidth)/2)+"px":t.style.left=Math.round((document.body.offsetWidth-t.offsetWidth)/2)+"px"}},t.showCover=function(){this._cover||(this._cover=document.createElement("DIV"),this._cover.className="gantt_cal_cover",document.body.appendChild(this._cover))},t.event(window,"deviceorientation",function(){t.getState().lightbox&&t._center_lightbox(t.getLightbox())}),t._init_lightbox_events=function(){t.lightbox_events={},t.lightbox_events.gantt_save_btn=function(){t._save_lightbox()},t.lightbox_events.gantt_delete_btn=function(){t._lightbox_new_type=null,t.callEvent("onLightboxDelete",[t._lightbox_id])&&(t.isTaskExists(t._lightbox_id)?t.$click.buttons.delete(t._lightbox_id):t.hideLightbox())},t.lightbox_events.gantt_cancel_btn=function(){t._cancel_lightbox()},t.lightbox_events.default=function(n,i){if(i.getAttribute("data-dhx-button"))t.callEvent("onLightboxButton",[i.className,i,n]);else{var r,a,o=e.getClassName(i);if(-1!=o.indexOf("gantt_custom_button"))if(-1!=o.indexOf("gantt_custom_button_"))for(r=i.parentNode.getAttribute("data-index"),a=i;a&&-1==e.getClassName(a).indexOf("gantt_cal_lsection");)a=a.parentNode;else r=i.getAttribute("data-index"),a=i.parentNode,i=i.firstChild;var s=t._get_typed_lightbox_config();r&&(r*=1,t.form_blocks[s[1*r].type].button_click(r,i,a,a.nextSibling))}},this.event(t.getLightbox(),"click",function(n){n=n||window.event;var i=e.getTargetNode(n),r=e.getClassName(i);return r||(i=i.previousSibling,r=e.getClassName(i)),i&&r&&0===r.indexOf("gantt_btn_set")&&(i=i.firstChild,r=e.getClassName(i)),!(!i||!r)&&(t.defined(t.lightbox_events[i.className])?t.lightbox_events[i.className]:t.lightbox_events.default)(n,i)}),t.getLightbox().onkeydown=function(n){var i=n||window.event,r=n.target||n.srcElement,a=e.getClassName(r).indexOf("gantt_btn_set")>-1;switch((n||i).keyCode){case t.constants.KEY_CODES.SPACE:if((n||i).shiftKey)return;a&&r.click&&r.click();break;case t.keys.edit_save:if((n||i).shiftKey)return;a&&r.click?r.click():t._save_lightbox();break;case t.keys.edit_cancel:t._cancel_lightbox()}}},t._cancel_lightbox=function(){var e=this.getLightboxValues();this.callEvent("onLightboxCancel",[this._lightbox_id,e.$new]),t.isTaskExists(e.id)&&e.$new&&this.silent(function(){t.$data.tasksStore.removeItem(e.id),t._update_flags(e.id,null)}),this.refreshData(),this.hideLightbox()},t._save_lightbox=function(){var t=this.getLightboxValues();this.callEvent("onLightboxSave",[this._lightbox_id,t,!!t.$new])&&(t.$new?(delete t.$new,this.addTask(t,t.parent,this.getTaskIndex(t.id))):this.isTaskExists(t.id)&&(this.mixin(this.getTask(t.id),t,!0),this.refreshTask(t.id),this.updateTask(t.id)),this.refreshData(),this.hideLightbox())},t._resolve_default_mapping=function(t){var e=t.map_to;return!{time:!0,time_optional:!0,duration:!0,duration_optional:!0}[t.type]?"constraint"===t.type&&(t.map_to&&"string"!=typeof t.map_to||(e={constraint_type:"constraint_type",constraint_date:"constraint_date"})):"auto"==t.map_to?e={start_date:"start_date",end_date:"end_date",duration:"duration"}:"string"==typeof t.map_to&&(e={start_date:t.map_to}),e},t.getLightboxValues=function(){var e={};t.isTaskExists(this._lightbox_id)&&(e=this.mixin({},this.getTask(this._lightbox_id)));for(var n=this._get_typed_lightbox_config(),r=0;r0&&(s+=" "),(a=v(e,i,c))&&(o=t._waiAria.lightboxSelectAttrString(c.timeFormat[i]),s+="");return s},getTimePickerValue:function(e,n,i){var r,a=n._time_format_order,o=t.defined(a[3]),s=0,l=0,c=i||0;return o&&(r=parseInt(e[a[3]+c].value,10),s=Math.floor(r/60),l=r%60),new Date(e[a[2]+c].value,e[a[1]+c].value,e[a[0]+c].value,s,l)},_fill_lightbox_select:function(e,n,i,r){if(e[n+r[0]].value=i.getDate(),e[n+r[1]].value=i.getMonth(),e[n+r[2]].value=i.getFullYear(),t.defined(r[3])){var a=60*i.getHours()+i.getMinutes();a=Math.round(a/t._get_timepicker_step())*t._get_timepicker_step();var o=e[n+r[3]];o.value=a,o.setAttribute("data-value",a)}},template:new a,textarea:new o,select:new l,time:new s,duration:new d,parent:new h,radio:new u,checkbox:new c,resources:new f,constraint:new _,typeselect:new g},t._is_lightbox_timepicker=function(){for(var t=this._get_typed_lightbox_config(),e=0;e1),this.config.touch){var t=!0;try{document.createEvent("TouchEvent")}catch(e){t=!1}t?this._touch_events(["touchmove","touchstart","touchend"],function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(t){return"mouse"==t.pointerType?null:t},function(t){return!t||"mouse"==t.pointerType}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}},t));var i=[];t._touch_events=function(r,a,o){for(var s,l=0,c=!1,u=!1,d=null,h=null,f=null,_=[],g=null,p=0;p5||Math.abs(p)>5)&&(u=!0,l=0,s=g?e(g):t.getScrollState()),u){var m,y=s.x+_,k=s.y+p;if(g?(!function(e,n,i){var r=e.$config.scrollX?t.$ui.getView(e.$config.scrollX):null,a=e.$config.scrollY?t.$ui.getView(e.$config.scrollY):null;r&&r.scrollTo(n,null),a&&a.scrollTo(null,i)}(g,y,k),m=e(g)):(t.scrollTo(y,k),m=t.getScrollState()),s.x!=m.x&&p>2*_||s.y!=m.y&&_>2*p)return v(i)}}return v(i)}return!0}}]),i.push([this.$container,"contextmenu",function(t){if(c)return v(t)}]),i.push([this.$container,r[1],function(e){if(document&&document.body&&document.body.classList.add("gantt_touch_active"),!o(e))if(e.touches&&e.touches.length>1)c=!1;else{d=a(e),g=function(e){for(var n=t.$layout.getCellsByType("viewCell"),i=0;i=r.left&&e.clientX<=r.right&&e.clientY<=r.bottom&&e.clientY>=r.top)return n[i]}}(d),t._locate_css(d,"gantt_hor_scroll")||t._locate_css(d,"gantt_ver_scroll")||(c=!0);var i=n();h=setTimeout(function(){var e=t.locate(d);i&&e&&!t._locate_css(d,"gantt_link_control")&&!t._locate_css(d,"gantt_grid_data")&&(i.on_mouse_down(d),i.drag&&i.drag.start_drag&&(!function(e){var n=t._getTaskLayers(),i=t.getTask(e);if(i&&t.isTaskVisible(e)){f=e;for(var r=0;re._levels.length-1||e.setLevel(t)},this.getCurrentLevel=function(){return e._activeLevelIndex},this.getLevels=function(){return e._levels},this.setLevel=function(t){var n=e._getZoomIndexByName(t);-1===n&&e.$gantt.assert(-1!==n,"Invalid zoom level for gantt.ext.zoom.setLevel. "+t+" is not an expected value."),e._setLevel(n,0)},this._getZoomIndexByName=function(t){var n=-1;if("string"==typeof t){if(!isNaN(Number(t))&&e._levels[Number(t)])n=Number(t);else for(var i=0;i0&&(r=!0),t.preventDefault(),t.stopPropagation(),e._setScaleSettings(r,i)},this._setScaleDates=function(){e._initialStartDate&&e._initialEndDate&&(e.$gantt.config.start_date=e._initialStartDate,e.$gantt.config.end_date=e._initialEndDate)},this.$gantt=t,this._domEvents=this.$gantt._createDomEventScope()}return t.prototype.init=function(t){var e=this;this.$gantt.env.isNode||(this._initialStartDate=t.startDate,this._initialEndDate=t.endDate,this._activeLevelIndex=t.activeLevelIndex?t.activeLevelIndex:0,this._levels=this._mapScales(t.levels||o),this._handler=t.handler||this._defaultHandler,this._minColumnWidth=t.minColumnWidth||60,this._maxColumnWidth=t.maxColumnWidth||240,this._widthStep=t.widthStep||3/8*t.minColumnWidth,this._useKey=t.useKey,this._initialized||(r(this),this.$gantt.attachEvent("onGanttScroll",function(){e._getVisibleDate()})),this._domEvents.detachAll(),"wheel"===t.trigger&&(this.$gantt.$root?this._attachWheelEvent(t):this.$gantt.attachEvent("onGanttReady",function(){e._attachWheelEvent(t)})),this._initialized=!0,this.setLevel(this._activeLevelIndex))},t.prototype._mapScales=function(t){return t.map(function(t){return Array.isArray(t)?{scales:t}:t})},t.prototype._setScaleSettings=function(t,e){t?this._stepUp(e):this._stepDown(e)},t.prototype._stepUp=function(t){if(!(this._activeLevelIndex>=this._levels.length-1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width+this._widthStep;n>this._maxColumnWidth&&(n=this._minColumnWidth,e++),this.$gantt.config.min_column_width=n}else e++;this._setLevel(e,t)}},t.prototype._stepDown=function(t){if(!(this._activeLevelIndex<1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width-this._widthStep;n0&&p+v>=y+2&&(c=0),s&&!b?s=0:s<0&&!k?s=0:s>0&&k+b>=w&&(s=0);var x=t.config.autoscroll_step;x&&x<2&&(x=2),s*=x||n,c*=x||n,(s||c)&&function(e,n){var i=t.getScrollState(),r=null,a=null;e&&(r=i.x+e,r=Math.min(i.width,r),r=Math.max(0,r));n&&(a=i.y+n,a=Math.min(i.height,a),a=Math.max(0,a));t.scrollTo(r,a)}(s,c)}}function m(t,n,i){return t-e<0&&tn-e&&t>i?1:0}t.attachEvent("onGanttReady",function(){if(!r(t)){var e=i.getRootNode(t.$root)||document.body;t.eventRemove(e,"mousemove",p),t.event(e,"mousemove",p),t.eventRemove(e,"touchmove",p),t.event(e,"touchmove",p),t.eventRemove(e,"pointermove",p),t.event(e,"pointermove",p)}}),t.attachEvent("onDestroy",function(){g(!1)})}},function(t,e,n){t.exports=function(t){t.ext||(t.ext={});for(var e=[n(60),n(59),n(58)],i=0;i-1&&(n.className=n.className.slice(0,t))},200))})}},function(t,e){t.exports=function(t){t.skins.broadway={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:1,link_arrow_size:7,lightbox_additional_height:86},_second_column_width:90,_third_column_width:80,_lightbox_template:"",_config_buttons_left:{},_config_buttons_right:{gantt_delete_btn:"icon_delete",gantt_save_btn:"icon_save"}}}},function(t,e){t.exports=function(t){t.skins.terrace={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:6,lightbox_additional_height:75},_second_column_width:90,_third_column_width:70}}},function(t,e){t.exports=function(t){t.skins.meadow={config:{grid_width:350,row_height:27,scale_height:30,link_line_width:2,link_arrow_size:6,lightbox_additional_height:72},_second_column_width:95,_third_column_width:80}}},function(t,e){t.exports=function(t){t.skins.skyblue={config:{grid_width:350,row_height:27,scale_height:27,link_line_width:1,link_arrow_size:8,lightbox_additional_height:75},_second_column_width:95,_third_column_width:80}}},function(t,e){function n(t,e){var n=e.skin;if(!n||t)for(var i=document.getElementsByTagName("link"),r=0;rl.width?l.min_width:l.width,l.width=l.max_width&&l.max_widthl[1]&&(t.config.grid_width=l[1]),r&&t.config.show_chart){if(a.$config.width=t.config.grid_width-1,!a.$config.scrollable&&a.$config.scrollY){var c=a.$gantt.$layout.$container.offsetWidth,u=t.$ui.getView(a.$config.scrollY).$config.width,d=c-(a.$config.width+u);d<0&&(a.$config.width+=d,t.config.grid_width+=d)}if(n)a.$parent.$config.width=t.config.grid_width,a.$parent.$config.group&&t.$layout._syncCellSizes(a.$parent.$config.group,{value:a.$parent.$config.width,isGravity:!1});else if(r&&!i.isChildOf(r.$task,e.$view)){if(!a.$config.original_grid_width){var h=t.skins[t.skin];h&&h.config&&h.config.grid_width?a.$config.original_grid_width=h.config.grid_width:a.$config.original_grid_width=0}t.config.grid_width=a.$config.original_grid_width,a.$parent.$config.width=t.config.grid_width}else a.$parent._setContentSize(a.$config.width,null),t.$layout._syncCellSizes(a.$parent.$config.group,{value:t.config.grid_width,isGravity:!1})}else r&&i.isChildOf(r.$task,e.$view)&&(a.$config.original_grid_width=t.config.grid_width),n||(a.$parent.$config.width=0)}n=!1}}),this._initScrollStateEvents(e)},_initScrollStateEvents:function(e){t._getVerticalScrollbar=this.getVerticalScrollbar,t._getHorizontalScrollbar=this.getHorizontalScrollbar;var n=this.getVerticalScrollbar(),i=this.getHorizontalScrollbar();n&&n.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[r.x,e,r.x,n])}),i&&i.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[e,r.y,n,r.y]);var a=t.$ui.getView("grid");a&&a.$grid_data&&!a.$config.scrollable&&(a.$grid_data.style.left=a.$grid.scrollLeft+"px",a.$grid_data.scrollLeft=a.$grid.scrollLeft)}),e.attachEvent("onResize",function(){n&&!t.$scroll_ver&&(t.$scroll_ver=n.$scroll_ver),i&&!t.$scroll_hor&&(t.$scroll_hor=i.$scroll_hor)})},_findGridResizer:function(t,e){for(var n,i=t.getCellsByType("resizer"),r=!0,a=0;aa.bottom&&(d.y=a.bottom-r.height-s),d.right>a.right&&(d.x=a.right-r.width-o),d}function v(t){var n=u(),i=["gantt_link_tooltip"];n.link_source_id&&n.link_target_id&&(e.isLinkAllowed(n.link_source_id,n.link_target_id,n.link_from_start,n.link_to_start)?i.push("gantt_allowed_link"):i.push("gantt_invalid_link"));var r=e.templates.drag_link_class(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start);r&&i.push(r);var a=""+e.templates.drag_link(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start)+"
";t.innerHTML=a}function m(){o=s=r=null,a=!0}function y(n,i,r,a){var o=function(){_._direction&&_._direction.parentNode||(_._direction=document.createElement("div"),t.$task_links.appendChild(_._direction));return _._direction}(),s=u(),l=["gantt_link_direction"];e.templates.link_direction_class&&l.push(e.templates.link_direction_class(s.link_source_id,s.link_from_start,s.link_target_id,s.link_to_start));var c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(c=Math.max(0,c-3)){o.className=l.join(" ");var d=(a-i)/(r-n),h=Math.atan(d);2==k(n,r,i,a)?h+=Math.PI:3==k(n,r,i,a)&&(h-=Math.PI);var f=Math.sin(h),g=Math.cos(h),p=Math.round(i),v=Math.round(n),m=["-webkit-transform: rotate("+h+"rad)","-moz-transform: rotate("+h+"rad)","-ms-transform: rotate("+h+"rad)","-o-transform: rotate("+h+"rad)","transform: rotate("+h+"rad)","width:"+Math.round(c)+"px"];if(-1!=window.navigator.userAgent.indexOf("MSIE 8.0")){m.push('-ms-filter: "'+function(t,e){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+e+",M12 = -"+t+",M21 = "+t+",M22 = "+e+",SizingMethod = 'auto expand')"}(f,g)+'"');var y=Math.abs(Math.round(n-r)),b=Math.abs(Math.round(a-i));switch(k(n,r,i,a)){case 1:p-=b;break;case 2:v-=y,p-=b;break;case 3:v-=y}}m.push("top:"+p+"px"),m.push("left:"+v+"px"),o.style.cssText=m.join(";")}}function k(t,e,n,i){return e>=t?i<=n?1:4:i<=n?2:3}_.attachEvent("onBeforeDragStart",e.bind(function(n,r){var a=r.target||r.srcElement;if(m(),e.getState("tasksDnd").drag_id)return!1;if(i.locateClassName(a,"gantt_link_point")){i.locateClassName(a,"task_start_date")&&(s=!0);var l=e.locate(r);o=l;var c=e.getTask(l);if(e.isReadonly(c))return m(),!1;return this._dir_start=g(c,!!s,0,t.$getConfig(),!0),!0}return!1},this)),_.attachEvent("onAfterDragStart",e.bind(function(t,n){e.config.touch&&e.refreshData(),v(_.config.marker)},this)),_.attachEvent("onDragMove",e.bind(function(o,s){var l=_.config,c=p(s,l.marker);!function(t,e){t.style.left=e.x+"px",t.style.top=e.y+"px"}(l.marker,c);var u=!!i.locateClassName(s,"gantt_link_control"),d=r,h=n,f=a,m=e.locate(s),k=!0,b=i.getTargetNode(s);if(i.isChildOf(b,e.$root)||(u=!1,m=null),u&&(k=!i.locateClassName(s,"task_end_date"),u=!!m),r=m,n=u,a=k,u){var w=e.getTask(m),x=t.$getConfig(),$=i.locateClassName(s,"gantt_link_control"),S=0;$&&(S=Math.floor($.offsetWidth/2)),this._dir_end=g(w,!!a,S,x)}else this._dir_end=i.getRelativeEventPosition(s,t.$task_data),e.env.isEdge&&(this._dir_end.y+=window.scrollY);var T=!(h==u&&d==m&&f==k);return T&&(d&&e.refreshTask(d,!1),m&&e.refreshTask(m,!1)),T&&v(l.marker),y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),_.attachEvent("onDragEnd",e.bind(function(){var t=u();if(t.link_source_id&&t.link_target_id&&t.link_source_id!=t.link_target_id){var n=e._get_link_type(t.link_from_start,t.link_to_start),i={source:t.link_source_id,target:t.link_target_id,type:n};i.type&&e.isLinkAllowed(i)&&e.callEvent("onLinkCreated",[i])&&e.addLink(i)}m(),e.config.touch?e.refreshData():(t.link_source_id&&e.refreshTask(t.link_source_id,!1),t.link_target_id&&e.refreshTask(t.link_target_id,!1)),_._direction&&(_._direction.parentNode&&_._direction.parentNode.removeChild(_._direction),_._direction=null)},this)),e.attachEvent("onGanttRender",e.bind(function(){_._direction&&y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y)},this))};t.exports={createLinkDND:function(){return{init:r}}}},function(t,e,n){var i=n(1),r=n(0),a=n(42),o=n(2);t.exports={createTaskDND:function(){var t;return{extend:function(e){e.roundTaskDates=function(e){t.round_task_dates(e)}},init:function(e,n){return t=function(t,e){var n=e.$services;return{drag:null,dragMultiple:{},_events:{before_start:{},before_finish:{},after_finish:{}},_handlers:{},init:function(){this._domEvents=e._createDomEventScope(),this.clear_drag_state();var t=e.config.drag_mode;this.set_actions(),n.getService("state").registerProvider("tasksDnd",r.bind(function(){return{drag_id:this.drag?this.drag.id:void 0,drag_mode:this.drag?this.drag.mode:void 0,drag_from_start:this.drag?this.drag.left:void 0}},this));var i={before_start:"onBeforeTaskDrag",before_finish:"onBeforeTaskChanged",after_finish:"onAfterTaskDrag"};for(var a in this._events)for(var o in t)this._events[a][o]=i[a];this._handlers[t.move]=this._move,this._handlers[t.resize]=this._resize,this._handlers[t.progress]=this._resize_progress},set_actions:function(){var n=t.$task_data;this._domEvents.attach(n,"mousemove",e.bind(function(t){this.on_mouse_move(t)},this)),this._domEvents.attach(n,"mousedown",e.bind(function(t){this.on_mouse_down(t)},this)),this._domEvents.attach(document.body,"mouseup",e.bind(function(t){this.on_mouse_up(t)},this))},clear_drag_state:function(){this.drag={id:null,mode:null,pos:null,start_x:null,start_y:null,obj:null,left:null},this.dragMultiple={}},_resize:function(n,i,r){var a=t.$getConfig(),o=this._drag_task_coords(n,r);r.left?(n.start_date=e.dateFromPos(o.start+i),n.start_date||(n.start_date=new Date(e.getState().min_date))):(n.end_date=e.dateFromPos(o.end+i),n.end_date||(n.end_date=new Date(e.getState().max_date)));var s=this._calculateMinDuration(a.min_duration,a.duration_unit);n.end_date-n.start_datec){var u=c-s.end;(ui||void 0===i)&&(i=d)}}return i},_move:function(t,n,i){var r=this._drag_task_coords(t,i),a=e.dateFromPos(r.start+n),o=e.dateFromPos(r.end+n);a?o?(t.start_date=a,t.end_date=o):(t.end_date=new Date(e.getState().max_date),t.start_date=e.dateFromPos(e.posFromDate(t.end_date)-(r.end-r.start))):(t.start_date=new Date(e.getState().min_date),t.end_date=e.dateFromPos(e.posFromDate(t.start_date)+(r.end-r.start)))},_drag_task_coords:function(t,n){return{start:n.obj_s_x=n.obj_s_x||e.posFromDate(t.start_date),end:n.obj_e_x=n.obj_e_x||e.posFromDate(t.end_date)}},_mouse_position_change:function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},_is_number:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},on_mouse_move:function(t){if(this.drag.start_drag){var n=i.getRelativeEventPosition(t,e.$task_data),r=this.drag.start_drag.start_x,o=this.drag.start_drag.start_y;(Date.now()-this.drag.timestamp>50||this._is_number(r)&&this._is_number(o)&&this._mouse_position_change({x:r,y:o},n)>20)&&this._start_dnd(t)}if(this.drag.mode){if(!a(this,40))return;this._update_on_move(t)}},_update_item_on_move:function(t,n,i,r,a){var o=e.getTask(n),s=e.mixin({},o),l=e.mixin({},o);this._handlers[i].apply(this,[l,t,r]),e.mixin(o,l,!0),e.callEvent("onTaskDrag",[o.id,i,l,s,a]),e.mixin(o,l,!0),e.refreshTask(n)},_update_on_move:function(n){var a=this.drag,o=t.$getConfig();if(a.mode){var s=i.getRelativeEventPosition(n,t.$task_data);if(a.pos&&a.pos.x==s.x)return;a.pos=s;var l=e.dateFromPos(s.x);if(!l||isNaN(l.getTime()))return;var c=s.x-a.start_x,u=e.getTask(a.id);if(this._handlers[a.mode]){if(a.mode===o.drag_mode.move){var d={};this._isMultiselect()&&e.getSelectedTasks().indexOf(a.id)>=0&&(d=this.dragMultiple);var h=!1;if(e.isSummaryTask(u)&&e.config.drag_project){var f={};f[a.id]=r.copy(a),h=!0,d=r.mixin(f,this.dragMultiple)}var _=this._find_max_shift(d,c);for(var g in void 0!==_&&(c=_),this._update_item_on_move(c,a.id,a.mode,a,n),d){var p=d[g];h&&p.id!=a.id&&(e._bulk_dnd=!0),this._update_item_on_move(c,p.id,p.mode,p,n)}e._bulk_dnd=!1}else this._update_item_on_move(c,a.id,a.mode,a,n);e._update_parents(a.id)}}},on_mouse_down:function(n,r){if(2!=n.button||void 0===n.button){var a=t.$getConfig(),o=e.locate(n),s=null;if(e.isTaskExists(o)&&(s=e.getTask(o)),!e.isReadonly(s)&&!this.drag.mode){this.clear_drag_state(),r=r||n.target||n.srcElement;var l=i.getClassName(r),c=this._get_drag_mode(l,r);if(!l||!c)return r.parentNode?this.on_mouse_down(n,r.parentNode):void 0;if(c)if(c.mode&&c.mode!=a.drag_mode.ignore&&a["drag_"+c.mode]){if(o=e.locate(r),s=e.copy(e.getTask(o)||{}),e.isReadonly(s))return this.clear_drag_state(),!1;if(e.isSummaryTask(s)&&!a.drag_project&&c.mode!=a.drag_mode.progress)return void this.clear_drag_state();c.id=o;var u=i.getRelativeEventPosition(n,e.$task_data);c.start_x=u.x,c.start_y=u.y,c.obj=s,this.drag.start_drag=c,this.drag.timestamp=Date.now()}else this.clear_drag_state();else if(e.checkEvent("onMouseDown")&&e.callEvent("onMouseDown",[l.split(" ")[0]])&&r.parentNode)return this.on_mouse_down(n,r.parentNode)}}},_fix_dnd_scale_time:function(n,i){var r=t.$getConfig(),a=e.getScale().unit,o=e.getScale().step;function s(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(n.start_date,void 0,n)||(n.start_date=e.calculateEndDate({start_date:n.start_date,duration:-1,unit:i.duration_unit,task:n}))}}r.round_dnd_dates||(a="minute",o=r.time_step),i.mode==r.drag_mode.resize?i.left?(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n)):(n.end_date=e.roundDate({date:n.end_date,unit:a,step:o}),function(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(new Date(n.end_date-1),void 0,n)||(n.end_date=e.calculateEndDate({start_date:n.end_date,duration:1,unit:i.duration_unit,task:n}))}}(n)):i.mode==r.drag_mode.move&&(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n),n.end_date=e.calculateEndDate(n))},_fix_working_times:function(n,i){var r=t.$getConfig();(i=i||{mode:r.drag_mode.move}).mode==r.drag_mode.resize?i.left?n.start_date=e.getClosestWorkTime({date:n.start_date,dir:"future",task:n}):n.end_date=e.getClosestWorkTime({date:n.end_date,dir:"past",task:n}):i.mode==r.drag_mode.move&&e.correctTaskWorkTime(n)},_finalize_mouse_up:function(t,n,i,r){var a=e.getTask(t);if(n.work_time&&n.correct_work_time&&this._fix_working_times(a,i),this._fix_dnd_scale_time(a,i),this._fireEvent("before_finish",i.mode,[t,i.mode,e.copy(i.obj),r])){var o=t;e._init_task_timing(a),this.clear_drag_state(),e.updateTask(a.id),this._fireEvent("after_finish",i.mode,[o,i.mode,r])}else this.clear_drag_state(),t==i.id&&(i.obj._dhx_changed=!1,e.mixin(a,i.obj,!0)),e.refreshTask(a.id)},on_mouse_up:function(n){var i=this.drag;if(i.mode&&i.id){var r=t.$getConfig(),a=e.getTask(i.id),o=this.dragMultiple,s=!1,l=0;i.mode===r.drag_mode.move&&(e.isSummaryTask(a)&&r.drag_project||this._isMultiselect())&&(s=!0,l=Object.keys(o).length);var c=function(){if(s)for(var t in o)this._finalize_mouse_up(o[t].id,r,o[t],n);this._finalize_mouse_up(i.id,r,i,n)};s&&l>10?e.batchUpdate(function(){c.call(this)}.bind(this)):c.call(this)}this.clear_drag_state()},_get_drag_mode:function(e,n){var i=t.$getConfig().drag_mode,r={mode:null,left:null};switch((e||"").split(" ")[0]){case"gantt_task_line":case"gantt_task_content":r.mode=i.move;break;case"gantt_task_drag":r.mode=i.resize;var a=n.getAttribute("data-bind-property");r.left="start_date"==a;break;case"gantt_task_progress_drag":r.mode=i.progress;break;case"gantt_link_control":case"gantt_link_point":r.mode=i.ignore;break;default:r=null}return r},_start_dnd:function(n){var i=this.drag=this.drag.start_drag;delete i.start_drag;var r=t.$getConfig(),a=i.id;if(r["drag_"+i.mode]&&e.callEvent("onBeforeDrag",[a,i.mode,n])&&this._fireEvent("before_start",i.mode,[a,i.mode,n])){delete i.start_drag;var s=e.getTask(a);if(e.isReadonly(s))return void this.clear_drag_state();if(this._isMultiselect()){var l=e.getSelectedTasks();l.indexOf(i.id)>=0&&o.forEach(l,e.bind(function(t){var n=e.getTask(t);e.isSummaryTask(n)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(n.id),this.dragMultiple[t]=e.mixin({id:n.id,obj:e.copy(n)},this.drag)},this))}e.isSummaryTask(s)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(s.id),e.callEvent("onTaskDragStart",[])}else this.clear_drag_state()},_fireEvent:function(t,n,i){e.assert(this._events[t],"Invalid stage:{"+t+"}");var r=this._events[t][n];return e.assert(r,"Unknown after drop mode:{"+n+"}"),e.assert(i,"Invalid event arguments"),!e.checkEvent(r)||e.callEvent(r,i)},round_task_dates:function(e){var n=this.drag,i=t.$getConfig();n||(n={mode:i.drag_mode.move}),this._fix_dnd_scale_time(e,n)},destructor:function(){this._domEvents.detachAll()},_isMultiselect:function(){return e.config.drag_multiple&&!!(e.getSelectedTasks&&e.getSelectedTasks().length>0)},_addSubtasksToDragMultiple:function(t){e.eachTask(function(t){this.dragMultiple[t.id]=e.mixin({id:t.id,obj:e.copy(t)},this.drag)},t,this)}}}(e,n),e._tasks_dnd=t,t.init(n)},destructor:function(){t&&(t.destructor(),t=null)}}}}},function(t,e,n){var i=n(0),r=n(74),a=n(73),o=n(1),s=function(t){var e=t.$services;return{onCreated:function(e){var o=e.$config;o.bind=i.defined(o.bind)?o.bind:"task",o.bindLinks=i.defined(o.bindLinks)?o.bindLinks:"link",e._linksDnD=a.createLinkDND(),e._tasksDnD=r.createTaskDND(),e._tasksDnD.extend(e),this._mouseDelegates=n(24)(t)},onInitialized:function(e){this._attachDomEvents(t),this._attachStateProvider(t,e),e._tasksDnD.init(e,t),e._linksDnD.init(e,t),"timeline"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){this._clearDomEvents(t),this._clearStateProvider(t),e._tasksDnD&&e._tasksDnD.destructor()},extendDom:function(e){t.$task=e.$task,t.$task_scale=e.$task_scale,t.$task_data=e.$task_data,t.$task_bg=e.$task_bg,t.$task_links=e.$task_links,t.$task_bars=e.$task_bars},_clearDomEvents:function(){this._mouseDelegates.destructor(),this._mouseDelegates=null},_attachDomEvents:function(t){function e(e,n){if(e&&this.callEvent("onLinkDblClick",[e,n])){var i=this.getLink(e);if(this.isReadonly(i))return;var r=this.locale.labels.link+" "+this.templates.link_description(this.getLink(e))+" "+this.locale.labels.confirm_link_deleting;window.setTimeout(function(){t._dhtmlx_confirm(r,"",function(){t.deleteLink(e)})},this.config.touch?300:1)}}this._mouseDelegates.delegate("click","gantt_task_link",t.bind(function(t,e){var n=this.locate(t,this.config.link_attribute);n&&this.callEvent("onLinkClick",[n,t])},t),this.$task),this._mouseDelegates.delegate("click","gantt_scale_cell",t.bind(function(e,n){var i=o.getRelativeEventPosition(e,t.$task_data),r=t.dateFromPos(i.x),a=Math.floor(t.columnIndexByDate(r)),s=t.getScale().trace_x[a];t.callEvent("onScaleClick",[e,s])},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_task_link",t.bind(function(n,i,r){i=this.locate(n,t.config.link_attribute),e.call(this,i,n)},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_link_point",t.bind(function(t,n,i){n=this.locate(t);var r=this.getTask(n),a=null;return i.parentNode&&o.getClassName(i.parentNode)&&(a=o.getClassName(i.parentNode).indexOf("_left")>-1?r.$target[0]:r.$source[0]),a&&e.call(this,a,t),!1},t),this.$task)},_attachStateProvider:function(t,n){var i=n;e.getService("state").registerProvider("tasksTimeline",function(){return{scale_unit:i._tasks?i._tasks.unit:void 0,scale_step:i._tasks?i._tasks.step:void 0}})},_clearStateProvider:function(){e.getService("state").unregisterProvider("tasksTimeline")}}};t.exports=s},function(t,e,n){var i=n(1);function r(t,e){var n=i.getNodePosition(e.$grid_data);return t.x+=n.x-e.$grid.scrollLeft,t.y+=n.y-e.$grid_data.scrollTop,t}t.exports={removeLineHighlight:function(t){t.markerLine&&t.markerLine.parentNode&&t.markerLine.parentNode.removeChild(t.markerLine),t.markerLine=null},highlightPosition:function(t,e,n){var a=function(t,e){var n=i.getNodePosition(e.$grid_data),r=i.getRelativeEventPosition(t,e.$grid_data),a=n.x,o=r.y-10,s=e.getItemHeight(t.targetId);on.y+l-s&&(o=n.y+l-s),n.x=a,n.y=o,n}(t,n);e.marker.style.left=a.x+9+"px",e.marker.style.top=a.y+"px";var o=e.markerLine;o||((o=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",o.innerHTML="",o.style.pointerEvents="none"),t.child?function(t,e,n){var i=t.targetParent,a=r({x:0,y:n.getItemTop(i)},n),o=n.$grid_data.getBoundingClientRect().bottom;e.innerHTML="",e.style.width=n.$grid_data.offsetWidth+"px",e.style.top=a.y+"px",e.style.left=a.x+"px",e.style.height=n.getItemHeight(i)+"px",a.y>o&&(e.style.top=o+"px")}(t,o,n):function(t,e,n){var i=function(t,e){var n=e.$config.rowStore,i={x:0,y:0},a=e.$grid_data.querySelector(".gantt_tree_indent"),o=15,s=0;if(a&&(o=a.offsetWidth),t.targetId!==n.$getRootId()){var l=e.getItemTop(t.targetId),c=e.getItemHeight(t.targetId);if(s=n.exists(t.targetId)?n.calculateItemLevel(n.getItem(t.targetId)):0,t.prevSibling)i.y=l;else if(t.nextSibling){var u=0;n.eachItem(function(t){-1!==n.getIndexById(t.id)&&u++},t.targetId),i.y=l+c+u*c}else i.y=l+c,s+=1}return i.x=40+s*o,i.width=Math.max(e.$grid_data.offsetWidth-i.x,0),r(i,e)}(t,n),a=n.$grid_data.getBoundingClientRect().bottom;e.innerHTML="",e.style.left=i.x+"px",e.style.height="4px";var o=i.y-2;e.style.top=o+"px",e.style.width=i.width+"px",o>a&&(e.style.top=a+"px")}(t,o,n),e.markerLine||(document.body.appendChild(o),e.markerLine=o)}}},function(t,e,n){var i=n(16);t.exports=function(t,e,n,r,a){var o;if(e!==a.$getRootId())o=n<.25?i.prevSiblingTarget(t,e,a):!(n>.6)||a.hasChild(e)&&a.getItem(e).$open?i.firstChildTarget(t,e,a):i.nextSiblingTarget(t,e,a);else{var s=a.$getRootId();o=a.hasChild(s)&&r>=0?i.lastChildTarget(t,s,a):i.firstChildTarget(t,s,a)}return o}},function(t,e,n){var i=n(16);function r(t,e,n,r,a){for(var o=e;r.exists(o);){var s=r.calculateItemLevel(r.getItem(o));if((s===n||s===n-1)&&r.getBranchIndex(o)>-1)break;o=a?r.getPrev(o):r.getNext(o)}return r.exists(o)?r.calculateItemLevel(r.getItem(o))===n?a?i.nextSiblingTarget(t,o,r):i.prevSiblingTarget(t,o,r):i.firstChildTarget(t,o,r):null}function a(t,e,n,i){return r(t,e,n,i,!0)}function o(t,e,n,i){return r(t,e,n,i,!1)}t.exports=function(t,e,n,r,s,l){var c;if(e!==s.$getRootId()){var u=s.getItem(e),d=s.calculateItemLevel(u);if(d===l){var h=s.getPrevSibling(e);n<.5&&!h?c=i.prevSiblingTarget(t,e,s):(n<.5&&(e=h),c=i.nextSiblingTarget(t,e,s))}else if(d>l)s.eachParent(function(t){s.calculateItemLevel(t)===l&&(e=t.id)},u),c=a(t,e,l,s);else{var f=a(t,e,l,s),_=o(t,e,l,s);c=n<.5?f:_}}else{var g=s.$getRootId(),p=s.getChildren(g);c=i.createDropTargetObject(),c=p.length&&r>=0?a(t,function(t){for(var e=t.getNext();t.exists(e);){var n=t.getNext(e);if(!t.exists(n))return e;e=n}return null}(s),l,s):o(t,g,l,s)}return c}},function(t,e,n){var i=n(1),r=n(16),a=n(78),o=n(77),s=n(76),l=n(11);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var c=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(c.config.sensitivity=e.$getConfig().dnd_sensitivity),c.attachEvent("onBeforeDragStart",t.bind(function(n,r){var a=u(r);if(!a)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var o=a.getAttribute(e.$config.item_attribute),s=e.$config.rowStore.getItem(o);return!t.isReadonly(s)&&!d(o)&&(c.config.initial_open_state=s.$open,!!t.callEvent("onRowDragStart",[o,r.target||r.srcElement,r])&&void 0)},t)),c.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=u(n);c.config.marker.innerHTML=i.outerHTML;var a=c.config.marker.firstChild;a&&(c.config.marker.style.opacity=.4,a.style.position="static",a.style.pointerEvents="none"),c.config.id=i.getAttribute(e.$config.item_attribute);var o=e.$config.rowStore,s=o.getItem(c.config.id);c.config.level=o.calculateItemLevel(s),c.config.drop_target=r.createDropTargetObject({targetParent:o.getParent(s.id),targetIndex:o.getBranchIndex(s.id),targetId:s.id,nextSibling:!0}),s.$open=!1,s.$transparent=!0,this.refreshData()},t)),c.attachEvent("onDragMove",t.bind(function(n,i){var a=h(i);return a&&!1!==t.callEvent("onBeforeRowDragMove",[c.config.id,a.targetParent,a.targetIndex])||(a=r.createDropTargetObject(c.config.drop_target)),s.highlightPosition(a,c.config,e),c.config.drop_target=a,this.callEvent("onRowDragMove",[c.config.id,a.targetParent,a.targetIndex]),!0},t)),c.attachEvent("onDragEnd",t.bind(function(){var n=e.$config.rowStore,i=n.getItem(c.config.id);s.removeLineHighlight(c.config),i.$transparent=!1,i.$open=c.config.initial_open_state;var r=c.config.drop_target;!1===this.callEvent("onBeforeRowDragEnd",[c.config.id,r.targetParent,r.targetIndex])?i.$drop_target=null:(n.move(c.config.id,r.targetIndex,r.targetParent),t.render(),this.callEvent("onRowDragEnd",[c.config.id,r.targetParent,r.targetIndex])),n.refresh(i.id)},t))}function u(t){return i.locateAttribute(t,e.$config.item_attribute)}function d(n){return l(n,t,t.getDatastore(e.$config.bind))}function h(n){var r,s=function(n){var r=i.getRelativeEventPosition(n,e.$grid_data).y,a=e.$config.rowStore;r=r||0;var o=e.$state.scrollTop||0,s=t.$grid_data.getBoundingClientRect().height+o,l=o,c=e.getItemIndexByTopPosition(e.$state.scrollTop);if(a.exists(c)||(c=a.countVisible()-1),c<0)return a.$getRootId();var u=a.getIdByIndex(c),h=e.$state.scrollTop/e.getItemHeight(u),f=h-Math.floor(h);f>.1&&f<.9&&(s-=e.getItemHeight(u)*f,l+=e.getItemHeight(u)*(1-f)),r>=s?r=s:r<=l&&(r=l);var _=e.getItemIndexByTopPosition(r);if(_>a.countVisible()-1||_<0)return a.$getRootId();var g=a.getIdByIndex(_);return d(g)?a.getPrevSibling(g):a.getIdByIndex(_)}(n),l=null,u=e.$config.rowStore,h=!e.$getConfig().order_branch_free,f=i.getRelativeEventPosition(n,e.$grid_data).y;return s!==u.$getRootId()&&(l=(f-e.getItemTop(s))/e.getItemHeight(s)),h?(r=a(c.config.id,s,l,f,u,c.config.level))&&r.targetParent&&d(r.targetParent)&&(s=u.getPrevSibling(r.targetParent),r=a(c.config.id,s,l,f,u,c.config.level)):r=o(c.config.id,s,l,f,u),r}}}},function(t,e,n){var i=n(1),r=n(11);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var a=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(a.config.sensitivity=e.$getConfig().dnd_sensitivity),a.attachEvent("onBeforeDragStart",t.bind(function(n,r){var c=o(r);if(!c)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var u=c.getAttribute(e.$config.item_attribute);if(l(u))return!1;var d=s().getItem(u);return!t.isReadonly(d)&&(a.config.initial_open_state=d.$open,!!t.callEvent("onRowDragStart",[u,r.target||r.srcElement,r])&&void 0)},t)),a.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=o(n);a.config.marker.innerHTML=i.outerHTML;var r=a.config.marker.firstChild;r&&(r.style.position="static"),a.config.id=i.getAttribute(e.$config.item_attribute);var l=s(),c=l.getItem(a.config.id);a.config.index=l.getBranchIndex(a.config.id),a.config.parent=c.parent,c.$open=!1,c.$transparent=!0,this.refreshData()},t)),a.lastTaskOfLevel=function(t){for(var e=null,n=s().getItems(),i=0,r=n.length;in.y+l-s&&(o=n.y+l-s),n.x=r,n.y=o,n},t),a._getTargetY=t.bind(function(n){var r=i.getNodePosition(e.$grid_data),a=e.$state.scrollTop||0,o=t.$grid_data.getBoundingClientRect().height+a,s=n.pageY-r.y+a;return s>o?s=o:si.countVisible()-1?null:i.getIdByIndex(r)},t),a.attachEvent("onDragMove",t.bind(function(n,i){var r=t.$grid_data.getBoundingClientRect().height+(e.$state.scrollTop||0),o=a.config,c=a._getGridPos(i),u=e.$getConfig(),d=s();c.y=0;)w=d.getIdByIndex(y-$),x=d.getItem(w),$++;if(h.id==p.id||l(p.id))return;g(p,h)&&h.id!=p.id?d.move(h.id,0,0,p.id):p.$level!=h.$level-1||d.getChildren(p.id).length?x&&g(x,h)&&h.id!=x.id&&d.move(h.id,-1,d.getParent(x.id)):d.move(h.id,0,p.id)}return!0},t)),a.attachEvent("onDragEnd",t.bind(function(){var e=s(),n=e.getItem(a.config.id);n.$transparent=!1,n.$open=a.config.initial_open_state,!1===this.callEvent("onBeforeRowDragEnd",[a.config.id,a.config.parent,a.config.index])?(e.move(a.config.id,a.config.index,a.config.parent),n.$drop_target=null):this.callEvent("onRowDragEnd",[a.config.id,n.$drop_target]),t.render(),this.refreshData()},t))}function o(t){return i.locateAttribute(t,e.$config.item_attribute)}function s(){return t.getDatastore(e.$config.bind)}function l(e){return r(e,t,s())}}}},function(t,e,n){var i=n(0),r=n(80),a=n(79),o=function(t){return{onCreated:function(e){e.$config=i.mixin(e.$config,{bind:"task"}),"grid"==e.$config.id&&(this.extendGantt(e),t.ext.inlineEditors=t.ext._inlineEditors.createEditors(e),t.ext.inlineEditors.init()),this._mouseDelegates=n(24)(t)},onInitialized:function(e){var n=e.$getConfig();n.order_branch&&("marker"==n.order_branch?a.init(e.$gantt,e):r.init(e.$gantt,e)),this.initEvents(e,t),"grid"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){"grid"==e.$config.id&&t.ext.inlineEditors.destructor(),this.clearEvents(e,t)},initEvents:function(t,e){this._mouseDelegates.delegate("click","gantt_row",e.bind(function(n,i,r){var a=t.$getConfig();if(null!==i){var o=this.getTask(i);a.scroll_on_click&&!e._is_icon_open_click(n)&&this.showDate(o.start_date),e.callEvent("onTaskRowClick",[i,r])}},e),t.$grid),this._mouseDelegates.delegate("click","gantt_grid_head_cell",e.bind(function(n,i,r){var a=r.getAttribute("data-column-id");if(e.callEvent("onGridHeaderClick",[a,n])){var o=t.$getConfig();if("add"!=a){if(o.sort&&a){for(var s,l=a,c=0;c",a.setAttribute(r.task_grid_row_resizer_attribute,e.id),t._waiAria.gridSeparatorAttr(a),a},update:null,getRectangle:i,getVisibleRange:r}}},function(t,e,n){var i=n(19),r=n(5),a=n(18),o=n(17),s=n(30);function l(t,e,n,i){var r=100*(1-(1*t||0)),a=i.posFromDate(e),o=i.posFromDate(n),s=document.createElement("div");return s.className="gantt_histogram_hor_bar",s.style.top=r+"%",s.style.left=a+"px",s.style.width=o-a+1+"px",s}function c(t,e,n){if(t===e)return null;var i=1-Math.max(t,e),r=Math.abs(t-e),a=document.createElement("div");return a.className="gantt_histogram_vert_bar",a.style.top=100*i+"%",a.style.height=100*r+"%",a.style.left=n+"px",a}t.exports=function(t){var e=s(t),n={},u={},d={};function h(t,e){var i=n[t];i&&i[e]&&i[e].parentNode&&i[e].parentNode.removeChild(i[e])}function f(e,n,i,r,o,s,u){var h=d[e.id];h&&h.parentNode&&h.parentNode.removeChild(h);var f=function(e,n,i,r){for(var o=n.getScale(),s=document.createElement("div"),u=a(o,r),d=u.start;d<=u.end;d++){var h=o.trace_x[d],f=o.trace_x[d+1]||t.date.add(h,o.step,o.unit),_=o.trace_x[d].valueOf(),g=Math.min(e[_]/i,1)||0;if(g<0)return null;var p=Math.min(e[f.valueOf()]/i,1)||0,v=l(g,h,f,n);v&&s.appendChild(v);var m=c(g,p,n.posFromDate(f));m&&s.appendChild(m)}return s}(i,o,s,u);return f&&n&&(f.setAttribute("data-resource-id",e.id),f.setAttribute(o.$config.item_attribute,e.id),f.style.position="absolute",f.style.top=n.top+1+"px",f.style.height=o.getItemHeight(e.id)-1+"px",f.style.left=0),f}function _(t,e,n,i,r,a,o){var s=r.histogram_cell_class(a.start_date,a.end_date,t,a.tasks,a.assignments),l=r.histogram_cell_label(a.start_date,a.end_date,t,a.tasks,a.assignments),c=r.histogram_cell_allocated(a.start_date,a.end_date,t,a.tasks,a.assignments),u=o.getItemHeight(t.id)-1;if(s||l){var d=document.createElement("div");return d.className=["gantt_histogram_cell",s].join(" "),d.setAttribute(o.$config.item_attribute,t.id),d.style.cssText=["left:"+e.left+"px","width:"+e.width+"px","height:"+u+"px","line-height:"+u+"px","top:"+(e.top+1)+"px"].join(";"),l&&(l=""+l+"
"),c&&(l=""+l),l&&(d.innerHTML=l),d}return null}return{render:function(i,r,s,l){var c=r.$getTemplates(),h=r.getScale(),g=e(i,s.resource_property,h,r),p=[],v={},m=i.capacity||r.$config.capacity||24;n[i.id]={},u[i.id]=null,d[i.id]=null;for(var y=!!l,k=a(h,l),b=k.start;b<=k.end;b++){var w=g[b];if(w&&(!y||o(b,h,l,t))){var x=c.histogram_cell_capacity(w.start_date,w.end_date,i,w.tasks,w.assignments);v[w.start_date.valueOf()]=x||0;var $=r.getItemPosition(i,w.start_date,w.end_date),S=_(i,$,m,0,c,w,r);S&&(p.push(S),n[i.id][b]=S)}}var T=null;if(p.length){T=document.createElement("div");for(var C=0;C",f=""):(h=g.template?g.template(e):e[g.name],r.isDate(h)&&(h=s.date_grid(h,e,g.name)),null!==h&&void 0!==h||(h=""),f=h,h=""+h+"
");var p="gantt_cell"+(_?" gantt_last_cell":""),v=[];if(g.tree){p+=" gantt_cell_tree";for(var m=0;m"+v.join("")+"",c.push(d)}if(p=t.getGlobalTaskIndex(e.id)%2==0?"":" odd",p+=e.$transparent?" gantt_transparent":"",p+=e.$dataprocessor_class?" "+e.$dataprocessor_class:"",s.grid_row_class){var w=s.grid_row_class.call(t,e.start_date,e.end_date,e);w&&(p+=" "+w)}l.isSelected(e.id)&&(p+=" gantt_selected");var x=document.createElement("div");x.className="gantt_row"+p+" gantt_row_"+t.getTaskType(e.type);var $=n.getItemHeight(e.id);return x.style.height=$+"px",x.style.lineHeight=$+"px",i.smart_rendering&&(x.style.position="absolute",x.style.left="0px",x.style.top=n.getItemTop(e.id)+"px"),n.$config.item_attribute&&(x.setAttribute(n.$config.item_attribute,e.id),x.setAttribute(n.$config.bind+"_id",e.id)),t._waiAria.taskRowAttr(e,x),x.innerHTML=c.join(""),x},update:null,getRectangle:a,getVisibleRange:o,onrender:function(e,n,r){for(var a=r.getGridColumns(),o=0;os+l&&e.y>c+u)return!1;if(e.y_endh){var g=h;h=d,d=g}if(f>_){g=_;_=f,f=g}return d+=-100,h+=100,f+=-100,_+=100,!(e.x>h&&e.x>_)&&!(e.x_endt.x?this.dirs.right:e.y>t.y?this.dirs.down:this.dirs.up}},n={path:[],clear:function(){this.path=[]},current:function(){return this.path[this.path.length-1]},point:function(e){return e?(this.path.push(t.copy(e)),e):this.current()},point_to:function(n,i,r){r=r?{x:r.x,y:r.y}:t.copy(this.point());var a=e.dirs;switch(n){case a.left:r.x-=i;break;case a.right:r.x+=i;break;case a.up:r.y-=i;break;case a.down:r.y+=i}return this.point(r)},get_points:function(n,i,r,a){var o=this.get_endpoint(n,i,r,a),s=t.config,l=o.e_y-o.y,c=o.e_x-o.x,u=e.dirs,d=i.getItemHeight(n.source);this.clear(),this.point({x:o.x,y:o.y});var h=2*s.link_arrow_size,f=this.get_line_type(n,i.$getConfig()),_=o.e_x>o.x;if(f.from_start&&f.to_start)this.point_to(u.left,h),_?(this.point_to(u.down,l),this.point_to(u.right,c)):(this.point_to(u.right,c),this.point_to(u.down,l)),this.point_to(u.right,h);else if(!f.from_start&&f.to_start)if(_=o.e_x>o.x+2*h,this.point_to(u.right,h),_)c-=h,this.point_to(u.down,l),this.point_to(u.right,c);else{c-=2*h;var g=l>0?1:-1;this.point_to(u.down,g*(d/2)),this.point_to(u.right,c),this.point_to(u.down,g*(Math.abs(l)-d/2)),this.point_to(u.right,h)}else f.from_start||f.to_start?f.from_start&&!f.to_start&&(_=o.e_x>o.x-2*h,this.point_to(u.left,h),_?(c+=2*h,g=l>0?1:-1,this.point_to(u.down,g*(d/2)),this.point_to(u.right,c),this.point_to(u.down,g*(Math.abs(l)-d/2)),this.point_to(u.left,h)):(c+=h,this.point_to(u.down,l),this.point_to(u.right,c))):(this.point_to(u.right,h),_?(this.point_to(u.right,c),this.point_to(u.down,l)):(this.point_to(u.down,l),this.point_to(u.right,c)),this.point_to(u.left,h));return this.path},get_line_type:function(e,n){var i=n.links,r=!1,a=!1;return e.type==i.start_to_start?r=a=!0:e.type==i.finish_to_finish?r=a=!1:e.type==i.finish_to_start?(r=!1,a=!0):e.type==i.start_to_finish?(r=!0,a=!1):t.assert(!1,"Invalid link type"),n.rtl&&(r=!r,a=!a),{from_start:r,to_start:a}},get_endpoint:function(t,e,n,i){var a=e.$getConfig(),o=this.get_line_type(t,a),s=o.from_start,l=o.to_start,c=r(n,e,a),u=r(i,e,a);return{x:s?c.left:c.left+c.width,e_x:l?u.left:u.left+u.width,y:c.top+c.rowHeight/2-1,e_y:u.top+u.rowHeight/2-1}}};function r(e,n,i){var r=n.getItemPosition(e);if(t.getTaskType(e.type)==i.types.milestone){var a=n.getBarHeight(e.id,!0),o=Math.sqrt(2*a*a);r.left-=o/2,r.width=o}return r}return{render:function(i,r,a){var o=t.getTask(i.source);if(!o.hide_bar){var s=t.getTask(i.target);if(!s.hide_bar){var l=n.get_endpoint(i,r,o,s),c=l.e_y-l.y;if(!(l.e_x-l.x||c))return null;var u=n.get_points(i,r,o,s),d=e.get_lines(u,r),h=document.createElement("div"),f="gantt_task_link";i.color&&(f+=" gantt_link_inline_color");var _=t.templates.link_class?t.templates.link_class(i):"";_&&(f+=" "+_),a.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(i)&&(f+=" gantt_critical_link"),h.className=f,r.$config.link_attribute&&(h.setAttribute(r.$config.link_attribute,i.id),h.setAttribute("link_id",i.id));for(var g=0;gg.end)&&c(t.id,v)}n[t.id]={};for(var m=g.start;m<=g.end;m++){var y=d(h,m,t,s,f,_,a);!y&&l(t,m)?c(t.id,m):y&&!y.parentNode&&i.appendChild(y)}}},getRectangle:i,getVisibleRange:a}}},function(t,e,n){var i=n(20),r=n(21),a=n(5);t.exports=function(t){var e=i(t);return{render:function(n,i){if(n.$rollup&&n.$rollup.length){var r=document.createElement("div"),a=t.getTaskPosition(n);return n.$rollup.forEach(function(o){var s=t.getTask(o),l=e(s,i);if(l){var c=i.getBarHeight(n.id,s.type==t.config.types.milestone),u=Math.floor((i.getItemHeight(n.id)-c)/2);l.style.top=a.top+u+"px",l.classList.add("gantt_rollup_child"),r.appendChild(l)}}),r}return!1},update:null,isInViewPort:r,getVisibleRange:a}}},function(t,e,n){var i=n(21);t.exports=function(t,e,n,r,a){if(!a.isSplitTask(t))return!1;var o=a.getSubtaskDates(t.id);return i({id:t.id,start_date:o.start_date,end_date:o.end_date,parent:t.parent},e,n,a)}},function(t,e,n){var i=n(20),r=n(90),a=n(5);t.exports=function(t){var e=i(t);return{render:function(n,i){if(t.isSplitTask(n)&&(t.config.open_split_tasks&&!n.$open||!t.config.open_split_tasks)){var r=document.createElement("div"),a=t.getTaskPosition(n);return t.hasChild(n.id)&&t.eachTask(function(o){var s=t.isSummaryTask(o);if(s&&t.resetProjectDates(o),!o.hide_bar){var l=e(o,i);if(l){var c=i.getBarHeight(n.id,o.type==t.config.types.milestone),u=Math.floor((i.getItemHeight(n.id)-c)/2);l.style.top=a.top+u+"px",l.classList.add("gantt_split_child"),s&&l.classList.add("gantt_split_subproject"),r.appendChild(l)}}},n.id),r}return!1},update:null,isInViewPort:r,getVisibleRange:a}}},function(t,e,n){var i=n(21),r=n(5),a=n(20);t.exports=function(t){return{render:a(t),update:null,isInViewPort:i,getVisibleRange:r}}},function(t,e){t.exports=function(t){return function(e,n,i){"keepDates"==i?function(e,n){"duration"==n?e.end_date=t.calculateEndDate(e):"end_date"!=n&&"start_date"!=n||(e.duration=t.calculateDuration(e))}(e,n):"keepDuration"==i?function(e,n){"end_date"==n?e.start_date=t.calculateEndDate({start_date:e.end_date,duration:-e.duration,task:e}):"start_date"!=n&&"duration"!=n||(e.end_date=t.calculateEndDate(e))}(e,n):function(e,n){"start_date"==n||"duration"==n?e.end_date=t.calculateEndDate(e):"end_date"==n&&(e.duration=t.calculateDuration(e))}(e,n)}}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.durationFormatter()}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="";i.innerHTML=r},set_value:function(t,e,n,i){this.get_input(i).value=a(n.editor).format(t)},get_value:function(t,e,n){return a(e.editor).parse(this.get_input(n).value||"")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.linkFormatter()}function o(t,e){for(var n=(t||"").split(e.delimiter||","),i=0;i";i.innerHTML=r},hide:function(){},set_value:function(e,n,i,r){this.get_input(r).value=s(e,i.editor,t)},get_value:function(t,e,n){return o(this.get_input(n).value||"",e.editor)},save:function(e,n,i){var r=c(t.getTask(e),this.get_value(e,n,i),n.editor);(r.add.length||r.remove.length)&&t.batchUpdate(function(){r.add.forEach(function(e){t.addLink(e)}),r.remove.forEach(function(e){t.deleteLink(e)}),t.autoSchedule&&t.autoSchedule()})},is_changed:function(e,n,i,r){var a=this.get_value(n,i,r),l=o(s(e,i.editor,t),i.editor);return a.join()!==l.join()}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0),r="%Y-%m-%d",a=null,o=null;function s(){return e.apply(this,arguments)||this}return n(3)(s,e),i.mixin(s.prototype,{show:function(e,n,i,s){a||(a=t.date.date_to_str(r)),o||(o=t.date.str_to_date(r));var l=null,c=null;l="function"==typeof i.min?i.min(e,n):i.min,c="function"==typeof i.max?i.max(e,n):i.max;var u="";s.innerHTML=u},set_value:function(t,e,n,i){t&&t.getFullYear?this.get_input(i).value=a(t):this.get_input(i).value=t},is_valid:function(t,e,n,i){return!(!t||isNaN(t.getTime()))},get_value:function(t,e,n){var i;try{i=o(this.get_input(n).value||"")}catch(t){i=null}return i}},!0),s}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){for(var r="",i.innerHTML=r},get_input:function(t){return t.querySelector("select")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="";i.innerHTML=r},get_value:function(t,e,n){return this.get_input(n).value||""},is_valid:function(t,e,n,i){return!isNaN(parseInt(t,10))}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="";i.innerHTML=r}},!0),r}},function(t,e){t.exports={init:function(t,e){var n=t,i=e.$gantt,r=null,a=i.ext.keyboardNavigation;a.attachEvent("onBeforeFocus",function(e){var i=t.locateCell(e);if(clearTimeout(r),i){var a=i.columnName,o=i.id,s=n.getState();if(n.isVisible()&&s.id==o&&s.columnName===a)return!1}return!0}),a.attachEvent("onFocus",function(e){var i=t.locateCell(e),a=t.getState();return clearTimeout(r),!i||i.id==a.id&&i.columnName==a.columnName||n.isVisible()&&n.save(),!0}),t.attachEvent("onHide",function(){clearTimeout(r)}),a.attachEvent("onBlur",function(){return r=setTimeout(function(){n.save()}),!0}),i.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName}),i.attachEvent("onTaskClick",function(e,n){if(i._is_icon_open_click(n))return!0;var r=t.getState(),a=t.locateCell(n.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),i.attachEvent("onEmptyClick",function(){return n.save(),!0}),a.attachEvent("onKeyDown",function(e,r){var o=t.locateCell(r.target),s=!!o&&t.getEditorConfig(o.columnName),l=t.getState(),c=i.constants.KEY_CODES,u=r.keyCode,d=!1;switch(u){case c.ENTER:t.isVisible()?(t.save(),r.preventDefault(),d=!0):s&&!(r.ctrlKey||r.metaKey||r.shiftKey)&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.ESC:t.isVisible()&&(t.hide(),r.preventDefault(),d=!0);break;case c.UP:case c.DOWN:break;case c.LEFT:case c.RIGHT:(s&&t.isVisible()||"date"===l.editorType)&&(d=!0);break;case c.SPACE:t.isVisible()&&(d=!0),s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.DELETE:s&&!t.isVisible()?(n.startEdit(o.id,o.columnName),d=!0):s&&t.isVisible()&&(d=!0);break;case c.TAB:if(t.isVisible()){r.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var h=t.getState();h.id&&a.focus({type:"taskCell",id:h.id,column:h.columnName}),r.preventDefault(),d=!0}break;default:if(t.isVisible())d=!0;else if(u>=48&&u<=57||u>95&&u<112||u>=64&&u<=91||u>185&&u<193||u>218&&u<223){var f=e.modifiers,_=f.alt||f.ctrl||f.meta||f.shift;f.alt||_&&a.getCommandHandler(e,"taskCell")||s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),d=!0)}}return!d})},onShow:function(t,e,n){},onHide:function(t,e,n){n.$gantt.focus()},destroy:function(){}}},function(t,e){t.exports={init:function(t,e){var n=e.$gantt;n.attachEvent("onTaskClick",function(e,i){if(n._is_icon_open_click(i))return!0;var r=t.getState(),a=t.locateCell(i.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),n.attachEvent("onEmptyClick",function(){return t.isVisible()&&t.isChanged()?t.save():t.hide(),!0}),n.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName})},onShow:function(t,e,n){var i=n.$gantt;i.ext&&i.ext.keyboardNavigation&&i.ext.keyboardNavigation.attachEvent("onKeyDown",function(e,n){var r=i.constants.KEY_CODES,a=!1;switch(n.keyCode){case r.SPACE:t.isVisible()&&(a=!0)}return!a});e.onkeydown=function(e){e=e||window.event;var n=i.constants.KEY_CODES;if(!(e.defaultPrevented||e.shiftKey&&e.keyCode!=n.TAB)){var r=!0;switch(e.keyCode){case i.keys.edit_save:t.save();break;case i.keys.edit_cancel:t.hide();break;case n.UP:case n.DOWN:t.isVisible()&&(t.hide(),r=!1);break;case n.TAB:e.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);break;default:r=!1}r&&e.preventDefault()}}},onHide:function(){},destroy:function(){}}},function(t,e,n){var i=n(101),r=n(100);t.exports=function(t){var e=null;return{setMapping:function(t){e=t},getMapping:function(){return e||(t.config.keyboard_navigation_cells&&t.ext.keyboardNavigation?r:i)}}}},function(t,e,n){var i=n(102),r=n(99),a=n(98),o=n(97),s=n(96),l=n(95),c=n(94),u=n(0),d=n(1),h=n(4),f=n(93);function _(t){t.config.editor_types={text:new(r(t)),number:new(a(t)),select:new(o(t)),date:new(s(t)),predecessor:new(l(t)),duration:new(c(t))}}t.exports=function(t){var e=i(t),n={};h(n);var r={init:_,createEditors:function(i){function r(t,e){var n=i.$getConfig(),r=function(t,e){for(var n=i.$getConfig(),r=i.getItemTop(t),a=i.getItemHeight(t),o=i.getGridColumns(),s=0,l=0,c=0,u=0;u0?t.getNext:t.getPrev,i=(n=t.bind(n,t))(this._itemId);t.isTaskExists(i)&&t.isReadonly(t.getTask(i));)i=n(i);return i},editNextRow:function(e){var n=this.getState().id;if(t.isTaskExists(n)){var i=null;i=e?this.moveRow(1):t.getNext(n),t.isTaskExists(i)&&this.startEdit(i,this._columnName)}},editPrevRow:function(e){var n=this.getState().id;if(t.isTaskExists(n)){var i=null;i=e?this.moveRow(-1):t.getPrev(n),t.isTaskExists(i)&&this.startEdit(i,this._columnName)}},destructor:function(){o.forEach(function(t){l.detachEvent(t)}),s.forEach(function(e){t.detachEvent(e)}),o=[],s=[],l=null,this.hide(),this.detachAllEvents()}};return u.mixin(c,e),u.mixin(c,n),c}};return u.mixin(r,e),u.mixin(r,n),r}},function(t,e){t.exports={create:function(){return{render:function(){},destroy:function(){}}}}},function(t,e,n){var i=n(3),r=n(1),a=n(0),o=n(8),s=function(t){"use strict";var e=["altKey","shiftKey","metaKey"];function n(e,n,i,r){var o=t.apply(this,arguments)||this;this.$config=a.mixin(n,{scroll:"x"}),o._scrollHorizontalHandler=a.bind(o._scrollHorizontalHandler,o),o._scrollVerticalHandler=a.bind(o._scrollVerticalHandler,o),o._outerScrollVerticalHandler=a.bind(o._outerScrollVerticalHandler,o),o._outerScrollHorizontalHandler=a.bind(o._outerScrollHorizontalHandler,o),o._mouseWheelHandler=a.bind(o._mouseWheelHandler,o),this.$config.hidden=!0;var s=r.config.scroll_size;return r.env.isIE&&(s+=1),this._isHorizontal()?(o.$config.height=s,o.$parent.$config.height=s):(o.$config.width=s,o.$parent.$config.width=s),this.$config.scrollPosition=0,o.$name="scroller",o}return i(n,t),n.prototype.init=function(t){t.innerHTML=this.$toHTML(),this.$view=t.firstChild,this.$view||this.init(),this._isVertical()?this._initVertical():this._initHorizontal(),this._initMouseWheel(),this._initLinkedViews()},n.prototype.$toHTML=function(){return""},n.prototype._getRootParent=function(){for(var t=this.$parent;t&&t.$parent;)t=t.$parent;if(t)return t},n.prototype._eachView=function(){var t=[];return function t(e,n){if(n.push(e),e.$cells)for(var i=0;id[s]&&d[o]>e&&u>d[s]-l+2&&(e=u+(i?0:2),n=d[s]);else{var h=Math.max(d[o]-u,0);(u+=h)>Math.max(d[s]-h,0)&&u>e&&(e=u,n=d[s])}}return{outerScroll:n,innerScroll:e}},n.prototype.scroll=function(t){this._isHorizontal()?this.scrollHorizontally(t):this.scrollVertically(t)},n.prototype.getScrollState=function(){return{visible:this.isVisible(),direction:this.$config.scroll,size:this.$config.outerSize,scrollSize:this.$config.scrollSize||0,position:this.$config.scrollPosition||0}},n.prototype.setSize=function(e,n){t.prototype.setSize.apply(this,arguments);var i=this._getScrollSize(),r=(this._isVertical()?n:e)-this._getScrollOffset()+(this._isHorizontal()?1:0);i.innerScroll&&r>i.outerScroll&&(i.innerScroll+=r-i.outerScroll),this.$config.scrollSize=i.innerScroll,this.$config.width=e,this.$config.height=n,this._setScrollSize(i.innerScroll)},n.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},n.prototype.shouldShow=function(){var t=this._getScrollSize();return!(!t.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!t.innerScroll||this.$parent&&this.$parent.$view.parentNode)},n.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},n.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},n.prototype._getScaleOffset=function(t){var e=0;return!t||"timeline"!=t.$config.view&&"grid"!=t.$config.view||(e=t.$content.$getConfig().scale_height),e},n.prototype._getScrollOffset=function(){var t=0;if(this._isVertical()){var e=this.$parent.$parent;t=Math.max(this._getScaleOffset(e.getPrevSibling(this.$parent.$id)),this._getScaleOffset(e.getNextSibling(this.$parent.$id)))}else for(var n=this._getLinkedViews(),i=0;i=0&&(!t[f]||t.deltaX||t.wheelDeltaX||(d=2*h,h=0)),d&&Math.abs(d)>Math.abs(h)){if(this._isVertical())return;if(i.x)return!0;if(!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var _=d/-40,g=this._oldLeft,p=g+30*_;if(this.scrollHorizontally(p),this.$scroll_hor.scrollLeft=p,g==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(i.y)return!0;if(!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;_=h/-40;void 0===h&&(_=t.detail);var v=this._oldTop,m=this.$scroll_ver.scrollTop+30*_;if(this.scrollVertically(m),this.$scroll_ver.scrollTop=m,v==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1}},n}(n(9));t.exports=s},function(t,e){t.exports=null},function(t,e,n){var i=n(3),r=n(0),a=function(t){"use strict";function e(e,n,i){var a=t.apply(this,arguments)||this;if(n.view){n.id&&(this.$id=r.uid());var o=r.copy(n);if(delete o.config,delete o.templates,this.$content=this.$factory.createView(n.view,this,o,this),!this.$content)return!1}return a.$name="viewCell",a}return i(e,t),e.prototype.destructor=function(){this.clear(),t.prototype.destructor.call(this)},e.prototype.clear=function(){if(this.$initialized=!1,this.$content){var e=this.$content.unload||this.$content.destructor;e&&e.call(this.$content)}t.prototype.clear.call(this)},e.prototype.scrollTo=function(e,n){this.$content&&this.$content.scrollTo?this.$content.scrollTo(e,n):t.prototype.scrollTo.call(this,e,n)},e.prototype._setContentSize=function(t,e){var n=this._getBorderSizes();if("number"==typeof t){var i=t+n.horizontal;this.$config.width=i}if("number"==typeof e){var r=e+n.vertical;this.$config.height=r}},e.prototype.setSize=function(e,n){if(t.prototype.setSize.call(this,e,n),!this.$preResize&&this.$content&&!this.$initialized){this.$initialized=!0;var i=this.$view.childNodes[0],r=this.$view.childNodes[1];r||(r=i),this.$content.init(r)}},e.prototype.setContentSize=function(){!this.$preResize&&this.$content&&this.$initialized&&this.$content.setSize(this.$lastSize.contentX,this.$lastSize.contentY)},e.prototype.getContentSize=function(){var e=t.prototype.getContentSize.call(this);if(this.$content&&this.$initialized){var n=this.$content.getSize();e.width=void 0===n.contentX?n.width:n.contentX,e.height=void 0===n.contentY?n.height:n.contentY}var i=this._getBorderSizes();return e.width+=i.horizontal,e.height+=i.vertical,e},e}(n(9));t.exports=a},function(t,e,n){var i=n(3),r=n(31),a=n(9),o=function(t){"use strict";function e(e,n,i){for(var r=t.apply(this,arguments)||this,a=0;at.x_end||e.left+e.widtht.y_end||e.top+e.height-1&&r.click?r.click():(o(n,!0),i=!0)}27==e&&(o(n,!1),i=!0)}return i?(t.preventDefault&&t.preventDefault(),!(t.cancelBubble=!0)):void 0}}var l=a.getRootNode(t.$root)||document;function c(t){c.cover||(c.cover=document.createElement("div"),c.cover.onkeydown=s,c.cover.className="dhx_modal_cover",document.body.appendChild(c.cover)),c.cover.style.display=t?"inline-block":"none"}function u(e,n,i){var r=t._waiAria.messageButtonAttrString(e),a=n.toLowerCase().replace(/ /g,"_");return""}function d(e){k.area||(k.area=document.createElement("div"),k.area.className="gantt_message_area dhtmlx_message_area",k.area.style[k.position]="5px",document.body.appendChild(k.area)),k.hide(e.id);var n=document.createElement("div");return n.innerHTML=""+e.text+"
",n.className="gantt-info dhtmlx-info gantt-"+e.type+" dhtmlx-"+e.type,n.onclick=function(){k.hide(e.id),e=null},t._waiAria.messageInfoAttr(n),"bottom"==k.position&&k.area.firstChild?k.area.insertBefore(n,k.area.firstChild):k.area.appendChild(n),e.expire>0&&(k.timers[e.id]=window.setTimeout(function(){k&&k.hide(e.id)},e.expire)),k.pull[e.id]=n,n=null,e.id}function h(){for(var t=[].slice.apply(arguments,[0]),e=0;e