MCPcopy
hub / github.com/audreyt/ethercalc / m

Function m

static/ethercalc.js:15–15  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

13},t.SpreadsheetControl.prototype.InitializeSpreadsheetControl=function(e,o,i,n){return t.InitializeSpreadsheetControl(this,e,o,i,n)},t.SpreadsheetControl.prototype.DoOnResize=function(){return t.DoOnResize(this)},t.SpreadsheetControl.prototype.SizeSSDiv=function(){return t.SizeSSDiv(this)},t.SpreadsheetControl.prototype.ExecuteCommand=function(e,o){return t.SpreadsheetControlExecuteCommand(this,e,o)},t.SpreadsheetControl.prototype.CreateSheetHTML=function(){return t.SpreadsheetControlCreateSheetHTML(this)},t.SpreadsheetControl.prototype.CreateSpreadsheetSave=function(e){return t.SpreadsheetControlCreateSpreadsheetSave(this,e)},t.SpreadsheetControl.prototype.DecodeSpreadsheetSave=function(e){return t.SpreadsheetControlDecodeSpreadsheetSave(this,e)},t.SpreadsheetControl.prototype.CreateCellHTML=function(e){return t.SpreadsheetControlCreateCellHTML(this,e)},t.SpreadsheetControl.prototype.CreateCellHTMLSave=function(e){return t.SpreadsheetControlCreateCellHTMLSave(this,e)},t.SpreadsheetControl.prototype.ParseSheetSave=function(e){return this.sheet.ParseSheetSave(e)},t.SpreadsheetControl.prototype.CreateSheetSave=function(){return this.sheet.CreateSheetSave()},t.InitializeSpreadsheetControl=function(e,o,i,n,r){var a,s,l,c,u,d,h,p,f=t.Constants,m=t.LocalizeString,g=t.LocalizeSubstrings,v=e.tabs,b=e.views;for(e.requestedHeight=i,e.requestedWidth=n,e.requestedSpaceBelow=r,"string"==typeof o&&(o=document.getElementById(o)),null==o&&alert("SocialCalc.SpreadsheetControl not given parent node."),e.parentNode=o,e.spreadsheetDiv=document.createElement("div"),e.SizeSSDiv(),s=o.firstChild;null!=s;s=o.firstChild)o.removeChild(s);for(a="<div>",a+='<div style="'+e.tabbackground+'"><table cellpadding="0" cellspacing="0"><tr>',l=0;l<v.length;l++)a+=' <td id="%id.'+v[l].name+'tab" style="'+(0==l?e.tabselectedCSS:e.tabplainCSS)+'" onclick="%s.SetTab(this);">'+m(v[l].text)+"</td>";for(a+=" </tr></table></div>",a+='<div style="'+e.toolbarbackground+'padding:12px 10px 10px 4px;">',l=0;l<v.length;l++)a+=v[l].html;a+="</div>",a+="</div>",e.currentTab=0;for(d in e.tabreplacements)a=a.replace(e.tabreplacements[d].regex,e.tabreplacements[d].replacement);a=a.replace(/\%s\./g,"SocialCalc."),a=a.replace(/\%id\./g,e.idPrefix),a=a.replace(/\%tbt\./g,e.toolbartext),a=a.replace(/\%img\./g,e.imagePrefix),a=g(a),e.spreadsheetDiv.innerHTML=a,o.appendChild(e.spreadsheetDiv),e.Buttons={button_undo:{tooltip:"Undo",command:"undo"},button_redo:{tooltip:"Redo",command:"redo"},button_copy:{tooltip:"Copy",command:"copy"},button_cut:{tooltip:"Cut",command:"cut"},button_paste:{tooltip:"Paste",command:"paste"},button_pasteformats:{tooltip:"Paste Formats",command:"pasteformats"},button_lock:{tooltip:"Lock Cell",command:"lock"},button_unlock:{tooltip:"Unlock Cell",command:"unlock"},button_delete:{tooltip:"Delete Cell Contents",command:"delete"},button_filldown:{tooltip:"Fill Down",command:"filldown"},button_fillright:{tooltip:"Fill Right",command:"fillright"},button_movefrom:{tooltip:"Set/Clear Move From",command:"movefrom"},button_movepaste:{tooltip:"Move Paste",command:"movepaste"},button_moveinsert:{tooltip:"Move Insert",command:"moveinsert"},button_alignleft:{tooltip:"Align Left",command:"align-left"},button_aligncenter:{tooltip:"Align Center",command:"align-center"},button_alignright:{tooltip:"Align Right",command:"align-right"},button_borderon:{tooltip:"Borders On",command:"borderon"},button_borderoff:{tooltip:"Borders Off",command:"borderoff"},button_swapcolors:{tooltip:"Swap Colors",command:"swapcolors"},button_merge:{tooltip:"Merge/Unmerge Cells",command:"merge"},button_insertrow:{tooltip:"Insert Row Before",command:"insertrow"},button_insertcol:{tooltip:"Insert Column Before",command:"insertcol"},button_deleterow:{tooltip:"Delete Row",command:"deleterow"},button_deletecol:{tooltip:"Delete Column",command:"deletecol"},button_hiderow:{tooltip:"Hide Row",command:"hiderow"},button_hidecol:{tooltip:"Hide Column",command:"hidecol"},button_recalc:{tooltip:"Recalculate",command:"recalc"}};for(h in e.Buttons)p=document.getElementById(e.idPrefix+h),p?(p.style.border="1px solid "+f.ISCButtonBorderNormal,p.title=m(e.Buttons[h].tooltip),t.ButtonRegister(e.editor,p,{normalstyle:"border:1px solid "+f.ISCButtonBorderNormal+";background-color:"+f.ISCButtonNormalBackground+";",hoverstyle:"border:1px solid "+f.ISCButtonBorderHover+";background-color:"+f.ISCButtonHoverBackground+";",downstyle:"border:1px solid "+f.ISCButtonBorderDown+";background-color:"+f.ISCButtonDownBackground+";"},{MouseDown:t.DoButtonCmd,command:e.Buttons[h].command})):alert("Button "+(e.idPrefix+h)+" missing");e.formulabarDiv=document.createElement("div"),e.formulabarDiv.innerHTML='<input type="text" size="60" value="">&nbsp;',e.spreadsheetDiv.appendChild(e.formulabarDiv);new t.InputBox(e.formulabarDiv.firstChild,e.editor);for(h in e.formulabuttons)p=document.createElement("img"),p.id=e.idPrefix+h,p.src=(e.formulabuttons[h].skipImagePrefix?"":e.imagePrefix)+e.formulabuttons[h].image,p.style.verticalAlign="middle",p.style.border="1px solid #FFF",p.style.marginLeft="4px",p.title=m(e.formulabuttons[h].tooltip),t.ButtonRegister(e.editor,p,{normalstyle:"border:1px solid #FFF;backgroundColor:#FFF;",hoverstyle:"border:1px solid #CCC;backgroundColor:#FFF;",downstyle:"border:1px solid #000;backgroundColor:#FFF;"},{MouseDown:e.formulabuttons[h].command,Disabled:function(){return e.editor.ECellReadonly()}}),e.formulabarDiv.appendChild(p);var y=$("<input id='searchbarinput' value='' placeholder='Search sheet…'>"),C=$("<span id='searchbar'></span>");C.append("<div id='searchstatus'></div>"),C.append(y);for(h in e.findbuttons)p=document.createElement("img"),p.id=e.idPrefix+h,p.src=e.imagePrefix+e.findbuttons[h].image,p.style.verticalAlign="middle",p.style.border="1px solid #FFF",p.title=m(e.findbuttons[h].tooltip),t.ButtonRegister(e.editor,p,{normalstyle:"border:1px solid #FFF;backgroundColor:#FFF;",hoverstyle:"border:1px solid #CCC;backgroundColor:#FFF;",downstyle:"border:1px solid #000;backgroundColor:#FFF;"},{MouseDown:e.findbuttons[h].command,Disabled:function(){return!1}}),C[0].appendChild(p);for(y.on("input",t.SpreadsheetControl.FindInSheet),y.on("focus",function(){t.Keyboard.passThru=!0}),y.on("blur",function(){t.Keyboard.passThru=!1}),y.keyup(function(e){13==e.keyCode&&(e.shiftKey?t.SpreadsheetControl.SearchUp():t.SpreadsheetControl.SearchDown())}),e.formulabarDiv.appendChild(C[0]),l=0;l<v.length;l++)v[l].oncreate&&v[l].oncreate(e,v[l].name);t.CalculateSheetNonViewHeight(e),e.viewheight=e.height-e.nonviewheight,e.editorDiv=e.editor.CreateTableEditor(e.width,e.viewheight);var w=document.createElement("div");w.id="te_appView",w.appendChild(e.editorDiv),e.editorDiv=w;var x=document.createElement("div");x.id="te_formData",x.style.display="none",e.editorDiv.appendChild(x),e.spreadsheetDiv.appendChild(e.editorDiv),e.formDataViewer=new t.SpreadsheetViewer("te_FormData-"),e.formDataViewer.InitializeSpreadsheetViewer(x.id,180,0,200),e.formDataViewer.editor.ignoreRender=!0;for(c in b){a=b[c].html;for(d in b[c].replacements)a=a.replace(b[c].replacements[d].regex,b[c].replacements[d].replacement);a=a.replace(/\%s\./g,"SocialCalc."),a=a.replace(/\%id\./g,e.idPrefix),a=a.replace(/\%tbt\./g,e.toolbartext),a=a.replace(/\%img\./g,e.imagePrefix),u=document.createElement("div"),t.setStyles(u,b[c].divStyle),u.style.display="none",u.style.width=e.width+"px",u.style.height=e.viewheight+"px",u.id=e.idPrefix+b[c].name+"view",a=g(a),u.innerHTML=a,e.spreadsheetDiv.appendChild(u),b[c].element=u,b[c].oncreate&&b[c].oncreate(e,b[c])}if(b.sheet={name:"sheet",element:e.editorDiv},e.statuslineDiv=document.createElement("div"),e.statuslineDiv.style.cssText=e.statuslineCSS,e.statuslineDiv.style.height=e.statuslineheight-(e.statuslineDiv.style.paddingTop.slice(0,-2)-0)-(e.statuslineDiv.style.paddingBottom.slice(0,-2)-0)+"px",e.statuslineDiv.id=e.idPrefix+"statusline",e.spreadsheetDiv.appendChild(e.statuslineDiv),e.spreadsheetDiv.addEventListener)e.spreadsheetDiv.addEventListener("mousedown",function(){t.SetSpreadsheetControlObject(e)},!1),e.spreadsheetDiv.addEventListener("mouseover",function(){t.SetSpreadsheetControlObject(e)},!1);else{if(!e.spreadsheetDiv.attachEvent)throw t.Constants.s_BrowserNotSupported;e.spreadsheetDiv.attachEvent("onmousedown",function(){t.SetSpreadsheetControlObject(e)}),e.spreadsheetDiv.attachEvent("onmouseover",function(){t.SetSpreadsheetControlObject(e)})}},t.CalculateSheetNonViewHeight=function(e){e.nonviewheight=e.statuslineheight;for(var t=0;t<e.spreadsheetDiv.childNodes.length;t++)"SocialCalc-statusline"!=e.spreadsheetDiv.childNodes[t].id&&(e.nonviewheight+=e.spreadsheetDiv.childNodes[t].offsetHeight)},t.LocalizeString=function(e){var o=t.LocalizeStringList[e];return o||(o=t.Constants["s_loc_"+e.toLowerCase().replace(/\s/g,"_").replace(/\W/g,"X")]||e,t.LocalizeStringList[e]=o),o},t.LocalizeStringList={},t.LocalizeSubstrings=function(e){var o=t.LocalizeString;return e.replace(/%(loc|ssc)!(.*?)!/g,function(e,i,n){return"ssc"==i?t.Constants[n]||alert("Missing constant: "+n):o(n)})},t.GetSpreadsheetControlObject=function(){var e=null!=t.CurrentSpreadsheetControlObject?t.CurrentSpreadsheetControlObject:t.CurrentSpreadsheetViewerObject;return e?e:void 0},t.SetSpreadsheetControlObject=function(e){t.CurrentSpreadsheetControlObject=e,t.Keyboard.focusTable&&e&&(t.Keyboard.focusTable=e.editor)},t.DoOnResize=function(e){var t,o=e.views,i=e.SizeSSDiv();if(i){for(vname in o)t=o[vname].element,t.style.width=e.width+"px",t.style.height=e.height-e.nonviewheight+"px";e.editor.ResizeTableEditor(e.width,e.height-e.nonviewheight)}},t.SizeSSDiv=function(e){var o,i,n,r,a,s=10,l=10;return n=!1,o=t.GetViewportInfo(),i=t.GetElementPosition(e.parentNode),i.bottom=0,i.right=0,r=e.parentNode.style,r.marginTop&&(i.top+=r.marginTop.slice(0,-2)-0),r.marginBottom&&(i.bottom+=r.marginBottom.slice(0,-2)-0),r.marginLeft&&(i.left+=r.marginLeft.slice(0,-2)-0),r.marginRight&&(i.right+=r.marginRight.slice(0,-2)-0),a=e.requestedHeight||o.height-(i.top+i.bottom+l)-(e.requestedSpaceBelow||0),e.height!=a&&(e.height=a,e.spreadsheetDiv.style.height=a+"px",n=!0),a=e.requestedWidth||o.width-(i.left+i.right+s)||700,e.width!=a&&(e.width=a,e.spreadsheetDiv.style.width=a+"px",n=!0),e.spreadsheetDiv.style.position="relative",n},t.SetTab=function(e){var o,i,n,r,a,s,l,c={},u={},d=t.GetSpreadsheetControlObject(),h=d.tabs,p=d.views;if(o="string"==typeof e?e:e.id.slice(d.idPrefix.length,-3),d.editor.busy&&(!h[d.currentTab].view||"sheet"==h[d.currentTab].view))for(a=0;a<h.length;a++)if(h[a].name==o&&h[a].view&&"sheet"!=h[a].view)return;for(d.tabs[d.currentTab].onunclick&&d.tabs[d.currentTab].onunclick(d,d.tabs[d.currentTab].name),a=0;a<h.length;a++)i=h[a].name,c[i]=document.getElementById(d.idPrefix+i+"tab"),u[i]=document.getElementById(d.idPrefix+i+"tools"),i==o?(n=a,u[i].style.display="block",c[i].style.cssText=d.tabselectedCSS):(u[i].style.display="none",c[i].style.cssText=d.tabplainCSS);d.currentTab=n,h[n].onclick&&h[n].onclick(d,o);for(s in p)!h[n].view&&"sheet"==s||h[n].view==s?(p[s].element.style.display="block",r=s):p[s].element.style.display="none";h[n].onclickFocus?(l=h[n].onclickFocus,"string"==typeof l&&(l=document.getElementById(d.idPrefix+l),l.focus()),t.CmdGotFocus(l)):t.KeyboardFocus(),p[r].needsresize&&p[r].onresize&&(p[r].needsresize=!1,p[r].onresize(d,p[r])),"sheet"==r?(d.statuslineDiv.style.display="block",d.editor.ScheduleRender()):d.statuslineDiv.style.display="none"},t.SpreadsheetControlStatuslineCallback=function(e,t,o,i){var n,r,a=document.getElementById(i.statuslineid);switch(a&&(a.innerHTML=e.GetStatuslineString(t,o,i)),t){case"cmdendnorender":case"calcfinished":case"doneposcalc":if(n=document.getElementById(i.recalcid1),r=document.getElementById(i.recalcid2),!n||!r)break;"yes"==e.context.sheetobj.attribs.needsrecalc?(n.style.display="inline",r.style.display="inline"):(n.style.display="none",r.style.display="none")}},t.UpdateSortRangeProposal=function(e){var o=document.getElementById(t.GetSpreadsheetControlObject().idPrefix+"sortlist");o.options[0].text=e.range.hasrange?t.crToCoord(e.range.left,e.range.top)+":"+t.crToCoord(e.range.right,e.range.bottom):t.LocalizeString("[select range]")},t.LoadColumnChoosers=function(e){var o,i,n,r,a,s,l,c=t.LocalizeString;e.sortrange&&-1==e.sortrange.indexOf(":")?(i=t.Formula.LookupName(e.sheet,e.sortrange||""),"range"==i.type?(n=i.value.match(/^(.*)\|(.*)\|$/),o=n[1]+":"+n[2]):o="A1:A1"):o=e.sortrange;var u=t.ParseRange(o);s=document.getElementById(e.idPrefix+"majorsort"),l=s.selectedIndex,s.options.length=0,s.options[s.options.length]=new Option(c("[None]"),"");for(var r=u.cr1.col;r<=u.cr2.col;r++)a=t.rcColname(r),s.options[s.options.length]=new Option(c("Column ")+a,a);s.selectedIndex=l>1&&l<=u.cr2.col-u.cr1.col+1?l:1,s=document.getElementById(e.idPrefix+"minorsort"),l=s.selectedIndex,s.options.length=0,s.options[s.options.length]=new Option(c("[None]"),"");for(var r=u.cr1.col;r<=u.cr2.col;r++)a=t.rcColname(r),s.options[s.options.length]=new Option(a,a);s.selectedIndex=l>0&&l<=u.cr2.col-u.cr1.col+1?l:0,s=document.getElementById(e.idPrefix+"lastsort"),l=s.selectedIndex,s.options.length=0,s.options[s.options.length]=new Option(c("[None]"),"");for(var r=u.cr1.col;r<=u.cr2.col;r++)a=t.rcColname(r),s.options[s.options.length]=new Option(a,a);s.selectedIndex=l>0&&l<=u.cr2.col-u.cr1.col+1?l:0},t.CmdGotFocus=function(e){t.Keyboard.passThru=e},t.DoButtonCmd=function(e,o,i){t.DoCmd(i.element,i.functionobj.command)},t.DoCmd=function(e,o){var i,n,r,a,s,l,c,u,d,h,p,f,m,g,v,b,y,C,w,x,_,S=t.GetSpreadsheetControlObject(),k=S.editor;switch(o){case"undo":S.ExecuteCommand("undo","");break;case"redo":S.ExecuteCommand("redo","");break;case"fill-rowcolstuff":case"fill-text":for(r=o.substring(5),s=document.getElementById(S.idPrefix+r+"list"),s.length=0,a=0;a<t.SpreadsheetCmdTable[r].length;a++)s.options[a]=new Option(t.SpreadsheetCmdTable[r][a].t);o="changed-"+r;case"changed-rowcolstuff":case"changed-text":for(r=o.substring(8),s=document.getElementById(S.idPrefix+r+"list"),l=t.SpreadsheetCmdTable.slists[t.SpreadsheetCmdTable[r][s.selectedIndex].s],c=document.getElementById(S.idPrefix+r+"slist"),c.length=0,a=0;a<(l.length||0);a++)c.options[a]=new Option(l[a].t,l[a].s);return;case"ok-rowcolstuff":case"ok-text":r=o.substring(3),s=document.getElementById(S.idPrefix+r+"list"),c=document.getElementById(S.idPrefix+r+"slist"),i=t.SpreadsheetCmdTable[r][s.selectedIndex].c,n=c[c.selectedIndex].value,t.SpreadsheetControlExecuteCommand(e,i,n);break;case"ok-setsort":if(p=document.getElementById(S.idPrefix+"sortlist"),0==p.selectedIndex)S.sortrange=k.range.hasrange?t.crToCoord(k.range.left,k.range.top)+":"+t.crToCoord(k.range.right,k.range.bottom):k.ecell.coord+":"+k.ecell.coord;else{var T=p.options[p.selectedIndex].value;if("all"==T){var F=S.sheet.cells,E=-1,D=-1,P=-1,A=-1;for(var I in F){var M=t.coordToCr(I);(-1==P||M.row<P)&&(P=M.row),(-1==E||M.col<E)&&(E=M.col),(-1==A||M.row>A)&&(A=M.row),(-1==D||M.col>D)&&(D=M.col)}S.sortrange=t.crToCoord(E,P)+":"+t.crToCoord(D,A),p.options[p.selectedIndex].text+=" ("+S.sortrange+")"}else S.sortrange=p.options[p.selectedIndex].value}return f=document.getElementById(S.idPrefix+"sortbutton"),f.value=t.LocalizeString("Sort ")+S.sortrange,f.style.visibility="visible",t.LoadColumnChoosers(S),e&&e.blur&&e.blur(),void t.KeyboardFocus();case"dosort":if(S.sortrange&&-1==S.sortrange.indexOf(":")){if(g=t.Formula.LookupName(S.sheet,S.sortrange||""),"range"!=g.type)return;v=g.value.match(/^(.*)\|(.*)\|$/),m=v[1]+":"+v[2]}else m=S.sortrange;if("A1:A1"==m)return;u="sort "+m+" ",d=document.getElementById(S.idPrefix+"majorsort"),h=document.getElementById(S.idPrefix+"majorsortup"),u+=d.options[d.selectedIndex].value+(h.checked?" up":" down"),d=document.getElementById(S.idPrefix+"minorsort"),d.selectedIndex>0&&(h=document.getElementById(S.idPrefix+"minorsortup"),u+=" "+d.options[d.selectedIndex].value+(h.checked?" up":" down")),d=document.getElementById(S.idPrefix+"lastsort"),d.selectedIndex>0&&(h=document.getElementById(S.idPrefix+"lastsortup"),u+=" "+d.options[d.selectedIndex].value+(h.checked?" up":" down")),S.ExecuteCommand(u,"");break;case"merge":i=t.SpreadsheetCmdLookup[o]||"",n=t.SpreadsheetCmdSLookup[o]||"",S.ExecuteCommand(i,n),k.range.hasrange&&(k.MoveECell(t.crToCoord(k.range.left,k.range.top)),k.RangeRemove());break;case"movefrom":k.range2.hasrange?(S.context.cursorsuffix="",k.Range2Remove(),S.ExecuteCommand("redisplay","")):k.range.hasrange?(k.range2.top=k.range.top,k.range2.right=k.range.right,k.range2.bottom=k.range.bottom,k.range2.left=k.range.left,k.range2.hasrange=!0,k.MoveECell(t.crToCoord(k.range.left,k.range.top))):(k.range2.top=k.ecell.row,k.range2.right=k.ecell.col,k.range2.bottom=k.ecell.row,k.range2.left=k.ecell.col,k.range2.hasrange=!0),u=k.range2.hasrange?"":"off",f=document.getElementById(S.idPrefix+"button_movefrom"),f.src=S.imagePrefix+"movefrom"+u+".gif",f=document.getElementById(S.idPrefix+"button_movepaste"),f.src=S.imagePrefix+"movepaste"+u+".gif",f=document.getElementById(S.idPrefix+"button_moveinsert"),f.src=S.imagePrefix+"moveinsert"+u+".gif",k.range2.hasrange&&k.RangeRemove();break;case"movepaste":case"moveinsert":k.range2.hasrange&&(S.context.cursorsuffix="",i=o+" "+t.crToCoord(k.range2.left,k.range2.top)+":"+t.crToCoord(k.range2.right,k.range2.bottom)+" "+k.ecell.coord,S.ExecuteCommand(i,""),k.Range2Remove(),f=document.getElementById(S.idPrefix+"button_movefrom"),f.src=S.imagePrefix+"movefromoff.gif",f=document.getElementById(S.idPrefix+"button_movepaste"),f.src=S.imagePrefix+"movepasteoff.gif",f=document.getElementById(S.idPrefix+"button_moveinsert"),f.src=S.imagePrefix+"moveinsertoff.gif");break;case"swapcolors":b=S.sheet,y=b.GetAssuredCell(k.ecell.coord),x=b.attribs.defaultcolor?b.colors[b.attribs.defaultcolor]:"rgb(0,0,0)",_=b.attribs.defaultbgcolor?b.colors[b.attribs.defaultbgcolor]:"rgb(255,255,255)",C=y.color?b.colors[y.color]:x,C==_&&(C=""),w=y.bgcolor?b.colors[y.bgcolor]:_,w==x&&(w=""),S.ExecuteCommand("set %C color "+w+"%Nset %C bgcolor "+C,"");break;default:i=t.SpreadsheetCmdLookup[o]||"",n=t.SpreadsheetCmdSLookup[o]||"",S.ExecuteCommand(i,n)}e&&e.blur&&e.blur(),t.KeyboardFocus()},t.SpreadsheetCmdLookup={copy:"copy %C all",cut:"cut %C all",paste:"paste %C all",pasteformats:"paste %C formats",lock:"set %C readonly yes",unlock:"set %C readonly no","delete":"erase %C formulas",filldown:"filldown %C all",fillright:"fillright %C all",erase:"erase %C all",borderon:"set %C bt %S%Nset %C br %S%Nset %C bb %S%Nset %C bl %S",borderoff:"set %C bt %S%Nset %C br %S%Nset %C bb %S%Nset %C bl %S",merge:"merge %C",unmerge:"unmerge %C","align-left":"set %C cellformat left","align-center":"set %C cellformat center","align-right":"set %C cellformat right","align-default":"set %C cellformat",insertrow:"insertrow %C",insertcol:"insertcol %C",deleterow:"deleterow %C",deletecol:"deletecol %C",hiderow:"set %H hide yes",hidecol:"set %W hide yes",undo:"undo",redo:"redo",recalc:"recalc"},t.SpreadsheetCmdSLookup={borderon:"1px solid rgb(0,0,0)",borderoff:""},t.SpreadsheetControlExecuteCommand=function(e,o,i){var n=t.GetSpreadsheetControlObject(),r=n.editor,a={};a.P="%",a.N="\n",r.range.hasrange?(a.R=t.crToCoord(r.range.left,r.range.top)+":"+t.crToCoord(r.range.right,r.range.bottom),a.C=a.R,a.W=t.rcColname(r.range.left)+":"+t.rcColname(r.range.right),a.H=r.range.top+":"+r.range.bottom):r.ecell?(a.C=r.ecell.coord,a.R=r.ecell.coord+":"+r.ecell.coord,a.W=t.rcColname(t.coordToCr(r.ecell.coord).col),a.H=t.coordToCr(r.ecell.coord).row):(a.C="A1",a.R="A1:A1",a.W=t.rcColname(t.coordToCr("A1").col),a.H=t.coordToCr("A1").row),a.S=i,o=o.replace(/%C/g,a.C),o=o.replace(/%R/g,a.R),o=o.replace(/%N/g,a.N),o=o.replace(/%S/g,a.S),o=o.replace(/%W/g,a.W),o=o.replace(/%H/g,a.H),o=o.replace(/%P/g,a.P),r.EditorScheduleSheetCommands(o,!0,!1)},t.SpreadsheetControlCreateSheetHTML=function(e){var o,i,n,r="";return o=new t.RenderContext(e.sheet),i=document.createElement("div"),n=o.RenderSheet(null,{type:"html"}),i.appendChild(n),delete o,r=i.innerHTML,delete n,delete i,r},t.SpreadsheetControlCreateCellHTML=function(e,o,i){var n="",r=e.sheet.cells[o];return r?(n=void 0==r.displaystring?t.FormatValueForDisplay(e.sheet,r.datavalue,o,i||e.context.defaultHTMLlinkstyle):r.displaystring,"&nbsp;"==n&&(n=""),n):""},t.SpreadsheetControlCreateCellHTMLSave=function(e,o,i){var n,r,a,s,l,c,u,d,h=[];for(d=o?t.ParseRange(o):{cr1:{row:1,col:1},cr2:{row:e.sheet.attribs.lastrow,col:e.sheet.attribs.lastcol}},n=d.cr1,r=d.cr2,h.push("version:1.0"),a=n.row;a<=r.row;a++)for(s=n.col;s<=r.col;s++)l=t.crToCoord(s,a),c=e.sheet.cells[l],c&&(u=void 0==c.displaystring?t.FormatValueForDisplay(e.sheet,c.datavalue,l,i||e.context.defaultHTMLlinkstyle):c.displaystring,"&nbsp;"!=u&&h.push(l+":"+t.encodeForSave(u)));return h.push(""),h.join("\n")},t.SpreadsheetControl.DoFunctionList=function(){var e,o,i,n=t.Formula,r=t.Constants,a=r.function_classlist,s=t.GetSpreadsheetControlObject(),l=s.idPrefix+"function";if(i=document.getElementById(l+"dialog"),!i){for(n.FillFunctionInfo(),o='<table><tr><td><span style="font-size:x-small;font-weight:bold">%loc!Category!</span><br><select id="'+l+'class" size="'+a.length+'" style="width:120px;" onchange="SocialCalc.SpreadsheetControl.FunctionClassChosen(this.options[this.selectedIndex].value);">',e=0;e<a.length;e++)o+='<option value="'+a[e]+'"'+(0==e?" selected>":">")+t.special_chars(n.FunctionClasses[a[e]].name)+"</option>";o+='</select></td><td>&nbsp;&nbsp;</td><td id="'+l+'list"><span style="font-size:x-small;font-weight:bold">%loc!Functions!</span><br><select id="'+l+'name" size="'+a.length+'" style="width:240px;" onchange="SocialCalc.SpreadsheetControl.FunctionChosen(this.options[this.selectedIndex].value);" ondblclick="SocialCalc.SpreadsheetControl.DoFunctionPaste();">',o+=t.SpreadsheetControl.GetFunctionNamesStr("all"),o+='</td></tr><tr><td colspan="3"><div id="'+l+'desc" style="width:380px;height:80px;overflow:auto;font-size:x-small;">'+t.SpreadsheetControl.GetFunctionInfoStr(n.FunctionClasses[a[0]].items[0])+'</div><div style="width:380px;text-align:right;padding-top:6px;font-size:small;"><input type="button" value="%loc!Paste!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.DoFunctionPaste();">&nbsp;<input type="button" value="%loc!Cancel!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.HideFunctions();"></div></td></tr></table>';var c=document.createElement("div");c.id=l+"dialog",c.style.position="absolute";var u=t.GetViewportInfo(),d=t.GetElementPositionWithScroll(s.spreadsheetDiv);c.style.top=u.height/3-d.top+"px",c.style.left=u.width/3-d.left+"px",c.style.zIndex=100,c.style.backgroundColor="#FFF",c.style.border="1px solid black",c.style.width="400px",o='<table cellspacing="0" cellpadding="0" style="border-bottom:1px solid black;"><tr><td style="font-size:10px;cursor:default;width:100%;background-color:#999;color:#FFF;">&nbsp;%loc!Function List!</td><td style="font-size:10px;cursor:default;color:#666;" onclick="SocialCalc.SpreadsheetControl.HideFunctions();">&nbsp;X&nbsp;</td></tr></table><div style="background-color:#DDD;">'+o+"</div>",o=t.LocalizeSubstrings(o),c.innerHTML=o,t.DragRegister(c.firstChild.firstChild.firstChild.firstChild,!0,!0,{MouseDown:t.DragFunctionStart,MouseMove:t.DragFunctionPosition,MouseUp:t.DragFunctionPosition,Disabled:null,positionobj:c},s.spreadsheetDiv),s.spreadsheetDiv.appendChild(c),i=document.getElementById(l+"name"),i.focus(),t.CmdGotFocus(i)}},t.SpreadsheetControl.GetFunctionNamesStr=function(e){var o,i,n=t.Formula,r="";for(i=n.FunctionClasses[e],o=0;o<i.items.length;o++)r+='<option value="'+i.items[o]+'"'+(0==o?" selected>":">")+i.items[o]+"</option>";return r},t.SpreadsheetControl.FillFunctionNames=function(e,o){var i,n,r=t.Formula;for(o.length=0,n=r.FunctionClasses[e],i=0;i<n.items.length;i++)o.options[i]=new Option(n.items[i],n.items[i]),0==i&&(o.options[i].selected=!0)},t.SpreadsheetControl.GetFunctionInfoStr=function(e){var o=t.Formula,i=o.FunctionList[e],n=t.special_chars,r="<b>"+e+"("+n(o.FunctionArgString(e))+")</b><br>";return r+=n(i[3])},t.SpreadsheetControl.FunctionClassChosen=function(e){var o=t.GetSpreadsheetControlObject(),i=o.idPrefix+"function",n=t.Formula;t.SpreadsheetControl.FillFunctionNames(e,document.getElementById(i+"name")),t.SpreadsheetControl.FunctionChosen(n.FunctionClasses[e].items[0])},t.SpreadsheetControl.FunctionChosen=function(e){var o=t.GetSpreadsheetControlObject(),i=o.idPrefix+"function";document.getElementById(i+"desc").innerHTML=t.SpreadsheetControl.GetFunctionInfoStr(e)},t.SpreadsheetControl.HideFunctions=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"functiondialog");o.innerHTML="",t.DragUnregister(o),t.KeyboardFocus(),o.parentNode&&o.parentNode.removeChild(o)},t.SpreadsheetControl.DoFunctionPaste=function(){var e=t.GetSpreadsheetControlObject(),o=e.editor,i=document.getElementById(e.idPrefix+"functionname"),n=document.getElementById(e.idPrefix+"multilinetextarea"),r=i.value+"(";t.SpreadsheetControl.HideFunctions(),n?(n.value+=r,n.focus(),t.CmdGotFocus(n)):o.EditorAddToInput(r,"=")},t.SpreadsheetControl.DoMultiline=function(){var e,o,i,n=t.LocalizeSubstrings,r=(t.Constants,t.GetSpreadsheetControlObject()),a=r.editor,s=a.workingvalues,r=t.GetSpreadsheetControlObject(),l=r.idPrefix+"multiline";if(o=document.getElementById(l+"dialog"),!o){switch(a.state){case"start":s.ecoord=a.ecell.coord,s.erow=a.ecell.row,s.ecol=a.ecell.col,a.RangeRemove(),i=t.GetCellContents(a.context.sheetobj,s.ecoord);break;case"input":case"inputboxdirect":i=a.inputBox.GetText()}a.inputBox.element.disabled=!0,i=t.special_chars(i),e='<textarea id="'+l+'textarea" style="width:380px;height:120px;margin:10px 0px 0px 6px;">'+i+'</textarea><div style="width:380px;text-align:right;padding:6px 0px 4px 6px;font-size:small;">'+n('<input type="button" value="%loc!Set Cell Contents!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.DoMultilinePaste();">&nbsp;<input type="button" value="%loc!Clear!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.DoMultilineClear();">&nbsp;<input type="button" value="%loc!Cancel!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.HideMultiline();"></div></div>');var c=document.createElement("div");c.id=l+"dialog",c.style.position="absolute";var u=t.GetViewportInfo(),d=t.GetElementPositionWithScroll(r.spreadsheetDiv);c.style.top=u.height/3-d.top+"px",c.style.left=u.width/3-d.left+"px",c.style.zIndex=100,c.style.backgroundColor="#FFF",c.style.border="1px solid black",c.style.width="400px",c.innerHTML='<table cellspacing="0" cellpadding="0" style="border-bottom:1px solid black;"><tr><td style="font-size:10px;cursor:default;width:100%;background-color:#999;color:#FFF;">'+n("&nbsp;%loc!Multi-line Input Box!")+'</td><td style="font-size:10px;cursor:default;color:#666;" onclick="SocialCalc.SpreadsheetControl.HideMultiline();">&nbsp;X&nbsp;</td></tr></table><div style="background-color:#DDD;">'+e+"</div>",t.DragRegister(c.firstChild.firstChild.firstChild.firstChild,!0,!0,{MouseDown:t.DragFunctionStart,MouseMove:t.DragFunctionPosition,MouseUp:t.DragFunctionPosition,Disabled:null,positionobj:c},r.spreadsheetDiv),r.spreadsheetDiv.appendChild(c),o=document.getElementById(l+"textarea"),o.focus(),t.CmdGotFocus(o)}},t.SpreadsheetControl.HideMultiline=function(){var e=(t.Constants,t.GetSpreadsheetControlObject()),o=e.editor,i=document.getElementById(e.idPrefix+"multilinedialog");switch(i.innerHTML="",t.DragUnregister(i),t.KeyboardFocus(),i.parentNode&&i.parentNode.removeChild(i),o.state){case"start":o.inputBox.DisplayCellContents(null);break;case"input":case"inputboxdirect":o.inputBox.element.disabled=!1,o.inputBox.Focus()}},t.SpreadsheetControl.DoMultilineClear=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"multilinetextarea");o.value="",o.focus()},t.SpreadsheetControl.DoMultilinePaste=function(){var e=t.GetSpreadsheetControlObject(),o=e.editor,i=o.workingvalues,n=document.getElementById(e.idPrefix+"multilinetextarea"),r=n.value;switch(t.SpreadsheetControl.HideMultiline(),o.state){case"start":i.partialexpr="",i.ecoord=o.ecell.coord,i.erow=o.ecell.row,i.ecol=o.ecell.col;break;case"input":case"inputboxdirect":o.inputBox.Blur(),o.inputBox.ShowInputBox(!1),o.state="start"}o.EditorSaveEdit(r)},t.SpreadsheetControl.DoLink=function(){var e,o,i,n,r,a,s=t.LocalizeString,l=(t.Constants,t.GetSpreadsheetControlObject()),c=l.editor,u=c.workingvalues,l=t.GetSpreadsheetControlObject(),d=l.idPrefix+"link";if(o=document.getElementById(d+"dialog"),!o){switch(c.state){case"start":u.ecoord=c.ecell.coord,u.erow=c.ecell.row,u.ecol=c.ecell.col,c.RangeRemove(),i=t.GetCellContents(c.context.sheetobj,u.ecoord);break;case"input":case"inputboxdirect":i=c.inputBox.GetText()}c.inputBox.element.disabled=!0,"'"==i.charAt(0)&&(i=i.slice(1));var h=t.ParseCellLinkText(i);i=t.special_chars(i),n=l.sheet.cells[c.ecell.coord],r=n&&n.textvalueformat?"":" checked",a=h.newwin?" checked":"",e='<div style="padding:6px 0px 4px 6px;"><span style="font-size:smaller;">'+s("Description")+'</span><br><input type="text" id="'+d+'desc" style="width:380px;" value="'+t.special_chars(h.desc)+'"><br><span style="font-size:smaller;">'+s("URL")+'</span><br><input type="text" id="'+d+'url" style="width:380px;" value="'+t.special_chars(h.url)+'"><br>',t.Callbacks.MakePageLink&&(e+='<span style="font-size:smaller;">'+s("Page Name")+'</span><br><input type="text" id="'+d+'pagename" style="width:380px;" value="'+t.special_chars(h.pagename)+'"><br><span style="font-size:smaller;">'+s("Workspace")+'</span><br><input type="text" id="'+d+'workspace" style="width:380px;" value="'+t.special_chars(h.workspace)+'"><br>'),e+=t.LocalizeSubstrings('<input type="checkbox" id="'+d+'format"'+r+'>&nbsp;<span style="font-size:smaller;">%loc!Set to Link format!</span><br><input type="checkbox" id="'+d+'popup"'+a+'>&nbsp;<span style="font-size:smaller;">%loc!Show in new browser window!</span></div><div style="width:380px;text-align:right;padding:6px 0px 4px 6px;font-size:small;"><input type="button" value="%loc!Set Cell Contents!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.DoLinkPaste();">&nbsp;<input type="button" value="%loc!Clear!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.DoLinkClear();">&nbsp;<input type="button" value="%loc!Cancel!" style="font-size:smaller;" onclick="SocialCalc.SpreadsheetControl.HideLink();"></div></div>');var p=document.createElement("div");p.id=d+"dialog",p.style.position="absolute";var f=t.GetViewportInfo(),m=t.GetElementPositionWithScroll(l.spreadsheetDiv);p.style.top=f.height/3-m.top+"px",p.style.left=f.width/3-m.left+"px",p.style.zIndex=100,p.style.backgroundColor="#FFF",p.style.border="1px solid black",p.style.width="400px",p.innerHTML='<table cellspacing="0" cellpadding="0" style="border-bottom:1px solid black;"><tr><td style="font-size:10px;cursor:default;width:100%;background-color:#999;color:#FFF;">&nbsp;'+s("Link Input Box")+'</td><td style="font-size:10px;cursor:default;color:#666;" onclick="SocialCalc.SpreadsheetControl.HideLink();">&nbsp;X&nbsp;</td></tr></table><div style="background-color:#DDD;">'+e+"</div>",t.DragRegister(p.firstChild.firstChild.firstChild.firstChild,!0,!0,{MouseDown:t.DragFunctionStart,MouseMove:t.DragFunctionPosition,MouseUp:t.DragFunctionPosition,Disabled:null,positionobj:p},l.spreadsheetDiv),l.spreadsheetDiv.appendChild(p),o=document.getElementById(d+"url"),o.focus(),t.CmdGotFocus(o)}},t.SpreadsheetControl.HideLink=function(){var e=(t.Constants,t.GetSpreadsheetControlObject()),o=e.editor,i=document.getElementById(e.idPrefix+"linkdialog");switch(i.innerHTML="",t.DragUnregister(i),t.KeyboardFocus(),i.parentNode&&i.parentNode.removeChild(i),o.state){case"start":o.inputBox.DisplayCellContents(null);break;case"input":case"inputboxdirect":o.inputBox.element.disabled=!1,o.inputBox.Focus()}},t.SpreadsheetControl.DoLinkClear=function(){var e=t.GetSpreadsheetControlObject();
14document.getElementById(e.idPrefix+"linkdesc").value="",document.getElementById(e.idPrefix+"linkpagename").value="",document.getElementById(e.idPrefix+"linkworkspace").value="";var o=document.getElementById(e.idPrefix+"linkurl");o.value="",o.focus()},t.SpreadsheetControl.DoLinkPaste=function(){var e,o,i,n,r=t.GetSpreadsheetControlObject(),a=r.editor,s=a.workingvalues,l=document.getElementById(r.idPrefix+"linkdesc"),c=document.getElementById(r.idPrefix+"linkurl"),u=document.getElementById(r.idPrefix+"linkpagename"),d=document.getElementById(r.idPrefix+"linkworkspace"),h=document.getElementById(r.idPrefix+"linkformat"),p=document.getElementById(r.idPrefix+"linkpopup"),f="";switch(p.checked?(e="<<",o=">>",i="[[",n="]]"):(e="<",o=">",i="[",n="]"),f=u&&u.value?d.value?l.value+"{"+d.value+i+u.value+n+"}":l.value+i+u.value+n:l.value+e+c.value+o,t.SpreadsheetControl.HideLink(),a.state){case"start":s.partialexpr="",s.ecoord=a.ecell.coord,s.erow=a.ecell.row,s.ecol=a.ecell.col;break;case"input":case"inputboxdirect":a.inputBox.Blur(),a.inputBox.ShowInputBox(!1),a.state="start"}h.checked&&t.SpreadsheetControlExecuteCommand(null,"set %C textvalueformat text-link",""),a.EditorSaveEdit(f)},t.SpreadsheetControl.DoSum=function(){var e,o,i,n,r,a,s,l=t.GetSpreadsheetControlObject(),c=l.editor,u=c.context.sheetobj;if(c.range.hasrange)r=t.crToCoord(c.range.left,c.range.top)+":"+t.crToCoord(c.range.right,c.range.bottom),e="set "+t.crToCoord(c.range.right,c.range.bottom+1)+" formula sum("+r+")";else if(i=c.ecell.row-1,n=c.ecell.col,1>=i)e="set "+c.ecell.coord+" constant e#REF! 0 #REF!";else{for(s=!1;i>0;){if(a=t.crToCoord(n,i),o=u.GetAssuredCell(a),o.datatype&&"t"!=o.datatype)s=!0;else if(s){i++;break}i--}e="set "+c.ecell.coord+" formula sum("+t.crToCoord(n,i)+":"+t.crToCoord(n,c.ecell.row-1)+")"}c.EditorScheduleSheetCommands(e,!0,!1)},t.SpreadsheetControl.FindInSheet=function(){var e=$("#searchstatus"),o=t.GetSpreadsheetControlObject();if(!this.value.length)return e.text(""),o.sheet.search_cells=[],void(o.sheet.selected_search_cell=void 0);var i,n,r=o.sheet.cells,a=new RegExp(this.value,"im"),s=[];for(var l in r){i=r[l];var c=t.coordToCr(l);"yes"!==o.sheet.rowattribs.hide[c.row]&&"yes"!==o.sheet.colattribs.hide[t.rcColname(c.col)]&&(n="c"===i.datatype?i.displaystring:String(i.datavalue),void 0!==n&&n.match(a)&&s.push(l))}o.sheet.search_cells=s,s.length?(o.sheet.selected_search_cell=0,o.editor.MoveECell(s[0]),e.text("1 of "+s.length)):(o.sheet.selected_search_cell=void 0,e.text("No Matches"))},t.SpreadsheetControl.SearchSheet=function(e){var o=t.GetSpreadsheetControlObject(),i=o.sheet,n=i.search_cells;if(n.length){var r=i.selected_search_cell;r===(0===e?0:n.length-1)?r=0===e?n.length-1:0:r+=0===e?-1:1;var a=n[r];i.selected_search_cell=r,o.editor.MoveECell(a),document.getElementById("searchstatus").textContent=String(r+1)+" of "+n.length}},t.SpreadsheetControl.SearchUp=function(){t.SpreadsheetControl.SearchSheet(0)},t.SpreadsheetControl.SearchDown=function(){t.SpreadsheetControl.SearchSheet(1)},t.SpreadsheetControlSortOnclick=function(e){var o,i,n=[],r=document.getElementById(e.idPrefix+"sortlist");t.LoadColumnChoosers(e),e.editor.RangeChangeCallback.sort=t.UpdateSortRangeProposal;for(o in e.sheet.names)n.push(o);for(n.sort(),r.length=0,r.options[0]=new Option(t.LocalizeString("[select range]")),r.options[1]=new Option(t.LocalizeString("Sort All"),"all"),n_options=r.options.length,i=0;i<n.length;i++)o=n[i],r.options[i+n_options]=new Option(o,o),o==e.sortrange&&(r.options[i+n_options].selected=!0);""==e.sortrange&&(r.options[0].selected=!0),t.UpdateSortRangeProposal(e.editor),t.KeyboardFocus()},t.SpreadsheetControlSortSave=function(){var e,o,i,n=t.GetSpreadsheetControlObject();return e="sort:"+t.encodeForSave(n.sortrange)+":",o=document.getElementById(n.idPrefix+"majorsort"),i=document.getElementById(n.idPrefix+"majorsortup"),e+=o.selectedIndex+(i.checked?":up":":down"),o=document.getElementById(n.idPrefix+"minorsort"),o.selectedIndex>0?(i=document.getElementById(n.idPrefix+"minorsortup"),e+=":"+o.selectedIndex+(i.checked?":up":":down")):e+="::",o=document.getElementById(n.idPrefix+"lastsort"),o.selectedIndex>0?(i=document.getElementById(n.idPrefix+"lastsortup"),e+=":"+o.selectedIndex+(i.checked?":up":":down")):e+="::",e+"\n"},t.SpreadsheetControlSortLoad=function(e,o,i){var n,r,a=t.GetSpreadsheetControlObject();return n=i.split(":"),a.sortrange=t.decodeFromSave(n[1]),r=document.getElementById(a.idPrefix+"sortbutton"),a.sortrange?(r.value=t.LocalizeString("Sort ")+a.sortrange,r.style.visibility="visible"):r.style.visibility="hidden",t.LoadColumnChoosers(a),sele=document.getElementById(a.idPrefix+"majorsort"),sele.selectedIndex=n[2]-0,document.getElementById(a.idPrefix+"majorsort"+n[3]).checked=!0,sele=document.getElementById(a.idPrefix+"minorsort"),n[4]?(sele.selectedIndex=n[4]-0,document.getElementById(a.idPrefix+"minorsort"+n[5]).checked=!0):(sele.selectedIndex=0,document.getElementById(a.idPrefix+"minorsortup").checked=!0),sele=document.getElementById(a.idPrefix+"lastsort"),n[6]?(sele.selectedIndex=n[6]-0,document.getElementById(a.idPrefix+"lastsort"+n[7]).checked=!0):(sele.selectedIndex=0,document.getElementById(a.idPrefix+"lastsortup").checked=!0),!0},t.SpreadsheetControlCommentOnclick=function(e,o){e.editor.MoveECellCallback.comment=t.SpreadsheetControlCommentMoveECell,t.SpreadsheetControlCommentDisplay(e,o),t.KeyboardFocus()},t.SpreadsheetControlCommentDisplay=function(e){var t="";e.editor.ecell&&e.editor.ecell.coord&&e.sheet.cells[e.editor.ecell.coord]&&(t=e.sheet.cells[e.editor.ecell.coord].comment||""),document.getElementById(e.idPrefix+"commenttext").value=t},t.SpreadsheetControlCommentMoveECell=function(){t.SpreadsheetControlCommentDisplay(t.GetSpreadsheetControlObject(),"comment")},t.SpreadsheetControlCommentSet=function(){var e=t.GetSpreadsheetControlObject();e.ExecuteCommand("set %C comment "+t.encodeForSave(document.getElementById(e.idPrefix+"commenttext").value));var o=t.GetEditorCellElement(e.editor,e.editor.ecell.row,e.editor.ecell.col);e.editor.ECellReadonly()||(o.element.title=document.getElementById(e.idPrefix+"commenttext").value,e.editor.UpdateCellCSS(o,e.editor.ecell.row,e.editor.ecell.col)),t.KeyboardFocus()},t.SpreadsheetControlCommentOnunclick=function(e){delete e.editor.MoveECellCallback.comment},t.SpreadsheetControlNamesOnclick=function(e){document.getElementById(e.idPrefix+"namesname").value="",document.getElementById(e.idPrefix+"namesdesc").value="",document.getElementById(e.idPrefix+"namesvalue").value="",e.editor.RangeChangeCallback.names=t.SpreadsheetControlNamesRangeChange,e.editor.MoveECellCallback.names=t.SpreadsheetControlNamesRangeChange,t.SpreadsheetControlNamesRangeChange(e.editor),t.SpreadsheetControlNamesFillNameList(),t.SpreadsheetControlNamesChangedName()},t.SpreadsheetControlNamesFillNameList=function(){var e,o,i=t.LocalizeString,n=[],r=t.GetSpreadsheetControlObject(),a=document.getElementById(r.idPrefix+"nameslist"),s=document.getElementById(r.idPrefix+"namesname").value.toUpperCase().replace(/[^A-Z0-9_\.]/g,"");for(e in r.sheet.names)n.push(e);for(n.sort(),a.length=0,a.options[0]=new Option(n.length>0?i("[New]"):i("[None]")),o=0;o<n.length;o++)e=n[o],a.options[o+1]=new Option(e,e),e==s&&(a.options[o+1].selected=!0);""==s&&(a.options[0].selected=!0)},t.SpreadsheetControlNamesChangedName=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"nameslist"),i=o.options[o.selectedIndex].value;e.sheet.names[i]?(document.getElementById(e.idPrefix+"namesname").value=i,document.getElementById(e.idPrefix+"namesdesc").value=e.sheet.names[i].desc||"",document.getElementById(e.idPrefix+"namesvalue").value=e.sheet.names[i].definition||""):(document.getElementById(e.idPrefix+"namesname").value="",document.getElementById(e.idPrefix+"namesdesc").value="",document.getElementById(e.idPrefix+"namesvalue").value="")},t.SpreadsheetControlNamesRangeChange=function(e){var o=t.GetSpreadsheetControlObject(),i=document.getElementById(o.idPrefix+"namesrangeproposal");i.value=e.range.hasrange?t.crToCoord(e.range.left,e.range.top)+":"+t.crToCoord(e.range.right,e.range.bottom):e.ecell.coord},t.SpreadsheetControlNamesOnunclick=function(e){delete e.editor.RangeChangeCallback.names,delete e.editor.MoveECellCallback.names},t.SpreadsheetControlNamesSetValue=function(){var e=t.GetSpreadsheetControlObject();document.getElementById(e.idPrefix+"namesvalue").value=document.getElementById(e.idPrefix+"namesrangeproposal").value,t.KeyboardFocus()},t.SpreadsheetControlNamesSave=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"namesname").value;t.SetTab(e.tabs[0].name),t.KeyboardFocus(),""!=o&&e.ExecuteCommand("name define "+o+" "+document.getElementById(e.idPrefix+"namesvalue").value+"\nname desc "+o+" "+document.getElementById(e.idPrefix+"namesdesc").value)},t.SpreadsheetControlNamesDelete=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"namesname").value;t.SetTab(e.tabs[0].name),t.KeyboardFocus(),""!=o&&e.ExecuteCommand("name delete "+o),t.KeyboardFocus()},t.SpreadsheetControlClipboardOnclick=function(e){var e=t.GetSpreadsheetControlObject();clipele=document.getElementById(e.idPrefix+"clipboardtext"),document.getElementById(e.idPrefix+"clipboardformat-tab").checked=!0;try{clipele.value=t.ConvertSaveToOtherFormat(t.Clipboard.clipboard,"tab")}catch(o){console.error(o)}},t.SpreadsheetControlClipboardFormat=function(e){var o=t.GetSpreadsheetControlObject();clipele=document.getElementById(o.idPrefix+"clipboardtext"),clipele.value=t.ConvertSaveToOtherFormat(t.Clipboard.clipboard,e)},t.SpreadsheetControlClipboardLoad=function(){var e=t.GetSpreadsheetControlObject(),o="tab";t.SetTab(e.tabs[0].name),t.KeyboardFocus(),document.getElementById(e.idPrefix+"clipboardformat-csv").checked?o="csv":document.getElementById(e.idPrefix+"clipboardformat-scsave").checked&&(o="scsave"),e.editor.pastescclipboard=!0,e.editor.EditorScheduleSheetCommands("loadclipboard "+t.encodeForSave(t.ConvertOtherFormatToSave(document.getElementById(e.idPrefix+"clipboardtext").value,o)),!0,!1)},t.SpreadsheetControlClipboardClear=function(){var e=t.GetSpreadsheetControlObject(),o=document.getElementById(e.idPrefix+"clipboardtext");o.value="",e.editor.EditorScheduleSheetCommands("clearclipboard",!0,!1),o.focus()},t.SpreadsheetControlClipboardExport=function(){var e=t.GetSpreadsheetControlObject();e.ExportCallback&&e.ExportCallback(e),t.SetTab(e.tabs[0].name),t.KeyboardFocus()},t.SpreadsheetControlSettingsSwitch=function(e){t.SettingControlReset();var o=t.GetSpreadsheetControlObject(),i=document.getElementById(o.idPrefix+"sheetsettingstable"),n=document.getElementById(o.idPrefix+"cellsettingstable"),r=document.getElementById(o.idPrefix+"sheetsettingstoolbar"),a=document.getElementById(o.idPrefix+"cellsettingstoolbar");"sheet"==e?(i.style.display="block",n.style.display="none",r.style.display="block",a.style.display="none",t.SettingsControlSetCurrentPanel(o.views.settings.values.sheetspanel)):(i.style.display="none",n.style.display="block",r.style.display="none",a.style.display="block",t.SettingsControlSetCurrentPanel(o.views.settings.values.cellspanel))},t.SettingsControlSave=function(e){var o,i,n=t.GetSpreadsheetControlObject(),r=t.SettingsControls,a=r.CurrentPanel,s=t.SettingsControlUnloadPanel(a);t.SetTab(n.tabs[0].name),t.KeyboardFocus(),"sheet"==e?i=n.sheet.DecodeSheetAttributes(s):"cell"==e&&(n.editor.range.hasrange&&(o=t.crToCoord(n.editor.range.left,n.editor.range.top)+":"+t.crToCoord(n.editor.range.right,n.editor.range.bottom)),i=n.sheet.DecodeCellAttributes(n.editor.ecell.coord,s,o)),i&&n.editor.EditorScheduleSheetCommands(i,!0,!1)},t.SpreadsheetControlCreateSpreadsheetSave=function(e,t){var o,i,n,r="",a="";if(t)for(i in t)n="\n"!=t[i].charAt(t[i]-1)?"\n":"",r+="--"+e.multipartBoundary+"\nContent-type: text/plain; charset=UTF-8\n\n"+t[i]+n,a+="part:"+i+"\n";return o="socialcalc:version:1.0\nMIME-Version: 1.0\nContent-Type: multipart/mixed; boundary="+e.multipartBoundary+"\n--"+e.multipartBoundary+"\nContent-type: text/plain; charset=UTF-8\n\n# SocialCalc Spreadsheet Control Save\nversion:1.0\npart:sheet\npart:edit\npart:audit\n"+a+"--"+e.multipartBoundary+"\nContent-type: text/plain; charset=UTF-8\n\n"+e.CreateSheetSave()+"--"+e.multipartBoundary+"\nContent-type: text/plain; charset=UTF-8\n\n"+e.editor.SaveEditorSettings()+"--"+e.multipartBoundary+"\nContent-type: text/plain; charset=UTF-8\n\n"+e.sheet.CreateAuditString()+r+"--"+e.multipartBoundary+"--\n"},t.SpreadsheetControlDecodeSpreadsheetSave=function(e,t){var o,i,n,r,a,s,l,c,u,d,u,h,p={},f=[];if(o=t.search(/^MIME-Version:\s1\.0/im),0>o)return p;if(i=/^Content-Type:\s*multipart\/mixed;\s*boundary=(\S+)/gim,i.lastIndex=o,n=i.exec(t),i.lastIndex<=0)return p;if(r=n[1],a=new RegExp("^--"+r+"(?:\r\n|\n)","mg"),a.lastIndex=i.lastIndex,n=a.exec(t),s=/(?:\r\n|\n)(?:\r\n|\n)/gm,s.lastIndex=a.lastIndex,n=s.exec(t),!n)return p;if(l=s.lastIndex,a.lastIndex=l,n=a.exec(t),!n)return p;for(c=n.index,u=t.substring(l,c).split(/\r\n|\n/),d=0;d<u.length;d++)switch(line=u[d],h=line.split(":"),h[0]){case"version":break;case"part":f.push(h[1])}for(pnum=0;pnum<f.length;pnum++){if(s.lastIndex=c,n=s.exec(t),!n)return p;if(l=s.lastIndex,pnum==f.length-1&&(a=new RegExp("^--"+r+"--$","mg")),a.lastIndex=l,n=a.exec(t),!n)return p;c=n.index,p[f[pnum]]={start:l,end:c}}return p},t.SettingsControls={Controls:{},CurrentPanel:null},t.SettingsControlSetCurrentPanel=function(e){t.SettingsControls.CurrentPanel=e,t.SettingsControls.PopupChangeCallback({panelobj:e},"",null)},t.SettingsControlInitializePanel=function(e){var o,i=t.SettingsControls;for(o in e)"name"!=o&&(ctrl=i.Controls[e[o].type],ctrl&&ctrl.Initialize&&ctrl.Initialize(e,o))},t.SettingsControlLoadPanel=function(e,o){var i,n=t.SettingsControls;for(i in e)"name"!=i&&(ctrl=n.Controls[e[i].type],ctrl&&ctrl.SetValue&&ctrl.SetValue(e,i,o[e[i].setting]))},t.SettingsControlUnloadPanel=function(e){var o,i=t.SettingsControls,n={};for(o in e)"name"!=o&&(ctrl=i.Controls[e[o].type],ctrl&&ctrl.GetValue&&(n[e[o].setting]=ctrl.GetValue(e,o)));return n},t.SettingsControls.PopupChangeCallback=function(e){var o=t.Constants,i=document.getElementById("sample-text");if(i&&e&&e.panelobj){var n,r,a,s,l,c=t.CurrentSpreadsheetControlObject.idPrefix,u="cell"==e.panelobj.name?"c":"";a=o.defaultCellLayout.match(/^padding.(\S+) (\S+) (\S+) (\S+).vertical.align.(\S+);$/)||[];var d={color:["textcolor"],backgroundColor:["bgcolor","#FFF"],fontSize:["fontsize",o.defaultCellFontSize],fontFamily:["fontfamily"],paddingTop:["padtop",a[1]],paddingRight:["padright",a[2]],paddingBottom:["padbottom",a[3]],paddingLeft:["padleft",a[4]],verticalAlign:["alignvert",a[5]]};for(r in d)n=t.Popup.GetValue(c+u+d[r][0])||d[r][1]||"",i.style[r]=n;if("c"==u){d={borderTop:"cbt",borderRight:"cbr",borderBottom:"cbb",borderLeft:"cbl"};for(r in d)n=t.SettingsControls.BorderSideGetValue(e.panelobj,d[r]),i.style[r]=n?n.val||"":"";n=t.Popup.GetValue(c+"calignhoriz"),i.style.textAlign=n||"left",i.childNodes[1].style.textAlign=n||"right"}else i.style.border="",n=t.Popup.GetValue(c+"textalignhoriz"),i.style.textAlign=n||"left",n=t.Popup.GetValue(c+"numberalignhoriz"),i.childNodes[1].style.textAlign=n||"right";n=t.Popup.GetValue(c+u+"fontlook"),a=n?n.match(/^(\S+) (\S+)$/)||[]:[],i.style.fontStyle=a[1]||"",i.style.fontWeight=a[2]||"",n=t.Popup.GetValue(c+u+"formatnumber")||"General",s=t.FormatNumber.formatNumberWithFormat(9.8765,n,""),l=t.FormatNumber.formatNumberWithFormat(-1234.5,n,""),"??-???-??&nbsp;??:??:??"!=l&&(s+="<br>"+l),i.childNodes[1].innerHTML=s}},t.SettingsControls.PopupListSetValue=function(e,o,i){if(!i)return void alert(o+" no value");var n=t.Popup;i.def?n.SetValue(e[o].id,""):n.SetValue(e[o].id,i.val)},t.SettingsControls.PopupListGetValue=function(e,o){var i=e[o];if(!i)return null;var n=t.Popup.GetValue(i.id);return n?{def:!1,val:n}:{def:!0,val:0}},t.SettingsControls.PopupListInitialize=function(e,o){var i,n,r,a,s=t.SettingsControls,l=e[o].initialdata||s.Controls[e[o].type].InitialData||"";l=t.LocalizeSubstrings(l);var c=l.split(/\|/),u=[];for(i=0;i<(c.length||0);i++)n=c[i],r=n.indexOf(":"),a=n.substring(0,r),-1!=a.indexOf("\\")&&(a=a.replace(/\\c/g,":"),a=a.replace(/\\b/g,"\\")),a=t.special_chars(a),u[i]="[custom]"==a?{o:t.Constants.s_PopupListCustom,v:n.substring(r+1),a:{custom:!0}}:"[cancel]"==a?{o:t.Constants.s_PopupListCancel,v:"",a:{cancel:!0}}:"[break]"==a?{o:"-----",v:"",a:{skip:!0}}:"[newcol]"==a?{o:"",v:"",a:{newcol:!0}}:{o:a,v:n.substring(r+1)};t.Popup.Create("List",e[o].id,{}),t.Popup.Initialize(e[o].id,{options:u,attribs:{changedcallback:t.SettingsControls.PopupChangeCallback,panelobj:e}})},t.SettingsControls.PopupListReset=function(){t.Popup.Reset("List")},t.SettingsControls.Controls.PopupList={SetValue:t.SettingsControls.PopupListSetValue,GetValue:t.SettingsControls.PopupListGetValue,Initialize:t.SettingsControls.PopupListInitialize,OnReset:t.SettingsControls.PopupListReset,ChangedCallback:null},t.SettingsControls.ColorChooserSetValue=function(e,o,i){if(!i)return void alert(o+" no value");var n=t.Popup;i.def?n.SetValue(e[o].id,""):n.SetValue(e[o].id,i.val)},t.SettingsControls.ColorChooserGetValue=function(e,o){var i=t.Popup.GetValue(e[o].id);return i?{def:!1,val:i}:{def:!0,val:0}},t.SettingsControls.ColorChooserInitialize=function(e,o){t.SettingsControls;t.Popup.Create("ColorChooser",e[o].id,{}),t.Popup.Initialize(e[o].id,{attribs:{title:"&nbsp;",moveable:!0,width:"106px",changedcallback:t.SettingsControls.PopupChangeCallback,panelobj:e}})},t.SettingsControls.ColorChooserReset=function(){t.Popup.Reset("ColorChooser")},t.SettingsControls.Controls.ColorChooser={SetValue:t.SettingsControls.ColorChooserSetValue,GetValue:t.SettingsControls.ColorChooserGetValue,Initialize:t.SettingsControls.ColorChooserInitialize,OnReset:t.SettingsControls.ColorChooserReset,ChangedCallback:null},t.SettingsControls.BorderSideSetValue=function(e,o,i){var n,r,a,s=(t.SettingsControls,e[o].id);return i?(n=document.getElementById(s+"-onoff-bcb"),void(n&&(i.val?(n.checked=!0,n.value=i.val,a=i.val.match(/(\S+)\s+(\S+)\s+(\S.+)/),r=s+"-color",t.Popup.SetValue(r,a[3]),t.Popup.SetDisabled(r,!1)):(n.checked=!1,n.value=i.val,r=s+"-color",t.Popup.SetValue(r,""),t.Popup.SetDisabled(r,!0))))):void alert(o+" no value")},t.SettingsControls.BorderSideGetValue=function(e,o){var i,n,r=(t.SettingsControls,e[o].id);return(i=document.getElementById(r+"-onoff-bcb"))?i.checked?(n=t.Popup.GetValue(r+"-color"),n="1px solid "+(n||"rgb(0,0,0)"),{def:!1,val:n}):{def:!1,val:""}:void 0},t.SettingsControls.BorderSideInitialize=function(e,o){var i=(t.SettingsControls,e[o].id);t.Popup.Create("ColorChooser",i+"-color",{}),t.Popup.Initialize(i+"-color",{attribs:{title:"&nbsp;",width:"106px",moveable:!0,changedcallback:t.SettingsControls.PopupChangeCallback,panelobj:e}})},t.SettingsControlOnchangeBorder=function(e){var o=t.SettingsControls,i=o.CurrentPanel,n=e.id.match(/(^.*\-)(\w+)\-(\w+)\-(\w+)$/);if(n){var r=(n[1],n[2]),a=(n[3],n[4]),s=i[r].type;switch(a){case"bcb":e.checked?o.Controls[s].SetValue(o.CurrentPanel,r,{def:!1,val:e.value||"1px solid rgb(0,0,0)"}):o.Controls[s].SetValue(o.CurrentPanel,r,{def:!1,val:""})}}},t.SettingsControls.Controls.BorderSide={SetValue:t.SettingsControls.BorderSideSetValue,GetValue:t.SettingsControls.BorderSideGetValue,OnClick:t.SettingsControls.ColorComboOnClick,Initialize:t.SettingsControls.BorderSideInitialize,InitialData:{thickness:"1 pixel:1px",style:"Solid:solid"},ChangedCallback:null},t.SettingControlReset=function(){var e,o=t.SettingsControls;for(e in o.Controls)o.Controls[e].OnReset&&o.Controls[e].OnReset(e)},t.OtherSaveParts={},t.CtrlSEditor=function(e){var o,i;if(e.length>0)o=t.special_chars(t.OtherSaveParts[e]||"");else{o="Listing of Parts\n";for(i in t.OtherSaveParts)o+=t.special_chars("\nPart: "+i+"\n=====\n"+t.OtherSaveParts[i]+"\n")}var n=document.createElement("div");n.style.cssText="position:absolute;z-index:500;width:300px;height:300px;left:100px;top:200px;border:1px solid black;background-color:#EEE;text-align:center;",n.id="socialcalc-editbox",n.innerHTML=e+'<br><br><textarea id="socialcalc-editbox-textarea" style="width:250px;height:200px;">'+o+"</textarea><br><br><input type=button onclick=\"SocialCalc.CtrlSEditorDone ('socialcalc-editbox', '"+e+'\');" value="OK">',document.body.appendChild(n);var r=document.getElementById("socialcalc-editbox-textarea");r.focus(),t.CmdGotFocus(r)},t.CtrlSEditorDone=function(e,o){var i=document.getElementById(e+"-textarea"),n=i.value;o.length>0&&(n.length>0?t.OtherSaveParts[o]=n:delete t.OtherSaveParts[o]);var r=document.getElementById(e);t.KeyboardFocus(),r.parentNode.removeChild(r)};var t;return t||(alert("Main SocialCalc code module needed"),t={}),t.TableEditor||alert("SocialCalc TableEditor code module needed"),t.CurrentSpreadsheetViewerObject=null,t.SpreadsheetViewer=function(e){var o=t.Constants;this.parentNode=null,this.spreadsheetDiv=null,this.requestedHeight=0,this.requestedWidth=0,this.requestedSpaceBelow=0,this.height=0,this.width=0,this.viewheight=0,this.sheet=null,this.context=null,this.editor=null,this.spreadsheetDiv=null,this.editorDiv=null,this.sortrange="",this.idPrefix=e||"SocialCalc-",this.imagePrefix=o.defaultImagePrefix,this.statuslineheight=o.SVStatuslineheight,this.statuslineCSS=o.SVStatuslineCSS,this.sheet=new t.Sheet,this.context=new t.RenderContext(this.sheet),(1==t._app||1==t._view)&&(o.defaultImagePrefix=this.imagePrefix="../"+this.imagePrefix),1==t._app?(this.context.showGrid=!1,this.context.showRCHeaders=!1,this.context.highlightTypes.range.style="",this.context.sheetobj.cells.A1=new t.Cell("A1"),this.context.sheetobj.cells.A1.displaystring="Loading ... "):(this.context.showGrid=!0,this.context.showRCHeaders=!0),this.editor=new t.TableEditor(this.context),this.editor.noEdit=!0,this.editor.StatusCallback.statusline={func:t.SpreadsheetViewerStatuslineCallback,params:{}},this.hasStatusLine=!0,this.statuslineHTML='<table cellspacing="0" cellpadding="0"><tr><td width="100%" style="overflow:hidden;">{status}</td><td>&nbsp;</td></tr></table>',this.statuslineFull=!0,this.noRecalc=!0,this.repeatingMacroTimer=null,this.repeatingMacroInterval=60,this.repeatingMacroCommands="",t.CurrentSpreadsheetViewerObject=this},t.SpreadsheetViewer.prototype.InitializeSpreadsheetViewer=function(e,o,i,n){return t.InitializeSpreadsheetViewer(this,e,o,i,n)},t.SpreadsheetViewer.prototype.LoadSave=function(e){return t.SpreadsheetViewerLoadSave(this,e)},t.SpreadsheetViewer.prototype.DoOnResize=function(){return t.DoOnResize(this)},t.SpreadsheetViewer.prototype.SizeSSDiv=function(){return t.SizeSSDiv(this)},t.SpreadsheetViewer.prototype.DecodeSpreadsheetSave=function(e){return t.SpreadsheetViewerDecodeSpreadsheetSave(this,e)},t.SpreadsheetViewer.prototype.ParseSheetSave=function(e){return this.sheet.ParseSheetSave(e)},t.InitializeSpreadsheetViewer=function(e,o,i,n,r){{var a;t.Constants,t.LocalizeString,t.LocalizeSubstrings,e.tabs,e.views}for(e.requestedHeight=i,e.requestedWidth=n,e.requestedSpaceBelow=r,"string"==typeof o&&(o=document.getElementById(o)),null==o&&alert("SocialCalc.SpreadsheetControl not given parent node."),e.parentNode=o,e.spreadsheetDiv=document.createElement("div"),e.SizeSSDiv(),a=o.firstChild;null!=a;a=o.firstChild)o.removeChild(a);o.appendChild(e.spreadsheetDiv),e.nonviewheight=e.hasStatusLine?e.statuslineheight:0,e.viewheight=e.height-e.nonviewheight,e.editorDiv=e.editor.CreateTableEditor(e.width,e.viewheight),e.spreadsheetDiv.appendChild(e.editorDiv),e.hasStatusLine&&(e.statuslineDiv=document.createElement("div"),e.statuslineDiv.style.cssText=e.statuslineCSS,e.statuslineDiv.style.height=e.statuslineheight-(e.statuslineDiv.style.paddingTop.slice(0,-2)-0)-(e.statuslineDiv.style.paddingBottom.slice(0,-2)-0)+"px",e.statuslineDiv.id=e.idPrefix+"statusline",e.spreadsheetDiv.appendChild(e.statuslineDiv),e.editor.StatusCallback.statusline={func:t.SpreadsheetViewerStatuslineCallback,params:{spreadsheetobj:e}}),1==t._app&&(e.formDataViewer=new t.SpreadsheetViewer("te_FormData-"),e.formDataViewer.sheet.statuscallback=null,t.CurrentSpreadsheetViewerObject=e)},t.SpreadsheetViewerLoadSave=function(o,i){var n,r,a,s,l=o.DecodeSpreadsheetSave(i);l&&(l.sheet&&(o.sheet.ResetSheet(),o.sheet.ParseSheetSave(i.substring(l.sheet.start,l.sheet.end))),l.edit&&o.editor.LoadEditorSettings(i.substring(l.edit.start,l.edit.end)),l.startupmacro&&o.editor.EditorScheduleSheetCommands(i.substring(l.startupmacro.start,l.startupmacro.end),!1,!0),l.repeatingmacro&&(n=i.substring(l.repeatingmacro.start,l.repeatingmacro.end),n=n.replace("\r",""),r=n.indexOf("\n"),r>0&&(a=n.substring(0,r)-0,s=a,o.repeatingMacroInterval=a,o.repeatingMacroCommands=n.substring(r+1),s>0&&(o.repeatingMacroTimer=e.setTimeout(t.SpreadsheetViewerDoRepeatingMacro,1e3*o.repeatingMacroInterval))))),"off"==o.editor.context.sheetobj.attribs.recalc||o.noRecalc?o.editor.ScheduleRender():o.editor.EditorScheduleSheetCommands("recalc")},t.SpreadsheetViewerDoRepeatingMacro=function(){var e=t.GetSpreadsheetViewerObject(),o=e.editor;e.repeatingMacroTimer=null,t.SheetCommandInfo.CmdExtensionCallbacks.repeatmacro={func:t.SpreadsheetViewerRepeatMacroCommand,data:null},o.EditorScheduleSheetCommands(e.repeatingMacroCommands)},t.SpreadsheetViewerRepeatMacroCommand=function(o,i,n,r){var a=t.GetSpreadsheetViewerObject(),s=r.RestOfString(),l=s-0;l>0||(l=a.repeatingMacroInterval),a.repeatingMacroInterval=l,a.repeatingMacroTimer=e.setTimeout(t.SpreadsheetViewerDoRepeatingMacro,1e3*a.repeatingMacroInterval)},t.SpreadsheetViewerStopRepeatingMacro=function(){var o=t.GetSpreadsheetViewerObject();o.repeatingMacroTimer&&(e.clearTimeout(o.repeatingMacroTimer),o.repeatingMacroTimer=null)},t.SpreadsheetViewerDoButtonCmd=function(e,o,i){var n=i.element,r=i.functionobj.command,a=t.GetSpreadsheetViewerObject(),s=a.editor;switch(r){case"recalc":s.EditorScheduleSheetCommands("recalc")}n&&n.blur&&n.blur(),t.KeyboardFocus()},t.LocalizeString=function(e){var o=t.LocalizeStringList[e];return o||(o=t.Constants["s_loc_"+e.toLowerCase().replace(/\s/g,"_").replace(/\W/g,"X")]||e,t.LocalizeStringList[e]=o),o},t.LocalizeStringList={},t.LocalizeSubstrings=function(e){var o=t.LocalizeString;return e.replace(/%(loc|ssc)!(.*?)!/g,function(e,i,n){return"ssc"==i?t.Constants[n]||alert("Missing constant: "+n):o(n)})},t.GetSpreadsheetViewerObject=function(){var e=t.CurrentSpreadsheetViewerObject;if(e)return e;throw"No current SpreadsheetViewer object."},t.DoOnResize=function(e){var o,i=e.views,n=e.SizeSSDiv();if(n){for(vname in i)o=i[vname].element,o.style.width=e.width+"px",o.style.height=e.height-e.nonviewheight+"px";t._app||e.editor.ResizeTableEditor(e.width,e.height-e.nonviewheight)}},t.SizeSSDiv=function(e){var o,i,n,r,a,s=10,l=10;return n=!1,o=t.GetViewportInfo(),i=t.GetElementPosition(e.parentNode),i.bottom=0,i.right=0,r=e.parentNode.style,r.marginTop&&(i.top+=r.marginTop.slice(0,-2)-0),r.marginBottom&&(i.bottom+=r.marginBottom.slice(0,-2)-0),r.marginLeft&&(i.left+=r.marginLeft.slice(0,-2)-0),r.marginRight&&(i.right+=r.marginRight.slice(0,-2)-0),a=e.requestedHeight||o.height-(i.top+i.bottom+l)-(e.requestedSpaceBelow||0),e.height!=a&&(e.height=a,e.spreadsheetDiv.style.height=a+"px",n=!0),a=e.requestedWidth||o.width-(i.left+i.right+s)||700,e.width!=a&&(e.width=a,e.spreadsheetDiv.style.width=a+"px",n=!0),e.spreadsheetDiv.style.position="relative",n},t.SpreadsheetViewerStatuslineCallback=function(e,t,o,i){var n=i.spreadsheetobj,r="";switch(n&&n.statuslineDiv&&(r=n.statuslineFull?e.GetStatuslineString(t,o,i):e.ecell.coord,r=n.statuslineHTML.replace(/\{status\}/,r),n.statuslineDiv.innerHTML=r),t){case"cmdendnorender":case"calcfinished":case"doneposcalc":}},t.CmdGotFocus=function(e){t.Keyboard.passThru=e},t.SpreadsheetViewerCreateSheetHTML=function(e){var o,i,n,r="";return o=new t.RenderContext(e.sheet),i=document.createElement("div"),n=o.RenderSheet(null,{type:"html"}),i.appendChild(n),delete o,r=i.innerHTML,delete n,delete i,r},t.SpreadsheetViewerDecodeSpreadsheetSave=function(e,t){var o,i,n,r,a,s,l,c,u,d,u,h,p={},f=[],m=/[^\n]\r[^\n]/;if(m.test(t)&&(t=t.replace(/([^\n])\r([^\n])/g,"$1\r\n$2")),o=t.search(/^MIME-Version:\s1\.0/im),0>o)return p;if(i=/^Content-Type:\s*multipart\/mixed;\s*boundary=(\S+)/gim,i.lastIndex=o,n=i.exec(t),i.lastIndex<=0)return p;if(r=n[1],a=new RegExp("^--"+r+"(?:\r\n|\n)","mg"),a.lastIndex=i.lastIndex,n=a.exec(t),s=/(?:\r\n|\n)(?:\r\n|\n)/gm,s.lastIndex=a.lastIndex,n=s.exec(t),!n)return p;if(l=s.lastIndex,a.lastIndex=l,n=a.exec(t),!n)return p;for(c=n.index,u=t.substring(l,c).split(/\r\n|\n/),d=0;d<u.length;d++)switch(line=u[d],h=line.split(":"),h[0]){case"version":break;case"part":f.push(h[1])}for(pnum=0;pnum<f.length;pnum++){if(s.lastIndex=c,n=s.exec(t),!n)return p;if(l=s.lastIndex,pnum==f.length-1&&(a=new RegExp("^--"+r+"--$","mg")),a.lastIndex=l,n=a.exec(t),!n)return p;c=n.index,p[f[pnum]]={start:l,end:c}}return p},"undefined"==typeof document&&(t.GetEditorCellElement=function(){},t.ReplaceCell=function(){},t.EditorRenderSheet=function(){},t.SpreadsheetControlSortSave=function(){return""},t.SpreadsheetControlStatuslineCallback=function(){},t.DoPositionCalculations=function(e){t.EditorSheetStatusCallback(null,"doneposcalc",null,e)}),"undefined"!=typeof self&&self.thread&&(e.setTimeout=function(e,t){1>=t&&self.thread.nextTick(e)},e.clearTimeout=function(){}),t}),function(){Class=function(classDefinition,classWrapper){if(!classDefinition)throw"Class requires a class definition string as its first argument";if(!classWrapper)throw"Class requires a class wrapper function as its second argument";if(!classDefinition.match(/^([\w\.]+)(?:\(\s*([\w\.]+)\s*\))?(?:\s+(.*?)\s*)?$/))throw"Can't parse Class Definition: '"+classDefinition+"'";var className=RegExp.$1,baseClassName=RegExp.$2||"",options=[];RegExp.$3&&(options=RegExp.$3.split(/\s+/));for(var incValues=[],strict=!0,i=0,l=options.length;l>i;i++){var option=options[i];"-nostrict"==option&&(strict=!1),option.match(/^-inc=(.+)$/)&&(incValues=RegExp.$1.split(","))}for(var parts=className.split("."),klass=Class.global,i=0;i<parts.length;i++)klass[parts[i]]||(klass[parts[i]]=function(){try{this.init()}catch(e){}}),klass=klass[parts[i]];klass.className=className,klass.isa=function(baseName){klass.baseClassName=baseName,baseName&&(klass.prototype=eval("new "+baseName+"()"),klass.prototype.superFunc=function(name){return eval(baseName).prototype[name]})},klass.isa(baseClassName),klass.global=Class.global,klass.addGlobal=function(){return this.newGlobals++,Class.global},klass.extend=function(e){if("object"!=typeof e)throw"extend requires an object of name:value pairs";for(var t in e)klass.prototype[t]=e[t]};for(var ii=0,ll=incValues.length;ll>ii;ii++){var value=incValues[ii];incValues[ii]="proto"==value?klass.prototype:"this"==value?klass:Class.global[value]}return strict?Class.eval_strict(classWrapper,klass,incValues):classWrapper.apply(klass,incValues),klass}}(),Class.global=this,Class.eval_strict=function(e,t,o){var i,n=0;for(var r in Class.global)n++,i=r;t.newGlobals=0,e.apply(t,o);var a=0;for(var r in Class.global)a++;if(n+t.newGlobals!=a)throw"Class '"+t.className+"' defines "+(a-n)+" new global JavaScript variables without using this.addGlobal()";delete t.newGlobals},Class("Document.Emitter",function(){var proto=this.prototype;proto.className="Document.Emitter",proto.instantiate=function(){return eval("new "+this.className+"()")},proto.init=function(){this.output=""},proto.content=function(){return this.output},proto.insert=function(e){this.output+=e.output}}),Class("Document.Emitter.HTML(Document.Emitter)",function(){var e=this.prototype;e.className="Document.Emitter.HTML",e.begin_node=function(e){var t=e.type;switch(t){case"asis":case"line":return;case"br":case"hr":return void(this.output+="<"+t+" />");case"html":return void(this.output+='<span class="wafl">Raw HTML section. Edit in Wiki Text mode.</span>');case"waflparagraph":case"waflphrase":case"im":if(e._wafl.match(/^image:\s*(\S+)(?:\s+size=(\w+))?/)){var o="if (typeof(ss) != 'undefined' && ss.editor) { var recalc = function () { try { ss.editor.DoPositionCalculations() } catch (e) { setTimeout(recalc, 500) } }; recalc() } if (!window.image_dimension_cache) window.image_dimension_cache = {};window.image_dimension_cache['/data/wafl/"+e._label.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"\\'").replace(/\\/g,"\\\\")+"'] = [ this.offsetWidth, this.offsetHeight ]; this.style.width = this.offsetWidth + 'px'; this.style.height = this.offsetHeight + 'px'",i=RegExp.$1,n=RegExp.$2;
15switch(n){case"small":n="100";break;case"medium":n="300";break;case"large":n="600"}return n&&(n=' width="'+n+'"'),void(this.output+='<img src="'+i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+'" onload="'+o+'"'+n+" />")}return void(this.output+='<span class="wafl">'+e._label.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"\\'").replace(/\\/g,"\\\\")+"</span>");case"a":case"wikilink":return void(this.output+='<a href="'+encodeURI(e._href)+'">');case"file":return void(this.output+='<a title="(network resource)" href="'+encodeURI(e._href)+'">');case"ul":case"ol":case"table":case"tr":return void(this.output+="<"+t+">\n");default:return void(this.output+="<"+t+">")}},e.end_node=function(e){var t=e.type;switch(t){case"asis":case"br":case"hr":case"html":case"waflparagraph":case"waflphrase":case"im":return;case"line":return void(this.output+="<br />");case"file":case"wikilink":return void(this.output+="</a>");default:return void(this.output+=0==t.search(/^(?:p|ul|ol|li|h\d|table|tr|td)$/)?"</"+t+">\n":"</"+t+">")}},e.text_node=function(e){this.output+=e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}}),Class("Document.Parser",function(){var proto=this.prototype;proto.className="Document.Parser",proto.init=function(){},proto.parse=function(e,t){return this.input=-1==e.search(/\n$/)?e+"\n":e,t&&(this.receiver=t),this.receiver.init(),this.grammar=this.create_grammar(),this.parse_blocks("top"),this.receiver.content()},proto.create_grammar=function(){throw"Please define create_grammar in a derived class of Document.Parser."},proto.parse_blocks=function(e){var t=this.grammar[e].blocks;if(t)for(;this.input.length;){for(var o=this.input.length,i=0;i<t.length;i++){var n=t[i],r=this.find_match("matched_block",n);if(r){this.input=this.input.substr(r.end),this.handle_match(n,r);break}}if(this.input.length>=o)throw this.classname+": Reduction error for:\n"+this.input+"\n"+JSON.stringify(this)}},proto.handle_match=function(e,t){var o=this.grammar[e],i=o.blocks?"parse_blocks":"parse_phrases";this.subparse(i,t,e,o.filter)},proto.find_match=function(e,t){var o=this.grammar[t].match;if(!o)throw"no regexp for type: "+t;var i=this.input.match(o);if(i){var n=this[e].call(this,i,this.grammar[t].lookbehind);return n.type=this.grammar[t].type||t,n}},proto.parse_phrases=function(e){var t=this.grammar[e].phrases;if(!t)return void this.receiver.text_node(this.input||"");for(;this.input.length;){for(var o=null,i=0;i<t.length;i++){var n=t[i],r=this.find_match("matched_phrase",n);if(r&&(!o||r.begin<o.begin)&&(o=r,0==o.begin))break}if(!o){this.receiver.text_node(this.input||"");break}0!=o.begin&&this.receiver.text_node(this.input.substr(0,o.begin)||""),this.input=this.input.substr(o.end),this.handle_match(o.type,o)}},proto.subparse=function(func,match,type,filter){match.type=this.grammar[type].type,null==match.type&&(match.type=type);var filtered_text=filter?filter(match):null;match.type&&this.receiver.begin_node(match);var parser=eval("new "+this.className+"()");parser.input=null==filtered_text?match.text:filtered_text,parser.grammar=this.grammar,parser.receiver=this.receiver.instantiate(),parser[func].call(parser,type),this.receiver.insert(parser.receiver),match.type&&this.receiver.end_node(match)},proto.matched_block=function(e){return{begin:e.index,text:e[1],end:e[0].length,1:e[2],2:e[3],3:e[4]}},proto.matched_phrase=function(e,t){if(t){var o=e[2],i=this.input.indexOf(e[1]);return{text:o,begin:i,end:i+e[1].length,1:RegExp.$2,2:RegExp.$3,3:RegExp.$4}}return{begin:e.index,text:e[1],end:e.index+e[0].length,1:e[2],2:e[3],3:e[4]}}}),Class("Document.Parser.Wikitext(Document.Parser)",function(){var e=this.prototype;e.className="Document.Parser.Wikitext",e.init=function(){},e.create_grammar=function(){var e=["pre","html","hr","hx","waflparagraph","ul","ol","blockquote","p","empty","else"],t=["waflphrase","asis","wikilink","wikilink2","a","im","mail","file","tt","b","i","del","a"],o=function(e,o){return o="\\"+(o||e),e="\\"+e,{match:new RegExp("(?:^|[^"+e+"\\w])("+e+"(?=\\S)(?!"+o+")(.*?)"+o+"(?=[^"+o+"\\w]|$))"),phrases:"\\`"==e?null:t,lookbehind:!0}},i={yahoo:"yahoo",ymsgr:"yahoo",callto:"callto",callme:"callto",skype:"callto",aim:"aim"},n={aim:"AIM: %1",yahoo:"Yahoo: %1",callto:"Skype: %1"},r="(\\b(";for(var a in i)r+=a+"|";r=r.replace(/\|$/,")\\:([^\\s\\>\\)]+))");var s=function(e,t){var o=new RegExp("(^|\n)"+t+" *","g");return{match:new RegExp("^("+e+"+ .*\n(?:[*-+#]+ .*\n)*)(?:s*\n)?"),blocks:["ul","ol","subl","li"],filter:function(e){return e.text.replace(o,"$1")}}};return{_all_blocks:e,_all_phrases:t,top:{blocks:e},ol:s("#","[*#]"),ul:s("[-+*]","[-+*#]"),blockquote:{match:/^((?:>[^\n]*\n)+)(?:\s*\n)?/,blocks:["blockquote","line"],filter:function(e){return e.text.replace(/(^|\n)>\ ?/g,"$1")}},line:{match:/([^\n]*)\n/,phrases:t},subl:{type:"li",match:/^(([^\n]*)\n[*#]+\ [^\n]*\n(?:[*#]+\ [^\n]*\n)*)(?:\s*\n)?/,blocks:["ul","ol","li2"]},li:{match:/([^\n]*)\n/,phrases:t},li2:{type:"",match:/([^\n]*)\n/,phrases:t},html:{match:/^(\.html\ *\n(?:[^\n]*\n)*?\.html)\ *\n(?:\s*\n)?/,filter:function(e){return e._html=e.text,""}},pre:{match:/^\.pre\ *\n((?:[^\n]*\n)*?)\.pre\ *\n(?:\s*\n)?/},hr:{match:/^--+(?:\s*\n)?/},hx:{match:/^((\^+) *([^\n]*?)(\s+=+)?\s*?\n+)/,phrases:t,filter:function(e){return e.type="h"+e[1].length,e[2]}},p:{match:/^((?:(?!(?:(?:\^+|\#+|\*+|\-+) |\>|\.\w+\s*\n|\{[^\}]+\}\s*\n))[^\n]*\S[^\n]*\n)+(?:(?=^|\n)\s*\n)*)/,phrases:t,filter:function(e){return e.text.replace(/\n$/,"")}},empty:{match:/^(\s*\n)/,filter:function(e){e.type=""}},"else":{match:/^(([^\n]*)\n)/,phrases:[],filter:function(e){e.type="p"}},waflparagraph:{match:/^\{(.*)\}[\ \t]*\n(?:\s*\n)?/,filter:function(e){return e._wafl=e._label=e.text,""}},waflphrase:{match:/(?:^|[\s\-])((?:"([^\n]+?)")?\{([\w-]+(?=[\:\ \}])(?:\s*:)?\s*[^\n]*?\s*)\}(?=[\W_]|$))/,filter:function(e){return e._wafl=e[2],e._label=e[1]||e._wafl,""},lookbehind:!0},asis:{match:/(\{\{([^\n]*?)\}\}(\}*))/,filter:function(e){return e.type="",e[1]+e[2]}},wikilink:{match:/(?:^|[_\W])(\[()(?=[^\s\[\]])(.*?)\](?=[_\W]|$))/,filter:function(e){return e._href="?"+e[2],e.text||e[2]},lookbehind:!0},wikilink2:{type:"wikilink",match:/(?:"([^"]*)"\s*)(\[(?=[^\s\[\]])(.*?)\](?=[_\W]|$))/,filter:function(e){return e._href="?"+e[2],e[1]||e[2]}},a:{match:/((?:"([^"]*)"\s*)?<?((?:http|https|ftp|irc|file):(?:\/\/)?[\;\/\?\:\@\&\=\+\$\,\[\]\#A-Za-z0-9\-\_\.\!\~\*\'\(\)]+[A-Za-z0-9\/#])>?)/,filter:function(e){return e._href=e[2],e[1]||e[2]}},file:{match:/((?:"([^"]*)")?<(\\\\[^\s\>\)]+)>)/,filter:function(e){var t=e[2].replace(/^\\\\/,"");return e._href="file://"+t.replace(/\\/g,"/"),e[1]||t}},im:{match:new RegExp(r),filter:function(e){return e._wafl=e[1]+": "+e[2],e._label=(n[i[e[1]]]||"%1").replace(/%1/g,e[2]),""}},mail:{match:/([\w+%\-\.]+@(?:[\w\-]+\.)+[\w\-]+)/,filter:function(e){e.type="a",e._href="mailto:"+e.text.replace(/%/g,"%25")}},tt:o("`"),b:o("*"),i:o("_"),del:o("-")}}}),!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function o(e){var t=e.length,o=rt.type(e);return"function"===o||rt.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===o||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,o){if(rt.isFunction(t))return rt.grep(e,function(e,i){return!!t.call(e,i,e)!==o});if(t.nodeType)return rt.grep(e,function(e){return e===t!==o});if("string"==typeof t){if(pt.test(t))return rt.filter(t,e,o);t=rt.filter(t,e)}return rt.grep(e,function(e){return rt.inArray(e,t)>=0!==o})}function n(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t=wt[e]={};return rt.each(e.match(Ct)||[],function(e,o){t[o]=!0}),t}function a(){mt.addEventListener?(mt.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(mt.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(mt.addEventListener||"load"===event.type||"complete"===mt.readyState)&&(a(),rt.ready())}function l(e,t,o){if(void 0===o&&1===e.nodeType){var i="data-"+t.replace(Tt,"-$1").toLowerCase();if(o=e.getAttribute(i),"string"==typeof o){try{o="true"===o?!0:"false"===o?!1:"null"===o?null:+o+""===o?+o:kt.test(o)?rt.parseJSON(o):o}catch(n){}rt.data(e,t,o)}else o=void 0}return o}function c(e){var t;for(t in e)if(("data"!==t||!rt.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,o,i){if(rt.acceptData(e)){var n,r,a=rt.expando,s=e.nodeType,l=s?rt.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==o||"string"!=typeof t)return c||(c=s?e[a]=K.pop()||rt.guid++:a),l[c]||(l[c]=s?{}:{toJSON:rt.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=rt.extend(l[c],t):l[c].data=rt.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==o&&(r[rt.camelCase(t)]=o),"string"==typeof t?(n=r[t],null==n&&(n=r[rt.camelCase(t)])):n=r,n}}function d(e,t,o){if(rt.acceptData(e)){var i,n,r=e.nodeType,a=r?rt.cache:e,s=r?e[rt.expando]:rt.expando;if(a[s]){if(t&&(i=o?a[s]:a[s].data)){rt.isArray(t)?t=t.concat(rt.map(t,rt.camelCase)):t in i?t=[t]:(t=rt.camelCase(t),t=t in i?[t]:t.split(" ")),n=t.length;for(;n--;)delete i[t[n]];if(o?!c(i):!rt.isEmptyObject(i))return}(o||(delete a[s].data,c(a[s])))&&(r?rt.cleanData([e],!0):it.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function h(){return!0}function p(){return!1}function f(){try{return mt.activeElement}catch(e){}}function m(e){var t=Ot.split("|"),o=e.createDocumentFragment();if(o.createElement)for(;t.length;)o.createElement(t.pop());return o}function g(e,t){var o,i,n=0,r=typeof e.getElementsByTagName!==St?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==St?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],o=e.childNodes||e;null!=(i=o[n]);n++)!t||rt.nodeName(i,t)?r.push(i):rt.merge(r,g(i,t));return void 0===t||t&&rt.nodeName(e,t)?rt.merge([e],r):r}function v(e){At.test(e.type)&&(e.defaultChecked=e.checked)}function b(e,t){return rt.nodeName(e,"table")&&rt.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function y(e){return e.type=(null!==rt.find.attr(e,"type"))+"/"+e.type,e}function C(e){var t=Kt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var o,i=0;null!=(o=e[i]);i++)rt._data(o,"globalEval",!t||rt._data(t[i],"globalEval"))}function x(e,t){if(1===t.nodeType&&rt.hasData(e)){var o,i,n,r=rt._data(e),a=rt._data(t,r),s=r.events;if(s){delete a.handle,a.events={};for(o in s)for(i=0,n=s[o].length;n>i;i++)rt.event.add(t,o,s[o][i])}a.data&&(a.data=rt.extend({},a.data))}}function _(e,t){var o,i,n;if(1===t.nodeType){if(o=t.nodeName.toLowerCase(),!it.noCloneEvent&&t[rt.expando]){n=rt._data(t);for(i in n.events)rt.removeEvent(t,i,n.handle);t.removeAttribute(rt.expando)}"script"===o&&t.text!==e.text?(y(t).text=e.text,C(t)):"object"===o?(t.parentNode&&(t.outerHTML=e.outerHTML),it.html5Clone&&e.innerHTML&&!rt.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===o&&At.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===o?t.defaultSelected=t.selected=e.defaultSelected:("input"===o||"textarea"===o)&&(t.defaultValue=e.defaultValue)}}function S(t,o){var i=rt(o.createElement(t)).appendTo(o.body),n=e.getDefaultComputedStyle?e.getDefaultComputedStyle(i[0]).display:rt.css(i[0],"display");return i.detach(),n}function k(e){var t=mt,o=eo[e];return o||(o=S(e,t),"none"!==o&&o||(Qt=(Qt||rt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Qt[0].contentWindow||Qt[0].contentDocument).document,t.write(),t.close(),o=S(e,t),Qt.detach()),eo[e]=o),o}function T(e,t){return{get:function(){var o=e();return null!=o?o?void delete this.get:(this.get=t).apply(this,arguments):void 0}}}function F(e,t){if(t in e)return t;for(var o=t.charAt(0).toUpperCase()+t.slice(1),i=t,n=fo.length;n--;)if(t=fo[n]+o,t in e)return t;return i}function E(e,t){for(var o,i,n,r=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(r[a]=rt._data(i,"olddisplay"),o=i.style.display,t?(r[a]||"none"!==o||(i.style.display=""),""===i.style.display&&Dt(i)&&(r[a]=rt._data(i,"olddisplay",k(i.nodeName)))):r[a]||(n=Dt(i),(o&&"none"!==o||!n)&&rt._data(i,"olddisplay",n?o:rt.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[a]||"":"none"));return e}function D(e,t,o){var i=co.exec(t);return i?Math.max(0,i[1]-(o||0))+(i[2]||"px"):t}function P(e,t,o,i,n){for(var r=o===(i?"border":"content")?4:"width"===t?1:0,a=0;4>r;r+=2)"margin"===o&&(a+=rt.css(e,o+Et[r],!0,n)),i?("content"===o&&(a-=rt.css(e,"padding"+Et[r],!0,n)),"margin"!==o&&(a-=rt.css(e,"border"+Et[r]+"Width",!0,n))):(a+=rt.css(e,"padding"+Et[r],!0,n),"padding"!==o&&(a+=rt.css(e,"border"+Et[r]+"Width",!0,n)));return a}function A(e,t,o){var i=!0,n="width"===t?e.offsetWidth:e.offsetHeight,r=to(e),a=it.boxSizing()&&"border-box"===rt.css(e,"boxSizing",!1,r);if(0>=n||null==n){if(n=oo(e,t,r),(0>n||null==n)&&(n=e.style[t]),no.test(n))return n;i=a&&(it.boxSizingReliable()||n===e.style[t]),n=parseFloat(n)||0}return n+P(e,t,o||(a?"border":"content"),i,r)+"px"}function I(e,t,o,i,n){return new I.prototype.init(e,t,o,i,n)}function M(){return setTimeout(function(){mo=void 0}),mo=rt.now()}function R(e,t){var o,i={height:e},n=0;for(t=t?1:0;4>n;n+=2-t)o=Et[n],i["margin"+o]=i["padding"+o]=e;return t&&(i.opacity=i.width=e),i}function N(e,t,o){for(var i,n=(wo[t]||[]).concat(wo["*"]),r=0,a=n.length;a>r;r++)if(i=n[r].call(o,t,e))return i}function L(e,t,o){var i,n,r,a,s,l,c,u,d=this,h={},p=e.style,f=e.nodeType&&Dt(e),m=rt._data(e,"fxshow");o.queue||(s=rt._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,rt.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(o.overflow=[p.overflow,p.overflowX,p.overflowY],c=rt.css(e,"display"),u=k(e.nodeName),"none"===c&&(c=u),"inline"===c&&"none"===rt.css(e,"float")&&(it.inlineBlockNeedsLayout&&"inline"!==u?p.zoom=1:p.display="inline-block")),o.overflow&&(p.overflow="hidden",it.shrinkWrapBlocks()||d.always(function(){p.overflow=o.overflow[0],p.overflowX=o.overflow[1],p.overflowY=o.overflow[2]}));for(i in t)if(n=t[i],vo.exec(n)){if(delete t[i],r=r||"toggle"===n,n===(f?"hide":"show")){if("show"!==n||!m||void 0===m[i])continue;f=!0}h[i]=m&&m[i]||rt.style(e,i)}if(!rt.isEmptyObject(h)){m?"hidden"in m&&(f=m.hidden):m=rt._data(e,"fxshow",{}),r&&(m.hidden=!f),f?rt(e).show():d.done(function(){rt(e).hide()}),d.done(function(){var t;rt._removeData(e,"fxshow");for(t in h)rt.style(e,t,h[t])});for(i in h)a=N(f?m[i]:0,i,d),i in m||(m[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function O(e,t){var o,i,n,r,a;for(o in e)if(i=rt.camelCase(o),n=t[i],r=e[o],rt.isArray(r)&&(n=r[1],r=e[o]=r[0]),o!==i&&(e[i]=r,delete e[o]),a=rt.cssHooks[i],a&&"expand"in a){r=a.expand(r),delete e[i];for(o in r)o in e||(e[o]=r[o],t[o]=n)}else t[i]=n}function z(e,t,o){var i,n,r=0,a=Co.length,s=rt.Deferred().always(function(){delete l.elem}),l=function(){if(n)return!1;for(var t=mo||M(),o=Math.max(0,c.startTime+c.duration-t),i=o/c.duration||0,r=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(r);return s.notifyWith(e,[c,r,o]),1>r&&l?o:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:rt.extend({},t),opts:rt.extend(!0,{specialEasing:{}},o),originalProperties:t,originalOptions:o,startTime:mo||M(),duration:o.duration,tweens:[],createTween:function(t,o){var i=rt.Tween(e,c.opts,t,o,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var o=0,i=t?c.tweens.length:0;if(n)return this;for(n=!0;i>o;o++)c.tweens[o].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(O(u,c.opts.specialEasing);a>r;r++)if(i=Co[r].call(c,e,u,c.opts))return i;return rt.map(u,N,c),rt.isFunction(c.opts.start)&&c.opts.start.call(e,c),rt.fx.timer(rt.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function H(e){return function(t,o){"string"!=typeof t&&(o=t,t="*");var i,n=0,r=t.toLowerCase().match(Ct)||[];if(rt.isFunction(o))for(;i=r[n++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(o)):(e[i]=e[i]||[]).push(o)}}function B(e,t,o,i){function n(s){var l;return r[s]=!0,rt.each(e[s]||[],function(e,s){var c=s(t,o,i);return"string"!=typeof c||a||r[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),n(c),!1)}),l}var r={},a=e===Go;return n(t.dataTypes[0])||!r["*"]&&n("*")}function U(e,t){var o,i,n=rt.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((n[i]?e:o||(o={}))[i]=t[i]);return o&&rt.extend(!0,e,o),e}function j(e,t,o){for(var i,n,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(a in s)if(s[a]&&s[a].test(n)){l.unshift(a);break}if(l[0]in o)r=l[0];else{for(a in o){if(!l[0]||e.converters[a+" "+l[0]]){r=a;break}i||(i=a)}r=r||i}return r?(r!==l[0]&&l.unshift(r),o[r]):void 0}function V(e,t,o,i){var n,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(o[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(a=c[l+" "+r]||c["* "+r],!a)for(n in c)if(s=n.split(" "),s[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[n]:c[n]!==!0&&(r=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function W(e,t,o,i){var n;if(rt.isArray(t))rt.each(t,function(t,n){o||qo.test(e)?i(e,n):W(e+"["+("object"==typeof n?t:"")+"]",n,o,i)});else if(o||"object"!==rt.type(t))i(e,t);else for(n in t)W(e+"["+n+"]",t[n],o,i)}function G(){try{return new e.XMLHttpRequest}catch(t){}}function $(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Y(e){return rt.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var K=[],q=K.slice,X=K.concat,J=K.push,Z=K.indexOf,Q={},et=Q.toString,tt=Q.hasOwnProperty,ot="".trim,it={},nt="1.11.0",rt=function(e,t){return new rt.fn.init(e,t)},at=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,st=/^-ms-/,lt=/-([\da-z])/gi,ct=function(e,t){return t.toUpperCase()};rt.fn=rt.prototype={jquery:nt,constructor:rt,selector:"",length:0,toArray:function(){return q.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:q.call(this)},pushStack:function(e){var t=rt.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return rt.each(this,e,t)},map:function(e){return this.pushStack(rt.map(this,function(t,o){return e.call(t,o,t)}))},slice:function(){return this.pushStack(q.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,o=+e+(0>e?t:0);return this.pushStack(o>=0&&t>o?[this[o]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:J,sort:K.sort,splice:K.splice},rt.extend=rt.fn.extend=function(){var e,t,o,i,n,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||rt.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(n=arguments[s]))for(i in n)e=a[i],o=n[i],a!==o&&(c&&o&&(rt.isPlainObject(o)||(t=rt.isArray(o)))?(t?(t=!1,r=e&&rt.isArray(e)?e:[]):r=e&&rt.isPlainObject(e)?e:{},a[i]=rt.extend(c,r,o)):void 0!==o&&(a[i]=o));return a},rt.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===rt.type(e)},isArray:Array.isArray||function(e){return"array"===rt.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==rt.type(e)||e.nodeType||rt.isWindow(e))return!1;try{if(e.constructor&&!tt.call(e,"constructor")&&!tt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(o){return!1}if(it.ownLast)for(t in e)return tt.call(e,t);for(t in e);return void 0===t||tt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[et.call(e)]||"object":typeof e},globalEval:function(t){t&&rt.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(st,"ms-").replace(lt,ct)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var n,r=0,a=e.length,s=o(e);if(i){if(s)for(;a>r&&(n=t.apply(e[r],i),n!==!1);r++);else for(r in e)if(n=t.apply(e[r],i),n===!1)break}else if(s)for(;a>r&&(n=t.call(e[r],r,e[r]),n!==!1);r++);else for(r in e)if(n=t.call(e[r],r,e[r]),n===!1)break;return e},trim:ot&&!ot.call(" ")?function(e){return null==e?"":ot.call(e)}:function(e){return null==e?"":(e+"").replace(at,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(o(Object(e))?rt.merge(i,"string"==typeof e?[e]:e):J.call(i,e)),i},inArray:function(e,t,o){var i;if(t){if(Z)return Z.call(t,e,o);for(i=t.length,o=o?0>o?Math.max(0,i+o):o:0;i>o;o++)if(o in t&&t[o]===e)return o}return-1},merge:function(e,t){for(var o=+t.length,i=0,n=e.length;o>i;)e[n++]=t[i++];if(o!==o)for(;void 0!==t[i];)e[n++]=t[i++];return e.length=n,e},grep:function(e,t,o){for(var i,n=[],r=0,a=e.length,s=!o;a>r;r++)i=!t(e[r],r),i!==s&&n.push(e[r]);return n},map:function(e,t,i){var n,r=0,a=e.length,s=o(e),l=[];if(s)for(;a>r;r++)n=t(e[r],r,i),null!=n&&l.push(n);else for(r in e)n=t(e[r],r,i),null!=n&&l.push(n);return X.apply([],l)},guid:1,proxy:function(e,t){var o,i,n;return"string"==typeof t&&(n=e[t],t=e,e=n),rt.isFunction(e)?(o=q.call(arguments,2),i=function(){return e.apply(t||this,o.concat(q.call(arguments)))},i.guid=e.guid=e.guid||rt.guid++,i):void 0},now:function(){return+new Date},support:it}),rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()});var ut=function(e){function t(e,t,o,i){var n,r,a,s,l,c,d,f,m,g;if((t?t.ownerDocument||t:B)!==I&&A(t),t=t||I,o=o||[],!e||"string"!=typeof e)return o;if(1!==(s=t.nodeType)&&9!==s)return[];if(R&&!i){if(n=bt.exec(e))if(a=n[1]){if(9===s){if(r=t.getElementById(a),!r||!r.parentNode)return o;if(r.id===a)return o.push(r),o}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(a))&&z(t,r)&&r.id===a)return o.push(r),o}else{if(n[2])return Q.apply(o,t.getElementsByTagName(e)),o;if((a=n[3])&&_.getElementsByClassName&&t.getElementsByClassName)return Q.apply(o,t.getElementsByClassName(a)),o}if(_.qsa&&(!N||!N.test(e))){if(f=d=H,m=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=h(e),(d=t.getAttribute("id"))?f=d.replace(Ct,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+p(c[l]);m=yt.test(e)&&u(t.parentNode)||t,g=c.join(",")}if(g)try{return Q.apply(o,m.querySelectorAll(g)),o}catch(v){}finally{d||t.removeAttribute("id")}}}return w(e.replace(lt,"$1"),t,o,i)}function o(){function e(o,i){return t.push(o+" ")>S.cacheLength&&delete e[t.shift()],e[o+" "]=i}var t=[];return e}function i(e){return e[H]=!0,e}function n(e){var t=I.createElement("div");try{return!!e(t)}catch(o){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var o=e.split("|"),i=e.length;i--;)S.attrHandle[o[i]]=t}function a(e,t){var o=t&&e,i=o&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)return i;if(o)for(;o=o.nextSibling;)if(o===t)return-1;return e?1:-1}function s(e){return function(t){var o=t.nodeName.toLowerCase();return"input"===o&&t.type===e}}function l(e){return function(t){var o=t.nodeName.toLowerCase();return("input"===o||"button"===o)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(o,i){for(var n,r=e([],o.length,t),a=r.length;a--;)o[n=r[a]]&&(o[n]=!(i[n]=o[n]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function h(e,o){var i,n,r,a,s,l,c,u=W[e+" "];if(u)return o?0:u.slice(0);for(s=e,l=[],c=S.preFilter;s;){(!i||(n=ct.exec(s)))&&(n&&(s=s.slice(n[0].length)||s),l.push(r=[])),i=!1,(n=ut.exec(s))&&(i=n.shift(),r.push({value:i,type:n[0].replace(lt," ")}),s=s.slice(i.length));for(a in S.filter)!(n=ft[a].exec(s))||c[a]&&!(n=c[a](n))||(i=n.shift(),r.push({value:i,type:a,matches:n}),s=s.slice(i.length));if(!i)break}return o?s.length:s?t.error(e):W(e,l).slice(0)}function p(e){for(var t=0,o=e.length,i="";o>t;t++)i+=e[t].value;return i}function f(e,t,o){var i=t.dir,n=o&&"parentNode"===i,r=j++;return t.first?function(t,o,r){for(;t=t[i];)if(1===t.nodeType||n)return e(t,o,r)}:function(t,o,a){var s,l,c=[U,r];if(a){for(;t=t[i];)if((1===t.nodeType||n)&&e(t,o,a))return!0}else for(;t=t[i];)if(1===t.nodeType||n){if(l=t[H]||(t[H]={}),(s=l[i])&&s[0]===U&&s[1]===r)return c[2]=s[2];if(l[i]=c,c[2]=e(t,o,a))return!0}}}function m(e){return e.length>1?function(t,o,i){for(var n=e.length;n--;)if(!e[n](t,o,i))return!1;return!0}:e[0]}function g(e,t,o,i,n){for(var r,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(r=e[s])&&(!o||o(r,i,n))&&(a.push(r),c&&t.push(s));return a}function v(e,t,o,n,r,a){return n&&!n[H]&&(n=v(n)),r&&!r[H]&&(r=v(r,a)),i(function(i,a,s,l){var c,u,d,h=[],p=[],f=a.length,m=i||C(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?m:g(m,h,e,s,l),b=o?r||(i?e:f||n)?[]:a:v;if(o&&o(v,b,s,l),n)for(c=g(b,p),n(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[p[u]]=!(v[p[u]]=d));if(i){if(r||e){if(r){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);r(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=r?tt.call(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else b=g(b===a?b.splice(f,b.length):b),r?r(null,a,b,l):Q.apply(a,b)})}function b(e){for(var t,o,i,n=e.length,r=S.relative[e[0].type],a=r||S.relative[" "],s=r?1:0,l=f(function(e){return e===t},a,!0),c=f(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,o,i){return!r&&(i||o!==E)||((t=o).nodeType?l(e,o,i):c(e,o,i))}];n>s;s++)if(o=S.relative[e[s].type])u=[f(m(u),o)];else{if(o=S.filter[e[s].type].apply(null,e[s].matches),o[H]){for(i=++s;n>i&&!S.relative[e[i].type];i++);return v(s>1&&m(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(lt,"$1"),o,i>s&&b(e.slice(s,i)),n>i&&b(e=e.slice(i)),n>i&&p(e))}u.push(o)}return m(u)}function y(e,o){var n=o.length>0,r=e.length>0,a=function(i,a,s,l,c){var u,d,h,p=0,f="0",m=i&&[],v=[],b=E,y=i||r&&S.find.TAG("*",c),C=U+=null==b?1:Math.random()||.1,w=y.length;for(c&&(E=a!==I&&a);f!==w&&null!=(u=y[f]);f++){if(r&&u){for(d=0;h=e[d++];)if(h(u,a,s)){l.push(u);break}c&&(U=C)}n&&((u=!h&&u)&&p--,i&&m.push(u))}if(p+=f,n&&f!==p){for(d=0;h=o[d++];)h(m,v,a,s);if(i){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=J.call(l));v=g(v)}Q.apply(l,v),c&&!i&&v.length>0&&p+o.length>1&&t.uniqueSort(l)}return c&&(U=C,E=b),m};return n?i(a):a}function C(e,o,i){for(var n=0,r=o.length;r>n;n++)t(e,o[n],i);return i}function w(e,t,o,i){var n,r,a,s,l,c=h(e);if(!i&&1===c.length){if(r=c[0]=c[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&_.getById&&9===t.nodeType&&R&&S.relative[r[1].type]){if(t=(S.find.ID(a.matches[0].replace(wt,xt),t)||[])[0],!t)return o;e=e.slice(r.shift().value.length)}for(n=ft.needsContext.test(e)?0:r.length;n--&&(a=r[n],!S.relative[s=a.type]);)if((l=S.find[s])&&(i=l(a.matches[0].replace(wt,xt),yt.test(r[0].type)&&u(t.parentNode)||t))){if(r.splice(n,1),e=i.length&&p(r),!e)return Q.apply(o,i),o;break}}return F(e,c)(i,t,!R,o,yt.test(e)&&u(t.parentNode)||t),o}var x,_,S,k,T,F,E,D,P,A,I,M,R,N,L,O,z,H="sizzle"+-new Date,B=e.document,U=0,j=0,V=o(),W=o(),G=o(),$=function(e,t){return e===t&&(P=!0),0},Y="undefined",K=1<<31,q={}.hasOwnProperty,X=[],J=X.pop,Z=X.push,Q=X.push,et=X.slice,tt=X.indexOf||function(e){for(var t=0,o=this.length;o>t;t++)if(this[t]===e)return t;return-1},ot="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt=nt.replace("w","w#"),at="\\["+it+"*("+nt+")"+it+"*(?:([*^$|!~]?=)"+it+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+rt+")|)|)"+it+"*\\]",st=":("+nt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),ct=new RegExp("^"+it+"*,"+it+"*"),ut=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),dt=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),ht=new RegExp(st),pt=new RegExp("^"+rt+"$"),ft={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),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("^(?:"+ot+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},mt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,bt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,Ct=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),xt=function(e,t,o){var i="0x"+t-65536;return i!==i||o?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Q.apply(X=et.call(B.childNodes),B.childNodes),X[B.childNodes.length].nodeType}catch(_t){Q={apply:X.length?function(e,t){Z.apply(e,et.call(t))}:function(e,t){for(var o=e.length,i=0;e[o++]=t[i++];);e.length=o-1}}}_=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},A=t.setDocument=function(e){var t,o=e?e.ownerDocument||e:B,i=o.defaultView;return o!==I&&9===o.nodeType&&o.documentElement?(I=o,M=o.documentElement,R=!T(o),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){A()},!1):i.attachEvent&&i.attachEvent("onunload",function(){A()})),_.attributes=n(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=n(function(e){return e.appendChild(o.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=vt.test(o.getElementsByClassName)&&n(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),_.getById=n(function(e){return M.appendChild(e).id=H,!o.getElementsByName||!o.getElementsByName(H).length}),_.getById?(S.find.ID=function(e,t){if(typeof t.getElementById!==Y&&R){var o=t.getElementById(e);return o&&o.parentNode?[o]:[]}},S.filter.ID=function(e){var t=e.replace(wt,xt);return function(e){return e.getAttribute("id")===t}}):(delete S.find.ID,S.filter.ID=function(e){var t=e.replace(wt,xt);return function(e){var o=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return o&&o.value===t}}),S.find.TAG=_.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var o,i=[],n=0,r=t.getElementsByTagName(e);if("*"===e){for(;o=r[n++];)1===o.nodeType&&i.push(o);return i}return r},S.find.CLASS=_.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==Y&&R?t.getElementsByClassName(e):void 0},L=[],N=[],(_.qsa=vt.test(o.querySelectorAll))&&(n(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&N.push("[*^$]="+it+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||N.push("\\["+it+"*(?:value|"+ot+")"),e.querySelectorAll(":checked").length||N.push(":checked")}),n(function(e){var t=o.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&N.push("name"+it+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||N.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),N.push(",.*:")
16})),(_.matchesSelector=vt.test(O=M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&n(function(e){_.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),L.push("!=",st)}),N=N.length&&new RegExp(N.join("|")),L=L.length&&new RegExp(L.join("|")),t=vt.test(M.compareDocumentPosition),z=t||vt.test(M.contains)?function(e,t){var o=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(o.contains?o.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=t?function(e,t){if(e===t)return P=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!_.sortDetached&&t.compareDocumentPosition(e)===i?e===o||e.ownerDocument===B&&z(B,e)?-1:t===o||t.ownerDocument===B&&z(B,t)?1:D?tt.call(D,e)-tt.call(D,t):0:4&i?-1:1)}:function(e,t){if(e===t)return P=!0,0;var i,n=0,r=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!r||!s)return e===o?-1:t===o?1:r?-1:s?1:D?tt.call(D,e)-tt.call(D,t):0;if(r===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[n]===c[n];)n++;return n?a(l[n],c[n]):l[n]===B?-1:c[n]===B?1:0},o):I},t.matches=function(e,o){return t(e,null,null,o)},t.matchesSelector=function(e,o){if((e.ownerDocument||e)!==I&&A(e),o=o.replace(dt,"='$1']"),!(!_.matchesSelector||!R||L&&L.test(o)||N&&N.test(o)))try{var i=O.call(e,o);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(n){}return t(o,I,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==I&&A(e),z(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==I&&A(e);var o=S.attrHandle[t.toLowerCase()],i=o&&q.call(S.attrHandle,t.toLowerCase())?o(e,t,!R):void 0;return void 0!==i?i:_.attributes||!R?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,o=[],i=0,n=0;if(P=!_.detectDuplicates,D=!_.sortStable&&e.slice(0),e.sort($),P){for(;t=e[n++];)t===e[n]&&(i=o.push(n));for(;i--;)e.splice(o[i],1)}return D=null,e},k=t.getText=function(e){var t,o="",i=0,n=e.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)o+=k(e)}else if(3===n||4===n)return e.nodeValue}else for(;t=e[i++];)o+=k(t);return o},S=t.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,xt),e[3]=(e[4]||e[5]||"").replace(wt,xt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,o=!e[5]&&e[2];return ft.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:o&&ht.test(o)&&(t=h(o,!0))&&(t=o.indexOf(")",o.length-t)-o.length)&&(e[0]=e[0].slice(0,t),e[2]=o.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(wt,xt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+it+")"+e+"("+it+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(e,o,i){return function(n){var r=t.attr(n,e);return null==r?"!="===o:o?(r+="","="===o?r===i:"!="===o?r!==i:"^="===o?i&&0===r.indexOf(i):"*="===o?i&&r.indexOf(i)>-1:"$="===o?i&&r.slice(-i.length)===i:"~="===o?(" "+r+" ").indexOf(i)>-1:"|="===o?r===i||r.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,o,i,n){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===n?function(e){return!!e.parentNode}:function(t,o,l){var c,u,d,h,p,f,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s;if(g){if(r){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&b){for(u=g[H]||(g[H]={}),c=u[e]||[],p=c[0]===U&&c[1],h=c[0]===U&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(h=p=0)||f.pop();)if(1===d.nodeType&&++h&&d===t){u[e]=[U,p,h];break}}else if(b&&(c=(t[H]||(t[H]={}))[e])&&c[0]===U)h=c[1];else for(;(d=++p&&d&&d[m]||(h=p=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(b&&((d[H]||(d[H]={}))[e]=[U,h]),d!==t)););return h-=n,h===i||h%i===0&&h/i>=0}}},PSEUDO:function(e,o){var n,r=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[H]?r(o):r.length>1?(n=[e,e,"",o],S.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,n=r(e,o),a=n.length;a--;)i=tt.call(e,n[a]),e[i]=!(t[i]=n[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],o=[],n=F(e.replace(lt,"$1"));return n[H]?i(function(e,t,o,i){for(var r,a=n(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,n(t,null,r,o),!o.pop()}}),has:i(function(e){return function(o){return t(e,o).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return pt.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(wt,xt).toLowerCase(),function(t){var o;do if(o=R?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return o=o.toLowerCase(),o===e||0===o.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var o=e.location&&e.location.hash;return o&&o.slice(1)===t.id},root:function(e){return e===M},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return gt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,o){return[0>o?o+t:o]}),even:c(function(e,t){for(var o=0;t>o;o+=2)e.push(o);return e}),odd:c(function(e,t){for(var o=1;t>o;o+=2)e.push(o);return e}),lt:c(function(e,t,o){for(var i=0>o?o+t:o;--i>=0;)e.push(i);return e}),gt:c(function(e,t,o){for(var i=0>o?o+t:o;++i<t;)e.push(i);return e})}},S.pseudos.nth=S.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})S.pseudos[x]=l(x);return d.prototype=S.filters=S.pseudos,S.setFilters=new d,F=t.compile=function(e,t){var o,i=[],n=[],r=G[e+" "];if(!r){for(t||(t=h(e)),o=t.length;o--;)r=b(t[o]),r[H]?i.push(r):n.push(r);r=G(e,y(n,i))}return r},_.sortStable=H.split("").sort($).join("")===H,_.detectDuplicates=!!P,A(),_.sortDetached=n(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),n(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,o){return o?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&n(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,o){return o||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),n(function(e){return null==e.getAttribute("disabled")})||r(ot,function(e,t,o){var i;return o?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);rt.find=ut,rt.expr=ut.selectors,rt.expr[":"]=rt.expr.pseudos,rt.unique=ut.uniqueSort,rt.text=ut.getText,rt.isXMLDoc=ut.isXML,rt.contains=ut.contains;var dt=rt.expr.match.needsContext,ht=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pt=/^.[^:#\[\.,]*$/;rt.filter=function(e,t,o){var i=t[0];return o&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?rt.find.matchesSelector(i,e)?[i]:[]:rt.find.matches(e,rt.grep(t,function(e){return 1===e.nodeType}))},rt.fn.extend({find:function(e){var t,o=[],i=this,n=i.length;if("string"!=typeof e)return this.pushStack(rt(e).filter(function(){for(t=0;n>t;t++)if(rt.contains(i[t],this))return!0}));for(t=0;n>t;t++)rt.find(e,i[t],o);return o=this.pushStack(n>1?rt.unique(o):o),o.selector=this.selector?this.selector+" "+e:e,o},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&dt.test(e)?rt(e):e||[],!1).length}});var ft,mt=e.document,gt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,vt=rt.fn.init=function(e,t){var o,i;if(!e)return this;if("string"==typeof e){if(o="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:gt.exec(e),!o||!o[1]&&t)return!t||t.jquery?(t||ft).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof rt?t[0]:t,rt.merge(this,rt.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:mt,!0)),ht.test(o[1])&&rt.isPlainObject(t))for(o in t)rt.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}if(i=mt.getElementById(o[2]),i&&i.parentNode){if(i.id!==o[2])return ft.find(e);this.length=1,this[0]=i}return this.context=mt,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):rt.isFunction(e)?"undefined"!=typeof ft.ready?ft.ready(e):e(rt):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),rt.makeArray(e,this))};vt.prototype=rt.fn,ft=rt(mt);var bt=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};rt.extend({dir:function(e,t,o){for(var i=[],n=e[t];n&&9!==n.nodeType&&(void 0===o||1!==n.nodeType||!rt(n).is(o));)1===n.nodeType&&i.push(n),n=n[t];return i},sibling:function(e,t){for(var o=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&o.push(e);return o}}),rt.fn.extend({has:function(e){var t,o=rt(e,this),i=o.length;return this.filter(function(){for(t=0;i>t;t++)if(rt.contains(this,o[t]))return!0})},closest:function(e,t){for(var o,i=0,n=this.length,r=[],a=dt.test(e)||"string"!=typeof e?rt(e,t||this.context):0;n>i;i++)for(o=this[i];o&&o!==t;o=o.parentNode)if(o.nodeType<11&&(a?a.index(o)>-1:1===o.nodeType&&rt.find.matchesSelector(o,e))){r.push(o);break}return this.pushStack(r.length>1?rt.unique(r):r)},index:function(e){return e?"string"==typeof e?rt.inArray(this[0],rt(e)):rt.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(rt.unique(rt.merge(this.get(),rt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),rt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return rt.dir(e,"parentNode")},parentsUntil:function(e,t,o){return rt.dir(e,"parentNode",o)},next:function(e){return n(e,"nextSibling")},prev:function(e){return n(e,"previousSibling")},nextAll:function(e){return rt.dir(e,"nextSibling")},prevAll:function(e){return rt.dir(e,"previousSibling")},nextUntil:function(e,t,o){return rt.dir(e,"nextSibling",o)},prevUntil:function(e,t,o){return rt.dir(e,"previousSibling",o)},siblings:function(e){return rt.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return rt.sibling(e.firstChild)},contents:function(e){return rt.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:rt.merge([],e.childNodes)}},function(e,t){rt.fn[e]=function(o,i){var n=rt.map(this,t,o);return"Until"!==e.slice(-5)&&(i=o),i&&"string"==typeof i&&(n=rt.filter(i,n)),this.length>1&&(yt[e]||(n=rt.unique(n)),bt.test(e)&&(n=n.reverse())),this.pushStack(n)}});var Ct=/\S+/g,wt={};rt.Callbacks=function(e){e="string"==typeof e?wt[e]||r(e):rt.extend({},e);var t,o,i,n,a,s,l=[],c=!e.once&&[],u=function(r){for(o=e.memory&&r,i=!0,a=s||0,s=0,n=l.length,t=!0;l&&n>a;a++)if(l[a].apply(r[0],r[1])===!1&&e.stopOnFalse){o=!1;break}t=!1,l&&(c?c.length&&u(c.shift()):o?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function r(t){rt.each(t,function(t,o){var i=rt.type(o);"function"===i?e.unique&&d.has(o)||l.push(o):o&&o.length&&"string"!==i&&r(o)})}(arguments),t?n=l.length:o&&(s=i,u(o))}return this},remove:function(){return l&&rt.each(arguments,function(e,o){for(var i;(i=rt.inArray(o,l,i))>-1;)l.splice(i,1),t&&(n>=i&&n--,a>=i&&a--)}),this},has:function(e){return e?rt.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],n=0,this},disable:function(){return l=c=o=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,o||d.disable(),this},locked:function(){return!c},fireWith:function(e,o){return!l||i&&!c||(o=o||[],o=[e,o.slice?o.slice():o],t?c.push(o):u(o)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},rt.extend({Deferred:function(e){var t=[["resolve","done",rt.Callbacks("once memory"),"resolved"],["reject","fail",rt.Callbacks("once memory"),"rejected"],["notify","progress",rt.Callbacks("memory")]],o="pending",i={state:function(){return o},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var e=arguments;return rt.Deferred(function(o){rt.each(t,function(t,r){var a=rt.isFunction(e[t])&&e[t];n[r[1]](function(){var e=a&&a.apply(this,arguments);e&&rt.isFunction(e.promise)?e.promise().done(o.resolve).fail(o.reject).progress(o.notify):o[r[0]+"With"](this===i?o.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?rt.extend(e,i):i}},n={};return i.pipe=i.then,rt.each(t,function(e,r){var a=r[2],s=r[3];i[r[1]]=a.add,s&&a.add(function(){o=s},t[1^e][2].disable,t[2][2].lock),n[r[0]]=function(){return n[r[0]+"With"](this===n?i:this,arguments),this},n[r[0]+"With"]=a.fireWith}),i.promise(n),e&&e.call(n,n),n},when:function(e){var t,o,i,n=0,r=q.call(arguments),a=r.length,s=1!==a||e&&rt.isFunction(e.promise)?a:0,l=1===s?e:rt.Deferred(),c=function(e,o,i){return function(n){o[e]=this,i[e]=arguments.length>1?q.call(arguments):n,i===t?l.notifyWith(o,i):--s||l.resolveWith(o,i)}};if(a>1)for(t=new Array(a),o=new Array(a),i=new Array(a);a>n;n++)r[n]&&rt.isFunction(r[n].promise)?r[n].promise().done(c(n,i,r)).fail(l.reject).progress(c(n,o,t)):--s;return s||l.resolveWith(i,r),l.promise()}});var xt;rt.fn.ready=function(e){return rt.ready.promise().done(e),this},rt.extend({isReady:!1,readyWait:1,holdReady:function(e){e?rt.readyWait++:rt.ready(!0)},ready:function(e){if(e===!0?!--rt.readyWait:!rt.isReady){if(!mt.body)return setTimeout(rt.ready);rt.isReady=!0,e!==!0&&--rt.readyWait>0||(xt.resolveWith(mt,[rt]),rt.fn.trigger&&rt(mt).trigger("ready").off("ready"))}}}),rt.ready.promise=function(t){if(!xt)if(xt=rt.Deferred(),"complete"===mt.readyState)setTimeout(rt.ready);else if(mt.addEventListener)mt.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{mt.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var o=!1;try{o=null==e.frameElement&&mt.documentElement}catch(i){}o&&o.doScroll&&!function n(){if(!rt.isReady){try{o.doScroll("left")}catch(e){return setTimeout(n,50)}a(),rt.ready()}}()}return xt.promise(t)};var _t,St="undefined";for(_t in rt(it))break;it.ownLast="0"!==_t,it.inlineBlockNeedsLayout=!1,rt(function(){var e,t,o=mt.getElementsByTagName("body")[0];o&&(e=mt.createElement("div"),e.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",t=mt.createElement("div"),o.appendChild(e).appendChild(t),typeof t.style.zoom!==St&&(t.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(it.inlineBlockNeedsLayout=3===t.offsetWidth)&&(o.style.zoom=1)),o.removeChild(e),e=t=null)}),function(){var e=mt.createElement("div");if(null==it.deleteExpando){it.deleteExpando=!0;try{delete e.test}catch(t){it.deleteExpando=!1}}e=null}(),rt.acceptData=function(e){var t=rt.noData[(e.nodeName+" ").toLowerCase()],o=+e.nodeType||1;return 1!==o&&9!==o?!1:!t||t!==!0&&e.getAttribute("classid")===t};var kt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Tt=/([A-Z])/g;rt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?rt.cache[e[rt.expando]]:e[rt.expando],!!e&&!c(e)},data:function(e,t,o){return u(e,t,o)},removeData:function(e,t){return d(e,t)},_data:function(e,t,o){return u(e,t,o,!0)},_removeData:function(e,t){return d(e,t,!0)}}),rt.fn.extend({data:function(e,t){var o,i,n,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(n=rt.data(r),1===r.nodeType&&!rt._data(r,"parsedAttrs"))){for(o=a.length;o--;)i=a[o].name,0===i.indexOf("data-")&&(i=rt.camelCase(i.slice(5)),l(r,i,n[i]));rt._data(r,"parsedAttrs",!0)}return n}return"object"==typeof e?this.each(function(){rt.data(this,e)}):arguments.length>1?this.each(function(){rt.data(this,e,t)}):r?l(r,e,rt.data(r,e)):void 0},removeData:function(e){return this.each(function(){rt.removeData(this,e)})}}),rt.extend({queue:function(e,t,o){var i;return e?(t=(t||"fx")+"queue",i=rt._data(e,t),o&&(!i||rt.isArray(o)?i=rt._data(e,t,rt.makeArray(o)):i.push(o)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var o=rt.queue(e,t),i=o.length,n=o.shift(),r=rt._queueHooks(e,t),a=function(){rt.dequeue(e,t)};"inprogress"===n&&(n=o.shift(),i--),n&&("fx"===t&&o.unshift("inprogress"),delete r.stop,n.call(e,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var o=t+"queueHooks";return rt._data(e,o)||rt._data(e,o,{empty:rt.Callbacks("once memory").add(function(){rt._removeData(e,t+"queue"),rt._removeData(e,o)})})}}),rt.fn.extend({queue:function(e,t){var o=2;return"string"!=typeof e&&(t=e,e="fx",o--),arguments.length<o?rt.queue(this[0],e):void 0===t?this:this.each(function(){var o=rt.queue(this,e,t);rt._queueHooks(this,e),"fx"===e&&"inprogress"!==o[0]&&rt.dequeue(this,e)})},dequeue:function(e){return this.each(function(){rt.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var o,i=1,n=rt.Deferred(),r=this,a=this.length,s=function(){--i||n.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)o=rt._data(r[a],e+"queueHooks"),o&&o.empty&&(i++,o.empty.add(s));return s(),n.promise(t)}});var Ft=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Et=["Top","Right","Bottom","Left"],Dt=function(e,t){return e=t||e,"none"===rt.css(e,"display")||!rt.contains(e.ownerDocument,e)},Pt=rt.access=function(e,t,o,i,n,r,a){var s=0,l=e.length,c=null==o;if("object"===rt.type(o)){n=!0;for(s in o)rt.access(e,t,s,o[s],!0,r,a)}else if(void 0!==i&&(n=!0,rt.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,o){return c.call(rt(e),o)})),t))for(;l>s;s++)t(e[s],o,a?i:i.call(e[s],s,t(e[s],o)));return n?e:c?t.call(e):l?t(e[0],o):r},At=/^(?:checkbox|radio)$/i;!function(){var e=mt.createDocumentFragment(),t=mt.createElement("div"),o=mt.createElement("input");if(t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a>",it.leadingWhitespace=3===t.firstChild.nodeType,it.tbody=!t.getElementsByTagName("tbody").length,it.htmlSerialize=!!t.getElementsByTagName("link").length,it.html5Clone="<:nav></:nav>"!==mt.createElement("nav").cloneNode(!0).outerHTML,o.type="checkbox",o.checked=!0,e.appendChild(o),it.appendChecked=o.checked,t.innerHTML="<textarea>x</textarea>",it.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",it.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,it.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){it.noCloneEvent=!1}),t.cloneNode(!0).click()),null==it.deleteExpando){it.deleteExpando=!0;try{delete t.test}catch(i){it.deleteExpando=!1}}e=t=o=null}(),function(){var t,o,i=mt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})o="on"+t,(it[t+"Bubbles"]=o in e)||(i.setAttribute(o,"t"),it[t+"Bubbles"]=i.attributes[o].expando===!1);i=null}();var It=/^(?:input|select|textarea)$/i,Mt=/^key/,Rt=/^(?:mouse|contextmenu)|click/,Nt=/^(?:focusinfocus|focusoutblur)$/,Lt=/^([^.]*)(?:\.(.+)|)$/;rt.event={global:{},add:function(e,t,o,i,n){var r,a,s,l,c,u,d,h,p,f,m,g=rt._data(e);if(g){for(o.handler&&(l=o,o=l.handler,n=l.selector),o.guid||(o.guid=rt.guid++),(a=g.events)||(a=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof rt===St||e&&rt.event.triggered===e.type?void 0:rt.event.dispatch.apply(u.elem,arguments)},u.elem=e),t=(t||"").match(Ct)||[""],s=t.length;s--;)r=Lt.exec(t[s])||[],p=m=r[1],f=(r[2]||"").split(".").sort(),p&&(c=rt.event.special[p]||{},p=(n?c.delegateType:c.bindType)||p,c=rt.event.special[p]||{},d=rt.extend({type:p,origType:m,data:i,handler:o,guid:o.guid,selector:n,needsContext:n&&rt.expr.match.needsContext.test(n),namespace:f.join(".")},l),(h=a[p])||(h=a[p]=[],h.delegateCount=0,c.setup&&c.setup.call(e,i,f,u)!==!1||(e.addEventListener?e.addEventListener(p,u,!1):e.attachEvent&&e.attachEvent("on"+p,u))),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=o.guid)),n?h.splice(h.delegateCount++,0,d):h.push(d),rt.event.global[p]=!0);e=null}},remove:function(e,t,o,i,n){var r,a,s,l,c,u,d,h,p,f,m,g=rt.hasData(e)&&rt._data(e);if(g&&(u=g.events)){for(t=(t||"").match(Ct)||[""],c=t.length;c--;)if(s=Lt.exec(t[c])||[],p=m=s[1],f=(s[2]||"").split(".").sort(),p){for(d=rt.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,h=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=h.length;r--;)a=h[r],!n&&m!==a.origType||o&&o.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(r,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||rt.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)rt.event.remove(e,p+t[c],o,i,!0);rt.isEmptyObject(u)&&(delete g.handle,rt._removeData(e,"events"))}},trigger:function(t,o,i,n){var r,a,s,l,c,u,d,h=[i||mt],p=tt.call(t,"type")?t.type:t,f=tt.call(t,"namespace")?t.namespace.split("."):[];if(s=u=i=i||mt,3!==i.nodeType&&8!==i.nodeType&&!Nt.test(p+rt.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[rt.expando]?t:new rt.Event(p,"object"==typeof t&&t),t.isTrigger=n?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),o=null==o?[t]:rt.makeArray(o,[t]),c=rt.event.special[p]||{},n||!c.trigger||c.trigger.apply(i,o)!==!1)){if(!n&&!c.noBubble&&!rt.isWindow(i)){for(l=c.delegateType||p,Nt.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||mt)&&h.push(u.defaultView||u.parentWindow||e)}for(d=0;(s=h[d++])&&!t.isPropagationStopped();)t.type=d>1?l:c.bindType||p,r=(rt._data(s,"events")||{})[t.type]&&rt._data(s,"handle"),r&&r.apply(s,o),r=a&&s[a],r&&r.apply&&rt.acceptData(s)&&(t.result=r.apply(s,o),t.result===!1&&t.preventDefault());if(t.type=p,!n&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(h.pop(),o)===!1)&&rt.acceptData(i)&&a&&i[p]&&!rt.isWindow(i)){u=i[a],u&&(i[a]=null),rt.event.triggered=p;try{i[p]()}catch(m){}rt.event.triggered=void 0,u&&(i[a]=u)}return t.result}},dispatch:function(e){e=rt.event.fix(e);var t,o,i,n,r,a=[],s=q.call(arguments),l=(rt._data(this,"events")||{})[e.type]||[],c=rt.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=rt.event.handlers.call(this,e,l),t=0;(n=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=n.elem,r=0;(i=n.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,o=((rt.event.special[i.origType]||{}).handle||i.handler).apply(n.elem,s),void 0!==o&&(e.result=o)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var o,i,n,r,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(n=[],r=0;s>r;r++)i=t[r],o=i.selector+" ",void 0===n[o]&&(n[o]=i.needsContext?rt(o,this).index(l)>=0:rt.find(o,this,null,[l]).length),n[o]&&n.push(i);n.length&&a.push({elem:l,handlers:n})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[rt.expando])return e;var t,o,i,n=e.type,r=e,a=this.fixHooks[n];for(a||(this.fixHooks[n]=a=Rt.test(n)?this.mouseHooks:Mt.test(n)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new rt.Event(r),t=i.length;t--;)o=i[t],e[o]=r[o];return e.target||(e.target=r.srcElement||mt),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var o,i,n,r=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||mt,n=i.documentElement,o=i.body,e.pageX=t.clientX+(n&&n.scrollLeft||o&&o.scrollLeft||0)-(n&&n.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(n&&n.scrollTop||o&&o.scrollTop||0)-(n&&n.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return rt.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return rt.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,o,i){var n=rt.extend(new rt.Event,o,{type:e,isSimulated:!0,originalEvent:{}});i?rt.event.trigger(n,null,t):rt.event.dispatch.call(t,n),n.isDefaultPrevented()&&o.preventDefault()}},rt.removeEvent=mt.removeEventListener?function(e,t,o){e.removeEventListener&&e.removeEventListener(t,o,!1)}:function(e,t,o){var i="on"+t;e.detachEvent&&(typeof e[i]===St&&(e[i]=null),e.detachEvent(i,o))},rt.Event=function(e,t){return this instanceof rt.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&(e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault())?h:p):this.type=e,t&&rt.extend(this,t),this.timeStamp=e&&e.timeStamp||rt.now(),void(this[rt.expando]=!0)):new rt.Event(e,t)},rt.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=h,this.stopPropagation()}},rt.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){rt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var o,i=this,n=e.relatedTarget,r=e.handleObj;return(!n||n!==i&&!rt.contains(i,n))&&(e.type=r.origType,o=r.handler.apply(this,arguments),e.type=t),o}}}),it.submitBubbles||(rt.event.special.submit={setup:function(){return rt.nodeName(this,"form")?!1:void rt.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,o=rt.nodeName(t,"input")||rt.nodeName(t,"button")?t.form:void 0;o&&!rt._data(o,"submitBubbles")&&(rt.event.add(o,"submit._submit",function(e){e._submit_bubble=!0}),rt._data(o,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&rt.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return rt.nodeName(this,"form")?!1:void rt.event.remove(this,"._submit")}}),it.changeBubbles||(rt.event.special.change={setup:function(){return It.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(rt.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),rt.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),rt.event.simulate("change",this,e,!0)})),!1):void rt.event.add(this,"beforeactivate._change",function(e){var t=e.target;It.test(t.nodeName)&&!rt._data(t,"changeBubbles")&&(rt.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||rt.event.simulate("change",this.parentNode,e,!0)}),rt._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return rt.event.remove(this,"._change"),!It.test(this.nodeName)}}),it.focusinBubbles||rt.each({focus:"focusin",blur:"focusout"},function(e,t){var o=function(e){rt.event.simulate(t,e.target,rt.event.fix(e),!0)};rt.event.special[t]={setup:function(){var i=this.ownerDocument||this,n=rt._data(i,t);n||i.addEventListener(e,o,!0),rt._data(i,t,(n||0)+1)},teardown:function(){var i=this.ownerDocument||this,n=rt._data(i,t)-1;n?rt._data(i,t,n):(i.removeEventListener(e,o,!0),rt._removeData(i,t))}}}),rt.fn.extend({on:function(e,t,o,i,n){var r,a;if("object"==typeof e){"string"!=typeof t&&(o=o||t,t=void 0);for(r in e)this.on(r,t,o,e[r],n);return this}if(null==o&&null==i?(i=t,o=t=void 0):null==i&&("string"==typeof t?(i=o,o=void 0):(i=o,o=t,t=void 0)),i===!1)i=p;else if(!i)return this;return 1===n&&(a=i,i=function(e){return rt().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=rt.guid++)),this.each(function(){rt.event.add(this,e,i,o,t)})},one:function(e,t,o,i){return this.on(e,t,o,i,1)},off:function(e,t,o){var i,n;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,rt(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(n in e)this.off(n,t,e[n]);return this}return(t===!1||"function"==typeof t)&&(o=t,t=void 0),o===!1&&(o=p),this.each(function(){rt.event.remove(this,e,o,t)})},trigger:function(e,t){return this.each(function(){rt.event.trigger(e,t,this)})},triggerHandler:function(e,t){var o=this[0];return o?rt.event.trigger(e,t,o,!0):void 0}});var Ot="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",zt=/ jQuery\d+="(?:null|\d+)"/g,Ht=new RegExp("<(?:"+Ot+")[\\s/>]","i"),Bt=/^\s+/,Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jt=/<([\w:]+)/,Vt=/<tbody/i,Wt=/<|&#?\w+;/,Gt=/<(?:script|style|link)/i,$t=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^$|\/(?:java|ecma)script/i,Kt=/^true\/(.*)/,qt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Xt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:it.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Jt=m(mt),Zt=Jt.appendChild(mt.createElement("div"));
17Xt.optgroup=Xt.option,Xt.tbody=Xt.tfoot=Xt.colgroup=Xt.caption=Xt.thead,Xt.th=Xt.td,rt.extend({clone:function(e,t,o){var i,n,r,a,s,l=rt.contains(e.ownerDocument,e);if(it.html5Clone||rt.isXMLDoc(e)||!Ht.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(Zt.innerHTML=e.outerHTML,Zt.removeChild(r=Zt.firstChild)),!(it.noCloneEvent&&it.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||rt.isXMLDoc(e)))for(i=g(r),s=g(e),a=0;null!=(n=s[a]);++a)i[a]&&_(n,i[a]);if(t)if(o)for(s=s||g(e),i=i||g(r),a=0;null!=(n=s[a]);a++)x(n,i[a]);else x(e,r);return i=g(r,"script"),i.length>0&&w(i,!l&&g(e,"script")),i=s=n=null,r},buildFragment:function(e,t,o,i){for(var n,r,a,s,l,c,u,d=e.length,h=m(t),p=[],f=0;d>f;f++)if(r=e[f],r||0===r)if("object"===rt.type(r))rt.merge(p,r.nodeType?[r]:r);else if(Wt.test(r)){for(s=s||h.appendChild(t.createElement("div")),l=(jt.exec(r)||["",""])[1].toLowerCase(),u=Xt[l]||Xt._default,s.innerHTML=u[1]+r.replace(Ut,"<$1></$2>")+u[2],n=u[0];n--;)s=s.lastChild;if(!it.leadingWhitespace&&Bt.test(r)&&p.push(t.createTextNode(Bt.exec(r)[0])),!it.tbody)for(r="table"!==l||Vt.test(r)?"<table>"!==u[1]||Vt.test(r)?0:s:s.firstChild,n=r&&r.childNodes.length;n--;)rt.nodeName(c=r.childNodes[n],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(rt.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else p.push(t.createTextNode(r));for(s&&h.removeChild(s),it.appendChecked||rt.grep(g(p,"input"),v),f=0;r=p[f++];)if((!i||-1===rt.inArray(r,i))&&(a=rt.contains(r.ownerDocument,r),s=g(h.appendChild(r),"script"),a&&w(s),o))for(n=0;r=s[n++];)Yt.test(r.type||"")&&o.push(r);return s=null,h},cleanData:function(e,t){for(var o,i,n,r,a=0,s=rt.expando,l=rt.cache,c=it.deleteExpando,u=rt.event.special;null!=(o=e[a]);a++)if((t||rt.acceptData(o))&&(n=o[s],r=n&&l[n])){if(r.events)for(i in r.events)u[i]?rt.event.remove(o,i):rt.removeEvent(o,i,r.handle);l[n]&&(delete l[n],c?delete o[s]:typeof o.removeAttribute!==St?o.removeAttribute(s):o[s]=null,K.push(n))}}}),rt.fn.extend({text:function(e){return Pt(this,function(e){return void 0===e?rt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||mt).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var o,i=e?rt.filter(e,this):this,n=0;null!=(o=i[n]);n++)t||1!==o.nodeType||rt.cleanData(g(o)),o.parentNode&&(t&&rt.contains(o.ownerDocument,o)&&w(g(o,"script")),o.parentNode.removeChild(o));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&rt.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&rt.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return rt.clone(this,e,t)})},html:function(e){return Pt(this,function(e){var t=this[0]||{},o=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(zt,""):void 0;if(!("string"!=typeof e||Gt.test(e)||!it.htmlSerialize&&Ht.test(e)||!it.leadingWhitespace&&Bt.test(e)||Xt[(jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ut,"<$1></$2>");try{for(;i>o;o++)t=this[o]||{},1===t.nodeType&&(rt.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(n){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,rt.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=X.apply([],e);var o,i,n,r,a,s,l=0,c=this.length,u=this,d=c-1,h=e[0],p=rt.isFunction(h);if(p||c>1&&"string"==typeof h&&!it.checkClone&&$t.test(h))return this.each(function(o){var i=u.eq(o);p&&(e[0]=h.call(this,o,i.html())),i.domManip(e,t)});if(c&&(s=rt.buildFragment(e,this[0].ownerDocument,!1,this),o=s.firstChild,1===s.childNodes.length&&(s=o),o)){for(r=rt.map(g(s,"script"),y),n=r.length;c>l;l++)i=s,l!==d&&(i=rt.clone(i,!0,!0),n&&rt.merge(r,g(i,"script"))),t.call(this[l],i,l);if(n)for(a=r[r.length-1].ownerDocument,rt.map(r,C),l=0;n>l;l++)i=r[l],Yt.test(i.type||"")&&!rt._data(i,"globalEval")&&rt.contains(a,i)&&(i.src?rt._evalUrl&&rt._evalUrl(i.src):rt.globalEval((i.text||i.textContent||i.innerHTML||"").replace(qt,"")));s=o=null}return this}}),rt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){rt.fn[e]=function(e){for(var o,i=0,n=[],r=rt(e),a=r.length-1;a>=i;i++)o=i===a?this:this.clone(!0),rt(r[i])[t](o),J.apply(n,o.get());return this.pushStack(n)}});var Qt,eo={};!function(){var e,t,o=mt.createElement("div"),i="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";o.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=o.getElementsByTagName("a")[0],e.style.cssText="float:left;opacity:.5",it.opacity=/^0.5/.test(e.style.opacity),it.cssFloat=!!e.style.cssFloat,o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===o.style.backgroundClip,e=o=null,it.shrinkWrapBlocks=function(){var e,o,n,r;if(null==t){if(e=mt.getElementsByTagName("body")[0],!e)return;r="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",o=mt.createElement("div"),n=mt.createElement("div"),e.appendChild(o).appendChild(n),t=!1,typeof n.style.zoom!==St&&(n.style.cssText=i+";width:1px;padding:1px;zoom:1",n.innerHTML="<div></div>",n.firstChild.style.width="5px",t=3!==n.offsetWidth),e.removeChild(o),e=o=n=null}return t}}();var to,oo,io=/^margin/,no=new RegExp("^("+Ft+")(?!px)[a-z%]+$","i"),ro=/^(top|right|bottom|left)$/;e.getComputedStyle?(to=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},oo=function(e,t,o){var i,n,r,a,s=e.style;return o=o||to(e),a=o?o.getPropertyValue(t)||o[t]:void 0,o&&(""!==a||rt.contains(e.ownerDocument,e)||(a=rt.style(e,t)),no.test(a)&&io.test(t)&&(i=s.width,n=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=o.width,s.width=i,s.minWidth=n,s.maxWidth=r)),void 0===a?a:a+""}):mt.documentElement.currentStyle&&(to=function(e){return e.currentStyle},oo=function(e,t,o){var i,n,r,a,s=e.style;return o=o||to(e),a=o?o[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),no.test(a)&&!ro.test(t)&&(i=s.left,n=e.runtimeStyle,r=n&&n.left,r&&(n.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,r&&(n.left=r)),void 0===a?a:a+""||"auto"}),!function(){function t(){var t,o,i=mt.getElementsByTagName("body")[0];i&&(t=mt.createElement("div"),o=mt.createElement("div"),t.style.cssText=c,i.appendChild(t).appendChild(o),o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",rt.swap(i,null!=i.style.zoom?{zoom:1}:{},function(){n=4===o.offsetWidth}),r=!0,a=!1,s=!0,e.getComputedStyle&&(a="1%"!==(e.getComputedStyle(o,null)||{}).top,r="4px"===(e.getComputedStyle(o,null)||{width:"4px"}).width),i.removeChild(t),o=i=null)}var o,i,n,r,a,s,l=mt.createElement("div"),c="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",u="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";l.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",o=l.getElementsByTagName("a")[0],o.style.cssText="float:left;opacity:.5",it.opacity=/^0.5/.test(o.style.opacity),it.cssFloat=!!o.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===l.style.backgroundClip,o=l=null,rt.extend(it,{reliableHiddenOffsets:function(){if(null!=i)return i;var e,t,o,n=mt.createElement("div"),r=mt.getElementsByTagName("body")[0];return r?(n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=mt.createElement("div"),e.style.cssText=c,r.appendChild(e).appendChild(n),n.innerHTML="<table><tr><td></td><td>t</td></tr></table>",t=n.getElementsByTagName("td"),t[0].style.cssText="padding:0;margin:0;border:0;display:none",o=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",i=o&&0===t[0].offsetHeight,r.removeChild(e),n=r=null,i):void 0},boxSizing:function(){return null==n&&t(),n},boxSizingReliable:function(){return null==r&&t(),r},pixelPosition:function(){return null==a&&t(),a},reliableMarginRight:function(){var t,o,i,n;if(null==s&&e.getComputedStyle){if(t=mt.getElementsByTagName("body")[0],!t)return;o=mt.createElement("div"),i=mt.createElement("div"),o.style.cssText=c,t.appendChild(o).appendChild(i),n=i.appendChild(mt.createElement("div")),n.style.cssText=i.style.cssText=u,n.style.marginRight=n.style.width="0",i.style.width="1px",s=!parseFloat((e.getComputedStyle(n,null)||{}).marginRight),t.removeChild(o)}return s}})}(),rt.swap=function(e,t,o,i){var n,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];n=o.apply(e,i||[]);for(r in t)e.style[r]=a[r];return n};var ao=/alpha\([^)]*\)/i,so=/opacity\s*=\s*([^)]*)/,lo=/^(none|table(?!-c[ea]).+)/,co=new RegExp("^("+Ft+")(.*)$","i"),uo=new RegExp("^([+-])=("+Ft+")","i"),ho={position:"absolute",visibility:"hidden",display:"block"},po={letterSpacing:0,fontWeight:400},fo=["Webkit","O","Moz","ms"];rt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var o=oo(e,"opacity");return""===o?"1":o}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":it.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,o,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var n,r,a,s=rt.camelCase(t),l=e.style;if(t=rt.cssProps[s]||(rt.cssProps[s]=F(l,s)),a=rt.cssHooks[t]||rt.cssHooks[s],void 0===o)return a&&"get"in a&&void 0!==(n=a.get(e,!1,i))?n:l[t];if(r=typeof o,"string"===r&&(n=uo.exec(o))&&(o=(n[1]+1)*n[2]+parseFloat(rt.css(e,t)),r="number"),null!=o&&o===o&&("number"!==r||rt.cssNumber[s]||(o+="px"),it.clearCloneStyle||""!==o||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(o=a.set(e,o,i)))))try{l[t]="",l[t]=o}catch(c){}}},css:function(e,t,o,i){var n,r,a,s=rt.camelCase(t);return t=rt.cssProps[s]||(rt.cssProps[s]=F(e.style,s)),a=rt.cssHooks[t]||rt.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,o)),void 0===r&&(r=oo(e,t,i)),"normal"===r&&t in po&&(r=po[t]),""===o||o?(n=parseFloat(r),o===!0||rt.isNumeric(n)?n||0:r):r}}),rt.each(["height","width"],function(e,t){rt.cssHooks[t]={get:function(e,o,i){return o?0===e.offsetWidth&&lo.test(rt.css(e,"display"))?rt.swap(e,ho,function(){return A(e,t,i)}):A(e,t,i):void 0},set:function(e,o,i){var n=i&&to(e);return D(e,o,i?P(e,t,i,it.boxSizing()&&"border-box"===rt.css(e,"boxSizing",!1,n),n):0)}}}),it.opacity||(rt.cssHooks.opacity={get:function(e,t){return so.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var o=e.style,i=e.currentStyle,n=rt.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||o.filter||"";o.zoom=1,(t>=1||""===t)&&""===rt.trim(r.replace(ao,""))&&o.removeAttribute&&(o.removeAttribute("filter"),""===t||i&&!i.filter)||(o.filter=ao.test(r)?r.replace(ao,n):r+" "+n)}}),rt.cssHooks.marginRight=T(it.reliableMarginRight,function(e,t){return t?rt.swap(e,{display:"inline-block"},oo,[e,"marginRight"]):void 0}),rt.each({margin:"",padding:"",border:"Width"},function(e,t){rt.cssHooks[e+t]={expand:function(o){for(var i=0,n={},r="string"==typeof o?o.split(" "):[o];4>i;i++)n[e+Et[i]+t]=r[i]||r[i-2]||r[0];return n}},io.test(e)||(rt.cssHooks[e+t].set=D)}),rt.fn.extend({css:function(e,t){return Pt(this,function(e,t,o){var i,n,r={},a=0;if(rt.isArray(t)){for(i=to(e),n=t.length;n>a;a++)r[t[a]]=rt.css(e,t[a],!1,i);return r}return void 0!==o?rt.style(e,t,o):rt.css(e,t)},e,t,arguments.length>1)},show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Dt(this)?rt(this).show():rt(this).hide()})}}),rt.Tween=I,I.prototype={constructor:I,init:function(e,t,o,i,n,r){this.elem=e,this.prop=o,this.easing=n||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(rt.cssNumber[o]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,o=I.propHooks[this.prop];return this.pos=t=this.options.duration?rt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),o&&o.set?o.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=rt.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){rt.fx.step[e.prop]?rt.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[rt.cssProps[e.prop]]||rt.cssHooks[e.prop])?rt.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},rt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},rt.fx=I.prototype.init,rt.fx.step={};var mo,go,vo=/^(?:toggle|show|hide)$/,bo=new RegExp("^(?:([+-])=|)("+Ft+")([a-z%]*)$","i"),yo=/queueHooks$/,Co=[L],wo={"*":[function(e,t){var o=this.createTween(e,t),i=o.cur(),n=bo.exec(t),r=n&&n[3]||(rt.cssNumber[e]?"":"px"),a=(rt.cssNumber[e]||"px"!==r&&+i)&&bo.exec(rt.css(o.elem,e)),s=1,l=20;if(a&&a[3]!==r){r=r||a[3],n=n||[],a=+i||1;do s=s||".5",a/=s,rt.style(o.elem,e,a+r);while(s!==(s=o.cur()/i)&&1!==s&&--l)}return n&&(a=o.start=+a||+i||0,o.unit=r,o.end=n[1]?a+(n[1]+1)*n[2]:+n[2]),o}]};rt.Animation=rt.extend(z,{tweener:function(e,t){rt.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var o,i=0,n=e.length;n>i;i++)o=e[i],wo[o]=wo[o]||[],wo[o].unshift(t)},prefilter:function(e,t){t?Co.unshift(e):Co.push(e)}}),rt.speed=function(e,t,o){var i=e&&"object"==typeof e?rt.extend({},e):{complete:o||!o&&t||rt.isFunction(e)&&e,duration:e,easing:o&&t||t&&!rt.isFunction(t)&&t};return i.duration=rt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in rt.fx.speeds?rt.fx.speeds[i.duration]:rt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){rt.isFunction(i.old)&&i.old.call(this),i.queue&&rt.dequeue(this,i.queue)},i},rt.fn.extend({fadeTo:function(e,t,o,i){return this.filter(Dt).css("opacity",0).show().end().animate({opacity:t},e,o,i)},animate:function(e,t,o,i){var n=rt.isEmptyObject(e),r=rt.speed(t,o,i),a=function(){var t=z(this,rt.extend({},e),r);(n||rt._data(this,"finish"))&&t.stop(!0)};return a.finish=a,n||r.queue===!1?this.each(a):this.queue(r.queue,a)},stop:function(e,t,o){var i=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof e&&(o=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",r=rt.timers,a=rt._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&yo.test(n)&&i(a[n]);for(n=r.length;n--;)r[n].elem!==this||null!=e&&r[n].queue!==e||(r[n].anim.stop(o),t=!1,r.splice(n,1));(t||!o)&&rt.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,o=rt._data(this),i=o[e+"queue"],n=o[e+"queueHooks"],r=rt.timers,a=i?i.length:0;for(o.finish=!0,rt.queue(this,e,[]),n&&n.stop&&n.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete o.finish})}}),rt.each(["toggle","show","hide"],function(e,t){var o=rt.fn[t];rt.fn[t]=function(e,i,n){return null==e||"boolean"==typeof e?o.apply(this,arguments):this.animate(R(t,!0),e,i,n)}}),rt.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){rt.fn[e]=function(e,o,i){return this.animate(t,e,o,i)}}),rt.timers=[],rt.fx.tick=function(){var e,t=rt.timers,o=0;for(mo=rt.now();o<t.length;o++)e=t[o],e()||t[o]!==e||t.splice(o--,1);t.length||rt.fx.stop(),mo=void 0},rt.fx.timer=function(e){rt.timers.push(e),e()?rt.fx.start():rt.timers.pop()},rt.fx.interval=13,rt.fx.start=function(){go||(go=setInterval(rt.fx.tick,rt.fx.interval))},rt.fx.stop=function(){clearInterval(go),go=null},rt.fx.speeds={slow:600,fast:200,_default:400},rt.fn.delay=function(e,t){return e=rt.fx?rt.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,o){var i=setTimeout(t,e);o.stop=function(){clearTimeout(i)}})},function(){var e,t,o,i,n=mt.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],o=mt.createElement("select"),i=o.appendChild(mt.createElement("option")),t=n.getElementsByTagName("input")[0],e.style.cssText="top:1px",it.getSetAttribute="t"!==n.className,it.style=/top/.test(e.getAttribute("style")),it.hrefNormalized="/a"===e.getAttribute("href"),it.checkOn=!!t.value,it.optSelected=i.selected,it.enctype=!!mt.createElement("form").enctype,o.disabled=!0,it.optDisabled=!i.disabled,t=mt.createElement("input"),t.setAttribute("value",""),it.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),it.radioValue="t"===t.value,e=t=o=i=n=null}();var xo=/\r/g;rt.fn.extend({val:function(e){var t,o,i,n=this[0];return arguments.length?(i=rt.isFunction(e),this.each(function(o){var n;1===this.nodeType&&(n=i?e.call(this,o,rt(this).val()):e,null==n?n="":"number"==typeof n?n+="":rt.isArray(n)&&(n=rt.map(n,function(e){return null==e?"":e+""})),t=rt.valHooks[this.type]||rt.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))})):n?(t=rt.valHooks[n.type]||rt.valHooks[n.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(o=t.get(n,"value"))?o:(o=n.value,"string"==typeof o?o.replace(xo,""):null==o?"":o)):void 0}}),rt.extend({valHooks:{option:{get:function(e){var t=rt.find.attr(e,"value");return null!=t?t:rt.text(e)}},select:{get:function(e){for(var t,o,i=e.options,n=e.selectedIndex,r="select-one"===e.type||0>n,a=r?null:[],s=r?n+1:i.length,l=0>n?s:r?n:0;s>l;l++)if(o=i[l],!(!o.selected&&l!==n||(it.optDisabled?o.disabled:null!==o.getAttribute("disabled"))||o.parentNode.disabled&&rt.nodeName(o.parentNode,"optgroup"))){if(t=rt(o).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var o,i,n=e.options,r=rt.makeArray(t),a=n.length;a--;)if(i=n[a],rt.inArray(rt.valHooks.option.get(i),r)>=0)try{i.selected=o=!0}catch(s){i.scrollHeight}else i.selected=!1;return o||(e.selectedIndex=-1),n}}}}),rt.each(["radio","checkbox"],function(){rt.valHooks[this]={set:function(e,t){return rt.isArray(t)?e.checked=rt.inArray(rt(e).val(),t)>=0:void 0}},it.checkOn||(rt.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var _o,So,ko=rt.expr.attrHandle,To=/^(?:checked|selected)$/i,Fo=it.getSetAttribute,Eo=it.input;rt.fn.extend({attr:function(e,t){return Pt(this,rt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){rt.removeAttr(this,e)})}}),rt.extend({attr:function(e,t,o){var i,n,r=e.nodeType;return e&&3!==r&&8!==r&&2!==r?typeof e.getAttribute===St?rt.prop(e,t,o):(1===r&&rt.isXMLDoc(e)||(t=t.toLowerCase(),i=rt.attrHooks[t]||(rt.expr.match.bool.test(t)?So:_o)),void 0===o?i&&"get"in i&&null!==(n=i.get(e,t))?n:(n=rt.find.attr(e,t),null==n?void 0:n):null!==o?i&&"set"in i&&void 0!==(n=i.set(e,o,t))?n:(e.setAttribute(t,o+""),o):void rt.removeAttr(e,t)):void 0},removeAttr:function(e,t){var o,i,n=0,r=t&&t.match(Ct);if(r&&1===e.nodeType)for(;o=r[n++];)i=rt.propFix[o]||o,rt.expr.match.bool.test(o)?Eo&&Fo||!To.test(o)?e[i]=!1:e[rt.camelCase("default-"+o)]=e[i]=!1:rt.attr(e,o,""),e.removeAttribute(Fo?o:i)},attrHooks:{type:{set:function(e,t){if(!it.radioValue&&"radio"===t&&rt.nodeName(e,"input")){var o=e.value;return e.setAttribute("type",t),o&&(e.value=o),t}}}}}),So={set:function(e,t,o){return t===!1?rt.removeAttr(e,o):Eo&&Fo||!To.test(o)?e.setAttribute(!Fo&&rt.propFix[o]||o,o):e[rt.camelCase("default-"+o)]=e[o]=!0,o}},rt.each(rt.expr.match.bool.source.match(/\w+/g),function(e,t){var o=ko[t]||rt.find.attr;ko[t]=Eo&&Fo||!To.test(t)?function(e,t,i){var n,r;return i||(r=ko[t],ko[t]=n,n=null!=o(e,t,i)?t.toLowerCase():null,ko[t]=r),n}:function(e,t,o){return o?void 0:e[rt.camelCase("default-"+t)]?t.toLowerCase():null}}),Eo&&Fo||(rt.attrHooks.value={set:function(e,t,o){return rt.nodeName(e,"input")?void(e.defaultValue=t):_o&&_o.set(e,t,o)}}),Fo||(_o={set:function(e,t,o){var i=e.getAttributeNode(o);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(o)),i.value=t+="","value"===o||t===e.getAttribute(o)?t:void 0}},ko.id=ko.name=ko.coords=function(e,t,o){var i;return o?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},rt.valHooks.button={get:function(e,t){var o=e.getAttributeNode(t);return o&&o.specified?o.value:void 0},set:_o.set},rt.attrHooks.contenteditable={set:function(e,t,o){_o.set(e,""===t?!1:t,o)}},rt.each(["width","height"],function(e,t){rt.attrHooks[t]={set:function(e,o){return""===o?(e.setAttribute(t,"auto"),o):void 0}}})),it.style||(rt.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Do=/^(?:input|select|textarea|button|object)$/i,Po=/^(?:a|area)$/i;rt.fn.extend({prop:function(e,t){return Pt(this,rt.prop,e,t,arguments.length>1)},removeProp:function(e){return e=rt.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),rt.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,o){var i,n,r,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?(r=1!==a||!rt.isXMLDoc(e),r&&(t=rt.propFix[t]||t,n=rt.propHooks[t]),void 0!==o?n&&"set"in n&&void 0!==(i=n.set(e,o,t))?i:e[t]=o:n&&"get"in n&&null!==(i=n.get(e,t))?i:e[t]):void 0},propHooks:{tabIndex:{get:function(e){var t=rt.find.attr(e,"tabindex");return t?parseInt(t,10):Do.test(e.nodeName)||Po.test(e.nodeName)&&e.href?0:-1}}}}),it.hrefNormalized||rt.each(["href","src"],function(e,t){rt.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),it.optSelected||(rt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),rt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){rt.propFix[this.toLowerCase()]=this}),it.enctype||(rt.propFix.enctype="encoding");var Ao=/[\t\r\n\f]/g;rt.fn.extend({addClass:function(e){var t,o,i,n,r,a,s=0,l=this.length,c="string"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(Ct)||[];l>s;s++)if(o=this[s],i=1===o.nodeType&&(o.className?(" "+o.className+" ").replace(Ao," "):" ")){for(r=0;n=t[r++];)i.indexOf(" "+n+" ")<0&&(i+=n+" ");a=rt.trim(i),o.className!==a&&(o.className=a)}return this},removeClass:function(e){var t,o,i,n,r,a,s=0,l=this.length,c=0===arguments.length||"string"==typeof e&&e;if(rt.isFunction(e))return this.each(function(t){rt(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(Ct)||[];l>s;s++)if(o=this[s],i=1===o.nodeType&&(o.className?(" "+o.className+" ").replace(Ao," "):"")){for(r=0;n=t[r++];)for(;i.indexOf(" "+n+" ")>=0;)i=i.replace(" "+n+" "," ");a=e?rt.trim(i):"",o.className!==a&&(o.className=a)}return this},toggleClass:function(e,t){var o=typeof e;return"boolean"==typeof t&&"string"===o?t?this.addClass(e):this.removeClass(e):this.each(rt.isFunction(e)?function(o){rt(this).toggleClass(e.call(this,o,this.className,t),t)}:function(){if("string"===o)for(var t,i=0,n=rt(this),r=e.match(Ct)||[];t=r[i++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else(o===St||"boolean"===o)&&(this.className&&rt._data(this,"__className__",this.className),this.className=this.className||e===!1?"":rt._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",o=0,i=this.length;i>o;o++)if(1===this[o].nodeType&&(" "+this[o].className+" ").replace(Ao," ").indexOf(t)>=0)return!0;return!1}}),rt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){rt.fn[t]=function(e,o){return arguments.length>0?this.on(t,null,e,o):this.trigger(t)}}),rt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,o){return this.on(e,null,t,o)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,o,i){return this.on(t,e,o,i)},undelegate:function(e,t,o){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",o)}});var Io=rt.now(),Mo=/\?/,Ro=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;rt.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var o,i=null,n=rt.trim(t+"");return n&&!rt.trim(n.replace(Ro,function(e,t,n,r){return o&&t&&(i=0),0===i?e:(o=n||t,i+=!r-!n,"")}))?Function("return "+n)():rt.error("Invalid JSON: "+t)},rt.parseXML=function(t){var o,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,o=i.parseFromString(t,"text/xml")):(o=new ActiveXObject("Microsoft.XMLDOM"),o.async="false",o.loadXML(t))}catch(n){o=void 0}return o&&o.documentElement&&!o.getElementsByTagName("parsererror").length||rt.error("Invalid XML: "+t),o};var No,Lo,Oo=/#.*$/,zo=/([?&])_=[^&]*/,Ho=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Bo=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Uo=/^(?:GET|HEAD)$/,jo=/^\/\//,Vo=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Wo={},Go={},$o="*/".concat("*");try{Lo=location.href}catch(Yo){Lo=mt.createElement("a"),Lo.href="",Lo=Lo.href}No=Vo.exec(Lo.toLowerCase())||[],rt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lo,type:"GET",isLocal:Bo.test(No[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$o,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":rt.parseJSON,"text xml":rt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,rt.ajaxSettings),t):U(rt.ajaxSettings,e)},ajaxPrefilter:H(Wo),ajaxTransport:H(Go),ajax:function(e,t){function o(e,t,o,i){var n,u,v,b,C,x=t;2!==y&&(y=2,s&&clearTimeout(s),c=void 0,a=i||"",w.readyState=e>0?4:0,n=e>=200&&300>e||304===e,o&&(b=j(d,w,o)),b=V(d,b,w,n),n?(d.ifModified&&(C=w.getResponseHeader("Last-Modified"),C&&(rt.lastModified[r]=C),C=w.getResponseHeader("etag"),C&&(rt.etag[r]=C)),204===e||"HEAD"===d.type?x="nocontent":304===e?x="notmodified":(x=b.state,u=b.data,v=b.error,n=!v)):(v=x,(e||!x)&&(x="error",0>e&&(e=0))),w.status=e,w.statusText=(t||x)+"",n?f.resolveWith(h,[u,x,w]):f.rejectWith(h,[w,x,v]),w.statusCode(g),g=void 0,l&&p.trigger(n?"ajaxSuccess":"ajaxError",[w,d,n?u:v]),m.fireWith(h,[w,x]),l&&(p.trigger("ajaxComplete",[w,d]),--rt.active||rt.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,r,a,s,l,c,u,d=rt.ajaxSetup({},t),h=d.context||d,p=d.context&&(h.nodeType||h.jquery)?rt(h):rt.event,f=rt.Deferred(),m=rt.Callbacks("once memory"),g=d.statusCode||{},v={},b={},y=0,C="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!u)for(u={};t=Ho.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var o=e.toLowerCase();return y||(e=b[o]=b[o]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)g[t]=[g[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||C;return c&&c.abort(t),o(0,t),this}};if(f.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||Lo)+"").replace(Oo,"").replace(jo,No[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=rt.trim(d.dataType||"*").toLowerCase().match(Ct)||[""],null==d.crossDomain&&(i=Vo.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===No[1]&&i[2]===No[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(No[3]||("http:"===No[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=rt.param(d.data,d.traditional)),B(Wo,d,t,w),2===y)return w;l=d.global,l&&0===rt.active++&&rt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Uo.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(Mo.test(r)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=zo.test(r)?r.replace(zo,"$1_="+Io++):r+(Mo.test(r)?"&":"?")+"_="+Io++)),d.ifModified&&(rt.lastModified[r]&&w.setRequestHeader("If-Modified-Since",rt.lastModified[r]),rt.etag[r]&&w.setRequestHeader("If-None-Match",rt.etag[r])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$o+"; q=0.01":""):d.accepts["*"]);for(n in d.headers)w.setRequestHeader(n,d.headers[n]);if(d.beforeSend&&(d.beforeSend.call(h,w,d)===!1||2===y))return w.abort();C="abort";for(n in{success:1,error:1,complete:1})w[n](d[n]);if(c=B(Go,d,t,w)){w.readyState=1,l&&p.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},d.timeout));try{y=1,c.send(v,o)}catch(x){if(!(2>y))throw x;o(-1,x)}}else o(-1,"No Transport");return w},getJSON:function(e,t,o){return rt.get(e,t,o,"json")},getScript:function(e,t){return rt.get(e,void 0,t,"script")}}),rt.each(["get","post"],function(e,t){rt[t]=function(e,o,i,n){return rt.isFunction(o)&&(n=n||i,i=o,o=void 0),rt.ajax({url:e,type:t,dataType:n,data:o,success:i})}}),rt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){rt.fn[t]=function(e){return this.on(t,e)}}),rt._evalUrl=function(e){return rt.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},rt.fn.extend({wrapAll:function(e){if(rt.isFunction(e))return this.each(function(t){rt(this).wrapAll(e.call(this,t))});if(this[0]){var t=rt(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(rt.isFunction(e)?function(t){rt(this).wrapInner(e.call(this,t))}:function(){var t=rt(this),o=t.contents();o.length?o.wrapAll(e):t.append(e)})},wrap:function(e){var t=rt.isFunction(e);return this.each(function(o){rt(this).wrapAll(t?e.call(this,o):e)})},unwrap:function(){return this.parent().each(function(){rt.nodeName(this,"body")||rt(this).replaceWith(this.childNodes)}).end()}}),rt.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!it.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||rt.css(e,"display"))},rt.expr.filters.visible=function(e){return!rt.expr.filters.hidden(e)};var Ko=/%20/g,qo=/\[\]$/,Xo=/\r?\n/g,Jo=/^(?:submit|button|image|reset|file)$/i,Zo=/^(?:input|select|textarea|keygen)/i;
18rt.param=function(e,t){var o,i=[],n=function(e,t){t=rt.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(e)||e.jquery&&!rt.isPlainObject(e))rt.each(e,function(){n(this.name,this.value)});else for(o in e)W(o,e[o],t,n);return i.join("&").replace(Ko,"+")},rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=rt.prop(this,"elements");return e?rt.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!rt(this).is(":disabled")&&Zo.test(this.nodeName)&&!Jo.test(e)&&(this.checked||!At.test(e))}).map(function(e,t){var o=rt(this).val();return null==o?null:rt.isArray(o)?rt.map(o,function(e){return{name:t.name,value:e.replace(Xo,"\r\n")}}):{name:t.name,value:o.replace(Xo,"\r\n")}}).get()}}),rt.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&G()||$()}:G;var Qo=0,ei={},ti=rt.ajaxSettings.xhr();e.ActiveXObject&&rt(e).on("unload",function(){for(var e in ei)ei[e](void 0,!0)}),it.cors=!!ti&&"withCredentials"in ti,ti=it.ajax=!!ti,ti&&rt.ajaxTransport(function(e){if(!e.crossDomain||it.cors){var t;return{send:function(o,i){var n,r=e.xhr(),a=++Qo;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(n in e.xhrFields)r[n]=e.xhrFields[n];e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(n in o)void 0!==o[n]&&r.setRequestHeader(n,o[n]+"");r.send(e.hasContent&&e.data||null),t=function(o,n){var s,l,c;if(t&&(n||4===r.readyState))if(delete ei[a],t=void 0,r.onreadystatechange=rt.noop,n)4!==r.readyState&&r.abort();else{c={},s=r.status,"string"==typeof r.responseText&&(c.text=r.responseText);try{l=r.statusText}catch(u){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&i(s,l,c,r.getAllResponseHeaders())},e.async?4===r.readyState?setTimeout(t):r.onreadystatechange=ei[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),rt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return rt.globalEval(e),e}}}),rt.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),rt.ajaxTransport("script",function(e){if(e.crossDomain){var t,o=mt.head||rt("head")[0]||mt.documentElement;return{send:function(i,n){t=mt.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,o){(o||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,o||n(200,"success"))},o.insertBefore(t,o.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var oi=[],ii=/(=)\?(?=&|$)|\?\?/;rt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=oi.pop()||rt.expando+"_"+Io++;return this[e]=!0,e}}),rt.ajaxPrefilter("json jsonp",function(t,o,i){var n,r,a,s=t.jsonp!==!1&&(ii.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ii.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(n=t.jsonpCallback=rt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ii,"$1"+n):t.jsonp!==!1&&(t.url+=(Mo.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return a||rt.error(n+" was not called"),a[0]},t.dataTypes[0]="json",r=e[n],e[n]=function(){a=arguments},i.always(function(){e[n]=r,t[n]&&(t.jsonpCallback=o.jsonpCallback,oi.push(n)),a&&rt.isFunction(r)&&r(a[0]),a=r=void 0}),"script"):void 0}),rt.parseHTML=function(e,t,o){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(o=t,t=!1),t=t||mt;var i=ht.exec(e),n=!o&&[];return i?[t.createElement(i[1])]:(i=rt.buildFragment([e],t,n),n&&n.length&&rt(n).remove(),rt.merge([],i.childNodes))};var ni=rt.fn.load;rt.fn.load=function(e,t,o){if("string"!=typeof e&&ni)return ni.apply(this,arguments);var i,n,r,a=this,s=e.indexOf(" ");return s>=0&&(i=e.slice(s,e.length),e=e.slice(0,s)),rt.isFunction(t)?(o=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&rt.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){n=arguments,a.html(i?rt("<div>").append(rt.parseHTML(e)).find(i):e)}).complete(o&&function(e,t){a.each(o,n||[e.responseText,t,e])}),this},rt.expr.filters.animated=function(e){return rt.grep(rt.timers,function(t){return e===t.elem}).length};var ri=e.document.documentElement;rt.offset={setOffset:function(e,t,o){var i,n,r,a,s,l,c,u=rt.css(e,"position"),d=rt(e),h={};"static"===u&&(e.style.position="relative"),s=d.offset(),r=rt.css(e,"top"),l=rt.css(e,"left"),c=("absolute"===u||"fixed"===u)&&rt.inArray("auto",[r,l])>-1,c?(i=d.position(),a=i.top,n=i.left):(a=parseFloat(r)||0,n=parseFloat(l)||0),rt.isFunction(t)&&(t=t.call(e,o,s)),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+n),"using"in t?t.using.call(e,h):d.css(h)}},rt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){rt.offset.setOffset(this,e,t)});var t,o,i={top:0,left:0},n=this[0],r=n&&n.ownerDocument;return r?(t=r.documentElement,rt.contains(t,n)?(typeof n.getBoundingClientRect!==St&&(i=n.getBoundingClientRect()),o=Y(r),{top:i.top+(o.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(o.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var e,t,o={top:0,left:0},i=this[0];return"fixed"===rt.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),rt.nodeName(e[0],"html")||(o=e.offset()),o.top+=rt.css(e[0],"borderTopWidth",!0),o.left+=rt.css(e[0],"borderLeftWidth",!0)),{top:t.top-o.top-rt.css(i,"marginTop",!0),left:t.left-o.left-rt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||ri;e&&!rt.nodeName(e,"html")&&"static"===rt.css(e,"position");)e=e.offsetParent;return e||ri})}}),rt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var o=/Y/.test(t);rt.fn[e]=function(i){return Pt(this,function(e,i,n){var r=Y(e);return void 0===n?r?t in r?r[t]:r.document.documentElement[i]:e[i]:void(r?r.scrollTo(o?rt(r).scrollLeft():n,o?n:rt(r).scrollTop()):e[i]=n)},e,i,arguments.length,null)}}),rt.each(["top","left"],function(e,t){rt.cssHooks[t]=T(it.pixelPosition,function(e,o){return o?(o=oo(e,t),no.test(o)?rt(e).position()[t]+"px":o):void 0})}),rt.each({Height:"height",Width:"width"},function(e,t){rt.each({padding:"inner"+e,content:t,"":"outer"+e},function(o,i){rt.fn[i]=function(i,n){var r=arguments.length&&(o||"boolean"!=typeof i),a=o||(i===!0||n===!0?"margin":"border");return Pt(this,function(t,o,i){var n;return rt.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+e],n["scroll"+e],t.body["offset"+e],n["offset"+e],n["client"+e])):void 0===i?rt.css(t,o,a):rt.style(t,o,i,a)},t,r?i:void 0,r,null)}})}),rt.fn.size=function(){return this.length},rt.fn.andSelf=rt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return rt});var ai=e.jQuery,si=e.$;return rt.noConflict=function(t){return e.$===rt&&(e.$=si),t&&e.jQuery===rt&&(e.jQuery=ai),rt},typeof t===St&&(e.jQuery=e.$=rt),rt}),function(){var e;e=function(e){var t,o;return t=!1,e(function(){var i;return i=(document.body||document.documentElement).style,t=void 0!==i.animation||void 0!==i.WebkitAnimation||void 0!==i.MozAnimation||void 0!==i.MsAnimation||void 0!==i.OAnimation,e(window).bind("keyup.vex",function(e){return 27===e.keyCode?o.closeByEscape():void 0})}),o={globalID:1,animationEndEvent:"animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",baseClassNames:{vex:"vex",content:"vex-content",overlay:"vex-overlay",close:"vex-close",closing:"vex-closing",open:"vex-open"},defaultOptions:{content:"",showCloseButton:!0,escapeButtonCloses:!0,overlayClosesOnClick:!0,appendLocation:"body",className:"",css:{},overlayClassName:"",overlayCSS:{},contentClassName:"",contentCSS:{},closeClassName:"",closeCSS:{}},open:function(t){return t=e.extend({},o.defaultOptions,t),t.id=o.globalID,o.globalID+=1,t.$vex=e("<div>").addClass(o.baseClassNames.vex).addClass(t.className).css(t.css).data({vex:t}),t.$vexOverlay=e("<div>").addClass(o.baseClassNames.overlay).addClass(t.overlayClassName).css(t.overlayCSS).data({vex:t}),t.overlayClosesOnClick&&t.$vexOverlay.bind("click.vex",function(t){return t.target===this?o.close(e(this).data().vex.id):void 0}),t.$vex.append(t.$vexOverlay),t.$vexContent=e("<div>").addClass(o.baseClassNames.content).addClass(t.contentClassName).css(t.contentCSS).append(t.content).data({vex:t}),t.$vex.append(t.$vexContent),t.showCloseButton&&(t.$closeButton=e("<div>").addClass(o.baseClassNames.close).addClass(t.closeClassName).css(t.closeCSS).data({vex:t}).bind("click.vex",function(){return o.close(e(this).data().vex.id)}),t.$vexContent.append(t.$closeButton)),e(t.appendLocation).append(t.$vex),o.setupBodyClassName(t.$vex),t.afterOpen&&t.afterOpen(t.$vexContent,t),setTimeout(function(){return t.$vexContent.trigger("vexOpen",t)},0),t.$vexContent},getAllVexes:function(){return e("."+o.baseClassNames.vex+':not(".'+o.baseClassNames.closing+'") .'+o.baseClassNames.content)},getVexByID:function(t){return o.getAllVexes().filter(function(){return e(this).data().vex.id===t})},close:function(e){var t;if(!e){if(t=o.getAllVexes().last(),!t.length)return!1;e=t.data().vex.id}return o.closeByID(e)},closeAll:function(){var t;return t=o.getAllVexes().map(function(){return e(this).data().vex.id}).toArray(),(null!=t?t.length:void 0)?(e.each(t.reverse(),function(e,t){return o.closeByID(t)}),!0):!1},closeByID:function(i){var n,r,a,s,l;return r=o.getVexByID(i),r.length?(n=r.data().vex.$vex,l=e.extend({},r.data().vex),a=function(){return l.beforeClose?l.beforeClose(r,l):void 0},s=function(){return r.trigger("vexClose",l),n.remove(),l.afterClose?l.afterClose(r,l):void 0},t?(a(),n.unbind(o.animationEndEvent).bind(o.animationEndEvent,function(){return s()}).addClass(o.baseClassNames.closing)):(a(),s()),!0):void 0},closeByEscape:function(){var t,i,n;return n=o.getAllVexes().map(function(){return e(this).data().vex.id}).toArray(),(null!=n?n.length:void 0)?(i=Math.max.apply(Math,n),t=o.getVexByID(i),t.data().vex.escapeButtonCloses!==!0?!1:o.closeByID(i)):!1},setupBodyClassName:function(t){return t.bind("vexOpen.vex",function(){return e("body").addClass(o.baseClassNames.open)}).bind("vexClose.vex",function(){return o.getAllVexes().length?void 0:e("body").removeClass(o.baseClassNames.open)})},hideLoading:function(){return e(".vex-loading-spinner").remove()},showLoading:function(){return o.hideLoading(),e("body").append('<div class="vex-loading-spinner '+o.defaultOptions.className+'"></div>')}}},"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.vex=e(jQuery)}.call(this),function(){var e;e=function(e,t){var o,i;return null==t?e.error("Vex is required to use vex.dialog"):(o=function(t){var o;return o={},e.each(t.serializeArray(),function(){return o[this.name]?(o[this.name].push||(o[this.name]=[o[this.name]]),o[this.name].push(this.value||"")):o[this.name]=this.value||""}),o},i={},i.buttons={YES:{text:"OK",type:"submit",className:"vex-dialog-button-primary"},NO:{text:"Cancel",type:"button",className:"vex-dialog-button-secondary",click:function(e){return e.data().vex.value=!1,t.close(e.data().vex.id)}}},i.defaultOptions={callback:function(){},afterOpen:function(){},message:"Message",input:'<input name="vex" type="hidden" value="_vex-empty-value" />',value:!1,buttons:[i.buttons.YES,i.buttons.NO],showCloseButton:!1,onSubmit:function(n){var r,a;return r=e(this),a=r.parent(),n.preventDefault(),n.stopPropagation(),a.data().vex.value=i.getFormValueOnSubmit(o(r)),t.close(a.data().vex.id)},focusFirstInput:!0},i.defaultAlertOptions={message:"Alert",buttons:[i.buttons.YES]},i.defaultConfirmOptions={message:"Confirm"},i.open=function(o){var n;return o=e.extend({},t.defaultOptions,i.defaultOptions,o),o.content=i.buildDialogForm(o),o.beforeClose=function(e){return o.callback(e.data().vex.value)},n=t.open(o),o.focusFirstInput&&n.find('input[type="submit"], textarea, input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"]').first().focus(),n},i.alert=function(t){return"string"==typeof t&&(t={message:t}),t=e.extend({},i.defaultAlertOptions,t),i.open(t)},i.confirm=function(t){return"string"==typeof t?e.error("dialog.confirm(options) requires options.callback."):(t=e.extend({},i.defaultConfirmOptions,t),i.open(t))},i.prompt=function(t){var o;return"string"==typeof t?e.error("dialog.prompt(options) requires options.callback."):(o={message:'<label for="vex">'+(t.label||"Prompt:")+"</label>",input:'<input name="vex" type="text" class="vex-dialog-prompt-input" placeholder="'+(t.placeholder||"")+'" value="'+(t.value||"")+'" />'},t=e.extend({},o,t),i.open(t))},i.buildDialogForm=function(t){var o,n,r;return o=e('<form class="vex-dialog-form" />'),r=e('<div class="vex-dialog-message" />'),n=e('<div class="vex-dialog-input" />'),o.append(r.append(t.message)).append(n.append(t.input)).append(i.buttonsToDOM(t.buttons)).bind("submit.vex",t.onSubmit),o},i.getFormValueOnSubmit=function(e){return e.vex||""===e.vex?"_vex-empty-value"===e.vex?!0:e.vex:e},i.buttonsToDOM=function(o){var i;return i=e('<div class="vex-dialog-buttons" />'),e.each(o,function(n,r){return i.append(e('<input type="'+r.type+'" />').val(r.text).addClass(r.className+" vex-dialog-button "+(0===n?"vex-first ":"")+(n===o.length-1?"vex-last ":"")).bind("click.vex",function(o){return r.click?r.click(e(this).parents("."+t.baseClassNames.content),o):void 0}))}),i},i)},"function"==typeof define&&define.amd?define(["jquery","vex"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("vex")):window.vex.dialog=e(window.jQuery,window.vex)}.call(this),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,i){var n,r,a,s=t.nodeName.toLowerCase();return"area"===s?(n=t.parentNode,r=n.name,t.href&&r&&"map"===n.nodeName.toLowerCase()?(a=e("img[usemap='#"+r+"']")[0],!!a&&o(a)):!1):(/^(input|select|textarea|button|object)$/.test(s)?!t.disabled:"a"===s?t.href||i:i)&&o(t)}function o(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function i(e){for(var t,o;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(o=parseInt(e.css("zIndex"),10),!isNaN(o)&&0!==o))return o;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=r(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(t){var o="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(o,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(o,"mouseover",a)}function a(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function s(t,o){e.extend(t,o);for(var i in o)null==o[i]&&(t[i]=o[i]);return t}function l(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",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}}),e.fn.extend({scrollParent:function(t){var o=this.css("position"),i="absolute"===o,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return i&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==o&&r.length?r:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(o){return!!e.data(o,t)}}):function(t,o,i){return!!e.data(t,i[3])},focusable:function(o){return t(o,!isNaN(e.attr(o,"tabindex")))},tabbable:function(o){var i=e.attr(o,"tabindex"),n=isNaN(i);return(n||i>=0)&&t(o,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,o){function i(t,o,i,r){return e.each(n,function(){o-=parseFloat(e.css(t,"padding"+this))||0,i&&(o-=parseFloat(e.css(t,"border"+this+"Width"))||0),r&&(o-=parseFloat(e.css(t,"margin"+this))||0)}),o}var n="Width"===o?["Left","Right"]:["Top","Bottom"],r=o.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+o]=function(t){return void 0===t?a["inner"+o].call(this):this.each(function(){e(this).css(r,i(this,t)+"px")})},e.fn["outer"+o]=function(t,n){return"number"!=typeof t?a["outer"+o].call(this,t):this.each(function(){e(this).css(r,i(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(o){return arguments.length?t.call(this,e.camelCase(o)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(o,i){return"number"==typeof o?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},o)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var o,i,n=e(this[0]);n.length&&n[0]!==document;){if(o=n.css("position"),("absolute"===o||"relative"===o||"fixed"===o)&&(i=parseInt(n.css("zIndex"),10),!isNaN(i)&&0!==i))return i;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,o,i){var n,r=e.ui[t].prototype;for(n in i)r.plugins[n]=r.plugins[n]||[],r.plugins[n].push([o,i[n]])},call:function(e,t,o,i){var n,r=e.plugins[t];if(r&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;r.length>n;n++)e.options[r[n][0]]&&r[n][1].apply(e.element,o)}};var c=0,u=Array.prototype.slice;e.cleanData=function(t){return function(o){var i,n,r;for(r=0;null!=(n=o[r]);r++)try{i=e._data(n,"events"),i&&i.remove&&e(n).triggerHandler("remove")}catch(a){}t(o)}}(e.cleanData),e.widget=function(t,o,i){var n,r,a,s,l={},c=t.split(".")[0];return t=t.split(".")[1],n=c+"-"+t,i||(i=o,o=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[c]=e[c]||{},r=e[c][t],a=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new a(e,t)},e.extend(a,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),s=new o,s.options=e.widget.extend({},s.options),e.each(i,function(t,i){return e.isFunction(i)?void(l[t]=function(){var e=function(){return o.prototype[t].apply(this,arguments)},n=function(e){return o.prototype[t].apply(this,e)};return function(){var t,o=this._super,r=this._superApply;return this._super=e,this._superApply=n,t=i.apply(this,arguments),this._super=o,this._superApply=r,t}}()):void(l[t]=i)}),a.prototype=e.widget.extend(s,{widgetEventPrefix:r?s.widgetEventPrefix||t:t},l,{constructor:a,namespace:c,widgetName:t,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,o){var i=o.prototype;e.widget(i.namespace+"."+i.widgetName,a,o._proto)}),delete r._childConstructors):o._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var o,i,n=u.call(arguments,1),r=0,a=n.length;a>r;r++)for(o in n[r])i=n[r][o],n[r].hasOwnProperty(o)&&void 0!==i&&(t[o]=e.isPlainObject(i)?e.isPlainObject(t[o])?e.widget.extend({},t[o],i):e.widget.extend({},i):i);return t},e.widget.bridge=function(t,o){var i=o.prototype.widgetFullName||t;e.fn[t]=function(n){var r="string"==typeof n,a=u.call(arguments,1),s=this;return r?this.each(function(){var o,r=e.data(this,i);return"instance"===n?(s=r,!1):r?e.isFunction(r[n])&&"_"!==n.charAt(0)?(o=r[n].apply(r,a),o!==r&&void 0!==o?(s=o&&o.jquery?s.pushStack(o.get()):o,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+n+"'")}):(a.length&&(n=e.widget.extend.apply(null,[n].concat(a))),this.each(function(){var t=e.data(this,i);t?(t.option(n||{}),t._init&&t._init()):e.data(this,i,new o(n,this))})),s}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,o){o=e(o||this.defaultElement||this)[0],this.element=e(o),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),o!==this&&(e.data(o,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===o&&this.destroy()}}),this.document=e(o.style?o.ownerDocument:o.document||o),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.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:e.noop,widget:function(){return this.element},option:function(t,o){var i,n,r,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(n=a[t]=e.widget.extend({},this.options[t]),r=0;i.length-1>r;r++)n[i[r]]=n[i[r]]||{},n=n[i[r]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=o}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=o}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,o,i){var n,r=this;"boolean"!=typeof t&&(i=o,o=t,t=!1),i?(o=n=e(o),this.bindings=this.bindings.add(o)):(i=o,o=this.element,n=this.widget()),e.each(i,function(i,a){function s(){return t||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof a?r[a]:a).apply(r,arguments):void 0}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+r.eventNamespace,u=l[2];u?n.delegate(u,c,s):o.bind(c,s)})},_off:function(t,o){o=(o||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(o).undelegate(o),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function o(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(o,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,o,i){var n,r,a=this.options[t];if(i=i||{},o=e.Event(o),o.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),o.target=this.element[0],r=o.originalEvent)for(n in r)n in o||(o[n]=r[n]);return this.element.trigger(o,i),!(e.isFunction(a)&&a.apply(this.element[0],[o].concat(i))===!1||o.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,o){e.Widget.prototype["_"+t]=function(i,n,r){"string"==typeof n&&(n={effect:n});var a,s=n?n===!0||"number"==typeof n?o:n.effect||o:t;n=n||{},"number"==typeof n&&(n={duration:n}),a=!e.isEmptyObject(n),n.complete=r,n.delay&&i.delay(n.delay),a&&e.effects&&e.effects.effect[s]?i[t](n):s!==t&&i[s]?i[s](n.duration,n.easing,r):i.queue(function(o){e(this)[t](),r&&r.call(i[0]),o()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(o){return!0===e.data(o.target,t.widgetName+".preventClickEvent")?(e.removeData(o.target,t.widgetName+".preventClickEvent"),o.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var o=this,i=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return i&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){o.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return o._mouseMove(e)},this._mouseUpDelegate=function(e){return o._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,o){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?o/100:1)]}function o(t,o){return parseInt(e.css(t,o),10)||0}function i(t){var o=t[0];return 9===o.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(o)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:o.preventDefault?{width:0,height:0,offset:{top:o.pageY,left:o.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,r,a=Math.max,s=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,o,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=i.children()[0];return e("body").append(i),t=r.offsetWidth,i.css("overflow","scroll"),o=r.offsetWidth,t===o&&(o=i[0].clientWidth),i.remove(),n=t-o},getScrollInfo:function(t){var o=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===o||"auto"===o&&t.width<t.element[0].scrollWidth,r="scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight;

Callers 2

ethercalc.jsFile · 0.70
bFunction · 0.70

Calls 1

eFunction · 0.70

Tested by

no test coverage detected