function edButton(t,e,i,n,s,o){this.id=t,this.display=e,this.tagStart=i,this.tagEnd=n,this.access=s,this.open=o}function get_buttons(t){switch(t){case"textile":edButtons.push(new edButton("ed_bold","b","**","**","b")),edButtons.push(new edButton("ed_italic","i","_","_","i")),edButtons.push(new edButton("ed_link","link","","","a")),edButtons.push(new edButton("ed_img","img","!","!","m",-1)),edButtons.push(new edButton("ed_li","li","* ","","l",-1)),edButtons.push(new edButton("ed_block","b-quote",">","","q",-1)),edButtons.push(new edButton("ed_del","del","","")),edButtons.push(new edButton("ed_code","code","@","@","c")),edButtons.push(new edButton("ed_more","more","\n\n","","")),edButtons.push(new edButton("ed_publifycode","publify:code","","\n\n\n","publify:code"));break;case"markdown":case"markdown smartypants":edButtons.push(new edButton("ed_bold","b","**","**","b")),edButtons.push(new edButton("ed_italic","i","_","_","i")),edButtons.push(new edButton("ed_link","link","","","a")),edButtons.push(new edButton("ed_img","img","","","m",-1)),edButtons.push(new edButton("ed_li","li","* ","","l",-1)),edButtons.push(new edButton("ed_ol","ol","#","","o",-1)),edButtons.push(new edButton("ed_block","b-quote",">","","q",-1)),edButtons.push(new edButton("ed_del","del","","")),edButtons.push(new edButton("ed_code","code","`","`","c")),edButtons.push(new edButton("ed_more","more","\n\n","","")),edButtons.push(new edButton("ed_publifycode","publify:code","","\n\n\n","publify:code"));break;default:edButtons.push(new edButton("ed_bold","b","","","b")),edButtons.push(new edButton("ed_italic","i","","","i")),edButtons.push(new edButton("ed_link","link","","","a")),edButtons.push(new edButton("ed_img","img","","","m",-1)),edButtons.push(new edButton("ed_ul","ul","\n\n","u")),edButtons.push(new edButton("ed_ol","ol","
    \n","
\n\n","o")),edButtons.push(new edButton("ed_li","li","\t
  • ","
  • \n","l")),edButtons.push(new edButton("ed_block","b-quote","
    ","
    ","q")),edButtons.push(new edButton("ed_del","del","","")),edButtons.push(new edButton("ed_code","code","","","c")),edButtons.push(new edButton("ed_more","more","\n\n","","")),edButtons.push(new edButton("ed_publifycode","publify:code","","\n\n\n","publify:code"))}}function edLink(t,e,i){this.display=t,this.URL=e,i||(i=0),this.newWin=i}function edShowButton(t,e,i){if(e.access)var n=' accesskey = "'+e.access+'"';else n="";switch(e.id){case"ed_img":document.write('');break;case"ed_link":document.write('');break;case"ed_publifycode":document.write('');break;default:document.write('')}}function edShowLinks(){var t='",document.write(t)}function edAddTag(t,e){""!=edButtons[e].tagEnd&&(edOpenTags[t][edOpenTags[t].length]=e,document.getElementById(edButtons[e].id+"_"+t).value="/"+document.getElementById(edButtons[e].id+"_"+t).value)}function edRemoveTag(t,e){for(i=0;i"+edLinks[t].display+"";e.selectedIndex=0,edInsertContent(edCanvas,n)}else e.selectedIndex=0}function edSpell(t){myField=document.getElementById(t);var e="";if(document.selection){myField.focus();var i=document.selection.createRange();0
    '),i=0;i'),document.write("
    "),edOpenTags[t]=new Array}function edInsertTag(t,e){if(myField=document.getElementById(t),document.selection)myField.focus(),sel=document.selection.createRange(),0',edInsertTag(t,e))}}function edInsertPublifyCode(t,e,i){if(myField=document.getElementById(t),i||(i=""),edCheckOpenTags(t,e))edInsertTag(t,e);else{var n=prompt("Choose language",i);n&&(edButtons[e].tagStart='\n',edInsertTag(t,e))}}function edInsertImage(t){myField=document.getElementById(t);var e=prompt("Enter the URL of the image","http://");e&&0')}function edInsertImageFromCarousel(t,e){myField=document.getElementById(t),e&&(myValue=''+prompt(',edInsertContent(t,myValue))}function countInstances(t,e){return t.split(e).length-1}function edInsertVia(t){myField=document.getElementById(t);var e=prompt("Enter the URL of the source link","http://");e&&edInsertContent(t,e='(Thanks '+prompt("Enter the name of the source","")+")")}function edSetCookie(t,e,i,n,s){document.cookie=t+"="+escape(e)+(i?"; expires="+i.toGMTString():"")+(n?"; path="+n:"")+(s?"; domain="+s:"")}function edShowExtraCookie(){for(var t=document.cookie.split(";"),e=0;e"!==c[1]||Jt.test(a)?0:l:l.firstChild)&&a.childNodes.length;o--;)pt.nodeName(h=a.childNodes[o],"tbody")&&!h.childNodes.length&&a.removeChild(h);for(pt.merge(f,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=p.lastChild}else f.push(e.createTextNode(a));for(l&&p.removeChild(l),ct.appendChecked||pt.grep(v(f,"input"),b),m=0;a=f[m++];)if(n&&-1")).appendTo(e.documentElement))[0].contentWindow||he[0].contentDocument).document).write(),e.close(),i=M(t,e),he.detach()),ce[t]=i),i}function E(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function N(t){if(t in De)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=Te.length;i--;)if((t=Te[i]+e)in De)return t}function P(t,e){for(var i,n,s,o=[],a=0,r=t.length;ax.cacheLength&&delete i[n.shift()],i[t+" "]=e}var n=[];return i}function l(t){return t[z]=!0,t}function s(t){var e=N.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function e(t,e){for(var i=t.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=e}function u(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||K)-(~t.sourceIndex||K);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function n(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function o(i){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===i}}function a(a){return l(function(o){return o=+o,l(function(t,e){for(var i,n=a([],t.length,o),s=n.length;s--;)t[i=n[s]]&&(t[i]=!(e[i]=t[i]))})})}function m(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function r(){}function g(t){for(var e=0,i=t.length,n="";e+~]|"+it+")"+it+"*"),ht=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ct=new RegExp(ot),dt=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},xt=function(){E()};try{G.apply(Q=Z.call($.childNodes),$.childNodes),Q[$.childNodes.length].nodeType}catch(kt){G={apply:Q.length?function(t,e){X.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}for(f in v=_.support={},C=_.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},E=_.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:$;return n!==N&&9===n.nodeType&&n.documentElement&&(P=(N=n).documentElement,O=!C(N),(i=N.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xt,!1):i.attachEvent&&i.attachEvent("onunload",xt)),v.attributes=s(function(t){return t.className="i",!t.getAttribute("className")}),v.getElementsByTagName=s(function(t){return t.appendChild(N.createComment("")),!t.getElementsByTagName("*").length}),v.getElementsByClassName=gt.test(N.getElementsByClassName),v.getById=s(function(t){return P.appendChild(t).id=z,!N.getElementsByName||!N.getElementsByName(z).length}),v.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var i=e.getElementById(t);return i?[i]:[]}},x.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var i=t.replace(_t,wt);return function(t){var e="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===i}}),x.find.TAG=v.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):v.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},x.find.CLASS=v.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&O)return e.getElementsByClassName(t)},j=[],H=[],(v.qsa=gt.test(N.querySelectorAll))&&(s(function(t){P.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||H.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+z+"-]").length||H.push("~="),t.querySelectorAll(":checked").length||H.push(":checked"),t.querySelectorAll("a#"+z+"+*").length||H.push(".#.+[+~]")}),s(function(t){var e=N.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&H.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),H.push(",.*:")})),(v.matchesSelector=gt.test(F=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&s(function(t){v.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),j.push("!=",ot)}),H=H.length&&new RegExp(H.join("|")),j=j.length&&new RegExp(j.join("|")),e=gt.test(P.compareDocumentPosition),L=e||gt.test(P.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!v.sortDetached&&e.compareDocumentPosition(t)===i?t===N||t.ownerDocument===$&&L($,t)?-1:e===N||e.ownerDocument===$&&L($,e)?1:M?tt(M,t)-tt(M,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,n=0,s=t.parentNode,o=e.parentNode,a=[t],r=[e];if(!s||!o)return t===N?-1:e===N?1:s?-1:o?1:M?tt(M,t)-tt(M,e):0;if(s===o)return u(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)r.unshift(i);for(;a[n]===r[n];)n++;return n?u(a[n],r[n]):a[n]===$?-1:r[n]===$?1:0}),N},_.matches=function(t,e){return _(t,null,null,e)},_.matchesSelector=function(t,e){if((t.ownerDocument||t)!==N&&E(t),e=e.replace(ht,"='$1']"),v.matchesSelector&&O&&!Y[e+" "]&&(!j||!j.test(e))&&(!H||!H.test(e)))try{var i=F.call(t,e);if(i||v.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(kt){}return 0<_(e,N,null,[t]).length},_.contains=function(t,e){return(t.ownerDocument||t)!==N&&E(t),L(t,e)},_.attr=function(t,e){(t.ownerDocument||t)!==N&&E(t);var i=x.attrHandle[e.toLowerCase()],n=i&&U.call(x.attrHandle,e.toLowerCase())?i(t,e,!O):undefined;return n!==undefined?n:v.attributes||!O?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},_.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},_.uniqueSort=function(t){var e,i=[],n=0,s=0;if(A=!v.detectDuplicates,M=!v.sortStable&&t.slice(0),t.sort(V),A){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return M=null,t},k=_.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=k(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=k(e);return i},(x=_.selectors={cacheLength:50,createPseudo:l,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||_.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&_.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ct.test(i)&&(e=T(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(i,n,s){return function(t){var e=_.attr(t,i);return null==e?"!="===n:!n||(e+="","="===n?e===s:"!="===n?e!==s:"^="===n?s&&0===e.indexOf(s):"*="===n?s&&-1(?:<\/\1>|)$/,kt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?pt.find.matchesSelector(n,t)?[n]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,i=[],n=this,s=n.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e)[^>]*|#([\w-]*))$/;(pt.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||Ct,"string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&3<=t.length?[null,t,null]:Tt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),xt.test(n[1])&&pt.isPlainObject(e))for(n in e)pt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((s=nt.getElementById(n[2]))&&s.parentNode){if(s.id!==n[2])return Ct.find(t);this.length=1,this[0]=s}return this.context=nt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(pt):(t.selector!==undefined&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))}).prototype=pt.fn,Ct=pt(nt);var Dt=/^(?:parents|prev(?:Until|All))/,St={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,i=pt(t,this),n=i.length;return this.filter(function(){for(e=0;e
    a",ct.leadingWhitespace=3===Ht.firstChild.nodeType,ct.tbody=!Ht.getElementsByTagName("tbody").length,ct.htmlSerialize=!!Ht.getElementsByTagName("link").length,ct.html5Clone="<:nav>"!==nt.createElement("nav").cloneNode(!0).outerHTML,Ft.type="checkbox",Ft.checked=!0,jt.appendChild(Ft),ct.appendChecked=Ft.checked,Ht.innerHTML="",ct.noCloneChecked=!!Ht.cloneNode(!0).lastChild.defaultValue,jt.appendChild(Ht),(Ft=nt.createElement("input")).setAttribute("type","radio"),Ft.setAttribute("checked","checked"),Ft.setAttribute("name","t"),Ht.appendChild(Ft),ct.checkClone=Ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ct.noCloneEvent=!!Ht.addEventListener,Ht[pt.expando]=1,ct.attributes=!Ht.getAttribute(pt.expando);var Ut={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:ct.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};Ut.optgroup=Ut.option,Ut.tbody=Ut.tfoot=Ut.colgroup=Ut.caption=Ut.thead,Ut.th=Ut.td;var Qt=/<|&#?\w+;/,Jt=/]","i"),se=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oe=/\s*$/g,ue=g(nt).appendChild(nt.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(se,"<$1>")},clone:function(t,e,i){var n,s,o,a,r,l=pt.contains(t.ownerDocument,t);if(ct.html5Clone||pt.isXMLDoc(t)||!ne.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(ue.innerHTML=t.outerHTML,ue.removeChild(o=ue.firstChild)),!(ct.noCloneEvent&&ct.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(n=v(o),r=v(t),a=0;null!=(s=r[a]);++a)n[a]&&D(s,n[a]);if(e)if(i)for(r=r||v(t),n=n||v(o),a=0;null!=(s=r[a]);a++)T(s,n[a]);else T(t,o);return 0<(n=v(o,"script")).length&&y(n,!l&&v(t,"script")),n=r=s=null,o},cleanData:function(t,e){for(var i,n,s,o,a=0,r=pt.expando,l=pt.cache,u=ct.attributes,h=pt.event.special;null!=(i=t[a]);a++)if((e||Nt(i))&&(o=(s=i[r])&&l[s])){if(o.events)for(n in o.events)h[n]?pt.event.remove(i,n):pt.removeEvent(i,n,o.handle);l[s]&&(delete l[s],u||"undefined"==typeof i.removeAttribute?i[r]=undefined:i.removeAttribute(r),it.push(s))}}}),pt.fn.extend({domManip:S,detach:function(t){return I(this,t,!0)},remove:function(t){return I(this,t)},text:function(t){return Rt(this,function(t){return t===undefined?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||nt).createTextNode(t))},null,t,arguments.length)},append:function(){return S(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||w(this,t).appendChild(t)})},prepend:function(){return S(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return S(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return S(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(v(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Rt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(t===undefined)return 1===e.nodeType?e.innerHTML.replace(ie,""):undefined;if("string"==typeof t&&!oe.test(t)&&(ct.htmlSerialize||!ne.test(t))&&(ct.leadingWhitespace||!Vt.test(t))&&!Ut[(qt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;it",h.childNodes[0].style.borderCollapse="separate",(t=h.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(a=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",a=0===t[0].offsetHeight)),i.removeChild(u)}var n,s,o,a,r,l,u=nt.createElement("div"),h=nt.createElement("div");h.style&&(h.style.cssText="float:left;opacity:.5",ct.opacity="0.5"===h.style.opacity,ct.cssFloat=!!h.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",ct.clearCloneStyle="content-box"===h.style.backgroundClip,(u=nt.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.innerHTML="",u.appendChild(h),ct.boxSizing=""===h.style.boxSizing||""===h.style.MozBoxSizing||""===h.style.WebkitBoxSizing,pt.extend(ct,{reliableHiddenOffsets:function(){return null==n&&t(),a},boxSizingReliable:function(){return null==n&&t(),o},pixelMarginRight:function(){return null==n&&t(),s},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),r},reliableMarginLeft:function(){return null==n&&t(),l}}))}();var ge,ve,ye=/^(top|right|bottom|left)$/;k.getComputedStyle?(ge=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=k),e.getComputedStyle(t)},ve=function(t,e,i){var n,s,o,a,r=t.style;return""!==(a=(i=i||ge(t))?i.getPropertyValue(e)||i[e]:undefined)&&a!==undefined||pt.contains(t.ownerDocument,t)||(a=pt.style(t,e)),i&&!ct.pixelMarginRight()&&pe.test(a)&&de.test(e)&&(n=r.width,s=r.minWidth,o=r.maxWidth,r.minWidth=r.maxWidth=r.width=a,a=i.width,r.width=n,r.minWidth=s,r.maxWidth=o),a===undefined?a:a+""}):me.currentStyle&&(ge=function(t){return t.currentStyle},ve=function(t,e,i){var n,s,o,a,r=t.style;return null==(a=(i=i||ge(t))?i[e]:undefined)&&r&&r[e]&&(a=r[e]),pe.test(a)&&!ye.test(e)&&(n=r.left,(o=(s=t.runtimeStyle)&&s.left)&&(s.left=t.currentStyle.left),r.left="fontSize"===e?"1em":a,a=r.pixelLeft+"px",r.left=n,o&&(s.left=o)),a===undefined?a:a+""||"auto"});var be=/alpha\([^)]*\)/i,_e=/opacity\s*=\s*([^)]*)/i,we=/^(none|table(?!-c[ea]).+)/,xe=new RegExp("^("+Lt+")(.*)$","i"),ke={position:"absolute",visibility:"hidden",display:"block"},Ce={letterSpacing:"0",fontWeight:"400"},Te=["Webkit","O","Moz","ms"],De=nt.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=ve(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ct.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,a,r=pt.camelCase(e),l=t.style;if(e=pt.cssProps[r]||(pt.cssProps[r]=N(r)||r),a=pt.cssHooks[e]||pt.cssHooks[r],i===undefined)return a&&"get"in a&&(s=a.get(t,!1,n))!==undefined?s:l[e];if("string"===(o=typeof i)&&(s=zt.exec(i))&&s[1]&&(i=c(t,e,s),o="number"),null!=i&&i==i&&("number"===o&&(i+=s&&s[3]||(pt.cssNumber[r]?"":"px")),ct.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(a&&"set"in a&&(i=a.set(t,i,n))===undefined)))try{l[e]=i}catch(u){}}},css:function(t,e,i,n){var s,o,a,r=pt.camelCase(e);return e=pt.cssProps[r]||(pt.cssProps[r]=N(r)||r),(a=pt.cssHooks[e]||pt.cssHooks[r])&&"get"in a&&(o=a.get(t,!0,i)),o===undefined&&(o=ve(t,e,n)),"normal"===o&&e in Ce&&(o=Ce[e]),""===i||i?(s=parseFloat(o),!0===i||isFinite(s)?s||0:o):o}}),pt.each(["height","width"],function(t,s){pt.cssHooks[s]={get:function(t,e,i){if(e)return we.test(pt.css(t,"display"))&&0===t.offsetWidth?fe(t,ke,function(){return j(t,s,i)}):j(t,s,i)},set:function(t,e,i){var n=i&&ge(t);return O(t,e,i?H(t,s,i,ct.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,n),n):0)}}}),ct.opacity||(pt.cssHooks.opacity={get:function(t,e){return _e.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";((i.zoom=1)<=e||""===e)&&""===pt.trim(o.replace(be,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=be.test(o)?o.replace(be,s):o+" "+s)}}),pt.cssHooks.marginRight=E(ct.reliableMarginRight,function(t,e){if(e)return fe(t,{display:"inline-block"},ve,[t,"marginRight"])}),pt.cssHooks.marginLeft=E(ct.reliableMarginLeft,function(t,e){if(e)return(parseFloat(ve(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-fe(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(s,o){pt.cssHooks[s+o]={expand:function(t){for(var e=0,i={},n="string"==typeof t?t.split(" "):[t];e<4;e++)i[s+$t[e]+o]=n[e]||n[e-2]||n[0];return i}},de.test(s)||(pt.cssHooks[s+o].set=O)}),pt.fn.extend({css:function(t,e){return Rt(this,function(t,e,i){var n,s,o={},a=0;if(pt.isArray(e)){for(n=ge(t),s=e.length;a
    a",Me=Ee.getElementsByTagName("a")[0],Ae.setAttribute("type","checkbox"),Ee.appendChild(Ae),(Me=Ee.getElementsByTagName("a")[0]).style.cssText="top:1px",ct.getSetAttribute="t"!==Ee.className,ct.style=/top/.test(Me.getAttribute("style")),ct.hrefNormalized="/a"===Me.getAttribute("href"),ct.checkOn=!!Ae.value,ct.optSelected=Pe.selected,ct.enctype=!!nt.createElement("form").enctype,Ne.disabled=!0,ct.optDisabled=!Pe.disabled,(Ae=nt.createElement("input")).setAttribute("value",""),ct.input=""===Ae.getAttribute("value"),Ae.value="t",Ae.setAttribute("type","radio"),ct.radioValue="t"===Ae.value;var je=/\r/g,Fe=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(i){var n,t,s,e=this[0];return arguments.length?(s=pt.isFunction(i),this.each(function(t){var e;1===this.nodeType&&(null==(e=s?i.call(this,t,pt(this).val()):i)?e="":"number"==typeof e?e+="":pt.isArray(e)&&(e=pt.map(e,function(t){return null==t?"":t+""})),(n=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,e,"value")!==undefined||(this.value=e))})):e?(n=pt.valHooks[e.type]||pt.valHooks[e.nodeName.toLowerCase()])&&"get"in n&&(t=n.get(e,"value"))!==undefined?t:"string"==typeof(t=e.value)?t.replace(je,""):null==t?"":t:void 0}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Fe," ")}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||s<0,a=o?null:[],r=o?s+1:n.length,l=s<0?r:o?s:0;l").append(pt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){a.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(e){return pt.grep(pt.timers,function(t){return e===t.elem}).length},pt.offset={setOffset:function(t,e,i){var n,s,o,a,r,l,u=pt.css(t,"position"),h=pt(t),c={};"static"===u&&(t.style.position="relative"),r=h.offset(),o=pt.css(t,"top"),l=pt.css(t,"left"),("absolute"===u||"fixed"===u)&&-1'),r='';o===l||s===l||u.isCrossDomain(e)||(r+=''),n&&a.attr("target",n),a.hide().append(r).appendTo("body"),a.submit()},formElements:function(t,e){return t.is("form")?h(t[0].elements).filter(e):t.find(e)},disableFormElements:function(t){u.formElements(t,u.disableSelector).each(function(){u.disableFormElement(h(this))})},disableFormElement:function(t){var e,i;e=t.is("button")?"html":"val",(i=t.data("disable-with"))!==l&&(t.data("ujs:enable-with",t[e]()),t[e](i)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(t){u.formElements(t,u.enableSelector).each(function(){u.enableFormElement(h(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";t.data("ujs:enable-with")!==l&&(t[e](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,i=t.data("confirm"),n=!1;if(!i)return!0;if(u.fire(t,"confirm")){try{n=u.confirm(i)}catch(s){(console.error||console.log).call(console,s.stack||s)}e=u.fire(t,"confirm:complete",[n])}return n&&e},blankInputs:function(t,e,i){var n,s,o,a=h(),r=e||"input,textarea",l=t.find(r),u={};return l.each(function(){(n=h(this)).is("input[type=radio]")?(o=n.attr("name"),u[o]||(0===t.find('input[type=radio]:checked[name="'+o+'"]').length&&(s=t.find('input[type=radio][name="'+o+'"]'),a=a.add(s)),u[o]=o)):(n.is("input[type=checkbox],input[type=radio]")?n.is(":checked"):!!n.val())===i&&(a=a.add(n))}),!!a.length&&a},nonBlankInputs:function(t,e){return u.blankInputs(t,e,!0)},stopEverything:function(t){return h(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(t){var e=t.data("disable-with");e!==l&&(t.data("ujs:enable-with",t.html()),t.html(e)),t.bind("click.railsDisable",function(t){return u.stopEverything(t)}),t.data("ujs:disabled",!0)},enableElement:function(t){t.data("ujs:enable-with")!==l&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable"),t.removeData("ujs:disabled")}},u.fire(t,"rails:attachBindings")&&(h.ajaxPrefilter(function(t,e,i){t.crossDomain||u.CSRFProtection(i)}),h(window).on("pageshow.rails",function(){h(h.rails.enableSelector).each(function(){var t=h(this);t.data("ujs:disabled")&&h.rails.enableFormElement(t)}),h(h.rails.linkDisableSelector).each(function(){var t=h(this);t.data("ujs:disabled")&&h.rails.enableElement(t)})}),t.on("ajax:complete",u.linkDisableSelector,function(){u.enableElement(h(this))}),t.on("ajax:complete",u.buttonDisableSelector,function(){u.enableFormElement(h(this))}),t.on("click.rails",u.linkClickSelector,function(t){var e=h(this),i=e.data("method"),n=e.data("params"),s=t.metaKey||t.ctrlKey;if(!u.allowAction(e))return u.stopEverything(t);if(!s&&e.is(u.linkDisableSelector)&&u.disableElement(e),u.isRemote(e)){if(s&&(!i||"GET"===i)&&!n)return!0;var o=u.handleRemote(e);return!1===o?u.enableElement(e):o.fail(function(){u.enableElement(e)}),!1}return i?(u.handleMethod(e),!1):void 0}),t.on("click.rails",u.buttonClickSelector,function(t){var e=h(this);if(!u.allowAction(e)||!u.isRemote(e))return u.stopEverything(t);e.is(u.buttonDisableSelector)&&u.disableFormElement(e);var i=u.handleRemote(e);return!1===i?u.enableFormElement(e):i.fail(function(){u.enableFormElement(e)}),!1}),t.on("change.rails",u.inputChangeSelector,function(t){var e=h(this);return u.allowAction(e)&&u.isRemote(e)?(u.handleRemote(e),!1):u.stopEverything(t)}),t.on("submit.rails",u.formSubmitSelector,function(t){var e,i,n=h(this),s=u.isRemote(n);if(!u.allowAction(n))return u.stopEverything(t);if(n.attr("novalidate")===l)if(n.data("ujs:formnovalidate-button")===l){if((e=u.blankInputs(n,u.requiredInputSelector,!1))&&u.fire(n,"ajax:aborted:required",[e]))return u.stopEverything(t)}else n.data("ujs:formnovalidate-button",l);if(s){if(i=u.nonBlankInputs(n,u.fileInputSelector)){setTimeout(function(){u.disableFormElements(n)},13);var o=u.fire(n,"ajax:aborted:file",[i]);return o||setTimeout(function(){u.enableFormElements(n)},13),o}return u.handleRemote(n),!1}setTimeout(function(){u.disableFormElements(n)},13)}),t.on("click.rails",u.formInputClickSelector,function(t){var e=h(this);if(!u.allowAction(e))return u.stopEverything(t);var i=e.attr("name"),n=i?{name:i,value:e.val()}:null,s=e.closest("form");0===s.length&&(s=h("#"+e.attr("form"))),s.data("ujs:submit-button",n),s.data("ujs:formnovalidate-button",e.attr("formnovalidate")),s.data("ujs:submit-button-formaction",e.attr("formaction")),s.data("ujs:submit-button-formmethod",e.attr("formmethod"))}),t.on("ajax:send.rails",u.formSubmitSelector,function(t){this===t.target&&u.disableFormElements(h(this))}),t.on("ajax:complete.rails",u.formSubmitSelector,function(t){this===t.target&&u.enableFormElements(h(this))}),h(function(){u.refreshCSRFTokens()}))}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(n){return n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(e){return function(t){return!!n.data(t,e)}}):function(t,e,i){return!!n.data(t,i[3])}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.fn.extend({disableSelection:(e="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(e+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var e}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(l){function u(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}return l.ui.focusable=function(t,e){var i,n,s,o,a,r=t.nodeName.toLowerCase();return"area"===r?(n=(i=t.parentNode).name,!(!t.href||!n||"map"!==i.nodeName.toLowerCase())&&(0<(s=l("img[usemap='#"+n+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(r)?(o=!t.disabled)&&(a=l(t).closest("fieldset")[0])&&(o=!a.disabled):o="a"===r&&t.href||e,o&&l(t).is(":visible")&&u(l(t)))},l.extend(l.expr[":"],{focusable:function(t){return l.ui.focusable(t,null!=l.attr(t,"tabindex"))}}),l.ui.focusable}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.ui.escapeSelector=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")});var e}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version","./escape-selector"],t):t(jQuery)}(function(o){return o.fn.labels=function(){var t,e,i,n,s;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(i=this.attr("id"))&&(s=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+o.ui.escapeSelector(i)+"']",n=n.add(s.find(e).addBack(e))),this.pushStack(n))}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(r){"1.7"===r.fn.jquery.substring(0,3)&&(r.each(["Width","Height"],function(t,i){function n(t,e,i,n){return r.each(s,function(){e-=parseFloat(r.css(t,"padding"+this))||0,i&&(e-=parseFloat(r.css(t,"border"+this+"Width"))||0),n&&(e-=parseFloat(r.css(t,"margin"+this))||0)}),e}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:r.fn.innerWidth,innerHeight:r.fn.innerHeight,outerWidth:r.fn.outerWidth,outerHeight:r.fn.outerHeight};r.fn["inner"+i]=function(t){return t===undefined?a["inner"+i].call(this):this.each(function(){r(this).css(o,n(this,t)+"px")})},r.fn["outer"+i]=function(t,e){return"number"!=typeof t?a["outer"+i].call(this,t):this.each(function(){r(this).css(o,n(this,t,!0,e)+"px")})}}),r.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(o){return o.ui.plugin={add:function(t,e,i){var n,s=o.ui[t].prototype;for(n in i)s.plugins[n]=s.plugins[n]||[],s.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var s,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s")[0],y=h.each;i.style.cssText="background-color:rgba(1,1,1,.5)",v.rgba=-1o.mod/2?n+=o.mod:n-s>o.mod/2&&(n-=o.mod)),u[i]=d((s-n)*a+n,e)))}),this[e](u)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),n=f(t)._rgba;return f(h.map(e,function(t,e){return(1-i)*n[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=h.map(this._rgba,function(t,e){return null==t?2").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return i.wrap(t),(i[0]===s||d.contains(i[0],s))&&d(s).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(d.extend(n,{position:i.css("position"),zIndex:i.css("z-index")}),d.each(["top","left","bottom","right"],function(t,e){n[e]=i.css(e),isNaN(parseInt(n[e],10))&&(n[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(n).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===e||d.contains(t[0],e))&&d(e).trigger("focus")),t}}),d.extend(d.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),d.effects.effect[t]=i,d.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();1").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),"float":t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(r+"placeholder",e)),t.css({position:i,left:n.left,top:n.top}),e},removePlaceholder:function(t){var e=r+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){d.effects.restoreStyle(t),d.effects.removePlaceholder(t)},setTransition:function(n,t,s,o){return o=o||{},d.each(t,function(t,e){var i=n.cssUnit(e);0").appendTo("body").addClass(t.className).css({top:h.top-a,left:h.left-r,height:i.innerHeight(),width:i.innerWidth(),position:s?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),d.isFunction(e)&&e()})}}),d.fx.step.clip=function(t){t.clipInit||(t.start=d(t.elem).cssClip(),"string"==typeof t.end&&(t.end=e(t.end,t.elem)),t.clipInit=!0),d(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),i={},d.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){i[t]=function(t){return Math.pow(t,e+2)}}),d.extend(i,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),d.each(i,function(t,e){d.easing["easeIn"+t]=e,d.easing["easeOut"+t]=function(t){return 1-e(1-t)},d.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}}),d.effects}),function(t){"function"==typeof define&&define.amd?define(["jquery","./form","./version"],t):t(jQuery)}(function(i){return i.ui.formResetMixin={_formResetHandler:function(){var e=i(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");i.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(i.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(D){return function(){function x(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function k(t,e){return parseInt(D.css(t,e),10)||0}function e(t){var e=t[0];return 9===e.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:D.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var s,C=Math.max,T=Math.abs,n=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,l=/%$/,i=D.fn.position;D.position={scrollbarWidth:function(){if(s!==undefined)return s;var t,e,i=D("
    "),n=i.children()[0];return D("body").append(i),t=n.offsetWidth,i.css("overflow","scroll"),t===(e=n.offsetWidth)&&(e=i[0].clientWidth),i.remove(),s=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===e||"auto"===e&&t.widthC(T(n),T(s))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),a.offset(D.extend(u,{using:t}))})},D.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,r=s-a,l=a+e.collisionWidth-o-s;e.collisionWidth>o?0o?0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=h(e||this.defaultElement||this)[0],this.element=h(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=h(),this.hoverable=h(),this.focusable=h(),this.classesElementLookup={},e!==this&&(h.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=h(e.style?e.ownerDocument:e.document||e),this.window=h(this.document[0].defaultView||this.document[0].parentWindow)),this.options=h.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:h.noop,_create:h.noop,_init:h.noop,destroy:function(){var i=this;this._destroy(),h.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:h.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return h.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=h.widget.extend({},this.options[t]),s=0;s").css({position:"absolute",visibility:"visible",left:-o*m,top:-s*g}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,height:g,left:a+(p?l*m:0),top:r+(p?u*g:0),opacity:p?0:1}).animate({left:a+(p?0:l*m),top:r+(p?0:u*g),opacity:p?1:0},t.duration||500,t.easing,i)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(n){return n.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;n(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(g){return g.effects.define("fold","hide",function(e,t){var i=g(this),n=e.mode,s="show"===n,o="hide"===n,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],u=e.duration/2,h=g.effects.createPlaceholder(i),c=i.cssClip(),d={clip:g.extend({},c)},p={clip:g.extend({},c)},f=[c[l[0]],c[l[1]]],m=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,s&&(i.cssClip(p.clip),h&&h.css(g.effects.clipToBox(p)),p.clip=c),i.queue(function(t){h&&h.animate(g.effects.clipToBox(d),u,e.easing).animate(g.effects.clipToBox(p),u,e.easing),t()}).animate(d,u,e.easing).animate(p,u,e.easing).queue(t),g.effects.unshift(i,m,4)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(s){return s.effects.define("highlight","show",function(t,e){var i=s(this),n={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(n.opacity=0),s.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(n,{queue:!1,duration:t.duration,easing:t.easing,complete:e})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(y){return y.effects.define("size",function(s,e){var t,o,i,n=y(this),a=["fontSize"],r=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=s.mode,h="effect"!==u,c=s.scale||"both",d=s.origin||["middle","center"],p=n.css("position"),f=n.position(),m=y.effects.scaledDimensions(n),g=s.from||m,v=s.to||y.effects.scaledDimensions(n,0);y.effects.createPlaceholder(n),"show"===u&&(i=g,g=v,v=i),o={from:{y:g.height/m.height,x:g.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},"box"!==c&&"both"!==c||(o.from.y!==o.to.y&&(g=y.effects.setTransition(n,r,o.from.y,g),v=y.effects.setTransition(n,r,o.to.y,v)),o.from.x!==o.to.x&&(g=y.effects.setTransition(n,l,o.from.x,g),v=y.effects.setTransition(n,l,o.to.x,v))),"content"!==c&&"both"!==c||o.from.y!==o.to.y&&(g=y.effects.setTransition(n,a,o.from.y,g),v=y.effects.setTransition(n,a,o.to.y,v)),d&&(t=y.effects.getBaseline(d,m),g.top=(m.outerHeight-g.outerHeight)*t.y+f.top,g.left=(m.outerWidth-g.outerWidth)*t.x+f.left,v.top=(m.outerHeight-v.outerHeight)*t.y+f.top,v.left=(m.outerWidth-v.outerWidth)*t.x+f.left),n.css(g),"content"!==c&&"both"!==c||(r=r.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),n.find("*[width]").each(function(){var t=y(this),e=y.effects.scaledDimensions(t),i={height:e.height*o.from.y,width:e.width*o.from.x,outerHeight:e.outerHeight*o.from.y,outerWidth:e.outerWidth*o.from.x},n={height:e.height*o.to.y,width:e.width*o.to.x,outerHeight:e.height*o.to.y,outerWidth:e.width*o.to.x};o.from.y!==o.to.y&&(i=y.effects.setTransition(t,r,o.from.y,i),n=y.effects.setTransition(t,r,o.to.y,n)),o.from.x!==o.to.x&&(i=y.effects.setTransition(t,l,o.from.x,i),n=y.effects.setTransition(t,l,o.to.x,n)),h&&y.effects.saveStyle(t),t.css(i),t.animate(n,s.duration,s.easing,function(){h&&y.effects.restoreStyle(t)})})),n.animate(v,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=n.offset();0===v.opacity&&n.css("opacity",g.opacity),h||(n.css("position","static"===p?"relative":p).offset(t),y.effects.saveStyle(n)),e()}})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-size"],t):t(jQuery)}(function(a){return a.effects.define("scale",function(t,e){var i=a(this),n=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==n?0:100),o=a.extend(!0,{from:a.effects.scaledDimensions(i),to:a.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(o.from.opacity=1,o.to.opacity=0),a.effects.effect.size.call(this,o,e)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-scale"],t):t(jQuery)}(function(n){return n.effects.define("puff","hide",function(t,e){var i=n.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});n.effects.effect.scale.call(this,i,e)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(c){return c.effects.define("pulsate","show",function(t,e){var i=c(this),n=t.mode,s="show"===n,o=s||"hide"===n,a=2*(t.times||5)+(o?1:0),r=t.duration/a,l=0,u=1,h=i.queue().length;for(!s&&i.is(":visible")||(i.css("opacity",0).show(),l=1);u 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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=h(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():h()}},_createIcons:function(){var t,e,i=this.options.icons;i&&(t=h(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+i.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,i.header)._addClass(e,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=h.ui.keyCode,i=this.headers.length,n=this.headers.index(t.target),s=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:s=this.headers[(n+1)%i];break;case e.LEFT:case e.UP:s=this.headers[(n-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:s=this.headers[0];break;case e.END:s=this.headers[i-1]}s&&(h(t.target).attr("tabIndex",-1),h(s).attr("tabIndex",0),h(s).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===h.ui.keyCode.UP&&t.ctrlKey&&h(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=h()):!1===t.active?this._activate(0):this.active.length&&!h.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=h()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,n=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=h(this),e=t.uniqueId().attr("id"),i=t.next(),n=i.uniqueId().attr("id");t.attr("aria-controls",n),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=n.height(),this.element.siblings(":visible").each(function(){var t=h(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=h(this).outerHeight(!0)}),this.headers.next().each(function(){h(this).height(Math.max(0,i-h(this).innerHeight()+h(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=h(this).is(":visible");t||h(this).show(),i=Math.max(i,h(this).css("height","").height()),t||h(this).hide()}).height(i))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:h.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):h()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&h.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,i,n=this.options,s=this.active,o=h(t.currentTarget),a=o[0]===s[0],r=a&&n.collapsible,l=r?h():o.next(),u={oldHeader:s,oldPanel:s.next(),newHeader:r?h():o,newPanel:l};t.preventDefault(),a&&!n.collapsible||!1===this._trigger("beforeActivate",t,u)||(n.active=!r&&this.headers.index(o),this.active=a?h():o,this._toggle(u),this._removeClass(s,"ui-accordion-header-active","ui-state-active"),n.icons&&(e=s.children(".ui-accordion-header-icon"),this._removeClass(e,null,n.icons.activeHeader)._addClass(e,null,n.icons.header)),a||(this._removeClass(o,"ui-accordion-header-collapsed")._addClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.header)._addClass(i,null,n.icons.activeHeader)),this._addClass(o.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(h(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var n,s,o,a=this,r=0,l=t.css("box-sizing"),u=t.length&&(!i.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=r(t.target),i=r(r.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=r(t.target).closest(".ui-menu-item"),i=r(t.currentTarget);e[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(t){this._delay(function(){!r.contains(this.element[0],r.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=r(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,n,s,o=!0;switch(t.keyCode){case r.ui.keyCode.PAGE_UP:this.previousPage(t);break;case r.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case r.ui.keyCode.HOME:this._move("first","first",t);break;case r.ui.keyCode.END:this._move("last","last",t);break;case r.ui.keyCode.UP:this.previous(t);break;case r.ui.keyCode.DOWN:this.next(t);break;case r.ui.keyCode.LEFT:this.collapse(t);break;case r.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case r.ui.keyCode.ENTER:case r.ui.keyCode.SPACE:this._activate(t);break;case r.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,i=this.previousFilter||"",s=!1,n=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),n===i?s=!0:n=i+n,e=this._filterMenuItems(n),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(n=String.fromCharCode(t.keyCode),e=this._filterMenuItems(n)),e.length?(this.focus(t,e),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,i,n,s=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=r(this),e=t.prev(),i=r("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+o),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=r(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),n=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(n,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!r.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,n,s,o,a;this._hasScroll()&&(e=parseFloat(r.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(r.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-e-i,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=t.outerHeight(),n<0?this.activeMenu.scrollTop(s+n):o",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},requestIndex:0,pending:0,_create:function(){var i,n,s,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;this.isMultiLine=e||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))n=s=i=!0;else{n=s=i=!1;var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:n=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!n){var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(s)return s=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=a("