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

33 lines
614 KiB
JavaScript
Raw Normal View History

/*!
* 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 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("itemcatname")==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("itemcatname")==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?(r.setData("alpha",1,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})):(r.setData("alpha",.4,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})):t!=null?r.getData("inmaps").indexOf(parseInt(t))!==-1?(r.setData("alpha",1,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})):(r.setData("alpha",.4,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})):n!=null&&(r.getData("userid").toString()==n?(r.setData("alpha",1,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})):(r.setData("alpha",.4,"end"),r.eachAdjacency(function(e){e.setData("alpha",.4,"end")})))}),Mconsole.fx.animate({modes:["node-property:alpha","edge-property:alpha"],duration:500})}function graphSettings(e){var t;if(e=="arranged"||e=="chaotic")t={injectInto:"infovis",Navigation:{enable:!0,type:"HTML",panning:"avoid nodes",zooming:10},Node:{overridable:!0,color:"#2D6A5D",type:"customNode",dim:25},Edge:{overridable:!0,color:"#222222",type:"customEdge",lineWidth:1},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){clickDragOnTopicForceDirected(e,t,n)},onDragEnd:function(){tempInit&&tempNode2==null?($("#item_addSynapse").val("true"),$("#new_item").fadeIn("fast"),$("#item_name").focus()):tempInit&&tempNode2!=null&&($("#item_addSynapse").val("false"),$("#synapse_item1id").val(tempNode.id),$("#synapse_item2id").val(tempNode2.id),$("#new_synapse").fadeIn("fast"),$("#synapse_desc").focus(),tempNode=null,tempNode2=null,tempInit=!1)},onDragCancel:function(){tempNode=null,tempNode2=null,tempInit=!1,$("#item_addSynapse").val("false"),$("#item_item1id").val(0),$("#item_item2id").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="item_'+t.id+'"><p class="type">'+t.getData("itemcatname")+"</p>"+'<img alt="'+t.getData("itemcatname")+'" class="icon" height="50" src="'+imgArray[t.getData("itemcatname")].src+'" width="50" />'+'<div class="scroll"><a href="/items/'+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 item_"+t.id,r.innerHTML=n,r.style.display="none",e.appendChild(r),r.onclick=function(){delete t.selected,t
:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),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],
i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:V?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",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.own
a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i,s=this.createTween(e,t),o=zn.exec(t),u=s.cur(),a=+u||0,f=1;if(o){n=+o[2],r=o[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&a){a=v.css(s.elem,e,!0)||n||1;do i=f=f||".5",a/=f,v.style(s.elem,e,a+r),f=s.cur()/u;while(f!==1&&f!==i)}s.unit=r,s.start=a,s.end=o[1]?a+(o[1]+1)*n:n}return s}]};v.Animation=v.extend(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.f
:i.snap).each(function(){var t=e(this),n=t.offset();this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&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.eleme
)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,s._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._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]
:-l*(u/r),top:-f*(a/n)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:u/r,height:a/n,left:s.left+l*(u/r)+(t.options.mode=="show"?(l-Math.floor(r/2))*(u/r):0),top:s.top+f*(a/n)+(t.options.mode=="show"?(f-Math.floor(n/2))*(a/n):0),opacity:t.options.mode=="show"?0:1}).animate({left:s.left+l*(u/r)+(t.options.mode=="show"?0:(l-Math.floor(r/2))*(u/r)),top:s.top+f*(a/n)+(t.options.mode=="show"?0:(f-Math.floor(n/2))*(a/n)),opacity:t.options.mode=="show"?1:0},t.duration||500);setTimeout(function(){t.options.mode=="show"?i.css({visibility:"visible"}):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.fr
("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("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.getAttrib
:"")+(tt?" ui-datepicker-other-month":"")+(G.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==G.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(nt?" "+this._unselectableClass+" ui-state-disabled":"")+(tt&&!_?"":" "+et[1]+(G.getTime()==l.getTime()?" "+this._currentClass:"")+(G.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!tt||_)&&et[2]?' title="'+et[2]+'"':"")+(nt?"":' data-handler="selectDay" data-event="click" data-month="'+G.getMonth()+'" data-year="'+G.getFullYear()+'"')+">"+(tt&&!_?"&#xa0;":nt?'<span class="ui-state-default">'+G.getDate()+"</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),
).each(function(){var t=e(this);t.html(t.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){function h(t,n){t.css("display",""),!e.support.opacity&&n.opacity&&t[0].style.removeAttribute("filter")}var r=this,i=this.options,s=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=e(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return e("a",this)[0]}),this.panels=e([]),this.anchors.each(function(t,n){var o=e(n).attr("href"),u=o.split("#")[0],a;u&&(u===location.toString().split("#")[0]||(a=e("base")[0])&&u===a.href)&&(o=n.hash,n.href=o);if(s.test(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.
),",",t(c.y-this.arcScaleY_*c.radius)," ",t(c.x+this.arcScaleX_*c.radius),",",t(c.y+this.arcScaleY_*c.radius)," ",t(c.xStart),",",t(c.yStart)," ",t(c.xEnd),",",t(c.yEnd))}if(c){if(a.x==null||c.x<a.x)a.x=c.x;if(f.x==null||c.x>f.x)f.x=c.x;if(a.y==null||c.y<a.y)a.y=c.y;if(f.y==null||c.y>f.y)f.y=c.y}}n.push(' ">'),e?z(this,n,a,f):U(this,n),n.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",n.join(""))},q.fill=function(){this.stroke(!0)},q.closePath=function(){this.currentPath_.push({type:"close"})},q.save=function(){var e={};x(this,e),this.aStack_.push(e),this.mStack_.push(this.m_),this.m_=S(E(),this.m_)},q.restore=function(){this.aStack_.length&&(x(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},q.translate=function(e,t){var n=[[1,0,0],[0,1,0],[e,t,1]];V(this,S(n,this.m_),!1)},q.rotate=function(e){var t=r(e),i=n(e),s=[[t,i,0],[-i,t,0],[0,0,1]];V(this,S(s,this.m_),!1)},q.scale=function(e,t){this.arcScaleX_*=e,this.arcScaleY_*=t;var n=[[e,0,0],[0,t,0],[0,0,1]];V(this,S(n,this.m_),!0)},q.transform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,S(o,this.m_),!0)},q.setTransform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,o,!0)},q.drawText_=function(e,n,r,i,s){var u=this.m_,a=1e3,f=0,l=a,c={x:0,y:0},p=[],d=H(P(this.font),this.element_),v=B(d),m=this.element_.currentStyle,g=this.textAlign.toLowerCase();switch(g){case"left":case"center":case"right":break;case"end":g=m.direction=="ltr"?"right":"left";break;case"start":g=m.direction=="rtl"?"right":"left";break;default:g="left"}switch(this.textBaseline){case"hanging":case"top":c.y=d.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":c.y=-d.size/2.25}switch(g){case"right":f=a,l=.05;break;case"center":f=l=a/2}var y=W(this,n+c.x,r+c.y);p.push('<g_vml_:line from="',-f,' 0" to="',l,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!s,'" stroked="',!!s,'" style="position:absolute;width:1px;height:1px;">'),s?U(this,p):z(this,p,{x:-f,y:0},{x:l,y:d.size});var b=u[0][0].toFixed(3)+","+u[1][0].toFixed(3)+","+u[0][1].toFixed(3)+","+u[1][1].toFixed(3)+",0,0",w=t(y.x/o)+","+t(y.y/o);p.push('<g_vml_:skew on="t" matrix="',b,'" ',' offset="',w,'" origin="',f,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',h(e),'" style="v-text-align:',g,";font:",h(v),'" /></g_vml_:line>'),this.element_.insertAdjacentHTML("beforeEnd",p.join(""))},q.fillText=function(e,t,n,r){this.drawText_(e,t,n,r,!1)},q.strokeText=function(e,t,n,r){this.drawText_(e,t,n,r,!0)},q.measureText=function(e){if(!this.textMeasureEl_){var t='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild}var n=this.element_.ownerDocument;return this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(n.createTextNode(e)),{width:this.textMeasureEl_.offsetWidth}},q.clip=function(){},q.arcTo=function(){},q.createPattern=function(e,t){return new J(e,t)},$.prototype.addColorStop=function(e,t){t=M(t),this.colors_.push({offset:e,color:t.color,alpha:t.alpha})};var Y=G.prototype=new Error;Y.INDEX_SIZE_ERR=1,Y.DOMSTRING_SIZE_ERR=2,Y.HIERARCHY_REQUEST_ERR=3,Y.WRONG_DOCUMENT_ERR=4,Y.INVALID_CHARACTER_ERR=5,Y.NO_DATA_ALLOWED_ERR=6,Y.NO_MODIFICATION_ALLOWED_ERR=7,Y.NOT_FOUND_ERR=8,Y.NOT_SUPPORTED_ERR=9,Y.INUSE_ATTRIBUTE_ERR=10,Y.INVALID_STATE_ERR=11,Y.SYNTAX_ERR=12,Y.INVALID_MODIFICATION_ERR=13,Y.NAMESPACE_ERR=14,Y.INVALID_ACCESS_ERR=15,Y.VALIDATION_ERR=16,Y.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=v,CanvasRenderingContext2D=I,CanvasGradient=$,CanvasPattern=J,DOMException=G}();var categoryVisible=new Object;categoryVisible.Group=!0,categoryVisible.Person=!0,categoryVisible.Bizarre=!0,categoryVisible.Catalyst=!0,categoryVisible.Closed=!0,categoryVisible.Experience=!0,categoryVisible["Future Dev"]=!0,categoryVisible.Idea=!0,categoryVisible.Implication=!0,categoryVisible.Insight=!0,categoryVisible.Intention=!0,categoryVisible
;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.zooming/1e3,s=1+r*i;this.canvas.scale(s,s)},onMouseDown:function(e,t,n){if(!this.config.panning)return;if(this.config.panning=="avoid nodes"&&n.getNode())return;this.pressed=!0,this.pos=n.getPos();var r=this.canvas,i=r.translateOffsetX,s=r.translateOffsetY,o=r.scaleOffsetX,u=r.scaleOffsetY;this.pos.x*=o,this.pos.x+=i,this.pos.y*=u,this.pos.y+=s},onMouseMove:function(e,t,n){if(!this.config.panning)return;if(!this.pressed)return;if(this.config.panning=="avoid nodes"&&n.getNode())return;var r=this.pos,i=n.getPos(),s=this.canvas,o=s.translateOffsetX,u=s.translateOffsetY,a=s.scaleOffsetX,f=s.scaleOffsetY;i.x*=a,i.y*=f,i.x+=o,i.y+=u;var l=i.x-r.x,c=i.y-r.y;this.pos=i,this.canvas.translate(l*1/a,c*1/f)},onMouseUp:function(e,t,n,r){if(!this.config.panning)return;this.pressed=!1}});var f;(function(){function i(t,n){var i=document.createElement(t);for(var s in n)typeof n[s]=="object"?e.extend(i[s],n[s]):i[s]=n[s];return t=="canvas"&&!r&&G_vmlCanvasManager&&(i=G_vmlCanvasManager.initElement(document.body.appendChild(i))),i}var n=typeof HTMLCanvasElement,r=n=="object"||n=="function";$jit.Canvas=f=new t({canvases:[],pos:!1,element:!1,labelContainer:!1,translateOffsetX:0,translateOffsetY:0,scaleOffsetX:1,scaleOffsetY:1,initialize:function(t,n){this.viz=t,this.opt=n;var r=e.type(n.injectInto)=="string"?n.injectInto:n.injectInto.id,s=r+"-label",o=e(r),u=n.width||o.offsetWidth,a=n.height||o.offsetHeight;this.id=r;var l={injectInto:r,width:u,height:a};this.element=i("div",{id:r+"-canvaswidget",style:{position:"relative",width:u+"px",height:a+"px"}}),this.labelContainer=this.createLabelContainer(n.Label.type,s,l),this.canvases.push(new f.Base({config:e.extend({idSuffix:"-canvas"},l),plot:function(e){t.fx.plo
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 in this.labels&&this.labels[e]!=null?this.labels[e]:this.labels[e]=document.getElementById(e)},hideLabels:function(e){var t=this.getLabelContainer();e?t.style.display="none":t.style.display="",this.labelsHidden=e},clearLabels:function(e){for(var t in this.labels)if(e||!this.viz.graph.hasNode(t))this.disposeLabel(t),delete this.labels[t]},disposeLabel:function(e){var t=this.getLabel(e);t&&t.parentNode&&t.parentNode.removeChild(t)},hideLabel:function(t,n){t=e.splat(t);var r=n?"":"none",i,s=this;e.each(t,function(e){var t=s.getLabel(e.id);t&&(t.style.display=r)})},fitsInCanvas:function(e,t){var n=t.getSize();return e.x>=n.width||e.x<0||e.y>=n.height||e.y<0?!1:!0}}),d.Label.HTML=new t({Implements:d.Label.DOM,plotLabel:function(e,t,n){var r=t.id,i=this.getLabel(r);if(!i&&!(i=document.getElementById(r))){i=document.createElement("div");var s=this.getLabelContainer();i.id=r,i.className="node",i.style.position="absolute",n.onCreateLabel(i,t),s.appendChild(i),this.labels[t.id]=i}this.placeLabel(i,t,n)}}),d.Label.SVG=new t({Implements:d.Label.DOM,plotLabel:function(e,t,n){var r=t.id,i=this.getLabel(r);if(!i&&!(i=document.getElementById(r))){var s="http://www.w3.org/2000/svg";i=document.createElementNS(s,"svg:text");var o=document.createElementNS(s,"svg:tspan");i.appendChild(o);var u=this.getLabelContainer();i.setAttribute("id",r),i.setAttribute("class","node"),u.appendChild(i),n.onCreateLabel(i,t),this.labels[t.id]=i}this.placeLabel(i,t,n)}}),d.Geom=new t({initialize:function(e){this.viz=e,this.config=e.config,this.node=e.config.Node,this.edge=e.config.Edge},translate:function(t,n){n=e.splat(n),this.viz.graph.eachNode(function(r){e.each(n,function(e){r.getPos(e).$add(t)})})},setRightLevelToShow:function(t,n,r){var i=this.getRightLevelToShow(t,n),s=this.viz.labels,o=e.merge({execShow:!0,execH
(),i.compute(),i.select(i.root),f&&i.fx.animate({modes:["node-property:height:dimArray"],duration:1500})},updateJSON:function(t,n){if(this.busy)return;this.busy=!0;var r=this.st,i=r.graph,s=t.label&&e.splat(t.label),o=t.values,u=this.config.animate,a=this;e.each(o,function(t){var n=i.getByName(t.label);if(n){t.values=e.splat(t.values);var r=n.getData("stringArray"),o=n.getData("valueArray");e.each(o,function(e,n){e[0]=t.values[n],s&&(r[n]=s[n])}),n.setData("valueArray",o);var u=n.getData("prev"),a=n.getData("next"),f=i.getByName(a);if(u){var l=i.getByName(u);if(l){var o=l.getData("valueArray");e.each(o,function(e,n){e[1]=t.values[n]})}}if(!f){var o=n.getData("valueArray");e.each(o,function(e,n){e[1]=t.values[n]})}}}),this.normalizeDims(),r.compute(),r.select(r.root),u&&r.fx.animate({modes:["node-property:height:dimArray"],duration:1500,onComplete:function(){a.busy=!1,n&&n.onComplete()}})},filter:function(){if(this.busy)return;this.busy=!0,this.config.Tips.enable&&this.st.tips.hide(),this.select(!1,!1,!1);var t=Array.prototype.slice.call(arguments),n=this.st.graph.getNode(this.st.root),r=this;n.eachAdjacency(function(n){var r=n.nodeTo,i=r.getData("dimArray"),s=r.getData("stringArray");r.setData("dimArray",e.map(i,function(n,r){return e.indexOf(t,s[r])>-1?n:[0,0]}),"end")}),this.st.fx.animate({modes:["node-property:dimArray"],duration:1500,onComplete:function(){r.busy=!1}})},restore:function(){if(this.busy)return;this.busy=!0,this.config.Tips.enable&&this.st.tips.hide(),this.select(!1,!1,!1),this.normalizeDims();var e=this;this.st.fx.animate({modes:["node-property:height:dimArray"],duration:1500,onComplete:function(){e.busy=!1}})},select:function(e,t,n){if(!this.config.selectOnHover)return;var r=this.selected;if(r.id!=e||r.name!=t||r.index!=n){r.id=e,r.name=t,r.index=n,this.st.graph.eachNode(function(e){e.setData("border",!1)});if(e){var i=this.st.graph.getNode(e);i.setData("border",r);var s=n===0?"prev":"next";s=i.getData(s),s&&(i=this.st.graph.getByName(s),i&&i.setData("border",{name:t,index:1-n}))}this.st.plot()}},getLegend:function(){var t={},n;this.st.graph.getNode(this.st.root).eachAdjacency(function(e){n=e.nodeTo});var r=n.getData("colorArray"),i=r.length;return e.each(n.getData("stringArray"),function(e,n){t[e]=r[n%i]}),t},getMaxValue:function(){var t=0;return this.st.graph.eachNode(function(n){var r=n.getData("valueArray"),i=0,s=0;e.each(r,function(e){i+=+e[0],s+=+e[1]});var o=s>i?s:i;t=t>o?t:o}),t},normalizeDims:function(){var t=this.st.graph.getNode(this.st.root),n=0;t.eachAdjacency(function(){n++});var r=this.getMaxValue()||1,i=this.st.canvas.getSize(),s=this.config,o=s.Margin,u=s.labelOffset+s.Label.size,a=(i.width-(o.left+o.right))/n,f=s.animate,l=i.height-(o.top+o.bottom)-(s.showAggregates&&u)-(s.showLabels&&u);this.st.graph.eachNode(function(t){var n=0,i=0,s=[];e.each(t.getData("valueArray"),function(e){n+=+e[0],i+=+e[1],s.push([0,0])});var o=i>n?i:n;t.setData("width",a);if(f){t.setData("height",o*l/r,"end"),t.setData("dimArray",e.map(t.getData("valueArray"),function(e){return[e[0]*l/r,e[1]*l/r]}),"end");var u=t.getData("dimArray");u||t.setData("dimArray",s)}else t.setData("height",o*l/r),t.setData("dimArray",e.map(t.getData("valueArray"),function(e){return[e[0]*l/r,e[1]*l/r]}))})}}),i.BarChart={$extend:!0,animate:!0,type:"stacked",labelOffset:3,barsOffset:0,hoveredColor:"#9fd4ff",orientation:"horizontal",showAggregates:!0,showLabels:!0,Tips:{enable:!1,onShow:e.empty,onHide:e.empty},Events:{enable:!1,onClick:e.empty}},$jit.ST.Plot.NodeTypes.implement({"barchart-stacked":{render:function(t,n){var r=t.pos.getc(!0),i=t.getData("width"),s=t.getData("height"),o=this.getAlignedPos(r,i,s),u=o.x,a=o.y,f=t.getData("dimArray"),l=t.getData("valueArray"),c=t.getData("colorArray"),h=c.length,p=t.getData("stringArray"),d=n.getCtx(),v={},m=t.getData("border"),g=t.getData("gradient"),y=t.getData("config"),b=y.orientation=="horizontal",w=y.showAggregates,E=y.showLabels,S=y.Label;if(c&&f&&p){for(var x=0,T=f.length,N=0,C=0;x<T;x++){d.fillStyle=d.strokeStyle=c[x%h];if(g){var k;b?k=d.createLinearGradient(u+N+f[x]/2,a,u+N+f[x]/
(c,l,f,n,r)},squarify:function(e,t,n,r,i){this.computeDim(e,t,n,r,this.worstAspectRatio,i)},layoutRow:function(e,t,n,r){return this.layout.horizontal()?this.layoutV(e,t,n,r):this.layoutH(e,t,n,r)},layoutV:function(t,n,r,i){var s=0,o=function(e){return e};e.each(t,function(e){s+=e._area});var u=o(s/n),a=0;for(var f=0,l=t.length;f<l;f++){var c=o(t[f]._area/u),h=t[f];h.getPos(i).setc(r.left,r.top+a),h.setData("width",u,i),h.setData("height",c,i),a+=c}var p={height:r.height,width:r.width-u,top:r.top,left:r.left+u};return p.dim=Math.min(p.width,p.height),p.dim!=p.height&&this.layout.change(),p},layoutH:function(t,n,r,i){var s=0;e.each(t,function(e){s+=e._area});var o=s/n,u=r.top,a=0;for(var f=0,l=t.length;f<l;f++){var c=t[f],n=c._area/o;c.getPos(i).setc(r.left+a,u),c.setData("width",n,i),c.setData("height",o,i),a+=n}var h={height:r.height-o,width:r.width,top:r.top+o,left:r.left};return h.dim=Math.min(h.width,h.height),h.dim!=h.width&&this.layout.change(),h}}),b.TM.Strip=new t({Implements:b.TM.Area,computePositions:function(e,t,n){var r=e.getSubnodes([1,1],"ignore"),i=this.config;if(r.length>0){this.processChildrenLayout(e,r,t,n);for(var s=0,o=r.length;s<o;s++){var u=r[s],a=i.offset,f=u.getData("height",n)-a-i.titleHeight,l=u.getData("width",n)-a,c=u.getPos(n);t={width:l,height:f,top:c.y+i.titleHeight,left:c.x},this.computePositions(u,t,n)}}},processChildrenLayout:function(e,t,n,r){var i=n.width*n.height,s,o=t.length,u=0,a=[];for(s=0;s<o;s++)a[s]=+t[s].getData("area",r),u+=a[s];for(s=0;s<o;s++)t[s]._area=i*a[s]/u;var f=this.layout.horizontal()?n.width:n.height,l=[t[0]],c=t.slice(1);this.stripify(c,l,f,n,r)},stripify:function(e,t,n,r,i){this.computeDim(e,t,n,r,this.avgAspectRatio,i)},layoutRow:function(e,t,n,r){return this.layout.horizontal()?this.layoutH(e,t,n,r):this.layoutV(e,t,n,r)},layoutV:function(t,n,r,i){var s=0;e.each(t,function(e){s+=e._area});var o=s/n,u=0;for(var a=0,f=t.length;a<f;a++){var l=t[a],c=l._area/o;l.getPos(i).setc(r.left,r.top+(n-c-u)),l.setData("width",o,i),l.setData("height",c,i),u+=c}return{height:r.height,width:r.width-o,top:r.top,left:r.left+o,dim:n}},layoutH:function(t,n,r,i){var s=0;e.each(t,function(e){s+=e._area});var o=s/n,u=r.height-o,a=0;for(var f=0,l=t.length;f<l;f++){var c=t[f],h=c._area/o;c.getPos(i).setc(r.left+a,r.top+u),c.setData("width",h,i),c.setData("height",o,i),a+=h}return{height:r.height-o,width:r.width,top:r.top,left:r.left,dim:n}}}),b.Icicle=new t({compute:function(e){e=e||"current";var t=this.graph.getNode(this.root),n=this.config,r=this.canvas.getSize(),i=r.width,s=r.height,o=n.offset,u=n.constrained?n.levelsToShow:Number.MAX_VALUE;this.controller.onBeforeCompute(t),d.Util.computeLevels(this.graph,t.id,0,"ignore");var a=0;d.Util.eachLevel(t,0,!1,function(e,t){t>a&&(a=t)});var f=this.graph.getNode(this.clickedNode&&this.clickedNode.id||t.id),l=Math.min(a,u-1),c=f._depth;this.layout.horizontal()?this.computeSubtree(f,-i/2,-s/2,i/(l+1),s,c,l,e):this.computeSubtree(f,-i/2,-s/2,i,s/(l+1),c,l,e)},computeSubtree:function(t,n,r,i,s,o,u,a){t.getPos(a).setc(n,r),t.setData("width",i,a),t.setData("height",s,a);var f,l=0,c=0,h=d.Util.getSubnodes(t,[1,1]);if(!h.length)return;e.each(h,function(e){c+=e.getData("dim")});for(var p=0,v=h.length;p<v;p++)this.layout.horizontal()?(f=s*h[p].getData("dim")/c,this.computeSubtree(h[p],n+i,r,i,f,o,u,a),r+=f):(f=i*h[p].getData("dim")/c,this.computeSubtree(h[p],n,r+s,f,s,o,u,a),n+=f)}}),$jit.Icicle=new t({Implements:[y,a,b.Icicle],layout:{orientation:"h",vertical:function(){return this.orientation=="v"},horizontal:function(){return this.orientation=="h"},change:function(){this.orientation=this.vertical()?"h":"v"}},initialize:function(t){var n={animate:!1,orientation:"h",offset:2,levelsToShow:Number.MAX_VALUE,constrained:!1,Node:{type:"rectangle",overridable:!0},Edge:{type:"none"},Label:{type:"Native"},duration:700,fps:45},r=i("Canvas","Node","Edge","Fx","Tips","NodeStyles","Events","Navigation","Controller","Label");this.controller=this.config=e.merge(r,n,t),this.layout.orientation=this.config.orientation;var s=this.config;s.useCanvas?(this.canvas=s.useC
,i,r,t)},contains:function(e,t){var n=e.getData("dim"),r=e.pos.getc().$scale(e.scale);return this.nodeHelper.circle.contains(r,t,n)}},ellipse:{render:function(e,t){var n=e.pos.getc().$scale(e.scale),r=e.getData("width"),i=e.getData("height");this.nodeHelper.ellipse.render("fill",n,r,i,t)},contains:function(e,t){var n=e.getData("width"),r=e.getData("height"),i=e.pos.getc().$scale(e.scale);return this.nodeHelper.circle.contains(i,t,n,r)}},square:{render:function(e,t){var n=this.node,r=e.getData("dim"),i=e.pos.getc();r=n.transform?r*(1-i.squaredNorm()):r,i.$scale(e.scale),r>.2&&this.nodeHelper.square.render("fill",i,r,t)},contains:function(e,t){var n=e.getData("dim"),r=e.pos.getc().$scale(e.scale);return this.nodeHelper.square.contains(r,t,n)}},rectangle:{render:function(e,t){var n=this.node,r=e.getData("width"),i=e.getData("height"),s=e.pos.getc();r=n.transform?r*(1-s.squaredNorm()):r,i=n.transform?i*(1-s.squaredNorm()):i,s.$scale(e.scale),r>.2&&i>.2&&this.nodeHelper.rectangle.render("fill",s,r,i,t)},contains:function(e,t){var n=e.getData("width"),r=e.getData("height"),i=e.pos.getc().$scale(e.scale);return this.nodeHelper.square.contains(i,t,n,r)}},triangle:{render:function(e,t){var n=this.node,r=e.getData("dim"),i=e.pos.getc();r=n.transform?r*(1-i.squaredNorm()):r,i.$scale(e.scale),r>.2&&this.nodeHelper.triangle.render("fill",i,r,t)},contains:function(e,t){var n=e.getData("dim"),r=e.pos.getc().$scale(e.scale);return this.nodeHelper.triangle.contains(r,t,n)}},star:{render:function(e,t){var n=this.node,r=e.getData("dim"),i=e.pos.getc();r=n.transform?r*(1-i.squaredNorm()):r,i.$scale(e.scale),r>.2&&this.nodeHelper.star.render("fill",i,r,t)},contains:function(e,t){var n=e.getData("dim"),r=e.pos.getc().$scale(e.scale);return this.nodeHelper.star.contains(r,t,n)}}}),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),i=e.nodeFrom.scale;this.edgeHelper.line.render({x:n.x*i,y:n.y*i},{x:r.x*i,y:r.y*i},t)},contains:function(e,t){var n=e.nodeFrom.pos.getc(!0),r=e.nodeTo.pos.getc(!0),i=e.nodeFrom.scale;this.edgeHelper.line.contains({x:n.x*i,y:n.y*i},{x:r.x*i,y:r.y*i},t,this.edge.epsilon)}},arrow:{render:function(e,t){var n=e.nodeFrom.pos.getc(!0),r=e.nodeTo.pos.getc(!0),i=e.nodeFrom.scale,s=e.getData("dim"),o=e.data.$direction,u=o&&o.length>1&&o[0]!=e.nodeFrom.id;this.edgeHelper.arrow.render({x:n.x*i,y:n.y*i},{x:r.x*i,y:r.y*i},s,u,t)},contains:function(e,t){var n=e.nodeFrom.pos.getc(!0),r=e.nodeTo.pos.getc(!0),i=e.nodeFrom.scale;this.edgeHelper.arrow.contains({x:n.x*i,y:n.y*i},{x:r.x*i,y:r.y*i},t,this.edge.epsilon)}},hyperline:{render:function(e,t){var n=e.nodeFrom.pos.getc(),r=e.nodeTo.pos.getc(),i=this.viz.getRadius();this.edgeHelper.hyperline.render(n,r,i,t)},contains:e.lambda(!1)}})}($jit.Hypertree)}(),function(){window.$jit=function(e){e=e||window;for(var t in $jit)$jit[t].$extend&&(e[t]=$jit[t])},$jit.version="2.0.0b";var e=function(e){return document.getElementById(e)};e.empty=function(){},e.extend=function(e,t){for(var n in t||{})e[n]=t[n];return e},e.lambda=function(e){return typeof e=="function"?e:function(){return e}},e.time=Date.now||function(){return+(new Date)},e.splat=function(t){var n=e.type(t);return n?n!="array"?[t]:t:[]},e.type=function(t){var n=e.type.s.call(t).match(/^\[object\s(.*)\]$/)[1].toLowerCase();return n!="object"?n:t&&t.$$family?t.$$family:t&&t.nodeName&&t.nodeType==1?"element":n},e.type.s=Object.prototype.toString,e.each=function(t,n){var r=e.type(t);if(r=="object")for(var i in t)n(t[i],i);else for(var s=0,o=t.length;s<o;s++)n(t[s],s)},e.indexOf=function(e,t){if(Array.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},e.map=function(t,n){var r=[];return e.each(t,function(e,t){r.push(n(e,t))}),r},e.reduce=function(e,t,n){var r=e.length;if(r==0)return n;var i=arguments.length==3?n:e[--r];while(r--)i=t(i,e[r]);return i},e.merge=function(){var t={};for(var n=0,r=arguments.length;n<r;n++){var i=arguments[n];if(e.type(i)!="object")continue;for(var s in i){var o=i[s],u=t[s];t[s]=u&&e.type(o)=="object"&&e.t
][e]},hasNode:function(e){return e in this.nodes},empty:function(){this.nodes={},this.edges={}}});var d=$jit.Graph,v;(function(){var t=function(e,t,n,r,i){var s;n=n||"current",e="$"+(e?e+"-":""),n=="current"?s=this.data:n=="start"?s=this.startData:n=="end"&&(s=this.endData);var o=e+t;return r?s[o]:this.Config.overridable?o in s?s[o]:o in this.data?this.data[o]:i[t]||0:i[t]||0},n=function(e,t,n,r){r=r||"current",e="$"+(e?e+"-":"");var i;r=="current"?i=this.data:r=="start"?i=this.startData:r=="end"&&(i=this.endData),i[e+t]=n},r=function(t,n){t="$"+(t?t+"-":"");var r=this;e.each(n,function(e){var n=t+e;delete r.data[n],delete r.endData[n],delete r.startData[n]})};v={getData:function(e,n,r){return t.call(this,"",e,n,r,this.Config)},setData:function(e,t,r){n.call(this,"",e,t,r)},setDataset:function(t,n){t=e.splat(t);for(var r in n)for(var i=0,s=e.splat(n[r]),o=t.length;i<o;i++)this.setData(r,s[i],t[i])},removeData:function(){r.call(this,"",Array.prototype.slice.call(arguments))},getCanvasStyle:function(e,n,r){return t.call(this,"canvas",e,n,r,this.Config.CanvasStyles)},setCanvasStyle:function(e,t,r){n.call(this,"canvas",e,t,r)},setCanvasStyles:function(t,n){t=e.splat(t);for(var r in n)for(var i=0,s=e.splat(n[r]),o=t.length;i<o;i++)this.setCanvasStyle(r,s[i],t[i])},removeCanvasStyle:function(){r.call(this,"canvas",Array.prototype.slice.call(arguments))},getLabelData:function(e,n,r){return t.call(this,"label",e,n,r,this.Label)},setLabelData:function(e,t,r){n.call(this,"label",e,t,r)},setLabelDataset:function(t,n){t=e.splat(t);for(var r in n)for(var i=0,s=e.splat(n[r]),o=t.length;i<o;i++)this.setLabelData(r,s[i],t[i])},removeLabelData:function(){r.call(this,"label",Array.prototype.slice.call(arguments))}}})(),d.Node=new t({initialize:function(t,n,r,i,s){var o={id:"",name:"",data:{},startData:{},endData:{},adjacencies:{},selected:!1,drawn:!1,exist:!1,angleSpan:{begin:0,end:0},pos:n&&p(0,0)||c(0,0),startPos:n&&p(0,0)||c(0,0),endPos:n&&p(0,0)||c(0,0)};e.extend(this,e.extend(o,t)),this.Config=this.Node=r,this.Edge=i,this.Label=s},adjacentTo:function(e){return e.id in this.adjacencies},getAdjacency:function(e){return this.adjacencies[e]},getPos:function(e){e=e||"current";if(e=="current")return this.pos;if(e=="end")return this.endPos;if(e=="start")return this.startPos},setPos:function(e,t){t=t||"current";var n;t=="current"?n=this.pos:t=="end"?n=this.endPos:t=="start"&&(n=this.startPos),n.set(e)}}),d.Node.implement(v),d.Adjacence=new t({initialize:function(e,t,n,r,i){this.nodeFrom=e,this.nodeTo=t,this.data=n||{},this.startData={},this.endData={},this.Config=this.Edge=r,this.Label=i}}),d.Adjacence.implement(v),d.Util={filter:function(t){if(!t||e.type(t)!="string")return function(){return!0};var n=t.split(" ");return function(e){for(var t=0;t<n.length;t++)if(e[n[t]])return!1;return!0}},getNode:function(e,t){return e.nodes[t]},eachNode:function(e,t,n){var r=this.filter(n);for(var i in e.nodes)r(e.nodes[i])&&t(e.nodes[i])},eachAdjacency:function(e,t,n){var r=e.adjacencies,i=this.filter(n);for(var s in r){var o=r[s];if(i(o)){if(o.nodeFrom!=e){var u=o.nodeFrom;o.nodeFrom=o.nodeTo,o.nodeTo=u}t(o,s)}}},computeLevels:function(e,t,n,r){n=n||0;var i=this.filter(r);this.eachNode(e,function(e){e._flag=!1,e._depth=-1},r);var s=e.getNode(t);s._depth=n;var o=[s];while(o.length!=0){var u=o.pop();u._flag=!0,this.eachAdjacency(u,function(e){var t=e.nodeTo;t._flag==0&&i(t)&&(t._depth<0&&(t._depth=u._depth+1+n),o.unshift(t))},r)}},eachBFS:function(e,t,n,r){var i=this.filter(r);this.clean(e);var s=[e.getNode(t)];while(s.length!=0){var o=s.pop();o._flag=!0,n(o,o._depth),this.eachAdjacency(o,function(e){var t=e.nodeTo;t._flag==0&&i(t)&&(t._flag=!0,s.unshift(t))},r)}},eachLevel:function(e,t,n,r,i){var s=e._depth,o=this.filter(i),u=this;n=n===!1?Number.MAX_VALUE-s:n,function a(e,t,n){var i=e._depth;i>=t&&i<=n&&o(e)&&r(e,i),i<n&&u.eachAdjacency(e,function(e){var r=e.nodeTo;r._depth>i&&a(r,t,n)})}(e,t+s,n+s)},eachSubgraph:function(e,t,n){this.eachLevel(e,0,!1,t,n)},eachSubnode:function(e,t,n){this.eachLevel(e,1,1,t,n)},anySubnode:function(t,n,r){var i=!1;n=n||e.
p.setPos(c(v,o),y),p.setData("span",d,y),p.setData("dim-quotient",p.getData("dim",y)/f[y],y)}p.angleSpan={begin:i,end:i+d},i+=d}}},"ignore")},setAngularWidthForNodes:function(e){this.graph.eachBFS(this.root,function(t,n){var r=t.getData("angularWidth",e[0])||5;t._angularWidth=r/n},"ignore")},setSubtreesAngularWidth:function(){var e=this;this.graph.eachNode(function(t){e.setSubtreeAngularWidth(t)},"ignore")},setSubtreeAngularWidth:function(e){var t=this,n=e._angularWidth,r=0;e.eachSubnode(function(e){t.setSubtreeAngularWidth(e),r+=e._treeAngularWidth},"ignore"),e._treeAngularWidth=Math.max(n,r)},computeAngularWidths:function(e){this.setAngularWidthForNodes(e),this.setSubtreesAngularWidth()}}),$jit.ForceDirected=new t({Implements:[y,a,b.ForceDirected],initialize:function(t){var n=$jit.ForceDirected,r={iterations:50,levelDistance:50};this.controller=this.config=e.merge(i("Canvas","Node","Edge","Fx","Tips","NodeStyles","Events","Navigation","Controller","Label"),r,t);var s=this.config;s.useCanvas?(this.canvas=s.useCanvas,this.config.labelContainer=this.canvas.id+"-label"):(s.background&&(s.background=e.merge({type:"Circles"},s.background)),this.canvas=new f(this,s),this.config.labelContainer=(typeof s.injectInto=="string"?s.injectInto:s.injectInto.id)+"-label"),this.graphOptions={complex:!0,Node:{selected:!1,exist:!0,drawn:!0}},this.graph=new d(this.graphOptions,this.config.Node,this.config.Edge),this.labels=new n.Label[s.Label.type](this),this.fx=new n.Plot(this,n),this.op=new n.Op(this),this.json=null,this.busy=!1,this.initializeExtras()},refresh:function(){this.compute(),this.plot()},reposition:function(){this.compute("end")},computeIncremental:function(t){t=e.merge({iter:20,property:"end",onStep:e.empty,onComplete:e.empty},t||{}),this.config.onBeforeCompute(this.graph.getNode(this.root)),this.compute(t.property,t)},plot:function(){this.fx.plot()},animate:function(t){this.fx.animate(e.merge({modes:["linear"]},t||{}))}}),$jit.ForceDirected.$extend=!0,function(n){n.Op=new t({Implements:d.Op}),n.Plot=new t({Implements:d.Plot}),n.Label={},n.Label.Native=new t({Implements:d.Label.Native}),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.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),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.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.display=this.fitsInCanvas(l,i)?"":"none",n.onPlaceLabel(e,t)}}),n.Plot.NodeTypes=new t({none:{render:e.empty,contains:e.lambda(!1)},circle:{render:function(e,t){var n=e.pos.getc(!0),r=e.getData("dim");this.nodeHelper.circle.render("fill",n,r,t)},contains:function(e,t){var n=e.pos.getc(!0),r=e.getData("dim");return this.nodeHelper.circle.contains(n,t,r)}},ellipse:{render:function(e,t){var n=e.pos.getc(!0),r=e.getData("width"),i=e.getData("height");this.nodeHelper.ellipse.render("fill",n,r,i,t)},contains:function(e,t){var n=e.pos.getc(!0),r=e.getData("width"),i=e.getData("height");return this.nodeHelper.ellipse.contains(n,t,r,i)}},square:{render:function(e,t){var n=e.pos.getc(!0),r=e.getData("dim");this.nodeHelper.square.render("fill",n,r,t)},contains:function(e,t){var n=e.pos.getc(!0),r=e.getData("dim");return this.nodeHelper.square.contains(n,t,r)}},rectangle:{render:function(e,t){var n=e.pos.getc(!0),r=e.getData("width"),i=e.getData("height");this.nodeHelper.rectangle.render("fill",n,r,i,t)},contains:function(e,t){var n=e.pos.getc(!0),r=e.getData("width"),i=e.getData("height");return this.nodeHelper.rectangle.contains(n,t,r,i)}},triangle:{render:function(e,t){var n=e.pos.getc(!0),r=e.getData("dim");this.nodeHelper.triangle.render("fil
("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(e.browser.safari&&e.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r),left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(e.browser.safari&&e.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r)}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var f=this.relative_container.offset();u=[this.containment[0]+f.left,this.containment[1]+f.top,this.containment[2]+f.left,this.containment[3]+f.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var l=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?l-this.offset.click.top<u[1]||l-this.offset.click.top>u
o+u>=0&&o+u<=a-l)){var c=u/f.data("scrollAmount");c>=r.width()-i.width()&&(c=r.width()-i.width()),i.css("left",c),f.mCustomScrollbar("scroll")}}else{var h=n.position().top,p=s.position().top,d=t.height(),v=s.outerHeight();if(!(h+p>=0&&h+p<=d-v)){var c=p/f.data("scrollAmount");c>=r.height()-i.height()&&(c=r.height()-i.height()),i.css("top",c),f.mCustomScrollbar("scroll")}}})},scroll:function(t){var n=e(this),r=n.find(".mCSB_dragger"),i=n.find(".mCSB_container"),s=n.find(".mCustomScrollBox");if(n.data("horizontalScroll"))var o=r.position().left,u=-o*n.data("scrollAmount"),a=i.position().left,f=Math.round(a-u);else var l=r.position().top,c=-l*n.data("scrollAmount"),h=i.position().top,p=Math.round(h-c);if(e.browser.webkit)var d=(window.outerWidth-8)/window.innerWidth,v=d<.98||d>1.02;n.data("scrollInertia")===0||v?(n.data("horizontalScroll")?i.css("left",u):i.css("top",c),t||n.mCustomScrollbar("callbacks",s,i)):n.data("horizontalScroll")?i.stop().animate({left:"-="+f},n.data("scrollInertia"),n.data("scrollEasing"),function(){t||n.mCustomScrollbar("callbacks",s,i)}):i.stop().animate({top:"-="+p},n.data("scrollInertia"),n.data("scrollEasing"),function(){t||n.mCustomScrollbar("callbacks",s,i)})},scrollTo:function(t,n){var r={moveDragger:!1,callback:!0},n=e.extend(r,n),i=e(this),s,o=i.find(".mCustomScrollBox"),u=o.children(".mCSB_container");if(!e(document).data("mCS-is-touch-device"))var a=i.find(".mCSB_draggerContainer"),f=a.children(".mCSB_dragger");var l;if(t){if(typeof t=="number")n.moveDragger?s=t:(l=t,s=Math.round(l/i.data("scrollAmount")));else if(typeof t=="string"){var c;t==="top"?c=0:t==="bottom"&&!i.data("horizontalScroll")?c=u.outerHeight()-o.height():t==="left"?c=0:t==="right"&&i.data("horizontalScroll")?c=u.outerWidth()-o.width():t==="first"?c=i.find(".mCSB_container").find(":first"):t==="last"?c=i.find(".mCSB_container").find(":last"):c=i.find(t),c.length===1?(i.data("horizontalScroll")?l=c.position().left:l=c.position().top,e(document).data("mCS-is-touch-device")?s=l:s=Math.ceil(l/i.data("scrollAmount"))):s=c}e(document).data("mCS-is-touch-device")?i.data("horizontalScroll")?o.stop().animate({scrollLeft:s},i.data("scrollInertia"),i.data("scrollEasing"),function(){n.callback&&i.mCustomScrollbar("callbacks",o,u)}):o.stop().animate({scrollTop:s},i.data("scrollInertia"),i.data("scrollEasing"),function(){n.callback&&i.mCustomScrollbar("callbacks",o,u)}):(i.data("horizontalScroll")?(s>=a.width()-f.width()&&(s=a.width()-f.width()),f.css("left",s)):(s>=a.height()-f.height()&&(s=a.height()-f.height()),f.css("top",s)),n.callback?i.mCustomScrollbar("scroll"):i.mCustomScrollbar("scroll",!0))}},callbacks:function(t,n){var r=e(this);if(!e(document).data("mCS-is-touch-device"))if(r.data("horizontalScroll")){var i=Math.round(n.position().left);i<0&&i<=t.width()-n.outerWidth()+r.data("onTotalScroll-Offset")?r.data("onTotalScroll-Callback").call():r.data("onScroll-Callback").call()}else{var s=Math.round(n.position().top);s<0&&s<=t.height()-n.outerHeight()+r.data("onTotalScroll-Offset")?r.data("onTotalScroll-Callback").call():r.data("onScroll-Callback").call()}else if(r.data("horizontalScroll")){var o=Math.round(t.scrollLeft());o>0&&o>=n.outerWidth()-r.width()-r.data("onTotalScroll-Offset")?r.data("onTotalScroll-Callback").call():r.data("onScroll-Callback").call()}else{var u=Math.round(t.scrollTop());u>0&&u>=n.outerHeight()-r.height()-r.data("onTotalScroll-Offset")?r.data("onTotalScroll-Callback").call():r.data("onScroll-Callback").call()}}};e.fn.mCustomScrollbar=function(n){if(t[n])return t[n].apply(this,Array.prototype.slice.call(arguments,1));if(typeof n=="object"||!n)return t.init.apply(this,arguments);e.error("Method "+n+" does not exist")}}(jQuery),function(e){function t(t){var n=t||window.event,r=[].slice.call(arguments,1),i=0,s=!0,o=0,u=0;return t=e.event.fix(n),t.type="mousewheel",n.wheelDelta&&(i=n.wheelDelta/120),n.detail&&(i=-n.detail/3),u=i,n.axis!==undefined&&n.axis===n.HORIZONTAL_AXIS&&(u=0,o=-1*i),n.wheelDeltaY!==undefined&&(u=n.wheelDeltaY/120),n.wheelDeltaX!==undefined&&(o=-1*n.wheelDeltaX/120),r.unshift(t,i,o,u)