/* @license Copyright (C) Exontrol. All rights reserved. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,e(t.exontrol||{}))}(this,function(t){"use strict";function e(){return Math.max.apply(0,arguments)}function o(){return Math.min.apply(null,arguments)}function i(t,e){return c.ToS(t,e)}function n(t,e){return c.ToN(t,e)}function r(t,e){return c.ToI(t,e)}function s(t,e,o){return null==t?~~o:c.s2F(t,e)}function h(t,e){return new Date(t.s.getTime()+(t.e.getTime()-t.s.getTime())*(e-a(t).x)/a(t).w)}function a(t){return t.o||t}var u,l,c=c||window.exontrol,p=c.G,f="SF,FS,FF,SS".split(","),g=":",y="W",v=",",d={type:0,color:"black",startPos:"MR",endPos:"TL,ML,BL"};u=function(){function t(t){t.startsWith("=")?this.oEx=c.E.Create(t.substr(1),"value,start,end,wcount"):this.cbkD=Date.prototype.toQ(t)}function e(t){this.c=t}var o=new Map,i=new Map;return t.prototype.eval=function(t){return this.oEx?this.oEx.Evaluate(function(e,o){switch(e){case-1:return t.d;case-2:return t.r.s;case-3:return t.r.e}}):this.cbkD&&this.cbkD.call(t.d)},e.prototype.eval=function(e,o){var n=c.H.SetEObj(function(o){var n=i.get(o);return!n&&i.set(o,n=new t(o)),n.eval(e)},this),r=o.call(this);return c.H.SetEObj(n),r},e.prototype.size=function(t,e,o,i){return this.eval(t,function(){return e.sizeHTMLText(this.c,o,i)})},e.prototype.draw=function(t,e,o,i,n){return this.eval(t,function(){return e.drawHTMLText(this.c,o,i,n)})},e.prototype.text=function(t){return this.eval(t,function(){return c.H.TextNoHTML(this.c)})},e.prototype.html=function(t){return this.eval(t,function(){return this.c})},{Get:function(t){var i;return null!=t&&!(i=o.get(t))&&o.set(t,i=new e(t)),i||null},XC:function(){i.clear(),o.clear()}}}(),l=function(){function t(t){(t=i(t)).startsWith("=")&&(t=t.substr(1)),this.oEx=c.E.Create(t,void 0,void 0,"C")}function e(t){this.c=t}var o=new Map,n=new Map,r=new e;return t.prototype.eval=function(t){return this.oEx.Evaluate(function(e,o){return t.toFormat(e,o)})},e.prototype.evalBar=function(e,o){var i=c.H.SetEObj(function(o){var i=n.get(o);return!i&&n.set(o,i=new t(o)),i.eval(e)},this),r=o.call(this);return c.H.SetEObj(i),r},e.prototype.size=function(t,e,o,i){return this.evalBar(t,function(){return e.sizeHTMLText(this.c,o,i)})},e.prototype.draw=function(t,e,o,i,n){return this.evalBar(t,function(){return e.drawHTMLText(this.c,o,i,n)})},e.prototype.text=function(t){return this.evalBar(t,function(){return c.H.TextNoHTML(this.c)})},e.prototype.html=function(t){return this.evalBar(t,function(){return this.c})},{Get:function(t){var i;return null!=t&&!(i=o.get(t))&&o.set(t,i=new e(t)),i||null},Set:function(t){return r.c=t,r},XC:function(){n.clear(),o.clear()}}}(),c.Mrg(c.Tree.ColumnOptions,{valueToItemBarProperty:null,valueToItemBarKey:null}),c.Mrg(c.Tree.Column.prototype,{GetValueToItemBarProperty:function(){return this.oO.valueToItemBarProperty},SetValueToItemBarProperty:function(t){this.bU(),this.oV2B=void 0,this.oO.valueToItemBarProperty=t,this.eU()},GetValueToItemBarKey:function(){return this.oO.valueToItemBarKey},SetValueToItemBarKey:function(t){this.bU(),this.oV2B=void 0,this.oO.valueToItemBarKey=t,this.eU()},v2B:function(){return void 0===this.oV2B&&(this.oV2B=c.Gantt.v2B(this.GetValueToItemBarProperty(),this.GetValueToItemBarKey())),this.oV2B}}),c.expO({valueToItemBarProperty:null,valueToItemBarKey:null},c.Tree.Column.prototype),c.Mrg(c.Tree.Cell.prototype,{ValueToItemBar:function(t,e){this.bU(),this.oV2B=c.Gantt.v2B(t,e),this.eU()},v2B:function(){return this.oV2B||this.oC.v2B()}}),c.Tree.Cell.prototype.GetValue=function(t){return function(){var e=this.v2B(),o=e&&e.g&&this.oI.ItemBar(e.k);return o?o[e.g].call(o):t.call(this)}}(c.Tree.Cell.prototype.GetValue),c.Tree.Cell.prototype.SetValue=function(t){return function(e){var o=this.v2B(),i=o&&o.s&&this.oI.ItemBar(o.k);i?i[o.s].call(i,e):t.call(this,e)}}(c.Tree.Cell.prototype.SetValue),c.expO({value:null},c.Tree.Cell.prototype,null,!0),c.Mrg(c.Tree.Item.prototype,{AddBar:function(){var t=function(){return this.oIB||(this.oIB=new c.Gantt.ItemBars(this))}.call(this);return t.Add.apply(t,arguments)},RemoveBar:function(t){var e=this.ItemBar(t);e&&e.Remove()},ClearBars:function(){this.oIB&&this.oIB.len()&&this.oIB.Clear()},ItemBar:function(t){return this.oIB&&this.oIB.Item(t)},GetBars:function(){return this.oIB},SetBars:function(t){t!=this.oIB&&(this.bU(),this.ClearBars(),t instanceof c.Gantt.ItemBars&&t.len()&&t.forEach(function(t){this.AddBar(t.GetOptions())},this),this.eU())}}),c.expO({Bars:null},c.Tree.Item.prototype),c.Mrg(c.Tree.Items.prototype,{GetDefSchedulePDM:function(){return this.oT.oGC.oGL.dSP},SetDefSchedulePDM:function(t){if(c.IsO(t))for(var e in t)this.oT.oGC.oGL.dSP[e]=t[e]},SchedulePDM:function(t,e){var o,i;return null==e&&(e=0),null==t?o=this.forEachU(function(t){return t.ItemBar(e)}):t instanceof c.Gantt.ItemBar?o=t:(t=this.Item(t))&&(o=t.ItemBar(e)),this.bU(),this.oT.resTLB(),i=c.Gantt.S.Do(o),this.eU(),i}}),c.Tree.Items.prototype.rurIH=function(t){return function(){return this.lIH||(this.lIH=function(){var o=t.apply(this,arguments)||[null,null];return o[0]=e(n(o[0]),this.oT.getDefaultItemHeight()),o}.apply(this,arguments))}}(c.Tree.Items.prototype.rurIH),c.expO({DefSchedulePDM:null},c.Tree.Items.prototype),c.Mrg(c.Tree.TV.prototype,{GetDebug:function(){return this.oO.debug},SetDebug:function(t){this.cwbU(),this.oO.debug=t,this.cweU()},getDebug:function(){return this.opt("debug",!1)},SetChart:function(t){var e,o,i,n,r,s=this.oT.oGC,h=0!=this.oT.lnt;s.bU(),s.oLvs.onRL(function(){h&&(t&&(e=t.labels,o=t.toolTips,i=t.bars,n=t.paneWidthLeft,r=t.paneWidthRight),t=c.Mrg(c.Mrg(c.Cpy(c.Def.Tree.chart),c.Tree.Options.chart),t),s.SetLabels(e||t.labels),t.labels=void 0,s.SetToolTips(o||t.toolTips),t.toolTips=void 0,s.SetBars(i||t.bars),t.bars=void 0,t.paneWidthLeft=n,t.paneWidthRight=r),s.SetOptions(t,h)},this),s.eU()}}),c.Tree.TV.prototype.init=function(t){return function(){t.apply(this,arguments)}}(c.Tree.TV.prototype.init),c.Tree.TV.prototype.apyOpt=function(t){return function(e){if(t.call(this,e),e.length>1){var o=e.indexOf("chart");~o&&(e.splice(o,1),e.splice(0,0,"chart"))}}}(c.Tree.TV.prototype.apyOpt),c.Tree.TV.prototype.defShp=function(t){return function(){return t.apply(this,arguments)+',No(nw),FrameSel(select-chart,select-bar,select-date,select-overview),{"normal":{"client":"[x-4,y-4,width+8,height+8]"}}(select-bar),{"normal":{"client":"[,y-4,,height+8]"}}(select-date),{"normal":{"primitive":"Rect"}}(select-overview),black(date-ticker)'}}(c.Tree.TV.prototype.defShp),c.Tree.TV.prototype.defCrs=function(t){return function(){return t.apply(this,arguments)+",copy(create-bar,create-link),pointer(itemBar),col-resize(itemBar-percent-resize)"}}(c.Tree.TV.prototype.defCrs),c.Tree.TV.prototype.rAO=function(t){return function(){t.apply(this,arguments),this.oT instanceof c.Gantt&&this.oT.feGV(function(e){t.call(e)})}}(c.Tree.TV.prototype.rAO),c.Tree.TV.prototype.rurAO=function(t){return function(e){return t.apply(this,arguments)}}(c.Tree.TV.prototype.rurAO),c.Tree.TV.prototype.rurI=function(t){return function(e){return this.oT instanceof c.Gantt&&this.oT.feGVU(function(t){return t.e2I(e)})||t.apply(this,arguments)}}(c.Tree.TV.prototype.rurI),c.Tree.TV.prototype.rurItemDragS=function(t){return function(e){t.apply(this,arguments),this.oT instanceof c.Gantt&&!e.rgGVEF&&(e.rgGVEF=[],this.oT.feGV(function(t){var o=c.EF.Create({relative:t.GetCanvas(),onpaint:function(t,o){if(this.oGV){e.oTV.drawDI(t,o,e.oDI,this.oGV.drawI,this.oGV,void 0)}}});o.oGV=t,e.rgGVEF.push(o)},this),e.SetClient=function(t){return function(o){t.apply(this,arguments);var i=this.oTV.GetClientRect();e.rgGVEF&&e.rgGVEF.forEach(function(t){var e=o.slice(),n=t.oGV.GetClientRect();c.ORt(e,-i[0]+n[0],-i[1]+n[1]),e[2]=n[2],t.SetClient(e)},this)}}(e.SetClient))}}(c.Tree.TV.prototype.rurItemDragS),c.Tree.TV.prototype.rurItemDragE=function(t){return function(e){e&&e.rgGVEF&&(e.rgGVEF.forEach(function(t){c.EF.Destroy(t)}),e.rgGVEF=null),t.apply(this,arguments)}}(c.Tree.TV.prototype.rurItemDragE),c.Tree.TV.prototype.rurItemDragD=function(t){return function(e){t.apply(this,arguments),this.oT instanceof c.Gantt&&this.oT.feGV("resVI")}}(c.Tree.TV.prototype.rurItemDragD),c.Tree.TV.prototype.rurDragDrop=function(t){return function(e,o){var i=this,n=this.e2V(e),r=!o.rurFlags;n instanceof c.Gantt.GV&&(r||o.rurFlags.has("bar"))&&function(){var t=this.p2IB(this.gPtr(e));t&&this.oT.oGC.isSable(t)&&c.RUR.D3(e,{inflateClient:0,object:t,shape:t.getShape(),client:this.ib2R(t,4),source:this,onpaint:function(t,e){i.ctxScale(t,e,function(e){t.drawShape(e,this.shape)},this)},onclick:function(t){o.rurStatus&&(i.oT.oRUR=i.e2RUR(t),o.rurStatus&&o.rurStatus.call(i,t),i.oT.oRUR=null)},onmove:function(t){t.drag.setCursor(c.GP.Get(o.rurName,this.getCursors()))}})}.call(n),(r||o.rurFlags.has("item"))&&t.apply(this,arguments)}}(c.Tree.TV.prototype.rurDragDrop),c.Tree.TV.prototype.Smooth=function(t){return function(e,o,i){function n(){var t=new Map;return s.feGV(function(e){t.set(e,function(t){var e=t.getCur();return e.iuS=function(t){return c.bin(h.length,function(e){return t>=h[e].u})}(e.uS),e.rgVI=t.getVI(),e.rgVB=t.getVB(),e}(e))}),t}if(this.getSmooth()&&e&&this.oT instanceof c.Gantt){o=o||this,i=i||{};var r,s=this.oT,h=s.oGC.visLb(),a=e,u=i.cbkR,l=i.cbkI,p=i.cbkT,f=n();e=function(){a.call(o),r=n()},i.cbkI=function(t){l&&l.call(o,t),f.forEach(function(e,o){var i=e.rgVI.anyOf(o.getVI());t.mV2FT.set(o,{items:{from:e.rgVI,to:o.getVI(),stkFT:e.rgVI.smooth(o.getVI(),i?t.cbkHI:null)},bars:{from:e.rgVB,to:o.getVB(),stkFT:!void(e.rgVI.sup=e.rgVI.sdn=null)&&e.rgVB.smooth(o.getVB(),i?function(o,i,n){if(i instanceof c.Gantt.ItemBar){var r=i.i(),s=(this.mSI=this.mSI||new Map).get(r);s?o=s.slice():this.mSI.set(r,o=t.cbkHI.call(e.rgVI,o,r,n));var h=this.get(i)||this.rgTo.get(i);h&&(o[0]=h[0],o[2]=h[2])}return o}:null)}})})},i.cbkT=function(t){p&&p.call(o,t),s.feGV("resVI")},i.cbkR=function(t){function e(e,o){return e+(o-e)*t.progress}u&&u.call(o,t),s.feGV(function(t){t.resVL();var o=f.get(t),i=r&&r.get(t);o&&i&&t.setCur({ofV:{d:new Date(e(o.ofV.d.getTime(),i.ofV.d.getTime())),o:e(o.ofV.o,i.ofV.o)},uS:h[~~e(o.iuS,i.iuS)].u,uW:e(o.uW,i.uW)})})}}return t.call(this,e,o,i)}}(c.Tree.TV.prototype.Smooth),c.Tree.TV.prototype.allowRur=function(t){return function(e,o){function i(t){return c.Tree.allowRurPart(this.oT.w2P(o.rurOnlyW),t||"chart,level",o.rurFlags)}var n=t.apply(this,arguments);switch(o.rurName){case"scroll":n=n||i.call(this,"chart,level,view,header");break;case"select":case"item-drag":n=i.call(this,"view,chart");break;case"chart-resize":n=i.call(this);break;case"chart-zoom":case"chart-fit":n=i.call(this,"chart,level,overview")}return n}}(c.Tree.TV.prototype.allowRur),c.Tree.TV.prototype.SetTfi=function(t){return function(){this.cwbU(),t.apply(this,arguments),this.oT instanceof c.Gantt&&this.oT.oGC.onRL(1),this.cweU()}}(c.Tree.TV.prototype.SetTfi),c.Mrg(c,function(){function t(t,e){this.init(t,e)}Object.addPrototypeOf(t.prototype,c.Tree.prototype),t.version="3.0",t.type="Gantt",t.ItemBarPropertyEnum={exBarName:0,exBarStart:1,exBarEnd:2,exBarCaption:3,exBarHAlignCaption:4,exBarVAlignCaption:5,exBarToolTip:6,exBarKey:9,exBarCanResize:10,exBarCanMove:11,exBarPercent:12,exBarPercentCaptionFormat:13,exBarShowPercentCaption:14,exBarAlignPercentCaption:15,exBarCanResizePercent:16,exBarCanResizePercent:18,exBarEffort:21,exBarCanMoveToAnother:28,exBarSelectable:29,exBarColor:33,exBarOverviewColor:41,exBarExtraCaption:44,exBarExtraCaptionHAlign:45,exBarExtraCaptionHAlign:46,exBarOverlaidKey:52,exBarShowCaption:56,exBarShowExtraCaption:57,exBarHistLegend:60,exBarCriticalPath:269,exBarPredecessor:270,exBarSuccessor:271,exBarParent:512,exBarDuration:513},t.OverviewVisibleEnum={exOverviewHidden:0,exOverviewShowOnlyVisible:1,exOverviewShowAllVisible:2,exOverviewAllowVerticalScroll:256,exOverviewHideBars:512,exOverviewShowDateTimeScale:4096,exOverviewShowDateTimeScaleSplit:5120,exOverviewShowDateTimeScaleBottom:6144,exOverviewShowMargins:8192,exOverviewShowSelMargins:16384,exOverviewSplitter:65536},t.LevelLineEnum={exLevelNoLine:0,exLevelDefaultLine:-1,exLevelDotLine:1,exLevelSolidLine:2,exLevelLowerHalf:16,exLevelUpperHalf:32,exLevelMiddleLine:64,exLevelQuarterHeight:256},t.HistogramTypeEnum={exHistOverload:0,exHistOverAllocation:1,exHistCumulative:256,exHistOverAllocationFixed:512,exHistOverAllocationMultiply:1024},t.HistogramViewEnum={exHistogramVisibleItems:1,exHistogramSelectedItems:2,exHistogramCheckedItems:4,exHistogramSelectedBars:8,exHistogramUnlockedItems:16,exHistogramLockedTopItems:32,exHistogramLockedBottomItems:64,exHistogramAllItems:112,exHistogramFilteredItems:128,exHistogramLeafItems:256,exHistogramRecLeafItems:512,exHistogramNoGrouping:1024,exHistogramBackground:2048,exHistogramNoGroupCaption:4096,exHistogramGroupCumulative:8192},t.HistogramCumulativeOriginalColorBarsEnum={exShowCumulativeColor:-1,exChangeColor:0,exKeepOriginalColor:1},t.OverlaidBarsTypeEnum={exOverlaidBarsNone:0,exOverlaidBarsOffset:1,exOverlaidBarsIntersect:2,exOverlaidBarsStack:3,exOverlaidBarsCascade:4,exOverlaidBarsTransparent:256,exOverlaidBarsStackAutoArrange:512,exOverlaidBarsIncludeCaption:4096,exOverlaidBarsStrict:8192};return t.prototype.init=function(e){return function(o,i){this.lnt=this.lnt||0,this.lnt++,this.rgGV=[],this.oGC=new t.Chart(this),this.oOV=new t.OV(this),this.dFD={oF:new c.PF("M/d/yh:m:st","year(y),month(M),day(d),hour(h),minute(m),second(s),ampm(t)"),am:"AM",pm:"PM"},this.oFD=this.dFD,e.call(this,o,c.Mrg({chart:null},i)),--this.lnt}}(t.prototype.init),t.prototype.p2I=function(t){return function(e){return t.apply(this,arguments)||this.feGVU(function(t){return t.oW&&t.p2I(e)})}}(t.prototype.p2I),t.prototype.iLts=function(t){return function(){t.apply(this,arguments),this.oLts.add("ondatechange"),this.oLts.add("onchartselchange"),this.oLts.add("ondateselchange"),this.oLts.add("oncreatebar"),this.oLts.add("onbarresize"),this.oLts.add("onbarparentchange"),this.oLts.add("onallowlink"),this.oLts.add("oncreatelink")}}(t.prototype.iLts),t.prototype.initCW=function(t){return function(){var e=t.apply(this,arguments);return this.oCW.SetClientRect=function(t){function e(){return(this.oTV.oO||{}).chart}return function(){var o=this.oT,i=o.opnt&&o.opnt.b&&function(){var t=e.call(this);if(t&&null!=t.paneWidthLeft&&null==t.paneWidthRight)return this.oGC.GetPaneWidthLeft()}.call(o);t.apply(this,arguments),null!=i&&o.oGC.SetPaneWidthLeft(i),o.opnt&&o.opnt.b||((o.opnt=o.opnt||{}).b=!0,function(){var t=e.call(this);t&&(null!=t.paneWidthLeft||null!=t.paneWidthRight)&&this.oGC.SetOptions({paneWidthLeft:t.paneWidthLeft,paneWidthRight:t.paneWidthRight})}.call(o))}}(this.oCW.SetClientRect),this.addGV("gantt"),this.initOV(),e}}(t.prototype.initCW),t.prototype.defAA=function(t){return function(){return"overview-selection-resize,chart-link(Alt)[toggle],chart-move,chart-create(Alt)[name=Task][auto][empty],chart-fit(Shift+MButton,Ctrl+MButton,Alt+MButton),chart-zoom(MButton),chart-select(Shift,Ctrl)[click-item],"+t.apply(this,arguments)}}(t.prototype.defAA),t.prototype.roAA=function(t){return function(){return"overview-selection-resize,chart-fit,chart-zoom,chart-select,"+t.apply(this,arguments)}}(t.prototype.roAA),t.prototype.allP=function(t){return function(){return t.apply(this,arguments)+",chart(Gantt.GV),level(Gantt.GV.Header),overview(Gantt.OV)"}}(t.prototype.allP),t.prototype.onHLC=function(t){return function(){t.apply(this,arguments),this.nHLC=e(this.nHLC,this.oGC.GetLevelCount())}}(t.prototype.onHLC),t.prototype.onRL=function(t){return function(){t.apply(this,arguments),this.feGV("onRL")}}(t.prototype.onRL),t.prototype.onSel=function(t){return function(){this.feGV("invAO"),this.invHG(2),t.apply(this,arguments)}}(t.prototype.onSel),t.prototype.onChk=function(t){return function(e){this.invHG(4),t.apply(this,arguments)}}(t.prototype.onChk),t.prototype.onZoom=function(t){return function(){t.apply(this,arguments),this.feGV("onZoom")}}(t.prototype.onZoom),t.prototype.onDelItem=function(t){return function(e){this.oGC.oGL.resPS(),e.ClearBars(),t.apply(this,arguments)}}(t.prototype.onDelItem),t.prototype.resSel=function(t){return function(){this.oGC.oGL.Clear(),this.oGC.rgSel=null,t.apply(this,arguments)}}(t.prototype.resSel),t.prototype.onlayout=function(t){return function(e){var o,i=e.IsSave();i||(this.oLts.lock(),this.lES++,this.bU()),t.apply(this,arguments),i?(e.pCtx("gnt"),e.Add("oh",this.oGC.getOverviewHeight()),e.Add("hh",this.oGC.getHistogramHeight()),e.Add("sd",function(){var t="";return this.GetSelectDates().forEach(function(e){t+=(t?",":"")+e.start.toFormat()+"-"+e.end.toFormat()}),t}.call(this.oGC)),e.Add("sb",function(){var t,e="";return this.getSel().forEach(function(o){t=o.getKey(),e+=(e?",":"")+o.i().GetIndex()+(t?"("+t+")":"")}),e}.call(this.oGC)),this.feGV(function(t,i){e.pCtx("gV"+i),o=t.getCur(),e.Add("fvd",o.ofV.d.toFormat()),e.Add("fvo",o.ofV.o),e.Add("us",o.uS),e.Add("uw",o.uW),e.rCtx()}),e.rCtx()):(e.pCtx("gnt"),this.oGC.SetOverviewHeight(e.GetValue("oh")),this.oGC.SetHistogramHeight(e.GetValue("hh")),function(t){var e,o=[];null!=t&&t.split(",").forEach(function(t){t&&(e=t.indexOf("-"),o.push({start:Date.Create(t.substr(0,e)),end:Date.Create(t.substr(e+1))}))}),this.SetSelectDates(o)}.call(this.oGC,e.GetValue("sd")),function(t){var e,o=[],i=this.oT;null!=t&&c.B.split(t).forEach(function(t){(e=i.ItemBar(~~t.caption,t.subText))&&o.push(e)},this),this.SetSelection(o)}.call(this.oGC,e.GetValue("sb")),this.feGV(function(t,o){e.pCtx("gV"+o),t.setCur({ofV:{d:Date.Create(e.GetValue("fvd")),o:e.GetValue("fvo")},uS:e.GetValue("us"),uW:e.GetValue("uw")}),e.rCtx()}),e.rCtx()),i||(this.eU(),--this.lES,this.oLts.unlock())}}(t.prototype.onlayout),t.prototype.GetStatistics=function(t){return function(){function e(t,e){return c.Format(t,e||0)}var o=t.apply(this,arguments),i=this.oGV,n=this.oGC,r=i.oLvs,s=r.isSR(),h=r.getBL().UL(),a=function(){var t=0;return this.feI(function(e){e.oIB&&(t+=e.oIB.len())}),t}.call(this),u=i.getVB().len()+i.getVBT().len()+i.getVBB().len(),l=n.oGL.GetCount(),p=i.getVL().len();return o+="\nChart.Unit: "+e(h.length)+(s?"/"+e(s.u.rgU.length):""),o+="\nChart.Item-Bar: "+e(u)+"/"+e(a),o+="\nChart.Link: "+e(p)+"/"+e(l),o+="\nChart.Sel: "+e(n.getSelCount())}}(t.prototype.GetStatistics),c.expO({statistics:null},t.prototype,null,!0),t.prototype.xmlL=function(t){return function(e){if(e){var o=c.Tree.XML,i=o.tag,n=o.vOf,r=i.call(e,"DateFormat"),s=i.call(e,"TimeFormat"),h=i.call(e,"Chart");this.FD(((r&&n.call(r,"Short")||"M/d/yyyy")+(s&&n.call(s,"Format")||"h:mm:ss tt")).replace(/ /g,""),s&&n.call(s,"AM")||"AM",s&&n.call(s,"PM")||"PM",function(){h&&this.oGC.SetOptions({firstVisibleDate:this.f2D(n.call(h,"FirstVisibleDate"))}),t.call(this,e),h&&(this.xmlLB(i.call(h,"Bars")),this.xmlLS(i.call(h,"SummaryBars")),this.xmlLL(i.call(h,"Links")));var o=this.oGC.oGB.getOB();o&&(o.h||o.o)&&this.feIB(function(t){t.Offset&&(o.h&&o.h.has(t.GetBar())||o.o&&o.o.has(t.GetBar()))&&(t.Offset=0)})})}}}(t.prototype.xmlL),t.prototype.xmlLC=(t.prototype.xmlLC,function(t,e){var o=c.Tree.XML.vOf;t.SetOptions({valueToItemBarProperty:o.call(e,"CellValueToItemBarProperty"),valueToItemBarKey:o.call(e,"CellValueToItemBarKey")})}),t.prototype.xmlLI=(t.prototype.xmlLI,function(t,e){var o=c.Tree.XML,i=o.tag,n=o.feU,r=o.vOf,s=o.v2N,h=i.call(e,"^Bars");h&&n.call(h,function(e){t.AddBar({key:r.call(e,"Key"),name:r.call(e,"Name"),start:this.f2D(r.call(e,"Start")),end:this.f2D(r.call(e,"End")),caption:r.call(e,"Caption"),hAlignCaption:s(r.call(e,"HAlignCaption")),vAlignCaption:s(r.call(e,"VAlignCaption")),captionHOffset:s(r.call(e,"BarCaptionHOffset")),captionVOffset:s(r.call(e,"BarCaptionVOffset")),showCaption:s(r.call(e,"BarShowCaption")),toolTip:r.call(e,"ToolTip"),canResize:s(r.call(e,"CanResize")),canMove:s(r.call(e,"CanMove")),canMoveToAnother:s(r.call(e,"CanMoveToAnother")),selectable:s(r.call(e,"Selectable")),canStartLink:s(r.call(e,"CanStartLink")),canEndLink:s(r.call(e,"CanEndLink")),canBeLinked:s(r.call(e,"CanBeLinked")),extraCaption:r.call(e,"Extra"),extraCaptionHAlign:s(r.call(e,"ExtraHAlign")),extraCaptionVAlign:s(r.call(e,"ExtraVAlign")),extraCaptionHOffset:s(r.call(e,"ExtraHOffset")),extraCaptionVOffset:s(r.call(e,"ExtraVOffset")),showExtraCaption:s(r.call(e,"BarShowExtraCaption")),effort:r.call(e,"Effort"),overlaidKey:r.call(e,"OverlaidKey"),offset:s(r.call(e,"Offset")),percent:s(r.call(e,"Percent"),null),percentCaptionFormat:r.call(e,"PercentFormat"),showPercentCaption:s(r.call(e,"ShowPercent"),null),alignPercentCaption:s(r.call(e,"PercentAlign"),null)})},this,"Bar")}),t.prototype.xmlLB=function(t){function e(t){return n.call(this,"Def."+t)}var o=c.Tree.XML,i=o.feU,n=o.vOf,r=o.v2N,s=o.v2C,h=this.oGC.oGB;t&&i.call(t,function(t){function o(t,e){null!=e&&(f[t]=e)}function i(t,e){null!=e&&(p[t]=e)}var a,u=n.call(t,"Name"),l=h.Item(u),p={},f={};null!=u&&(o("caption",e.call(t,"Caption")),o("hAlignCaption",r(e.call(t,"HAlignCaption"))),o("vAlignCaption",r(e.call(t,"VAlignCaption"))),o("captionHOffset",r(e.call(t,"BarCaptionHOffset"))),o("captionVOffset",r(e.call(t,"BarCaptionVOffset"))),o("showCaption",r(e.call(t,"BarShowCaption"))),o("toolTip",e.call(t,"ToolTip")),o("canResize",r(e.call(t,"CanResize"))),o("canMove",r(e.call(t,"CanMove"))),o("canMoveToAnother",r(e.call(t,"CanMoveToAnother"))),o("selectable",r(e.call(t,"Selectable"))),o("canStartLink",r(e.call(t,"CanStartLink"))),o("canEndLink",r(e.call(t,"CanEndLink"))),o("canBeLinked",r(e.call(t,"CanBeLinked"))),o("extraCaption",e.call(t,"Extra")),o("extraCaptionHAlign",r(e.call(t,"ExtraHAlign"))),o("extraCaptionVAlign",r(e.call(t,"ExtraVAlign"))),o("extraCaptionHOffset",r(e.call(t,"ExtraHOffset"))),o("extraCaptionVOffset",r(e.call(t,"ExtraVOffset"))),o("showExtraCaption",r(e.call(t,"BarShowExtraCaption"))),i("def",f),i("overlaidType",n.call(t,"OverlaidType")),i("overlaidGroup",n.call(t,"OverlaidGroup")),l?l.SetOptions(p):h.Add(c.Mrg({name:u,shape:null!=(a=r(n.call(t,"Pattern")))&&{pattern:15&r(a,1),patternColor:s(n.call(t,"Color"),"gray"),frameColor:s(n.call(t,"Color"),"black")}||null},p)))},this,"Bar")},t.prototype.xmlLS=function(t){var e,o,i=c.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N;t&&n.call(t,function(t){(e=this.ItemBar(s(r.call(t,"Item"),-1),r.call(t,"Key")))&&n.call(t,function(t){(o=this.ItemBar(s(r.call(t,"Item"),-1),r.call(t,"Key")))&&e.DefineSummaryBars(o)},this,"Bar")},this,"SummaryBar")},t.prototype.xmlLL=function(t){function e(t){var e=l.get(t);return!e&&l.set(t,e=p.cRut.c2A(t).reduce(function(t,e){return t|e})||0),e}function o(t){var e=new Map;return c.B.split(i(t)).forEach(function(t){e.set(t.caption,t.subText)}),e}var n=c.Tree.XML,r=n.feU,s=n.vOf,h=n.v2N,a=this.oGC,u=a.oGL,l=new Map,f=a.getLink(),g=o("00(ML),02(ML),20(MR),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),y=o("00(ML),02(TR,MR,BR),20(TL,ML,BL),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),v=e(f.startPos),d=e(f.endPos);t&&r.call(t,function(t){u.Add({key:s.call(t,"Key"),from:this.ItemBar(h(s.call(t,"StartItem"),-1),s.call(t,"StartBar")),to:this.ItemBar(h(s.call(t,"EndItem"),-1),s.call(t,"EndBar")),visible:h(s.call(t,"Visible")),caption:s.call(t,"Text"),lag:s.call(t,"PDMDelay"),workingLag:s.call(t,"PDMWorkingDelay"),link:function(t){var o=(s.call(t,"StartPos")||"").trim(),i=(s.call(t,"EndPos")||"").trim(),n=g.get(o+i)||g.get(o),r=y.get(o+i)||y.get(i);return!((e(n)&v)==v&&(e(r)&d)==d)&&{startPos:n,endPos:r}||null}(t)})},this,"Link")},t.prototype.addTV=function(e){return function(){var o,i=e.apply(this,arguments);return i&&this instanceof t&&((o=(i.oW.opW||this.oCW).Add("histogram",{Dock:2,SizeExtends:"tree.histogram",Extends:"vertical",Control:i.oHL=new c.Gantt.GV.HL(i)})).GetVisible=i.oHL.showH.bind(i.oHL),this.aSizeW(o),o.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sHH(e),t.apply(this,arguments)}}(o.setClient)),i}}(t.prototype.addTV),t.prototype.onbE=function(t){return function(e,o){if(t.apply(this,arguments),o){var i=o.tagName.toUpperCase(),n=this;if("INPUT"==i||"TEXTAREA"==i){o.__oniE=function(){setTimeout(function(){var t=o.value.substr(o.selectionStart,o.selectionEnd-o.selectionStart);t!=o.__oldS&&n.onesC(o.__oldS=t,e,o)})},o.addEventListener("pointerup",o.__oniE),o.addEventListener("keyup",o.__oniE),o.addEventListener("select",o.__oniE),o.__oniE()}}}}(t.prototype.onbE),t.prototype.oneE=function(t){return function(e,o){o.__oniE&&(o.removeEventListener("pointerup",o.__oniE),o.removeEventListener("keyup",o.__oniE),o.removeEventListener("select",o.__oniE),o.__oniE=o.__oldS=void 0,this.onesC(null,e,o)),t.apply(this,arguments)}}(t.prototype.oneE),t.prototype.onesC=function(t,e,o){var i,n,r=this.oTV.back("psLinkEditSel"),s=this.oTV.back("psBarShapeEditSel");(r||s)&&(!(i=e.v2B())||270!=i.i&&271!=i.i||(n=i.g&&e.oI.ItemBar(i.k))&&function(){var e,o,i,h=this.oIOL;h&&(e=this.oGC.oT.oI,this.bU(),null!=t&&(void 0===this.__mTLA&&(this.__mTLA=this.mTLA||null),void 0===e.__mTBS&&(e.__mTBS=e.mTBS||null)),n&&t&&t.split(v).forEach(function(t){var a,u=this.split(t);u&&(a=1==u.t?h.mIO.get(n).out.get(u.b):h.mIO.get(u.b).out.get(n))&&(r&&(o=o||c.CpM(this.__mTLA)||new Map).set(a,r),s&&(i=i||c.CpM(e.__mTBS)||new Map).set(u.b,s))},this),null==t?(this.mTLA=this.__mTLA,e.mTBS=e.__mTBS,e.__mTBS=this.__mTLA=void 0):(this.mTLA=o||this.__mTLA,e.mTBS=i||e.__mTBS),this.eU())}.call(this.oGC.oGL))},c.ComboBox&&(t.DefCBCap="<%=shortdate(%1)%> - <%=shortdate(%2)%>",t.prototype.dCBl=function(e){return function(o,i){var n=this.oGC.GetPaneWidth(!1),r=[i[0],i[1],n,i[3]],s=[c.ROf(r),i[1],i[2]-n,i[3]],h=c.Tree.TV.prototype.drawCS,a=c.Gantt.GV.prototype.drawB;c.Tree.TV.prototype.drawCS=function(){},e.call(this,o,r),c.Tree.TV.prototype.drawCS=h,t.DefCBCap&&(c.Gantt.GV.prototype.drawB=function(e,o,i){a.apply(this,arguments),!i.getCaption()&&this.drawC(e,o,i,l.Get(t.DefCBCap),33,1)},this.oTV.drawI2.call(this.oGV,o,s,this.getSel().first()),c.Gantt.GV.prototype.drawB=a),h.call(this.oTV,o,i,this.getSelCount(),36)}}(t.prototype.dCBl),t.prototype.cCB=function(e){return function(o){return e.apply(this,arguments)||this.e2V(o)instanceof t.GV}}(t.prototype.cCB),t.prototype.sCB=function(t){return function(){return t.apply(this,arguments)}}(t.prototype.sCB),c.CW.prototype.SetCanvas=function(t,e){return c.ComboBox.implExHost(t,"onselchange,onchange,onscroll,ondatechange")}(c.CW.prototype.SetCanvas)),t.prototype.addGV=function(t,e){function o(e){return e.repAll("name",t)}var i=null;if(null!=t&&t.trim().length||(t="gantt"+this.rgGV.length),!this.oCW.W(t)){var n,r,s,h=(this.oCW.W("main")||this.oCW).Add(t,c.Mrg({Dock:4,Size:this.oGC.opt("paneWidthRight",320)},e)),a=this.oCW.W("filter");i=new c.Gantt.GV(this),this.rgGV.push(i),this.oGV=this.oGV||i,!(h.GetDock()%2)&&h.SetPosition(this.oCW.W("tree").GetPosition()+1),h.Add("client",{Dock:5,HoverExtends:o("control,top,bottom,main.header,main.footer,vertical,vscroll,grip,name,name.header,name.hscroll"),Extends:o("name.hscroll,vertical"),HScroll:o("name.hscroll"),VScroll:"vscroll",Control:i}),(n=h.Add("header",{Dock:1,Resizable:!1,HScroll:o("name.hscroll"),Extends:"vertical",Control:i.oHB,VisibleExtends:i==this.oGV?null:"gantt.header"})).GetVisible=i.showHB.bind(i),this.aSizeW(n),(r=h.Add("hscroll",{Dock:2,Resizable:!1,Size:16,VisibleExtends:o("name.client"),Opacity:0,HoverOpacity:1,Control:new c.ScrollBar})).GetVisible=i.showSB.bind(i),r.oC.Scroll=i.hsScroll.bind(i),r.oC.smthBy=i.hsSmthBy.bind(i),a&&a.SetExtends(a.GetExtends()+","+h.GetShortName()),this.oGV==i&&(this.oTV.oFB.onZ=function(t){return function(e){t.call(this,e);var o,i,n,r,s=e.get(this.oW),h=this.oTV.oHL.oW,a=this.oTV.oW;s&&e.forEach(function(t,u){u&&(o=u.oC)instanceof c.Gantt.GV&&!c.EyR(c.NRt(e.get(u.opW),s))&&u.GetDock()==a.GetDock()&&h.GetDock()==o.oHG.oW.GetDock()&&((i=e.get(a))&&(t[1]=i[1],t[3]=i[3]),(n=e.get(h))&&(r=e.get(o.oHG.oW))&&(r[1]=n[1],r[3]=n[3]))},this)}}(this.oTV.oFB.onZ)),(s=h.Add("histogram",{Dock:2,SizeExtends:"tree.histogram",Extends:"vertical",HScroll:o("name.hscroll"),Control:i.oHG})).GetVisible=i.oHG.showH.bind(i.oHG),this.aSizeW(s),s.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sHH(e),t.apply(this,arguments)}}(s.setClient),this.oGV!=i&&setTimeout(function(){i.oLvs.setSR(i.oLvs.getSR()),i.onDC()})}return i},t.prototype.AddGanttView=function(t,e){this.bU();var o=this.addGV(t,e);return this.eU(),o},t.prototype.delGV=function(t){null!=t&&t.trim().length||(t=this.rgGV[this.rgGV.length-1].oW.opW.GetName());var e=!1,o=this.oCW.W(t);if(o){var i,n,r=null,s=this.oCW.W(o.GetName()+".client");s&&(r=s.GetC())instanceof c.Gantt.GV&&r!=this.oGV&&(e=(i=this.rgGV.indexOf(r))>=0)&&((n=this.oCW.W("filter"))&&n.SetExtends(n.GetExtends().replace(","+o.GetShortName(),"")),this.rgGV.splice(i,1),this.oCW.Remove(o))}return e},t.prototype.RemoveGanttView=function(t){this.bU(),this.delGV(t),this.eU()},t.prototype.feGV=function(t,e){c.Gantt.GV.prototype[t]?this.rgGV.forEach(function(e){e[t].call(e)},this):this.rgGV.forEach(t,e)},t.prototype.feGVU=function(t,e){return c.Gantt.GV.prototype[t]?this.rgGV.forEachU(function(e){e[t].call(e)},this):this.rgGV.forEachU(t,e)},t.prototype.feIB=function(t,e){e=e||this,this.feI(function(o){o.oIB&&o.oIB.forEach(function(o){t.call(e,o)})})},t.prototype.feIBU=function(t,e){return e=e||this,this.feIU(function(o){return o.oIB&&o.oIB.forEachU(function(o){return t.call(e,o)})})},t.prototype.feL=function(t,e){e=e||this,this.oGC.oGL.rgL.forEach(function(o){t.call(e,o)})},t.prototype.feLU=function(t,e){e=e||this,this.oGC.oGL.rgL.forEachU(function(o){return t.call(e,o)})},t.prototype.ondatechange=function(t){this.oLts.ondatechange.do(t)},t.prototype.onchartselchange=function(t){this.oLts.onchartselchange.do(t)},t.prototype.ondateselchange=function(t){this.oLts.ondateselchange.do(t)},t.prototype.oncreatebar=function(t){this.oLts.oncreatebar.do(t)},t.prototype.onbarresize=function(t){this.oLts.onbarresize.do(t)},t.prototype.onbarparentchange=function(t){this.oLts.onbarparentchange.do(t)},t.prototype.onallowlink=function(t){this.oLts.onallowlink.do(t)},t.prototype.oncreatelink=function(t){this.oLts.oncreatelink.do(t)},t.prototype.onDC=function(t){this.ondatechange(t)},t.prototype.onBC=function(t,e){this.oOV.oSE=null,e&&this.resOI(e.i())},t.prototype.resOI=function(t){if(t){var e=this.oGC.oGB.getOB();e&&e.h&&(this.oI.mOI&&this.oI.mOI.delete(t),this.onRL())}},t.prototype.lResOI=function(t,e,o){return t?(this.resOI=t,this.Smooth(function(){e&&this.resOI(e.i()),o&&this.resOI(o)},this)):(t=this.resOI,this.resOI=function(){}),t},t.prototype.GetChart=function(){return this.oGC},t.prototype.initOV=function(){var t=this.oCW,e=this.oOV,o=(t.W("control")||t).Add("overview",{Dock:1,Size:this.oGC.getOverviewHeight(),Control:e});o.SetPosition(0),o.GetResizable=e.GetResizable.bind(e),o.GetVisible=e.GetVisible.bind(e),this.aSizeW(o),o.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sOH(e),t.apply(this,arguments)}}(o.setClient)},t.prototype.invOV=function(t){!this.oCW.lR&&!this.oCW.lPR&&this.oOV.pinvAO(t)},t.prototype.FD=function(t,e,o,i,n){var r=this.oFD;this.oFD={oF:new c.PF(t,"year(y,yy,yyyy,yyyyy),month(M,MM),day(d,dd),hour(h,hh,H,HH),minute(m,mm),second(s,ss),ampm(t,tt)"),pm:o,am:e},i.call(n||this),this.oFD=r},t.prototype.f2D=function(t){var e=this.oFD,o=e.oF.split(t),i=o.map(function(t){return~~t});return o[6]==e.pm&&(i[3]+=12),Date.Create.apply(null,i)},t.prototype.ItemBar=function(t,e){var o=this.oI.Item(t);return o&&o.ItemBar(e)},t.prototype.Bar=function(t){return this.oGC.Bar(t)},t.prototype.invHG=function(t,e){this.resHD(t)&&!this.oCW.lR&&!this.oCW.lPR&&this.feGV(function(o){o.invHG(t,e)})},t.prototype.invHL=function(t,e){!this.oCW.lR&&!this.oCW.lPR&&this.feTV(function(o){o.oHL.pinv(t,e)})},t.prototype.resHD=function(t){return this.oGC.isHV(t)&&(this.feGV(function(t){t.oHG.resHD()})||!0)},t.prototype.Link=function(t){return this.oGC.oGL.Item(t)},t.prototype.resTLB=function(){this.bU(),this.oI.mTBS=this.oGC.oGL.mTLA=this.oGC.oGL.oCPI=null,this.eU()},c.expO({Chart:null},t.prototype),{Gantt:t}}()),c.Mrg(c.Gantt,{DefSchedulePDM:{scheduleType:null,scheduleDate:null,errorShape:null,cycleShape:null,callHasCycle:null,criticalPathBarShape:null,criticalPathOffBarShape:null,criticalPathLinkApp:null,criticalPathOffLinkApp:null,criticalPathLenMethod:null},ChartOptions:{paneWidthLeft:null,paneWidthRight:null,levelCount:2,labels:null,toolTips:null,unitScale:4096,locale:null,drawLevelSeparator:null,unitWidth:18,unitWidthNonworking:null,minUnitWidth:12,maxUnitWidth:36,firstVisibleDate:null,firstVisibleOffset:null,nonworkingDays:null,showNonworkingDays:null,nonworkingHours:null,showNonworkingHours:null,showNonworkingUnits:null,adjustLevelsToBase:null,scrollRange:null,scrollBar:null,drawGridLines:null,bars:null,singleSel:null,allowSelectDate:null,selectDates:null,resizeUnitScale:null,resizeUnitCount:null,dateTickerLabel:null,dateTickerLabelVAlign:null,dateTickerLabelHMargin:null,drawDateTicker:null,showLinks:null,link:null,linkStartFrom:null,linkEndTo:null,linkUnselected:null,overviewVisible:null,overviewHeight:null,overviewShowSelectDates:null,overviewToolTip:null,overviewZoomCaption:null,allowOverviewZoom:null,overviewZoomUnit:null,histogramVisible:null,histogramHeight:null,histogramView:null,histogramUnitScale:null,histogramUnitCount:null,histogramZOrder:null,overlaidOnMoving:null},LevelOptions:{label:null,unit:null,count:null,align:null,shape:null,drawGridLines:null,drawTickLines:null,drawTickLinesFrom:null,formatLabel:null,toolTip:null},BarOptions:{name:null,shortcut:null,shape:null,height:null,def:null,histogramShape:null,histogramType:null,histogramCriticalColor:null,histogramCriticalValue:null,showHistogramValues:null,formatHistogramValues:"value = int(value) ? value : value format ''",histogramGridLinesColor:null,histogramRulerLinesColor:null,histogramItems:null,histogramCumulativeColors:null,histogramCumulativeOriginalColorBars:null,histogramCumulativeShowLegend:null,overlaidType:null,overlaidGroup:null,overlaid:null,overviewColor:null},ItemBarOptions:{name:null,key:null,start:null,end:null,shape:null,height:null,selected:null,selectable:null,caption:null,hAlignCaption:null,vAlignCaption:null,showCaption:null,extraCaption:null,extraCaptionHAlign:null,extraCaptionVAlign:null,showExtraCaption:null,toolTip:null,canResize:null,canMove:null,canMoveToAnother:null,summaryBarShape:null,captionHOffset:null,captionVOffset:null,extraCaptionHOffset:null,extraCaptionVOffset:null,canStartLink:null,canEndLink:null,canBeLinked:null,effort:null,overlaidKey:null,offset:null,percent:null,showPercentCaption:null,alignPercentCaption:null,canResizePercent:null,percentCaptionFormat:null,overviewColor:null,histLegend:null,predecessor:null,successor:null},LinkOptions:{visible:!0,key:null,caption:null,from:null,to:null,lag:null,workingLag:null,link:null,type:null}}),c.Tree.Options.debug=null,c.Tree.Options.chart=c.Gantt.ChartOptions,c.Tree.ConditionalFormatOptions.applyToBars=null,c.Tree.ConditionalFormatOptions.barShape=null,c.Tree.ConditionalFormats.prototype.resCF=function(t){return function(){return this.resBF(),t.apply(this,arguments)}}(c.Tree.ConditionalFormats.prototype.resCF),c.Tree.ConditionalFormats.prototype.resBF=function(){this.mBF=null},c.Tree.ConditionalFormats.prototype.b2S=function(t,e){var o,i,n=this.mBF||(this.mBF=function(){var t=new Map;return this.forEach(function(e){if(e.isEnabled()&&e.isValid()&&e.getBarShape()){var o=e.getApplyToBars();o&&o.forEach(function(o){var i=t.get(o);!i&&t.set(o,i=[]),i.push(e)})}}),t}.call(this));return n.size&&(o=n.get(t))&&o.forEach(function(t){t.getExC().Evaluate(e.rgC[0])&&(i=c.Inh(t.getBarShape(),i||{}))}),i},c.Mrg(c.Tree.ConditionalFormat.prototype,{GetApplyToBars:function(){return this.oO.applyToBars},SetApplyToBars:function(t){this.bU(),this.resCF(),this.oO.applyToBars=t,this.eU()},getApplyToBars:function(){var t=this.oCF.oT.oGC.oGB.Items(this.GetApplyToBars());return t.len()?t:null},GetBarShape:function(){return this.oO.barShape},SetBarShape:function(t){this.bU(),this.resCF(),this.oO.barShape=c.S.A2S(t),this.eU()},getBarShape:function(){return this.dTV().toShape(this.GetBarShape())}}),c.expO({ApplyToBars:null,BarShape:null},c.Tree.ConditionalFormat.prototype),c.Mrg(c.Gantt,function(){function t(t){this.init(t)}function a(t){this.init(t)}var l=c.Gantt.ChartOptions;return t.prototype.init=function(t){this.oT=t,this.oO=c.Cpy(l),this.mLb=new Map,this.mTt=new Map,this.lSyl=0,this.lSyv=0,this.rgSel=null,this.oNW=new c.Gantt.NW(this),this.oLvs=new c.Gantt.Levels(this),this.oAL=new c.Gantt.AL(this.oLvs),this.oGB=new c.Gantt.Bars(this),this.oGL=new c.Gantt.Links(this),this.oSD=new c.Gantt.SD(this),this.import()},t.prototype.import=function(t){t=t||this.oT,["bU","eU","feGV","getLIV","resHD"].forEach(function(e){this[e]=t[e].bind(t)},this)},t.prototype.onDelBar=function(t){t.rgS&&t.rgS.forEach(function(e){e.rgpS&&e.rgpS.remove(t)&&!e.rgpS.len()&&(e.rgpS=null)}),t.rgpS&&t.rgpS.forEach(function(e){e.rgS&&e.rgS.remove(t)&&!e.rgS.len()&&(e.rgS=null),e.xSE()}),this.removeSel(t),this.oGL.onDelBar(t),this.oT.onBC(2,t)},t.prototype.onAddLink=function(t){this.resVL()},t.prototype.onDelLink=function(t){this.resVL()},t.prototype.onAllowLink=function(t,e){var o={start:t,end:e,cancel:!1};return this.oT.onallowlink(o),!o.cancel},t.prototype.onCreateLink=function(t){this.oT.oncreatelink(t)},t.prototype.resVB=function(){this.feGV("resVB")},t.prototype.resSD=function(){this.feGV(function(t){t.oLvs.oSDL=null,t.resSDO()})},t.prototype.resVL=function(){this.feGV("resVL")},t.prototype.unkS=function(){return this.oUnkS||(this.oUnkS={frameColor:"rgb(196,196,196)",patternColor:"rgb(224,224,224)",pattern:6})},t.prototype.unkH=function(){return 16},t.prototype.onsize=function(t){this.nPWL=this.oT.oTV.scaled(this.GetPaneWidthLeft())},t.prototype.onZoom=function(){this.SetPaneWidthLeft(this.oT.oTV.unscaled(this.nPWL))},t.prototype.EnsureVisibleSelection=function(t){this.oT.oGV.EnsureVisibleSelection(t)},t.prototype.GetOptions=function(){return this.oO},t.prototype.SetOptions=function(t,e){var o=!1;if(null!=t){var i=[],n=this.GetOptions();if(null!=n){for(var r in n){var s=t[r];void 0!==s&&(i.push(r),n[r]!==s&&(n[r]=c.CpV(s)))}if(e)for(var r in t)r in n||(n[r]=c.CpV(t[r]));(o=0!=i.length)&&(this.bU(),i.forEach(function(t){var e=c.setM(t);e in this&&this[e].call(this,n[t])},this),this.eU())}}return o},t.prototype.opt=function(t,e){var o=this.oO[t];return null==o&&null==(o=l[t])&&(o=e),o},t.prototype.pane=function(t){return this.oT[t?"oGV":"oTV"]},t.prototype.GetPaneWidth=function(t){return c.C2R(this.pane(t).oW.opW.GetClientRect())[2]},t.prototype.SetPaneWidth=function(t,e){if(null!=e){var o=this.pane(t).oW;o&&o.opW&&(this.bU(),o.opW.IsDockable()||(e=this.GetPaneWidth(!1)+this.GetPaneWidth(!0)-e,o=this.pane(!t).oW),o.opW.SetSize(e),this.eU())}},t.prototype.GetPaneWidthLeft=function(){return this.GetPaneWidth(!1)},t.prototype.SetPaneWidthLeft=function(t){this.SetPaneWidth(!1,t)},t.prototype.GetPaneWidthRight=function(){return this.GetPaneWidth(!0)},t.prototype.SetPaneWidthRight=function(t){this.SetPaneWidth(!0,t)},t.prototype.GetLevelCount=function(){return this.oLvs.len()},t.prototype.SetLevelCount=function(t){(t=e(1,~~t))!=this.GetLevelCount()&&(this.bU(),this.feGV(function(e){e.oLvs.setLC(t)}),this.eU())},t.prototype.Level=function(t){return this.oLvs.at(this.oLvs.len()-(t+1))},t.prototype.GetLabels=function(){return this.oO.labels},t.prototype.SetLabels=function(t){var e,o;t=t||{year:"<%yy%><|>'<%yy%><|><%yyyy%>",month:"<|><%m1%><|><%m2%><|><%m3%><|><%mmmm%><|><%m3%> '<%yy%><|><%mmmm%> <%yyyy%>",week:"<|><%ww%><|><%m3%> <%d%>, '<%yy%><%ww%><|><%mmmm%> <%d%>, <%yyyy%><%ww%><||><||>256",day:"<|><%d%><|><%d1%> <%d%><|><%d2%> <%d%><|><%d3%> <%d%><|><%dddd%> <%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096",hour:"<|><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536",minute:"<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>",second:"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"},this.bU(),this.mLb.clear();for(var n in t)null!=t[n]&&(o=i(t[n]))&&null!=(e=c.UnitEnum["ex"+c.getP(n)])&&this.mLb.set(e,o);this.onLb(),this.eU()},t.prototype.GetLabel=function(t){return this.mLb.get(t)},t.prototype.SetLabel=function(t,e){this.bU(),this.mLb.delete(t),null!=e&&this.mLb.set(t,i(e)),this.onLb(),this.eU()},t.prototype.onLb=function(){this.oT.lnt||(this.bU(),this.feGV(function(t){t.oLvs.onLb()}),this.eU())},t.prototype.visLb=function(t){t=r(t,16777216);var e=[];return this.mLb.forEach(function(o,i){i<=t&&e.push({u:i,l:o})}),e.sort(function(t,e){return t.u-e.u}),e},t.prototype.GetToolTips=function(){return this.oO.toolTips},t.prototype.SetToolTips=function(t){var e,o;t=t||{year:"<%yyyy%>",month:"<%mmmm%> <%yyyy%>",week:"<%mmmm%> <%d%>, <%yyyy%>/<%ww%>",day:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%>",hour:"%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>",minute:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>",second:"<%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"},this.bU(),this.mTt.clear();for(var n in t)null!=t[n]&&(o=i(t[n]))&&null!=(e=c.UnitEnum["ex"+c.getP(n)])&&this.mTt.set(e,o);this.onTt(),this.eU()},t.prototype.GetToolTip=function(t){return this.mTt.get(t)},t.prototype.SetToolTip=function(t,e){this.bU(),this.mTt.delete(t),null!=e&&this.mTt.set(t,i(e)),this.onTt(),this.eU()},t.prototype.onTt=function(){},t.prototype.GetUnitScale=function(){return this.oLvs.getUS()},t.prototype.SetUnitScale=function(t){this.bU(),this.oLvs.setUS(s(t,c.UnitEnum,4096)),this.eU()},t.prototype.GetLocale=function(){return this.oO.locale},t.prototype.SetLocale=function(t){this.bU(),this.oO.locale=t||null,this.onRL(3),this.eU()},t.prototype.getLocale=function(){return this.GetLocale()},t.prototype.locale=function(t,e){var o;return c.Loc.Push(this.getLocale()),t&&(o=t.call(e||this)),c.Loc.Pop(),o},t.prototype.onRL=function(t){1&t&&this.oAL.XC(),2&t&&this.oNW.XC(),this.feGV(function(t){t.oLvs.onRL()})},t.prototype.GetDrawLevelSeparator=function(){return this.oO.drawLevelSeparator},t.prototype.SetDrawLevelSeparator=function(t){this.bU(),this.oO.drawLevelSeparator=t,this.eU()},t.prototype.getDrawLevelSeparator=function(){return s(this.GetDrawLevelSeparator(),c.Gantt.LevelLineEnum,-1)},t.prototype.GetUnitWidth=function(){return this.oLvs.getUW()},t.prototype.SetUnitWidth=function(t){this.bU(),this.oLvs.setUW(t),this.eU()},t.prototype.getUnitWidth=function(){return this.GetUnitWidth()},t.prototype.GetUnitWidthNonworking=function(){return this.oLvs.getUNW()},t.prototype.SetUnitWidthNonworking=function(t){this.bU(),this.oLvs.setUNW(t),this.eU()},t.prototype.getUnitWidthNonworking=function(){return this.GetUnitWidthNonworking()},t.prototype.GetMinUnitWidth=function(){return this.oLvs.getmUW()},t.prototype.SetMinUnitWidth=function(t){this.bU(),this.oLvs.setmUW(t),this.eU()},t.prototype.getMinUnitWidth=function(){return this.GetMinUnitWidth()},t.prototype.GetMaxUnitWidth=function(){return this.oLvs.getMUW()},t.prototype.SetMaxUnitWidth=function(t){this.bU(),this.oLvs.setMUW(t),this.eU()},t.prototype.getMaxUnitWidth=function(){return this.GetMaxUnitWidth()},t.prototype.GetFirstVisibleDate=function(){return this.oLvs.getFVD()},t.prototype.SetFirstVisibleDate=function(t){this.bU(),this.oLvs.setFVD(t),this.eU()},t.prototype.getFirstVisibleDate=function(){return this.GetFirstVisibleDate()},t.prototype.GetFirstVisibleOffset=function(){return this.oLvs.getFVO()},t.prototype.SetFirstVisibleOffset=function(t){this.bU(),this.oLvs.setFVO(t),this.eU()},t.prototype.getFirstVisibleOffset=function(){return this.GetFirstVisibleOffset()},t.prototype.GetLastVisibleDate=function(){return this.oT.oGV.GetLastVisibleDate()},t.prototype.GetNonworkingDays=function(){return this.oNW.getNWD()},t.prototype.SetNonworkingDays=function(t){this.bU(),this.oNW.setNWD(t),this.onRL(),this.eU()},t.prototype.getNonworkingDays=function(){return this.GetNonworkingDays()},t.prototype.GetShowNonworkingDays=function(){return this.oNW.getShowNWD()},t.prototype.SetShowNonworkingDays=function(t){this.bU(),this.oNW.setShowNWD(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingDays=function(){return this.GetShowNonworkingDays()},t.prototype.GetNonworkingHours=function(){return this.oNW.getNWH()},t.prototype.SetNonworkingHours=function(t){this.bU(),this.oNW.setNWH(t),this.onRL(),this.eU()},t.prototype.getNonworkingHours=function(){return this.GetNonworkingHours()},t.prototype.GetShowNonworkingHours=function(){return this.oNW.getShowNWH()},t.prototype.SetShowNonworkingHours=function(t){this.bU(),this.oNW.setShowNWH(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingHours=function(){return this.GetShowNonworkingHours()},t.prototype.GetShowNonworkingUnits=function(){return this.oNW.getShowNWU()},t.prototype.SetShowNonworkingUnits=function(t){this.bU(),this.oNW.setShowNWU(t),this.onRL(),this.eU()},t.prototype.getShowNonworkingUnits=function(){return this.GetShowNonworkingUnits()},t.prototype.GetAdjustLevelsToBase=function(){return this.oO.adjustLevelsToBase},t.prototype.SetAdjustLevelsToBase=function(t){this.bU(),this.oO.adjustLevelsToBase=t,this.onRL(),this.eU()},t.prototype.getAdjustLevelsToBase=function(){return this.opt("adjustLevelsToBase",!1)},t.prototype.GetScrollRange=function(){return this.oLvs.getSR()},t.prototype.SetScrollRange=function(t){this.bU(),this.oLvs.setSR(t),this.eU()},t.prototype.getScrollRange=function(){return this.GetScrollRange()},t.prototype.GetScrollBar=function(){return this.oO.scrollBar},t.prototype.SetScrollBar=function(t){this.bU(),this.oO.scrollBar=t,this.eU()},t.prototype.getScrollBar=function(){return this.opt("scrollBar",!0)},t.prototype.ScrollTo=function(t,e){this.bU(),this.oLvs.scrollTo(t,e),this.eU()},t.prototype.Zoom=function(t,e,o){this.oLvs.zoom(t,e,{cUW:o})},t.prototype.GetDrawGridLines=function(){return this.oO.drawGridLines},t.prototype.SetDrawGridLines=function(t){this.bU(),this.oO.drawGridLines=t,this.eU()},t.prototype.getDrawGridLines=function(){var t=this.oT.oTV,e=t.islow()?0:this.opt("drawGridLines");return null==e&&(e=t.getDrawGridLines()),e},t.prototype.GetBars=function(){return this.oGB},t.prototype.SetBars=function(t){this.oGB.load(t)},t.prototype.Bar=function(t){return this.oGB.Item(t)},t.prototype.GetAllowSelectDate=function(){return this.oO.allowSelectDate},t.prototype.SetAllowSelectDate=function(t){this.bU(),this.oO.allowSelectDate=t,this.eU()},t.prototype.getAllowSelectDate=function(){return r(this.GetAllowSelectDate(),1)},t.prototype.GetSelectDates=function(){return this.oSD.GetSelectDates()},t.prototype.SetSelectDates=function(t){return this.oSD.SetSelectDates(t)},t.prototype.GetResizeUnitScale=function(){return this.oLvs.getrUS()},t.prototype.SetResizeUnitScale=function(t){this.bU(),this.oLvs.setrUS(s(t,c.UnitEnum,4096)),this.eU()},t.prototype.GetResizeUnitCount=function(){return this.oLvs.getrUC()},t.prototype.SetResizeUnitCount=function(t){this.bU(),this.oLvs.setrUC(t),this.eU()},t.prototype.GetDateTickerLabel=function(){return this.oO.dateTickerLabel},t.prototype.SetDateTickerLabel=function(t){this.bU(),this.oO.dateTickerLabel=t,this.eU()},t.prototype.getDateTickerLabel=function(){return i(this.opt("dateTickerLabel"))},t.prototype.GetDateTickerLabelVAlign=function(){return this.oO.dateTickerLabelVAlign},t.prototype.SetDateTickerLabelVAlign=function(t){this.bU(),this.oO.dateTickerLabelVAlign=t,this.eU()},t.prototype.getDateTickerLabelVAlign=function(){return n(this.opt("dateTickerLabelVAlign",0))},t.prototype.GetDateTickerLabelHMargin=function(){return this.oO.dateTickerLabelHMargin},t.prototype.SetDateTickerLabelHMargin=function(t){this.bU(),this.oO.dateTickerLabelHMargin=t,this.eU()},t.prototype.getDateTickerLabelHMargin=function(){return e(0,n(this.opt("dateTickerLabelHMargin",4)))},t.prototype.GetDrawDateTicker=function(){return this.oO.drawDateTicker},t.prototype.SetDrawDateTicker=function(t){this.bU(),this.oO.drawDateTicker=t,this.eU()},t.prototype.getDrawDateTicker=function(){return c.ToB(this.GetDrawDateTicker())},t.prototype.GetLinks=function(){return this.oGL},t.prototype.GetShowLinks=function(){return this.oO.showLinks},t.prototype.SetShowLinks=function(t){this.bU(),this.oO.showLinks=t,this.eU()},t.prototype.getShowLinks=function(){return s(this.GetShowLinks(),c.ShowLinksEnum,33)},t.prototype.GetLink=function(){return this.oO.link},t.prototype.SetLink=function(t){this.bU(),this.oL=null,this.oO.link=t,this.eU()},t.prototype.getLink=function(){return this.oL||(this.oL=c.L.aPP(this.GetLink())||d),this.oL},t.prototype.GetLinkStartFrom=function(){return this.oO.linkStartFrom},t.prototype.SetLinkStartFrom=function(t){this.bU(),this.oLS=void 0,this.oO.linkStartFrom=t,this.eU()},t.prototype.getLinkStartFrom=function(){var t=this.oLS;return void 0===t&&(t=c.L.aPP(this.GetLinkStartFrom())||null,this.oLS=t),t},t.prototype.GetLinkEndTo=function(){return this.oO.linkEndTo},t.prototype.SetLinkEndTo=function(t){this.bU(),this.oLE=void 0,this.oO.linkEndTo=t,this.eU()},t.prototype.getLinkEndTo=function(){var t=this.oLE;return void 0===t&&(t=c.L.aPP(this.GetLinkEndTo())||null,this.oLE=t),t},t.prototype.GetLinkUnselected=function(){return this.oO.linkUnselected},t.prototype.SetLinkUnselected=function(t){this.bU(),this.oLU=void 0,this.oO.linkUnselected=t,this.eU()},t.prototype.getLinkUnselected=function(){var t=this.oLU;return void 0===t&&(t=c.L.aPP(this.GetLinkUnselected())||null,this.oLU=t),t},t.prototype.GetOverviewVisible=function(){return this.oO.overviewVisible},t.prototype.SetOverviewVisible=function(t){this.bU(),this.oO.overviewVisible=t,this.eU()},t.prototype.getOverviewVisible=function(){return s(this.GetOverviewVisible(),c.Gantt.OverviewVisibleEnum)},t.prototype.GetOverviewHeight=function(){return this.oO.overviewHeight},t.prototype.SetOverviewHeight=function(t){this.bU(),this.oO.overviewHeight=t,this.eU()},t.prototype.getOverviewHeight=function(){return n(this.GetOverviewHeight(),36)},t.prototype.GetOverviewShowSelectDates=function(){return this.oO.overviewShowSelectDates},t.prototype.SetOverviewShowSelectDates=function(t){this.bU(),this.oO.overviewShowSelectDates=t,this.eU()},t.prototype.getOverviewShowSelectDates=function(){return!!this.GetOverviewShowSelectDates()},t.prototype.getOverviewFlags=function(){return(this.getOverviewShowSelectDates()?1:0)|(this.getAllowOverviewZoom()?4:0)},t.prototype.GetOverviewToolTip=function(){return this.oO.overviewToolTip},t.prototype.SetOverviewToolTip=function(t){this.oO.overviewToolTip=t},t.prototype.getOverviewToolTip=function(){return i(this.GetOverviewToolTip())},t.prototype.GetOverviewZoomCaption=function(){return this.oO.overviewZoomCaption},t.prototype.SetOverviewZoomCaption=function(t){this.bU(),this.oO.overviewZoomCaption=t,this.eU()},t.prototype.getOverviewZoomCaption=function(){return i(this.GetOverviewZoomCaption())},t.prototype.GetAllowOverviewZoom=function(){return this.oO.allowOverviewZoom},t.prototype.SetAllowOverviewZoom=function(t){this.bU(),this.oO.allowOverviewZoom=t,this.eU()},t.prototype.getAllowOverviewZoom=function(){return this.GetAllowOverviewZoom()},t.prototype.GetOverviewZoomUnit=function(){return this.oO.overviewZoomUnit},t.prototype.SetOverviewZoomUnit=function(t){this.bU(),this.oO.overviewZoomUnit=t,this.eU()},t.prototype.getOverviewZoomUnit=function(){return e(0,n(this.GetOverviewZoomUnit()))},t.prototype.GetHistogramVisible=function(){return this.oO.histogramVisible},t.prototype.SetHistogramVisible=function(t){this.bU(),this.oO.histogramVisible=t,this.eU()},t.prototype.getHistogramVisible=function(){return!!this.GetHistogramVisible()},t.prototype.isHV=function(t){return this.getHistogramVisible()&&this.getHistogramHeight()&&(null==t||this.hV(t))},t.prototype.GetHistogramHeight=function(){return this.oO.histogramHeight},t.prototype.SetHistogramHeight=function(t){this.bU(),this.oO.histogramHeight=t,this.eU()},t.prototype.getHistogramHeight=function(){return n(this.GetHistogramHeight(),36)},t.prototype.GetHistogramView=function(){return this.oO.histogramView},t.prototype.SetHistogramView=function(t){this.bU(),this.resHD(),this.oO.histogramView=t,this.eU()},t.prototype.getHistogramView=function(){return s(this.GetHistogramView(),c.Gantt.HistogramViewEnum,1)},t.prototype.hV=function(t){return null==t?this.getHistogramView():(t&this.getHistogramView())==t||112&t&&4==(65535&this.getHistogramView())},t.prototype.GetHistogramUnitScale=function(){return this.oO.histogramUnitScale},t.prototype.SetHistogramUnitScale=function(t){this.bU(),this.oO.histogramUnitScale=t,this.eU()},t.prototype.GetHistogramUnitCount=function(){return this.oO.histogramUnitCount},t.prototype.SetHistogramUnitCount=function(t){this.bU(),this.oO.histogramUnitCount=t,this.eU()},t.prototype.gethU=function(){var t=this.oLvs.getrU();return{s:r(this.GetHistogramUnitScale(),t.s),c:e(1,r(this.GetHistogramUnitCount(),t.c))}},t.prototype.GetHistogramZOrder=function(){return this.oO.histogramZOrder},t.prototype.SetHistogramZOrder=function(t){this.bU(),this.resHD(),this.oO.histogramZOrder=t,this.eU()},t.prototype.getHistogramZOrder=function(){return i(this.GetHistogramZOrder())},t.prototype.GetHistogramValue=function(t){return this.oT.oGV.oHG.V(t)},t.prototype.HistogramValue=t.prototype.GetHistogramValue,t.prototype.GetOverlaidOnMoving=function(){return this.oO.overlaidOnMoving},t.prototype.SetOverlaidOnMoving=function(t){this.bU(),this.oO.overlaidOnMoving=t,this.eU()},t.prototype.getOverlaidOnMoving=function(){return c.ToB(this.GetOverlaidOnMoving())},t.prototype.se=function(){var t,e,o;return this.oT.feIB(function(i){o=i.se(),(!t||o.s.Compare(t)<0)&&(t=o.s),(!e||o.e.Compare(e)>0)&&(e=o.e)}),{s:t,e:e}},t.prototype.GetStartPrintDate=function(){return this.se().s},t.prototype.GetEndPrintDate=function(){return this.se().e},t.prototype.GetSingleSel=function(){return this.oO.singleSel},t.prototype.SetSingleSel=function(t){this.bU(),this.n1S=null,this.oO.singleSel=t,this.eU()},t.prototype.getSingleSel=function(){var t=this.n1S;return null==t&&(null==(t=this.GetSingleSel())&&(t=l.singleSel),t=r(t,c.Tree.SingleSelEnum.exEnableSel),this.n1S=t),t},t.prototype.GetSelection=function(){return this.rgSel instanceof c.Arr?this.rgSel.byO().slice():this.rgSel},t.prototype.SetSelection=function(t){this.select(t)},t.prototype.RemoveSelection=function(){var t,e=0;return this.rgSel&&this.oT.Smooth(function(){(e=(t=this.getSel()).len())&&(this.rgSel=null,t.forEach(function(t){t.Remove()}))},this),e},t.prototype.getSel=function(){var t=c.Arr.empty;return this.rgSel&&(t=this.rgSel instanceof c.Arr?this.rgSel:new c.Arr(this.rgSel)),t},t.prototype.isSelected=function(t){return this.rgSel instanceof c.Arr?this.rgSel.has(t):this.rgSel==t},t.prototype.isSable=function(t){return t instanceof c.Gantt.ItemBar&&t.isSelectable()},t.prototype.getSelCount=function(){var t=0;return this.rgSel&&(t++,this.rgSel instanceof c.Arr&&(t=this.rgSel.len())),t},t.prototype.removeSel=function(t){this.rgSel&&this.isSelected(t)&&(this.rgSel instanceof c.Arr?(this.rgSel.remove(t),this.rgSel.len()||(this.rgSel=null)):this.rgSel=null)},t.prototype.allowSelect=function(){return this.getSingleSel()!=c.Tree.SingleSelEnum.exDisableSel},t.prototype.isSingleSel=function(){return this.getSingleSel()&c.Tree.SingleSelEnum.exSingleSel},t.prototype.isToggleSel=function(){return this.getSingleSel()&c.Tree.SingleSelEnum.exToggleSel},t.prototype.isToggleCtrlSel=function(){return 0==(this.getSingleSel()&c.Tree.SingleSelEnum.exDisableCtrlSel)},t.prototype.isShiftSel=function(){return 0==(this.getSingleSel()&c.Tree.SingleSelEnum.exDisableShiftSel)},t.prototype.allowSelectByDrag=function(){return 0==(this.getSingleSel()&c.Tree.SingleSelEnum.exDisableDrag)},t.prototype.select=function(t,i){function n(t){var i=!1,n=this.isSelected(t),r=this.isSable(t);if(null==t)i=null!=this.rgSel,this.rgSel=null;else if(this.isSingleSel()){var a=this.rgSel;this.rgSel=!r||h&&n?null:t,i=a!=this.rgSel}else if(s&&this.rgSel&&this.rgSel.len()){var u=this.getLIV(),l=u.rgVI.indexOf(this.rgSel.last()),p=u.rgVI.indexOf(t);if(l>=0&&p>=0)for(var f=o(p,l),g=e(p,l);f<=g;f++){var y=u.rgVI.at(f);!this.rgSel.has(y)&&y.isSelectable()&&(i=!0,this.rgSel.push(y))}}else h&&n?(i=n,this.removeSel(t)):(h||(i=null!=this.rgSel&&(!n||this.rgSel.len()>1),this.rgSel=null),r&&(this.rgSel=this.rgSel||new c.Arr).push(t)),i|=n!=this.isSelected(t);return i}var r=!1,s=1==(i=i||{}).selType,h=2&i.selType,a=function(t){function e(t){return(t instanceof c.Tree.Item?i.has(t)&&t.oIB:t instanceof c.Gantt.ItemBar&&i.has(t.i())&&t)||null}var o=null;if(null!=t){o=new c.Arr;var i=this.oT.oI;t==i&&(t=i.rgI),t instanceof Array||t instanceof c.Arr?t.forEach(function(t){o.pushnn(e.call(this,t))},this):o.pushnn(e.call(this,t)),o.len()?1==o.len()&&(o=o.at(0)):o=null}return o}.call(this,t);return a instanceof c.Arr?s?r|=n.call(this,a.last()):h?a.forEach(function(t){r|=n.call(this,t)},this):(r=!a.equal(this.rgSel))&&(this.isSingleSel()?n.call(this,a.last()):(this.rgSel=new c.Arr,a.forEach(function(t){t.isSelectable()&&this.rgSel.push(t)},this))):r=n.call(this,a),r&&(this.rgSel instanceof c.Arr&&(this.rgSel.len()||(this.rgSel=null)),(null==i.selChange||i.selChange)&&(this.feGV("invAO"),this.onSel())),r},t.prototype.onSel=function(){this.oT.invHG(8),this.oT.onchartselchange(this.GetSelection())},t.prototype.eyB=function(){return 0},a.prototype.init=function(t){this.oT=t,this.oLts=t.oLts,this.lI=0,this.lsX=0,this.oLvs=t.oGV?new c.Gantt.Levels(t.oGC).copy(t.oGC.oLvs):t.oGC.oLvs,this.oHB=new a.Header(this),this.oHG=new a.HG(this),this.import(),this.oLvs.setGV(this)},c.SB.addProto(a.prototype),a.prototype.SetClientRect=function(t){},a.prototype.import=function(){var t=this.dTV(),e=this.gC();t.export(this),["cwbU","cweU","toShapes","toShape","iaShape","getCursors","gAA","getScale","SetZoom","GetZoom","getTfi","ctxTfi","getLocked","isReadOnly","getSmooth","getGridLines","pGL","getHeaderHeight","getPad","e2V","Smooth","Smoothless","getShowLockedItems","getLIV","getLIVT","getLIVB","getDebug","getToolTipDelay","getToolTipPopDelay","getToolTipWidth","getDefaultItemHeight","allowTT"].forEach(function(e){this[e]=t[e].bind(t)},this),["ptCA","rtCA","p2TB","p2I","p2Il","p2A","p2V","onA","onanchorclick","ar2I","ap2I","HTl","sHTl","e2I","e2W","rurOnlyAO","clip2VC","onClick","onclick"].forEach(function(e){this[e]=t[e].bind(this)},this),["getSel","getDrawGridLines","getDateTickerLabel","getDateTickerLabelVAlign","getDateTickerLabelHMargin","getDrawDateTicker","getShowLinks","getLink","getLinkStartFrom","getLinkEndTo","getLinkUnselected","getHistogramVisible"].forEach(function(t){this[t]=e[t].bind(e)},this)},a.prototype.setTimeout=function(){return c.setTimeout.apply(this,arguments)},a.prototype.dTV=function(){return this.oT.oTV},a.prototype.showHB=function(){return this.dTV().showHB()},a.prototype.gC=function(){return this.oT.oGC},a.prototype.showSB=function(){return this.gC().getScrollBar()},a.prototype.toPointer=function(t){return c.pS2T(this.gPtr(t),t.target,this.GetCanvas())},a.prototype.GetPageSize=function(){var t=this.oW.GetClientRect();return t&&[this.scaled(t[2]),this.scaled(t[3])]||[0,0]},a.prototype.origin=function(t){return t=t||this.dTV().GetScroll(),[0,-t.y]},a.prototype.GetScrollRect=function(){var t=this.origin(),e=this.GetPageSize();return[-t[0],-t[1],e[0],e[1]]},a.prototype.GetCanvasRect=function(){var t=this.GetClientRect(),e=this.GetCanvas();return e&&(t=[0,0,e.width,e.height]),t},a.prototype.GetVisibleRect=function(){return c.NRt(this.GetClientRect(),this.GetCanvasRect())},a.prototype.GetViewRect=function(t){return c.EArtC((t||this.gCW()).GetCanvas())},a.prototype.c2V=function(t,e){var o=t,i=e,n=this.GetViewRect();if(1==arguments.length){var r=arguments[0];o=p.X(r),i=p.Y(r)}return{x:o+n[0],y:i+n[1]}},a.prototype.v2C=function(t,e){var o=t,i=e,n=this.GetViewRect();if(1==arguments.length){var r=arguments[0];o=p.X(r),i=p.Y(r)}return{x:o-n[0],y:i-n[1]}},a.prototype.c2Vrt=function(t){var e=this.c2V(t);return[e.x,e.y,t[2],t[3]]},a.prototype.v2Crt=function(t){var e=this.v2C(t);return[e.x,e.y,t[2],t[3]]},a.prototype.bU=function(){this.lI++},a.prototype.eU=function(){--this.lI||this.invAO()},a.prototype.wAO=function(){return this._wAO},a.prototype.isClkAble=function(){return this.isSelectable()&&!this.isReadOnly()},a.prototype.htAO=c.Tree.TV.prototype.htAO,a.prototype.onSetAO=c.Tree.TV.prototype.onSetAO,a.prototype.onExtAO=function(t,e){},a.prototype.locale=function(t,e){return this.gC().locale(t,e||this)},a.prototype.ctxLoc=function(t,e,o){var i;return this.locale(function(){i=this.ctxTfi(t,e||this,o)},this),i},a.prototype.onpaint=function(t){!this.lI&&this.locale(function(){c.SB.prototype.onpaint.call(this,t)},this)},a.prototype.pLL=function(t,e){var o,i=this.getGridLines();i&&(null!=i.width&&(t.lineWidth=i.width),null!=i.color&&(t.strokeStyle=i.color),-1==e?o=c.IsA(i.style)?i.style:[i.style]:e&c.Gantt.LevelLineEnum.exLevelDotLine&&(o=[1]),o&&t.setLineDash(o))},a.prototype.onsize=function(t){this.resVI(),this.oLvs.onsize(t),this.updSPR(),c.RUR.Rng()&&!this.cR2&&c.RUR.Listeners.Add("erur",this.cR2=function(){c.RUR.Listeners.remove("erur",this.cR2),this.onChartResize(),this.cR2=null}.bind(this))},a.prototype.onChartResize=function(){this.dTV().onChange("resize-chart",this)},a.prototype.onZoom=function(){this.resVI(),this.oLvs.onZoom(),this.updSPR()},a.prototype.onDC=function(){this.oLvs.isSR()&&(this.lsX++,this.setHSI({pos:this.oLvs.fv2p()}),--this.lsX),this.oT.oOV.gV()==this&&this.oT.invOV(),this.oT.onDC(this)},a.prototype.onSR=function(){this.updSPR()},a.prototype.getHSI=function(){return this.oW.GetSI(!0)},a.prototype.setHSI=function(t){this.oW.SetSI(t)},a.prototype.HS=function(){return this.oW.GetHS()},a.prototype.updSPR=function(){var t;if(this.oW&&(t=this.getHSI())){var e=this.oLvs,o=e.isSR(),i=e.cltW(),n=o&&o.u.w;o||(n=i,i=this.oLvs.getUW()),this.HS().SetDisableNoScroll(o?1:2),i==t.page&&n==t.range||(this.lsX++,this.setHSI({page:i,range:n}),--this.lsX,!this.lI&&this.invAO())}},a.prototype.hsChange=function(t,e){var o,i=this.HS();return(i.lC=i.lC||{l:0,n:0,c:i.onchange}).l++||(this.bU(),i.lC.n=0,i.onchange=function(){i.lC.n++}),o=t&&t.call(e||this,i),--i.lC.l||(i.onchange=i.lC.c,i.lC.n&&i.onchange(),this.eU()),o},a.prototype.scroll=function(t){!this.lsX++&&this.hsChange(function(e){var i,n=this.oLvs,r=n.isSR();if(this.bU(),"x"in t&&r)n.setFV(n.p2fv(t.x));else if("dx"in t){var s=c.Cpy(t.ofV||n.getFV()),h=null!=t.nSP;h&&r&&(t.dx=o(t.dx,this.HS().GetMaxRange()-t.nSP)),s.o-=t.dx,n.setFV(n.adjFV(s)),h&&(i=t.nSP+t.dx)}else if("step"in t){var a=~~t.step;if(a){for(var u=0,l=a<0?-1:1,p=Math.abs(a),f=0;f0&&(u-=n.wOf(n.getFVD())),n.setFVD(n.next(n.getFVD(),l)),l<0&&(u+=n.wOf(n.getFVD()));null!=t.nSP&&(i=t.nSP+u)}}else"date"in t&&n.scrollTo(t.date,t.align);null!=i&&(this.setHSI({pos:i}),!r&&i!=this.getHSI().pos&&e.onchange()),this.eU()}),--this.lsX},a.prototype.hsScroll=function(t,e){var o=this,i=o.oLvs,n=i.isSR(),r=o.getHSI().pos;return o.hsChange(function(s){switch(t){case 0:o.scroll({step:n?1:-1,nSP:r});break;case 1:o.scroll({step:n?-1:1,nSP:r});break;case 4:o.osdV=null;break;case 5:!n&&function(t,e){e&&o.scroll({dx:t-e.v,ofV:e.ofV})}(e,o.osdV=o.osdV||function(t){return{ofV:i.getFV(),v:t||0}}(e))}return c.SB.prototype.Scroll.call(s,t,e)})},a.prototype.hsSmthBy=function(t,e,o,i){var n=this,r=o;return n.oLvs.isSR()||(n.osdV=null,!e&&(t*=4),!o&&(o=function(t,e){t.SetPos(e)}),o=function(t,e){r&&r.call(i,t,e),n.hsScroll(5,e)}),c.SB.prototype.smthBy.call(n.HS(),t,e,o,i)},a.prototype.onhscroll=function(t){this.oLvs.isSR()&&this.scroll({x:t}),this.oT.invHL(),this.oT.oOV.gV()==this&&this.oT.invOV()},a.prototype.onvscroll=function(t){var e=this.oHG.isVisible()&&!this.oHG.hV(1)&&this.oHG.oHD;this.resVI(),e&&(this.oHG.oHD=e),this.invHG(1),this.oT.invOV()},a.prototype.getCur=function(){return this.oLvs.getCur()},a.prototype.setCur=function(t){this.oLvs.isDiff(t)&&(this.cwbU(),this.oLvs.setCur(t),this.cweU())},a.prototype.onLL=function(){this.resVB(),this.resNWO(),this.resSDO(),this.oHB.resHVO()},a.prototype.wLL=function(){return this._wLL||(this._wLL=[this,this.oHB,this.oHG])},a.prototype.cltW=function(){var t=0;return this.wLL().forEach(function(o){t=e(t,o.oW&&o.GetPageSize()[0]||0)}),t},a.prototype.resNWO=function(){this.rgNWO=null},a.prototype.getNWO=function(){return this.rgNWO=this.rgNWO||this.oLvs.NWL().VO(0,this.GetPageSize()[1])},a.prototype.resSDO=function(){this.rgSDO=null},a.prototype.getSDO=function(){return this.rgSDO=this.rgSDO||this.oLvs.SDL().VO(0,this.GetPageSize()[1])},a.prototype.draw=function(t,e,o){var i=this.GetWindowRect();this.cSR(t,i,function(){(function(){this.ctxScale(t,i,function(e){this.drawNW(t,e),this.drawSD(t,e)},this)}).call(this),function(){var o=this.getShowLockedItems();o&&(this.drawVI(t,this.getItemsRect(-1),this.getVIT(),this.getVBT()),this.drawVI(t,this.getItemsRect(1),this.getVIB(),this.getVBB()),t.selClip(e)),this.drawVI(t,e,this.getVI(),this.getVB()),o&&t.resClip()}.call(this),function(){this.ctxScale(t,i,function(t){},this),this.getDebug()&&this.drawDbg(t,e)}.call(this)},this)},a.prototype.cSR=function(t,e,o,i){var n,r,s=this.oLvs.isSR();s&&(n=this.unscaled(s.u.w))=i[0]&&(r=c.ROf(i))>=t[0])return[s=e(t[0],i[0]),t[1],o(n,r)-s,t[3]]}(i,this.rtVI)),s&=31,32&h&&(i=function(t,i){var n,r,s;if(t&&i&&(n=c.BOf(t))>=i[1]&&(r=c.BOf(i))>=t[1])return[t[0],s=e(t[1],i[1]),t[2],o(n,r)-s]}(i,this.rtVI)),h&=31),i){var a=this.oLvs.getmUW(),u=function(t){var e,o=i.slice(),n=t.width,r=t.height,u=240&s&&1!=(15&s),l=240&h&&1!=(15&h),p=!1;switch(s&=15,h&=15,s-12){case 0:case 2:o[2]0&&(v=o(C,d))}(e.force=v)&&(e.cbkR=function(t){return function(e){t&&t.apply(this,arguments),u.scroll({dx:v*e,ofV:f,nSP:g})}}(e.cbkR)),(e.allowScroll||e.force)&&s.EnsureVisibleClient.call(this,c.C2R(n),e)}}},a.prototype.toEVC=function(t,e){var o,i,n,r=new c.Arr;return t&&t.forEach(function(t){t instanceof c.Gantt.ItemBar&&(i=t.se(),o?(o.s=o.s.Min(i.s),o.e=o.e.Max(i.e)):o=i,r.add(t.i()))}),(n=this.dTV().toEVC.call(this,r,e))&&(o.y=n[1],o.h=n[3]),o},a.prototype.EnsureVisibleSelection=function(t){t=t||{},this.EnsureVisibleClient(this.toEVC(t.selection||this.getSel().byO(),t.expandParents),{duration:t.duration})},a.prototype.ondown=function(t){return this.dTV().ondown(t)},a.prototype.dowheel=function(t){var e=this.isSelectable();return e&&this.scroll({step:-c.WhelInc(t),nSP:this.getHSI().pos}),e},a.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&c.PInR(p.X(e),p.Y(e),this.GetClientRect())&&(c.ModK(t)||this.oW&&this.oW.vSBs()[0]==this.oW.oHS)&&this.dowheel(t)},a.prototype.p2X=function(t){var e=this.GetClientRect(),o=p.X(t)-e[0];return this.scaled(o)},a.prototype.x2P=function(t){var e=this.GetClientRect();return t=this.unscaled(t),t+=e[0]},a.prototype.y2P=function(t,e){return this.getItemsRect(e)[1]+this.unscaled(t)},a.prototype.p2UL=function(t,e){var o=this.p2X(t),i=this.oLvs.x2UL(o);return i&&(2&e&&(i.c=h(i,o)),8&e&&(i.r=this.oLvs.d2R(h(i,o),i.s))),i},a.prototype.p2D=function(t){return this.p2UL(t,8).r},a.prototype.d2UL=function(t){return this.oLvs.d2UL(t)},a.prototype.d2X=function(t){return this.oLvs.d2X(t)},a.prototype.fSR=function(){var t,o,i,n=this.oLvs;(t=n.isSR())&&t.u.rgU.length&&t.u.w<(o=this.cltW())&&(this.cwbU(),i=n.nUWo,n.setUW(e(n.getUW(),o/t.u.rgU.length)),n.nUWo=i,this.cweU())},a.prototype.rurCZR=function(t,e,o){var i=this.oLvs.oGC,n=this.e2V(t),r=this.p2CZR(this.gPtr(t),n&&n.p2X&&n);o=o||this,this.dTV().doRUR(t,function(t){switch(t.drag.status){case 0:case 2:case 4:case 5:r.e=t,function(t){t=this.scaled(t||0),this.cwbU(),i.lSyl++,e.call(o,t,r),this.fSR(),i.lSyl--,this.cweU()}.call(this,t.drag.cancel?0:t.drag.offset.dx)}},this)},a.prototype.p2CZR=function(t,e){var o=this.oLvs;return e=e||this,{uS:o.getUS(),uW:o.getUW(),mUW:o.getmUW(),MUW:o.getMUW(),ofV:o.getFV(),x:e.p2X(t),cuL:e.p2UL(t,2)||this.p2UL(t,2)}},a.prototype.dc2vSD=function(t){var e,o;return t&&(o=t.getTime(),this.getSDO().forEach(function(t,i){(!e||Math.abs(o-i.s.getTime())C?1:0}function a(t,e){return!h(t-e)}function u(){return v.d2X(t)+r-v.d2X(n)-i}function l(t,e){y.setUS(e);var o,i=m.reset(t);return function(t,e){return e.showNWM()&(2==e.hsNW()&&e.oNW.isNWU(t))}(i,m)&&(i=m.oNW.nextNWU(m.showNWM(),i)),o=m.next(i),y.Count(i,o)}s=s||{};var p,f,g,y,v,d,S,C=.5,m=this.oLvs,L=!0,T=!!s.cUS,w=!!s.aMP,G=w;if(g=t>n){var O=t;t=n,n=O,O=i,i=r,r=O}if(v=new c.Gantt.SLevels(this),h(p=u()))for(f=p>0,T&&(y=new c.Gantt.SLevels(this),d=new c.Arr(m.visZTo())),S=new c.Arr;L;){L=!1,c.bfn(v.getUW(),e(v.getmUW(),v.getUW()+p),function(t){return v.setUW(t),h(u())},null,C/10);var U,b,V=!T;if(T&&((L=f?!(V=!(null!=(U=this.nZT(d,v.getUS()))))&&v.getUW()>=l(n,U)*v.getmUW()&&(b=v.getmUW()):null!=(U=this.nZT(d,v.getUS(),!0))&&a(v.getUW(),v.getmUW())&&(b=v.getMUW()))?(v.setUS(U),v.setUW(b),p=u(),S.clear()):L=!f&&!a(v.getUW(),v.getmUW())&&h(p=u())),V&&v.setUW(o(v.getUW(),v.getMUW())),L){var B=~~(100*v.getUW())/100;(L=!S.has(B))&&S.add(B)}}if(w||m.getUS()!=v.getUS()||!a(m.getUW(),v.getUW())){this.cwbU(),m.oGC.lSyl++,m.setUS(v.getUS()),m.setUW(v.getUW());var E=(w&=a(v.getUW(),g?f?v.getmUW():v.getMUW():f?v.getMUW():v.getmUW()))?n:t,x=m.reset(E),I=(E-x)/(m.next(x)-x)*m.getUW();G||w||f||!g||(I-=p),m.setFV({d:E,o:(w?r:i)-I}),m.oGC.lSyl--,this.cweU()}},a.prototype.nZT=function(t,e,o){var i=o?t.prev:t.next;if(e=i.call(t,e),o&&null!=e){for(var n=e,r=1,s=this.oLvs.len();null!=n&&r0){for(;a&=null!=(s=this.nZT(p,r.getUS()));){if(null==h){l.setUS(s);n(v=r.reset(u),r)&&(v=r.oNW.nextNWU(r.showNWM(),v)),d=r.next(v),h=l.Count(v,d)}(a=r.getUW()>=h*i.mUW)&&(r.setUS(s),r.setUW(r.getUW()/h),h=null)}null==s&&r.setUW(e(i.mUW,o(i.MUW,r.getUW())))}else{for(var f=i.uW,g=t,y=0;a&=null!=(s=this.nZT(p,r.getUS(),!0));)if(r.setUW(e(i.mUW,r.getUW()+y)),a=r.getUW()<=i.mUW){if(null==h){l.setUS(s);var v=l.reset(u),d=l.next(v);l.setUS(r.getUS()),h=l.Count(v,d)}r.setUS(s),r.setUW(i.mUW*h),y=g=f+g-i.mUW,f=r.getUW(),h=null}null==s&&r.setUW(e(i.mUW,r.getUW()+y))}!function(t,e){var o=e.cuL,i=r.reset(o.c),n=r.next(i),s=(o.c-i)/(n-i)*r.getUW();r.setFV({d:i,o:e.x+t-s})}(t,i)}r.oGC.lSyl--,this.cweU()},a.mRurFrm=c.BiM.Split("select,chart-select,chart-fit,chart-create,chart-link"),a.prototype.onRurDragS=function(t,e){var o=this;return t=t||{},a.mRurFrm.has(t.rurName)&&(t.rurEFOpts=function(t){return function(e,i){i.relative=i.clip=o.GetCanvas(),i.clipClient=o.GetClientRect(),t&&t.apply(this,arguments)}}(t.rurEFOpts)),e.from.oUL=this.p2UL(this.toPointer(e.event),14),t},a.prototype.onRurDragD=function(t,e){if(e.from.oUL){var i=this.getRUR();if(e.to.oUL=this.p2UL(this.toPointer(e.event),14),a.mRurFrm.has(t.rurName)){var n=this.x2P(this.d2X(e.from.oUL.c)),r=this.x2P(this.d2X(e.to.oUL.c));e.frame[0]=o(n,r),e.frame[2]=Math.abs(r-n)}i&&null==i.rSDx&&(i.rSDx=0)}},a.prototype.rurChartFit=function(t,e){function o(t){t&&i.Smooth(function(){i.Zoom(t.s,t.e)})}var i=this,n=i.dTV(),r=c.Gantt.Levels,s=i.getCur();e.rurOnlyAO={},e.rurEFPaint=n.fitEFPaint(),e.rurDrop=function(t){t.from.oUL&&t.to.oUL&&o({s:r.toDR(t.from.oUL.s,t.to.oUL.s).s,e:r.toDR(t.from.oUL.e,t.to.oUL.e).e})},e.rurStatus=function(t){o(i.oHB.p2UL(i.oHB.gPtr(t)))},e.rurCancel=function(t){i.setCur(s)},n.rurDrag(t,e)},a.prototype.rurChartSelect=function(t,e){var o=this,i=this.oT,n=i.oGC,r=this.dTV(),s=this.e2V(t)||o,h=e.rurFlags&&e.rurFlags.has("item")&&i.allowSelect()&&i.allowSelectByDrag()&&s.ap2I&&s.ar2I,a=n.allowSelect()&&n.allowSelectByDrag()&&s.dy2IB&&s.dyr2IB;if(a||h){var u=!1,l=i.getSel(),f=n.getSel();e.rurEFPaint=r.selEFPaint(),e.rurDrag=function(t){!u&&(u=2==t.event.drag.status)&&(i.oRUR.ao={},o.invAO()),u&&(o.onRurDragD(e,t),h&&function(t){i.select(i.isSingleSel()?s.ap2I(t.to):s.ar2I(p.Rect(t.from,t.to)),{selChange:!1})&&((i.isToggleSel()||i.isToggleCtrlSel()&&2&c.ModK(t.event))&&(i.rgSel=new c.Arr(l).toggle(i.rgSel)).isEmpty()&&(i.rgSel=null),i.feTV("invAO"),i.onSel())}(t),a&&function(t){function e(t){return{d:t.oUL.c,y:t.y}}n.select(n.isSingleSel()?s.dy2IB(e(t.to)):s.dyr2IB(e(t.from),e(t.to)),{selChange:!1})&&((n.isToggleSel()||n.isToggleCtrlSel()&&2&c.ModK(t.event))&&(n.rgSel=new c.Arr(f).toggle(n.rgSel)).isEmpty()&&(n.rgSel=null),i.feGV("invAO"),n.onSel())}(t))},e.rurCancel=function(t){h&&i.SetSelection(l),a&&n.SetSelection(f)},r.rurDrag(t,e)}},a.prototype.ib2R=function(t,e){var o=this.getVBT().get(t)||this.getVBB().get(t)||this.getVB().get(t),i=4&e;return!o&&1&e&&function(){if(t){var n=t.i(),r=n.isLocked(),s=(r?r<0?this.getLIVT():this.getLIVB():this.getLIV()).i2R(n,(i||8&e)&&!r&&this.origin());s&&(o=this.rtI2IB(t,s))}}.call(this),o&&(2&e&&function(){var e=t&&t.getShape();e&&e.client&&(o=c.E.EvalCE(o,e.client))}.call(this),i&&function(){var e=t.i().isLocked(),i=this.x2P(o[0]),n=this.y2P(o[1],e);o=[i,n,this.x2P(c.ROf(o))-i,this.y2P(c.BOf(o),e)-n]}.call(this)),o},a.prototype.i2R=function(t,e){var o=this.getVIT().get(t)||this.getVIB().get(t)||this.getVI().get(t),i=4&e;return 1&e&&(!o||!i)&&function(){if(t){var e=t.isLocked(),n=e?e<0?this.getLIVT():this.getLIVB():this.getLIV();(o=n.i2R(t,i&&!e&&this.origin()))[2]=this.oLvs.cltW()}}.call(this),o&&i&&function(){var e=t.isLocked(),i=this.x2P(o[0]),n=this.y2P(o[1],e);o=[i,n,this.x2P(c.ROf(o))-i,this.y2P(c.BOf(o),e)-n]}.call(this),o},a.prototype.dNearD=function(t,e,o){return Math.abs(this.d2X(t)-this.d2X(e))<(o||c.Def.HT.inflate[0])},a.prototype.dInIB=function(t,e){var o=e.se(),i=t.Compare(o.s)>=0&&t.Compare(o.e)<0;return i||o.s.Compare(o.e)||(i=this.dNearD(t,o.s)),i},a.prototype.dy2IB=function(t){var e,o=this.ap2I(t);return o&&o.oIB&&(e=o.oIB.rforEachU(function(e){return this.dInIB(t.d,e)&&function(t,e){var o=this.ib2R(e,3);return t>=c.TOf(o)&&t0)&&!(c.BOf(e=r.ib2R(t,3))g)&&n.push(t)})}),n},a.prototype.p2Abs=function(t,e){e=e||this.getItemsRect();return{x:this.scaled(p.X(t)-(e[0]+0)),y:this.scaled(p.Y(t)-e[1])}},a.prototype.p2IB=function(t){return this.p2IBl(t,{lz:0})},a.prototype.p2IBl=function(t,e){e=e||{};var o=this.p2TB(t);if(r(e.lz,o)==o){var i,n=this.getVBl(o),s=this.p2Abs(t,this.getItemsRect(o)),h=e.cbk||function(t){return t},a=e.thisArg||this,u=e.inf||[0,0];return n.rforEachU(function(t,e){return(i=e.getShape())&&i.client&&(t=c.E.EvalCE(t,i.client)),c.PInR(s.x,s.y,t,u[0],u[1])&&h.call(a,e,t,s)})}},a.prototype.p2IBR=function(t){return this.p2IBRl(t,{lz:0})},a.prototype.p2IBRl=function(t,e){function o(o){var i;return this.p2IBl(t,{lz:e&&e.lz,inf:o,cbk:function(t,e,n){var r=t.getCanResize(),s=c.HitTest.Rect(n.x,n.y,e,o);return(1&s&&1&r||4&s&&2&r)&&(i={ib:t,ht:5&s}),c.PInR(n.x,n.y,e)}}),i}var i,n=c.Def.HT.inflate,r=this.isClkAble()&&this.gAA().Has("chart-move")&&o.call(this,n);return r&&r.ib.canMove()&&(i=this.ib2R(r.ib))&&i[2]<12&&(r=o.call(this,[n[0],n[1],0,0])),r||null},a.prototype.p2IBP=function(t){return this.p2IBPl(t,{lz:0})},a.prototype.p2IBPl=function(t,e){return this.isClkAble()&&(this.gAA().Has("chart-move")||this.gAA().Has("chart-percent"))&&this.p2IBl(t,{lz:e&&e.lz,cbk:function(t,e,o){var i,n,r,s=t.cbkp2x();return s&&(n=s(t.getPercent(),e[2])+e[0])>=(r=p.X(o))-(i=c.Def.HT.inflate[0])&&n0||r.e.Compare(s)<0||!(i=this.rtI2IB(o,t))||(c.ORt(i,0,o.getOffset()),n.set(o,i),u&&e.push(o))},this),u&&a.O(e).forEach(function(t,e){c.ORt(n.get(e),0,t)}),i&&(o=i.get(r))&&o.forEach(function(t,e){var o=n.get(e);o&&c.ORt(o,0,t)}))},this),n},a.prototype.getVB=function(){return this.rgVB||(this.rgVB=this.vbOf(this.getVI()))},a.prototype.getVBT=function(){return this.rgVBT||(this.rgVBT=this.vbOf(this.getVIT()))},a.prototype.getVBB=function(){return this.rgVBB||(this.rgVBB=this.vbOf(this.getVIB()))},a.prototype.getVBl=function(t){return t?t<0?this.getVBT():this.getVBB():this.getVB()},a.prototype.getVL=function(){return this.rgVL||(this.rgVL=function(){function t(t){var e=h.get(t);return!h.has(t)&&h.set(t,e=this.ib2R(t,i)),e}var e,o,i=11,n=new c.M1,r=this.GetPageSize(),s=[0,0,r[0],r[1]],h=new Map;return this.getShowLinks()&&this.gC().oGL.forEach(function(i){i.getVisible()&&(e=t.call(this,i.oF))&&(o=t.call(this,i.oT))&&c.NRt(s,c.URt(e,o))&&n.set(i,{s:e,e:o})},this),n}.call(this))},a.prototype.toClick=function(t,e){var o=this.gPtr(t),i=this.p2UL(o,8);e.bar=this.p2IBl(o),e.link=this.p2L(o),e.item=this.p2Il(o),i&&(e.start=i.s,e.end=i.e,e.date=i.r)},a.prototype.hideTT=function(){c.TT.Hide()},a.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2IBl(o,{inf:c.Def.HT.inflate}),n=16;c.TT.Show(function(){return i&&(e=i.tt(this))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=c.NRt(e.rtT,this.GetWindowRect())||e.rtT,r=[0,0,this.getToolTipWidth(),t.fontHeight()],s=e.oExT.draw(i,t,r,1024|n);return[o[0],o[1],~~(s.width+1),~~(s.height+1)]},this)}.call(this),alwaysPaint:!0,onpaint:function(t,o){this.ctxLoc(function(t){e.oExT.draw(i,t,o,n)},this,t)},thisArg:this}},{ttO:i,ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay(),thisArg:this})},a.prototype.onio=function(t){this.allowTT()&&this.hideTT(),this.getDrawDateTicker()&&this.hideDTH(event)},a.prototype.getCursor=function(t){var e,o,i=this.getCursors();return(e=this.p2A(t))?o=c.GP.Get("anchor",i):(e=this.p2IBPl(t))?o=c.GP.Get(e.getType("percent-resize"),i):(e=this.p2IBRl(t))?o=c.HitTest.Cursor.Rect(e.ht):(e=this.p2IBMl(t))&&(o=c.GP.Get(e.getType(),i)),o||null},a.prototype.onmousemove=function(t){var e,o=this.gPtr(t),i=this.getCursor(o);return i&&(e=this.GetCanvas())&&(e.style.cursor=i),this.allowTT()&&this.showTT(t),this.getDrawDateTicker()&&this.showDTH(t),i},a.prototype.bRUR=function(t){return(this.gAA().Has("chart-zoom")||this.gAA().Has("chart-resize"))&&this.exZ(t),t.drag.extra},a.prototype.eRUR=function(t){this.getDrawDateTicker()&&this.showDTH(t)},a.prototype.exZ=function(t){var e,o,i,n,r=this.getRUR();t.drag.extra&&(e=t.drag.extra[0])?(n=r.oZ2=r.oZ2||{p:o=this.p2UL(t.drag.current,2).c,xP:this.d2X(o),cP:t.drag.current,s:i=this.p2UL(e.current,2).c,xS:this.d2X(i),cS:e.current},this.z2(n.p,n.xP+t.drag.current.x-n.cP.x,n.s,n.xS+e.current.x-n.cS.x,{cUS:this.gAA().Has("chart-zoom")}),r.dRSD=!0):r.oZ2=null},a.prototype.showDTL=function(t,e){function o(t){return s.ctxLoc(function(e){return t.l.size(t,e,g)})}function i(t){return c.EF.Create({name:t,class:c.Def.CN.ttEF+" exdatelabel",fit:c.pgrt(),relative:y.GetCanvas(),limitClient:!1,alwaysPaint:!0,visible:!1,onpaint:function(t,e){s.ctxLoc(function(t){this.oDRL&&this.oDRL.l.draw(this.oDRL,t,e,g)},this,t)}})}function n(e,o){e.oDRL={d:o,r:t,l:u.Get(a)}}function r(t,i,n){var r,h,u,l,g,v,d=o(t.oDRL),S=t==s.oDTL.s,C=a&&d.width&&d.height,L=f;C&&(h=c.IBox([0,0,0,0],t.oHE,1,1),u=c.IBox([0,0,0,0],t.oHE,1,2),r=c.IBox([0,0,0,0],t.oHE,1,4),t.GetRelative()!=y.GetCanvas()&&t.SetRelative(y.GetCanvas()),l=s.GetClientRect(),c.IRt(l,2*h[0]+u[0]+r[0]+u[0]-L,0),S?l[2]-=o(s.oDTL.e.oDRL).width+L:(v=o(s.oDTL.s.oDRL).width+L,l[0]+=v,l[2]-=v),g=c.IRt(e.slice(),L,0),g=p.C2R(p.R2C(g,i),~~(d.width+1),d.height,n),c.FRt(g,l),c.NRt(m,c.IRt(g.slice(),-L-1,0))&&(L-=u[1]+r[1],c.ORt(g,0,p.R2C(m)[1]p.R2C(this.oGV.GetClientRect())[1]},t.prototype.resHVO=function(){this.rgHVO=null},t.prototype.getHVO=function(){return this.rgHVO=this.rgHVO||function(){var t=new c.M1,e=this.oGV.oLvs,o=this.getLH();if(o&&e.getUW()){var i,n=o*(this.oGV.oT.nHLC-this.gC().GetLevelCount());e.vForEach(function(e){(i=e.UL().VO(n,o)).client=i.union(),t.set(e,i),n+=o})}return t}.call(this)},t.prototype.onsize=function(t){this.oGV.oLvs.onsize(t)},t.prototype.onZoom=function(){this.oGV.oLvs.onZoom()},t.prototype.onRurScrollD=function(t){this.oGV.onRurScrollD(t),t.dy=0},t.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&c.PInR(p.X(e),p.Y(e),this.GetClientRect())&&this.dowheel(t)},t.prototype.ondown=function(t){return this.oGV.ondown(t)},t.prototype.toClick=function(t,e){var o=this.p2UL(this.gPtr(t),8);o&&(e.level=o.l,e.start=o.s,e.end=o.e,e.date=o.r),this.onClickH(t)},t.prototype.onio=function(t){this.allowTT()&&this.hideTT()},t.prototype.onmousemove=function(t){this.allowTT()&&this.showTT(t)},t.prototype.tt=function(t){var e,o;return t&&t.l&&(e=t.l.getToolTip())&&{t:e,d:t.s,rtT:c.ORt(o=[this.x2P(t.x),this.y2P(t.y),this.unscaled(t.w),this.unscaled(t.h)],0,o[3]+2)}},t.prototype.hideTT=function(){c.TT.Hide()},t.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2UL(o),n=16;c.TT.Show(function(){return i&&(e=this.tt(i))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=c.NRt(e.rtT,this.GetWindowRect())||e.rtT,i=[0,0,this.getToolTipWidth(),t.fontHeight()],r=t.drawHTMLDate(e.t,e.d,i,1024|n);return[o[0],o[1],~~(r.width+1),r.height]},this)}.call(this),onpaint:function(t,o){this.ctxLoc(function(t){t.drawHTMLDate(e.t,e.d,o,n)},this,t)},thisArg:this}},{thisArg:this,ttO:i&&i.s&&i.l.index()+" "+i.s.toString(),ttD:this.getToolTipDelay(),ttP:this.getToolTipPopDelay()})},t.prototype.onClickH=function(t){this.gC().getAllowSelectDate()&&function(){var e=this.sD(),o=this.gPtr(t),i=this.p2UL(o),n=c.ModK(t);this.oGV.cwbU(),e.select(i,{selType:(e.isShiftSel()&&1&n?1:0)|(e.isToggleSel()||e.isToggleCtrlSel()&&2&n?2:0)}),this.oGV.cweU()}.call(this)},{Header:t}}()),c.Mrg(c.Gantt,function(){function t(){this.init()}function s(t){this.init(t)}function h(t){this.init(t)}function a(t){this.init(t.oT.oGC,t)}function u(t,e){this.init(t,e)}return t.prototype.init=function(){this.mC=new Map},t.prototype.Get=function(t,e){function o(e){var o,i=t?function(e){return t.sizeHTMLText(e).width}:function(t){return t.length};return e.forEach(function(t,e){var n=i(t);(!o||o.s",this.aS="<|>",this.mC=new Map,this.wM=null,this.oLD=new t},s.prototype.Split=function(t,n){var r=this.mC.get(t=i(t));return!r&&this.mC.set(t,r=function(t){var i,r,s={rgL:[]},h=t.split(this.s),a=h.length;return a>0&&h[0].split(this.aS).forEach(function(t){s.rgL.push(i={l:t,u:c.HF.Date.Unit(c.H.GetEF(t)),w:n&&n.sizeHTMLDate(t,this.oLD.Get(n)).width||0}),i.u&&(r=null==r?i.u:o(r,i.u))},this),s.uL=~~r,s.rgL.sort(function(t,e){return t.w-e.w}),a>1&&(h[1].length&&(s.c=e(1,~~h[1])),a>2&&c.IsN(h[2])&&c.f2S(~~h[2],c.UnitEnum)&&(s.u=~~h[2])),s}.call(this,t)),r},s.prototype.Fit=function(t,e){var o,i="",n=this.mC.get(t);if(n&&(i=n.rgL[0].l,(o=n.rgL.length)>1))for(var r=!0,s=1;r&&s=0&&(o=c.setM(t))in e&&(i=c.getM(t))in e&&(n=e[i](),this.oGC.oT.feGV(function(t){t.oLvs!=s&&(r=t.oLvs.at(h))&&r[o](n)}))}--this.oGC.lSyl},h.prototype.synv=function(t,e){if(!this.oGC.lSyv++){var o=this;this.oGC.oT.feGV(function(i){i.oLvs!=o&&i.oLvs[t](e)})}--this.oGC.lSyv},h.prototype.getLC=function(){return this.len()},h.prototype.setLC=function(t){(t=e(1,~~t))!=this.getLC()&&this.onRL(function(){this.removeAt(t,this.getLC()-t);for(var e,o,i=this.visLb(this.getUS()),n=this.getLC();n=0&&e.SetLabel(i[o])})},h.prototype.getUS=function(){var t=this.u;return null==t&&(void 0===t?t=this.oGC.opt("unitScale",c.UnitEnum.exDay):(t=0,this.forEach(function(o){t=e(t,o.GetUnit())})),this.u=~~t),t},h.prototype.setUS=function(t){this.onRL(function(){var e,o=this.visLb(t);this.rgLvl.forEach(function(t,i){e=o.length-1-i,t.SetLabel(e>=0?o[e]:null)}),this.u=null})},h.prototype.onLb=function(){this.onRL(function(){this.forEach(function(t){t.SetLabel(t.getUnit())})})},h.prototype.onRL=function(t,e){this.lC++,t&&t.call(e||this),!--this.lC&&function(){this.ofV=null,this.olfV.l||(this.u=null,this.orU=null,this.obL=null,this.osR=void 0),this.resLL()}.call(this)},h.prototype.vForEach=function(t,e){e=e||this;for(var o,i=this.isReverse(),n=this.len(),r=0,s=i?0:n-1,h=i?1:-1;!o&&r=e.exDay&&(t|=e.exDay,o>e.exDay&&(t|=e.exHour)),t},h.prototype.hideNWM=function(){return this.oNW.getR().hideNWU&&this.NWM()||0},h.prototype.showNWM=function(){return!this.oNW.getR().hideNWU&&this.NWM()||0},h.prototype.hsNW=function(){return this.hideNWM()?1:this.showNWM()&&this.getUNW()?2:0},h.prototype.reset=function(t){t=this.getBL().reset(t);var e=this.hideNWM();if(e)for(var o;o=this.oNW.isNWU(t)&e;)t.Reset(o),t.Next(o);return t},h.prototype.next=function(t,e){function o(t){return l.call(t,u)}var i=t.copy();if(e=r(e,1))for(var n=Math.sign(e),s=this.getBL(),h=this.oNW,a=s.getUnit(),u=n*s.getCount(),l=i.CbkN(a),p=this.hideNWM(),f=this.getUNW()<0&&this.showNWM()||0,g=n>0?function(t,e){h.nextNWU(t,e)}:function(t,e){for(var o,i,n=c.UnitEnum.exDay,r=c.UnitEnum.exHour;t&(i=h.isNWU(e));)i&n?(o=n,e.Reset(n),l.call(e,u)):i&r&&(o=r,e.Reset(r),e.PrevHour());o&&(e.Next(o),l.call(e,u))},y=n*e,v=0;ve&&(n-=Math.sign(n)*e,r=r.copy().Next(this.getUS(),-n),t.o-=n*i)),t.o>0){for(;t.o>(o=this.wOf(r=this.prev(r)));)t.o-=o;t.o-=o}else for(;t.o<=-(o=this.wOf(r));)r=this.next(r),t.o+=o;t.d=r}return this.ioSR(t.d,!0)&&(t.d=this.limSR(t.d),t.o=0),t},h.prototype.onFV=function(t,o){this.olfV.l++||(this.olfV.d=Date.Create(this.fvd)),t instanceof Function?t.call(o||this):("d"in t&&(this.fvd=t.d),"o"in t&&(this.fvo=this.ioSR(Date.Create(this.fvd),!0)?e(t.o,0):t.o)),!--this.olfV.l&&this.olfV.d.Compare(Date.Create(this.fvd))&&this.oGV.onDC()},h.prototype.getFV=function(){return this.ofV||(this.ofV=function(){var t=this.limSR(Date.Create(this.fvd)),e={d:this.reset(t),o:n(this.fvo)},o=0!=e.o;return this.adjFV(e),o&&this.onFV(e),e}.call(this))},h.prototype.setFV=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({d:Date.Create(t.d),o:t.o})})})},h.prototype.getFVD=function(){return this.getFV().d},h.prototype.setFVD=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({d:t,o:0})})})},h.prototype.getFVO=function(){return this.getFV().o},h.prototype.setFVO=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({o:t})})})},h.prototype.getCur=function(){return{ofV:this.getFV(),uS:this.getUS(),uW:this.getUW(),uNW:this.getUNW()}},h.prototype.setCur=function(t){this.isDiff(t)&&this.onRL(function(){this.oGC.lSyl++,t.ofV&&this.setFV(t.ofV),null!=t.uS&&this.setUS(t.uS),null!=t.uW&&this.setUW(t.uW),null!=t.uNW&&this.setUNW(t.uNW),--this.oGC.lSyl})},h.prototype.isDiff=function(t){return t&&t.ofV&&(t.ofV.d.Compare(this.getFV().d)||t.ofV.o!=this.getFV().o)||null!=t.uS&&t.uS!=this.getUS()||null!=t.uW&&t.uW!=this.getUW()||null!=t.uNW&&t.uNW!=this.getUNW()},h.prototype.getBL=function(){return this.obL||(this.obL=function(){var t,e=this.getUS();return this.forEach(function(o){e==o.getUnit()&&(!t||o.getCount()=0}),r=p/(1+n);if(2==u.hsNW()){for(var s=0,h=0,a=0;a<=n;a++)l.isNWU(i[a].s)?++h:++s;s&&(r=(p-h*Math.abs(g))/s)}return{uS:u.getUS(),uW:r}}}var i;if(p){for(n=v.length-1;!i&&n>=0;n--)i=o(v[n]);if(i&&i.uW>=p){var n;(n=c.bin(v.length,function(t){return i.uS>=v[t]}))+10&&(t=e.l)),t},h.prototype.ioSR=function(t,e){var o=this.isSR();return e?o&&(t.Compare(o.f)<0||t.Compare(o.l)>=0):!(o&&(t.Compare(o.f)<0||t.Compare(o.e)>0))},h.prototype.resSR=function(){this.osR&&(this.ofV=null,this.osR.l=null)},h.prototype.getrUS=function(){return this.getrU().s},h.prototype.setrUS=function(t){this.onRL(function(){this.orU=null,this.rus=t,this.synv("setrUS",t)})},h.prototype.getrUC=function(){return this.getrU().c},h.prototype.setrUC=function(t){this.onRL(function(){this.orU=null,this.ruc=t,this.synv("setrUC",t)})},h.prototype.getrU=function(){if(!this.orU){this.orU={s:this.getUS(),c:this.getBL().getCount()},null!=this.rus&&this.rus>this.orU.s&&(this.orU.s=this.rus),null!=this.ruc&&this.orU.s>this.getUS()&&(this.orU.c=e(1,~~this.ruc));var t=Date.Date(0);this.orU.m=t.copy().Next(this.orU.s,this.orU.c)-t}return this.orU},h.prototype.d2R=function(t,e){var o,i=this.getrU();return(t=t.copy()).Reset(i.s),e&&i.c>1&&(o=t.copy().Next(i.s,i.c)-t,t=e.copy().add(~~((t-e)/o)*o)),t},h.prototype.fv2p=function(t){var e=0,o=this.isSR();if(o){var i=(t=t||this.getFV()).d.getTime(),n=o.u.rgU;e=n[c.bin(n.length,function(t){return i>=n[t].t})].x-t.o}return e},h.prototype.p2fv=function(t){var e=c.Cpy(this.getFV()),o=this.isSR();if(o){t=t||0;var i=o.u.rgU,n=i[c.bin(i.length,function(e){return t>=i[e].x})];e.d=new Date(n.t),e.o=n.x-t}return e},h.prototype.LL=function(){return this.oLL||(this.oLL=new c.Gantt.LL(this))},h.prototype.NWL=function(){return this.oNWL||(this.oNWL=new c.Gantt.NWL(this))},h.prototype.SDL=function(){return this.oSDL||(this.oSDL=new c.Gantt.SDL(this))},h.prototype.fitLL=function(t,e,o){return e.x+e.w1){var i=c.UnitEnum,n=t.GetUnit(e);switch(e){case i.exWeek:case i.exMonth:n--;break;case i.exDay:n=t.GetWeekDay()-1}t.Prev(e,n%o)}return t},u.prototype.next=function(t,e){return t=t.copy(),(e=r(e,1))&&t.Next(this.getUnit(),e*this.getCount()),t},u.prototype.index=function(){return this.oLvs.indexOf(this)},u.prototype.GetOptions=function(){return this.oO},u.prototype.SetOptions=function(t){function e(e){if(void 0!==t[e]){var o=c.setM(e);o in this&&this[o].call(this,t[e])}}if(t){this.bU(),e.call(this,"label");for(var o in t)"label"!=o&&e.call(this,o);this.eU()}},u.prototype.GetLabel=function(){return this.oO.label},u.prototype.SetLabel=function(t){var e,o=null,n=null,r=this.oLvs.oGV,s=this.oLvs.oGC.oAL,h=this.oO;this.bU(),this.onRL(function(){null!=t&&(c.IsS(t)?t=i(t):c.IsN(t)?(n=t,null==(t=this.oLvs.oGC.mLb.get(t))&&(t=null,n=null)):(null!=t.c&&(o=t.c),null!=t.u&&(n=t.u),null!=t.l&&(t=t.l))),null!=t&&r.ctxTfi(function(i){r.locale(function(){null!=(e=s.Split(t,i)).uL&&(n=e.uL),null!=e.u&&(n=e.u),null!=e.c&&(o=e.c)})}),null!=t&&null==n||(h.unit=n),null!=t&&null==o||(h.count=o),h.label=t,this.synl("label")},this),this.eU()},u.prototype.getLabel=function(){return i(this.GetLabel())},u.prototype.GetUnit=function(){return this.oO.unit},u.prototype.SetUnit=function(t){this.bU(),this.onRL(function(){this.oO.unit=t,this.synl("unit")}),this.eU()},u.prototype.getUnit=function(){return~~this.GetUnit()},u.prototype.getUnitEq=function(){var t=this.getCount(),e=this.getUnit(),o=c.UnitEnum;switch(e){case o.exHour:24==t&&(e=o.exDay);break;case o.exMinute:60==t?e=o.exHour:1440==t&&(e=o.exDay);break;case o.exSecond:60==t?e=o.exMinute:3600==t?e=o.exHour:86400==t&&(e=o.exDay)}return e},u.prototype.GetCount=function(){return this.oO.count},u.prototype.SetCount=function(t){this.bU(),this.onRL(function(){this.oO.count=t,this.synl("count")}),this.eU()},u.prototype.getCount=function(){return e(1,~~this.GetCount())},u.prototype.GetAlign=function(){return this.oO.align},u.prototype.SetAlign=function(t){this.bU(),this.onRL(function(){this.oO.align=t,this.synl("align")}),this.eU()},u.prototype.getAlign=function(){return r(this.GetAlign(),16|(this.oLvs.isZ(this)?5:4))},u.prototype.GetShape=function(){return this.oO.shape},u.prototype.SetShape=function(t){this.bU(),this.oO.shape=c.S.A2S(t),this.synl("shape"),this.eU()},u.prototype.getShape=function(){return this.oLvs.oGV.toShape(this)||null},u.prototype.shape=function(t,e,o,i){var n=c.Tree.bSCTX(t,this.getShape(),e);o.call(i||this),n&&c.Tree.eSCTX(t,n)},u.prototype.GetDrawGridLines=function(){return this.oO.drawGridLines},u.prototype.SetDrawGridLines=function(t){this.bU(),this.oO.drawGridLines=t,this.synl("drawGridLines"),this.eU()},u.prototype.getDrawGridLines=function(){var t=this.GetDrawGridLines();if(null==t){var e=1;(this.oLvs.len()<2||this.oLvs.at(e).isEmpty())&&(e=0),t=e==this.index()}return t},u.prototype.vGL=function(t,e,o){function i(e,o,i){t.moveTo(e,o),t.lineTo(e,i)}var n,r=this.UL(),s=r.x,h=e,a=e+o;r.length&&(r.forEach(function(t){i(s+t.x,h,a)}),i(s+((n=r[r.length-1]).x+n.w),h,a))},u.prototype.GetDrawTickLines=function(){return this.oO.drawTickLines},u.prototype.SetDrawTickLines=function(t){this.bU(),this.oO.drawTickLines=t,this.synl("drawTickLines"),this.eU()},u.prototype.getDrawTickLines=function(){return r(this.GetDrawTickLines(),-1)},u.prototype.GetDrawTickLinesFrom=function(){return this.oO.drawTickLinesFrom},u.prototype.SetDrawTickLinesFrom=function(t){this.bU(),this.oO.drawTickLinesFrom=t,this.synl("drawTickLinesFrom"),this.eU()},u.prototype.getDrawTickLinesFrom=function(){var t,e=this.GetDrawTickLinesFrom();if(e&&(e=i(e).trim())){var o,n,r=e.split(",");r.length>1&&(o=this.oLvs.at(this.oLvs.len()-(1+~~r[0])))&&(n=~~r[1])&&(t={l:o,t:n})}return t},u.prototype.drawTL=function(t,e,o){function i(t,e,o,i){function n(e,o,n){if(-1!=i)for(var r=c.Gantt.LevelLineEnum,s=1+((3840&i)>>8),a=0;a=this[e].x},this)]);return e&&(e.x+=this.x,e.o&&(e.o.x+=this.x)),e},t.prototype.d2UL=function(t){var e=c.Cpy(this[c.bin(this.length,function(e){return t.Compare(this[e].s)>=0},this)]);return e&&(e.oX=this.x),e},t.prototype.d2X=function(t){var e=this.x,o=this[c.bin(this.length,function(e){return t.Compare(this[e].s)>=0},this)];return o&&(e+=a(o).x+(t-o.s)/(o.e-o.s)*a(o).w),e},t.prototype.VO=function(t,e){var o=new c.M1,i=this.x;return this.forEach(function(n){o.push(n.s,[i+n.x,t,n.w,e])}),o},o.prototype.init=function(o){function i(){function t(t){if(t.length&&240&t.oLv.getAlign()){var o=t[0],i=t[t.length-1],n=t.x+o.x;o.o={x:o.x,w:o.w},i.o={x:i.x,w:i.w},o.w+=n,o.x-=n,i.w-=e(0,t.x+i.x+i.w-u)}}var o,i=this.oLvs,n=i.oGC.oNW,r=i.oGC,s=i.getBL(),h=i.getUW(),a=i.getUNW(),u=i.cltW(),l=i.showNWM(),c=r.oAL.max(),p=this.get(s),f=i.isSR();h&&s&&(!function(t){function e(t){return t.copy().Next(r,c)}function o(o){return t.push(h,o,e(o)),i.next(o)}var r=s.getUnit(),c=s.getCount(),p=i.getFVD().copy(),f=l&&a?function(r){if(l&n.isNWU(r)){var s=t.mW;return a<0?t.push(-a,r.copy(),r=i.next(r)):(t.push(a,r,e(r)),r=i.next(r)),t.mW=s,r}return o(r)}:o;for(t.x=i.getFVO();i.fitLL(p,t,u);)p=f(p);t.onC()}(p),p.length&&(f&&i.next(p.e()).Compare(f.e)>=0&&(o=p.l()),i.len()>1&&i.forEach(function(n){if(!n.isEmpty()){var s=this.get(n);s!=p&&(!function(t,n){if(t!=n){var s=t.oLv,a=n.s(),u=s.reset(a),l=s.next(u);i.hsNW()||r.getAdjustLevelsToBase()?function(){function e(t,e,o){var n=t.Compare(e)<0,r=n?e:t,s=n?t:e,a=0;for(o&&(s=i.next(s));s.Compare(r)<0&&a0?r+=e.w:(r&&t.push(r,u,l),r=e.w,u=l,l=s.next(l))}),(r+=e(n.e(),o?o.Min(l):l,!0))&&t.push(r,u,l)}():function(){function i(t){return h*(t-a)}var r,h=n.r(),p=n.l();for(r=t.x=e(-c,i(u));u.Compare(p)<0;)t.push(i(o?o.Min(l):l)-r,u,l),r=t.x+t.w,u=l,l=s.next(l)}(),t.x+=n.x,t.onC()}}(s,p),t(s))}},this),t(p)))}this.oLvs=o,this.mUL=function(){var e=new Map;return o.forEach(function(o){e.set(o,new t(o))}),e}.call(this),i.call(this)},o.prototype.get=function(t){return this.mUL.get(t)},i.prototype.init=function(t){function e(e){return t.opt(e,null)}this.oGC=t,this.d=e("nonworkingDays"),this.bD=e("showNonworkingDays"),this.h=e("nonworkingHours"),this.bH=e("showNonworkingHours"),this.bU=e("showNonworkingUnits")},i.prototype.XC=function(){this.oR=null},i.prototype.getR=function(){var t=function(){var t=this.d;return null==t&&this.oGC.locale(function(){t=0;var e=c.Loc.Get().weekend;if(e)for(var o=0;o=0;i--)o=t.call(e,this[i]);return o},n.prototype.copy=function(t){var e;e={};for(var o in t)e[o]=t[o];return e},n.prototype.x2ZL=function(t){return t-=this.x,this.rForEachU(function(e){if(t>=e.x&&t=0&&t.Compare(e.e)<0)return(e=c.Cpy(e)).x+=this.x,e})},n.prototype.x2rgZL=function(t){var e=[];return t-=this.x,this.rForEachU(function(o){t>=o.x&&t=0&&t.Compare(o.e)<0&&((o=this.copy(o)).x+=this.x,e.push(o))}),e},Object.addPrototypeOf(r.prototype,n.prototype),r.prototype.init=function(t){return function(e){t.apply(this,arguments);var o=e.showNWM();if(o){function i(t,e){var o=y.d2X(t);s.push(o,y.d2X(e)-o,t,e.copy())}var n=c.UnitEnum.exDay,r=c.UnitEnum.exHour,s=this,h=e.oNW,a=h.getR(),u=(a.bD?n:0)|(a.bH?r:0);if(u){var l,p,f,g=o==n?n:r,y=e.getBL().UL();if(y.length)for(l=y.f().copy().Reset(g),p=y.l();l.Compare(p)<0;)if((f=h.isNWU(l))&o){var v=l.copy(),d=h.nextNWU(o,l);f&u&&i(v,d)}else l.Next(g)}}}}(r.prototype.init),Object.addPrototypeOf(s.prototype,n.prototype),s.prototype.init=function(t){return function(e){t.apply(this,arguments);var o=e.getBL().UL(),i=this,n=o.f(),r=o.l();e.oGC.oSD.zO().forEachU(function(t){var e=t.s.Compare(r)<0;return e&&t.e.Compare(n)>=0&&function(t){var e=t.s,n=t.e,r=o.d2X(e);i.push(r,o.d2X(n)-r,e,n.copy()).o=t}(t),!e})}}(s.prototype.init),s.prototype.x2SD=function(t){var e=this.x2ZL(t);return e&&e.o},s.prototype.x2rgSD=function(t){var e=[];return this.x2rgZL(t).forEach(function(t){e.push(t.o)}),e},Object.addPrototypeOf(h.prototype,c.KAr.prototype),h.prototype.init=function(t){return function(e){t.call(this),this.oGC=e}}(h.prototype.init),h.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.bzO=!1,this.oGC.resSD()}}(h.prototype.onChange),h.prototype.K=function(t,e){return t.s.getTime()+"."+t.e.getTime()},h.prototype.toE=function(t){return this.k2E(this.getK(t))||t},h.prototype.indexOf=function(t){return function(e){return t.call(this,this.toE(e))}}(h.prototype.indexOf),h.prototype.remove=function(t){return function(e){return t.call(this,this.toE(e))}}(h.prototype.remove),h.prototype.zO=function(){return this.bzO||(this.bzO=!!this.sort(function(t,e){var o=t.s.Compare(e.s);return o||(o=e.e-e.s-(t.e-t.s)),o})),this},h.prototype.getSingleSel=function(){return this.oGC.getAllowSelectDate()},h.prototype.allowSelect=function(){return this.getSingleSel()},h.prototype.isSingleSel=function(){return 2&this.getSingleSel()},h.prototype.isToggleSel=function(){return 4&this.getSingleSel()},h.prototype.isToggleCtrlSel=function(){return 0==(8&this.getSingleSel())},h.prototype.isShiftSel=function(){return 0==(16&this.getSingleSel())},h.prototype.isSelected=function(t){return this.has(t)},h.prototype.isSelectable=function(t){return!!t},h.prototype.select=function(t,e){function o(t){var e=!1,o=this.isSelected(t),i=this.isSelectable(t);if(null==t)e=this.len(),this.clear();else if(n&&this.len()){var s=this.at(this.len()-1),h={s:s.s.Min(t.s),e:s.e.Max(t.e)};(e=!this.isSelected(h))&&(this.remove(s),this.add(h))}else if(this.isSingleSel()){h=!i||r&&o?null:t;(e=!this.isSelected(h))&&(this.clear(),this.ann(h))}else r&&o?(e=o,this.remove(t)):(r||(e=!o||this.len()>1,this.clear()),i&&this.add(t)),e|=o!=this.isSelected(t);return e}var i=!1,n=1==(e=e||{}).selType,r=2&e.selType,s=function(t){function e(t){var e,o,i;return null==t||(i=t.s instanceof Date&&t.e instanceof Date&&t.s.Compare(t.e)<=0&&t)||((e=t.s||t.start)&&(e=Date.Create(e)),(o=t.e||t.end)&&(o=Date.Create(o)),e||o?(e||(e=o.copy().PrevSecond()),o||(o=e.copy().NextSecond())):o=(e=Date.Create(t)).copy().NextSecond(),i={s:e.Min(o),e:e.Max(o)}),i||null}var o=null;return null!=t&&(t instanceof Array||t instanceof c.Arr?(o=new c.Arr,t.forEach(function(t){o.ann(e(t))}),o.len()||(o=null)):o=e(t)),o}.call(this,t);return s instanceof c.Arr?n?i|=o.call(this,s.last()):r?s.forEach(function(t){i|=o.call(this,t)},this):(i=!function(t){var e=this.len()==t.len();if(e)for(var o=t.len(),i=0;e&&i0&&e.e.Compare(t.s)>0&&{s:t.s.Max(e.s),e:t.e.Min(e.e)}||null}function a(t){this.init(t)}function u(t,e){this.init(t,e)}function S(t){this.init(t)}function C(t){var e,o,i,n,r,s=new c.BiM,h=new Map,a=new Map,u=new Map,l=C.toK;c.B.split(t).forEach(function(t){(o=t.subText)&&(n="get"+c.getP(o),r="Set"+c.getP(o),t.flags&&(n=t.flags.get("get")||n,r=t.flags.get("set")||r),e=~~t.caption,i=l(o),s.set(e,o),h.set(i,o),h.set(e,e),a.set(e,n),a.set(i,n),u.set(e,r),u.set(i,r))}),this.o=s,this.k=h,this.g=a,this.s=u}function m(t,e){this.init(t,e)}function L(t){this.init(t)}function T(t){this.init(t)}function w(t,e){this.init(t,e)}function G(t){function e(t,e){var o,i,n=!e,r=t.getFrom(),s=t.getTo();n&&(i=r,r=s,s=i),(o=this.get(r)||[]).push({b:s,l:t,t:t.getType(n),g:(n?1:-1)*(t.getWorkingLag()||t.getLag()),w:0!=t.getWorkingLag()}),this.set(r,o)}this.oGL=t,this.p=new Map,this.s=new Map,t.forEach(function(t){e.call(this.p,t,!0),e.call(this.s,t,!1)},this)}function O(){this.mIO=new Map}function U(t){this.init(t)}var b,V=c.BiM.Split("o(offset),i(intersect),s(stack),c(cascade)"),B=c.msday,E=c.Gantt.ItemBarOptions;return a.prototype.init=function(t){function e(t,e){e.forEach(function(e){if(h.add(e)){var i,n,r=this[t]||(this[t]=new Map),s={i:e,a:new c.Arr(e),t:t,o:function(t,e){var o=t.getOverlaid()[V.get(e)];return"i"==e&&(o=u(c.S.A2S(o))),o}(e,t)};if(o){o.forEach(function(t,o){(o==e||t.has(e))&&(s.a.push(t),h.push(t))});do{i=s.a.len(),s.a.forEach(function(t){(n=o.get(t))&&(s.a.push(n),h.push(n))})}while(s.a.len()>i)}s.a.forEach(function(t){r.set(t,s)})}},this)}var o,i,n,r,s=new Map,h=new c.Arr,a=t.oGC.oT.oTV,u=a.toShape.bind(a);if(t.forEach(function(e){(n=function(t){var e=V.keys()[(255&t.getOverlaidType())-1];return"i"!=e||t.getOverlaid().intersect||(e=""),e}(e))&&(!(r=s.get(n))&&s.set(n,r=new c.Arr),r.add(e)),(i=e.getOverlaidGroup())&&i.split(",").forEach(function(i){var n,r=t.Item(i.trim());r&&r!=e&&(!(n=(o=o||new Map).get(e))&&o.set(e,n=new c.Arr),n.add(r))})}),s.size){if(s.forEach(function(t,o){e.call(this,o,t)},this),this.c||this.s){var l=new Map;[this.c,this.s].forEach(function(t){t&&t.forEach(function(t,e){l.set(e,t)})}),this.h=l}this.mB=new Map,s.forEach(function(t,e){this[e]&&this[e].forEach(function(t,o){this.mB.set(o,e)},this)},this)}},a.prototype.G=function(t,e){var o,i,n,r,s,h,a=e&&e.length||0;if(a>1&&(n=this[t]))for(o=0;o1)for(o=0;o1&&(r=o.o))for(i=[],e.forEach(function(t){i.push({b:t,s:t.getStart(),e:t.getEnd()})}),i.sort(function(t,e){return t.s.Compare(e.s)}),f=(p=0)+1,g=i.length;pn[0].b.GetKey()?-r:r,y.set(u.b,s),n.forEach(function(e,o){y.set(e.b,-s),o?h(l,e)?y.set(e.b,h(u,e)?0:t(u,u,e)||s):t(l,l,e):l=c.Cpy(e)}))}}),y},a.prototype.H=function(i,n){function r(t,e,o){var i=[];t.forEach(function(t,e){i.push(e)}),i.sort().forEach(function(i,n){e.call(o,t.get(i),n)})}var s,a,u,l,p=[],f=0,g=0;return(u=this.G("h",i))&&(u.forEach(function(o,i){("s"==i.t?function(e){function o(){i&&r.push(i),i=null}var i,n,r=[];return e.sort(function(t,e){return t.getStart().Compare(e.getStart())}).forEach(function(e){n&&!h(n,e.se())&&o(),(i=i||[]).push(e),t(n=n||c.Cpy(e.se()),n,e.se())}),o(),r}(o):[o]).forEach(function(o){p.push(function(t,o,i){var n,r=e(0,o),s=[];return i.forEach(function(t){n=0,t.forEach(function(t){n=e(n,o+t.getHeight())}),s.push(n),r+=n}),{t:t,f:r,o:o,l:i,h:s}}(i.t,i.o,function(t,o){function i(t,e){var o=n.get(t);!o&&n.set(t,o=[]),o.push(e)}var n=new Map,r=[];t&&t.forEach(function(t,r){var s=o&&o.get(t),a=(s?s.i+s.l:0)||0,u=a;t.i=a,t.b.forEach(function(t,o){if(o){for(var r=a,s=n.size,l=!0;l&&r1&&(null!=n&&(s=n=0&&this.resOB(),this.oGC.resVB(),this.oGC.oT.oCF.resBF(),this.oGC.oT.feIB(function(t){t.oB=void 0})}}(S.prototype.onChange),S.prototype.K=function(t,e){return void 0!==e&&(t.oO.name=e),t.oO.name},S.prototype.import=function(){this.oGC.import.call(this,this.oGC.oT)},S.prototype.toK=function(t){return i(t)},S.prototype.dTV=function(){return this.oGC.oT.oTV},S.prototype.GetCount=function(){return this.len()},S.prototype.Item=function(t,e){return e&&function(t){if(void 0===this.mS){var e,o=null;this.forEach(function(t){(e=t.GetShortcut())&&(o=o||new Map).set(e,t)}),this.mS=o}return this.mS&&this.mS.get(i(t))}.call(this,t)||function(t){var e=this.k2E(t);return e||(e=this.at(t))||(e=t instanceof u&&this.has(t)?t:null),e}.call(this,t)},S.prototype.Items=function(t){var e=new c.Arr;return c.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},S.prototype.newBar=function(t){return new u(this,t)},S.prototype.Add=function(t){t=c.IsO(t)?t:{name:t};var i,n,r,s,h,a,u=this.Item(i=t.name=this.toK(t.name));return u||(this.bU(),~(n=i.indexOf("%"))&&(t.shape=c.Mrg(t.shape,(s=this.Item(i.substr(0,n).trim()))?s.getShape():this.oGC.unkS()),(s=this.Item(r=i.substr(n+1).trim()))?h=s.getShape():r&&(h=this.dTV().toShape(c.S.A2S(r))||{fillColor:"black"}),(a=t.shape)&&(!a.p2x&&(a.p2x=function(t,e){return t*e}),!a.x2p&&(a.x2p=function(t,i){return e(0,o(1,t/i))}),!a.draw&&(a.draw=function(t,e,o,i){if(i instanceof c.Gantt.ItemBar){var n=i.getPercent(),r=o.slice();r[2]=this.p2x(n,r[2]),t.drawShape(r,h),i.getShowPercentCaption()&&i.t().oGV.drawC(t,r,i,i.p2C(n),i.getAlignPercentCaption(),1)}}))),u=this.newBar(t),this.eU()),u},S.prototype.Remove=function(t){this.RemoveRange(this.Item(t,!0))},S.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},S.prototype.Clear=function(){this.bU(),this.mS=void 0,this.clear(),this.eU()},S.prototype.Copy=function(t,e){var o,i,n;return(i=this.Item(t=this.toK(t),!0))&&!this.Item(e=this.toK(e))&&((n=c.Cpy(i.GetOptions())).name=e,o=this.Add(n)),o},S.prototype.load=function(t){t=t||{Task:{shape:{frameColor:"rgb(0,0,255)",patternColor:"rgb(0,0,255)",pattern:3}},Split:{shape:{frameColor:"rgb(0,0,255)",frameDash:1,primitive:function(t,e){t.moveTo(c.LOf(e),c.BOf(e)),t.lineTo(c.ROf(e),c.BOf(e))}}},Progress:{shape:{fillColor:"rgb(0,0,0)",client:"[,y+(height-height/4)/2,,height/4]"}},Milestone:{shape:{fillColor:"rgb(0,0,0)",client:"[x-height/2,,height,]",primitive:"EllipticPolygon",pArg:{edges:4,startAngle:0}},def:{canResize:!1}},Summary:{shape:{fillColor:"rgb(0,0,0)",client:"[x-height/1.75/2,,width+height/1.75,]",primitive:"Summary"}},"Project Summary":{shape:{fillColor:"rgb(128,128,128)",client:"[x-height/1.75/2,,width+height/1.75,]",primitive:"Summary"}},Deadline:{shape:{frameColor:"rgb(128,128,128)",client:"[x-height/2,,height,]",primitive:"Deadline"},def:{canResize:!1}}},this.bU(),this.change(0,function(){this.Clear();for(var e in t)this.Add(c.Mrg(c.Cpy(t[e]),{name:e}))}),this.eU()},S.prototype.resOB=function(){this.oOB=void 0;var t=new Map,e=this.oGC.oT,o=e.oI,i=this.getOB(),r=c.Tree.Items.prototype.getHeight,s=c.Tree.Items.prototype.setHeight;o.mOI=null,o.getHeight=r,o.setHeight=s,i&&i.h&&(o.mOI=new Map,o.getHeight=function(e){var o=r.apply(this,arguments),s=this.mOI.get(e);return!s&&this.mOI.set(e,s=e.oIB&&i.H(e.oIB.rgE,e.GetHeight())||t),n(s.h,o)},o.setHeight=function(t){s.apply(this,arguments),this.mOI.delete(t)}),e.onRL()},S.prototype.getOB=function(){return void 0===this.oOB&&(this.oOB=new a(this),this.oOB.mB||(this.oOB=null)),this.oOB},c.expO({Count:null},S.prototype),c.expO(c.Mrg({Options:null},c.Gantt.BarOptions),u.prototype),C.toK=function(t){return c.IsI(t)?~~t:t&&t.toLowerCase&&t.toLowerCase()||t},C.prototype.toK=function(t){var e=C.toK(t);if(this.k.has(e))return e},C.prototype.toO=function(t){var e=this.k.get(this.toK(t));return c.IsI(e)?this.o.get(e):e},C.prototype.toI=function(t){var e=this.k.get(this.toK(t));return c.IsI(e)?e:this.o.getKey(e)},C.prototype.get=function(t){return this.g.get(this.toK(t))},C.prototype.set=function(t){return this.s.get(this.toK(t))},m.prototype.init=function(t,e){this.oO={key:e.key},(this.oIB=t).add(this),this.t().onBC(1,this),this.setOpts(e)},m.prototype.getType=function(t){return"itemBar"+(t?"-"+t:"")},m.prototype.t=function(){return this.i().t()},m.prototype.gC=function(){return this.oIB.gC()},m.prototype.dTV=function(){return this.oIB.dTV()},m.prototype.bU=function(){this.oIB.bU()},m.prototype.eU=function(t){this.oIB.eU(t)},m.prototype.res=function(){this.oExC=void 0,this.oExCe=void 0,this.oExT=void 0},m.prototype.def=function(t,e){var o,i=this.oO[t];return null==i&&((o=this.GetBar())&&(i=o.def(t)),null==i&&null==(i=E[t])&&(i=e)),i},m.prototype.isEnabled=function(){return this.i().isEnabled()},m.prototype.Remove=function(){return this.oIB.Remove(this)},m.prototype.GetOptions=function(){return this.oO},m.prototype.SetOptions=function(t){this.bU(),this.setOpts(t),this.eU(!0)},m.prototype.setOpts=function(t){if(c.IsO(t))for(var e in t){var o=this[c.setM(e)];o&&o.call(this,t[e])}},m.prototype.GetName=function(){return this.oO.name},m.prototype.SetName=function(t){this.bU(),this.oB=void 0,this.oO.name=t,this.eU()},m.prototype.getName=function(){return i(this.GetName())},m.prototype.GetBar=function(){return void 0===this.oB&&(this.oB=this.gC().oGB.Item(this.getName(),!0)||null),this.oB},m.prototype.GetKey=function(){return this.oO.key},m.prototype.SetKey=function(t){this.oIB.setK(this,i(t))&&(this.bU(),this.eU())},m.prototype.getKey=function(){return this.oIB.toK(this.GetKey())},m.prototype.GetStart=function(){return this.oO.start},m.prototype.SetStart=function(t){this.oO.start!=t&&(this.bU(),this.oO.start=t,this.onSE(),this.eU(!0))},m.prototype.getStart=function(){return this.se().s},m.prototype.GetEnd=function(){return this.oO.end},m.prototype.SetEnd=function(t){this.oO.end!=t&&(this.bU(),this.oO.end=t,this.onSE(),this.eU(!0))},m.prototype.getEnd=function(){return this.se().e},m.prototype.xSE=function(){this.oSE=null,this.rgpS&&this.rgpS.forEach(function(t){t.xSE()}),this.t().onBC(3,this)},m.prototype.onSE=function(){this.xSE()},m.prototype.se=function(){return this.oSE||(this.oSE=function(){var t,e;return this.rgS?function(){this.rgS.forEach(function(o){var i=o.se();t=t&&t.Min(i.s)||i.s,e=e&&e.Max(i.e)||i.e})}.call(this):(t=Date.Create(this.GetStart()),e=Date.Create(this.GetEnd())),{s:t.Min(e),e:t.Max(e)}}.call(this))},m.prototype.GetShape=function(){return this.oO.shape},m.prototype.SetShape=function(t){this.bU(),this.oO.shape=c.S.A2S(t),this.eU(this.GetBar()&&1==this.GetBar().hCOC())},m.prototype.getShape=function(t){var e,o,i=this.GetShape(),n=this.dTV(),r=this.GetBar();return i=null!=i?n.toShape(i):r?r.getShape():this.gC().unkS(),r&&((o=this.t().oCF.b2S(r,this.i()))&&(i=c.Inh(o,i)),!r.hCOC()&&(o=this.t().oGV.oHG.hD().ibS(this))&&(i=c.Inh(o,i))),n.oI.mTBS&&(o=n.oI.mTBS.get(this))&&(i=c.Inh(o,i)),t&&i&&(e=n.toShapes(this.i()))&&e.disabled&&(i=c.Inh(e.disabled,i)),i},m.prototype.GetHeight=function(){return this.oO.height},m.prototype.SetHeight=function(t){this.bU(),this.oO.height=t,this.eU(!0)},m.prototype.getHeight=function(){var t,e=this.GetHeight();return null!=e?e:(t=this.GetBar())?t.getHeight():this.gC().unkH()},m.prototype.GetSelected=function(){return this.gC().isSelected(this)},m.prototype.SetSelected=function(t){!!t!=!!this.isSelected()&&this.gC().select(this,{selType:2})},m.prototype.isSelected=m.prototype.GetSelected,m.prototype.GetSelectable=function(){return this.oO.selectable},m.prototype.SetSelectable=function(t){this.oO.selectable=t},m.prototype.isSelectable=function(){return this.def("selectable",!0)},m.prototype.toFormat=function(t,e){var o,i,n;return e&&(n=this.i().Cell(0))?o=n.toFormat(t,e):(i=b.get(t))&&(o=this[i].call(this)),o},m.prototype.GetCaption=function(){return this.oO.caption},m.prototype.SetCaption=function(t){this.bU(),this.oExC=void 0,this.oO.caption=t,this.eU()},m.prototype.getExC=function(){return void 0===this.oExC&&(this.oExC=l.Get(this.def("caption"))||null),this.oExC},m.prototype.getCaption=function(){this.lExC=this.lExC||0;var t,e=null;return this.lExC++||(t=this.getExC())&&(e=t.text(this)),this.lExC--,e},m.prototype.GetHAlignCaption=function(){return this.oO.hAlignCaption},m.prototype.SetHAlignCaption=function(t){this.bU(),this.oO.hAlignCaption=t,this.eU()},m.prototype.getHAlignCaption=function(){return this.def("hAlignCaption",1)},m.prototype.GetVAlignCaption=function(){return this.oO.vAlignCaption},m.prototype.SetVAlignCaption=function(t){this.bU(),this.oO.vAlignCaption=t,this.eU()},m.prototype.getVAlignCaption=function(){return this.def("vAlignCaption",1)},m.prototype.GetShowCaption=function(){return this.oO.showCaption},m.prototype.SetShowCaption=function(t){this.bU(),this.oO.showCaption=t,this.eU()},m.prototype.getShowCaption=function(){return this.def("showCaption",!0)},m.prototype.GetExtraCaption=function(){return this.oO.extraCaption},m.prototype.SetExtraCaption=function(t){this.bU(),this.oExCe=void 0,this.oO.extraCaption=t,this.eU()},m.prototype.getExEC=function(){return void 0===this.oExCe&&(this.oExCe=l.Get(this.def("extraCaption"))||null),this.oExCe},m.prototype.getExtraCaption=function(){this.lExCe=this.lExCe||0;var t,e=null;return this.lExCe++||(t=this.getExEC())&&(e=t.text(this)),this.lExCe--,e},m.prototype.GetExtraCaptionHAlign=function(){return this.oO.extraCaptionHAlign},m.prototype.SetExtraCaptionHAlign=function(t){this.bU(),this.oO.extraCaptionHAlign=t,this.eU()},m.prototype.getExtraCaptionHAlign=function(){return this.def("extraCaptionHAlign",1)},m.prototype.GetExtraCaptionVAlign=function(){return this.oO.extraCaptionVAlign},m.prototype.SetExtraCaptionVAlign=function(t){this.bU(),this.oO.extraCaptionVAlign=t,this.eU()},m.prototype.getExtraCaptionVAlign=function(){return this.def("extraCaptionVAlign",1)},m.prototype.GetShowExtraCaption=function(){return this.oO.showExtraCaption},m.prototype.SetShowExtraCaption=function(t){this.bU(),this.oO.showExtraCaption=t,this.eU()},m.prototype.getShowExtraCaption=function(){return this.def("showExtraCaption",!0)},m.prototype.GetToolTip=function(){return this.oO.toolTip},m.prototype.SetToolTip=function(t){this.bU(),this.oExT=void 0,this.oO.toolTip=t,this.eU()},m.prototype.getToolTip=function(){this.lExT=this.lExT||0;var t,e=null;return this.lExT++||(t=this.getExT())&&(e=t.text(this)),this.lExT--,e},m.prototype.getExT=function(){return void 0===this.oExT&&(this.oExT=l.Get(this.def("toolTip"))||null),this.oExT},m.prototype.tt=function(t){var e,o=this.getExT();return o&&t&&(e=t.ib2R(this,6))&&{oExT:o,rtT:c.ORt(e,0,e[3]+4)}},m.prototype.GetCanResize=function(){return this.oO.canResize},m.prototype.SetCanResize=function(t){this.bU(),this.oO.canResize=t,this.eU()},m.prototype.getCanResize=m.prototype.canResize=function(){return this.isSelectable()&&!this.rgS&&~~this.def("canResize",-1)||0},m.prototype.GetCanMove=function(){return this.oO.canMove},m.prototype.SetCanMove=function(t){this.bU(),this.oO.canMove=t,this.eU()},m.prototype.getCanMove=function(){return this.isSelectable()&&this.def("canMove",!0)},m.prototype.GetCanMoveToAnother=function(){return this.oO.canMoveToAnother},m.prototype.SetCanMoveToAnother=function(t){this.bU(),this.oO.canMoveToAnother=t,this.eU()},m.prototype.getCanMoveToAnother=function(){return this.isSelectable()&&this.def("canMoveToAnother",!1)},m.prototype.canMove=function(){return(this.getCanMove()?1:0)|(this.getCanMoveToAnother()?2:0)},m.prototype.GetParent=function(){return this.oIB.oI},m.prototype.Item=function(){return this.GetParent()},m.prototype.SetParent=function(t){var e=this.gC().oT;this.canParent(t=e.Item(t))&&(this.bU(),e.oGC.oGL.resPS(),this.t().onBC(4,this),this.lP=(this.lP||0)+1,this.GetParent().oIB.remove(this),(this.oIB=t.oIB=t.oIB||new L(t)).add(this),--this.lP,this.t().onBC(5,this),this.eU(!0))},m.prototype.i=m.prototype.GetParent,m.prototype.canParent=function(t){return t&&t!=this.GetParent()&&(!t.oIB||!t.oIB.k2E(this.getKey()))},m.prototype.GetDuration=function(){var t=this.se();return(t.e-t.s)/B},m.prototype.SetDuration=function(t){var e=(t*=B)<0,o=this.se();this.SetOptions({start:e?o.e.copy().add(t):o.s,end:e?o.e:o.s.copy().add(t)})},m.prototype.SetMove=function(t){t&&this.mvBy(t*B)},m.prototype.rsBy=function(t,e,o){var i=(o=o||this.se()).s,n=o.e;if(3&e){var r=1==e?1:-1,s=n-i-(r*t+this.gC().oLvs.getrU().m);s<0&&(t+=r*s),r>0?i=i.copy().add(t):n=n.copy().add(t)}this.SetOptions({start:i,end:n})},m.prototype.mvBy=function(t,e){e=e||this.se(),this.SetOptions({start:e.s.copy().add(t),end:e.e.copy().add(t)})},m.prototype.GetSummaryBarShape=function(){return this.oO.summaryBarShape},m.prototype.SetSummaryBarShape=function(t){this.bU(),this.oO.summaryBarShape=c.S.A2S(t),this.eU()},m.prototype.getSummaryBarShape=function(){var t=this.def("summaryBarShape");return t&&this.dTV().toShape(c.S.A2S(t))},m.prototype.GetCaptionHOffset=function(){return this.oO.captionHOffset},m.prototype.SetCaptionHOffset=function(t){this.bU(),this.oO.captionHOffset=t,this.eU()},m.prototype.getCaptionHOffset=function(){return this.def("captionHOffset",0)},m.prototype.GetCaptionVOffset=function(){return this.oO.captionVOffset},m.prototype.SetCaptionVOffset=function(t){this.bU(),this.oO.captionVOffset=t,this.eU()},m.prototype.getCaptionVOffset=function(){return this.def("captionVOffset",0)},m.prototype.GetExtraCaptionHOffset=function(){return this.oO.extraCaptionHOffset},m.prototype.SetExtraCaptionHOffset=function(t){this.bU(),this.oO.extraCaptionHOffset=t,this.eU()},m.prototype.getExtraCaptionHOffset=function(){return this.def("extraCaptionHOffset",0)},m.prototype.GetExtraCaptionVOffset=function(){return this.oO.extraCaptionVOffset},m.prototype.SetExtraCaptionVOffset=function(t){this.bU(),this.oO.extraCaptionVOffset=t,this.eU()},m.prototype.getExtraCaptionVOffset=function(){return this.def("extraCaptionVOffset",0)},m.prototype.dI=function(t){function e(i){i&&i.rgI&&i.rgI.forEach(function(i){(-2!=t||!i.rgI||!i.rgI.len())&&o.add(i),-1!=t&&e(i)})}var o,i=this.gC().oT.oI;return 0==t||t==i?o=i.rgI:(o=new c.Arr,-1==t||-2==t||-3==t?e(this.i()):t instanceof c.Tree.Item?o.ann(i.Item(t)):(t instanceof Array||t instanceof c.Arr)&&t.forEach(function(t){o.ann(i.Item(t))})),o&&o.len()&&o||null},m.prototype.dIB=function(t,e){var o,n,r,s=!1,h=new c.Arr,a=this.gC().oT.oI;return null!=t&&(null==e&&((s=t instanceof m)?h.ann(a.Item(t.i())&&t||null):(t instanceof Array||t instanceof c.Arr)&&t.forEach(function(t){t instanceof m&&(s=!0,h.ann(a.Item(t.i())&&t||null))})),s||(null!=e&&(n=i(e),r=function(t){return n==t.getKey()},n.length>2&&n.sWith("<")&&n.eWith(">")&&("*"==(n=n.substr(1,n.length-2))?r=null:(n=c.Like.Mask(n),r=function(t){return n.Match(t.getKey())}))),(o=this.dI(t))&&o.forEach(function(t){t.oIB&&(r?t.oIB.forEach(function(t){r(t)&&h.add(t)}):h.push(t.oIB))}))),h&&h.len()&&h||null},m.prototype.DefineSummaryBars=function(t,e){var o,i=this.dIB(t,e);i&&(this.bU(),o=function(t){var e;if(t.rgpS){e=new c.Arr(t.rgpS);for(var o,i=0;i%p%"))},m.prototype.p2C=function(t){return l.Set((this.getPercentCaptionFormat()||"%p").replace("%p",(100*n(t,this.getPercent())).toFixed()))},m.prototype.DateToPercent=function(t){var i=this.se(),n=i.e-i.s;return n?e(0,o(1,(Date.Create(t)-i.s)/n)):1},m.prototype.GetOverviewColor=function(){return this.oO.overviewColor},m.prototype.SetOverviewColor=function(t){this.bU(),this.oO.overviewColor=t,this.eU()},m.prototype.getOverviewColor=function(){var t,e,o=this.def("overviewColor");return o||(o=(t=this.GetBar())&&t.getOverviewColor())||(o=(e=this.getShape(!this.isEnabled()))&&(e.fillColor||e.patternColor||e.frameColor)),o},m.prototype.GetHistLegend=function(){return this.oO.histLegend},m.prototype.SetHistLegend=function(t){this.bU(),this.oExHL=void 0,this.oO.histLegend=t,this.eU()},m.prototype.getHistLegend=function(){this.lExHL=this.lExHL||0;var t,e=null;return this.lExHL++||(t=this.getExHL())&&(e=t.text(this)),this.lExHL--,e},m.prototype.getExHL=function(){return void 0===this.oExHL&&(this.oExHL=l.Get(this.def("histLegend"))||null),this.oExHL},m.prototype.isW=function(){},m.prototype.wC=function(t,e){t=t||this.getStart();var o;return(e=e||this.getEnd())-t<0&&(o=t,t=e,e=o),console.log("TODO - wC"),(e-t)/B},m.prototype.wD=function(t,e){return console.log("TODO-wD"),t.copy().add(e*B)},m.prototype.seR=function(){},c.expO(c.Mrg({Options:null,Bar:null,Parent:null,Duration:null,Move:null,CriticalPath:null},E),m.prototype),Object.addPrototypeOf(L.prototype,c.KAr.prototype),L.prototype.init=function(t){return function(e){t.call(this),this.oI=e}}(L.prototype.init),L.prototype.resVB=function(){this.gC().resVB()},L.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.resVB()}}(L.prototype.onChange),L.prototype.onRemove=function(t){return function(e){t.call(this,e),!e.lP&&this.gC().onDelBar(e)}}(L.prototype.onRemove),L.prototype.K=function(t,e){return void 0!==e&&(t.oO.key=e),t.oO.key},L.prototype.bU=function(){this.oI.bU()},L.prototype.eU=function(t){t&&this.resVB(),this.oI.eU()},L.prototype.gC=function(){return this.oGC||(this.oGC=this.oI.t().oGC)},L.prototype.dTV=function(){return this.oTV||(this.oTV=this.oI.t().oTV)},L.prototype.toK=function(t){return null!=t?t:""},L.prototype.Item=function(t){var e=this.k2E(t=this.toK(t));return e||(e=t===r(t)&&this.at(t))||(e=t instanceof m&&this.has(t)?t:null),e||null},L.prototype.Items=function(t){var e=new c.Arr;return c.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},L.prototype.nIBar=function(t){return new m(this,t)},L.prototype.Add=function(t,e,o,i,n){var r,s=1==arguments.length&&c.IsO(t)?t:{name:t,start:e,end:o,caption:n};return s.key=this.toK(null!=i?i:s.key),(r=this.k2E(s.key))?r.SetOptions(s):r=this.nIBar(s),r},L.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},L.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},L.prototype.Clear=function(){this.bU(),this.clear(),this.eU()},T.prototype.init=function(t){this.oGC=t,this.wse=6,this.dSP=c.Cpy(c.Gantt.DefSchedulePDM),this.rgL=new c.Arr,this.rgL.onRemove=this.onDelLink.bind(this),this.import()},T.prototype.import=function(){this.oGC.import.call(this,this.oGC.oT),["forEach","add","indexOf"].forEach(function(t){this[t]=this.rgL[t].bind(this.rgL)},this)},T.prototype.resVL=function(){this.resPS(),this.oGC.resVL()},T.prototype.resK2I=function(){this.mK2I=null},T.prototype.split=function(t,e){var o,i,n,s,h,a,u,l=-1,p=t.indexOf(g);~p&&(~(i=(o=t.substr(p+g.length)).toUpperCase().indexOf(y))&&(o=o.substr(0,i)+o.substr(i+y.length)),t=t.substr(0,p)),n=c.ToF(o);for(var v=0,d=(s=t).length;l<0&&v>=1,i++;return e(0,o(i,3))}(this.t)],t+=this.b.GetKey(),this.g&&(t+=g+this.g,this.w&&(t+=y)),t}.call(t)}),n},G.prototype.set=function(t,e,o){if(t&&(o=i(o).trim())!=this.get(t,e)){var n=this.oGL,r=e?2:1;n.bU(),n.RemoveRange(function(){var o,i=this.ps(e).get(t);return i&&i.forEach(function(t){(o=o||[]).push(t.l)}),o}.call(this)),o.split(v).forEach(function(o){var i,s,h,a,u,l=n.split(o,r);l&&(i=e?l.g:-l.g,s=l.b,h=t,1==(a=l.t)&&(u=s,s=h,h=u,a=2),n.Add({from:s,to:h,lag:!l.w&&i||0,workingLag:l.w&&i||0,type:a}))},this),n.eU()}},O.prototype.can=function(t,e){return t&&e&&!this.get(t,e)},O.prototype.get=function(t,e){var o,i=this.mIO.get(t);return i&&(o=i.out.get(e)),o||null},O.prototype.add=function(t){function e(t){return{o:t,in:new Map,out:new Map,links:new c.Arr}}var o=t.oF,i=t.oT,n=this.mIO.get(o),r=this.mIO.get(i);!n&&this.mIO.set(o,n=e(o)),n.out.set(i,t),n.links.add(t),o!=i&&(!r&&this.mIO.set(i,r=e(i)),r.in.set(o,t),r.links.add(t))},O.prototype.remove=function(t){var e=t.oF,o=t.oT,i=this.mIO.get(e),n=this.mIO.get(o);i&&(i.out.delete(o),i.links.remove(t),!i.links.len()&&this.mIO.delete(e)),n&&e!=o&&(n.in.delete(e),n.links.remove(t),!n.links.len()&&this.mIO.delete(o))},O.prototype.lOf=function(t){function e(t){var e=i.get(t);return e?e.links:null}var o=c.Arr.empty,i=this.mIO;if(t instanceof c.Gantt.ItemBar)o=e(t)||o;else{var n=null;t instanceof c.M1?n=t.rgO:(t instanceof Array||t instanceof c.Arr)&&(n=t),null!=n&&(o=new c.Arr,n.forEach(function(t){o.pushnn(e(t))}))}return o},c.expO({Count:null},T.prototype),c.expO(c.Mrg({Options:null,Index:null},c.Gantt.LinkOptions),w.prototype),U.prototype.init=function(t){this.oT=t},c.SB.addProto(U.prototype),U.prototype.SetClientRect=function(t){},U.prototype.import=function(){var t=this.oT,e=t.oTV,o=t.oGV;e.export(this),["getTfi","ctxTfi","getToolTipDelay","getToolTipPopDelay","getToolTipWidth","allowTT"].forEach(function(t){this[t]=e[t].bind(e)},this),["locale","ctxLoc","gPtr","gAA"].forEach(function(t){this[t]=o[t].bind(o)},this)},U.prototype.attach=function(){this.import()},U.prototype.gSize=function(){return{height:this.oT.oGC.getOverviewHeight()}},U.prototype.sOH=function(t){t&&this.oT.oGC.SetOverviewHeight(this.scaled(t[3]))},U.prototype.getOverviewVisible=function(){return this.oT.oGC.getOverviewVisible()},U.prototype.getOverviewToolTip=function(){return this.oT.oGC.getOverviewToolTip()},U.prototype.getOverviewZoomCaption=function(){return this.oT.oGC.getOverviewZoomCaption()},U.prototype.getOverviewZoomUnit=function(){return this.oT.oGC.getOverviewZoomUnit()},U.prototype.getOverviewFlags=function(){return this.oT.oGC.getOverviewFlags()},U.prototype.GetVisible=function(){return this.getOverviewVisible()},U.prototype.GetResizable=function(){return 65536&this.getOverviewVisible()},U.prototype.GetViewRect=function(t){return c.EArtC((t||this.gCW()).GetCanvas())},U.prototype.c2V=function(t,e){var o=t,i=e,n=this.GetViewRect();if(1==arguments.length){var r=arguments[0];o=p.X(r),i=p.Y(r)}return{x:o+n[0],y:i+n[1]}},U.prototype.v2C=function(t,e){var o=t,i=e,n=this.GetViewRect();if(1==arguments.length){var r=arguments[0];o=p.X(r),i=p.Y(r)}return{x:o-n[0],y:i-n[1]}},U.prototype.pinvAO=function(t){if(this.isVisible()){var e=this;t?e.invAO():(clearTimeout(e.hIAO),e.hIAO=setTimeout(function(){e.invAO()}))}},U.prototype.isSelectable=function(t){return function(){return t.apply(this,arguments)&&this.gV().isSelectable()}}(U.prototype.isSelectable),U.prototype.onSetAO=function(t){},U.prototype.onpaint=function(t){this.locale(function(){c.SB.prototype.onpaint.call(this,t)},this)},U.prototype.draw=function(t,e,o){function i(e,o,i){e&&(t.selClip(e),o.call(i,e),t.resClip())}this.ctxScale(t,e,function(e){var o,n,r=this.getOverviewVisible(),s=this.getOverviewFlags(),h=this.gCnt(e),a=[];(n=this.gV().toShape("selectout-overview"))&&(o=function(t){var e,o=this.getSelRect(),i=t[0],n=t[1],r=t[3],s=[t];return o&&(s=[],(e=c.ROf(o))>i&&s.push([i,n,o[0]-i,r]),e ";var v=e[0]+e[2]/2,d=t.sizeHTMLText(h);g[0]1&&(r=this.getOverviewZoomUnit())&&(t[2]-=r*s.length),i=t.slice(),4096&a&&(h=this.gCtx())&&(n=i.slice(),n[3]=4+h.fontHeight(),u&&(n[1]=c.BOf(t)-n[3]),5120==(5120&a)))if(u)i[3]=c.TOf(n)-c.TOf(i);else{var l=i[1];l-=i[1]=c.BOf(n),i[3]+=l}return o={rtBars:e(i),rtScale:e(n)},r&&s&&(t[0]=c.ROf(t),t[2]=r,o.rgZoom=new c.M1,s.forEach(function(e){o.rgZoom.set(e.u,t.slice()),c.ORt(t,r)})),o},U.prototype.gV=function(){return this.oT.oGV},U.prototype.h=function(){return 3},U.prototype.feVI=function(t,e){var o,i,n=this.gV(),r=n.getLIV().rgVI,s=r.indexOf(n.getVI().first());if(s>=0&&(o=this.GetClientRect())&&(i=this.gCnt([0,0,this.scaled(o[2]),this.scaled(o[3])]).rtBars)){e=e||this;for(var h=r.len(),a=0,u=i[3],l=this.h();s0?t=[i.s,0]:s.e-s.s>=i.e-i.s&&(t=[new Date((i.s.getTime()+i.e.getTime())/2),1])),t&&r.scrollTo(t[0],t[1])},this),!1):n.ondown(t)},U.prototype.rurScroll=function(t,e){var o=this;e.rurScrollS=function(t){var e,i,n=o.gPtr(t),r=o.gV();(i=n&&o.p2DU(n))&&null!=i.d&&(e=r.fl())&&e.s&&e.e&&(i.d.Compare(e.s)<0||i.d.Compare(e.e)>0)&&r.oLvs.scrollTo(i.d,1)},this.oT.oTV.rurScroll(t,e)},U.prototype.onRurScrollD=function(t){var e,o,i=this.gV(),n=this.se(),r=this.GetClientRect(),s=this.gCnt([0,0,this.scaled(r[2]),this.scaled(r[3])]);(o=s.rtBars||s.rtScale)&&(t.dx=-this.unscaled(i.d2X(n.s.copy().add(this.scaled(t.dx)/o[2]*(n.e-n.s)))-i.d2X(n.s))),this.hasOR("unsmooth")&&((e=i.oLvs).getFVO()&&e.setFVO(0),t.dx/=e.getUW(),t.dx=function(t){return Math.round(t)}(t.dx)*e.getUW()),t.dy=-t.dy,256&this.getOverviewVisible()||(t.dy=0),i.onRurScrollD(t)},U.prototype.rurChartZoom=function(t,e){return this.gV().rurChartZoom(t,e)},U.prototype.rurChartFit=function(t,e){var o=this,i=o.gV(),n=i.oLvs,r=i.dTV();e.rurOnlyAO={},e.rurAllow=0,e.rurEFPaint=r.fitEFPaint(),e.rurDrop=function(t){function e(t){return(t=o.v2C(this.c2V(this.ptCA(t,!1)))).x<=h?r.s:t.x>=a?r.e:o.p2DU([t.x,u]).d}var r=o.se(),s=o.ov2R(),h=c.LOf(s),a=c.ROf(s),u=p.Y(p.R2C(s)),l=p.X(t.from)<=p.X(t.to),f=l?t.from:t.to,g=l?t.to:t.from;i.Smooth(function(){n.zoom(e.call(this,f),e.call(this,g).Next(n.getrUS(),n.getrUC()))})},r.rurDrag(t,e)},U.prototype.rurOverviewSelectionResize=function(t,e){var o,i,n,r,s,h=this.gPtr(t),a=this.p2OR(h);a&&(i=(o=this).gV(),r=i.getCur(),n=i.dTV(),s=i.flE(),e.rurOnlyAO={},e.rurAllow=0,e.rurDrag=function(t){var e=o.p2DU(o.gPtr(t.event)),n=o.se(),r=e&&e.d&&e.e,h=s.s,u=s.e;e&&(r||(r=a<0?n.s:n.e),a<0?h=r:u=r,i.oLvs.zoom(h,u,{ex:!o.hasOR("unsmooth")}))},e.rurCancel=function(t){i.setCur(r)},n.rurDrag(t,e))},b=new C("0(name),1(start),2(end),6(toolTip),9(key),60(histLegend),3(caption),4(hAlignCaption),5(vAlignCaption),56(showCaption),44(extraCaption),45(extraCaptionHAlign),46(extraCaptionVAlign),57(showExtraCaption),10(canResize),11(canMove),28(canMoveToAnother),29(selectable)[get=isSelectable],512(parent)[get=i],513(duration)[get=GetDuration],12(percent),13(percentCaptionFormat),14(showPercentCaption),15(alignPercentCaption),16(canResizePercent),18(offset),21(effort),33(shape)[get=getShape][set=SetShape],41(overviewColor),52(overlaidKey),269(criticalPath),270(predecessor),271(successor)"),{Bar:u,Bars:S,IBP:b,v2B:function(t,e){var o=null;return null!=t&&(c.IsI(t)?(t=~~t)<0&&(t=null):(t=i(t).trim())||(t=null),null!=t&&(o={o:b.toO(t),i:b.toI(t),g:b.get(t),s:b.set(t),k:i(e)})),o},ItemBar:m,ItemBars:L,Link:w,Links:T,OV:U}}()),c.Gantt.ExC=l,c.Gantt.S=function(){function t(t,e){return!t.Compare(e)}function i(t,e){return t.Compare(e)>0}function n(t,e){return t.Compare(e)<0}function r(t,e){return t.copy().add(e)}function s(t,e){return e?r(t,e*x):t}function h(t,e){var o=t.se(),i=e.se();return o.s.Compare(i.s)||-o.e.Compare(i.e)}function a(t){return c.f2S(t,R)}function u(t){return D.charAt(Math.log(t)/Math.log(2))}function l(t,e,o,i){return t?t.wL(e,i?s(o||t.getEnd(),i):o):(o-e)/x}function p(t,e,o,i){var n=r(e);return Math.abs(o)>E&&(n=s(n,o),(i=c.ToB(i,t.isW()))&&(n=t.wD(e,o))),n}function f(t){return t.oGC.eyB()||0}function g(){v.call(this)}function y(){return this.s&&this.e}function v(t,e){this.s=t,this.e=e,y.call(this)&&function(t){if((t=this.r||t)&&t.t){var e=this.e-this.s;switch(t.t){case 1:this.s=t.s,this.e=t.e;break;case 2:this.s.Compare(t.s)<0?(this.s=t.s,this.e=t.e.Min(r(this.s,e))):(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=t.s.Max(r(this.e,-e)));break;case 3:t.s?this.s.Compare(t.s)<0&&(this.s=t.s,this.e=r(this.s,e)):t.e&&(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=r(this.e,-e))}this.s&&(this.s=r(this.s)),this.e&&(this.e=r(this.e))}}.call(this)}function d(t,e){return this.oTV.toShape(c.S.A2S(t),e)}function S(t){return t&&(c.C.IsColor(t)?{color:t}:c.L.aPP(t))||null}function C(t){this.init(t)}function m(t,e){this.init(t,e)}function L(){this.init()}function T(){this.init()}function w(t,e,o){this.init(t,e,o)}function G(){this.init.apply(this,arguments)}function O(t){this.init(t)}function U(t,e){this.init(t,e)}function b(t,e){return{b:t||new c.Arr,l:e||new c.Arr}}function V(t){return this.b.push(t.b),this.l.push(t.l),this}function B(t){this.init(t)}Object.addPrototypeOf(C.prototype,c.M1.prototype),C.prototype.init=function(t){return function(e){function o(t,e,o,i){var n,r=this.get(t);!r&&this.set(t,r=new c.M1),!(n=r.get(e))&&r.set(e,n=[]),n.push({l:o,d:i})}t.call(this),e.forEach(function(t){var e=t.getFrom(),i=t.getTo();o.call(this,e,i,t,!0),e!=i&&o.call(this,i,e,t,!1)},this),function(){this.forEach(function(t){t.rgO.sort(h)})}.call(this)}}(C.prototype.init),C.prototype.lAB=function(t,e,o){var i,n=this.get(t);if(n&&(n=n.get(e))&&n.length)if(o)for(var r,s=0,h=n.length;!i&&s0,h=r.l>0,s&&h?r.l=e(r.l,a.l):s||h?h&&!s&&(r.l=a.l):r.l=o(r.l,a.l)),this.set(t,i,n,r)}},Object.addPrototypeOf(T.prototype,c.M1.prototype),T.prototype.add=function(t){return function(e){return e instanceof w&&this.set(e.b,e),t.apply(this,arguments)}}(T.prototype.add),w.prototype.init=w.prototype.clt=function(t,e,o){if(this.b=t,this.i=null,this.o=null,this.s=null,this.f=null,this.e=null,this.r=null,e){var i,n=e.get(t);n&&n.forEach(function(e,n){e.forEach(function(e){i=e.l.getType(e.d),o&&o.set(t,n,i,function(t){var e=t.l.getWorkingLag(),o=e||t.l.getLag();return o&&new m((t.d?1:-1)*o,!!e)||null}(e)),this.cIO(u(i)).add(n)},this)},this)}t.rgS&&this.cIO("r").push(t.rgS),t.rgpS&&this.cIO("r").push(t.rgpS)},w.prototype.rel=function(t){[this.o,this.i,this.s,this.f,this.r].forEach(function(e){e&&t.push(e)})},w.prototype.lnk=function(t){[this.o,this.i,this.s,this.f].forEach(function(e){e&&t.push(e)})},w.prototype.cIO=function(t){return this[t]=this[t]||new c.Arr},w.prototype.isE=function(){return!(this.i&&this.i.len()||this.o&&this.o.len()||this.s&&this.s.len()||this.f&&this.f.len())},w.prototype.cpy=function(){var t=new w(this.b);for(var e in this)this[e]instanceof c.Arr&&(t[e]=this[e].copy());return t},Object.addPrototypeOf(G.prototype,c.Arr.prototype),G.prototype.init=function(t){return function(){t.apply(this,arguments)}}(G.prototype.init),O.prototype.init=function(t){this.o3=t,this.nMx=0,this.lDo=0,this.rgB=new c.Arr,this.mP=new Map,this.mI=new Map},O.prototype.res=function(){this.mI.forEach(function(t){g.call(t)}),this.mP.clear(),this.rgB.clear()},O.prototype.bI=function(t,e){var o=e;return!o&&(o=!(e=this.mI.get(t))&&(e={})),o&&this.mI.set(t,e),e},O.prototype.add=function(t){if(!this.rgB.has(t)){var e=this.rgB.len(),o=this.o3.IO(t,"e");return o&&o.forEach(function(t){this.rgB.add(t),this.mP.set(t,e)},this),!0}},O.prototype.SD=function(t,e,o){var i,n,r=this.bI(t);v.call(r,e,o),i=r.l,Math.abs(r.l)E){var g=p(e,s.s,f),v=p(e,g,s.l);return this.SD(e,g,v),this.EB(e)?3:0}return 1}}else if(n(a,u.s))return 1}var d=p(o,a,u.l);return this.SD(o,a,d),i(a,u.s)||!this.EB(o,r)?0:2},O.prototype.DoS=function(){function t(){function t(t,e){return{i:t,m:e}}function r(t,e){var o,i=[],n=e?function(t,e){function o(t,e,o,i){o.forEach(function(o){this.oCBL.lAB(e,o,t)&&i.add(o)},this)}var i=this.get(t);i&&(i.o&&o.call(this,2,t,i.o,e),i.s&&o.call(this,8,t,i.s,e),i.f&&o.call(this,4,t,i.f,e))}:function(t,e){var o=this.get(t);o&&(o.o&&e.push(o.o),o.s&&e.push(o.s),o.f&&e.push(o.f))};return this.I.len()>(t?this.F.len():0)+1&&this.I.forEach(function(e){(!t||!this.F.has(e))&&(o=function(t,e){for(var o=new c.Arr(t),i=o.first();i;i=o.next(i))e.call(this,i,o);return o.len()>1&&o||null}.call(this,e,n))&&i.push(o)},this),i.length&&i||null}function s(e){function o(t,e,o){var i=this.oLgs.get(e,o,2)||H;return i.l>=0?l(t,p(e,this.oSB.bI(e).e,i.l,i.w||!1),this.oSB.bI(o).s):0}var i,n;return e&&e.length&&(i=new Map,e.forEach(function(t,e){t.forEach(function(t){var o=i.get(t);!o&&i.set(t,o=new c.Arr),o.add(e)})},this),e.forEach(function(e){var r=e.first(),s=function(t,e){function i(t,e){var o=e.get(t);return o&&1==o.len()?o.first():-1}var n,r=i(t,e);if(r>=0)for(var s=new c.Arr(t),h=new c.Arr(t);h.len();){for(var a,u=new c.Arr,l=h.first();l;l=h.next(l))if(a=this.get(l)){if(!s.has(l)&&a.e)for(var p=a.e.first();p;p=a.e.next(p)){if(s.add(p),r!=i(p,e))return;h.add(p)}if(a.o)for(var f,g=a.o.first();g;g=a.o.next(g))if(r!=i(g,e)){if(!(f=o.call(this,t,l,g)))return;(!n||f0){this.oT;var d=new Map,S=[],C=new c.Arr,m=new c.Arr;for(h.call(C,y,0,-1);C.len();){var L,T=C.first(),w=new c.Arr(T);for(h.call(w,y,0,T),L=w.len()>1;L;){var G,O,U,b=new c.Arr,V=0,B=0,E=w.at(B);for(B++;B1)}if(w.len()){var x,V=w.first(),I=r[T],R=r[V];if(m.add(V),x=u.call(this.oSB,I,R)){var D=l(I.f,x.A.e,x.A.s),H=l(R.f,x.B.e,x.B.s);D||H?((T==V?D:D&&!H)&&(S.push(t(I.first(),D)),d.set(I.first(),D),C.remove(T)),T!=V&&!D&&H&&(S.push(t(R.first(),H)),d.set(R.first(),H),C.remove(V))):(C.remove(T),C.remove(V))}}C.remove(T)}S.forEach(function(t){var e,i,n=t.i;(e=this.get(n))&&(i=!0,(s||null==s)&&e.e&&e.e.len()>1&&e.e.forEachU(function(e){return e!=n&&(i=d.has(e))&&(t.m=o(t.m,d.get(e))),!i},this),i&&t.m&&(g=g||[]).push(t))},this)}return g}.call(u,a)),h.call(this,s.call(u,a)))}function r(t){return this.mP.get(t)||0}var s,h,a,u,f,g=0,y=!0,d=0,S=this.nMx;for(this.lDo++;d=S&&(g=-1),!g&&1==this.lDo&&t.call(this),--this.lDo,g},Object.addPrototypeOf(U.prototype,T.prototype),U.prototype.init=function(t){return function(e,o){t.call(this),this.oT=e,this.r=0,this.oCBL=o||new C(e.oGC.oGL),this.oLgs=new L,this.I=new c.Arr,this.F=new c.Arr,this.O=new c.Arr,this.oSB=new O(this)}}(U.prototype.init),U.prototype.toB=function(t){var e=this.mTB&&this.mTB.get(t);return!e&&(!this.mTB||!this.mTB.has(t))&&(e=function(t){for(var e,o,i=new c.Arr(t),n=i.first();n;n=i.next(n))n.rgS?(o=!0,i.push(n.rgS)):(e=e||new G).add(n);if(o&=e&&e.len()&&1){e.s=e.e=e.at(0);for(var r=1,s=e.len();r0&&(e.e=n)}return o&&(e||null)}(t))&&(this.mTB=this.mTB||new Map).set(t,e),e},U.prototype.TB=function(t){function e(t,o){var i,n;return(n=this.toB(t))&&n.len()&&(i=(i=n.forEachU(function(t){return this.has(t)&&o.call(this,t)&&t},this))||n.forEachU(function(t){return e.call(this,t,o)},this)),i}var o=t;return this.has(t)||(o=e.call(this,t,function(t){return this.oCBL.has(t)})||e.call(this,t,function(t){var e=this.get(t);return e&&!e.isE()})||e.call(this,t,function(t){return!!t})),o},U.prototype.bB=function(){return this.I.first()},U.prototype.aIO=function(t,e,o){var i,n=this.oLgs,r=t[u(o)];if(r&&r.len){switch(o){case 1:i=e.cIO("i");break;case 2:i=e.cIO("o")}i&&r.forEach(function(r){i.add(r),n.pls(e.b,r,o,n.get(t.b,r,o))})}},U.prototype.rIO=function(t,e){var o,i,n=this.oLgs,r=t[u(e)];r&&(i=new c.Arr,r.forEach(function(r){(o=this.toB(r))?o.forEach(function(o){i.add(o),n.pls(t.b,o,e,n.get(t.b,r,e))}):i.add(r)},this),r.clear(),r.push(i))},U.prototype.xIO=function(t,e){var o=t[u(e)],i=0;return o&&this.mTB&&this.mTB.forEach(function(t,e){i|=o.remove(e)}),!!i},U.prototype.aE=function(t){t&&(this.rgE=this.rgE||new c.Arr).add(t)},U.prototype.cyc=function(t){function e(t){function e(t,e){return e.forEachU(function(e,o){var i;return t==e||(i=this.get(e))&&i.e&&i.e.has(t)?o+1:0},this)-1}var o,i=[],n=new c.Arr(t);i.push(n);for(var r,s,h,a,u,l,p,f=0;f=0)for(var g=s;g1&&(C=new c.Arr,p.forEach(function(t){(L=I.get(t))&&((G=!L.i||!L.i.len())||(O=r.get(t),L.i.forEachU(function(t){return!(G=!p.has(t)||O&&!O.has(t))})),G&&C.add(t))},this),C.len()>1)){C.sort(h),U=C.first();for(var e,o=(b=new c.Arr(U)).first();o;o=b.next(o))(e=I.get(o))&&(e.o&&b.push(e.o),e.s&&b.push(e.s),e.f&&b.push(e.f));(V=I.get(U))&&(E=new c.Arr,C.forEach(function(t){if(U!=t&&!b.has(t)&&(B=I.get(t))){!this.mRB&&(this.mRB=new Map).set(V.b,V.cpy()),this.mRB.set(B.b,B.cpy()),E.add(t),B.cIO("i").add(U),V.cIO("o").add(t),(x=l(U,U.getEnd(),t.getStart()))&&!s.get(U,t,2)&&s.pls(U,t,2,new m(x,U.isW()||t.isW())),b.add(t);for(var e,o=t;o;o=b.next(o))(e=I.get(o))&&(e.o&&b.push(e.o),e.s&&b.push(e.s),e.f&&b.push(e.f))}},this),E.len()&&(this.mLB=this.mLB||new Map).set(U,E))}},this),this.clear(),this.add(I)}if(!(e=this.pIO()))if(this.i=function(t){var e=this.mTB&&this.mTB.get(t);return e&&(t=e.s),t}.call(this,t),this.I.len()){if(this.I.len()>1){var W,k,A=new c.M1;this.I.forEach(function(t){for(var e,o=(W=new c.Arr(t)).first();o;o=W.next(o))(e=this.get(o))&&e.lnk(W);A.set(t,W)},this),(k=this.I.forEachU(function(t){return A.get(t).has(this.i)&&t},this))&&this.I.setPos(k,0),this.I.forEach(function(t){(!k||!A.get(k).has(t))&&this.F.add(t)},this)}}else this.forEachU(function(t){return t.isE()})&&(e=4)}return e},U.prototype.DoS=function(t){var i=t?this.clt(t):0,n=0;if(!i)if(this.I.len()){var r=c.Arr.empty,s=this.bB(),h=c.Cpy(this.oSB.bI(s)),a=f(this.oT);if(this.forEach(function(t){n+=(this.IO(t.b,"o")||r).len()},this),n=2*e(1,n),this.oSB.res(),this.oSB.bI(s,h),t&&this.forEach(function(t){this.oSB.bI(t.b).l=l(t.b,null,null,a)},this),this.oSB.SB(s,s)||(i=o(i,-2)),!i){var u,g=this.oSB.bI(s).e;this.I.forEachU(function(t){return t!=s&&(u=this.F.has(t),this.oSB.SD(t,u?t.getStart():p(t,g,-l(t)),u?t.getEnd():g),this.oSB.SB(t,t)||(i=min(i,-2))),i},this)}i||(this.oSB.nMx=n,i=this.oSB.DoS())}else i=-4;return this.r=i},U.prototype.DoM=function(t){var e,o,i,n,r,h,a,u,g,d,S=this.oT;if(!this.r&&(e=this.bB())&&this.has(t))if(o=this.oSB.bI(e),i=this.oSB.bI(t),y.call(o))if(y.call(i)){if(n=l(e,e.getStart(),o.s),this.forEach(function(t){var e,o=t.b,i=this.oSB.bI(o),n=o.getCanMove()?(e=o.seR())?e.s&&e.e?2:3:0:(e=o.se())&&1;r|=n,n&&e&&(i.r=c.Mrg({t:n},e))},this),(h=S.oI.GetDefSchedulePDM())&&((a=function(t){return t&&1==t.scheduleType&&Date.Create(t.scheduleDate)||null}(h))||(u=function(t){return t&&2==t.scheduleType&&Date.Create(t.scheduleDate)||null}(h)))){var C,m,L;this.forEach(function(t){y.call(L=this.oSB.bI(t.b))&&((!C||L.s.Compare(C)<0)&&(C=L.s),(!m||L.e.Compare(m)>0)&&(m=L.e))}),d=a?p(e,g=p(e,a,l(e,C,o.s)-n),o.l):p(e,g=p(e,u,-(l(e,o.s,m)+n)),o.l)}else r?this.oSB.bI(t).r=c.Mrg({t:1},t.se()):d=p(e,g=p(e,t.getStart(),-(l(e,o.s,i.s)+n)),o.l);g&&d&&v.call(o,g,d),!this.DoS()&&(this.r=function(){var t,e=0,o=f(this.oT);return this.oSB.rgB.forEach(function(i){y.call(t=this.oSB.bI(i))?i.SetOptions({start:t.s,end:s(t.e,-o)}):(this.aE(i),e=-5)},this),e}.call(this))}else this.r=-7;else this.r=-6;return this.r},B.prototype.init=function(t){this.o3=t},B.prototype.E=function(){function e(e,o){var n,r=e.getEnd();o.len()?t(r,n=o.first().getEnd())?o.add(e):i(r,n)&&(o.clear(),o.add(e)):o.add(e)}for(var o=new c.Arr,n=this.o3.oSB.rgB,r=n.first();r;r=n.next(r))e(r,o);return o},B.prototype.F=function(){function t(t){return this.o3.mRB&&this.o3.mRB.get(t)||this.o3.get(t)}function e(t,e){return this.o3.oCBL.lAB(t,e)}function o(t,e,o){e&&e.forEach(function(e){var i=this.o3.oLgs.srch(t,e)||H;Math.abs(l(e,e.getEnd(),p(t,t.getStart(),i.l,i.w)))=0},this);i=0;i++);return i}.call(this,t),g=this.u.length;if(f=0&&o(a,p)<=0&&(a=function(t,e){return t.Max(e)}(a,l),u=i(u,p),s=function(e){var o,i,n,r=e.GetBar(),s=r.hCOC(),h=1==s;if(h?e.GetShape()&&(n=function(t,e){return{b:t,s:e}}(r,e.getShape())):r.hC(0)&&(256&r.getHistogramType()||(o=r.gC().hV(8192)))&&(n=function(t,e){var o,i=(f.mBIT=f.mBIT||new Map).get(t);return!i&&f.mBIT.set(t,i=new Map),!(o=i.get(e))&&i.set(e,o={b:t,s:t.hS({fillColor:t.hC(function(){var o=(f.mBI=f.mBI||new Map).get(t);return!o&&f.mBI.set(t,o=new c.Arr),o.add(e),o.getPos(e)}())})}),o}(r,i=o?e.i().oP:e.i())),!n&&(n=function(t){var e=(f.mBT=f.mBT||new Map).get(t);return!e&&f.mBT.set(t,e={b:t}),e}(r)),i)n.s&&(!(i&&~r.hCSL()&&r.gC().oT.Column(r.hCSL()))||f.mLgd&&f.mLgd.has(i)||(f.mLgd=f.mLgd||new Map).set(i,{c:t(i,r.hCSL())||" ",s:n.s}),!s&&(f.mIBS=f.mIBS||new Map).set(e,function(t){return"Spline"==t.primitive&&((t=c.Cpy(t)).primitive=null),t}(n.s)));else if(h&&~r.hCSL()){var a,u,l,p=e.getHistLegend();p&&(a=n.s||r.getHistogramShape(),l=f.mLgd&&(u=f.mLgd.get(a))||{c:p,s:a},u?l.c.localeCompare(p)<0&&(l.c=p):(f.mLgd=f.mLgd||new Map).set(a,l))}return n}(e),e.eE()?function(t,e,o,i){var n,s,h,a,u=i.eE();if(u&&u.IsValid()){for(n=i.t().oGC.gethU(),s={s:(a=t.copy().Reset(n.s)).copy(),e:u.Evaluate(a,i)};a.Compare(e)<0;)s.e!=(h=u.Evaluate(a,i))&&(s.e&&r.call(this,s.s,a.copy(),o,i.rE(s.e)),s={s:a.copy(),e:h}),a.Next(n.s,n.c);s.e&&r.call(this,s.s,a.copy(),o,i.rE(s.e))}}.call(this,a,u,s,e):r.call(this,a,u,s,e.rE()))},r.prototype.compact=function(){for(var t=this.u,o=t.length,i=0;i.5}function h(e,h){if(1&n&&i.feT(function(n){var l,p,f,g,y,v=n.s||n.b.getHistogramShape(),S="Spline"==v.primitive,C=n.b.getShowHistogramValues(),m=n.b.getFormatHistogramValues(),L={},w=c.Apy(c.Cpy(v),c.Apy(e&&e.call(h||this,L,n)||L)),G=!S&&c.Apy(w,{frameColor:null}),O=S?w:v,U=S?function(e,i){t.drawShape(o,i,{points:e})}:function(e,o){o&&o.frameColor&&(t.save(),t.strokeStyle=o.frameColor,t.lineWidth=o.frameSize,e.push(e[0]),t.drawDir(e,0),t.restore())};(G||S)&&(i.feU(n,function(i,n,h){f=[y=this.d2X(i.s),a(h+n),this.d2X(i.e)-y,n*T],!e&&(this.rgV=this.rgV||[]).push({v:n,c:f}),G&&t.drawShape(f,G),C&&(l=C.Evaluate(u(n)))&&r(n,f,{cbkF:m&&function(t){return m.Evaluate(t)},cbkC:function(t){return t.width/2=o/2&&(!t.length||t[t.length-1].y-e>o)&&t.push({y:e,v:i})}if(e&&e.r&&e.d){i=i&&i/Math.abs(i)||1;var r,s=e.d.m,h=e.d.M,u=e.d.s,p=6*i,f=a(l(s))-a(l(s+u/5))>3?~~(p/2)+i:0,g=t.sizeHTMLText(h).height,y=3*g/4,v=[],d=[],S=260|(i<0?2:0);t.save(),t.strokeStyle=e.r,t.beginPath(),t.moveTo(o,a(l(s))),t.lineTo(o,a(l(h)));for(var C,m=s;m<=h;m+=u)if(t.moveTo(o,C=a(l(m))),t.lineTo(o+p,C),m!=s&&n(v,C,g,m),f&&m=i.v&&(t.stroke(),t.strokeStyle=i.c,t.beginPath(),i=null);t.stroke(),t.restore()}}(G,w),(g=w&&i.M>=w.v)&&((y=o.slice())[3]=a(w.v)-y[1],t.selClip(y),h.call(this,function(t){t.fillColor=w.c}),t.resClip(),(v=o.slice())[3]=c.BOf(o)-(v[1]=c.BOf(y)),t.selClip(v)),h.call(this),g&&t.resClip(),8&n&&(!i.l||i.l==i.i+1)&&w&&function(e){if(e){var i,n=[o[0],a(e.v)],s=o[2];t.save(),t.setLineDash([1]),t.drawHLine(n,s,e.c),r(e.v,null,{cbkF:function(t){return(i=e.t.getFormatHistogramValues())&&(t=i.Evaluate(t))," "+t+" "},cbkC:function(t){return[n[0]+s-t.width-8,n[1]-t.height/2,t.width+8,t.height]},tfi:{bgColor:"white",fgColor:e.c}}),t.restore()}}(w)},a.prototype.hI=function(){function t(){this.p=new c.M1,this.i=new c.Arr,this.g={}}function e(t,o,i){n(256)&&o.rgI&&o.rgI.len()?o.rgI.forEach(function(r){r.rgI&&r.rgI.len()?n(512)&&e(t,r,i):i.add(r,t?o:null)}):i.add(o,t?o.oP:null)}t.prototype.add=function(t,e){if(this.i.add(t)){e=e||null;var o=this.p.get(e);!o&&this.p.set(e,o=new c.Arr),o.add(t)}},t.prototype.ibS=function(t){return this.g.mIBS&&this.g.mIBS.get(t)},t.prototype.lgd=function(){var t;return this.g.mLgd&&!(t=this.g.mLgd.rgL)&&(t=[],this.g.mLgd.forEach(function(e){t.push(e)}),t.sort(function(t,e){return c.Cmp.S(t.c,e.c)}),this.g.mLgd.rgL=t),t};var o=this.gC().oT,i=new t,n=this.hV.bind(this),r=!n(1024),s=-1,h=function(){return!0},a=[];return n()&&(n(8)?this.gC().getSel().forEach(function(t){e(r,t.i(),i)}):n(1)?this.oGV.getVI().forEach(function(t,o){e(r,o,i)}):n(128)?this.oGV.getLIV().rgVI.forEach(function(t,o){e(r,o,i)}):n(2)?o.getSel().forEach(function(t){e(r,t,i)}):(!n(4)||~(s=function(){var t=(4294901760&this.gC().getHistogramView())>>16;return t1){var u=[],p=new Map;n.forEach(function(t,e){u.push(e)}),u.sort(function(t,e){return o.getPos(e)-o.getPos(t)}).forEach(function(t){p.set(t,n.get(t))}),n=p}return n}(t)).forEach(function(t){a=e(a,t.M),u.push(t)})}),u.forEach(function(t){t.M=a}),n}return this.oHD||(this.oHD=t.call(this))},a.prototype.drawHG=function(e,o,i){i=i||15+(this.isN()?0:16);var n=this.drawHD.bind(this),r=this.hD(),s=2&i&&!this.hV(4096);1&i&&(this.rgV=null),r.p.len()&&((o=o.slice())[3]/=r.p.len(),r.p.forEach(function(r,h){!function(t,o){var r=0;e.selClip(t),o.forEach(function(s){s.i=r++,s.l=o.size,n(e,t,s,i)}),e.resClip()}(o,r.mHD),s&&e.drawHTMLText(t(h),c.IRt(o.slice(),-4,0),4),c.ORt(o,0,o[3])}))},a.prototype.isN=function(){var t=this.oW.GetClientRect(),e=this.oW.oCW.W("tree.histogram"),o=e&&e.GetClientRect();return o&&this.oW.GetDock()==e.GetDock()&&t[1]==o[1]&&c.ROf(o)-c.LOf(t)<=c.D.WindowSplitSize},a.prototype.V=function(t){function n(t){var e,o=0;return r.forEach(function(i){(e=t-i.c[0])>=0&&e