(function(){var x=this;var k=x._;var F={};var E=Array.prototype,f=Object.prototype,s=Function.prototype;var n=E.slice,B=E.unshift,c=f.toString,h=f.hasOwnProperty;var N=E.forEach,q=E.map,G=E.reduce,b=E.reduceRight,a=E.filter,C=E.every,o=E.some,m=E.indexOf,l=E.lastIndexOf,u=Array.isArray,e=Object.keys,H=s.bind;var O=function(p){return new v(p)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports){exports=module.exports=O}exports._=O}else{x._=O}O.VERSION="1.3.3";var K=O.each=O.forEach=function(T,S,R){if(T==null){return}if(N&&T.forEach===N){T.forEach(S,R)}else{if(T.length===+T.length){for(var Q=0,p=T.length;Q
2;if(S==null){S=[]}if(G&&S.reduce===G){if(Q){R=O.bind(R,Q)}return P?S.reduce(R,p):S.reduce(R)}K(S,function(V,T,U){if(!P){p=V;P=true}else{p=R.call(Q,p,V,T,U)}});if(!P){throw new TypeError("Reduce of empty array with no initial value")}return p};O.reduceRight=O.foldr=function(S,R,p,Q){var P=arguments.length>2;if(S==null){S=[]}if(b&&S.reduceRight===b){if(Q){R=O.bind(R,Q)}return P?S.reduceRight(R,p):S.reduceRight(R)}var T=O.toArray(S).reverse();if(Q&&!P){R=O.bind(R,Q)}return P?O.reduce(T,R,p,Q):O.reduce(T,R)};O.find=O.detect=function(R,Q,P){var p;A(R,function(U,S,T){if(Q.call(P,U,S,T)){p=U;return true}});return p};O.filter=O.select=function(R,Q,P){var p=[];if(R==null){return p}if(a&&R.filter===a){return R.filter(Q,P)}K(R,function(U,S,T){if(Q.call(P,U,S,T)){p[p.length]=U}});return p};O.reject=function(R,Q,P){var p=[];if(R==null){return p}K(R,function(U,S,T){if(!Q.call(P,U,S,T)){p[p.length]=U}});return p};O.every=O.all=function(R,Q,P){var p=true;if(R==null){return p}if(C&&R.every===C){return R.every(Q,P)}K(R,function(U,S,T){if(!(p=p&&Q.call(P,U,S,T))){return F}});return !!p};var A=O.some=O.any=function(R,Q,P){Q||(Q=O.identity);var p=false;if(R==null){return p}if(o&&R.some===o){return R.some(Q,P)}K(R,function(U,S,T){if(p||(p=Q.call(P,U,S,T))){return F}});return !!p};O.include=O.contains=function(Q,P){var p=false;if(Q==null){return p}if(m&&Q.indexOf===m){return Q.indexOf(P)!=-1}p=A(Q,function(R){return R===P});return p};O.invoke=function(P,Q){var p=n.call(arguments,2);return O.map(P,function(R){return(O.isFunction(Q)?Q||R:R[Q]).apply(R,p)})};O.pluck=function(P,p){return O.map(P,function(Q){return Q[p]})};O.max=function(R,Q,P){if(!Q&&O.isArray(R)&&R[0]===+R[0]){return Math.max.apply(Math,R)}if(!Q&&O.isEmpty(R)){return -Infinity}var p={computed:-Infinity};K(R,function(V,S,U){var T=Q?Q.call(P,V,S,U):V;T>=p.computed&&(p={value:V,computed:T})});return p.value};O.min=function(R,Q,P){if(!Q&&O.isArray(R)&&R[0]===+R[0]){return Math.min.apply(Math,R)}if(!Q&&O.isEmpty(R)){return Infinity}var p={computed:Infinity};K(R,function(V,S,U){var T=Q?Q.call(P,V,S,U):V;T
=0})})};O.difference=function(P){var p=O.flatten(n.call(arguments,1),true);return O.filter(P,function(Q){return !O.include(p,Q)})};O.zip=function(){var p=n.call(arguments);var R=O.max(O.pluck(p,"length"));var Q=new Array(R);for(var P=0;P=0;Q--){P=[p[Q].apply(this,P)]}return P[0]}};O.after=function(P,p){if(P<=0){return p()}return function(){if(--P<1){return p.apply(this,arguments)}}};O.keys=e||function(Q){if(Q!==Object(Q)){throw new TypeError("Invalid object")}var P=[];for(var p in Q){if(O.has(Q,p)){P[P.length]=p}}return P};O.values=function(p){return O.map(p,O.identity)};O.functions=O.methods=function(Q){var P=[];for(var p in Q){if(O.isFunction(Q[p])){P.push(p)}}return P.sort()};O.extend=function(p){K(n.call(arguments,1),function(P){for(var Q in P){p[Q]=P[Q]}});return p};O.pick=function(P){var p={};K(O.flatten(n.call(arguments,1)),function(Q){if(Q in P){p[Q]=P[Q]}});return p};O.defaults=function(p){K(n.call(arguments,1),function(P){for(var Q in P){if(p[Q]==null){p[Q]=P[Q]}}});return p};O.clone=function(p){if(!O.isObject(p)){return p}return O.isArray(p)?p.slice():O.extend({},p)};O.tap=function(P,p){p(P);return P};function L(R,Q,P){if(R===Q){return R!==0||1/R==1/Q}if(R==null||Q==null){return R===Q}if(R._chain){R=R._wrapped}if(Q._chain){Q=Q._wrapped}if(R.isEqual&&O.isFunction(R.isEqual)){return R.isEqual(Q)}if(Q.isEqual&&O.isFunction(Q.isEqual)){return Q.isEqual(R)}var U=c.call(R);if(U!=c.call(Q)){return false}switch(U){case"[object String]":return R==String(Q);case"[object Number]":return R!=+R?Q!=+Q:(R==0?1/R==1/Q:R==+Q);case"[object Date]":case"[object Boolean]":return +R==+Q;case"[object RegExp]":return R.source==Q.source&&R.global==Q.global&&R.multiline==Q.multiline&&R.ignoreCase==Q.ignoreCase}if(typeof R!="object"||typeof Q!="object"){return false}var V=P.length;while(V--){if(P[V]==R){return true}}P.push(R);var T=0,p=true;if(U=="[object Array]"){T=R.length;p=T==Q.length;if(p){while(T--){if(!(p=T in R==T in Q&&L(R[T],Q[T],P))){break}}}}else{if("constructor" in R!="constructor" in Q||R.constructor!=Q.constructor){return false}for(var S in R){if(O.has(R,S)){T++;if(!(p=O.has(Q,S)&&L(R[S],Q[S],P))){break}}}if(p){for(S in Q){if(O.has(Q,S)&&!(T--)){break}}p=!T}}P.pop();return p}O.isEqual=function(P,p){return L(P,p,[])};O.isEmpty=function(P){if(P==null){return true}if(O.isArray(P)||O.isString(P)){return P.length===0}for(var p in P){if(O.has(P,p)){return false}}return true};O.isElement=function(p){return !!(p&&p.nodeType==1)};O.isArray=u||function(p){return c.call(p)=="[object Array]"};O.isObject=function(p){return p===Object(p)};O.isArguments=function(p){return c.call(p)=="[object Arguments]"};if(!O.isArguments(arguments)){O.isArguments=function(p){return !!(p&&O.has(p,"callee"))}}O.isFunction=function(p){return c.call(p)=="[object Function]"};O.isString=function(p){return c.call(p)=="[object String]"};O.isNumber=function(p){return c.call(p)=="[object Number]"};O.isFinite=function(p){return O.isNumber(p)&&isFinite(p)};O.isNaN=function(p){return p!==p};O.isBoolean=function(p){return p===true||p===false||c.call(p)=="[object Boolean]"};O.isDate=function(p){return c.call(p)=="[object Date]"};O.isRegExp=function(p){return c.call(p)=="[object RegExp]"};O.isNull=function(p){return p===null};O.isUndefined=function(p){return p===void 0};O.has=function(P,p){return h.call(P,p)};O.noConflict=function(){x._=k;return this};O.identity=function(p){return p};O.times=function(R,Q,P){for(var p=0;p /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};O.result=function(p,Q){if(p==null){return null}var P=p[Q];return O.isFunction(P)?P.call(p):P};O.mixin=function(p){K(O.functions(p),function(P){y(P,O[P]=p[P])})};var z=0;O.uniqueId=function(p){var P=z++;return p?p+P:P};O.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var w=/.^/;var g={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"};for(var J in g){g[g[J]]=J}var j=/\\|'|\r|\n|\t|\u2028|\u2029/g;var D=/\\(\\|'|r|n|t|u2028|u2029)/g;var M=function(p){return p.replace(D,function(P,Q){return g[Q]})};O.template=function(T,S,Q){Q=O.defaults(Q||{},O.templateSettings);var R="__p+='"+T.replace(j,function(U){return"\\"+g[U]}).replace(Q.escape||w,function(U,V){return"'+\n_.escape("+M(V)+")+\n'"}).replace(Q.interpolate||w,function(U,V){return"'+\n("+M(V)+")+\n'"}).replace(Q.evaluate||w,function(U,V){return"';\n"+M(V)+"\n;__p+='"})+"';\n";if(!Q.variable){R="with(obj||{}){\n"+R+"}\n"}R="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+R+"return __p;\n";var P=new Function(Q.variable||"obj","_",R);if(S){return P(S,O)}var p=function(U){return P.call(this,U,O)};p.source="function("+(Q.variable||"obj")+"){\n"+R+"}";return p};O.chain=function(p){return O(p).chain()};var v=function(p){this._wrapped=p};O.prototype=v.prototype;var t=function(P,p){return p?O(P).chain():P};var y=function(p,P){v.prototype[p]=function(){var Q=n.call(arguments);B.call(Q,this._wrapped);return t(P.apply(O,Q),this._chain)}};O.mixin(O);K(["pop","push","reverse","shift","sort","splice","unshift"],function(p){var P=E[p];v.prototype[p]=function(){var Q=this._wrapped;P.apply(Q,arguments);var R=Q.length;if((p=="shift"||p=="splice")&&R===0){delete Q[0]}return t(Q,this._chain)}});K(["concat","join","slice"],function(p){var P=E[p];v.prototype[p]=function(){return t(P.apply(this._wrapped,arguments),this._chain)}});v.prototype.chain=function(){this._chain=true;return this};v.prototype.value=function(){return this._wrapped}}).call(this);if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i ').hide().appendTo("body")[0].contentWindow;this.navigate(F)}if(this._hasPushState){g(window).bind("popstate",this.checkUrl)}else{if(this._wantsHashChange&&("onhashchange" in window)&&!I){g(window).bind("hashchange",this.checkUrl)}else{if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}}}this.fragment=F;var J=window.location;var H=J.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!H){this.fragment=this.getFragment(null,true);window.location.replace(this.options.root+"#"+this.fragment);return true}else{if(this._wantsPushState&&this._hasPushState&&H&&J.hash){this.fragment=this.getHash().replace(n,"");window.history.replaceState({},document.title,J.protocol+"//"+J.host+this.options.root+this.fragment)}}if(!this.options.silent){return this.loadUrl()}},stop:function(){g(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);b.started=false},route:function(E,F){this.handlers.unshift({route:E,callback:F})},checkUrl:function(F){var E=this.getFragment();if(E==this.fragment&&this.iframe){E=this.getFragment(this.getHash(this.iframe))}if(E==this.fragment){return false}if(this.iframe){this.navigate(E)}this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(G){var F=this.fragment=this.getFragment(G);var E=C.any(this.handlers,function(H){if(H.route.test(F)){H.callback(F);return true}});return E},navigate:function(F,E){if(!b.started){return false}if(!E||E===true){E={trigger:E}}var G=(F||"").replace(n,"");if(this.fragment==G){return}if(this._hasPushState){if(G.indexOf(this.options.root)!=0){G=this.options.root+G}this.fragment=G;window.history[E.replace?"replaceState":"pushState"]({},document.title,G)}else{if(this._wantsHashChange){this.fragment=G;this._updateHash(window.location,G,E.replace);if(this.iframe&&(G!=this.getFragment(this.getHash(this.iframe)))){if(!E.replace){this.iframe.document.open().close()}this._updateHash(this.iframe.location,G,E.replace)}}else{window.location.assign(this.options.root+F)}}if(E.trigger){this.loadUrl(F)}},_updateHash:function(E,F,G){if(G){E.replace(E.toString().replace(/(javascript:|#).*$/,"")+"#"+F)}else{E.hash=F}}});var u=c.View=function(E){this.cid=C.uniqueId("view");this._configure(E||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var f=/^(\S+)\s*(.*)$/;var w=["model","collection","el","id","attributes","className","tagName"];C.extend(u.prototype,o,{tagName:"div",$:function(E){return this.$el.find(E)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(F,E,H){var G=document.createElement(F);if(E){g(G).attr(E)}if(H){g(G).html(H)}return G},setElement:function(E,F){if(this.$el){this.undelegateEvents()}this.$el=(E instanceof g)?E:g(E);this.el=this.$el[0];if(F!==false){this.delegateEvents()}return this},delegateEvents:function(I){if(!(I||(I=d(this,"events")))){return}this.undelegateEvents();for(var H in I){var J=I[H];if(!C.isFunction(J)){J=this[I[H]]}if(!J){throw new Error('Method "'+I[H]+'" does not exist')}var G=H.match(f);var F=G[1],E=G[2];J=C.bind(J,this);F+=".delegateEvents"+this.cid;if(E===""){this.$el.bind(F,J)}else{this.$el.delegate(E,F,J)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(G){if(this.options){G=C.extend({},this.options,G)}for(var H=0,F=w.length;H =0)&&c(j,!e)}}),g("").outerWidth(1).jquery||g.each(["Width","Height"],function(j,k){function e(q,o,u,n){return g.each(p,function(){o-=parseFloat(g.css(q,"padding"+this))||0,u&&(o-=parseFloat(g.css(q,"border"+this+"Width"))||0),n&&(o-=parseFloat(g.css(q,"margin"+this))||0)}),o}var p="Width"===k?["Left","Right"]:["Top","Bottom"],l=k.toLowerCase(),m={innerWidth:g.fn.innerWidth,innerHeight:g.fn.innerHeight,outerWidth:g.fn.outerWidth,outerHeight:g.fn.outerHeight};g.fn["inner"+k]=function(a){return a===d?m["inner"+k].call(this):this.each(function(){g(this).css(l,e(this,a)+"px")})},g.fn["outer"+k]=function(n,a){return"number"!=typeof n?m["outer"+k].call(this,n):this.each(function(){g(this).css(l,e(this,n,!0,a)+"px")})}}),g.fn.addBack||(g.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),g("").data("a-b","a").removeData("a-b").data("a-b")&&(g.fn.removeData=function(a){return function(e){return arguments.length?a.call(this,g.camelCase(e)):a.call(this)}}(g.fn.removeData)),g.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),g.support.selectstart="onselectstart" in document.createElement("div"),g.fn.extend({disableSelection:function(){return this.bind((g.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),g.extend(g.ui,{plugin:{add:function(k,j,l){var e,m=g.ui[k].prototype;for(e in l){m.plugins[e]=m.plugins[e]||[],m.plugins[e].push([j,l[e]])}},call:function(n,l,k){var m,j=n.plugins[l];if(j&&n.element[0].parentNode&&11!==n.element[0].parentNode.nodeType){for(m=0;j.length>m;m++){n.options[j[m][0]]&&j[m][1].apply(n.element,k)}}}},hasScroll:function(k,j){if("hidden"===g(k).css("overflow")){return !1}var l=j&&"left"===j?"scrollLeft":"scrollTop",e=!1;return k[l]>0?!0:(k[l]=1,e=k[l]>0,k[l]=0,e)}})})(jQuery);(function(d,b){var a=0,c=Array.prototype.slice,f=d.cleanData;d.cleanData=function(h){for(var g,j=0;null!=(g=h[j]);j++){try{d(g).triggerHandler("remove")}catch(e){}}f(h)},d.widget=function(m,v,j){var q,e,g,p,k={},t=m.split(".")[0];m=m.split(".")[1],q=t+"-"+m,j||(j=v,v=d.Widget),d.expr[":"][q.toLowerCase()]=function(h){return !!d.data(h,q)},d[t]=d[t]||{},e=d[t][m],g=d[t][m]=function(l,h){return this._createWidget?(arguments.length&&this._createWidget(l,h),b):new g(l,h)},d.extend(g,e,{version:j.version,_proto:d.extend({},j),_childConstructors:[]}),p=new v,p.options=d.widget.extend({},p.options),d.each(j,function(h,l){return d.isFunction(l)?(k[h]=function(){var o=function(){return v.prototype[h].apply(this,arguments)},n=function(s){return v.prototype[h].apply(this,s)};return function(){var w,x=this._super,u=this._superApply;return this._super=o,this._superApply=n,w=l.apply(this,arguments),this._super=x,this._superApply=u,w}}(),b):(k[h]=l,b)}),g.prototype=d.widget.extend(p,{widgetEventPrefix:e?p.widgetEventPrefix:m},k,{constructor:g,namespace:t,widgetName:m,widgetFullName:q}),e?(d.each(e._childConstructors,function(l,h){var n=h.prototype;d.widget(n.namespace+"."+n.widgetName,g,h._proto)}),delete e._childConstructors):v._childConstructors.push(g),d.widget.bridge(m,g)},d.widget.extend=function(g){for(var m,e,k=c.call(arguments,1),l=0,j=k.length;j>l;l++){for(m in k[l]){e=k[l][m],k[l].hasOwnProperty(m)&&e!==b&&(g[m]=d.isPlainObject(e)?d.isPlainObject(g[m])?d.widget.extend({},g[m],e):d.widget.extend({},e):e)}}return g},d.widget.bridge=function(g,h){var e=h.prototype.widgetFullName||g;d.fn[g]=function(m){var n="string"==typeof m,k=c.call(arguments,1),j=this;return m=!n&&k.length?d.widget.extend.apply(null,[m].concat(k)):m,n?this.each(function(){var l,o=d.data(this,e);return o?d.isFunction(o[m])&&"_"!==m.charAt(0)?(l=o[m].apply(o,k),l!==o&&l!==b?(j=l&&l.jquery?j.pushStack(l.get()):l,!1):b):d.error("no such method '"+m+"' for "+g+" widget instance"):d.error("cannot call methods on "+g+" prior to initialization; attempted to call method '"+m+"'")}):this.each(function(){var l=d.data(this,e);l?l.option(m||{})._init():d.data(this,e,new h(m,this))}),j}},d.Widget=function(){},d.Widget._childConstructors=[],d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:" ",options:{disabled:!1,create:null},_createWidget:function(e,g){g=d(g||this.defaultElement||this)[0],this.element=d(g),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=d.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=d(),this.hoverable=d(),this.focusable=d(),g!==this&&(d.data(g,this.widgetFullName,this),this._on(!0,this.element,{remove:function(h){h.target===g&&this.destroy()}}),this.document=d(g.style?g.ownerDocument:g.document||g),this.window=d(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:d.noop,_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(d.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:d.noop,widget:function(){return this.element},option:function(g,h){var l,e,j,k=g;if(0===arguments.length){return d.widget.extend({},this.options)}if("string"==typeof g){if(k={},l=g.split("."),g=l.shift(),l.length){for(e=k[g]=d.widget.extend({},this.options[g]),j=0;l.length-1>j;j++){e[l[j]]=e[l[j]]||{},e=e[l[j]]}if(g=l.pop(),h===b){return e[g]===b?null:e[g]}e[g]=h}else{if(h===b){return this.options[g]===b?null:this.options[g]}k[g]=h}}return this._setOptions(k),this},_setOptions:function(h){var g;for(g in h){this._setOption(g,h[g])}return this},_setOption:function(h,g){return this.options[h]=g,"disabled"===h&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!g).attr("aria-disabled",g),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(g,h,k){var e,j=this;"boolean"!=typeof g&&(k=h,h=g,g=!1),k?(h=e=d(h),this.bindings=this.bindings.add(h)):(k=h,h=this.element,e=this.widget()),d.each(k,function(v,s){function q(){return g||j.options.disabled!==!0&&!d(this).hasClass("ui-state-disabled")?("string"==typeof s?j[s]:s).apply(j,arguments):b}"string"!=typeof s&&(q.guid=s.guid=s.guid||q.guid||d.guid++);var m=v.match(/^(\w+)\s*(.*)$/),p=m[1]+j.eventNamespace,t=m[2];t?e.delegate(t,p,q):h.bind(p,q)})},_off:function(h,g){g=(g||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,h.unbind(g).undelegate(g)},_delay:function(k,h){function g(){return("string"==typeof k?j[k]:k).apply(j,arguments)}var j=this;return setTimeout(g,h||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(g){d(g.currentTarget).addClass("ui-state-hover")},mouseleave:function(g){d(g.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(g){d(g.currentTarget).addClass("ui-state-focus")},focusout:function(g){d(g.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(h,g,j){var l,e,k=this.options[h];if(j=j||{},g=d.Event(g),g.type=(h===this.widgetEventPrefix?h:this.widgetEventPrefix+h).toLowerCase(),g.target=this.element[0],e=g.originalEvent){for(l in e){l in g||(g[l]=e[l])}}return this.element.trigger(g,j),!(d.isFunction(k)&&k.apply(this.element[0],[g].concat(j))===!1||g.isDefaultPrevented())}},d.each({show:"fadeIn",hide:"fadeOut"},function(g,e){d.Widget.prototype["_"+g]=function(j,m,h){"string"==typeof m&&(m={effect:m});var k,l=m?m===!0||"number"==typeof m?e:m.effect||e:g;m=m||{},"number"==typeof m&&(m={duration:m}),k=!d.isEmptyObject(m),m.complete=h,m.delay&&j.delay(m.delay),k&&d.effects&&d.effects.effect[l]?j[g](m):l!==g&&j[l]?j[l](m.duration,m.easing,h):j.queue(function(n){d(this)[g](),h&&h.call(j[0]),n()})}})})(jQuery);(function(b){var a=!1;b(document).mouseup(function(){a=!1}),b.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(d){return c._mouseDown(d)}).bind("click."+this.widgetName,function(d){return !0===b.data(d.target,c.widgetName+".preventClickEvent")?(b.removeData(d.target,c.widgetName+".preventClickEvent"),d.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(d){if(!a){this._mouseStarted&&this._mouseUp(d),this._mouseDownEvent=d;var e=this,f=1===d.which,c="string"==typeof this.options.cancel&&d.target.nodeName?b(d.target).closest(this.options.cancel).length:!1;return f&&!c&&this._mouseCapture(d)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(d)&&this._mouseDelayMet(d)&&(this._mouseStarted=this._mouseStart(d)!==!1,!this._mouseStarted)?(d.preventDefault(),!0):(!0===b.data(d.target,this.widgetName+".preventClickEvent")&&b.removeData(d.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(g){return e._mouseMove(g)},this._mouseUpDelegate=function(g){return e._mouseUp(g)},b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),d.preventDefault(),a=!0,!0)):!0}},_mouseMove:function(c){return b.ui.ie&&(!document.documentMode||9>document.documentMode)&&!c.button?this._mouseUp(c):this._mouseStarted?(this._mouseDrag(c),c.preventDefault()):(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==!1,this._mouseStarted?this._mouseDrag(c):this._mouseUp(c)),!this._mouseStarted)},_mouseUp:function(c){return b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&b.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),!1},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return !0}})})(jQuery);(function(C,x){function q(c,d,a){return[parseFloat(c[0])*(g.test(c[0])?d/100:1),parseFloat(c[1])*(g.test(c[1])?a/100:1)]}function D(c,a){return parseInt(C.css(c,a),10)||0}function k(c){var a=c[0];return 9===a.nodeType?{width:c.width(),height:c.height(),offset:{top:0,left:0}}:C.isWindow(a)?{width:c.width(),height:c.height(),offset:{top:c.scrollTop(),left:c.scrollLeft()}}:a.preventDefault?{width:0,height:0,offset:{top:a.pageY,left:a.pageX}}:{width:c.outerWidth(),height:c.outerHeight(),offset:c.offset()}}C.ui=C.ui||{};var A,j=Math.max,b=Math.abs,v=Math.round,m=/left|center|right/,z=/top|center|bottom/,B=/[\+\-]\d+(\.[\d]+)?%?/,y=/^\w+/,g=/%$/,w=C.fn.position;C.position={scrollbarWidth:function(){if(A!==x){return A}var a,c,e=C(""),d=e.children()[0];return C("body").append(e),a=d.offsetWidth,e.css("overflow","scroll"),c=d.offsetWidth,a===c&&(c=e[0].clientWidth),e.remove(),A=a-c},getScrollInfo:function(h){var d=h.isWindow?"":h.element.css("overflow-x"),f=h.isWindow?"":h.element.css("overflow-y"),l="scroll"===d||"auto"===d&&h.widthS?"left":P>0?"right":"center",vertical:0>M?"top":T>0?"bottom":"middle"};O>c&&c>b(P+S)&&(R.horizontal="center"),K>d&&d>b(T+M)&&(R.vertical="middle"),R.important=j(b(P),b(S))>j(b(T),b(M))?"horizontal":"vertical",l.using.call(this,Q,R)}),L.offset(C.extend(e,{using:G}))})},C.ui.position={fit:{left:function(F,u){var o,G=u.within,d=G.isWindow?G.scrollLeft:G.offset.left,E=G.width,c=F.left-u.collisionPosition.marginLeft,p=d-c,f=c+u.collisionWidth-E-d;u.collisionWidth>E?p>0&&0>=f?(o=F.left+p+u.collisionWidth-E-d,F.left+=p-o):F.left=f>0&&0>=p?d:p>f?d+E-u.collisionWidth:d:p>0?F.left+=p:f>0?F.left-=f:F.left=j(F.left-c,F.left)},top:function(F,u){var o,G=u.within,d=G.isWindow?G.scrollTop:G.offset.top,E=u.within.height,c=F.top-u.collisionPosition.marginTop,p=d-c,f=c+u.collisionHeight-E-d;u.collisionHeight>E?p>0&&0>=f?(o=F.top+p+u.collisionHeight-E-d,F.top+=p-o):F.top=f>0&&0>=p?d:p>f?d+E-u.collisionHeight:d:p>0?F.top+=p:f>0?F.top-=f:F.top=j(F.top-c,F.top)}},flip:{left:function(Q,L){var I,R,G=L.within,O=G.offset.left+G.scrollLeft,F=G.width,J=G.isWindow?G.scrollLeft:G.offset.left,H=Q.left-L.collisionPosition.marginLeft,N=H-J,P=H+L.collisionWidth-F-J,M="left"===L.my[0]?-L.elemWidth:"right"===L.my[0]?L.elemWidth:0,E="left"===L.at[0]?L.targetWidth:"right"===L.at[0]?-L.targetWidth:0,K=-2*L.offset[0];0>N?(I=Q.left+M+E+K+L.collisionWidth-F-O,(0>I||b(N)>I)&&(Q.left+=M+E+K)):P>0&&(R=Q.left-L.collisionPosition.marginLeft+M+E+K-J,(R>0||P>b(R))&&(Q.left+=M+E+K))},top:function(R,M){var J,S,G=M.within,P=G.offset.top+G.scrollTop,F=G.height,K=G.isWindow?G.scrollTop:G.offset.top,I=R.top-M.collisionPosition.marginTop,O=I-K,Q=I+M.collisionHeight-F-K,N="top"===M.my[1],E=N?-M.elemHeight:"bottom"===M.my[1]?M.elemHeight:0,L="top"===M.at[1]?M.targetHeight:"bottom"===M.at[1]?-M.targetHeight:0,H=-2*M.offset[1];0>O?(S=R.top+E+L+H+M.collisionHeight-F-P,R.top+E+L+H>O&&(0>S||b(O)>S)&&(R.top+=E+L+H)):Q>0&&(J=R.top-M.collisionPosition.marginTop+E+L+H-K,R.top+E+L+H>Q&&(J>0||Q>b(J))&&(R.top+=E+L+H))}},flipfit:{left:function(){C.ui.position.flip.left.apply(this,arguments),C.ui.position.fit.left.apply(this,arguments)},top:function(){C.ui.position.flip.top.apply(this,arguments),C.ui.position.fit.top.apply(this,arguments)}}},function(){var l,d,f,t,c,p=document.getElementsByTagName("body")[0],h=document.createElement("div");l=document.createElement(p?"div":"body"),f={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},p&&C.extend(f,{position:"absolute",left:"-1000px",top:"-1000px"});for(c in f){l.style[c]=f[c]}l.appendChild(h),d=p||document.documentElement,d.insertBefore(l,d.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",t=C(h).offset().left,C.support.offsetFractions=t>10&&11>t,l.innerHTML="",d.removeChild(l)}()})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(c){var b=this.options;return this.helper||b.disabled||a(c.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(c),this.handle?(a(b.iframeFix===!0?"iframe":b.iframeFix).each(function(){a("").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(c){var b=this.options;return this.helper=this._createHelper(c),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(c),this.originalPageX=c.pageX,this.originalPageY=c.pageY,b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt),this._setContainment(),this._trigger("start",c)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!b.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c),this._mouseDrag(c,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,c),!0)},_mouseDrag:function(c,b){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(c),this.positionAbs=this._convertPositionTo("absolute"),!b){var d=this._uiHash();if(this._trigger("drag",c,d)===!1){return this._mouseUp({}),!1}this.position=d.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),a.ui.ddmanager&&a.ui.ddmanager.drag(this,c),!1},_mouseStop:function(c){var b=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,c)),this.dropped&&(d=this.dropped,this.dropped=!1),"original"!==this.options.helper||a.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c)!==!1&&b._clear()}):this._trigger("stop",c)!==!1&&this._clear(),!1):!1},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return this.options.handle?!!a(b.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(c){var b=this.options,d=a.isFunction(b.helper)?a(b.helper.apply(this.element[0],[c])):"clone"===b.helper?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo("parent"===b.appendTo?this.element[0].parentNode:b.appendTo),d[0]===this.element[0]||/(fixed|absolute)/.test(d.css("position"))||d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left" in b&&(this.offset.click.left=b.left+this.margins.left),"right" in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top" in b&&(this.offset.click.top=b.top+this.margins.top),"bottom" in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.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 c,b,d,e=this.options;return e.containment?"window"===e.containment?(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===e.containment?(this.containment=[0,0,a(document).width()-this.helperProportions.width-this.margins.left,(a(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):e.containment.constructor===Array?(this.containment=e.containment,undefined):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),b=a(e.containment),d=b[0],d&&(c="hidden"!==b.css("overflow"),this.containment=[(parseInt(b.css("borderLeftWidth"),10)||0)+(parseInt(b.css("paddingLeft"),10)||0),(parseInt(b.css("borderTopWidth"),10)||0)+(parseInt(b.css("paddingTop"),10)||0),(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(b.css("borderRightWidth"),10)||0)-(parseInt(b.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(b.css("borderBottomWidth"),10)||0)-(parseInt(b.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=b),undefined):(this.containment=null,undefined)},_convertPositionTo:function(c,b){b||(b=this.position);var d="absolute"===c?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:e.scrollTop(),left:e.scrollLeft()}),{top:b.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*d,left:b.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*d}},_generatePosition:function(k){var f,m,d,j,c=this.options,b="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,g=k.pageX,e=k.pageY;return this.offset.scroll||(this.offset.scroll={top:b.scrollTop(),left:b.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(m=this.relative_container.offset(),f=[this.containment[0]+m.left,this.containment[1]+m.top,this.containment[2]+m.left,this.containment[3]+m.top]):f=this.containment,k.pageX-this.offset.click.left f[2]&&(g=f[2]+this.offset.click.left),k.pageY-this.offset.click.top>f[3]&&(e=f[3]+this.offset.click.top)),c.grid&&(d=c.grid[1]?this.originalPageY+Math.round((e-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY,e=f?d-this.offset.click.top>=f[1]||d-this.offset.click.top>f[3]?d:d-this.offset.click.top>=f[1]?d-c.grid[1]:d+c.grid[1]:d,j=c.grid[0]?this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX,g=f?j-this.offset.click.left>=f[0]||j-this.offset.click.left>f[2]?j:j-this.offset.click.left>=f[0]?j-c.grid[0]:j+c.grid[0]:j)),{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(c,b,d){return d=d||this._uiHash(),a.ui.plugin.call(this,c,[b,d]),"drag"===c&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,c,b,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var e=a(this).data("ui-draggable"),f=e.options,b=a.extend({},c,{item:e.element});e.sortables=[],a(f.connectToSortable).each(function(){var g=a.data(this,"ui-sortable");g&&!g.options.disabled&&(e.sortables.push({instance:g,shouldRevert:g.options.revert}),g.refreshPositions(),g._trigger("activate",d,b))})},stop:function(c,b){var d=a(this).data("ui-draggable"),e=a.extend({},b,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(c),this.instance.options.helper=this.instance.options._helper,"original"===d.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",c,e))})},drag:function(c,b){var d=a(this).data("ui-draggable"),e=this;a.each(d.sortables,function(){var f=!1,g=this;this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,a.each(d.sortables,function(){return this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this!==g&&this.instance._intersectsWith(this.instance.containerCache)&&a.contains(g.instance.element[0],this.instance.element[0])&&(f=!1),f})),f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return b.helper[0]},c.target=this.instance.currentItem[0],this.instance._mouseCapture(c,!0),this.instance._mouseStart(c,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",c),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(c)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",c,this.instance._uiHash(this.instance)),this.instance._mouseStop(c,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",c),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var c=a("body"),b=a(this).data("ui-draggable").options;c.css("cursor")&&(b._cursor=c.css("cursor")),c.css("cursor",b.cursor)},stop:function(){var b=a(this).data("ui-draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(c,b){var d=a(b.helper),e=a(this).data("ui-draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(c,b){var d=a(this).data("ui-draggable").options;d._opacity&&a(b.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("ui-draggable");b.scrollParent[0]!==document&&"HTML"!==b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(c){var b=a(this).data("ui-draggable"),d=b.options,e=!1;b.scrollParent[0]!==document&&"HTML"!==b.scrollParent[0].tagName?(d.axis&&"x"===d.axis||(b.overflowOffset.top+b.scrollParent[0].offsetHeight-c.pageY =0;J--){x=z.snapElements[J].left,F=x+z.snapElements[J].width,D=z.snapElements[J].top,k=D+z.snapElements[J].height,x-C>j||G>F+C||D-C>e||K>k+C||!a.contains(z.snapElements[J].item.ownerDocument,z.snapElements[J].item)?(z.snapElements[J].snapping&&z.options.snap.release&&z.options.snap.release.call(z.element,q,a.extend(z._uiHash(),{snapItem:z.snapElements[J].item})),z.snapElements[J].snapping=!1):("inner"!==H.snapMode&&(w=C>=Math.abs(D-e),B=C>=Math.abs(k-K),L=C>=Math.abs(x-j),A=C>=Math.abs(F-G),w&&(E.position.top=z._convertPositionTo("relative",{top:D-z.helperProportions.height,left:0}).top-z.margins.top),B&&(E.position.top=z._convertPositionTo("relative",{top:k,left:0}).top-z.margins.top),L&&(E.position.left=z._convertPositionTo("relative",{top:0,left:x-z.helperProportions.width}).left-z.margins.left),A&&(E.position.left=z._convertPositionTo("relative",{top:0,left:F}).left-z.margins.left)),I=w||B||L||A,"outer"!==H.snapMode&&(w=C>=Math.abs(D-K),B=C>=Math.abs(k-e),L=C>=Math.abs(x-G),A=C>=Math.abs(F-j),w&&(E.position.top=z._convertPositionTo("relative",{top:D,left:0}).top-z.margins.top),B&&(E.position.top=z._convertPositionTo("relative",{top:k-z.helperProportions.height,left:0}).top-z.margins.top),L&&(E.position.left=z._convertPositionTo("relative",{top:0,left:x}).left-z.margins.left),A&&(E.position.left=z._convertPositionTo("relative",{top:0,left:F-z.helperProportions.width}).left-z.margins.left)),!z.snapElements[J].snapping&&(w||B||L||A||I)&&z.options.snap.snap&&z.options.snap.snap.call(z.element,q,a.extend(z._uiHash(),{snapItem:z.snapElements[J].item})),z.snapElements[J].snapping=w||B||L||A||I)}}}),a.ui.plugin.add("draggable","stack",{start:function(){var c,b=this.data("ui-draggable").options,d=a.makeArray(a(b.stack)).sort(function(f,e){return(parseInt(a(f).css("zIndex"),10)||0)-(parseInt(a(e).css("zIndex"),10)||0)});d.length&&(c=parseInt(a(d[0]).css("zIndex"),10)||0,a(d).each(function(e){a(this).css("zIndex",c+e)}),this.css("zIndex",c+d.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(c,b){var d=a(b.helper),e=a(this).data("ui-draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(c,b){var d=a(this).data("ui-draggable").options;d._zIndex&&a(b.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(b){function a(f,d,c){return f>d&&d+c>f}b.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var d=this.options,c=d.accept;this.isover=!1,this.isout=!0,this.accept=b.isFunction(c)?c:function(f){return f.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},b.ui.ddmanager.droppables[d.scope]=b.ui.ddmanager.droppables[d.scope]||[],b.ui.ddmanager.droppables[d.scope].push(this),d.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var d=0,c=b.ui.ddmanager.droppables[this.options.scope];c.length>d;d++){c[d]===this&&c.splice(d,1)}this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(d,c){"accept"===d&&(this.accept=b.isFunction(c)?c:function(f){return f.is(c)}),b.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=b.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=b.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=b.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",d,this.ui(c)))},_out:function(d){var c=b.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",d,this.ui(c)))},_drop:function(d,c){var e=c||b.ui.ddmanager.current,f=!1;return e&&(e.currentItem||e.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var g=b.data(this,"ui-droppable");return g.options.greedy&&!g.options.disabled&&g.options.scope===e.options.scope&&g.accept.call(g.element[0],e.currentItem||e.element)&&b.ui.intersect(e,b.extend(g,{offset:g.element.offset()}),g.options.tolerance)?(f=!0,!1):undefined}),f?!1:this.accept.call(this.element[0],e.currentItem||e.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",d,this.ui(e)),this.element):!1):!1},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}}),b.ui.intersect=function(v,q,A){if(!q.offset){return !1}var k,y,j=(v.positionAbs||v.position.absolute).left,f=j+v.helperProportions.width,t=(v.positionAbs||v.position.absolute).top,m=t+v.helperProportions.height,z=q.offset.left,x=z+q.proportions.width,w=q.offset.top,g=w+q.proportions.height;switch(A){case"fit":return j>=z&&x>=f&&t>=w&&g>=m;case"intersect":return j+v.helperProportions.width/2>z&&x>f-v.helperProportions.width/2&&t+v.helperProportions.height/2>w&&g>m-v.helperProportions.height/2;case"pointer":return k=(v.positionAbs||v.position.absolute).left+(v.clickOffset||v.offset.click).left,y=(v.positionAbs||v.position.absolute).top+(v.clickOffset||v.offset.click).top,a(y,w,q.proportions.height)&&a(k,z,q.proportions.width);case"touch":return(t>=w&&g>=t||m>=w&&g>=m||w>t&&m>g)&&(j>=z&&x>=j||f>=z&&x>=f||z>j&&f>x);default:return !1}},b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,d){var f,j,c=b.ui.ddmanager.droppables[e.options.scope]||[],h=d?d.type:null,g=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();b:for(f=0;c.length>f;f++){if(!(c[f].options.disabled||e&&!c[f].accept.call(c[f].element[0],e.currentItem||e.element))){for(j=0;g.length>j;j++){if(g[j]===c[f].element[0]){c[f].proportions.height=0;continue b}}c[f].visible="none"!==c[f].element.css("display"),c[f].visible&&("mousedown"===h&&c[f]._activate.call(c[f],d),c[f].offset=c[f].element.offset(),c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight})}}},drop:function(d,c){var e=!1;return b.each((b.ui.ddmanager.droppables[d.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&b.ui.intersect(d,this,this.options.tolerance)&&(e=this._drop.call(this,c)||e),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],d.currentItem||d.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),e},dragStart:function(d,c){d.element.parentsUntil("body").bind("scroll.droppable",function(){d.options.refreshPositions||b.ui.ddmanager.prepareOffsets(d,c)})},drag:function(d,c){d.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(d,c),b.each(b.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var f,j,e,h=b.ui.intersect(d,this,this.options.tolerance),g=!h&&this.isover?"isout":h&&!this.isover?"isover":null;g&&(this.options.greedy&&(j=this.options.scope,e=this.element.parents(":data(ui-droppable)").filter(function(){return b.data(this,"ui-droppable").options.scope===j}),e.length&&(f=b.data(e[0],"ui-droppable"),f.greedyChild="isover"===g)),f&&"isover"===g&&(f.isover=!1,f.isout=!0,f._out.call(f,c)),this[g]=!0,this["isout"===g?"isover":"isout"]=!1,this["isover"===g?"_over":"_out"].call(this,c),f&&"isout"===g&&(f.isout=!1,f.isover=!0,f._over.call(f,c)))}})},dragStop:function(d,c){d.element.parentsUntil("body").unbind("scroll.droppable"),d.options.refreshPositions||b.ui.ddmanager.prepareOffsets(d,c)}}})(jQuery);(function(c){function b(d){return parseInt(d,10)||0}function a(d){return !isNaN(parseInt(d,10))}c.widget("ui.resizable",c.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var f,e,g,k,d,j=this,h=this.options;if(this.element.addClass("ui-resizable"),c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(c("").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(c(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String){for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),f=this.handles.split(","),this.handles={},e=0;f.length>e;e++){g=c.trim(f[e]),d="ui-resizable-"+g,k=c(""),k.css({zIndex:h.zIndex}),"se"===g&&k.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[g]=".ui-resizable-"+g,this.element.append(k)}}this._renderAxis=function(o){var m,p,q,l;o=o||this.element;for(m in this.handles){this.handles[m].constructor===String&&(this.handles[m]=c(this.handles[m],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(p=c(this.handles[m],this.element),l=/sw|ne|nw|se|n|s/.test(m)?p.outerHeight():p.outerWidth(),q=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join(""),o.css(q,l),this._proportionallyResize()),c(this.handles[m]).length}},this._renderAxis(this.element),this._handles=c(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){j.resizing||(this.className&&(k=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),j.axis=k&&k[1]?k[1]:"se")}),h.autoHide&&(this._handles.hide(),c(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(c(this).removeClass("ui-resizable-autohide"),j._handles.show())}).mouseleave(function(){h.disabled||j.resizing||(c(this).addClass("ui-resizable-autohide"),j._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(d(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),d(this.originalElement),this},_mouseCapture:function(e){var d,f,g=!1;for(d in this.handles){f=c(this.handles[d])[0],(f===e.target||c.contains(f,e.target))&&(g=!0)}return !this.options.disabled&&g},_mouseStart:function(e){var g,l,d,k=this.options,j=this.element.position(),f=this.element;return this.resizing=!0,/absolute/.test(f.css("position"))?f.css({position:"absolute",top:f.css("top"),left:f.css("left")}):f.is(".ui-draggable")&&f.css({position:"absolute",top:j.top,left:j.left}),this._renderProxy(),g=b(this.helper.css("left")),l=b(this.helper.css("top")),k.containment&&(g+=c(k.containment).scrollLeft()||0,l+=c(k.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:l},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:l},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof k.aspectRatio?k.aspectRatio:this.originalSize.width/this.originalSize.height||1,d=c(".ui-resizable-"+this.axis).css("cursor"),c("body").css("cursor","auto"===d?this.axis+"-resize":d),f.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(z){var m,A=this.helper,j={},x=this.originalMousePosition,g=this.axis,e=this.position.top,q=this.position.left,k=this.size.width,y=this.size.height,w=z.pageX-x.left||0,v=z.pageY-x.top||0,f=this._change[g];return f?(m=f.apply(this,[z,w,v]),this._updateVirtualBoundaries(z.shiftKey),(this._aspectRatio||z.shiftKey)&&(m=this._updateRatio(m,z)),m=this._respectSize(m,z),this._updateCache(m),this._propagate("resize",z),this.position.top!==e&&(j.top=this.position.top+"px"),this.position.left!==q&&(j.left=this.position.left+"px"),this.size.width!==k&&(j.width=this.size.width+"px"),this.size.height!==y&&(j.height=this.size.height+"px"),A.css(j),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),c.isEmptyObject(j)||this._trigger("resize",z,this.ui()),!1):!1},_mouseStop:function(q){this.resizing=!1;var j,v,f,m,e,d,k,g=this.options,p=this;return this._helper&&(j=this._proportionallyResizeElements,v=j.length&&/textarea/i.test(j[0].nodeName),f=v&&c.ui.hasScroll(j[0],"left")?0:p.sizeDiff.height,m=v?0:p.sizeDiff.width,e={width:p.helper.width()-m,height:p.helper.height()-f},d=parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left)||null,k=parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top)||null,g.animate||this.element.css(c.extend(e,{top:k,left:d})),p.helper.height(p.size.height),p.helper.width(p.size.width),this._helper&&!g.animate&&this._proportionallyResize()),c("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",q),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(j){var f,g,l,d,k,h=this.options;k={minWidth:a(h.minWidth)?h.minWidth:0,maxWidth:a(h.maxWidth)?h.maxWidth:1/0,minHeight:a(h.minHeight)?h.minHeight:0,maxHeight:a(h.maxHeight)?h.maxHeight:1/0},(this._aspectRatio||j)&&(f=k.minHeight*this.aspectRatio,l=k.minWidth/this.aspectRatio,g=k.maxHeight*this.aspectRatio,d=k.maxWidth/this.aspectRatio,f>k.minWidth&&(k.minWidth=f),l>k.minHeight&&(k.minHeight=l),k.maxWidth>g&&(k.maxWidth=g),k.maxHeight>d&&(k.maxHeight=d)),this._vBoundaries=k},_updateCache:function(d){this.offset=this.helper.offset(),a(d.left)&&(this.position.left=d.left),a(d.top)&&(this.position.top=d.top),a(d.height)&&(this.size.height=d.height),a(d.width)&&(this.size.width=d.width)},_updateRatio:function(g){var d=this.position,f=this.size,h=this.axis;return a(g.height)?g.width=g.height*this.aspectRatio:a(g.width)&&(g.height=g.width/this.aspectRatio),"sw"===h&&(g.left=d.left+(f.width-g.width),g.top=null),"nw"===h&&(g.top=d.top+(f.height-g.height),g.left=d.left+(f.width-g.width)),g},_respectSize:function(m){var w=this._vBoundaries,x=this.axis,g=a(m.width)&&w.maxWidth&&w.maxWidth m.width,d=a(m.height)&&w.minHeight&&w.minHeight>m.height,k=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,v=/sw|nw|w/.test(x),p=/nw|ne|n/.test(x);return f&&(m.width=w.minWidth),d&&(m.height=w.minHeight),g&&(m.width=w.maxWidth),q&&(m.height=w.maxHeight),f&&v&&(m.left=k-w.minWidth),g&&v&&(m.left=k-w.maxWidth),d&&p&&(m.top=j-w.minHeight),q&&p&&(m.top=j-w.maxHeight),m.width||m.height||m.left||!m.top?m.width||m.height||m.top||!m.left||(m.left=null):m.top=null,m},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var j,g,f,h,k,d=this.helper||this.element;for(j=0;this._proportionallyResizeElements.length>j;j++){if(k=this._proportionallyResizeElements[j],!this.borderDif){for(this.borderDif=[],f=[k.css("borderTopWidth"),k.css("borderRightWidth"),k.css("borderBottomWidth"),k.css("borderLeftWidth")],h=[k.css("paddingTop"),k.css("paddingRight"),k.css("paddingBottom"),k.css("paddingLeft")],g=0;f.length>g;g++){this.borderDif[g]=(parseInt(f[g],10)||0)+(parseInt(h[g],10)||0)}}k.css({height:d.height()-this.borderDif[0]-this.borderDif[2]||0,width:d.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,d=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||c(""),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++d.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(f,d){return{width:this.originalSize.width+d}},w:function(h,f){var d=this.originalSize,g=this.originalPosition;return{left:g.left+f,width:d.width-f}},n:function(h,f,d){var g=this.originalSize,j=this.originalPosition;return{top:j.top+d,height:g.height-d}},s:function(g,f,d){return{height:this.originalSize.height+d}},se:function(e,d,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,d,f]))},sw:function(e,d,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,d,f]))},ne:function(e,d,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,d,f]))},nw:function(e,d,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,d,f]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]),"resize"!==e&&this._trigger(e,d,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),c.ui.plugin.add("resizable","animate",{stop:function(q){var j=c(this).data("ui-resizable"),v=j.options,f=j._proportionallyResizeElements,m=f.length&&/textarea/i.test(f[0].nodeName),e=m&&c.ui.hasScroll(f[0],"left")?0:j.sizeDiff.height,d=m?0:j.sizeDiff.width,k={width:j.size.width-d,height:j.size.height-e},g=parseInt(j.element.css("left"),10)+(j.position.left-j.originalPosition.left)||null,p=parseInt(j.element.css("top"),10)+(j.position.top-j.originalPosition.top)||null;j.element.animate(c.extend(k,p&&g?{top:p,left:g}:{}),{duration:v.animateDuration,easing:v.animateEasing,step:function(){var h={width:parseInt(j.element.css("width"),10),height:parseInt(j.element.css("height"),10),top:parseInt(j.element.css("top"),10),left:parseInt(j.element.css("left"),10)};f&&f.length&&c(f[0]).css({width:h.width,height:h.height}),j._updateCache(h),j._propagate("resize",q)}})}}),c.ui.plugin.add("resizable","containment",{start:function(){var m,y,j,w,g,e,q,k=c(this).data("ui-resizable"),x=k.options,v=k.element,t=x.containment,f=t instanceof c?t.get(0):/parent/.test(t)?v.parent().get(0):t;f&&(k.containerElement=c(f),/document/.test(t)||t===document?(k.containerOffset={left:0,top:0},k.containerPosition={left:0,top:0},k.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}):(m=c(f),y=[],c(["Top","Right","Left","Bottom"]).each(function(d,h){y[d]=b(m.css("padding"+h))}),k.containerOffset=m.offset(),k.containerPosition=m.position(),k.containerSize={height:m.innerHeight()-y[3],width:m.innerWidth()-y[1]},j=k.containerOffset,w=k.containerSize.height,g=k.containerSize.width,e=c.ui.hasScroll(f,"left")?f.scrollWidth:g,q=c.ui.hasScroll(f)?f.scrollHeight:w,k.parentData={element:f,left:j.left,top:j.top,width:e,height:q}))},resize:function(x){var k,y,g,v,f=c(this).data("ui-resizable"),e=f.options,m=f.containerOffset,j=f.position,w=f._aspectRatio||x.shiftKey,q={top:0,left:0},p=f.containerElement;p[0]!==document&&/static/.test(p.css("position"))&&(q=m),j.left<(f._helper?m.left:0)&&(f.size.width=f.size.width+(f._helper?f.position.left-m.left:f.position.left-q.left),w&&(f.size.height=f.size.width/f.aspectRatio),f.position.left=e.helper?m.left:0),j.top<(f._helper?m.top:0)&&(f.size.height=f.size.height+(f._helper?f.position.top-m.top:f.position.top),w&&(f.size.width=f.size.height*f.aspectRatio),f.position.top=f._helper?m.top:0),f.offset.left=f.parentData.left+f.position.left,f.offset.top=f.parentData.top+f.position.top,k=Math.abs((f._helper?f.offset.left-q.left:f.offset.left-q.left)+f.sizeDiff.width),y=Math.abs((f._helper?f.offset.top-q.top:f.offset.top-m.top)+f.sizeDiff.height),g=f.containerElement.get(0)===f.element.parent().get(0),v=/relative|absolute/.test(f.containerElement.css("position")),g&&v&&(k-=f.parentData.left),k+f.size.width>=f.parentData.width&&(f.size.width=f.parentData.width-k,w&&(f.size.height=f.size.width/f.aspectRatio)),y+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-y,w&&(f.size.width=f.size.height*f.aspectRatio))},stop:function(){var p=c(this).data("ui-resizable"),j=p.options,q=p.containerOffset,f=p.containerPosition,m=p.containerElement,e=c(p.helper),d=e.offset(),k=e.outerWidth()-p.sizeDiff.width,g=e.outerHeight()-p.sizeDiff.height;p._helper&&!j.animate&&/relative/.test(m.css("position"))&&c(this).css({left:d.left-f.left-q.left,width:k,height:g}),p._helper&&!j.animate&&/static/.test(m.css("position"))&&c(this).css({left:d.left-f.left-q.left,width:k,height:g})}}),c.ui.plugin.add("resizable","alsoResize",{start:function(){var e=c(this).data("ui-resizable"),d=e.options,f=function(g){c(g).each(function(){var h=c(this);h.data("ui-resizable-alsoresize",{width:parseInt(h.width(),10),height:parseInt(h.height(),10),left:parseInt(h.css("left"),10),top:parseInt(h.css("top"),10)})})};"object"!=typeof d.alsoResize||d.alsoResize.parentNode?f(d.alsoResize):d.alsoResize.length?(d.alsoResize=d.alsoResize[0],f(d.alsoResize)):c.each(d.alsoResize,function(g){f(g)})},resize:function(f,e){var j=c(this).data("ui-resizable"),m=j.options,d=j.originalSize,l=j.originalPosition,k={height:j.size.height-d.height||0,width:j.size.width-d.width||0,top:j.position.top-l.top||0,left:j.position.left-l.left||0},g=function(h,n){c(h).each(function(){var q=c(this),u=c(this).data("ui-resizable-alsoresize"),p={},s=n&&n.length?n:q.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(s,function(w,v){var o=(u[v]||0)+(k[v]||0);o&&o>=0&&(p[v]=o||null)}),q.css(p)})};"object"!=typeof m.alsoResize||m.alsoResize.nodeType?g(m.alsoResize):c.each(m.alsoResize,function(n,h){g(n,h)})},stop:function(){c(this).removeData("resizable-alsoresize")}}),c.ui.plugin.add("resizable","ghost",{start:function(){var e=c(this).data("ui-resizable"),d=e.options,f=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof d.ghost?d.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var d=c(this).data("ui-resizable");d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(){var d=c(this).data("ui-resizable");d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),c.ui.plugin.add("resizable","grid",{resize:function(){var H=c(this).data("ui-resizable"),y=H.options,I=H.size,q=H.originalSize,E=H.originalPosition,k=H.axis,e="number"==typeof y.grid?[y.grid,y.grid]:y.grid,z=e[0]||1,x=e[1]||1,G=Math.round((I.width-q.width)/z)*z,D=Math.round((I.height-q.height)/x)*x,C=q.width+G,j=q.height+D,B=y.maxWidth&&C>y.maxWidth,w=y.maxHeight&&j>y.maxHeight,A=y.minWidth&&y.minWidth>C,F=y.minHeight&&y.minHeight>j;y.grid=e,A&&(C+=z),F&&(j+=x),B&&(C-=z),w&&(j-=x),/^(se|s|e)$/.test(k)?(H.size.width=C,H.size.height=j):/^(ne)$/.test(k)?(H.size.width=C,H.size.height=j,H.position.top=E.top-D):/^(sw)$/.test(k)?(H.size.width=C,H.size.height=j,H.position.left=E.left-G):(H.size.width=C,H.size.height=j,H.position.top=E.top-D,H.position.left=E.left-G)}})})(jQuery);(function(a){a.widget("ui.selectable",a.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var c,b=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var e=a(this),d=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:d.left,top:d.top,right:d.left+e.outerWidth(),bottom:d.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(c){var b=this,d=this.options;this.opos=[c.pageX,c.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",c),a(d.appendTo).append(this.helper),this.helper.css({left:c.pageX,top:c.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=!0,c.metaKey||c.ctrlKey||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,b._trigger("unselecting",c,{unselecting:e.element}))}),a(c.target).parents().addBack().each(function(){var e,f=a.data(this,"selectable-item");return f?(e=!c.metaKey&&!c.ctrlKey||!f.$element.hasClass("ui-selected"),f.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),f.unselecting=!e,f.selecting=e,f.selected=e,e?b._trigger("selecting",c,{selecting:f.element}):b._trigger("unselecting",c,{unselecting:f.element}),!1):undefined}))},_mouseDrag:function(d){if(this.dragged=!0,!this.options.disabled){var c,f=this,k=this.options,b=this.opos[0],j=this.opos[1],g=d.pageX,e=d.pageY;return b>g&&(c=g,g=b,b=c),j>e&&(c=e,e=j,j=c),this.helper.css({left:b,top:j,width:g-b,height:e-j}),this.selectees.each(function(){var m=a.data(this,"selectable-item"),h=!1;m&&m.element!==f.element[0]&&("touch"===k.tolerance?h=!(m.left>g||b>m.right||m.top>e||j>m.bottom):"fit"===k.tolerance&&(h=m.left>b&&g>m.right&&m.top>j&&e>m.bottom),h?(m.selected&&(m.$element.removeClass("ui-selected"),m.selected=!1),m.unselecting&&(m.$element.removeClass("ui-unselecting"),m.unselecting=!1),m.selecting||(m.$element.addClass("ui-selecting"),m.selecting=!0,f._trigger("selecting",d,{selecting:m.element}))):(m.selecting&&((d.metaKey||d.ctrlKey)&&m.startselected?(m.$element.removeClass("ui-selecting"),m.selecting=!1,m.$element.addClass("ui-selected"),m.selected=!0):(m.$element.removeClass("ui-selecting"),m.selecting=!1,m.startselected&&(m.$element.addClass("ui-unselecting"),m.unselecting=!0),f._trigger("unselecting",d,{unselecting:m.element}))),m.selected&&(d.metaKey||d.ctrlKey||m.startselected||(m.$element.removeClass("ui-selected"),m.selected=!1,m.$element.addClass("ui-unselecting"),m.unselecting=!0,f._trigger("unselecting",d,{unselecting:m.element})))))}),!1}},_mouseStop:function(c){var b=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,b._trigger("unselected",c,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,b._trigger("selected",c,{selected:d.element})}),this._trigger("stop",c),this.helper.remove(),!1}})})(jQuery);(function(b){function c(f,g,d){return f>g&&g+d>f}function a(d){return/left|right/.test(d.css("float"))||/inline|table-cell/.test(d.css("display"))}b.widget("ui.sortable",b.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var d=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===d.axis||a(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var d=this.items.length-1;d>=0;d--){this.items[d].item.removeData(this.widgetName+"-item")}return this},_setOption:function(f,d){"disabled"===f?(this.options[f]=d,this.widget().toggleClass("ui-sortable-disabled",!!d)):b.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(h,f){var g=null,j=!1,d=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(h),b(h.target).parents().each(function(){return b.data(this,d.widgetName+"-item")===d?(g=b(this),!1):undefined}),b.data(h.target,d.widgetName+"-item")===d&&(g=b(h.target)),g?!this.options.handle||f||(b(this.options.handle,g).find("*").addBack().each(function(){this===h.target&&(j=!0)}),j)?(this.currentItem=g,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(h,f,g){var k,d,j=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(h),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},b.extend(this.offset,{click:{left:h.pageX-this.offset.left,top:h.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(h),this.originalPageX=h.pageX,this.originalPageY=h.pageY,j.cursorAt&&this._adjustOffsetFromHelper(j.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),j.containment&&this._setContainment(),j.cursor&&"auto"!==j.cursor&&(d=this.document.find("body"),this.storedCursor=d.css("cursor"),d.css("cursor",j.cursor),this.storedStylesheet=b("").appendTo(d)),j.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",j.opacity)),j.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",j.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",h,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!g){for(k=this.containers.length-1;k>=0;k--){this.containers[k]._trigger("activate",h,this._uiHash(this))}}return b.ui.ddmanager&&(b.ui.ddmanager.current=this),b.ui.ddmanager&&!j.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,h),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(h),!0},_mouseDrag:function(j){var f,g,l,d,k=this.options,h=!1;for(this.position=this._generatePosition(j),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-j.pageY =0;f--){if(g=this.items[f],l=g.item[0],d=this._intersectsWithPointer(g),d&&g.instance===this.currentContainer&&l!==this.currentItem[0]&&this.placeholder[1===d?"next":"prev"]()[0]!==l&&!b.contains(this.placeholder[0],l)&&("semi-dynamic"===this.options.type?!b.contains(this.element[0],l):!0)){if(this.direction=1===d?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(g)){break}this._rearrange(j,g),this._trigger("change",j,this._uiHash());break}}return this._contactContainers(j),b.ui.ddmanager&&b.ui.ddmanager.drag(this,j),this._trigger("sort",j,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(h,f){if(h){if(b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,h),this.options.revert){var g=this,k=this.placeholder.offset(),d=this.options.axis,j={};d&&"x"!==d||(j.left=k.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),d&&"y"!==d||(j.top=k.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,b(this.helper).animate(j,parseInt(this.options.revert,10)||500,function(){g._clear(h)})}else{this._clear(h,f)}return !1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,this._uiHash(this)),this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",null,this._uiHash(this)),this.containers[d].containerCache.over=0)}}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),b.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem):b(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(g){var d=this._getItemsAsjQuery(g&&g.connected),f=[];return g=g||{},b(d).each(function(){var e=(b(g.item||this).attr(g.attribute||"id")||"").match(g.expression||/(.+)[\-=_](.+)/);e&&f.push((g.key||e[1]+"[]")+"="+(g.key&&g.expression?e[1]:e[2]))}),!f.length&&g.key&&f.push(g.key+"="),f.join("&")},toArray:function(g){var d=this._getItemsAsjQuery(g&&g.connected),f=[];return g=g||{},d.each(function(){f.push(b(g.item||this).attr(g.attribute||"id")||"")}),f},_intersectsWith:function(B){var w=this.positionAbs.left,q=w+this.helperProportions.width,C=this.positionAbs.top,k=C+this.helperProportions.height,z=B.left,j=z+B.width,f=B.top,v=f+B.height,m=this.offset.click.top,y=this.offset.click.left,A="x"===this.options.axis||C+m>f&&v>C+m,x="y"===this.options.axis||w+y>z&&j>w+y,g=A&&x;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>B[this.floating?"width":"height"]?g:w+this.helperProportions.width/2>z&&j>q-this.helperProportions.width/2&&C+this.helperProportions.height/2>f&&v>k-this.helperProportions.height/2},_intersectsWithPointer:function(f){var e="x"===this.options.axis||c(this.positionAbs.top+this.offset.click.top,f.top,f.height),g="y"===this.options.axis||c(this.positionAbs.left+this.offset.click.left,f.left,f.width),j=e&&g,d=this._getDragVerticalDirection(),h=this._getDragHorizontalDirection();return j?this.floating?h&&"right"===h||"down"===d?2:1:d&&("down"===d?2:1):!1},_intersectsWithSides:function(f){var e=c(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height),g=c(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width),h=this._getDragVerticalDirection(),d=this._getDragHorizontalDirection();return this.floating&&d?"right"===d&&g||"left"===d&&!g:h&&("down"===h&&e||"up"===h&&!e)},_getDragVerticalDirection:function(){var d=this.positionAbs.top-this.lastPositionAbs.top;return 0!==d&&(d>0?"down":"up")},_getDragHorizontalDirection:function(){var d=this.positionAbs.left-this.lastPositionAbs.left;return 0!==d&&(d>0?"right":"left")},refresh:function(d){return this._refreshItems(d),this.refreshPositions(),this},_connectWith:function(){var d=this.options;return d.connectWith.constructor===String?[d.connectWith]:d.connectWith},_getItemsAsjQuery:function(l){var f,j,p,d,m=[],k=[],g=this._connectWith();if(g&&l){for(f=g.length-1;f>=0;f--){for(p=b(g[f]),j=p.length-1;j>=0;j--){d=b.data(p[j],this.widgetFullName),d&&d!==this&&!d.options.disabled&&k.push([b.isFunction(d.options.items)?d.options.items.call(d.element):b(d.options.items,d.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),d])}}}for(k.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),f=k.length-1;f>=0;f--){k[f][0].each(function(){m.push(this)})}return b(m)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=b.grep(this.items,function(f){for(var e=0;d.length>e;e++){if(d[e]===f.item[0]){return !1}}return !0})},_refreshItems:function(q){this.items=[],this.containers=[this];var m,y,j,w,g,f,p,k,v=this.items,x=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],q,{item:this.currentItem}):b(this.options.items,this.element),this]],t=this._connectWith();if(t&&this.ready){for(m=t.length-1;m>=0;m--){for(j=b(t[m]),y=j.length-1;y>=0;y--){w=b.data(j[y],this.widgetFullName),w&&w!==this&&!w.options.disabled&&(x.push([b.isFunction(w.options.items)?w.options.items.call(w.element[0],q,{item:this.currentItem}):b(w.options.items,w.element),w]),this.containers.push(w))}}}for(m=x.length-1;m>=0;m--){for(g=x[m][1],f=x[m][0],y=0,k=f.length;k>y;y++){p=b(f[y]),p.data(this.widgetName+"-item",g),v.push({item:p,instance:g,width:0,height:0,left:0,top:0})}}},refreshPositions:function(h){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var f,g,j,d;for(f=this.items.length-1;f>=0;f--){g=this.items[f],g.instance!==this.currentContainer&&this.currentContainer&&g.item[0]!==this.currentItem[0]||(j=this.options.toleranceElement?b(this.options.toleranceElement,g.item):g.item,h||(g.width=j.outerWidth(),g.height=j.outerHeight()),d=j.offset(),g.left=d.left,g.top=d.top)}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(f=this.containers.length-1;f>=0;f--){d=this.containers[f].element.offset(),this.containers[f].containerCache.left=d.left,this.containers[f].containerCache.top=d.top,this.containers[f].containerCache.width=this.containers[f].element.outerWidth(),this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}}return this},_createPlaceholder:function(g){g=g||this;var d,f=g.options;f.placeholder&&f.placeholder.constructor!==String||(d=f.placeholder,f.placeholder={element:function(){var e=g.currentItem[0].nodeName.toLowerCase(),h=b("<"+e+">",g.document[0]).addClass(d||g.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===e?g.currentItem.children().each(function(){b(" ",g.document[0]).attr("colspan",b(this).attr("colspan")||1).appendTo(h)}):"img"===e&&h.attr("src",g.currentItem.attr("src")),d||h.css("visibility","hidden"),h},update:function(e,h){(!d||f.forcePlaceholderSize)&&(h.height()||h.height(g.currentItem.innerHeight()-parseInt(g.currentItem.css("paddingTop")||0,10)-parseInt(g.currentItem.css("paddingBottom")||0,10)),h.width()||h.width(g.currentItem.innerWidth()-parseInt(g.currentItem.css("paddingLeft")||0,10)-parseInt(g.currentItem.css("paddingRight")||0,10)))}}),g.placeholder=b(f.placeholder.element.call(g.element,g.currentItem)),g.currentItem.after(g.placeholder),f.placeholder.update(g,g.placeholder)},_contactContainers:function(B){var k,z,j,e,v,t,y,A,x,g,w=null,q=null;for(k=this.containers.length-1;k>=0;k--){if(!b.contains(this.currentItem[0],this.containers[k].element[0])){if(this._intersectsWith(this.containers[k].containerCache)){if(w&&b.contains(this.containers[k].element[0],w.element[0])){continue}w=this.containers[k],q=k}else{this.containers[k].containerCache.over&&(this.containers[k]._trigger("out",B,this._uiHash(this)),this.containers[k].containerCache.over=0)}}}if(w){if(1===this.containers.length){this.containers[q].containerCache.over||(this.containers[q]._trigger("over",B,this._uiHash(this)),this.containers[q].containerCache.over=1)}else{for(j=10000,e=null,g=w.floating||a(this.currentItem),v=g?"left":"top",t=g?"width":"height",y=this.positionAbs[v]+this.offset.click[v],z=this.items.length-1;z>=0;z--){b.contains(this.containers[q].element[0],this.items[z].item[0])&&this.items[z].item[0]!==this.currentItem[0]&&(!g||c(this.positionAbs.top+this.offset.click.top,this.items[z].top,this.items[z].height))&&(A=this.items[z].item.offset()[v],x=!1,Math.abs(A-y)>Math.abs(A+this.items[z][t]-y)&&(x=!0,A+=this.items[z][t]),j>Math.abs(A-y)&&(j=Math.abs(A-y),e=this.items[z],this.direction=x?"up":"down"))}if(!e&&!this.options.dropOnEmpty){return}if(this.currentContainer===this.containers[q]){return}e?this._rearrange(B,e,null,!0):this._rearrange(B,null,this.containers[q].element,!0),this._trigger("change",B,this._uiHash()),this.containers[q]._trigger("change",B,this._uiHash(this)),this.currentContainer=this.containers[q],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[q]._trigger("over",B,this._uiHash(this)),this.containers[q].containerCache.over=1}}},_createHelper:function(g){var d=this.options,f=b.isFunction(d.helper)?b(d.helper.apply(this.element[0],[g,this.currentItem])):"clone"===d.helper?this.currentItem.clone():this.currentItem;return f.parents("body").length||b("parent"!==d.appendTo?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(f[0]),f[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!f[0].style.width||d.forceHelperSize)&&f.width(this.currentItem.width()),(!f[0].style.height||d.forceHelperSize)&&f.height(this.currentItem.height()),f},_adjustOffsetFromHelper:function(d){"string"==typeof d&&(d=d.split(" ")),b.isArray(d)&&(d={left:+d[0],top:+d[1]||0}),"left" in d&&(this.offset.click.left=d.left+this.margins.left),"right" in d&&(this.offset.click.left=this.helperProportions.width-d.right+this.margins.left),"top" in d&&(this.offset.click.top=d.top+this.margins.top),"bottom" in d&&(this.offset.click.top=this.helperProportions.height-d.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])&&(d.left+=this.scrollParent.scrollLeft(),d.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&b.ui.ie)&&(d={top:0,left:0}),{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var d=this.currentItem.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var g,d,f,h=this.options;"parent"===h.containment&&(h.containment=this.helper[0].parentNode),("document"===h.containment||"window"===h.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b("document"===h.containment?document:window).width()-this.helperProportions.width-this.margins.left,(b("document"===h.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(h.containment)||(g=b(h.containment)[0],d=b(h.containment).offset(),f="hidden"!==b(g).css("overflow"),this.containment=[d.left+(parseInt(b(g).css("borderLeftWidth"),10)||0)+(parseInt(b(g).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(b(g).css("borderTopWidth"),10)||0)+(parseInt(b(g).css("paddingTop"),10)||0)-this.margins.top,d.left+(f?Math.max(g.scrollWidth,g.offsetWidth):g.offsetWidth)-(parseInt(b(g).css("borderLeftWidth"),10)||0)-(parseInt(b(g).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(f?Math.max(g.scrollHeight,g.offsetHeight):g.offsetHeight)-(parseInt(b(g).css("borderTopWidth"),10)||0)-(parseInt(b(g).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(h,f){f||(f=this.position);var g="absolute"===h?1:-1,j="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,d=/(html|body)/i.test(j[0].tagName);return{top:f.top+this.offset.relative.top*g+this.offset.parent.top*g-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():d?0:j.scrollTop())*g,left:f.left+this.offset.relative.left*g+this.offset.parent.left*g-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():d?0:j.scrollLeft())*g}},_generatePosition:function(l){var f,j,p=this.options,d=l.pageX,m=l.pageY,k="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&b.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,g=/(html|body)/i.test(k[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(l.pageX-this.offset.click.left this.containment[2]&&(d=this.containment[2]+this.offset.click.left),l.pageY-this.offset.click.top>this.containment[3]&&(m=this.containment[3]+this.offset.click.top)),p.grid&&(f=this.originalPageY+Math.round((m-this.originalPageY)/p.grid[1])*p.grid[1],m=this.containment?f-this.offset.click.top>=this.containment[1]&&f-this.offset.click.top<=this.containment[3]?f:f-this.offset.click.top>=this.containment[1]?f-p.grid[1]:f+p.grid[1]:f,j=this.originalPageX+Math.round((d-this.originalPageX)/p.grid[0])*p.grid[0],d=this.containment?j-this.offset.click.left>=this.containment[0]&&j-this.offset.click.left<=this.containment[2]?j:j-this.offset.click.left>=this.containment[0]?j-p.grid[0]:j+p.grid[0]:j)),{top:m-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():g?0:k.scrollTop()),left:d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():g?0:k.scrollLeft())}},_rearrange:function(f,h,d,g){d?d[0].appendChild(this.placeholder[0]):h.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?h.item[0]:h.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var j=this.counter;this._delay(function(){j===this.counter&&this.refreshPositions(!g)})},_clear:function(f,h){this.reverting=!1;var d,g=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(d in this._storedCSS){("auto"===this._storedCSS[d]||"static"===this._storedCSS[d])&&(this._storedCSS[d]="")}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(this.fromOutside&&!h&&g.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||h||g.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(h||(g.push(function(e){this._trigger("remove",e,this._uiHash())}),g.push(function(e){return function(j){e._trigger("receive",j,this._uiHash(this))}}.call(this,this.currentContainer)),g.push(function(e){return function(j){e._trigger("update",j,this._uiHash(this))}}.call(this,this.currentContainer)))),d=this.containers.length-1;d>=0;d--){h||g.push(function(e){return function(j){e._trigger("deactivate",j,this._uiHash(this))}}.call(this,this.containers[d])),this.containers[d].containerCache.over&&(g.push(function(e){return function(j){e._trigger("out",j,this._uiHash(this))}}.call(this,this.containers[d])),this.containers[d].containerCache.over=0)}if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!h){for(this._trigger("beforeStop",f,this._uiHash()),d=0;g.length>d;d++){g[d].call(this,f)}this._trigger("stop",f,this._uiHash())}return this.fromOutside=!1,!1}if(h||this._trigger("beforeStop",f,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!h){for(d=0;g.length>d;d++){g[d].call(this,f)}this._trigger("stop",f,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){b.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(f){var d=f||this;return{helper:d.helper,placeholder:d.placeholder||b([]),position:d.position,originalPosition:d.originalPosition,offset:d.positionAbs,item:d.currentItem,sender:f?f.element:null}}})})(jQuery);(function(b){var d=0,a={},c={};a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="hide",c.height=c.paddingTop=c.paddingBottom=c.borderTopWidth=c.borderBottomWidth="show",b.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var f=this.options;this.prevShow=this.prevHide=b(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),f.collapsible||f.active!==!1&&null!=f.active||(f.active=0),this._processPanels(),0>f.active&&(f.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():b(),content:this.active.length?this.active.next():b()}},_createIcons:function(){var f=this.options.icons;f&&(b("").addClass("ui-accordion-header-icon ui-icon "+f.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(f.header).addClass(f.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(f,g){return"active"===f?(this._activate(g),undefined):("event"===f&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(g)),this._super(f,g),"collapsible"!==f||g||this.options.active!==!1||this._activate(0),"icons"===f&&(this._destroyIcons(),g&&this._createIcons()),"disabled"===f&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!g),undefined)},_keydown:function(j){if(!j.altKey&&!j.ctrlKey){var g=b.ui.keyCode,h=this.headers.length,k=this.headers.index(j.target),f=!1;switch(j.keyCode){case g.RIGHT:case g.DOWN:f=this.headers[(k+1)%h];break;case g.LEFT:case g.UP:f=this.headers[(k-1+h)%h];break;case g.SPACE:case g.ENTER:this._eventHandler(j);break;case g.HOME:f=this.headers[0];break;case g.END:f=this.headers[h-1]}f&&(b(j.target).attr("tabIndex",-1),b(f).attr("tabIndex",0),f.focus(),j.preventDefault())}},_panelKeyDown:function(f){f.keyCode===b.ui.keyCode.UP&&f.ctrlKey&&b(f.currentTarget).prev().focus()},refresh:function(){var f=this.options;this._processPanels(),f.active===!1&&f.collapsible===!0||!this.headers.length?(f.active=!1,this.active=b()):f.active===!1?this._activate(0):this.active.length&&!b.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(f.active=!1,this.active=b()):this._activate(Math.max(0,f.active-1)):f.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var f,g=this.options,j=g.heightStyle,e=this.element.parent(),h=this.accordionId="ui-accordion-"+(this.element.attr("id")||++d);this.active=this._findActive(g.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(o){var l=b(this),m=l.attr("id"),p=l.next(),k=p.attr("id");m||(m=h+"-header-"+o,l.attr("id",m)),k||(k=h+"-panel-"+o,p.attr("id",k)),l.attr("aria-controls",k),p.attr("aria-labelledby",m)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(g.event),"fill"===j?(f=e.height(),this.element.siblings(":visible").each(function(){var l=b(this),k=l.css("position");"absolute"!==k&&"fixed"!==k&&(f-=l.outerHeight(!0))}),this.headers.each(function(){f-=b(this).outerHeight(!0)}),this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+b(this).height()))}).css("overflow","auto")):"auto"===j&&(f=0,this.headers.next().each(function(){f=Math.max(f,b(this).css("height","").height())}).height(f))},_activate:function(g){var f=this._findActive(g)[0];f!==this.active[0]&&(f=f||this.active[0],this._eventHandler({target:f,currentTarget:f,preventDefault:b.noop}))},_findActive:function(f){return"number"==typeof f?this.headers.eq(f):b()},_setupEvents:function(g){var f={keydown:"_keydown"};g&&b.each(g.split(" "),function(h,j){f[j]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,f),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(q){var m=this.options,u=this.active,j=b(q.currentTarget),t=j[0]===u[0],g=t&&m.collapsible,f=g?b():j.next(),p=u.next(),k={oldHeader:u,oldPanel:p,newHeader:g?b():j,newPanel:f};q.preventDefault(),t&&!m.collapsible||this._trigger("beforeActivate",q,k)===!1||(m.active=g?!1:this.headers.index(j),this.active=t?b():j,this._toggle(k),u.removeClass("ui-accordion-header-active ui-state-active"),m.icons&&u.children(".ui-accordion-header-icon").removeClass(m.icons.activeHeader).addClass(m.icons.header),t||(j.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),m.icons&&j.children(".ui-accordion-header-icon").removeClass(m.icons.header).addClass(m.icons.activeHeader),j.next().addClass("ui-accordion-content-active")))},_toggle:function(h){var f=h.newPanel,g=this.prevShow.length?this.prevShow:h.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=f,this.prevHide=g,this.options.animate?this._animate(f,g,h):(g.hide(),f.show(),this._toggleComplete(h)),g.attr({"aria-expanded":"false","aria-hidden":"true"}),g.prev().attr("aria-selected","false"),f.length&&g.length?g.prev().attr("tabIndex",-1):f.length&&this.headers.filter(function(){return 0===b(this).attr("tabIndex")}).attr("tabIndex",-1),f.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(z,s,k){var x,j,f,q=this,m=0,w=z.length&&(!s.length||z.index() ",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var g,d,f,j=this.element[0].nodeName.toLowerCase(),c="textarea"===j,h="input"===j;this.isMultiLine=c?!0:h?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[c||h?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(k){if(this.element.prop("readOnly")){return g=!0,f=!0,d=!0,undefined}g=!1,f=!1,d=!1;var e=a.ui.keyCode;switch(k.keyCode){case e.PAGE_UP:g=!0,this._move("previousPage",k);break;case e.PAGE_DOWN:g=!0,this._move("nextPage",k);break;case e.UP:g=!0,this._keyEvent("previous",k);break;case e.DOWN:g=!0,this._keyEvent("next",k);break;case e.ENTER:case e.NUMPAD_ENTER:this.menu.active&&(g=!0,k.preventDefault(),this.menu.select(k));break;case e.TAB:this.menu.active&&this.menu.select(k);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(k),k.preventDefault());break;default:d=!0,this._searchTimeout(k)}},keypress:function(e){if(g){return g=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&e.preventDefault(),undefined}if(!d){var k=a.ui.keyCode;switch(e.keyCode){case k.PAGE_UP:this._move("previousPage",e);break;case k.PAGE_DOWN:this._move("nextPage",e);break;case k.UP:this._keyEvent("previous",e);break;case k.DOWN:this._keyEvent("next",e)}}},input:function(e){return f?(f=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=a(" ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(l){l.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var k=this.menu.element[0];a(l.target).closest(".ui-menu-item").length||this._delay(function(){var m=this;this.document.one("mousedown",function(e){e.target===m.element[0]||e.target===k||a.contains(k,e.target)||m.close()})})},menufocus:function(m,k){if(this.isNewMenu&&(this.isNewMenu=!1,m.originalEvent&&/^mouse/.test(m.originalEvent.type))){return this.menu.blur(),this.document.one("mousemove",function(){a(m.target).trigger(m.originalEvent)}),undefined}var l=k.item.data("ui-autocomplete-item");!1!==this._trigger("focus",m,{item:l})?m.originalEvent&&/^key/.test(m.originalEvent.type)&&this._value(l.value):this.liveRegion.text(l.value)},menuselect:function(l,n){var k=n.item.data("ui-autocomplete-item"),m=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=m,this._delay(function(){this.previous=m,this.selectedItem=k})),!1!==this._trigger("select",l,{item:k})&&this._value(k.value),this.term=this._value(),this.close(l),this.selectedItem=k}}),this.liveRegion=a("",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(c,d){this._super(c,d),"source"===c&&this._initSource(),"appendTo"===c&&this.menu.element.appendTo(this._appendTo()),"disabled"===c&&d&&this.xhr&&this.xhr.abort()},_appendTo:function(){var c=this.options.appendTo;return c&&(c=c.jquery||c.nodeType?a(c):this.document.find(c).eq(0)),c||(c=this.element.closest(".ui-front")),c.length||(c=this.document[0].body),c},_initSource:function(){var f,c,d=this;a.isArray(this.options.source)?(f=this.options.source,this.source=function(e,g){g(a.ui.autocomplete.filter(f,e.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(g,h){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:g,dataType:"json",success:function(e){h(e)},error:function(){h([])}})}):this.source=this.options.source},_searchTimeout:function(c){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,c))},this.options.delay)},search:function(c,d){return c=null!=c?c:this._value(),this.term=this._value(),c.length
").append(a("").text(c.label)).appendTo(d)},_move:function(c,d){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(c)||this.menu.isLastItem()&&/^next/.test(c)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[c](d),undefined):(this.search(null,d),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(c,d){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(c,d),d.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(f,c){var d=RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(f,function(e){return d.test(e.label||e.value||e)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(c){return c+(c>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(c){var d;this._superApply(arguments),this.options.disabled||this.cancelSearch||(d=c&&c.length?this.options.messages.results(c.length):this.options.messages.noResults,this.liveRegion.text(d))}})})(jQuery);(function(p){var k,g,q,d,m="ui-button ui-widget ui-state-default ui-corner-all",c="ui-state-hover ui-state-active ",b="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var a=p(this);setTimeout(function(){a.find(":ui-button").button("refresh")},1)},f=function(l){var a=l.name,h=l.form,o=p([]);return a&&(a=a.replace(/'/g,"\\'"),o=h?p(h).find("[name='"+a+"']"):p("[name='"+a+"']",l.ownerDocument).filter(function(){return !this.form})),o};p.widget("ui.button",{version:"1.10.3",defaultElement:"