!function(e){e.ui=e.ui||{};e.ui.version="1.12.1";var t=0,n=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{(i=e._data(r,"events"))&&i.remove&&e(r).triggerHandler("remove")}catch(e){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,s,a={},l=t.split(".")[0],d=l+"-"+(t=t.split(".")[1]);return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][d.toLowerCase()]=function(t){return!!e.data(t,d)},e[l]=e[l]||{},r=e[l][t],o=e[l][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),s=new n,s.options=e.widget.extend({},s.options),e.each(i,function(t,i){e.isFunction(i)?a[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}():a[t]=i}),o.prototype=e.widget.extend(s,{widgetEventPrefix:r?s.widgetEventPrefix||t:t},a,{constructor:o,namespace:l,widgetName:t,widgetFullName:d}),r?(e.each(r._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,r,o=n.call(arguments,1),s=0,a=o.length;s",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;o
"),o=r.children()[0];return e("body").append(r),t=o.offsetWidth,r.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=r[0].clientWidth),r.remove(),i=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width0?"right":"center",vertical:a<0?"top":s>0?"bottom":"middle"};hr(o(s),o(a))?c.important="horizontal":c.important="vertical",i.using.call(this,e,c)}),l.offset(e.extend(N,{using:a}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,d=a+t.collisionWidth-s-o;t.collisionWidth>s?l>0&&d<=0?(n=e.left+l+t.collisionWidth-s-o,e.left+=l-n):e.left=d>0&&l<=0?o:l>d?o+s-t.collisionWidth:o:l>0?e.left+=l:d>0?e.left-=d:e.left=r(e.left-a,e.left)},top:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollTop:i.offset.top,s=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,d=a+t.collisionHeight-s-o;t.collisionHeight>s?l>0&&d<=0?(n=e.top+l+t.collisionHeight-s-o,e.top+=l-n):e.top=d>0&&l<=0?o:l>d?o+s-t.collisionHeight:o:l>0?e.top+=l:d>0?e.top-=d:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,s=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,d=e.left-t.collisionPosition.marginLeft,c=d-l,u=d+t.collisionWidth-a-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?((n=e.left+h+f+p+t.collisionWidth-a-s)<0||n0&&((i=e.left-t.collisionPosition.marginLeft+h+f+p-l)>0||o(i)0&&((n=e.top-t.collisionPosition.marginTop+h+f+p-l)>0||o(n)=0}}function h(n,i){var r,o,s,a;for(this.parent=n,this.tree=n.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},r=0,o=A.length;rul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new h(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("
    ",{class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=y.debugLevel)}{if(!e.ui||!e.ui.fancytree){var p,g,y=null,v=new RegExp(/\.|\//),m=/[&<>"'\/]/g,x=/[<>"'\/]/g,b="$recursive_request",C={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},_={16:!0,17:!0,18:!0},k={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},w={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},N={0:"",1:"left",2:"middle",3:"right"},S="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),E={},T="columns types".split(" "),A="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),O={},F={},P={active:!0,children:!0,data:!0,focus:!0};for(p=0;p=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[s,0].concat(c))),a&&!i){for(r=0,o=c.length;r=0;i--)"paging"===(r=this.children[i]).statusNodeType&&this.removeChild(r);this.partload=!1}},appendSibling:function(e){return this.addNode(e,"after")},applyPatch:function(t){if(null===t)return this.remove(),s(this);var n,i,r={children:!0,expanded:!0,parent:!0};for(n in t)i=t[n],r[n]||e.isFunction(i)||(O[n]?this[n]=i:this.data[n]=i);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):s(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,i,r=this.children;if(!r)return 0;if(i=r.length,!1!==e)for(t=0,n=i;t=4&&(Array.prototype.unshift.call(arguments,this.toString()),n("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),n("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:u(t);var n=[];return this.visit(function(e){t(e)&&n.push(e)}),n},findFirst:function(t){t=e.isFunction(t)?t:u(t);var n=null;return this.visit(function(e){if(t(e))return n=e,!1}),n},_changeSelectStatusAttrs:function(e){var n=!1,i=this.tree.options,r=y.evalOption("unselectable",this,this,i,!1),o=y.evalOption("unselectableStatus",this,this,i,void 0);switch(r&&null!=o&&(e=o),e){case!1:n=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:n=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:n=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:t(!1,"invalid state: "+e)}return n&&this.renderStatus(),n},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit(function(e){e._changeSelectStatusAttrs(t)}),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){function n(e){var t,r,o,s,a,l,d,c,u=e.children;if(u&&u.length){for(l=!0,d=!1,t=0,r=u.length;t=3&&(Array.prototype.unshift.call(arguments,this.toString()),n("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.getParentList(!1,!1);for(e=0,t=n.length;e=0;n--)r.push(s[n].setExpanded(!0,t));return e.when.apply(e,r).done(function(){d?i.scrollIntoView(l).done(function(){o.resolve()}):o.resolve()}),o.promise()},moveTo:function(n,i,r){void 0===i||"over"===i?i="child":"firstChild"===i&&(n.children&&n.children.length?(i="before",n=n.children[0]):i="child");var o,s=this.parent,a="child"===i?n:n.parent;if(this!==n){if(this.parent?a.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),a!==s&&s.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===a)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else t((o=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(o,1);if(this.parent=a,a.hasChildren())switch(i){case"child":a.children.push(this);break;case"before":t((o=e.inArray(n,a.children))>=0,"invalid target parent"),a.children.splice(o,0,this);break;case"after":t((o=e.inArray(n,a.children))>=0,"invalid target parent"),a.children.splice(o+1,0,this);break;default:e.error("Invalid mode "+i)}else a.children=[this];r&&n.visit(r,!0),a===s?a.triggerModifyChild("move",this):a.triggerModifyChild("add",this),this.tree!==n.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(e){e.tree=n.tree},!0)),s.isDescendantOf(a)||s.render(),a.isDescendantOf(s)||a===s||a.render()}},navigate:function(t,n){function i(i){if(i){try{i.makeVisible({scrollIntoView:!1})}catch(e){}return e(i.span).is(":visible")?!1===n?i.setFocus():i.setActive():(i.debug("Navigate: skipping hidden node"),void i.navigate(t,n))}}var r,o,a,l=e.ui.keyCode,d=null;switch(t){case l.BACKSPACE:this.parent&&this.parent.parent&&(a=i(this.parent));break;case l.HOME:this.tree.visit(function(t){if(e(t.span).is(":visible"))return a=i(t),!1});break;case l.END:this.tree.visit(function(t){e(t.span).is(":visible")&&(a=t)}),a&&(a=i(a));break;case l.LEFT:this.expanded?(this.setExpanded(!1),a=i(this)):this.parent&&this.parent.parent&&(a=i(this.parent));break;case l.RIGHT:this.expanded||!this.children&&!this.lazy?this.children&&this.children.length&&(a=i(this.children[0])):(this.setExpanded(),a=i(this));break;case l.UP:for(d=this.getPrevSibling();d&&!e(d.span).is(":visible");)d=d.getPrevSibling();for(;d&&d.expanded&&d.children&&d.children.length;)d=d.children[d.children.length-1];!d&&this.parent&&this.parent.parent&&(d=this.parent),a=i(d);break;case l.DOWN:if(this.expanded&&this.children&&this.children.length)d=this.children[0];else for(r=(o=this.getParentList(!1,!0)).length-1;r>=0;r--){for(d=o[r].getNextSibling();d&&!e(d.span).is(":visible");)d=d.getNextSibling();if(d)break}a=i(d);break;default:!1}return a||s()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var i,r=this.parent,o=e.inArray(this,r.children),s=this;return t(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(i=this.tree._callHook("nodeLoadChildren",this,n)).done(function(e){var t=s.children;for(p=0;pm+v-y&&(_=c+p-v+y,C&&(t(C.isRootNode()||e(C.span).is(":visible"),"topNode must be visible"),d<_&&(_=d-g))),null!==_?r.effects?(r.effects.complete=function(){h.resolveWith(f)},x.stop(!0).animate({scrollTop:_},r.effects)):(x[0].scrollTop=_,h.resolveWith(this)):h.resolveWith(this),h.promise()):(this.warn("scrollIntoView(): node is invisible."),s())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,i,r=this.children;if(r){if(e=e||function(e,t){var n=e.title.toLowerCase(),i=t.title.toLowerCase();return n===i?0:n>i?1:-1},r.sort(e),t)for(n=0,i=r.length;n=0,n=void 0===n?!r:!!n)r||(d+=i+" ",a=!0);else for(;d.indexOf(" "+i+" ")>-1;)d=d.replace(" "+i+" "," ");return this.extraClasses=e.trim(d),a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,i){var r,o=this.tree.options.modifyChild;o&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),r={node:this,tree:this.tree,operation:t,childNode:n||null},i&&e.extend(r,i),o({type:"modifyChild"},r))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,i,r=!0,o=this.children;if(!0===t&&(!1===(r=e(this))||"skip"===r))return r;if(o)for(n=0,i=o.length;n=2&&(Array.prototype.unshift.call(arguments,this.toString()),n("warn",arguments))}},f.prototype={_makeHookContext:function(t,n,i){var r,o;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),r=t):t.tree?r={node:t,tree:o=t.tree,widget:o.widget,options:o.widget.options,originalEvent:n,typeInfo:o.types[t.type]||{}}:t.widget?r={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),i&&e.extend(r,i),r},_callHook:function(t,n,i){var r=this._makeHookContext(n),o=this[t],s=Array.prototype.slice.call(arguments,2);return e.isFunction(o)||e.error("_callHook('"+t+"') is not a function"),s.unshift(r),o.apply(this,s)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_requireExtension:function(n,i,r,o){null!=r&&(r=!!r);var s=this._local.name,a=this.options.extensions,l=e.inArray(n,a)=4&&(Array.prototype.unshift.call(arguments,this.toString()),n("log",arguments))},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this.render()):this.debug("enableUpdate(false)..."),!e)},expandAll:function(e,t){e=!1!==e,this.visit(function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)})},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(t,n,i){t="string"==typeof t?function(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}(t):t;var r=null,o=(n=n||this.getFirstChild()).parent.children,s=null,a=function(e,t,n){var i,r,o=e.children,s=o.length,l=o[t];if(l&&!1===n(l))return!1;if(l&&l.children&&l.expanded&&!1===a(l,0,n))return!1;for(i=t+1;i