metamaps--metamaps/public/assets/application-ef914408bb1d8614bf9d7b2a5f842111.js

33 lines
633 KiB
JavaScript
Raw Normal View History

2013-01-01 22:59:52 +00:00
/*!
* jQuery JavaScript Library v1.8.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: Thu Aug 30 2012 17:17:22 GMT-0400 (Eastern Daylight Time)
*/
function BestInPlaceEditor(e){this.element=e,this.initOptions(),this.bindForm(),this.initNil(),jQuery(this.activator).bind("click",{editor:this},this.clickHandler)}function switchVisible(e,t){categoryVisible[e]==1?hideCategory(e,t):categoryVisible[e]==0&&showCategory(e,t)}function hideCategory(e,t){t==null&&(t=500),Mconsole.graph.eachNode(function(t){t.getData("metacode")==e&&(t.setData("alpha",.4,"end"),t.eachAdjacency(function(e){e.setData("alpha",.4,"end")}))}),Mconsole.fx.animate({modes:["node-property:alpha","edge-property:alpha"],duration:t})}function showCategory(e,t){t==null&&(t=500),Mconsole.graph.eachNode(function(t){t.getData("metacode")==e&&(t.setData("alpha",1,"end"),t.eachAdjacency(function(e){e.setData("alpha",1,"end")}))}),Mconsole.fx.animate({modes:["node-property:alpha","edge-property:alpha"],duration:t})}function hideAll(e){e==null&&(e=500),Mconsole.graph.eachNode(function(e){e.setData("alpha",.4,"end"),e.eachAdjacency(function(e){e.setData("alpha",.4,"end")})}),Mconsole.fx.animate({modes:["node-property:alpha","edge-property:alpha"],duration:e})}function showAll(e){e==null&&(e=500),Mconsole.graph.eachNode(function(e){e.setData("alpha",1,"end"),e.eachAdjacency(function(e){e.setData("alpha",1,"end")})}),Mconsole.fx.animate({modes:["node-property:alpha","edge-property:alpha"],duration:e})}function onCanvasSearch(e,t,n){Mconsole.graph.eachNode(function(r){e!=null?r.name.indexOf(e)!==-1&&e!=""?r.setData("onCanvas",!0):r.setData("onCanvas",!1):t!=null?r.getData("inmaps").indexOf(parseInt(t))!==-1?r.setData("onCanvas",!0):r.setData("onCanvas",!1):n!=null&&(r.getData("userid").toString()==n?r.setData("onCanvas",!0):r.setData("onCanvas",!1)),Mconsole.plot()})}function clearCanvas(){Mconsole.graph.eachNode(function(e){Mconsole.graph.removeNode(e.id),$("#"+e.id).remove()}),Mconsole.plot()}function graphSettings(e){var t;if(e=="arranged"||e=="chaotic")t={injectInto:"infovis",Navigation:{enable:!0,type:"HTML",panning:"avoid nodes",zooming:15},Node:{overridable:!0,color:"#2D6A5D",type:"customNode",dim:25},Edge:{overridable:!0,color:"#222222",type:"customEdge",lineWidth:2},Label:{type:"HTML",size:20},Tips:{enable:!1,onShow:function(e,t){}},Events:{enable:!0,enableForEdges:!0,type:"HTML",onMouseEnter:function(){},onMouseLeave:function(){},onDragMove:function(e,t,n){clickDragOnTopic(e,t,n)},onDragEnd:function(){tempInit&&tempNode2==null?($("#topic_addSynapse").val("true"),$("#new_topic").fadeIn("fast"),addMetacode(),$("#topic_name").focus()):tempInit&&tempNode2!=null&&($("#topic_addSynapse").val("false"),$("#synapse_topic1id").val(tempNode.id),$("#synapse_topic2id").val(tempNode2.id),$("#new_synapse").fadeIn("fast"),$("#synapse_desc").focus(),tempNode=null,tempNode2=null,tempInit=!1)},onDragCancel:function(){tempNode=null,tempNode2=null,tempInit=!1,$("#topic_addSynapse").val("false"),$("#topic_topic1id").val(0),$("#topic_topic2id").val(0),Mconsole.plot()},onTouchMove:function(e,t,n){$jit.util.event.stop(n),this.onDragMove(e,t,n)},onClick:function(e,t,n){e.nodeFrom?selectEdgeOnClickHandler(e):e&&!e.nodeFrom?selectNodeOnClickHandler(e):canvasDoubleClickHandler(t.getPos(),n)}},iterations:200,levelDistance:200,onCreateLabel:function(e,t){var n='<div class="CardOnGraph" title="Click to Hide" id="topic_'+t.id+'"><p class="type">'+t.getData("metacode")+"</p>"+'<img alt="'+t.getData("metacode")+'" class="icon" height="50" src="'+imgArray[t.getData("metacode")].src+'" width="50" />'+'<div class="scroll"><a href="/topics/'+t.id+'" class="title">'+t.name+"</a>"+'<div class="contributor">Added by: <a href="/users/'+t.getData("userid")+'">'+t.getData("username")+"</a></div>"+'<div class="desc"><p>'+t.getData("desc")+"</p></div></div>"+'<a href="'+t.getData("link")+'" class="link" target="_blank">'+t.getData("link")+"</a></div>",r=document.createElement("div");r.className="showcard topic_"+t.id,r.innerHTML=n,r.style.display="none",e.appendChild(r),r.onclick=function(){delete t.selected,t.setData("dim",25,"current"),t.eachAdjacency(function(e){e.setDataset("end",{lineWidth:2,color:"#222222"}),e.setData("showDesc",!1,"current")}),Mc
),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||++v.uuid:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")===0&&(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(
,first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(z,""),e[3]=(e[4]||e[5]||"").replace(z,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||Y.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&Y.error(e[0]),e},PSEUDO:function(e,t,n){var r,i;if(W.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(r=e[4])B.test(r)&&(i=nt(r,t,n,!0))&&(i=r.indexOf(")",r.length-i)-r.length)&&(r=r.slice(0,i),e[0]=e[0].slice(0,i)),e[2]=r;return e.slice(0,3)}},filter:{ID:i?function(e){return e=e.replace(z,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(z,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(z,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=x[d][e];return t||(t=x(e,new RegExp("(^|"+C+")"+e+"("+C+"|$)"))),function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")}},ATTR:function(e,t,n){return t?function(r){var i=Y.attr(r,e),s=i+"";if(i==null)return t==="!=";switch(t){case"=":return s===n;case"!=":return s!==n;case"^=":return n&&s.indexOf(n)===0;case"*=":return n&&s.indexOf(n)>-1;case"$=":return n&&s.substr(s.length-n.length)===n;case"~=":return(" "+s+" ").indexOf(n)>-1;case"|=":return s===n||s.substr(0,n.length+1)===n+"-"}}:function(t){return Y.attr(t,e)!=null}},CHILD:function(e,t,n,r){if(e==="nth"){var i=y++;return function(e){var t,s,o=0,u=e;if(n===1&&r===0)return!0;t=e.parentNode;if(t&&(t[d]!==i||!e.sizset)){for(u=t.firstChild;u;u=u.nextSibling)if(u.nodeType===1){u.sizset=++o;if(u===e)break}t[d]=i}return s=e.sizset-r,n===0?s===0:s%n===0&&s/n>=0}}return function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t,n,r){var i,o=s.pseudos[e]||s.pseudos[e.toLowerCase()];return o||Y.error("unsupported pseudo: "+e),o[d]?o(t,n,r):o.length>1?(i=[e,e,"",t],function(e){return o(e,0,i)}):o}},pseudos:{not:E(function(e,t,n){var r=f(e.replace(D,"$1"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!s.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},contains:E(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),has:E(function(e){return function(t){return Y(e,t).length>0}}),header:function(e){return R.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:Z("radio"),checkbox:Z("checkbox"),file:Z("file"),password:Z("password"),image:Z("image"),submit:et("submit"),reset:et("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return U.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&(!!e.type||!!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){var r=[],i=n?1:0,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},odd:function(e,t,n){var r=[],i=n?0:1,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);re
(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,t=v.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||v.fx.stop()},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f,l,c,h=this[0],p=h&&h.ownerDocument;if(!p)return;return(i=p.body)===h?v.offset.bodyOffset(h):(r=p.documentElement,v.contains(r,h)?(n=h.getBoundingClientRect(),s=tr(p),o=r.clientTop||i.clientTop||0,u=r.clientLeft||i.clientLeft||0,a=s.pageYOffset||r.scrollTop,f=s.pageXOffset||r.scrollLeft,l=n.top+a
d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(!i.length)return;var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})}(jQuery),function(e,t){e.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];for(var n=0;n<t.length;n++)t[n]==this&&t.splice(n,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(t,n){t=="accept"&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current;if(!r||(r.currentItem||r.element)[0]==this.element[0]
._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var i=this.items.length-1;i>=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.ui.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.ui.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=r.placeholder.offset();r.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-r.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-r.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){var t=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("deactivate",null,t._uiHash(this)),this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",null,t._uiHash(this)),this.containers[n].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._
}):i.css({visibility:"visible"}).hide(),t.callback&&t.callback.apply(i[0]),i.dequeue(),e("div.ui-effects-explode").remove()},t.duration||500)})}}(jQuery),function(e,t){e.effects.fade=function(t){return this.queue(function(){var n=e(this),r=e.effects.setMode(n,t.options.mode||"hide");n.animate({opacity:r},{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.fold=function(t){return this.queue(function(){var n=e(this),r=["position","top","bottom","left","right"],i=e.effects.setMode(n,t.options.mode||"hide"),s=t.options.size||15,u=!!t.options.horizFirst,a=t.duration?t.duration/2:e.fx.speeds._default/2;e.effects.save(n,r),n.show();var f=e.effects.createWrapper(n).css({overflow:"hidden"}),l=i=="show"!=u,c=l?["width","height"]:["height","width"],h=l?[f.width(),f.height()]:[f.height(),f.width()],p=/([0-9]+)%/.exec(s);p&&(s=parseInt(p[1],10)/100*h[i=="hide"?0:1]),i=="show"&&f.css(u?{height:0,width:s}:{height:s,width:0});var d={},v={};d[c[0]]=i=="show"?h[0]:s,v[c[1]]=i=="show"?h[1]:0,f.animate(d,a,t.options.easing).animate(v,a,t.options.easing,function(){i=="hide"&&n.hide(),e.effects.restore(n,r),e.effects.removeWrapper(n),t.callback&&t.callback.apply(n[0],arguments),n.dequeue()})})}}(jQuery),function(e,t){e.effects.highlight=function(t){return this.queue(function(){var n=e(this),r=["backgroundImage","backgroundColor","opacity"],i=e.effects.setMode(n,t.options.mode||"show"),s={backgroundColor:n.css("backgroundColor")};i=="hide"&&(s.opacity=0),e.effects.save(n,r),n.show().css({backgroundImage:"none",backgroundColor:t.options.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){i=="hide"&&n.hide(),e.effects.restore(n,r),i=="show"&&!e.support.opacity&&this.style.removeAttribute("filter"),t.callback&&t.callback.apply(this,arguments),n.dequeue()}})})}}(jQuery),function(e,t){e.effects.pulsate=function(t){return this.queue(function(){var n=e(this),r=e.effects.setMode(n,t.options.mode||"show"),i=(t.options.times||5)*2-1,s=t.duration?t.duration/2:e.fx.speeds._default/2,u=n.is(":visible"),a=0;u||(n.css("opacity",0).show(),a=1),(r=="hide"&&u||r=="show"&&!u)&&i--;for(var f=0;f<i;f++)n.animate({opacity:a},s,t.options.easing),a=(a+1)%2;n.animate({opacity:a},s,t.options.easing,function(){a==0&&n.hide(),t.callback&&t.callback.apply(this,arguments)}),n.queue("fx",function(){n.dequeue()}).dequeue()})}}(jQuery),function(e,t){e.effects.puff=function(t){return this.queue(function(){var n=e(this),r=e.effects.setMode(n,t.options.mode||"hide"),i=parseInt(t.options.percent,10)||150,s=i/100,u={height:n.height(),width:n.width()};e.extend(t.options,{fade:!0,mode:r,percent:r=="hide"?i:100,from:r=="hide"?u:{height:u.height*s,width:u.width*s}}),n.effect("scale",t.options,t.duration,t.callback),n.dequeue()})},e.effects.scale=function(t){return this.queue(function(){var n=e(this),r=e.extend(!0,{},t.options),i=e.effects.setMode(n,t.options.mode||"effect"),s=parseInt(t.options.percent,10)||(parseInt(t.options.percent,10)==0?0:i=="hide"?0:100),u=t.options.direction||"both",a=t.options.origin;i!="effect"&&(r.origin=a||["middle","center"],r.restore=!0);var f={height:n.height(),width:n.width()};n.from=t.options.from||(i=="show"?{height:0,width:0}:f);var l={y:u!="horizontal"?s/100:1,x:u!="vertical"?s/100:1};n.to={height:f.height*l.y,width:f.width*l.x},t.options.fade&&(i=="show"&&(n.from.opacity=0,n.to.opacity=1),i=="hide"&&(n.from.opacity=1,n.to.opacity=0)),r.from=n.from,r.to=n.to,r.mode=i,n.effect("size",r,t.duration,t.callback),n.dequeue()})},e.effects.size=function(t){return this.queue(function(){var n=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],s=["width","height","overflow"],u=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=e.effects.setMode(n,t.options.mode||"effect"),c=t.options.res
("destroy"),e.Widget.prototype.destroy.call(this)}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var n=$(e.target).closest(t);if(!n.length)return;n.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(n){var r=$(n.target).closest(t);if($.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||!r.length)return;r.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),r.addClass("ui-state-hover"),r.hasClass("ui-datepicker-prev")&&r.addClass("ui-datepicker-prev-hover"),r.hasClass("ui-datepicker-next")&&r.addClass("ui-datepicker-next-hover")})}function extendRemove(e,t){$.extend(e,t);for(var n in t)if(t[n]==null||t[n]==undefined)e[n]=t[n];return e}function isArray(e){return e&&($.browser.safari&&typeof e=="object"&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.23"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:n,input:e
()+"</span>":'<a class="ui-state-default'+(G.getTime()==t.getTime()?" ui-state-highlight":"")+(G.getTime()==l.getTime()?" ui-state-active":"")+(tt?" ui-priority-secondary":"")+'" href="#">'+G.getDate()+"</a>")+"</td>",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)}U+=Z+"</tr>"}p++,p>11&&(p=0,d++),U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),F+=U}B+=F}return B+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='<div class="ui-datepicker-title">',h="";if(s||!a)h+='<span class="ui-datepicker-month">'+o[t]+"</span>";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var v=0;v<12;v++)(!p||v>=r.getMonth())&&(!d||v<=i.getMonth())&&(h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>");h+="</select>"}l||(c+=h+(s||!a||!f?"&#xa0;":""));if(!e.yearshtml){e.yearshtml="";if(s||!f)c+='<span class="ui-datepicker-year">'+n+"</span>";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';for(;b<=w;b++)e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?"&#xa0;":"")+h),c+="</div>",c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;return i=r&&i>r?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.d
(o))r.panels=r.panels.add(r.element.find(r._sanitizeSelector(o)));else if(o&&o!=="#"){e.data(n,"href.tabs",o),e.data(n,"load.tabs",o.replace(/#.*$/,""));var f=r._tabId(n);n.href="#"+f;var l=r.element.find("#"+f);l.length||(l=e(i.panelTemplate).attr("id",f).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[t-1]||r.list),l.data("destroy.tabs",!0)),r.panels=r.panels.add(l)}else i.disabled.push(t)}),n?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),i.selected===t?(location.hash&&this.anchors.each(function(e,t){if(t.hash==location.hash)return i.selected=e,!1}),typeof i.selected!="number"&&i.cookie&&(i.selected=parseInt(r._cookie(),10)),typeof i.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(i.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),i.selected=i.selected||(this.lis.length?0:-1)):i.selected===null&&(i.selected=-1),i.selected=i.selected>=0&&this.anchors[i.selected]||i.selected<0?i.selected:0,i.disabled=e.unique(i.disabled.concat(e.map(this.lis.filter(".ui-state-disabled"),function(e,t){return r.lis.index(e)}))).sort(),e.inArray(i.selected,i.disabled)!=-1&&i.disabled.splice(e.inArray(i.selected,i.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),i.selected>=0&&this.anchors.length&&(r.element.find(r._sanitizeSelector(r.anchors[i.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(i.selected).addClass("ui-tabs-selected ui-state-active"),r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[i.selected],r.element.find(r._sanitizeSelector(r.anchors[i.selected].hash))[0]))}),this.load(i.selected)),e(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs"),r.lis=r.anchors=r.panels=null})):i.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[i.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),i.cookie&&this._cookie(i.selected,i.cookie);for(var o=0,u;u=this.lis[o];o++)e(u)[e.inArray(o,i.disabled)!=-1&&!e(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");i.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(i.event!=="mouseover"){var a=function(e,t){t.is(":not(.ui-state-disabled)")&&t.addClass("ui-state-"+e)},f=function(e,t){t.removeClass("ui-state-"+e)};this.lis.bind("mouseover.tabs",function(){a("hover",e(this))}),this.lis.bind("mouseout.tabs",function(){f("hover",e(this))}),this.anchors.bind("focus.tabs",function(){a("focus",e(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){f("focus",e(this).closest("li"))})}var l,c;i.fx&&(e.isArray(i.fx)?(l=i.fx[0],c=i.fx[1]):l=c=i.fx);var p=c?function(t,n){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),n.hide().removeClass("ui-tabs-hide").animate(c,c.duration||"normal",function(){h(n,c),r._trigger("show",null,r._ui(t,n[0]))})}:function(t,n){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),n.removeClass("ui-tabs-hide"),r._trigger("show",null,r._ui(t,n[0]))},d=l?function(e,t){t.animate(l,l.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),h(t,l),r.element.dequeue("tabs")})}:function(e,t,n){r.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),r.element.dequeue("tabs")};this.anchors.bind(i.event+".tabs",function(){var t=this,n=e(t).closest("li"),s=r.panels.filter(":not(.ui-tabs-hide)"),o=r.element.find(r._sanitizeSelector(t.hash));if(n.hasClass("ui-tabs-selected")&&!i.collapsible||n.hasClass("ui-state-disabled")||n.hasClass("ui-state-processing")||r.panels.filter(":animated").length||r._trigger("select",null,r._ui(this,o[0]))===!1)return this.blur(),!1;i.selected=r.anchors.index(this),r.abort();if(i.collapsible){if(n.hasClass("ui-tabs-selected"))retur
.replace(/"/g,"&quot;")}function p(e,t,n){e.namespaces[t]||e.namespaces.add(t,n,"#default#VML")}function d(e){p(e,"g_vml_","urn:schemas-microsoft-com:vml"),p(e,"g_o_","urn:schemas-microsoft-com:office:office");if(!e.styleSheets.ex_canvas_){var t=e.createStyleSheet();t.owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function m(e){var t=e.srcElement;switch(e.propertyName){case"width":t.getContext().clearRect(),t.style.width=t.attributes.width.nodeValue+"px",t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect(),t.style.height=t.attributes.height.nodeValue+"px",t.firstChild.style.height=t.clientHeight+"px"}}function g(e){var t=e.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function E(){return[[1,0,0],[0,1,0],[0,0,1]]}function S(e,t){var n=E();for(var r=0;r<3;r++)for(var i=0;i<3;i++){var s=0;for(var o=0;o<3;o++)s+=e[r][o]*t[o][i];n[r][i]=s}return n}function x(e,t){t.fillStyle=e.fillStyle,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle,t.globalAlpha=e.globalAlpha,t.font=e.font,t.textAlign=e.textAlign,t.textBaseline=e.textBaseline,t.arcScaleX_=e.arcScaleX_,t.arcScaleY_=e.arcScaleY_,t.lineScale_=e.lineScale_}function N(e){var t=e.indexOf("(",3),n=e.indexOf(")",t+1),r=e.substring(t+1,n).split(",");if(r.length!=4||e.charAt(3)!="a")r[3]=1;return r}function C(e){return parseFloat(e)/100}function k(e,t,n){return Math.min(n,Math.max(t,e))}function L(e){var t,n,r,i,s,o;i=parseFloat(e[0])/360%360,i<0&&i++,s=k(C(e[1]),0,1),o=k(C(e[2]),0,1);if(s==0)t=n=r=o;else{var u=o<.5?o*(1+s):o+s-o*s,a=2*o-u;t=A(a,u,i+1/3),n=A(a,u,i),r=A(a,u,i-1/3)}return"#"+y[Math.floor(t*255)]+y[Math.floor(n*255)]+y[Math.floor(r*255)]}function A(e,t,n){return n<0&&n++,n>1&&n--,6*n<1?e+(t-e)*6*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function M(e){if(e in O)return O[e];var t,n=1;e=String(e);if(e.charAt(0)=="#")t=e;else if(/^rgb/.test(e)){var r=N(e),t="#",i;for(var s=0;s<3;s++)r[s].indexOf("%")!=-1?i=Math.floor(C(r[s])*255):i=+r[s],t+=y[k(i,0,255)];n=+r[3]}else if(/^hsl/.test(e)){var r=N(e);t=L(r),n=r[3]}else t=T[e]||e;return O[e]={color:t,alpha:n}}function P(e){if(D[e])return D[e];var t=document.createElement("div"),n=t.style;try{n.font=e}catch(r){}return D[e]={style:n.fontStyle||_.style,variant:n.fontVariant||_.variant,weight:n.fontWeight||_.weight,size:n.fontSize||_.size,family:n.fontFamily||_.family}}function H(e,t){var n={};for(var r in e)n[r]=e[r];var i=parseFloat(t.currentStyle.fontSize),s=parseFloat(e.size);return typeof e.size=="number"?n.size=e.size:e.size.indexOf("px")!=-1?n.size=s:e.size.indexOf("em")!=-1?n.size=i*s:e.size.indexOf("%")!=-1?n.size=i/100*s:e.size.indexOf("pt")!=-1?n.size=s/.75:n.size=i,n.size*=.981,n}function B(e){return e.style+" "+e.variant+" "+e.weight+" "+e.size+"px "+e.family}function F(e){return j[e]||"square"}function I(e){this.m_=E(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=o*1,this.globalAlpha=1,this.font="10px sans-serif",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=e;var t="width:"+e.clientWidth+"px;height:"+e.clientHeight+"px;overflow:hidden;position:absolute",n=e.ownerDocument.createElement("div");n.style.cssText=t,e.appendChild(n);var r=n.cloneNode(!1);r.style.backgroundColor="red",r.style.filter="alpha(opacity=0)",e.appendChild(r),this.element_=n,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function R(e,t,n,r){e.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:n.x,cp2y:n.y,x:r.x,y:r.y}),e.currentX_=r.x,e.currentY_=r.y}function U(e,t){var n=M(e.strokeStyle),r=n.color,i=n.alpha*e.globalAlpha,s=e.lineScale_*e.lineWidth;s<1&&(i*=s),t.push("<g_vml_:stroke",' opacity="',i,'"',' joinstyle="',e
,getPos:function(e,t){t=t||window,e=e||t.event;var n=t.document;n=n.documentElement||n.body,e.touches&&e.touches.length&&(e=e.touches[0]);var r={x:e.pageX||e.clientX+n.scrollLeft,y:e.pageY||e.clientY+n.scrollTop};return r},stop:function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.preventDefault?e.preventDefault():e.returnValue=!1}},$jit.util=$jit.id=e;var t=function(n){n=n||{};var r=function(){for(var n in this)typeof this[n]!="function"&&(this[n]=e.unlink(this[n]));this.constructor=r;if(t.prototyping)return this;var i=this.initialize?this.initialize.apply(this,arguments):this;return this.$$family="class",i};for(var i in t.Mutators){if(!n[i])continue;n=t.Mutators[i](n,n[i]),delete n[i]}return e.extend(r,this),r.constructor=t,r.prototype=n,r};t.Mutators={Implements:function(n,r){return e.each(e.splat(r),function(e){t.prototyping=e;var r=typeof e=="function"?new e:e;for(var i in r)i in n||(n[i]=r[i]);delete t.prototyping}),n}},e.extend(t,{inherit:function(n,r){for(var i in r){var s=r[i],o=n[i],u=e.type(s);o&&u=="function"?s!=o&&t.override(n,i,s):u=="object"?n[i]=e.merge(o,s):n[i]=s}return n},override:function(e,n,r){var i=t.prototyping;i&&e[n]!=i[n]&&(i=null);var s=function(){var t=this.parent;this.parent=i?i[n]:e[n];var s=r.apply(this,arguments);return this.parent=t,s};e[n]=s}}),t.prototype.implement=function(){var n=this.prototype;return e.each(Array.prototype.slice.call(arguments||[]),function(e){t.inherit(n,e)}),this},$jit.Class=t,$jit.json={prune:function(e,t){this.each(e,function(e,n){n==t&&e.children&&(delete e.children,e.children=[])})},getParent:function(e,t){if(e.id==t)return!1;var n=e.children;if(n&&n.length>0)for(var r=0;r<n.length;r++){if(n[r].id==t)return e;var i=this.getParent(n[r],t);if(i)return i}return!1},getSubtree:function(e,t){if(e.id==t)return e;for(var n=0,r=e.children;n<r.length;n++){var i=this.getSubtree(r[n],t);if(i!=null)return i}return null},eachLevel:function(e,t,n,r){if(t<=n){r(e,t);if(!e.children)return;for(var i=0,s=e.children;i<s.length;i++)this.eachLevel(s[i],t+1,n,r)}},each:function(e,t){this.eachLevel(e,0,Number.MAX_VALUE,t)}},$jit.Trans={$extend:!0,linear:function(e){return e}};var n=$jit.Trans;(function(){var t=function(t,n){return n=e.splat(n),e.extend(t,{easeIn:function(e){return t(e,n)},easeOut:function(e){return 1-t(1-e,n)},easeInOut:function(e){return e<=.5?t(2*e,n)/2:(2-t(2*(1-e),n))/2}})},r={Pow:function(e,t){return Math.pow(e,t[0]||6)},Expo:function(e){return Math.pow(2,8*(e-1))},Circ:function(e){return 1-Math.sin(Math.acos(e))},Sine:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Back:function(e,t){return t=t[0]||1.618,Math.pow(e,2)*((t+1)*e-t)},Bounce:function(e){var t;for(var n=0,r=1;1;n+=r,r/=2)if(e>=(7-4*n)/11){t=r*r-Math.pow((11-6*n-11*e)/4,2);break}return t},Elastic:function(e,t){return Math.pow(2,10*--e)*Math.cos(20*e*Math.PI*(t[0]||1)/3)}};e.each(r,function(e,r){n[r]=t(e)}),e.each(["Quad","Cubic","Quart","Quint"],function(e,r){n[e]=t(function(e){return Math.pow(e,[r+2])})})})();var r=new t({initialize:function(e){this.setOptions(e)},setOptions:function(t){var r={duration:2500,fps:40,transition:n.Quart.easeInOut,compute:e.empty,complete:e.empty,link:"ignore"};return this.opt=e.merge(r,t||{}),this},step:function(){var t=e.time(),n=this.opt;if(t<this.time+n.duration){var r=n.transition((t-this.time)/n.duration);n.compute(r)}else this.timer=clearInterval(this.timer),n.compute(1),n.complete()},start:function(){return this.check()?(this.time=0,this.startTimer(),this):this},startTimer:function(){var t=this,n=this.opt.fps;return this.timer?!1:(this.time=e.time()-this.time,this.timer=setInterval(function(){t.step()},Math.round(1e3/n)),!0)},pause:function(){return this.stopTimer(),this},resume:function(){return this.startTimer(),this},stopTimer:function(){return this.timer?(this.time=e.time()-this.time,this.timer=clearInterval(this.timer),!0):!1},check:function(){return this.timer?this.opt.link=="cancel"?(this.stopTimer(),!0):!1:!0}}),i=function(){var t=arguments;for(var n=0,r=t.length,s={};n<r;n++){var o=i[t[n]];o.$extend?e.extend(s,o):s[t[n]]=o}return s};i.A
labels.clearLabels(),r.reposition(),r.fx.animate(e.merge(i,{modes:["linear"]}))}}));break;case"fade:con":u=this;for(o=0;o<s.length;o++)a=r.graph.getNode(s[o]),a.setData("alpha",0,"end"),a.ignore=!0;r.reposition(),r.fx.animate(e.merge(i,{modes:["node-property:alpha","linear"],onComplete:function(){u.removeNode(s,{type:"nothing"})}}));break;case"iter":u=this,r.fx.sequence({condition:function(){return s.length!=0},step:function(){u.removeNode(s.shift(),{type:"nothing"}),r.labels.clearLabels()},onComplete:function(){i.onComplete()},duration:Math.ceil(i.duration/s.length)});break;default:this.doError()}},removeEdge:function(t,n){var r=this.viz,i=e.merge(this.options,r.controller,n),s=e.type(t[0])=="string"?[t]:t,o,u,a;switch(i.type){case"nothing":for(o=0;o<s.length;o++)r.graph.removeAdjacence(s[o][0],s[o][1]);break;case"replot":this.removeEdge(s,{type:"nothing"}),r.refresh(!0);break;case"fade:seq":case"fade":u=this;for(o=0;o<s.length;o++)a=r.graph.getAdjacence(s[o][0],s[o][1]),a&&a.setData("alpha",0,"end");r.fx.animate(e.merge(i,{modes:["edge-property:alpha"],onComplete:function(){u.removeEdge(s,{type:"nothing"}),r.reposition(),r.fx.animate(e.merge(i,{modes:["linear"]}))}}));break;case"fade:con":u=this;for(o=0;o<s.length;o++)a=r.graph.getAdjacence(s[o][0],s[o][1]),a&&(a.setData("alpha",0,"end"),a.ignore=!0);r.reposition(),r.fx.animate(e.merge(i,{modes:["edge-property:alpha","linear"],onComplete:function(){u.removeEdge(s,{type:"nothing"})}}));break;case"iter":u=this,r.fx.sequence({condition:function(){return s.length!=0},step:function(){u.removeEdge(s.shift(),{type:"nothing"}),r.labels.clearLabels()},onComplete:function(){i.onComplete()},duration:Math.ceil(i.duration/s.length)});break;default:this.doError()}},sum:function(t,n){var r=this.viz,i=e.merge(this.options,r.controller,n),s=r.root,o;r.root=n.id||r.root;switch(i.type){case"nothing":o=r.construct(t),o.eachNode(function(e){e.eachAdjacency(function(e){r.graph.addAdjacence(e.nodeFrom,e.nodeTo,e.data)})});break;case"replot":r.refresh(!0),this.sum(t,{type:"nothing"}),r.refresh(!0);break;case"fade:seq":case"fade":case"fade:con":that=this,o=r.construct(t);var u=this.preprocessSum(o),a=u?["node-property:alpha","edge-property:alpha"]:["node-property:alpha"];r.reposition(),i.type!="fade:con"?r.fx.animate(e.merge(i,{modes:["linear"],onComplete:function(){r.fx.animate(e.merge(i,{modes:a,onComplete:function(){i.onComplete()}}))}})):(r.graph.eachNode(function(e){e.id!=s&&e.pos.getp().equals(l.KER)&&(e.pos.set(e.endPos),e.startPos.set(e.endPos))}),r.fx.animate(e.merge(i,{modes:["linear"].concat(a)})));break;default:this.doError()}},morph:function(t,n,r){var i=this.viz,s=e.merge(this.options,i.controller,n),o=i.root,u;i.root=n.id||i.root;switch(s.type){case"nothing":u=i.construct(t),u.eachNode(function(e){var t=i.graph.hasNode(e.id);e.eachAdjacency(function(e){var t=!!i.graph.getAdjacence(e.nodeFrom.id,e.nodeTo.id);i.graph.addAdjacence(e.nodeFrom,e.nodeTo,e.data);if(t){var n=i.graph.getAdjacence(e.nodeFrom.id,e.nodeTo.id);for(var r in e.data||{})n.data[r]=e.data[r]}});if(t){var n=i.graph.getNode(e.id);for(var r in e.data||{})n.data[r]=e.data[r]}}),i.graph.eachNode(function(e){e.eachAdjacency(function(e){u.getAdjacence(e.nodeFrom.id,e.nodeTo.id)||i.graph.removeAdjacence(e.nodeFrom.id,e.nodeTo.id)}),u.hasNode(e.id)||i.graph.removeNode(e.id)});break;case"replot":i.labels.clearLabels(!0),this.morph(t,{type:"nothing"}),i.refresh(!0),i.refresh(!0);break;case"fade:seq":case"fade":case"fade:con":that=this,u=i.construct(t);var a=r&&"node-property"in r&&e.map(e.splat(r["node-property"]),function(e){return"$"+e});i.graph.eachNode(function(t){var n=u.getNode(t.id);if(!n)t.setData("alpha",1),t.setData("alpha",1,"start"),t.setData("alpha",0,"end"),t.ignore=!0;else{var r=n.data;for(var i in r)a&&e.indexOf(a,i)>-1?t.endData[i]=r[i]:t.data[i]=r[i]}}),i.graph.eachNode(function(e){if(e.ignore)return;e.eachAdjacency(function(e){if(e.nodeFrom.ignore||e.nodeTo.ignore)return;var t=u.getNode(e.nodeFrom.id),n=u.getNode(e.nodeTo.id);if(!t.adjacentTo(n)){var e=i.graph.getAdjacence(t.id,n.id);f=!0,e.setData("alph
),t=e.shift(),n=e.length,r=function(e){return typeof e=="function"?e():e};if(n==2)return t=="top"||t=="bottom"?r(e[0]):r(e[1]);if(n==4)switch(t){case"top":return r(e[0]);case"right":return r(e[1]);case"bottom":return r(e[2]);case"left":return r(e[3])}return undefined},getSize:function(e,t){var n=e.data,r=this.config,i=r.siblingOffset,s=r.multitree&&"$orn"in n&&n.$orn||r.orientation,o=e.getData("width")+i,u=e.getData("height")+i;return t?this.dispatch(s,o,u):this.dispatch(s,u,o)},getTreeBaseSize:function(e,t,n){var r=this.getSize(e,!0),i=0,s=this;return n(t,e)?r:t===0?0:(e.eachSubnode(function(e){i+=s.getTreeBaseSize(e,t-1,n)}),(r>i?r:i)+this.config.subtreeOffset)},getEdge:function(e,t,n){var r=function(t,n){return function(){return e.pos.add(new h(t,n))}},i=this.node,s=e.getData("width"),o=e.getData("height");if(t=="begin"){if(i.align=="center")return this.dispatch(n,r(0,o/2),r(-s/2,0),r(0,-o/2),r(s/2,0));if(i.align=="left")return this.dispatch(n,r(0,o),r(0,0),r(0,0),r(s,0));if(i.align=="right")return this.dispatch(n,r(0,0),r(-s,0),r(0,-o),r(0,0));throw"align: not implemented"}if(t=="end"){if(i.align=="center")return this.dispatch(n,r(0,-o/2),r(s/2,0),r(0,o/2),r(-s/2,0));if(i.align=="left")return this.dispatch(n,r(0,0),r(s,0),r(0,o),r(0,0));if(i.align=="right")return this.dispatch(n,r(0,-o),r(0,0),r(0,0),r(-s,0));throw"align: not implemented"}},getScaledTreePosition:function(e,t){var n=this.node,r=e.getData("width"),i=e.getData("height"),s=this.config.multitree&&"$orn"in e.data&&e.data.$orn||this.config.orientation,o=function(n,r){return function(){return e.pos.add(new h(n,r)).$scale(1-t)}};if(n.align=="left")return this.dispatch(s,o(0,i),o(0,0),o(0,0),o(r,0));if(n.align=="center")return this.dispatch(s,o(0,i/2),o(-r/2,0),o(0,-i/2),o(r/2,0));if(n.align=="right")return this.dispatch(s,o(0,0),o(-r,0),o(0,-i),o(0,0));throw"align: not implemented"},treeFitsInCanvas:function(e,t,n){var r=t.getSize(),i=this.config.multitree&&"$orn"in e.data&&e.data.$orn||this.config.orientation,s=this.dispatch(i,r.width,r.height),o=this.getTreeBaseSize(e,n,function(e,t){return e===0||!t.anySubnode()});return o<s}}),$jit.ST.Plot=new t({Implements:d.Plot,plotSubtree:function(t,n,r,i){var s=this.viz,o=s.canvas,u=s.config;r=Math.min(Math.max(.001,r),1);if(r>=0){t.drawn=!1;var a=o.getCtx(),f=s.geom.getScaledTreePosition(t,r);a.translate(f.x,f.y),a.scale(r,r)}this.plotTree(t,e.merge(n,{withLabels:!0,hideLabels:!!r,plotSubtree:function(e,n){var r=u.multitree&&!("$orn"in t.data),i=r&&t.getData("orns");return!r||i.indexOf(elem.getData("orn"))>-1}}),i),r>=0&&(t.drawn=!0)},getAlignedPos:function(e,t,n){var r=this.node,i,s;if(r.align=="center")i={x:e.x-t/2,y:e.y-n/2};else if(r.align=="left")s=this.config.orientation,s=="bottom"||s=="top"?i={x:e.x-t/2,y:e.y}:i={x:e.x,y:e.y-n/2};else{if(r.align!="right")throw"align: not implemented";s=this.config.orientation,s=="bottom"||s=="top"?i={x:e.x-t/2,y:e.y-n}:i={x:e.x-t,y:e.y-n/2}}return i},getOrientation:function(e){var t=this.config,n=t.orientation;if(t.multitree){var r=e.nodeFrom,i=e.nodeTo;n="$orn"in r.data&&r.data.$orn||"$orn"in i.data&&i.data.$orn}return n}}),$jit.ST.Label={},$jit.ST.Label.Native=new t({Implements:d.Label.Native,renderLabel:function(e,t,n){var r=e.getCtx(),i=t.pos.getc(!0);r.fillText(t.name,i.x,i.y)}}),$jit.ST.Label.DOM=new t({Implements:d.Label.DOM,placeLabel:function(e,t,n){var r=t.pos.getc(!0),i=this.viz.config,s=i.Node,o=this.viz.canvas,u=t.getData("width"),a=t.getData("height"),f=o.getSize(),l,c,h=o.translateOffsetX,p=o.translateOffsetY,d=o.scaleOffsetX,v=o.scaleOffsetY,m=r.x*d+h,g=r.y*v+p;if(s.align=="center")l={x:Math.round(m-u/2+f.width/2),y:Math.round(g-a/2+f.height/2)};else if(s.align=="left")c=i.orientation,c=="bottom"||c=="top"?l={x:Math.round(m-u/2+f.width/2),y:Math.round(g+f.height/2)}:l={x:Math.round(m+f.width/2),y:Math.round(g-a/2+f.height/2)};else{if(s.align!="right")throw"align: not implemented";c=i.orientation,c=="bottom"||c=="top"?l={x:Math.round(m-u/2+f.width/2),y:Math.round(g-a+f.height/2)}:l={x:Math.round(m-u+f.width/2),y:Math.round(g-a/2+f.height/2)}}var y=e.style;y.l
,d=Math.PI,v=h.theta>d/2&&h.theta<3*d/2,a=v?h.theta+d:h.theta;v?(o-=Math.abs(Math.cos(h.theta)*s.width),u+=Math.sin(h.theta)*s.width):t.id==this.viz.root&&(o-=s.width/2)}i.save(),i.translate(o,u),i.rotate(a),i.fillText(t.name,0,0),i.restore()}}),n.Label.SVG=new t({Implements:d.Label.SVG,initialize:function(e){this.viz=e},placeLabel:function(e,t,n){var r=t.pos.getc(!0),i=this.viz,s=this.viz.canvas,o=s.getSize(),u={x:Math.round(r.x+o.width/2),y:Math.round(r.y+o.height/2)};e.setAttribute("x",u.x),e.setAttribute("y",u.y);var a=e.getBBox();if(a){var f=e.getAttribute("x"),l=e.getAttribute("y"),c=t.pos.getp(!0),h=Math.PI,p=c.theta>h/2&&c.theta<3*h/2;p?(e.setAttribute("x",f-a.width),e.setAttribute("y",l-a.height)):t.id==i.root&&e.setAttribute("x",f-a.width/2);var d=p?c.theta+h:c.theta;t._depth&&e.setAttribute("transform","rotate("+d*360/(2*h)+" "+f+" "+l+")")}n.onPlaceLabel(e,t)}}),n.Label.HTML=new t({Implements:d.Label.HTML,initialize:function(e){this.viz=e},placeLabel:function(e,t,n){var r=t.pos.clone(),i=this.viz.canvas,s=t.getData("height"),o=(s||t._depth==0?s:this.viz.config.levelDistance)/2,u=i.getSize();r.rho+=o,r=r.getc(!0);var a={x:Math.round(r.x+u.width/2),y:Math.round(r.y+u.height/2)},f=e.style;f.left=a.x+"px",f.top=a.y+"px",f.display=this.fitsInCanvas(a,i)?"":"none",n.onPlaceLabel(e,t)}}),n.Plot.NodeTypes=new t({none:{render:e.empty,contains:e.lambda(!1),anglecontains:function(e,t){var n=e.getData("span")/2,r=e.pos.theta,i=r-n,s=r+n;i<0&&(i+=Math.PI*2);var o=Math.atan2(t.y,t.x);return o<0&&(o+=Math.PI*2),i>s?o>i&&o<=Math.PI*2||o<s:o>i&&o<s}},pie:{render:function(e,t){var n=e.getData("span")/2,r=e.pos.theta,i=r-n,s=r+n,o=e.pos.getp(!0),u=new l(o.rho,i),a=u.getc(!0);u.theta=s;var f=u.getc(!0),c=t.getCtx();c.beginPath(),c.moveTo(0,0),c.lineTo(a.x,a.y),c.moveTo(0,0),c.lineTo(f.x,f.y),c.moveTo(0,0),c.arc(0,0,o.rho*e.getData("dim-quotient"),i,s,!1),c.fill()},contains:function(e,t){if(this.nodeTypes.none.anglecontains.call(this,e,t)){var n=Math.sqrt(t.x*t.x+t.y*t.y),r=this.config.levelDistance,i=e._depth;return n<=r*i}return!1}},multipie:{render:function(e,t){var n=e.getData("height"),r=n?n:this.config.levelDistance,i=e.getData("span")/2,s=e.pos.theta,o=s-i,u=s+i,a=e.pos.getp(!0),f=new l(a.rho,o),c=f.getc(!0);f.theta=u;var h=f.getc(!0);f.rho+=r;var p=f.getc(!0);f.theta=o;var d=f.getc(!0),v=t.getCtx();v.moveTo(0,0),v.beginPath(),v.arc(0,0,a.rho,o,u,!1),v.arc(0,0,a.rho+r,u,o,!0),v.moveTo(c.x,c.y),v.lineTo(d.x,d.y),v.moveTo(h.x,h.y),v.lineTo(p.x,p.y),v.fill(),e.collapsed&&(v.save(),v.lineWidth=2,v.moveTo(0,0),v.beginPath(),v.arc(0,0,a.rho+r+5,u-.01,o+.01,!0),v.stroke(),v.restore())},contains:function(e,t){if(this.nodeTypes.none.anglecontains.call(this,e,t)){var n=Math.sqrt(t.x*t.x+t.y*t.y),r=e.getData("height"),i=r?r:this.config.levelDistance,s=this.config.levelDistance,o=e._depth;return n>=s*o&&n<=s*o+i}return!1}},"gradient-multipie":{render:function(t,n){var r=n.getCtx(),i=t.getData("height"),s=i?i:this.config.levelDistance,o=r.createRadialGradient(0,0,t.getPos().rho,0,0,t.getPos().rho+s),u=e.hexToRgb(t.getData("color")),a=[];e.each(u,function(e){a.push(parseInt(e*.5,10))});var f=e.rgbToHex(a);o.addColorStop(0,f),o.addColorStop(1,t.getData("color")),r.fillStyle=o,this.nodeTypes.multipie.render.call(this,t,n)},contains:function(e,t){return this.nodeTypes.multipie.contains.call(this,e,t)}},"gradient-pie":{render:function(t,n){var r=n.getCtx(),i=r.createRadialGradient(0,0,0,0,0,t.getPos().rho),s=e.hexToRgb(t.getData("color")),o=[];e.each(s,function(e){o.push(parseInt(e*.5,10))});var u=e.rgbToHex(o);i.addColorStop(1,u),i.addColorStop(0,t.getData("color")),r.fillStyle=i,this.nodeTypes.pie.render.call(this,t,n)},contains:function(e,t){return this.nodeTypes.pie.contains.call(this,e,t)}}}),n.Plot.EdgeTypes=new t({none:e.empty,line:{render:function(e,t){var n=e.nodeFrom.pos.getc(!0),r=e.nodeTo.pos.getc(!0);this.edgeHelper.line.render(n,r,t)},contains:function(e,t){var n=e.nodeFrom.pos.getc(!0),r=e.nodeTo.pos.getc(!0);return this.edgeHelper.line.contains(n,r,t,this.edge.epsilon)}},arrow:{render:function(e,t){var n=e.nodeFrom.pos.getc
.busy=!1;return}callback={onComplete:function(){e.clickedNode=i,t.request?e.requestNodes(i,{onComplete:function(){e.compute(),e.plot(),e.busy=!1}}):(e.compute(),e.plot(),e.busy=!1)}},t.levelsToShow>0&&this.geom.setRightLevelToShow(i),t.animate?(this.clickedNode=s,this.compute("end"),this.clickedNode=o,this.fx.animate({modes:["linear","node-property:width:height"],duration:1e3,onComplete:function(){e.clickedNode=s,n.eachNode(function(e){e.setDataset(["current","end"],{alpha:[0,1]})},"ignore"),o.eachSubgraph(function(e){e.setData("alpha",1)},"ignore"),e.fx.animate({duration:500,modes:["node-property:alpha"],onComplete:function(){callback.onComplete()}})}})):callback.onComplete()},requestNodes:function(t,n){var r=e.merge(this.controller,n),i=this.config.levelsToShow;if(r.request){var s=[],o=t._depth;t.eachLevel(0,i,function(e){var t=i-(e._depth-o);e.drawn&&!e.anySubnode()&&t>0&&(s.push(e),e._level=t)}),this.group.requestNodes(s,r)}else r.onComplete()}},E.Op=new t({Implements:d.Op,initialize:function(e){this.viz=e}}),E.Geom=new t({Implements:d.Geom,getRightLevelToShow:function(){return this.viz.config.levelsToShow},setRightLevelToShow:function(e){var t=this.getRightLevelToShow(),n=this.viz.labels;e.eachLevel(0,t+1,function(r){var i=r._depth-e._depth;i>t?(r.drawn=!1,r.exist=!1,r.ignore=!0,n.hideLabel(r,!1)):(r.drawn=!0,r.exist=!0,delete r.ignore)}),e.drawn=!0,delete e.ignore}}),E.Group=new t({initialize:function(e){this.viz=e,this.canvas=e.canvas,this.config=e.config},requestNodes:function(e,t){var n=0,r=e.length,i={},s=function(){t.onComplete()},o=this.viz;r==0&&s();for(var u=0;u<r;u++)i[e[u].id]=e[u],t.request(e[u].id,e[u]._level,{onComplete:function(e,t){t&&t.children&&(t.id=e,o.op.sum(t,{type:"nothing"})),++n==r&&(o.graph.computeLevels(o.root,0),s())}})}}),E.Plot=new t({Implements:d.Plot,initialize:function(e){this.viz=e,this.config=e.config,this.node=this.config.Node,this.edge=this.config.Edge,this.animation=new r,this.nodeTypes=new E.Plot.NodeTypes,this.edgeTypes=new E.Plot.EdgeTypes,this.labels=e.labels},plot:function(t,n){var r=this.viz,i=r.graph;r.canvas.clear(),this.plotTree(i.getNode(r.clickedNode&&r.clickedNode.id||r.root),e.merge(r.config,t||{},{withLabels:!0,hideLabels:!1,plotSubtree:function(e,t){return e.anySubnode("exist")}}),n)}}),E.Label={},E.Label.Native=new t({Implements:d.Label.Native,initialize:function(e){this.config=e.config,this.leaf=e.leaf},renderLabel:function(e,t,n){if(!this.leaf(t)&&!this.config.titleHeight)return;var r=t.pos.getc(!0),i=e.getCtx(),s=t.getData("width"),o=t.getData("height"),u=r.x+s/2,a=r.y;i.fillText(t.name,u,a,s)}}),E.Label.SVG=new t({Implements:d.Label.SVG,initialize:function(e){this.viz=e,this.leaf=e.leaf,this.config=e.config},placeLabel:function(e,t,n){var r=t.pos.getc(!0),i=this.viz.canvas,s=i.translateOffsetX,o=i.translateOffsetY,u=i.scaleOffsetX,a=i.scaleOffsetY,f=i.getSize(),l={x:Math.round(r.x*u+s+f.width/2),y:Math.round(r.y*a+o+f.height/2)};e.setAttribute("x",l.x),e.setAttribute("y",l.y),!this.leaf(t)&&!this.config.titleHeight&&(e.style.display="none"),n.onPlaceLabel(e,t)}}),E.Label.HTML=new t({Implements:d.Label.HTML,initialize:function(e){this.viz=e,this.leaf=e.leaf,this.config=e.config},placeLabel:function(e,t,n){var r=t.pos.getc(!0),i=this.viz.canvas,s=i.translateOffsetX,o=i.translateOffsetY,u=i.scaleOffsetX,a=i.scaleOffsetY,f=i.getSize(),l={x:Math.round(r.x*u+s+f.width/2),y:Math.round(r.y*a+o+f.height/2)},c=e.style;c.left=l.x+"px",c.top=l.y+"px",c.width=t.getData("width")*u+"px",c.height=t.getData("height")*a+"px",c.zIndex=t._depth*100,c.display="",!this.leaf(t)&&!this.config.titleHeight&&(e.style.display="none"),n.onPlaceLabel(e,t)}}),E.Plot.NodeTypes=new t({none:{render:e.empty},rectangle:{render:function(t,n,r){var i=this.viz.leaf(t),s=this.config,o=s.offset,u=s.titleHeight,a=t.pos.getc(!0),f=t.getData("width"),l=t.getData("height"),c=t.getData("border"),h=n.getCtx(),p=a.x+o/2,d=a.y+o/2;if(f<=o||l<=o)return;if(i){if(s.cushion){var v=h.createRadialGradient(p+(f-o)/2,d+(l-o)/2,1,p+(f-o)/2,d+(l-o)/2,f<l?l:f),m=t.getData("color"),g=e.rgbToHex(e.map(e.hexToRgb(m),fun
(e,t))&&(this.node=this.viz.graph.getNode(n.id),this.config.onShow(this.tip,this.node,n))},onMouseMove:function(t,n,r){this.dom&&this.isLabel(t,n)&&this.setTooltipPosition(e.event.getPos(t,n));if(!this.dom){var i=r.getNode();if(!i){this.hide(!0);return}if(this.config.force||!this.node||this.node.id!=i.id)this.node=i,this.config.onShow(this.tip,i,r.getContains());this.setTooltipPosition(e.event.getPos(t,n))}},setTooltipPosition:function(e){var t=this.tip,n=t.style,r=this.config;n.display="";var i={height:document.body.clientHeight,width:document.body.clientWidth},s={width:t.offsetWidth,height:t.offsetHeight},o=r.offsetX,u=r.offsetY;n.top=(e.y+u+s.height>i.height?e.y-s.height-u:e.y+u)+"px",n.left=(e.x+s.width+o>i.width?e.x-s.width-o:e.x+o)+"px"},hide:function(e){this.tip.style.display="none",e&&this.config.onHide()}}),a.Classes.NodeStyles=new t({Implements:[s,o],initializePost:function(){this.fx=this.viz.fx,this.types=this.viz.fx.nodeTypes,this.nStyles=this.config,this.nodeStylesOnHover=this.nStyles.stylesHover,this.nodeStylesOnClick=this.nStyles.stylesClick,this.hoveredNode=!1,this.fx.nodeFxAnimation=new r,this.down=!1,this.move=!1},onMouseOut:function(e,t){this.down=this.move=!1;if(!this.hoveredNode)return;this.dom&&this.isLabel(e,t)&&this.toggleStylesOnHover(this.hoveredNode,!1);var n=e.relatedTarget,r=this.canvas.getElement();while(n&&n.parentNode){if(r==n.parentNode)return;n=n.parentNode}this.toggleStylesOnHover(this.hoveredNode,!1),this.hoveredNode=!1},onMouseOver:function(e,t){var n;if(this.dom&&(n=this.isLabel(e,t))){var r=this.viz.graph.getNode(n.id);if(r.selected)return;this.hoveredNode=r,this.toggleStylesOnHover(this.hoveredNode,!0)}},onMouseDown:function(e,t,n,r){if(r)return;var i;this.dom&&(i=this.isLabel(e,t))?this.down=this.viz.graph.getNode(i.id):this.dom||(this.down=n.getNode()),this.move=!1},onMouseUp:function(e,t,n,r){if(r)return;this.move||this.onClick(n.getNode()),this.down=this.move=!1},getRestoredStyles:function(e,t){var n={},r=this["nodeStylesOn"+t];for(var i in r)n[i]=e.styles["$"+i];return n},toggleStylesOnHover:function(e,t){this.nodeStylesOnHover&&this.toggleStylesOn("Hover",e,t)},toggleStylesOnClick:function(e,t){this.nodeStylesOnClick&&this.toggleStylesOn("Click",e,t)},toggleStylesOn:function(t,r,i){var s=this.viz,o=this.nStyles;if(i){var u=this;r.styles||(r.styles=e.merge(r.data,{}));for(var a in this["nodeStylesOn"+t]){var f="$"+a;f in r.styles||(r.styles[f]=r.getData(a))}s.fx.nodeFx(e.extend({elements:{id:r.id,properties:u["nodeStylesOn"+t]},transition:n.Quart.easeOut,duration:300,fps:40},this.config))}else{var l=this.getRestoredStyles(r,t);s.fx.nodeFx(e.extend({elements:{id:r.id,properties:l},transition:n.Quart.easeOut,duration:300,fps:40},this.config))}},onClick:function(e){if(!e)return;var t=this.nodeStylesOnClick;if(!t)return;e.selected?(this.toggleStylesOnClick(e,!1),delete e.selected):(this.viz.graph.eachNode(function(e){if(e.selected){for(var n in t)e.setData(n,e.styles["$"+n],"end");delete e.selected}}),this.toggleStylesOnClick(e,!0),e.selected=!0,delete e.hovered,this.hoveredNode=!1)},onMouseMove:function(e,t,n){this.down&&(this.move=!0);if(this.dom&&this.isLabel(e,t))return;var r=this.nodeStylesOnHover;if(!r)return;if(!this.dom){if(this.hoveredNode){var i=this.types[this.hoveredNode.getData("type")],s=i&&i.contains&&i.contains.call(this.fx,this.hoveredNode,n.getPos());if(s)return}var o=n.getNode();if(!this.hoveredNode&&!o)return;if(o.hovered)return;o&&!o.selected?(this.fx.nodeFxAnimation.stopTimer(),this.viz.graph.eachNode(function(e){if(e.hovered&&!e.selected){for(var t in r)e.setData(t,e.styles["$"+t],"end");delete e.hovered}}),o.hovered=!0,this.hoveredNode=o,this.toggleStylesOnHover(o,!0)):this.hoveredNode&&!this.hoveredNode.selected&&(this.fx.nodeFxAnimation.stopTimer(),this.toggleStylesOnHover(this.hoveredNode,!1),delete this.hoveredNode.hovered,this.hoveredNode=!1)}}}),a.Classes.Navigation=new t({Implements:[s,o],initializePost:function(){this.pos=!1,this.pressed=!1},onMouseWheel:function(t,n,r){if(!this.config.zooming)return;e.event.stop(e.event.get(t,n));var i=this.config
(t[a]);return n.eachNode(function(t){t.startPos.set(t.pos),e.each(["node-property","node-style"],function(e){if(e in i){var n=i[e];for(var s=0,o=n.length;s<o;s++)t[r[e].setter](n[s],t[r[e].getter](n[s]),"start")}}),e.each(["edge-property","edge-style"],function(e){if(e in i){var n=i[e];t.eachAdjacency(function(t){for(var i=0,s=n.length;i<s;i++)t[r[e].setter](n[i],t[r[e].getter](n[i]),"start")})}})}),i},animate:function(t,n){t=e.merge(this.viz.config,t||{});var r=this,i=this.viz,s=i.graph,o=this.Interpolator,u=t.type==="nodefx"?this.nodeFxAnimation:this.animation,a=this.prepare(t.modes);t.hideLabels&&this.labels.hideLabels(!0),u.setOptions(e.merge(t,{$animating:!1,compute:function(e){s.eachNode(function(t){for(var r in a)o[r](t,a[r],e,n)}),r.plot(t,this.$animating,e),this.$animating=!0},complete:function(){t.hideLabels&&r.labels.hideLabels(!1),r.plot(t),t.onComplete(),t.onAfterCompute()}})).start()},nodeFx:function(t){var n=this.viz,r=n.graph,i=this.nodeFxAnimation,s=e.merge(this.viz.config,{elements:{id:!1,properties:{}},reposition:!1});t=e.merge(s,t||{},{onBeforeCompute:e.empty,onAfterCompute:e.empty}),i.stopTimer();var o=t.elements.properties;if(!t.elements.id)r.eachNode(function(e){for(var t in o)e.setData(t,o[t],"end")});else{var u=e.splat(t.elements.id);e.each(u,function(e){var t=r.getNode(e);if(t)for(var n in o)t.setData(n,o[n],"end")})}var a=[];for(var f in o)a.push(f);var l=["node-property:"+a.join(":")];t.reposition&&(l.push("linear"),n.compute("end")),this.animate(e.merge(t,{modes:l,type:"nodefx"}))},plot:function(e,t){var n=this.viz,r=n.graph,i=n.canvas,s=n.root,o=this,u=i.getCtx(),a=Math.min,e=e||this.viz.controller;e.clearCanvas&&i.clear();var f=r.getNode(s);if(!f)return;var l=!!f.visited;r.eachNode(function(n){var r=n.getData("alpha");n.eachAdjacency(function(s){var f=s.nodeTo;!!f.visited===l&&n.drawn&&f.drawn&&(!t&&e.onBeforePlotLine(s),u.save(),u.globalAlpha=a(r,f.getData("alpha"),s.getData("alpha")),o.plotLine(s,i,t),u.restore(),!t&&e.onAfterPlotLine(s))}),u.save(),n.drawn&&(!t&&e.onBeforePlotNode(n),o.plotNode(n,i,t),!t&&e.onAfterPlotNode(n)),!o.labelsHidden&&e.withLabels&&(n.drawn&&r>=.95?o.labels.plotLabel(i,n,e):o.labels.hideLabel(n,!1)),u.restore(),n.visited=!l})},plotTree:function(e,t,n){var r=this,i=this.viz,s=i.canvas,o=this.config,u=s.getCtx(),a=e.getData("alpha");e.eachSubnode(function(i){if(t.plotSubtree(e,i)&&i.exist&&i.drawn){var o=e.getAdjacency(i.id);!n&&t.onBeforePlotLine(o),u.globalAlpha=Math.min(a,i.getData("alpha")),r.plotLine(o,s,n),!n&&t.onAfterPlotLine(o),r.plotTree(i,t,n)}}),e.drawn?(!n&&t.onBeforePlotNode(e),this.plotNode(e,s,n),!n&&t.onAfterPlotNode(e),!t.hideLabels&&t.withLabels&&a>=.95?this.labels.plotLabel(s,e,t):this.labels.hideLabel(e,!1)):this.labels.hideLabel(e,!0)},plotNode:function(e,t,n){var r=e.getData("type"),i=this.node.CanvasStyles;if(r!="none"){var s=e.getData("lineWidth"),o=e.getData("color"),u=e.getData("alpha"),a=t.getCtx();a.lineWidth=s,a.fillStyle=a.strokeStyle=o,a.globalAlpha=u;for(var f in i)a[f]=e.getCanvasStyle(f);this.nodeTypes[r].render.call(this,e,t,n)}},plotLine:function(e,t,n){var r=e.getData("type"),i=this.edge.CanvasStyles;if(r!="none"){var s=e.getData("lineWidth"),o=e.getData("color"),u=t.getCtx();u.lineWidth=s,u.fillStyle=u.strokeStyle=o;for(var a in i)u[a]=e.getCanvasStyle(a);this.edgeTypes[r].render.call(this,e,t,n)}}},d.Label={},d.Label.Native=new t({plotLabel:function(e,t,n){var r=e.getCtx(),i=t.pos.getc(!0);r.font=t.getLabelData("style")+" "+t.getLabelData("size")+"px "+t.getLabelData("family"),r.textAlign=t.getLabelData("textAlign"),r.fillStyle=r.strokeStyle=t.getLabelData("color"),r.textBaseline=t.getLabelData("textBaseline"),this.renderLabel(e,t,n)},renderLabel:function(e,t,n){var r=e.getCtx(),i=t.pos.getc(!0);r.fillText(t.name,i.x,i.y+t.getData("height")/2)},hideLabel:e.empty,hideLabels:e.empty}),d.Label.DOM=new t({labelsHidden:!1,labelContainer:!1,labels:{},getLabelContainer:function(){return this.labelContainer?this.labelContainer:this.labelContainer=document.getElementById(this.viz.config.labelContainer)},getLabel:function(e){return e
(this),function(){}.call(this),function(e,t){function n(t,n){var i=t.nodeName.toLowerCase();if("area"===i){var s=t.parentNode,o=s.name,u;return!t.href||!o||s.nodeName.toLowerCase()!=="map"?!1:(u=e("img[usemap=#"+o+"]")[0],!!u&&r(u))}return(/input|select|textarea|button|object/.test(i)?!t.disabled:"a"==i?t.href||n:n)&&r(t)}function r(t){return!e(t).parents().andSelf().filter(function(){return e.curCSS(this,"visibility")==="hidden"||e.expr.filters.hidden(this)}).length}e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.8.23",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),e.fn.extend({propAttr:e.fn.prop||e.fn.attr,_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.curCSS(this,"position",1))&&/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(s,function(){n-=parseFloat(e.curCSS(t,"padding"+this,!0))||0,r&&(n-=parseFloat(e.curCSS(t,"border"+this+"Width",!0))||0),i&&(n-=parseFloat(e.curCSS(t,"margin"+this,!0))||0)}),n}var s=r==="Width"?["Left","Right"]:["Top","Bottom"],o=r.toLowerCase(),u={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?u["inner"+r].call(this):this.each(function(){e(this).css(o,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?u["outer"+r].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,n)+"px")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e.curCSS||(e.curCSS=e.css),e.extend(e.ui,{plugin:{add:function(t,n,r){var i=e.ui[t].prototype;for(var s in r)i.plugins[s]=i.plugins[s]||[],i.plugins[s].push([n,r[s]])},call:function(e,t,n){var r=e.plugins[t];if(!r||!e.element[0].parentNode)return;for(var i=0;i<r.length;i++)e.options[r[i][0]]&&r[i][1].apply(e.element,n)}},contains:function(e,t){return document.compareDocumentPosition?e.compareDocumentPosition(t)&16:e!==t&&e.contains(t)},hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;var r=n&&n==="l
),parseInt(n[3],10)]:(n=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[parseFloat(n[1])*2.55,parseFloat(n[2])*2.55,parseFloat(n[3])*2.55]:(n=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:(n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]:(n=/rgba\(0, 0, 0, 0\)/.exec(t))?f.transparent:f[e.trim(t).toLowerCase()]}function r(t,r){var i;do{i=(e.curCSS||e.css)(t,r);if(i!=""&&i!="transparent"||e.nodeName(t,"body"))break;r="backgroundColor"}while(t=t.parentNode);return n(i)}function i(){var e=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,t={},n,r;if(e&&e.length&&e[0]&&e[e[0]]){var i=e.length;while(i--)n=e[i],typeof e[n]=="string"&&(r=n.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),t[r]=e[n])}else for(n in e)typeof e[n]=="string"&&(t[n]=e[n]);return t}function s(t){var n,r;for(n in t)r=t[n],(r==null||e.isFunction(r)||n in c||/scrollbar/.test(n)||!/color/i.test(n)&&isNaN(parseFloat(r)))&&delete t[n];return t}function o(e,t){var n={_:0},r;for(r in t)e[r]!=t[r]&&(n[r]=t[r]);return n}function u(t,n,r,i){typeof t=="object"&&(i=n,r=null,n=t,t=n.effect),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n=n||{},r=r||n.duration,r=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,i=i||n.complete,[t,n,r,i]}function a(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects[t]?!0:!1}e.effects={},e.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(t,i){e.fx.step[i]=function(e){e.colorInit||(e.start=r(e.elem,i),e.end=n(e.end),e.colorInit=!0),e.elem.style[i]="rgb("+Math.max(Math.min(parseInt(e.pos*(e.end[0]-e.start[0])+e.start[0],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[1]-e.start[1])+e.start[1],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[2]-e.start[2])+e.start[2],10),255),0)+")"}});var f={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},l=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.effects.animateClass=function(t,n,r,u){return e.isFunction(r)&&(u=r,r=null),this.queue(function(){var a=e(this),f=a.attr("style")||" ",c=s(i.call(this)),h,p=a.attr("class")||"";e.each(l,function(e,n){t[n]&&a[n+"Class"](t[n])}),h=s(i.call(this)),a.attr("class",p),a.animate(o(c,h),{queue:!1,duration:n,easing:r,complete:function(){e.each(l,function(e,n){t[n]&&a[n+"Class"](t[n])}),typeof a.attr("style")=="object"?(a.attr("style").cssText="",a.attr("style").cssText=f):a.attr("style",f),u&&u.apply(this,arguments),e.dequeue(this)}})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.apply(this,[{add:t},n,r,i]):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.apply(this,[{remove:t},n,r,i]):this._removeClass(t)},_toggleClass:e.fn.toggleC