/* @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(t){return null!=t}function o(t){return null==t}function i(t){return t instanceof Array}function n(t){return t instanceof y.Arr}function r(t){return t instanceof y.Gantt}function s(t){return t instanceof y.Gantt.GV}function h(t){return t instanceof y.Gantt.ItemBar}function a(t){return t instanceof y.Tree.Item}function u(t){return i(t)?t:function(t){return"string"==typeof t}(t)?t.split(","):[t]}function c(t,e,i){return o(t)?~~i:y.s2F(t,e)}function l(t,e){return new Date(t.s.getTime()+(t.e.getTime()-t.s.getTime())*(e-p(t).x)/p(t).w)}function p(t){return t.o||t}var f,g,y=y||window.exontrol,v=y.G,d="SF,FS,FF,SS".split(","),S=":",m="W",C=",",L=y.ToN,T=y.ToI,w=y.ToS,G=y.IsO,O=Math.round,b=Math.max,U=Math.min,B={type:0,color:"black",startPos:"MR",endPos:"TL,ML,BL"};f=function(){function t(t){t.startsWith("=")?this.oEx=y.E.Create(t.substr(1),"value,start,end,wcount"):this.cbkD=Date.prototype.toQ(t)}function o(t){this.c=t}var i=new Map,n=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)},o.prototype.eval=function(e,o){var i=y.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 y.H.SetEObj(i),r},o.prototype.size=function(t,e,o,i){return this.eval(t,function(){return e.sizeHTMLText(this.c,o,i)})},o.prototype.draw=function(t,e,o,i,n){return this.eval(t,function(){return e.drawHTMLText(this.c,o,i,n)})},o.prototype.text=function(t){return this.eval(t,function(){return y.H.TextNoHTML(this.c)})},o.prototype.html=function(t){return this.eval(t,function(){return this.c})},{Get:function(t){var n;return e(t)&&!(n=i.get(t))&&i.set(t,n=new o(t)),n||null},XC:function(){n.clear(),i.clear()}}}(),g=function(){function t(t){(t=w(t)).startsWith("=")&&(t=t.substr(1)),this.oEx=y.E.Create(t,void 0,void 0,"C")}function o(t){this.c=t}var i=new Map,n=new Map,r=new o;return t.prototype.eval=function(t){return this.oEx.Evaluate(function(e,o){return t.toFormat(e,o)})},o.prototype.evalBar=function(e,o){var i=y.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 y.H.SetEObj(i),r},o.prototype.size=function(t,e,o,i){return this.evalBar(t,function(){return e.sizeHTMLText(this.c,o,i)})},o.prototype.draw=function(t,e,o,i,n){return this.evalBar(t,function(){return e.drawHTMLText(this.c,o,i,n)})},o.prototype.text=function(t){return this.evalBar(t,function(){return y.H.TextNoHTML(this.c)})},o.prototype.html=function(t){return this.evalBar(t,function(){return this.c})},{Get:function(t){var n;return e(t)&&!(n=i.get(t))&&i.set(t,n=new o(t)),n||null},Set:function(t){return r.c=t,r},XC:function(){n.clear(),i.clear()}}}(),y.Mrg(y.Tree.ColumnOptions,{valueToItemBarProperty:null,valueToItemBarKey:null}),y.Mrg(y.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=y.Gantt.v2B(this.GetValueToItemBarProperty(),this.GetValueToItemBarKey())),this.oV2B}}),y.expO({valueToItemBarProperty:null,valueToItemBarKey:null},y.Tree.Column.prototype),y.Tree.Columns.prototype.onX=function(t){return function(){return this.oT.oGIB&&this.oT.oGIB.onX(),t.apply(this,arguments)}}(y.Tree.Columns.prototype.onX),y.Mrg(y.Tree.Cell.prototype,{ValueToItemBar:function(t,e){this.bU(),this.oV2B=y.Gantt.v2B(t,e),this.eU()},v2B:function(){return this.oV2B||this.oC.v2B()}}),y.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)}}(y.Tree.Cell.prototype.GetValue),y.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)}}(y.Tree.Cell.prototype.SetValue),y.expO({value:null},y.Tree.Cell.prototype,null,!0),y.Mrg(y.Tree.Item.prototype,{AddBar:function(){var t=function(){return this.oIB||(this.oIB=new y.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 y.Gantt.ItemBars&&t.len()&&t.forEach(function(t){this.AddBar(t.GetOptions())},this),this.eU())},GetNonworkingUnits:function(){return this.oO.nonworkingUnits},SetNonworkingUnits:function(t){this.bU(),this.oO.nonworkingUnits=t,this.eU(!0)},getNonworkingUnits:function(){return w(this.GetNonworkingUnits())}}),y.expO({Bars:null,nonworkingUnits:null},y.Tree.Item.prototype),y.Mrg(y.Tree.Items.prototype,{GetDefSchedulePDM:function(){return this.oT.oGC.oGL.dSP},SetDefSchedulePDM:function(t){if(G(t))for(var e in t)this.oT.oGC.oGL.dSP[e]=t[e]},SchedulePDM:function(t,e){var i,n;return o(e)&&(e=0),o(t)?i=this.forEachU(function(t){return t.ItemBar(e)}):h(t)?i=t:(t=this.Item(t))&&(i=t.ItemBar(e)),this.bU(),this.oT.resTLB(),n=y.Gantt.S.Do(i),this.eU(),n},GroupBars:function(t,e,o,i,n,r){this.oT.oGIB.Group.apply(this.oT.oGIB,arguments)},UngroupBars:function(t,e){this.oT.oGIB.Ungroup.apply(this.oT.oGIB,arguments)}}),y.Tree.Items.prototype.rurIH=function(t){return function(){return this.lIH||(this.lIH=function(){var e=t.apply(this,arguments)||[null,null];return e[0]=b(L(e[0]),this.oT.getDefaultItemHeight()),e}.apply(this,arguments))}}(y.Tree.Items.prototype.rurIH),y.expO({DefSchedulePDM:null},y.Tree.Items.prototype),y.Mrg(y.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=y.Mrg(y.Mrg(y.Cpy(y.Def.Tree.chart),y.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()}}),y.Tree.TV.prototype.init=function(t){return function(){t.apply(this,arguments)}}(y.Tree.TV.prototype.init),y.Tree.TV.prototype.apyOpt=function(t){return function(e,o){if(t.call(this,e,o),e.length>1){var i=e.indexOf("chart");~i&&(e.splice(i,1),e.splice(0,0,"chart"))}var n,r;o&&~e.indexOf("data")&&~e.indexOf("defaultItemHeight")&&(n=this.oT,r=n.onLoad,n.onLoad=function(){r.call(this),this.SetDefaultItemHeight(o.defaultItemHeight),this.onLoad=r})}}(y.Tree.TV.prototype.apyOpt),y.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)'}}(y.Tree.TV.prototype.defShp),y.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)"}}(y.Tree.TV.prototype.defCrs),y.Tree.TV.prototype.rAO=function(t){return function(){t.apply(this,arguments),r(this.oT)&&this.oT.feGV(function(e){t.call(e)})}}(y.Tree.TV.prototype.rAO),y.Tree.TV.prototype.rurAO=function(t){return function(e){return t.apply(this,arguments)}}(y.Tree.TV.prototype.rurAO),y.Tree.TV.prototype.rurI=function(t){return function(e){return r(this.oT)&&this.oT.feGVU(function(t){return t.e2I(e)})||t.apply(this,arguments)}}(y.Tree.TV.prototype.rurI),y.Tree.TV.prototype.rurItemDragS=function(t){return function(e){t.apply(this,arguments),r(this.oT)&&!e.rgGVEF&&(e.rgGVEF=[],this.oT.feGV(function(t){var o=y.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();y.ORt(e,-i[0]+n[0],-i[1]+n[1]),e[2]=n[2],t.SetClient(e)},this)}}(e.SetClient))}}(y.Tree.TV.prototype.rurItemDragS),y.Tree.TV.prototype.rurItemDragE=function(t){return function(e){e&&e.rgGVEF&&(e.rgGVEF.forEach(function(t){y.EF.Destroy(t)}),e.rgGVEF=null),t.apply(this,arguments)}}(y.Tree.TV.prototype.rurItemDragE),y.Tree.TV.prototype.rurItemDragD=function(t){return function(e){t.apply(this,arguments),r(this.oT)&&this.oT.feGV("resVI")}}(y.Tree.TV.prototype.rurItemDragD),y.Tree.TV.prototype.rurDragDrop=function(t){return function(e,o){var i=this,n=this.e2V(e),r=!o.rurFlags;s(n)&&(r||o.rurFlags.has("bar"))&&function(){var t=this.p2IB(this.gPtr(e));t&&this.oT.oGC.isSable(t)&&y.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(y.GP.Get(o.rurName,this.getCursors()))}})}.call(n),(r||o.rurFlags.has("item"))&&t.apply(this,arguments)}}(y.Tree.TV.prototype.rurDragDrop),y.Tree.TV.prototype.Smooth=function(t){return function(e,o,i){function n(){var t=new Map;return a.feGV(function(e){t.set(e,function(t){var e=t.getCur();return e.iuS=function(t){return y.bin(u.length,function(e){return t>=u[e].u})}(e.uS),e.rgVI=t.getVI(),e.rgVB=t.getVB(),e}(e))}),t}if(this.getSmooth()&&e&&r(this.oT)){o=o||this,i=i||{};var s,a=this.oT,u=a.oGC.visLb(),c=e,l=i.cbkR,p=i.cbkI,f=i.cbkT,g=n();e=function(){c.call(o),s=n()},i.cbkI=function(t){p&&p.call(o,t),g.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(h(i)){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 a=this.get(i)||this.rgTo.get(i);a&&(o[0]=a[0],o[2]=a[2])}return o}:null)}})})},i.cbkT=function(t){f&&f.call(o,t),a.feGV("resVI")},i.cbkR=function(t){function e(e,o){return e+(o-e)*t.progress}l&&l.call(o,t),a.feGV(function(t){t.resVL();var o=g.get(t),i=s&&s.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:u[~~e(o.iuS,i.iuS)].u,uW:e(o.uW,i.uW)})})}}return t.call(this,e,o,i)}}(y.Tree.TV.prototype.Smooth),y.Tree.TV.prototype.allowRur=function(t){return function(e,o){function i(t){return y.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}}(y.Tree.TV.prototype.allowRur),y.Tree.TV.prototype.SetTfi=function(t){return function(){this.cwbU(),t.apply(this,arguments),r(this.oT)&&this.oT.oGC.onRL(1),this.cweU()}}(y.Tree.TV.prototype.SetTfi),y.Mrg(y,function(){function t(t,e){this.init(t,e)}Object.addPrototypeOf(t.prototype,y.Tree.prototype),t.version="4.4",t.type="Gantt",t.GroupBarsOptionsEnum={exGroupBarsNone:-1,exGroupBarsOptionNone:0,exPreserveBarLength:3,exPreserveBarLengthA:1,exPreserveBarLengthB:2,exIgnoreOriginalInterval:4,exLimitInterval:24,exLimitIntervalMin:8,exLimitIntervalMax:16,exFlexibleInterval:32},t.PutResEnum={exPutResLoad:1,exPutResSave:2},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,exBarResources:49,exBarResourceFormat:50,exBarOverlaidKey:52,exBarShowCaption:56,exBarShowExtraCaption:57,exBarHistLegend:60,exBarResourcesFormat:266,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.oGIB=new t.GB(this),this.dFD={oF:new y.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,y.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 i=t.apply(this,arguments);return this.oCW.SetClientRect=function(t){function i(){return(this.oTV.oO||{}).chart}return function(){var n=this.oT,r=n.opnt&&n.opnt.b&&function(){var t=i.call(this);if(t&&e(t.paneWidthLeft)&&o(t.paneWidthRight))return this.oGC.GetPaneWidthLeft()}.call(n);t.apply(this,arguments),e(r)&&n.oGC.SetPaneWidthLeft(r),n.opnt&&n.opnt.b||((n.opnt=n.opnt||{}).b=!0,function(){var t=i.call(this);t&&(e(t.paneWidthLeft)||e(t.paneWidthRight))&&this.oGC.SetOptions({paneWidthLeft:t.paneWidthLeft,paneWidthRight:t.paneWidthRight})}.call(n))}}(this.oCW.SetClientRect),this.addGV("gantt"),this.initOV(),i}}(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=b(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(o){var i,n=o.IsSave();n||(this.oLts.lock(),this.lES++,this.bU()),t.apply(this,arguments),n?(o.pCtx("gnt"),o.Add("oh",this.oGC.getOverviewHeight()),o.Add("hh",this.oGC.getHistogramHeight()),o.Add("sd",function(){var t="";return this.GetSelectDates().forEach(function(e){t+=(t?",":"")+e.start.toFormat()+"-"+e.end.toFormat()}),t}.call(this.oGC)),o.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,e){o.pCtx("gV"+e),i=t.getCur(),o.Add("fvd",i.ofV.d.toFormat()),o.Add("fvo",i.ofV.o),o.Add("us",i.uS),o.Add("uw",i.uW),o.rCtx()}),o.rCtx()):(o.pCtx("gnt"),this.oGC.SetOverviewHeight(o.GetValue("oh")),this.oGC.SetHistogramHeight(o.GetValue("hh")),function(t){var o,i=[];e(t)&&t.split(",").forEach(function(t){t&&(o=t.indexOf("-"),i.push({start:Date.Create(t.substr(0,o)),end:Date.Create(t.substr(o+1))}))}),this.SetSelectDates(i)}.call(this.oGC,o.GetValue("sd")),function(t){var o,i=[],n=this.oT;e(t)&&y.B.split(t).forEach(function(t){(o=n.ItemBar(~~t.caption,t.subText))&&i.push(o)},this),this.SetSelection(i)}.call(this.oGC,o.GetValue("sb")),this.feGV(function(t,e){o.pCtx("gV"+e),t.setCur({ofV:{d:Date.Create(o.GetValue("fvd")),o:o.GetValue("fvo")},uS:o.GetValue("us"),uW:o.GetValue("uw")}),o.rCtx()}),o.rCtx()),n||(this.eU(),--this.lES,this.oLts.unlock())}}(t.prototype.onlayout),t.prototype.GetStatistics=function(t){return function(){function e(t,e){return y.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(),c=n.oGL.GetCount(),l=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(l)+"/"+e(c),o+="\nChart.Sel: "+e(n.getSelCount())}}(t.prototype.GetStatistics),y.expO({statistics:null},t.prototype,null,!0),t.prototype.xmlL=function(t){return function(e){if(e){var o=y.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=y.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=y.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 o(t){return r.call(this,"Def."+t)}var i=y.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N,h=i.v2C,a=this.oGC.oGB;t&&n.call(t,function(t){function i(t,o){e(o)&&(f[t]=o)}function n(t,o){e(o)&&(p[t]=o)}var u,c=r.call(t,"Name"),l=a.Item(c),p={},f={};e(c)&&(i("caption",o.call(t,"Caption")),i("hAlignCaption",s(o.call(t,"HAlignCaption"))),i("vAlignCaption",s(o.call(t,"VAlignCaption"))),i("captionHOffset",s(o.call(t,"BarCaptionHOffset"))),i("captionVOffset",s(o.call(t,"BarCaptionVOffset"))),i("showCaption",s(o.call(t,"BarShowCaption"))),i("toolTip",o.call(t,"ToolTip")),i("canResize",s(o.call(t,"CanResize"))),i("canMove",s(o.call(t,"CanMove"))),i("canMoveToAnother",s(o.call(t,"CanMoveToAnother"))),i("selectable",s(o.call(t,"Selectable"))),i("canStartLink",s(o.call(t,"CanStartLink"))),i("canEndLink",s(o.call(t,"CanEndLink"))),i("canBeLinked",s(o.call(t,"CanBeLinked"))),i("extraCaption",o.call(t,"Extra")),i("extraCaptionHAlign",s(o.call(t,"ExtraHAlign"))),i("extraCaptionVAlign",s(o.call(t,"ExtraVAlign"))),i("extraCaptionHOffset",s(o.call(t,"ExtraHOffset"))),i("extraCaptionVOffset",s(o.call(t,"ExtraVOffset"))),i("showExtraCaption",s(o.call(t,"BarShowExtraCaption"))),n("def",f),n("overlaidType",r.call(t,"OverlaidType")),n("overlaidGroup",r.call(t,"OverlaidGroup")),l?l.SetOptions(p):a.Add(y.Mrg({name:c,shape:e(u=s(r.call(t,"Pattern")))&&{pattern:15&s(u,1),patternColor:h(r.call(t,"Color"),"gray"),frameColor:h(r.call(t,"Color"),"black")}||null},p)))},this,"Bar")},t.prototype.xmlLS=function(t){var e,o,i=y.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=u.get(t);return!e&&u.set(t,e=v.cRut.c2A(t).reduce(function(t,e){return t|e})||0),e}function o(t){var e=new Map;return y.B.split(w(t)).forEach(function(t){e.set(t.caption,t.subText)}),e}var i=y.Tree.XML,n=i.feU,r=i.vOf,s=i.v2N,h=this.oGC,a=h.oGL,u=new Map,c=h.getLink(),l=o("00(ML),02(ML),20(MR),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),p=o("00(ML),02(TR,MR,BR),20(TL,ML,BL),22(MR),0(TL,ML,BL),1(TC,BC),2(TR,MR,BR)"),f=e(c.startPos),g=e(c.endPos);t&&n.call(t,function(t){a.Add({key:r.call(t,"Key"),from:this.ItemBar(s(r.call(t,"StartItem"),-1),r.call(t,"StartBar")),to:this.ItemBar(s(r.call(t,"EndItem"),-1),r.call(t,"EndBar")),visible:s(r.call(t,"Visible")),caption:r.call(t,"Text"),lag:r.call(t,"PDMDelay"),workingLag:r.call(t,"PDMWorkingDelay"),link:function(t){var o=(r.call(t,"StartPos")||"").trim(),i=(r.call(t,"EndPos")||"").trim(),n=l.get(o+i)||l.get(o),s=p.get(o+i)||p.get(i);return!((e(n)&f)==f&&(e(s)&g)==g)&&{startPos:n,endPos:s}||null}(t)})},this,"Link")},t.prototype.objL=function(t){return function(o){var i=t.apply(this,arguments);return G(o)&&function(t){var o=this.oGC.oGL;e(t)&&u(t).forEach(function(t){o.Add(t)},this)}.call(this,o.links),i}}(t.prototype.objL),t.prototype.objLI=(t.prototype.objLI,function(t,o){o&&e(o.bars)&&u(o.bars).forEach(function(e){t.AddBar(e)},this)}),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 y.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){function r(){setTimeout(function(){var t=o.value.substr(o.selectionStart,o.selectionEnd-o.selectionStart);t!=o.__oldS&&n.onesC(o.__oldS=t,e,o)})}o.__oniE=r,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,i,n){var r,s,h=this.oTV.back("psLinkEditSel"),a=this.oTV.back("psBarShapeEditSel");(h||a)&&(!(r=i.v2B())||270!=r.i&&271!=r.i||(s=r.g&&i.oI.ItemBar(r.k))&&function(){var i,n,r,u=this.oIOL;u&&(i=this.oGC.oT.oI,this.bU(),e(t)&&(void 0===this.__mTLA&&(this.__mTLA=this.mTLA||null),void 0===i.__mTBS&&(i.__mTBS=i.mTBS||null)),s&&t&&t.split(C).forEach(function(t){var e,o=this.split(t);o&&(e=1==o.t?u.mIO.get(s).out.get(o.b):u.mIO.get(o.b).out.get(s))&&(h&&(n=n||y.CpM(this.__mTLA)||new Map).set(e,h),a&&(r=r||y.CpM(i.__mTBS)||new Map).set(o.b,a))},this),o(t)?(this.mTLA=this.__mTLA,i.mTBS=i.__mTBS,i.__mTBS=this.__mTLA=void 0):(this.mTLA=n||this.__mTLA,i.mTBS=r||i.__mTBS),this.eU())}.call(this.oGC.oGL))},y.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=[y.ROf(r),i[1],i[2]-n,i[3]],h=y.Tree.TV.prototype.drawCS,a=y.Gantt.GV.prototype.drawB;y.Tree.TV.prototype.drawCS=function(){},e.call(this,o,r),y.Tree.TV.prototype.drawCS=h,t.DefCBCap&&(y.Gantt.GV.prototype.drawB=function(e,o,i){a.apply(this,arguments),!i.getCaption()&&this.drawC(e,o,i,g.Get(t.DefCBCap),33,1)},this.oTV.drawI2.call(this.oGV,o,s,this.getSel().first()),y.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),y.CW.prototype.SetCanvas=function(t,e){return y.ComboBox.implExHost(t,"onselchange,onchange,onscroll,ondatechange")}(y.CW.prototype.SetCanvas)),t.prototype.addGV=function(t,e){function i(e){return e.repAll("name",t)}var n=null;if(!o(t)&&t.trim().length||(t="gantt"+this.rgGV.length),!this.oCW.W(t)){var r,h,a,u=(this.oCW.W("main")||this.oCW).Add(t,y.Mrg({Dock:4,Size:this.oGC.opt("paneWidthRight",320)},e)),c=this.oCW.W("filter");n=new y.Gantt.GV(this),this.rgGV.push(n),this.oGV=this.oGV||n,!(u.GetDock()%2)&&u.SetPosition(this.oCW.W("tree").GetPosition()+1),u.Add("client",{Dock:5,HoverExtends:i("control,top,bottom,main.header,main.footer,vertical,vscroll,grip,name,name.header,name.hscroll"),Extends:i("name.hscroll,vertical"),HScroll:i("name.hscroll"),VScroll:"vscroll",Control:n}),(r=u.Add("header",{Dock:1,Resizable:!1,HScroll:i("name.hscroll"),Extends:"vertical",Control:n.oHB,VisibleExtends:n==this.oGV?null:"gantt.header"})).GetVisible=n.getHeaderVisible.bind(n),this.aSizeW(r),(h=u.Add("hscroll",{Dock:2,Resizable:!1,Size:16,VisibleExtends:i("name.client"),Opacity:0,HoverOpacity:1,Control:new y.ScrollBar})).GetVisible=n.showSB.bind(n),h.oC.Scroll=n.hsScroll.bind(n),h.oC.smthBy=n.hsSmthBy.bind(n),c&&c.SetExtends(c.GetExtends()+","+u.GetShortName()),this.oGV==n&&(this.oTV.oFB.onZ=function(t){return function(e){t.call(this,e);var o,i,n,r,h=e.get(this.oW),a=this.oTV.oHL.oW,u=this.oTV.oW;h&&e.forEach(function(t,c){c&&s(o=c.oC)&&!y.EyR(y.NRt(e.get(c.opW),h))&&c.GetDock()==u.GetDock()&&a.GetDock()==o.oHG.oW.GetDock()&&((i=e.get(u))&&(t[1]=i[1],t[3]=i[3]),(n=e.get(a))&&(r=e.get(o.oHG.oW))&&(r[1]=n[1],r[3]=n[3]))},this)}}(this.oTV.oFB.onZ)),(a=u.Add("histogram",{Dock:2,SizeExtends:"tree.histogram",Extends:"vertical",HScroll:i("name.hscroll"),Control:n.oHG})).GetVisible=n.oHG.showH.bind(n.oHG),this.aSizeW(a),a.setClient=function(t){return function(e){return(e=this.v2WC(e))&&this.GetC().sHH(e),t.apply(this,arguments)}}(a.setClient),this.oGV!=n&&setTimeout(function(){n.oLvs.setSR(n.oLvs.getSR()),n.onDC()})}return n},t.prototype.AddGanttView=function(t,e){this.bU();var o=this.addGV(t,e);return this.eU(),o},t.prototype.delGV=function(t){!o(t)&&t.trim().length||(t=this.rgGV[this.rgGV.length-1].oW.opW.GetName());var e=!1,i=this.oCW.W(t);if(i){var n,r,h=null,a=this.oCW.W(i.GetName()+".client");a&&s(h=a.GetC())&&h!=this.oGV&&(e=(n=this.rgGV.indexOf(h))>=0)&&((r=this.oCW.W("filter"))&&r.SetExtends(r.GetExtends().replace(","+i.GetShortName(),"")),this.rgGV.splice(n,1),this.oCW.Remove(i))}return e},t.prototype.RemoveGanttView=function(t){this.bU(),this.delGV(t),this.eU()},t.prototype.feGV=function(t,e){y.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 y.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(){this.oGIB.all(e).forEach(function(t){this.resOI(t.i())},this),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 y.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.hasIB=function(t){return h(t)&&t.t()==this&&t||null},t.prototype.Bar=function(t,e){return this.oGC.Bar(t,e)},t.prototype.PutRes=function(e,o){o=c(o,y.Gantt.PutResEnum,1),e instanceof t&&(1==o||2==o)&&t.CR[1==o?"load":"save"].call(e,this)},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()},y.expO({Chart:null},t.prototype),{Gantt:t}}()),y.Mrg(y.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,resources:null,resourceFormat:null},LinkOptions:{visible:!0,key:null,caption:null,from:null,to:null,lag:null,workingLag:null,link:null,type:null}}),y.Tree.Options.debug=null,y.Tree.Options.chart=y.Gantt.ChartOptions,y.Tree.ConditionalFormatOptions.applyToBars=null,y.Tree.ConditionalFormatOptions.barShape=null,y.Tree.ConditionalFormats.prototype.resCF=function(t){return function(){return this.resBF(),t.apply(this,arguments)}}(y.Tree.ConditionalFormats.prototype.resCF),y.Tree.ConditionalFormats.prototype.resBF=function(){this.mBF=null},y.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=y.Inh(t.getBarShape(),i||{}))}),i},y.Mrg(y.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=y.S.A2S(t),this.eU()},getBarShape:function(){return this.dTV().toShape(this.GetBarShape())}}),y.expO({ApplyToBars:null,BarShape:null},y.Tree.ConditionalFormat.prototype),y.Mrg(y.Gantt,function(){function t(t){this.init(t)}function r(t){this.init(t)}var s=y.Gantt.ChartOptions;return t.prototype.init=function(t){this.oT=t,this.oO=y.Cpy(s),this.mLb=new Map,this.mTt=new Map,this.lSyl=0,this.lSyv=0,this.rgSel=null,this.oNW=new y.Gantt.NW(this),this.oLvs=new y.Gantt.Levels(this),this.oAL=new y.Gantt.AL(this.oLvs),this.oGB=new y.Gantt.Bars(this),this.oGL=new y.Gantt.Links(this),this.oSD=new y.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.oT.oGIB.onDelBar(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,o){var i=!1;if(e(t)){var n=[],r=this.GetOptions();if(e(r)){for(var s in r){var h=t[s];void 0!==h&&(n.push(s),r[s]!==h&&(r[s]=y.CpV(h)))}if(o)for(var s in t)s in r||(r[s]=y.CpV(t[s]));(i=0!=n.length)&&(this.bU(),n.forEach(function(t){var e=y.setM(t);e in this&&this[e].call(this,r[t])},this),this.eU())}}return i},t.prototype.opt=function(t,e){var i=this.oO[t];return o(i)&&o(i=s[t])&&(i=e),i},t.prototype.pane=function(t){return this.oT[t?"oGV":"oTV"]},t.prototype.GetPaneWidth=function(t){return y.C2R(this.pane(t).oW.opW.GetClientRect())[2]},t.prototype.SetPaneWidth=function(t,o){if(e(o)){var i=this.pane(t).oW;i&&i.opW&&(this.bU(),i.opW.IsDockable()||(o=this.GetPaneWidth(!1)+this.GetPaneWidth(!0)-o,i=this.pane(!t).oW),i.opW.SetSize(o),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=b(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 o,i;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)e(t[n])&&(i=w(t[n]))&&e(o=y.UnitEnum["ex"+y.getP(n)])&&this.mLb.set(o,i);this.onLb(),this.eU()},t.prototype.GetLabel=function(t){return this.mLb.get(t)},t.prototype.SetLabel=function(t,o){this.bU(),this.mLb.delete(t),e(o)&&this.mLb.set(t,w(o)),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=T(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 o,i;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)e(t[n])&&(i=w(t[n]))&&null!=(o=y.UnitEnum["ex"+y.getP(n)])&&this.mTt.set(o,i);this.onTt(),this.eU()},t.prototype.GetToolTip=function(t){return this.mTt.get(t)},t.prototype.SetToolTip=function(t,o){this.bU(),this.mTt.delete(t),e(o)&&this.mTt.set(t,w(o)),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(c(t,y.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 y.Loc.Push(this.getLocale()),t&&(o=t.call(e||this)),y.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 c(this.GetDrawLevelSeparator(),y.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 o(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,e){return this.oGB.Item(t,e)},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 T(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(c(t,y.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 w(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 L(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 b(0,L(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 y.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 c(this.GetShowLinks(),y.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=y.L.aPP(this.GetLink())||B),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=y.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=y.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=y.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 c(this.GetOverviewVisible(),y.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 L(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 w(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 w(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 b(0,L(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()&&(o(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 L(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 c(this.GetHistogramView(),y.Gantt.HistogramViewEnum,1)},t.prototype.hV=function(t){return o(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:T(this.GetHistogramUnitScale(),t.s),c:b(1,T(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 w(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 y.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 o(t)&&(o(t=this.GetSingleSel())&&(t=s.singleSel),t=T(t,y.Tree.SingleSelEnum.exEnableSel),this.n1S=t),t},t.prototype.GetSelection=function(){return n(this.rgSel)?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=y.Arr.empty;return this.rgSel&&(t=n(this.rgSel)?this.rgSel:new y.Arr(this.rgSel)),t},t.prototype.isSelected=function(t){return n(this.rgSel)?this.rgSel.has(t):this.rgSel==t},t.prototype.isSable=function(t){return h(t)&&t.isSelectable()},t.prototype.getSelCount=function(){var t=0;return this.rgSel&&(t++,n(this.rgSel)&&(t=this.rgSel.len())),t},t.prototype.removeSel=function(t){this.rgSel&&this.isSelected(t)&&(n(this.rgSel)?(this.rgSel.remove(t),this.rgSel.len()||(this.rgSel=null)):this.rgSel=null)},t.prototype.allowSelect=function(){return this.getSingleSel()!=y.Tree.SingleSelEnum.exDisableSel},t.prototype.isSingleSel=function(){return this.getSingleSel()&y.Tree.SingleSelEnum.exSingleSel},t.prototype.isToggleSel=function(){return this.getSingleSel()&y.Tree.SingleSelEnum.exToggleSel},t.prototype.isToggleCtrlSel=function(){return 0==(this.getSingleSel()&y.Tree.SingleSelEnum.exDisableCtrlSel)},t.prototype.isShiftSel=function(){return 0==(this.getSingleSel()&y.Tree.SingleSelEnum.exDisableShiftSel)},t.prototype.allowSelectByDrag=function(){return 0==(this.getSingleSel()&y.Tree.SingleSelEnum.exDisableDrag)},t.prototype.select=function(t,r){function s(t){var i=!1,n=this.isSelected(t),r=this.isSable(t);if(o(t))i=e(this.rgSel),this.rgSel=null;else if(this.isSingleSel()){var s=this.rgSel;this.rgSel=!r||l&&n?null:t,i=s!=this.rgSel}else if(c&&this.rgSel&&this.rgSel.len()){var h=this.getLIV(),a=h.rgVI.indexOf(this.rgSel.last()),u=h.rgVI.indexOf(t);if(a>=0&&u>=0)for(var p=U(u,a),f=b(u,a);p<=f;p++){var g=h.rgVI.at(p);!this.rgSel.has(g)&&g.isSelectable()&&(i=!0,this.rgSel.push(g))}}else l&&n?(i=n,this.removeSel(t)):(l||(i=e(this.rgSel)&&(!n||this.rgSel.len()>1),this.rgSel=null),r&&(this.rgSel=this.rgSel||new y.Arr).push(t)),i|=n!=this.isSelected(t);return i}var u=!1,c=1==(r=r||{}).selType,l=2&r.selType,p=function(t){function o(t){return(a(t)?s.has(t)&&t.oIB:h(t)&&s.has(t.i())&&t)||null}var r=null;if(e(t)){r=new y.Arr;var s=this.oT.oI;t==s&&(t=s.rgI),i(t)||n(t)?t.forEach(function(t){r.pushnn(o.call(this,t))},this):r.pushnn(o.call(this,t)),r.len()?1==r.len()&&(r=r.at(0)):r=null}return r}.call(this,t);return n(p)?c?u|=s.call(this,p.last()):l?p.forEach(function(t){u|=s.call(this,t)},this):(u=!p.equal(this.rgSel))&&(this.isSingleSel()?s.call(this,p.last()):(this.rgSel=new y.Arr,p.forEach(function(t){t.isSelectable()&&this.rgSel.push(t)},this))):u=s.call(this,p),u&&(n(this.rgSel)&&(this.rgSel.len()||(this.rgSel=null)),(o(r.selChange)||r.selChange)&&(this.feGV("invAO"),this.onSel())),u},t.prototype.onSel=function(){this.oT.invHG(8),this.oT.onchartselchange(this.GetSelection())},t.prototype.eyB=function(){return 0},r.prototype.init=function(t){this.oT=t,this.oLts=t.oLts,this.lI=0,this.lsX=0,this.oLvs=t.oGV?new y.Gantt.Levels(t.oGC).copy(t.oGC.oLvs):t.oGC.oLvs,this.oHB=new r.Header(this),this.oHG=new r.HG(this),this.import(),this.oLvs.setGV(this)},y.SB.addProto(r.prototype),r.prototype.SetClientRect=function(t){},r.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)},r.prototype.setTimeout=function(){return y.setTimeout.apply(this,arguments)},r.prototype.dTV=function(){return this.oT.oTV},r.prototype.getHeaderVisible=function(){return this.dTV().getHeaderVisible()},r.prototype.gC=function(){return this.oT.oGC},r.prototype.showSB=function(){return this.gC().getScrollBar()},r.prototype.toPointer=function(t){return y.pS2T(this.gPtr(t),t.target,this.GetCanvas())},r.prototype.GetPageSize=function(){var t=this.oW.GetClientRect();return t&&[this.scaled(t[2]),this.scaled(t[3])]||[0,0]},r.prototype.origin=function(t){return t=t||this.dTV().GetScroll(),[0,-t.y]},r.prototype.GetScrollRect=function(){var t=this.origin(),e=this.GetPageSize();return[-t[0],-t[1],e[0],e[1]]},r.prototype.GetCanvasRect=function(){var t=this.GetClientRect(),e=this.GetCanvas();return e&&(t=[0,0,e.width,e.height]),t},r.prototype.GetVisibleRect=function(){return y.NRt(this.GetClientRect(),this.GetCanvasRect())},r.prototype.GetViewRect=function(t){var e=y.EArtC((t||this.gCW()).GetCanvas());return y.ORt(this.GetClientRect(),e[0],e[1])},r.prototype.c2V=function(t,e){var i=this.GetViewRect();return o(e)&&(e=v.Y(t),t=v.X(t)),{x:t+i[0],y:e+i[1]}},r.prototype.v2C=function(t,e){var i=this.GetViewRect();return o(e)&&(e=v.Y(t),t=v.X(t)),{x:t-i[0],y:e-i[1]}},r.prototype.c2Vrt=function(t){var e=this.c2V(t);return[e.x,e.y,t[2],t[3]]},r.prototype.v2Crt=function(t){var e=this.v2C(t);return[e.x,e.y,t[2],t[3]]},r.prototype.bU=function(){this.lI++},r.prototype.eU=function(){--this.lI||this.invAO()},r.prototype.wAO=function(){return this._wAO},r.prototype.isClkAble=function(){return this.isSelectable()&&!this.isReadOnly()},r.prototype.htAO=y.Tree.TV.prototype.htAO,r.prototype.onSetAO=y.Tree.TV.prototype.onSetAO,r.prototype.onExtAO=function(t,e){},r.prototype.locale=function(t,e){return this.gC().locale(t,e||this)},r.prototype.ctxLoc=function(t,e,o){var i;return this.locale(function(){i=this.ctxTfi(t,e||this,o)},this),i},r.prototype.onpaint=function(t){!this.lI&&this.locale(function(){y.SB.prototype.onpaint.call(this,t)},this)},r.prototype.pLL=function(t,o){var i,n=this.getGridLines();n&&(e(n.width)&&(t.lineWidth=n.width),e(n.color)&&(t.strokeStyle=n.color),-1==o?i=y.IsA(n.style)?n.style:[n.style]:o&y.Gantt.LevelLineEnum.exLevelDotLine&&(i=[1]),i&&t.setLineDash(i))},r.prototype.onsize=function(t){this.resVI(),this.oLvs.onsize(t),this.updSPR(),y.RUR.Rng()&&!this.cR2&&y.RUR.Listeners.Add("erur",this.cR2=function(){y.RUR.Listeners.remove("erur",this.cR2),this.onChartResize(),this.cR2=null}.bind(this))},r.prototype.onChartResize=function(){this.dTV().onChange("resize-chart",this)},r.prototype.onZoom=function(){this.resVI(),this.oLvs.onZoom(),this.updSPR()},r.prototype.onDC=function(){this.resNWI(),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)},r.prototype.onSR=function(){this.updSPR()},r.prototype.getHSI=function(){return this.oW.GetSI(!0)},r.prototype.setHSI=function(t){this.oW.SetSI(t)},r.prototype.HS=function(){return this.oW.GetHS()},r.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())}},r.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},r.prototype.scroll=function(t){!this.lsX++&&this.hsChange(function(o){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=y.Cpy(t.ofV||n.getFV()),h=e(t.nSP);h&&r&&(t.dx=U(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,c=a<0?-1:1,l=Math.abs(a),p=0;p0&&(u-=n.wOf(n.getFVD())),n.setFVD(n.next(n.getFVD(),c)),c<0&&(u+=n.wOf(n.getFVD()));e(t.nSP)&&(i=t.nSP+u)}}else"date"in t&&n.scrollTo(t.date,t.align);e(i)&&(this.setHSI({pos:i}),!r&&i!=this.getHSI().pos&&o.onchange()),this.eU()}),--this.lsX},r.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 y.SB.prototype.Scroll.call(s,t,e)})},r.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)}),y.SB.prototype.smthBy.call(n.HS(),t,e,o,i)},r.prototype.onhscroll=function(t){this.oLvs.isSR()&&this.scroll({x:t}),this.oT.invHL(),this.oT.oOV.gV()==this&&this.oT.invOV()},r.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()},r.prototype.getCur=function(){return this.oLvs.getCur()},r.prototype.setCur=function(t){this.oLvs.isDiff(t)&&(this.cwbU(),this.oLvs.setCur(t),this.cweU())},r.prototype.onLL=function(){this.resVB(),this.resNWO(),this.resSDO(),this.oHB.resHVO()},r.prototype.wLL=function(){return this._wLL||(this._wLL=[this,this.oHB,this.oHG])},r.prototype.cltW=function(){var t=0;return this.wLL().forEach(function(e){t=b(t,e.oW&&e.GetPageSize()[0]||0)}),t},r.prototype.resNWO=function(){this.rgNWO=null},r.prototype.getNWO=function(){return this.rgNWO=this.rgNWO||this.oLvs.NWL().VO(0,this.GetPageSize()[1])},r.prototype.resNWI=function(){this.oNWI=null},r.prototype.getNWI=function(){return this.oNWI=this.oNWI||new y.Gantt.NWI(this)},r.prototype.resSDO=function(){this.rgSDO=null},r.prototype.getSDO=function(){return this.rgSDO=this.rgSDO||this.oLvs.SDL().VO(0,this.GetPageSize()[1])},r.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)},r.prototype.cSR=function(t,e,o,i){var n,r,s=this.oLvs.isSR();s&&(n=this.unscaled(s.u.w))=e[0]&&(i=y.ROf(e))>=t[0])return[n=b(t[0],e[0]),t[1],U(o,i)-n,t[3]]}(e,this.rtVI)),n&=31,32&r&&(e=function(t,e){var o,i,n;if(t&&e&&(o=y.BOf(t))>=e[1]&&(i=y.BOf(e))>=t[1])return[t[0],n=b(t[1],e[1]),t[2],U(o,i)-n]}(e,this.rtVI)),r&=31),e){var s=this.oLvs.getmUW(),h=function(t){var o,i=e.slice(),h=t.width,a=t.height,u=240&n&&1!=(15&n),c=240&r&&1!=(15&r),l=!1;switch(n&=15,r&=15,n-12){case 0:case 2:i[2]0&&(v=U(m,d))}(e.force=v)&&(e.cbkR=function(t){return function(e){t&&t.apply(this,arguments),u.scroll({dx:v*e,ofV:p,nSP:f})}}(e.cbkR)),(e.allowScroll||e.force)&&n.EnsureVisibleClient.call(this,y.C2R(i),e)}}},r.prototype.toEVC=function(t,e){var o,i,n,r=new y.Arr;return t&&t.forEach(function(t){h(t)&&(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},r.prototype.EnsureVisibleSelection=function(t){t=t||{},this.EnsureVisibleClient(this.toEVC(t.selection||this.getSel().byO(),t.expandParents),{duration:t.duration})},r.prototype.ondown=function(t){return this.dTV().ondown(t)},r.prototype.dowheel=function(t){var e=this.isSelectable();return e&&this.scroll({step:-y.WhelInc(t),nSP:this.getHSI().pos}),e},r.prototype.onwheel=function(t){var e=this.gPtr(t);return e&&y.PInR(v.X(e),v.Y(e),this.GetClientRect())&&(y.ModK(t)||this.oW&&this.oW.vSBs()[0]==this.oW.oHS)&&this.dowheel(t)},r.prototype.p2X=function(t){var e=this.GetClientRect(),o=v.X(t)-e[0];return this.scaled(o)},r.prototype.x2P=function(t){var e=this.GetClientRect();return t=this.unscaled(t),t+=e[0]},r.prototype.y2P=function(t,e){return this.getItemsRect(e)[1]+this.unscaled(t)},r.prototype.p2UL=function(t,e){var o=this.p2X(t),i=this.oLvs.x2UL(o);return i&&(2&e&&(i.c=l(i,o)),8&e&&(i.r=this.oLvs.d2R(l(i,o),i.s))),i},r.prototype.p2D=function(t){return this.p2UL(t,8).r},r.prototype.d2UL=function(t){return this.oLvs.d2UL(t)},r.prototype.d2X=function(t){return this.oLvs.d2X(t)},r.prototype.fSR=function(){var t,e,o,i=this.oLvs;(t=i.isSR())&&t.u.rgU.length&&t.u.w<(e=this.cltW())&&(this.cwbU(),o=i.nUWo,i.setUW(b(i.getUW(),e/t.u.rgU.length)),i.nUWo=o,this.cweU())},r.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)},r.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)}},r.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())S?1:0}function h(t,e){return!s(t-e)}function a(){return g.d2X(t)+n-g.d2X(i)-o}function u(t,e){f.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),f.Count(i,o)}r=r||{};var c,l,p,f,g,v,d,S=.5,m=this.oLvs,C=!0,L=!!r.cUS,T=!!r.aMP,w=T;if(p=t>i){var G=t;t=i,i=G,G=o,o=n,n=G}if(g=new y.Gantt.SLevels(this),s(c=a()))for(l=c>0,L&&(f=new y.Gantt.SLevels(this),v=new y.Arr(m.visZTo())),d=new y.Arr;C;){C=!1,y.bfn(g.getUW(),b(g.getmUW(),g.getUW()+c),function(t){return g.setUW(t),s(a())},null,S/10);var O,B,V=!L;if(L&&((C=l?!(V=!e(O=this.nZT(v,g.getUS())))&&g.getUW()>=u(i,O)*g.getmUW()&&(B=g.getmUW()):e(O=this.nZT(v,g.getUS(),!0))&&h(g.getUW(),g.getmUW())&&(B=g.getMUW()))?(g.setUS(O),g.setUW(B),c=a(),d.clear()):C=!l&&!h(g.getUW(),g.getmUW())&&s(c=a())),V&&g.setUW(U(g.getUW(),g.getMUW())),C){var E=~~(100*g.getUW())/100;(C=!d.has(E))&&d.add(E)}}if(T||m.getUS()!=g.getUS()||!h(m.getUW(),g.getUW())){this.cwbU(),m.oGC.lSyl++,m.setUS(g.getUS()),m.setUW(g.getUW());var I=(T&=h(g.getUW(),p?l?g.getmUW():g.getMUW():l?g.getMUW():g.getmUW()))?i:t,x=m.reset(I),R=(I-x)/(m.next(x)-x)*m.getUW();w||T||l||!p||(R-=c),m.setFV({d:I,o:(T?n:o)-R}),m.oGC.lSyl--,this.cweU()}},r.prototype.nZT=function(t,i,n){var r=n?t.prev:t.next;if(i=r.call(t,i),n&&e(i)){for(var s=i,h=1,a=this.oLvs.len();e(s)&&h0){for(;a&=e(s=this.nZT(l,r.getUS()));){if(o(h)){c.setUS(s);n(v=r.reset(u),r)&&(v=r.oNW.nextNWU(r.showNWM(),v)),d=r.next(v),h=c.Count(v,d)}(a=r.getUW()>=h*i.mUW)&&(r.setUS(s),r.setUW(r.getUW()/h),h=null)}o(s)&&r.setUW(b(i.mUW,U(i.MUW,r.getUW())))}else{for(var p=i.uW,f=t,g=0;a&=e(s=this.nZT(l,r.getUS(),!0));)if(r.setUW(b(i.mUW,r.getUW()+g)),a=r.getUW()<=i.mUW){if(o(h)){c.setUS(s);var v=c.reset(u),d=c.next(v);c.setUS(r.getUS()),h=c.Count(v,d)}r.setUS(s),r.setUW(i.mUW*h),g=f=p+f-i.mUW,p=r.getUW(),h=null}o(s)&&r.setUW(b(i.mUW,r.getUW()+g))}!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()},r.mRurFrm=y.BiM.Split("select,chart-select,chart-fit,chart-create,chart-link"),r.prototype.onRurDragS=function(t,e){var o=this;return t=t||{},r.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},r.prototype.onRurDragD=function(t,e){if(e.from.oUL){var i=this.getRUR();if(e.to.oUL=this.p2UL(this.toPointer(e.event),14),r.mRurFrm.has(t.rurName)){var n=this.x2P(this.d2X(e.from.oUL.c)),s=this.x2P(this.d2X(e.to.oUL.c));e.frame[0]=U(n,s),e.frame[2]=Math.abs(s-n)}i&&o(i.rSDx)&&(i.rSDx=0)}},r.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=y.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)},r.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,c=i.getSel(),l=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(v.Rect(t.from,t.to)),{selChange:!1})&&((i.isToggleSel()||i.isToggleCtrlSel()&&2&y.ModK(t.event))&&(i.rgSel=new y.Arr(c).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&y.ModK(t.event))&&(n.rgSel=new y.Arr(l).toggle(n.rgSel)).isEmpty()&&(n.rgSel=null),i.feGV("invAO"),n.onSel())}(t))},e.rurCancel=function(t){h&&i.SetSelection(c),a&&n.SetSelection(l)},r.rurDrag(t,e)}},r.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=y.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(y.ROf(o))-i,this.y2P(y.BOf(o),e)-n]}.call(this)),o},r.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(y.ROf(o))-i,this.y2P(y.BOf(o),e)-n]}.call(this),o},r.prototype.dNearD=function(t,e,o){return Math.abs(this.d2X(t)-this.d2X(e))<(o||y.Def.HT.inflate[0])},r.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},r.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>=y.TOf(o)&&t0)&&!(y.BOf(e=i.ib2R(t,3))c)&&o.push(t)})}),o},r.prototype.p2Abs=function(t,e){e=e||this.getItemsRect();return{x:this.scaled(v.X(t)-(e[0]+0)),y:this.scaled(v.Y(t)-e[1])}},r.prototype.p2IB=function(t){return this.p2IBl(t,{lz:0})},r.prototype.p2IBl=function(t,e){e=e||{};var o=this.p2TB(t);if(T(e.lz,o)==o){var i,n=this.getVBl(o),r=this.p2Abs(t,this.getItemsRect(o)),s=e.cbk||function(t){return t},h=e.thisArg||this,a=e.inf||[0,0];return n.rforEachU(function(t,e){return(i=e.getShape())&&i.client&&(t=y.E.EvalCE(t,i.client)),y.PInR(r.x,r.y,t,a[0],a[1])&&s.call(h,e,t,r)})}},r.prototype.p2IBR=function(t){return this.p2IBRl(t,{lz:0})},r.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=y.HitTest.Rect(n.x,n.y,e,o);return(1&s&&1&r||4&s&&2&r)&&(i={ib:t,ht:5&s}),y.PInR(n.x,n.y,e)}}),i}var i,n=y.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},r.prototype.p2IBP=function(t){return this.p2IBPl(t,{lz:0})},r.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.grP();return e=t.rt4P(e),s&&s.p2x&&(n=s.p2x(t.getPercent(),e[2])+e[0])>=(r=v.X(o))-(i=y.Def.HT.inflate[0])&&n0||n.e.Compare(u)<0||!(i=this.rtI2IB(o,t))||(y.ORt(i,0,o.getOffset()),(i=y.NRt(i,r))&&(h.set(o,i),p&&e.push(o)))},this),p&&l.O(e).forEach(function(t,e){y.ORt(h.get(e),0,t)}),s&&(o=s.get(i))&&o.forEach(function(t,e){var o=h.get(e);o&&y.ORt(o,0,t)}))},this),h},r.prototype.getVB=function(){return this.rgVB||(this.rgVB=this.vbOf(this.getVI()))},r.prototype.getVBT=function(){return this.rgVBT||(this.rgVBT=this.vbOf(this.getVIT()))},r.prototype.getVBB=function(){return this.rgVBB||(this.rgVBB=this.vbOf(this.getVIB()))},r.prototype.getVBl=function(t){return t?t<0?this.getVBT():this.getVBB():this.getVB()},r.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 y.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))&&y.NRt(s,y.URt(e,o))&&n.set(i,{s:e,e:o})},this),n}.call(this))},r.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)},r.prototype.hideTT=function(){y.TT.Hide()},r.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2IBl(o,{inf:y.Def.HT.inflate}),n=16;y.TT.Show(function(){return i&&(e=i.tt(this))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=y.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})},r.prototype.onio=function(t){this.allowTT()&&this.hideTT(),this.getDrawDateTicker()&&this.hideDTH(event)},r.prototype.getCursor=function(t){var e,o,i=this.getCursors();return(e=this.p2A(t))?o=y.GP.Get("anchor",i):(e=this.p2IBPl(t))?o=y.GP.Get(e.getType("percent-resize"),i):(e=this.p2IBRl(t))?o=y.HitTest.Cursor.Rect(e.ht):(e=this.p2IBMl(t))&&(o=y.GP.Get(e.getType(),i)),o||null},r.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},r.prototype.bRUR=function(t){return(this.gAA().Has("chart-zoom")||this.gAA().Has("chart-resize"))&&this.exZ(t),t.drag.extra},r.prototype.eRUR=function(t){this.getDrawDateTicker()&&this.showDTH(t)},r.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},r.prototype.showDTL=function(t,e){function o(t){return s.ctxLoc(function(e){return t.l.size(t,e,l)})}function i(t){return y.EF.Create({name:t,class:y.Def.CN.ttEF+" exdatelabel",fit:y.pgrt(),relative:p.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,l)},this,t)}})}function n(e,o){e.oDRL={d:o,r:t,l:f.Get(a)}}function r(t,i,n){var r,h,u,l,f,g,d=o(t.oDRL),S=t==s.oDTL.s,m=a&&d.width&&d.height,L=c;m&&(h=y.IBox([0,0,0,0],t.oHE,1,1),u=y.IBox([0,0,0,0],t.oHE,1,2),r=y.IBox([0,0,0,0],t.oHE,1,4),t.GetRelative()!=p.GetCanvas()&&t.SetRelative(p.GetCanvas()),l=s.GetClientRect(),y.IRt(l,2*h[0]+u[0]+r[0]+u[0]-L,0),S?l[2]-=o(s.oDTL.e.oDRL).width+L:(g=o(s.oDTL.s.oDRL).width+L,l[0]+=g,l[2]-=g),f=y.IRt(e.slice(),L,0),f=v.C2R(v.R2C(f,i),~~(d.width+1),d.height,n),y.FRt(f,l),y.NRt(C,y.IRt(f.slice(),-L-1,0))&&(L-=u[1]+r[1],y.ORt(f,0,v.R2C(C)[1]v.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 y.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&&y.PInR(v.X(e),v.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:y.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(){y.TT.Hide()},t.prototype.showTT=function(t){var e,o=this.gPtr(t),i=this.p2UL(o),n=16;y.TT.Show(function(){return i&&(e=this.tt(i))&&{relative:t.target,client:function(){return this.ctxLoc(function(t){var o=y.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=y.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}}()),y.Mrg(y.Gantt,function(){function t(){this.init()}function i(t){this.init(t)}function n(t){this.init(t)}function r(t){this.init(t.oT.oGC,t)}function s(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},i.prototype.Split=function(t,e){var i=this.mC.get(t=w(t));return!i&&this.mC.set(t,i=function(t){var i,n,r={rgL:[]},s=t.split(this.s),h=s.length;return h>0&&s[0].split(this.aS).forEach(function(t){r.rgL.push(i={l:t,u:y.HF.Date.Unit(y.H.GetEF(t)),w:e&&e.sizeHTMLDate(t,this.oLD.Get(e)).width||0}),i.u&&(n=o(n)?i.u:U(n,i.u))},this),r.uL=~~n,r.rgL.sort(function(t,e){return t.w-e.w}),h>1&&(s[1].length&&(r.c=b(1,~~s[1])),h>2&&y.IsN(s[2])&&y.f2S(~~s[2],y.UnitEnum)&&(r.u=~~s[2])),r}.call(this,t)),i},i.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=y.setM(t))in e&&(i=y.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},n.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},n.prototype.getLC=function(){return this.len()},n.prototype.setLC=function(t){(t=b(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])})},n.prototype.getUS=function(){var t=this.u;return o(t)&&(void 0===t?t=this.oGC.opt("unitScale",y.UnitEnum.exDay):(t=0,this.forEach(function(e){t=b(t,e.GetUnit())})),this.u=~~t),t},n.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})},n.prototype.onLb=function(){this.onRL(function(){this.forEach(function(t){t.SetLabel(t.getUnit())})})},n.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)},n.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},n.prototype.hideNWM=function(){return this.oNW.getR().hideNWU&&this.NWM()||0},n.prototype.showNWM=function(){return!this.oNW.getR().hideNWU&&this.NWM()||0},n.prototype.hsNW=function(){return this.hideNWM()?1:this.showNWM()&&this.getUNW()?2:0},n.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},n.prototype.next=function(t,e){function o(t){return u.call(t,a)}var i=t.copy();if(e=T(e,1))for(var n=Math.sign(e),r=this.getBL(),s=this.oNW,h=r.getUnit(),a=n*r.getCount(),u=i.CbkN(h),c=this.hideNWM(),l=this.getUNW()<0&&this.showNWM()||0,p=n>0?function(t,e){s.nextNWU(t,e)}:function(t,e){for(var o,i,n=y.UnitEnum.exDay,r=y.UnitEnum.exHour;t&(i=s.isNWU(e));)i&n?(o=n,e.Reset(n),u.call(e,a)):i&r&&(o=r,e.Reset(r),e.PrevHour());o&&(e.Next(o),u.call(e,a))},f=n*e,g=0;ge&&(r-=Math.sign(r)*e,s=s.copy().Next(this.getUS(),-r),t.o-=r*i)),t.o>0){for(;t.o>(o=this.wOf(s=this.prev(s)));)t.o-=o;t.o-=o}else for(;t.o<=-(o=this.wOf(s));)s=this.next(s),t.o+=o;t.d=s}return this.ioSR(t.d,!0)&&(t.d=this.limSR(t.d),t.o=0),t},n.prototype.onFV=function(t,e){this.olfV.l++||(this.olfV.d=Date.Create(this.fvd)),t instanceof Function?t.call(e||this):("d"in t&&(this.fvd=t.d),"o"in t&&(this.fvo=this.ioSR(Date.Create(this.fvd),!0)?b(t.o,0):t.o)),!--this.olfV.l&&this.olfV.d.Compare(Date.Create(this.fvd))&&this.oGV.onDC()},n.prototype.getFV=function(){return this.ofV||(this.ofV=function(){var t=this.limSR(Date.Create(this.fvd)),e={d:this.reset(t),o:L(this.fvo)},o=0!=e.o;return this.adjFV(e),o&&this.onFV(e),e}.call(this))},n.prototype.setFV=function(t){this.onFV(function(){this.onRL(function(){this.oGV.resNWI(),this.ofV=null,this.onFV({d:Date.Create(t.d),o:t.o})})})},n.prototype.getFVD=function(){return this.getFV().d},n.prototype.setFVD=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({d:t,o:0})})})},n.prototype.getFVO=function(){return this.getFV().o},n.prototype.setFVO=function(t){this.onFV(function(){this.onRL(function(){this.ofV=null,this.onFV({o:t})})})},n.prototype.getCur=function(){return{ofV:this.getFV(),uS:this.getUS(),uW:this.getUW(),uNW:this.getUNW()}},n.prototype.setCur=function(t){this.isDiff(t)&&this.onRL(function(){this.oGC.lSyl++,t.ofV&&this.setFV(t.ofV),e(t.uS)&&this.setUS(t.uS),e(t.uW)&&this.setUW(t.uW),e(t.uNW)&&this.setUNW(t.uNW),--this.oGC.lSyl})},n.prototype.isDiff=function(t){return t&&t.ofV&&(t.ofV.d.Compare(this.getFV().d)||t.ofV.o!=this.getFV().o)||e(t.uS)&&t.uS!=this.getUS()||e(t.uW)&&t.uW!=this.getUW()||e(t.uNW)&&t.uNW!=this.getUNW()},n.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=l/(1+n);if(2==u.hsNW()){for(var s=0,h=0,a=0;a<=n;a++)c.isNWU(i[a].s)?++h:++s;s&&(r=(l-h*Math.abs(f))/s)}return{uS:u.getUS(),uW:r}}}var i;if(l){for(n=v.length-1;!i&&n>=0;n--)i=o(v[n]);if(i&&i.uW>=l){var n;(n=y.bin(v.length,function(t){return i.uS>=v[t]}))+10&&(t=e.l)),t},n.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))},n.prototype.resSR=function(){this.osR&&(this.ofV=null,this.osR.l=null)},n.prototype.getrUS=function(){return this.getrU().s},n.prototype.setrUS=function(t){this.onRL(function(){this.orU=null,this.rus=t,this.synv("setrUS",t)})},n.prototype.getrUC=function(){return this.getrU().c},n.prototype.setrUC=function(t){this.onRL(function(){this.orU=null,this.ruc=t,this.synv("setrUC",t)})},n.prototype.getrU=function(){if(!this.orU){this.orU={s:this.getUS(),c:this.getBL().getCount()},e(this.rus)&&this.rus>this.orU.s&&(this.orU.s=this.rus),e(this.ruc)&&this.orU.s>this.getUS()&&(this.orU.c=b(1,~~this.ruc));var t=Date.Date(0);this.orU.m=t.copy().Next(this.orU.s,this.orU.c)-t}return this.orU},n.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},n.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[y.bin(n.length,function(t){return i>=n[t].t})].x-t.o}return e},n.prototype.p2fv=function(t){var e=y.Cpy(this.getFV()),o=this.isSR();if(o){t=t||0;var i=o.u.rgU,n=i[y.bin(i.length,function(e){return t>=i[e].x})];e.d=new Date(n.t),e.o=n.x-t}return e},n.prototype.LL=function(){return this.oLL||(this.oLL=new y.Gantt.LL(this))},n.prototype.NWL=function(){return this.oNWL||(this.oNWL=new y.Gantt.NWL(this))},n.prototype.SDL=function(){return this.oSDL||(this.oSDL=new y.Gantt.SDL(this))},n.prototype.fitLL=function(t,e,o){return e.x+e.w1){var i=y.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},s.prototype.next=function(t,e){return t=t.copy(),(e=T(e,1))&&t.Next(this.getUnit(),e*this.getCount()),t},s.prototype.index=function(){return this.oLvs.indexOf(this)},s.prototype.GetOptions=function(){return this.oO},s.prototype.SetOptions=function(t){function e(e){if(void 0!==t[e]){var o=y.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()}},s.prototype.GetLabel=function(){return this.oO.label},s.prototype.SetLabel=function(t){var i,n=null,r=null,s=this.oLvs.oGV,h=this.oLvs.oGC.oAL,a=this.oO;this.bU(),this.onRL(function(){e(t)&&(y.IsS(t)?t=w(t):y.IsN(t)?(r=t,o(t=this.oLvs.oGC.mLb.get(t))&&(t=null,r=null)):(e(t.c)&&(n=t.c),e(t.u)&&(r=t.u),e(t.l)&&(t=t.l))),e(t)&&s.ctxTfi(function(o){s.locale(function(){e((i=h.Split(t,o)).uL)&&(r=i.uL),e(i.u)&&(r=i.u),e(i.c)&&(n=i.c)})}),(o(t)||e(r))&&(a.unit=r),(o(t)||e(n))&&(a.count=n),a.label=t,this.synl("label")},this),this.eU()},s.prototype.getLabel=function(){return w(this.GetLabel())},s.prototype.GetUnit=function(){return this.oO.unit},s.prototype.SetUnit=function(t){this.bU(),this.onRL(function(){this.oO.unit=t,this.synl("unit")}),this.eU()},s.prototype.getUnit=function(){return~~this.GetUnit()},s.prototype.getUnitEq=function(){var t=this.getCount(),e=this.getUnit(),o=y.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},s.prototype.GetCount=function(){return this.oO.count},s.prototype.SetCount=function(t){this.bU(),this.onRL(function(){this.oO.count=t,this.synl("count")}),this.eU()},s.prototype.getCount=function(){return b(1,~~this.GetCount())},s.prototype.GetAlign=function(){return this.oO.align},s.prototype.SetAlign=function(t){this.bU(),this.onRL(function(){this.oO.align=t,this.synl("align")}),this.eU()},s.prototype.getAlign=function(){return T(this.GetAlign(),16|(this.oLvs.isZ(this)?5:4))},s.prototype.GetShape=function(){return this.oO.shape},s.prototype.SetShape=function(t){this.bU(),this.oO.shape=y.S.A2S(t),this.synl("shape"),this.eU()},s.prototype.getShape=function(){return this.oLvs.oGV.toShape(this)||null},s.prototype.shape=function(t,e,o,i){var n=y.Tree.bSCTX(t,this.getShape(),e);o.call(i||this),n&&y.Tree.eSCTX(t,n)},s.prototype.GetDrawGridLines=function(){return this.oO.drawGridLines},s.prototype.SetDrawGridLines=function(t){this.bU(),this.oO.drawGridLines=t,this.synl("drawGridLines"),this.eU()},s.prototype.getDrawGridLines=function(){var t=this.GetDrawGridLines();if(o(t)){var e=1;(this.oLvs.len()<2||this.oLvs.at(e).isEmpty())&&(e=0),t=e==this.index()}return t},s.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))},s.prototype.GetDrawTickLines=function(){return this.oO.drawTickLines},s.prototype.SetDrawTickLines=function(t){this.bU(),this.oO.drawTickLines=t,this.synl("drawTickLines"),this.eU()},s.prototype.getDrawTickLines=function(){return T(this.GetDrawTickLines(),-1)},s.prototype.GetDrawTickLinesFrom=function(){return this.oO.drawTickLinesFrom},s.prototype.SetDrawTickLinesFrom=function(t){this.bU(),this.oO.drawTickLinesFrom=t,this.synl("drawTickLinesFrom"),this.eU()},s.prototype.getDrawTickLinesFrom=function(){var t,e=this.GetDrawTickLinesFrom();if(e&&(e=w(e).trim())){var o,i,n=e.split(",");n.length>1&&(o=this.oLvs.at(this.oLvs.len()-(1+~~n[0])))&&(i=~~n[1])&&(t={l:o,t:i})}return t},s.prototype.drawTL=function(t,e,o){function i(t,e,o,i){function n(e,o,n){if(-1!=i)for(var r=y.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=y.Cpy(this[y.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[y.bin(this.length,function(e){return t.Compare(this[e].s)>=0},this)];return o&&(e+=p(o).x+(t-o.s)/(o.e-o.s)*p(o).w),e},t.prototype.VO=function(t,e){var o=new y.M1,i=this.x;return this.forEach(function(n){o.push(n.s,[i+n.x,t,n.w,e])}),o},r.prototype.init=function(e){function o(){function t(t){if(t.length&&240&t.oLv.getAlign()){var e=t[0],o=t[t.length-1],i=t.x+e.x;e.o={x:e.x,w:e.w},o.o={x:o.x,w:o.w},e.w+=i,e.x-=i,o.w-=b(0,t.x+o.x+o.w-u)}}function e(t,e){if(t!=e){var n=t.oLv,s=e.s(),a=n.reset(s),u=n.next(a);i.hsNW()||r.getAdjustLevelsToBase()?function(){function r(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?c+=e.w:(c&&t.push(c,a,u),c=e.w,a=u,u=n.next(u))}),(c+=r(e.e(),o?o.Min(u):u,!0))&&t.push(c,a,u)}():function(){function i(t){return h*(t-s)}var r,h=e.r(),c=e.l();for(r=t.x=b(-l,i(a));a.Compare(c)<0;)t.push(i(o?o.Min(u):u)-r,a,u),r=t.x+t.w,a=u,u=n.next(u)}(),t.x+=e.x,t.onC()}}var o,i=this.oLvs,n=i.oGC.oNW,r=i.oGC,s=i.getBL(),h=i.getUW(),a=i.getUNW(),u=i.cltW(),c=i.showNWM(),l=r.oAL.max(),p=this.get(s),f=i.isSR();h&&s&&(!function(t){function e(t){return t.copy().Next(r,l)}function o(o){return t.push(h,o,e(o)),i.next(o)}var r=s.getUnit(),l=s.getCount(),p=i.getFVD().copy(),f=c&&a?function(r){if(c&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(o){if(!o.isEmpty()){var i=this.get(o);i!=p&&(e(i,p),t(i))}},this),t(p)))}this.oLvs=e,this.mUL=function(){var o=new Map;return e.forEach(function(e){o.set(e,new t(e))}),o}.call(this),o.call(this)},r.prototype.get=function(t){return this.mUL.get(t)},s.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")},s.prototype.XC=function(){this.oR=null},s.prototype.getR=function(){var t=function(){var t=this.d;return o(t)&&this.oGC.locale(function(){t=0;var e=y.Loc.Get().weekend;if(e)for(var o=0;o=0;i--)o=t.call(e,this[i]);return o},h.prototype.copy=function(t){var e;e={};for(var o in t)e[o]=t[o];return e},h.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=y.Cpy(e)).x+=this.x,e})},h.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(a.prototype,h.prototype),a.prototype.init=function(t){return function(e){t.apply(this,arguments);var o=e.showNWM();if(o){var i,n=this,r=e.oNW,s=r.getR(),h=e.getBL().UL(),a=(s.bD?4096:0)|(s.bH?65536:0);a&&e.feD(4096==o?4096:65536,function(t){if((i=r.isNWU(t))&o&&i&a)return function(t,e){var o=h.d2X(t);n.push(o,h.d2X(e)-o,t,e.copy())}(t.copy(),r.nextNWU(o,t)),!0})}}}(a.prototype.init),Object.addPrototypeOf(u.prototype,y.M1.prototype),u.prototype.init=function(t){return function(e){function o(t,e){var o;(t.zl=t.zl||new h).push(o=i.d2X(e.s),i.d2X(e.e)-o,e.s,e.e)}var i=e.oLvs,n=i.showNWM(),r=[],s=new Map;t.call(this),[e.getVIT(),e.getVI(),e.getVIB()].forEach(function(t){t.forEach(function(t,e){if(e.getNonworkingUnits()){var o=function(t,e){var o=y.E.Create(t.getNonworkingUnits(),"value");return{i:t,c:e,e:o.IsValid()&&o||null}}(e,t);e.getNonworkingUnits()&&this.push(e,o),o.e&&r.push(o)}},this)},this),n&&r.length&&i.feD(4096==n?4096:65536,function(t){r.forEach(function(e){var i=s.get(e);e.e.Evaluate(function(){return t})?(!i&&s.set(e,i={}),i.s=i.s||t.copy(),i.e=t):i&&(i.e=t,o(e,i),s.delete(e))})}),s.forEach(function(t,e){o(e,t)}),r.forEach(function(t){t.zl&&(t.vo=t.zl.VO(t.c[1],t.c[3]))})}}(u.prototype.init),u.prototype.draw=function(t,e,o){this.forEach(function(e){e.vo&&e.vo.forEach(function(e){t.drawShape(e,o)})})},u.prototype.clip=function(t,e){t.selClip(e),this.forEach(function(e){t.rect.apply(t,e.c)}),t.clip("evenodd")},Object.addPrototypeOf(c.prototype,h.prototype),c.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})}}(c.prototype.init),c.prototype.x2SD=function(t){var e=this.x2ZL(t);return e&&e.o},c.prototype.x2rgSD=function(t){var e=[];return this.x2rgZL(t).forEach(function(t){e.push(t.o)}),e},Object.addPrototypeOf(l.prototype,y.KAr.prototype),l.prototype.init=function(t){return function(e){t.call(this),this.oGC=e}}(l.prototype.init),l.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.bzO=!1,this.oGC.resSD()}}(l.prototype.onChange),l.prototype.K=function(t,e){return t.s.getTime()+"."+t.e.getTime()},l.prototype.toE=function(t){return this.k2E(this.getK(t))||t},l.prototype.indexOf=function(t){return function(e){return t.call(this,this.toE(e))}}(l.prototype.indexOf),l.prototype.remove=function(t){return function(e){return t.call(this,this.toE(e))}}(l.prototype.remove),l.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},l.prototype.getSingleSel=function(){return this.oGC.getAllowSelectDate()},l.prototype.allowSelect=function(){return this.getSingleSel()},l.prototype.isSingleSel=function(){return 2&this.getSingleSel()},l.prototype.isToggleSel=function(){return 4&this.getSingleSel()},l.prototype.isToggleCtrlSel=function(){return 0==(8&this.getSingleSel())},l.prototype.isShiftSel=function(){return 0==(16&this.getSingleSel())},l.prototype.isSelected=function(t){return this.has(t)},l.prototype.isSelectable=function(t){return!!t},l.prototype.select=function(t,r){function s(t){var e=!1,i=this.isSelected(t),n=this.isSelectable(t);if(o(t))e=this.len(),this.clear();else if(a&&this.len()){var r=this.at(this.len()-1),s={s:r.s.Min(t.s),e:r.e.Max(t.e)};(e=!this.isSelected(s))&&(this.remove(r),this.add(s))}else if(this.isSingleSel()){s=!n||u&&i?null:t;(e=!this.isSelected(s))&&(this.clear(),this.ann(s))}else u&&i?(e=i,this.remove(t)):(u||(e=!i||this.len()>1,this.clear()),n&&this.add(t)),e|=i!=this.isSelected(t);return e}var h=!1,a=1==(r=r||{}).selType,u=2&r.selType,c=function(t){function o(t){var o,i,n;return e(t)&&!(n=t.s instanceof Date&&t.e instanceof Date&&t.s.Compare(t.e)<=0&&t)&&((o=t.s||t.start)&&(o=Date.Create(o)),(i=t.e||t.end)&&(i=Date.Create(i)),o||i?(o||(o=i.copy().PrevSecond()),i||(i=o.copy().NextSecond())):i=(o=Date.Create(t)).copy().NextSecond(),n={s:o.Min(i),e:o.Max(i)}),n||null}var r=null;return e(t)&&(i(t)||n(t)?(r=new y.Arr,t.forEach(function(t){r.ann(o(t))}),r.len()||(r=null)):r=o(t)),r}.call(this,t);return n(c)?a?h|=s.call(this,c.last()):u?c.forEach(function(t){h|=s.call(this,t)},this):(h=!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 s(t,e){this.init(t,e)}function u(t,e,o,i){this.init(t,e,o,i)}function l(t){this.init(t)}function p(t){this.init(t)}function f(t,e){this.init(t,e)}function V(t){this.init(t)}function E(t){var e,o,i,n,r,s=new y.BiM,h=new Map,a=new Map,u=new Map,c=E.toK;y.B.split(t).forEach(function(t){(o=t.subText)&&(n="get"+y.getP(o),r="Set"+y.getP(o),t.flags&&(n=t.flags.get("get")||n,r=t.flags.get("set")||r),e=~~t.caption,i=c(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 I(t,e){this.init(t,e)}function x(t){this.init(t)}function R(t){this.init(t)}function D(t,e){this.init(t,e)}function H(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 W(){this.mIO=new Map}function k(t){this.init(t)}var M,P=y.BiM.Split("o(offset),i(intersect),s(stack),c(cascade)"),A=y.msday,F=y.Gantt.ItemBarOptions;s.prototype.init=function(t,o){function i(t){return L(t||0)*y.msday}if(this.bpLA=1&t,this.bpLB=2&t,this.bign=4&t,this.bm=8&t,this.bM=16&t,32&t&&(this.bm=!0,this.bM=!1),this.fI=0,this.MI=0,this.mI=0,e(o)){var n=w(o).split(";");this.fI=i(n[0]),this.MI=i(n[1]),this.mI=i(n[2])}},s.prototype.copy=function(t){return t&&(this.bpLA=t.bpLA,this.bpLB=t.bpLB,this.bign=t.bign,this.bm=t.bm,this.bM=t.bM,this.fI=t.fI,this.MI=t.MI,this.mI=t.mI),this},s.prototype.negate=function(){var t=this.bm;this.bm=this.bM,this.bM=t,this.fI=-this.fI;var e=this.mI;this.mI=-this.MI,this.MI=-e},s.negate=function(t){var e;return t&&(e=new s).copy(t).negate(),e},Object.addPrototypeOf(u.prototype,s.prototype),u.prototype.init=function(t){return function(e,o,i,n){t.call(this),this.bA=e,this.bB=o,this.dbDiff=i,n&&(this.copy(n),n.bign&&(this.dbDiff=0))}}(u.prototype.init),l.prototype.init=function(t){this.lrG=0,this.oT=t,this.mIBG=new Map,this.mPLB=new Map},l.prototype.bU=function(){return this.oT.bU()},l.prototype.eU=function(){return this.oT.eU()},l.prototype.all=function(t){var e=new y.Arr;if(t){if(this.mIBG.has(t)){e.add(t);for(var o=0;o=B.s||!B.e||T<=B.e),O&&i(s,L!=c&&L||null,T!=l&&T||null)}if(!u){var V,E=(c==o(s,!0)?0:1)+(l==o(s)?0:2);(u=0!=E)&&(V=E,a.has(s)&&(V=a.get(s),(u=V!=E&&3!=V)&&(V|=E)),a.set(s,V))}}),u)){var c=h;h=s,n(s),h=c}})}if(!this.lrG++){var r=this.mPLB,s=this.mIBG,h=t,a=new Map;s.get(t)&&n(t)}--this.lrG},l.prototype.Group=function(t,e,o,n,r,h){function a(t,e,o,i,n){function r(t,e,o,i){var n,r=t.get(e);!r&&t.set(e,r=new Map),!(n=r.get(o))&&r.set(o,n=[]),n.push(i)}if(t!=o){var h,a=(i?o.getStart():o.getEnd())-(e?t.getStart():t.getEnd());n&&(n.bpLA&&this.mPLB.set(t,t),n.bpLB&&this.mPLB.set(o,o)),r(this.mIBG,t,o,h=new u(e,i,a,n)),r(this.mIBG,o,t,new u(i,e,-a,s.negate(n))),this.onGB(t,o,h)}}if(this.bU(),1==arguments.length){if(i(t)&&t.length>1){var l=t[0];if(this.oT.hasIB(l))for(var p,f=1,g=t.length;fi)}s.a.forEach(function(t){r.set(t,s)})}},this)}var o,i,n,r,s=new Map,h=new y.Arr,a=t.oGC.oT.oTV,u=a.toShape.bind(a);if(t.forEach(function(e){(n=function(t){var e=P.keys()[(255&t.getOverlaidType())-1];return"i"!=e||t.getOverlaid().intersect||(e=""),e}(e))&&(!(r=s.get(n))&&s.set(n,r=new y.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 y.Arr),n.add(r))})}),s.size){if(s.forEach(function(t,o){e.call(this,o,t)},this),this.c||this.s){var c=new Map;[this.c,this.s].forEach(function(t){t&&t.forEach(function(t,e){c.set(e,t)})}),this.h=c}this.mB=new Map,s.forEach(function(t,e){this[e]&&this[e].forEach(function(t,o){this.mB.set(o,e)},this)},this)}},p.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&&(s=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)}),p=(l=0)+1,f=i.length;ln[0].b.GetKey()?-s:s,g.set(u.b,h),n.forEach(function(e,o){g.set(e.b,-h),o?r(c,e)?g.set(e.b,r(u,e)?0:t(u,u,e)||h):t(c,c,e):c=y.Cpy(e)}))}}),g},p.prototype.H=function(o,i){function n(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,h,a,u,c=[],l=0,p=0;return(a=this.G("h",o))&&(a.forEach(function(e,o){("s"==o.t?function(e){function o(){i&&s.push(i),i=null}var i,n,s=[];return e.sort(function(t,e){return t.getStart().Compare(e.getStart())}).forEach(function(e){n&&!r(n,e.se())&&o(),(i=i||[]).push(e),t(n=n||y.Cpy(e.se()),n,e.se())}),o(),s}(e):[e]).forEach(function(e){c.push(function(t,e,o){var i,n=b(0,e),r=[];return o.forEach(function(t){i=0,t.forEach(function(t){i=b(i,e+t.getHeight())}),r.push(i),n+=i}),{t:t,f:n,o:e,l:o,h:r}}(o.t,o.o,function(t,e){function o(t,e){var o=i.get(t);!o&&i.set(t,o=[]),o.push(e)}var i=new Map,n=[];t&&t.forEach(function(t,n){var s=e&&e.get(t),h=(s?s.i+s.l:0)||0,a=h;t.i=h,t.b.forEach(function(t,e){if(e){for(var n=h,s=i.size,u=!0;u&&n1&&(e(i)&&(s=i=0&&this.resOB(),this.oGC.resVB(),this.oGC.oT.oCF.resBF(),this.oGC.oT.feIB(function(t){t.oB=void 0})}}(V.prototype.onChange),V.prototype.K=function(t,e){return void 0!==e&&(t.oO.name=e),t.oO.name},V.prototype.import=function(){this.oGC.import.call(this,this.oGC.oT)},V.prototype.toK=function(t){return w(t)},V.prototype.dTV=function(){return this.oGC.oT.oTV},V.prototype.GetCount=function(){return this.len()},V.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(w(t))}.call(this,t)||function(t){var e=this.k2E(t);return e||(e=this.at(t))||(e=t instanceof f&&this.has(t)?t:null),e}.call(this,t)},V.prototype.Items=function(t){var e=new y.Arr;return y.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},V.prototype.newBar=function(t){return new f(this,t)},V.prototype.Add=function(t){t=G(t)?t:{name:t};var e,o,i,n,r,s,a=this.Item(e=t.name=this.toK(t.name));return a||(this.bU(),~(o=e.indexOf("%"))&&(t.shape=y.Mrg(t.shape,(n=this.Item(e.substr(0,o).trim()))?n.getShape():this.oGC.unkS()),(n=this.Item(i=e.substr(o+1).trim()))?r=n.getShape():i&&(r=this.dTV().toShape(y.S.A2S(i))||{fillColor:"black"}),(s=t.shape)&&(!s.p2x&&(s.p2x=function(t,e){return t*e}),!s.x2p&&(s.x2p=function(t,e){return b(0,U(1,t/e))}),!s.draw&&(s.draw=function(t,e,o,i){if(h(i)){var n=i.getPercent(),s=i.rt4P(o.slice());s&&(s[2]=this.p2x(n,s[2]),t.drawShape(s,r),i.getShowPercentCaption()&&i.t().oGV.drawC(t,s,i,i.p2C(n),i.getAlignPercentCaption(),1))}}))),a=this.newBar(t),this.eU()),a},V.prototype.Remove=function(t){this.RemoveRange(this.Item(t,!0))},V.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},V.prototype.Clear=function(){this.bU(),this.mS=void 0,this.clear(),this.eU()},V.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=y.Cpy(i.GetOptions())).name=e,o=this.Add(n)),o},V.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(y.LOf(e),y.BOf(e)),t.lineTo(y.ROf(e),y.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(y.Mrg(y.Cpy(t[e]),{name:e}))}),this.eU()},V.prototype.resOB=function(t){this.oOB=void 0;var e=new Map,o=this.oGC.oT,i=o.oI,n=this.getOB(),r=y.Tree.Items.prototype.getHeight,s=y.Tree.Items.prototype.setHeight;i.mOI=null,i.getHeight=r,i.setHeight=s,n&&n.h&&(i.mOI=new Map,i.getHeight=function(t){var o=r.apply(this,arguments),i=this.mOI.get(t);return!i&&this.mOI.set(t,i=t.oIB&&n.H(t.oIB.rgE,t.GetHeight())||e),L(i.h,o)},i.setHeight=function(t){s.apply(this,arguments),this.mOI.delete(t)}),!t&&o.onRL()},V.prototype.getOB=function(){return void 0===this.oOB&&(this.oOB=new p(this),this.oOB.mB||(this.oOB=null)),this.oOB},y.expO({Count:null},V.prototype),y.expO(y.Mrg({Options:null},y.Gantt.BarOptions),f.prototype),E.toK=function(t){return y.IsI(t)?~~t:t&&t.toLowerCase&&t.toLowerCase()||t},E.prototype.toK=function(t){var e=E.toK(t);if(this.k.has(e))return e},E.prototype.toO=function(t){var e=this.k.get(this.toK(t));return y.IsI(e)?this.o.get(e):e},E.prototype.toI=function(t){var e=this.k.get(this.toK(t));return y.IsI(e)?e:this.o.getKey(e)},E.prototype.get=function(t){return this.g.get(this.toK(t))},E.prototype.set=function(t){return this.s.get(this.toK(t))},I.prototype.init=function(t,e){this.oO={key:e.key},(this.oIB=t).add(this),this.t().onBC(1,this),this.setOpts(e)},I.prototype.getType=function(t){return"itemBar"+(t?"-"+t:"")},I.prototype.t=function(){return this.i().t()},I.prototype.gC=function(){return this.oIB.gC()},I.prototype.dTV=function(){return this.oIB.dTV()},I.prototype.bU=function(){this.oIB.bU()},I.prototype.eU=function(t){this.oIB.eU(t)},I.prototype.res=function(){this.oExC=void 0,this.oExCe=void 0,this.oExT=void 0},I.prototype.def=function(t,e){var i,n=this.oO[t];return o(n)&&((i=this.GetBar())&&(n=i.def(t)),o(n)&&o(n=F[t])&&(n=e)),n},I.prototype.isEnabled=function(){return this.i().isEnabled()},I.prototype.Remove=function(){return this.oIB.Remove(this)},I.prototype.GetOptions=function(){return this.oO},I.prototype.SetOptions=function(t){this.bU(),this.setOpts(t),this.eU(!0)},I.prototype.setOpts=function(t){if(G(t))for(var e in t){var o=this[y.setM(e)];o&&o.call(this,t[e])}},I.prototype.GetName=function(){return this.oO.name},I.prototype.SetName=function(t){this.bU(),this.oB=void 0,this.oO.name=t,this.eU()},I.prototype.getName=function(){return w(this.GetName())},I.prototype.GetBar=function(){return void 0===this.oB&&(this.oB=this.gC().oGB.Item(this.getName(),!0)||null),this.oB},I.prototype.GetKey=function(){return this.oO.key},I.prototype.SetKey=function(t){this.oIB.setK(this,t)&&(this.bU(),this.eU())},I.prototype.getKey=function(){return this.oIB.toK(this.GetKey())},I.prototype.GetStart=function(){return this.oO.start},I.prototype.SetStart=function(t){this.oO.start!=t&&(this.bU(),this.oO.start=t,this.onSE(),this.eU(!0))},I.prototype.getStart=function(){return this.se().s},I.prototype.GetEnd=function(){return this.oO.end},I.prototype.SetEnd=function(t){this.oO.end!=t&&(this.bU(),this.oO.end=t,this.onSE(),this.eU(!0))},I.prototype.getEnd=function(){return this.se().e},I.prototype.xSE=function(){this.oSE=null,this.rgpS&&this.rgpS.forEach(function(t){t.xSE()}),this.t().onBC(3,this)},I.prototype.onSE=function(){this.xSE(),this.t().oGIB.onSE(this)},I.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))},I.prototype.GetShape=function(){return this.oO.shape},I.prototype.SetShape=function(t){this.bU(),this.oO.shape=y.S.A2S(t),this.eU(this.GetBar()&&1==this.GetBar().hCOC())},I.prototype.getShape=function(t){var o,i,n=this.GetShape(),r=this.dTV(),s=this.GetBar();return n=e(n)?r.toShape(n):s?s.getShape():this.gC().unkS(),s&&((i=this.t().oCF.b2S(s,this.i()))&&(n=y.Inh(i,n)),!s.hCOC()&&(i=this.t().oGV.oHG.hD().ibS(this))&&(n=y.Inh(i,n))),r.oI.mTBS&&(i=r.oI.mTBS.get(this))&&(n=y.Inh(i,n)),t&&n&&(o=r.toShapes(this.i()))&&o.disabled&&(n=y.Inh(o.disabled,n)),n},I.prototype.GetHeight=function(){return this.oO.height},I.prototype.SetHeight=function(t){this.bU(),this.oO.height=t,this.eU(!0)},I.prototype.getHeight=function(){var t,o=this.GetHeight();return e(o)?o:(t=this.GetBar())?t.getHeight():this.gC().unkH()},I.prototype.GetSelected=function(){return this.gC().isSelected(this)},I.prototype.SetSelected=function(t){!!t!=!!this.isSelected()&&this.gC().select(this,{selType:2})},I.prototype.isSelected=I.prototype.GetSelected,I.prototype.GetSelectable=function(){return this.oO.selectable},I.prototype.SetSelectable=function(t){this.oO.selectable=t},I.prototype.isSelectable=function(){return this.def("selectable",!0)},I.prototype.toFormat=function(t,e){var o,i,n;return e&&(n=this.i().Cell(0))?o=n.toFormat(t,e):(i=M.get(t))&&(o=this[i].call(this)),o},I.prototype.GetCaption=function(){return this.oO.caption},I.prototype.SetCaption=function(t){this.bU(),this.oExC=void 0,this.oO.caption=t,this.eU()},I.prototype.getExC=function(){return void 0===this.oExC&&(this.oExC=g.Get(this.def("caption"))||null),this.oExC},I.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},I.prototype.GetHAlignCaption=function(){return this.oO.hAlignCaption},I.prototype.SetHAlignCaption=function(t){this.bU(),this.oO.hAlignCaption=t,this.eU()},I.prototype.getHAlignCaption=function(){return this.def("hAlignCaption",1)},I.prototype.GetVAlignCaption=function(){return this.oO.vAlignCaption},I.prototype.SetVAlignCaption=function(t){this.bU(),this.oO.vAlignCaption=t,this.eU()},I.prototype.getVAlignCaption=function(){return this.def("vAlignCaption",1)},I.prototype.GetShowCaption=function(){return this.oO.showCaption},I.prototype.SetShowCaption=function(t){this.bU(),this.oO.showCaption=t,this.eU()},I.prototype.getShowCaption=function(){return this.def("showCaption",!0)},I.prototype.GetExtraCaption=function(){return this.oO.extraCaption},I.prototype.SetExtraCaption=function(t){this.bU(),this.oExCe=void 0,this.oO.extraCaption=t,this.eU()},I.prototype.getExEC=function(){return void 0===this.oExCe&&(this.oExCe=g.Get(this.def("extraCaption"))||null),this.oExCe},I.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},I.prototype.GetExtraCaptionHAlign=function(){return this.oO.extraCaptionHAlign},I.prototype.SetExtraCaptionHAlign=function(t){this.bU(),this.oO.extraCaptionHAlign=t,this.eU()},I.prototype.getExtraCaptionHAlign=function(){return this.def("extraCaptionHAlign",1)},I.prototype.GetExtraCaptionVAlign=function(){return this.oO.extraCaptionVAlign},I.prototype.SetExtraCaptionVAlign=function(t){this.bU(),this.oO.extraCaptionVAlign=t,this.eU()},I.prototype.getExtraCaptionVAlign=function(){return this.def("extraCaptionVAlign",1)},I.prototype.GetShowExtraCaption=function(){return this.oO.showExtraCaption},I.prototype.SetShowExtraCaption=function(t){this.bU(),this.oO.showExtraCaption=t,this.eU()},I.prototype.getShowExtraCaption=function(){return this.def("showExtraCaption",!0)},I.prototype.GetToolTip=function(){return this.oO.toolTip},I.prototype.SetToolTip=function(t){this.bU(),this.oExT=void 0,this.oO.toolTip=t,this.eU()},I.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},I.prototype.getExT=function(){return void 0===this.oExT&&(this.oExT=g.Get(this.def("toolTip"))||null),this.oExT},I.prototype.tt=function(t){var e,o=this.getExT();return o&&t&&(e=t.ib2R(this,6))&&{oExT:o,rtT:y.ORt(e,0,e[3]+4)}},I.prototype.GetCanResize=function(){return this.oO.canResize},I.prototype.SetCanResize=function(t){this.bU(),this.oO.canResize=t,this.eU()},I.prototype.getCanResize=I.prototype.canResize=function(){return this.isSelectable()&&!this.rgS&&~~this.def("canResize",-1)||0},I.prototype.GetCanMove=function(){return this.oO.canMove},I.prototype.SetCanMove=function(t){this.bU(),this.oO.canMove=t,this.eU()},I.prototype.getCanMove=function(){return this.isSelectable()&&this.def("canMove",!0)},I.prototype.GetCanMoveToAnother=function(){return this.oO.canMoveToAnother},I.prototype.SetCanMoveToAnother=function(t){this.bU(),this.oO.canMoveToAnother=t,this.eU()},I.prototype.getCanMoveToAnother=function(){return this.isSelectable()&&this.def("canMoveToAnother",!1)},I.prototype.canMove=function(){return(this.getCanMove()?1:0)|(this.getCanMoveToAnother()?2:0)},I.prototype.GetParent=function(){return this.oIB.oI},I.prototype.GetItem=I.prototype.GetParent,I.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 x(t)).add(this),--this.lP,this.t().onBC(5,this),this.eU(!0))},I.prototype.SetItem=I.prototype.SetParent,I.prototype.i=I.prototype.GetParent,I.prototype.canParent=function(t){return t&&t!=this.GetParent()&&(!t.oIB||!t.oIB.k2E(this.getKey()))},I.prototype.GetDuration=function(){var t=this.se();return(t.e-t.s)/A},I.prototype.SetDuration=function(t){var e=(t*=A)<0,o=this.se();this.SetOptions({start:e?o.e.copy().add(t):o.s,end:e?o.e:o.s.copy().add(t)})},I.prototype.SetMove=function(t){t&&this.mvBy(t*A)},I.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})},I.prototype.mvBy=function(t,e){e=e||this.se(),this.SetOptions({start:e.s.copy().add(t),end:e.e.copy().add(t)})},I.prototype.GetSummaryBarShape=function(){return this.oO.summaryBarShape},I.prototype.SetSummaryBarShape=function(t){this.bU(),this.oO.summaryBarShape=y.S.A2S(t),this.eU()},I.prototype.getSummaryBarShape=function(){var t=this.def("summaryBarShape");return t&&this.dTV().toShape(y.S.A2S(t))},I.prototype.GetCaptionHOffset=function(){return this.oO.captionHOffset},I.prototype.SetCaptionHOffset=function(t){this.bU(),this.oO.captionHOffset=t,this.eU()},I.prototype.getCaptionHOffset=function(){return this.def("captionHOffset",0)},I.prototype.GetCaptionVOffset=function(){return this.oO.captionVOffset},I.prototype.SetCaptionVOffset=function(t){this.bU(),this.oO.captionVOffset=t,this.eU()},I.prototype.getCaptionVOffset=function(){return this.def("captionVOffset",0)},I.prototype.GetExtraCaptionHOffset=function(){return this.oO.extraCaptionHOffset},I.prototype.SetExtraCaptionHOffset=function(t){this.bU(),this.oO.extraCaptionHOffset=t,this.eU()},I.prototype.getExtraCaptionHOffset=function(){return this.def("extraCaptionHOffset",0)},I.prototype.GetExtraCaptionVOffset=function(){return this.oO.extraCaptionVOffset},I.prototype.SetExtraCaptionVOffset=function(t){this.bU(),this.oO.extraCaptionVOffset=t,this.eU()},I.prototype.getExtraCaptionVOffset=function(){return this.def("extraCaptionVOffset",0)},I.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,r=this.gC().oT.oI;return 0==t||t==r?o=r.rgI:(o=new y.Arr,-1==t||-2==t||-3==t?e(this.i()):a(t)?o.ann(r.Item(t)):(i(t)||n(t))&&t.forEach(function(t){o.ann(r.Item(t))})),o&&o.len()&&o||null},I.prototype.dIB=function(t,r){function s(t){return c==t.getKey()}function a(t){return c.Match(t.getKey())}var u,c,l,p=!1,f=new y.Arr,g=this.gC().oT.oI;return e(t)&&(o(r)&&((p=h(t))?f.ann(g.Item(t.i())&&t||null):(i(t)||n(t))&&t.forEach(function(t){h(t)&&(p=!0,f.ann(g.Item(t.i())&&t||null))})),p||(e(r)&&(c=w(r),l=s,c.length>2&&c.sWith("<")&&c.eWith(">")&&("*"==(c=c.substr(1,c.length-2))?l=null:(c=y.Like.Mask(c),l=a))),(u=this.dI(t))&&u.forEach(function(t){t.oIB&&(l?t.oIB.forEach(function(t){l(t)&&f.add(t)}):f.push(t.oIB))}))),f&&f.len()&&f||null},I.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 y.Arr(t.rgpS);for(var o,i=0;i%p%"))},I.prototype.p2C=function(t){return g.Set((this.getPercentCaptionFormat()||"%p").replace("%p",(100*L(t,this.getPercent())).toFixed()))},I.prototype.DateToPercent=function(t){var e=this.se(),o=e.e-e.s;return o?b(0,U(1,(Date.Create(t)-e.s)/o)):1},I.prototype.GetOverviewColor=function(){return this.oO.overviewColor},I.prototype.SetOverviewColor=function(t){this.bU(),this.oO.overviewColor=t,this.eU()},I.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},I.prototype.GetHistLegend=function(){return this.oO.histLegend},I.prototype.SetHistLegend=function(t){this.bU(),this.oExHL=void 0,this.oO.histLegend=t,this.eU()},I.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},I.prototype.getExHL=function(){return void 0===this.oExHL&&(this.oExHL=g.Get(this.def("histLegend"))||null),this.oExHL},I.prototype.GetResources=function(){return this.oO.resources},I.prototype.SetResources=function(t){this.bU(),this.oO.resources=N.setRes(this,t),this.eU()},I.prototype.getResources=function(){return w(this.GetResources(),this.def("resources"))},I.prototype.GetResourceFormat=function(){return this.oO.resourceFormat},I.prototype.SetResourceFormat=function(t){this.bU(),this.oO.resourceFormat=t,this.eU()},I.prototype.getResourceFormat=function(){return w(this.GetResourceFormat(),this.def("resourceFormat"))},I.prototype.getResourcesFormat=function(){return N.getRes(this,this.getResourceFormat())},I.prototype.isW=function(){},I.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)/A},I.prototype.wD=function(t,e){return console.log("TODO-wD"),t.copy().add(e*A)},I.prototype.seR=function(){},y.expO(y.Mrg({Options:null,Bar:null,Parent:null,Item:null,Duration:null,Move:null,CriticalPath:null},F),I.prototype),Object.addPrototypeOf(x.prototype,y.KAr.prototype),x.prototype.init=function(t){return function(e){t.call(this),this.oI=e}}(x.prototype.init),x.prototype.resVB=function(){this.gC().resVB()},x.prototype.onChange=function(t){return function(){t.apply(this,arguments),this.resVB()}}(x.prototype.onChange),x.prototype.onRemove=function(t){return function(e){t.call(this,e),!e.lP&&this.gC().onDelBar(e)}}(x.prototype.onRemove),x.prototype.K=function(t,e){return void 0!==e&&(t.oO.key=e),t.oO.key},x.prototype.bU=function(){this.oI.bU()},x.prototype.eU=function(t){t&&this.resVB(),this.oI.eU()},x.prototype.gC=function(){return this.oGC||(this.oGC=this.oI.t().oGC)},x.prototype.dTV=function(){return this.oTV||(this.oTV=this.oI.t().oTV)},x.prototype.toK=function(t){return e(t)?t:""},x.prototype.Item=function(t){var e=this.k2E(t=this.toK(t));return e||(e=t===T(t)&&this.at(t))||(e=h(t)&&this.has(t)?t:null),e||null},x.prototype.Items=function(t){var e=new y.Arr;return y.IsS(t)?t.split(",").forEach(function(t){e.ann(this.Item(t))},this):e.ann(this.Item(t)),e},x.prototype.nIBar=function(t){return new I(this,t)},x.prototype.Add=function(t,o,i,n,r){var s,h=1==arguments.length&&G(t)?t:{name:t,start:o,end:i,caption:r};return h.key=this.toK(e(n)?n:h.key),(s=this.k2E(h.key))?s.SetOptions(h):s=this.nIBar(h),s},x.prototype.Remove=function(t){this.RemoveRange(this.Item(t))},x.prototype.RemoveRange=function(t){this.bU(),this.removeRange(t),this.eU()},x.prototype.Clear=function(){this.bU(),this.clear(),this.eU()},R.prototype.init=function(t){this.oGC=t,this.wse=6,this.dSP=y.Cpy(y.Gantt.DefSchedulePDM),this.rgL=new y.Arr,this.rgL.onRemove=this.onDelLink.bind(this),this.import()},R.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)},R.prototype.resVL=function(){this.resPS(),this.oGC.resVL()},R.prototype.resK2I=function(){this.mK2I=null},R.prototype.split=function(t,e){var o,i,n,r,s,h,a,u=-1,c=t.indexOf(S);~c&&(~(i=(o=t.substr(c+S.length)).toUpperCase().indexOf(m))&&(o=o.substr(0,i)+o.substr(i+m.length)),t=t.substr(0,c)),n=y.ToF(o);for(var l=0,p=(r=t).length;u<0&&l>=1,e++;return b(0,U(e,3))}(this.t)],t+=this.b.GetKey(),this.g&&(t+=S+this.g,this.w&&(t+=m)),t}.call(t)}),o},H.prototype.set=function(t,e,o){if(t&&(o=w(o).trim())!=this.get(t,e)){var i=this.oGL,n=e?2:1;i.bU(),i.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(C).forEach(function(o){var r,s,h,a,u,c=i.split(o,n);c&&(r=e?c.g:-c.g,s=c.b,h=t,1==(a=c.t)&&(u=s,s=h,h=u,a=2),i.Add({from:s,to:h,lag:!c.w&&r||0,workingLag:c.w&&r||0,type:a}))},this),i.eU()}},W.prototype.can=function(t,e){return t&&e&&!this.get(t,e)},W.prototype.get=function(t,e){var o,i=this.mIO.get(t);return i&&(o=i.out.get(e)),o||null},W.prototype.add=function(t){function e(t){return{o:t,in:new Map,out:new Map,links:new y.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))},W.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))},W.prototype.lOf=function(t){function o(t){var e=s.get(t);return e?e.links:null}var r=y.Arr.empty,s=this.mIO;if(h(t))r=o(t)||r;else{var a=null;t instanceof y.M1?a=t.rgO:(i(t)||n(t))&&(a=t),e(a)&&(r=new y.Arr,a.forEach(function(t){r.pushnn(o(t))}))}return r},y.expO({Count:null},R.prototype),y.expO(y.Mrg({Options:null,Index:null},y.Gantt.LinkOptions),D.prototype),k.prototype.init=function(t){this.oT=t},y.SB.addProto(k.prototype),k.prototype.SetClientRect=function(t){},k.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)},k.prototype.attach=function(){this.import()},k.prototype.gSize=function(){return{height:this.oT.oGC.getOverviewHeight()}},k.prototype.sOH=function(t){t&&this.oT.oGC.SetOverviewHeight(this.scaled(t[3]))},k.prototype.getOverviewVisible=function(){return this.oT.oGC.getOverviewVisible()},k.prototype.getOverviewToolTip=function(){return this.oT.oGC.getOverviewToolTip()},k.prototype.getOverviewZoomCaption=function(){return this.oT.oGC.getOverviewZoomCaption()},k.prototype.getOverviewZoomUnit=function(){return this.oT.oGC.getOverviewZoomUnit()},k.prototype.getOverviewFlags=function(){return this.oT.oGC.getOverviewFlags()},k.prototype.GetVisible=function(){return this.getOverviewVisible()},k.prototype.GetResizable=function(){return 65536&this.getOverviewVisible()},k.prototype.GetViewRect=function(t){var e=y.EArtC((t||this.gCW()).GetCanvas());return y.ORt(this.GetClientRect(),e[0],e[1])},k.prototype.c2V=function(t,e){var i=this.GetViewRect();return o(e)&&(e=v.Y(t),t=v.X(t)),{x:t+i[0],y:e+i[1]}},k.prototype.v2C=function(t,e){var i=this.GetViewRect();return o(e)&&(e=v.Y(t),t=v.X(t)),{x:t-i[0],y:e-i[1]}},k.prototype.pinvAO=function(t){if(this.isVisible()){var e=this;t?e.invAO():(clearTimeout(e.hIAO),e.hIAO=setTimeout(function(){e.invAO()}))}},k.prototype.isSelectable=function(t){return function(){return t.apply(this,arguments)&&this.gV().isSelectable()}}(k.prototype.isSelectable),k.prototype.onSetAO=function(t){},k.prototype.onpaint=function(t){this.locale(function(){y.SB.prototype.onpaint.call(this,t)},this)},k.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=y.ROf(o))>i&&s.push([i,n,o[0]-i,r]),e ";var v=e[0]+e[2]/2,d=t.sizeHTMLText(h);f[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]=y.BOf(t)-n[3]),5120==(5120&a)))if(u)i[3]=y.TOf(n)-y.TOf(i);else{var c=i[1];c-=i[1]=y.BOf(n),i[3]+=c}return o={rtBars:e(i),rtScale:e(n)},r&&s&&(t[0]=y.ROf(t),t[2]=r,o.rgZoom=new y.M1,s.forEach(function(e){o.rgZoom.set(e.u,t.slice()),y.ORt(t,r)})),o},k.prototype.gV=function(){return this.oT.oGV},k.prototype.h=function(){return 3},k.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],c=this.h();s0?t=[e.s,0]:n.e-n.s>=e.e-e.s&&(t=[new Date((e.s.getTime()+e.e.getTime())/2),1])),t&&s.scrollTo(t[0],t[1])},this),!1):r.ondown(t)},k.prototype.rurScroll=function(t,o){var i=this;o.rurScrollS=function(t){var o,n,r=i.gPtr(t),s=i.gV();(n=r&&i.p2DU(r))&&e(n.d)&&(o=s.fl())&&o.s&&o.e&&(n.d.Compare(o.s)<0||n.d.Compare(o.e)>0)&&s.oLvs.scrollTo(n.d,1)},this.oT.oTV.rurScroll(t,o)},k.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=O(t.dx)*e.getUW()),t.dy=-t.dy,256&this.getOverviewVisible()||(t.dy=0),i.onRurScrollD(t)},k.prototype.rurChartZoom=function(t,e){return this.gV().rurChartZoom(t,e)},k.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=y.LOf(s),a=y.ROf(s),u=v.Y(v.R2C(s)),c=v.X(t.from)<=v.X(t.to),l=c?t.from:t.to,p=c?t.to:t.from;i.Smooth(function(){n.zoom(e.call(this,l),e.call(this,p).Next(n.getrUS(),n.getrUC()))})},r.rurDrag(t,e)},k.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))},M=new E("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),49(resources),266(resourcesFormat)"),{Bar:f,Bars:V,IBP:M,v2B:function(t,o){var i=null;return e(t)&&(y.IsI(t)?(t=~~t)<0&&(t=null):(t=w(t).trim())||(t=null),e(t)&&(i={o:M.toO(t),i:M.toI(t),g:M.get(t),s:M.set(t),k:w(o)})),i},ItemBar:I,ItemBars:x,Link:D,Links:R,OV:k,CR:N,GB:l}}()),y.Gantt.ExC=g,y.Gantt.S=function(){function t(t,e){return!t.Compare(e)}function i(t,e){return t.Compare(e)>0}function r(t,e){return t.Compare(e)<0}function s(t,e){return t.copy().add(e)}function h(t,e){return e?s(t,e*D):t}function a(t,e){var o=t.se(),i=e.se();return o.s.Compare(i.s)||-o.e.Compare(i.e)}function u(t){return y.f2S(t,W)}function c(t){return k.charAt(Math.log(t)/Math.log(2))}function l(t,e,o,i){return t?t.wL(e,i?h(o||t.getEnd(),i):o):(o-e)/D}function p(t,e,o,i){var n=s(e);return Math.abs(o)>R&&(n=h(n,o),(i=y.ToB(i,t.isW()))&&(n=t.wD(e,o))),n}function f(t){return t.oGC.eyB()||0}function g(){d.call(this)}function v(){return this.s&&this.e}function d(t,e){this.s=t,this.e=e,v.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(s(this.s,e))):(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=t.s.Max(s(this.e,-e)));break;case 3:t.s?this.s.Compare(t.s)<0&&(this.s=t.s,this.e=s(this.s,e)):t.e&&(this.s.Compare(t.e)>0||this.e.Compare(t.e)>0)&&(this.e=t.e,this.s=s(this.e,-e))}this.s&&(this.s=s(this.s)),this.e&&(this.e=s(this.e))}}.call(this)}function S(t,e){return this.oTV.toShape(y.S.A2S(t),e)}function m(t){return t&&(y.C.IsColor(t)?{color:t}:y.L.aPP(t))||null}function C(t){this.init(t)}function L(t,e){this.init(t,e)}function T(){this.init()}function w(){this.init()}function G(t,e,o){this.init(t,e,o)}function O(){this.init.apply(this,arguments)}function B(t){this.init(t)}function V(t,e){this.init(t,e)}function E(t,e){return{b:t||new y.Arr,l:e||new y.Arr}}function I(t){return this.b.push(t.b),this.l.push(t.l),this}function x(t){this.init(t)}Object.addPrototypeOf(C.prototype,y.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 y.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(a)})}.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,r=i.l>0,n&&r?i.l=b(i.l,s.l):n||r?r&&!n&&(i.l=s.l):i.l=U(i.l,s.l)),this.set(t,e,o,i)}},Object.addPrototypeOf(w.prototype,y.M1.prototype),w.prototype.add=function(t){return function(e){return e instanceof G&&this.set(e.b,e),t.apply(this,arguments)}}(w.prototype.add),G.prototype.init=G.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 L((t.d?1:-1)*o,!!e)||null}(e)),this.cIO(c(i)).add(n)},this)},this)}t.rgS&&this.cIO("r").push(t.rgS),t.rgpS&&this.cIO("r").push(t.rgpS)},G.prototype.rel=function(t){[this.o,this.i,this.s,this.f,this.r].forEach(function(e){e&&t.push(e)})},G.prototype.lnk=function(t){[this.o,this.i,this.s,this.f].forEach(function(e){e&&t.push(e)})},G.prototype.cIO=function(t){return this[t]=this[t]||new y.Arr},G.prototype.isE=function(){return!(this.i&&this.i.len()||this.o&&this.o.len()||this.s&&this.s.len()||this.f&&this.f.len())},G.prototype.cpy=function(){var t=new G(this.b);for(var e in this)n(this[e])&&(t[e]=this[e].copy());return t},Object.addPrototypeOf(O.prototype,y.Arr.prototype),O.prototype.init=function(t){return function(){t.apply(this,arguments)}}(O.prototype.init),B.prototype.init=function(t){this.o3=t,this.nMx=0,this.lDo=0,this.rgB=new y.Arr,this.mP=new Map,this.mI=new Map},B.prototype.res=function(){this.mI.forEach(function(t){g.call(t)}),this.mP.clear(),this.rgB.clear()},B.prototype.bI=function(t,e){var o=e;return!o&&(o=!(e=this.mI.get(t))&&(e={})),o&&this.mI.set(t,e),e},B.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}},B.prototype.SD=function(t,e,o){var i,n,r=this.bI(t);d.call(r,e,o),i=r.l,Math.abs(r.l)R){var g=p(e,s.s,f),y=p(e,g,s.l);return this.SD(e,g,y),this.EB(e)?3:0}return 1}}else if(r(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,n)?0:2},B.prototype.DoS=function(){function t(){function t(t,e){return{i:t,m:e}}function n(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 y.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)||M;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 y.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 y.Arr(t),h=new y.Arr(t);h.len();){for(var a,u=new y.Arr,c=h.first();c;c=h.next(c))if(a=this.get(c)){if(!s.has(c)&&a.e)for(var l=a.e.first();l;l=a.e.next(l)){if(s.add(l),r!=i(l,e))return;h.add(l)}if(a.o)for(var p,f=a.o.first();f;f=a.o.next(f))if(r!=i(f,e)){if(!(p=o.call(this,t,c,f)))return;(!n||p0){this.oT;var v=new Map,S=[],m=new y.Arr,C=new y.Arr;for(h.call(m,g,0,-1);m.len();){var L,T=m.first(),w=new y.Arr(T);for(h.call(w,g,0,T),L=w.len()>1;L;){var G,O,B,V=new y.Arr,E=0,I=0,x=w.at(I);for(I++;I1)}if(w.len()){var R,E=w.first(),D=n[T],H=n[E];if(C.add(E),R=u.call(this.oSB,D,H)){var W=l(D.f,R.A.e,R.A.s),k=l(H.f,R.B.e,R.B.s);W||k?((T==E?W:W&&!k)&&(S.push(t(D.first(),W)),v.set(D.first(),W),m.remove(T)),T!=E&&!W&&k&&(S.push(t(H.first(),k)),v.set(H.first(),k),m.remove(E))):(m.remove(T),m.remove(E))}}m.remove(T)}S.forEach(function(t){var e,i,n=t.i;(e=this.get(n))&&(i=!0,(s||o(s))&&e.e&&e.e.len()>1&&e.e.forEachU(function(e){return e!=n&&(i=v.has(e))&&(t.m=U(t.m,v.get(e))),!i},this),i&&t.m&&(f=f||[]).push(t))},this)}return f}.call(u,a)),h.call(this,s.call(u,a)))}function n(t){return this.mP.get(t)||0}var s,h,a,u,c,f=0,g=!0,v=0,S=this.nMx;for(this.lDo++;v=S&&(f=-1),!f&&1==this.lDo&&t.call(this),--this.lDo,f},Object.addPrototypeOf(V.prototype,w.prototype),V.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 T,this.I=new y.Arr,this.F=new y.Arr,this.O=new y.Arr,this.oSB=new B(this)}}(V.prototype.init),V.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 y.Arr(t),n=i.first();n;n=i.next(n))n.rgS?(o=!0,i.push(n.rgS)):(e=e||new O).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},V.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},V.prototype.bB=function(){return this.I.first()},V.prototype.aIO=function(t,e,o){var i,n=this.oLgs,r=t[c(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))})}},V.prototype.rIO=function(t,e){var o,i,n=this.oLgs,r=t[c(e)];r&&(i=new y.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))},V.prototype.xIO=function(t,e){var o=t[c(e)],i=0;return o&&this.mTB&&this.mTB.forEach(function(t,e){i|=o.remove(e)}),!!i},V.prototype.aE=function(t){t&&(this.rgE=this.rgE||new y.Arr).add(t)},V.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 y.Arr(t);i.push(n);for(var r,s,h,a,u,c,l,p=0;p=0)for(var f=s;f1&&(m=new y.Arr,c.forEach(function(t){(C=x.get(t))&&((T=!C.i||!C.i.len())||(O=r.get(t),C.i.forEachU(function(t){return!(T=!c.has(t)||O&&!O.has(t))})),T&&m.add(t))},this),m.len()>1)){m.sort(a),b=m.first();for(var e,o=(U=new y.Arr(b)).first();o;o=U.next(o))(e=x.get(o))&&(e.o&&U.push(e.o),e.s&&U.push(e.s),e.f&&U.push(e.f));(B=x.get(b))&&(E=new y.Arr,m.forEach(function(t){if(b!=t&&!U.has(t)&&(V=x.get(t))){!this.mRB&&(this.mRB=new Map).set(B.b,B.cpy()),this.mRB.set(V.b,V.cpy()),E.add(t),V.cIO("i").add(b),B.cIO("o").add(t),(I=l(b,b.getEnd(),t.getStart()))&&!s.get(b,t,2)&&s.pls(b,t,2,new L(I,b.isW()||t.isW())),U.add(t);for(var e,o=t;o;o=U.next(o))(e=x.get(o))&&(e.o&&U.push(e.o),e.s&&U.push(e.s),e.f&&U.push(e.f))}},this),E.len()&&(this.mLB=this.mLB||new Map).set(b,E))}},this),this.clear(),this.add(x)}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,M=new y.M1;this.I.forEach(function(t){for(var e,o=(W=new y.Arr(t)).first();o;o=W.next(o))(e=this.get(o))&&e.lnk(W);M.set(t,W)},this),(k=this.I.forEachU(function(t){return M.get(t).has(this.i)&&t},this))&&this.I.setPos(k,0),this.I.forEach(function(t){(!k||!M.get(k).has(t))&&this.F.add(t)},this)}}else this.forEachU(function(t){return t.isE()})&&(e=4)}return e},V.prototype.DoS=function(t){var e=t?this.clt(t):0,o=0;if(!e)if(this.I.len()){var i=y.Arr.empty,n=this.bB(),r=y.Cpy(this.oSB.bI(n)),s=f(this.oT);if(this.forEach(function(t){o+=(this.IO(t.b,"o")||i).len()},this),o=2*b(1,o),this.oSB.res(),this.oSB.bI(n,r),t&&this.forEach(function(t){this.oSB.bI(t.b).l=l(t.b,null,null,s)},this),this.oSB.SB(n,n)||(e=U(e,-2)),!e){var h,a=this.oSB.bI(n).e;this.I.forEachU(function(t){return t!=n&&(h=this.F.has(t),this.oSB.SD(t,h?t.getStart():p(t,a,-l(t)),h?t.getEnd():a),this.oSB.SB(t,t)||(e=min(e,-2))),e},this)}e||(this.oSB.nMx=o,e=this.oSB.DoS())}else e=-4;return this.r=e},V.prototype.DoM=function(t){var e,o,i,n,r,s,a,u,c,g,S=this.oT;if(!this.r&&(e=this.bB())&&this.has(t))if(o=this.oSB.bI(e),i=this.oSB.bI(t),v.call(o))if(v.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=y.Mrg({t:n},e))},this),(s=S.oI.GetDefSchedulePDM())&&((a=function(t){return t&&1==t.scheduleType&&Date.Create(t.scheduleDate)||null}(s))||(u=function(t){return t&&2==t.scheduleType&&Date.Create(t.scheduleDate)||null}(s)))){var m,C,L;this.forEach(function(t){v.call(L=this.oSB.bI(t.b))&&((!m||L.s.Compare(m)<0)&&(m=L.s),(!C||L.e.Compare(C)>0)&&(C=L.e))}),g=a?p(e,c=p(e,a,l(e,m,o.s)-n),o.l):p(e,c=p(e,u,-(l(e,o.s,C)+n)),o.l)}else r?this.oSB.bI(t).r=y.Mrg({t:1},t.se()):g=p(e,c=p(e,t.getStart(),-(l(e,o.s,i.s)+n)),o.l);c&&g&&d.call(o,c,g),!this.DoS()&&(this.r=function(){var t,e=0,o=f(this.oT);return this.oSB.rgB.forEach(function(i){v.call(t=this.oSB.bI(i))?i.SetOptions({start:t.s,end:h(t.e,-o)}):(this.aE(i),e=-5)},this),e}.call(this))}else this.r=-7;else this.r=-6;return this.r},x.prototype.init=function(t){this.o3=t},x.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 y.Arr,n=this.o3.oSB.rgB,r=n.first();r;r=n.next(r))e(r,o);return o},x.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)||M;Math.abs(l(e,e.getEnd(),p(t,t.getStart(),i.l,i.w)))=0},this);o=0;o++);return o}.call(this,t),f=this.u.length;if(p=0&&i(u,p)<=0&&(u=function(t,e){return t.Max(e)}(u,l),c=n(c,p),h=s(o),o.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,u,c,h,o):r.call(this,u,c,h,o.rE()))},i.prototype.compact=function(){for(var t=this.u,e=t.length,o=0;o.5}function h(o,h){if(1&n&&i.feT(function(n){var c,l,p,f,g,v=n.s||n.b.getHistogramShape(),d="Spline"==v.primitive,m=n.b.getShowHistogramValues(),C=n.b.getFormatHistogramValues(),L={},T=y.Apy(y.Cpy(v),y.Apy(o&&o.call(h||this,L,n)||L)),G=!d&&y.Apy(T,{frameColor:null}),O=d?T:v,b=d?function(o,i){t.drawShape(e,i,{points:o})}: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||d)&&(i.feU(n,function(i,n,h){p=[g=this.d2X(i.s),a(h+n),this.d2X(i.e)-g,n*w],!o&&(this.rgV=this.rgV||[]).push({v:n,c:p}),G&&t.drawShape(p,G),m&&(c=m.Evaluate(u(n)))&&r(n,p,{cbkF:C&&function(t){return C.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,l=6*i,p=a(c(s))-a(c(s+u/5))>3?~~(l/2)+i:0,f=t.sizeHTMLText(h).height,g=3*f/4,v=[],d=[],S=260|(i<0?2:0);t.save(),t.strokeStyle=e.r,t.beginPath(),t.moveTo(o,a(c(s))),t.lineTo(o,a(c(h)));for(var m,C=s;C<=h;C+=u)if(t.moveTo(o,m=a(c(C))),t.lineTo(o+l,m),C!=s&&n(v,m,f,C),p&&C=i.v&&(t.stroke(),t.strokeStyle=i.c,t.beginPath(),i=null);t.stroke(),t.restore()}}(O,G),(f=G&&i.M>=G.v)&&((g=e.slice())[3]=a(G.v)-g[1],t.selClip(g),h.call(this,function(t){t.fillColor=G.c}),t.resClip(),(d=e.slice())[3]=y.BOf(e)-(d[1]=y.BOf(g)),t.selClip(d)),h.call(this),f&&t.resClip(),8&n&&(!i.l||i.l==i.i+1)&&G&&function(o){if(o){var i,n=[e[0],a(o.v)],s=e[2];t.save(),t.setLineDash([1]),t.drawHLine(n,s,o.c),r(o.v,null,{cbkF:function(t){return(i=o.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:o.c}}),t.restore()}}(G)},s.prototype.hI=function(){function t(){this.p=new y.M1,this.i=new y.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 y.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 y.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 c=[],l=new Map;h.forEach(function(t,e){c.push(e)}),c.sort(function(t,o){return e.getPos(o)-e.getPos(t)}).forEach(function(t){l.set(t,h.get(t))}),h=l}return h}(t)).forEach(function(t){h=b(h,t.M),a.push(t)})}),a.forEach(function(t){t.M=h}),n}return this.oHD||(this.oHD=t.call(this))},s.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),y.IRt(o.slice(),-4,0),4),y.ORt(o,0,o[3])}))},s.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]&&y.ROf(o)-y.LOf(t)<=y.D.WindowSplitSize},s.prototype.V=function(t){function e(t){var e,i=0;return o.forEach(function(o){(e=t-o.c[0])>=0&&e