text: /*!
   * UI development toolkit for HTML5 (OpenUI5)
   * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(['jquery.sap.global','sap/ui/base/ManagedObject'],function(q,M){'use strict';var T=M.extend("sap.ui.core.support.controls.TreeViewer",{constructor:function(){M.apply(this,arguments);this._oRenderParent=null;this._oRootObject=null;}});var r={nodestart:"<div tabIndex=\"0\" idx=\"{idx}\" class=\"node start {cssclass}\" haschildnodes=\"{haschildnodes}\" visible=\"{visible}\" collapsed=\"{collapsed}\" style=\"padding-left:{pxlevel}\" level=\"{level}\" raise=\"_selectNode\" args=\"{idx}\"><span class=\"expand\" raise=\"_toggleNode\" args=\"{idx}\"></span>&lt;<span class=\"nstag\" reason=\"tagName\"><span class=\"ns\" reason=\"namespace\">{namespaceURI}</span><span class=\"tag\"  reason=\"localName\">{localName}</span></span>",nodestartend:"&gt;</div>",nodenochildend:"&gt;&lt;/<span class=\"nstagend\"><span class=\"nstag\"><span class=\"ns\">{namespaceURI}</span><span class=\"tag\">{localName}</span></span></span>&gt;</div><div class=\"node end\" style=\"display:none\" visible=\"{visible}\" haschildnodes=\"{haschildnodes}\" collapsed=\"{collapsed}\" style=\"padding-left:{pxlevel}\" level=\"{level}\">&lt;/<span class=\"nstag\"><span class=\"ns\">{namespaceURI}</span><span class=\"tag\">{localName}</span></span>&gt;</div>",nodeend:"<div class=\"node end {cssclass}\" visible=\"{visible}\" haschildnodes=\"{haschildnodes}\" collapsed=\"{collapsed}\" style=\"padding-left:{pxlevel}\" level=\"{level}\">&lt;/<span class=\"nstag\"><span class=\"ns\">{namespaceURI}</span><span class=\"tag\">{localName}</span></span>&gt;</div>",attribute:"&nbsp;<span class=\"attr\" modified=\"{modified}\" oldValue=\"{oldValue}\" title=\"{oldValue}\" reason=\"attributeName\"><span class=\"attrname\">{attributeName}</span>=&quot;<span class=\"attrvalue\" reason=\"attributeValue\">{attributeValue}</span>&quot;</span>",idattribute:"&nbsp;<span class=\"attr\" modified=\"{modified}\" oldValue=\"{oldValue}\" title=\"originalValue: {oldValue}\" reason=\"attributeName\"><span class=\"attrname\">{attributeName}</span>=&quot;<span class=\"attrvalue attrvalue1\" reason=\"attributeValue\">{attributeValue1}</span><span class=\"attrvalue attrvalue2\" reason=\"attributeValue\">{attributeValue2}</span>&quot;</span>",nodeinfo:"<span class=\"info {color}\" selected=\"{selected}\"title=\"{tooltip}\" raise=\"_onInfoClick\" args=\"{idx},{infoidx}\"></span>"};var l=1;var I=-1;function a(n){var l=parseInt(n.getAttribute("level"),10);n=n.nextSibling;while(n){if(parseInt(n.getAttribute("level"),10)==l){return n;}n=n.nextSibling;}return null;}function _(n){var C=n.childNodes;for(var i=0;i<C.length;i++){if(C[i].nodeType===1){return true;}}return false;}function b(n,o){var m=n._modified||[];var O=n._oldValues;var A=n.attributes;var s=m.concat([])||[];for(var i=0;i<A.length;i++){var I=s.indexOf(A[i].name);if(I===-1){s.push(A[i]);}else{s[I]=A[i];}}for(var i=0;i<s.length;i++){var e=s[i];var f=o.fnAttributeInfos(n,e);if(f){if(f.visible===false){continue;}}if(e.name==="__id"){continue;}if(e.name==="__inactive"){continue;}if(e.namespaceURI==="http://schemas.sap.com/sapui5/extension/sap.ui.core.support.Support.info/1"){continue;}if(e.name.indexOf("__changed")>-1){continue;}if(e.name==="xmlns:support"){continue;}var g=false,h="";if(m.indexOf(e.name)>-1){g=true;h="originalValue: "+O[m.indexOf(e.name)];}if(e.name==="id"){if(!o.bIgnoreIds){o.addWithParam(r.idattribute,{attributeName:e.name,attributeValue1:q.sap.encodeHTML(String(e.value||"")),attributeValue2:n.getAttribute("__id"),modified:g,oldValue:q.sap.encodeHTML(h)});}}else{o.addWithParam(r.attribute,{attributeName:e.name,attributeValue:q.sap.encodeHTML(String(e.value||"")),modified:g,oldValue:q.sap.encodeHTML(h)});}}}function c(n,o){var C=n.childNodes;for(var i=0;i<C.length;i++){if(C[i].nodeType===1){if(n.getAttribute("__inactive")==="true"){C[i].setAttribute("__inactive","true");}l++;d(C[i],o);l--;}}}function d(n,o){I++;var h=_(n);var C="";if(n.getAttribute("__inactive")==="true"){C="inactive";}else if(n.getAttribute("__replace")==="true"){C="replace";}o.addWithParam(r.nodestart,{idx:I,haschildnodes:h,visible:l<o.initialExpandedLevel,cssclass:C,level:l,pxlevel:(l*16)+"px",collapsed:l>=(o.initialExpandedLevel-1),localName:n.localName,namespaceURI:n.namespaceURI?q.sap.encodeHTML(String(n.namespaceURI))+":":""});var e=o.fnNodeInfos(n);if(e){for(var i=0;i<e.length;i++){var f=e[i];o.addWithParam(r.nodeinfo,{idx:I+"",infoidx:i+"",selected:f.selected||false,color:q.sap.encodeHTML(f.color)||"orange",tooltip:q.sap.encodeHTML(f.tooltip)||""});}}b(n,o);if(h){o.addWithParam(r.nodestartend,{});c(n,o);o.addWithParam(r.nodeend,{idx:I,haschildnodes:h,visible:l<o.initialExpandedLevel,level:l,cssclass:C,pxlevel:(l*16)+"px",collapsed:l>=(o.initialExpandedLevel-1),localName:n.localName,namespaceURI:n.namespaceURI?q.sap.encodeHTML(String(n.namespaceURI))+":":""});}else{o.addWithParam(r.nodenochildend,{idx:I,haschildnodes:h,visible:l<o.initialExpandedLevel,level:l,pxlevel:(l*16)+"px",collapsed:l>=(o.initialExpandedLevel-1),localName:n.localName,namespaceURI:n.namespaceURI?q.sap.encodeHTML(String(n.namespaceURI))+":":""});}}function R(){this._aBuffer=[];var t=this;this.add=function(){t._aBuffer.push.apply(t._aBuffer,arguments);};this.addWithParam=function(s,o){for(var n in o){var e=new RegExp("\{"+n+"\}","g");s=s.replace(e,o[n]);}t.add(s);};this.toString=function(){return t._aBuffer.join("");};}T.prototype.initialExpandedLevel=4;T.prototype.fnSelectionChange=function(){};T.prototype.fnInfoPress=function(){};T.prototype.ignoreIds=function(){this.bIgnoreIds=true;};T.prototype.setRootObject=function(o){if(o.nodeType&&o.nodeType===9){o=o.firstChild;}this._oRootObject=o;};T.prototype.attachSelectionChange=function(f){this.fnSelectionChange=f;};T.prototype.attachInfoPress=function(f){this.fnInfoPress=f;};T.prototype.attachNodeInfos=function(f){this.fnNodeInfos=f;};T.prototype.attachAttributeInfos=function(f){this.fnAttributeInfos=f;};T.prototype._getDataObjectByIndex=function(i){if(i===0){return this._oRootObject;}else{i--;var A=this._oRootObject.querySelectorAll("*");return A[i];}return null;};T.prototype._getIndexOfNode=function(D){if(D===this._oRootObject){return 0;}else{var A=this._oRootObject.querySelectorAll("*");for(var i=0;i<A.length;i++){if(A[i]===D){return i+1;}}}return-1;};T.prototype._getStartNodeByIndex=function(i){return this._oRenderParent.firstChild.querySelector("[idx='"+i+"']");};T.prototype.toggleIds=function(){var C=this._oRenderParent.firstChild.className;if(C.indexOf(" id1")>-1){this._oRenderParent.firstChild.className=C.replace(" id1"," id2");return true;}else{this._oRenderParent.firstChild.className=C.replace(" id2"," id1");return false;}};T.prototype.toggleNS=function(){var C=this._oRenderParent.firstChild.className;if(C.indexOf(" hideNS")>-1){this._oRenderParent.firstChild.className=C.replace(" hideNS","");return true;}else{this._oRenderParent.firstChild.className=C+" hideNS";return false;}};T.prototype.toggleInactive=function(){var C=this._oRenderParent.firstChild.className;if(C.indexOf(" hideInactive")>-1){this._oRenderParent.firstChild.className=C.replace(" hideInactive","");return true;}else{this._oRenderParent.firstChild.className=C+" hideInactive";return false;}};T.prototype._iSelectedIndex=-1;T.prototype._selectNode=function(i,e){i=parseInt(i,10);var n=this._getStartNodeByIndex(i);if(this._oSelectedNode===n){return;}if(this._oSelectedNode){this._oSelectedNode.className=this._oSelectedNode.className.replace(" select","");}this._iSelectedIndex=i;this._oSelectedNode=n;this._oSelectedNode.className+=" select";this.fnSelectionChange(this._getDataObjectByIndex(i),e);return true;};T.prototype._onInfoClick=function(i,e){i=parseInt(i,10);this._selectNode(i,["template"]);this.fnInfoPress(this._getDataObjectByIndex(i),parseInt(e,10));return true;};T.prototype.expandNode=function(n){var i=this._getIndexOfNode(n);this.expandNodesToIndex(i);};T.prototype.expandNodesToIndex=function(i){var D=this._oRenderParent.firstChild.querySelector("div[idx='"+i+"']");if(!D||D.getAttribute("visible")==="true"){return;}var l=parseInt(D.getAttribute("level"),10);D=D.previousSibling;while(D){var C=parseInt(D.getAttribute("level"),10);if(C<l&&D.getAttribute("collapsed")==="true"){this._toggleNode(parseInt(D.getAttribute("idx"),10));}D=D.previousSibling;}};T.prototype.expandNodesWithSelectedInfo=function(e){var D=this._oRenderParent.firstChild.querySelectorAll("div[idx]");for(var i=0;i<D.length;i++){var o=D[i].querySelector("[args='"+i+","+e+"'][selected='true']");if(o){this.expandNodesToIndex(i);}}return this._iSelectedIndex;};T.prototype.getSelectedIndex=function(){return this._iSelectedIndex;};T.prototype.setInfoSelected=function(i,e,s,t){var o=this._oRenderParent.firstChild.querySelector("[args='"+i+","+e+"']");if(o){o.setAttribute("selected",s+"");if(t){o.setAttribute("title",t);}}};T.prototype._toggleNode=function(i){i=parseInt(i,10);var n=this._getStartNodeByIndex(i);if(n){var l=parseInt(n.getAttribute("level"),10);var N=n.nextSibling;while(N){if(parseInt(N.getAttribute("level"),10)>l){if(n.getAttribute("collapsed")==="true"){if(N.getAttribute("collapsed")==="true"){N.setAttribute("visible","true");var o=a(N);if(o){N=o;}}else{N.setAttribute("visible","true");}}else{N.setAttribute("visible","false");}}if(parseInt(N.getAttribute("level"),10)===l){if(n.getAttribute("collapsed")==="true"){N.setAttribute("visible","true");}else{N.setAttribute("visible","false");}break;}N=N.nextSibling;}if(n.getAttribute("collapsed")==="true"){n.setAttribute("collapsed","false");}else{n.setAttribute("collapsed","true");}}this._oSelectedNode&&this._oSelectedNode.focus();return true;};T.prototype.highlightedDomNodes=[];T.prototype.clearHighlights=function(){for(var i=0;i<this.highlightedDomNodes.length;i++){this.highlightedDomNodes[i].className=this.highlightedDomNodes[i].className.replace(" highlight","");}this.highlightedDomNodes=[];};T.prototype.highlightNodeById=function(i){var n=this._oRootObject.querySelector("[id='"+i+"']");if(n){this.highlightNode(n);}};T.prototype.highlightNode=function(n){var i=this._getIndexOfNode(n);if(i>-1){var D=this._getStartNodeByIndex(i);D.className+=" highlight";this.highlightedDomNodes.push(D);}};T.prototype.update=function(D){if(!D&&!this._oRenderParent){return;}if(this._oRenderParent&&D){this._oRenderParent.innerHTML="";}this._oRenderParent=D||this._oRenderParent;if(this._oRootObject){var o=new R();o.initialExpandedLevel=this.initialExpandedLevel;o.fnNodeInfos=this.fnNodeInfos||function(){};o.fnAttributeInfos=this.fnAttributeInfos||function(){};o.bIgnoreIds=this.bIgnoreIds;I=-1;o.add("<div class=\"treeviewer id2\" id=\""+this.getId()+"\">");if(this._oRootObject&&this._oRootObject.nodeType&&this._oRootObject.nodeType===1){d(this._oRootObject,o);}o.add("</div>");this._oRenderParent.innerHTML=o.toString();var t=this;this._oRenderParent.firstChild.addEventListener("click",function(e){var D=e.target,f=false,g=[];while(!f){if(D.getAttribute("raise")){if(D.getAttribute("args")){var A=D.getAttribute("args").split(",");A=A.concat(g);f=t[D.getAttribute("raise")].apply(t,A);}else{var A=[D];A=A.concat(g);f=t[D.getAttribute("raise")].apply(t,A);}}else if(D.getAttribute("reason")){g.push(D.getAttribute("reason"));}D=D.parentNode;if(D===t._oRenderParent){break;}}});this._oRenderParent.firstChild.addEventListener("mouseover",function(e){var n=e.target;while(n&&n.getAttribute&&!n.getAttribute("collapsed")){n=n.parentNode;if(n.className==="nstagend"){return;}if(n.getElementsByClassName("nstagend").length>0){n.getElementsByClassName("nstagend")[0].firstChild.style.border="1px dotted green";return;}}if(!n||e.target.tagName==="DIV"){return;}if(n.getAttribute&&n.getAttribute("collapsed")==="false"){n=a(n);if(n){var E=n.getElementsByClassName("nstag")[0];E.style.border="1px dotted green";}}});this._oRenderParent.firstChild.addEventListener("mouseout",function(e){var n=e.target;while(n&&n.getAttribute&&!n.getAttribute("collapsed")){n=n.parentNode;if(n.className==="nstagend"){return;}if(n.getElementsByClassName("nstagend").length>0){n.getElementsByClassName("nstagend")[0].firstChild.style.border="";return;}}if(!n||e.target.tagName==="DIV"){return;}if(n.getAttribute&&n.getAttribute("collapsed")==="false"){n=a(n);if(n){var E=n.getElementsByClassName("nstag")[0];E.style.border="";}}});}};T.getCss=function(){return['.treeviewer { padding-top:10px;margin-left:15px;font-family: consolas, monospace; width: 100%; overflow: auto; height: 100%; position: relative; cursor:default}','.treeviewer .node {border: 1px solid transparent}','.treeviewer .node.start {white-space: nowrap;}','.treeviewer .node.inactive {color: gray!important; opacity:0.6}','.treeviewer .node.inactive SPAN {color: gray!important; background-color:transparent!important;}','.treeviewer .node.replace .nstag {text-decoration: line-through}','.treeviewer .node.start.select {background-color: #fff8ad;}','.treeviewer .node.start.highlight {background-color:#fff;}','.treeviewer .node.end {white-space: nowrap;}','.treeviewer .node .info {margin: 0px 2px}','.treeviewer .node .info.orange {border: 1px solid orange;}','.treeviewer .node .info.orange[selected=\'true\'] {background-color:orange;}','.treeviewer .node .info.blue {border: 1px solid #007dc0;}','.treeviewer .node .info.blue[selected=\'true\'] {background-color:#007dc0;}','.treeviewer .node .info.green {border: 1px solid green}','.treeviewer .node .info.green[selected=\'true\'] {background-color:green;}','.treeviewer .node .info.red {border: 1px solid #b93232}','.treeviewer .node .info.red[selected=\'true\'] {background-color:#b93232;}','.treeviewer .node .info {opacity: 0.6;display: inline-block;border-radius: 10px;height: 6px;width: 6px;}','.treeviewer .node .info[selected=\'true\'] {opacity: 1;display: inline-block;border-radius: 10px;height: 6px;width: 6px;}','.treeviewer .node .info:hover {opacity: 1}','.treeviewer .node .attrname {color:#b93232; border: 1px solid transparent; display:inline-block;}','.treeviewer .node .attrname:hover {border: 1px solid #b93232;background-color:#fde3d5}','.treeviewer .node .attrvalue {color:#007dc0; border: 1px solid transparent; display:inline-block;}','.treeviewer .node .attr[modified=\'true\'] .attrvalue {color:#d210f3; border: 1px solid transparent; display:inline-block;}','.treeviewer .node .attr[modified=\'true\'] {background-color:#ffe7fc;}','.treeviewer .node .attr[oldvalue=\'null\'] .attrname {color:#d210f3; border: 1px solid transparent; display:inline-block;}','.treeviewer.id1 .node .attrvalue2 {display:none;}','.treeviewer.id2 .node .attrvalue1 {display:none;}','.treeviewer .node .attrvalue:hover {border: 1px solid #007dc0;background-color:#e1e1ff}','.treeviewer .node .ns {color:green}','.treeviewer.hideNS .node .ns {display:none}','.treeviewer.hideInactive .node.inactive {display:none!important}','.treeviewer .node .tag {color:green}','.treeviewer .node .nstag {color:green; border: 1px solid transparent; display:inline-block;}','.treeviewer .node.start .nstag:hover {border: 1px solid green;background-color:#d5e6d5}','.treeviewer .node.start .nstagend .nstag:hover {border: 1px solid transparent;background-color:transparent}','.treeviewer .node.end[visible=\'true\'] {display: inline-block;}','.treeviewer .node:focus {border: 1px dotted #e1e1ff;outline:none}','.treeviewer .node.end[visible=\'true\'][haschildnodes=\'true\'] {display: block;}','.treeviewer .node[visible=\'false\'] {display: none;}','.treeviewer .node[collapsed=\'true\'][haschildnodes=\'true\'] .expand {border-color: transparent transparent transparent #cecece;border-radius: 0;border-style: solid;border-width: 4px 3px 4px 8px;height: 0;width: 0;position: relative;margin-top: 0px;margin-left: -10px;display: inline-block;}','.treeviewer .node[collapsed=\'false\'][haschildnodes=\'true\'] .expand {border-color: #cecece transparent transparent transparent;border-radius: 0;border-style: solid;border-width: 8px 4px 0px 4px;height: 0;width: 0;position: relative;margin-top: 0px;margin-left: -12px;margin-right: 5px;display: inline-block;}','.treeviewer .node[collapsed=\'true\'][haschildnodes=\'true\']:hover .expand {border-color: transparent transparent transparent #aaa;}','.treeviewer .node[collapsed=\'false\'][haschildnodes=\'true\']:hover .expand {border-color: #aaa transparent transparent transparent;}','.treeviewer .node[collapsed=\'true\'][haschildnodes=\'true\'] .expand:hover {border-color: transparent transparent transparent #999;}','.treeviewer .node[collapsed=\'false\'][haschildnodes=\'true\'] .expand:hover {border-color: #999 transparent transparent transparent;}'].join("");};return T;});
  