/* @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,e,i){return o(t)?~~i:n.s2F(t,e)}var n=n||window.exontrol,s=n.G,r=Math.round,h=Math.max,l=Math.min;n.Def.OrgChart={},n.Shapes.OrgChart={dfnode:{normal:{frameColor:"black"},disabled:{opacity:.5},hover:{},click:{}}},n.Mrg(n,function(){function t(t,e){this.init(t,e)}return t.version="3.4",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 n.OrgChart.CV(this);this.oCV=o,this.oCV.oG=this,this.oVS=new n.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 n.ScrollBar,this.oHS.oCV=this.oCV,this.oHS.getWheelChange=function(){return this.oCV.getWheelChange()},this.oHS.getLocked=function(){return this.oCV.getLocked()};var s=this.oHS.drawP;this.oHS.drawP=function(t,e,i,n){s.call(this,t,e,i,n),o.onDrawPartScroll(this,t,e,i,n)},this.Root=this.oCV.oR,this.Listeners=this.oLts=this.oCV.oLts,this.oCW=new n.CW(t,{AllowXChg:0,ScrollBars:n.Def.OrgChart.scrollBars}),this.oCW.oT=this,this.Shortcuts=this.oCW.oSts,this.initCW(),this.exports(),this.SetOptions(e,!0),n.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 o=this.oCW;o&&(["GetCanvas","SetCanvas","SetClientRect","GetClientRect","p2W","W","gPtr","inv"].forEach(function(t){t in this||(this[t]=o[t].bind(o))},this),this.GetScrollBars=o.GetSBs.bind(o),this.SetScrollBars=o.SetSBs.bind(o));var i=this.oCV;if(i){["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]=i[t].bind(i))},this);var s=i.W();e(s)&&["GetScroll","SetScroll","GetSI","SetSI","toEVP","toEVR","SSw"].forEach(function(t){void 0===i[t]&&(i[t]=s[t].bind(s))}),n.expO(t.Options,this,i),n.expO({Options:null,Focus:null,Selection:null},this,i)}},t.prototype.on=function(t,e,o){},t.prototype.off=function(t,e,o){},n.Lts.Onf(t.prototype),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 n.Format(t,e||0)}var e="",o=n.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 n.Lay.Save(this.onlayout,this,t)},t.prototype.SetLayout=function(t,e){n.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()},n.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()},n.CW.prototype.SetCanvas=function(t,e){return n.ComboBox.implExHost(t,"onselchange")}(n.CW.prototype.SetCanvas)),n.expO({Layout:null,Statistics:null},t.prototype),{OrgChart:t}}()),n.Mrg(n.OrgChart,function(){function t(t){this.init(t)}function a(t){this.oN=t,this.rgVO=new n.M1,this.oSize=this.doL()}var p={exNodeChild:1,exNodeAssistant:2,exNodeGroup:4},u={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-"+n.Rand(),this.lI=0,this.nN=0,this.nL=0,this.iLts(),this.oO=n.Cpy(n.OrgChart.Options),this.oR.SetCaption("Root")},n.SB.addProto(t.prototype),t.prototype.GetOptions=function(){return this.oO},t.prototype.SetOptions=function(t,o){var i=!1;if(e(t)){var s=[],r=this.GetOptions();if(e(r)){for(var h in r){var l=t[h];void 0!==l&&(s.push(h),r[h]!==l&&(r[h]=n.CpV(l)))}if(o)for(var h in t)h in r||(r[h]=n.CpV(t[h]));if(i=0!=s.length){var a=this.oG||{};this.bU(),s.forEach(function(t){var e=n.setM(t);e in this?this[e].call(this,r[t]):e in a&&a[e].call(a,r[t])},this),this.eU()}}}return i},t.prototype.opt=function(t,e){var i=this.oO[t];return o(i)&&o(i=n.Def.OrgChart[t])&&(i=e),i},t.prototype.GetCanvas=function(){return this.canvas},t.prototype.SetCanvas=function(t,e){this.udefSts(this.oSts),this.oSts=null,this.resAO(),t=n.CC.GetCanvas(t),!e&&n.CC.SetCanvas(this,t),this.canvas=t,n.CC.GetCanvas(this.canvas)&&this.defSts(this.oSts=new n.Sts)},t.prototype.SetClientRect=function(t){var e=n.CC.GetCanvas(t);e&&(t=[0,0,e.width,e.height]),this.client=n.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=n.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(),o=this.GetCanvas();return e(o)&&(t=[0,0,o.width,o.height]),t},t.prototype.GetVisibleRect=function(){return n.NRt(this.GetClientRect(),this.GetCanvasRect())},t.prototype.GetViewRect=function(){return n.EArtC(this.GetCanvas())},t.prototype.c2V=function(t,e){var i=this.GetViewRect();return o(e)&&(e=s.Y(t),t=s.X(t)),{x:t+i[0],y:e+i[1]}},t.prototype.v2C=function(t,e){var i=this.GetViewRect();return o(e)&&(e=s.Y(t),t=s.X(t)),{x:t-i[0],y:e-i[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(),n.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 o=this.gPtr(t);if(e(o)&&n.PInR(o.x,o.y,this.GetClientRect()))return this.dowheel(t)}return!1},t.prototype.dowheel=function(t){return!!(2&n.ModK(t))&&(this.zoomOnWheel(t),!0)},t.prototype.ondown=function(t){if(this.isSelectable()){n.A.Cancel("ss*");var e=this.gAA();e.Do(this,t),e.CanDo(t,!0)&&!n.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:n.e2B(t),modifiers:n.ModK(t)}},t.prototype.toClick=function(t,e){e.node=this.p2N(this.gPtr(t))},t.prototype.onA=function(t,e){t&&(n.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(o,i){var n=o?o.node||o:null,s=t.toClick(i);this.toClick(i,s),e(n)&&this.getExpandOnDblClick()&&this.ToggleExpandNode(n,o.expandType),o&&void 0!==o.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 o;t.IsSave()?(o=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",o.x),t.Add("vscroll",o.y)):(this.oLts.lock(),this.bU(),this.SetZoom(t.GetValue("zoom")),function(t){e(t)&&this.SetSelection(t.split(","))}.call(this,t.GetValue("sel")),function(t){e(t)&&(this.oR.forEach(function(t){t.SetExpand(!0)}),n.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){e(this.oG)&&(this.oG.oSts=t)},t.prototype.iLts=function(){this.oLts=new n.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=s.X(t)-e[0],i=s.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:s.X(e)+o[0],y:s.Y(e)+o[1]}},t.prototype.p2A=function(t){return t=this.p2V(t),n.H.P2A(this,s.X(t),s.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 i=null;return t instanceof Node&&(i=(e=o(e)||e)&&this.getSelCount()>1&&this.isSelected(t)?this.getSel().byO():[t]),i},t.prototype.ToggleExpandNode=function(t,o){this.Smooth(function(){var i=this.o2R(t);t.ToggleExpand(o),this.updSPR();var s=this.o2R(t);if(e(s)&&e(i)){var r=this.GetScroll();r.x+=s[0]-i[0],r.y+=s[1]-i[1],this.SetScroll(r)}if(this.getEnsureOnExpand()){var h=this.Lyt(),l=h.o2R(t),a=t.getVisibleDescendant(o);e(a)&&(l=null,a.forEach(function(t){l=n.URts(l,h.o2R(t))})),this.EnsureVisibleClient(l)}},this,function(e,i,n,r,h,l,a,u){var c=n.o2R(t.getExpandGlyph(o),this.origin(r))||n.o2R(t,this.origin(r));c=s.C2R(s.R2C(c));var f=l.o2R(t.getExpandGlyph(o),this.origin(a))||l.o2R(t,this.origin(a));f=s.C2R(s.R2C(f)),t.dscn(o).forEach(function(t){[t,t.getExpandGlyph(null),t.getExpandGlyph(p.exNodeAssistant),t.getExpandGlyph(p.exNodeChild),t.getExpandGlyph(p.exNodeGroup)].forEach(function(t){var e=h.has(t),o=u.has(t);if(!e||!o){var s=n.has(t);s!=l.has(t)?(e?o||u.push(t,f.slice()):(h.push(t,c.slice()),o||u.push(t,l.o2R(t,this.origin(a)))),i.remove(t)):s&&i.push(t)}},this)},this)})},t.prototype.EnsureVisibleClient=function(t,o,i){if(e(t)){var s=t;if(n.IsA(t)||(s=this.Lyt().o2R(t)),!n.EyR(s)){var r=this.GetScroll(),h=this.getScale(),a=h;if(o){var p=this.GetInsideRect(!0),u=this.rtCA(s,!1);a=l(h*p[2]/u[2],h*p[3]/u[3]),o=a0&&(n.A.Cancel(this.sSA),l=this.getVO(),a=this.Lyt(),p=this.GetScroll(),u=this.GetInsideRect(),this.bU()),e(this.rgVO)&&this.rgVO.clean(),t.call(i),h>0){var c=this.updSPR;this.updSPR(this.Lyt().oSize),this.updSPR=function(){},this.rgVO=l,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 n.Arr(l.diff(f));r instanceof Function&&r.call(this,u,y,a,p,l,d,g,f),y.forEach(function(t){var e=l.get(t),i=f.get(t);o(e)&&l.push(t,a.o2R(t,this.origin(p))||s.C2R(s.R2C(i))),o(i)&&f.push(t,d.o2R(t,this.origin(g))||s.C2R(s.R2C(e)))},this),(this.rgVO=l).morph(f,{inv:this.invAO,refresh:this.Refresh,thisArg:this,name:this.sSA,onXDoL:!1,duration:h})}}},t.prototype.GetFocus=function(){var t=this.rgSel;return(e(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 i=e(this.rgSel);return o(t)?!i:!!i&&(this.rgSel instanceof n.Arr?this.rgSel.has(t):this.rgSel==t)},t.prototype.getSelCount=function(){var t=0;if(e(this.rgSel)){if(this.rgSel instanceof n.Arr)return this.rgSel.len();t++}return t},t.prototype.selectModifierEvent=function(t){this.oSelEv=t&&{modifier:n.ModK(t),selection:this.rgSel}},t.prototype.removeSel=function(t){this.rgSel&&this.isSelected(t)&&(this.rgSel instanceof n.Arr?(this.rgSel.remove(t),this.rgSel.len()||(this.rgSel=null)):this.rgSel=null)},t.prototype.valueToNodes=function(t){if(e(t)){if(t instanceof Array||t instanceof n.Arr){var o=new n.Arr;return t.forEach(function(t){var i=this.Node(t);e(i)&&o.push(i)},this),o}return this.Node(t)}return null},t.prototype.isSable=function(t){return t instanceof Node&&t.isSelectable()},t.prototype.select=function(t,i,s){function r(t,i,s){var r=!1,h=t.isSelected(i),l=i&&t.isSable(i);if(o(i))r=e(t.rgSel),t.rgSel=null;else if(t.isSingleSel()){var a=t.rgSel;t.rgSel=!l||s&&h?null:i,r=a!=t.rgSel}else s&&h?(r=h,t.removeSel(i)):(s||(r=e(t.rgSel)&&(!h||t.rgSel.len()>1),t.rgSel=null),l&&(t.rgSel=t.rgSel||new n.Arr).push(i)),r|=h!=t.isSelected(i);return r}var h=!1,l=!s&&(this.isToggleSel()||this.isToggleCtrlSel()&&2&this.oSelEv.modifier),a=this.valueToNodes(t);a instanceof n.Arr?l?a.forEach(function(t){h|=r(this,t,l)},this):(h=!a.equal(this.rgSel))&&(this.isSingleSel()?r(this,a.last()):(this.rgSel=new n.Arr,a.forEach(function(t){this.isSable(t)&&this.rgSel.push(t)},this))):h=r(this,a,l),h&&(0==this.lI&&(void 0===i||i)&&this.invAO(),this.onselchange(this.GetSelection()))},t.prototype.onselchange=function(t){this.oLts.onselchange.do(t)},t.prototype.onSetAO=function(t){function o(o,i){var l=s.getShape(o);e(l)&&(!n.EyO(l.hover)&&t.set({owner:s,id:o.idAOH,object:o,inv:s.inv,hitTest:function(t,e,i){return h?h===o:s.isAP(t,e)&&i.object==s.p2O([t,e])},duration:r}),!n.EyO(l.click)&&t.set({owner:s,id:o.idAOC,object:o,inv:s.inv,hitTest:function(t,e,i){return h?h===o:s.isAP(t,e)&&i.object==s.p2O([t,e])},actOn:h==o?1:4,duration:r}))}var i=null;if(this.isSelectable()&&!t.hasOf(this)&&(i=this.getVO())){var s=this,r=s.getSmooth(),h=s.orurOnlyAO;h instanceof Node?o(h,i.indexOf(h)):i.forEach(function(t,e,i){o(e)},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(o(this.oLyt)){var t=this.gCtx(),e=null;t&&(e=n.TFI.bCTX(t,this.getTfi())),this.oLyt=new a(this.oR),t&&n.TFI.eCTX(t,e)}return this.oLyt},t.prototype.getVO=function(){if(o(this.rgVO)){var t=this.GetScrollRect();this.getShowLinks()&&n.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 o(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 o(t)&&(t=100),h(e[0],l(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 n.Arr;return n.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(h(10,l(1e3,n.ToN(t,100))))}),e.isEmpty()||(t=e.byO()).sort(function(t,e){return t-e}),t},t.prototype.zoomOnWheel=function(t){var e=!1,o=n.WhelInc(t);if(o){var i=this.getZoomLevels(),s=100*this.getScale(),r=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:e(h)&&h.call(l,t)}},this)}},t.prototype.rurFit=function(t,i){i.rurOnlyAO={},i.rurDrop=function(t){this.FitToClient(this.focusRectAbs(t))};var n=this.getShape("frameFit");if(e(n)){function r(t,e,o){e.drawShape(o,n.normal||n)}i.rurEFPaint=r,o(i.rurEFPaint)&&(i.rurDrag=function(t){r(0,this.gCtx(),this.rtCA(s.Rect(t.from,t.to),!1))})}this.rurDrag(t,i)},t.prototype.rurSelect=function(t,i){if(this.allowSelect()&&this.isSelectByDrag(t)){var n=this.getShape("frameSel");if(e(n)){function r(t,e,o){e.drawShape(o,n.normal||n)}i.rurEFPaint=r}var h=!1;i.rurDrag=function(t){!h&&(h=2==t.event.drag.status)&&(this.orurOnlyAO={},this.invAO()),o(i.rurEFPaint)&&e(n)&&r(0,this.gCtx(),this.rtCA(t.frame,!1))},i.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(s.Rect(t.from,t.to))),this.EnsureVisibleClient(this.focusRectAbs(t),!0,!0),this.selectModifierEvent(null),this.eU()},this.rurDrag(t,i)}},t.prototype.rurMove=function(t,i){var s=this.gPtr(t),r=this.p2O(s),h=this.Lyt().o2R(r),l=this.getMoveNodes(r,!0);if(l&&h){var a=this.getShape("frameDrag"),p=l.length>1?l.length:null,u=null,c=null,f=null;n.EyO(a)&&(a=null);function d(t,e,o,i){u=u||i;var s=!1,h=this.p2O(this.ptCA(t.to,!1)),c=[this.scaled(o[0]),this.scaled(o[1]),this.scaled(o[2]),this.scaled(o[3])];h instanceof Node&&(s=Node.canParent(l,h)),this.ctxScale(e,[0,0,0,0],function(){s||(e.globalAlpha=.25),a?e.drawShape(c,a.normal||a):this.drawO(e,c,r)},this),p&&e.drawHTMLText(p,o,n.DrawTextFormatEnum.exTextAlignCenter|n.DrawTextFormatEnum.exTextAlignVCenter)}i.rurEFPaint=d,i.rurEFOpts=function(t,e){e.visible=!1,e.limitClient=!1},i.rurDrag=function(t){e(u)&&u.SetVisible(t.from!=t.to),t.frame=n.ORt(h.slice(),t.to.x-t.from.x,t.to.y-t.from.y),clearTimeout(f);var i=this.p2O(this.ptCA(t.to,!1));if(i instanceof Node&&Node.canPosition(l,i)){var s=this,a=i.GetPosition();f=setTimeout(function(){s.Smooth(function(){o(c)&&(c=r.ownCol())&&c.savePos(),s.bU(),l.forEach(function(t){t.SetPosition(a++)}),s.EnsureVisibleNode(r),s.eU(),e(u)&&u.Render()})},512)}},i.rurCancel=function(t){clearTimeout(f),e(c)&&this.Smooth(function(){this.bU(),c.loadPos(),this.eU()},this)},i.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(r),this.eU()},this)},this.rurDrag(t,i)}},t.prototype.rurDragDrop=function(t,e){var o=this.p2O(this.gPtr(t));this.isSable(o)&&n.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(n.GP.Get(e.rurName,this.getCursors()))}})},t.prototype.ptCA=function(t,e){var i={x:s.X(t),y:s.Y(t)},n=this.GetScroll(),r=this.GetInsideRect(!0);return o(e)||e?(i.x-=r[0],i.y-=r[1],i.x=this.scaled(i.x),i.y=this.scaled(i.y),i.x+=n.x,i.y+=n.y):(i.x-=n.x,i.y-=n.y,i.x=this.unscaled(i.x),i.y=this.unscaled(i.y),i.x+=r[0],i.y+=r[1]),i},t.prototype.rtCA=function(t,e){return s.Rect(this.ptCA(s.R2C(t,17),e),this.ptCA(s.R2C(t,68),e))},t.prototype.doRUR=function(t,e,o,i){return n.RUR.Do(t,function(t){switch(t.drag.status){case 3:this.gAA().CanDo(t,!0)&&(n.RUR.Cancel(),this.gAA().Do(this,t,!0))}e.call(o,t)},this,i)},t.prototype.rurScroll=function(t,i){if(t){var n={oH:this.GetSI(!0),oV:this.GetSI(!1),scrollRange:this.sR},s=this.ptCA(this.GetInsideRect(!0),!0),r=null,h=this;e(i)&&(i.rurStatus instanceof Function&&(r=i.rurStatus),e(i.thisArg)&&(h=i.thisArg)),this.doRUR(t,function(t){switch(t.drag.status){case 1:this.orurOnlyAO=(e(i)?i.rurOnlyAO:null)||null,this.beU();break;case 7:this.orurOnlyAO=null,t.drag.cancel?this.Soom(null,s,[0,0]):o(t.drag.swipe)&&this.beU();break;case 2:this.rurScrollD(-t.drag.offset.dx,-t.drag.offset.dy,n);break;case 6:this.SSw(t.drag.swipe);break;case 3:case 4:case 5:e(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,o){function i(t){e(A)&&(t.updSPR=A,A=null)}function r(){u.frame=s.Rect(u.from,u.to),e(g)&&g.call(O,u)}if(e(t)){var l=this.GetClientRect(),a=this.gPtr(t),p=this.ptCA(a,!0),u={from:p,to:p,event:null,frame:s.Rect(p,p)},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;e(o)&&(o.rurEFPaint instanceof Function&&(f=o.rurEFPaint),o.rurEFOpts instanceof Function&&(d=o.rurEFOpts),o.rurDrag instanceof Function&&(g=o.rurDrag),o.rurCancel instanceof Function&&(y=o.rurCancel),o.rurDrop instanceof Function&&(S=o.rurDrop),o.rurStatus instanceof Function&&(x=o.rurStatus),o.rurDragStart instanceof Function&&(C=o.rurDragStart),o.rurDragEnd instanceof Function&&(v=o.rurDragEnd),e(o.thisArg)&&(O=o.thisArg)),this.doRUR(t,function(t){switch(u.event=t,t.drag.status){case 1:if(e(C)&&C.call(O,u),this.orurOnlyAO=(e(o)?o.rurOnlyAO:null)||null,o&&o.rurAllowUpdateScrollRange||(A=this.updSPR,this.updSPR=function(){}),this.beU(),e(f)){r();var s={name:"frame",client:this.rtCA(u.frame,!1),relative:this.GetCanvas(),clip:this.GetCanvas(),inflateClient:8,onpaint:function(t,e){f.call(O,u,t,e,this)}};e(d)&&d.call(O,u,s),G=n.EF.Create(s)}break;case 7:clearTimeout(E),this.orurOnlyAO=null,i(this),this.bU(),t.drag.cancel?(this.rurScrollD(0,0,c),e(y)&&y.call(O,u)):t.drag.click||t.drag.long||!S||S.call(O,u),n.A.Rng(this.sSA)||this.onRL(),this.eU(),n.EF.Destroy(G),e(v)&&v.call(O,u);break;case 2:var a=t.drag.current.x-n.LOf(l);a>0&&(a=h(0,t.drag.current.x-n.ROf(l)));var p=t.drag.current.y-n.TOf(l);p>0&&(p=h(0,t.drag.current.y-n.BOf(l))),(a||p)&&this.rurScrollD(a,p),clearTimeout(E);var g=this.p2O(t.drag.current);e(g)&&e(g.node)&&!g.node.isExpanded(g.expandType)&&(E=setTimeout(function(){var t=g.node,o=t.oCV,i=null;e(A)&&(i=o.updSPR,o.updSPR=A),o.ToggleExpandNode(t,g.expandType),e(A)&&(o.updSPR=i)},512)),u.to=this.ptCA(t.drag.current,!0),u.dx=u.to.x-u.from.x,u.dy=u.to.y-u.from.y,r(),e(G)&&G.SetClient(this.rtCA(u.frame,!1));break;case 3:case 4:case 5:i(this),e(x)&&x.call(O,t)}},this,{contiguously:!0,client:l})}},t.prototype.focusPointAbs=function(t){var o=this.ptCA(t,!0),i=this.p2O(t);return e(i)&&(o=s.R2C(this.Lyt().o2R(i))),o},t.prototype.focusRectAbs=function(t){var e=s.Rect(t.from,t.to);if(!n.EyR(e)){var o=this.Lyt().r2O(e);if(o.length){var i=this.Lyt();o.forEach(function(t){e=n.URt(e,i.o2R(t))})}}return e},t.prototype.allowRur=function(t,o){return e(t)},t.prototype.rurAction=function(t,e,o){var i=this.gPtr(o),s={rurName:t,rurFlags:e,rurOnlyAO:this.p2O(i)||{},rurStatus:function(e){this.rurActionClick(t,e)}};if(this.allowRur(o,s)){var r="rur"+n.getP(function(t){for(var e,o="",i=0,n=t.length;ih?a=null:a1){var r,h,l=this.toShape("multiSel");l&&(o=n.Format(o,0),r=t.sizeHTMLText(o),h=s.C2R(s.R2C(e,i),r.width+8,r.height+8,i),t.drawShape(h,l,{text:o}))}},t.prototype.onDrawPartScroll=function(t,o,i,n,r){if(640==i){var h=this.getScrollBarsRoot();if(e(h)){var l=this.Lyt(),a=s.R2C(l.o2R(this.oR)),p=s.R2C(n);t.isV()?p[1]=n[1]+a[1]/l.oSize.height*n[3]:p[0]=n[0]+a[0]/l.oSize.width*n[2],o.drawShape(s.C2R(p,3,3),{fillColor:h,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==n.ShowLinksEnum.exHide?this.nN=this.drawN(t):e&n.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 h(0,n.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 o(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=e(t)?t:null,this.onRL(),this.eU()},t.prototype.getAlign=function(){return this.opt("align",n.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(o(this.oM)){var t=this.opt("margins",null);n.IsO(t)||(t={}),this.oM=n.Inh(t,n.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 h(0,n.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,i){function n(t,o){o.set(t.getKey(),t);var i=t.rgCld;e(i)&&i.forEach(function(t){n(t,o)});var s=t.rgAst;e(s)&&s.forEach(function(t){n(t,o)});var r=t.rgGrp;return e(r)&&r.forEach(function(t){n(t,o)}),o}if(t instanceof Node)return t;i=i||this.oR,this.mK2I=this.mK2I||new Map;var s=this.mK2I.get(i);return o(s)&&this.mK2I.set(i,n(i,s=new Map)),s.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 o(t)&&(o(t=this.GetSingleSel())&&(t=n.Def.OrgChart.singleSel),t=i(t,n.OrgChart.SingleSelEnum,n.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=n.Arr.empty;return e(this.rgSel)&&(t=this.rgSel instanceof n.Arr?this.rgSel:new n.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=n.URt(e,o.get(t))}),this.EnsureVisibleClient(e,!0)}},t.prototype.RemoveSelection=function(){this.Smooth(function(){if(e(this.rgSel)){var t=new n.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()!=n.OrgChart.SingleSelEnum.exDisableSel},t.prototype.isSingleSel=function(){return this.getSingleSel()&n.OrgChart.SingleSelEnum.exSingleSel},t.prototype.isToggleSel=function(){return this.getSingleSel()&n.OrgChart.SingleSelEnum.exToggleSel},t.prototype.isToggleCtrlSel=function(){return 0==(this.getSingleSel()&n.OrgChart.SingleSelEnum.exDisableCtrlSel)},t.prototype.isShiftSel=function(){return 0==(this.getSingleSel()&n.OrgChart.SingleSelEnum.exDisableShiftSel)},t.prototype.allowSelectByDrag=function(){return 0==(this.getSingleSel()&n.OrgChart.SingleSelEnum.exDisableDrag)},t.prototype.isSelectByDrag=function(t){return 1&n.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 o(this.rgPad)&&(this.rgPad=n.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 o(this.nFT)&&(this.nFT=i(this.opt("formatText"),n.DrawTextFormatEnum,n.DrawTextFormatEnum.exTextAlignCenter|n.DrawTextFormatEnum.exTextAlignVCenter|n.DrawTextFormatEnum.exTextWordBreak|n.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 o(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 o(t)&&(o(t=this.GetShapes())&&(t=n.Def.OrgChart.shapes),t=n.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 o(t)&&(o(t=this.GetCursors())&&(t=n.Def.OrgChart.cursors),t=n.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 o(t)&&(o(t=this.GetShowLinks())&&(t=n.Def.OrgChart.showLinks),t=i(t,n.ShowLinksEnum,n.ShowLinksEnum.exExtended|n.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=n.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 o(t)&&(o(t=this.GetLinka())&&(t=n.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 o(t)&&(o(t=this.GetLinkg())&&(t=n.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 p.exNodeAssistant:e=this.getLinka()||e;break;case p.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 o=null;if(e(t))if(e(t.expandType))o="expand";else switch(o="node",t.getType()){case p.exNodeAssistant:o+=",nodea";break;case p.exNodeGroup:o+=",nodeg"}return o},t.prototype.getCursor=function(t){var i,s,r;if(this.isSelectable())if(!n.H.lA&&this.p2A(t))i=n.GP.Get("anchor",this.getCursors());else if(s=this.p2O(t))if(r=s.node||s,e(s.expandType))i=n.GP.Get("expand",r.getCursors());else if(!this.isReadOnly()&&(i=r.GetCursor(),o(i))){var h=r.getCursors();if(this.isSelected(r)&&(i=n.GP.Get("select",h)),o(i))for(var l=this.getObjectTypes(s).split(","),a=l.length-1;o(i)&&a>=0;a--)i=n.GP.Get(l[a],h)}return i},t.prototype.getShape=function(t){var o=null;if(e(t))if(n.IsS(t))o=n.S.GetOf(t.toString(),this.getShapes(),"OrgChart");else{var i=t.node||t;if(e(t.expandType))o=n.S.GetOf("expand",i.getShapes(),"OrgChart");else{var s=i.GetShape();o=e(s)?n.S.Get(s,"OrgChart"):n.S.GetOf(this.getObjectTypes(t),i.getShapes(),"OrgChart")}}return o},t.prototype.toShape=function(t,e){var o=this.getShape(t),i=o&&o.normal||o;return i&&e&&o&&o.disabled&&(i=n.Inh(o.disabled,i)),i},t.prototype.Unshuffle=function(){this.Shuffle(0)},t.prototype.Shuffle=function(t){var i=this.getVO();if(e(i)){o(i.original)&&(i.original=i.copy());var n=i.original;(t=e(t)?t:.5)&&(n=i.copy().shuffle(t)),i.morph(n,{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 n.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=n.Cpy(u),this.nType=o||p.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 o=null;if(e(this.oP))switch(this.nType){case p.exNodeAssistant:o=this.oP.rgAst,t&&!o&&(this.oP.rgAst=o=new n.Arr);break;case p.exNodeGroup:o=this.oP.rgGrp,t&&!o&&(this.oP.rgGrp=o=new n.Arr);break;default:o=this.oP.rgCld,t&&!o&&(this.oP.rgCld=o=new n.Arr)}return o},Node.prototype.resOwnCol=function(){if(e(this.oP))switch(this.nType){case p.exNodeAssistant:e(this.oP.rgAst)&&(this.oP.rgAst.len()||(this.oP.rgAst=null));break;case p.exNodeGroup:e(this.oP.rgGrp)&&(this.oP.rgGrp.len()||(this.oP.rgGrp=null));break;default:e(this.oP.rgCld)&&(this.oP.rgCld.len()||(this.oP.rgCld=null))}},Node.prototype.add=function(){e(this.oP)&&this.ownCol(!0).add(this)},Node.prototype.AddChild=function(t){var e=null;return this.bU(),(e=new Node(this.oCV,this,p.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,p.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,p.exNodeGroup)).SetOptions(t),this.oCV.onAdd(e),this.eU(),e},Node.prototype.Remove=function(){this.bU(),this.Clear();var t=this.ownCol();e(t)&&(t.remove(this),this.resOwnCol()),this.oP&&this.oCV.onRemove(this),this.onRL(),this.eU()},Node.prototype.ClearChild=function(){if(e(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(e(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(e(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 i=new n.Arr;if(0!=t){o(t)?i.add(this):(t&p.exNodeGroup&&e(this.rgGrp)&&i.push(this.rgGrp),t&p.exNodeAssistant&&e(this.rgAst)&&i.push(this.rgAst),t&p.exNodeChild&&e(this.rgCld)&&i.push(this.rgCld));for(var s=0;s"+n+":",s.forEach(function(e){o+="\n",o+=e.Debug(t+"\t")}))}}),o},Node.prototype.mF=function(){var t=this.oCV.rgFN;return!t||t.has(this)},Node.prototype.hasChild=function(){return!(!e(this.rgCld)||!this.shows(p.exNodeChild))},Node.prototype.getVisibleChild=function(){var t=null;return this.hasChild()&&this.isExpanded(p.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(o){return o.getVisible()&&o.mF()&&(t=o),e(t)}),t},Node.prototype.hasAssistant=function(){return!(!e(this.rgAst)||!this.shows(p.exNodeAssistant))},Node.prototype.getVisibleAssistant=function(){var t=null;return this.hasAssistant()&&this.isExpanded(p.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(o){return o.getVisible()&&o.mF()&&(t=o),e(t)}),t},Node.prototype.hasGroup=function(){return!(!e(this.rgGrp)||!this.shows(p.exNodeGroup))},Node.prototype.getVisibleGroup=function(){var t=null;return this.hasGroup()&&this.isExpanded(p.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(o){return o.getVisible()&&o.mF()&&(t=o),e(t)}),t},Node.prototype.hasVisibleDescendant=function(t){var e=null;return 0!=t&&(o(e)&&(o(t)||t&p.exNodeAssistant)&&(e=this.hasVisibleAssistant()),o(e)&&(o(t)||t&p.exNodeChild)&&(e=this.hasVisibleChild()),o(e)&&(o(t)||t&p.exNodeGroup)&&(e=this.hasVisibleGroup())),e},Node.prototype.getVisibleDescendant=function(t){var i=null;if(0!=t){if(o(t)||t&p.exNodeAssistant){var n=this.getVisibleAssistant();e(n)&&(i=i||[]).push.apply(i,n)}if(o(t)||t&p.exNodeChild){var s=this.getVisibleChild();e(s)&&(i=i||[]).push.apply(i,s)}if(o(t)||t&p.exNodeGroup){var r=this.getVisibleGroup();e(r)&&(i=i||[]).push.apply(i,r)}}return i},Node.prototype.getExpandGlyph=function(t){this.expGps=this.expGps||{child:{node:this,expandType:p.exNodeChild}};var e=this.expGps.child;if(o(t)||"null"==t)this.expGps.single=this.expGps.single||{node:this,expandType:-1},e=this.expGps.single;else switch(~~t){case p.exNodeAssistant:this.expGps.assistant=this.expGps.assistant||{node:this,expandType:p.exNodeAssistant},e=this.expGps.assistant;break;case p.exNodeGroup:this.expGps.group=this.expGps.group||{node:this,expandType:p.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 e(t)?n.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 e(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 e(t)?n.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,o){var i=this.getPad(),s=n.HP.Measure(this.getImage(),this.getImageSize(),t),r=n.PRt(o.slice(),i,-1),h=null;if(e(s)){var l=r.slice();switch(this.getImageAlign()){case 3:(h=r.slice())[1]=n.BOf(r)-s.height,h[3]=s.height,h[0]+=(h[2]-s.width)/2,h[2]=s.width,r[3]-=s.height+i[1];break;case 2:(h=r.slice())[3]=s.height,h[0]+=(h[2]-s.width)/2,h[2]=s.width,r[1]+=s.height+i[1],r[3]-=s.height+i[1];break;case 1:(h=r.slice())[0]=n.ROf(r)-s.width,h[2]=s.width,h[1]+=(h[3]-s.height)/2,h[3]=s.height,r[2]-=s.width+i[0];break;default:(h=r.slice())[2]=s.width,h[1]+=(h[3]-s.height)/2,h[3]=s.height,r[0]+=s.width+i[0],r[2]-=s.width+i[0]}h=n.NRt(h,l)}return{rtCaption:r,rtImage:h}},Node.prototype.getContentSize=function(t){var o,i,s={width:0,height:0},r=!this.isEnabled(),l=this.getPad(),a=this.oCV.getShape(this)||{},p=a.normal||a;return r&&n.H.lA++,o=n.H.Measure(t,this.getCaption(),this.getSize(),this.getFormatText(),p.tfi&&n.ToTFI(p.tfi)),i=n.HP.Measure(this.getImage(),this.getImageSize(),t),e(o)&&(s.width+=o.width+1,s.height+=o.height+1),e(i)&&(this.getImageAlign()>=2?(s.width=h(s.width,i.width),s.height&&(s.height+=l[1]),s.height+=i.height):(s.height=h(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&&--n.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 e(t)?t:e(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 e(t)?t:e(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=n.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()&&(!e(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 o(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 o=this.GetLink();switch(t){case p.exNodeAssistant:o=this.GetLinka()||o;break;case p.exNodeGroup:o=this.GetLinkg()||o}return e(o)?o:(this.oP||this.oCV).linkAttr(t)},Node.prototype.GetNodes=function(){function t(o){var i=n.B.quoteC(o.getCaption());i+=n.B.quoteF(function(t){function o(t,e){(i=i||new Map).set(t,e||null)}var i=null;switch(t.nType){case p.exNodeAssistant:o("a");break;case p.exNodeGroup:o("g")}var n=t.GetFlow();e(n)&&o(a.Flows.get(n)||n),t.GetExpandType(p.exNodeChild)||o("c"),t.GetExpandType(p.exNodeAssistant)||o("ca"),t.GetExpandType(p.exNodeGroup)||o("cg");var s=t.GetImage();e(s)&&o("img",s);var r=t.GetShape();e(r)&&o("shape",r);var h=t.GetCursor();e(h)&&o("cursor",h),t.GetEnabled()||o("dis"),t.GetSelectable()||o("nsel");var l=t.GetKey();return e(l)&&o("id",l),i}(o));var s=[];return[o.rgCld,o.rgAst,o.rgGrp].forEach(function(o){e(o)&&o.forEach(function(e){s.push(t(e))})}),i+=n.B.quoteS(s,s.length)}return t(this)},Node.prototype.SetNodes=function(t){function o(t,i,s){n.B.split(i).forEach(function(i){function r(t){var e=null;if(d)if(n.IsA(t))for(var o=t.length,i=0;!e&&i1;i&&s0)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]=n.BOf(t),t[3]=o;break;case a.AnchorExpandGlyphsEnum.Left:t[0]-=o,t[2]=o;break;case a.AnchorExpandGlyphsEnum.Right:t[0]=n.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 n.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:n.LOf(t),y:n.BOf(t)+e.y}},nextAssistant:function(t,e,o){t.x+=e[2]+o.x},initChild:function(t,e){return{x:n.LOf(t),y:n.BOf(t)+e.y}},nextChild:function(t,e,o){t.x+=e[2]+o.x},initGroup:function(t,e){return{x:n.ROf(t)+e.x,y:n.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 n.AlignEnum.exAlignCenter:case n.AlignEnum.exAlignVCenter:i=2}return o[0]+(o[2]-e[2])/i-e[0]}return 0},anchorExpandGlyphs:function(t){switch(t){case p.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case p.exNodeGroup:return a.AnchorExpandGlyphsEnum.Right}return a.AnchorExpandGlyphsEnum.Bottom},linkcSE:function(t){return{cS:t==p.exNodeGroup?18:66,cE:18}}},a.flowHorizontal={initAssistant:function(t,e){return{x:n.ROf(t)+e.x,y:n.TOf(t)}},nextAssistant:function(t,e,o){t.y+=e[3]+o.y},initChild:function(t,e){return{x:n.ROf(t)+e.x,y:n.TOf(t)}},nextChild:function(t,e,o){t.y+=e[3]+o.y},initGroup:function(t,e){return{x:n.LOf(t),y:n.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 n.AlignEnum.exAlignCenter:case n.AlignEnum.exAlignVCenter:i=2}return o[1]+(o[3]-e[3])/i-e[1]}return 0},anchorExpandGlyphs:function(t){switch(t){case p.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case p.exNodeGroup:return a.AnchorExpandGlyphsEnum.Bottom}return a.AnchorExpandGlyphsEnum.Right},linkcSE:function(t){return{cS:t==p.exNodeGroup?33:36,cE:33}}},a.flowVerticalTree={initAssistant:function(t,e){return{x:n.LOf(t)+e.indent,y:n.BOf(t)+e.y}},nextAssistant:function(t,e,o){t.y+=e[3]+o.x},initChild:function(t,e){return{x:n.LOf(t)+e.indent,y:n.BOf(t)+e.y}},nextChild:function(t,e,o){t.y+=e[3]+o.y},initGroup:function(t,e){return{x:n.ROf(t)+e.x,y:n.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 p.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case p.exNodeGroup:return a.AnchorExpandGlyphsEnum.Right}return a.AnchorExpandGlyphsEnum.Bottom},linkcSE:function(t){return{cS:t==p.exNodeGroup?18:66,cE:t==p.exNodeGroup?18:33}}},a.flowHorizontalTree={initAssistant:function(t,e){return{x:n.ROf(t)+e.x,y:n.TOf(t)+e.indent}},nextAssistant:function(t,e,o){t.x+=e[2]+o.x},initChild:function(t,e){return{x:n.ROf(t)+e.x,y:n.TOf(t)+e.indent}},nextChild:function(t,e,o){t.x+=e[2]+o.x},initGroup:function(t,e){return{x:n.LOf(t),y:n.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 p.exNodeAssistant:return a.AnchorExpandGlyphsEnum.Left;case p.exNodeGroup:return a.AnchorExpandGlyphsEnum.Bottom}return a.AnchorExpandGlyphsEnum.Right},linkcSE:function(t){return{cS:t==p.exNodeGroup?33:36,cE:t==p.exNodeGroup?33:18}}},a.prototype.doL=function(){function t(t,o,i,n){var s=t.unionOf(n);if(e(s)){var r=g.alignOffset(o,i,s);if(r){var h=n[0],l=g.alignDir();t.rgVO.forEachU(function(t,e){if(e==h)return!0;t[l]+=r},t)}}}var i=this.oN,n=i.oCV,s=n.gCtx(),h=n.getExpandGlyphSize(),l=i.getContentSize(s),u=[0,0,l.width,l.height],c=u.slice(),f=i.getAlign(),d=i.getMargins(),g=i.getFlow();o(i.oP)&&(n.rgFN=n.getFilterNodes()),this.rgVO.push(i,u);var y=null;if(h>0){var S=!1,x=!1,C=[null];if(i.getSingleExpandGlyphs()||(C=[p.exNodeAssistant,p.exNodeChild,p.exNodeGroup]),C.forEach(function(t){if(i.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=i.getVisibleAssistant();if(e(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,u,E),c=this.union()}var m=i.getVisibleChild();if(e(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,u,E),c=this.union()}var b=i.getVisibleGroup();if(e(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(e(y))for(var R in y){var N=u.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(i.getExpandGlyph(R),N)}return o(i.oP)&&(n.rgFN=null),this.rgVO.forEach(function(t){for(var e=0,o=t.length;e