/* @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 Math.round(t)}function o(){return Math.max.apply(0,arguments)}function i(){return Math.min.apply(null,arguments)}function n(t){return null!=t}function s(t){return null==t}function r(t,e,o){return s(t)?~~o:h.s2F(t,e)}var h=h||window.exontrol,l=h.G;h.Def.OrgChart={},h.Shapes.OrgChart={dfnode:{normal:{frameColor:"black"},disabled:{opacity:.5},hover:{},click:{}}},h.Mrg(h,function(){function t(t,e){this.init(t,e)}return t.version="3.2",t.type="OrgChart",t.SingleSelEnum={exDisableSel:0,exEnableSel:1,exSingleSel:2,exToggleSel:4,exDisableCtrlSel:8,exDisableShiftSel:16,exDisableDrag:32},t.Options={scrollBars:null,scrollBarsRoot:void 0,tfi:null,locked:null,readOnly:null,wheelChange:null,expandGlyphSize:null,flow:null,align:null,margins:null,showExpandGlyphs:null,singleExpandGlyphs:null,show:null,filter:null,smooth:null,singleSel:null,ensureOnExpand:null,expandOnDblClick:null,pad:null,formatText:null,imageAlign:null,size:null,imageSize:null,shapes:null,cursors:null,showLinks:null,link:null,linka:null,linkg:null,nodes:null,zoom:null,zoomLevels:null,allowActions:null,selection:null},t.prototype.init=function(t,e){var o=new h.OrgChart.CV(this);this.oCV=o,this.oCV.oG=this,this.oVS=new h.ScrollBar,this.oVS.oCV=this.oCV,this.oVS.getWheelChange=function(){return this.oCV.getWheelChange()},this.oVS.getLocked=function(){return this.oCV.getLocked()};var i=this.oVS.drawP;this.oVS.drawP=function(t,e,n,s){i.call(this,t,e,n,s),o.onDrawPartScroll(this,t,e,n,s)},this.oHS=new h.ScrollBar,this.oHS.oCV=this.oCV,this.oHS.getWheelChange=function(){return this.oCV.getWheelChange()},this.oHS.getLocked=function(){return this.oCV.getLocked()};var n=this.oHS.drawP;this.oHS.drawP=function(t,e,i,s){n.call(this,t,e,i,s),o.onDrawPartScroll(this,t,e,i,s)},this.Root=this.oCV.oR,this.Listeners=this.oCV.oLts,this.oCW=new h.CW(t,{AllowXChg:0,ScrollBars:h.Def.OrgChart.scrollBars}),this.oCW.oT=this,this.Shortcuts=this.oCW.oSts,this.initCW(),this.exports(),this.SetOptions(e,!0),h.DPR.Reg(this),this.Refresh()},t.prototype.initCW=function(){var t=this.oCW,e=(t=t.Add("control",{Dock:5})).Add("vertical",{Dock:4,Resizable:!1,Size:16,VisibleExtends:"vscroll,control",Opacity:0,HoverOpacity:1});e.Add("grip",{Dock:2,Size:16,AllowXChg:!1,SizeExtends:"grip,hscroll",VisibleExtends:"hscroll",Resizable:!1}),e.Add("vscroll",{Dock:5,AllowXChg:!1,Control:this.oVS}),t.Add("hscroll",{Dock:2,Resizable:!1,VisibleExtends:"control",Control:this.oHS,Opacity:0,HoverOpacity:1}),t.Add("main",{Dock:5,HoverExtends:"vertical,vscroll,hscroll,grip",Extends:"vertical,hscroll",Control:this.oCV,HScroll:"hscroll",VScroll:"vscroll"})},t.prototype.exports=function(){var e=this.oCW;e&&(["GetCanvas","SetCanvas","SetClientRect","GetClientRect","p2W","W","gPtr","inv"].forEach(function(t){t in this||(this[t]=e[t].bind(e))},this),this.GetScrollBars=e.GetSBs.bind(e),this.SetScrollBars=e.SetSBs.bind(e));var o=this.oCV;if(o){["SetOptions","GetOptions","opt","bU","eU","onRL","Node","EnsureVisibleNode","Refresh","Smooth","GetFocus","SetFocus","GetSelection","SetSelection","SelectAll","UnselectAll","RemoveSelection","EnsureVisibleSelection","getSelCount","Shuffle"].forEach(function(t){t in this||(this[t]=o[t].bind(o))},this);var i=o.W();n(i)&&["GetScroll","SetScroll","GetSI","SetSI","toEVP","toEVR","SSw"].forEach(function(t){void 0===o[t]&&(o[t]=i[t].bind(i))}),h.expO(t.Options,this,o),h.expO({Options:null,Focus:null,Selection:null},this,o)}},t.prototype.defAA=function(){return"fit(Shift+MButton,Ctrl+MButton,Alt+MButton),zoom(MButton),select(Shift,Ctrl),scroll"},t.prototype.roAA=function(){return"scroll,zoom,fit,select"},t.prototype.GetStatistics=function(){function t(t,e){return h.Format(t,e||0)}var e="",o=h.C2R(this.GetClientRect()),i=this.oCV;return e+="Size: "+t(o[2])+"x"+t(o[3]),e+="\nZoom: "+t(i.getZoom())+"%",e+="\nNode: "+t(i.nN)+"/"+t(i.oR.dscn().len()),e+="\nLink: "+t(i.nL),e+="\nSel: "+t(i.getSelCount())},t.prototype.GetLayout=function(t){return h.Lay.Save(this.onlayout,this,t)},t.prototype.SetLayout=function(t,e){h.Lay.Load(t,this.onlayout,this,e)},t.prototype.onlayout=function(t){this.oCW.onlayout(t)},t.prototype.BeginUpdate=function(){this.bU()},t.prototype.EndUpdate=function(){this.eU()},t.prototype.Update=function(t,e){this.bU(),t&&t.call(e||this),this.eU()},h.ComboBox&&(t.prototype.dCBl=function(t,e,o){var i=this.oCV,n=i.getSel(),s=n&&n.first();i.drawCS(t,e,i.getSelCount(),36),o.oO.label=s&&o.label(s.getImage(),s.getCaption())||""},t.prototype.cCB=function(e){var o=this.oCV,i=o.e2V(e),n=o.p2O(o.gPtr(e));return!i||i instanceof t.CV&&(!n||!n.expandType)},t.prototype.sCB=function(t){return t&&this.SetSelection(null),this.getSelCount()},h.CW.prototype.SetCanvas=function(t,e){return h.ComboBox.implExHost(t,"onselchange")}(h.CW.prototype.SetCanvas)),h.expO({Layout:null,Statistics:null},t.prototype),{OrgChart:t}}()),h.Mrg(h.OrgChart,function(){function t(t){this.init(t)}function a(t){this.oN=t,this.rgVO=new h.M1,this.oSize=this.doL()}var u={exNodeChild:1,exNodeAssistant:2,exNodeGroup:4},p={visible:!0,caption:null,image:null,key:null,flow:null,align:null,margins:null,show:null,showExpandGlyphs:null,singleExpandGlyphs:null,expand:null,expandAssistant:null,expandChild:null,expandGroup:null,pad:null,formatText:null,imageAlign:null,size:void 0,imageSize:void 0,shapes:null,cursors:null,shape:null,cursor:null,enabled:!0,selectable:!0,link:null,linka:null,linkg:null};return t.prototype.init=function(t){this.oT=t,this.oR=new Node(this),this.sSA="smth-"+h.Rand(),this.lI=0,this.nN=0,this.nL=0,this.iLts(),this.oO=h.Cpy(h.OrgChart.Options),this.oR.SetCaption("Root")},h.SB.addProto(t.prototype),t.prototype.GetOptions=function(){return this.oO},t.prototype.SetOptions=function(t,e){var o=!1;if(n(t)){var i=[],s=this.GetOptions();if(n(s)){for(var r in s){var l=t[r];void 0!==l&&(i.push(r),s[r]!==l&&(s[r]=h.CpV(l)))}if(e)for(var r in t)r in s||(s[r]=h.CpV(t[r]));if(o=0!=i.length){var a=this.oG||{};this.bU(),i.forEach(function(t){var e=h.setM(t);e in this?this[e].call(this,s[t]):e in a&&a[e].call(a,s[t])},this),this.eU()}}}return o},t.prototype.opt=function(t,e){var o=this.oO[t];return s(o)&&s(o=h.Def.OrgChart[t])&&(o=e),o},t.prototype.GetCanvas=function(){return this.canvas},t.prototype.SetCanvas=function(t,e){this.udefSts(this.oSts),this.oSts=null,this.resAO(),t=h.CC.GetCanvas(t),!e&&h.CC.SetCanvas(this,t),this.canvas=t,h.CC.GetCanvas(this.canvas)&&this.defSts(this.oSts=new h.Sts)},t.prototype.SetClientRect=function(t){var e=h.CC.GetCanvas(t);e&&(t=[0,0,e.width,e.height]),this.client=h.C2R(t),this.resVO(),this.updSPR()},t.prototype.GetClientRect=function(){return this.client.slice()},t.prototype.GetInsideRect=function(t){var e=this.unscaled(this.getBorder()),o=h.IRt(this.GetClientRect(),-e,-e);return t||(o[2]=this.scaled(o[2]),o[3]=this.scaled(o[3])),o},t.prototype.GetCanvasRect=function(){var t=this.GetClientRect(),e=this.GetCanvas();return n(e)&&(t=[0,0,e.width,e.height]),t},t.prototype.GetVisibleRect=function(){return h.NRt(this.GetClientRect(),this.GetCanvasRect())},t.prototype.GetViewRect=function(){return h.EArtC(this.GetCanvas())},t.prototype.c2V=function(t,e){var o=this.GetViewRect();return s(e)&&(e=l.Y(t),t=l.X(t)),{x:t+o[0],y:e+o[1]}},t.prototype.v2C=function(t,e){var o=this.GetViewRect();return s(e)&&(e=l.Y(t),t=l.X(t)),{x:t-o[0],y:e-o[1]}},t.prototype.c2Vrt=function(t){var e=this.c2V(t);return[e.x,e.y,t[2],t[3]]},t.prototype.v2Crt=function(t){var e=this.v2C(t);return[e.x,e.y,t[2],t[3]]},t.prototype.onpaint=function(t){this.lI||(this.updSPR(),h.SB.prototype.onpaint.call(this,t))},t.prototype.e2W=function(t){return this.gCW().e2W(t)},t.prototype.e2V=function(t){return(this.e2W(t)||{}).oC||null},t.prototype.onmousemove=function(t){var e,o=this.gPtr(t),i=this.getCursor(o);return i&&(e=this.GetCanvas())&&(e.style.cursor=i),i},t.prototype.onwheel=function(t){if(this.isSelectable()){var e=this.gPtr(t);if(n(e)&&h.PInR(e.x,e.y,this.GetClientRect()))return this.dowheel(t)}return!1},t.prototype.dowheel=function(t){return!!(2&h.ModK(t))&&(this.zoomOnWheel(t),!0)},t.prototype.ondown=function(t){if(this.isSelectable()){h.A.Cancel("ss*");var e=this.gAA();e.Do(this,t),e.CanDo(t,!0)&&!h.RUR.Rng()&&this.doRUR(t,function(){})}return!0},t.toClick=function(t){return{dblClick:t.drag&&(t.drag.long||1!=t.drag.click)||!1,button:h.e2B(t),modifiers:h.ModK(t)}},t.prototype.toClick=function(t,e){e.node=this.p2N(this.gPtr(t))},t.prototype.onA=function(t,e){t&&(h.H.VisitA(this,t),this.inv(),this.onanchorclick(t))},t.prototype.onClick=function(e,o,i){var n=e?e.node||e:null,s=this.gPtr(i),r=t.toClick(i);this.toClick(i,r),o&&(e&&void 0!==e.expandType||this.allowSelect()&&this.gAA().Has("select")&&(this.selectModifierEvent(i),this.select(n),this.selectModifierEvent(i)),n&&(this.EnsureVisibleNode(n),e.node&&(this.ToggleExpandNode(n,e.expandType),this.onChange("expand-node",n)))),this.onA(this.p2A(s),r),e&&void 0!==e.expandType||this.onclick(r)},t.prototype.onDblClick=function(e,o){var i=e?e.node||e:null,s=t.toClick(o);this.toClick(o,s),n(i)&&this.getExpandOnDblClick()&&this.ToggleExpandNode(i,e.expandType),e&&void 0!==e.expandType||this.onclick(s)},t.prototype.onclick=function(t){this.oLts.onclick.do(t)},t.prototype.onanchorclick=function(t){this.oLts.onanchorclick.do(t)},t.prototype.onChange=function(t,e){this.onchange({object:e,action:t})},t.prototype.onchange=function(t){this.oLts.onchange.do(t)},t.prototype.onkeydown=function(t){this.onkey(t,-1)},t.prototype.onkeyup=function(t){this.onkey(t,0)},t.prototype.onkeypress=function(t){this.onkey(t,1)},t.prototype.onkey=function(t,e){this.oSts&&this.oSts.onkey(t,e)},t.prototype.onlayout=function(t){var e;t.IsSave()?(e=this.GetScroll(),t.Add("zoom",this.GetZoom()),t.Add("sel",function(){var t=[];return this.getSel().forEach(function(e){t.push(e.getKey())}),t.join()}.call(this)),t.Add("coll",function(){var t=new Map,e="";return this.oR.forEach(function(e){e.isExpanded(1)||t.set(e,1|(t.get(e)||0)),e.isExpanded(2)||t.set(e,2|(t.get(e)||0)),e.isExpanded(4)||t.set(e,4|(t.get(e)||0))}),t.forEach(function(t,o){e+=(e?",":"")+o.getKey()+"("+t+")"}),e}.call(this)),t.Add("hscroll",e.x),t.Add("vscroll",e.y)):(this.oLts.lock(),this.bU(),this.SetZoom(t.GetValue("zoom")),function(t){n(t)&&this.SetSelection(t.split(","))}.call(this,t.GetValue("sel")),function(t){n(t)&&(this.oR.forEach(function(t){t.SetExpand(!0)}),h.B.split(t).forEach(function(t){var e,o=this.Node(t.caption);o&&(e=~~t.subText)&&o.SetExpandType(e,!1)},this))}.call(this,t.GetValue("coll")),this.SetScroll({x:t.GetValue("hscroll"),y:t.GetValue("vscroll")}),this.eU(),this.oLts.unlock())},t.prototype.onScroll=function(t){this.onscroll({view:this,type:t.type,value:t.value})},t.prototype.onscroll=function(t){this.oLts.onscroll.do(t)},t.prototype.onhscroll=function(t){this.resVO(),this.onScroll({type:1,value:t})},t.prototype.onvscroll=function(t){this.resVO(),this.onScroll({type:0,value:t})},t.prototype.udefSts=function(t){t&&t.RemoveOf(this)},t.prototype.defSts=function(t){n(this.oG)&&(this.oG.oSts=t)},t.prototype.iLts=function(){this.oLts=new h.Lts,this.oLts.add("onselchange"),this.oLts.add("onclick"),this.oLts.add("onanchorclick"),this.oLts.add("onchange"),this.oLts.add("onscroll")},t.prototype.p2O=function(t){var e=this.GetClientRect(),o=l.X(t)-e[0],i=l.Y(t)-e[1];return this.getVO().p2O(this.scaled(o),this.scaled(i))},t.prototype.p2N=function(t){var e=this.p2O(t);return e&&(e.node||e)||null},t.prototype.p2V=function(t){var e=this.ptCA(t,!0),o=this.origin();return{x:l.X(e)+o[0],y:l.Y(e)+o[1]}},t.prototype.p2A=function(t){return t=this.p2V(t),h.H.P2A(this,l.X(t),l.Y(t))},t.prototype.hitTest=function(t){var e;if(this.isSelectable()&&(e=this.p2O(t)))return{code:e,callback:null,thisArg:this}},t.prototype.getMoveNodes=function(t,e){var o=null;return t instanceof Node&&(o=(e=s(e)||e)&&this.getSelCount()>1&&this.isSelected(t)?this.getSel().byO():[t]),o},t.prototype.ToggleExpandNode=function(t,e){this.Smooth(function(){var o=this.o2R(t);t.ToggleExpand(e),this.updSPR();var i=this.o2R(t);if(n(i)&&n(o)){var s=this.GetScroll();s.x+=i[0]-o[0],s.y+=i[1]-o[1],this.SetScroll(s)}if(this.getEnsureOnExpand()){var r=this.Lyt(),l=r.o2R(t),a=t.getVisibleDescendant(e);n(a)&&(l=null,a.forEach(function(t){l=h.URts(l,r.o2R(t))})),this.EnsureVisibleClient(l)}},this,function(o,i,n,s,r,h,a,p){var c=n.o2R(t.getExpandGlyph(e),this.origin(s))||n.o2R(t,this.origin(s));c=l.C2R(l.R2C(c));var f=h.o2R(t.getExpandGlyph(e),this.origin(a))||h.o2R(t,this.origin(a));f=l.C2R(l.R2C(f)),t.dscn(e).forEach(function(t){[t,t.getExpandGlyph(null),t.getExpandGlyph(u.exNodeAssistant),t.getExpandGlyph(u.exNodeChild),t.getExpandGlyph(u.exNodeGroup)].forEach(function(t){var e=r.has(t),o=p.has(t);if(!e||!o){var s=n.has(t);s!=h.has(t)?(e?o||p.push(t,f.slice()):(r.push(t,c.slice()),o||p.push(t,h.o2R(t,this.origin(a)))),i.remove(t)):s&&i.push(t)}},this)},this)})},t.prototype.EnsureVisibleClient=function(t,e,o){if(n(t)){var s=t;if(h.IsA(t)||(s=this.Lyt().o2R(t)),!h.EyR(s)){var r=this.GetScroll(),l=this.getScale(),a=l;if(e){var u=this.GetInsideRect(!0),p=this.rtCA(s,!1);a=i(l*u[2]/p[2],l*u[3]/p[3]),e=a0&&(h.A.Cancel(this.sSA),r=this.getVO(),a=this.Lyt(),u=this.GetScroll(),p=this.GetInsideRect(),this.bU()),n(this.rgVO)&&this.rgVO.clean(),t.call(e),i>0){var c=this.updSPR;this.updSPR(this.Lyt().oSize),this.updSPR=function(){},this.rgVO=r,this.oLyt=a,this.eU(),this.oLyt=null,this.rgVO=null,this.updSPR=c;var f=this.getVO(),d=this.Lyt(),g=this.GetScroll(),y=new h.Arr(r.diff(f));o instanceof Function&&o.call(this,p,y,a,u,r,d,g,f),y.forEach(function(t){var e=r.get(t),o=f.get(t);s(e)&&r.push(t,a.o2R(t,this.origin(u))||l.C2R(l.R2C(o))),s(o)&&f.push(t,d.o2R(t,this.origin(g))||l.C2R(l.R2C(e)))},this),(this.rgVO=r).morph(f,{inv:this.invAO,refresh:this.Refresh,thisArg:this,name:this.sSA,onXDoL:!1,duration:i})}}},t.prototype.GetFocus=function(){var t=this.rgSel;return(n(t)?"first"in t?t.first():t:null)||this.oR},t.prototype.SetFocus=function(t){var e=this.Node(t)||this.oR;return this.SetSelection(e),this.EnsureVisibleNode(e),e},t.prototype.isSelected=function(t){var e=n(this.rgSel);return s(t)?!e:!!e&&(this.rgSel instanceof h.Arr?this.rgSel.has(t):this.rgSel==t)},t.prototype.getSelCount=function(){var t=0;if(n(this.rgSel)){if(this.rgSel instanceof h.Arr)return this.rgSel.len();t++}return t},t.prototype.selectModifierEvent=function(t){this.oSelEv=t&&{modifier:h.ModK(t),selection:this.rgSel}},t.prototype.removeSel=function(t){this.rgSel&&this.isSelected(t)&&(this.rgSel instanceof h.Arr?(this.rgSel.remove(t),this.rgSel.len()||(this.rgSel=null)):this.rgSel=null)},t.prototype.valueToNodes=function(t){if(n(t)){if(t instanceof Array||t instanceof h.Arr){var e=new h.Arr;return t.forEach(function(t){var o=this.Node(t);n(o)&&e.push(o)},this),e}return this.Node(t)}return null},t.prototype.isSable=function(t){return t instanceof Node&&t.isSelectable()},t.prototype.select=function(t,e,o){function i(t,e,o){var i=!1,r=t.isSelected(e),l=e&&t.isSable(e);if(s(e))i=n(t.rgSel),t.rgSel=null;else if(t.isSingleSel()){var a=t.rgSel;t.rgSel=!l||o&&r?null:e,i=a!=t.rgSel}else o&&r?(i=r,t.removeSel(e)):(o||(i=n(t.rgSel)&&(!r||t.rgSel.len()>1),t.rgSel=null),l&&(t.rgSel=t.rgSel||new h.Arr).push(e)),i|=r!=t.isSelected(e);return i}var r=!1,l=!o&&(this.isToggleSel()||this.isToggleCtrlSel()&&2&this.oSelEv.modifier),a=this.valueToNodes(t);a instanceof h.Arr?l?a.forEach(function(t){r|=i(this,t,l)},this):(r=!a.equal(this.rgSel))&&(this.isSingleSel()?i(this,a.last()):(this.rgSel=new h.Arr,a.forEach(function(t){this.isSable(t)&&this.rgSel.push(t)},this))):r=i(this,a,l),r&&(0==this.lI&&(void 0===e||e)&&this.invAO(),this.onselchange(this.GetSelection()))},t.prototype.onselchange=function(t){this.oLts.onselchange.do(t)},t.prototype.onSetAO=function(t){function e(e,o){var l=i.getShape(e);n(l)&&(!h.EyO(l.hover)&&t.set({owner:i,id:e.idAOH,object:e,inv:i.inv,hitTest:function(t,o,n){return r?r===e:i.isAP(t,o)&&n.object==i.p2O([t,o])},duration:s}),!h.EyO(l.click)&&t.set({owner:i,id:e.idAOC,object:e,inv:i.inv,hitTest:function(t,o,n){return r?r===e:i.isAP(t,o)&&n.object==i.p2O([t,o])},actOn:r==e?1:4,duration:s}))}var o=null;if(this.isSelectable()&&!t.hasOf(this)&&(o=this.getVO())){var i=this,s=i.getSmooth(),r=i.orurOnlyAO;r instanceof Node?e(r,o.indexOf(r)):o.forEach(function(t,o,i){e(o)},this)}},t.prototype.onimg=function(){this.Smooth(function(){this.Refresh()},this)},t.prototype.onRL=function(){this.resVO(),this.oLyt=null},t.prototype.resVO=function(){this.rgVO=null,this.resAO()},t.prototype.bU=function(){this.lI++},t.prototype.eU=function(){if(!--this.lI){var t=this.gCW();!t||this.oLyt?this.invAO():(this.resAO(),t.Render())}},t.prototype.beU=function(){this.bU(),this.eU()},t.prototype.Lyt=function(){if(s(this.oLyt)){var t=this.gCtx(),e=null;t&&(e=h.TFI.bCTX(t,this.getTfi())),this.oLyt=new a(this.oR),t&&h.TFI.eCTX(t,e)}return this.oLyt},t.prototype.getVO=function(){if(s(this.rgVO)){var t=this.GetScrollRect();this.getShowLinks()&&h.IRt(t,t[2],t[3]),this.rgVO=this.Lyt().scroll(t,this.origin())}return this.rgVO},t.prototype.GetScroll=function(){return this.W().GetScroll()},t.prototype.SetScroll=function(t){this.W().SetScroll(t)},t.prototype.isExtSBS=function(){var t=this.gCW();return t&&12288==(12288&t.gSBs())},t.prototype.getScale=function(){return s(this.scale)&&(this.scale=this.getZoom()/100),this.scale},t.prototype.scaled=function(t){return t/this.getScale()},t.prototype.unscaled=function(t){return t*this.getScale()},t.prototype.origin=function(t){t=t||this.GetScroll();var e=this.getBorder();return[-t.x+e,-t.y+e]},t.prototype.GetScrollRect=function(){var t=this.origin(),e=this.GetClientRect();return[-t[0],-t[1],this.scaled(e[2]),this.scaled(e[3])]},t.prototype.GetZoom=function(){return this.oO.zoom},t.prototype.SetZoom=function(t){this.bU(),this.scale=null,this.oO.zoom=t,this.updSPR(),this.eU()},t.prototype.getZoom=function(){var t=this.GetZoom(),e=this.getZoomLevels();return s(t)&&(t=100),o(e[0],i(e[e.length-1],t))},t.prototype.GetZoomLevels=function(){return this.oO.zoomLevels},t.prototype.SetZoomLevels=function(t){this.bU(),this.scale=null,this.oO.zoomLevels=t,this.updSPR(),this.eU()},t.prototype.getZoomLevels=function(){var t=[100],e=new h.Arr;return h.ToS(this.GetZoomLevels(),"25,35,50,65,75,80,90,100,110,125,150,175,200,250,300,400,500").split(",").forEach(function(t){e.push(o(10,i(1e3,h.ToN(t,100))))}),e.isEmpty()||(t=e.byO()).sort(function(t,e){return t-e}),t},t.prototype.zoomOnWheel=function(t){var e=!1,n=h.WhelInc(t);if(n){var s=this.getZoomLevels(),r=100*this.getScale(),l=function(t,e){var o=0,i=e.length;if(t>=e[o])for(;t>=e[o+1]&&oMath.abs(t.drag.offset.dy)?t.drag.offset.dx:t.drag.offset.dy),t.drag.current);break;case 3:case 4:case 5:n(r)&&r.call(h,t)}},this)}},t.prototype.rurFit=function(t,e){e.rurOnlyAO={},e.rurDrop=function(t){this.FitToClient(this.focusRectAbs(t))};var o=this.getShape("frameFit");if(n(o)){function i(t,e,i){e.drawShape(i,o.normal||o)}e.rurEFPaint=i,s(e.rurEFPaint)&&(e.rurDrag=function(t){i(0,this.gCtx(),this.rtCA(l.Rect(t.from,t.to),!1))})}this.rurDrag(t,e)},t.prototype.rurSelect=function(t,e){if(this.allowSelect()&&this.isSelectByDrag(t)){var o=this.getShape("frameSel");if(n(o)){function i(t,e,i){e.drawShape(i,o.normal||o)}e.rurEFPaint=i}var r=!1;e.rurDrag=function(t){!r&&(r=2==t.event.drag.status)&&(this.orurOnlyAO={},this.invAO()),s(e.rurEFPaint)&&n(o)&&i(0,this.gCtx(),this.rtCA(t.frame,!1))},e.rurDrop=function(t){this.bU(),this.selectModifierEvent(t.event),this.isSingleSel()?this.select(this.p2O(this.ptCA(t.to,!1))):this.select(this.Lyt().r2O(l.Rect(t.from,t.to))),this.EnsureVisibleClient(this.focusRectAbs(t),!0,!0),this.selectModifierEvent(null),this.eU()},this.rurDrag(t,e)}},t.prototype.rurMove=function(t,e){var o=this.gPtr(t),i=this.p2O(o),r=this.Lyt().o2R(i),l=this.getMoveNodes(i,!0);if(l&&r){var a=this.getShape("frameDrag"),u=l.length>1?l.length:null,p=null,c=null,f=null;h.EyO(a)&&(a=null);e.rurEFPaint=function(t,e,o,n){p=p||n;var s=!1,r=this.p2O(this.ptCA(t.to,!1)),c=[this.scaled(o[0]),this.scaled(o[1]),this.scaled(o[2]),this.scaled(o[3])];r instanceof Node&&(s=Node.canParent(l,r)),this.ctxScale(e,[0,0,0,0],function(){s||(e.globalAlpha=.25),a?e.drawShape(c,a.normal||a):this.drawO(e,c,i)},this),u&&e.drawHTMLText(u,o,h.DrawTextFormatEnum.exTextAlignCenter|h.DrawTextFormatEnum.exTextAlignVCenter)},e.rurEFOpts=function(t,e){e.visible=!1,e.limitClient=!1},e.rurDrag=function(t){n(p)&&p.SetVisible(t.from!=t.to),t.frame=h.ORt(r.slice(),t.to.x-t.from.x,t.to.y-t.from.y),clearTimeout(f);var e=this.p2O(this.ptCA(t.to,!1));if(e instanceof Node&&Node.canPosition(l,e)){var o=this,a=e.GetPosition();f=setTimeout(function(){o.Smooth(function(){s(c)&&(c=i.ownCol())&&c.savePos(),o.bU(),l.forEach(function(t){t.SetPosition(a++)}),o.EnsureVisibleNode(i),o.eU(),n(p)&&p.Render()})},512)}},e.rurCancel=function(t){clearTimeout(f),n(c)&&this.Smooth(function(){this.bU(),c.loadPos(),this.eU()},this)},e.rurDrop=function(t){clearTimeout(f);var e=this.p2O(this.ptCA(t.to,!1));e instanceof Node&&Node.canParent(l,e)&&this.Smooth(function(){this.bU(),l.forEach(function(t){t.SetParent(e)}),this.EnsureVisibleNode(i),this.eU()},this)},this.rurDrag(t,e)}},t.prototype.rurDragDrop=function(t,e){var o=this.p2O(this.gPtr(t));this.isSable(o)&&h.RUR.D3(t,{object:o,shape:this.getShape(o),client:this.rtCA(this.Lyt().o2R(o),!1),source:this,onpaint:function(t,e){this.source.drawO(t,e,this.object)},onclick:function(t){e.rurStatus&&e.rurStatus.call(this,t)},onmove:function(t){t.drag.setCursor(h.GP.Get(e.rurName,this.getCursors()))}})},t.prototype.ptCA=function(t,e){var o={x:l.X(t),y:l.Y(t)},i=this.GetScroll(),n=this.GetInsideRect(!0);return s(e)||e?(o.x-=n[0],o.y-=n[1],o.x=this.scaled(o.x),o.y=this.scaled(o.y),o.x+=i.x,o.y+=i.y):(o.x-=i.x,o.y-=i.y,o.x=this.unscaled(o.x),o.y=this.unscaled(o.y),o.x+=n[0],o.y+=n[1]),o},t.prototype.rtCA=function(t,e){return l.Rect(this.ptCA(l.R2C(t,17),e),this.ptCA(l.R2C(t,68),e))},t.prototype.doRUR=function(t,e,o,i){return h.RUR.Do(t,function(t){switch(t.drag.status){case 3:this.gAA().CanDo(t,!0)&&(h.RUR.Cancel(),this.gAA().Do(this,t,!0))}e.call(o,t)},this,i)},t.prototype.rurScroll=function(t,e){if(t){var o={oH:this.GetSI(!0),oV:this.GetSI(!1),scrollRange:this.sR},i=this.ptCA(this.GetInsideRect(!0),!0),r=null,h=this;n(e)&&(e.rurStatus instanceof Function&&(r=e.rurStatus),n(e.thisArg)&&(h=e.thisArg)),this.doRUR(t,function(t){switch(t.drag.status){case 1:this.orurOnlyAO=(n(e)?e.rurOnlyAO:null)||null,this.beU();break;case 7:this.orurOnlyAO=null,t.drag.cancel?this.Soom(null,i,[0,0]):s(t.drag.swipe)&&this.beU();break;case 2:this.rurScrollD(-t.drag.offset.dx,-t.drag.offset.dy,o);break;case 6:this.SSw(t.drag.swipe);break;case 3:case 4:case 5:n(r)&&r.call(h,t)}},this)}},t.prototype.rurScrollD=function(t,e,o){(o=o||{oH:this.GetSI(!0),oV:this.GetSI(!1)}).oH=o.oH||{pos:0,page:0},o.oV=o.oV||{pos:0,page:0},this.bU();var i=o.oH.pos+this.scaled(t),n=o.oV.pos+this.scaled(e);this.SetScroll({x:i,y:n}),this.eU()},t.prototype.rurDrag=function(t,e){function i(t){n(A)&&(t.updSPR=A,A=null)}function s(){p.frame=l.Rect(p.from,p.to),n(g)&&g.call(O,p)}if(n(t)){var r=this.GetClientRect(),a=this.gPtr(t),u=this.ptCA(a,!0),p={from:u,to:u,event:null,frame:l.Rect(u,u)},c={oH:this.GetSI(!0),oV:this.GetSI(!1),scrollRange:this.sR},f=null,d=null,g=null,y=null,S=null,x=null,C=null,v=null,O=this,G=null,A=null,E=null;n(e)&&(e.rurEFPaint instanceof Function&&(f=e.rurEFPaint),e.rurEFOpts instanceof Function&&(d=e.rurEFOpts),e.rurDrag instanceof Function&&(g=e.rurDrag),e.rurCancel instanceof Function&&(y=e.rurCancel),e.rurDrop instanceof Function&&(S=e.rurDrop),e.rurStatus instanceof Function&&(x=e.rurStatus),e.rurDragStart instanceof Function&&(C=e.rurDragStart),e.rurDragEnd instanceof Function&&(v=e.rurDragEnd),n(e.thisArg)&&(O=e.thisArg)),this.doRUR(t,function(t){switch(p.event=t,t.drag.status){case 1:if(n(C)&&C.call(O,p),this.orurOnlyAO=(n(e)?e.rurOnlyAO:null)||null,e&&e.rurAllowUpdateScrollRange||(A=this.updSPR,this.updSPR=function(){}),this.beU(),n(f)){s();var l={name:"frame",client:this.rtCA(p.frame,!1),relative:this.GetCanvas(),clip:this.GetCanvas(),onpaint:function(t,e){f.call(O,p,t,e,this)}};n(d)&&d.call(O,p,l),G=h.EF.Create(l)}break;case 7:clearTimeout(E),this.orurOnlyAO=null,i(this),this.bU(),t.drag.cancel?(this.rurScrollD(0,0,c),n(y)&&y.call(O,p)):t.drag.click||t.drag.long||!S||S.call(O,p),h.A.Rng(this.sSA)||this.onRL(),this.eU(),h.EF.Destroy(G),n(v)&&v.call(O,p);break;case 2:var a=t.drag.current.x-h.LOf(r);a>0&&(a=o(0,t.drag.current.x-h.ROf(r)));var u=t.drag.current.y-h.TOf(r);u>0&&(u=o(0,t.drag.current.y-h.BOf(r))),(a||u)&&this.rurScrollD(a,u),clearTimeout(E);var g=this.p2O(t.drag.current);n(g)&&n(g.node)&&!g.node.isExpanded(g.expandType)&&(E=setTimeout(function(){var t=g.node,e=t.oCV,o=null;n(A)&&(o=e.updSPR,e.updSPR=A),e.ToggleExpandNode(t,g.expandType),n(A)&&(e.updSPR=o)},512)),p.to=this.ptCA(t.drag.current,!0),p.dx=p.to.x-p.from.x,p.dy=p.to.y-p.from.y,s(),n(G)&&G.SetClient(this.rtCA(p.frame,!1));break;case 3:case 4:case 5:i(this),n(x)&&x.call(O,t)}},this,{contiguously:!0,client:r})}},t.prototype.focusPointAbs=function(t){var e=this.ptCA(t,!0),o=this.p2O(t);return n(o)&&(e=l.R2C(this.Lyt().o2R(o))),e},t.prototype.focusRectAbs=function(t){var e=l.Rect(t.from,t.to);if(!h.EyR(e)){var o=this.Lyt().r2O(e);if(o.length){var i=this.Lyt();o.forEach(function(t){e=h.URt(e,i.o2R(t))})}}return e},t.prototype.allowRur=function(t,e){return n(t)},t.prototype.rurAction=function(t,e,o){var i=this.gPtr(o),n={rurName:t,rurFlags:e,rurOnlyAO:this.p2O(i)||{},rurStatus:function(e){this.rurActionClick(t,e)}};if(this.allowRur(o,n)){var s="rur"+h.getP(function(t){for(var e,o="",i=0,n=t.length;il?a=null:a1){var n,s,r=this.toShape("multiSel");r&&(o=h.Format(o,0),n=t.sizeHTMLText(o),s=l.C2R(l.R2C(e,i),n.width+8,n.height+8,i),t.drawShape(s,r,{text:o}))}},t.prototype.onDrawPartScroll=function(t,e,o,i,s){if(640==o){var r=this.getScrollBarsRoot();if(n(r)){var h=this.Lyt(),a=l.R2C(h.o2R(this.oR)),u=l.R2C(i);t.isV()?u[1]=i[1]+a[1]/h.oSize.height*i[3]:u[0]=i[0]+a[0]/h.oSize.width*i[2],e.drawShape(l.C2R(u,3,3),{fillColor:r,primitive:"Circle"})}}},t.prototype.ctxScale=function(t,e,o,i){t.translate(e[0],e[1]),t.save(),t.scale(this.getScale(),this.getScale()),o.call(i||this,[0,0,this.scaled(e[2]),this.scaled(e[3])]),t.restore(),t.translate(-e[0],-e[1])},t.prototype.draw=function(t,e,o){this.nN=0,this.nL=0,this.ctxScale(t,e,function(){var e=this.getShowLinks();e==h.ShowLinksEnum.exHide?this.nN=this.drawN(t):e&h.ShowLinksEnum.exFront?(this.nN=this.drawN(t),this.nL=this.drawL(t)):(this.nL=this.drawL(t),this.nN=this.drawN(t))},this)},t.prototype.GetTfi=function(){return this.oO.tfi},t.prototype.SetTfi=function(t){this.bU(),this.oO.tfi=t||null,this.onRL(),this.eU()},t.prototype.getTfi=function(){return this.opt("tfi")},t.prototype.GetLocked=function(){return this.oO.locked},t.prototype.SetLocked=function(t){this.bU(),this.oO.locked=t,this.onRL(),this.eU()},t.prototype.getLocked=function(){return this.opt("locked",!1)},t.prototype.GetReadOnly=function(){return this.oO.readOnly},t.prototype.SetReadOnly=function(t){this.bU(),this.oAA=null,this.oO.readOnly=t,this.onRL(),this.eU()},t.prototype.isReadOnly=function(){return this.opt("readOnly",!1)},t.prototype.GetWheelChange=function(){return this.oO.wheelChange},t.prototype.SetWheelChange=function(t){this.bU(),this.oO.wheelChange=t,this.onRL(),this.eU()},t.prototype.getWheelChange=function(){return this.opt("wheelChange",18)},t.prototype.GetExpandGlyphSize=function(){return this.oO.expandGlyphSize},t.prototype.SetExpandGlyphSize=function(t){this.bU(),this.oO.expandGlyphSize=t,this.onRL(),this.eU()},t.prototype.getExpandGlyphSize=function(){return o(0,h.ToN(this.opt("expandGlyphSize",16)))},t.prototype.GetFlow=function(){return this.oO.flow},t.prototype.SetFlow=function(t){this.bU(),this.oFlow=null,this.oO.flow=t||null,this.onRL(),this.eU()},t.prototype.getFlow=function(){return s(this.oFlow)&&(this.oFlow=a[this.opt("flow")]||a.flowVertical),this.oFlow},t.prototype.GetAlign=function(){return this.oO.align},t.prototype.SetAlign=function(t){this.bU(),this.oO.align=n(t)?t:null,this.onRL(),this.eU()},t.prototype.getAlign=function(){return this.opt("align",h.AlignEnum.exAlignCenter)},t.prototype.GetMargins=function(){return this.oO.margins},t.prototype.SetMargins=function(t){this.bU(),this.oM=null,this.oO.margins=t||null,this.onRL(),this.eU()},t.prototype.getMargins=function(){if(s(this.oM)){var t=this.opt("margins",null);h.IsO(t)||(t={}),this.oM=h.Inh(t,h.Def.OrgChart.margins||{x:16,y:16,indent:16,border:8})}return this.oM},t.prototype.GetShowExpandGlyphs=function(){return this.oO.showExpandGlyphs},t.prototype.SetShowExpandGlyphs=function(t){this.bU(),this.oO.showExpandGlyphs=t,this.onRL(),this.eU()},t.prototype.getShowExpandGlyphs=function(){return this.opt("showExpandGlyphs",null)},t.prototype.GetSingleExpandGlyphs=function(){return this.oO.singleExpandGlyphs},t.prototype.SetSingleExpandGlyphs=function(t){this.bU(),this.oO.singleExpandGlyphs=t,this.onRL(),this.eU()},t.prototype.getSingleExpandGlyphs=function(){return!!this.opt("singleExpandGlyphs")},t.prototype.GetShow=function(){return this.oO.show},t.prototype.SetShow=function(t){this.bU(),this.oO.show=t,this.onRL(),this.eU()},t.prototype.getShow=function(){return this.opt("show",null)},t.prototype.GetFilter=function(){return this.oO.filter},t.prototype.SetFilter=function(t){this.bU(),this.oO.filter=t||null,this.onRL(),this.eU()},t.prototype.getFilter=function(){return this.opt("filter",null)},t.prototype.getFilterNodes=function(){return this.oR.fN(this.getShow(),this.getFilter())},t.prototype.GetSmooth=function(){return this.oO.smooth},t.prototype.SetSmooth=function(t){this.oO.smooth=t},t.prototype.getSmooth=function(){return o(0,h.ToN(this.opt("smooth",125)))},t.prototype.onAdd=function(t){this.onUpdateKey(t)},t.prototype.onRemove=function(t){this.onUpdateKey(t),this.removeSel(t)},t.prototype.onUpdateKey=function(t){this.mK2I=null},t.prototype.Node=function(t,e){function o(t,e){e.set(t.getKey(),t);var i=t.rgCld;n(i)&&i.forEach(function(t){o(t,e)});var s=t.rgAst;n(s)&&s.forEach(function(t){o(t,e)});var r=t.rgGrp;return n(r)&&r.forEach(function(t){o(t,e)}),e}if(t instanceof Node)return t;e=e||this.oR,this.mK2I=this.mK2I||new Map;var i=this.mK2I.get(e);return s(i)&&this.mK2I.set(e,o(e,i=new Map)),i.get(t)||null},t.prototype.GetSingleSel=function(){return this.oO.singleSel},t.prototype.SetSingleSel=function(t){this.bU(),this.n1S=null,this.oO.singleSel=t,this.onRL(),this.eU()},t.prototype.getSingleSel=function(){var t=this.n1S;return s(t)&&(s(t=this.GetSingleSel())&&(t=h.Def.OrgChart.singleSel),t=r(t,h.OrgChart.SingleSelEnum,h.OrgChart.SingleSelEnum.exEnableSel),this.n1S=t),t},t.prototype.GetSelection=function(){return this.rgSel&&(this.rgSel.byO&&this.rgSel.byO()||this.rgSel)},t.prototype.SetSelection=function(t){this.select(t,!0,!0)},t.prototype.SelectAll=function(){this.SetSelection(this.oR.dscn())},t.prototype.UnselectAll=function(){this.SetSelection(null)},t.prototype.getSel=function(){var t=h.Arr.empty;return n(this.rgSel)&&(t=this.rgSel instanceof h.Arr?this.rgSel:new h.Arr(this.rgSel)),t},t.prototype.EnsureVisibleSelection=function(){var t=this.getSel();if(!t.isEmpty()){var e=null,o=this.Lyt().rgVO;t.forEach(function(t){e=h.URt(e,o.get(t))}),this.EnsureVisibleClient(e,!0)}},t.prototype.RemoveSelection=function(){this.Smooth(function(){if(n(this.rgSel)){var t=new h.Arr(this.rgSel);t.isEmpty()||(this.rgSel=null,this.bU(),t.forEach(function(t){t.Remove()}),this.onRL(),this.eU())}},this)},t.prototype.allowSelect=function(){return this.getSingleSel()!=h.OrgChart.SingleSelEnum.exDisableSel},t.prototype.isSingleSel=function(){return this.getSingleSel()&h.OrgChart.SingleSelEnum.exSingleSel},t.prototype.isToggleSel=function(){return this.getSingleSel()&h.OrgChart.SingleSelEnum.exToggleSel},t.prototype.isToggleCtrlSel=function(){return 0==(this.getSingleSel()&h.OrgChart.SingleSelEnum.exDisableCtrlSel)},t.prototype.isShiftSel=function(){return 0==(this.getSingleSel()&h.OrgChart.SingleSelEnum.exDisableShiftSel)},t.prototype.allowSelectByDrag=function(){return 0==(this.getSingleSel()&h.OrgChart.SingleSelEnum.exDisableDrag)},t.prototype.isSelectByDrag=function(t){return 1&h.ModK(t)&&this.allowSelectByDrag()&&this.isShiftSel()},t.prototype.GetEnsureOnExpand=function(){return this.oO.ensureOnExpand},t.prototype.SetEnsureOnExpand=function(t){this.bU(),this.oO.ensureOnExpand=t,this.onRL(),this.eU()},t.prototype.getEnsureOnExpand=function(){return!!this.opt("ensureOnExpand",!0)},t.prototype.GetExpandOnDblClick=function(){return this.oO.expandOnDblClick},t.prototype.SetExpandOnDblClick=function(t){this.bU(),this.oO.expandOnDblClick=t,this.onRL(),this.eU()},t.prototype.getExpandOnDblClick=function(){return!!this.opt("expandOnDblClick",!0)},t.prototype.GetPad=function(){return this.oO.pad},t.prototype.SetPad=function(t){this.bU(),this.rgPad=null,this.oO.pad=t,this.onRL(),this.eU()},t.prototype.getPad=function(){return s(this.rgPad)&&(this.rgPad=h.pad2A(this.opt("pad",[4,4]))),this.rgPad},t.prototype.GetFormatText=function(){return this.oO.formatText},t.prototype.SetFormatText=function(t){this.bU(),this.nFT=null,this.oO.formatText=t,this.onRL(),this.eU()},t.prototype.getFormatText=function(){return s(this.nFT)&&(this.nFT=r(this.opt("formatText"),h.DrawTextFormatEnum,h.DrawTextFormatEnum.exTextAlignCenter|h.DrawTextFormatEnum.exTextAlignVCenter|h.DrawTextFormatEnum.exTextWordBreak|h.DrawTextFormatEnum.exTextWordEllipsis)),this.nFT},t.prototype.GetImageAlign=function(){return this.oO.imageAlign},t.prototype.SetImageAlign=function(t){this.bU(),this.nIA=null,this.oO.imageAlign=t,this.onRL(),this.eU()},t.prototype.getImageAlign=function(){return s(this.nIA)&&(this.nIA=~~this.opt("imageAlign",0)),this.nIA},t.prototype.GetSize=function(){return this.oO.size},t.prototype.SetSize=function(t){this.bU(),this.aSize=void 0,this.oO.size=t,this.onRL(),this.eU()},t.prototype.getSize=function(){return void 0===this.aSize&&(this.aSize=this.opt("size",null)),this.aSize},t.prototype.GetImageSize=function(){return this.oO.imageSize},t.prototype.SetImageSize=function(t){this.bU(),this.aIS=void 0,this.oO.imageSize=t,this.onRL(),this.eU()},t.prototype.getImageSize=function(){return void 0===this.aIS&&(this.aIS=this.opt("imageSize",null)),this.aIS},t.prototype.getBorder=function(){return this.getMargins().border},t.prototype.GetShapes=function(){return this.oO.shapes},t.prototype.SetShapes=function(t){this.bU(),this.sShs=null,this.oO.shapes=t,this.onRL(),this.eU()},t.prototype.getShapes=function(){var t=this.sShs;return s(t)&&(s(t=this.GetShapes())&&(t=h.Def.OrgChart.shapes),t=h.ToS(t,"Border(node),Expand(expand),FrameSel(select,frameSel),FrameFit(frameFit),Empty(frameDrag)"),this.sShs=t),t},t.prototype.GetCursors=function(){return this.oO.cursors},t.prototype.SetCursors=function(t){this.bU(),this.sCrs=null,this.oO.cursors=t,this.onRL(),this.eU()},t.prototype.getCursors=function(){var t=this.sCrs;return s(t)&&(s(t=this.GetCursors())&&(t=h.Def.OrgChart.cursors),t=h.ToS(t,"pointer(expand,drag-drop,pointer)"),this.sCrs=t),t},t.prototype.GetShowLinks=function(){return this.oO.showLinks},t.prototype.SetShowLinks=function(t){this.bU(),this.nSL=null,this.oO.showLinks=t,this.onRL(),this.eU()},t.prototype.getShowLinks=function(){var t=this.nSL;return s(t)&&(s(t=this.GetShowLinks())&&(t=h.Def.OrgChart.showLinks),t=r(t,h.ShowLinksEnum,h.ShowLinksEnum.exExtended|h.ShowLinksEnum.exCrossRect),this.nSL=t),t},t.prototype.GetLink=function(){return this.oO.link},t.prototype.SetLink=function(t){this.bU(),this.oL=null,this.oO.link=t,this.onRL(),this.eU()},t.prototype.getLink=function(){var t=this.oL;return t||((t=this.GetLink())||(t=h.Def.OrgChart.link),t=t||{type:-1,color:"rgb(128,128,128)"},this.oL=t),t},t.prototype.GetLinka=function(){return this.oO.linka},t.prototype.SetLinka=function(t){this.bU(),this.oLinka=null,this.oO.linka=t,this.onRL(),this.eU()},t.prototype.getLinka=function(){var t=this.oLinka;return s(t)&&(s(t=this.GetLinka())&&(t=h.Def.OrgChart.linka),t=t||{type:2,style:[2],color:"rgb(192,192,192)"},this.oLinka=t),t},t.prototype.GetLinkg=function(){return this.oO.linkg},t.prototype.SetLinkg=function(t){this.bU(),this.oLinkg=null,this.oO.linkg=t,this.onRL(),this.eU()},t.prototype.getLinkg=function(){var t=this.oLinkg;return s(t)&&(s(t=this.GetLinkg())&&(t=h.Def.OrgChart.linkg),t=t||{type:3,style:[2],color:"rgb(224,224,224)"},this.oLinkg=t),t},t.prototype.linkAttr=function(t){var e=this.getLink();switch(t){case u.exNodeAssistant:e=this.getLinka()||e;break;case u.exNodeGroup:e=this.getLinkg()||e}return e},t.prototype.GetNodes=function(){return this.oO.nodes=this.oR.GetNodes()},t.prototype.SetNodes=function(t){this.bU(),this.oO.nodes=t,this.oR.SetNodes(t),this.updSPR(),this.onRL(),this.eU()},t.prototype.getObjectTypes=function(t){var e=null;if(n(t))if(n(t.expandType))e="expand";else switch(e="node",t.getType()){case u.exNodeAssistant:e+=",nodea";break;case u.exNodeGroup:e+=",nodeg"}return e},t.prototype.getCursor=function(t){var e,o,i;if(this.isSelectable())if(!h.H.lA&&this.p2A(t))e=h.GP.Get("anchor",this.getCursors());else if(o=this.p2O(t))if(i=o.node||o,n(o.expandType))e=h.GP.Get("expand",i.getCursors());else if(!this.isReadOnly()&&(e=i.GetCursor(),s(e))){var r=i.getCursors();if(this.isSelected(i)&&(e=h.GP.Get("select",r)),s(e))for(var l=this.getObjectTypes(o).split(","),a=l.length-1;s(e)&&a>=0;a--)e=h.GP.Get(l[a],r)}return e},t.prototype.getShape=function(t){var e=null;if(n(t))if(h.IsS(t))e=h.S.GetOf(t.toString(),this.getShapes(),"OrgChart");else{var o=t.node||t;if(n(t.expandType))e=h.S.GetOf("expand",o.getShapes(),"OrgChart");else{var i=o.GetShape();e=n(i)?h.S.Get(i,"OrgChart"):h.S.GetOf(this.getObjectTypes(t),o.getShapes(),"OrgChart")}}return e},t.prototype.toShape=function(t,e){var o=this.getShape(t),i=o&&o.normal||o;return i&&e&&o&&o.disabled&&(i=h.Inh(o.disabled,i)),i},t.prototype.Unshuffle=function(){this.Shuffle(0)},t.prototype.Shuffle=function(t){var e=this.getVO();if(n(e)){s(e.original)&&(e.original=e.copy());var o=e.original;(t=n(t)?t:.5)&&(o=e.copy().shuffle(t)),e.morph(o,{inv:this.invAO,thisArg:this,duration:this.getSmooth(),name:"shuffle",transition:"ease"})}},t.prototype.GetScrollBarsRoot=function(){return this.oO.scrollBarsRoot},t.prototype.SetScrollBarsRoot=function(t){this.bU(),this.oO.scrollBarsRoot=t,this.eU()},t.prototype.getScrollBarsRoot=function(){var t=this.GetScrollBarsRoot();return void 0===t&&(t="black"),t||null},t.prototype.GetAllowActions=function(){return this.oO.allowActions},t.prototype.SetAllowActions=function(t){this.bU(),this.oAA=null,this.oO.allowActions=t,this.eU()},t.prototype.gAA=function(){return this.oAA||(this.oAA=new h.AA(this.opt("allowActions",this.oT.defAA()),this.isReadOnly()?this.oT.roAA():"")),this.oAA},Node=function(t,e,o){this.oCV=t,this.oM=null,this.oO=h.Cpy(p),this.nType=o||u.exNodeChild,this.oP=e||null,this.rgCld=null,this.rgAst=null,this.rgGrp=null,this.expGps=null,this.idAOH={},this.idAOC={},this.add()},Node.prototype.ownCol=function(t){var e=null;if(n(this.oP))switch(this.nType){case u.exNodeAssistant:e=this.oP.rgAst,t&&!e&&(this.oP.rgAst=e=new h.Arr);break;case u.exNodeGroup:e=this.oP.rgGrp,t&&!e&&(this.oP.rgGrp=e=new h.Arr);break;default:e=this.oP.rgCld,t&&!e&&(this.oP.rgCld=e=new h.Arr)}return e},Node.prototype.resOwnCol=function(){if(n(this.oP))switch(this.nType){case u.exNodeAssistant:n(this.oP.rgAst)&&(this.oP.rgAst.len()||(this.oP.rgAst=null));break;case u.exNodeGroup:n(this.oP.rgGrp)&&(this.oP.rgGrp.len()||(this.oP.rgGrp=null));break;default:n(this.oP.rgCld)&&(this.oP.rgCld.len()||(this.oP.rgCld=null))}},Node.prototype.add=function(){n(this.oP)&&this.ownCol(!0).add(this)},Node.prototype.AddChild=function(t){var e=null;return this.bU(),(e=new Node(this.oCV,this,u.exNodeChild)).SetOptions(t),this.oCV.onAdd(e),this.eU(),e},Node.prototype.AddAssistant=function(t){var e=null;return this.bU(),(e=new Node(this.oCV,this,u.exNodeAssistant)).SetOptions(t),this.oCV.onAdd(e),this.eU(),e},Node.prototype.AddGroup=function(t){var e=null;return this.bU(),(e=new Node(this.oCV,this,u.exNodeGroup)).SetOptions(t),this.oCV.onAdd(e),this.eU(),e},Node.prototype.Remove=function(){this.bU(),this.Clear();var t=this.ownCol();n(t)&&(t.remove(this),this.resOwnCol()),this.oP&&this.oCV.onRemove(this),this.onRL(),this.eU()},Node.prototype.ClearChild=function(){if(n(this.rgCld)){this.bU();var t=this.rgCld.byO().slice();this.rgCld.clear(),this.rgCld=null,t.forEach(function(t){t.Remove()}),this.eU()}},Node.prototype.ClearAssistant=function(){if(n(this.rgAst)){this.bU();var t=this.rgAst.byO().slice();this.rgAst.clear(),this.rgAst=null,t.forEach(function(t){t.Remove()}),this.eU()}},Node.prototype.ClearGroup=function(){if(n(this.rgGrp)){this.bU();var t=this.rgGrp.byO().slice();this.rgGrp.clear(),this.rgGrp=null,t.forEach(function(t){t.Remove()}),this.eU()}},Node.prototype.Clear=function(){this.bU(),this.ClearChild(),this.ClearAssistant(),this.ClearGroup(),this.eU()},Node.prototype.Item=function(t){return this.oCV.Node(t,this)},Node.prototype.bU=function(){this.oCV.bU()},Node.prototype.eU=function(){this.oCV.eU()},Node.prototype.onRL=function(){this.oCV.onRL()},Node.prototype.onUpdateKey=function(){this.oCV.onUpdateKey(this)},Node.prototype.toString=function(){return this.getKey()},Node.prototype.dscn=function(t){var e=new h.Arr;if(0!=t){s(t)?e.add(this):(t&u.exNodeGroup&&n(this.rgGrp)&&e.push(this.rgGrp),t&u.exNodeAssistant&&n(this.rgAst)&&e.push(this.rgAst),t&u.exNodeChild&&n(this.rgCld)&&e.push(this.rgCld));for(var o=0;o"+i+":",s.forEach(function(o){e+="\n",e+=o.Debug(t+"\t")}))}}),e},Node.prototype.mF=function(){var t=this.oCV.rgFN;return!t||t.has(this)},Node.prototype.hasChild=function(){return!(!n(this.rgCld)||!this.shows(u.exNodeChild))},Node.prototype.getVisibleChild=function(){var t=null;return this.hasChild()&&this.isExpanded(u.exNodeChild)&&this.rgCld.forEach(function(e){e.getVisible()&&e.mF()&&(t=t||[]).push(e)}),t},Node.prototype.hasVisibleChild=function(){var t=null;return this.hasChild()&&this.rgCld.forEachU(function(e){return e.getVisible()&&e.mF()&&(t=e),n(t)}),t},Node.prototype.hasAssistant=function(){return!(!n(this.rgAst)||!this.shows(u.exNodeAssistant))},Node.prototype.getVisibleAssistant=function(){var t=null;return this.hasAssistant()&&this.isExpanded(u.exNodeAssistant)&&this.rgAst.forEach(function(e){e.getVisible()&&e.mF()&&(t=t||[]).push(e)}),t},Node.prototype.hasVisibleAssistant=function(){var t=null;return this.hasAssistant()&&this.rgAst.forEachU(function(e){return e.getVisible()&&e.mF()&&(t=e),n(t)}),t},Node.prototype.hasGroup=function(){return!(!n(this.rgGrp)||!this.shows(u.exNodeGroup))},Node.prototype.getVisibleGroup=function(){var t=null;return this.hasGroup()&&this.isExpanded(u.exNodeGroup)&&this.rgGrp.forEach(function(e){e.getVisible()&&e.mF()&&(t=t||[]).push(e)}),t},Node.prototype.hasVisibleGroup=function(){var t=null;return this.hasGroup()&&this.rgGrp.forEachU(function(e){return e.getVisible()&&e.mF()&&(t=e),n(t)}),t},Node.prototype.hasVisibleDescendant=function(t){var e=null;return 0!=t&&(s(e)&&(s(t)||t&u.exNodeAssistant)&&(e=this.hasVisibleAssistant()),s(e)&&(s(t)||t&u.exNodeChild)&&(e=this.hasVisibleChild()),s(e)&&(s(t)||t&u.exNodeGroup)&&(e=this.hasVisibleGroup())),e},Node.prototype.getVisibleDescendant=function(t){var e=null;if(0!=t){if(s(t)||t&u.exNodeAssistant){var o=this.getVisibleAssistant();n(o)&&(e=e||[]).push.apply(e,o)}if(s(t)||t&u.exNodeChild){var i=this.getVisibleChild();n(i)&&(e=e||[]).push.apply(e,i)}if(s(t)||t&u.exNodeGroup){var r=this.getVisibleGroup();n(r)&&(e=e||[]).push.apply(e,r)}}return e},Node.prototype.getExpandGlyph=function(t){this.expGps=this.expGps||{child:{node:this,expandType:u.exNodeChild}};var e=this.expGps.child;if(s(t)||"null"==t)this.expGps.single=this.expGps.single||{node:this,expandType:-1},e=this.expGps.single;else switch(~~t){case u.exNodeAssistant:this.expGps.assistant=this.expGps.assistant||{node:this,expandType:u.exNodeAssistant},e=this.expGps.assistant;break;case u.exNodeGroup:this.expGps.group=this.expGps.group||{node:this,expandType:u.exNodeGroup},e=this.expGps.group}return e},Node.prototype.GetPad=function(){return this.oO.pad},Node.prototype.SetPad=function(t){this.bU(),this.oO.pad=t,this.onRL(),this.eU()},Node.prototype.getPad=function(){var t=this.GetPad();return n(t)?h.pad2A(t):this.oCV.getPad()},Node.prototype.GetFormatText=function(){return this.oO.formatText},Node.prototype.SetFormatText=function(t){this.bU(),this.oO.formatText=t,this.onRL(),this.eU()},Node.prototype.getFormatText=function(){var t=this.GetFormatText();return n(t)?~~t:this.oCV.getFormatText()},Node.prototype.GetImageAlign=function(){return this.oO.imageAlign},Node.prototype.SetImageAlign=function(t){this.bU(),this.oO.imageAlign=t,this.onRL(),this.eU()},Node.prototype.getImageAlign=function(){var t=this.GetImageAlign();return n(t)?h.ToI(t,0):this.oCV.getImageAlign()},Node.prototype.GetSize=function(){return this.oO.size},Node.prototype.SetSize=function(t){this.bU(),this.oO.size=t,this.onRL(),this.eU()},Node.prototype.getSize=function(){var t=this.GetSize();return void 0!==t?t:this.oCV.getSize()},Node.prototype.GetImageSize=function(){return this.oO.imageSize},Node.prototype.SetImageSize=function(t){this.bU(),this.oO.imageSize=t,this.onRL(),this.eU()},Node.prototype.getImageSize=function(){var t=this.GetImageSize();return void 0!==t?t:this.oCV.getImageSize()},Node.prototype.gCnt=function(t,e){var o=this.getPad(),i=h.HP.Measure(this.getImage(),this.getImageSize(),t),s=h.PRt(e.slice(),o,-1),r=null;if(n(i)){var l=s.slice();switch(this.getImageAlign()){case 3:(r=s.slice())[1]=h.BOf(s)-i.height,r[3]=i.height,r[0]+=(r[2]-i.width)/2,r[2]=i.width,s[3]-=i.height+o[1];break;case 2:(r=s.slice())[3]=i.height,r[0]+=(r[2]-i.width)/2,r[2]=i.width,s[1]+=i.height+o[1],s[3]-=i.height+o[1];break;case 1:(r=s.slice())[0]=h.ROf(s)-i.width,r[2]=i.width,r[1]+=(r[3]-i.height)/2,r[3]=i.height,s[2]-=i.width+o[0];break;default:(r=s.slice())[2]=i.width,r[1]+=(r[3]-i.height)/2,r[3]=i.height,s[0]+=i.width+o[0],s[2]-=i.width+o[0]}r=h.NRt(r,l)}return{rtCaption:s,rtImage:r}},Node.prototype.getContentSize=function(t){var e,i,s={width:0,height:0},r=!this.isEnabled(),l=this.getPad(),a=this.oCV.getShape(this)||{},u=a.normal||a;return r&&h.H.lA++,e=h.H.Measure(t,this.getCaption(),this.getSize(),this.getFormatText(),u.tfi&&h.ToTFI(u.tfi)),i=h.HP.Measure(this.getImage(),this.getImageSize(),t),n(e)&&(s.width+=e.width+1,s.height+=e.height+1),n(i)&&(this.getImageAlign()>=2?(s.width=o(s.width,i.width),s.height&&(s.height+=l[1]),s.height+=i.height):(s.height=o(s.height,i.height),s.width&&(s.width+=l[0]),s.width+=i.width)),s.width+=l[0]<<1,s.height+=l[1]<<1,r&&--h.H.lA,s},Node.prototype.GetShapes=function(){return this.oO.shapes},Node.prototype.SetShapes=function(t){this.bU(),this.oO.shapes=t,this.onRL(),this.eU()},Node.prototype.getShapes=function(){var t=this.GetShapes();return n(t)?t:n(this.oP)?this.oP.getShapes():this.oCV.getShapes()},Node.prototype.GetCursors=function(){return this.oO.cursors},Node.prototype.SetCursors=function(t){this.bU(),this.oO.cursors=t,this.onRL(),this.eU()},Node.prototype.getCursors=function(){var t=this.GetCursors();return n(t)?t:n(this.oP)?this.oP.getCursors():this.oCV.getCursors()},Node.prototype.GetShape=function(){return this.oO.shape},Node.prototype.SetShape=function(t){this.bU(),this.oO.shape=h.S.A2S(t),this.onRL(),this.eU()},Node.prototype.GetCursor=function(){return this.oO.cursor},Node.prototype.SetCursor=function(t){this.bU(),this.oO.cursor=t,this.onRL(),this.eU()},Node.prototype.GetEnabled=function(){return this.oO.enabled},Node.prototype.SetEnabled=function(t){this.bU(),this.oO.enabled=t,this.onRL(),this.eU()},Node.prototype.getEnabled=function(){return!!this.GetEnabled()},Node.prototype.isEnabled=function(){return!!this.getEnabled()&&(!n(this.oP)||this.oP.isEnabled())},Node.prototype.GetSelectable=function(){return this.oO.selectable},Node.prototype.SetSelectable=function(t){this.bU(),this.oO.selectable=t,this.eU()},Node.prototype.getSelectable=function(){return s(this.GetSelectable())||this.GetSelectable()},Node.prototype.isSelectable=function(){return this.getSelectable()},Node.prototype.GetLink=function(){return this.oO.link},Node.prototype.SetLink=function(t){this.bU(),this.oO.link=t,this.onRL(),this.eU()},Node.prototype.GetLinka=function(){return this.oO.linka},Node.prototype.SetLinka=function(t){this.bU(),this.oO.linka=t,this.onRL(),this.eU()},Node.prototype.GetLinkg=function(){return this.oO.linkg},Node.prototype.SetLinkg=function(t){this.bU(),this.oO.linkg=t,this.onRL(),this.eU()},Node.prototype.linkAttr=function(t){var e=this.GetLink();switch(t){case u.exNodeAssistant:e=this.GetLinka()||e;break;case u.exNodeGroup:e=this.GetLinkg()||e}return n(e)?e:(this.oP||this.oCV).linkAttr(t)},Node.prototype.GetNodes=function(){function t(e){var o=h.B.quoteC(e.getCaption());o+=h.B.quoteF(function(t){function e(t,e){(o=o||new Map).set(t,e||null)}var o=null;switch(t.nType){case u.exNodeAssistant:e("a");break;case u.exNodeGroup:e("g")}var i=t.GetFlow();n(i)&&e(a.Flows.get(i)||i),t.GetExpandType(u.exNodeChild)||e("c"),t.GetExpandType(u.exNodeAssistant)||e("ca"),t.GetExpandType(u.exNodeGroup)||e("cg");var s=t.GetImage();n(s)&&e("img",s);var r=t.GetShape();n(r)&&e("shape",r);var h=t.GetCursor();n(h)&&e("cursor",h),t.GetEnabled()||e("dis"),t.GetSelectable()||e("nsel");var l=t.GetKey();return n(l)&&e("id",l),o}(e));var i=[];return[e.rgCld,e.rgAst,e.rgGrp].forEach(function(e){n(e)&&e.forEach(function(e){i.push(t(e))})}),o+=h.B.quoteS(i,i.length)}return t(this)},Node.prototype.SetNodes=function(t){function e(t,o,i){h.B.split(o).forEach(function(o){function s(t){var e=null;if(d)if(h.IsA(t))for(var o=t.length,i=0;!e&&i1;o&&i0)switch(e){case a.AnchorExpandGlyphsEnum.Top:case a.AnchorExpandGlyphsEnum.Bottom:t[3]+=o;break;case a.AnchorExpandGlyphsEnum.Left:case a.AnchorExpandGlyphsEnum.Right:t[2]+=o}return t},a.deflateExpandGlyphs=function(t,e,o){if(e&&o>0)switch(e){case a.AnchorExpandGlyphsEnum.Top:t[1]-=o,t[3]=o;break;case a.AnchorExpandGlyphsEnum.Bottom:t[1]=h.BOf(t),t[3]=o;break;case a.AnchorExpandGlyphsEnum.Left:t[0]-=o,t[2]=o;break;case a.AnchorExpandGlyphsEnum.Right:t[0]=h.ROf(t),t[2]=o}return t},a.FlowEnum={exFlowVertical:"flowVertical",exFlowHorizontal:"flowHorizontal",exFlowVerticalTree:"flowVerticalTree",exFlowHorizontalTree:"flowHorizontalTree"},a.getFlows=function(){var t=a.FlowEnum,e=new h.BiM;return e.set(t.exFlowVertical,"vert"),e.set(t.exFlowHorizontal,"horz"),e.set(t.exFlowVerticalTree,"tree"),e.set(t.exFlowHorizontalTree,"htree"),e},a.Flows=a.getFlows(),a.flowVertical={initAssistant:function(t,e){return{x:h.LOf(t),y:h.BOf(t)+e.y}},nextAssistant:function(t,e,o){t.x+=e[2]+o.x},initChild:function(t,e){return{x:h.LOf(t),y:h.BOf(t)+e.y}},nextChild:function(t,e,o){t.x+=e[2]+o.x},initGroup:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)}},nextGroup:function(t,e,o){t.x+=e[2]+o.x},alignDir:function(){return 0},alignOffset:function(t,e,o){if(t){var i=1;switch(t){case h.AlignEnum.exAlignCenter:case h.AlignEnum.exAlignVCenter:i=2}return o[0]+(o[2]-e[2])/i-e[0]}return 0},anchorExpandGlyphs:function(t){switch(t){case u.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case u.exNodeGroup:return a.AnchorExpandGlyphsEnum.Right}return a.AnchorExpandGlyphsEnum.Bottom},linkcSE:function(t){return{cS:t==u.exNodeGroup?18:66,cE:18}}},a.flowHorizontal={initAssistant:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)}},nextAssistant:function(t,e,o){t.y+=e[3]+o.y},initChild:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)}},nextChild:function(t,e,o){t.y+=e[3]+o.y},initGroup:function(t,e){return{x:h.LOf(t),y:h.BOf(t)+e.y}},nextGroup:function(t,e,o){t.y+=e[3]+o.y},alignDir:function(){return 1},alignOffset:function(t,e,o){if(t){var i=1;switch(t){case h.AlignEnum.exAlignCenter:case h.AlignEnum.exAlignVCenter:i=2}return o[1]+(o[3]-e[3])/i-e[1]}return 0},anchorExpandGlyphs:function(t){switch(t){case u.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case u.exNodeGroup:return a.AnchorExpandGlyphsEnum.Bottom}return a.AnchorExpandGlyphsEnum.Right},linkcSE:function(t){return{cS:t==u.exNodeGroup?33:36,cE:33}}},a.flowVerticalTree={initAssistant:function(t,e){return{x:h.LOf(t)+e.indent,y:h.BOf(t)+e.y}},nextAssistant:function(t,e,o){t.y+=e[3]+o.x},initChild:function(t,e){return{x:h.LOf(t)+e.indent,y:h.BOf(t)+e.y}},nextChild:function(t,e,o){t.y+=e[3]+o.y},initGroup:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)}},nextGroup:function(t,e,o){t.x+=e[2]+o.x},alignDir:function(){return 0},alignOffset:function(t,e,o){return 0},anchorExpandGlyphs:function(t){switch(t){case u.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case u.exNodeGroup:return a.AnchorExpandGlyphsEnum.Right}return a.AnchorExpandGlyphsEnum.Bottom},linkcSE:function(t){return{cS:t==u.exNodeGroup?18:66,cE:t==u.exNodeGroup?18:33}}},a.flowHorizontalTree={initAssistant:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)+e.indent}},nextAssistant:function(t,e,o){t.x+=e[2]+o.x},initChild:function(t,e){return{x:h.ROf(t)+e.x,y:h.TOf(t)+e.indent}},nextChild:function(t,e,o){t.x+=e[2]+o.x},initGroup:function(t,e){return{x:h.LOf(t),y:h.BOf(t)+e.y}},nextGroup:function(t,e,o){t.y+=e[3]+o.y},alignDir:function(){return 1},alignOffset:function(t,e,o){return 0},anchorExpandGlyphs:function(t){switch(t){case u.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case u.exNodeGroup:return a.AnchorExpandGlyphsEnum.Bottom}return a.AnchorExpandGlyphsEnum.Right},linkcSE:function(t){return{cS:t==u.exNodeGroup?33:36,cE:t==u.exNodeGroup?33:18}}},a.prototype.doL=function(){function t(t,e,o,i){var s=t.unionOf(i);if(n(s)){var r=g.alignOffset(e,o,s);if(r){var h=i[0],l=g.alignDir();t.rgVO.forEachU(function(t,e){if(e==h)return!0;t[l]+=r},t)}}}var o=this.oN,i=o.oCV,r=i.gCtx(),h=i.getExpandGlyphSize(),l=o.getContentSize(r),p=[0,0,l.width,l.height],c=p.slice(),f=o.getAlign(),d=o.getMargins(),g=o.getFlow();s(o.oP)&&(i.rgFN=i.getFilterNodes()),this.rgVO.push(o,p);var y=null;if(h>0){var S=!1,x=!1,C=[null];if(o.getSingleExpandGlyphs()||(C=[u.exNodeAssistant,u.exNodeChild,u.exNodeGroup]),C.forEach(function(t){if(o.showsExpandGlyphs(t)){var e=g.anchorExpandGlyphs(t);e&&((y=y||{})[t]=e,S=S||e>=a.AnchorExpandGlyphsEnum.Left,x=x||e0&&a.inflateExpandGlyphs(c,a.AnchorExpandGlyphsEnum.Right,v)}if(x){var O=h-d.y;O>0&&a.inflateExpandGlyphs(c,a.AnchorExpandGlyphsEnum.Bottom,O)}}}var G=o.getVisibleAssistant();if(n(G)){var A=g.initAssistant(c,d),E=[];G.forEach(function(t){var e=new a(t);e.offset(A.x,A.y),this.add(e),g.nextAssistant(A,e.union(),d),E.push(t)},this),t(this,f,p,E),c=this.union()}var m=o.getVisibleChild();if(n(m)){var A=g.initChild(c,d),E=[];m.forEach(function(t){var e=new a(t);e.offset(A.x,A.y),this.add(e),g.nextChild(A,e.union(),d),E.push(t)},this),t(this,f,p,E),c=this.union()}var b=o.getVisibleGroup();if(n(b)){A=g.initGroup(c,d);b.forEach(function(t){var e=new a(t);e.offset(A.x,A.y),this.add(e),g.nextGroup(A,e.union(),d)},this)}if(n(y))for(var R in y){var N=p.slice();a.deflateExpandGlyphs(N,y[R],h),N[0]+=(N[2]-h)/2,N[2]=h,N[1]+=(N[3]-h)/2,N[3]=h,this.rgVO.push(o.getExpandGlyph(R),N)}return s(o.oP)&&(i.rgFN=null),this.rgVO.forEach(function(t){for(var o=0,i=t.length;o