@grapecity-software/spread-sheets-ganttsheet
Version:
SpreadJS GanttSheet Plugin
12 lines • 317 kB
JavaScript
/*!
*
* SpreadJS Library 19.1.4
*
* Copyright(c) GrapeCity Software inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* info.xa@grapecity.com
* https://www.grapecity.com.cn/developer/spreadjs
*
*/
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@grapecity-software/spread-sheets")):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@grapecity-software/spread-sheets")):t(GC)}((function(t){!function(){"use strict";var n,i={179:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d=this&&this.vJr||(b=function(t,n){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},b(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}b(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),b;function m(){return{canUndo:!1,execute:function(t,n){var i,s,h,a,c,f=(0,e._f)(t,n.sheetName);return!!(f&&t.jg().name()===n.sheetName&&f.NMi instanceof r.GanttSheet)&&(i=n.row,s=n.col,(u(i)||u(s))&&(n.row=i=f.getActiveRowIndex(),n.col=s=f.getActiveColumnIndex()),h=n.sheetArea,u(h)&&(n.sheetArea=h=3),(a=f.$go(i,s,h))instanceof o&&(f.showCell(i,s,e.VerticalPosition.nearest,e.HorizontalPosition.nearest),(c=new A(f.NMi,n)).open(i),!0))}}}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskResourcesCellType=void 0,e=i(1376),r=i(5392),s=i(7234),u=s.Common.lt.ht,o=function(t){function n(){var n=t.call(this)||this;return n.typeName="104",n}return d(n,t),n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.TaskResourcesCellType=o,e.CellTypes.ti[104]=o,h="taskResourcesCellType",a="data-resource-id",c="OpenResources",f="ribbon-dropdowngroup-popup",l="_cellButtonParam",v=window.gcGlobal,A=function(){function t(t,n){var i=this;this.globalMousedownEventHandler=function(t){var n,e;if(i.rf){for(e=n=t.target;e&&e!==i.Wc;)e=e.parentElement;e||(i.close(),t.stopPropagation(),t.preventDefault())}},this.windowResizeEventHandler=function(){i.rf&&i.close()},this.rf=!1,this.lAi=t,this.LEt=n,this.AAi=this.getOriginalValueMap()}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.open=function(t){var n,i,e,r;if(!this.rf){if(n=this.lAi.getTaskByRow(t),e=(i=this.project.host.getDataView()).gLt.primaryKey(),r=n.getDataValue(e),u(r))return!1;v.ef(),this.bindEvent(),this.render(),this.clearPosition(),this.calcPosition(),this.rf=!0,this.Wc.tabIndex=-1,this.Wc.style.cssText+="outline:none",this.Wc.focus()}},t.prototype.dispose=function(){var t=this;document.removeEventListener("resize",this.windowResizeEventHandler),"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.removeEventListener(n,t.globalMousedownEventHandler,!0)})),this.Ti.parentElement.removeChild(this.Ti),this.Ti=null},t.prototype.close=function(){if(this.rf){this.rf=!1;try{this.setValue()}catch(t){}finally{this.dispose(),this.gAi(),v.cf()}}},t.prototype.gAi=function(){var t,n=this.LEt.row,i=this.LEt.col,e=this.LEt.sheetArea,r=this.sheet.Il(n,i,e).cellButtons;this.sheet&&r&&r.length>0&&(t=this.sheet.Ut.getValueForKey(n,i,l,e))&&t.isMouseDownReservedLocation&&(t.buttonDownIndex=-1,t.isMouseDownReservedLocation=!1,this.sheet.repaint(this.sheet.getCellRect(n,i)))},t.prototype.bindEvent=function(){var t=this;"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.addEventListener(n,t.globalMousedownEventHandler,!0)})),document.addEventListener("resize",this.windowResizeEventHandler)},t.prototype.render=function(){this.Ti=document.createElement("div"),this.Ti.style.cssText="position:absolute; z-index:10000; box-shadow:rgba(0, 0, 0, 0.4) 2px 4px 5px; outline:none",this.Ti.classList.add(f),this.Wc=document.createElement("div"),this.renderList(),this.Ti.appendChild(this.Wc),this.sheet.qc().appendChild(this.Ti)},t.prototype.renderList=function(){var t,n,i;for(this.Wc.classList.add("gc-list-control"),this.Wc.style.outline="none",(t=document.createElement("div")).className="gc-list-control-container gc-list-alignment-vertical",t.style.maxHeight="300px",t.style.maxWidth="500px",t.style.overflow="auto",this.Wc.appendChild(t),n=this.project.resourcesManager.resourcesList,i=0;i<n.length;i++)this.renderResource(n[i],t)},t.prototype.renderResource=function(t,n){var i=document.createElement("div");i.className="gc-list-control-tree",n.appendChild(i),this.renderResourceItem(t,!0,i)},t.prototype.renderResourceItem=function(t,n,i){var e,r,s,u=t.id,o=t.name,h=Object.keys(this.AAi),c=document.createElement("div");c.classList.add("gc-list-control-item"),n&&c.classList.add("gc-list-control-hassubitem"),(e=document.createElement("label")).setAttribute("for","resource-".concat(u)),e.className="gc-list-control-tree-text",e.style.display="flex",e.style.alignItems="center",(r=document.createElement("input")).id="resource-".concat(u),r.type="checkbox",r.style.marginLeft="5px",r.style.marginRight="5px",r.setAttribute(a,u.toString()||""),h.indexOf(u.toString())>-1&&(r.checked=!0),e.appendChild(r),(s=document.createElement("span")).innerText="".concat(o||""),this.setTextSpanEllipsis(s),e.appendChild(s),c.appendChild(e),i.appendChild(c)},t.prototype.setTextSpanEllipsis=function(t){t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.title=t.innerText},t.prototype.clearPosition=function(){this.Ti.style.top=this.Ti.style.bottom=this.Ti.style.left=this.Ti.style.right=""},t.prototype.getTargetRect=function(){var t=1===this.LEt.sheetArea?-1:void 0,n=2===this.LEt.sheetArea?-1:void 0,i=this.sheet.getCellRect(this.LEt.row,this.LEt.col,t,n);return i.x=this.sheet.uw().left+i.x,i.y=this.sheet.uw().top+i.y,i},t.prototype.calcPosition=function(){var t=this.calculateDropDownLocation(),n=this.Ti.offsetParent,i=n.getBoundingClientRect(),e=n===document.body,r=document.documentElement,s=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),u=(window.pageYOffset||r.scrollTop)-(r.clientTop||0);this.Ti.style.left="".concat(t.x-(e?-s:i.left),"px"),this.Ti.style.top="".concat(t.y-(e?-u:i.top),"px")},t.prototype.calculateDropDownLocation=function(){var t,n,i,r=new e.Rect(0,0,window.innerWidth,window.innerHeight),s=this.getTargetRect(),u=s.x+s.width,o=s.y,h=s.y+s.height,a=r.height-h,c=!0,f=this.Wc.offsetHeight,l=this.Wc.offsetWidth;return f>a&&(c=!1),t=u-l,n=0,n=c?h:o-f,(i=new e.Rect(t,n,l,f)).width>r.width?i.x=0:(i.x=Math.max(i.x,0),i.x=Math.min(i.x,r.width-i.width)),i.height>r.height?i.y=0:(i.y=Math.max(i.y,0),i.y=Math.min(i.y,r.height-i.height)),{x:i.x,y:i.y}},t.prototype.getOriginalValueMap=function(){var t=this,n=this.sheet.getValue(this.LEt.row,this.LEt.col),i={};return n?(n.forEach((function(n){var e=t.project.resourcesManager.getResourcesByName(n).id;i[e]=n})),i):{}},t.prototype.getSelectedValuesInList=function(){var t=this,n=this.AAi,i=this.Wc.querySelectorAll(".gc-list-control-item input:checked"),e=[];return i.forEach((function(i){var r,s=parseInt(i.getAttribute(a));n[s]?e.push(n[s]):(r=t.project.resourcesManager.getResourcesById(s),e.push(r.name))})),e},t.prototype.setValue=function(){var t=this.sheet,n=this.getSelectedValuesInList(),i=this.LEt.row,e=this.LEt.col;t.setValue(i,e,n)},t}(),e.Workbook.ch(h,{init:function(){this.commandManager().register(c,m())}})},237:function(t,n,i){var e,r,s,u,o,h,a,c=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDependencyMap=n.TaskDependency=void 0,e=i(7234),r=i(8869),s=new e.Common.ResourceManager(r.SR,"GanttSheet"),u=s.getResource.bind(s),o=e.Common.lt.ht,h=function(){function t(t,n,i){void 0===i&&(i="FS"),this.xT=!1,this.m1n=t,this._to=n,this._type=i}return Object.defineProperty(t.prototype,"from",{get:function(){return this.m1n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"to",{get:function(){return this._to},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),t.parsePredecessors=function(t,n){return t&&n?this.parseText(n,t,!0):null},t.parseSuccessors=function(t,n){return t&&n?this.parseText(n,t,!1):null},t.parseText=function(t,n,i){var e,r=this,s=+t;return isNaN(s)?(e=t.split(",")).map((function(t){var e,s,o;if(e=+(t=t.trim()),!isNaN(e))return r.createParseResult(e,n,i);if(!(s=t.match(r.DEPENDENCY_REGEX)))throw new Error(u().GANTT_INVALID_DEPENDENCY);return e=+s[1],o=s[2]?s[2].toUpperCase():"FS",r.createParseResult(e,n,i,o)})):[this.createParseResult(s,n,i)]},t.createParseResult=function(n,i,e,r){if(void 0===r&&(r="FS"),!i)return{taskNumber:n,type:r};var s=i.project.getTask(n);if(!s)throw new Error(u().GANTT_INVALID_DEPENDENCY);return e?new t(s,i,r):new t(i,s,r)},t.formatPredecessors=function(t){return t.map((function(t){return t.getText(t.from)})).join(",")},t.formatSuccessors=function(t){return t.map((function(t){return t.getText(t.to)})).join(",")},t.prototype.getText=function(t){var n=t.taskNumber,i=this.type;return"FS"!==i?"".concat(n).concat(i):"".concat(n)},t.DEPENDENCY_REGEX=/^([1-9][0-9]*)(FF|FS|SF|SS)?([+-].*)?$/i,t}(),n.TaskDependency=h,a=function(){function t(t){this.project=t,this.dependencies=[]}return t.prototype.rebuild=function(){this.dependencies=[];try{var t=this.buildDependencies(this.project.Vp);this.validate(t)&&(this.dependencies=t)}catch(t){this.dependencies=[]}this.dependencies.forEach((function(t){t.from.tyi().push(t),t.to.nyi().push(t)}))},t.prototype.buildDependencies=function(t){var n=[];return t.forEach((function(t){var i,e;t&&((i=t._data.predecessors)&&n.push.apply(n,h.parsePredecessors(t,i)),(e=t._data.successors)&&n.push.apply(n,h.parseSuccessors(t,e)))})),n},t.prototype.add=function(t){var n;if(!o(t)&&0!==t.length){if(!1===this.validateChanges(t))throw new Error(u().GANTT_INVALID_DEPENDENCY);t.forEach((function(t){t.from.tyi().push(t),t.to.nyi().push(t)})),(n=this.dependencies).push.apply(n,t),this.invalidateLines()}},t.prototype.validateChanges=function(t,n){var i,e,r,s,u,o,h,a,f;for(i=0,e=t;i<e.length;i++)if(r=e[i],!1===this.validateMembership(r))return!1;if(s=c([],this.dependencies,!0),n&&n.length>0){for(u=0,o=n;u<o.length;u++)(h=o[u]).iyi=!0;for(s=s.filter((function(t){return!t})),a=0,f=n;a<f.length;a++)delete(h=f[a]).iyi}return this.validateCircle(c(c([],s,!0),t,!0))},t.prototype.validate=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)if(e=i[n],!1===this.validateMembership(e))return!1;return!1!==this.validateCircle(t)},t.prototype.validateMembership=function(t){var n,i,e=t.from,r=t.to;if(r.isSummary&&("SF"===t.type||"FF"===t.type))return!1;for(n=e.level>r.level?e:r,i=e.level>r.level?r:e;n.level>i.level;)n=n.parent;return n!==i},t.prototype.validateCircle=function(t){var n=this.buildDependencyMap(t);return!(!n||!1===this.validateCircleCore(n))},t.prototype.validateCircleCore=function(t){var n,i=[],e=[],r=this.project.count<<1,s=[];for(n=0;n<r;n++)if(!i[n])for(s.push([n,-1]);s.length;)if(!1===this.dfs(t,i,e,s))return!1;return!0},t.prototype.buildDependencyMap=function(t){var n,i,e,r=this.initDependencyMap();for(n=0,i=t;n<i.length;n++)if(e=i[n],!1===this.buildDependencyMapLine(r,e.from,e.to))return null;return r},t.prototype.initDependencyMap=function(){var t,n,i,e,r,s,u,h,a=[];for(t=0;t<this.project.count;t++)if(n=this.project.getTask(t),!o(n)){for(r=[e=(i=n.taskNumber<<1)+1],a[i]=r,s=0,u=n.Fpi();s<u.length;s++)h=u[s],r.push(h.taskNumber<<1);0!==t&&(a[e]=[1+(n.parent.taskNumber<<1)])}return a},t.prototype.buildDependencyMapLine=function(t,n,i){var e=1+(n.taskNumber<<1),r=i.taskNumber<<1,s=t[e];if(s){if(s.indexOf(r)>=0)return!1}else s=[],t[e]=s;return s.push(r),!0},t.prototype.dfs=function(t,n,i,e){var r,s=e[e.length-1],u=s[0],o=s[1];if(-1===o){if(n[u])return!i[u]&&(e.pop(),!0);n[u]=!0,i[u]=!0}return o++,(r=t[u])&&o<r.length?(e[e.length-1][1]=o,e.push([r[o],-1]),!0):(i[u]=!1,e.pop(),!0)},t.prototype.remove=function(t){var n=this;t.forEach((function(t){n.disposeDependency(t)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT})),this.invalidateLines()},t.prototype.onTasksRemoved=function(){var t=this;this.dependencies.forEach((function(n){(n.from.xT||n.to.xT)&&t.disposeDependency(n)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT}))},t.prototype.onTasksMembershipChanged=function(){var t=this;this.dependencies.forEach((function(n){t.validateMembership(n)||t.disposeDependency(n)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT}))},t.prototype.disposeDependency=function(t){t.xT=!0,this.removeArrayItem(t.from.tyi(),t),this.removeArrayItem(t.to.nyi(),t)},t.prototype.removeArrayItem=function(t,n){for(var i=0;i<t.length;i++)if(t[i]===n){t.splice(i,1);break}},t.prototype.getLinkLineInRow=function(t){return this.lineMap||this.rebuildLines(),this.getRowData(t)},t.prototype.invalidateLines=function(){this.lineMap=null},t.prototype.rebuildLines=function(){var t=this;this.lineMap=[],this.project.eyi().forEach((function(n){var i,e,r=n.from.viewIndex,s=n.to.viewIndex;for(i=Math.min(r,s);i<=Math.max(r,s);i++)e=t.getRowData(i,!0),i===r?e.startLines.push(n):i===s?e.endLines.push(n):e.crossLines.push(n)}))},t.prototype.getRowData=function(t,n){void 0===n&&(n=!1);var i=this.lineMap[t];return!i&&n&&(i={startLines:[],endLines:[],crossLines:[]},this.lineMap[t]=i),i},t}(),n.TaskDependencyMap=a},649:function(t,n,i){var e,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttUIOptions=void 0,e=i(2749),r=function(){function t(t){this.zAi=!0,this.KAi=!0,this.XAi=!0,this.allowZoomTimescale=!0,this.IOProps=["allowAddTask","allowRemoveTask","allowReorderTask","allowZoomTimescale"],this.uAi=t}return Object.defineProperty(t.prototype,"allowAddTask",{get:function(){return this.zAi&&this.uAi.canAddTask},set:function(t){this.zAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemoveTask",{get:function(){return this.KAi&&this.uAi.canRemoveTask},set:function(t){this.KAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowReorderTask",{get:function(){return this.XAi},set:function(t){this.XAi=t},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.GanttUIOptions=r},670:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y;Object.defineProperty(n,"__esModule",{value:!0}),n.Timescale=n.NonWorkingTimeStyle=n.TimescaleTier=void 0,e=i(7234),r=i(1376),s=i(2749),u=i(7350),o=i(3018),h=i(4627),a=i(8869),c=i(1220),f=new e.Common.ResourceManager(a.SR,"GanttSheet"),l=f.getResource.bind(f),v=e.Common.lt.ht,A=r.q.Wt,d=32,b=[{pixel:1/32,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.years],counts:[50,20,5],formats:["yyyy","yyyy","yyyy"]},{pixel:1/8,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.halfYears],counts:[10,1,1],formats:["yyyy","yyyy",'"H"{!HALF_YEAR}']},{pixel:.5,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.quarters],counts:[5,1,1],formats:["yyyy","yyyy",'"Q"{!QUARTER}']},{pixel:1,units:[h.TimescaleUnit.years,h.TimescaleUnit.halfYears,h.TimescaleUnit.months],counts:[1,1,1],formats:["yyyy",'yyyy, "Half" {!HALF_YEAR}',"mmmmm"]},{pixel:2,units:[h.TimescaleUnit.years,h.TimescaleUnit.quarters,h.TimescaleUnit.months],counts:[1,1,1],formats:["yyyy",'yyyy "Qtr" {!QUARTER}',"mmm"]},{pixel:4,units:[h.TimescaleUnit.years,h.TimescaleUnit.months,h.TimescaleUnit.weeks],counts:[1,1,1],formats:["yyyy","'yy mmm","d"]},{pixel:8,units:[h.TimescaleUnit.quarters,h.TimescaleUnit.months,h.TimescaleUnit.days],counts:[1,1,5],formats:['yyyy "Qtr" {!QUARTER}',"yyyy mmmm","d"]},{pixel:16,units:[h.TimescaleUnit.quarters,h.TimescaleUnit.months,h.TimescaleUnit.days],counts:[1,1,2],formats:['yyyy "Qtr" {!QUARTER}',"yyyy mmmm","d"]},{pixel:32,units:[h.TimescaleUnit.months,h.TimescaleUnit.weeks,h.TimescaleUnit.days],counts:[1,1,1],formats:["yyyy mmmm","'yy mmm d",'{!DAY_OF_WEEK("S","M","T","W","T","F","S")}']},{pixel:128,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,6],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:256,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,2],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:512,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,1],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:4096,units:[h.TimescaleUnit.days,h.TimescaleUnit.hours,h.TimescaleUnit.minutes],counts:[1,1,15],formats:["ddd mmm d","ddd mmm d, h","{!MINUTE}"]}],m=function(){function t(){}return t.buildFormatter=function(t){var n=this;return t?function(i,r){for(var s,o,h,a,c=t;s=c.match(n.searchExpReg);)o=s[0],h=s[1],a=s[2],c=c.replace(o,n.getReplaceValue(h,a,u.Calendar.localToUTC(i),r));return new e.Formatter.GeneralFormatter(c).format(i)}:function(){return""}},t.getDefaultFormatter=function(t){var n,i=this.defaultFormatter[t];return v(i)&&(n=this.defaultFormatterText[t]||"",i=this.buildFormatter(n),this.defaultFormatter[t]=i),i},t.getReplaceValue=function(t,n,i,e){return this.keywordFunctionMap[t]?this.keywordFunctionMap[t](i,e,n):t},t.calcDiff_year=function(t,n){var i=n.getUTCFullYear()-t.getUTCFullYear();return this.fixDiffCount(i)},t.calcDiff_half_year=function(t,n){var i=2*n.getUTCFullYear()+(n.getUTCMonth()<6?0:1)-(2*t.getUTCFullYear()+(t.getUTCMonth()<6?0:1));return this.fixDiffCount(i)},t.calcDiff_quarter=function(t,n){var i=4*n.getUTCFullYear()+Math.floor(n.getUTCMonth()/3)-(4*t.getUTCFullYear()+Math.floor(t.getUTCMonth()/3));return this.fixDiffCount(i)},t.calcDiff_month=function(t,n){var i=12*n.getUTCFullYear()+n.getUTCMonth()-(12*t.getUTCFullYear()+t.getUTCMonth());return this.fixDiffCount(i)},t.calcDiff_week=function(t,n,i){var e,r,s=t.getUTCDay()-i.calendarSettings.weekStartOn;return s<0&&(s+=7),e=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-s)),r=Math.floor(u.Calendar.diffDaysUtc(e,n)/7),this.fixDiffCount(r)},t.calcDiff_day=function(t,n){var i=864e5,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},t.calcDiff_hour=function(t,n){var i=36e5,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},t.calcDiff_minute=function(t,n){var i=6e4,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},t.fixDiffCount=function(t){return t>=0&&(t+=1),'"'.concat(t.toFixed(),'"')},t.calcIndex_half_year=function(t,n){var i=t.getUTCMonth()<6?0:1;return this.getParams(n,["1","2"])[i]},t.calcIndex_quarter=function(t,n){var i=Math.floor(t.getUTCMonth()/3);return this.getParams(n,["1","2","3","4"])[i]},t.calcIndex_thirds_of_month=function(t,n){var i=Math.floor((t.getUTCDate()-1)/10);return this.getParams(n,["B","M","E"])[i]},t.calcIndex_week_of_year=function(t,n){var i,e=n.calendarSettings.weekStartOn,r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),s=e-r.getUTCDay();return s<0&&(s+=7),s<4?r.setUTCDate(r.getUTCDate()+s):r.setUTCDate(r.getUTCDate()+s-7),i=u.Calendar.diffDaysUtc(r,t),'"'.concat(Math.floor(i/7)+1,'"')},t.calcIndex_day_of_week=function(t,n){var i=t.getUTCDay();return this.getParams(n,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[i]},t.calcIndex_day_of_year=function(t){var n=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.floor(u.Calendar.diffDaysUtc(n,t))+1;return'"'.concat(i,'"')},t.calcIndex_minute=function(t){return'"'.concat(t.getUTCMinutes(),'"')},t.getParams=function(t,n){var i,e=n.length;return t&&(i=t.slice(1,t.length-1).split(",")).length>=e?i.slice(0,e):n},t.defaultFormatterText=["","yyyy",'"Half" {!HALF_YEAR}','"Qtr" {!QUARTER}',"mmm",'{!THIRDS_OF_MONTH("B","M","E")}',"m/d","ddd","h","{!MINUTE}"],t.defaultFormatter=[],t.searchExpReg=new RegExp("{!([^}\\(]*)(\\([^\\)]*\\))?}"),t.keywordFunctionMap={YEAR_FROM_START:function(n,i,e){return t.calcDiff_year(i.startDateUtc,n)},YEAR_FROM_END:function(n,i,e){return t.calcDiff_year(n,i.finishDateUtc)},HALF_YEAR:function(n,i,e){return t.calcIndex_half_year(n,e)},HALF_YEAR_FROM_START:function(n,i,e){return t.calcDiff_half_year(i.startDateUtc,n)},HALF_YEAR_FROM_END:function(n,i,e){return t.calcDiff_half_year(n,i.finishDateUtc)},QUARTER:function(n,i,e){return t.calcIndex_quarter(n,e)},QUARTER_FROM_START:function(n,i,e){return t.calcDiff_quarter(i.startDateUtc,n)},QUARTER_FROM_END:function(n,i,e){return t.calcDiff_quarter(n,i.finishDateUtc)},MONTH_FROM_START:function(n,i,e){return t.calcDiff_month(i.startDateUtc,n)},MONTH_FROM_END:function(n,i,e){return t.calcDiff_month(n,i.finishDateUtc)},THIRDS_OF_MONTH:function(n,i,e){return t.calcIndex_thirds_of_month(n,e)},WEEK_OF_YEAR:function(n,i,e){return t.calcIndex_week_of_year(n,i)},DAY_OF_WEEK:function(n,i,e){return t.calcIndex_day_of_week(n,e)},WEEK_FROM_START:function(n,i,e){return t.calcDiff_week(i.startDateUtc,n,i)},WEEK_FROM_END:function(n,i,e){return t.calcDiff_week(n,i.finishDateUtc,i)},DAY_OF_YEAR:function(n,i,e){return t.calcIndex_day_of_year(n)},DAY_FROM_START:function(n,i,e){return t.calcDiff_day(i.startDateUtc,n)},DAY_FROM_END:function(n,i,e){return t.calcDiff_day(n,i.finishDateUtc)},HOUR_FROM_START:function(n,i,e){return t.calcDiff_hour(i.startDateUtc,n)},HOUR_FROM_END:function(n,i,e){return t.calcDiff_hour(n,i.finishDateUtc)},MINUTE:function(n,i,e){return t.calcIndex_minute(n)},MINUTE_FROM_START:function(n,i,e){return t.calcDiff_minute(i.startDateUtc,n)},MINUTE_FROM_END:function(n,i,e){return t.calcDiff_minute(n,i.finishDateUtc)}},t}(),g=function(){function t(t){this.DU=1,this.Myi="Left",this.xyi=!0,this.IOProps=["count","formatter","unit","labelAlign","showTickLines","formatter"],this.sft=t}return Object.defineProperty(t.prototype,"unit",{get:function(){return this.l6n},set:function(t){this.l6n=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.DU},set:function(t){var n=Number(t);n>0&&n%1==0&&(this.DU=n),this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelAlign",{get:function(){return this.Myi},set:function(t){this.Myi=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showTickLines",{get:function(){return this.xyi},set:function(t){this.xyi=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formatter",{get:function(){return this.bbt},set:function(t){this.Hyi="string"==typeof t?m.buildFormatter(t):t,this.bbt=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realFormatter",{get:function(){return v(this.Hyi)?m.getDefaultFormatter(this.l6n):this.Hyi},enumerable:!1,configurable:!0}),t.prototype.formatDate=function(t){var n=this.realFormatter;return"function"==typeof n?n(t,this.sft.project):""},t.prototype.toJSON=function(){return s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TimescaleTier=g,w=function(){function t(t){this.Syi="Behind",this._x="#F7F7F7",this.Ox="solidFill",this.IOProps=["color","drawMode","pattern"],this.project=t}return Object.defineProperty(t.prototype,"drawMode",{get:function(){return this.Syi},set:function(t){this.Syi=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._x},set:function(t){this._x=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.Ox},set:function(t){this.Ox=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendar",{get:function(){return this.syi||this.project.calendar},set:function(t){this.syi=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.NonWorkingTimeStyle=w,y=function(){function t(t){this.iq=!1,this.Dyi=!1,this.Cyi=h.TimescaleTierMode.middleBottom,this.Eyi=!0,this.Ryi=new Date(Date.UTC(2020,0,1,0,0,0)),this.Fyi=new Date(Date.UTC(2030,0,1,0,0,0)),this.Nyi=d,this.IOProps=["topTier","middleTier","bottomTier","nonWorkingTime","tierMode","maxDate","minDate","pixelPerDay","autoFitMode","margin"],this.project=t,this.Byi=new g(this),this.Byi.unit=h.TimescaleUnit.days,this.Byi.labelAlign="Center",this.Iyi=new g(this),this.Iyi.unit=h.TimescaleUnit.weeks,this.Uyi=new g(this),this.Uyi.unit=h.TimescaleUnit.years,this.Lyi=new w(this.project);var n=new Date;n.setHours(0,0,0,0),this.cyi=u.Calendar.localToUTC(n),this.zoomAuto(),this.iq=!0,this.MAi=new o.TimescaleCellType}return t.prototype.sns=function(){this.project.Wmi.invoke()},t.prototype.ins=function(){var t,n;this.sns(),null===(n=null===(t=this.project.host)||void 0===t?void 0:t.uns)||void 0===n||n.call(t)},Object.defineProperty(t,"initialDate",{get:function(){return u.Calendar.utcToLocal(this.Yyi)},set:function(t){this.Yyi=u.Calendar.localToUTC(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialDateUtc",{get:function(){return this.Yyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDateUtc",{get:function(){return this.Ryi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return u.Calendar.utcToLocal(this.Ryi)},set:function(t){var n,i=u.Calendar.localToUTC(t);(null===(n=this.Ryi)||void 0===n?void 0:n.valueOf())!==(null==i?void 0:i.valueOf())&&(this.Ryi=i,this.ins())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDateUtc",{get:function(){return this.Fyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return u.Calendar.utcToLocal(this.Fyi)},set:function(t){var n,i=u.Calendar.localToUTC(t);(null===(n=this.Fyi)||void 0===n?void 0:n.valueOf())!==(null==i?void 0:i.valueOf())&&(this.Fyi=i,this.ins())},enumerable:!1,configurable:!0}),t.prototype.ons=function(){var n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier;return(0,c.getScrollbarRangeUtc)({minDateUtc:this.minDateUtc,maxDateUtc:this.maxDateUtc,margin:this.margin,autoFitMode:this.autoFitMode,pixelPerDay:this.Nyi,visibleSize:this.project.host?this.project.host.getTaskbarAreaVisibleSize():0,tierUnit:n.unit,tierCount:n.count,getDateUtcRange:this.getDateUtcRange.bind(this),dateUtcToUnitValue:this.dateUtcToUnitValue.bind(this),unitValueToDateUtc:this.unitValueToDateUtc.bind(this),millisecondsPerDay:t.millisecondsPerDay})},t.prototype.hns=function(t){var n=this.ons(),i=n.startDateUtc,e=n.maxCurrentDateUtc;return t<i?i:t>e?e:t},t.prototype.clampCurrentDateToRange=function(){if(!this.cyi)return!1;var t=this.hns(this.cyi);return t.valueOf()!==this.cyi.valueOf()&&(this.cyi=t,!0)},Object.defineProperty(t.prototype,"autoFitMode",{get:function(){var t;return null!==(t=this.zts)&&void 0!==t?t:"none"},set:function(t){if(this.zts="none"===t?void 0:t,"project"===t){var n=this.project.root;n&&n.start&&n.finish&&(this.Ryi=u.Calendar.localToUTC(n.start),this.Fyi=u.Calendar.localToUTC(n.finish))}this.ins()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){var t;return null!==(t=this._margin)&&void 0!==t?t:0},set:function(t){(isNaN(t)||t<0)&&(t=0),this._margin=0===t?void 0:t,this.ins()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableMinDateUtc",{get:function(){var t,n,i=this.margin;return i<=0?this.minDateUtc:(t=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier,n=this.dateUtcToUnitValue(this.minDateUtc,t.unit),this.unitValueToDateUtc(n-i*t.count,t.unit))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableMaxDateUtc",{get:function(){var n,i,e,r,s,u,o=this.maxDateUtc,a=this.margin;return a>0&&(n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier,i=this.dateUtcToUnitValue(o,n.unit),o=this.unitValueToDateUtc(i+a*n.count,n.unit)),e=this.getDateUtcRange(o)[1],"none"!==this.autoFitMode&&(s=(r=this.project.host?this.project.host.getTaskbarAreaVisibleSize():0)/this.Nyi,(e=new Date(e.valueOf()-s*t.millisecondsPerDay))<(u=this.getDateUtcRange(this.scrollableMinDateUtc)[0])&&(e=u)),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return u.Calendar.utcToLocal(this.cyi)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDateUtc",{get:function(){return this.cyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tierMode",{get:function(){return this.Cyi},set:function(t){this.Cyi=t,this.project.Vmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showScaleSeparator",{get:function(){return this.Eyi},set:function(t){this.Eyi=t,this.sns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topTier",{get:function(){return this.Uyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"middleTier",{get:function(){return this.Iyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomTier",{get:function(){return this.Byi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nonWorkingTime",{get:function(){return this.Lyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelPerDay",{get:function(){return this.Nyi},set:function(t){this.Nyi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this.pixelPerDay/d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleTopTierTextStyle",{get:function(){return this.MAi.topTierTextStyle},set:function(t){this.MAi.topTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleMiddleTierTextStyle",{get:function(){return this.MAi.middleTierTextStyle},set:function(t){this.MAi.middleTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleBottomTierTextStyle",{get:function(){return this.MAi.bottomTierTextStyle},set:function(t){this.MAi.bottomTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),t.prototype.update=function(t,n){if(!v(t)){if(isNaN(t.valueOf()))throw new Error(l().GANTT_INVALID_OPERATION);this.cyi=this.hns(t)}v(n)||(n=Math.min(n,65536),n=Math.max(n,1/32),this.Nyi=n),v(n)?this.sns():this.ins()},t.prototype.scroll=function(t){var n,i;0!==t&&(n=this.getDateUtcRange(this.getDateUtcByOffset(t)),(i=t<0?n[1]:n[0]).valueOf()!==this.currentDateUtc.valueOf()&&this.update(i))},t.prototype.scrollOneTick=function(t){var n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier;this.scrollBy(t?n.count:-n.count,n.unit)},t.prototype.scrollBy=function(n,i){var e;e=n>0?this.getDateUtcRange(this.currentDateUtc,i,n)[1]:this.getDateUtcRange(new Date(this.currentDateUtc.valueOf()-t.millisecondsPerMinute),i,-n)[0],this.update(e)},t.prototype.scrollTo=function(n,i){var e,r,s;void 0===i&&(i=0),n&&(e=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,r=u.Calendar.localToUTC(n).valueOf()-e/this.pixelPerDay*t.millisecondsPerDay*i,s=this.getDateUtcRange(new Date(r))[0],this.update(s))},t.prototype.getDateUtcByOffset=function(t,n){var i,e,r;return i=n=n||this.currentDateUtc,0!==t&&(e=t/this.pixelPerDay,r=Math.ceil(24*e*60*60*1e3),i=new Date(n.valueOf()+r)),i},t.prototype.getOffsetByDateUtc=function(t){return u.Calendar.diffDaysUtc(this.currentDateUtc,t)*this.pixelPerDay},t.prototype.zoomTo=function(t,n){var i,e;void 0===n&&(n=!0),isNaN(t)||t<=0||(i=t*d,e=null,n&&(this.adjustTierUnit(i),e=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(e,i))},t.prototype.log2=function(t){return Math.log(t)/Math.log(2)},t.prototype.getCurrentZoomLevel=function(){var t=this.log2(this.pixelPerDay),n=this.log2(d);return t=t>n?Math.floor(t):Math.ceil(t)},t.prototype.zoomIn=function(t){var n,i;void 0===t&&(t=!0),n=Math.pow(2,this.getCurrentZoomLevel()+1),i=null,t&&(this.adjustTierUnit(n),i=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(i,n)},t.prototype.zoomOut=function(t){var n,i;void 0===t&&(t=!0),n=Math.pow(2,this.getCurrentZoomLevel()-1),i=null,t&&(this.adjustTierUnit(n),i=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(i,n)},t.prototype.zoomToRange=function(n,i,e){var r,s,o,h,a,c,f,l,v,A;void 0===e&&(e=!0),n.valueOf()!==i.valueOf()?(r=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,s=u.Calendar.localToUTC(n),o=u.Calendar.localToUTC(i),h=u.Calendar.diffDaysUtc(s,o),a=Math.ceil(r/h),e&&this.adjustTierUnit(a),c=this.getDateUtcRange(s)[0],f=this.getDateUtcRange(o)[1],l=r/u.Calendar.diffDaysUtc(c,f)*.9,v=s.valueOf()-r/a*t.millisecondsPerDay*.05,A=this.getDateUtcRange(new Date(v))[0],this.update(A,l)):this.scrollTo(n,.1)},t.prototype.adjustTierUnit=function(t){var n,i,e,r,s,u;try{for(this.Dyi=!0,r=0,s=0;s<b.length&&!(b[s].pixel>t);s++)r=s;(u=b[r])&&(n=u.units,this.topTier.unit=n[0],this.middleTier.unit=n[1],this.bottomTier.unit=n[2],i=u.counts,this.topTier.count=i[0],this.middleTier.count=i[1],this.bottomTier.count=i[2],e=u.formats,this.topTier.formatter=e[0],this.middleTier.formatter=e[1],this.bottomTier.formatter=e[2])}finally{this.Dyi=!1}},t.prototype.zoomAuto=function(){var t,n,i=this.getSuitablePixelPerDayForTier(this.bottomTier),e=this.getSuitablePixelPerDayForTier(this.middleTier),r=this.getSuitablePixelPerDayForTier(this.topTier);switch(this.tierMode){case h.TimescaleTierMode.middle:t=e;break;case h.TimescaleTierMode.middleBottom:t=Math.max(e,i);break;case h.TimescaleTierMode.topMiddleBottom:t=Math.max(i,e,r)}v(t)||(n=this.getDateUtcRange(this.currentDateUtc)[0],this.update(n,t))},t.prototype.getSuitablePixelPerDayForTier=function(t){var n,i=new Date(2020,8,30,11,11,59,59),e=t.formatDate(i),r=A(e,"16px Calibri");return(r=1.5*r+3)/((n=this.convertUnitToDay(t.unit))*t.count)},t.prototype.convertUnitToDay=function(n){return t.TimescaleUnitValueMap[n]},t.prototype.dateUtcToUnitValue=function(n,i){var e,r;switch(i){case h.TimescaleUnit.years:return n.getUTCFullYear();case h.TimescaleUnit.halfYears:return 2*n.getUTCFullYear()+(n.getUTCMonth()>=6?1:0);case h.TimescaleUnit.quarters:return 4*n.getUTCFullYear()+Math.floor(n.getUTCMonth()/3);case h.TimescaleUnit.months:return 12*n.getUTCFullYear()+n.getUTCMonth();case h.TimescaleUnit.thirdsOfMonth:return r=(e=n.getUTCDate())>20?2:e>10?1:0,36*n.getUTCFullYear()+3*n.getUTCMonth()+r;case h.TimescaleUnit.weeks:return Math.floor((Math.floor(n.valueOf()/t.millisecondsPerDay)+4-this.project.calendarSettings.weekStartOn)/7);case h.TimescaleUnit.days:return Math.floor(n.valueOf()/t.millisecondsPerDay);case h.TimescaleUnit.hours:return Math.floor(n.valueOf()/t.millisecondsPerHour);case h.TimescaleUnit.minutes:return Math.floor(n.valueOf()/t.millisecondsPerMinute)}},t.prototype.unitValueToDateUtc=function(n,i){switch(i){case h.TimescaleUnit.years:return new Date(Date.UTC(n,0,1));case h.TimescaleUnit.halfYears:return new Date(Date.UTC(Math.floor(n/2),n%2*6,1));case h.TimescaleUnit.quarters:return new Date(Date.UTC(Math.floor(n/4),n%4*3,1));case h.TimescaleUnit.months:return new Date(Date.UTC(Math.floor(n/12),n%12,1));case h.TimescaleUnit.thirdsOfMonth:return new Date(Date.UTC(Math.floor(n/36),Math.floor(n%36/3),n%3*10+1));case h.TimescaleUnit.weeks:return new Date((7*n-4+this.project.calendarSettings.weekStartOn)*t.millisecondsPerDay);case h.TimescaleUnit.days:return new Date(n*t.millisecondsPerDay);case h.TimescaleUnit.hours:return new Date(n*t.millisecondsPerHour);case h.TimescaleUnit.minutes:return new Date(n*t.millisecondsPerMinute)}},t.prototype.getDateUtcRange=function(n,i,e){var r,s,u;return v(i)&&v(e)&&(i=(r=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier).unit,e=r.count),s=this.dateUtcToUnitValue(n,i),1===e?[this.unitValueToDateUtc(s,i),this.unitValueToDateUtc(s+1,i)]:(u=this.dateUtcToUnitValue(t.initialDateUtc,i),this.unitValueToDateUtc(u,i)<t.initialDateUtc&&u++,s=Math.floor((s-u)/e)*e+u,[this.unitValueToDateUtc(s,i),this.unitValueToDateUtc(s+e,i)])},t.prototype.Pyi=function(){this.iq&&!this.Dyi&&this.zoomAuto()},t.prototype.toJSON=function(){var t=s.GanttSheetJsonConverter.toJSON(this,this.IOProps);return"none"===t.autoFitMode&&delete t.autoFitMode,0===t.margin&&delete t.margin,t},t.prototype.fromJSON=function(t){this.iq=!1,s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps),t.currentDate&&(this.cyi=u.Calendar.localToUTC(new Date(t.currentDate))),this.iq=!0},t.Yyi=u.Calendar.localToUTC(new Date(1984,1,1)),t.TimescaleUnitValueMap=[NaN,365,182,90,28,8,7,1,1/24,1/1440],t.millisecondsPerMinute=6e4,t.millisecondsPerHour=36e5,t.millisecondsPerDay=864e5,t}(),n.Timescale=y},1114:function(t,n,i){var e,r,s=this&&this.vJr||(u=function(t,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},u(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),u;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskSubjectCellType=void 0,r=function(t){function n(){var n=t.call(this)||this;return n.typeName="105",n}return s(n,t),n.prototype.cAi=function(t){return t.row},n.prototype.toJSON=function(){return{typeName:this.typeName}},n}((e=i(1376)).CellTypes.Text),n.TaskSubjectCellType=r,e.CellTypes.ti[105]=r},1220:function(t,n){function i(t){var n,i,e=t.minDateUtc,r=t.maxDateUtc,s=t.margin,u=t.tierUnit,o=t.tierCount,h=t.getDateUtcRange,a=t.dateUtcToUnitValue,c=t.unitValueToDateUtc,f=h(e)[0],l=h(r)[1];return s>0&&(n=a(f,u),i=a(l,u),f=c(n-s*o,u),l=c(i+s*o,u)),{startDateUtc:f,endDateUtc:l}}function e(t){var n,e=t.autoFitMode,r=t.visibleSize,s=t.pixelPerDay,u=t.millisecondsPerDay,o=i(t),h=o.startDateUtc,a=o.endDateUtc,c=a;return"none"!==e&&(n=r/s,(c=new Date(a.valueOf()-n*u))<h&&(c=h)),{startDateUtc:h,maxCurrentDateUtc:c}}Object.defineProperty(n,"__esModule",{value:!0}),n.getScrollbarRangeUtc=n.getScrollbarContentRangeUtc=void 0,n.getScrollbarContentRangeUtc=i,n.getScrollbarRangeUtc=e},1264:function(t,n,i){var e,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttMapping=void 0,e=i(4448),r=function(){function t(t){this.project=t}return t.prototype.getDefaultMapping=function(t,n){var i=this,e=n?n.dateFormat:null;return"taskNumber"===t||"level"===t?[t,null,function(t){return i.parseInt(t)},null]:"name"===t||"predecessors"===t||"successors"===t?[t,null,null,null]:"start"===t||"finish"===t?[t,null,function(t){return i.parseDate(t,e)},null]:"duration"===t?["duration",null,function(t){return i.parseDuration(t)},null]:"mode"===t?[t,null,function(t){return i.parseMode(t)},null]:"isMilestone"===t?["isMilestone",null,function(t){return i.parseBoolean(t)},null]:"complete"===t?["complete",null,function(t){return i.parseFloat(t)},null]:void 0},t.prototype.parseFloat=function(t){return e.ValueHelper.parseNumber(t,!1)},t.prototype.parseInt=function(t){return e.ValueHelper.parseNumber(t,!0)},t.prototype.formatInt=function(t){return e.ValueHelper.formatNumber(t)},t.prototype.parseDate=function(t,n,i){return e.ValueHelper.parseDate(t,n,i)},t.prototype.formatDate=function(t,n,i){return e.ValueHelper.formatDate(t,n,i)},t.prototype.parseDuration=function(t){return this.project.parseDuration(t)},t.prototype.formatDuration=function(t){return this.project.formatDuration(t)},t.prototype.parseBoolean=function(t){return e.ValueHelper.parseBoolean(t,!0)},t.prototype.formatBoolean=function(t){return e.ValueHelper.formatBoolean(t)},t.prototype.parseMode=function(t){return e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"])},t.prototype.formatMode=function(t){return e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"])},t}(),n.GanttMapping=r},1376:function(n){n.exports=t.Spread.Sheets},1805:function(t,n,i){var e,r,s;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttGridlines=void 0,e=i(2749),r=i(4627),s=function(){function t(t){this.IOProps=["topTierColumn","middleTierColumn","bottomTierColumn","currentDate","ganttRows","projectFinish","projectStart"],this.lAi=t,this.LAi={lineColor:"",lineType:r.GanttGridlineType.empty},this.PAi={lineColor:"#FFFFFF",lineType:r.GanttGridlineType.thin},this.HAi={lineColor:"",lineType:r.GanttGridlineType.empty},this.YAi={lineColor:"transparent",lineType:r.GanttGridlineType.thin},this.QAi={lineColor:"#8BBF8A",lineType:r.GanttGridlineType.thin},this.WAi={lineColor:"#808080",lineType:r.GanttGridlineType.dotted},this.GAi={lineColor:"#808080",lineType:r.GanttGridlineType.dotted}}return Object.defineProperty(t.prototype,"topTierColumn",{get:function(){return this.LAi},set:function(t){this.LAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"middleTierColumn",{get:function(){return this.PAi},set:function(t){this.PAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomTierColumn",{get:function(){return this.HAi},set:function(t){this.HAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return this.QAi},set:function(t){this.QAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectStart",{get:function(){return this.WAi},set:function(t){this.WAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectFinish",{get:function(){return this.GAi},set:function(t){this.GAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ganttRows",{get:function(){return this.YAi},set:function(t){this.YAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),t.prototype.onLinesChanged=function(){this.lAi.project.VAi.invoke()},t.prototype.getLineInfos=function(t){var n=t.lineColor,i=t.lineType,e=t.intervalLineColor,s=t.intervalLineType;return i===r.GanttGridlineType.empty&&(n="transparent",i=r.GanttGridlineType.thin),s===r.GanttGridlineType.empty&&(e="transparent",s=r.GanttGridlineType.thin),{lineColor:n,lineType:i,intervalLineColor:e,intervalLineType:s}},t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.GanttGridlines=s},2187:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S=this&&this.mJr||function(){return S=Object.assign||function(t){var n,i,e,r;for(i=1,e=arguments.length;i<e;i++)for(r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},S.apply(this,arguments)},k=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.Project=void 0,e=i(5909),r=i(4448),s=i(237),u=i(670),o=i(7350),h=i(6985),a=i(6324),c=i(8943),f=i(7632),l=i(4627),v=i(2749),A=i(7234),d=i(8869),b=i(4924),m=i(3099),g=new A.Common.ResourceManager(d.SR,"GanttSheet"),w=g.getResource.bind(g),y=A.Common.lt.ht,p=A.Common.lt.tv,T="currentSortState",O=function(){function t(t){var n,i,r=this;this.cki=[],this.Kj=0,this.Lmi=new e.EventList,this.Hmi=new e.EventList,this.VAi=new e.EventList,this.Rmi=new e.EventList,this.Wmi=new e.EventList,this.Vmi=new e.EventList,this.IOProps=["calendarSettings","timescale","layout","defaultMode","taskStyleRules","startDate","currentDate","taskView"],this.Zc=t,this.taskManager=new a.TaskManager(this),this.resourcesManager=new b.ResourcesManager(this),this.syi=o.Calendar.standard,this.ryi=new o.CalendarSettings,this.ryi.propertyChanged.attach((function(){r.uyi.reSchedule()}),this),this.hyi=new u.Timescale(this),this.GY=new c.TaskbarLayout(this),this.taskView=new a.TaskCollectionView(this),this.taskView.onTasksChanging=this.onTasksChanging.bind(this),this.taskView.onTasksChanged=this.onTasksChanged.bind(this),this.oyi=new s.TaskDependencyMap(this),this.Omi=new f.TaskbarStyleManager(this),this.uyi=new h.ScheduleManager(this),n=new Date,i=this.calendarSettings.defaultStartTime,n.setHours(i.hour,i.minute,0,0),this.startDate=n,this.loadTasksInternal([],0)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDateUtc",{get:function(){return this.jAi},set:function(t){this.jAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDate",{get:function(){return o.Calendar.utcToLocal(this.jAi)},set:function(t){this.jAi=o.Calendar.localToUTC(t),this.hyi.update(t),this.uyi.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDateUtc",{get:function(){return this.ayi||this.jAi},set:function(t){this.ayi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDate",{get:function(){return o.Calendar.utcToLocal(this.finishDateUtc)},set:function(t){throw new Error(w().GANTT_INVALID_OPERATION)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDateUtc",{get:function(){if(!this.cyi){var t=new Date;t.setHours(this.calendarSettings.defaultStartTime.hour,this.calendarSettings.defaultStartTime.minute,0,0),this.cyi=o.Calendar.localToUTC(t)}return this.cyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return o.Calendar.utcToLocal(this.currentDateUtc)},set:function(t){this.cyi=o.Calendar.localToUTC(t),this.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendar",{get:function(){return this.syi},set:function(t){this.syi=t,this.uyi.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendarSettings",{get:function(){return this.ryi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescale",{get:function(){return this.hyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskStyleRules",{get:function(){return this.Omi.rules},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this.GY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canAddTask",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRemoveTask",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tasks",{get:function(){return k([],this.taskView.tasks,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Vp",{get:function(){return this.taskView.tasks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tasksSorted",{get:function(){return this.taskView.getTasksInView()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.Vp[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.Vp.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sorted",{get:function(){return this.taskView.sorted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepOutlineStructure",{get:function(){return!this.taskView.fyi||this.taskView.fyi.keepStructure},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sortState",{get:function(){return this.taskView.fyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultMode",{get:function(){return this.uyi.defaultMode},set:function(t){this.uyi.defaultMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dependencies",{get:function(){return k([],this.oyi.dependencies,!0)},enumerable:!1,configurable:!0}),t.prototype.Pki=function(t){return this.root===t},t.prototype.getTask=function(t){return this.taskView.getTask(t)},t.prototype.getTaskByRow=function(t){var n=this.getRowState(t);return n?n.task:null},t.prototype.getResources=function(t){return this.resourcesManager.getResourcesById(t)},t.prototype.getResourcesByName=function(t){return this.resourcesManager.getResourcesByName(t)},t.prototype.getResourcesByTaskNumber=function(t){return this.resourcesManager.getResourcesByTaskId(t)},t.prototype.getRowState=function(t){return this.taskView.getRowState(t)},t.prototype.cloneTask=function(t){var n=p(t.getData()),i=this.createTask(n),e=t.kU;return i.kU.taskNumber=e.taskNumber,i.kU.viewIndex=e.viewIndex,t.predecessors&&(i._data.predecessors=t.predecessors),t.successors&&(i._data.successors=t.successors),i},t.prototype.getBackupTasks=function(){return this.cki},t.prototype.clearBackupTasks=function(){this.cki=[]},t.prototype.backupTasksForSchedule=function(t){var n,i,e=[],r=this.count,s=t===l.TasksChangeAction.Renumber;for(n=0;n<r;n++)i=s?this.getTaskByRow(n):this.getTask(n),e.push(this.cloneTask(i));return this.cki=e,e},t.prototype.addField=function(t){this.taskManager.addField(t)},t.prototype.getField=function(t){return this.taskManager.getField(t)},t.prototype.suspendDirty=function(){this.Kj++},t.prototype.resumeDirty=function(){this.Kj--,this.Kj>0&&this.Kj--},t.prototype.isSuspendDirty=function(){return this.Kj>0},t.prototype.createChange=function(t,n,i,e){return{action:t,changedItems:n,needReschedule:!!i,sortInfos:e}},t.prototype.Eki=function(t,n){var i,e=t.start,r=0!==m.GanttSortService.dateCompareFunction(e,n);r&&(i=this.createChange(l.TasksChangeAction.Update,[],!0),this.Lmi.invoke(i),this.uyi.Eki(t,n),this.Hmi.invoke(i))},t.prototype.Fki=function(t,n){var i,e=t.finish,r=0!==m.GanttSortService.dateCompareFunction(e,n);r&&(i=this.createChange(l.TasksChangeAction.Update,[],!0),this.Lmi.invoke(i),this.uyi.Fki(t,n),this.Hmi.invoke(i))},t.prototype.sort=function(t,n,i,e){var r,s,u,o,h,a;if(void 0===i&&(i=!0),void 0===e&&(e=!1),e&&!i)throw new Error(w().GANTT_INVALID_OPERATION);if(n&&n.length!==t.length)throw new Error(w().GANTT_INVALID_OPERATION);for(r=[],s=0,u=t;s<u.length;s++){if(o=u[s],!(h=this.getField(o)))throw new Error(w().GANTT_INVALID_FIELD);r.push(h)}if((n=n||r.map((function(){return!0}))).length!==r.length)throw new Error(w().GANTT_INVALID_ASCENDING_STATES);this.taskView.sort(r,n,i),e&&(a={fields:r,ascendingStates:n},this.taskView.renumberTaskNumbers(a))},t.prototype.resort=function(){if(this.taskView.sorted){var t=this.taskView.fyi,n=t.fields,i=t.ascendingStates,e=t.keepStructure;this.taskView.sort(n,i,e)}},t.prototype.createTask=function(t){return this.taskManager.createTask(t)},t.prototype.createRoot=function(){var t=this.createTask({name:this.name});return t.kU.taskNumber=0,t.kU.viewIndex=0,t.q2t(0),t},t.prototype.loadTasksInternal=function(t,n){var i=this.createTasks(t,n);this.taskView.reset(i)},t.prototype.createTasks=function(t,n){var i,e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g=[];for(g[0]=this.createRoot(),i={},e=this.taskManager.getPrimaryKeyField(),r=this.taskView.Wki,s=0,u=t;s<u.length;s++)"number"==typeof(h=(o=u[s]).taskNumber)&&(a=o.id,f=i[c=o.parentId],l=this.createTask(o),e&&r&&(A=r[v=this.taskManager.getTaskValue(l,e.name)])&&(A.task=l),g[h]=l,l.kU.taskNumber=h,f?(g[d=f.taskNumber]||(g[d]=f),this.setParent(f,l)):this.setParent(g[0],l),"number"!=typeof(b=o.level)&&(b=1),m=b-n,l.q2t(m),y(a)||(i[a]=l));return g.filter((function(t){return!!t}))},t.prototype.setParent=function(t,n){n.lyi(t),t.Fpi().push(n)},t.prototype.addTasks=function(t,n){if(void 0===t&&(t=1),!this.canAddTask)throw new Error(w().GANTT_INVALID_OPERATION);var i=this.insertTasks(this.count,t,n);return this.resort(),i},t.prototype.insertTasks=function(t,n,i){if(void 0===n&&(n=1),!this.canAddTask)throw new Error(w().GANTT_INVALID_OPERATION);return this.validateInsertIndex(t,!0),this.insertTasksCore(t,n,i)},t.prototype.insertTasksByRow=function(t,n,i){if(!this.canAddTask)throw new Error(w().GANTT_INVALID_OPERATION);var e=this.validateInsertIndex(t,!1);return this.insertTasksCore(e,n,i)},t.prototype.insertTasksCore=function(t,n,i){if(void 0===i)i=this.taskView.calcRowLevel(t);else if(!1===this.taskView.validateLevel(t,i))throw new Error(w().GANTT_INVALID_LEVEL);var e=this.createTasksForInsert(n);return e.forEach((function(t){t.q2t(i)})),this.taskView.insert(t,e),this.resort(),e},t.prototype.createTasksForInsert=function(t){var n,i=[];if("number"==typeof t)for(n=0;n<t;n++)i.push(this.createTask());else if(Array.isArray(t))for(n=0;n<t.length;n++)i.push(this.createTask(t[n]));else i.push(this.createTask(t));return i},t.prototype.addRecurringTask=function(t,n){if(!this.canAddTask)throw new Error(w().GANTT_INVALID_OPERATION)},t.prototype.insertRecurringTask=function(t,n,i){if(!this.canAddTask)throw new Error(w().GANTT_INVALID_OPERATION)},t.prototype.validateInsertIndex=function(t,n){if(isNaN(t)||t<=0||t>this.count)throw new Error(n?w().GANTT_INVALID_ID:w().GANTT_INVALID_ROW_INDEX);return n||t===this.count?t:this.getRowState(t).taskNumber},t.prototype.removeTasks=function(t){if(!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.taskView.remove(t)},t.prototype.removeTasksByRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!0,n);this.taskView.remove(i)},t.prototype.removeTasksByRowRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!1,n);this.taskView.remove(i)},t.prototype.clearTasks=function(t){if(!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.taskView.clear(t)},t.prototype.clearTasksByRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!0,n);this.taskView.clear(i)},t.prototype.clearTasksByRowRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!1,n);this.taskView.clear(i)},t.prototype.renewTasks=function(t,n){if(!this.canAddTask||!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);if("number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)){var i=void 0;if((i=y(n)?this.createTasksForInsert(t.length):this.createTasksForInsert(n)).length!==t.length)throw new Error(w().GANTT_INVALID_COUNT);return this.taskView.renew(t,i),i}},t.prototype.renewTasksByRange=function(t,n){var i,e;if(void 0===n&&(n=1),!this.canAddTask||!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);return i=this.createTasksForInsert(n),e=this.validateOperationIndexAndCount(t,!0,i.length),this.taskView.renew(e,i),i},t.prototype.renewTasksByRowRange=function(t,n){var i,e;if(void 0===n&&(n=1),!this.canAddTask||!this.canRemoveTask)throw new Error(w().GANTT_INVALID_OPERATION);return i=this.createTasksForInsert(n),e=this.validateOperationIndexAndCount(t,!1,i.length),this.taskView.renew(e,i),i},t.prototype.indentTasks=function(t){"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.indentOutdentCore(t,1)},t.prototype.indentTasksByRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!0,n);this.indentOutdentCore(i,1)},t.prototype.indentTasksByRowRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!1,n);this.indentOutdentCore(i,1)},t.prototype.outdentTasks=function(t){"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.indentOutdentCore(t,-1)},t.prototype.outdentTasksByRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!0,n);this.indentOutdentCore(i,-1)},t.prototype.outdentTasksByRowRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!1,n);this.indentOutdentCore(i,-1)},t.prototype.indentOutdentCore=function(t,n){this.keepOutlineStructure&&(this.taskView.changeTasksLevel(t,n),this.resort())},t.prototype.validateOperationIndexAndCount=function(t,n,i){var e,s=this;if(isNaN(t)||t<=0||t>=this.count)throw new Error(n?w().GANTT_INVALID_ID:w().GANTT_INVALID_ROW_INDEX);if(!y(i)&&(isNaN(i)||i<=0||t+i-1>=this.count))throw new Error(w().GANTT_INVALID_COUNT);return e=r.GanttUtil.range(t,i),n?e:e.map((function(t){return s.getRowState(t).taskNumber}))},t.prototype.validateOperationIndexes=function(t){var n=this;return!!(t&&t.length>0)&&(t.forEach((function(t){if(isNaN(t)||t<=0||t>=n.count)throw new Error(w().GANTT_INVALID_ID)})),!0)},t.prototype.eyi=function(){return this.oyi.dependencies},t.prototype.addDependency=function(t){var n,i=this;if(t&&0!==t.length){if(Array.isArray(t)||(t=[t]),n=t.map((function(t){var n,e;if(t instanceof s.TaskDependency){if(t.from.project!==i||t.to.project!==i)throw new Error(w().GANTT_INVALID_DEPENDENCY);return t}if(n=i.getTask(t.fromTaskNumber),e=i.getTask(t.toTaskNumber),y(n)||y(e))throw new Error(w().GANTT_INVALID_DEPENDENCY);return new s.TaskDependency(n,e,t.type)})),!this.Ayi(n))throw new Error(w().GANTT_INVALID_DEPENDENCY);this.gyi(null,n)}},t.prototype.removeDependency=function(t){var n,i,e;if(t&&0!==t.length){for(Array.isArray(t)||(t=[t]),n=0,i=t;n<i.length;n++)if(!(e=i[n])||e.from.project!==this||e.to.project!==this)throw new Error(w().GANTT_INVALID_DEPENDENCY);this.gyi(t,null)}},t.prototype.gyi=function(t,n,i){var e=this.createChange(l.TasksChangeAction.Update,this.Vp,!0);i||this.Lmi.invoke(e),t&&t.length&&(this.uyi.invalidTasks(t.map((function(t){return t.to}))),this.oyi.remove(t)),n&&n.length&&(t&&t.length&&!1===this.oyi.validateChanges(n)?(this.uyi.validTasks(t.map((function(t){return t.to}))),this.oyi.add(t)):(this.oyi.add(n),this.uyi.invalidTasks(n.map((function(t){return t.to}))))),i||this.Hmi.invoke(e)},t.prototype.Ayi=function(t,n){return!(!y(t)&&0!==t.length)||this.oyi.validateChanges(t,n)},t.prototype.kmi=function(t){return this.oyi.getLinkLineInRow(t)},t.prototype.getDefaultStartDate=function(){var t=this.calendarSettings.defaultStartTime,n=new Date;return n.setHours(t.hour,t.minute,0,0),n},t.prototype.getDefaultFinishDate=function(){var t=this.calendarSettings.defaultFinishTime,n=new Date;return n.setHours(t.hour,t.minute,0,0),n},t.prototype.suspendSchedule=function(){this.uyi.suspend()},t.prototype.resumeSchedule=function(){this.uyi.resume()},t.prototype.parseDuration=function(t){return o.DurationHelper.parse(t,this.calendarSettings)},t.prototype.formatDuration=function(t){return o.DurationHelper.format(t,this.calendarSettings)},t.prototype.onTasksChanging=function(t){this.Lmi.invoke(t)},t.prototype.onTasksChanged=function(t){t.action===l.TasksChangeAction.Reset?this.oyi.rebuild():t.action===l.TasksChangeAction.Remove||t.action===l.TasksChangeAction.Replace?this.oyi.onTasksRemoved():t.action===l.TasksChangeAction.Move&&this.oyi.onTasksMembershipChanged(),this.oyi.invalidateLines(),this.Hmi.invoke(t)},t.prototype.isCalendarEqual=function(t,n){var i=JSON.stringify(t.toJson()),e=JSON.stringify(n.toJson());return i===e},t.prototype.getStandardCalendarByName=function(t){var n=w().GANTT_CALENDAR_STANDARD,i=w().GANTT_CALENDAR_NIGHT_SHIFT,e=w().GANTT_CALENDAR_24HOURS;return t===n?o.Calendar.standard:t===i?o.Calendar.nightShift:t===e?o.Calendar.hours24:null},t.prototype.toJSON=function(){var t,n,i=v.GanttSheetJsonConverter.toJSON(this,this.IOProps),e=this.taskView.fyi;return e&&(i[T]=S(S({},e),{fields:e.fields.map((function(t){return t.name}))})),this.syi&&(t=this.syi.name,(n=this.getStandardCalendarByName(t))&&this.isCalendarEqual(this.syi,n)?i.calendar={name:t}:i.calendar=this.syi.toJson()),i},t.prototype.fromJSON=function(t){var n,i,e,r,s=this;v.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps),(n=t[T])&&(this.taskView.fyi=S(S({},n),{fields:n.fields.map((function(t){return s.getField(t)}))})),t.calendar&&(!(i=t.calendar).name||i.defaultWorkWeek||i.customWorkWeeks?((r=new o.Calendar(i.name)).fromJson(i),this.calendar=r):(e=this.getStandardCalendarByName(i.name),this.calendar=e||new o.Calendar(i.name)))},t}(),n.Project=O},2749:function(t,n,i){var e,r,s,u,o;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheetJsonConverter=void 0,e=i(1376),r=i(7234),s=i(4448),u=r.Common.lt.tv,o=function(){function t(){}return t.toJSON=function(t,n){var i,r,s,o={};for(i=0,r=n;i<r.length;i++)t[s=r[i]]instanceof Date?o[s]={oaDate:e.util.Z0(t[s])}:t[s]&&t[s].toJSON&&"function"==typeof t[s].toJSON?o[s]=t[s].toJSON():void 0!==t[s]&&(o[s]=u(t[s]));return o},t.fromJSON=function(t,n,i){var r,o,h;for(r=0,o=i;r<o.length;r++)t[h=o[r]]&&t[h].fromJSON&&"function"==typeof t[h].fromJSON?t[h].fromJSON(n[h]):n[h]&&s.GanttUtil.uki(n[h].oaDate)?t[h]=e.util.V0(n[h].oaDate):void 0!==n[h]&&(t[h]=u(n[h]))},t}(),n.GanttSheetJsonConverter=o},3018:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w=this&&this.vJr||(y=function(t,n){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},y(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}y(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),y;function p(t,n){return b*t*n+5}Object.defineProperty(n,"__esModule",{value:!0}),n.TimescaleCellType=n.getTimescaleHeight=void 0,e=i(1376),r=i(2749),s=i(7350),u=i(4627),o=i(7234),h=i(3065),a=o.Common.lt.ht,c=e.mt.vi,f=e.CellTypes.Context,l=e.CellTypes.Base,v=e.GC$,A=null,d=void 0,b=18,n.getTimescaleHeight=p,m=function(){function t(t,n){this.lAi=t,this.startX=n,this.yAi=!1}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.jAi=this.project.timescale.currentDateUtc,this.yAi=!1,this.sheet.Dg().style.cursor="grabbing",this.Fg()},t.prototype.Fg=function(){var t=this;v(document).bind("mousemove.ganttSheet.timescale",(function(n){t.pg(n)})).bind("mouseup.ganttSheet.timescale",(function(n){t.bg(n)}))},t.prototype.OAi=function(){v(document).unbind("mousemove.ganttSheet.timescale").unbind("mouseup.ganttSheet.timescale")},t.prototype.pg=function(t){var n,i,e,r,s;this.sheet&&(n=this.sheet.uw(),i=t.pageX-n.left,e=t.pageY-n.top,r=this.sheet.hitTest(i,e),s=this.startX-r.x-this.getScrollDistance(),this.project.timescale.scroll(s))},t.prototype.getScrollDistance=function(){return-this.project.timescale.getOffsetByDateUtc(this.jAi)},t.prototype.bg=function(t){this.OAi(),this.yAi=!0,delete this.jAi},t.prototype.isFinish=function(){return this.yAi},t}(),g=function(t){function n(){var n=t.call(this)||this;return n.typeName="107",n.marginTop=2,n.marginBottom=2,n.backColor="#f0f0f0",n.separatorLineColor="gray",n.tickLineColor="gray",n.topTierTextStyle={},n.middleTierTextStyle={},n.bottomTierTextStyle={},n.allowDragScroll=!0,n.IOProps=["typeName","allowDragScroll","topTierTextStyle","middleTierTextStyle","bottomTierTextStyle"],n}return w(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.Lts=function(t,n){var i,r,s;return t&&t.hl?(i=new e.Style,(r=t.hl.headerRowStyle())&&i.h5(r),(s=t.hl.wholeTableStyle())&&i.h5(s),a(i.backColor)&&(i.backColor="white"),i):null},n.prototype.Jts=function(t){var n,i,r;return t&&t.getColumnCount()>0?(i=(null===(n=t.getActualStyle(0,0,e.SheetArea.colHeader))||void 0===n?void 0:n.clone(!0))||new e.Style,r=e.I.He(e.VisualState.normal,"gc-columnHeader-normal"),!i.foreColor&&(null==r?void 0:r.color)&&(i.foreColor=r.color),!i.backColor&&(null==r?void 0:r.backgroundColor)&&(i.backColor=r.backgroundColor),!i.borderLeft&&(null==r?void 0:r.borderLeftColor)&&(i.borderLeft=new e.LineBorder(r.borderLeftColor,e.LineStyle.thin)),!i.borderRight&&(null==r?void 0:r.borderRightColor)&&(i.borderRight=new e.LineBorder(r.borderRightColor,e.LineStyle.thin)),!i.borderTop&&((null==r?void 0:r.borderTopColor)||(null==r?void 0:r.borderLeftColor)||(null==r?void 0:r.borderRightColor))&&(i.borderTop=new e.LineBorder(r.borderTopColor||r.borderLeftColor||r.borderRightColor,e.LineStyle.thin)),!i.borderBottom&&(null==r?void 0:r.borderBottomColor)&&(i.borderBottom=new e.LineBorder(r.borderBottomColor,e.LineStyle.thin)),i):null},n.prototype.Pts=function(t,n){var i,e,r,s,u;return u="vertical"===n?(null===(i=t.borderLeft)||void 0===i?void 0:i.color)||(null===(e=t.borderRight)||void 0===e?void 0:e.color):(null===(r=t.borderTop)||void 0===r?void 0:r.color)||(null===(s=t.borderBottom)||void 0===s?void 0:s.color)},n.prototype.Uts=function(t,n,i){var r,s,u,o,h,a,c,f,l,v,A,b,m,g,w,y,p,T,O=new e.Style;return i&&(i.font!==d&&(O.font=i.font),i.color!==d&&(O.foreColor=i.color),i.textDecoration!==d&&(O.textDecoration=i.textDecoration)),(A=this.Lts(t,n))&&O.h5(A),(b=this.Jts(n))&&O.h5(b),m=O._fontStyle,g=O._fontWeight,w="10pt",(y=O._fontFamily)||(y=n.currentTheme().headerFont()),O.font=e.W.F2e(m,g,w,y,d,d,d),O.foreColor||(O.foreColor="#000000"),O.backColor||(O.backColor=this.backColor),(null===(r=O.borderLeft)||void 0===r?void 0:r.color)||(null===(s=O.borderRight)||void 0===s?void 0:s.color)||(p=void 0,A?(T=e.I.He(e.VisualState.normal,"gc-columnHeader-normal"))&&T.borderLeftColor&&(p=T.borderLeftColor):p=this.tickLineColor,p&&(O.borderLeft=new e.LineBorder(p,e.LineStyle.thin))),(null===(u=O.borderTop)||void 0===u?void 0:u.color)||(null===(o=O.borderBottom)||void 0===o?void 0:o.color)||A||this.separatorLineColor&&(O.borderTop=new e.LineBorder(this.separatorLineColor,e.LineStyle.thin)),O.font=e.Pf.ml(n,O.font),O.foreColor&&"string"==typeof O.foreColor&&(O.foreColor=e.Pf.vl(n,O.foreColor)),O.backColor&&"string"==typeof O.backColor&&(O.backColor=e.Pf.vl(n,O.backColor)),(null===(h=O.borderLeft)||void 0===h?void 0:h.color)&&"string"==typeof O.borderLeft.color&&(O.borderLeft.color=e.Pf.vl(n,O.borderLeft.color)),(null===(a=O.borderRight)||void 0===a?void 0:a.color)&&"string"==typeof O.borderRight.color&&(O.borderRight.color=e.Pf.vl(n,O.borderRight.color)),(null===(c=O.borderTop)||void 0===c?void 0:c.color)&&"string"==typeof O.borderTop.color&&(O.borderTop.color=e.Pf.vl(n,O.borderTop.color)),(null===(f=O.borderBottom)||void 0===f?void 0:f.color)&&"string"==typeof O.borderBottom.color&&(O.borderBottom.color=e.Pf.vl(n,O.borderBottom.color)),(null===(l=O.borderVertical)||void 0===l?void 0:l.color)&&"string"==typeof O.borderVertical.color&&(O.borderVertical.color=e.Pf.vl(n,O.borderVertical.color)),(null===(v=O.borderHorizontal)||void 0===v?void 0:v.color)&&"string"==typeof O.borderHorizontal.color&&(O.borderHorizontal.color=e.Pf.vl(n,O.borderHorizontal.color)),O},n.prototype.paintValue=function(t,n,i,r,s,u,o,h){var a,c,f,l;t&&s>0&&u>0&&(t.save(),t.rect(i,r,s,u),t.clip(),t.beginPath(),c=(a=h.sheet).NMi,(l=(f=this.Uts(c,a,null)).backColor)&&e.W.setFillStyle(t,l,i,r,s,u,(function(){t.fillRect(i,r,s,u)})),this.paintTimescales(t,i,r,s,u,h),t.restore())},n.prototype.paintTimescales=function(t,n,i,e,r,s){var o,a,c,f,l,v,A,d,m=h.GanttZoomHelper.getTotalZoomFactor(s),g=b*m+this.marginTop*m,w=this.oAi(s);if(w)switch(o=w.timescale,c=(a=s.sheet).NMi,f=this.Uts(c,a,this.topTierTextStyle),l=this.Uts(c,a,this.middleTierTextStyle),v=this.Uts(c,a,this.bottomTierTextStyle),A=1,f.font=h.GanttZoomHelper.scaleFont(f.font,m,A),l.font=h.GanttZoomHelper.scaleFont(l.font,m,A),v.font=h.GanttZoomHelper.scaleFont(v.font,m,A),(d=h.GanttZoomHelper.createScaledOptions(s)).offsetX=0,o.tierMode){case u.TimescaleTierMode.middle:this.paintSeparatorLine(t,n,i+r-.5,e,o,l),this.paintTier(t,n,i+r-g,e,g,l,w,o.middleTier,d,m);break;case u.TimescaleTierMode.middleBottom:this.paintSeparatorLine(t,n,i+r-.5,e,o,v),this.paintTier(t,n,i+r-g,e,g,v,w,o.bottomTier,d,m),this.paintTier(t,n,i+r-2*g,e,g,l,w,o.middleTier,d,m);break;case u.TimescaleTierMode.topMiddleBottom:this.paintSeparatorLine(t,n,i+r-.5,e,o,v),this.paintTier(t,n,i+r-g,e,g,v,w,o.bottomTier,d,m),this.paintTier(t,n,i+r-2*g,e,g,l,w,o.middleTier,d,m),this.paintSeparatorLine(t,n,i+r-2*g-.5,e,o,l),this.paintTier(t,n,i+r-3*g,e,g,f,w,o.topTier,d,m)}},n.prototype.paintTier=function(t,n,i,r,u,o,h,c,f,v){var A,b,m,g,w,y,p,T,O,S,k,M,j,_,D,x,E,F,C,N;if(void 0===v&&(v=1),A=this,!a(c))for(m=b=h.timescale.currentDateUtc,g=v,w=o,y=c.labelAlign||"Left",w.hAlign="Left"===y?e.HorizontalAlign.left:"Center"===y?e.HorizontalAlign.center:e.HorizontalAlign.right,w.vAlign=1;;)if(T=(p=h.timescale.getDateUtcRange(m,c.unit,c.count))[0],O=p[1],k=n+(S=h.timescale.getOffsetByDateUtc(T))*g,j=n+(M=h.timescale.getOffsetByDateUtc(O))*g,(_=Math.floor(j)+.5)<n)m=O;else{if(k>=n+r)break;j=_,D=c.formatDate(s.Calendar.utcToLocal(T)),x={},(E=j-k)<1||u<1||(F=Math.max(E,1),C=u,l.prototype.paintText.call(A,t,D,k,i,F,C,w,f,D,x,d,d),c.showTickLines&&(N=this.Pts(w,"vertical"))&&(t.beginPath(),t.lineWidth=1,t.moveTo(j,i),t.lineTo(j,i+u),t.strokeStyle=N,t.stroke())),m=O}},n.prototype.paintSeparatorLine=function(t,n,i,e,r,s){if(r.showScaleSeparator){var u=this.Pts(s,"horizontal");u&&(t.beginPath(),t.lineWidth=1,t.moveTo(n,i),t.lineTo(n+e,i),t.strokeStyle=u,t.stroke())}},n.prototype.getText=function(t,n){return t},n.prototype.getHitInfo=function(t,n,i,e,r){var s,u,o,h,a,c,f=this;return r?(s=r.sheetArea,u=e.x,o=e.x+e.width,h=e.y+f.marginTop,a=e.y+e.height-f.marginBottom,c={x:t,y:n,row:r.row,col:r.col,cellRect:e,sheetArea:s,sheet:r.sheet,cellStyle:i},u<=t&&t<=o&&h<=n&&n<=a&&(c.isReservedLocation=!0),c):A},n.prototype.processMouseDown=function(t){var n,i=this.oAi(t);return!!i&&(!!((n=t&&t.sheet)&&t.isReservedLocation&&this.allowDragScroll)&&(this.TAi=new m(t.sheet.NMi,t.x),this.TAi.start(),!0))},n.prototype.processMouseMove=function(t){this.allowDragScroll&&(this.TAi&&!this.TAi.isFinish()||(t.sheet.Dg().style.cursor="grab"),this.TAi&&!this.TAi.isFinish()&&(t.sheet.Dg().style.cursor="grabbing"))},n.prototype.processKeyDown=function(t,n){return!1},n.prototype.processKeyUp=function(t,n){return!1},n.prototype.isReservedKey=function(t,n){return 32===t.keyCode&&!t.ctrlKey&&!t.shiftKey&&!t.altKey},n.prototype.getAutoFitWidth=function(t,n,i,e,r){return f.Bt(t,n,i,e,r)},n.prototype.getAutoFitHeight=function(t,n,i,e,r){var s=this.oAi(r);return p(s?s.timescale.tierMode:u.TimescaleTierMode.middle,r.sheet.zoom())},n.prototype.QD=function(t){this.isReservedKey(t)&&c(t)},n.prototype.isImeAware=function(t){return!1},n.prototype.jn=function(t){},n.prototype.Ke=function(){},n.prototype.activeOnClick=function(){return!1},n.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},n.prototype.fromJSON=function(t){r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},n}(l),n.TimescaleCellType=g,e.CellTypes.ti[107]=g},3065:function(t,n,i){var e,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttZoomHelper=void 0,e=i(1376),r=function(){function t(){}return t.getTotalZoomFactor=function(t){var n=t.printZoomFactor||1,i=t.sheet.zoom();return n*i},t.scaleBounds=function(t,n,i,e){var r,s;return void 0===i&&(i=0),void 0===e&&(e=0),1===n?t:{x:i+(r=t.x-i)*n,y:e+(s=t.y-e)*n,w:t.w*n,h:t.h*n}},t.scaleFont=function(t,n,i){if(void 0===i&&(i=6),!t||1===n)return t;var r=e.W.V(t,n);return this.ensureMinimumFontSize(r.font,i)},t.ensureMinimumFontSize=function(t,n){var i,e,r,s,u;return t&&(i=t.match(/(\d+(?:\.\d+)?)(pt|px)/))?(e=parseFloat(i[1]),(s="pt"===(r=i[2])?1.33*e:e)<n?(u="pt"===r?Math.ceil(n/1.33):n,t.replace(/\d+(?:\.\d+)?(pt|px)/,u+r)):t):t},t.getDefaultFont=function(t){var n=t.currentTheme().bodyFont();return"normal normal 10pt ".concat(n)},t.createScaledOptions=function(t){return Object.assign({},t,{printZoomFactor:1})},t.scalePosition=function(t,n,i){return t+n*i},t.scaleDimension=function(t,n){return t*n},t}(),n.GanttZoomHelper=r},3099:function(t,n,i){var e,r,s,u,o,h=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSortService=void 0,e=i(6324),r=i(7234),s=r.Common.lt.ht,u=Array.isArray,o=function(){function t(){}return t.sort=function(t,n,i,e,r){return r?this.treeSort(t,n,i,e):this.flatSort(t,n,i,e)},t.flatSort=function(t,n,i,e){var r=this;return h([],t,!0).sort((function(t,s){return r.sortCompare(t,s,n,i,e)}))},t.treeSort=function(t,n,i,e){var r=n[0],s=[];return this.subTreeSort(s,n,r,i,e),this.mergeBlankRows(t,n,s)},t.subTreeSort=function(t,n,i,e,r){var s,u,o,a,c,f=this;if(t.push(i.kU),(s=i.Fpi())&&s.length)for(o=0,a=u=h([],s,!0).sort((function(t,i){return f.sortCompare(t,i,n,e,r)}));o<a.length;o++)c=a[o],this.subTreeSort(t,n,c,e,r)},t.mergeBlankRows=function(t,n,i){var e=this.buildBlankRowMap(t,n),r=[];return i.forEach((function(t){var n=e[t.taskNumber];n&&(r=r.concat(n)),r.push(t)})),e[-1]&&(r=r.concat(e[-1])),r},t.buildBlankRowMap=function(t,n){var i,e,r,s={};for(e=0;e<n.length;e++)(r=n[e])?i&&(s[e]=i,i=null):(i=i||[]).push(t[e]);return i&&(s[-1]=i),s},t.sortCompare=function(t,n,i,r,u){var o,h,a,c,f,l=function(t){return t instanceof e.Task?[t,t.kU]:[i[t.taskNumber],t]},v=l(t),A=v[0],d=v[1],b=l(n),m=b[0],g=b[1];if(r.length>0&&"taskNumber"===r[0].name)return u[0]?d.taskNumber-g.taskNumber:g.taskNumber-d.taskNumber;for(o=0;o<r.length;o++){if(s(A)&&s(m))return d.taskNumber-g.taskNumber;if(s(A))return 1;if(s(m))return-1;if(h=r[o],a=A?A.project.taskManager.getTaskValue(A,h):void 0,c=m?m.project.taskManager.getTaskValue(m,h):void 0,0!==(f=this.compareValueWithField(a,c,h)))return u[o]?f:-f}return 0},t.compareValueWithField=function(n,i,e){var r=0;return r=s(n)||s(i)?this.compareWithEmpty(n,i):e.comparer?e.comparer(n,i):t.builtinCompareFunction(n,i,e)},t.builtinCompareFunction=function(t,n,i){var e,r,o=0;return t instanceof Date&&n instanceof Date?o=this.dateCompareFunction(t,n):"number"==typeof t&&"number"==typeof n?o=this.numberCompareFunction(t,n):"boolean"==typeof t&&"boolean"==typeof n?o=this.booleanCompareFunction(t,n):"string"==typeof t&&"string"==typeof n?o=this.stringCompareFunction(t,n):u(t)&&u(n)?o=this.compareArray(t,n):"duration"===i.name&&"object"==typeof t&&"object"==typeof n&&(e=s(t)?-1:t.time,r=s(n)?-1:n.time,o=this.numberCompareFunction(e,r)),o},t.compareArray=function(t,n){var i,e,r;if(t.length!==n.length)return 1;for(i=h([],t,!0).sort(),e=h([],n,!0).sort(),r=0;r<t.length;r++)if(i[r]!==e[r])return 1;return 0},t.compareWithEmpty=function(t,n){return s(t)&&s(n)?0:s(t)&&!s(n)?1:!s(t)&&s(n)?-1:void 0},t.numberCompareFunction=function(t,n){return t-n},t.booleanCompareFunction=function(t,n){return!0===t&&!1===n?1:!1===t&&!0===n?-1:0},t.stringCompareFunction=function(t,n){return t.toLowerCase().localeCompare(n.toLowerCase())},t.dateCompareFunction=function(t,n){var i=t?t.valueOf():0,e=n?n.valueOf():0;return this.numberCompareFunction(i,e)},t}(),n.GanttSortService=o},3151:function(t,n,i){var e,r,s;function u(t){var n,i,e,r=Object.keys(s);for(n=0,i=r;n<i.length;n++)e=i[n],s[e].call(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.$Ai=void 0,e=i(7234),r=i(1376),s={ETi:function(){var t,n,i,s,u,o,h=this,a=this,c=a.Mf;c.NMi=this,c.hP=function(){var t=this.parent;return!t||t.getActiveSheetTab()===a},t=c.columnOutlines.setCollapsed,c.rowOutlines.setCollapsed=function(n,i,e){var r=a.project;r&&!r.keepOutlineStructure&&a.getTaskByRow(n)||t.call(this,n,i,e)},c.TF=function(){return h},n=c.getActualStyle,c.getActualStyle=function(t,i,e,s,u){var o,h,f,l;return void 0===u&&(u={}),o=a.zDi(t),h=n.call(c,t,i,e,s,u),o||(f=void 0===e||e===r.SheetArea.viewport,l=a.getGanttColumnIndex(),e!==r.SheetArea.colHeader&&i!==l||(h.cellPadding=void 0),f&&t>=0&&i>=0&&(i===l?a.mergeGanttTaskbarColumnStyle(t,h):a.margeGanttFieldColumnStyle(t,i,h))),h},i=c.getScrollTooltipContent,c.getScrollTooltipContent=function(t,n){if(n){var r=a.project.timescale.currentDateUtc;return new e.Formatter.GeneralFormatter("yy-mm-dd").format(r)}return i.call(c,t)},s=c.m6,c.m6=function(t,n,i){var e=c.hitTest(n,i);(!e.cellTypeHitInfo||"Up"!==e.cellTypeHitInfo.isReservedOnButton&&"Down"!==e.cellTypeHitInfo.isReservedOnButton)&&s.call(c,t,n,i)},c.sortRange=function(t,n,i,e,r,s,u,o,h){var c,f,l=[],v=[],A=a.getDataView(),d=A.getColumnInfos();for(c=0;c<s.length;c++)d[s[c].index]&&(f=d[s[c].index].name,l.push(f),v.push(s[c].ascending));return a.project.sort(l,v),!1},c.JAi=function(){return!0},c.continuousPaginateLargeColumn=function(){return!0},u=c.getColumnWidth,c.getColumnWidth=function(t,n,i){var e=a.zki,s=a.getGanttColumnIndex();return e&&n===r.SheetArea.viewport&&t===s?a.wAi():u.call(c,t,n,i)},o=c.Sy,c.Sy=function(t){var n;return a.zki?a.Zki():o.call(c,t)}}},n.$Ai=u},3220:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T=this&&this.vJr||(S=function(t,n){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},S(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}S(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),O=this&&this.mJr||function(){return O=Object.assign||function(t){var n,i,e,r;for(i=1,e=arguments.length;i<e;i++)for(r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},O.apply(this,arguments)},S;function k(t,n){return n?r.Pf.vl(t,n):n}function M(t,n){var i,e,s,u,o,h,a,f,l;return t&&t.hl?(a=new r.Style,(f=t.hl.highlightLastColumnStyle())&&a.h5(f),(l=t.hl.wholeTableStyle())&&a.h5(l),c(a.backColor)&&(a.backColor="white"),a.backColor&&"string"==typeof a.backColor&&(a.backColor=r.Pf.vl(n,a.backColor)),a.foreColor&&"string"==typeof a.foreColor&&(a.foreColor=r.Pf.vl(n,a.foreColor)),(null===(i=a.borderLeft)||void 0===i?void 0:i.color)&&(a.borderLeft.color=r.Pf.vl(n,a.borderLeft.color)),(null===(e=a.borderRight)||void 0===e?void 0:e.color)&&(a.borderRight.color=r.Pf.vl(n,a.borderRight.color)),(null===(s=a.borderTop)||void 0===s?void 0:s.color)&&(a.borderTop.color=r.Pf.vl(n,a.borderTop.color)),(null===(u=a.borderBottom)||void 0===u?void 0:u.color)&&(a.borderBottom.color=r.Pf.vl(n,a.borderBottom.color)),(null===(o=a.borderVertical)||void 0===o?void 0:o.color)&&(a.borderVertical.color=r.Pf.vl(n,a.borderVertical.color)),(null===(h=a.borderHorizontal)||void 0===h?void 0:h.color)&&(a.borderHorizontal.color=r.Pf.vl(n,a.borderHorizontal.color)),a.font&&(a.font=r.Pf.ml(n,a.font)),a):null}function j(t,n){var i,e,r,s,u;if(t)return u="vertical"===n?(null===(i=t.borderLeft)||void 0===i?void 0:i.color)||(null===(e=t.borderRight)||void 0===e?void 0:e.color):(null===(r=t.borderTop)||void 0===r?void 0:r.color)||(null===(s=t.borderBottom)||void 0===s?void 0:s.color)}function _(t,n){var i,e;return n&&n.lineType!==o.GanttGridlineType.empty?((i=n.lineColor)&&"transparent"!==i||(i=(e=M(t,t.Mf))?j(e,"vertical"):"transparent"),{lineColor:k(t.Mf,i),lineType:n.lineType}):n}function D(t){var n,i,e,r,s,u;if(!t||!t.project)return null;for((i=t[n="__celltypeRenderers"])||(i=[],t[n]=i),e=0,r=i;e<r.length;e++)if((s=r[e]).project===t.project)return s;return u=new y(t),i.push(u),u}Object.defineProperty(n,"__esModule",{value:!0}),n.vAi=n.GanttSheetRender=n.GanttCellTypeRenderer=n.GanttRenderer=n.getVerticalGridlineWithThemeStyle=n.Pts=n.Lts=void 0,e=i(7234),r=i(1376),s=i(7350),u=i(9286),o=i(4627),h=i(3065),a=r.util.vt,c=e.Common.lt.ht,f=e.Common.ft.YGt,l=r.util.Mt,v=8,n.Lts=M,n.Pts=j,n.getVerticalGridlineWithThemeStyle=_,A=function(){function t(t,n,i){this.endArrow=void 0,this.points=t,this.color=n,this.data=i}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),t.prototype.contains=function(t){var n,i,e,r,s,u;if(this.points.length<2)return!1;for(n=0;n<this.points.length-1;n++)if(i=this.points[n].x,e=this.points[n].y,r=this.points[n+1].x,s=this.points[n+1].y,u=3,t.x>Math.min(i,r)-u&&t.x<Math.max(i,r)+u&&t.y>Math.min(e,s)-u&&t.y<Math.max(e,s)+u)return!0;return!1},t.prototype.paint=function(t){var n,i;for(t.beginPath(),t.moveTo(this.points[0].x+.5,this.points[0].y+.5),n=1;n<this.points.length;n++)i=this.points[n],t.lineTo(i.x+.5,i.y+.5);t.strokeStyle=this.color,t.stroke(),this.endArrow&&this.jmi(t,this.endArrow)},t.prototype.jmi=function(t,n){var i,e,r,s;if(this.endArrow){switch(e=(i=this.points[this.points.length-1]).x,r=i.y,t.beginPath(),s=v/2,t.moveTo(e,r),n){case"Left":t.lineTo(e+s,r-s),t.lineTo(e+s,r+s);break;case"Right":t.lineTo(e-s,r-s),t.lineTo(e-s,r+s);break;case"Top":t.lineTo(e-s,r-s),t.lineTo(e+s,r-s);break;case"Bottom":t.lineTo(e-s,r+s),t.lineTo(e+s,r+s)}t.closePath(),t.fillStyle=this.color,t.fill()}},t}(),d=function(){function t(){}return t.prototype.maxDate=function(t,n){return t<n?n:t},t.prototype.minDate=function(t,n){return t<n?t:n},t.prototype.getLinePoints=function(t,n,i,e,r){var s=e.y,u=e.height,o=this.layoutLineX(t,n,i),h=o[0],a=o[1],c=o[2],f=o[3],l=this.layoutLineY(t,n,i),v=l[0],A=l[1],d=l[2],b=this.getArrowDirection(t,n,i);switch(r){case"cross":return[{x:c,y:s},{x:c,y:s+u}];case"start":return[{x:h,y:v},{x:a,y:v},{x:a,y:A},{x:c,y:A},{x:c,y:n.viewIndex<i.viewIndex?s+u:s}];case"end":return"Top"===b?[{x:c,y:n.viewIndex<i.viewIndex?s:s+u},{x:c,y:d}]:[{x:c,y:n.viewIndex<i.viewIndex?s:s+u},{x:c,y:d},{x:f,y:d}]}},t}(),b=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return T(n,t),n.prototype.getArrowDirection=function(t,n,i){switch(t){case"SS":case"FS":return"Right";case"FF":case"SF":return"Left"}},n.prototype.layoutLineX=function(t,n,i){var e,r,s,u,o=n.bounds,h=i.bounds;switch(t){case"SS":e=o.x,r=o.x-v,s=Math.min(r,h.x-v),u=h.x;break;case"SF":e=o.x,r=o.x-v,s=h.x+h.w+v,u=h.x+h.w;break;case"FS":e=o.x+o.w,r=o.x+o.w+v,s=(s=h.x-v)>r?r:s,u=h.x;break;case"FF":e=o.x+o.w,s=r=Math.max(o.x+o.w,h.x+h.w)+v,u=h.x+h.w}return[e,r,s,u]},n.prototype.layoutLineY=function(t,n,i){var e=n.bounds,r=i.bounds,s=e.y+e.h/2,u=n.viewIndex<i.viewIndex?n.cellRect.y+n.cellRect.height-2:n.cellRect.y+1,o=r.y+r.h/2;return[s,u,o]},n}(d),m=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return T(n,t),n.prototype.getArrowDirection=function(t,n,i){var e=n.bounds,r=i.bounds;switch(t){case"FS":return e.x+e.w<=r.x+5?n.viewIndex<i.viewIndex?"Top":"Bottom":"Right";case"SS":return"Right";case"FF":case"SF":return"Left"}},n.prototype.layoutLineX=function(t,n,i){var e,r,s,u,o=n.bounds,h=i.bounds;switch(t){case"SS":e=o.x,s=r=Math.min(o.x-v,h.x-v),u=h.x;break;case"SF":e=o.x,r=o.x-v,s=h.x+h.w+v,u=h.x+h.w;break;case"FS":e=o.x+o.w,o.x+o.w<=h.x+5?u=r=s=Math.max(h.x,o.x+o.w+5):(r=Math.max(o.x+o.w+v,h.x-v),s=(s=h.x-v)>r?r:s,u=h.x);break;case"FF":e=o.x+o.w,s=r=Math.max(o.x+o.w,h.x+h.w)+v,u=h.x+h.w}return[e,r,s,u]},n.prototype.layoutLineY=function(t,n,i){var e=n.bounds,r=i.bounds,s=e.y+e.h/2,u=n.viewIndex<i.viewIndex?n.cellRect.y+n.cellRect.height-2:n.cellRect.y+1,o=r.y+r.h/2;return"FS"===t&&e.x+e.w<=r.x+5&&(o=n.viewIndex<i.viewIndex?r.y:r.y+r.h),[s,u,o]},n}(d),g=function(){function t(t){this.lAi=t,this.Ami=a(this.sheet.getCell(-1,-1).font())}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.getMiddleHeight=function(){var t,n,i,e,s,u,o,h,a=this.project.layout.barHeight;return this.lAi._gi!==r.SheetType.ganttSheet||(this.project.Omi.hasLeftText&&(null===(n=null===(t=this.lAi)||void 0===t?void 0:t.taskbarColumn)||void 0===n?void 0:n.taskbarLeftTextStyle)&&(a=Math.max(this.getTextActualHeight(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarLeftTextStyle),a)),this.project.Omi.hasRightText&&(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarRightTextStyle)&&(a=Math.max(this.getTextActualHeight(null===(h=null===(o=this.lAi)||void 0===o?void 0:o.taskbarColumn)||void 0===h?void 0:h.taskbarRightTextStyle),a))),a},t.prototype.getTaskMiddleHeight=function(t){var n,i,e,s,u,o,h,a,c=this.project.layout.barHeight;return this.lAi._gi!==r.SheetType.ganttSheet||(t.hasLeftText&&(null===(i=null===(n=this.lAi)||void 0===n?void 0:n.taskbarColumn)||void 0===i?void 0:i.taskbarLeftTextStyle)&&(c=Math.max(this.getTextActualHeight(null===(s=null===(e=this.lAi)||void 0===e?void 0:e.taskbarColumn)||void 0===s?void 0:s.taskbarLeftTextStyle),c)),t.hasRightText&&(null===(o=null===(u=this.lAi)||void 0===u?void 0:u.taskbarColumn)||void 0===o?void 0:o.taskbarRightTextStyle)&&(c=Math.max(this.getTextActualHeight(null===(a=null===(h=this.lAi)||void 0===h?void 0:h.taskbarColumn)||void 0===a?void 0:a.taskbarRightTextStyle),c))),c},t.prototype.getTopHeight=function(n){var i,e,s,u,o=Math.max((t.minHeight-n)/2,3);return this.lAi._gi===r.SheetType.ganttSheet&&this.project.Omi.hasTopText&&(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarTopTextStyle)?this.getTextActualHeight(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarTopTextStyle):o},t.prototype.getTaskTopHeight=function(n,i){var e,s,u,o,h=Math.max((t.minHeight-n)/2,3);return this.lAi._gi===r.SheetType.ganttSheet&&i.hasTopText&&(null===(s=null===(e=this.lAi)||void 0===e?void 0:e.taskbarColumn)||void 0===s?void 0:s.taskbarTopTextStyle)?this.getTextActualHeight(null===(o=null===(u=this.lAi)||void 0===u?void 0:u.taskbarColumn)||void 0===o?void 0:o.taskbarTopTextStyle):h},t.prototype.getBottomHeight=function(n){var i,e,s,u,o=Math.max((t.minHeight-n)/2,2);return this.lAi._gi===r.SheetType.ganttSheet&&this.project.Omi.hasBottomText&&(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarBottomTextStyle)?this.getTextActualHeight(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarBottomTextStyle):o},t.prototype.getTaskBottomHeight=function(n,i){var e,s,u,o,h=Math.max((t.minHeight-n)/2,2);return this.lAi._gi===r.SheetType.ganttSheet&&i.hasBottomText&&(null===(s=null===(e=this.lAi)||void 0===e?void 0:e.taskbarColumn)||void 0===s?void 0:s.taskbarBottomTextStyle)?this.getTextActualHeight(null===(o=null===(u=this.lAi)||void 0===u?void 0:u.taskbarColumn)||void 0===o?void 0:o.taskbarBottomTextStyle):h},t.prototype.getTextActualHeight=function(t){return t.font?a(t.font):this.Ami},t.prototype.updateHeightWithTaskStyle=function(t,n,i){var e=this;return this.project.tasks.forEach((function(r){var s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S,k;r.style&&((null===(o=null===(u=null===(s=(k=r.getBarStyleRules()[0]).style)||void 0===s?void 0:s.taskbarStyle)||void 0===u?void 0:u.leftTextStyle)||void 0===o?void 0:o.font)&&(t=Math.max(e.getTextActualHeight(null===(a=null===(h=k.style)||void 0===h?void 0:h.taskbarStyle)||void 0===a?void 0:a.leftTextStyle),t)),(null===(l=null===(f=null===(c=k.style)||void 0===c?void 0:c.taskbarStyle)||void 0===f?void 0:f.rightTextStyle)||void 0===l?void 0:l.font)&&(t=Math.max(e.getTextActualHeight(null===(A=null===(v=k.style)||void 0===v?void 0:v.taskbarStyle)||void 0===A?void 0:A.rightTextStyle),t)),(null===(m=null===(b=null===(d=k.style)||void 0===d?void 0:d.taskbarStyle)||void 0===b?void 0:b.topTextStyle)||void 0===m?void 0:m.font)&&(n=Math.max(e.getTextActualHeight(null===(w=null===(g=k.style)||void 0===g?void 0:g.taskbarStyle)||void 0===w?void 0:w.topTextStyle)+2,n)),(null===(T=null===(p=null===(y=k.style)||void 0===y?void 0:y.taskbarStyle)||void 0===p?void 0:p.bottomTextStyle)||void 0===T?void 0:T.font)&&(i=Math.max(e.getTextActualHeight(null===(S=null===(O=k.style)||void 0===O?void 0:O.taskbarStyle)||void 0===S?void 0:S.bottomTextStyle)+2,i)))})),[t,n,i]},t.prototype.getTakRowHeight=function(t){var n,i,e,r=this,s=r.project.Omi.getTaskTextStates(t);if(s)return n=r.getTaskMiddleHeight(s),{height:(i=r.getTaskTopHeight(n,s))+n+(e=r.getTaskBottomHeight(n,s)),topHeight:i,middleHeight:n,bottomHeight:e}},t.prototype.getRowHeight=function(){var t=this.getMiddleHeight(),n=this.getTopHeight(t),i=this.getBottomHeight(t),e=this.updateHeightWithTaskStyle(t,n,i);return t=e[0],{height:(n=e[1])+t+(i=e[2]),topHeight:n,middleHeight:t,bottomHeight:i}},t.prototype.getData=function(){return this.getRowHeight()},t.minHeight=30,t}(),w=function(){function t(t){this.lAi=t,this.ymi=new g(t)}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.calcDateWidth=function(t,n){return this.calcDateLocation(0,n)-this.calcDateLocation(0,t)},t.prototype.calcDateLocation=function(t,n){return t+Math.floor(this.project.timescale.getOffsetByDateUtc(n))},t.prototype.getBarStyleRowHeight=function(){return this.ymi.getData().height},t.prototype.getLineTaskbarStyle=function(t){var n;return t.getBarStyleRules()[0]},t.prototype.clipBackgroundRects=function(t,n,i,e,r){for(var s,u,o,h,a,c=this.project.timescale.currentDateUtc;u=(s=this.project.timescale.getDateUtcRange(c))[0],o=s[1],!((h=this.calcDateLocation(n,u))>=n+e);)this.project.timescale.nonWorkingTime.calendar.isNonWorkingArea(u,o)||(a=this.calcDateWidth(u,o),h=Math.floor(h),a=Math.floor(h+a)-h,t.rect(h,i,a,r)),c=o;t.clip()},t.prototype.paintTierColumns=function(t,n,i,e,r,s){void 0===s&&(s=1);var u={};this.project.timescale.tierMode===o.TimescaleTierMode.topMiddleBottom&&this.paintTierColumn(t,n,i,e,r,this.lAi.gridlines.topTierColumn,this.project.timescale.topTier,u,s),this.paintTierColumn(t,n,i,e,r,this.lAi.gridlines.middleTierColumn,this.project.timescale.middleTier,u,s),this.project.timescale.tierMode!==o.TimescaleTierMode.middle&&this.paintTierColumn(t,n,i,e,r,this.lAi.gridlines.bottomTierColumn,this.project.timescale.bottomTier,u,s)},t.prototype.paintTierColumn=function(t,n,i,e,s,u,h,a,c){var f,l,v,A,d,b,m,g,w,y;if(void 0===c&&(c=1),(u=_(this.lAi,u))&&u.lineType!==o.GanttGridlineType.empty&&(f=u.lineColor)&&"transparent"!==f)for(v=l=this.project.timescale.currentDateUtc;;)if(d=(A=this.project.timescale.getDateUtcRange(v,h.unit,h.count))[0],b=A[1],(m=n+this.project.timescale.getOffsetByDateUtc(b)*c)<n)v=b;else{if(m>=n+e)break;a[g=Math.floor(m)]||(w=g+.5,(y=(0,r.Zx)(w,i,w,i+s,f,u.lineType))._e(t),a[g]=!0),v=b}},t.prototype.paintSpecialLines=function(t,n,i,e,r,s){var u,o,h,a;void 0===s&&(s=1),u=this.lAi.gridlines,o=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.startDateUtc):this.project.startDateUtc,h=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.finishDateUtc):this.project.finishDateUtc,a=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.currentDateUtc):this.project.currentDateUtc,this.paintSingleGridline(u.projectStart,o,t,n,i,e,r,s),this.paintSingleGridline(u.projectFinish,h,t,n,i,e,r,s),this.paintSingleGridline(u.currentDate,a,t,n,i,e,r,s)},t.prototype.paintSingleGridline=function(t,n,i,e,s,u,h,a){var c,f,l;if(void 0===a&&(a=1),(t=_(this.lAi,t))&&t.lineType!==o.GanttGridlineType.empty&&n){if(!(c=t.lineColor)||"transparent"===c)return;if((f=e+this.project.timescale.getOffsetByDateUtc(n)*a)>=e+u||f<e)return;f=Math.floor(f)+.5,(l=(0,r.Zx)(f,s+.5,f,s+h+.5,c,t.lineType))._e(i)}},t.getTextWidthAndHeight=function(t,n,i){var e=c(n)?0:a(i),r=l(t,i,n)+3;return[r,e]},t.prototype.layoutLinkEndInfo=function(n,i,e){var s,u,o,h,a,f=this.layoutTask(i,e.x,e.y);if(f)return(s=f[0]).styleRule.style.taskbarStyle.middleShape?(u=t.getTaskbarMiddleBounds(s.bounds,s.styleRule.style.taskbarStyle.middleShape),o=s.styleRule.style.taskbarStyle.middleColor):(u=t.getTaskbarMiddleBounds(s.bounds,"rectangleBar"),h=void 0,s.styleRule.style.taskbarStyle.startShape&&!c(s.styleRule.style.taskbarStyle.startShape)&&(h=s.styleRule.style.taskbarStyle.startColor),a=void 0,s.styleRule.style.taskbarStyle.endShape&&!c(s.styleRule.style.taskbarStyle.endShape)&&(a=s.styleRule.style.taskbarStyle.endColor),o=n?h||a:a||h),o&&(o=r.Pf.vl(this.sheet,o)),o||(o="#000000"),u?{bounds:u,color:o,viewIndex:i.viewIndex,cellRect:e}:void 0},t.prototype.layoutTask=function(t,n,i){var e=this,r=t.getBarStyleRules();if(!c(r)&&0!==r.length)return r.map((function(r){return e.layoutTaskCore(t,r,n,i)}))},t.prototype.layoutTaskCore=function(t,n,i,e){var r,s,u,o,h,a,c=n.getFromDate(t),f=n.getToDate(t),l=n.getScale(t),v=this.OAe(c),A=this.OAe(f),d=this.project.layout.barHeight,b=this.calcDateLocation(i,v),m=this.calcDateWidth(v,A)*l;return m=0===l?0:Math.max(m,1),o=e,(h=this.ymi.getTakRowHeight(t.taskNumber))&&(null===(u=null===(s=null===(r=this.lAi)||void 0===r?void 0:r.Mf)||void 0===s?void 0:s.defaults)||void 0===u?void 0:u.rowHeight)?o+=(this.lAi.Mf.defaults.rowHeight-h.height)/2+h.topHeight:o+=this.ymi.getData().topHeight+(this.ymi.getData().middleHeight-d)/2,{styleRule:n,bounds:a={x:b,y:o,w:m,h:d}}},t.prototype.OAe=function(t){t instanceof Date||(t=this.project.getDefaultStartDate());var n=s.Calendar.localToUTC(t);return this.project.layout.roundBarsToWholeDays&&(n=this.roundDateUtcWholeDay(n)),n},t.prototype._Ae=function(t){var n=t.startDisplayed,i=t.finishDisplayed,e=this.OAe(n),r=this.OAe(i);return Math.max(this.calcDateWidth(e,r),1)},t.prototype.getProjectLength=function(t){var n=s.Calendar.localToUTC(t.startDisplayed),i=s.Calendar.localToUTC(t.finishDisplayed);return n=this.roundDateUtcWholeDay(n),i=this.roundDateUtcWholeDay(i),Math.max(this.calcDateWidth(n,i),1)},t.prototype.roundDateUtcWholeDay=function(t){var n,i,e,r,s,u,o,h=864e5,a=t.valueOf(),c=a%h;return c<0&&(c+=h),a<=(e=(n=a-c)+60*(60*(i=this.project.calendarSettings.defaultStartTime).hour+i.minute)*1e3)?(r=this.project.timescale.getDateUtcRange(t),new Date(Math.max(r[0].valueOf(),n))):a>=(u=n+60*(60*(s=this.project.calendarSettings.defaultFinishTime).hour+s.minute)*1e3)?(o=(r=this.project.timescale.getDateUtcRange(t))[0].valueOf()===t.valueOf()?t:r[1],new Date(Math.min(o.valueOf(),n+h))):t},t.getTaskbarMiddleBounds=function(t,n){if(n){var i=t.x,e=t.y,r=t.w,s=t.h;switch(n){case"lineTop":e+=1,s=2;break;case"lineMiddle":e+=s/2-1,s=2;break;case"lineBottom":e+=s-2,s=2;break;case"rectangleTop":s/=2;break;case"rectangleMiddle":e+=s/3,s/=3;break;case"rectangleBottom":e+=s/2,s/=2;break;case"rectangleBar":e+=1,s-=2}return{x:i,y:e,w:r,h:s}}},t.getTaskbarStartBounds=function(t){var n=t.x,i=t.y,e=t.h;return{x:n-(e-=2)/2,y:i+1,w:e,h:e}},t.getTaskbarEndBounds=function(t){var n=t.x,i=t.y,e=t.w,r=t.h;return{x:n+e-(r-=2)/2,y:i+1,w:r,h:r}},t.prototype.getOffsetX=function(t,n){},t.prototype.getOffsetY=function(t,n){},t.prototype.getActionPendingBounds=function(n,i){var e,r,s,u,a,c,f;if(void 0===i&&(i=1),e=n.task,r=n.styleRule,e&&r){switch(s=this.getOffsetX(n.rowIndex,n.colIndex),u=this.getOffsetY(n.rowIndex,n.colIndex),a=this.layoutTaskCore(e,r,s,u).bounds,1!==i&&(a=h.GanttZoomHelper.scaleBounds(a,i,s,u)),c=n.partName){case o.BarPartName.Start:(f=t.getTaskbarStartBounds(a)).x+=n.movedX;break;case o.BarPartName.End:(f=t.getTaskbarEndBounds(a)).x+=n.movedX;break;case o.BarPartName.Middle:f=t.getTaskbarMiddleBounds(a,r.style.taskbarStyle.middleShape),n.stretchX?(f.w+=n.stretchX,f.w<0&&(f.w=Math.abs(f.w),f.x-=f.w)):f.x+=n.movedX;break;case o.BarPartName.Whole:f=a,n.stretchX?(f.w+=n.stretchX,f.w<0&&(f.w=Math.abs(f.w),f.x-=f.w)):f.x+=n.movedX}return f}},t}(),n.GanttRenderer=w,y=function(t){function n(n){return t.call(this,n)||this}return T(n,t),n.prototype.paintTask=function(t,n,i,e,r,s,u,o,a,c){var f,l,v,A=this.getTaskLayoutData(n,i,e,r),d=this.project.timescale.nonWorkingTime.drawMode,b=h.GanttZoomHelper.getTotalZoomFactor(o),m=Object.assign({},o,{printZoomFactor:b});switch(d){case"None":case"Behind":this.paintTierColumns(t,i,e,r,s,b),this.paintTaskbars(t,A,b,i,e)}if(this.paintSpecialLines(t,i,e,r,s,b),A)for(f=0,l=A;f<l.length;f++)v=l[f],this.paintBarText(t,n,v.styleRule.style.taskbarStyle,v.bounds,u,m,a,c,b,i,e)},n.prototype.getTaskLayoutData=function(t,n,i,e){if(t)return this.layoutTask(t,n,i)},n.prototype.paintTaskbars=function(t,i,e,r,s){var u,o,a,c;if(void 0===e&&(e=1),void 0===r&&(r=0),void 0===s&&(s=0),i)for(u=0,o=i;u<o.length;u++)a=o[u],c=h.GanttZoomHelper.scaleBounds(a.bounds,e,r,s),n.paintTaskbar(t,this.sheet,a.styleRule.style.taskbarStyle,c)},n.prototype.scaleLinkEndLayout=function(t,n){return 1===n?t:{bounds:h.GanttZoomHelper.scaleBounds(t.bounds,n,t.cellRect.x,t.cellRect.y),color:t.color,viewIndex:t.viewIndex,cellRect:t.cellRect};var i},n.paintTaskbar=function(t,i,e,s){var u=O(O({},e),{startColor:e.startColor?r.Pf.vl(i,e.startColor):void 0,endColor:e.endColor?r.Pf.vl(i,e.endColor):void 0,middleColor:e.middleColor?r.Pf.vl(i,e.middleColor):void 0});n.drawMiddle(t,u,n.getTaskbarMiddleBounds(s,null==e?void 0:e.middleShape)),n.drawStart(t,u,n.getTaskbarStartBounds(s)),n.drawEnd(t,u,n.getTaskbarEndBounds(s))},n.drawMiddle=function(t,n,i){(null==n?void 0:n.middleShape)&&i&&i.w>0&&u.BarPainter.draw(t,n.middlePattern||"solidFill",n.middleColor||"#000000",i)},n.drawStart=function(t,n,i){c(null==n?void 0:n.startShape)||c(i)||("triangleLeft"!==n.startShape&&"triangleRight"!==n.startShape||(i.x-=i.w/2),u.BarEndPainter.draw(t,n.startShape,n.startType||"solid",n.startColor||"#000000",i))},n.drawEnd=function(t,n,i){c(null==n?void 0:n.endShape)||c(i)||("triangleLeft"!==n.startShape&&"triangleRight"!==n.startShape||(i.x+=i.w/2),u.BarEndPainter.draw(t,n.endShape,n.endType||"solid",n.endColor||"#000000",i))},n.prototype.paintBarText=function(t,n,i,e,r,s,u,o,a,c,f){var l,v;void 0===a&&(a=1),void 0===c&&(c=0),void 0===f&&(f=0),l=6*a,v=h.GanttZoomHelper.scaleBounds(e,a,c,f),this.paintBarTextCore(t,u,n,i.leftText,i.leftTextStyle||{},r,v,s,o,(function(t,n,i){return[i.x-t-l,i.y+(i.h-n)/2,t,n]})),this.paintBarTextCore(t,u,n,i.rightText,i.rightTextStyle||{},r,v,s,o,(function(t,n,i){return[i.x+i.w+l,i.y+(i.h-n)/2,t,n]})),this.paintBarTextCore(t,u,n,i.topText,i.topTextStyle||{},r,v,s,o,(function(t,n,i){return[i.x+i.w/2-t/2,i.y-n,t,n]})),this.paintBarTextCore(t,u,n,i.bottomText,i.bottomTextStyle||{},r,v,s,o,(function(t,n,i){return[i.x+i.w/2-t/2,i.y+i.h,t,n]})),this.paintBarTextCore(t,u,n,i.insideText,i.insideTextStyle||{},r,v,s,o,(function(t,n,i){var e,r=t;return t>i.w&&(r=i.w-l),e=Math.min(t,i.h),[i.x+l,i.y+(i.h-e)/2,r,e]}))},n.prototype.Yts=function(t,n){var i,e,s,u,o,h=new r.Style;return t&&(void 0!==t.font&&(h.font=r.Pf.ml(this.sheet,t.font)),void 0!==t.color&&(h.foreColor=r.Pf.vl(this.sheet,t.color)),void 0!==t.textDecoration&&(h.textDecoration=t.textDecoration)),(i=M(this.lAi,this.sheet))&&h.h5(i),e=h._fontStyle,s=h._fontWeight,u="10pt",(o=h._fontFamily)||(o=this.sheet.currentTheme().bodyFont()),h.font=r.W.F2e(e,s,u,o,void 0,void 0,void 0),n&&h.h5(n),h},n.prototype.paintBarTextCore=function(t,i,s,u,o,h,a,f,l,v){var A,d,b,m,g,w,y,p,T,O,S,k,M,j,_;if(!c(u)&&""!==u.trim()){if("="===u[0]?(b=s.rowIndex-1,d=this.lAi.evaluateCalcColumnFormula(b,u)):d=this.project.taskManager.getTaskValue(s,u),d&&this.lAi.Epi(d))A=this.lAi.mapping.formatDuration(d);else if(d instanceof Date)A=new e.Formatter.GeneralFormatter(s.project.layout.barTextDateFormat).format(d);else{if(c(d))return;A="".concat(d)}(m=this.Yts(o,h)).vAlign=r.VerticalAlign.center,1!==(g=f.printZoomFactor||1)&&m.font&&(w=r.W.V(m.font,g),m.font=w.font),S=(O=v(p=(y=n.getTextWidthAndHeight(t,A,m.font))[0],T=y[1],a))[0],k=O[1],M=O[2],j=O[3],_=Object.assign({},f,{printZoomFactor:1}),l.call(i,t,A,S,k,M,j,m,_)}},n.prototype.paintLinkLines=function(t,n,i,e,s,u,o,h,a){var c,f,l,v,A;switch(void 0===a&&(a=1),n.layout.linkLineMode){case"toTop":this.lineLayout=new m;break;case"toEnd":this.lineLayout=new b;break;case"noLinks":return}for(c=new r.Rect(s,u,o,h),l=0,v=f=this.getLinkLines(e,c,a);l<v.length;l++)(A=v[l]).paint(t)},n.prototype.getLinkLines=function(t,n,i){var e,r,s,u,o,h;return void 0===i&&(i=1),(e=this.project.kmi(t))?(r=this.getLineData(e.startLines,"start",n,i),s=this.getLineData(e.crossLines,"cross",n,i),u=this.getLineData(e.endLines,"end",n,i),h=function(t,n){return t.data.from.viewIndex-n.data.from.viewIndex},(o=r.concat(s).concat(u)).sort(h),o):[]},n.prototype.getLineData=function(t,n,i,e){var r,s,u,o,h,a,c,l,v,d,b,m,g,w,y=this;for(void 0===e&&(e=1),r=function(t){return!y.project.host||y.project.host.getRowVisible(t.from.viewIndex)&&y.project.host.getRowVisible(t.to.viewIndex)},s=[],u=0,o=t;u<o.length;u++)a="SS"===(h=o[u]).type||"SF"===h.type,c="SS"===h.type||"FS"===h.type,l=this.layoutLinkEndInfo(a,h.from,i),v=this.layoutLinkEndInfo(c,h.to,i),r(h)&&l&&v&&this.lineLayout&&(d=this.scaleLinkEndLayout(l,e),b=this.scaleLinkEndLayout(v,e),m=this.lineLayout.getLinePoints(h.type,d,b,i,n),g=f(l.color,-.8),w=new A(m,g,h),"end"===n&&(w.endArrow=this.lineLayout.getArrowDirection(h.type,l,v)),s.push(w));return s},n.prototype.paintActionPending=function(t,n,i){if(void 0===i&&(i=1),"Link"===n.command){var e=n;this.paintActionGraph(t,e.getPendingFromTaskInfo(),i),this.paintActionLink(t,e.getPendingLinkInfo()),e.getPendingToTaskInfo()&&this.paintActionGraph(t,e.getPendingToTaskInfo(),i)}else this.paintActionGraph(t,n.getBarPendingInfo(),i)},n.prototype.paintActionGraph=function(t,n,i){var e,r;void 0===i&&(i=1),(e=this.getActionPendingBounds(n,i))&&(e.x-=1,e.y-=2,e.h+=2,e.w+=2,n.partName!==o.BarPartName.Middle&&n.partName!==o.BarPartName.Whole?(r=n.partName===o.BarPartName.Start?n.styleRule.style.taskbarStyle.startShape:n.styleRule.style.taskbarStyle.endShape,u.BarEndPainter.draw(t,r,"framed","#808080",e)):this.paintActionRect(t,e))},n.prototype.paintActionRect=function(t,n){n&&(t.lineWidth=1,t.strokeStyle="#808080",t.strokeRect(n.x,n.y,n.w,n.h))},n.prototype.paintActionLink=function(t,n){var i={x:n.startX,y:n.startY},e={x:i.x+n.movedX,y:i.y+n.movedY};t.beginPath(),t.lineWidth=1,t.strokeStyle="#808080",t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.closePath(),t.stroke()},n.prototype.getTaskRect=function(t,n,i){return this.layoutTaskCore(t,n,i.x,i.y).bounds},n.prototype.getOffsetX=function(t,n){return this.sheet.getCellRect(t,n).x},n.prototype.getOffsetY=function(t,n){return this.sheet.getCellRect(t,n).y},n}(w),n.GanttCellTypeRenderer=y,p=function(t){function n(n){return t.call(this,n)||this}return T(n,t),n.prototype.eO=function(n,i,e,s,u,o,h,a,c){var f,l,v,A,d,b,m,g,w,y,p;void 0===h&&(h=0),void 0===a&&(a=0),void 0===c&&(c=1),this.Mmi(i,e)?((A=null!==(f=null==(v=M(this.Mf.NMi,this.Mf))?void 0:v.backColor)&&void 0!==f?f:null===(l=this.Mf.getActualStyle(i[0].row,i[0].col,e))||void 0===l?void 0:l.backColor)&&(d=i[0].x,b=i[0].y,m=i[0].width,g=i[i.length-1].y+i[i.length-1].height-i[0].y,w=function(){n.fillRect(d,b,m,g)},r.W.setFillStyle(n,A,d,b,m,g,w)),p=(u||1)*(y=this.Mf.zoom()),this.paintNonworkingBackground(n,i[0].x,i[0].y,i[0].width,i[i.length-1].y+i[i.length-1].height-i[0].y,p),i.forEach((function(t){t.style&&(t.style.backColor=void 0)})),t.prototype.eO.call(this,n,i,e,s,u,o,h,a,c)):t.prototype.eO.call(this,n,i,e,s,u,o,h,a,c)},n.prototype.Mmi=function(t,n){var i=this.Mf.NMi;return 0!==t.length&&n===r.SheetArea.viewport&&t.filter((function(t){return t.col===i.getGanttColumnIndex()})).length===t.length},n.prototype.paintNonworkingBackground=function(t,n,i,e,s,o){var a,c,f,l,v,A,d,b,m,g,w,y,p,T;if(void 0===o&&(o=1),"None"!==(c=(a=this.Mf.NMi).project).timescale.nonWorkingTime.drawMode)for(f=c.timescale.currentDateUtc,(l=c.timescale.nonWorkingTime.color)&&(l=r.Pf.vl(this.Mf,l)),v=c.timescale.nonWorkingTime.pattern;d=(A=c.timescale.getDateUtcRange(f))[0],b=A[1],m=this.calcNonWorkDateLocation(n,d),g=this.calcNonWorkDateWidth(d,b),w=m-n,y=h.GanttZoomHelper.scalePosition(n,w,o),p=h.GanttZoomHelper.scaleDimension(g,o),!(y>=n+e);)c.timescale.nonWorkingTime.calendar.isNonWorkingArea(d,b)&&(T={x:y=Math.floor(y),y:i,w:p=Math.floor(y+p)-y,h:s},u.BarPainter.draw(t,v,l,T,!1)),f=b},n.prototype.calcNonWorkDateLocation=function(t,n){var i=this.Mf.NMi,e=i.project;return t+Math.floor(e.timescale.getOffsetByDateUtc(n))},n.prototype.calcNonWorkDateWidth=function(t,n){return this.calcNonWorkDateLocation(0,n)-this.calcNonWorkDateLocation(0,t)},n}(r.g7),n.GanttSheetRender=p,n.vAi=D,r.Worksheet.ch("GanttsheetRender",{dispose:function(t){var n=this;!1!==t.clearCache&&n.Dn&&(n.Dn.Mf=null,n.Dn=null)}})},3276:function(t,n,i){var e,r,s,u,o,h,a,c=this&&this.vJr||(f=function(t,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},f(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}f(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),f;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDateCellType=void 0,e=i(7234),r=i(1376),s=i(8869),u=new e.Common.ResourceManager(s.SR,"GanttSheet"),o=u.getResource.bind(u),h=function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sAi=i,r.rAi=e,r}return c(n,t),n.prototype.parse=function(n){var i,e,r,s,u=t.prototype.parse.call(this,n);if(u instanceof Date)if(0===u.getHours()&&0===u.getMinutes()&&0===u.getSeconds()&&0===u.getMilliseconds())try{i=this.sAi,e=n+" ".concat(i.hour,":").concat(i.minute),(r=t.prototype.parse.call(this,e))instanceof Date&&(u=r)}catch(t){}else 1899===u.getFullYear()&&11===u.getMonth()&&30===u.getDate()&&(s=this.rAi,u.setFullYear(s.getFullYear()),u.setMonth(s.getMonth()),u.setDate(s.getDate()));return u},n}(e.Formatter.GeneralFormatter),a=function(t){function n(n){var i=t.call(this)||this;return i.typeName="101",i.hAi=!!n,i}return c(n,t),Object.defineProperty(n.prototype,"forStartDate",{get:function(){return this.hAi},set:function(t){this.hAi=t},enumerable:!1,configurable:!0}),n.prototype.getDefaultTime=function(t){return this.hAi?{hour:8,minute:0}:{hour:17,minute:0}},n.prototype.getDefaultDate=function(t){return new Date},n.prototype.parse=function(t,n,i){var r,s,u,h,a="string"==typeof n?n:o().DEFAULT_DATE_TIME_FORMAT,c=new e.Formatter.GeneralFormatter(a),f=c.parse(t);if(f instanceof Date&&0===f.getHours()&&0===f.getMinutes()&&0===f.getSeconds()&&0===f.getMilliseconds())try{r=this.getDefaultTime(i),s=t+" ".concat(r.hour,":").concat(r.minute),(u=c.parse(s))instanceof Date&&(f=u)}catch(t){}else 1899===f.getFullYear()&&11===f.getMonth()&&30===f.getDate()&&(h=this.getDefaultDate(i),f.setFullYear(h.getFullYear()),f.setMonth(h.getMonth()),f.setDate(h.getDate()));return f},n.prototype.format=function(t,n,i,r){var s="string"==typeof n?n:o().DEFAULT_DATE_TIME_FORMAT,u=new e.Formatter.GeneralFormatter(s);return u.format(t)},n.prototype.je=function(t,n,i,e){var r=n.formatter,s="string"==typeof r?r:o().DEFAULT_DATE_TIME_FORMAT,u=this.getDefaultTime(e),a=this.getDefaultDate(e);return t.Ii=new h(s,u,a),this.format(i,s,null,e)},n}(r.CellTypes.Text),n.TaskDateCellType=a,r.CellTypes.ti[101]=a},3341:function(t,n,i){var e,r,s,u,o=this&&this.vJr||(h=function(t,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},h(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}h(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),h;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttFilterDialog=void 0,e=i(4036),r=i(5392),s=i(1114),u=function(t){function n(n,i,e,r){return t.call(this,n,i,e,r)||this}return o(n,t),n.prototype.Ust=function(n,i,e){var u,o,h,a=t.prototype.Ust.call(this,n,i,e);return this.sheet.NMi instanceof r.GanttSheet?(u=this.sheet,o=u.NMi,h=u.JS(this.filterButtonInfo.rowFilter.range),u.$go(-1,n)instanceof s.TaskSubjectCellType&&(this.dataSource.forEach((function(t,n){t.level=o.getRowState(h.row+n).level})),a.forEach((function(t,n){t.children[0].level=o.getRowState(h.row+n).level}))),a):a},n}(e.iut),n.GanttFilterDialog=u},3745:function(t,n){var i,e;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttOutline=void 0,i=void 0,e=function(){function t(t){this.lAi=t}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.getSheet()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.isRowCollapsed=function(t){return this.sheet.rowOutlines.isCollapsed(t)},t.prototype.initOutlineColumn=function(){var t,n=this.Kki();n>-1&&(t=this.sheet).outlineColumn.options({columnIndex:n,showImage:!0,maxLevel:10})},t.prototype.updateOutlineColumnModel=function(){var t,n,e,r,s,u,o,h=this.Kki();if(-1!==h){for(n=(t=this.lAi).Mf,e=this.project.count,(r=t.options.allowAddNew)&&n.getCell(e,h).textIndent(i),s=0;s<e;s++)o=(u=this.project.getTaskByRow(s))?u.level:i,n.getCell(s,h).textIndent(o);n.outlineColumn.refresh(),n.rowOutlines.A2t=null}},t.prototype.Kki=function(){var t,n,i,e=this.lAi,r=e.getDataView(),s=-1;if(r)for(t=r.getColumnInfos(),n=0;n<t.length;n++)if("TaskSubject"===(i=t[n]).dataType){s=n;break}return s},t.prototype.backupCollapsedState=function(){var t,n,i,e=!1,r=[],s=this.project.count,u=this.sheet;for(t=0;t<s;t++)(n=u.rowOutlines.getCollapsed(t))&&(e||(e=!0),r[i=this.project.getTaskByRow(t).taskNumber]=!0);if(e){for(t=0;t<s;t++)u.rowOutlines.setCollapsed(t,!1);this.tAe=r}},t.prototype.restoreCollapsedState=function(){var t,n,i,e=this.tAe;if(e){for(t=0;t<e.length;t++)e[t]&&(i=(n=this.project.getTask(t)).rowIndex,this.sheet.rowOutlines.setCollapsed(i,!0));this.tAe=null}},t}(),n.GanttOutline=e},4036:function(n){n.exports=t.Spread.Sheets.Filter},4448:function(t,n,i){var e,r,s,u,o,h,a,c=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.ValueHelper=n.GanttUtil=n.DefaultDateFormatter=void 0,e=i(7234),r=i(237),s=i(5392),u=e.Common.lt.ht,o=function(t){return isNaN(t.valueOf())},n.DefaultDateFormatter="yyyy/mm/dd hh:mm",h=function(){function t(){}return t.range=function(t,n){var i,e=new Array(n);for(i=0;i<n;i++)e[i]=t+i;return e},t.repeat=function(t,n){var i,e=new Array(n);for(i=0;i<n;i++)e[i]=t;return e},t.convertIndexToRange=function(t){var n,i,e,r,s,u=c([],t,!0);for(u.sort((function(t,n){return t-n})),n=[],i=null,e=0,r=u;e<r.length;e++)s=r[e],i&&s===i[0]+i[1]?i[1]++:(i=[s,1],n.push(i));return n},t.encodeHtml=function(t){if(!t)return"";var n=document.createElement("div");return n.innerText=t,n.innerHTML},t.fixPixelAlignment=function(t,n,i,e){return t%1==0&&(t+=.5),n%1==0&&(n+=.5),i%1!=0&&(i=Math.floor(i)),e%1!=0&&(e=Math.floor(e)),{x:t,y:n,w:i,h:e}},t.getSelectedTasks=function(t){var n,i,e,r,s=[],u=t.getSelections();for(n=0;n<u.length;n++)for(e=(i=u[n]).row;e<i.row+i.rowCount;e++)(r=t.getTaskByRow(e))&&s.push(r);return s},t.getSelectedTaskNumbers=function(t){var n,i,e,r,s=[],u=t.getSelections();for(n=0;n<u.length;n++)for(e=(i=u[n]).row;e<i.row+i.rowCount;e++)(r=t.getTaskByRow(e))&&s.push(r.taskNumber);return s},t.getSelectedRowIndexes=function(t){var n,i,e,r=[],s=t.getSelections();for(n=0;n<s.length;n++)for(e=(i=s[n]).row;e<i.row+i.rowCount;e++)r.push(e);return r},t.getGanttSheet=function(t){var n=t.getActiveSheetTab();if(n&&n instanceof s.GanttSheet)return n},t.uki=function(t){return/^\/OADate\(\d+(\.\d+)?\)\//.test(t)},t.traverseChildren=function(t,n){var i,e,r,s=t.children;if(s&&s.length>0)for(i=0,e=s;i<e.length;i++)r=e[i],n&&(n(r),this.traverseChildren(r,n))},t}(),n.GanttUtil=h,a=function(){function t(){}return t.parseBoolean=function(t,n){return"boolean"==typeof t?t:("string"==typeof t&&(t=this.parseStringEnumValues(t,["true","false"],[!0,!1])),n&&null==t?t:!!t)},t.formatBoolean=function(t){return t?"true":"false"},t.parseNumber=function(t,n){var i=NaN;if("string"==typeof t?i=n?parseInt(t,10):parseFloat(t):"number"==typeof t&&(i=t),!isNaN(i))return i},t.formatNumber=function(t){if("number"==typeof t){if(isNaN(t))return;return t.toString()}},t.parseDate=function(t,i,r){var s,u=null;if(t instanceof Date&&(u=t),"string"==typeof t&&(i||(i=n.DefaultDateFormatter),u=(s=new e.Formatter.GeneralFormatter(i,r)).parse(t)),u&&u instanceof Date&&!o(u))return u},t.formatDate=function(t,i,r){return!t||isNaN(t.valueOf())?null:(i||(i=n.DefaultDateFormatter),new e.Formatter.GeneralFormatter(i,r).format(t));var s},t.parseString=function(t){return"string"==typeof t?t:u(t)?"":"function"==typeof t.toString?t.toString():void 0},t.parseStringEnumValues=function(t,n,i){var e,r=this.parseString(t);if(!u(r))for(e=0;e<n.length;e++)if(r.toLowerCase()===n[e].toLowerCase())return(i||n)[e]},t.compareString=function(t,n,i){var e,r;return void 0===i&&(i=!0),e=this.parseString(t),r=this.parseString(n),i?e.toLowerCase()===r.toLowerCase():e===r},t.compareTaskDependency=function(t,n){var i,e,s,o,h,a,c,f,l,v,A,d="string"==typeof t?t:null,b="string"==typeof n?n:null,m=u(d)||0===d.length,g=u(b)||0===b.length;if(m)return g?0:-1;if(g)return 1;for(i=r.TaskDependency.parseText(d),e=r.TaskDependency.parseText(b),s=0;s<Math.max(i.length,e.length);s++){if(u(i[s]))return-1;if(u(e[s]))return 1;if(h=(o=i[s]).taskNumber,a=o.type,f=(c=e[s]).taskNumber,l=c.type,h!==f)return h-f;if((v="FS"===a?"":a)!==(A="FS"===l?"":l))return v<A?-1:1}return 0},t}(),n.ValueHelper=a},4627:function(t,n){var i,e,r,s,u,o,h,a,c,f;Object.defineProperty(n,"__esModule",{value:!0}),n.TimescaleUnit=n.TimescaleTierMode=n.DayOfWeek=n.GanttGridlineType=n.GanttSheetEvent=n.TasksChangeAction=n.ActionStatus=n.ScrollDirection=n.CursorStyle=n.BarPartName=n.GanttCommandNames=void 0,n.GanttCommandNames={GANTTSHEET_INSERT_TASK:"ganttSheetInsertTask",GANTTSHEET_INSERT_SUMMARY_TASK:"ganttSheetInsertSummaryTask",GANTTSHEET_INSERT_MILESTONE:"ganttSheetInsertMilestone",GANTTSHEET_DELETE_TASK:"ganttSheetDeleteTask",GANTTSHEET_TIMESCALE_PAGE_UP:"ganttSheetTimescalePageUp",GANTTSHEET_TIMESCALE_PAGE_DOWN:"ganttSheetTimescalePageDown",GANTTSHEET_TIMESCALE_BEGIN:"ganttSheetTimescaleBegin",GANTTSHEET_TIMESCALE_END:"ganttSheetTimescaleEnd",GANTTSHEET_TIMESCALE_LEFT:"ganttSheetTimescaleLeft",GANTTSHEET_TIMESCALE_RIGHT:"ganttSheetTimescaleRight",GANTTSHEET_TIMESCALE_ZOOM_IN:"ganttSheetTimescaleZoomIn",GANTTSHEET_TIMESCALE_ZOOM_OUT:"ganttSheetTimescaleZoomOut",GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER:"ganttSheetTimescaleZoomCustomer",GANTTSHEET_CHANGE_COMPLETE:"ganttSheetChangeComplete",GANTTSHEET_INDENT_TASKS:"ganttSheetIndentTasks",GANTTSHEET_OUTDENT_TASKS:"ganttSheetOutdentTasks",GANTTSHEET_LINK_TASKS:"ganttSheetLinkTasks",GANTTSHEET_UNLINK_TASKS:"ganttSheetUnLinkTasks",GANTTSHEET_CHANGE_TASK_MODE:"ganttSheetChangeTaskMode",GANTTSHEET_MOVE_TASK:"ganttSheetMoveTask",GANTTSHEET_SCROLL_TO_TASK:"ganttSheetScrollToTask"},function(t){t[t.Start=0]="Start",t[t.Middle=1]="Middle",t[t.End=2]="End",t[t.Whole=3]="Whole"}(i=n.BarPartName||(n.BarPartName={})),function(t){t[t.TaskDrag=0]="TaskDrag",t[t.LinkLine=1]="LinkLine",t[t.ProcessDrag=2]="ProcessDrag",t[t.LeftStretch=3]="LeftStretch",t[t.RightStretch=4]="RightStretch",t[t.Move=5]="Move",t[t.Default=6]="Default",t[t.Crosshair=7]="Crosshair"}(e=n.CursorStyle||(n.CursorStyle={})),function(t){t[t.Positive=1]="Positive",t[t.Negative=-1]="Negative"}(r=n.ScrollDirection||(n.ScrollDirection={})),function(t){t[t.NotStart=0]="NotStart",t[t.InProgress=1]="InProgress",t[t.Finish=2]="Finish"}(s=n.ActionStatus||(n.ActionStatus={})),function(t){t[t.Reset=0]="Reset",t[t.Insert=1]="Insert",t[t.Remove=2]="Remove",t[t.Move=3]="Move",t[t.Replace=4]="Replace",t[t.Level=5]="Level",t[t.Sort=6]="Sort",t[t.Update=7]="Update",t[t.Renumber=8]="Renumber"}(u=n.TasksChangeAction||(n.TasksChangeAction={})),function(t){t.Event_BarAction_Pending="Event_BarAction_Pending",t.Event_BarAction_End="Event_BarAction_End",t.Event_HoverOnBar="Event_HoverOnBar",t.Event_HoverOnLink="Event_HoverOnLink",t.Event_DataBindingError="Event_DataBindingError"}(o=n.GanttSheetEvent||(n.GanttSheetEvent={})),function(t){t[t.empty=0]="empty",t[t.thin=1]="thin",t[t.dashed=3]="dashed",t[t.dotted=4]="dotted",t[t.dashDot=9]="dashDot"}(h=n.GanttGridlineType||(n.GanttGridlineType={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(a=n.DayOfWeek||(n.DayOfWeek={})),function(t){t[t.middle=1]="middle",t[t.middleBottom=2]="middleBottom",t[t.topMiddleBottom=3]="topMiddleBottom"}(c=n.TimescaleTierMode||(n.TimescaleTierMode={})),function(t){t[t.years=1]="years",t[t.halfYears=2]="halfYears",t[t.quarters=3]="quarters",t[t.months=4]="months",t[t.thirdsOfMonth=5]="thirdsOfMonth",t[t.weeks=6]="weeks",t[t.days=7]="days",t[t.hours=8]="hours",t[t.minutes=9]="minutes"}(f=n.TimescaleUnit||(n.TimescaleUnit={}))},4755:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y=this&&this.vJr||(p=function(t,n){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},p(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}p(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),p;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttContextMenu=n.GanttContextMenuView=void 0,e=i(1376),r=i(8026),s=i(5392),u=i(8136),o=i(3018),h=i(5835),a=i(7234),c=a.Common.lt.ht,f={Timescale:function(t,n,i,e){return new RegExp("Timescale","i").test(t.workArea)&&i instanceof o.TimescaleCellType},GanttChart:function(t,n,i,e){var r=i instanceof u.TaskbarCellType&&c(h.BarActionBuilder.getBarHitInfo(e.NMi.project,i,n).task);return new RegExp("GanttChart","i").test(t.workArea)&&r},GanttBar:function(t,n,i,e){var r=i instanceof u.TaskbarCellType&&!c(h.BarActionBuilder.getBarHitInfo(e.NMi.project,i,n).task);return new RegExp("GanttBar","i").test(t.workArea)&&r},GanttField:function(t,n,i,r){return new RegExp("GanttField","i").test(t.workArea)&&n.sheetArea===e.SheetArea.viewport&&!(i instanceof u.TaskbarCellType)&&!(i instanceof o.TimescaleCellType)},GanttColHeader:function(t,n,i,r){return new RegExp("GanttColHeader","i").test(t.workArea)&&n.sheetArea===e.SheetArea.colHeader&&!(i instanceof o.TimescaleCellType)},GanttRowHeader:function(t,n,i,r){return new RegExp("GanttRowHeader","i").test(t.workArea)&&n.sheetArea===e.SheetArea.rowHeader}},l="gc.spread.",v="copy",A="cut",d="separator",b="ganttSheetPaste",m=e.GC$,g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return y(n,t),n.prototype.getCommandOptions=function(t,n,i){if(new RegExp("GanttBar","i").test(t.workArea))return t.commandOptions},n}(r.MenuView),n.GanttContextMenuView=g,w=function(t){function n(){var n,i=t.call(this)||this;return i.menuView=new g,n=[l+v,l+A,l+b],i.menuData.forEach((function(t,i){n.indexOf(t.name)>-1&&(t.workArea+="GanttColHeader",t.workArea+="GanttRowHeader",t.workArea+="GanttField")})),i}return y(n,t),n.prototype.xq=function(n,i,r){var u=(0,e.jf)(r);return u.NMi instanceof s.GanttSheet&&i.worksheetHitInfo?this.xAi(n,i,u):t.prototype.xq.call(this,n,i,r)},n.prototype.xAi=function(t,n,i){var e,r,s=i.$go(n.worksheetHitInfo.row,n.worksheetHitInfo.col,n.worksheetHitInfo.hitTestType);return s?(e={x:n.worksheetHitInfo.x,y:n.worksheetHitInfo.y,row:n.worksheetHitInfo.row,col:n.worksheetHitInfo.col,sheet:i,cellRect:n.worksheetHitInfo.cellTypeHitInfo?n.worksheetHitInfo.cellTypeHitInfo.cellRect:void 0,sheetArea:n.worksheetHitInfo.hitTestType},r=[],m.each(t,(function(t,n){for(var o in n.type===d&&r.push(n),f)f[o](n,e,s,i)&&("GanttBar"===o&&s instanceof u.TaskbarCellType&&(n.commandOptions=h.BarActionBuilder.getBarHitInfo(i.NMi.project,s,e).style),r.push(n))})),r):t},n.prototype.kk=function(n,i){var e,r,a=n.$go(i.row,i.col,i.hitTestType);if(!(a instanceof o.TimescaleCellType&&n.NMi instanceof s.GanttSheet))return a instanceof u.TaskbarCellType&&n.NMi instanceof s.GanttSheet?(e={x:i.x,y:i.y,row:i.row,col:i.col,sheet:n,cellRect:i.cellTypeHitInfo?i.cellTypeHitInfo.cellRect:void 0,sheetArea:i.hitTestType},void((r=!c(h.BarActionBuilder.getBarHitInfo(n.NMi.project,a,e).task))&&(n.clearSelection(),n.setActiveCell(e.row,e.col),n.addSelection(e.row,0,1,n.getColumnCount()-1)))):void t.prototype.kk.call(this,n,i)},n}(r.ContextMenu),n.GanttContextMenu=w,e.Workbook.ch("ganttcontextmenu",{setHost:function(){var t=this;t.contextMenu&&t.contextMenu instanceof w||(t.contextMenu=new w)}})},4792:function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ResourcesAssignment=void 0;var i=function(){function t(t){this.uAi=t,this.assignments=[],this.taskAssignments={}}return t.prototype.vAe=function(t){this.assignmentTable=t},t.prototype.pAe=function(){this.assignments=[]},t.prototype.yAe=function(){this.taskAssignments={}},t.prototype.mAe=function(){var t=this,n=this.assignmentTable.VRt();this.pAe(),this.yAe(),n.forEach((function(n){t.assignments.push(n);var i=t.taskAssignments[n.taskId];i?i.push(n.resourceId):t.taskAssignments[n.taskId]=[n.resourceId]}))},t.prototype.wAe=function(t){var n=this.uAi.host.getDataView(),i=n.gLt.primaryKey();return t.getDataValue(i)},t.prototype.updateTaskAssignment=function(t,n,i){var e=this,r=this.uAi.host,s=r.getDataView(),u=s.gLt,o=s.RJ(t),h=this.uAi.getTaskByRow(t+1),a=this.wAe(h),c=[];u.yRt(o,1,(function(){var t,s,o,h,f,l,v,A;for(r.suspendPaint(),t=e.assignmentTable,s=0;s<e.assignments.length;s++)(o=e.assignments[s]).taskId===a&&(e.assignments.splice(s,1),s--);for(h=0,f=n;h<f.length;h++)l=f[h],v=e.uAi.getResourcesByName(l),A={taskId:a,resourceId:v.id},c.push(v.id),t.insertItem(t.length(),A),e.assignments.push(A);e.taskAssignments[a]=c,u.DMo(i),r.resumePaint()}))},t.prototype.getResourcesCountByTaskNumber=function(t){var n,i,e=this.uAi.getTask(t);return e?(i=this.wAe(e),(null===(n=this.taskAssignments[i])||void 0===n?void 0:n.length)||0):0},t}();n.ResourcesAssignment=i},4924:function(t,n,i){var e,r,s;Object.defineProperty(n,"__esModule",{value:!0}),n.ResourcesManager=n.Resources=void 0,e=i(4792),r=function(){function t(t,n){this.name=t,this._data=n}return Object.defineProperty(t.prototype,"id",{get:function(){return this._data.id},enumerable:!1,configurable:!0}),t}(),n.Resources=r,s=function(){function t(t){this.uAi=t,this.resourcesAssignment=new e.ResourcesAssignment(this.uAi)}return t.prototype.vAe=function(t){this.resourcesAssignment.vAe(t)},t.prototype.gAe=function(t){this.resourcesTable=t},t.prototype.getResourcesByTaskId=function(t){var n;return null!==(n=this.resourcesAssignment.taskAssignments[t])&&void 0!==n?n:[]},t.prototype.getResourcesById=function(t){for(var n=0;n<this.resourcesList.length;n++)if(this.resourcesList[n].id===t)return this.resourcesList[n];return null},t.prototype.getResourcesByName=function(t){for(var n=0;n<this.resourcesList.length;n++)if(this.resourcesList[n].name===t)return this.resourcesList[n];return null},t.prototype.mAe=function(){this.resourcesAssignment.mAe()},t.prototype.bAe=function(){var t=this,n=this.resourcesTable.VRt();this.jAe(),n.forEach((function(n){var i=new r(n.name,n);t.resourcesList.push(i)}))},t.prototype.jAe=function(){this.resourcesList=[]},t.prototype.TAe=function(){var t=this;this.resourcesTable.fetch().then((function(){t.bAe()}))},t}(),n.ResourcesManager=s},4943:function(t,n){Object.defineProperty(n,"__esModule",{value:!0})},5085:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d;function b(t,n,i){var e,r,u,o,h,a=t.NMi;a instanceof s.GanttSheet&&(e=a.project,u=(r=a.fDi(i.col)).value,(o=r.dataType)&&(h=e.taskManager.getFieldByDataType(o))&&(u=h.name),r&&-1!==["start","finish"].indexOf(u)&&m(t,r,n)),g(t,n,i)}function m(t,n,i){var e,r,s=t.NMi,u=s.project,o=n.value,h=n.dataType;h&&(e=u.taskManager.getFieldByDataType(h))&&(o=e.name),n&&-1!==["start","finish"].indexOf(o)&&(r="start"===o?u.calendarSettings.defaultStartTime:u.calendarSettings.defaultFinishTime,i.setHours(r.hour,r.minute,0,0))}function g(t,n,i){var s,u,o,h,a=i.row,c=i.col,f=i.sheetArea,l=(new e.Common.CultureInfo).DateTimeFormat,v=new e.Formatter.GeneralFormatter(l.defaultDatePattern).format(n);t.getParent().commandManager().execute({cmd:"editCell",sheetName:t.name(),row:a,col:c,newValue:v,autoFormat:!0,sheetArea:f,isUndo:!1}),t.isEditing()&&t.ci===c&&t.ui===a&&(s=t.$go(a,c),u={sheet:t,row:a,col:c,sheetArea:r.SheetArea.viewport},o=t.Il(a,c,f),h=t.getCellRect(a,c),t.li.Li=n,s.updateEditor(t.li,o,h,u),s.setEditorValue(t.li,v,u))}function w(){var t=new r.Style;return t.cellType=new a.TaskSubjectCellType,t}function y(t,n){void 0===n&&(n=!0);var i=new r.Style;return t&&i.compose(t),i.cellType=new u.TaskDurationCellType(n),i.cellType.showButton=n,i}function p(t){var n=new r.Style;return t&&n.compose(t),n.cellButtons=[{imageType:r.ButtonImageType.dropdown,command:"openList",useButtonStyle:!1,visibility:r.ButtonVisibility.onSelected}],n.dropDowns=[{type:r.DropDownType.list,option:{items:[{text:"Manual",item:"Manual"},{text:"Auto",item:"Auto"}]}}],n}function T(t){var n=new r.Style;return t&&n.compose(t),(d(t)||d(t.formatter))&&(n.formatter="0%"),n.cellType=new l.TaskCompleteCellType,n}function O(t,n){var i,e=new r.Style;return t&&e.compose(t),(d(t)||d(t.formatter))&&(e.formatter=A().DEFAULT_DATE_TIME_FORMAT),e.cellButtons=[{imageType:r.ButtonImageType.dropdown,command:"openDateTimePicker",useButtonStyle:!1,visibility:r.ButtonVisibility.onSelected}],e.dropDowns=[{type:r.DropDownType.dateTimePicker,option:{showTime:!1,startDay:r.CalendarStartDay.sunday},submitCommand:b}],i=new c.TaskDateCellType(n),e.cellType=i,e}function S(t){var n=new r.Style;return t&&n.compose(t),n.cellButtons=[{imageType:r.ButtonImageType.dropdown,command:"OpenPredecessor",useButtonStyle:!1,visibility:r.ButtonVisibility.onSelected}],n.cellType=new o.TaskPredecessorCellType,n}function k(t){var n=new r.Style;return t&&n.compose(t),n.cellButtons=[{imageType:r.ButtonImageType.dropdown,command:"OpenResources",useButtonStyle:!1,visibility:r.ButtonVisibility.onSelected}],n.cellType=new h.TaskResourcesCellType,n}Object.defineProperty(n,"__esModule",{value:!0}),n.createStyleForResources=n.createStyleForPredecessors=n.createStyleForDateTime=n.createStyleForComplete=n.createStyleForMode=n.createStyleForDuration=n.createStyleForSubject=void 0,e=i(7234),r=i(1376),s=i(5392),u=i(9644),o=i(7335),h=i(179),a=i(1114),c=i(3276),f=i(8869),l=i(9103),v=new e.Common.ResourceManager(f.SR,"GanttSheet"),A=v.getResource.bind(v),d=e.Common.lt.ht,n.createStyleForSubject=w,n.createStyleForDuration=y,n.createStyleForMode=p,n.createStyleForComplete=T,n.createStyleForDateTime=O,n.createStyleForPredecessors=S,n.createStyleForResources=k},5366:function(t,n,i){var e,r,s,u,o,h,a,c,f,l=this&&this.vJr||(v=function(t,n){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},v(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}v(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),v;function A(t,n,i,e,r){var s,u=t.$go(n,i,r);if(u instanceof a){e&&t.Ut.do("setValueForKey",n,i,h,!0,r);try{s=t.getCellRect(n,i,r),t.repaint(s)}finally{e&&t.Ut.do("setValueForKey",n,i,h,void 0,r)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.NumberInputCellType=n.NumberInputCellHitInfo=void 0,e=i(1376),r=5,s=3,u=5,o=8,h="_leaveCell",a=function(t){function n(n){void 0===n&&(n=!0);var i=t.call(this)||this;return i.showButton=n,i.aAi="None",i.typeName="NumberInput",i}return l(n,t),n.prototype.paint=function(n,i,r,s,u,o,h,a){var c=this.isCurrentCellSelected(a.sheet,a.row,a.col),f=h.hAlign;c&&(h.hAlign=e.HorizontalAlign.left),t.prototype.paint.call(this,n,i,r,s,u,o,h,a),c&&this.showButton&&this.paintButtons(n,r,s,u,o,a),h.hAlign=f},n.prototype.isCurrentCellSelected=function(t,n,i){var e=t.Ut.getValueForKey(n,i,h);return t.getActiveRowIndex()===n&&t.getActiveColumnIndex()===i&&!0!==e},n.prototype.paintButtons=function(t,n,i,e,h,a){this.drawTriangleUp(t,n+e-o-r,i+(h-2*s-u)/2,r,s,a),this.drawTriangleDown(t,n+e-o-r,i+(h-2*s-u)/2+s+u,r,s,a)},n.prototype.drawTriangleUp=function(t,n,i,e,r,s){var u="Up"===this.aAi?"black":"gray";t.beginPath(),t.moveTo(n+e/2,i),t.lineTo(n,i+r),t.lineTo(n+e,i+r),t.lineTo(n+e/2,i),t.closePath(),t.strokeStyle=u,t.stroke(),t.fillStyle=u,t.fill()},n.prototype.drawTriangleDown=function(t,n,i,e,r,s){var u="Down"===this.aAi?"black":"gray";t.beginPath(),t.moveTo(n,i),t.lineTo(n+e/2,i+r),t.lineTo(n+e,i),t.lineTo(n,i),t.closePath(),t.strokeStyle=u,t.stroke(),t.fillStyle=u,t.fill()},n.prototype.getButtonHoveredByHitInfo=function(t){var n=t.cellRect,i=t.x,s=t.y,u=new e.Rect(n.x+n.width-o-r-1,n.y,r+2,n.height/2),h=new e.Rect(n.x+n.width-o-r-1,n.y+n.height/2,r+2,n.height/2);return t.sheet.getActiveRowIndex()===t.row&&t.sheet.getActiveColumnIndex()===t.col&&this.showButton?u.contains(i,s)?"Up":h.contains(i,s)?"Down":"None":"None"},n.prototype.refreshButtonHoverEffect=function(t,n,i){(this.aAi!==n||this.fAi&&this.fAi!==i)&&(this.aAi=n,"None"===this.aAi&&this.fAi?(t.repaint(this.fAi),delete this.fAi):(t.repaint(i),this.fAi=i))},n.prototype.getHitInfo=function(t,n,i,r,s){var u,o;if(s&&(null==(u=s.sheetArea)||3===u))return(o={x:t,y:n,row:s.row,col:s.col,cellRect:r,sheetArea:e.SheetArea.viewport,isReservedLocation:!1,sheet:s.sheet,cellStyle:i,isReservedOnButton:"None"}).isReservedOnButton=this.getButtonHoveredByHitInfo(o),o},n.prototype.processMouseMove=function(n){if(n){var i=n.cellRect;return this.refreshButtonHoverEffect(n.sheet,n.isReservedOnButton,i),t.prototype.processMouseMove.call(this,n)}},n.prototype.getChangedValue=function(t){},n.prototype.processMouseDown=function(n){if(n&&n.row===n.sheet.getActiveRowIndex()&&n.col===n.sheet.getActiveColumnIndex()&&"None"!==n.isReservedOnButton){var i=this.getChangedValue(n);return n.sheet.setValue(n.row,n.col,i),t.prototype.processMouseDown.call(this,n)}},n.prototype.processMouseLeave=function(t){return this.refreshButtonHoverEffect(t.sheet,t.isReservedOnButton,t.cellRect),!1},n.prototype.getAutoFitWidth=function(n,i,e,s,u){var h;return t.prototype.getAutoFitWidth.call(this,n,i,e,s,u)+r+2*o},n.prototype.getAutoFitHeight=function(n,i,e,r,o){var h=t.prototype.getAutoFitHeight.call(this,n,i,e,r,o);return Math.max(h,s+3*u)},n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.NumberInputCellType=a,c=function(){function t(){this.isReservedOnButton="None"}return t}(),n.NumberInputCellHitInfo=c,f="numberInputCellType",e.Worksheet.ch(f,{setHost:function(){var t=this;t.bind(e.Events.EnterCell+"."+f,(function(n,i){A(t,i.row,i.col,!1,i.sheetArea)})),t.bind(e.Events.LeaveCell+"."+f,(function(n,i){A(t,i.row,i.col,!0,i.sheetArea)})),t.bind(e.Events.TopRowChanged+"."+f,(function(n,i){A(t,i.row,i.col,!0,i.sheetArea)}))},dispose:function(t){var n=this;n.unbind(e.Events.EnterCell+"."+f),n.unbind(e.Events.LeaveCell+"."+f),n.unbind(e.Events.TopRowChanged+"."+f)}})},5392:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S,k,M,j,_,D,x,E,F,C,N,R,I=this&&this.vJr||(U=function(t,n){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},U(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}U(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),U;function B(t,n){return n?r.Pf.vl(t,n):n}function L(t){return"number"==typeof t}function P(t){return"string"==typeof t}function H(t,n){var i,e;if(n)return e=""===t,(i=x(t))&&!x(n.showNullAs)?""+n.showNullAs:e&&!x(n.showEmptyAs)?""+n.showEmptyAs:void 0}function G(t,n,i,e){t[n]||(t[n]={}),t[n][i]||(t[n][i]={}),t[n][i].style=e}function W(t){var n=t.style;return n&&(n.cellType||n.cellButtons||n.dropDowns)?{cellType:n.cellType,cellButtons:n.cellButtons,dropDowns:n.dropDowns,formatter:n.formatter}:null}function Q(t,n){n&&t&&(n.cellType&&(t.cellType=n.cellType),n.cellButtons&&(t.cellButtons=n.cellButtons),n.dropDowns&&(t.dropDowns=n.dropDowns),n.formatter&&(t.formatter=n.formatter))}function V(t){var n=t.floatingObjects;n&&(t.floatingObjects=n.filter((function(t){return!t.isGanttChart})),0===t.floatingObjects.length&&delete t.floatingObjects)}function Y(t){var n,i=t.style;if(i&&i.cellType)switch(n=i.cellType.typeName){case"TaskComplete":i.cellType.typeName="100";break;case"TaskDate":i.cellType.typeName="101";break;case"TaskDuration":i.cellType.typeName="102";break;case"TaskPredecessor":i.cellType.typeName="103";break;case"TaskResources":i.cellType.typeName="104";break;case"TaskSubject":i.cellType.typeName="105";break;case"Taskbar":i.cellType.typeName="106";break;case"Timescale":i.cellType.typeName="107"}}function K(){var t="GanttSheet"+R._ID;return R._ID++,t}function z(t){for(var n=K(),i=0;i<t.length;)t[i].name()!==n?i++:(n=K(),i=0);return n}Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheet=void 0,e=i(7234),r=i(1376),s=i(4036),u=i(9409),o=i(1264),h=i(3220),a=i(3341),c=i(3745),f=i(8698),l=i(649),v=i(5085),A=i(9663),d=i(2749),b=i(3151),m=i(2187),g=i(7350),w=i(3018),y=i(8136),p=i(4627),T=i(1805),O=i(8724),S=i(8869),k=i(3099),M=i(4448),j=new e.Common.ResourceManager(S.SR,"GanttSheet"),_=j.getResource.bind(j),D="start",x=e.Common.lt.ht,E=e.Common.lt._h,F="_ganttColumn",C=e.Common.lt.tv,N=e.Common.ct.W0,R=function(t){function n(n,i,e){var s=t.call(this,n,i,e)||this;return s._gi=r.SheetType.ganttSheet,s.Ake=[],s.Kts=!1,s.IOProps=["project","gridlines","taskbarColumn"],s.xmi=function(t){return s.Dmi(t)},s}return I(n,t),n.prototype.getDataView=function(){var n=t.prototype.getDataView.call(this);return n||(this.gp()&&this.ans?this.ans:void 0)},n.prototype.afterAddViewColumn=function(){var t,n,i,e=this.getDataView(),r=null===(t=null==e?void 0:e.getColumnInfos)||void 0===t?void 0:t.call(e),s=null!==(n=null==r?void 0:r.findIndex((function(t){return t.value===F})))&&void 0!==n?n:-1;e&&r&&s>=0&&s!==r.length-1&&(i=r.splice(s,1)[0],r.push(i),e.setColumnInfos(r,!0,!0),this.refreshBindColumns()),this.Emi()},n.prototype.reloadTasks=function(){this.suspendPaint(),this.Emi(),this.resumePaint()},n.prototype.refreshMapping=function(){var t=this.getDataView();t&&(this.Kts=!0,this.setDataView(t),this.Kts=!1)},n.prototype.Hc=function(n,i){this.suspendPaint(),t.prototype.Hc.call(this,n,i),this.options.alternatingRowOptions||(this.options.alternatingRowOptions={step:[1,1],style:[]}),this.Cmi(),this.applyTableTheme(),(0,b.$Ai)(this),n&&(this.Gki=null,this.Emi()),this.resumePaint()},n.prototype.iki=function(){return this.Mf.options},n.prototype.Ob=function(n,i,e){var r,s;"allowAddNew"===n?!0===i&&!1===e?t.prototype.CNi.call(this):!1===i&&!0===e&&t.prototype.rTi.call(this):"enableGanttColumn"===n?(r=this.getDataView())&&(!0===i&&!1===e?this.bindGanttView(r):!1===i&&!0===e&&(this.removeGanttColumn(r),this.bindGanttView(r))):"sheetTabColor"===n&&(s=this.getParent(),x(s.getHost())||s.AC(!1))},Object.defineProperty(n.prototype,"rowStyleSelector",{get:function(){return this.xmi},set:function(t){this.xmi=t,this.project.Rmi.invoke()},enumerable:!1,configurable:!0}),n.prototype.adrs=function(){var t=this.name(),n=this.getParent();n.suspendPaint(),n.removeSheetTab(t),n.setActiveSheetIndex(0),n.resumePaint()},n.prototype.getActiveTask=function(){var t=this.getActiveRowIndex();return this.getTaskByRow(t)},n.prototype.getTaskByRow=function(t){if(-1===t)return null;var n=this.project.getRowState(t);return n?n.task:null},n.prototype.getTaskNumberByRow=function(t){return this.project.getRowState(t).taskNumber},n.prototype.getDefaultOptions=function(){return{enableGanttColumn:!0,allowAddNew:!0,sheetTabColor:void 0}},n.prototype.Tki=function(t){var n=this.project.count+(this.options.allowAddNew?1:0);t?this.Mf.setRowCount(n):this.lNi(n)},n.prototype.resumePaint=function(){this.Mf.resumePaint()},n.prototype.GNi=function(t,n){var i,e,s,u=this.Mf;this.project.clearBackupTasks(),this.project.suspendDirty(),this.suspendPaint(),e=(i=u.getRowCount())-1,s=u.getColumnCount(),u.Ut.clear(0,0,e,s,r.StorageType.data,[]),u.clearPendingChanges({row:0,col:0,rowCount:e,colCount:s,clearType:r.ClearPendingChangeType.dirty|r.ClearPendingChangeType.insert|r.ClearPendingChangeType.delete}),n&&this.EDi(),this.Emi(),this.project.resumeDirty(),this.nAe(),this.resumePaint()},n.prototype.ENi=function(t){var n;t&&t.data&&(this.suspendPaint(),this.dke(t.data),this.resumePaint()),this.Mf.repaint()},n.prototype.dke=function(t){var n,i,e,r,s,u,o,h,a,c,f,l,v,A=this.getDataView().gLt.primaryKey();if(A&&(n="parentId",i=this.getDataView(),e=this.Vts(i)))for(r=0,s=t;r<s.length;r++)if(o=(u=s[r])[A],L(h=u[e])&&(a=this.project.getTask(h))&&(a.setDataValue(A,o),(c=a.Fpi())&&c.length>0))for(f=0,l=c;f<l.length;f++)(v=l[f]).setDataValue(n,o)},n.prototype.FM=function(){this.Mf.FM()},n.prototype.Fmi=function(){this.Mf.repaint()},n.prototype.L0=function(n,i){this.ans=null,t.prototype.L0.call(this,n,i),this.Nmi=null},n.prototype.gp=function(){var t=!1,n=this.Mf;return n&&n.parent&&(t=!!n.parent.Gie),t},n.prototype.fDi=function(t){var n,i,e=this.Mf,r=e.getDataSource();return r?t>=(i=r.getColumnInfos()).length?null:i[t]:(n=this.gp())&&this.Bmi?this.Bmi[t]:null},n.prototype.Zts=function(n,i,e){e.ganttChart||t.prototype.Zts.call(this,n,i,e)},n.prototype.Xts=function(n,i,e){var r=W(e),s=t.prototype.Xts.call(this,n,i,e);return Q(s,r),s},n.prototype.aAe=function(t,n){var i=this.iAe(t),e=this.getDataView(),r=e.getRowData(i);return r?r[n]:void 0},n.prototype.setSelection=function(t,n,i,e){this.Mf.setSelection(t,n,i,e)},n.prototype.getActiveRowIndex=function(){return this.Mf.getActiveRowIndex()},n.prototype.oAe=function(t){var n=this.options;t.options={enableGanttColumn:n.enableGanttColumn}},n.prototype.hAe=function(t){var n=null==t?void 0:t.options;n&&(x(n.enableGanttColumn)||(this.options.enableGanttColumn=n.enableGanttColumn))},n.prototype.$ts=function(t){return!!t&&(!(0!==t.taskNumber&&!t.isSummary)||t.getBarStyleRules().some((function(t){var n,i=null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.gridStyle;return!(!i||void 0===i.font&&void 0===i.color&&void 0===i.backColor&&void 0===i.textDecoration)})));var n},n.prototype.tns=function(t,n){var i,e,s,u,o,h;return!(!t||!n)&&(s=!1,u=this.Hts(),0===t.taskNumber?(n.font="bold normal 12pt ".concat(u),s=!0):t.isSummary&&(n.font="bold normal 11pt ".concat(u),s=!0),(o=t.getBarStyleRules()).length>0&&(h=null===(e=null===(i=o[0])||void 0===i?void 0:i.style)||void 0===e?void 0:e.gridStyle)&&(h.font&&(n.font=r.Pf.ml(this.Mf,h.font),s=!0),h.color&&(n.foreColor=r.Pf.vl(this.Mf,h.color),s=!0),h.backColor&&(n.backColor=r.Pf.vl(this.Mf,h.backColor),s=!0),h.textDecoration&&(n.textDecoration=h.textDecoration,s=!0)),s)},n.prototype.rns=function(){var t=this.getGanttColumnIndex();t>-1&&(this.taskbarColumn.width=this.Mf.Do(t))},n.prototype.nns=function(t){var n,i,e,s,u,o,h,a,c,f,l,v,A,d=null==t?void 0:t.data;if(d)for(e=d.dataTable||(d.dataTable={}),u=(s=this.Mf).getRowCount(),o=s.getColumnCount(),h=this.getGanttColumnIndex(),a=0;a<u;a++)if(c=this.getTaskByRow(a),this.$ts(c))for(f=0;f<o;f++)f!==h&&(l=new r.Style,(v=null===(i=null===(n=e[a])||void 0===n?void 0:n[f])||void 0===i?void 0:i.style)&&l.fromJSON(v,!1,null),this.tns(c,l)&&(A=l.toJSON(),E(A)||G(e,a,f,A)))},n.prototype.toJSON=function(n){var i,e,s,u,o,h,a,c,f,l,v,A,b,m,w,y,T,O,S=n&&n.gp,k=n&&n.includeBindingSource,M=(null==n?void 0:n.cb)===r.OpenSaveFileType.excel,j=this.getGanttColumnIndex(),_=j>-1,D=this.Mf.getColumnWidth(j);if(S&&_&&(s=this.project.timescale.tierMode===p.TimescaleTierMode.middle?this.project.timescale.middleTier:this.project.timescale.bottomTier,i=this.project.layout.roundBarsToWholeDays,s.unit!==p.TimescaleUnit.hours&&s.unit!==p.TimescaleUnit.minutes||(this.project.layout.roundBarsToWholeDays=!1),e=this.Dts(this.project.root),this.Mf.setColumnWidth(j,e.width),this.Mf.frozenTrailingColumnCount(0),n.includeBindingSource=!1),u=t.prototype.toJSON.call(this,n),M&&this.nns(u),S&&_&&(this.Mf.setColumnWidth(j,D),this.Mf.frozenTrailingColumnCount(1),n.includeBindingSource=k),this.rns(),o=d.GanttSheetJsonConverter.toJSON(this,this.IOProps),this.oAe(o),u.sheetType=this._gi,u.gantt=o,_&&(h=this.getGanttChartPicture(this.name()),u.floatingObjects||(u.floatingObjects=[]),(a=h.toJSON()).isGanttChart=!0,u.floatingObjects.push(a)),S){for(c=this.getDataView(),f=x(c)?0:c.length(),l=[],v=[],A=x(c)?[]:c.getColumnInfos(),b=0;b<f;b++)l[b]=c.getRowData(b),c.isHierarchy()&&(m=c.getHierarchyNode(b),v.push({id:m.id,parentId:m.parentId,level:m.level}));w=0,l.length>0&&c.isHierarchy()&&(w=(y=c.getHierarchyRootNode()).level),u.gantt.dataViewForPrint={data:l,columns:A,hierarchyNodes:v,rootLevel:w}}return S&&_&&(T=g.Calendar.utcToLocal(e.startUtc),O=g.Calendar.utcToLocal(e.endUtc),u.gantt.Ets=T.valueOf(),u.gantt.Fts=O.valueOf(),void 0!==i&&(this.project.layout.roundBarsToWholeDays=i)),u},n.prototype.fromJSON=function(n,i,e,r,s){var u,o,h,a,c=r&&r.gp;this.suspendEvent(),this.suspendPaint(),this.project.suspendSchedule(),this.hAe(n.gantt),d.GanttSheetJsonConverter.fromJSON(this,n.gantt,this.IOProps),t.prototype.fromJSON.call(this,n,i,e,r,s),c&&((u=n.gantt.dataViewForPrint)&&(this.Emi(u),this.Bmi=u.columns),n.gantt.Ets&&n.gantt.Fts&&(o=new Date(n.gantt.Ets),h=new Date(n.gantt.Fts),a=g.Calendar.localToUTC(o),this.project.timescale.minDate=o,this.project.timescale.maxDate=h,this.project.timescale.update(a))),this.project.resumeSchedule(),!c&&this.project.root&&this.project.root.start&&this.project.timescale.scrollTo(this.project.root.start),this.resumeEvent(),this.resumePaint()},n.prototype.getGanttChartPicture=function(t){var n,i,e,s,u,o,h,a,c,f,l,v,A,d,b,m,y,p,T,S,k,M,j,_,D,x,E,F,C,N,R,I,U,B,L,P;if(this.zki=!0,i=(n=this.Mf).Dn,s=(e=this.project).timescale,u=this.getGanttColumnIndex(),h=(o=n.yw(2)[0]).x,a=n.getColumnCount(),c=e.count,f=s.currentDate,l=n.Tb,v=n.ly,n.Tb=0,n.ly=0,A=s.minDate,d=s.maxDate,b=s.currentDateUtc,m=this.Dts(e.root),y=g.Calendar.utcToLocal(m.startUtc),p=g.Calendar.utcToLocal(m.endUtc),s.minDate=y,s.maxDate=p,s.update(m.startUtc),T=m.width,M=(S=(0,w.getTimescaleHeight)(e.timescale.tierMode,n.zoom()))+(k=this.Zki()),(j=this.Nmi)||((j=document.createElement("canvas")).style.width=T+"px",j.style.height=M+"px",j.width=T,j.height=M,r.Bf.Wl(j,this.getParent(),n),r.Bf.$l(j,T,M),this.Nmi=j),(_=j.getContext("2d")).fillStyle="white",_.fillRect(0,0,j.width,j.height),_.translate(-h,0),i.Y7(_,2,void 0,!0,1),i.W7(_,1,2,void 0,!0,1),D=new O.Picture("".concat(t,"_Chart"),j.toDataURL("jpg")),F=x=u,C=E=0,N=0,R=0,I=c+1,U=0,B=a,L=T-n.getColumnWidth(u),P=n.defaults.colWidth,L>=0)for(;;){if(F=B,(L-=P)<0){C=L;break}B++}else F++,C=L;return D.startColumn(x),D.startColumnOffset(E),D.endColumn(F),D.endColumnOffset(C),D.startRow(N),D.startRowOffset(R),D.endRow(I),D.endRowOffset(U),_.translate(h,0),n.Tb=l,n.ly=v,s.minDate=A,s.maxDate=d,s.update(b),s.scrollTo(f),this.zki=!1,D},n.prototype.Imi=function(t){var n,i,e,s=this.Mf,u=s.getRowHeight(t),o=this.gp();return o&&(i=(n=s.printInfo()).bestFitRows())&&(u=(e=r.mt.e0(t,s,r.SheetArea.viewport,r.AutoFitType.cellWithHeader))<=0?s.defaults.rowHeight:e),u},n.prototype.wAi=function(){var t=this.lki,n=this.project;return t.getProjectLength(n.root)},n.prototype.Dts=function(t){var n=this.project,i=n.timescale,e=this.project.timescale.tierMode===p.TimescaleTierMode.middle?this.project.timescale.middleTier:this.project.timescale.bottomTier,r=t.startDisplayed,s=t.finishDisplayed,u=g.Calendar.localToUTC(r),o=i.getDateUtcRange(u,e.unit,e.count),h=o[0],a=g.Calendar.localToUTC(s),c=i.getDateUtcRange(a,e.unit,e.count),f=c[1],l=i.getOffsetByDateUtc(f)-i.getOffsetByDateUtc(h);return{width:Math.max(l,1),startUtc:h,endUtc:f}},n.prototype.Zki=function(){var t,n=this.project.count,i=0;for(t=0;t<n;t++)i+=this.Imi(t);return i},n.prototype.wh=function(n,i,e){var r,s=t.prototype.wh.call(this,n,i,e);return this.rns(),r=d.GanttSheetJsonConverter.toJSON(this,this.IOProps),this.oAe(r),s.lossless.gantt=r,s.lossless.sheetType=this._gi,s},n.prototype.yh=function(n,i,e,r){var s,u;this.suspendPaint(),this.suspendEvent(),this.project.suspendSchedule(),(s=n.lossless)&&(u=s.gantt,this.hAe(u),d.GanttSheetJsonConverter.fromJSON(this,u,this.IOProps)),t.prototype.yh.call(this,n,i,e,r),this.project.resumeSchedule(),this.project.root&&this.project.root.start&&this.project.timescale.scrollTo(this.project.root.start),this.resumeEvent(),this.resumePaint()},n.prototype.restoreView=function(n,i){t.prototype.restoreView.call(this,n,i),i&&this.bindGanttView(n)},n.prototype.Cmi=function(){var t=this.iki(),n=this.project?this.project.timescale.autoFitMode:"none",i=this.project?this.project.timescale.margin:0;this.project=new m.Project(this.name()),"none"!==n&&(this.project.timescale.autoFitMode=n),i>0&&(this.project.timescale.margin=i),this.lki=new h.GanttCellTypeRenderer(this),this.project.host=this,this.taskbarColumn=new A.TaskbarColumn(this.project),this.outline=new c.GanttOutline(this),this.gridlines=new T.GanttGridlines(this),this.uiOptions=new l.GanttUIOptions(this.project),this.mapping=new o.GanttMapping(this.project),t.allowCellOverflow=!1,t.reversalTrailingResizeOrder=!0,t.clipBoardOptions=1,this.Mf.showRowOutline(!1),this.Umi(),this.V5t(),this.setDefaultRowHeight(this.lki.getBarStyleRowHeight()),this.project.Lmi.attach(this.Pmi,this),this.project.Hmi.attach(this.Ymi,this),this.project.VAi.attach(this.Fmi,this),this.project.Rmi.attach(this.Qmi,this),this.project.Wmi.attach(this.Gmi,this),this.project.Vmi.attach(this.Umi,this),this.taskbarColumn.propertyChanged.attach(this.jki,this)},n.prototype.Emi=function(t){var n,i,e,r,s,u,o,h,a,c,f;if(t)n=t.columns,i=t.data.length,e=t,this.yki(n);else{if(!(r=this.getDataView()))return;i=r.length(),n=r.getColumnInfos(),e=r}for(s=[],u=0;u<i;u++)o=void 0,o=t?e.data[u]:e.getRowData(u),this.Gki||(this.Gki=o),h=this.Kmi(o,n),a=void 0,e.isHierarchy&&e.isHierarchy()?a=e.getHierarchyNode(u):e.hierarchyNodes&&(a=e.hierarchyNodes[u]),a&&(h.id=a.id,h.parentId=a.parentId,h.level=a.level),s.push(h);c=0,s.length>0&&(e.isHierarchy&&e.isHierarchy()?(f=e.getHierarchyRootNode())&&(c=f.level):L(e.rootLevel)&&(c=e.rootLevel)),this.project.loadTasksInternal(s,c),this.Qki()},n.prototype.Qki=function(){this.project.taskView.Wki&&(this.project.taskView.Yki(),delete this.project.taskView.Wki)},n.prototype.yki=function(t){var n,i,e,r,s,u,o,h,a,c,f,l,v,A,d;for(n=t||(i=this.getDataView())&&i.getColumnInfos(),e=this.project.taskManager,r=0;r<n.length;r++)(s=n[r]).ganttChart||(u=s.value,(o=s.dataType)&&(u=(h=this.project.taskManager.getFieldByDataType(o))?h.name:u),a=s.isPrimaryKey,c=this.mapping.getDefaultMapping(u),f=null,l=null,"function"==typeof s.convert?f=s.convert:c&&(f=c[2]),"function"==typeof s.convertBack?l=s.convertBack:c&&(l=c[3]),d={name:u,convert:f,convertBack:l,isPrimaryKey:a,enabled:!0,readonly:v=s.readonly},(A=e.getField(u))&&void 0===v&&void 0!==A.readonly&&(d.readonly=A.readonly),e.addField(d))},n.prototype.Gmo=function(t){var n;return this.getTaskNumberByRow(t)-1},n.prototype.iAe=function(t){return t.taskNumber-1},n.prototype.eAe=function(t,n){var i,e=t.fields,r=t.ascendingStates,s=[],u=function(t){var n=e[t],i=r[t],u=function(t,i,e){"duration"===n.name?((P(t)||L(t))&&(t=g.DurationHelper.parse(t)),(P(i)||L(i))&&(i=g.DurationHelper.parse(i))):"start"!==n.name&&"finish"!==n.name||(P(t)&&(t=M.ValueHelper.parseDate(t)),P(i)&&(i=M.ValueHelper.parseDate(i)));var r=k.GanttSortService.compareValueWithField(t,i,n);if(0!==r)return e?r:-r};s.push({field:n.name,ascending:i,compare:u})};for(i=0;i<e.length;i++)u(i);s.length>0&&n.sort(s)},n.prototype.Mki=function(t,n,i){var e=this;t&&t.length>0?n.removeItems(t,(function(t){var n,r,s,u,o=t.removedItems;if(o&&o.length>0)for(n=0;n<o.length;n++)s=(r=o[n]).index,u=r.count,e.ZNi(s,u);i(!0)})):i(!0)},n.prototype._ki=function(t,n,i){var e,r=this;t&&t.length>0?((e=0===n.length())&&!this.Gki&&(this.Gki=t[0].data),n.insertItems(t,(function(t){var n=t.row,e=t.addedCount;r.mNi(n,e),i(!0)}),(function(){return i(!1)}))):i(!0)},n.prototype.xki=function(t,n){var i,e,r,s;if(t&&t.length>0)for(i=0;i<t.length;i++)r=(e=t[i]).row,(s=e.level)>0?n.demoteHierarchyLevel(r):s<0&&n.promoteHierarchyLevel(r)},n.prototype.Dki=function(t,n,i,e,r){var s,u,o,h,a,c,f,l;if(r&&e&&e.length>0&&(u=i.Vp,e.length===u.length&&(t=this.aki(e,u))),t&&t.length>0)for(o=0;o<t.length;o++)if(h=t[o])for(c=0,f=a=Object.keys(h);c<f.length;c++)(l=f[c])!==this.fAe||x(h[l])?n.updateItem(o,((s={})[l]=h[l],s)):this.project.resourcesManager.resourcesAssignment.updateTaskAssignment(o,h[l],this.fAe)},n.prototype.Xmi=function(t,n,i){var e,r,s,u,o=this,h=this.project,a=this.getDataView();return n.action===p.TasksChangeAction.Renumber&&this.eAe(n.sortInfos,a),e=t.updated,r=t.inserted,s=t.deleted,u=t.levels,new Promise((function(t){o.Mki(s,a,t)})).then((function(){return new Promise((function(t){o._ki(r,a,t)}))})).then((function(){return o.xki(u,a),o.Dki(e,a,h,i,null==n?void 0:n.needReschedule),Promise.resolve()}))},n.prototype.Kmi=function(t,n){var i,e,r,s,u,o,h,a,c={};for(i=0;i<n.length;i++)e=n[i].value,r=n[i].dataType,s=this.project.taskManager.getField(e),r&&(s=(u=this.project.taskManager.getFieldByDataType(r))||s),s&&(o=s.convert,h=t[e],o&&(h=o(h)),a=e,e!==s.name&&(a=s.name),c[a]=h);return c},n.prototype.getRowState=function(t){return this.project.getRowState(t)},n.prototype.evaluateCalcColumnFormula=function(t,n){var i=this.getDataView(),e=i.gLt.POt,r=e.getCalcService(),s=r.parse(e,n,0,0);return e.pe(t),r.evaluateExpression(e,s,{row:t,col:0})},n.prototype.Qmi=function(){var t,n,i;for(this.suspendPaint(),t=this.getRowCount(),n=this.lki.getBarStyleRowHeight(),i=0;i<t;i++)Math.abs(this.Mf._o(i)-this.Mf.defaults.rowHeight)<.1&&this.$mi(i,n);this.Mf.defaults.rowHeight=n,this.resumePaint()},n.prototype.$mi=function(t,n,i){var e=this.lki.getBarStyleRowHeight();i===r.SheetArea.viewport&&n<e*this.zoom()&&(n=e*this.zoom()),this.Mf.setRowHeight(t,n,i)},n.prototype.getRowVisible=function(t){return this.Mf.getRowVisible(t)},n.prototype.Dmi=function(t){var n,i,e=new r.Style;return this.hl&&(n=this.hl.wholeTableStyle())&&e.h5(n),i=this.Hts(),t&&0===t.taskNumber?e.font="bold normal 12pt ".concat(i):t&&t.isSummary?e.font="bold normal 11pt ".concat(i):e.font="normal normal 11pt ".concat(i),e},n.prototype.Hts=function(){var t,n;if(this.hl){if((t=this.hl.wholeTableStyle())&&t.fontFamily)return t.fontFamily;if(t&&t.font&&(n=t.font.split(" ")).length>=4)return n.slice(3).join(" ")}return this.currentTheme().bodyFont()},n.prototype.Gmi=function(){var t,n,i,e,s,u,o;this.suspendPaint(),(t=this.getGanttColumnIndex())>-1&&(e=(i=(n=this.project.timescale).ons()).startDateUtc,s=i.maxCurrentDateUtc,u=g.Calendar.diffDaysUtc(e,s)*n.pixelPerDay+this.getTaskbarAreaVisibleSize(),o=g.Calendar.diffDaysUtc(e,n.currentDateUtc)*n.pixelPerDay,this.Mf.setColumnScrollWidth(t,u),this.Mf.setColumnScrollOffsetX(t,-o),this.Mf.setCellType(0,t,n.MAi,r.SheetArea.colHeader)),this.resumePaint()},n.prototype.uns=function(){var t,n,i;this.gp()||(null===(n=null===(t=this.project)||void 0===t?void 0:t.timescale)||void 0===n||n.clampCurrentDateToRange(),this.Gmi(),null===(i=this.getParent())||void 0===i||i.WC())},n.prototype.getGanttColumnIndex=function(){var t,n,i,e,r=-1,s=this.gp();if(s){if(t=this.Bmi)for(n=t.length-1;n>=0;n--)if((i=t[n]).ganttChart){r=n;break}}else if(e=this.getDataView())for(t=e.getColumnInfos(),n=0;n<t.length;n++)if((i=t[n]).ganttChart){r=n;break}return r},n.prototype.getTaskbarAreaVisibleSize=function(){return this.Mf.Do(this.getGanttColumnIndex())},n.prototype.Umi=function(){this.$mi(0,(0,w.getTimescaleHeight)(this.project.timescale.tierMode,this.zoom()),r.SheetArea.colHeader)},n.prototype.Tts=function(){return(0,w.getTimescaleHeight)(this.project.timescale.tierMode,this.zoom())},n.prototype.onBarColumnScroll=function(t){var n,i,e=this.Mf,s=this.project.timescale,u=t.newValue,o=t.scrollEventType,h=s.ons().startDateUtc;switch(o){case r.Zi.smallDecrement:e.Qy().execute({cmd:p.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT,sheetName:this.name()});break;case r.Zi.smallIncrement:e.Qy().execute({cmd:p.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT,sheetName:this.name()});break;case r.Zi.largeDecrement:e.Qy().execute({cmd:p.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP,sheetName:this.name()});break;case r.Zi.largeIncrement:e.Qy().execute({cmd:p.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN,sheetName:this.name()});break;case r.Zi.thumbTrack:n=u/s.pixelPerDay,i=new Date(h.valueOf()+n*g.Calendar.millisecondsPerDay),s.update(i)}t.newValue=g.Calendar.diffDaysUtc(h,s.currentDateUtc)*s.pixelPerDay},n.prototype.Gts=function(t){var n,i,e,s,u,o,a,c,f,l,v,A,d,b,m,g=(0,h.Lts)(this,this.Mf);return g?(c=null===(n=this.options)||void 0===n?void 0:n.alternatingRowOptions)&&c.style?(f=c.step||[1,1],(A=(l=x(f[0])?1:f[0])+(v=x(f[1])?1:f[1]))<=0?g:(b=(d=t%A)<l?c.style[0]:c.style[1])?((m=new r.Style).h5(b),m.h5(g),m.backColor&&"string"==typeof m.backColor&&(m.backColor=r.Pf.vl(this.Mf,m.backColor)),m.foreColor&&"string"==typeof m.foreColor&&(m.foreColor=r.Pf.vl(this.Mf,m.foreColor)),(null===(i=m.borderLeft)||void 0===i?void 0:i.color)&&"string"==typeof m.borderLeft.color&&(m.borderLeft.color=r.Pf.vl(this.Mf,m.borderLeft.color)),(null===(e=m.borderTop)||void 0===e?void 0:e.color)&&"string"==typeof m.borderTop.color&&(m.borderTop.color=r.Pf.vl(this.Mf,m.borderTop.color)),(null===(s=m.borderRight)||void 0===s?void 0:s.color)&&"string"==typeof m.borderRight.color&&(m.borderRight.color=r.Pf.vl(this.Mf,m.borderRight.color)),(null===(u=m.borderBottom)||void 0===u?void 0:u.color)&&"string"==typeof m.borderBottom.color&&(m.borderBottom.color=r.Pf.vl(this.Mf,m.borderBottom.color)),(null===(o=m.borderVertical)||void 0===o?void 0:o.color)&&"string"==typeof m.borderVertical.color&&(m.borderVertical.color=r.Pf.vl(this.Mf,m.borderVertical.color)),(null===(a=m.borderHorizontal)||void 0===a?void 0:a.color)&&"string"==typeof m.borderHorizontal.color&&(m.borderHorizontal.color=r.Pf.vl(this.Mf,m.borderHorizontal.color)),m):g):g:null},n.prototype.Wts=function(t){var n=this.Gts(t);if(n)return(0,h.Pts)(n,"horizontal")},n.prototype.qts=function(t,n){var i,e=t.lineColor,r=t.lineType,s=t.intervalLineColor,u=t.intervalLineType,o=r!==p.GanttGridlineType.empty&&(!e||"transparent"===e),h=u!==p.GanttGridlineType.empty&&(!s||"transparent"===s);return(o||h)&&(i=this.Wts(n)),o&&(e=i||"transparent"),h&&(s=i||"transparent"),r===p.GanttGridlineType.empty&&(e="transparent",r=p.GanttGridlineType.thin),u===p.GanttGridlineType.empty&&(s="transparent",u=p.GanttGridlineType.thin),{lineColor:e=B(this.Mf,e),lineType:r,intervalLineColor:s=B(this.Mf,s),intervalLineType:u}},n.prototype.mergeGanttTaskbarColumnStyle=function(t,n){var i,e,s,u,o,h,a,c;this.gridlines.ganttRows&&(i=this.gridlines.ganttRows,s=(e=this.qts(i,t)).lineColor,u=e.lineType,o=e.intervalLineColor,h=e.intervalLineType,a=new r.LineBorder(s,u),n.borderTop=n.borderBottom=a,!x(h)&&t>0&&i.interval&&(c=this.Mf.eP().visibleIndex[t],a=new r.LineBorder(o,h),(c+1)%i.interval===0?n.borderBottom=a:c%i.interval===0&&(n.borderTop=a)))},n.prototype.margeGanttFieldColumnStyle=function(t,n,i){var e,s,u,o,h;if(this.rowStyleSelector){if(!(e=this.project.getTaskByRow(t)))return;(s=this.rowStyleSelector(e))&&(i.h5(s),s.font&&(i.font=r.Pf.ml(this.Mf,s.font)),(u=e.getBarStyleRules()).length>0&&(o=u[0].style)&&o.gridStyle&&((h=o.gridStyle).font&&(i.font=r.Pf.ml(this.Mf,h.font)),h.color&&(i.foreColor=r.Pf.vl(this.Mf,h.color)),h.backColor&&(i.backColor=r.Pf.vl(this.Mf,h.backColor)),h.textDecoration&&(i.textDecoration=h.textDecoration)))}},n.prototype.V5t=function(){var t,n=this,i=this.Mf,e=new s.HideRowFilter(new r.Range(-1,-1,-1,-1));i.rowFilter(e),e.filterDialogVisibleInfo({sortByValue:!0,sortByColor:!1,filterByColor:!1,filterByValue:!0,listFilterArea:!0}),e.filterButtonVisible(!0),e.openFilterDialog=function(t){var n=new a.GanttFilterDialog(i.parent.j2(),i,t,e.filterDialogVisibleInfo());i.Cut=n,n.rQ()},t=e.Act,e.Act=function(r,s,u){var o,h=i.loading,a=n.getDataView();return h&&a&&delete i.loading,o=t.call(e,r,s,u),h&&(i.loading=!0),o}},n.prototype.suspendAll=function(){var t=this.getParent();t&&t.suspendPaint&&t.resumePaint?t.suspendPaint():this.suspendPaint(),this.Mf.suspendCalcService(!1),this.suspendEvent()},n.prototype.resumeAll=function(){this.Mf.IB.isFiltered()&&this.Mf.IB.reFilter(),this.resumeEvent(),this.Mf.resumeCalcService(!0);var t=this.getParent();t&&t.suspendPaint&&t.resumePaint?t.resumePaint():this.resumePaint()},n.prototype.sAe=function(t){t.rAe=!0,t.autoSort=!1},n.prototype.lAe=function(t){var n,i=this.project.resourcesManager,e=this.dAe(t);e&&(n=this.AAe(e),i.vAe(e),i.gAe(n),n&&i.bAe(),i.mAe())},n.prototype.dAe=function(t){var n,i,e,r,s=t.gLt.ltt();for(i=0,e=s;i<e.length;i++)if("taskId"===(r=e[i]).targetField){n=r.targetTable;break}return n},n.prototype.AAe=function(t){return t.tBt("resourceId")},n.prototype.resetNewView=function(t,n,i){var e=this.getDataView();e&&(this.suspendPaint(),this.setDataView(e),this.resumePaint())},n.prototype.beforeSetDataView=function(t){if(t){this.sAe(t),this.lAe(t),this.setCellTypeToColumn(t);var n=this.getGanttColumnIndex();this.options.enableGanttColumn&&-1===n&&this.addGanttColumn(t)}},n.prototype.beforeSubmitChanges=function(){var t=this.project.resourcesManager.resourcesAssignment.assignmentTable;t&&t.submitChanges()},n.prototype.beforeCancelChanges=function(){var t=this.project.resourcesManager.resourcesAssignment.assignmentTable;t&&t.cancelChanges()},n.prototype.afterSetDataView=function(){this.outline.initOutlineColumn(),this.ski(),this._pi(),this.Gmi(),this.Emi()},n.prototype.Ski=function(t){var n=this.Mf;t&&(n.setColumnCount(t.getColumnInfos().length),this.Tki(!0))},n.prototype.bindGanttView=function(n,i){var e,r,s,u,o,h;if(i)for(e=0,r=Object.keys(this.options);e<r.length;e++)void 0!==(u=i[s=r[e]])&&(this.options[s]=i[s]);this.project.uyi.suspend(),i&&i.defaultMode&&(this.project.uyi.defaultMode=i.defaultMode),t.prototype.setDataView.call(this,n),(o=this.Vts(n))&&n.JFt([{field:o,ascending:!0}]),this.project.taskView.fyi&&(h=this.project.taskView.fyi,this.project.sort(h.fields.map((function(t){return t.name})),h.ascendingStates,h.keepStructure)),this.project.uyi.resume()},n.prototype.Vts=function(t){var n,i,e,r=t.getColumnInfos();for(n=0,i=r;n<i.length;n++)if("TaskNumber"===(e=i[n]).dataType)return e.value;return r.some((function(t){return"taskNumber"===t.value}))?"taskNumber":void 0},n.prototype.ski=function(){var t=this.getGanttColumnIndex();t>-1?(this.Mf.frozenTrailingColumnCount(1),this.Mf.setColumnWidth(t,this.taskbarColumn.width?this.taskbarColumn.width:"*")):this.Mf.frozenTrailingColumnCount(0)},n.prototype.Epi=function(t){return t.hasOwnProperty("value")&&t.hasOwnProperty("unit")&&t.hasOwnProperty("time")},n.prototype.getFilterButtonVisibleFromColumnInfo=function(t,n,i){var e,r=n[t],s=!1!==r.allowSort||!1!==r.allowFilterByValue||!1!==r.allowFilterByList;return x(r.allowSort)&&x(r.allowFilterByValue)&&x(r.allowFilterByList)&&(!(e=i.getValue(0,t))||"object"!=typeof e||N(e)||this.Epi(e)||(s=!1)),t===this.getGanttColumnIndex()&&(s=!1),s},n.prototype.setCellTypeToColumn=function(t){var n=this,i=t.getColumnInfos();i&&i.forEach((function(t){switch(Y(t),t.dataType){case"TaskStartDate":t.style=(0,v.createStyleForDateTime)(t.style,!0);break;case"TaskFinishDate":t.style=(0,v.createStyleForDateTime)(t.style,!1);break;case"TaskDuration":t.style=(0,v.createStyleForDuration)(t.style);break;case"TaskMode":t.style=(0,v.createStyleForMode)(t.style);break;case"TaskComplete":t.style=(0,v.createStyleForComplete)(t.style);break;case"TaskPredecessor":t.style=(0,v.createStyleForPredecessors)(t.style);break;case"TaskResources":n.fAe=t.value,t.style=(0,v.createStyleForResources)(t.style)}if("workTime"===t.value&&(t.style=(0,v.createStyleForDuration)(t.style,!1)),!t.dataType)switch(t.value){case"start":case"finish":t.style=(0,v.createStyleForDateTime)(t.style,t.value===D);break;case"duration":t.style=(0,v.createStyleForDuration)(t.style);break;case"name":t.dataType="TaskSubject";break;case"mode":t.style=(0,v.createStyleForMode)(t.style);break;case"complete":t.style=(0,v.createStyleForComplete)(t.style);break;case"predecessors":case"successors":t.style=(0,v.createStyleForPredecessors)(t.style)}}))},n.prototype.addGanttColumn=function(t){if(t.getColumn(t.getColumn().length-1).value!==F){var n={value:F,width:"*",ganttChart:!0,style:this.addTaskbarCellType(),headerStyle:this.addTimescaleCellType()};t.addColumn(n)}},n.prototype.removeGanttColumn=function(t){t.removeColumn(F)},n.prototype.addTaskbarCellType=function(){var t=new r.Style;return t.cellType=new y.TaskbarCellType,t},n.prototype.addTimescaleCellType=function(){var t=new r.Style;return t.cellType=new w.TimescaleCellType,t},n.prototype.onHorizontalDockScroll=function(t,n){var i;this.getGanttColumnIndex()===this.Mf.getDockScrollbarAttachedIndex()?this.onBarColumnScroll(n):this.Mf.onHorizontalDockScroll(t,n)},n.prototype.pM=function(t){this.Mf.pM(t),this._pi()},n.prototype._pi=function(){var t=this.getGanttColumnIndex();t>-1?this.Mf.setDockScrollbarAttachedIndex(t):this.Mf.setDockScrollbarAttachedIndex(null)},n.prototype.tts=function(t){var n,i;return-1===t?t:(n=this.getTaskByRow(t))?(i=this.project.Pki(n))?-1:this.iAe(n):-1},n.prototype.jDi=function(n){var i=this.tts(n);return-1!==i&&t.prototype.jDi.call(this,i)},n.prototype.vDi=function(n){var i=this.tts(n);return-1!==i&&t.prototype.vDi.call(this,i)},n.prototype.CDi=function(n,i){var e=this.tts(n);if(-1!==e)return t.prototype.CDi.call(this,e,i)},n.prototype.ODi=function(n){var i=this.tts(n);if(-1!==i)return t.prototype.ODi.call(this,i)},n.prototype._Ni=function(t,n){if(this.qNi(n)){var i=this.getRowState(t);if(!x(i))return i.level}return 0},n.prototype.qNi=function(t){var n,i=this,e=i.getDataView();return!x(e)&&((n=e.getColumn(t))&&"TaskSubject"===n.dataType)},n.prototype.ZNi=function(t,n){var i=this;i.suspendPaint(),i.KDi(t,n),i.nAe(),i.resumePaint()},n.prototype.mNi=function(t,n){var i=this;x(n)||(i.suspendPaint(),i.Mf.addRows(t,n),i.refreshStyleRuleCache(),i.nAe(),i.resumePaint())},n.prototype.togglePinnedRows=function(i){return this instanceof n?-1:t.prototype.togglePinnedRows.call(this,i)},n.prototype.isAlternatingRowStyleColumn=function(t){return t!==this.getGanttColumnIndex()},n.prototype.leV=function(){if(this instanceof n){var t=this.Mf;t.rt=new f.GanttSheetEventHandler(t),t.Dn=new h.GanttSheetRender(t),t.fg&&t.parent&&t.hg(t.parent._vp),this.applyTableTheme(),this.project&&this.Umi()}},n.prototype.Rpi=function(t,n){var i,e,r,s,u,o,h=this.getRowState(t).task,a=this.fDi(n);return a&&(e=a.value,r=a.dataType,s=this.project.taskManager.getField(e),r&&(s=(u=this.project.taskManager.getFieldByDataType(r))||s),s&&(i=this.project.taskManager.getTaskValue(h,s.name),o=s.convertBack,"duration"===s.name&&(i=this.project.formatDuration(i)),"function"==typeof o?i=o(i):"duration"===s.name?i=this.Uki(i,!0):"start"!==s.name&&"finish"!==s.name||(i=this.Hki(i)))),i},n.prototype.nAe=function(){var t=this.outline;t&&(t.updateOutlineColumnModel(),t.restoreCollapsedState())},n.prototype.vke=function(){return this.Ake.length>0},n.prototype.gke=function(t,n,i){this.Ake.push({recordsChanges:t,change:n,backupTasks:i})},n.prototype.bke=function(){var t=this.Ake[0],n=t.recordsChanges,i=t.change,e=t.backupTasks;this.mke(n,i,e)},n.prototype.pke=function(){return this.Ake.shift()},n.prototype.Pmi=function(t){var n=t.needReschedule,i=this.project.isSuspendDirty();!n||i||this.Kts||this.project.backupTasksForSchedule(t.action),t.action===p.TasksChangeAction.Sort&&this.outline.backupCollapsedState(),this.suspendAll()},n.prototype.Ymi=function(t){var n,i,e;if(t.action===p.TasksChangeAction.Reset&&this.Tki(!0),n=this.getDataView(),this.Kts||t.noChange||!n)return this.Kts&&this.nAe(),void this.resumeAll();i=this.hki(t),e=this.project.getBackupTasks(),this.vke()?this.gke(i,t,e):(this.gke(i,t,e),this.bke())},n.prototype.mke=function(t,n,i){var e=this;this.Xmi(t,n,i).finally((function(){e.Mf.xT||(e.nAe(),e.resumeAll(),e.pke(),e.vke()&&e.bke())}))},n.prototype.jki=function(t,n){var i=this.getGanttColumnIndex();-1!==i&&("width"===n?this.Mf.setColumnWidth(i,this.taskbarColumn.width):"_taskbarCellType"===n&&(this.Mf.setCellType(-1,i,t._Ai,r.SheetArea.viewport),this.Qmi()))},n.prototype.hki=function(t){var n,i,e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,T,O,S,k,M,j,_,D=this.project,E=t.action,F=t.changedItems,R=t.needReschedule,I={updated:[],inserted:[],deleted:[],levels:[]};if(E===p.TasksChangeAction.Update)n=void 0,i=void 0,R||(i=(n=F).map((function(t){var n=t.taskNumber;return D.getTask(n)}))),e=this.aki(n,i),I.updated=e;else if(E===p.TasksChangeAction.Insert)for(s=(r=this.getDataView()).getColumnInfos(),u=0,o=F;u<o.length;u++){for(h=o[u],a=C(h.getData()),c=0,f=s;c<f.length;c++)v=(l=f[c]).value,(A=l.dataType)&&(d=D.taskManager.getFieldByDataType(A))&&(a[v]=a[d.name]);b=this.Gki,m=this.lke("duration","TaskDuration"),g=this.lke("start","TaskStartDate"),w=this.lke("finish","TaskFinishDate"),y=a.duration&&b&&(P(b)||L(m))||x(b),T=N(a.start)&&"Manual"===h.mode&&(b&&P(g)||x(b)),O=N(a.finish)&&"Manual"===h.mode&&(b&&P(w)||x(b)),y&&(a.duration=this.Uki(a.duration)),T&&(a.start=this.Hki(a.start)),O&&(a.finish=this.Hki(a.finish)),S=this.uAe(h,a),I.inserted.push(S)}else if(E===p.TasksChangeAction.Remove)for(k=F.length;k>=0;k--)(h=F[k])&&(M=this.iAe(h),I.deleted.push(M));else if(E===p.TasksChangeAction.Level)for(k=0;k<F.length;k++)(j=F[k])&&(h=j.task,_=j.delta,I.levels.push({row:this.iAe(h),level:_}));return I},n.prototype.uAe=function(t,n){var i,e,r,s=this.project,u=s.taskView,o=this.outline,h=t.taskNumber,a=u.findPreviousTask(h),c=u.findNextTask(h,!0),f={row:this.iAe(t),isAfter:!1,data:n};if(!a)return f;if(!c){for(i=a,e=void 0;o.isRowCollapsed(u.tokens[i.taskNumber].viewIndex);){if(s.Pki(i.parent)){e=i;break}i=i.parent}return f.row=e?this.iAe(e):this.iAe(i),f.isAfter=!0,f}return(r=!o.isRowCollapsed(u.tokens[a.taskNumber].viewIndex))&&!a.isSummary&&(f.row=this.iAe(a),f.isAfter=!0),f},n.prototype.aki=function(t,n){var i,e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S,M=this.project,j=this.getDataView(),_=[];if(!j)return _;if(t)for(i=t.length,e=j.getColumnInfos(),r=this.project.taskManager,s=0;s<i;s++)if(u=t[s],(o=n[s])!==M.root&&(i!==M.count||0!==s)){if(h=void 0,u&&o)for(a=0,c=e;a<c.length;a++)(f=c[a]).ganttChart||(l=f.value,v=f.dataType,j.FPt(l)&&"TaskResources"!==v||(A=r.getField(l),v&&(A=(d=M.taskManager.getFieldByDataType(v))||A),"level"!==A.name&&"parentId"!==A.name&&"id"!==A.name&&"children"!==A.name&&"workTime"!==A.name&&("Auto"!==o.mode||"start"!==A.name&&"finish"!==A.name)&&(b=void 0,g=0,g=typeof(b="predecessors"===A.name||"successors"===A.name?u.getDataValue(A.name):r.getTaskValue(u,A))!=typeof(m=r.getTaskValue(o,A))?1:k.GanttSortService.compareValueWithField(b,m,A),(w=("start"===A.name||"finish"===A.name)&&"Auto"===u.mode&&"Manual"===o.mode)&&(g=1),0!==g&&(h||(h={}),(y=this.Gki)&&(p=this.lke("duration","TaskDuration"),T=this.lke("start","TaskStartDate"),O=this.lke("finish","TaskFinishDate"),"duration"===A.name&&(P(p)||L(p))?m=this.Uki(m):("start"===A.name&&(P(T)||x(T))&&N(m)||"finish"===A.name&&(P(O)||x(O))&&N(m))&&(m=this.Hki(m))),h[l]=m))));h&&(_[S=this.iAe(o)]=h)}return _},n.prototype.Uki=function(t,n){var i,e,r,s,u,o;return x(t)?null:(i=this.Gki,e=t,r=!1,n||(s=g.DurationHelper.default(),u=this.lke("duration","TaskDuration"),i&&!x(u)&&(P(o=u)?s=g.DurationHelper.parseText(u):L(o)&&(r=!0),s.unit&&(e=g.DurationHelper.normalize({time:t.time,unit:s.unit})))),e=r?e.value:g.DurationHelper.format(e))},n.prototype.lke=function(t,n){var i,e,r,s=this.Gki,u=this.getDataView(),o=u.getColumnInfos();for(i=0,e=o;i<e.length;i++)if((r=e[i]).value===t||r.dataType===n)return s[r.value];return null},n.prototype.Hki=function(t){return M.ValueHelper.formatDate(t)},n.prototype.paintTaskbar=function(t,n,i){h.GanttCellTypeRenderer.paintTaskbar(t,this.Mf,n,i)},n.prototype.getTextWidthAndHeight=function(t,n,i){return h.GanttCellTypeRenderer.getTextWidthAndHeight(t,n,i)},n.prototype.refreshBindColumns=function(){t.prototype.refreshBindColumns.call(this),this.yki()},n}(u.TableSheet),n.GanttSheet=R,r.Workbook.ch("ganttSheet",{adlc:function(t){var n,i=t.flg,e=t.checkRs,r=t.m,s=t.d,u=t.nl,o=t.fn,h="G",a=["eet","anttSh"],c=this.gtwm||this.parent&&this.parent.gtwm;i&&-1===i.indexOf(h.toUpperCase()+a[1]+a[0])?(e.wm=e.wm||[],(n=c&&c(r,s,!0))&&e.wm.push(n),e.nwm=!0,e.state||(e.state=[]),e.state.push([h.toLocaleLowerCase()+"te",0]),e.dis||(e.dis=[]),e.dis.push("67616e74745368656574"),this.parent&&o&&o(this,e.dis,"ad")):-1===r&&(e.wm=e.wm||[],(n=c&&c(r,s,!1))&&e.wm.push(n),e.nwm=!0)},preFromJson:function(t,n,i){var e,s,u,o,h,a;if(R._ID=1,!(e=i&&i.cb===r.OpenSaveFileType.excel)&&(s=t.sheetTabs))for(u=0,o=Object.keys(s);u<o.length;u++)(a=s[h=o[u]]).sheetType===r.SheetType.ganttSheet&&V(a)},createSheetTab:function(t){var n=this.ls;(!n||0!==n.gte||!n.hl&&n.b)&&t.type===r.SheetType.ganttSheet&&(t.name||(t.name=z(this.mp)),t.sheetTab=new R(t.name))},preFromSJSFormat:function(t,n,i){R._ID=1},getAdditionalWorksheetToSJSFormat:function(t){var n,i,e;if(t.fileType===r.OpenSaveFileType.excel)for(n=0,i=this.mp;n<i.length;n++)(e=i[n])._gi===r.SheetType.ganttSheet&&t.sheets.push(e.getSheet())}}),r.Worksheet.ch("ganttSheet",{onRowColInfoChanged:function(t){var n,i=this.NMi;i instanceof R&&!i.gp()&&t.sheetArea===r.SheetArea.viewport&&"width"===t.propertyName&&t.col===i.getGanttColumnIndex()&&(n=this.Do(t.col),i.taskbarColumn.width!==n&&(i.taskbarColumn.width=n),i.uns())},afterPrintAttachContext:function(t){var n,i,e,s=this.NMi;s&&s._gi===r.SheetType.ganttSheet&&s.gp()&&(e=null===(n=null==(i=t.originWorkbook)?void 0:i.getSheetTab)||void 0===n?void 0:n.call(i,s.name()),s.ans=null==e?void 0:e.getDataView())}}),r.Y8.ch("ganttSheet",{priority:7001,isValid:function(){return this.Mf.NMi&&this.Mf.NMi instanceof R},getValue:function(t){var n,i,e,s,u,o,h,a,c,f,l,v,A=t.sheetArea,d=t.row,b=t.col,m=t.valueType,g=this.Mf,w=g.NMi;if(w&&w instanceof R)return(n=w.gp())&&A===r.SheetArea.colHeader&&1===g.getRowCount(r.SheetArea.colHeader)&&(i=w.Bmi)&&i[b]?(e=i[b].caption||i[b].value,t.value=e,void(t.isValueGet=!0)):A===r.SheetArea.rowHeader&&0===b?(t.value=w.getRowState(d).taskNumber,void(t.isValueGet=!0)):void(void 0!==A&&A!==r.SheetArea.viewport||(s=w.getRowState(d).task,(u=w.fDi(b))?(o=u.value,h=u.dataType,e=void 0,"taskNumber"===o||"TaskNumber"===h?e=w.getRowState(d).taskNumber:"="===o[0]?e=s?w.aAe(s,o):void 0:s&&(c=(a=w.project).taskManager.getField(o),h&&(c=(f=a.taskManager.getFieldByDataType(h))||c),c&&(e=a.taskManager.getTaskValue(s,c.name),l=c.convertBack,m===r.ValueType.richText&&"duration"===c.name&&(e=a.formatDuration(e)),"function"==typeof l&&(e=l(e)))),v=n?H(e,u):void 0,t.value=x(v)?e:v,t.isValueGet=!0):b===w.getGanttColumnIndex()&&(t.value=s,t.isValueGet=!0)))},setValue:function(t){var n,i,e,s,u,o,h,a,c,f=t.sheetArea,l=t.row,v=t.col,A=t.value,d=this.Mf,b=d.NMi;if(b&&b instanceof R&&(void 0===f||f===r.SheetArea.viewport)){if(n=b.project,t.isValueSet=!0,i=b.getRowState(l).task,n.Pki(i))return;if(e=b.fDi(v)){if(e.readonly)return;return s=e.value,u=e.dataType,o=n.taskManager.getField(s),u&&(o=(h=n.taskManager.getFieldByDataType(u))||o),M.GanttUtil.uki(A)&&(A=r.util.V0(A)),void(i?n.taskManager.setTaskValue(i,o,A,!0):!i&&l>=n.count&&(a=n.addTasks()).length>0&&(c=a[0],n.taskManager.setTaskValue(c,o,A,!0)))}}}}),r.GC$.extend(r.Workbook.prototype,{gtwm:function(t,n,i){return i?[_().wmk1,0]:-1===t?i?[_().wmk1,0]:[_().wmk2,1]:void 0}}),r.GC$.extend(r.Worksheet.prototype,{gtwm:function(t,n,i){return i?[_().wmk1,0]:-1===t?i?[_().wmk1,0]:[_().wmk2,1]:void 0}})},5770:function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wmk2=n.wmk1=void 0,n.wmk1=["757256","1879fe"],n.wmk2=["757256","1879fe"]},5835:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S,k,M,j,_,D,x,E,F,C,N=this&&this.vJr||(R=function(t,n){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},R(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}R(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),R;function I(t){return!(0,d.kts)(t.name)||["task","manualTask","durationOnly"].indexOf(t.name)>-1}function U(t){return"startOnly"===t.name}function B(t){return"finishOnly"===t.name}function L(t){return["milestone","manualMilestone","startOnlyMilestone","finishOnlyMilestone","durationOnlyMilestone"].indexOf(t.name)>-1}function P(t){return"progress"===t.name||"manualProgress"===t.name}Object.defineProperty(n,"__esModule",{value:!0}),n.ActionPendingInfo=n.BarActionBuilder=n.BarNewAction=n.BarLinkAction=n.ProgressStretchAction=n.BarStartStretchAction=n.BarStretchAction=n.BarMoveAction=n.BarAction=void 0,e=i(7234),r=i(1376),s=i(5392),u=i(3220),o=i(3065),h=i(7350),a=i(6324),c=i(237),f=i(6985),l=i(8136),v=i(4627),A=i(8869),d=i(5909),b=e.Common.lt.ht,m=new e.Common.ResourceManager(A.SR,"GanttSheet"),g=m.getResource.bind(m),w=e.Common.zf,y=8,p=r.GC$,T=function(){function t(){this.scrollingDistanceCache=0,this.scrollInterval=100,this.Qyi=!0}return t.prototype.start=function(t){var n=this;this.direction=t,this.Qyi=!1,this.timer=window.setInterval((function(){n.scrolling()}),this.scrollInterval)},t.prototype.scrolling=function(){},t.prototype.stop=function(){this.timer&&(window.clearInterval(this.timer),delete this.timer),this.Qyi=!0},t.prototype.isStopped=function(){return this.Qyi},t.prototype.getScrollDistance=function(){return this.scrollingDistanceCache},t}(),O=function(t){function n(n){var i=t.call(this)||this;return i.hyi=n,i}return N(n,t),n.prototype.scrolling=function(){var t,n=this.hyi.currentDateUtc;this.hyi.scrollOneTick(this.direction===v.ScrollDirection.Positive),t=-this.hyi.getOffsetByDateUtc(n),this.scrollingDistanceCache+=t,this.onTimescaleScroll&&this.onTimescaleScroll()},n}(T),S=function(t){function n(n){var i=t.call(this)||this;return i.Wyi=10,i.Mf=n,i.Mf.parent.options.scrollByPixel=!0,i.Mf.parent.options.scrollPixel=i.Wyi,i}return N(n,t),n.prototype.scrolling=function(){var t=this.Wyi*this.direction,n=this.Mf.ly,i=this.Mf.getViewportTopRow(1);this.Mf.scroll(t,0),n===this.Mf.ly&&i===this.Mf.getViewportTopRow(1)||(this.scrollingDistanceCache+=t,this.onSheetVerticalScroll&&this.onSheetVerticalScroll())},n}(T),k=function(){function t(t,n,i,e){this.tipHeight=65,this.tipWidth=160,this.actionStatus=v.ActionStatus.NotStart,this.startInfo=i,this.cursorStyle=e,this.sheet=i.hitInfo.sheet,this.project=t,this.cellType=n,this.minMoveX=i.hitInfo.cellRect.x-i.hitInfo.x,this.maxMoveX=i.hitInfo.cellRect.x+i.hitInfo.cellRect.width-i.hitInfo.x,this.project&&(this.timescaleScrollTimer=new O(this.project.timescale))}return t.prototype.doMouseMove=function(t){this.pending(this.getHitInfoByMouseEvent(t));var n=this.getMovingRepaintRect();this.sheet.repaint(n),F.updateCursorStyle(this.sheet.Dg(),this.cursorStyle),this.tipSettings=this.getTipDefaultSettings(),this.triggerEvent(),this.showTips()},t.prototype.doMouseUp=function(t){this.process(this.getHitInfoByMouseEvent(t)),this.unhandleDocumentMouseMove(),this.sheet.repaint(),this.triggerEvent(),this.dispose(),this.actionStatus=v.ActionStatus.NotStart,F.updateCursorStyle(this.sheet.Dg(),v.CursorStyle.Default)},t.prototype.getHitInfoByMouseEvent=function(t){var n=this.sheet.uw(),i=t.pageX-n.left,e=t.pageY-n.top,r=this.sheet.hitTest(i,e),s={x:r.x,y:r.y,row:r.row,col:r.col,sheet:this.sheet,cellRect:r.cellTypeHitInfo?r.cellTypeHitInfo.cellRect:void 0,sheetArea:r.cellTypeHitInfo?r.cellTypeHitInfo.sheetArea:void 0};return s},t.prototype.handleDocumentMouseMove=function(){var t=this;p(document).bind("mousemove.ganttSheet.baraction",(function(n){t.doMouseMove(n)})).bind("mouseup.ganttSheet.baraction",(function(n){t.doMouseUp(n)}))},t.prototype.unhandleDocumentMouseMove=function(){p(document).unbind("mousemove.ganttSheet.baraction").unbind("mouseup.ganttSheet.baraction")},t.prototype.getMovedX=function(t){if(!this.currentInfo||!this.startInfo)return 0;var n=Math.max(this.minMoveX,this.currentInfo.hitInfo.x-this.startInfo.hitInfo.x);return n=Math.min(this.maxMoveX,n),this.timescaleScrollTimer&&!t&&(n+=this.timescaleScrollTimer.getScrollDistance()),n},t.prototype.getMovedY=function(){return this.currentInfo&&this.startInfo?this.currentInfo.hitInfo.y-this.startInfo.hitInfo.y:0},t.prototype.checkScrolling=function(){var t,n=this;this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x<=0&&(t=v.ScrollDirection.Negative),this.currentInfo.hitInfo.x-(this.startInfo.hitInfo.cellRect.x+this.startInfo.hitInfo.cellRect.width)>=0&&(t=v.ScrollDirection.Positive),void 0!==t?this.timescaleScrollTimer&&this.timescaleScrollTimer.isStopped()&&(this.timescaleScrollTimer.start(t),this.timescaleScrollTimer.onTimescaleScroll=function(){n.triggerEvent(),n.showTips()}):this.timescaleScrollTimer&&this.timescaleScrollTimer.stop()},t.prototype.showTips=function(){var t,n;this.tipSettings&&((t=this.startInfo.hitInfo.cellStyle?this.startInfo.hitInfo.cellStyle.cellType:null)instanceof l.TaskbarCellType&&!t.showDefaultTips||((n=this.sheet.parent).R3||(this.sheet.parent.Tw(this.tipSettings.getContent(),0,0),n.R3.style.whiteSpace="normal",n.R3.style.zIndex="1000",this.tipPosition=this.calcTipPosition()),this.tipPosition&&this.sheet.parent.ny(this.tipSettings.getContent(),this.tipPosition.x,this.tipPosition.y)))},t.prototype.hideTips=function(){var t=this.startInfo.hitInfo.cellStyle?this.startInfo.hitInfo.cellStyle.cellType:null;t instanceof l.TaskbarCellType&&!t.showDefaultTips||(this.sheet.parent.iy(),delete this.tipPosition,delete this.tipSettings)},t.prototype.calcTipPosition=function(){if(this.startInfo.barBounds&&this.sheet.parent.R3)return{x:this.startInfo.hitInfo.x-this.tipWidth/2-2,y:this.startInfo.barBounds.y-this.tipHeight-10}},t.prototype.start=function(){this.handleDocumentMouseMove(),F.updateCursorStyle(this.sheet.Dg(),this.cursorStyle)},t.prototype.pending=function(n){this.currentInfo=F.getBarHitInfo(this.project,this.cellType,n),this.checkScrolling(),(Math.abs(this.getMovedX())>t.actionStartOffset||Math.abs(this.getMovedY())>t.actionStartOffset)&&(this.actionStatus=v.ActionStatus.InProgress)},t.prototype.process=function(t){this.currentInfo=F.getBarHitInfo(this.project,this.cellType,t),this.actionStatus===v.ActionStatus.InProgress&&(this.actionStatus=v.ActionStatus.Finish)},t.prototype.triggerEvent=function(){if(this.actionStatus===v.ActionStatus.Finish)this.sheet.ki(v.GanttSheetEvent.Event_BarAction_End,this.getTriggerData());else if(this.actionStatus===v.ActionStatus.InProgress){var t=this.getTriggerData();t.tip=this.tipSettings,this.sheet.ki(v.GanttSheetEvent.Event_BarAction_Pending,t)}},t.prototype.dispose=function(){this.timescaleScrollTimer&&this.timescaleScrollTimer.stop(),this.hideTips();var t=this.sheet.$go(this.startInfo.hitInfo.row,this.startInfo.hitInfo.col);t.barAction===this&&(t.barAction=void 0)},t.prototype.getBarPendingInfo=function(){return{partName:v.BarPartName.Middle,styleRule:this.startInfo.style,task:this.startInfo.task,name:this.command+"_P",movedX:this.getMovedX(),movedY:this.getMovedY(),colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},t.prototype.getTipDefaultSettings=function(){return null},t.prototype.getTriggerData=function(){return{command:this.command}},t.prototype.getMovingRepaintRect=function(){return this.sheet.getCellRect(this.startInfo.hitInfo.row,this.startInfo.hitInfo.col)},t.prototype.getDateChangeUnit=function(t){var n,i;if(void 0===t&&(t=!1),i=(n=this.project.timescale).tierMode===v.TimescaleTierMode.middle?n.middleTier:n.bottomTier,!t)return i.unit;switch(i.unit){case v.TimescaleUnit.minutes:return v.TimescaleUnit.minutes;case v.TimescaleUnit.hours:case v.TimescaleUnit.days:case v.TimescaleUnit.weeks:case v.TimescaleUnit.thirdsOfMonth:case v.TimescaleUnit.months:case v.TimescaleUnit.quarters:case v.TimescaleUnit.halfYears:case v.TimescaleUnit.years:return 1===i.count?i.unit+1:i.unit}},t.prototype.getUnscaledBarPosition=function(t,n){var i=this.sheet.zoom();return 1===i?t.x-n.x:(t.x-n.x)/i},t.prototype.getUnscaledValue=function(t){var n=this.sheet.zoom();return 1===n?t:t/n},t.actionStartOffset=4,t}(),n.BarAction=k,M=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.Move)||this;return r.tipHeight=65,r.tipWidth=200,r.command="Move",r.Gyi=i,r}return N(n,t),n.prototype.pending=function(n){if(t.prototype.pending.call(this,n),this.isTryToLink(n)){this.unhandleDocumentMouseMove();var i=F.getActionInstance("Link",this.project,this.Gyi,this.startInfo);i&&(this.Gyi.barAction=i,i.start())}else this.actionStatus===v.ActionStatus.InProgress&&(this.cursorStyle=v.CursorStyle.TaskDrag)},n.prototype.process=function(n){var i,e,r,s;t.prototype.process.call(this,n),this.actionStatus===v.ActionStatus.Finish&&(i=this.startInfo.task,"FinishOnly"===(e=f.ScheduleManager.getScheduleDataType({start:i.start,finish:i.finish,duration:i.duration}))?(r=this.getTargetDate(this.getBarEndPosition()),i.finishDisplayed.valueOf()!==r.valueOf()&&(i.finish=r)):(s=this.getTargetDate(this.getBarStartPosition()),i.startDisplayed.valueOf()!==s.valueOf()&&(i.start=s)))},n.prototype.getTipDefaultSettings=function(){var t,n,i,r,s=this.startInfo.style.name,u=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),o=this.startInfo.task,h=new l.TipSettings("gc-gantt-bar-action-"+this.command);return h.title=s||"",h.body=[],"StartOnly"===(t=f.ScheduleManager.getScheduleDataType({start:o.start,finish:o.finish,duration:o.duration}))?(n=this.getTargetDate(this.getBarStartPosition()),h.body.push([g().GANTT_ACTION_TASK_START,"".concat(u.format(n))])):"FinishOnly"===t||o.isMilestone?(i=this.getTargetDate(this.getBarEndPosition()),h.body.push([g().GANTT_ACTION_TASK_FINISH,"".concat(u.format(i))])):(n=this.getTargetDate(this.getBarStartPosition()),h.body.push([g().GANTT_ACTION_TASK_START,"".concat(u.format(n))]),(r=o.duration)&&(i=this.project.calendar.addDuration(n,r,!0,!1,this.project.calendarSettings),h.body.push([g().GANTT_ACTION_TASK_FINISH,"".concat(u.format(i))]))),2===h.body.length?this.tipHeight=65:this.tipHeight=45,h},n.prototype.getBarStartPosition=function(){return this.getUnscaledBarPosition(this.startInfo.barBounds,this.startInfo.hitInfo.cellRect)},n.prototype.getBarEndPosition=function(){var t=this.getUnscaledBarPosition(this.startInfo.barBounds,this.startInfo.hitInfo.cellRect),n=this.getUnscaledValue(this.startInfo.barBounds.w);return t+n},n.prototype.getTriggerData=function(){var t=this.startInfo.task;return{command:this.command,targetTask:t,start:this.getTargetDate(this.getBarStartPosition()),finish:this.getTargetDate(this.getBarEndPosition())}},n.prototype.isTryToLink=function(t){return!(!this.timescaleScrollTimer.isStopped()||0!==this.timescaleScrollTimer.getScrollDistance())&&(void 0!==t.row&&t.row!==this.startInfo.hitInfo.row||this.actionStatus===v.ActionStatus.NotStart&&Math.abs(this.getMovedX())<=k.actionStartOffset&&Math.abs(this.getMovedY())>k.actionStartOffset)},n.prototype.getTargetDate=function(t){var n,i,e,r,s,u,o=this.startInfo.task;if(o)return n=o.project.timescale,i=this.getMovedX(!0),e=this.getUnscaledValue(i),r=this.getDateChangeUnit(),s=n.getDateUtcRange(n.getDateUtcByOffset(e+t,n.currentDateUtc),r,1)[0],r<=v.TimescaleUnit.days&&(u=this.project.calendarSettings,s.setUTCHours(u.defaultStartTime.hour,u.defaultStartTime.minute,0,0)),h.Calendar.utcToLocal(s)},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return n.styleRule.style.taskbarStyle.middleShape?n.partName=v.BarPartName.Middle:n.styleRule.style.taskbarStyle.startShape?n.partName=v.BarPartName.Start:n.styleRule.style.taskbarStyle.endShape&&(n.partName=v.BarPartName.End),n},n}(k),n.BarMoveAction=M,j=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.RightStretch)||this;return r.command="Stretch",r}return N(n,t),n.prototype.process=function(n){var i,e;t.prototype.process.call(this,n),this.actionStatus===v.ActionStatus.Finish&&(i=this.startInfo.task,(e=this.getStretchToDate())<i.start?i.finish=i.start=e:i.finish=e)},n.prototype.getStretchToDate=function(){var t=this.startInfo.task,n=this.getMovedX(!0),i=t.project.timescale,e=this.getUnscaledBarPosition(this.startInfo.barBounds,this.startInfo.hitInfo.cellRect),r=this.getUnscaledValue(this.startInfo.barBounds.w),s=e+r,u=this.getUnscaledValue(n),o=i.getDateUtcRange(i.getDateUtcByOffset(u+s,i.currentDateUtc),this.getDateChangeUnit(!0),1)[0];return h.Calendar.utcToLocal(o)},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return n.styleRule.style.taskbarStyle.endShape?n.partName=v.BarPartName.End:n.styleRule.style.taskbarStyle.middleShape?(n.partName=v.BarPartName.Middle,n.movedX=0,n.stretchX=this.getMovedX()):n.styleRule.style.taskbarStyle.startShape&&(n.partName=v.BarPartName.Start),n},n.prototype.getTipDefaultSettings=function(){var t=this.startInfo.style.name,n=this.getStretchToDate(),i=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),r=this.startInfo.task.duration,s="Manual"===this.startInfo.task.mode,u=this.project.calendar.calcDurationUtc(h.Calendar.localToUTC(this.startInfo.task.startDisplayed),h.Calendar.localToUTC(n),s,this.project.calendarSettings,r?r.unit:null),o=new l.TipSettings("gc-gantt-bar-action-"+this.command);return o.title="".concat(t),o.body=[[g().GANTT_ACTION_FINISH,"".concat(i.format(n))],[g().GANTT_ACTION_DURATION,"".concat(this.project.formatDuration(u))]],o},n.prototype.getTriggerData=function(){return{command:this.command,targetTask:this.startInfo.task,finish:this.getStretchToDate()}},n}(k),n.BarStretchAction=j,_=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.LeftStretch)||this;return r.command="StartStretch",r}return N(n,t),n.prototype.process=function(n){var i,e,r,s,u,o,a,c,f;t.prototype.process.call(this,n),this.actionStatus===v.ActionStatus.Finish&&(i=this.startInfo.task,(e=this.getStretchToDate())>i.finish?i.start=e:(r=i.finish,i.start=e,s="Manual"===i.mode,u=h.Calendar.localToUTC(e),o=h.Calendar.localToUTC(r),c=(a=i.duration)?a.unit:this.project.calendarSettings.defaultDurationUnit,f=this.project.calendar.calcDurationUtc(u,o,s,this.project.calendarSettings,c),i.duration=f))},n.prototype.getStretchToDate=function(){var t=this.startInfo.task,n=this.getMovedX(!0),i=t.project.timescale,e=this.getUnscaledBarPosition(this.startInfo.barBounds,this.startInfo.hitInfo.cellRect),r=this.getDateChangeUnit(!0),s=this.getUnscaledValue(n),u=i.getDateUtcRange(i.getDateUtcByOffset(s+e,i.currentDateUtc),r,1)[0];return h.Calendar.utcToLocal(u)},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return n.styleRule.style.taskbarStyle.startShape?n.partName=v.BarPartName.Start:n.styleRule.style.taskbarStyle.middleShape?(n.partName=v.BarPartName.Middle,n.movedX=this.getMovedX(),n.stretchX=-this.getMovedX()):n.styleRule.style.taskbarStyle.endShape&&(n.partName=v.BarPartName.End),n},n.prototype.getTipDefaultSettings=function(){var t=this.startInfo.style.name,n=this.getStretchToDate(),i=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),r=this.startInfo.task.duration,s="Manual"===this.startInfo.task.mode,u=this.project.calendar.calcDurationUtc(h.Calendar.localToUTC(n),h.Calendar.localToUTC(this.startInfo.task.finishDisplayed),s,this.project.calendarSettings,r?r.unit:null),o=new l.TipSettings("gc-gantt-bar-action-"+this.command);return o.title="".concat(t),o.body=[[g().GANTT_ACTION_START,"".concat(i.format(n))],[g().GANTT_ACTION_DURATION,"".concat(this.project.formatDuration(u))]],o},n.prototype.getTriggerData=function(){return{command:this.command,targetTask:this.startInfo.task,start:this.getStretchToDate()}},n}(k),n.BarStartStretchAction=_,D=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.ProcessDrag)||this;return r.tipWidth=210,r.tipHeight=50,r.command="ProgressStretch",r}return N(n,t),n.prototype.process=function(n){var i,e;t.prototype.process.call(this,n),this.actionStatus===v.ActionStatus.Finish&&(i=this.startInfo.task,b(i.start)&&(i.start=i.startDisplayed),e=this.DAe(),this.project.taskManager.setTaskValue(i,"complete",e,!0))},n.prototype.getCompleteThroughDate=function(){var t=this.startInfo.task,n=t.project.timescale,i=n.getDateUtcRange(n.getDateUtcByOffset(this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x,n.currentDateUtc),this.getDateChangeUnit(!0),1)[0],e=h.Calendar.utcToLocal(i);return e.valueOf()>t.finishDisplayed.valueOf()?e=t.finishDisplayed:e.valueOf()<t.startDisplayed.valueOf()&&(e=t.startDisplayed),e},n.prototype.DAe=function(){var t=this.sheet.NMi.lki,n=this.getBarPendingInfo().stretchX,i=this.startInfo.task,e=i.complete,r=t._Ae(i),s=r*e,u=this.getUnscaledValue(n),o=Math.round((s+u)/r*100)/100;return o=Math.max(0,Math.min(o,1))},n.prototype.getBarPendingInfo=function(){var n,i=t.prototype.getBarPendingInfo.call(this),e=this.startInfo.task,r=this.startInfo.barBounds,s=r.w*e.complete,u=r.w*(1-e.complete),o=-s,h=u;return i.movedX=0,n=this.getMovedX(),n=Math.max(o,Math.min(n,h)),i.stretchX=n,i},n.prototype.getTipDefaultSettings=function(){var t=this.startInfo.style.name,n=this.DAe(),i=new l.TipSettings("gc-gantt-bar-action-"+this.command);return i.title="".concat(t),i.body=[[g().GANTT_TASK_BAR_COMPLETE,"".concat(Math.round(100*n),"%")]],i},n.prototype.getTriggerData=function(){return{command:this.command,targetTask:this.startInfo.task,completeThroughDate:this.getCompleteThroughDate()}},n}(k),n.ProgressStretchAction=D,x=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.LinkLine)||this;return r.command="Link",r.ck=new S(r.sheet),r.init(),r}return N(n,t),n.prototype.init=function(){var t,n=this.startInfo.hitInfo.sheet,i=n.NMi;i instanceof s.GanttSheet&&i.project===this.project&&(t=this.sheet.getRangeRect(1,2,{row:-1,col:this.startInfo.hitInfo.col,rowCount:-1,colCount:1}),this.Vyi=new r.Rect(t.x,t.y,t.width,t.height)),this.zyi=this.startInfo.hitInfo.cellRect},n.prototype.checkScrolling=function(){var t,n,i=this;this.Vyi&&(this.currentInfo.hitInfo.y<=this.Vyi.y?t=v.ScrollDirection.Negative:this.currentInfo.hitInfo.y>=this.Vyi.y+this.Vyi.height&&(t=v.ScrollDirection.Positive),void 0!==t?this.ck.isStopped()&&(this.ck.start(t),this.ck.onSheetVerticalScroll=function(){i.sheet.repaint(i.sheet.j1(new r.Range(-1,i.startInfo.hitInfo.col,-1,1)))}):this.ck.stop()),this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x<=0&&(n=v.ScrollDirection.Negative),this.currentInfo.hitInfo.x-(this.startInfo.hitInfo.cellRect.x+this.startInfo.hitInfo.cellRect.width)>=0&&(n=v.ScrollDirection.Positive),void 0!==n?this.ck.isStopped()&&this.timescaleScrollTimer.isStopped()&&this.timescaleScrollTimer.start(n):this.timescaleScrollTimer.stop()},n.prototype.process=function(n){var i,e,r;t.prototype.process.call(this,n),i=this.startInfo.task,e=this.currentInfo.task,i&&e&&i.taskNumber!==e.taskNumber&&(r=new c.TaskDependency(i,e),this.project.Ayi([r])&&this.project.addDependency(r))},n.prototype.getMovingRepaintRect=function(){return this.sheet.j1(new r.Range(-1,this.startInfo.hitInfo.col,-1,1))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.ck.stop()},n.prototype.calcTipPosition=function(){if(this.sheet.parent.R3)return this.Vyi?{x:this.Vyi.x-this.tipWidth-6,y:this.zyi.y-this.tipHeight-10}:{x:this.zyi.x-this.tipWidth-6,y:this.zyi.y-this.tipHeight-10}},n.prototype.getPendingLinkInfo=function(){var t=this.startInfo.hitInfo.x-this.timescaleScrollTimer.getScrollDistance(),n=this.startInfo.hitInfo.y-this.ck.getScrollDistance();return this.Vyi?(t=Math.min(this.Vyi.x+this.Vyi.width,Math.max(t,this.Vyi.x)),n=Math.min(this.Vyi.y+this.Vyi.height,Math.max(n,this.Vyi.y))):(t=Math.min(document.body.clientWidth,Math.max(t,0)),n=Math.min(document.body.clientHeight,Math.max(n,0))),{name:this.command+"_L",movedX:this.currentInfo.hitInfo.x-t,movedY:this.currentInfo.hitInfo.y-n,startX:t,startY:n,task:this.startInfo.task,colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},n.prototype.getPendingFromTaskInfo=function(){var t,n=this.startInfo.style;return n&&(n.style.taskbarStyle.middleShape?t=v.BarPartName.Middle:n.style.taskbarStyle.startShape?t=v.BarPartName.Start:n.style.taskbarStyle.endShape&&(t=v.BarPartName.End)),{partName:t,styleRule:this.startInfo.style,task:this.startInfo.task,name:this.command+"_S",movedX:0,movedY:0,colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},n.prototype.getPendingToTaskInfo=function(){var t,n=this.currentInfo.style;return n&&(n.style.taskbarStyle.middleShape?t=v.BarPartName.Middle:n.style.taskbarStyle.startShape?t=v.BarPartName.Start:n.style.taskbarStyle.endShape&&(t=v.BarPartName.End)),{partName:t,styleRule:this.currentInfo.style,task:this.currentInfo.task,name:this.command+"_E",movedX:0,movedY:0,colIndex:this.currentInfo.hitInfo.col,rowIndex:this.currentInfo.hitInfo.row}},n.prototype.getTipDefaultSettings=function(){var t="FS",n="S"===t[0]?g().GANTT_ACTION_START_LINK:g().GANTT_ACTION_FINISH_LINK,i="S"===t[1]?g().GANTT_ACTION_START_LINK:g().GANTT_ACTION_FINISH_LINK,e=new l.TipSettings("gc-gantt-bar-action-"+this.command);return e.title=w.I5(g().GANTT_ACTION_LINE_TIP_TITLE,[n,i]),e.body=[[w.I5(g().GANTT_ACTION_FROM_OF,[n]),g().GANTT_ACTION_TASK+" "+this.startInfo.task.taskNumber],[w.I5(g().GANTT_ACTION_TO_OF,[i]),"".concat(this.currentInfo.task?g().GANTT_ACTION_TASK+" "+this.currentInfo.task.taskNumber:"")]],e},n.prototype.getTriggerData=function(){return{command:this.command,fromTask:this.startInfo.task,toTask:this.currentInfo.task}},n}(k),n.BarLinkAction=x,E=function(t){function n(n,i,e){var r=t.call(this,n,i,e,v.CursorStyle.Default)||this;return r.tipHeight=85,r.command="New",r}return N(n,t),n.prototype.pending=function(n){var i,e,r;t.prototype.pending.call(this,n),this.actionStatus===v.ActionStatus.InProgress&&!this.Kyi&&this.project&&(i=this.project.timescale,this.timescaleScrollTimer=new O(i),r=e=h.Calendar.utcToLocal(i.getDateUtcByOffset(this.startInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x)),this.Kyi=this.createNewTask(e,r,this.startInfo.hitInfo.row),this.cursorStyle=v.CursorStyle.Crosshair)},n.prototype.createNewTask=function(t,n,i){var e=a.Task.ZX(null);return Object.defineProperty(e,"viewIndex",{get:function(){return i}}),Object.defineProperty(e,"start",{get:function(){return t}}),Object.defineProperty(e,"startDisplayed",{get:function(){return t}}),Object.defineProperty(e,"finish",{get:function(){return n}}),Object.defineProperty(e,"finishDisplayed",{get:function(){return n}}),e},n.prototype.calcTipPosition=function(){var t,n;if(this.Kyi&&this.sheet.parent.R3)return n=(t=this.sheet.NMi.lki).getTaskRect(this.Kyi,this.project.Omi.rules.getRule("task"),this.startInfo.hitInfo.cellRect),{x:this.startInfo.hitInfo.x-this.tipWidth/2-2,y:n.y-this.tipHeight-10}},n.prototype.process=function(n){var i,e,r;t.prototype.process.call(this,n),this.Kyi&&(i=this.getNewTaskBuildInfo(),e=this.project,(r=this.cellType.cAi(this.startInfo.hitInfo))>=e.count&&e.addTasks({name:g().GANTT_NEW_TASK,start:i.start,finish:i.finish,duration:i.duration}))},n.prototype.getNewTaskBuildInfo=function(){var t,n,i,e,r,s=this.project.timescale,u=this.Kyi.startDisplayed,o=h.Calendar.utcToLocal(s.getDateUtcByOffset(this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x)),a={};return o<u?(a.start=o,a.finish=u):o>u?(a.start=u,a.finish=o):a.finish=a.start=u,t=this.getDateChangeUnit(),n=s.getDateUtcRange(h.Calendar.localToUTC(a.start),t,1)[0],i=s.getDateUtcRange(h.Calendar.localToUTC(a.finish),t,1)[1],t<=v.TimescaleUnit.days&&(e=this.project.calendarSettings,n.setUTCHours(e.defaultStartTime.hour,e.defaultStartTime.minute,0,0),i.setUTCDate(i.getUTCDate()-1),i.setUTCHours(e.defaultFinishTime.hour,e.defaultFinishTime.minute,0,0)),r="Manual"===this.project.defaultMode,a.start=h.Calendar.utcToLocal(n),a.finish=h.Calendar.utcToLocal(i),a.duration=this.project.calendar.calcDurationUtc(n,i,r,this.project.calendarSettings),a},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return this.Kyi&&(n.task=this.Kyi,n.styleRule=this.project.Omi.rules.getRule("task"),n.movedX=0,n.stretchX=this.getMovedX()),n},n.prototype.getTipDefaultSettings=function(){var t,n,i;if(this.Kyi)return t=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),n=this.getNewTaskBuildInfo(),(i=new l.TipSettings("gc-gantt-bar-action-"+this.command)).title="Create Task",i.body=[[g().GANTT_ACTION_START,"".concat(t.format(n.start))],[g().GANTT_ACTION_FINISH,"".concat(t.format(n.finish))],[g().GANTT_ACTION_DURATION,"".concat(this.project.formatDuration(n.duration))]],i},n.prototype.getTriggerData=function(){var t=this.getNewTaskBuildInfo(),n=t.start,i=t.finish,e=t.duration;return{command:this.command,start:n,finish:i,duration:e}},n}(k),n.BarNewAction=E,F=function(){function t(){}return t.getBarHitInfo=function(t,n,i){var e,r,s,o,h,c,f,l,v,A,d,b,m,g,w,p,T={hitInfo:i,area:"outOfBar"},O=i&&i.sheet,S=n.cAi(i),k=t.getTaskByRow(S);if(!(i&&k&&k instanceof a.Task&&i.cellRect))return T;if(!(e=k.getBarStyleRules()))return T;for((r=e.find((function(t){return I(t)})))&&(s=this.getTaskbarBoundsForHitTest(t,k,r,i.cellRect,O)),o=e.length-1;o>=0;o--)if(P(h=e[o])){if(!s)continue;if(c=u.GanttRenderer.getTaskbarStartBounds(s),f=u.GanttRenderer.getTaskbarEndBounds(s),A=(l=c.x)+(v=f.x+f.w-c.x)*k.complete,d=void 0,b=void 0,0===k.complete?(d=l,b=l+y):k.complete>=1?(d=l+v-y,b=l+v):(d=A-y/2,b=A+y/2),i.x>=d&&i.x<=b&&i.y>=s.y&&i.y<s.y+s.h)return T.task=k,T.style=h,T.barBounds=s,T.area="progress",T}else if(I(h)&&(m=this.getTaskbarBoundsForHitTest(t,k,h,i.cellRect,O),g=u.GanttRenderer.getTaskbarStartBounds(m),w=u.GanttRenderer.getTaskbarEndBounds(m),l=g.x,v=w.x+w.w-g.x,i.x>=l-y&&i.x<=l+v+y&&i.y>=m.y&&i.y<m.y+m.h)){if(i.x<l&&"Manual"!==k.mode)continue;return T.task=k,T.style=h,T.barBounds=m,i.x<l?T.area="aroundLeft":i.x>l+v?T.area="aroundRight":(p=m.w>=2*g.w?g.w/4:g.w/2,g.w-=p,w.x+=p,w.w-=p,this.isHitInBounds(i,g)?T.area="aroundLeft":this.isHitInBounds(i,w)?T.area="aroundRight":T.area="insideBar"),T}return T},t.isHitInBounds=function(t,n){return!!(n&&t.x>=n.x&&t.x<n.x+n.w&&t.y>=n.y&&t.y<n.y+n.h)},t.getHitAction=function(t,n,i){var e,r,s,u=i.hitInfo,o=n.cAi(u);return t.getTaskByRow(o)?(e=i.task)&&0!==e.taskNumber?(r="Manual"===e.mode,s=i.style,r&&(L(s)||U(s)||B(s))?this.getActionInstance("Move",t,n,i):"aroundLeft"===i.area?I(s)&&r?this.getActionInstance("StartStretch",t,n,i):void 0:"progress"===i.area?this.getActionInstance("ProgressStretch",t,n,i):"aroundRight"===i.area&&I(s)?this.getActionInstance("Stretch",t,n,i):"insideBar"===i.area?r?this.getActionInstance("Move",t,n,i):this.getActionInstance("Link",t,n,i):void 0):void 0:this.getActionInstance("New",t,n,i)},t.getActionInstance=function(t,n,i,e){var r,s,u=e.hitInfo.sheet,o=u.NMi;switch(t){case"Move":i&&i.allowMoveOrResizeTask&&(r=new M(n,i,e));break;case"Stretch":i&&i.allowMoveOrResizeTask&&(r=new j(n,i,e));break;case"StartStretch":i&&i.allowMoveOrResizeTask&&(r=new _(n,i,e));break;case"Link":i&&i.allowLinkTask&&(s=n.taskManager.isFieldEnabled("predecessors"))&&(r=new x(n,i,e));break;case"New":if(i&&i.allowDragNewTask){if(o.uiOptions&&!1===o.uiOptions.allowAddTask)return;r=new E(n,i,e)}break;case"ProgressStretch":i&&i.allowChangeProgress&&(s=n.taskManager.isFieldEnabled("complete"))&&(r=new D(n,i,e));break;default:return}return r},t.getTaskbarBounds=function(t,n,i,e,r){var s;if(!b(i))return r.NMi.lki.getTaskRect(n,i,e)},t.getTaskbarBoundsForHitTest=function(t,n,i,e,r){var s,u=this.getTaskbarBounds(t,n,i,e,r);return u?(1!==(s=r.zoom())&&(u=o.GanttZoomHelper.scaleBounds(u,s,e.x,e.y)),u):u},t.updateCursorByBarHitInfo=function(t,n,i,e){var r=this.getHitAction(n,i,e);r?this.updateCursorStyle(t,r.cursorStyle):this.updateCursorStyle(t,null)},t.updateCursorStyle=function(t,n){switch(n){case v.CursorStyle.TaskDrag:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////////7//f/84Bz/+O/cf/Dv3D/gD8Af8O/cP/jv3H/84Bz//v/9///////////////////////////////////////////////////////////8=) 15 15,auto");case v.CursorStyle.ProcessDrag:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////x///77t///e7P//7ux///ccP//7/D///fx//478//93ff//d7///3ff//+P7/////////////////////////////////////////////////8=) 15 15,auto");case v.CursorStyle.Move:return void(t.style.cursor="move");case v.CursorStyle.LeftStretch:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////+f///9n///+Z////Gf///gH///4B////Gf///5n////Z////+f//////////////////////////////////////////////////////8=) 15 15,auto");case v.CursorStyle.RightStretch:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////n////5v///+Z////mP///4B///+Af///mP///5n///+b////n///////////////////////////////////////////////////////8=) 15 15,auto");case v.CursorStyle.LinkLine:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPx+AAGAAwABX/UAAYADAAD8fgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////8Dgf/+AQD//AAAf/wAAH/8AAB//gEA//8Dgf////////////////////////////////////////////////////////////////8=) 15 15,auto");case v.CursorStyle.Crosshair:return void(t.style.cursor="crosshair");default:return void(t.style.cursor="default")}},t}(),n.BarActionBuilder=F,C=function(){function t(){}return t}(),n.ActionPendingInfo=C},5909:function(t,n,i){var e,r,s,u,o,h;function a(t){return o.has(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.Collection=n.kts=n.EventList=void 0,e=i(7234),r=i(1376),s=e.Common.lt.ht,u=function(){function t(){var t=this;this.invoke=function(){var n=arguments;s(t.sji)||t.sji.forEach((function(t){return t.handler.apply(t.target,n)}))},this.invokeSome=function(){var n=arguments;return!s(t.sji)&&t.sji.some((function(t){return t.handler.apply(t.target,n)}))}}return t.prototype.attach=function(t,n){this.sji=this.sji||[],this.sji.push({handler:t,target:n})},t.prototype.detach=function(t){if(this.sji){var n=this.sji.map((function(t){return t.handler})).indexOf(t);n>=0&&this.sji.splice(n,1)}},t}(),n.EventList=u,o=new Set(["task","milestone","summary","projectSummary","manualTask","manualMilestone","durationOnly","manualSummary","startOnly","finishOnly","durationOnlyMilestone","startOnlyMilestone","finishOnlyMilestone","progress","manualProgress"]),n.kts=a,h=function(){function t(t){this.nji=new u,this.inner=t||[]}return t.prototype.add=function(t){this.dki(this.inner.length,t)},t.prototype.insert=function(t,n){this.dki(t,n)},t.prototype.remove=function(t){var n=this.getIndexByItem(t);this.gki(n)},t.prototype.removeAt=function(t){this.gki(t)},t.prototype.getItemAt=function(t){return this.inner[t]},t.prototype.getRule=function(t){var n,i,e;for(n=0,i=this.inner;n<i.length;n++)if((e=i[n]).name&&e.name===t)return e;return null},t.prototype.setItemAt=function(t,n){this.bki(t,n)},t.prototype.clear=function(){this.vki()},Object.defineProperty(t.prototype,"length",{get:function(){return this.inner.length},enumerable:!1,configurable:!0}),t.prototype.getIndexByItem=function(t){return this.inner.indexOf(t)},t.prototype.all=function(){return this.inner},t.prototype.dki=function(t,n){this.inner.splice(t,0,n),this.Aki()},t.prototype.gki=function(t){this.inner.splice(t,1),this.Aki()},t.prototype.vki=function(){this.inner=[],this.Aki()},t.prototype.bki=function(t,n){this.inner[t]=n,this.Aki()},t.prototype.Aki=function(){this.nji.invoke()},t.prototype.toJSON=function(){var t,n,i,e=[];for(t=0,n=this.inner;t<n.length;t++)i=n[t],e.push(i.toJSON());return e},t.prototype.fromJSON=function(t){var n,i,e,s,u,h,a;for(n=0,i=t;n<i.length;n++)e=i[n],o.has(e.name)&&!e.typeName?(s=this.getRule(e.name))&&s.fromJSON&&"function"==typeof s.fromJSON&&s.fromJSON(e):(u=e.typeName||e.name,"function"==typeof(h=(0,r.getTypeFromString)(u))&&"function"==typeof h.prototype.fromJSON&&((a=new h).fromJSON(e),this.add(a)))},t}(),n.Collection=h},6324:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m=this&&this.mJr||function(){return m=Object.assign||function(t){var n,i,e,r;for(i=1,e=arguments.length;i<e;i++)for(r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},m.apply(this,arguments)},g=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.TaskCollectionView=n.TaskManager=n.Task=void 0,e=i(4448),r=i(3099),s=i(237),u=i(7350),o=i(6985),h=i(4627),a=i(7234),c=i(8869),f=new a.Common.ResourceManager(c.SR,"GanttSheet"),l=f.getResource.bind(f),v=a.Common.lt.ht,A=function(){function t(t){this.xT=!1,this.k1=!1,this.myi=!1,this.pyi=!1,this.ayt=t}return t.ZX=function(n){return new t(n)},Object.defineProperty(t.prototype,"project",{get:function(){return this.ayt.project},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskNumber",{get:function(){return this.kU.taskNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewIndex",{get:function(){return this.kU.viewIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.viewIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.sft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this.YAt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return g([],this.R1t,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"predecessors",{get:function(){return this.Tyi.length?s.TaskDependency.formatPredecessors(this.Tyi):""},set:function(t){var n=s.TaskDependency.parsePredecessors(this,t);if(!this.project.Ayi(n,this.predecessorDependencies))throw new Error(l().GANTT_INVALID_DEPENDENCY);this.project.gyi(this.predecessorDependencies,n,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"predecessorDependencies",{get:function(){return g([],this.Tyi,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"successors",{get:function(){return this.kyi.length?s.TaskDependency.formatSuccessors(this.kyi):""},set:function(t){var n=s.TaskDependency.parseSuccessors(this,t);if(!this.project.Ayi(n,this.successorDependencies))throw new Error(l().GANTT_INVALID_DEPENDENCY);this.project.gyi(this.successorDependencies,n,!0),this._data.successors=s.TaskDependency.formatSuccessors(this.kyi)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"successorDependencies",{get:function(){return g([],this.kyi,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this._data.start},set:function(t){this.project.Eki(this,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDisplayed",{get:function(){return this.yyi&&this.yyi.start?u.Calendar.utcToLocal(this.yyi.start):this._data.start||this.project.startDate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finish",{get:function(){return this._data.finish},set:function(t){this.project.Fki(this,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDisplayed",{get:function(){return this.yyi&&this.yyi.finish?u.Calendar.utcToLocal(this.yyi.finish):this._data.finish||this.project.startDate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){if(this.isSummary){var t=this._data.duration;return t&&this.project.parseDuration({time:t.time})}return this._data.duration},set:function(t){var n=this.project.parseDuration(t);this.project.uyi.setTaskDuration(this,n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"workTime",{get:function(){var t,n,i,e,r,s=this.project.parseDuration(this._data.duration),o=this.project.resourcesManager.resourcesAssignment.getResourcesCountByTaskNumber(this.taskNumber),h=0;if(0!==o&&(h=s.time*o),this.isSummary)for(i=0,e=this.children;i<e.length;i++)h+=null!==(n=null===(t=(r=e[i]).workTime)||void 0===t?void 0:t.time)&&void 0!==n?n:0;return u.DurationHelper.normalize({time:h,unit:"Hour"})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return 0===this.taskNumber?"Auto":this._data.mode||this.project.uyi.defaultMode},set:function(t){if(0===this.taskNumber)throw new Error(l().GANTT_INVALID_OPERATION);this._data.mode=t,this.project.uyi.onTaskChanged(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.getDataValue("name")},set:function(t){this.setDataValue("name",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"complete",{get:function(){var t=0;return t=this.isSummary?this.cAe():this.getDataValue("complete")||0},set:function(t){this.isSummary||t>=0&&(t=Math.min(t,1),this.setDataValue("complete",t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completeThrough",{get:function(){var t,n,i,e,r;return 0===this.complete?this.startDisplayed:(t=u.Calendar.localToUTC(this.startDisplayed),n=u.Calendar.localToUTC(this.finishDisplayed),i=this.project.calendar.calcDurationUtc(t,n,!0,this.project.calendarSettings),e=this.project.parseDuration({time:i.time*this.complete}),r=this.project.calendar.addDurationUtc(t,e,!0,!1,this.project.calendarSettings),u.Calendar.utcToLocal(r))},set:function(t){var n=u.Calendar.localToUTC(this.startDisplayed),i=u.Calendar.localToUTC(this.finishDisplayed),e=u.Calendar.localToUTC(t),r=this.project.calendar.calcDurationUtc(n,e,!0,this.project.calendarSettings),s=this.project.calendar.calcDurationUtc(n,i,!0,this.project.calendarSettings),o=0===s.time?1:r.time/s.time;o<0&&(o=0),this.complete!==o&&this.ayt.setTaskValue(this,"complete",o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.getDataValue("styles")},set:function(t){var n;this.ayt.getPrimaryKeyField()&&(this.project.Omi.invalidateTextStates(),this.setDataValue("styles",t,!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMilestone",{get:function(){var t,n=this.getDataValue("isMilestone");return v(n)&&(n=(t=this.duration)&&0===t.time),n},set:function(t){this.setDataValue("isMilestone",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSummary",{get:function(){return this.R1t&&this.R1t.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNormal",{get:function(){return!this.isMilestone&&!this.isSummary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isManuallyScheduled",{get:function(){return"Manual"===this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.k1},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){this.kU={taskNumber:-1,viewIndex:-1},this.R1t=[],this.Tyi=[],this.kyi=[],this._data=t},t.prototype.getData=function(t){void 0===t&&(t=!1);var n=this._data;return n.taskNumber=this.taskNumber,n.level=this.level,n.predecessors=this.predecessors,n.successors=this.successors,n.complete=this.complete,t&&(n.children=this.Fpi().map((function(t){return t.getData(!0)}))),n},t.prototype.lyi=function(t){this.sft=t},t.prototype.q2t=function(t){this.YAt=t},t.prototype.Fpi=function(){return this.R1t},t.prototype.nyi=function(){return this.Tyi},t.prototype.tyi=function(){return this.kyi},t.prototype.L0=function(){this.xT=!0},t.prototype.cAe=function(){var t=0,n=0;return e.GanttUtil.traverseChildren(this,(function(i){i.isNormal&&(i.duration?(t+=i.duration.time*i.complete,n+=i.duration.time):(t+=0,n+=0))})),0===n?0:t/n},t.prototype.moveInWorkingDays=function(t){var n,i,e;if("Auto"!==this.mode)switch(n=o.ScheduleManager.getScheduleDataType({start:this.start,finish:this.finish,duration:this.duration})){case"All":case"Partly":case"StartOnly":case"DurationOnly":i=u.Calendar.localToUTC(this.startDisplayed),this.isInWorkingTime(i)?(i=this.moveByDays(i,t,!0),i=this.moveToNextWorkingTime(i)):i=this.moveByDays(i,t,!1),this.start=u.Calendar.utcToLocal(i);break;case"FinishOnly":e=u.Calendar.localToUTC(this.finish),e=this.moveByDays(e,t,!0),e=this.moveToNextWorkingTime(e),this.finish=u.Calendar.utcToLocal(e)}},t.prototype.moveInWeeks=function(t){var n,i,e;if("Auto"!==this.mode)switch(n=o.ScheduleManager.getScheduleDataType({start:this.start,finish:this.finish,duration:this.duration})){case"All":case"Partly":case"StartOnly":case"DurationOnly":i=u.Calendar.localToUTC(this.startDisplayed),this.isInWorkingTime(i)?(i=this.moveByWeeks(i,t,!0),i=this.moveToNextWorkingTime(i)):i=this.moveByWeeks(i,t,!1),this.start=u.Calendar.utcToLocal(i);break;case"FinishOnly":e=u.Calendar.localToUTC(this.finish),e=this.moveByWeeks(e,t,!0),e=this.moveToNextWorkingTime(e),this.finish=u.Calendar.utcToLocal(e)}},t.prototype.isInWorkingTime=function(t){var n=new Date(t.valueOf()+1);return this.project.calendar.calcDurationUtc(t,n,!1,this.project.calendarSettings).time>0},t.prototype.moveByDays=function(t,n,i){if(0===n)return t;var e=new Date(t.valueOf());if(i){for(;n>0;)e.setUTCDate(e.getUTCDate()+1),this.project.calendar.isWorkingDay(e)&&n--;for(;n<0;)e.setUTCDate(e.getUTCDate()-1),this.project.calendar.isWorkingDay(e)&&n++}else e.setUTCDate(e.getUTCDate()+n);return e},t.prototype.moveByWeeks=function(t,n,i){if(0===n)return t;var e=new Date(t.valueOf());if(e.setUTCDate(e.getUTCDate()+7*n),i){if(n>0)for(;!this.project.calendar.isWorkingDay(e);)e.setUTCDate(e.getUTCDate()+1);if(n<0)for(;!this.project.calendar.isWorkingDay(e);)e.setUTCDate(e.getUTCDate()-1)}return e},t.prototype.moveToNextWorkingTime=function(t){return this.project.calendar.addDurationUtc(t,{time:0},!0,!0,this.project.calendarSettings)},t.prototype.getValue=function(t){return this.ayt.getTaskValue(this,t)},t.prototype.setValue=function(t,n){return this.ayt.setTaskValue(this,t,n)},t.prototype.getDataValue=function(t){return this._data[t]},t.prototype.setDataValue=function(t,n,i){void 0===i&&(i=!1);var e=this._data[t];e!==n&&(this._data[t]=n,this.wmi(),this.ayt.notifyTaskValueChanged(this,t,e,n,i))},t.prototype.wmi=function(){this.k1=!0},t.prototype.pOt=function(){this.k1=!1},t.prototype.getBarStyleRules=function(){return this.project.Omi.getBarStyleRuleForTask(this)},t}(),n.Task=A,d=function(){function t(n){var i,e,r;for(this.fields={},this.uAi=n,this.Oyi=A.ZX(this),i=0,e=t.defaultFields;i<e.length;i++)r=e[i],this.fields[r.name]=m({},r)}return Object.defineProperty(t.prototype,"project",{get:function(){return this.uAi},enumerable:!1,configurable:!0}),t.prototype.resetTaskPrototype=function(){this.Oyi=A.ZX(this)},t.prototype.createTask=function(t){var n=Object.create(this.Oyi);return null!==(t=t||{}).duration&&void 0!==t.duration&&(t.duration=this.project.parseDuration(t.duration)),t.mode||(t.mode=this.project.defaultMode),n.initialize(t),n},t.prototype.addField=function(n){var i=this.fields[n.name];i?t.mergeField(i,n):this.fields[n.name]=n,Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.Oyi),n.name)||Object.defineProperty(this.Oyi,n.name,{configurable:!0,enumerable:!0,get:function(){return this.getDataValue(n.name)},set:function(t){this.setDataValue(n.name,t)}})},t.prototype.getField=function(t){return this.fields[t]},t.prototype.getFieldByDataType=function(t){var n,i,e,r=Object.values(this.fields);for(n=0,i=r;n<i.length;n++)if((e=i[n]).dataType===t)return e;return null},t.prototype.getPrimaryKeyField=function(){var t,n,i;if(this.Vki)return this.Vki;for(n in this.fields)(i=this.fields[n])&&i.isPrimaryKey&&(t=i);return this.Vki=t,t},t.prototype.isFieldEnabled=function(t){var n=this.getField(t),i=void 0===n.enabled||n.enabled,e=void 0!==n.readonly&&n.readonly;return i&&!e},t.prototype.getTaskValue=function(t,n){if(t&&("string"==typeof n&&(n=this.getField(n)),n))return n.getter?n.getter(t):A.prototype.hasOwnProperty(n.name)?t[n.name]:t.getDataValue(n.name)},t.prototype.setTaskValue=function(t,n,i,e){var s,u,o,a,c,f,l;if(t&&("string"==typeof n&&(n=this.getField(n)),n&&!n.readonly&&n.enabled&&(n.fixValue&&(i=n.fixValue(i,t)),u=this.project.taskManager.getTaskValue(t,n),0!==(o=r.GanttSortService.compareValueWithField(u,i,n))))){c=[],(a=n.fki)||(f=this.project.cloneTask(t),c.push(f)),l=this.project.createChange(h.TasksChangeAction.Update,c,a);try{if(this.project.Lmi.invoke(l),n.setter)n.setter(t,i);else if(A.prototype.hasOwnProperty(n.name)&&Object.getOwnPropertyDescriptor(A.prototype,n.name).set)if(e)try{t[n.name]=i}catch(t){l.noChange=!0}else t[n.name]=i;else t.setDataValue(n.name,i);this.project.Hmi.invoke(l)}catch(t){throw null===(s=this.project.host)||void 0===s||s.resumeAll(),t}}},t.prototype.notifyTaskValueChanged=function(t,n,i,e,r){void 0===r&&(r=!1),r?this.project.Rmi.invoke():this.project.VAi.invoke()},t.mergeField=function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},t.defaultFields=[{name:"taskNumber",text:l().GANTT_TASK_NUMBER,dataType:"TaskNumber",readonly:!0},{name:"name",text:l().GANTT_TASK_NAME,dataType:"TaskSubject",fixValue:function(t){return e.ValueHelper.parseString(t)}},{name:"isMilestone",text:l().GANTT_MILESTONE,fixValue:function(t){return e.ValueHelper.parseBoolean(t,!0)},enabled:!0},{name:"mode",text:l().GANTT_MODE,dataType:"TaskMode",fixValue:function(t){var n=e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"]);return v(n)?"Auto":n},enabled:!1,fki:!0},{name:"duration",text:l().GANTT_DURATION,dataType:"TaskDuration",fixValue:function(t,n){var i=n.duration;return u.DurationHelper.parse(t,n.project.calendarSettings,i?i.unit:void 0)},fki:!0},{name:"start",text:l().GANTT_START,dataType:"TaskStartDate",fixValue:function(t){return e.ValueHelper.parseDate(t)},fki:!0},{name:"finish",text:l().GANTT_FINISH,dataType:"TaskFinishDate",fixValue:function(t){return e.ValueHelper.parseDate(t)},fki:!0},{name:"startDisplayed",text:l().GANTT_START_DISPLAYED,readonly:!0},{name:"finishDisplayed",text:l().GANTT_FINISH_DISPLAYED,readonly:!0},{name:"predecessors",text:l().GANTT_PREDECESSORS,dataType:"TaskPredecessor",fixValue:function(t){return e.ValueHelper.parseString(t)},comparer:function(t,n){return e.ValueHelper.compareTaskDependency(t,n)},enabled:!1,fki:!0},{name:"successors",text:l().GANTT_SUCCESSORS,dataType:"TaskPredecessor",fixValue:function(t){return e.ValueHelper.parseString(t)},comparer:function(t,n){return e.ValueHelper.compareTaskDependency(t,n)},enabled:!1,fki:!0},{name:"complete",text:l().GANTT_COMPLETE,dataType:"TaskComplete",fixValue:function(t,n){return n.isSummary&&(t=n.complete),e.ValueHelper.parseNumber(t,!1)},enabled:!1},{name:"completeText",text:l().GANTT_COMPLETE,getter:function(t){return"".concat((100*t.complete).toFixed(),"%")},readonly:!0},{name:"completeThrough",text:l().GANTT_COMPLETE_CHANGE,fixValue:function(t){return e.ValueHelper.parseDate(t)}}],t}(),n.TaskManager=d,b=function(){function t(t){this.tasks=[],this.tokens=[],this.project=t}return t.prototype.getTask=function(t){return this.tasks[t]},t.prototype.getRowState=function(t){var n,i,e;return t>=this.tasks.length||v(t)?{taskNumber:void 0,level:void 0,task:void 0}:(n=this.viewTokens?this.viewTokens[t].taskNumber:t,i=this.tasks[n],{taskNumber:n,level:e=this.getLevel(n),task:i})},t.prototype.getTasksInView=function(){var t=this;return this.viewTokens?this.viewTokens.map((function(n){return t.tasks[n.taskNumber]})):g([],this.tasks,!0)},t.prototype.generateTokens=function(t){return t.map((function(t){return t?t.kU:{taskNumber:-1,viewIndex:-1}}))},t.prototype.reset=function(t){var n=this.project.createChange(h.TasksChangeAction.Reset,t,!0);this.onTasksChanging(n),this.tasks=t,this.tokens=this.generateTokens(t),delete this.viewTokens,this.fixTokens(),this.onTasksChanged(n)},t.prototype.insert=function(t,n){var i,e,r,s,u,o,a,c=t;this.tokens[t]&&(c=this.tokens[t].viewIndex),(i=this.tasks).splice.apply(i,g([t,0],n,!1)),u=this.generateTokens(n),(e=this.tokens).splice.apply(e,g([t,0],u,!1)),this.viewTokens&&(r=this.viewTokens).splice.apply(r,g([c,0],u,!1)),o=this.project.createChange(h.TasksChangeAction.Insert,n,!0);try{this.onTasksChanging(o),this.fixTokens(),(a=this.findParentTask(t))&&this.fixTaskMembership(a),this.onTasksChanged(o)}catch(t){throw null===(s=this.project.host)||void 0===s||s.resumeAll(),t}},t.prototype.remove=function(t){var n,i,e,r,s,u,o,a,c,f,l,v=this,A=this.tasks.length;if(t=t.filter((function(t){return t>0&&t<A})).sort((function(t,n){return t-n})),!(t.length<=0)){for(i={},e=(n=this.calculateSubTreeRanges(t)).length-1;e>=0;e--)r=n[e],(s=this.tasks[r[0]])&&(i[s.parent.taskNumber]=s.parent);for(u=[],e=n.length-1;e>=0;e--)r=n[e],(o=this.tasks.splice(r[0],r[1]-r[0]+1)).forEach((function(t){t&&(v.kki(t,u)||(u[t.taskNumber]=t),t.L0())})),(a=this.tokens.splice(r[0],r[1]-r[0]+1)).forEach((function(t){t.viewIndex=-1}));for(f in this.viewTokens&&(this.viewTokens=this.viewTokens.filter((function(t){return-1!==t.viewIndex}))),c=this.project.createChange(h.TasksChangeAction.Remove,u,!0),this.onTasksChanging(c),this.fixTokens(),i)Object.prototype.hasOwnProperty.call(i,f)&&(l=i[f],this.fixTaskMembership(l));this.onTasksChanged(c)}},t.prototype.clear=function(t){var n,i,e,r,s,u,o,a,c,f=this,l=this.calculateSubTreeRanges(t),v={};for(n=l.length-1;n>=0;n--)i=l[n],(e=this.tasks[i[0]])&&(v[e.parent.taskNumber]=e.parent);for(r=[],n=l.length-1;n>=0;n--)for(s=(i=l[n])[0];s<=i[1];s++)r.push(s);for(a in u=[],r.forEach((function(t){var n,i=f.tasks[t];i&&(u.push(f.project.cloneTask(i)),f.tasks[t]=null,i.L0(),n={taskNumber:i.taskNumber,viewIndex:i.viewIndex},f.tokens[t]=n,f.viewTokens&&(f.viewTokens[i.viewIndex]=n))})),o=this.project.createChange(h.TasksChangeAction.Replace,u,!0),this.onTasksChanging(o),v)Object.prototype.hasOwnProperty.call(v,a)&&(c=v[a],this.fixTaskMembership(c));this.onTasksChanged(o)},t.prototype.renew=function(t,n){var i,e,r,s,u,o,a,c,f,l,v,A={},d=[];for(i=0;i<t.length;i++)e=t[i],r=n[i],s=this.tasks[e],d.push(this.project.cloneTask(s)),u=this.getLevel(e),r.q2t(u),this.tasks[e]=r,s&&s.L0(),o=this.tokens[e],(a=r.kU).taskNumber=o.taskNumber,a.viewIndex=o.viewIndex,this.tokens[e]=a,this.viewTokens&&(this.viewTokens[a.viewIndex]=a),(c=this.findParentTask(e))&&(A[c.taskNumber]=c);for(l in f=this.project.createChange(h.TasksChangeAction.Replace,d,!0),this.onTasksChanging(f),A)Object.prototype.hasOwnProperty.call(A,l)&&(v=A[l],this.fixTaskMembership(v));this.onTasksChanged(f)},t.prototype.validateLevel=function(t,n){var i=this.findPreviousTask(t),e=i?i.level:0;return!(n<=0||n>e+1)},t.prototype.getLevel=function(t){var n=this.tasks[t];return n?n.level:this.calcRowLevel(t)},t.prototype.kki=function(t,n){var i,e=t.parent;if(e&&0!==(i=e.taskNumber))return n[i]?n[i]:this.kki(e,n)},t.prototype.calcRowLevel=function(t){var n,i=this.findPreviousTask(t),e=this.findNextTask(t);if(!i)return 1;if(n=this.project.host,!e){for(;n&&n.outline.isRowCollapsed(this.tokens[i.taskNumber].viewIndex);)i=i.parent;return Math.max(i.level,1)}return i.isSummary?i.level+1:n&&n.outline.isRowCollapsed(this.tokens[i.taskNumber].viewIndex)?e.level:i.level},t.prototype.findPreviousTask=function(t){var n,i;for(n=t-1;n>0;n--)if(i=this.tasks[n],!v(i))return i;return null},t.prototype.findNextTask=function(t,n){var i,e,r=n?t+1:t;for(i=r;i<this.tasks.length;i++)if(e=this.tasks[i],!v(e))return e;return null},t.prototype.findParentTask=function(t){var n,i,e,r=this.tasks[t];if(!r)return null;for(n=r.level,i=t-1;i>=0;i--)if(e=this.tasks[i],!v(e)&&e.level<n)return e;return null},t.prototype.changeTasksLevel=function(t,n){var i,e,r,s,u,o,a,c,f,l,v,d,b,m,g,w=this,y=this.tasks.length;if(t=t.filter((function(t){return t>0&&t<y&&w.tasks[t]instanceof A})).sort((function(t,n){return t-n})),0!==t.length){for(r={},s=[],u=(e=this.calculateSubTreeRanges(t)).length-1;u>=0;u--)if(a=(o=e[u])[0],(c=this.tasks[a])&&!1!==this.validateLevel(a,c.level+n))for(r[c.parent.taskNumber]=c.parent,f=o[0];f<=o[1];f++)s.push(f);s.forEach((function(t){var i=w.tasks[t];i&&i.q2t(i.level+n)})),l=e.map((function(t){return{task:w.getTask(t[0]),delta:n}})),v=this.project.createChange(h.TasksChangeAction.Level,l,!0);try{for(this.onTasksChanging(v),u=e.length-1;u>=0;u--)o=e[u],(d=this.tasks[o[0]])&&(r[(b=this.findParentTask(o[0])).taskNumber]=b,n<0&&(r[o[0]]=d));for(m in r)Object.prototype.hasOwnProperty.call(r,m)&&(g=r[m],this.fixTaskMembership(g));this.project.suspendSchedule(),this.project.oyi.onTasksMembershipChanged(),this.adjustManuallyParentMode(r),this.project.resumeSchedule(),this.onTasksChanged(v)}catch(t){throw null===(i=this.project.host)||void 0===i||i.resumeAll(),t}}},t.prototype.adjustManuallyParentMode=function(t){var n,i,e,r,s,u,o,h,a=this.getManuallyParentForAdjust(t);if(!(a.length<=0))for(n=0,i=a;n<i.length;n++)r=(e=i[n])[0],s=e[1],u=e[2],"Auto"===s?r.mode="Auto":"Manual"===s&&("DurationOnly"===u?r.start=this.getChildrenDate(r,!0):"StartOnly"===u?(o=this.getChildrenDate(r,!1))>r.start&&(r.finish=o):"FinishOnly"===u&&(h=this.getChildrenDate(r,!0))<r.finish&&(r.start=h))},t.prototype.getChildrenDate=function(t,n){var i,e,r,s,u=null;for(i=0,e=t.Fpi();i<e.length;i++)r=e[i],s=n?r.startDisplayed:r.finishDisplayed,u=v(u)?s.valueOf():n?Math.min(u,s.valueOf()):Math.max(u,s.valueOf());return v(u)?null:new Date(u)},t.prototype.getManuallyParentForAdjust=function(t){var n,i,e,r=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&"Manual"===(i=t[n]).mode&&i.Fpi().length&&("None"===(e=o.ScheduleManager.getScheduleDataType({start:i.start,finish:i.finish,duration:i.duration}))?r.push([i,"Auto",null]):"DurationOnly"!==e&&"StartOnly"!==e&&"FinishOnly"!==e||r.push([i,"Manual",e]));return r},t.prototype.calculateSubTreeRanges=function(t){var n,i,e,r=this,s=t.map((function(t){return r.getSubTreeRange(t)})),u=[];for(s.length>0&&u.push(s[0]),n=1;n<s.length;n++)i=s[n],e=u[u.length-1],i[0]<=e[1]||u.push(i);return u},t.prototype.getSubTreeRange=function(t){var n,i,e,r,s=this.tasks[t];if(v(s))return[t,t];for(n=s.level,i=t,e=t+1;e<this.tasks.length;e++)if(r=this.tasks[e]){if(!(r.level>n))break;i=e}return[t,i]},t.prototype.fixTaskMembership=function(t){var n,i,e=t.Fpi();for(e.length=0,n=t.taskNumber+1;n<this.tasks.length;n++)if(i=this.tasks[n],!v(i)){if(i.level<=t.level)break;i.level===t.level+1&&(e.push(i),i.lyi(t))}},t.prototype.fixTokens=function(){this.tokens&&this.tokens.forEach((function(t,n){return t.taskNumber=n})),this.viewTokens?this.viewTokens.forEach((function(t,n){return t.viewIndex=n})):this.tokens.forEach((function(t,n){return t.viewIndex=n}))},Object.defineProperty(t.prototype,"sorted",{get:function(){return!v(this.viewTokens)},enumerable:!1,configurable:!0}),t.prototype.sort=function(t,n,i){var e,s=this.project.createChange(h.TasksChangeAction.Sort,[],!1);this.onTasksChanging(s),v(t)?(this.viewTokens=null,this.fyi=null):(e=r.GanttSortService.sort(this.tokens,this.tasks,t,n,i),this.viewTokens=e,this.fyi={fields:t,ascendingStates:n,keepStructure:i}),this.fixTokens(),this.onTasksChanged(s)},t.prototype.renumberTaskNumbers=function(t){var n,i=this;this.viewTokens&&(n=this.project.createChange(h.TasksChangeAction.Renumber,this.tasks,!0,t),this.onTasksChanging(n),this.tasks=this.viewTokens.map((function(t){return i.tasks[t.taskNumber]})),this.tokens=g([],this.viewTokens,!0),this.viewTokens=null,this.fixTokens(),this.tasks.forEach((function(t){var n=t?t.Fpi():null;n&&n.sort((function(t,n){return t.taskNumber-n.taskNumber}))})),this.fyi=null,this.onTasksChanged(n))},t.prototype.toJSON=function(){var t,n,i,e,r,s={},u=this.project.taskManager.getPrimaryKeyField();if(u)for(t=0,n=this.tasks;t<n.length;t++)i=n[t],e=this.project.taskManager.getTaskValue(i,u.name),(r=i.style)&&(s[e]={style:r});return s},t.prototype.fromJSON=function(t){t&&(this.Wki=t)},t.prototype.Yki=function(){var t,n,i,e,r=this.Wki;for(t in r)(n=r[t])&&(i=n.task,e=n.style,i&&e&&(i.style=e))},t}(),n.TaskCollectionView=b},6985:function(t,n,i){var e,r,s,u;Object.defineProperty(n,"__esModule",{value:!0}),n.ScheduleManager=void 0,e=i(7350),r=i(7234),s=r.Common.lt.ht,u=function(){function t(t){this.vyi="Auto",this.byi=0,this.uAi=t,this.uAi.Hmi.attach(this.onTasksChanged,this)}return Object.defineProperty(t.prototype,"defaultMode",{get:function(){return this.vyi},set:function(t){this.vyi=t,this.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSuspended",{get:function(){return this.byi>0},enumerable:!1,configurable:!0}),t.prototype.suspend=function(){this.byi++},t.prototype.resume=function(){this.byi>0&&this.byi--,0===this.byi&&this.reSchedule()},t.prototype.validTasks=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)(e=i[n]).myi=!1,e.pyi=!1},t.prototype.invalidTasks=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)(e=i[n]).myi=!0,e.pyi=!0},t.prototype.invalidAllTasks=function(){this.invalidTasks(this.uAi.Vp)},t.prototype.Eki=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskStartCore(i,n,t.mode),this.applyScheduleData(t,i))},t.prototype.setTaskStartCore=function(n,i,e){var r=t.getScheduleDataType(n);return i?n="All"===r?this.buildScheduleData(i,null,n.duration,e,!1):this.buildScheduleData(i,n.finish,n.duration,e,!1):(n.start=null,"All"===r&&(n.duration=null)),n},t.prototype.Fki=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskFinishCore(i,n,t.mode),this.applyScheduleData(t,i))},t.prototype.setTaskFinishCore=function(n,i,e){var r,s=t.getScheduleDataType(n);return i?"All"===s?(r=n.duration.unit,n=this.buildScheduleData(n.start,i,null,e,!1,r)):n=this.buildScheduleData(n.start,i,n.duration,e,!1):(n.finish=null,"All"===s&&(n.duration=null)),n},t.prototype.setTaskDuration=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskDurationCore(i,n,t.mode),this.applyScheduleData(t,i),this.onTaskChanged(t))},t.prototype.setTaskDurationCore=function(n,i,r){var s,u,o,h=t.getScheduleDataType(n);return i?"All"===h?"Manual"===r&&i.time<=n.duration.time?(s=e.Calendar.localToUTC(n.finish),u=this.uAi.calendar.addDurationUtc(e.Calendar.localToUTC(n.start),i,!0,!1,this.uAi.calendarSettings),o=n.duration.time-i.time,s.valueOf()-o<u.valueOf()&&(u=new Date(s.valueOf()-o)),n=this.buildScheduleData(n.start,e.Calendar.utcToLocal(u),null,r,!1,i.unit)):n=this.buildScheduleData(n.start,null,i,r,!1):n=this.buildScheduleData(n.start,n.finish,i,r,!1):(n.duration=null,"All"===h&&(n.finish=null)),n},t.prototype.prepareSetTaskStartFinishDuration=function(t){if(t&&0!==t.taskNumber)return"Auto"===t.mode&&t.isSummary&&(t._data.mode="Manual"),this.buildScheduleData(t._data.start,t._data.finish,t._data.duration,t.mode,!1)},t.prototype.buildScheduleData=function(n,i,e,r,s,u){var o={start:n,finish:i,duration:e},h=t.getScheduleDataType(o);return"Partly"===h&&(n&&e?this.updateScheduleDataFinish(o,n,e,s):i&&e?this.updateScheduleDataStart(o,i,e,s):n&&i&&this.updateScheduleDataDuration(o,n,i,u,r,s)),o},t.prototype.updateScheduleDataStart=function(t,n,i,e){0===i.time?t.start=new Date(n.getTime()):t.start=e?this.uAi.calendar.addDurationUtc(n,i,!1,!0,this.uAi.calendarSettings):this.uAi.calendar.addDuration(n,i,!1,!0,this.uAi.calendarSettings)},t.prototype.updateScheduleDataFinish=function(t,n,i,e){0===i.time?t.finish=new Date(n.getTime()):t.finish=e?this.uAi.calendar.addDurationUtc(n,i,!0,!1,this.uAi.calendarSettings):this.uAi.calendar.addDuration(n,i,!0,!1,this.uAi.calendarSettings)},t.prototype.updateScheduleDataDuration=function(t,n,i,r,s,u){r=r||this.uAi.calendarSettings.defaultDurationUnit;var o="Manual"===s;t.duration=u?this.uAi.calendar.calcDurationUtc(n,i,o,this.uAi.calendarSettings,r):this.uAi.calendar.calcDurationUtc(e.Calendar.localToUTC(n),e.Calendar.localToUTC(i),o,this.uAi.calendarSettings,r)},t.prototype.applyScheduleData=function(t,n){t._data.start=n.start,t._data.finish=n.finish,t._data.duration=n.duration},t.prototype.onTaskChanged=function(t){this.invalidTasks([t]),this.reSchedule()},t.prototype.onTasksChanged=function(t){t.noChange||(this.invalidAllTasks(),this.reSchedule())},t.prototype.reSchedule=function(){var t,n;this.isSuspended||0!==(t=this.uAi.Vp).length&&(this.beforeSchedule(t),n=this.buildIncomingDegreeList(t),this.scheduleTasks([this.uAi.root],n),this.afterSchedule(t),this.uAi.VAi.invoke())},t.prototype.beforeSchedule=function(t){var n,i,r,s,u,o,h;for(n=0,i=t;n<i.length;n++)s=(r=i[n])._data.start?e.Calendar.localToUTC(r._data.start):null,u=r._data.finish?e.Calendar.localToUTC(r._data.finish):null,(h=!((o=r._data.duration)||s&&u&&"Manual"===r.mode))&&(o=s||u||"Auto"===r.mode?e.DurationHelper.default(this.uAi.calendarSettings):e.DurationHelper.empty(this.uAi.calendarSettings)),r.wyi=this.buildScheduleData(s,u,o,r.mode,!0),r.yyi={},r.myi=!0,r.pyi=!0;t[0].wyi=this.buildScheduleData(this.uAi.startDateUtc,this.uAi.startDateUtc,null,"Auto",!0)},t.prototype.buildIncomingDegreeList=function(t){var n,i,e,r,u=[];for(n=0,i=t;n<i.length;n++)u[2*(r=(e=i[n]).taskNumber)]=(s(e.parent)?0:1)+e.nyi().length,u[2*r+1]=e.Fpi().length;return u},t.prototype.scheduleTasks=function(t,n){var i=[];for(i.push.apply(i,t);i.length;)this.scheduleTask(i.shift(),i,n)},t.prototype.scheduleTask=function(t,n,i){var e,r,s,u,o,h,a;if(t.myi){if(this.scheduleTaskInitially(t),t.myi)return;if(t.isSummary)for(e=0,r=t.Fpi();e<r.length;e++)s=r[e],this.determineFollowing(s,n,i,!0)}if(t.pyi){if(this.scheduleTaskFinally(t),t.pyi)return;if((u=t.tyi())&&u.length>0)for(o=0,h=u;o<h.length;o++)a=h[o],this.determineFollowing(a.to,n,i,!0);t.parent&&this.determineFollowing(t.parent,n,i,!1)}},t.prototype.determineFollowing=function(t,n,i,e){var r=2*t.taskNumber+(e?0:1),s=i[r];s--,i[r]=s,0===s&&n.push(t)},t.prototype.scheduleTaskInitially=function(t){var n,i,e,r,s,u=this;if(0===t.taskNumber||"Manual"===t.mode&&t.wyi.start)return t.yyi.start=t.wyi.start,void(t.myi=!1);if(n=t.parent.yyi.start,"Manual"===t.mode&&t.parent.jyi&&(n=t.parent.jyi),n){if((r=t.nyi())&&r.length){if(!(s=this.getPredecessorsDates(r)))return;i=s[0],e=s[1]}t.yyi.start=this.getMaxDate(n,i),t.isSummary?t.jyi=t.Fpi().reduce((function(t,n){return"Manual"===n.mode?u.getMinDate(n.wyi.start,t):t}),t.yyi.start):t.yyi.finish=e,t.myi=!1}},t.prototype.scheduleTaskFinally=function(t){var n,i,r,s,u,o,h,a,c,f,l;if(!t.myi&&(i=(n=this.getChildrenScheduleResult(t))[0],r=n[1],s=n[2],i)){if("Manual"===t.mode&&t.wyi.finish)return o=(u=t.wyi).start,h=u.finish,a=u.duration,(c=this.uAi.calendar.calcDurationUtc(o,h,!0,this.uAi.calendarSettings)).time!==a.time&&(h=this.uAi.calendar.addDurationUtc(o,a,!0,!1,this.uAi.calendarSettings)),t.yyi.duration=this.fixDuration(a),t.yyi.finish=h,void(t.pyi=!1);if("Auto"===t.mode&&t.isSummary)return r&&s&&(t.yyi.start=r,t.yyi.finish=s,t.yyi.duration=this.uAi.calendar.calcDurationUtc(r,s,!1,this.uAi.calendarSettings,t.wyi.duration.unit)),void(t.pyi=!1);t.yyi.duration=this.fixDuration(t.wyi.duration),f=t.yyi.start,l=t.yyi.finish,0===t.yyi.duration.time&&"Auto"===t.mode?(f=this.getMaxDate(f,l),t.yyi.start=f,t.yyi.finish=f):(l&&(f=this.getMaxDate(f,this.uAi.calendar.addDurationUtc(l,t.yyi.duration,!1,!0,this.uAi.calendarSettings))),"Auto"===t.mode?t.yyi.start=this.uAi.calendar.addDurationUtc(f,e.DurationHelper.empty(this.uAi.calendarSettings),!0,!0,this.uAi.calendarSettings):t.yyi.start=f,t.yyi.finish=this.getMaxDate(l,this.uAi.calendar.addDurationUtc(t.yyi.start,t.yyi.duration,!0,!1,this.uAi.calendarSettings))),t.pyi=!1}},t.prototype.getPredecessorsDates=function(t){var n,i,e,r,s=null,u=null;for(n=0,i=t;n<i.length;n++){if((r=(e=i[n]).from).pyi)return;"FS"===e.type?s=this.getMaxDate(s,r.yyi.finish):"SS"===e.type?s=this.getMaxDate(s,r.yyi.start):"FF"===e.type?u=this.getMaxDate(u,r.yyi.finish):"SF"===e.type&&(u=this.getMaxDate(u,r.yyi.start))}return[s,u]},t.prototype.getMaxDate=function(t,n){return s(t)?n:s(n)?t:t.valueOf()<n.valueOf()?n:t},t.prototype.getMinDate=function(t,n){return s(t)?n:s(n)||t.valueOf()<n.valueOf()?t:n},t.prototype.getChildrenScheduleResult=function(t){var n,i,e,r,s,u=!0,o=t.Fpi();if(o&&o.length)for(e=0,r=o;e<r.length;e++){if(!(s=r[e]).yyi||s.myi||s.pyi){u=!1;break}n=this.getMinDate(n,s.yyi.start),i=this.getMaxDate(i,s.yyi.finish)}return[u,n,i]},t.prototype.afterSchedule=function(n){var i,r,s,u,o,h,a,c,f,l,v;for(n=n.slice(1),i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=0,u=n;s<u.length;s++)(o=u[s]).yyi.start&&o.yyi.finish&&(i=Math.min(i,o.yyi.start.valueOf()),r=Math.max(r,o.yyi.finish.valueOf()),"Auto"===o.mode?(o._data.start=e.Calendar.utcToLocal(o.yyi.start),o._data.finish=e.Calendar.utcToLocal(o.yyi.finish),o._data.duration=o.yyi.duration):(h={start:o.start,finish:o.finish,duration:o.duration},"All"!==(a=t.getScheduleDataType(h))&&"Partly"!==a&&"StartOnly"!==a||(o._data.start=e.Calendar.utcToLocal(o.yyi.start)),"All"!==a&&"Partly"!==a&&"FinishOnly"!==a||(o._data.finish=e.Calendar.utcToLocal(o.yyi.finish)),"All"!==a&&"Partly"!==a&&"DurationOnly"!==a||(o._data.duration=o.yyi.duration))),o.wyi=null;c=null,f=null,l=null,i!==Number.POSITIVE_INFINITY&&(c=new Date(i)),r!==Number.NEGATIVE_INFINITY&&(f=new Date(r)),0!==n.length&&c&&f?(v=this.uAi.calendarSettings.defaultDurationUnit,l=this.uAi.calendar.calcDurationUtc(c,f,!1,this.uAi.calendarSettings,v)):(c=c||this.uAi.startDateUtc,f=f||this.uAi.startDateUtc,l=e.DurationHelper.empty(this.uAi.calendarSettings)),this.uAi.root._data.start=e.Calendar.utcToLocal(c),this.uAi.root._data.finish=e.Calendar.utcToLocal(f),this.uAi.root._data.duration=l,this.uAi.finishDateUtc=f,"project"===this.uAi.hyi.autoFitMode&&(this.uAi.hyi.minDate=this.uAi.root._data.start,this.uAi.hyi.maxDate=this.uAi.root._data.finish)},t.prototype.fixDuration=function(t){return t?e.DurationHelper.fromTime(t.time,t.unit,this.uAi.calendarSettings):null},t.getScheduleDataType=function(t){return t.start||t.finish||t.duration?t.start&&t.finish&&t.duration?"All":!t.start||t.finish||t.duration?!t.finish||t.start||t.duration?!t.duration||t.start||t.finish?"Partly":"DurationOnly":"FinishOnly":"StartOnly":"None"},t}(),n.ScheduleManager=u},7234:function(n){n.exports=t.Spread},7335:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d=this&&this.vJr||(b=function(t,n){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},b(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}b(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),b;function m(){return{canUndo:!1,execute:function(t,n){var i,s,h,a,c,f=(0,e._f)(t,n.sheetName);return!!(f&&t.jg().name()===n.sheetName&&f.NMi instanceof r.GanttSheet)&&(i=n.row,s=n.col,(u(i)||u(s))&&(n.row=i=f.getActiveRowIndex(),n.col=s=f.getActiveColumnIndex()),h=n.sheetArea,u(h)&&(n.sheetArea=h=3),(a=f.$go(i,s,h))instanceof o&&(f.showCell(i,s,e.VerticalPosition.nearest,e.HorizontalPosition.nearest),(c=new A(f.NMi,n)).open(),!0))}}}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskPredecessorCellType=void 0,e=i(1376),r=i(5392),s=i(7234),u=s.Common.lt.ht,o=function(t){function n(){var n=t.call(this)||this;return n.typeName="103",n}return d(n,t),n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.TaskPredecessorCellType=o,e.CellTypes.ti[103]=o,h="taskPredecessorCellType",a="data-task-number",c="OpenPredecessor",f="ribbon-dropdowngroup-popup",l="_cellButtonParam",v=window.gcGlobal,A=function(){function t(t,n){var i=this;this.globalMousedownEventHandler=function(t){var n,e;if(i.rf){for(e=n=t.target;e&&e!==i.Wc;)e=e.parentElement;e||(i.close(),t.stopPropagation(),t.preventDefault())}},this.windowResizeEventHandler=function(){i.rf&&i.close()},this.rf=!1,this.lAi=t,this.LEt=n,this.AAi=this.getOriginalValueMap()}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.rf||(v.ef(),this.bindEvent(),this.render(),this.clearPosition(),this.calcPosition(),this.scrollListToCurrentItem(),this.attachExpandButtonClick(),this.rf=!0,this.Wc.tabIndex=-1,this.Wc.style.cssText+="outline:none",this.Wc.focus())},t.prototype.dispose=function(){var t=this;document.removeEventListener("resize",this.windowResizeEventHandler),"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.removeEventListener(n,t.globalMousedownEventHandler,!0)})),this.Ti.parentElement.removeChild(this.Ti),this.Ti=null},t.prototype.close=function(){if(this.rf){this.rf=!1;try{this.setValue()}catch(t){}finally{this.dispose(),this.gAi(),v.cf()}}},t.prototype.gAi=function(){var t,n=this.LEt.row,i=this.LEt.col,e=this.LEt.sheetArea,r=this.sheet.Il(n,i,e).cellButtons;this.sheet&&r&&r.length>0&&(t=this.sheet.Ut.getValueForKey(n,i,l,e))&&t.isMouseDownReservedLocation&&(t.buttonDownIndex=-1,t.isMouseDownReservedLocation=!1,this.sheet.repaint(this.sheet.getCellRect(n,i)))},t.prototype.bindEvent=function(){var t=this;"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.addEventListener(n,t.globalMousedownEventHandler,!0)})),document.addEventListener("resize",this.windowResizeEventHandler)},t.prototype.render=function(){this.Ti=document.createElement("div"),this.Ti.style.cssText="position:absolute; z-index:10000; box-shadow:rgba(0, 0, 0, 0.4) 2px 4px 5px; outline:none",this.Ti.classList.add(f),this.Wc=document.createElement("div"),this.renderList(),this.Ti.appendChild(this.Wc),this.sheet.qc().appendChild(this.Ti)},t.prototype.renderList=function(){var t,n;this.Wc.classList.add("gc-list-control"),this.Wc.style.outline="none",(t=document.createElement("div")).className="gc-list-control-container gc-list-alignment-vertical",t.style.maxHeight="300px",t.style.maxWidth="500px",t.style.overflow="auto",this.Wc.appendChild(t),n=this.project.root,this.renderTaskTree(n,t)},t.prototype.scrollListToCurrentItem=function(){var t,n=this.project.getRowState(this.LEt.row).taskNumber,i=document.querySelector("[".concat(a,'="').concat(n,'"]'));i&&(t=i.parentElement.parentElement.offsetTop,document.querySelector(".gc-list-control-container").scrollTop=t)},t.prototype.attachExpandButtonClick=function(){var t=this;this.Wc.addEventListener("click",(function(n){var i=n.target;i.hasAttribute("data-open")&&(t.setButtonExpandStatus(i,"false"===i.getAttribute("data-open")),n.preventDefault(),n.stopImmediatePropagation())}))},t.prototype.renderTaskTree=function(t,n){var i,e=this,r=this.project.Pki(t),s=document.createElement("div");s.className="gc-list-control-tree",n.appendChild(s),r||this.renderTaskItem(t,!0,s),(i=document.createElement("div")).className="gc-list-control-tree-content gc-list-alignment-vertical",r||(i.style.marginLeft="1.5em"),s.appendChild(i),t.children.forEach((function(t){t.children.length>0?e.renderTaskTree(t,i):e.renderTaskItem(t,!1,i)}))},t.prototype.renderTaskItem=function(t,n,i){var e,r,s,u,o,h=this.project.getRowState(this.LEt.row).task,c=Object.keys(this.AAi).map((function(t){return parseInt(t)})),f=document.createElement("div");f.classList.add("gc-list-control-item"),n&&f.classList.add("gc-list-control-hassubitem"),(e=document.createElement("label")).setAttribute("for","task-".concat(t.taskNumber)),e.className="gc-list-control-tree-text",e.style.display="flex",e.style.alignItems="center",n&&((r=document.createElement("span")).style.display="inline-flex",r.style.transition="0.2s linear",r.style.borderLeft="5px solid transparent",r.style.borderRight="5px solid transparent",r.style.borderTop="6px solid #000",this.setButtonExpandStatus(r,!0),e.appendChild(r)),h&&h.taskNumber===t.taskNumber?((s=document.createElement("span")).id="task-".concat(t.taskNumber),s.style.width="23px",s.style.height="18px",s.style.display="inline-block",s.setAttribute(a,t.taskNumber.toString()),e.appendChild(s),e.style.backgroundColor="#E1E1E1",e.style.cursor="default"):((u=document.createElement("input")).id="task-".concat(t.taskNumber),u.type="checkbox",u.style.marginLeft="5px",u.style.marginRight="5px",u.setAttribute(a,t.taskNumber.toString()),c.indexOf(t.taskNumber)>-1&&(u.checked=!0),e.appendChild(u)),(o=document.createElement("span")).innerText="".concat(t.taskNumber," ").concat(t.name?t.name:""),this.setTextSpanEllipsis(o),e.appendChild(o),f.appendChild(e),i.appendChild(f)},t.prototype.setButtonExpandStatus=function(t,n){for(var i=t;i&&!i.classList.contains("gc-list-control-tree");)i=i.parentElement;n?(t.style.removeProperty("transform"),t.setAttribute("data-open","true"),i&&i.classList.remove("hide-children")):(t.style.transform="rotate(-90deg)",t.setAttribute("data-open","false"),i&&i.classList.add("hide-children"))},t.prototype.setTextSpanEllipsis=function(t){t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.title=t.innerText},t.prototype.clearPosition=function(){this.Ti.style.top=this.Ti.style.bottom=this.Ti.style.left=this.Ti.style.right=""},t.prototype.getTargetRect=function(){var t=1===this.LEt.sheetArea?-1:void 0,n=2===this.LEt.sheetArea?-1:void 0,i=this.sheet.getCellRect(this.LEt.row,this.LEt.col,t,n);return i.x=this.sheet.uw().left+i.x,i.y=this.sheet.uw().top+i.y,i},t.prototype.calcPosition=function(){var t=this.calculateDropDownLocation(),n=this.Ti.offsetParent,i=n.getBoundingClientRect(),e=n===document.body,r=document.documentElement,s=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),u=(window.pageYOffset||r.scrollTop)-(r.clientTop||0);this.Ti.style.left="".concat(t.x-(e?-s:i.left),"px"),this.Ti.style.top="".concat(t.y-(e?-u:i.top),"px")},t.prototype.calculateDropDownLocation=function(){var t,n,i,r=new e.Rect(0,0,window.innerWidth,window.innerHeight),s=this.getTargetRect(),u=s.x+s.width,o=s.y,h=s.y+s.height,a=r.height-h,c=!0,f=this.Wc.offsetHeight,l=this.Wc.offsetWidth;return f>a&&(c=!1),t=u-l,n=0,n=c?h:o-f,(i=new e.Rect(t,n,l,f)).width>r.width?i.x=0:(i.x=Math.max(i.x,0),i.x=Math.min(i.x,r.width-i.width)),i.height>r.height?i.y=0:(i.y=Math.max(i.y,0),i.y=Math.min(i.y,r.height-i.height)),{x:i.x,y:i.y}},t.prototype.getOriginalValueMap=function(){var t=this.sheet.getValue(this.LEt.row,this.LEt.col),n=/^(\d*)[^\d]*$/,i={};return t?(t.split(",").forEach((function(t){if(t.match(n)){var e=t.match(n)[1];i[e]=t.match(n)[0]}})),i):{}},t.prototype.getSelectedValuesInList=function(){var t=this.AAi,n=this.Wc.querySelectorAll(".gc-list-control-item input:checked"),i=[];return n.forEach((function(n){var e=parseInt(n.getAttribute(a));t[e]?i.push(t[e]):i.push(e.toString())})),i.join(",")},t.prototype.setValue=function(){var t,n,i,e,r,s=this.sheet,o=this.getSelectedValuesInList(),h=this.LEt.row,a=this.LEt.col,c=this.LEt.sheetArea;if(s.isEditing()&&s.ci===a&&s.ui===h)t=s.$go(h,a),n={sheet:s,row:h,col:a,sheetArea:c},i=s.Il(h,a,c),e=s.getCellRect(h,a),t.updateEditor(s.li,i,e,n),t.setEditorValue(s.li,o,n);else{if(r=s.getValue(h,a),u(r)&&""===o)return;o!==r&&s.setValue(h,a,o)}},t}(),e.Workbook.ch(h,{init:function(){this.commandManager().register(c,m())}})},7350:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b=this&&this.vJr||(g=function(t,n){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},g(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}g(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),m=this&&this.mJr||function(){return m=Object.assign||function(t){var n,i,e,r;for(i=1,e=arguments.length;i<e;i++)for(r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},m.apply(this,arguments)},g;function w(t,n){return{hour:t,minute:n}}function y(t,n,i,e){return{start:{hour:t,minute:n},end:{hour:i,minute:e}}}function p(){return[]}function T(){return[y(8,0,12,0),y(13,0,17,0)]}Object.defineProperty(n,"__esModule",{value:!0}),n.Calendar=n.CustomWorkWeek=n.WorkWeek=n.DurationHelper=n.CalendarSettings=void 0,e=i(5909),r=i(2749),s=i(4627),u=i(7234),o=i(8869),h=new u.Common.ResourceManager(o.SR,"GanttSheet"),a=h.getResource.bind(h),c=u.Common.lt.ht,f=function(){function t(){this.Upi=w(8,0),this.Bpi=s.DayOfWeek.Sunday,this.Lpi=w(17,0),this.Hpi=8,this.Ypi=40,this.Qpi=20,this.Wpi="Day",this.Gpi=3,this.Vpi=a().GANTT_CALENDAR_UNIT_LABELS,this.zpi=a().GANTT_CALENDAR_UNIT_LABELS_PLURALS,this.propertyChanged=new e.EventList,this.IOProps=["defaultDurationDecimalDigits","defaultDurationUnit","defaultFinishTime","defaultStartTime","daysPerMonth","hoursPerDay","hoursPerWeek","unitLabels","unitLabelsPlurals","weekStartOn"]}return Object.defineProperty(t.prototype,"weekStartOn",{get:function(){return this.Bpi},set:function(t){this.Bpi=t,this.onPropertyChanged("weekStartOn")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStartTime",{get:function(){return this.Upi},set:function(t){this.Upi=t,this.onPropertyChanged("defaultStartTime")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultFinishTime",{get:function(){return this.Lpi},set:function(t){this.Lpi=t,this.onPropertyChanged("defaultFinishTime")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoursPerDay",{get:function(){return this.Hpi},set:function(t){this.Hpi=t,this.onPropertyChanged("hoursPerDay")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoursPerWeek",{get:function(){return this.Ypi},set:function(t){this.Ypi=t,this.onPropertyChanged("hoursPerWeek")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"daysPerMonth",{get:function(){return this.Qpi},set:function(t){this.Qpi=t,this.onPropertyChanged("daysPerMonth")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultDurationUnit",{get:function(){return this.Wpi},set:function(t){this.Wpi=t,this.onPropertyChanged("defaultDurationUnit")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultDurationDecimalDigits",{get:function(){return this.Gpi},set:function(t){this.Gpi=t,this.onPropertyChanged("defaultDurationDecimalDigits")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unitLabels",{get:function(){return this.Vpi},set:function(t){this.Vpi=t,this.onPropertyChanged("unitLabels")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unitLabelsPlurals",{get:function(){return this.zpi},set:function(t){this.zpi=t,this.onPropertyChanged("unitLabelsPlurals")},enumerable:!1,configurable:!0}),t.prototype.onPropertyChanged=function(t){this.propertyChanged.invoke(t)},t.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t.default=new t,t}(),n.CalendarSettings=f,l=function(){function t(){}return t.empty=function(t){var n=0;return this.fromTime(0,t.defaultDurationUnit,t)},t.default=function(t){t=t||f.default;var n=this.getTime(1,"Day",t);return this.fromTime(n,t.defaultDurationUnit,t)},t.parse=function(t,n,i){if(null==t||""===t)return null;var e=null;if("object"==typeof t)e=t;else if("number"==typeof t)e={value:t};else{if("string"!=typeof t)return null;if(e=this.parseText(t,n),c(e))return null}return c(e.unit)&&(e.unit=i||n.defaultDurationUnit),this.normalize(e,n)},t.normalize=function(t,n){var i=t.value,e=t.unit,r=t.time;return e=(e=e?this.parseUnit(e,n):null)||n.defaultDurationUnit,c(r)?c(i)?r=i=0:(i=this.normalizeNumber(i),(r=this.getTime(i,e,n))>this.MaxTime&&(r=this.MaxTime,i=this.getValue(r,e,n))):((r=this.normalizeNumber(r))>this.MaxTime&&(r=this.MaxTime),i=this.getValue(r,e,n)),{value:i,unit:e,time:r}},t.normalizeNumber=function(t){return"number"!=typeof t||isNaN(t)||t<0?0:t},t.parseText=function(t,n){var i,e,r,s,u;return t?((r=(t=t.trim()).search(/[^\d\.\s]/))>=0?(i=t.substr(0,r).trim(),e=t.substr(r)):(i=t,e=null),s=e?this.parseUnit(e,n):null,u=parseFloat(i),isNaN(u)?null:{value:u,unit:s}):null},t.getUnitTextMap=function(){var t,n=this;return this.qpi||(this.qpi={},(t=function(t,i){i.forEach((function(i){n.qpi[i]=t,n.qpi[i+"s"]=t}))})("Minute",a().GANTT_CALENDAR_MINUTE_NAMES),t("Hour",a().GANTT_CALENDAR_HOUR_NAMES),t("Day",a().GANTT_CALENDAR_DAY_NAMES),t("Week",a().GANTT_CALENDAR_WEEK_NAMES),t("Month",a().GANTT_CALENDAR_MONTH_NAMES)),this.qpi},t.parseUnit=function(t,n){var i,e=this.getUnitTextMap()[t.toLowerCase()];if(this.$pi.indexOf(e)>=0)return e;if(n=n||f.default,c(e))for(i=0;i<this.$pi.length;i++)if(t===n.unitLabels[i]||t===n.unitLabelsPlurals[i])return this.$pi[i];return n.defaultDurationUnit},t.format=function(t,n){var i,e,r,s,u,o;if("string"==typeof t)return t;if("object"!=typeof t||null===t)return"";switch(n=n||f.default,i=Math.max(0,Math.min(10,n.defaultDurationDecimalDigits)),e=t.value,r=t.unit,s=Math.pow(10,i),u=(Math.round(e*s)/s).toString(),o=1===e?n.unitLabels:n.unitLabelsPlurals,r){case"Minute":return"".concat(u," ").concat(o[0]);case"Hour":return"".concat(u," ").concat(o[1]);case"Day":return"".concat(u," ").concat(o[2]);case"Week":return"".concat(u," ").concat(o[3]);case"Month":return"".concat(u," ").concat(o[4])}},t.getTime=function(t,n,i){switch(i=i||f.default,n){case"Month":return t*i.daysPerMonth*i.hoursPerDay*this.hourTime;case"Week":return t*i.hoursPerWeek*this.hourTime;case"Day":return t*i.hoursPerDay*this.hourTime;case"Hour":return t*this.hourTime;case"Minute":return t*this.minuteTime;default:return 0}},t.getValue=function(t,n,i){switch(i=i||f.default,n){case"Month":return t/this.hourTime/i.hoursPerDay/i.daysPerMonth;case"Week":return t/this.hourTime/i.hoursPerWeek;case"Day":return t/this.hourTime/i.hoursPerDay;case"Hour":return t/this.hourTime;case"Minute":return t/this.minuteTime;default:return 0}},t.fromValue=function(t,n,i){var e;return{value:t,unit:n,time:this.getTime(t,n,i)}},t.fromTime=function(t,n,i){var e;return{value:this.getValue(t,n,i),unit:n,time:t}},t.minuteTime=6e4,t.hourTime=36e5,t.MaxTime=864e9,t.$pi=["Minute","Hour","Day","Week","Month"],t}(),n.DurationHelper=l,v=function(){function t(t){if(!t||7!==t.length)throw new Error(a().GANTT_INVALID_WORK_DAYS);this.workDays=t}return t.prototype.getWorkDay=function(t){return this.workDays[t]},t.prototype.toJson=function(){return{workDays:this.workDays}},t.prototype.fromJson=function(t){this.workDays=t.workDays},t}(),n.WorkWeek=v,A=function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.start=i,r.finish=e,r}return b(n,t),Object.defineProperty(n.prototype,"start",{get:function(){return this.ak},set:function(t){this.ak=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"finish",{get:function(){return this.oz},set:function(t){this.oz=t},enumerable:!1,configurable:!0}),n.prototype.toJson=function(){return m(m({},t.prototype.toJson.call(this)),{start:this.ak?this.ak.toISOString():null,finish:this.oz?this.oz.toISOString():null})},n.prototype.fromJson=function(n){t.prototype.fromJson.call(this,n),this.ak=n.start?new Date(n.start):null,this.oz=n.finish?new Date(n.finish):null},n}(v),n.CustomWorkWeek=A,d=function(){function t(n,i,e){this.Kpi=[],this.Xpi=[],this.name=n,this.Zpi=i||new v(t.defaultWorkDays()),this.Kpi=e||[]}return Object.defineProperty(t,"standard",{get:function(){return new t(a().GANTT_CALENDAR_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"nightShift",{get:function(){return new t(a().GANTT_CALENDAR_NIGHT_SHIFT,new v([[],[y(23,0,24,0)],[y(0,0,3,0),y(4,0,8,0),y(23,0,24,0)],[y(0,0,3,0),y(4,0,8,0),y(23,0,24,0)],[y(0,0,3,0),y(4,0,8,0),y(23,0,24,0)],[y(0,0,3,0),y(4,0,8,0),y(23,0,24,0)],[y(0,0,3,0),y(4,0,8,0)]]))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"hours24",{get:function(){return new t(a().GANTT_CALENDAR_24HOURS,new v([0,1,2,3,4,5,6].map((function(){return[y(0,0,24,0)]}))))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},set:function(t){this.Zc=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultWorkWeek",{get:function(){return this.Zpi},set:function(t){this.Zpi=t,this.invalidDateWorkCache()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customWorkWeeks",{get:function(){return this.Kpi},set:function(t){this.Kpi=t,this.invalidDateWorkCache()},enumerable:!1,configurable:!0}),t.defaultWorkDays=function(){return[[],T(),T(),T(),T(),T(),[]]},t.copyWorkDays=function(t){var n,i,e=[];for(n=0;n<7;n++)i=t.getWorkDay(n),e[n]=i.map((function(t){return y(t.start.hour,t.start.minute,t.end.hour,t.end.minute)}));return e},t.prototype.copyTo=function(n){return new t(n,new v(t.copyWorkDays(this.defaultWorkWeek)),this.customWorkWeeks.map((function(n){return new A(t.copyWorkDays(n),new Date(n.start.valueOf()),new Date(n.finish.valueOf()))})))},t.utcToLocal=function(t){return t?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()):null},t.localToUTC=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t.diffDaysUtc=function(t,n){var i;return(n.valueOf()-t.valueOf())/this.millisecondsPerDay},t.prototype.invalidDateWorkCache=function(){this.Xpi=[]},t.prototype.getDateIndex=function(n){return Math.floor(n/t.millisecondsPerDay)},t.prototype.getTimeInDay=function(n){if("number"==typeof n){var i=n%t.millisecondsPerDay;return i<0&&(i=t.millisecondsPerDay+i),i}return 60*(60*n.hour+n.minute)*1e3},t.prototype.getDateValue=function(n){return n*t.millisecondsPerDay},t.prototype.getDateWork=function(t){var n,i,e=this.Xpi[t];return e||(n=this.getDateWorkCore(t),e={total:i=this.getWorkDayTotal(n),work:n},this.Xpi[t]=e),e},t.prototype.getDateWorkFallback=function(){var t,n;for(t=2;t<9;t++)if(n=this.defaultWorkWeek.getWorkDay(t%7),this.getWorkDayTotal(n)>0)return n;return T()},t.prototype.getDateWorkCore=function(t){var n,i,e,r,s=this.getDateValue(t);for(i=this.customWorkWeeks.length-1;i>=0;i--)if((e=this.customWorkWeeks[i]).start.valueOf()<=s&&e.finish.valueOf()>=s){n=e;break}return(r=(t+4)%7)<0&&(r+=7),(n=n||this.defaultWorkWeek).getWorkDay(r)},t.prototype.getWorkDayTotal=function(t){var n=0;return t.forEach((function(t){var i=t.start,e=t.end;n+=60*(60*e.hour+e.minute-60*i.hour-i.minute)*1e3})),n},t.prototype.calcDurationUtc=function(t,n,i,e,r){var s,u,o,h,a,c,f,v;if(r=r||e.defaultDurationUnit,s=t.valueOf(),(u=n.valueOf())<=s)return l.fromTime(0,r,e);if(o=this.getDateIndex(s),h=this.getDateIndex(u),a=this.getTimeInDay(s),c=this.getTimeInDay(u),f=0,o===h)f+=this.calcDurationInDate(o,a,c,i);else if(o<h){for(f+=this.calcDurationInDate(o,a,null,i),v=o+1;v<h;v++)f+=this.getDateWork(v).total;f+=this.calcDurationInDate(h,null,c,i)}return l.fromTime(f,r,e)},t.prototype.calcDurationInDate=function(n,i,e,r){var s,u,o,h,a,f,l,v,A,d;if(null!==i&&null!==e&&i>=e)return 0;if(u=(s=this.getDateWork(n)).work,0===s.total){if(!r)return 0;u=this.getDateWorkFallback()}for(c(i)&&(i=e<(o=this.getTimeInDay(u[0].start))?0:o),c(e)&&(e=i>(h=this.getTimeInDay(u[u.length-1].end))?t.millisecondsPerDay:h),a=0,f=!0,l=0;l<u.length;l++)if(v=u[l],!(i>(A=this.getTimeInDay(v.end)))){if(i<(d=this.getTimeInDay(v.start))){if(e<d)return r&&(a+=e-i),a;f&&r&&(a+=d-i),i=d}if(e<=A)return a+=e-Math.max(i,d);a+=A-Math.max(i,d),i=A,f=!1}return r&&(a+=e-i),a},t.prototype.addDuration=function(n,i,e,r,s){var u=t.localToUTC(n);return t.utcToLocal(this.addDurationUtc(u,i,e,r,s))},t.prototype.addDurationUtc=function(t,n,i,e,r){var s,u,o,h;if(s=(n=l.parse(n,r||f.default)).time,u=this.getDateIndex(t.valueOf()),o=this.getTimeInDay(t.valueOf()),i)for(;;){if("number"!=typeof(h=this.addDurationUtcForwardInDay(u,o,s,e)))return h;o=null,s=h,u++}else for(;;){if("number"!=typeof(h=this.addDurationUtcBackwardInDay(u,o,s,e)))return h;o=null,s=h,u--}},t.prototype.addDurationUtcForwardInDay=function(n,i,e,r){var s,u,o,h,a,f,l=this.getDateWork(n),v=l.work;if(c(i)){if(e>l.total)return e-l.total;if(e===l.total)return r?0:this.createDate(n,this.getTimeInDay(v[v.length-1].end));i=this.getTimeInDay(v[0].start)}else if(0===l.total){if(r)return 0;v=this.getDateWorkFallback()}if(!r&&i>(s=this.getTimeInDay(v[v.length-1].end)))return i+e<=(s=t.millisecondsPerDay)?this.createDate(n,i+e):e-=s-i;for(u=!!r,o=0;o<v.length;o++)if(h=v[o],!(i>(a=this.getTimeInDay(h.end)))){if(i<(f=this.getTimeInDay(h.start))){if(!u){if(i+e<=f)return this.createDate(n,i+e);e-=f-i}i=f}if(r?i+e<a:i+e<=a)return this.createDate(n,i+e);e-=a-i,i=a,u=!0}return e},t.prototype.addDurationUtcBackwardInDay=function(t,n,i,e){var r,s,u,o,h,a,f=this.getDateWork(t),l=f.work;if(c(n)){if(i>f.total)return i-f.total;if(i===f.total)return e?this.createDate(t,this.getTimeInDay(l[0].start)):0;n=this.getTimeInDay(l[l.length-1].end)}else if(0===f.total){if(!e)return 0;l=this.getDateWorkFallback()}if(e&&n<(r=this.getTimeInDay(l[0].start)))return n-i>=(r=0)?this.createDate(t,n-i):i-=n-r;for(s=!e,u=l.length-1;u>=0;u--)if(o=l[u],!(n<(h=this.getTimeInDay(o.start)))){if(n>(a=this.getTimeInDay(o.end))){if(!s){if(n-i>=a)return this.createDate(t,n-i);i-=n-a}n=a}if(e?n-i>=h:n-i>h)return this.createDate(t,n-i);i-=n-h,n=h,s=!0}return i},t.prototype.createDate=function(n,i){return new Date(n*t.millisecondsPerDay+i)},t.prototype.isNonWorkingArea=function(t,n){var i;return 0===this.calcDurationUtc(t,n,!1,f.default).time},t.prototype.isWorkingDay=function(t){var n=this.getDateIndex(t.valueOf()),i=this.getDateWork(n);return i.total>0},t.prototype.toJson=function(){return{name:this.Zc,defaultWorkWeek:this.Zpi.toJson(),customWorkWeeks:this.Kpi.map((function(t){return t.toJson()}))}},t.prototype.fromJson=function(t){this.Zc=t.name,t.defaultWorkWeek&&(this.Zpi=new v(t.defaultWorkWeek.workDays),this.Zpi.fromJson(t.defaultWorkWeek)),t.customWorkWeeks&&Array.isArray(t.customWorkWeeks)&&(this.Kpi=t.customWorkWeeks.map((function(t){var n=new A(t.workDays,new Date(t.start),new Date(t.finish));return n.fromJson(t),n}))),this.invalidDateWorkCache()},t.millisecondsPerDay=864e5,t}(),n.Calendar=d},7404:function(t,n,i){var e=this&&this.hJr||(Object.create?function(t,n,i,e){void 0===e&&(e=i);var r=Object.getOwnPropertyDescriptor(n,i);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,e,r)}:function(t,n,i,e){void 0===e&&(e=i),t[e]=n[i]}),r=this&&this.dJr||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i(4943),r(i(1264),n),r(i(7350),n),r(i(6324),n),r(i(2187),n),r(i(237),n),r(i(670),n),r(i(8943),n),r(i(7632),n),r(i(3018),n),r(i(8136),n),r(i(9293),n),r(i(649),n),r(i(1805),n),r(i(3745),n),r(i(5392),n),r(i(9663),n),r(i(4755),n),r(i(8869),n),r(i(4627),n)},7632:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O=this&&this.vJr||(S=function(t,n){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},S(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}S(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),S;function k(t){return t.start&&t.finish&&!!t.duration}function M(t){return!t.start&&!t.finish&&!!t.duration}function j(t){return t.start&&!t.finish&&!t.duration}function _(t){return!t.start&&t.finish&&!t.duration}function D(t){return t.startDisplayed.valueOf()!==t.finishDisplayed.valueOf()}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarStyleManager=n.TaskbarStyleRule=void 0,e=i(5909),r=i(7234),s=r.Common.lt.ht,u=function(){function t(t){this.tji=new e.EventList,this.Zc=t}return Object.defineProperty(t.prototype,"typeName",{get:function(){return this.Nts},set:function(t){this.Nts=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.RN},set:function(t){this.RN=t,this.tji.invoke()},enumerable:!1,configurable:!0}),t.prototype.match=function(t){return!1},t.prototype.getFromDate=function(t){return t.startDisplayed},t.prototype.getToDate=function(t){return t.finishDisplayed},t.prototype.getScale=function(t){return 1},t.prototype.toJSON=function(){return{name:this.name,style:this.style,typeName:this.typeName}},t.prototype.fromJSON=function(t){this.style=t.style},t}(),n.TaskbarStyleRule=u,o=function(t){function n(){var n=t.call(this,"task")||this;return n.style={taskbarStyle:{middlePattern:"solidFill",middleShape:"rectangleBar",middleColor:"#8abbed"}},n}return O(n,t),n.prototype.match=function(t){return t.isNormal&&!t.isManuallyScheduled&&D(t)},n}(u),h=function(t){function n(){var n=t.call(this,"milestone")||this;return n.style={taskbarStyle:{startColor:"#636363",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return O(n,t),n.prototype.match=function(t){return t.isMilestone&&!t.isManuallyScheduled},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),a=function(t){function n(){var n=t.call(this,"summary")||this;return n.style={taskbarStyle:{startColor:"#545454",startShape:"lineShape",startType:"solid",middleColor:"#545454",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#545454"}},n}return O(n,t),n.prototype.match=function(t){return t.isSummary&&t.taskNumber>0&&!t.isManuallyScheduled&&D(t)},n}(u),c=function(t){function n(){var n=t.call(this,"progress")||this;return n.style={taskbarStyle:{middleColor:"#3B87D4",middleShape:"rectangleMiddle",middlePattern:"solidFill"}},n}return O(n,t),n.prototype.match=function(t){return t.isNormal&&!t.isManuallyScheduled},n.prototype.getScale=function(t){return t.complete},n}(u),f=function(t){function n(){var n=t.call(this,"projectSummary")||this;return n.style={taskbarStyle:{startColor:"#B6B6B6",startShape:"lineShape",startType:"solid",middleColor:"#B6B6B6",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#B6B6B6"}},n}return O(n,t),n.prototype.match=function(t){return 0===t.taskNumber&&D(t)},n}(u),l=function(t){function n(){var n=t.call(this,"manualTask")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"lineShape",startType:"solid",middleColor:"#74CCD4",middlePattern:"solidFill",middleShape:"rectangleBar",endShape:"lineShape",endType:"solid",endColor:"#2BA3AD"}},n}return O(n,t),n.prototype.match=function(t){return t.isNormal&&t.isManuallyScheduled&&k(t)&&D(t)},n}(u),v=function(t){function n(){var n=t.call(this,"manualSummary")||this;return n.style={taskbarStyle:{startColor:"#545454",startShape:"lineShape",startType:"solid",middleColor:"#545454",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#545454"}},n}return O(n,t),n.prototype.match=function(t){return t.isSummary&&t.taskNumber>0&&t.isManuallyScheduled&&k(t)&&D(t)},n}(u),A=function(t){function n(){var n=t.call(this,"manualProgress")||this;return n.style={taskbarStyle:{middleColor:"#2BA3AD",middleShape:"rectangleMiddle",middlePattern:"solidFill"}},n}return O(n,t),n.prototype.match=function(t){return t.isNormal&&t.isManuallyScheduled},n.prototype.getScale=function(t){return t.complete},n}(u),d=function(t){function n(){var n=t.call(this,"manualMilestone")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return O(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&k(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),b=function(t){function n(){var n=t.call(this,"durationOnly")||this;return n.style={taskbarStyle:{startColor:"#FFFFFF",startShape:"leftFade",startType:"solid",middleColor:"#74CCD4",middlePattern:"solidFill",middleShape:"rectangleBar",endShape:"rightFade",endType:"solid",endColor:"#FFFFFF"}},n}return O(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&M(t)&&D(t)},n}(u),m=function(t){function n(){var n=t.call(this,"startOnly")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"leftBracket",startType:"solid"}},n}return O(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&j(t)},n.prototype.getToDate=function(t){return t.startDisplayed},n}(u),g=function(t){function n(){var n=t.call(this,"finishOnly")||this;return n.style={taskbarStyle:{endShape:"rightBracket",endType:"solid",endColor:"#2BA3AD"}},n}return O(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&_(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),w=function(t){function n(){var n=t.call(this,"durationOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"finishDisplayed"}},n}return O(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&M(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),y=function(t){function n(){var n=t.call(this,"startOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"start"}},n}return O(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&j(t)},n.prototype.getToDate=function(t){return t.startDisplayed},n}(u),p=function(t){function n(){var n=t.call(this,"finishOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return O(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&_(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),T=function(){function t(t){this.uAi=t,this.uAi.Lmi.attach(this.invalidateTextStates,this),this.qK=new e.Collection([new o,new h,new a,new f,new l,new d,new b,new v,new m,new g,new w,new y,new p,new c,new A]),this.qK.nji.attach(this.onRulesChanged,this),this.Its=new Map(this.qK.all().map((function(t,n){return[t.name,n]})))}return Object.defineProperty(t.prototype,"rules",{get:function(){return this.qK},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTopText",{get:function(){return this.getTextStates().hasTopText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasLeftText",{get:function(){return this.getTextStates().hasLeftText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasBottomText",{get:function(){return this.getTextStates().hasBottomText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRightText",{get:function(){return this.getTextStates().hasRightText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasInsideText",{get:function(){return this.getTextStates().hasInsideText},enumerable:!1,configurable:!0}),t.prototype.getBarStyleRuleForTask=function(t){var n=this,i=this.getMatchedRulesForTask(t);return i.map((function(i){var e=i.name,r=i.match,s=i.getFromDate,u=i.getToDate,o=i.getScale,h=t.style?t.style[i.name]:null,a=n.mergeStyle(h,i.style);return{name:e,match:r,getFromDate:s,getToDate:u,getScale:o,style:a}}))},t.prototype.getTaskTextStates=function(t){var n=this;if(!(t<0||t>=n.uAi.Vp.length))return n.Bts(),n.Ots.get(t)},t.prototype.Bts=function(){var t=this;t.Ots||(t.Ots=new Map,t.uAi.Vp.forEach((function(n){var i=n.getBarStyleRules(),e=i.map((function(t){var n;return null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.taskbarStyle})).filter(Boolean),r={hasTopText:e.some((function(t){return!!t.topText})),hasBottomText:e.some((function(t){return!!t.bottomText})),hasRightText:e.some((function(t){return!!t.rightText})),hasLeftText:e.some((function(t){return!!t.leftText})),hasInsideText:e.some((function(t){return!!t.insideText}))};t.Ots.set(n.taskNumber,r)})))},t.prototype.mergeStyle=function(t,n){return{taskbarStyle:this.mergeCustomToRuleStyle(null==t?void 0:t.taskbarStyle,null==n?void 0:n.taskbarStyle),gridStyle:this.mergeCustomToRuleStyle(null==t?void 0:t.gridStyle,null==n?void 0:n.gridStyle)}},t.prototype.mergeCustomToRuleStyle=function(t,n){var i,e=Object.assign({},t||{},n||{});if(!s(t))for(i in t)s(t[i])||(e[i]=t[i]);return e},t.prototype.getMatchedRulesForTask=function(t){var n=this,i=function(t){var i=n.Its.has(t)?t:"task";return n.Its.get(i)};return this.rules.all().filter((function(n){return n.match(t)})).map((function(t){return{rule:t,order:i(t.name)}})).sort((function(t,n){return t.order-n.order})).map((function(t){return t.rule}))},t.prototype.onRulesChanged=function(){this.eji=null,this.Ots=null,this.uAi.Rmi.invoke()},t.prototype.invalidateTextStates=function(){this.eji=null,this.Ots=null},t.prototype.getTextStates=function(){if(s(this.eji)){var t=this.getAllTaskActualTextState();this.eji={hasTopText:t.some((function(t){return t.hasTopText})),hasBottomText:t.some((function(t){return t.hasBottomText})),hasRightText:t.some((function(t){return!!t.hasRightText})),hasLeftText:t.some((function(t){return!!t.hasLeftText})),hasInsideText:t.some((function(t){return!!t.hasInsideText}))}}return this.eji},t.prototype.getAllTaskActualTextState=function(){var t=this;return t.Bts(),Array.from(t.Ots.values())},t}(),n.TaskbarStyleManager=T},8026:function(n){n.exports=t.Spread.Sheets.ContextMenu},8136:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m=this&&this.vJr||(g=function(t,n){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},g(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}g(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),g;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarCellType=n.TipSettings=void 0,e=i(7234),r=i(1376),s=i(4448),u=i(2749),o=i(5835),h=i(4627),a=i(8869),c=i(3065),f=new e.Common.ResourceManager(a.SR,"GanttSheet"),l=f.getResource.bind(f),v=r.mt.vi,A=r.CellTypes.Base,d=function(){function t(t){this.className=t}return t.prototype.getContent=function(){return'\n <div class="'.concat(this.className,'" style="padding:4px;font-size:14px;color:black;max-width:500px">\n <div style="overflow:hidden;text-overflow:ellipsis;">\n <div class="gantt-tip-title" style="text-align:center">').concat(s.GanttUtil.encodeHtml(this.title),"</div>\n ").concat(this.getBodyString(),"\n </div>\n </div>")},t.prototype.getBodyString=function(){var t,n="";for(t in this.body)this.body.hasOwnProperty(t)&&(n+='<div>\n <span class="gantt-tip-key">'.concat(s.GanttUtil.encodeHtml(this.body[t][0]),'</span>\n <span class="gantt-tip-value">').concat(s.GanttUtil.encodeHtml(this.body[t][1]),"</span>\n </div>"));return n},t.prototype.addTaskTipItems=function(t,n){var i=this;this.body||(this.body=[]),n.forEach((function(n){i.addTaskItemDictionary[n]&&i.addTaskItemDictionary[n](t)}))},Object.defineProperty(t.prototype,"addTaskItemDictionary",{get:function(){var t=this;return{name:function(n){t.addNameItem(n)},start:function(n){t.addStartItem(n)},finish:function(n){t.addFinishItem(n)},duration:function(n){t.addDurationItem(n)},"%complete":function(n){t.addCompleteTextItem(n)},completeThrough:function(n){t.addCompleteThroughItem(n)}}},enumerable:!1,configurable:!0}),t.prototype.addNameItem=function(t){t.name?this.body.push([l().GANTT_ACTION_TASK_COLON,t.name]):this.body.push([l().GANTT_ACTION_TASK_COLON,l().GANTT_TASK_BAR_UNNAMED])},t.prototype.addStartItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);this.body.push([l().GANTT_ACTION_TASK_START,n.format(t.startDisplayed)])},t.prototype.addFinishItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);this.body.push([l().GANTT_ACTION_TASK_FINISH,n.format(t.finishDisplayed)])},t.prototype.addDurationItem=function(t){t.duration&&this.body.push([l().GANTT_ACTION_DURATION,t.project.formatDuration(t.duration)])},t.prototype.addCompleteThroughItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);t.completeThrough&&this.body.push([l().GANTT_TASK_BAR_COMPLETE_THROUGH,n.format(t.completeThrough)])},t.prototype.addCompleteTextItem=function(t){var n=new e.Formatter.GeneralFormatter("0%");this.body.push([l().GANTT_TASK_BAR_COMPLETE,n.format(t.complete)])},t.getDefaultTaskHoverTipItems=function(t){switch(t){case"progress":case"manualProgress":return["name","start","completeThrough","duration","%complete"];case"milestone":case"manualMilestone":case"finishOnlyMilestone":case"durationOnlyMilestone":case"finishOnly":return["name","finish"];case"startOnly":case"startOnlyMilestone":return["name","start"];default:return["name","start","finish","duration"]}},t}(),n.TipSettings=d,b=function(t){function n(n){void 0===n&&(n=0);var i=t.call(this)||this;return i.typeName="106",i.IOProps=["typeName","leftTextStyle","topTextStyle","rightTextStyle","bottomTextStyle","insideTextStyle","showDefaultTips","allowMoveOrResizeTask","allowLinkTask","allowChangeProgress","allowDragNewTask"],i.leftTextStyle={},i.topTextStyle={},i.rightTextStyle={},i.bottomTextStyle={},i.insideTextStyle={},i.showDefaultTips=!0,i.allowMoveOrResizeTask=!0,i.allowLinkTask=!0,i.allowChangeProgress=!0,i.allowDragNewTask=!0,i.dAi=n,i}return m(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.cAi=function(t){return t.row-this.dAi},n.prototype.An=function(t,n,i){return t.clone()},n.prototype.paintValue=function(t,n,i,e,r,s,u,o){var a,f,l,v,A=o.sheet,d=this.oAi(o);t&&d&&r>0&&s>0&&(t.save(),t.rect(i,e,r,s),t.clip(),a=this.cAi(o),f=d.getTaskByRow(a),l=A.NMi.lki,o.offsetX=0,v=c.GanttZoomHelper.getTotalZoomFactor(o),l.paintTask(t,f,i,e,r,s,u,o,this,this.paintTextCore),l.paintLinkLines(t,d,f,a,i,e,r,s,v),this.barAction&&this.barAction.actionStatus===h.ActionStatus.InProgress&&l.paintActionPending(t,this.barAction,v),t.restore())},n.prototype.paintTextCore=function(n,i,e,r,s,u,o,h){t.prototype.paintValue.call(this,n,i,e,r,s,u,o,h)},n.prototype.getHitInfo=function(t,n,i,e,s){var u,o,h,a,c,f;return s&&s.sheetArea===r.SheetArea.viewport&&e?(u=s.sheetArea,o=e.x,h=e.x+e.width,a=e.y,c=e.y+e.height,f={x:t,y:n,row:s.row,col:s.col,cellRect:e,sheetArea:u,sheet:s.sheet,cellStyle:i},o<=t&&t<=h&&a<=n&&n<=c&&(f.isReservedLocation=!0),f):null},n.prototype.processMouseDown=function(t){var n,i,e=t&&t.sheet;if(!e||!t.isReservedLocation)return!1;(n=this.oAi(t))&&((i=o.BarActionBuilder.getBarHitInfo(n,this,t)).task&&(e.clearSelection(),e.setActiveCell(t.row,t.col),e.addSelection(t.row,0,1,e.getColumnCount()-1)),this.barAction=o.BarActionBuilder.getHitAction(n,this,i),this.barAction&&this.barAction.start())},n.prototype.processMouseMove=function(t){var n,i,e,r,s,u,a,c=t&&t.sheet;if(!c||!t.isReservedLocation)return!1;(n=this.oAi(t))&&(this.barAction||(e=void 0,(i=o.BarActionBuilder.getBarHitInfo(n,this,t))&&i.task?(o.BarActionBuilder.updateCursorByBarHitInfo(c.Dg(),n,this,i),e=this.bAi(i.task,i.style),r={task:i.task,partName:i.style.name,tip:e},c.ki(h.GanttSheetEvent.Event_HoverOnBar,r),e=r.tip):(o.BarActionBuilder.updateCursorStyle(c.Dg(),h.CursorStyle.Default),(s=this.mAi(t))&&(r={dependency:s,tip:e=this.pAi(s)},c.ki(h.GanttSheetEvent.Event_HoverOnLink,r),e=r.tip)),e&&this.showDefaultTips&&(u=e.getContent(),(a=c.parent).Tw(u,0,0),a.R3.style.whiteSpace="normal",a.ny(u,t.x-25-a.R3.offsetWidth,t.y-25))))},n.prototype.bAi=function(t,n){var i,e;if(t&&n)return(e=new d((i="gc-gantt-hover-on-")+n.name)).title=n.name,e.addTaskTipItems(t,d.getDefaultTaskHoverTipItems(n.name)),e},n.prototype.pAi=function(t){var n,i;if(t)return(i=new d((n="gc-gantt-hover-on-")+"link")).title="",i.body=[[l().GANTT_TASK_BAR_TASK_LINK,this.getDependencyTypeText(t.type)],[l().GANTT_TASK_BAR_FROM,"(ID ".concat(t.from.taskNumber,") ").concat(t.from.name)],[l().GANTT_TASK_BAR_TO,"(ID ".concat(t.to.taskNumber,") ").concat(t.to.name)]],i},n.prototype.getDependencyTypeText=function(t){switch(t){case"FS":return l().GANTT_TASK_BAR_FS;case"FF":return l().GANTT_TASK_BAR_FF;case"SF":return l().GANTT_TASK_BAR_SF;case"SS":return l().GANTT_TASK_BAR_SS}},n.prototype.mAi=function(t){var n,i,e,r,s=t&&t.sheet,u=s.NMi.lki,o=this.cAi(t),h=u.getLinkLines(o,t.cellRect);for(i=0,e=h;i<e.length;i++)(r=e[i]).contains({x:t.x,y:t.y})&&(n=r.data);return n},n.prototype.isReservedKey=function(t,n){return 32===t.keyCode&&!t.ctrlKey&&!t.shiftKey&&!t.altKey},n.prototype.getAutoFitWidth=function(t,n,i,e,r){var s,u,o,h,a,c,f,l,v,A,d,b,m=r.sheet,g=m.NMi,w=g.gp();if(w)return g.wAi()*e;if(s=m.ot().width,u=0,o=m.OF())for(h=0,a=o;h<a.length;h++)u+=f=(c=a[h]).width;if(l=0,v=m.m9())for(A=g.getGanttColumnIndex(),d=0,b=v;d<b.length;d++)(c=b[d]).col!==A&&(l+=f=c.width);return s-u-l},n.prototype.getAutoFitHeight=function(n,i,e,r,s){var u=s.sheet.NMi.lki;return u?u.getBarStyleRowHeight()*r:t.prototype.getAutoFitHeight.call(this,n,i,e,r,s)},n.prototype.QD=function(t){this.isReservedKey(t)&&v(t)},n.prototype.isImeAware=function(t){return!1},n.prototype.jn=function(t){},n.prototype.Ke=function(){},n.prototype.toJSON=function(){return u.GanttSheetJsonConverter.toJSON(this,this.IOProps)},n.prototype.fromJSON=function(t){u.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},n.prototype.activeOnClick=function(){return!1},n}(A),n.TaskbarCellType=b,r.CellTypes.ti[106]=b},8561:function(t,n,i){var e,r;for(r in Object.defineProperty(n,"__esModule",{value:!0}),n.GANTT_ACTION_FROM_OF=n.GANTT_ACTION_FINISH_LINK=n.GANTT_ACTION_START_LINK=n.GANTT_ACTION_TASK_FINISH=n.GANTT_ACTION_TASK_START=n.GANTT_ACTION_FINISH=n.GANTT_ACTION_START=n.GANTT_ACTION_TASK_COLON=n.GANTT_ACTION_TASK=n.DEFAULT_DATE_TIME_FORMAT=n.GANTT_VALUE_READONLY=n.GANTT_VALUE_INVALID=n.GANTT_INVALID_ASCENDING_STATES=n.GANTT_INVALID_FIELD=n.GANTT_INVALID_TASK_LEVEL=n.GANTT_INVALID_TASK_PARENT_ID=n.GANTT_INVALID_TASK_ID=n.GANTT_INVALID_WORK_DAYS=n.GANTT_INVALID_UNIT=n.GANTT_INVALID_DEPENDENCY=n.GANTT_INVALID_TASK=n.GANTT_INVALID_COUNT=n.GANTT_INVALID_INDEX=n.GANTT_INVALID_ROW_INDEX=n.GANTT_INVALID_ID=n.GANTT_INVALID_LEVEL=n.GANTT_INVALID_OPERATION=n.GANTT_TASK_SCHEDULE_MODE_AUTO=n.GANTT_TASK_SCHEDULE_MODE_MANUALLY=n.GANTT_COMPLETE_CHANGE=n.GANTT_COMPLETE=n.GANTT_SUCCESSORS=n.GANTT_PREDECESSORS=n.GANTT_FINISH_DISPLAYED=n.GANTT_START_DISPLAYED=n.GANTT_FINISH=n.GANTT_START=n.GANTT_DURATION=n.GANTT_MODE=n.GANTT_MILESTONE=n.GANTT_TASK_NAME=n.GANTT_TASK_NUMBER=n.GANTT_NEW_MILESTONE=n.GANTT_NEW_SUMMARY_TASK=n.GANTT_NEW_TASK=n.GANTT_MINUTE=n.GANTT_HOUR=n.GANTT_DAY=n.GANTT_WEEK=n.GANTT_MONTH=void 0,n.GANTT_CALENDAR_UNIT_LABELS_PLURALS=n.GANTT_CALENDAR_UNIT_LABELS=n.GANTT_CALENDAR_MONTH_NAMES=n.GANTT_CALENDAR_MONTH=n.GANTT_CALENDAR_WEEK_NAMES=n.GANTT_CALENDAR_WEEK=n.GANTT_CALENDAR_DAY_NAMES=n.GANTT_CALENDAR_DAY=n.GANTT_CALENDAR_HOUR_NAMES=n.GANTT_CALENDAR_HOUR=n.GANTT_CALENDAR_MINUTE_NAMES=n.GANTT_CALENDAR_MINUTE=n.GANTT_CALENDAR_24HOURS=n.GANTT_CALENDAR_NIGHT_SHIFT=n.GANTT_CALENDAR_STANDARD=n.GANTT_TASK_BAR_COMPLETE=n.GANTT_TASK_BAR_COMPLETE_THROUGH=n.GANTT_TASK_BAR_UNNAMED=n.GANTT_TASK_BAR_SS=n.GANTT_TASK_BAR_SF=n.GANTT_TASK_BAR_FF=n.GANTT_TASK_BAR_FS=n.GANTT_TASK_BAR_TO=n.GANTT_TASK_BAR_FROM=n.GANTT_TASK_BAR_TASK_LINK=n.GANTT_ACTION_LINE_TIP_TITLE=n.GANTT_ACTION_COMPLETE_THROUGH=n.GANTT_ACTION_DURATION=n.GANTT_ACTION_FINISH_ONLY=n.GANTT_ACTION_START_ONLY=n.GANTT_ACTION_TO_OF=void 0,n.GANTT_MONTH="Month",n.GANTT_WEEK="Week",n.GANTT_DAY="Day",n.GANTT_HOUR="Hour",n.GANTT_MINUTE="Minute",n.GANTT_NEW_TASK="<New Task>",n.GANTT_NEW_SUMMARY_TASK="<New Summary Task>",n.GANTT_NEW_MILESTONE="<New Milestone>",n.GANTT_TASK_NUMBER="Task Number",n.GANTT_TASK_NAME="Task Name",n.GANTT_MILESTONE="Milestone",n.GANTT_MODE="Mode",n.GANTT_DURATION="Duration",n.GANTT_START="Start",n.GANTT_FINISH="Finish",n.GANTT_START_DISPLAYED="StartDisplayed",n.GANTT_FINISH_DISPLAYED="FinishDisplayed",n.GANTT_PREDECESSORS="Predecessors",n.GANTT_SUCCESSORS="Successors",n.GANTT_COMPLETE="% Complete",n.GANTT_COMPLETE_CHANGE="Complete Through",n.GANTT_TASK_SCHEDULE_MODE_MANUALLY="Manual",n.GANTT_TASK_SCHEDULE_MODE_AUTO="Auto",n.GANTT_INVALID_OPERATION="invalidOperation",n.GANTT_INVALID_LEVEL="invalidLevel",n.GANTT_INVALID_ID="invalidId",n.GANTT_INVALID_ROW_INDEX="invalidRowIndex",n.GANTT_INVALID_INDEX="invalidIndex",n.GANTT_INVALID_COUNT="invalidCount",n.GANTT_INVALID_TASK="invalidTask",n.GANTT_INVALID_DEPENDENCY="invalidDependency",n.GANTT_INVALID_UNIT="invalidUnit",n.GANTT_INVALID_WORK_DAYS="invalidWorkDays",n.GANTT_INVALID_TASK_ID="invalidTaskId",n.GANTT_INVALID_TASK_PARENT_ID="invalidTaskParentId",n.GANTT_INVALID_TASK_LEVEL="invalidTaskLevel",n.GANTT_INVALID_FIELD="invalidField",n.GANTT_INVALID_ASCENDING_STATES="invalidAscendingStates",n.GANTT_VALUE_INVALID="valueInvalid",n.GANTT_VALUE_READONLY="valueReadonly",n.DEFAULT_DATE_TIME_FORMAT="yy-mm-dd h:mm",n.GANTT_ACTION_TASK="Task",n.GANTT_ACTION_TASK_COLON="Task:",n.GANTT_ACTION_START="Start:",n.GANTT_ACTION_FINISH="Finish:",n.GANTT_ACTION_TASK_START="Task Start:",n.GANTT_ACTION_TASK_FINISH="Task Finish:",n.GANTT_ACTION_START_LINK="Start",n.GANTT_ACTION_FINISH_LINK="Finish",n.GANTT_ACTION_FROM_OF="From {0} Of:",n.GANTT_ACTION_TO_OF="To {0} Of:",n.GANTT_ACTION_START_ONLY="StartOnly",n.GANTT_ACTION_FINISH_ONLY="FinishOnly",n.GANTT_ACTION_DURATION="Duration:",n.GANTT_ACTION_COMPLETE_THROUGH="CompleteThrough:",n.GANTT_ACTION_LINE_TIP_TITLE="{0} to {1} Link",n.GANTT_TASK_BAR_TASK_LINK="Task Link:",n.GANTT_TASK_BAR_FROM="From:",n.GANTT_TASK_BAR_TO="To:",n.GANTT_TASK_BAR_FS="Finish-to-Start (FS)",n.GANTT_TASK_BAR_FF="Finish-to-Finish (FF)",n.GANTT_TASK_BAR_SF="Start-to-Finish (SF)",n.GANTT_TASK_BAR_SS="Start-to-Start (SS)",n.GANTT_TASK_BAR_UNNAMED="Unnamed",n.GANTT_TASK_BAR_COMPLETE_THROUGH="Complete Through:",n.GANTT_TASK_BAR_COMPLETE="% Complete:",n.GANTT_CALENDAR_STANDARD="Standard",n.GANTT_CALENDAR_NIGHT_SHIFT="Night Shift",n.GANTT_CALENDAR_24HOURS="24 Hours",n.GANTT_CALENDAR_MINUTE="Minute",n.GANTT_CALENDAR_MINUTE_NAMES=["m","min","minute"],n.GANTT_CALENDAR_HOUR="Hour",n.GANTT_CALENDAR_HOUR_NAMES=["h","hr","hour"],n.GANTT_CALENDAR_DAY="Day",n.GANTT_CALENDAR_DAY_NAMES=["d","dy","day"],n.GANTT_CALENDAR_WEEK="Week",n.GANTT_CALENDAR_WEEK_NAMES=["w","wk","week"],n.GANTT_CALENDAR_MONTH="Month",n.GANTT_CALENDAR_MONTH_NAMES=["mo","mon","month"],n.GANTT_CALENDAR_UNIT_LABELS=["min","hr","day","wk","mon","yr"],n.GANTT_CALENDAR_UNIT_LABELS_PLURALS=["mins","hrs","days","wks","mons","yrs"],e=i(5770))e.hasOwnProperty(r)&&(n[r]=e[r])},8698:function(t,n,i){var e,r,s=this&&this.vJr||(u=function(t,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},u(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),u;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheetEventHandler=void 0,r=function(t){function n(n){return t.call(this,n)||this}return s(n,t),n}((e=i(1376)).nk),n.GanttSheetEventHandler=r},8724:function(n){n.exports=t.Spread.Sheets.FloatingObjects},8869:function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var e=i(8561);n.SR={en:e}},8943:function(t,n,i){var e,r,s;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarLayout=void 0,e=i(2749),r=i(4448),s=function(){function t(t){this.Xyi="toTop",this.Zyi=12,this.qyi=r.DefaultDateFormatter,this.$yi=r.DefaultDateFormatter,this.Jyi=!0,this.IOProps=["barHeight","barTextDateFormat","linkLineMode","roundBarsToWholeDays","tipDateFormat"],this.uAi=t}return Object.defineProperty(t.prototype,"linkLineMode",{get:function(){return this.Xyi},set:function(t){this.Xyi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"barHeight",{get:function(){return this.Zyi},set:function(t){this.Zyi=t,this.uAi.Rmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"barTextDateFormat",{get:function(){return this.qyi},set:function(t){this.qyi=t,this.uAi.Rmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tipDateFormat",{get:function(){return this.$yi},set:function(t){this.$yi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"roundBarsToWholeDays",{get:function(){return this.Jyi},set:function(t){this.Jyi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TaskbarLayout=s},9103:function(t,n,i){var e,r,s,u,o,h,a=this&&this.vJr||(c=function(t,n){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},c(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}c(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),c;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskCompleteCellType=void 0,e=i(1376),r=i(5366),s=Math.floor,u=Math.ceil,o=Math.round,h=function(t){function n(){var n=t.call(this)||this;return n.typeName="100",n}return a(n,t),n.prototype.getChangedValue=function(t){var n=t.sheet,i=t.row,e=t.col,r=t.isReservedOnButton,h=n.getValue(i,e);return"Up"===r?h=(5*s(o(100*h)/5)+5)/100:"Down"===r&&(h=(5*u(o(100*h)/5)-5)/100),h<0&&(h=0),h},n}(r.NumberInputCellType),n.TaskCompleteCellType=h,e.CellTypes.ti[100]=h},9286:function(t,n,i){var e,r,s,u,o,h;Object.defineProperty(n,"__esModule",{value:!0}),n.BarPainter=n.BarEndPainter=void 0,e=i(7234),r=i(1376),s=i(4448),u=e.Common.lt.ht,o=function(){function t(){}return t.draw=function(t,n,i,e,r){if(!u(n)){var o=r.x,h=r.y,a=r.w,c=r.h;switch(r=s.GanttUtil.fixPixelAlignment(o,h,a,c),n){case"houseUp":this.drawHouseUp(t,r,i,e);break;case"houseDown":this.drawHouseDown(t,r,i,e);break;case"diamond":this.drawDiamond(t,r,i,e);break;case"circleDiamond":this.drawCircleDiamond(t,r,i,e);break;case"triangleUp":this.drawTriangleUp(t,r,i,e);break;case"triangleDown":this.drawTriangleDown(t,r,i,e);break;case"triangleLeft":this.drawTriangleLeft(t,r,i,e);break;case"triangleRight":this.drawTriangleRight(t,r,i,e);break;case"circleTriangleUp":this.drawCircleTriangleUp(t,r,i,e);break;case"circleTriangleDown":this.drawCircleTriangleDown(t,r,i,e);break;case"arrowUp":this.drawArrowUp(t,r,i,e);break;case"arrowDown":this.drawArrowDown(t,r,i,e);break;case"circleArrowUp":this.drawCircleArrowUp(t,r,i,e);break;case"circleArrowDown":this.drawCircleArrowDown(t,r,i,e);break;case"caretDownTop":this.drawCaretDownTop(t,r,i,e);break;case"caretUpBottom":this.drawCaretUpBottom(t,r,i,e);break;case"lineShape":this.drawLine(t,r,i,e);break;case"square":this.drawSquare(t,r,i,e);break;case"circle":this.drawCircle(t,r,i,e);break;case"star":this.drawStar(t,r,i,e);break;case"leftBracket":this.drawLeftBracket(t,r,i,e);break;case"rightBracket":this.drawRightBracket(t,r,i,e);break;case"leftFade":this.drawLeftFade(t,r,i,e);break;case"rightFade":this.drawRightFade(t,r,i,e)}}},t.paintWithStyle=function(t,n,i){switch(n){case"solid":t.strokeStyle=i,t.stroke(),t.fillStyle=i,t.fill();break;case"framed":t.strokeStyle=i,t.stroke();break;case"dashed":t.setLineDash([4,2]),t.strokeStyle=i,t.stroke(),t.setLineDash([])}},t.drawLine=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2-1,s),t.lineTo(r+u/2+2,s),t.lineTo(r+u/2+2,s+o),t.lineTo(r+u/2-1,s+o),t.lineTo(r+u/2-1,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawDiamond=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r+u,s+o/2),t.lineTo(r+u/2,s+o),t.lineTo(r,s+o/2),t.closePath(),this.paintWithStyle(t,i,e)},t.drawHouseUp=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r,s+o/2),t.lineTo(r,s+o),t.lineTo(r+u,s+o),t.lineTo(r+u,s+o/2),t.lineTo(r+u/2,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawHouseDown=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s),t.lineTo(r,s+o/2),t.lineTo(r+u/2,s+o),t.lineTo(r+u,s+o/2),t.lineTo(r+u,s),t.lineTo(r,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawWhiteFillCircle=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.arc(r+u/2,s+o/2,o/2,0,2*Math.PI),t.closePath(),"dashed"===e&&t.setLineDash([2,2]),t.strokeStyle=i,t.stroke(),t.fillStyle="white",t.fill(),t.setLineDash([])},t.drawCircleDiamond=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.lineTo(r+u/2,s+o/4),t.lineTo(r+u/4,s+o/2),t.lineTo(r+u/2,s+3*o/4),t.lineTo(r+3*u/4,s+o/2),t.lineTo(r+u/2,s+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleUp=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r,s+o),t.lineTo(r+u,s+o),t.lineTo(r+u/2,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleDown=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s),t.lineTo(r+u/2,s+o),t.lineTo(r+u,s),t.lineTo(r,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleLeft=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s+o/2),t.lineTo(r+u,s+o),t.lineTo(r+u,s),t.lineTo(r,s+o/2),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleRight=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s),t.lineTo(r,s+o),t.lineTo(r+u,s+o/2),t.lineTo(r,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleTriangleUp=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s+o/4),t.lineTo(r+u/4,s+3*o/4),t.lineTo(r+3*u/4,s+3*o/4),t.lineTo(r+u/2,s+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleTriangleDown=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/4,s+o/4),t.lineTo(r+u/2,s+3*o/4),t.lineTo(r+3*u/4,s+o/4),t.lineTo(r+u/4,s+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawArrowUp=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r,s+o/2),t.lineTo(r+u/4,s+o/2),t.lineTo(r+u/4,s+o),t.lineTo(r+3*u/4,s+o),t.lineTo(r+3*u/4,s+o/2),t.lineTo(r+u,s+o/2),t.lineTo(r+u/2,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawArrowDown=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/4,s),t.lineTo(r+u/4,s+o/2),t.lineTo(r,s+o/2),t.lineTo(r+u/2,s+o),t.lineTo(r+u,s+o/2),t.lineTo(r+3*u/4,s+o/2),t.lineTo(r+3*u/4,s),t.lineTo(r+u/4,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleArrowUp=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var r=n.x,s=n.y,u=n.w,o=n.h;this.drawArrowUp(t,{x:r+1,y:s+1,w:u-2,h:o-2},i,e)},t.drawCircleArrowDown=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var r=n.x,s=n.y,u=n.w,o=n.h;this.drawArrowDown(t,{x:r+1,y:s+1,w:u-2,h:o-2},i,e)},t.drawCaretDownTop=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s+3*o/4),t.lineTo(r,s+o),t.lineTo(r+u,s+o),t.lineTo(r+u,s+3*o/4),t.lineTo(r+u/2,s+o/2),t.lineTo(r,s+3*o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCaretUpBottom=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r,s),t.lineTo(r,s+o/4),t.lineTo(r+u/2,s+o/2),t.lineTo(r+u,s+o/4),t.lineTo(r+u,s),t.lineTo(r,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawSquare=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/4,s+o/4),t.lineTo(r+u/4,s+3*o/4),t.lineTo(r+3*u/4,s+3*o/4),t.lineTo(r+3*u/4,s+o/4),t.lineTo(r+u/4,s+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircle=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.arc(r+u/2,s+o/2,o/2,0,2*Math.PI),t.closePath(),this.paintWithStyle(t,i,e)},t.drawStar=function(t,n,i,e){var r=n.x,s=n.y,u=n.h,o=u/4;t.beginPath(),t.moveTo(r+2*o,s),t.lineTo(r+5*o/2,s+3*o/2),t.lineTo(r+4*o,s+3*o/2),t.lineTo(r+14*o/5,s+12*o/5),t.lineTo(r+10*o/3,s+4*o),t.lineTo(r+2*o,s+3*o),t.lineTo(r+2*o/3,s+4*o),t.lineTo(r+6*o/5,s+12*o/5),t.lineTo(r,s+3*o/2),t.lineTo(r+3*o/2,s+3*o/2),t.lineTo(r+2*o,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawLeftBracket=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r+u,s),t.lineTo(r+u,s+o/8),t.lineTo(r+5*u/8,s+o/8),t.lineTo(r+5*u/8,s+7*o/8),t.lineTo(r+u,s+7*o/8),t.lineTo(r+u,s+o),t.lineTo(r+u/2,s+o),t.lineTo(r+u/2,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawRightBracket=function(t,n,i,e){var r=n.x,s=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(r+u/2,s),t.lineTo(r,s),t.lineTo(r,s+o/8),t.lineTo(r+3*u/8,s+o/8),t.lineTo(r+3*u/8,s+7*o/8),t.lineTo(r,s+7*o/8),t.lineTo(r,s+o),t.lineTo(r+u/2,s+o),t.lineTo(r+u/2,s),t.closePath(),this.paintWithStyle(t,i,e)},t.drawLeftFade=function(t,n,i,e){var r,s=n.x,u=n.y,o=n.w,h=n.h;s-=1,u-=1,o+=2,h+=2,t.lineWidth=h,(r=t.createLinearGradient(s+o/2,u,s+o,u)).addColorStop(0,e),r.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=r,t.fillRect(s+o/2,u,o/2,h),t.lineWidth=1,t.beginPath()},t.drawRightFade=function(t,n,i,e){var r,s=n.x,u=n.y,o=n.w,h=n.h;s-=1,u-=1,o+=2,h+=2,t.lineWidth=h,(r=t.createLinearGradient(s,u,s+o/2,u)).addColorStop(0,"rgba(255,255,255,0)"),r.addColorStop(1,e),t.fillStyle=r,t.fillRect(s,u,o/2,h),t.lineWidth=1},t}(),n.BarEndPainter=o,h=function(){function t(){}return t.draw=function(n,i,e,u,o){var h,a,c,f,l,v,A,d,b;if(void 0===o&&(o=!0),u){if(2===u.h)return n.beginPath(),n.fillStyle=e,n.fillRect(u.x,u.y,u.w,u.h),void n.closePath();h=u.x,a=u.y,c=u.w,f=u.h,r.W.setFillStyle(n,t.getBackColor(e,i),h,a,c,f,t.getFillFunction(n,h,a,c,f,i)),o&&(v=(l=s.GanttUtil.fixPixelAlignment(u.x,u.y,u.w,u.h)).x,A=l.y,d=l.w,b=l.h,t.DrawBorder(n,e,{x:v,y:A,w:d,h:b},"dashedBorder"!==i))}},t.getBackColor=function(t,n){var i={type:r.PatternType.solid,patternColor:t,backgroundColor:"white"};switch(n){case"hollow":i.patternColor="white";break;case"solidFill":case"dashedBorder":break;case"lightFill":i.type=r.PatternType.lightGray;break;case"mediumFill":i.type=r.PatternType.mediumGray;break;case"darkFill":i.type=r.PatternType.darkGray;break;case"diagonalRight":i.type=r.PatternType.lightDown;break;case"diagonalLeft":i.type=r.PatternType.lightUp;break;case"diagonalCross":i.type=r.PatternType.lightTrellis;break;case"lineVertical":i.type=r.PatternType.lightVertical;break;case"lineHorizontal":i.type=r.PatternType.lightHorizontal;break;case"lineCross":i.type=r.PatternType.lightGrid}return i.type===r.PatternType.solid?i.patternColor:i},t.getFillFunction=function(n,i,e,s,u,o){var h=new r.Rect(i,e,s,u),a=function(){n.fillRect(i,e,s,u)};if(!t.paintPatternResetOrigin)return a;switch(o){case"hollow":case"solidFill":break;case"mediumFill":case"diagonalCross":case"lineVertical":case"lineHorizontal":case"lineCross":case"dashedBorder":a=function(){t.FillPattern(n,0,0,h)};break;case"lightFill":case"darkFill":a=function(){t.FillPattern(n,1,0,h)};break;case"diagonalRight":case"diagonalLeft":a=function(){t.FillPattern(n,2,0,h)}}return a},t.FillPattern=function(t,n,i,e){t.save(),t.translate(e.x-n,e.y-i),t.fillRect(n,i,e.width,e.height),t.restore()},t.DrawBorder=function(t,n,i,e){var r=i.x,s=i.y,u=i.w,o=i.h;e||t.setLineDash([2,2]),t.strokeStyle=n,t.strokeRect(r,s,u,o),t.setLineDash([])},t.paintPatternResetOrigin=!0,t}(),n.BarPainter=h},9293:function(t,n,i){var e,r,s,u,o,h,a,c,f,l=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};function v(t){return t instanceof s.GanttSheet}function A(t){var n;t.commandManager().addListener("ganttSheetCleanUndo",(function(n){var i=n.command,e=n.vM,r=t.Wp.Nmt;0===e&&r&&r.length>0&&v(t.Ofe(i.sheetName))&&r.pop()}))}function d(t,n){var i,e=new Array(t);for(i=0;i<t;i++)e[i]=n();return e}Object.defineProperty(n,"__esModule",{value:!0}),e=i(7234),r=i(1376),s=i(5392),u=i(4627),o=i(4448),h=i(8869),a=new e.Common.ResourceManager(h.SR,"GanttSheet"),c=a.getResource.bind(a),f=e.Common.lt.ht,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP]={canUndo:!1,execute:function(t,n){var i,e,r,s=o.GanttUtil.getGanttSheet(t);if(s)return(i=s.project)&&(e=i.timescale,r=s.getTaskbarAreaVisibleSize(),e.scroll(-1*r)),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN]={canUndo:!1,execute:function(t,n){var i,e,r,s=o.GanttUtil.getGanttSheet(t);if(s)return(i=s.project)&&(e=i.timescale,r=s.getTaskbarAreaVisibleSize(),e.scroll(r)),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN]={canUndo:!1,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return(i=e.project).timescale.scrollTo(i.startDate,.25),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_END]={canUndo:!1,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return(i=e.project).timescale.scrollTo(i.finishDate,.75),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT]={canUndo:!1,execute:function(t,n){var i,e,r=o.GanttUtil.getGanttSheet(t);if(r)return(i=r.project)&&(e=i.timescale).scrollOneTick(!1),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT]={canUndo:!1,execute:function(t,n){var i,e,r=o.GanttUtil.getGanttSheet(t);if(r)return(i=r.project)&&(e=i.timescale).scrollOneTick(!0),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN]={canUndo:!1,execute:function(t,n){var i,e,r=o.GanttUtil.getGanttSheet(t);if(r)return e=(i=r.project).timescale,r.uiOptions.allowZoomTimescale&&e.zoomIn(),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT]={canUndo:!1,execute:function(t,n){var i,e,r=o.GanttUtil.getGanttSheet(t);if(r)return e=(i=r.project).timescale,r.uiOptions.allowZoomTimescale&&e.zoomOut(),!1}},r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER]={canUndo:!0,execute:function(t,n){var i,e,r,s=o.GanttUtil.getGanttSheet(t);if(s)return i=s.project,e=n.start,r=n.finish,i.timescale.zoomToRange(e,r),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE]={canUndo:!0,execute:function(t,n){var i,e,r,s,u,h=o.GanttUtil.getGanttSheet(t);if(h){for(i=o.GanttUtil.getSelectedTasks(h),e=n.complete,r=0,s=i;r<s.length;r++)(u=s[r]).complete!==e&&h.project.taskManager.setTaskValue(u,"complete",e);return!0}}},r.Commands[u.GanttCommandNames.GANTTSHEET_INDENT_TASKS]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=o.GanttUtil.getSelectedTasks(e),e.project.indentTasks(i.map((function(t){return t.taskNumber}))),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=o.GanttUtil.getSelectedTasks(e),e.project.outdentTasks(i.map((function(t){return t.taskNumber}))),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_LINK_TASKS]={canUndo:!0,execute:function(t,n){var i,e,r,s,u,h,a,c,f,l,v,A,d=o.GanttUtil.getGanttSheet(t);if(d){for(i=d.project,e=[],r=d.getSelections(),s=-1,u=0;u<r.length;u++){for(h=r[u],-1!==s&&e.push([s,h.row]),a=h.row+1;a<h.row+h.rowCount;a++)e.push([a-1,a]);s=h.row+h.rowCount-1}if(e.length<=0)return!1;for(i.suspendSchedule(),c=0,f=e;c<f.length;c++){v=(l=f[c])[0],A=l[1];try{i.addDependency({fromTaskNumber:v,toTaskNumber:A})}catch(t){}}return i.resumeSchedule(),!0}}},r.Commands[u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS]={canUndo:!0,execute:function(t,n){var i,e,r,s,u,h,a,c,f=o.GanttUtil.getGanttSheet(t);if(f){if(i=o.GanttUtil.getSelectedTaskNumbers(f),e=f.project,r=[],1===i.length)s=e.getTaskByRow(i[0]),r=l(l([],s.predecessorDependencies,!0),s.successorDependencies,!0);else{for(u={},h=0,a=i;h<a.length;h++)c=a[h],u[c]=!0;r=e.dependencies.filter((function(t){return u[t.from.taskNumber]&&u[t.to.taskNumber]}))}return r.length>=1&&e.removeDependency(r),!0}}},r.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE]={canUndo:!0,execute:function(t,n){var i,e,r,u,h=n.taskMode,a=t.getActiveSheetTab();if(a&&a instanceof s.GanttSheet){for(e=0,r=i=o.GanttUtil.getSelectedTasks(a);e<r.length;e++)(u=r[e]).setValue("mode",h);return!0}}},r.Commands[u.GanttCommandNames.GANTTSHEET_MOVE_TASK]={canUndo:!0,execute:function(t,n){var i,e,r,s,u=o.GanttUtil.getGanttSheet(t);if(u)return i=n.duration,e=n.forward,r=u.project,s=o.GanttUtil.getSelectedTaskNumbers(u),r.suspendSchedule(),s.forEach((function(t){var n,s,u=r.getTask(t),o=e?null!==(n=i.value)&&void 0!==n?n:0:-1*(null!==(s=i.value)&&void 0!==s?s:0);"Week"===i.unit?u.moveInWeeks(o):u.moveInWorkingDays(o)})),r.resumeSchedule(),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_TASK]={canUndo:!0,execute:function(t,n){var i,e,r,s,u=o.GanttUtil.getGanttSheet(t);if(u)return i=u.project,e=u.getSelections().map((function(t){return t.rowCount})).reduce((function(t,n){return t+n})),r=Math.min.apply(Math,l(l([],u.getSelections().map((function(t){return t.row})),!1),[i.count],!1)),s=d(e,(function(){return{name:c().GANTT_NEW_TASK}})),i.insertTasksByRow(r,s),u.setSelection(r,-1,e,-1),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK]={canUndo:!0,execute:function(t,n){var i,e,r,s,u,h,a=o.GanttUtil.getGanttSheet(t);if(a)return i=a.project,r=(e=a.getSelections()[0]).row,s=a.getTaskNumberByRow(r)||i.count,0===(u=o.GanttUtil.getSelectedRowIndexes(a).map((function(t){return a.getTaskByRow(t)})).filter((function(t){return!!t}))).length?(h=i.insertTasks(s,{name:c().GANTT_NEW_SUMMARY_TASK})[0],i.insertTasks(s+1,{name:c().GANTT_NEW_TASK},h.level+1)):(i.insertTasks(s,{name:c().GANTT_NEW_SUMMARY_TASK},u[0].level),i.sorted?i.indentTasks([u[0].taskNumber]):i.indentTasksByRange(e.row+1,e.rowCount)),a.setSelection(r,-1,1,-1),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE]={canUndo:!0,execute:function(t,n){var i,e,r,s,u=o.GanttUtil.getGanttSheet(t);if(u)return i=u.project,e=u.getSelections().map((function(t){return t.rowCount})).reduce((function(t,n){return t+n})),r=Math.min.apply(Math,l(l([],u.getSelections().map((function(t){return t.row})),!1),[i.count],!1)),s=d(e,(function(){return{name:c().GANTT_NEW_MILESTONE,duration:0}})),i.insertTasksByRow(r,s),u.setSelection(r,-1,e,-1),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_DELETE_TASK]={canUndo:!0,execute:function(t,n){var i,e,r=o.GanttUtil.getGanttSheet(t);if(r)return i=r.project,e=o.GanttUtil.getSelectedTaskNumbers(r),i.removeTasks(e),!0}},r.Commands[u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=e.getActiveTask(),f(i.start)&&f(i.duration)?e.project.timescale.scrollTo(i.finishDisplayed,.25):e.project.timescale.scrollTo(i.startDisplayed,.25),!0}},r.Commands.kAi=function(t){var n,i=!r.mt.Qf();t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP],33,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN],34,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN],36,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_END,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_END],35,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT],37,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT],39,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN],111,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT],106,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER,r.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER],106,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE,r.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE]),t.register(u.GanttCommandNames.GANTTSHEET_INDENT_TASKS,r.Commands[u.GanttCommandNames.GANTTSHEET_INDENT_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS,r.Commands[u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_LINK_TASKS,r.Commands[u.GanttCommandNames.GANTTSHEET_LINK_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS,r.Commands[u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE,r.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE]),t.register(u.GanttCommandNames.GANTTSHEET_MOVE_TASK,r.Commands[u.GanttCommandNames.GANTTSHEET_MOVE_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_TASK,r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK,r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE,r.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE]),t.register(u.GanttCommandNames.GANTTSHEET_DELETE_TASK,r.Commands[u.GanttCommandNames.GANTTSHEET_DELETE_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK,r.Commands[u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK])},r.Workbook.ch("ganttSheet",{init:function(){var t=this;r.Commands.kAi(t.commandManager()),A(t)}})},9409:function(n){n.exports=t.Spread.Sheets.TableSheet},9644:function(t,n,i){var e,r,s,u,o=this&&this.vJr||(h=function(t,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},h(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}h(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),h;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDurationCellType=void 0,e=i(1376),r=i(7350),u=function(t){function n(n){void 0===n&&(n=!0);var i=t.call(this,n)||this;return i.typeName="102",i}return o(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.cAi=function(t){return t.row},n.prototype.parse=function(t,n,i){var e=this.oAi(i);return e?e.parseDuration(t):t},n.prototype.format=function(t,n,i,e){var r=this.oAi(e);return r?r.formatDuration(t):t},n.prototype.je=function(t,n,i,e){var r=this.oAi(e);return r?r.formatDuration(i):i},n.prototype.getChangedValue=function(t){var n,i,e=this.oAi(t),s=t.sheet.getValue(t.row,t.col);if(e)return(s=e.parseDuration(s))?(n=s.value,i=s.unit,"Up"===t.isReservedOnButton?n=Math.floor(n+1):"Down"===t.isReservedOnButton&&(n=Math.max(Math.ceil(n-1),0)),s={value:n,unit:i}):s=r.DurationHelper.default(e.calendarSettings),s=e.parseDuration(s)},n}((s=i(5366)).NumberInputCellType),n.TaskDurationCellType=u,e.CellTypes.ti[102]=u},9663:function(t,n,i){var e,r,s,u;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarColumn=void 0,e=i(5909),r=i(2749),s=i(8136),u=function(){function t(t){this.propertyChanged=new e.EventList,this.IOProps=["width"],this.YC="*",this._Ai=new s.TaskbarCellType}return Object.defineProperty(t.prototype,"width",{get:function(){return this.YC},set:function(t){this.YC=t,this.propertyChanged.invoke(this,"width")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarLeftTextStyle",{get:function(){return this._Ai.leftTextStyle},set:function(t){this._Ai.leftTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarTopTextStyle",{get:function(){return this._Ai.topTextStyle},set:function(t){this._Ai.topTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarRightTextStyle",{get:function(){return this._Ai.rightTextStyle},set:function(t){this._Ai.rightTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarBottomTextStyle",{get:function(){return this._Ai.bottomTextStyle},set:function(t){this._Ai.bottomTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarInsideTextStyle",{get:function(){return this._Ai.insideTextStyle},set:function(t){this._Ai.insideTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarShowDefaultTips",{get:function(){return this._Ai.showDefaultTips},set:function(t){this._Ai.showDefaultTips=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowMoveOrResizeTask",{get:function(){return this._Ai.allowMoveOrResizeTask},set:function(t){this._Ai.allowMoveOrResizeTask=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowLinkTask",{get:function(){return this._Ai.allowLinkTask},set:function(t){this._Ai.allowLinkTask=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowChangeProgress",{get:function(){return this._Ai.allowChangeProgress},set:function(t){this._Ai.allowChangeProgress=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){t&&r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TaskbarColumn=u}},e={};function r(t){var n,s=e[t];return void 0!==s?s.exports:(n=e[t]={exports:{}},i[t].call(n.exports,n,n.exports,r),n.exports)}n=r(7404),(((t=void 0===t?{}:t).Spread=t.Spread||{}).Sheets=t.Spread.Sheets||{}).GanttSheet=n}(),t.Spread.Common.CultureManager.reloadResources&&t.Spread.Common.CultureManager.reloadResources("GanttSheet")}));