\n ${function(){if(n)return"";var t="";for(var r in g){var i=g[r];OrgChart.isNEU(i)||(k&&i.hideIfEditMode||e&&i.hideIfDetailsMode||o&&"Edit"==i.text||(t+=`
`},OrgChart.prototype.getSvg=function(){return this.element.querySelector("svg")},OrgChart.prototype.getPointerElement=function(){return this.element.querySelector("g[data-pointer]")},OrgChart.prototype.getNodeElement=function(t){return this.element.querySelector("["+OrgChart.attr.node_id+"='"+t+"']")},OrgChart.prototype.getMenuButton=function(){return this.element.querySelector("["+OrgChart.attr.control_export_menu+"]")},OrgChart.menuUI=function(){},OrgChart.menuUI.prototype.init=function(t,e){this.obj=t,this.wrapper=null,this.menu=e,this._event_id=OrgChart._guid()},OrgChart.menuUI.prototype.showStickIn=function(t,e,r,i){this._show(t,null,e,r,i)},OrgChart.menuUI.prototype.show=function(t,e,r,i,n){this._show(t,e,r,i,n)},OrgChart.menuUI.prototype._show=function(t,e,r,i,n){var a=this;this.hide();var o="";n||(n=this.menu);var s={firstNodeId:r,secondNodeId:i,menu:n};if(!1===OrgChart.events.publish("show",[this,s]))return!1;for(var l in n=s.menu){var h=n[l].icon,c=n[l].text;void 0===h&&(h=OrgChart.icon[l]?OrgChart.icon[l](24,24,"#7A7A7A"):""),"function"==typeof c&&(c=c()),"function"==typeof h&&(h=h()),o+="
'+h+" "+c+"
"}if(""!=o){if(this.wrapper=document.createElement("div"),this.wrapper.className="boc-chart-menu",this.wrapper.style.left="-99999px",this.wrapper.style.top="-99999px",this.wrapper.innerHTML=o,this.obj.element.appendChild(this.wrapper),null==e){var d=OrgChart._menuPosition(t,this.wrapper,this.obj.getSvg());t=d.x,e=d.y}var g=t+45;this.wrapper.style.left=g+"px",this.wrapper.style.top=e+"px",this.wrapper.style.left=g-this.wrapper.offsetWidth+"px";var p=t-this.wrapper.offsetWidth;OrgChart.animate(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:p},300,OrgChart.anim.inOutPow);for(var u=this.wrapper.getElementsByTagName("div"),f=0;f\n ${n}\n `}this.instance.element.appendChild(this.element),this.element.addEventListener("click",function(e){for(var r=e.target;r&&r.hasAttribute&&!r.hasAttribute("data-control-id");)r=r.parentNode;if(r.hasAttribute&&r.hasAttribute("data-control-id")){var i=r.getAttribute("data-control-id"),n=t.instance.config.controls[i].onClick;OrgChart._onClickHandler(t.instance,i,n,void 0,void 0)}})}},OrgChart.controlsUI.prototype.hide=function(){null!=this.element&&this.element.parentElement.removeChild(this.element)},OrgChart.circleMenuUI=function(){},OrgChart.circleMenuUI.prototype.init=function(t,e){this.obj=t,this.menu=e,this._menu=null,this._buttonsInterval=[],this._linesInterval=[],this._event_id=OrgChart._guid()},OrgChart.circleMenuUI.prototype.show=function(t,e){this._show(t,e)},OrgChart.circleMenuUI.prototype.isVisible=function(){return null!==this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]")},OrgChart.circleMenuUI.prototype._show=function(t,e){var r=this,i=this.obj.getNode(t),n=OrgChart.t(i.templateName,i.min,this.obj.getScale());if(!OrgChart.isNEU(n.nodeCircleMenuButton)){var a=this.obj.getSvg(),o=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+t+'"]'),s=this.obj.getNodeElement(t),l=OrgChart._getTransform(o),h=OrgChart._getTransform(s),c=l[4]+h[4],d=l[5]+h[5],g=o.querySelectorAll("line"),p=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(OrgChart.isNEU(p)||p.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id)!=t){this.hide(),e||(e=this.menu);var u={nodeId:t,menu:e},f=OrgChart.events.publish("show",[this,u]);if(this._menu=e,!1===f)return!1;for(var m=0,C=Object.keys(u.menu).length,b=2*n.nodeCircleMenuButton.radius+4,v=2*Math.PI*b,x=v/C-(2*n.nodeCircleMenuButton.radius+2);x<0;)b+=8,x=(v=2*Math.PI*b)/C-(2*n.nodeCircleMenuButton.radius+2);for(var O in(p=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id,t),p.setAttribute("transform","matrix(1,0,0,1,"+c+","+d+")"),a.appendChild(p),u.menu){var y=u.menu[O].icon,_=u.menu[O].color,w=u.menu[O].text;"function"==typeof y&&(y=y()),"function"==typeof _&&(_=_()),"function"==typeof w&&(w=w());var k=document.createElementNS("http://www.w3.org/2000/svg","g");k.setAttribute("transform","matrix(1,0,0,1,0,0)"),k.setAttribute(OrgChart.attr.control_node_circle_menu_name,O),k.style.cursor="pointer";var S=document.createElementNS("http://www.w3.org/2000/svg","title");OrgChart.isNEU(w)||(S.innerHTML=w);var I=document.createElementNS("http://www.w3.org/2000/svg","circle");I.setAttribute("cx",0),I.setAttribute("cy",0),I.setAttribute("r",n.nodeCircleMenuButton.radius),I.setAttribute("fill",_),I.setAttribute("stroke-width","1"),I.setAttribute("stroke",n.nodeCircleMenuButton.stroke),k.appendChild(I),k.appendChild(S),k.innerHTML+=y,p.appendChild(k);var L=k.getElementsByTagName("svg")[0];if(L.setAttribute("pointer-events","none"),L){var A=parseInt(L.getAttribute("width")),E=parseInt(L.getAttribute("height"));L.setAttribute("x",-A/2),L.setAttribute("y",-E/2)}var N=m*Math.PI/(C/2);m++;var M=Math.cos(N)*b,T=Math.sin(N)*b;this._buttonsInterval.push(OrgChart.animate(k,{transform:[1,0,0,1,0,0]},{transform:[1,0,0,1,M,T]},250,OrgChart.anim.outBack,function(t){var e=t[0].getAttribute(OrgChart.attr.control_node_circle_menu_name),i=t[0].parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);t[0].addEventListener("mouseenter",function(t){OrgChart.events.publish("mouseenter",[r,{from:i,menuItem:u.menu[e],menuItemName:e,event:t}])}),t[0].addEventListener("mouseout",function(t){OrgChart.events.publish("mouseout",[r,{from:i,menuItem:u.menu[e],menuItemName:e,event:t}])})}))}this._linesInterval.push(OrgChart.animate(g[0],{x1:-n.nodeCircleMenuButton.radius/2,y1:-6,x2:n.nodeCircleMenuButton.radius/2,y2:-6},{x1:-7,y1:-7,x2:7,y2:7},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[1],{x1:-n.nodeCircleMenuButton.radius/2,y1:0,x2:n.nodeCircleMenuButton.radius/2,y2:0},{x1:0,y1:0,x2:0,y2:0},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[2],{x1:-n.nodeCircleMenuButton.radius/2,y1:6,x2:n.nodeCircleMenuButton.radius/2,y2:6},{x1:-7,y1:7,x2:7,y2:-7},500,OrgChart.anim.inOutSin))}else this.hide()}},OrgChart.circleMenuUI.prototype.hide=function(){for(var t=this._buttonsInterval.length-1;t>=0;t--)clearInterval(this._buttonsInterval[t]),this._buttonsInterval.splice(t,1);this._buttonsInterval=[];for(t=this._linesInterval.length-1;t>=0;t--)clearInterval(this._linesInterval[t]),this._linesInterval.splice(t,1);this._linesInterval=[];var e=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(null!=e){var r=e.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),i=this.obj.getNode(r),n=OrgChart.t(i.templateName,i.min,this.obj.getScale()),a=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+r+'"]').querySelectorAll("line");a[0].setAttribute("x1",-n.nodeCircleMenuButton.radius/2),a[0].setAttribute("x2",n.nodeCircleMenuButton.radius/2),a[0].setAttribute("y1",-6),a[0].setAttribute("y2",-6),a[1].setAttribute("x1",-n.nodeCircleMenuButton.radius/2),a[1].setAttribute("x2",n.nodeCircleMenuButton.radius/2),a[1].setAttribute("y1",0),a[1].setAttribute("y2",0),a[2].setAttribute("x1",-n.nodeCircleMenuButton.radius/2),a[2].setAttribute("x2",n.nodeCircleMenuButton.radius/2),a[2].setAttribute("y1",6),a[2].setAttribute("y2",6),e.parentElement.removeChild(e),e=null}},OrgChart.circleMenuUI.prototype.on=function(t,e){return OrgChart.events.on(t,e,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.idb={version:1,dbName:"BALKAN",tableName:"orgchart-js",keyPath:"id"},OrgChart.idb.db=null,OrgChart.idb._open=function(t){if(OrgChart._browser().msie)t&&t(!1);else if((navigator.userAgent.toLowerCase().indexOf("safari")>0||navigator.userAgent.toLowerCase().indexOf("firefox")>0)&&window.location!==window.parent.location)t&&t(!1);else{if(!window.indexedDB)return console.error("Your browser doesn't support a stable version of IndexedDB."),void(t&&t(!1));if(null==OrgChart.idb.db){var e=indexedDB.open(OrgChart.idb.dbName,OrgChart.idb.version);e.onerror=function(e){console.error("Cannot open database!"),t&&t(!1)},e.onsuccess=function(e){OrgChart.idb.db=e.target.result,t&&t(!0)},e.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(OrgChart.idb.tableName)&&e.deleteObjectStore(OrgChart.idb.tableName);e.createObjectStore(OrgChart.idb.tableName,{keyPath:OrgChart.idb.keyPath})}}else t&&t(!0)}},OrgChart.idb.read=function(t,e){OrgChart.idb._open(function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName]).objectStore(OrgChart.idb.tableName).get(t);i.onerror=function(t){console.error("Unable to retrieve data from database!"),e&&e(!1)},i.onsuccess=function(t){i.result?e&&e(!0,i.result):e&&e(null)}}else e&&e(!1)})},OrgChart.idb.write=function(t,e){OrgChart.idb.read(t.id,function(r){if(null==r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).add(t);i.onerror=function(t){console.error("Unable to add data to database!"),e&&e(!1)},i.onsuccess=function(t){e&&e(!0)}}else e&&e(r)})},OrgChart.idb.put=function(t,e){OrgChart.idb._open(function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).put(t);i.onerror=function(t){console.error("Unable to put data to database!"),e&&e(!1)},i.onsuccess=function(t){e&&e(!0)}}else e&&e(!1)})},OrgChart.idb.delete=function(t,e){OrgChart.idb._open(function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).delete(t);i.onerror=function(t){console.error("Unable to retrieve data from database!"),e&&e(!1)},i.onsuccess=function(t){i.error?e&&e(!1):e&&e(!0)}}else e&&e(!1)})},OrgChart.toolbarUI=function(){},OrgChart.toolbarUI.expandAllIcon='',OrgChart.toolbarUI.fitIcon='',OrgChart.toolbarUI.openFullScreenIcon='',OrgChart.toolbarUI.closeFullScreenIcon='',OrgChart.toolbarUI.zoomInIcon='',OrgChart.toolbarUI.zoomOutIcon='',OrgChart.toolbarUI.layoutIcon="',OrgChart.toolbarUI.prototype.init=function(t,e){if(e){this.obj=t,this.toolbar=e,this._visible=!1,this.div=document.createElement("div"),this.div.classList.add("boc-toolbar-container"),Object.assign(this.div.style,{position:"absolute",padding:"3px",right:this.obj.config.padding-10+"px",bottom:this.obj.config.padding-10+"px"}),e.expandAll&&(this.div.innerHTML+="