diff --git a/.cspell.json b/.cspell.json index 5da2efd555..0d53e3b821 100644 --- a/.cspell.json +++ b/.cspell.json @@ -95,7 +95,6 @@ "lintstagedrc", "localise", "mdm", - "ministryofjustice", "MRUI", "Mulesoft", "nbsp", diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json index d5145b6645..77a0af7d72 100644 --- a/src/ui/package-lock.json +++ b/src/ui/package-lock.json @@ -12,7 +12,6 @@ "@babel/core": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/preset-env": "^7.24.7", - "@ministryofjustice/frontend": "^2.1.3", "@types/compression": "^1.7.5", "@types/connect-flash": "^0.0.38", "@types/cookie-parser": "^1.4.7", @@ -2712,21 +2711,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@ministryofjustice/frontend": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@ministryofjustice/frontend/-/frontend-2.1.3.tgz", - "integrity": "sha512-kFStfY6Ckbx9OGUEf2xXAjG8oUGXpARpbogk569MTH5LnI1txVT0NieskA4Vthic+2yQ++bePtKX46U1f30rLA==", - "dependencies": { - "govuk-frontend": "^5.0.0", - "moment": "^2.27.0" - }, - "engines": { - "node": ">= 4.2.0" - }, - "peerDependencies": { - "jquery": "^3.6.0" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -10455,14 +10439,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "engines": { - "node": "*" - } - }, "node_modules/morgan": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", diff --git a/src/ui/package.json b/src/ui/package.json index a0d56bb878..f9826e2a38 100644 --- a/src/ui/package.json +++ b/src/ui/package.json @@ -25,7 +25,6 @@ "@babel/core": "^7.24.7", "@babel/plugin-transform-runtime": "^7.24.7", "@babel/preset-env": "^7.24.7", - "@ministryofjustice/frontend": "^2.1.3", "@types/compression": "^1.7.5", "@types/connect-flash": "^0.0.38", "@types/cookie-parser": "^1.4.7", diff --git a/src/ui/public/js/mojFrontend.js b/src/ui/public/js/mojFrontend.js deleted file mode 100644 index 565ada62d4..0000000000 --- a/src/ui/public/js/mojFrontend.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see mojFrontend.js.LICENSE.txt */ -var EXIP;!function(){var t={443:function(t,e){var n,o,r;o=[],void 0===(r="function"==typeof(n=function(){var t={removeAttributeValue:function(t,e,n){var o,r;t.getAttribute(e)&&(t.getAttribute(e)==n?t.removeAttribute(e):(o=new RegExp("(^|\\s)"+n+"(\\s|$)"),(r=t.getAttribute(e).match(o))&&3==r.length&&t.setAttribute(e,t.getAttribute(e).replace(o,r[1]&&r[2]?" ":""))))},addAttributeValue:function(t,e,n){t.getAttribute(e)?new RegExp("(^|\\s)"+n+"(\\s|$)").test(t.getAttribute(e))||t.setAttribute(e,t.getAttribute(e)+" "+n):t.setAttribute(e,n)},dragAndDropSupported:function(){return void 0!==document.createElement("div").ondrop},formDataSupported:function(){return"function"==typeof FormData},fileApiSupported:function(){var t=document.createElement("input");return t.type="file",void 0!==t.files},nodeListForEach:function(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(var n=0;nRemove')},t.AddAnother.prototype.resetItem=function(t){t.find("[data-name], [data-id]").each((function(t,e){"checkbox"==e.type||"radio"==e.type?e.checked=!1:e.value=""}))},t.AddAnother.prototype.onRemoveButtonClick=function(t){$(t.currentTarget).parents(".moj-add-another__item").remove();var e=this.getItems();1===e.length&&e.find(".moj-add-another__remove-button").remove(),e.each($.proxy((function(t,e){this.updateAttributes(t,$(e))}),this)),this.focusHeading()},t.AddAnother.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").focus()},t.ButtonMenu=function(t){this.container=$(t.container),this.menu=this.container.find(".moj-button-menu__wrapper"),t.menuClasses&&this.menu.addClass(t.menuClasses),this.menu.attr("role","menu"),this.mq=t.mq,this.buttonText=t.buttonText,this.buttonClasses=t.buttonClasses||"",this.keys={esc:27,up:38,down:40,tab:9},this.menu.on("keydown","[role=menuitem]",$.proxy(this,"onButtonKeydown")),this.createToggleButton(),this.setupResponsiveChecks(),$(document).on("click",$.proxy(this,"onDocumentClick"))},t.ButtonMenu.prototype.onDocumentClick=function(t){$.contains(this.container[0],t.target)||this.hideMenu()},t.ButtonMenu.prototype.createToggleButton=function(){this.menuButton=$('"),this.menuButton.on("click",$.proxy(this,"onMenuButtonClick")),this.menuButton.on("keydown",$.proxy(this,"onMenuKeyDown"))},t.ButtonMenu.prototype.setupResponsiveChecks=function(){this.mql=window.matchMedia(this.mq),this.mql.addListener($.proxy(this,"checkMode")),this.checkMode(this.mql)},t.ButtonMenu.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},t.ButtonMenu.prototype.enableSmallMode=function(){this.container.prepend(this.menuButton),this.hideMenu(),this.removeButtonClasses(),this.menu.attr("role","menu"),this.container.find(".moj-button-menu__item").attr("role","menuitem")},t.ButtonMenu.prototype.enableBigMode=function(){this.menuButton.detach(),this.showMenu(),this.addButtonClasses(),this.menu.removeAttr("role"),this.container.find(".moj-button-menu__item").removeAttr("role")},t.ButtonMenu.prototype.removeButtonClasses=function(){this.menu.find(".moj-button-menu__item").each((function(t,e){$(e).hasClass("govuk-button--secondary")&&($(e).attr("data-secondary","true"),$(e).removeClass("govuk-button--secondary")),$(e).hasClass("govuk-button--warning")&&($(e).attr("data-warning","true"),$(e).removeClass("govuk-button--warning")),$(e).removeClass("govuk-button")}))},t.ButtonMenu.prototype.addButtonClasses=function(){this.menu.find(".moj-button-menu__item").each((function(t,e){"true"==$(e).attr("data-secondary")&&$(e).addClass("govuk-button--secondary"),"true"==$(e).attr("data-warning")&&$(e).addClass("govuk-button--warning"),$(e).addClass("govuk-button")}))},t.ButtonMenu.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false")},t.ButtonMenu.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true")},t.ButtonMenu.prototype.onMenuButtonClick=function(){this.toggle()},t.ButtonMenu.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.menu.find("[role=menuitem]").first().focus()):(this.hideMenu(),this.menuButton.focus())},t.ButtonMenu.prototype.onMenuKeyDown=function(t){t.keyCode===this.keys.down&&this.toggle()},t.ButtonMenu.prototype.onButtonKeydown=function(t){switch(t.keyCode){case this.keys.up:t.preventDefault(),this.focusPrevious(t.currentTarget);break;case this.keys.down:t.preventDefault(),this.focusNext(t.currentTarget);break;case this.keys.esc:this.mql.matches||(this.menuButton.focus(),this.hideMenu());break;case this.keys.tab:this.mql.matches||this.hideMenu()}},t.ButtonMenu.prototype.focusNext=function(t){var e=$(t).next();e[0]?e.focus():this.container.find("[role=menuitem]").first().focus()},t.ButtonMenu.prototype.focusPrevious=function(t){var e=$(t).prev();e[0]?e.focus():this.container.find("[role=menuitem]").last().focus()},t.FilterToggleButton=function(t){this.options=t,this.container=$(this.options.toggleButton.container),this.filterContainer=$(this.options.filter.container),this.createToggleButton(),this.setupResponsiveChecks(),this.filterContainer.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()},t.FilterToggleButton.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener($.proxy(this,"checkMode")),this.checkMode(this.mq)},t.FilterToggleButton.prototype.createToggleButton=function(){this.menuButton=$('"),this.menuButton.on("click",$.proxy(this,"onMenuButtonClick")),this.container.append(this.menuButton)},t.FilterToggleButton.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},t.FilterToggleButton.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},t.FilterToggleButton.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},t.FilterToggleButton.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=$('"),this.closeButton.on("click",$.proxy(this,"onCloseClick")),$(this.options.closeButton.container).append(this.closeButton))},t.FilterToggleButton.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},t.FilterToggleButton.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},t.FilterToggleButton.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.filterContainer.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},t.FilterToggleButton.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.filterContainer.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},t.FilterToggleButton.prototype.onMenuButtonClick=function(){this.toggle()},t.FilterToggleButton.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.filterContainer.focus()):this.hideMenu()},t.FormValidator=function(t,e){this.form=t,this.errors=[],this.validators=[],$(this.form).on("submit",$.proxy(this,"onSubmit")),this.summary=e&&e.summary?$(e.summary):$(".govuk-error-summary"),this.originalTitle=document.title},t.FormValidator.entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},t.FormValidator.prototype.escapeHtml=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return t.FormValidator.entityMap[e]}))},t.FormValidator.prototype.resetTitle=function(){document.title=this.originalTitle},t.FormValidator.prototype.updateTitle=function(){document.title=this.errors.length+" errors - "+document.title},t.FormValidator.prototype.showSummary=function(){this.summary.html(this.getSummaryHtml()),this.summary.removeClass("moj-hidden"),this.summary.attr("aria-labelledby","errorSummary-heading"),this.summary.focus()},t.FormValidator.prototype.getSummaryHtml=function(){var t='

There is a problem

';t+='
',t+='",t+="
"},t.FormValidator.prototype.hideSummary=function(){this.summary.addClass("moj-hidden"),this.summary.removeAttr("aria-labelledby")},t.FormValidator.prototype.onSubmit=function(t){this.removeInlineErrors(),this.hideSummary(),this.resetTitle(),this.validate()||(t.preventDefault(),this.updateTitle(),this.showSummary(),this.showInlineErrors())},t.FormValidator.prototype.showInlineErrors=function(){for(var t=0,e=this.errors.length;t'+this.escapeHtml(e.message)+"",r=$("#"+e.fieldName),i=r.parents(".govuk-form-group"),a=i.find("label"),s=i.find("legend"),u=i.find("fieldset");i.addClass("govuk-form-group--error"),s.length?(s.after(o),i.attr("aria-invalid","true"),t.addAttributeValue(u[0],"aria-describedby",n)):(a.after(o),r.attr("aria-invalid","true"),t.addAttributeValue(r[0],"aria-describedby",n))},t.FormValidator.prototype.removeInlineErrors=function(){for(var t=0;t'),this.dropzone=this.container.find(".moj-multi-file-upload__dropzone"),this.dropzone.on("dragover",$.proxy(this,"onDragOver")),this.dropzone.on("dragleave",$.proxy(this,"onDragLeave")),this.dropzone.on("drop",$.proxy(this,"onDrop"))},t.MultiFileUpload.prototype.setupLabel=function(){this.label=$('"),this.dropzone.append('

'+this.params.dropzoneHintText+"

"),this.dropzone.append(this.label)},t.MultiFileUpload.prototype.setupFileInput=function(){this.fileInput=this.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",$.proxy(this,"onFileChange")),this.fileInput.on("focus",$.proxy(this,"onFileFocus")),this.fileInput.on("blur",$.proxy(this,"onFileBlur"))},t.MultiFileUpload.prototype.setupStatusBox=function(){this.status=$('
'),this.dropzone.append(this.status)},t.MultiFileUpload.prototype.onDragOver=function(t){t.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},t.MultiFileUpload.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},t.MultiFileUpload.prototype.onDrop=function(t){t.preventDefault(),this.dropzone.removeClass("moj-multi-file-upload--dragover"),this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.originalEvent.dataTransfer.files)},t.MultiFileUpload.prototype.uploadFiles=function(t){for(var e=0;e '+t.messageHtml+""},t.MultiFileUpload.prototype.getErrorHtml=function(t){return' '+t.message+""},t.MultiFileUpload.prototype.getFileRowHtml=function(t){var e="";return e+='
',e+='
',e+=''+t.name+"",e+='0%',e+="
",e+='
',e+="
"},t.MultiFileUpload.prototype.getDeleteButtonHtml=function(t){var e='"},t.MultiFileUpload.prototype.uploadFile=function(t){this.params.uploadFileEntryHook(this,t);var e=new FormData;e.append("documents",t);var n=$(this.getFileRowHtml(t));this.feedbackContainer.find(".moj-multi-file-upload__list").append(n),$.ajax({url:this.params.uploadUrl,type:"post",data:e,processData:!1,contentType:!1,success:$.proxy((function(e){e.error?(n.find(".moj-multi-file-upload__message").html(this.getErrorHtml(e.error)),this.status.html(e.error.message)):(n.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(e.success)),this.status.html(e.success.messageText)),n.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(e.file)),this.params.uploadFileExitHook(this,t,e)}),this),error:$.proxy((function(e,n,o){this.params.uploadFileErrorHook(this,t,e,n,o)}),this),xhr:function(){var t=new XMLHttpRequest;return t.upload.addEventListener("progress",(function(t){if(t.lengthComputable){var e=t.loaded/t.total;e=parseInt(100*e,10),n.find(".moj-multi-file-upload__progress").text(" "+e+"%")}}),!1),t}})},t.MultiFileUpload.prototype.onFileDeleteClick=function(t){t.preventDefault();var e=$(t.currentTarget),n={};n[e[0].name]=e[0].value,$.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:n,success:$.proxy((function(t){t.error||(e.parents(".moj-multi-file-upload__row").remove(),0===this.feedbackContainer.find(".moj-multi-file-upload__row").length&&this.feedbackContainer.addClass("moj-hidden")),this.params.fileDeleteHook(this,t)}),this)})}),t.MultiSelect=function(t){this.container=$(t.container),this.container.data("moj-multi-select-initialised")||(this.container.data("moj-multi-select-initialised",!0),this.toggle=$(this.getToggleHtml()),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",$.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=$(t.checkboxes),this.checkboxes.on("click",$.proxy(this,"onCheckboxClick")),this.checked=t.checked||!1)},t.MultiSelect.prototype.getToggleHtml=function(){var t="";return t+='
',t+=' ',t+=' ",t+="
"},t.MultiSelect.prototype.onButtonClick=function(t){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},t.MultiSelect.prototype.checkAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!0}),this)),this.checked=!0},t.MultiSelect.prototype.uncheckAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!1}),this)),this.checked=!1},t.MultiSelect.prototype.onCheckboxClick=function(t){t.target.checked?this.checkboxes.filter(":checked").length===this.checkboxes.length&&(this.toggleButton[0].checked=!0,this.checked=!0):(this.toggleButton[0].checked=!1,this.checked=!1)},t.PasswordReveal=function(t){this.el=t;var e=$(this.el);e.data("moj-password-reveal-initialised")||(e.data("moj-password-reveal-initialised",!0),e.attr("spellcheck","false"),e.wrap('
'),this.container=$(this.el).parent(),this.createButton())},t.PasswordReveal.prototype.createButton=function(){this.button=$(''),this.container.append(this.button),this.button.on("click",$.proxy(this,"onButtonClick"))},t.PasswordReveal.prototype.onButtonClick=function(){"password"===this.el.type?(this.el.type="text",this.button.html('Hide password')):(this.el.type="password",this.button.html('Show password'))},"contentEditable"in document.documentElement&&(t.RichTextEditor=function(t){this.options=t,this.options.toolbar=this.options.toolbar||{bold:!1,italic:!1,underline:!1,bullets:!0,numbers:!0},this.textarea=this.options.textarea,this.container=$(this.textarea).parent(),this.container.data("moj-rich-text-editor-initialised")||(this.container.data("moj-rich-text-editor-initialised",!0),this.createToolbar(),this.hideDefault(),this.configureToolbar(),this.keys={left:37,right:39,up:38,down:40},this.container.on("click",".moj-rich-text-editor__toolbar-button",$.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",$.proxy(this,"onEditorInput")),this.container.find("label").on("click",$.proxy(this,"onLabelClick")),this.toolbar.on("keydown",$.proxy(this,"onToolbarKeydown")))},t.RichTextEditor.prototype.onToolbarKeydown=function(t){var e;switch(t.keyCode){case this.keys.right:case this.keys.down:var n=(e=this.toolbar.find("button[tabindex=0]")).next("button");n[0]&&(n.focus(),e.attr("tabindex","-1"),n.attr("tabindex","0"));break;case this.keys.left:case this.keys.up:var o=(e=this.toolbar.find("button[tabindex=0]")).prev("button");o[0]&&(o.focus(),e.attr("tabindex","-1"),o.attr("tabindex","0"))}},t.RichTextEditor.prototype.getToolbarHtml=function(){var t="";return t+='"},t.RichTextEditor.prototype.getEnhancedHtml=function(t){return this.getToolbarHtml()+'
'},t.RichTextEditor.prototype.hideDefault=function(){this.textarea=this.container.find("textarea"),this.textarea.addClass("govuk-visually-hidden"),this.textarea.attr("aria-hidden",!0),this.textarea.attr("tabindex","-1")},t.RichTextEditor.prototype.createToolbar=function(){this.toolbar=document.createElement("div"),this.toolbar.className="moj-rich-text-editor",this.toolbar.innerHTML=this.getEnhancedHtml(),this.container.append(this.toolbar),this.toolbar=this.container.find(".moj-rich-text-editor__toolbar"),this.container.find(".moj-rich-text-editor__content").html(this.textarea.val())},t.RichTextEditor.prototype.configureToolbar=function(){this.buttons=this.container.find(".moj-rich-text-editor__toolbar-button"),this.buttons.prop("tabindex","-1"),this.buttons.first().prop("tabindex","0")},t.RichTextEditor.prototype.onButtonClick=function(t){document.execCommand($(t.currentTarget).data("command"),!1,null)},t.RichTextEditor.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},t.RichTextEditor.prototype.onEditorInput=function(t){this.updateTextarea()},t.RichTextEditor.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},t.RichTextEditor.prototype.onLabelClick=function(t){t.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()}),t.SearchToggle=function(t){if(this.options=t,this.container=$(this.options.search.container),this.toggleButtonContainer=$(this.options.toggleButton.container),this.container.data("moj-search-toggle-initialised"))return;this.container.data("moj-search-toggle-initialised",!0);const e='';this.toggleButton=$('"),this.toggleButton.on("click",$.proxy(this,"onToggleButtonClick")),this.toggleButtonContainer.append(this.toggleButton),$(document).on("click",this.onDocumentClick.bind(this)),$(document).on("focusin",this.onDocumentClick.bind(this))},t.SearchToggle.prototype.showMenu=function(){this.toggleButton.attr("aria-expanded","true"),this.container.removeClass("moj-js-hidden"),this.container.find("input").first().focus()},t.SearchToggle.prototype.hideMenu=function(){this.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false")},t.SearchToggle.prototype.onToggleButtonClick=function(){"false"==this.toggleButton.attr("aria-expanded")?this.showMenu():this.hideMenu()},t.SearchToggle.prototype.onDocumentClick=function(t){$.contains(this.toggleButtonContainer[0],t.target)||$.contains(this.container[0],t.target)||this.hideMenu()},t.SortableTable=function(t){this.table=$(t.table),this.table.data("moj-search-toggle-initialised")||(this.table.data("moj-search-toggle-initialised",!0),this.setupOptions(t),this.body=this.table.find("tbody"),this.createHeadingButtons(),this.createStatusBox(),this.initialiseSortedColumn(),this.table.on("click","th button",$.proxy(this,"onSortButtonClick")))},t.SortableTable.prototype.setupOptions=function(t){t=t||{},this.statusMessage=t.statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=t.ascendingText||"ascending",this.descendingText=t.descendingText||"descending"},t.SortableTable.prototype.createHeadingButtons=function(){for(var t,e=this.table.find("thead th"),n=0;n'+n+"");t.text(""),t.append(o)},t.SortableTable.prototype.createStatusBox=function(){this.status=$('
'),this.table.parent().append(this.status)},t.SortableTable.prototype.initialiseSortedColumn=function(){var t=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each(((e,n)=>{var o=$(n).attr("aria-sort"),r=$(n).find("button").attr("data-index"),i=this.sort(t,r,o);this.addRows(i)}))},t.SortableTable.prototype.onSortButtonClick=function(t){var e,n=t.currentTarget.getAttribute("data-index"),o=$(t.currentTarget).parent().attr("aria-sort");e="none"===o||"descending"===o?"ascending":"descending";var r=this.getTableRowsArray(),i=this.sort(r,n,e);this.addRows(i),this.removeButtonStates(),this.updateButtonState($(t.currentTarget),e)},t.SortableTable.prototype.updateButtonState=function(t,e){t.parent().attr("aria-sort",e);var n=this.statusMessage;n=(n=n.replace(/%heading%/,t.text())).replace(/%direction%/,this[e+"Text"]),this.status.text(n)},t.SortableTable.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},t.SortableTable.prototype.addRows=function(t){for(var e=0;e0&&e-1 in t)}function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}j.fn=j.prototype={jquery:T,constructor:j,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=j.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return j.each(this,t)},map:function(t){return this.pushStack(j.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(j.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(j.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+D+")"+D+"*"),P=new RegExp(D+"|>"),I=new RegExp(H),W=new RegExp("^"+$+"$"),U={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+S+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),Y=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Q=function(){ut()},J=pt((function(t){return!0===t.disabled&&E(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(i=s.call(L.childNodes),L.childNodes),i[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){N.apply(t,s.call(e))},call:function(t){N.apply(t,s.call(arguments,1))}}}function Z(t,e,n,o){var r,i,a,s,l,c,f,h=e&&e.ownerDocument,y=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==y&&9!==y&&11!==y)return n;if(!o&&(ut(e),e=e||u,d)){if(11!==y&&(l=X.exec(t)))if(r=l[1]){if(9===y){if(!(a=e.getElementById(r)))return n;if(a.id===r)return m.call(n,a),n}else if(h&&(a=h.getElementById(r))&&Z.contains(e,a)&&a.id===r)return m.call(n,a),n}else{if(l[2])return m.apply(n,e.getElementsByTagName(t)),n;if((r=l[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(r)),n}if(!(T[t+" "]||p&&p.test(t))){if(f=t,h=e,1===y&&(P.test(t)||O.test(t))){for((h=G.test(t)&&st(e.parentNode)||e)==e&&g.scope||((s=e.getAttribute("id"))?s=j.escapeSelector(s):e.setAttribute("id",s=v)),i=(c=ct(t)).length;i--;)c[i]=(s?"#"+s:":scope")+" "+dt(c[i]);f=c.join(",")}try{return m.apply(n,h.querySelectorAll(f)),n}catch(e){T(t,!0)}finally{s===v&&e.removeAttribute("id")}}}return yt(t.replace(M,"$1"),e,n,o)}function tt(){var t=[];return function n(o,r){return t.push(o+" ")>e.cacheLength&&delete n[t.shift()],n[o+" "]=r}}function et(t){return t[v]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ot(t){return function(e){return E(e,"input")&&e.type===t}}function rt(t){return function(e){return(E(e,"input")||E(e,"button"))&&e.type===t}}function it(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function at(t){return et((function(e){return e=+e,et((function(n,o){for(var r,i=t([],n.length,e),a=i.length;a--;)n[r=i[a]]&&(n[r]=!(o[r]=n[r]))}))}))}function st(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,o=t?t.ownerDocument||t:L;return o!=u&&9===o.nodeType&&o.documentElement?(l=(u=o).documentElement,d=!j.isXMLDoc(u),h=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",Q),g.getById=nt((function(t){return l.appendChild(t).id=j.expando,!u.getElementsByName||!u.getElementsByName(j.expando).length})),g.disconnectedMatch=nt((function(t){return h.call(t,"*")})),g.scope=nt((function(){return u.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace(K,Y);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace(K,Y);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var n,o,r,i=e.getElementById(t);if(i){if((n=i.getAttributeNode("id"))&&n.value===t)return[i];for(r=e.getElementsByName(t),o=0;i=r[o++];)if((n=i.getAttributeNode("id"))&&n.value===t)return[i]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(t)},p=[],nt((function(t){var e;l.appendChild(t).innerHTML="",t.querySelectorAll("[selected]").length||p.push("\\["+D+"*(?:value|"+S+")"),t.querySelectorAll("[id~="+v+"-]").length||p.push("~="),t.querySelectorAll("a#"+v+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),l.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+D+"*name"+D+"*="+D+"*(?:''|\"\")")})),g.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),C=function(t,e){if(t===e)return a=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==L&&Z.contains(L,t)?-1:e===u||e.ownerDocument==L&&Z.contains(L,e)?1:r?c.call(r,t)-c.call(r,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),d&&!T[e+" "]&&(!p||!p.test(e)))try{var n=h.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){T(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),j.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var o=e.attrHandle[n.toLowerCase()],r=o&&f.call(e.attrHandle,n.toLowerCase())?o(t,n,!d):void 0;return void 0!==r?r:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},j.uniqueSort=function(t){var e,n=[],o=0,i=0;if(a=!g.sortStable,r=!g.sortStable&&s.call(t,0),_.call(t,C),a){for(;e=t[i++];)e===t[i]&&(o=n.push(i));for(;o--;)B.call(t,n[o],1)}return r=null,t},j.fn.uniqueSort=function(){return this.pushStack(j.uniqueSort(s.apply(this)))},e=j.expr={cacheLength:50,createPseudo:et,match:U,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,Y),t[3]=(t[3]||t[4]||t[5]||"").replace(K,Y),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return U.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&I.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,Y).toLowerCase();return"*"===t?function(){return!0}:function(t){return E(t,e)}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+D+")"+t+"("+D+"|$)"))&&x(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(o){var r=Z.attr(o,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(q," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,o,r){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===o&&0===r?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,p,f,h=i!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),b=!u&&!s,x=!1;if(m){if(i){for(;h;){for(d=e;d=d[h];)if(s?E(d,g):1===d.nodeType)return!1;f=h="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&b){for(x=(p=(l=(c=m[v]||(m[v]={}))[t]||[])[0]===y&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[h]||(x=p=0)||f.pop();)if(1===d.nodeType&&++x&&d===e){c[t]=[y,p,x];break}}else if(b&&(x=p=(l=(c=e[v]||(e[v]={}))[t]||[])[0]===y&&l[1]),!1===x)for(;(d=++p&&d&&d[h]||(x=p=0)||f.pop())&&(!(s?E(d,g):1===d.nodeType)||!++x||(b&&((c=d[v]||(d[v]={}))[t]=[y,x]),d!==e)););return(x-=r)===o||x%o==0&&x/o>=0}}},PSEUDO:function(t,n){var o,r=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return r[v]?r(n):r.length>1?(o=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var o,i=r(t,n),a=i.length;a--;)t[o=c.call(t,i[a])]=!(e[o]=i[a])})):function(t){return r(t,0,o)}):r}},pseudos:{not:et((function(t){var e=[],n=[],o=vt(t.replace(M,"$1"));return o[v]?et((function(t,e,n,r){for(var i,a=o(t,null,r,[]),s=t.length;s--;)(i=a[s])&&(t[s]=!(e[s]=i))})):function(t,r,i){return e[0]=t,o(e,null,i,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace(K,Y),function(e){return(e.textContent||j.text(e)).indexOf(t)>-1}})),lang:et((function(t){return W.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(K,Y).toLowerCase(),function(e){var n;do{if(n=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=o.location&&o.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===l},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:it(!1),disabled:it(!0),checked:function(t){return E(t,"input")&&!!t.checked||E(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return V.test(t.nodeName)},input:function(t){return z.test(t.nodeName)},button:function(t){return E(t,"input")&&"button"===t.type||E(t,"button")},text:function(t){var e;return E(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:at((function(){return[0]})),last:at((function(t,e){return[e-1]})),eq:at((function(t,e,n){return[n<0?n+e:n]})),even:at((function(t,e){for(var n=0;ne?e:n;--o>=0;)t.push(o);return t})),gt:at((function(t,e,n){for(var o=n<0?n+e:n;++o1?function(e,n,o){for(var r=t.length;r--;)if(!t[r](e,n,o))return!1;return!0}:t[0]}function ht(t,e,n,o,r){for(var i,a=[],s=0,u=t.length,l=null!=e;s-1&&(i[l]=!(a[l]=p))}}else f=ht(f===a?f.splice(v,f.length):f),r?r(null,a,f,u):m.apply(a,f)}))}function gt(t){for(var o,r,i,a=t.length,s=e.relative[t[0].type],u=s||e.relative[" "],l=s?1:0,d=pt((function(t){return t===o}),u,!0),p=pt((function(t){return c.call(o,t)>-1}),u,!0),f=[function(t,e,r){var i=!s&&(r||e!=n)||((o=e).nodeType?d(t,e,r):p(t,e,r));return o=null,i}];l1&&ft(f),l>1&&dt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(M,"$1"),r,l0,i=t.length>0,a=function(a,s,l,c,p){var f,h,g,v=0,b="0",x=a&&[],w=[],k=n,T=a||i&&e.find.TAG("*",p),C=y+=null==k?1:Math.random()||.1,S=T.length;for(p&&(n=s==u||s||p);b!==S&&null!=(f=T[b]);b++){if(i&&f){for(h=0,s||f.ownerDocument==u||(ut(f),l=!d);g=t[h++];)if(g(f,s||u,l)){m.call(c,f);break}p&&(y=C)}r&&((f=!g&&f)&&v--,a&&x.push(f))}if(v+=b,r&&b!==v){for(h=0;g=o[h++];)g(x,w,s,l);if(a){if(v>0)for(;b--;)x[b]||w[b]||(w[b]=A.call(c));w=ht(w)}m.apply(c,w),p&&!a&&w.length>0&&v+o.length>1&&j.uniqueSort(c)}return p&&(y=C,n=k),x};return r?et(a):a}(a,i)),s.selector=t}return s}function yt(t,n,o,r){var i,a,s,u,l,c="function"==typeof t&&t,p=!r&&ct(t=c.selector||t);if(o=o||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&d&&e.relative[a[1].type]){if(!(n=(e.find.ID(s.matches[0].replace(K,Y),n)||[])[0]))return o;c&&(n=n.parentNode),t=t.slice(a.shift().value.length)}for(i=U.needsContext.test(t)?0:a.length;i--&&(s=a[i],!e.relative[u=s.type]);)if((l=e.find[u])&&(r=l(s.matches[0].replace(K,Y),G.test(a[0].type)&&st(n.parentNode)||n))){if(a.splice(i,1),!(t=r.length&&dt(a)))return m.apply(o,r),o;break}}return(c||vt(t,p))(r,n,!d,o,!n||G.test(t)&&st(n.parentNode)||n),o}lt.prototype=e.filters=e.pseudos,e.setFilters=new lt,g.sortStable=v.split("").sort(C).join("")===v,ut(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),j.find=Z,j.expr[":"]=j.expr.pseudos,j.unique=j.uniqueSort,Z.compile=vt,Z.select=yt,Z.setDocument=ut,Z.tokenize=ct,Z.escape=j.escapeSelector,Z.getText=j.text,Z.isXML=j.isXMLDoc,Z.selectors=j.expr,Z.support=j.support,Z.uniqueSort=j.uniqueSort}();var H=function(t,e,n){for(var o=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&j(t).is(n))break;o.push(t)}return o},q=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=j.expr.match.needsContext,O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return v(e)?j.grep(t,(function(t,o){return!!e.call(t,o,t)!==n})):e.nodeType?j.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?j.grep(t,(function(t){return c.call(e,t)>-1!==n})):j.filter(e,t,n)}j.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?j.find.matchesSelector(o,t)?[o]:[]:j.find.matches(t,j.grep(e,(function(t){return 1===t.nodeType})))},j.fn.extend({find:function(t){var e,n,o=this.length,r=this;if("string"!=typeof t)return this.pushStack(j(t).filter((function(){for(e=0;e1?j.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&R.test(t)?j(t):t||[],!1).length}});var I,W=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(j.fn.init=function(t,e,n){var o,r;if(!t)return this;if(n=n||I,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:W.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof j?e[0]:e,j.merge(this,j.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),O.test(o[1])&&j.isPlainObject(e))for(o in e)v(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(r=b.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(j):j.makeArray(t,this)}).prototype=j.fn,I=j(b);var U=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function V(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}j.fn.extend({has:function(t){var e=j(t,this),n=e.length;return this.filter((function(){for(var t=0;t-1:1===n.nodeType&&j.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?j.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?c.call(j(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(j.uniqueSort(j.merge(this.get(),j(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),j.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return H(t,"parentNode")},parentsUntil:function(t,e,n){return H(t,"parentNode",n)},next:function(t){return V(t,"nextSibling")},prev:function(t){return V(t,"previousSibling")},nextAll:function(t){return H(t,"nextSibling")},prevAll:function(t){return H(t,"previousSibling")},nextUntil:function(t,e,n){return H(t,"nextSibling",n)},prevUntil:function(t,e,n){return H(t,"previousSibling",n)},siblings:function(t){return q((t.parentNode||{}).firstChild,t)},children:function(t){return q(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(E(t,"template")&&(t=t.content||t),j.merge([],t.childNodes))}},(function(t,e){j.fn[t]=function(n,o){var r=j.map(this,e,n);return"Until"!==t.slice(-5)&&(o=n),o&&"string"==typeof o&&(r=j.filter(o,r)),this.length>1&&(z[t]||j.uniqueSort(r),U.test(t)&&r.reverse()),this.pushStack(r)}}));var X=/[^\x20\t\r\n\f]+/g;function G(t){return t}function K(t){throw t}function Y(t,e,n,o){var r;try{t&&v(r=t.promise)?r.call(t).done(e).fail(n):t&&v(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}j.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return j.each(t.match(X)||[],(function(t,n){e[n]=!0})),e}(t):j.extend({},t);var e,n,o,r,i=[],a=[],s=-1,u=function(){for(r=r||t.once,o=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)i.splice(n,1),n<=s&&s--})),this},has:function(t){return t?j.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return r=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return r=a=[],n||e||(i=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!o}};return l},j.extend({Deferred:function(t){var e=[["notify","progress",j.Callbacks("memory"),j.Callbacks("memory"),2],["resolve","done",j.Callbacks("once memory"),j.Callbacks("once memory"),0,"resolved"],["reject","fail",j.Callbacks("once memory"),j.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return j.Deferred((function(n){j.each(e,(function(e,o){var r=v(t[o[4]])&&t[o[4]];i[o[1]]((function(){var t=r&&r.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,r){var i=0;function a(t,e,n,r){return function(){var s=this,u=arguments,l=function(){var o,l;if(!(t=i&&(n!==K&&(s=void 0,u=[o]),e.rejectWith(s,u))}};t?c():(j.Deferred.getErrorHook?c.error=j.Deferred.getErrorHook():j.Deferred.getStackHook&&(c.error=j.Deferred.getStackHook()),o.setTimeout(c))}}return j.Deferred((function(o){e[0][3].add(a(0,o,v(r)?r:G,o.notifyWith)),e[1][3].add(a(0,o,v(t)?t:G)),e[2][3].add(a(0,o,v(n)?n:K))})).promise()},promise:function(t){return null!=t?j.extend(t,r):r}},i={};return j.each(e,(function(t,o){var a=o[2],s=o[5];r[o[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(o[3].fire),i[o[0]]=function(){return i[o[0]+"With"](this===i?void 0:this,arguments),this},i[o[0]+"With"]=a.fireWith})),r.promise(i),t&&t.call(i,i),i},when:function(t){var e=arguments.length,n=e,o=Array(n),r=s.call(arguments),i=j.Deferred(),a=function(t){return function(n){o[t]=this,r[t]=arguments.length>1?s.call(arguments):n,--e||i.resolveWith(o,r)}};if(e<=1&&(Y(t,i.done(a(n)).resolve,i.reject,!e),"pending"===i.state()||v(r[n]&&r[n].then)))return i.then();for(;n--;)Y(r[n],a(n),i.reject);return i.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;j.Deferred.exceptionHook=function(t,e){o.console&&o.console.warn&&t&&Q.test(t.name)&&o.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},j.readyException=function(t){o.setTimeout((function(){throw t}))};var J=j.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),o.removeEventListener("load",Z),j.ready()}j.fn.ready=function(t){return J.then(t).catch((function(t){j.readyException(t)})),this},j.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--j.readyWait:j.isReady)||(j.isReady=!0,!0!==t&&--j.readyWait>0||J.resolveWith(b,[j]))}}),j.ready.then=J.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?o.setTimeout(j.ready):(b.addEventListener("DOMContentLoaded",Z),o.addEventListener("load",Z));var tt=function(t,e,n,o,r,i,a){var s=0,u=t.length,l=null==n;if("object"===k(n))for(s in r=!0,n)tt(t,e,s,n[s],!0,i,a);else if(void 0!==o&&(r=!0,v(o)||(a=!0),l&&(a?(e.call(t,o),e=null):(l=e,e=function(t,e,n){return l.call(j(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),j.extend({queue:function(t,e,n){var o;if(t)return e=(e||"fx")+"queue",o=st.get(t,e),n&&(!o||Array.isArray(n)?o=st.access(t,e,j.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=j.queue(t,e),o=n.length,r=n.shift(),i=j._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===e&&n.unshift("inprogress"),delete i.stop,r.call(t,(function(){j.dequeue(t,e)}),i)),!o&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return st.get(t,n)||st.access(t,n,{empty:j.Callbacks("once memory").add((function(){st.remove(t,[e+"queue",n])}))})}}),j.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Et=/^$|^module$|\/(?:java|ecma)script/i;Tt=b.createDocumentFragment().appendChild(b.createElement("div")),(Ct=b.createElement("input")).setAttribute("type","radio"),Ct.setAttribute("checked","checked"),Ct.setAttribute("name","t"),Tt.appendChild(Ct),g.checkClone=Tt.cloneNode(!0).cloneNode(!0).lastChild.checked,Tt.innerHTML="",g.noCloneChecked=!!Tt.cloneNode(!0).lastChild.defaultValue,Tt.innerHTML="",g.option=!!Tt.lastChild;var At={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function _t(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?j.merge([t],n):n}function Bt(t,e){for(var n=0,o=t.length;n",""]);var Dt=/<|&#?\w+;/;function Mt(t,e,n,o,r){for(var i,a,s,u,l,c,d=e.createDocumentFragment(),p=[],f=0,h=t.length;f-1)r&&r.push(i);else if(l=gt(i),a=_t(d.appendChild(i),"script"),l&&Bt(a),n)for(c=0;i=a[c++];)Et.test(i.type||"")&&n.push(i);return d}var $t=/^([^.]*)(?:\.(.+)|)/;function Ft(){return!0}function Lt(){return!1}function Nt(t,e,n,o,r,i){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(o=o||n,n=void 0),e)Nt(t,s,n,o,e[s],i);return t}if(null==o&&null==r?(r=n,o=n=void 0):null==r&&("string"==typeof n?(r=o,o=void 0):(r=o,o=n,n=void 0)),!1===r)r=Lt;else if(!r)return t;return 1===i&&(a=r,r=function(t){return j().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=j.guid++)),t.each((function(){j.event.add(this,e,r,o,n)}))}function Ht(t,e,n){n?(st.set(t,e,!1),j.event.add(t,e,{namespace:!1,handler:function(t){var n,o=st.get(this,e);if(1&t.isTrigger&&this[e]){if(o)(j.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),st.set(this,e,o),this[e](),n=st.get(this,e),st.set(this,e,!1),o!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else o&&(st.set(this,e,j.event.trigger(o[0],o.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=Ft)}})):void 0===st.get(t,e)&&j.event.add(t,e,Ft)}j.event={global:{},add:function(t,e,n,o,r){var i,a,s,u,l,c,d,p,f,h,m,g=st.get(t);if(it(t))for(n.handler&&(n=(i=n).handler,r=i.selector),r&&j.find.matchesSelector(mt,r),n.guid||(n.guid=j.guid++),(u=g.events)||(u=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(e){return void 0!==j&&j.event.triggered!==e.type?j.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(X)||[""]).length;l--;)f=m=(s=$t.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),f&&(d=j.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=j.event.special[f]||{},c=j.extend({type:f,origType:m,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&j.expr.match.needsContext.test(r),namespace:h.join(".")},i),(p=u[f])||((p=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,o,h,a)||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),j.event.global[f]=!0)},remove:function(t,e,n,o,r){var i,a,s,u,l,c,d,p,f,h,m,g=st.hasData(t)&&st.get(t);if(g&&(u=g.events)){for(l=(e=(e||"").match(X)||[""]).length;l--;)if(f=m=(s=$t.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),f){for(d=j.event.special[f]||{},p=u[f=(o?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;)c=p[i],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(i,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(t,c));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,h,g.handle)||j.removeEvent(t,f,g.handle),delete u[f])}else for(f in u)j.event.remove(t,f+e[l],n,o,!0);j.isEmptyObject(u)&&st.remove(t,"handle events")}},dispatch:function(t){var e,n,o,r,i,a,s=new Array(arguments.length),u=j.event.fix(t),l=(st.get(this,"events")||Object.create(null))[u.type]||[],c=j.event.special[u.type]||{};for(s[0]=u,e=1;e=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(i=[],a={},n=0;n-1:j.find(r,this,null,[l]).length),a[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return l=this,u\s*$/g;function Pt(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&j(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Wt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ut(t,e){var n,o,r,i,a,s;if(1===e.nodeType){if(st.hasData(t)&&(s=st.get(t).events))for(r in st.remove(e,"handle events"),s)for(n=0,o=s[r].length;n1&&"string"==typeof h&&!g.checkClone&&Rt.test(h))return t.each((function(r){var i=t.eq(r);m&&(e[0]=h.call(this,r,i.html())),Vt(i,e,n,o)}));if(p&&(i=(r=Mt(e,t[0].ownerDocument,!1,t,o)).firstChild,1===r.childNodes.length&&(r=i),i||o)){for(s=(a=j.map(_t(r,"script"),It)).length;d0&&Bt(a,!u&&_t(t,"script")),s},cleanData:function(t){for(var e,n,o,r=j.event.special,i=0;void 0!==(n=t[i]);i++)if(it(n)){if(e=n[st.expando]){if(e.events)for(o in e.events)r[o]?j.event.remove(n,o):j.removeEvent(n,o,e.handle);n[st.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),j.fn.extend({detach:function(t){return Xt(this,t,!0)},remove:function(t){return Xt(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?j.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Vt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pt(this,t).appendChild(t)}))},prepend:function(){return Vt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Pt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Vt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Vt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(j.cleanData(_t(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return j.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,o=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!qt.test(t)&&!At[(St.exec(t)||["",""])[1].toLowerCase()]){t=j.htmlPrefilter(t);try{for(;n=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-i-u-s-.5))||0),u+l}function ce(t,e,n){var o=Yt(t),r=(!g.boxSizingReliable()||n)&&"border-box"===j.css(t,"boxSizing",!1,o),i=r,a=Zt(t,e,o),s="offset"+e[0].toUpperCase()+e.slice(1);if(Gt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&E(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===j.css(t,"display",!1,o))&&t.getClientRects().length&&(r="border-box"===j.css(t,"boxSizing",!1,o),(i=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+le(t,e,n||(r?"border":"content"),i,o,a)+"px"}function de(t,e,n,o,r){return new de.prototype.init(t,e,n,o,r)}j.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,o){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,i,a,s=rt(e),u=Kt.test(e),l=t.style;if(u||(e=re(s)),a=j.cssHooks[e]||j.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,o))?r:l[e];"string"===(i=typeof n)&&(r=ft.exec(n))&&r[1]&&(n=bt(t,e,r),i="number"),null!=n&&n==n&&("number"!==i||u||(n+=r&&r[3]||(j.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,o))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,o){var r,i,a,s=rt(e);return Kt.test(e)||(e=re(s)),(a=j.cssHooks[e]||j.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=Zt(t,e,o)),"normal"===r&&e in se&&(r=se[e]),""===n||n?(i=parseFloat(r),!0===n||isFinite(i)?i||0:r):r}}),j.each(["height","width"],(function(t,e){j.cssHooks[e]={get:function(t,n,o){if(n)return!ie.test(j.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ce(t,e,o):Qt(t,ae,(function(){return ce(t,e,o)}))},set:function(t,n,o){var r,i=Yt(t),a=!g.scrollboxSize()&&"absolute"===i.position,s=(a||o)&&"border-box"===j.css(t,"boxSizing",!1,i),u=o?le(t,e,o,s,i):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(i[e])-le(t,e,"border",!1,i)-.5)),u&&(r=ft.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=j.css(t,e)),ue(0,n,u)}}})),j.cssHooks.marginLeft=te(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),j.each({margin:"",padding:"",border:"Width"},(function(t,e){j.cssHooks[t+e]={expand:function(n){for(var o=0,r={},i="string"==typeof n?n.split(" "):[n];o<4;o++)r[t+ht[o]+e]=i[o]||i[o-2]||i[0];return r}},"margin"!==t&&(j.cssHooks[t+e].set=ue)})),j.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var o,r,i={},a=0;if(Array.isArray(e)){for(o=Yt(t),r=e.length;a1)}}),j.Tween=de,de.prototype={constructor:de,init:function(t,e,n,o,r,i){this.elem=t,this.prop=n,this.easing=r||j.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=i||(j.cssNumber[n]?"":"px")},cur:function(){var t=de.propHooks[this.prop];return t&&t.get?t.get(this):de.propHooks._default.get(this)},run:function(t){var e,n=de.propHooks[this.prop];return this.options.duration?this.pos=e=j.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):de.propHooks._default.set(this),this}},de.prototype.init.prototype=de.prototype,de.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=j.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){j.fx.step[t.prop]?j.fx.step[t.prop](t):1!==t.elem.nodeType||!j.cssHooks[t.prop]&&null==t.elem.style[re(t.prop)]?t.elem[t.prop]=t.now:j.style(t.elem,t.prop,t.now+t.unit)}}},de.propHooks.scrollTop=de.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},j.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},j.fx=de.prototype.init,j.fx.step={};var pe,fe,he=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ge(){fe&&(!1===b.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(ge):o.setTimeout(ge,j.fx.interval),j.fx.tick())}function ve(){return o.setTimeout((function(){pe=void 0})),pe=Date.now()}function ye(t,e){var n,o=0,r={height:t};for(e=e?1:0;o<4;o+=2-e)r["margin"+(n=ht[o])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function be(t,e,n){for(var o,r=(xe.tweeners[e]||[]).concat(xe.tweeners["*"]),i=0,a=r.length;i1)},removeAttr:function(t){return this.each((function(){j.removeAttr(this,t)}))}}),j.extend({attr:function(t,e,n){var o,r,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===t.getAttribute?j.prop(t,e,n):(1===i&&j.isXMLDoc(t)||(r=j.attrHooks[e.toLowerCase()]||(j.expr.match.bool.test(e)?we:void 0)),void 0!==n?null===n?void j.removeAttr(t,e):r&&"set"in r&&void 0!==(o=r.set(t,n,e))?o:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(o=r.get(t,e))?o:null==(o=j.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&E(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,o=0,r=e&&e.match(X);if(r&&1===t.nodeType)for(;n=r[o++];)t.removeAttribute(n)}}),we={set:function(t,e,n){return!1===e?j.removeAttr(t,n):t.setAttribute(n,n),n}},j.each(j.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ke[e]||j.find.attr;ke[e]=function(t,e,o){var r,i,a=e.toLowerCase();return o||(i=ke[a],ke[a]=r,r=null!=n(t,e,o)?a:null,ke[a]=i),r}}));var Te=/^(?:input|select|textarea|button)$/i,Ce=/^(?:a|area)$/i;function je(t){return(t.match(X)||[]).join(" ")}function Se(t){return t.getAttribute&&t.getAttribute("class")||""}function Ee(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(X)||[]}j.fn.extend({prop:function(t,e){return tt(this,j.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[j.propFix[t]||t]}))}}),j.extend({prop:function(t,e,n){var o,r,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&j.isXMLDoc(t)||(e=j.propFix[e]||e,r=j.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(o=r.set(t,n,e))?o:t[e]=n:r&&"get"in r&&null!==(o=r.get(t,e))?o:t[e]},propHooks:{tabIndex:{get:function(t){var e=j.find.attr(t,"tabindex");return e?parseInt(e,10):Te.test(t.nodeName)||Ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(j.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),j.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){j.propFix[this.toLowerCase()]=this})),j.fn.extend({addClass:function(t){var e,n,o,r,i,a;return v(t)?this.each((function(e){j(this).addClass(t.call(this,e,Se(this)))})):(e=Ee(t)).length?this.each((function(){if(o=Se(this),n=1===this.nodeType&&" "+je(o)+" "){for(i=0;i-1;)n=n.replace(" "+r+" "," ");a=je(n),o!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,o,r,i,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each((function(n){j(this).toggleClass(t.call(this,n,Se(this),e),e)})):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=Ee(t),this.each((function(){if(s)for(i=j(this),r=0;r-1)return!0;return!1}});var Ae=/\r/g;j.fn.extend({val:function(t){var e,n,o,r=this[0];return arguments.length?(o=v(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=o?t.call(this,n,j(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=j.map(r,(function(t){return null==t?"":t+""}))),(e=j.valHooks[this.type]||j.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=j.valHooks[r.type]||j.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Ae,""):null==n?"":n:void 0}}),j.extend({valHooks:{option:{get:function(t){var e=j.find.attr(t,"value");return null!=e?e:je(j.text(t))}},select:{get:function(t){var e,n,o,r=t.options,i=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?i+1:r.length;for(o=i<0?u:a?i:0;o-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),j.each(["radio","checkbox"],(function(){j.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=j.inArray(j(t).val(),e)>-1}},g.checkOn||(j.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var _e=o.location,Be={guid:Date.now()},De=/\?/;j.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new o.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||j.error("Invalid XML: "+(n?j.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Me=/^(?:focusinfocus|focusoutblur)$/,$e=function(t){t.stopPropagation()};j.extend(j.event,{trigger:function(t,e,n,r){var i,a,s,u,l,c,d,p,h=[n||b],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Me.test(m+j.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[j.expando]?t:new j.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:j.makeArray(e,[t]),d=j.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(n,e))){if(!r&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,Me.test(u+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||o)}for(i=0;(a=h[i++])&&!t.isPropagationStopped();)p=a,t.type=i>1?u:d.bindType||m,(c=(st.get(a,"events")||Object.create(null))[t.type]&&st.get(a,"handle"))&&c.apply(a,e),(c=l&&a[l])&&c.apply&&it(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),e)||!it(n)||l&&v(n[m])&&!y(n)&&((s=n[l])&&(n[l]=null),j.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,$e),n[m](),t.isPropagationStopped()&&p.removeEventListener(m,$e),j.event.triggered=void 0,s&&(n[l]=s)),t.result}},simulate:function(t,e,n){var o=j.extend(new j.Event,n,{type:t,isSimulated:!0});j.event.trigger(o,null,e)}}),j.fn.extend({trigger:function(t,e){return this.each((function(){j.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return j.event.trigger(t,e,n,!0)}});var Fe=/\[\]$/,Le=/\r?\n/g,Ne=/^(?:submit|button|image|reset|file)$/i,He=/^(?:input|select|textarea|keygen)/i;function qe(t,e,n,o){var r;if(Array.isArray(e))j.each(e,(function(e,r){n||Fe.test(t)?o(t,r):qe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,o)}));else if(n||"object"!==k(e))o(t,e);else for(r in e)qe(t+"["+r+"]",e[r],n,o)}j.param=function(t,e){var n,o=[],r=function(t,e){var n=v(e)?e():e;o[o.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!j.isPlainObject(t))j.each(t,(function(){r(this.name,this.value)}));else for(n in t)qe(n,t[n],e,r);return o.join("&")},j.fn.extend({serialize:function(){return j.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=j.prop(this,"elements");return t?j.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!j(this).is(":disabled")&&He.test(this.nodeName)&&!Ne.test(t)&&(this.checked||!jt.test(t))})).map((function(t,e){var n=j(this).val();return null==n?null:Array.isArray(n)?j.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Re=/%20/g,Oe=/#.*$/,Pe=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,We=/^(?:GET|HEAD)$/,Ue=/^\/\//,ze={},Ve={},Xe="*/".concat("*"),Ge=b.createElement("a");function Ke(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var o,r=0,i=e.toLowerCase().match(X)||[];if(v(n))for(;o=i[r++];)"+"===o[0]?(o=o.slice(1)||"*",(t[o]=t[o]||[]).unshift(n)):(t[o]=t[o]||[]).push(n)}}function Ye(t,e,n,o){var r={},i=t===Ve;function a(s){var u;return r[s]=!0,j.each(t[s]||[],(function(t,s){var l=s(e,n,o);return"string"!=typeof l||i||r[l]?i?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!r["*"]&&a("*")}function Qe(t,e){var n,o,r=j.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:o||(o={}))[n]=e[n]);return o&&j.extend(!0,t,o),t}Ge.href=_e.href,j.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":j.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Qe(Qe(t,j.ajaxSettings),e):Qe(j.ajaxSettings,t)},ajaxPrefilter:Ke(ze),ajaxTransport:Ke(Ve),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,i,a,s,u,l,c,d,p,f=j.ajaxSetup({},e),h=f.context||f,m=f.context&&(h.nodeType||h.jquery)?j(h):j.event,g=j.Deferred(),v=j.Callbacks("once memory"),y=f.statusCode||{},x={},w={},k="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=Ie.exec(i);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?i:null},setRequestHeader:function(t,e){return null==l&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)T.always(t[T.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||k;return n&&n.abort(e),C(0,e),this}};if(g.promise(T),f.url=((t||f.url||_e.href)+"").replace(Ue,_e.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(X)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ge.protocol+"//"+Ge.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=j.param(f.data,f.traditional)),Ye(ze,f,e,T),l)return T;for(d in(c=j.event&&f.global)&&0==j.active++&&j.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!We.test(f.type),r=f.url.replace(Oe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(p=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(De.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Pe,"$1"),p=(De.test(r)?"&":"?")+"_="+Be.guid+++p),f.url=r+p),f.ifModified&&(j.lastModified[r]&&T.setRequestHeader("If-Modified-Since",j.lastModified[r]),j.etag[r]&&T.setRequestHeader("If-None-Match",j.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xe+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(h,T,f)||l))return T.abort();if(k="abort",v.add(f.complete),T.done(f.success),T.fail(f.error),n=Ye(Ve,f,e,T)){if(T.readyState=1,c&&m.trigger("ajaxSend",[T,f]),l)return T;f.async&&f.timeout>0&&(s=o.setTimeout((function(){T.abort("timeout")}),f.timeout));try{l=!1,n.send(x,C)}catch(t){if(l)throw t;C(-1,t)}}else C(-1,"No Transport");function C(t,e,a,u){var d,p,b,x,w,k=e;l||(l=!0,s&&o.clearTimeout(s),n=void 0,i=u||"",T.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(x=function(t,e,n){for(var o,r,i,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(r in s)if(s[r]&&s[r].test(o)){u.unshift(r);break}if(u[0]in n)i=u[0];else{for(r in n){if(!u[0]||t.converters[r+" "+u[0]]){i=r;break}a||(a=r)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(f,T,a)),!d&&j.inArray("script",f.dataTypes)>-1&&j.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),x=function(t,e,n,o){var r,i,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(i=c.shift();i;)if(t.responseFields[i]&&(n[t.responseFields[i]]=e),!u&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(r in l)if((s=r.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[r]:!0!==l[r]&&(i=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+i}}}return{state:"success",data:e}}(f,x,T,d),d?(f.ifModified&&((w=T.getResponseHeader("Last-Modified"))&&(j.lastModified[r]=w),(w=T.getResponseHeader("etag"))&&(j.etag[r]=w)),204===t||"HEAD"===f.type?k="nocontent":304===t?k="notmodified":(k=x.state,p=x.data,d=!(b=x.error))):(b=k,!t&&k||(k="error",t<0&&(t=0))),T.status=t,T.statusText=(e||k)+"",d?g.resolveWith(h,[p,k,T]):g.rejectWith(h,[T,k,b]),T.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[T,f,d?p:b]),v.fireWith(h,[T,k]),c&&(m.trigger("ajaxComplete",[T,f]),--j.active||j.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,n){return j.get(t,e,n,"json")},getScript:function(t,e){return j.get(t,void 0,e,"script")}}),j.each(["get","post"],(function(t,e){j[e]=function(t,n,o,r){return v(n)&&(r=r||o,o=n,n=void 0),j.ajax(j.extend({url:t,type:e,dataType:r,data:n,success:o},j.isPlainObject(t)&&t))}})),j.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),j._evalUrl=function(t,e,n){return j.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){j.globalEval(t,e,n)}})},j.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=j(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){j(this).wrapInner(t.call(this,e))})):this.each((function(){var e=j(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){j(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){j(this).replaceWith(this.childNodes)})),this}}),j.expr.pseudos.hidden=function(t){return!j.expr.pseudos.visible(t)},j.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},j.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(t){}};var Je={0:200,1223:204},Ze=j.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,j.ajaxTransport((function(t){var e,n;if(g.cors||Ze&&!t.crossDomain)return{send:function(r,i){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Je[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),j.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),j.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return j.globalEval(t),t}}}),j.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),j.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(o,r){e=j("