this.primereact=this.primereact||{},this.primereact.organizationchart=function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&this.node.children.map((function(e,t){var o=n.classNames("p-organizationchart-line-left",{"p-organizationchart-line-top":0!==t}),i=n.classNames("p-organizationchart-line-right",{"p-organizationchart-line-top":t!==p-1});return[r.default.createElement("td",{key:t+"_lineleft",className:o}," "),r.default.createElement("td",{key:t+"_lineright",className:i}," ")]}))),f=r.default.createElement("tr",{style:{visibility:c},className:"p-organizationchart-nodes"},this.node.children&&this.node.children.map((function(t,n){return r.default.createElement("td",{key:n,colSpan:"2"},r.default.createElement(o,{node:t,nodeTemplate:e.props.nodeTemplate,selectionMode:e.props.selectionMode,onNodeClick:e.props.onNodeClick,isSelected:e.props.isSelected}))})));return r.default.createElement("table",{className:"p-organizationchart-table"},r.default.createElement("tbody",null,s,d,u,f))}}]),o}(t.Component);b(E,"defaultProps",{node:null,nodeTemplate:null,root:!1,first:!1,last:!1,selectionMode:null,onNodeClick:null,isSelected:null});var k=function(e){m(o,e);var t=N(o);function o(e){var n;return p(this,o),(n=t.call(this,e)).root=n.props.value&&n.props.value.length?n.props.value[0]:null,n.onNodeClick=n.onNodeClick.bind(d(n)),n.isSelected=n.isSelected.bind(d(n)),n}return f(o,[{key:"onNodeClick",value:function(e,t){if(this.props.selectionMode){var n=e.target;if(n.className&&(-1!==n.className.indexOf("p-node-toggler")||-1!==n.className.indexOf("p-node-toggler-icon")))return;if(!1===t.selectable)return;var o,r=this.findIndexInSelection(t),i=r>=0;"single"===this.props.selectionMode?i?(o=null,this.props.onNodeUnselect&&this.props.onNodeUnselect({originalEvent:e,node:t})):(o=t,this.props.onNodeSelect&&this.props.onNodeSelect({originalEvent:e,node:t})):"multiple"===this.props.selectionMode&&(i?(o=this.props.selection.filter((function(e,t){return t!==r})),this.props.onNodeUnselect&&this.props.onNodeUnselect({originalEvent:e,node:t})):(o=[].concat(l(d=this.props.selection||[])||a(d)||s(d)||c(),[t]),this.props.onNodeSelect&&this.props.onNodeSelect({originalEvent:e,node:t}))),this.props.onSelectionChange&&this.props.onSelectionChange({originalEvent:e,data:o})}var d}},{key:"findIndexInSelection",value:function(e){var t=-1;if(this.props.selectionMode&&this.props.selection)if("single"===this.props.selectionMode)t=this.props.selection===e?0:-1;else if("multiple"===this.props.selectionMode)for(var n=0;n