!function(){var e={111:function(e,t,n){"use strict";n.r(t);var s=n(446),i=function(e,t){void 0===t&&(t=100),e.fadeTo(t,0,(function(){e.slideUp(t,(function(){e.remove()}))}))};jQuery((function(e){var t=function(t,n,i,r){if(!n.prop("disabled")){t.preventDefault(),e(".wp-smush-error").remove(),e(".smush-stats-wrapper").hide();var o="grid";"smush_restore_image"===i&&(o=e(document).find("div.media-modal.wp-core-ui").length>0||window.location.search.indexOf("item")>-1?"grid":"list");var a={action:i,attachment_id:n.data("id"),mode:o,_nonce:n.data("nonce")};!function(e){var t=e.parent();t.css({opacity:"0.5"}),t.find("a").prop("disabled",!0)}(n),n.html(''+wp_smush_msgs[r]+" "),e.post(ajaxurl,a,(function(e){!function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").prop("disabled",!1)}(n),e.success&&void 0!==e.data?(void 0!==this.data&&this.data.indexOf("nextgen")>-1||"restore"===r?n.parents().eq(1).html(e.data.stats):n.parents().eq(1).html(e.data),void 0!==e.data&&"restore"===r&&s.Z.updateImageStats(e.data.new_size)):e.data&&e.data.error_msg&&n.parent().append(e.data.error_msg)}))}},n=function(e){var t=jQuery(".bulk-smush-wrapper .wp-smush-bulk-wrapper, #wp-smush-pending-to-smush-text"),n=jQuery(".bulk-smush-wrapper .wp-smush-all-done, .bulk-smush-wrapper .wp-smush-pagespeed-recommendation, #smush-box-bulk-upgrade, #wp-smush-all-smushed-text");if(t.length&&n.length)if(0===e)t.addClass("sui-hidden"),n.removeClass("sui-hidden");else{t.removeClass("sui-hidden"),n.addClass("sui-hidden");var s=jQuery(".sui-summary-smush .sui-summary-details .sui-tooltip");if(s.length){var i=1===e?"singular":"plural",r=s.data(i).replace("{count}",e);s.attr("data-tooltip",r)}}jQuery(".wp-smush-total-count").text(e)},r=function(t){e(t).length>0&&e("html, body").animate({scrollTop:e(t).offset().top-100},"slow")};if(e("#all-image-sizes").on("change",(function(){e('input[name^="wp-smush-image_sizes"]').prop("checked",!0)})),e("#wp-smush-update-api-status").on("click",(function(t){t.preventDefault(),e(this).addClass("sui-button-onload"),e.post(ajaxurl,{action:"recheck_api_status"},(function(){location.reload()}))})),e("body").on("click","a.smush-stats-details",(function(t){if(e(this).prop("disabled"))return!1;t.preventDefault();var n=e(this).find(".stats-toggle");e(this).parents().eq(1).find(".smush-stats-wrapper").slideToggle(),n.text("+"==n.text()?"-":"+")})),e("body").on("click",".wp-smush-send:not(.wp-smush-resmush)",(function(t){t.preventDefault(),new s.Z(e(this),!1)})),e("body").on("click",".wp-smush-remove-skipped",(function(t){t.preventDefault();var n=e(this);e.post(ajaxurl,{action:"remove_from_skip_list",id:n.attr("data-id")}).done((function(e){e.success&&void 0!==e.data.links&&(n.parent().parent().find(".smush-status").text(wp_smush_msgs.not_processed),t.target.closest(".smush-status-links").innerHTML=e.data.links)}))})),e("body").on("click",".wp-smush-nextgen-send",(function(t){t.preventDefault(),new s.Z(e(this),!1,"nextgen")})),e("body").on("click",".wp-smush-nextgen-bulk",(function(t){if(t.preventDefault(),e(".wp-smush-resmush-notice").remove(),"undefined"==typeof wp_smushit_data||0===wp_smushit_data.unsmushed.length&&0===wp_smushit_data.resmush.length)return!1;jQuery(".wp-smush-all, .wp-smush-scan").prop("disabled",!0),e(".wp-smush-notice.wp-smush-remaining").hide(),new s.Z(e(this),!0,"nextgen")})),e("body").on("click",".wp-smush-action.wp-smush-restore",(function(n){var s=e(this);t(n,s,"smush_restore_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-resmush",(function(n){t(n,e(this),"smush_resmush_image","smushing")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-restore",(function(n){t(n,e(this),"smush_restore_nextgen_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-resmush",(function(n){t(n,e(this),"smush_resmush_nextgen_image","smushing")})),e(".wp-smush-scan").on("click",(function(t){t.preventDefault(),function(t){var i=e(".wp-smush-scan");i.addClass("sui-button-onload");var r=i.data("type");r=void 0===r?"media":r,e(".wp-smush-all").removeAttr("data-smush");var o=e(".sui-notice-top.sui-notice-success");o.slideUp(100,(function(){o.remove()})),e(".wp-smush-all").prop("disabled",!0),e(".wp-smush-settings-changed").hide();var a={action:"scan_for_resmush",type:r,get_ui:!0,process_settings:t,wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val()};e.get(ajaxurl,a,(function(t){if(void 0!==t.data){if(void 0!==t.data.resmush_ids){wp_smushit_data.resmush=t.data.resmush_ids,"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_smushed=void 0!==t.data.count_smushed?t.data.count_smushed:wp_smushit_data.count_smushed,wp_smushit_data.count_supersmushed=void 0!==t.data.count_supersmushed?t.data.count_supersmushed:wp_smushit_data.count_supersmushed,wp_smushit_data.count_images=void 0!==t.data.count_image?t.data.count_image:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==t.data.size_before?t.data.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==t.data.size_after?t.data.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==t.data.savings_resize?t.data.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==t.data.savings_conversion?t.data.savings_conversion:wp_smushit_data.savings_conversion,wp_smushit_data.count_resize=void 0!==t.data.count_resize?t.data.count_resize:wp_smushit_data.count_resize,wp_smushit_data.unsmushed=void 0!==t.data.unsmushed?t.data.unsmushed:wp_smushit_data.unsmushed),"nextgen"===r&&(wp_smushit_data.bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after));var i=e(".bulk-smush-wrapper .sui-notice:not(.smush-upsell-notice)");i.length>0&&(i.addClass("sui-hidden"),e(".wp-smush-pagespeed-recommendation").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove(),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden")}if(void 0!==t.data.content&&e("#wp-smush-bulk-content").html(t.data.content),void 0!==t.data.notice){var o="success";void 0!==t.data.noticeType&&(o=t.data.noticeType),window.SUI.openNotice("wp-smush-ajax-notice","
"+t.data.notice+"
",{type:o,icon:"check-tick"})}if(e("div.smush-final-log").hide(),void 0!==t.data.super_smush&&t.data.super_smush){var a=jQuery(".wp-smush-enable-lossy");a.length>0&&a.remove(),"undefined"!==t.data.super_smush_stats&&e(".super-smush-attachments .wp-smush-stats").html(t.data.super_smush_stats)}s.Z.updateStats(r);var u=t.data.count||0;s.Z.updateRemainingCount(u),n(u)}})).always((function(){jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),i.removeClass("sui-button-onload").addClass("smush-button-check-success");var t=i.find(".wp-smush-default-text"),n=i.find(".wp-smush-completed-text");t.addClass("sui-hidden-important"),n.removeClass("sui-hidden"),setTimeout((function(){i.removeClass("smush-button-check-success"),t.removeClass("sui-hidden-important"),n.addClass("sui-hidden")}),2e3),e(".wp-smush-all").prop("disabled",!1)}))}(!1)})),e("#wp-smush-welcome-box .smush-dismiss-welcome").on("click",(function(t){t.preventDefault();var n=e(this).parents().eq(1);i(n);e.post(ajaxurl,{action:"dismiss_welcome_notice"})})),e("body").on("click",".wp-smush-notice .icon-fi-close",(function(t){t.preventDefault();var n=e(this).parent();i(n)})),e("input[name=wp-smush-keep_data]").on("change",(function(e){var t="keep_data-true"===e.target.id?"keep_data-false":"keep_data-true";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),e("button#wp-smush-save-settings").on("click",(function(t){t.preventDefault();var n="",s=e('input[name="setting-type"]');s.length>0&&(n=s.val());var i=e(this);if(i.parent().find("span.sui-icon-loader.sui-loading").removeClass("sui-hidden"),""!=n&&"network"==n){var r={action:"save_settings",wp_smush_options_nonce:e("#wp_smush_options_nonce").val()};r=jQuery.param(r)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,r).done((function(){return jQuery("form#wp-smush-settings-form").trigger("submit"),!0}))}else{e(".wp-smush-hex-notice").hide(),i.prop("disabled",!0).addClass("button-grey"),void 0!==i.attr("data-msg")&&i.attr("data-msg").length>0?i.html(i.attr("data-msg")):i.html(wp_smush_msgs.checking);var o=i.data("type");o=void 0===o?"media":o;var a={action:"scan_for_resmush",wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val(),type:o};a=jQuery.param(a)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,a).done((function(){return jQuery("form#wp-smush-settings-form").trigger("submit"),!0}))}})),e("body").on("click",".wp-smush-skip-resmush",(function(t){t.preventDefault();var n=jQuery(this),r=n.parents().eq(1),o=n.parent();i(o),e(".sui-notice-top.sui-notice-success").remove(),r.find(".wp-smush-all").attr("data-smush","skip_resmush"),wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_smushed===wp_smushit_data.count_total&&(e(".wp-smush-notice.wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper ").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove();var a=e(".wp-smush-scan").data("type");a=void 0===a?"media":a;var u=(void 0!==wp_smushit_data.count_smushed?wp_smushit_data.count_smushed:0)/wp_smushit_data.count_total*100;u=WP_Smush.helpers.precise_round(u,1),e(".wp-smush-images-percent").html(u);var l=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(l.length<1)){l.css("width",u+"%"),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden");var d={action:"delete_resmush_list",type:a};e.post(ajaxurl,d,(function(t){if(t.success&&void 0!==t.data.stats){var n=t.data.stats;"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_images=void 0!==n.count_images?parseInt(wp_smushit_data.count_images)+n.count_images:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==n.size_before?parseInt(wp_smushit_data.size_before)+n.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==n.size_after?parseInt(wp_smushit_data.size_after)+n.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==n.savings_resize?parseInt(wp_smushit_data.savings_resize)+n.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==n.savings_conversion?parseInt(wp_smushit_data.savings_conversion)+n.savings_conversion:wp_smushit_data.savings_conversion,void 0!==wp_smushit_data.savings_dir_smush&&void 0!==wp_smushit_data.savings_dir_smush.orig_size&&(wp_smushit_data.size_before=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_before)+parseInt(wp_smushit_data.savings_dir_smush.orig_size):wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_after)+parseInt(wp_smushit_data.savings_dir_smush.image_size):wp_smushit_data.size_after),wp_smushit_data.count_resize=void 0!==n.count_resize?parseInt(wp_smushit_data.count_resize)+n.count_resize:wp_smushit_data.count_resize);var i=e(".bulk-smush-wrapper .wp-smush-remaining-count");i.length&&void 0!==wp_smushit_data.unsmushed&&i.html(wp_smushit_data.unsmushed.length),void 0===wp_smushit_data.unsmushed&&0!==wp_smushit_data.unsmushed.length||(e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden"),e(".sui-notice-success.wp-smush-all-done").addClass("sui-hidden")),s.Z.updateStats()}}))}})),e("a.wp-smush-lossy-enable").on("click",(function(e){e.preventDefault(),r("#column-wp-smush-lossy")})),e(".wp-smush-resize-enable").on("click",(function(e){e.preventDefault(),r("#column-wp-smush-resize")})),window.location.hash){var o=window.location.hash.substring(1);"enable-resize"===o?r("#column-wp-smush-resize"):"enable-lossy"===o&&r("#column-wp-smush-lossy")}if(e("body").on("click",".wp-smush-trigger-bulk",(function(t){t.preventDefault(),void 0!==t.target.dataset.type&&"nextgen"===t.target.dataset.type?e(".wp-smush-nextgen-bulk").click():e(".wp-smush-all").click(),e("span.sui-notice-dismiss").click()})),e("body").on("click","#bulk-smush-top-notice-close",(function(t){t.preventDefault(),e(this).parent().parent().slideUp("slow")})),e(".wp-smush-setting-row .toggle-checkbox").focus((function(){e(this).keypress((function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").click())}))})),e("body").on("blur",".wp-smush-resize-input",(function(){!function(e,t,n){var s=e.find("#wp-smush-resize, #wp-smush-resize-quick-setup");if(!n)var i=e.find("#wp-smush-resize_width, #quick-setup-resize_width"),r=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var o=e.find("#wp-smush-resize_height, #quick-setup-resize_height"),a=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,l=!1;!s.is(":checked")||void 0===wp_smushit_data.resize_sizes||void 0===wp_smushit_data.resize_sizes.width||(!n&&void 0!==i&&parseInt(wp_smushit_data.resize_sizes.width)>parseInt(i.val())?(i.parent().addClass("sui-form-field-error"),r.show("slow"),u=!0):(i.parent().removeClass("sui-form-field-error"),r.hide(),o.hasClass("error")&&a.show("slow")),!t&&void 0!==o&&parseInt(wp_smushit_data.resize_sizes.height)>parseInt(o.val())?(o.parent().addClass("sui-form-field-error"),u||a.show("slow"),l=!0):(o.parent().removeClass("sui-form-field-error"),a.hide(),i.hasClass("error")&&r.show("slow")))}(e(this).parents().eq(4),!1,!1)})),e("body").on("click","#wp-smush-resize, #wp-smush-resize-quick-setup",(function(){var t=e(this),n=e(".wp-smush-resize-settings-wrap");t.is(":checked")?n.show():n.hide()})),e("body").on("click","#wp-smush-detection",(function(){var t=e(this),n=e(".smush-highlighting-notice"),s=e(".smush-highlighting-warning");t.is(":checked")?n.length>0?n.show():s.show():(n.hide(),s.hide())})),e("#wp-smush-png_to_jpg").click((function(){var t=e(this),n=e(".wp-smush-png_to_jpg-wrap");t.is(":checked")?n.show():n.hide()})),e("#wp-smush-revalidate-member").on("click",(function(t){t.preventDefault();var n=e(this).parents().eq(1);n.addClass("loading-notice"),e.get(ajaxurl,{action:"smush_show_warning"},(function(e){n.removeClass("loading-notice").addClass("loaded-notice"),0==e?(n.attr("data-message",wp_smush_msgs.membership_valid),i(n,1e3)):(n.attr("data-message",wp_smush_msgs.membership_invalid),setTimeout((function(){n.removeClass("loaded-notice")}),1e3))}))})),e("li.smush-dir-savings").length>0){e.get(ajaxurl,{action:"get_dir_smush_stats"},(function(t){e("li.smush-dir-savings .sui-icon-loader").hide(),t.success||void 0===t.data.message?void 0===t.data||void 0===t.data.dir_smush?(e("li.smush-dir-savings span.wp-smush-stats").append(wp_smush_msgs.ajax_error),e("li.smush-dir-savings span.wp-smush-stats span").hide()):function(t){if(void 0!==t.dir_smush){var n=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human"),s=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent");t.dir_smush.bytes>0?(e(".wp-smush-dir-link").addClass("sui-hidden"),e("li.smush-dir-savings .wp-smush-stats-label-message").hide(),n.length>0?n.html(t.dir_smush.human):t.dir_smush.bytes,t.dir_smush.percent>0&&(e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep").removeClass("sui-hidden"),s.length>0?s.html(t.dir_smush.percent+"%"):t.dir_smush.percent)):e(".wp-smush-dir-link").removeClass("sui-hidden")}if(void 0!==t.combined_stats&&t.combined_stats.length>0){var i=t.combined_stats,r=i.smushed/i.total_count*100;(r=WP_Smush.helpers.precise_round(r,1))&&e("div.wp-smush-count-total span.wp-smush-images-percent").html(r),i.total_count&&e("span.wp-smush-count-total span.wp-smush-total-optimised").html(i.total_count),i.savings&&e("span.wp-smush-savings span.wp-smush-stats-human").html(i.savings),i.percent&&e("span.wp-smush-savings span.wp-smush-stats-percent").html(i.percent)}}(t.data):e("div.wp-smush-scan-result div.content").prepend(t.data.message)}))}e("span.dismiss-recommendation").on("click",(function(t){t.preventDefault();var n=e(this).parent();n.hide("slow",(function(){n.remove()})),e.ajax({type:"POST",url:ajaxurl,data:{action:"hide_pagespeed_suggestion"}})})),e("#smush-updated-dialog").length&&window.SUI.openModal("smush-updated-dialog","wpbody-content",void 0,!1);var a=a||{};a.KeyCode={TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},e('#smush-box-tutorials div[role="link"]').on("click",(function(e){var t=null!==e.target?e.target:e.srcElement;t&&window.open(t.getAttribute("data-href"),"_blank")})).on("keydown",(function(t){var n=function(t){var n=e(i).data("tutorial"),s=e('#smush-box-tutorials [data-tutorial="'.concat("next"===t?n+1:n-1,'"]'));if(!s.length){var r=e("#smush-box-tutorials .wp-smush-tutorial-item");s=r["next"===t?0:r.length-1]}s.focus()},s=t.which||t.keyCode,i=null!==t.target?t.target:t.srcElement;switch(s){case a.KeyCode.RETURN:i&&window.open(i.getAttribute("data-href"),"_blank");break;case a.KeyCode.LEFT:n("prev");break;case a.KeyCode.RIGHT:n("next")}}))}))},447:function(){!function(){"use strict";WP_Smush.restore={modal:document.getElementById("smush-restore-images-dialog"),contentContainer:document.getElementById("smush-bulk-restore-content"),settings:{slide:"start",success:0,errors:[]},items:[],success:[],errors:[],currentStep:0,totalSteps:0,init:function(){this.modal&&(this.settings={slide:"start",success:0,errors:[]},this.resetModalWidth(),this.renderTemplate(),window.SUI.openModal("smush-restore-images-dialog","wpbody-content",void 0,!1))},renderTemplate:function(){var e=WP_Smush.onboarding.template("smush-bulk-restore")(this.settings);e&&(this.contentContainer.innerHTML=e),this.bindSubmit()},resetModalWidth:function(){this.modal.style.maxWidth="460px",this.modal.querySelector(".sui-box").style.maxWidth="460px"},bindSubmit:function(){var e=this.modal.querySelector('button[id="smush-bulk-restore-button"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault(),t.resetModalWidth(),t.settings={slide:"progress"},t.errors=[],t.renderTemplate(),t.initScan()}))},cancel:function(){"start"===this.settings.slide||"finish"===this.settings.slide?window.SUI.closeModal():(this.updateProgressBar(!0),window.location.reload())},updateProgressBar:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;0100&&(t=100),this.modal.querySelector(".sui-progress-text span").innerHTML=t+"%",this.modal.querySelector(".sui-progress-bar span").style.width=t+"%";var n=this.modal.querySelector(".sui-progress-state-text");n.innerHTML=t>=90?"Finalizing...":e?"Cancelling...":this.currentStep+"/"+this.totalSteps+" images restored"},initScan:function(){var e=this,t=document.getElementById("_wpnonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=get_image_count",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var t=JSON.parse(n.response);void 0!==t.data.items&&(e.items=t.data.items,e.totalSteps=t.data.items.length,e.step())}else window.console.log("Request failed. Returned status of "+n.status)},n.send("_ajax_nonce="+t.value)},step:function(){var e=this,t=this,n=document.getElementById("_wpnonce");if(0/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(s){return _.templateSettings=n,(t=t||_.template(document.getElementById(e).innerHTML))(s)}}))}()},413:function(e,t,n){"use strict";n.r(t);var s,i=n(446);s=jQuery,WP_Smush.bulk={init:function(){s(".wp-smush-all").on("click",(function(e){e.preventDefault(),s(".sui-notice-top.sui-notice-success").remove();var t=document.getElementById("bulk_smush_warning");t.classList.add("sui-hidden");var n=s(".wp-smush-bulk-progress-bar-wrapper");if(n.removeClass("wp-smush-exceed-limit"),n.find(".sui-progress-block .wp-smush-all").addClass("sui-hidden"),n.find(".sui-progress-block .wp-smush-cancel-bulk").removeClass("sui-hidden"),t&&document.getElementById("bulk-smush-resume-button").classList.add("sui-hidden"),s(".wp-resmush.wp-smush-action, .wp-smush-scan, .wp-smush-all:not(.sui-progress-close), a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#wp-smush-save-settings").prop("disabled",!0),void 0===window.wp_smushit_data||0===window.wp_smushit_data.unsmushed.length&&0===window.wp_smushit_data.resmush.length)return!1;s(".wp-smush-remaining").addClass("sui-hidden"),n.find(".sui-progress-block i.sui-icon-info").removeClass("sui-icon-info").addClass("sui-loading").addClass("sui-icon-loader"),new i.Z(s(this),!0)})),s("body").on("click",".smush-ignore-image",(function(e){e.preventDefault();var t=s(this);t.prop("disabled",!0),t.attr("data-tooltip"),t.removeClass("sui-tooltip"),s.post(ajaxurl,{action:"ignore_bulk_image",id:t.attr("data-id")}).done((function(n){t.is("a")&&n.success&&void 0!==n.data.links&&(t.parent().parent().find(".smush-status").text(wp_smush_msgs.ignored),e.target.closest(".smush-status-links").innerHTML=n.data.links)}))}));var e=document.getElementById("smush-box-bulk-upgrade");!e||window.wp_smushit_data.unsmushed.length||window.wp_smushit_data.resmush.length||e.classList.remove("sui-hidden")}},WP_Smush.bulk.init()},140:function(e,t,n){"use strict";n.r(t);var s,i=n(445),r=function(e,t){e=parseInt(e),t=parseInt(t);var n=!1,s=0,i=0,r={scan:function(){var n=e-t;0!==t?o(n):jQuery.post(ajaxurl,{action:"directory_smush_start"},(function(){return o(n)}))},cancel:function(){return n=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel"})},getProgress:function(){if(n)return 0;var s=e-t;return Math.min(Math.round(100*parseInt(e-s)/e),99)},onFinishStep:function(n){jQuery(".wp-smush-progress-dialog .sui-progress-state-text").html(t-s+"/"+e+" "+window.wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(n)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=window.wp_smush_msgs.directory_url+"&scan=done"},limitReached:function(){var e=jQuery("#wp-smush-progress-dialog");e.addClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip",window.wp_smush_msgs.bulk_resume),e.find(".sui-icon-close").removeClass("sui-icon-close").addClass("sui-icon-play"),e.find("#cancel-directory-smush").attr("id","cancel-directory-smush-disabled")},resume:function(){var e=jQuery("#wp-smush-progress-dialog"),t=e.find("#cancel-directory-smush-disabled");e.removeClass("wp-smush-exceed-limit"),e.find(".sui-icon-play").removeClass("sui-icon-play").addClass("sui-icon-close"),t.attr("data-tooltip","Cancel"),t.attr("id","cancel-directory-smush"),r.scan()}},o=function n(o){o>=0?(t=e-o,jQuery.post(ajaxurl,{action:"directory_smush_check_step",step:t},(function(e){void 0!==e.success&&e.success?(void 0!==e.data&&void 0!==e.data.skipped&&!0===e.data.skipped&&i++,t++,o-=1,r.onFinishStep(r.getProgress()),n(o)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?r.limitReached():(s++,t++,o-=1,r.onFinishStep(r.getProgress()),n(o))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",items:e-(s+i),failed:s,skipped:i},(function(e){return r.onFinish(e)}))};return r};s=jQuery,WP_Smush.directory={selected:[],tree:[],wp_smush_msgs:[],init:function(){var e=this,t=s("#wp-smush-progress-dialog"),n=0,i=0;void 0!==window.wp_smushit_data.dir_smush&&(n=window.wp_smushit_data.dir_smush.totalSteps,i=window.wp_smushit_data.dir_smush.currentScanStep),this.scanner=new r(n,i),this.wp_smush_msgs=window.wp_smush_msgs||{},s("button.wp-smush-browse, a.wp-smush-dir-link").on("click",(function(t){t.preventDefault(),s(t.currentTarget).hasClass("wp-smush-browse")&&(s("div.wp-smush-scan-result div.wp-smush-notice").hide(),s("div.wp-smush-info").remove()),window.SUI.openModal("wp-smush-list-dialog",t.currentTarget,s("#wp-smush-list-dialog .sui-box-header [data-modal-close]")[0],!0),e.initFileTree()})),s(".wp-smush-select-dir").on("click",(function(t){if(t.preventDefault(),!s(this).prop("disabled")){var n=s(this);s("div.wp-smush-list-dialog div.sui-box-body").css({opacity:"0.8"}),s("div.wp-smush-list-dialog div.sui-box-body a").off("click"),n.prop("disabled",!0),n.parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading");var i=e.tree.getSelectedNodes(),o=[];i.forEach((function(e){o.push(e.key)}));var a={action:"image_list",smush_path:o,image_list_nonce:s('input[name="image_list_nonce"]').val()};s.post(ajaxurl,a,(function(t){window.SUI.closeModal(),t.success?(e.scanner=new r(t.data,0),e.showProgressDialog(t.data),e.scanner.scan()):window.SUI.openNotice("wp-smush-ajax-notice",t.data.message,{type:"warning"})}))}})),t.on("click","#cancel-directory-smush, .sui-dialog-close, .wp-smush-cancel-dir",(function(t){t.preventDefault(),s(this).parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading"),e.scanner.cancel().done((function(){return window.location.href=e.wp_smush_msgs.directory_url}))})),t.on("click",".sui-icon-play, .wp-smush-resume-scan",(function(t){t.preventDefault(),e.scanner.resume()}))},initFileTree:function(){var e=this,t=s("button.wp-smush-select-dir"),n={type:"GET",url:ajaxurl,data:{action:"smush_get_directory_list",list_nonce:s('input[name="list_nonce"]').val()},cache:!1};Object.entries(e.tree).length>0||(e.tree=(0,i.createTree)(".wp-smush-list-dialog .content",{autoCollapse:!0,clickFolderMode:3,checkbox:!0,debugLevel:0,selectMode:3,tabindex:"0",keyboard:!0,quicksearch:!0,source:n,lazyLoad:function(i,r){r.result=new Promise((function(e,t){n.data.dir=r.node.key,s.ajax(n).done((function(t){return e(t)})).fail(t)})),r.result.then(t.html(e.wp_smush_msgs.add_dir))},loadChildren:function(e,t){return t.node.fixSelection3AfterClick()},select:function(){return t.prop("disabled",!+e.tree.getSelectedNodes().length)},init:function(){return t.prop("disabled",!0)}}))},showProgressDialog:function(e){s(".wp-smush-progress-dialog .sui-progress-state-text").html("0/"+e+" "+self.wp_smush_msgs.progress_smushed),window.SUI.openModal("wp-smush-progress-dialog","dialog-close-div",void 0,!1)},updateProgressBar:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e>100&&(e=100),s(".sui-progress-block .sui-progress-text span").text(e+"%"),s(".sui-progress-block .sui-progress-bar span").width(e+"%"),e>=90&&s(".sui-progress-state .sui-progress-state-text").text("Finalizing..."),t&&s(".sui-progress-state .sui-progress-state-text").text("Cancelling...")}},WP_Smush.directory.init()},65:function(){!function(){"use strict";WP_Smush.helpers={init:function(){},formatBytes:function(e,t){var n=1024,s=["KB","MB","GB","TB","PB"];if(Math.abs(e)=n&&i=0?1:-1;return e=e>100?100:e,Math.round(e*Math.pow(10,t)+.001*n)/Math.pow(10,t)},showErrorNotice:function(e){if(void 0!==e){var t="".concat(e,"
");SUI.openNotice("wp-smush-ajax-notice",t,{type:"error",icon:"info"});var n=document.querySelector(".sui-button-onload");n&&n.classList.remove("sui-button-onload")}},resetSettings:function(){var e=document.getElementById("wp_smush_reset"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=reset_settings",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){if(200===t.status){var e=JSON.parse(t.response);void 0!==e.success&&e.success&&(window.location.href=wp_smush_msgs.smush_url)}else window.console.log("Request failed. Returned status of "+t.status)},t.send("_ajax_nonce="+e.value)}},WP_Smush.helpers.init()}()},206:function(){!function(e){"use strict";if(e("#wp-smush-s3support-alert").length){var t={type:"warning",icon:"info",dismiss:{show:!0,label:wp_smush_msgs.noticeDismiss,tooltip:wp_smush_msgs.noticeDismissTooltip}};window.SUI.openNotice("wp-smush-s3support-alert",e("#wp-smush-s3support-alert").data("message"),t)}function n(t){var n=e(t.currentTarget).closest(".smush-notice");n.fadeTo(100,0,(function(){return n.slideUp(100,(function(){return n.remove()}))}))}e("#wp-smush-s3support-alert").on("click","button",(function(){e.post(ajaxurl,{action:"dismiss_s3support_alert"})})),e("#wp-smush-api-message button.sui-button-icon").on("click",(function(t){t.preventDefault();var n=e("#wp-smush-api-message");n.slideUp("slow",(function(){n.remove()})),e.post(ajaxurl,{action:"hide_api_message"})})),e(".smush-notice .smush-notice-act").on("click",(function(e){n(e)})),e(".smush-notice .smush-notice-dismiss").on("click",(function(t){n(t),e.post(ajaxurl,{action:"dismiss_upgrade_notice"})})),e(".wp-smush-update-info").on("click",".notice-dismiss",(function(t){t.preventDefault(),n(t),e.post(ajaxurl,{action:"dismiss_update_info"})}))}(jQuery)},579:function(){!function(){"use strict";WP_Smush.onboarding={membership:"free",onboardingModal:document.getElementById("smush-onboarding-dialog"),scanFilesModal:document.getElementById("checking-files-dialog"),settings:{first:!0,last:!1,slide:"start",value:!1},selection:{auto:!0,lossy:!0,strip_exif:!0,original:!1,lazy_load:!0,usage:!1},contentContainer:document.getElementById("smush-onboarding-content"),onboardingSlides:["start","auto","lossy","strip_exif","original","lazy_load","usage"],touchX:null,touchY:null,init:function(){if(this.onboardingModal){var e=document.getElementById("smush-onboarding");this.membership=e.dataset.type,"pro"!==this.membership&&(this.onboardingSlides=["start","auto","strip_exif","lazy_load","usage"],this.selection.lossy=!1),"false"===e.dataset.tracking&&this.onboardingSlides.pop(),this.renderTemplate();var t=this.onboardingModal.querySelector(".smush-onboarding-skip-link");t&&t.addEventListener("click",this.skipSetup),window.SUI.openModal("smush-onboarding-dialog","checking-files-dialog",void 0,!1)}},handleTouchStart:function(e){var t=e.touches[0];this.touchX=t.clientX,this.touchY=t.clientY},handleTouchMove:function(e){if(this.touchX&&this.touchY){var t=e.touches[0].clientX,n=e.touches[0].clientY,s=this.touchX-t,i=this.touchY-n;Math.abs(s)>Math.abs(i)&&(s>0?!1===WP_Smush.onboarding.settings.last&&WP_Smush.onboarding.next(null,"next"):!1===WP_Smush.onboarding.settings.first&&WP_Smush.onboarding.next(null,"prev")),this.touchX=null,this.touchY=null}},renderTemplate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none",n=this.onboardingModal.querySelector('input[type="checkbox"]');n&&(this.selection[n.id]=n.checked);var s=WP_Smush.onboarding.template("smush-onboarding"),i=s(this.settings);i&&(this.contentContainer.innerHTML=i,"none"===t?this.contentContainer.classList.add("loaded"):(this.contentContainer.classList.remove("loaded"),this.contentContainer.classList.add(t),setTimeout((function(){e.contentContainer.classList.add("loaded"),e.contentContainer.classList.remove(t)}),600))),this.onboardingModal.addEventListener("touchstart",this.handleTouchStart,!1),this.onboardingModal.addEventListener("touchmove",this.handleTouchMove,!1),this.bindSubmit()},bindSubmit:function(){var e=this.onboardingModal.querySelector('button[type="submit"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault();var n=t.onboardingModal.querySelector('input[type="checkbox"]');n&&(t.selection[n.id]=n.checked);var s=document.getElementById("smush_quick_setup_nonce"),i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_setup",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){200===i.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed. Returned status of "+i.status)},i.send("smush_settings="+JSON.stringify(t.selection)+"&_ajax_nonce="+s.value)}))},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.onboardingSlides.indexOf(this.settings.slide),s=0;s=t?"next"===t?n+1:n-1:null!==e&&e.classList.contains("next")?n+1:n-1;var i=null!==e&&e.classList.contains("next")?"fadeInRight":"fadeInLeft";this.settings={first:0===s,last:s+1===this.onboardingSlides.length,slide:this.onboardingSlides[s],value:this.selection[this.onboardingSlides[s]]},this.renderTemplate(i)},goTo:function(e){var t=this.onboardingSlides.indexOf(e);this.settings={first:0===t,last:t+1===this.onboardingSlides.length,slide:e,value:this.selection[e]},this.renderTemplate()},skipSetup:function(){var e=document.getElementById("smush_quick_setup_nonce"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=skip_smush_setup&_ajax_nonce="+e.value),t.onload=function(){200===t.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed. Returned status of "+t.status)},t.send()},showScanDialog:function(){window.SUI.closeModal(),window.SUI.openModal("checking-files-dialog","wpbody-content",void 0,!1);var e=document.getElementById("wp_smush_options_nonce");setTimeout((function(){var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=scan_for_resmush",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){var e=document.querySelector("#smush-onboarding-dialog");e.parentNode.removeChild(e),window.SUI.closeModal(),200===t.status?setTimeout((function(){location.reload()}),1e3):window.console.log("Request failed. Returned status of "+t.status)},t.send("type=media&get_ui=false&process_settings=false&wp_smush_options_nonce="+e.value)}),3e3)},hideUpgradeModal:function(){var e=new XMLHttpRequest;e.open("POST",ajaxurl+"?action=hide_new_features"),e.send()}},WP_Smush.onboarding.template=_.memoize((function(e){var t,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(s){return _.templateSettings=n,(t=t||_.template(document.getElementById(e).innerHTML))(s)}})),window.addEventListener("load",(function(){return WP_Smush.onboarding.init()}))}()},110:function(){!function(){"use strict";WP_Smush.CDN={cdnEnableButton:document.getElementById("smush-enable-cdn"),cdnDisableButton:document.getElementById("smush-cancel-cdn"),cdnStatsBox:document.querySelector(".smush-cdn-stats"),init:function(){var e=this;this.cdnEnableButton&&this.cdnEnableButton.addEventListener("click",(function(t){t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!0)})),this.cdnDisableButton&&this.cdnDisableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!1)})),this.updateStatsBox()},toggle_cdn:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_toggle_cdn",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var e=JSON.parse(n.response);void 0!==e.success&&e.success?location.reload():void 0!==e.data.message&&WP_Smush.helpers.showErrorNotice(e.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+n.status)},n.send("param="+e+"&_ajax_nonce="+t[0].value)},updateStatsBox:function(){var e=this;if(void 0!==this.cdnStatsBox&&this.cdnStatsBox&&window.location.search.includes("view=cdn")){this.toggleElements();var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=get_cdn_stats",!0),t.onload=function(){if(200===t.status){var n=JSON.parse(t.response);void 0!==n.success&&n.success?e.toggleElements():void 0!==n.data.message&&WP_Smush.helpers.showErrorNotice(n.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+t.status)},t.send()}},toggleElements:function(){for(var e=this.cdnStatsBox.querySelector(".sui-icon-loader"),t=this.cdnStatsBox.querySelectorAll(".wp-smush-stats > :not(.sui-icon-loader)"),n=0;n span > span").style.backgroundColor=e,document.querySelector(".sui-colorpicker-hex .sui-colorpicker-value > input").value=e},toggle_lazy_load:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_toggle_lazy_load",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var e=JSON.parse(n.response);void 0!==e.success&&e.success?location.reload():void 0!==e.data.message&&(WP_Smush.helpers.showErrorNotice(e.data.message),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload"))}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+n.status),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload")},n.send("param="+e+"&_ajax_nonce="+t[0].value)},addLoaderIcon:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner";e||(e=wp.media({title:"Select or upload an icon",button:{text:"Select icon"},multiple:!1})).on("select",(function(){var n=e.state().get("selection").first().toJSON(),s=document.getElementById("smush-"+t+"-icon-preview");s.style.backgroundImage='url("'+n.url+'")',s.style.display="block",document.getElementById("smush-"+t+"-icon-file").setAttribute("value",n.id),document.getElementById("smush-upload-"+t).style.display="none";var i=document.getElementById("smush-remove-"+t);i.querySelector("span").innerHTML=n.filename,i.style.display="block"})),e.open()},removeLoaderIcon:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner",t=document.getElementById("smush-"+e+"-icon-preview");t.style.backgroundImage="",t.style.display="none",document.getElementById("smush-upload-"+e).style.display="block",document.getElementById("smush-remove-"+e).style.display="none",document.getElementById("smush-"+e+"-icon-file").setAttribute("value","")},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"spinner",n=document.getElementsByName("wp_smush_options_nonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_remove_icon",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.send("id="+e+"&type="+t+"&_ajax_nonce="+n[0].value)}},WP_Smush.Lazyload.init()}()},446:function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"media";s(this,e),this.errors=[];var o=jQuery(".bulk-smush-wrapper .sui-progress-state-text");return this.smushed=parseInt(o.find("span:first-child").html()),this.total=parseInt(o.find("span:last-child").html()),this.skip_resmush=!(void 0===t.data("smush")||!t.data("smush")),this.button=jQuery(t[0]),this.is_bulk=!!n(i)&&i,this.url=ajaxurl,this.log=jQuery(".smush-final-log"),this.deferred=jQuery.Deferred(),this.deferred.errors=[],this.setIds(),this.is_bulk_resmush=0=0?"&":"?")+jQuery.param(t)),e}},{key:"membershipValidity",value:function(e){var t=jQuery("#wp-smush-invalid-member");void 0!==e&&void 0!==e.show_warning&&t.length>0&&(e.show_warning?t.show():t.hide())}},{key:"ajax",value:function(e,t,n,s){var i=jQuery.param({is_bulk_resmush:e,attachment_id:t,_nonce:s});return jQuery.ajax({type:"GET",data:i,url:n,timeout:wp_smushit_data.timeout,dataType:"json"})}},{key:"setProSavings",value:function(){var e=wp_smushit_data.savings_percent>0?wp_smushit_data.savings_percent:0,t=wp_smushit_data.savings_bytes>0?wp_smushit_data.savings_bytes:0,n=2.22058824;e>49&&(n=1.22054412),e>0&&(e*=n,t*=n),wp_smushit_data.pro_savings={percent:WP_Smush.helpers.precise_round(e,1),savings_bytes:WP_Smush.helpers.formatBytes(t,1)}}},{key:"updateStats",value:function(t){var n=void 0!==t&&"nextgen"===t,s=0;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var i=WP_Smush.helpers.formatBytes(wp_smushit_data.savings_bytes,1),r=jQuery(".wp-smush-savings .wp-smush-stats-human");n?r.html(i):(r.html(WP_Smush.helpers.getFormatFromString(i)),jQuery(".sui-summary-large.wp-smush-stats-human").html(WP_Smush.helpers.getSizeFromString(i))),wp_smushit_data.savings_percent=WP_Smush.helpers.precise_round(parseInt(wp_smushit_data.savings_bytes)/parseInt(wp_smushit_data.size_before)*100,1),isNaN(wp_smushit_data.savings_percent)||jQuery(".wp-smush-savings .wp-smush-stats-percent").html(wp_smushit_data.savings_percent),void 0!==wp_smushit_data.savings_bytes&&void 0!==wp_smushit_data.savings_resize&&(s=parseInt(wp_smushit_data.savings_bytes)-parseInt(wp_smushit_data.savings_resize))>0&&jQuery("li.super-smush-attachments span.smushed-savings").html(WP_Smush.helpers.formatBytes(s,1)),n?jQuery(".sui-summary-details span.wp-smush-total-optimised").html(wp_smushit_data.count_images):jQuery("span.smushed-items-count span.wp-smush-count-total span.wp-smush-total-optimised").html(wp_smushit_data.count_images),jQuery("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize);var o=jQuery("li.super-smush-attachments .smushed-count");o.length&&void 0!==wp_smushit_data.count_supersmushed&&o.html(wp_smushit_data.count_supersmushed);var a=jQuery(".smush-conversion-savings");if(a.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!==wp_smushit_data.savings_conversion){var u=a.find(".wp-smush-stats");u.length>0&&u.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_conversion,1))}var l=jQuery(".smush-resize-savings");if(l.length>0&&void 0!==wp_smushit_data.savings_resize&&""!==wp_smushit_data.savings_resize){var d=parseInt(wp_smushit_data.savings_resize),c=l.find(".wp-smush-stats"),h=l.find(".wp-smush-stats-label-message");d>0&&c.length>0&&(h.length>0&&h.hide(),c.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_resize,1)))}if(e.setProSavings(),void 0!==wp_smushit_data.pro_savings){var p=jQuery(".smush-avg-pro-savings");if(p.length>0){var f=p.find(".wp-smush-stats-percent"),m=p.find(".wp-smush-stats-human");f.length>0&&void 0!==wp_smushit_data.pro_savings.percent&&""!==wp_smushit_data.pro_savings.percent&&f.html(wp_smushit_data.pro_savings.percent),m.length>0&&void 0!==wp_smushit_data.pro_savings.savings_bytes&&""!==wp_smushit_data.pro_savings.savings_bytes&&m.html(wp_smushit_data.pro_savings.savings_bytes)}}if(jQuery(".smush-sidenav .wp-smush-remaining-count").length){var g=0;void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0&&(g+=wp_smushit_data.unsmushed.length),void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0&&(g+=wp_smushit_data.resmush.length),e.updateRemainingCount(g)}}},{key:"updateImageStats",value:function(e){if(0!==e){var t=jQuery(".attachment-info .file-size");if(t.contents().filter((function(){return 3===this.nodeType})).text()!==" "+e){var n=t.contents().filter((function(){return 1===this.nodeType})).text();t.html(""+n+" "+e)}}}},{key:"updateRemainingCount",value:function(e){var t=jQuery(".wp-smush-remaining-count");t.length&&t.html(e);var n=jQuery(".smush-sidenav .wp-smush-remaining-count"),s=jQuery(".smush-sidenav .smush-bulk .sui-icon-check-tick");n.length&&s.length&&(e>0?(n.removeClass("sui-hidden"),s.addClass("sui-hidden")):(jQuery(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"),s.removeClass("sui-hidden"),n.addClass("sui-hidden")))}},{key:"updateLocalizedStats",value:function(e,t){void 0!==window.wp_smushit_data&&("media"===t?(wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count),e.is_lossy&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1),wp_smushit_data.savings_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.savings_resize)+parseInt(e.savings_resize.bytes):parseInt(wp_smushit_data.savings_resize),wp_smushit_data.count_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.count_resize)+1:wp_smushit_data.count_resize,wp_smushit_data.savings_conversion=void 0!==e.savings_conversion&&void 0!==e.savings_conversion.bytes?parseInt(wp_smushit_data.savings_conversion)+parseInt(e.savings_conversion.bytes):parseInt(wp_smushit_data.savings_conversion)):"directory_smush"===t?wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+1:"nextgen"===t&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1,wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count)),e.size_before>e.size_after&&(wp_smushit_data.size_before=void 0!==e.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_resize&&(wp_smushit_data.size_before=void 0!==e.savings_resize.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_resize.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_resize.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_resize.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_conversion&&(wp_smushit_data.size_before=void 0!==e.savings_conversion.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_conversion.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_conversion.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_conversion.size_after):parseInt(wp_smushit_data.size_after)))}},{key:"prepareErrorRow",value:function(e,t,n,s,i){var r=''+(void 0===n?' ':n)+''+("undefined"===t||void 0===t?"undefined":t)+' '+e+"
";return"media"===i&&(r=r+'
'),r+="
"}},{key:"updateSmushIds",value:function(e){if(void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0){var t=wp_smushit_data.unsmushed.indexOf(e);t>-1&&wp_smushit_data.unsmushed.splice(t,1)}if(void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0){var n=wp_smushit_data.resmush.indexOf(e);n>-1&&wp_smushit_data.resmush.splice(n,1)}}}],(o=[{key:"setIds",value:function(){var e=[];"object"===n(e=0=jQuery("div.smush-final-log .smush-bulk-error-row").length&&jQuery("div.smush-final-log").hide(),jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper, #wp-smush-running-notice").removeClass("sui-hidden"))}},{key:"singleStart",value:function(){this.is_bulk||(this.button.html(''+window.wp_smush_msgs.smushing+" "),this.status.removeClass("error"))}},{key:"enableButton",value:function(){this.button.prop("disabled",!1),jQuery(".wp-smush-all").prop("disabled",!1),jQuery("button.wp-smush-scan, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#wp-smush-save-settings").prop("disabled",!1)}},{key:"singleDone",value:function(){if(!this.is_bulk){var t=this;this.button.html(window.wp_smush_msgs.all_done),this.request.done((function(n){if(void 0!==n.data){var s=t.status.parent();e.membershipValidity(n.data),n.success?s.html(n.data):(t.status.addClass("error"),t.status.html(n.data.error_msg),t.button.html(window.smush_vars.strings.stats_label)),e.updateImageStats(n.data.new_size)}t.enableButton()})).fail((function(e){t.status.html(e.data),t.status.addClass("error"),t.enableButton()}))}}},{key:"syncStats",value:function(){var t=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),n=t.html();t.html(window.wp_smush_msgs.sync_stats),jQuery.ajax({type:"GET",url:this.url,data:{action:"get_stats"},success:function(t){t&&void 0!==t&&(t=t.data,jQuery.extend(wp_smushit_data,{count_images:t.count_images,count_smushed:t.count_smushed,count_total:t.count_total,count_resize:t.count_resize,count_supersmushed:t.count_supersmushed,savings_bytes:t.savings_bytes,savings_conversion:t.savings_conversion,savings_resize:t.savings_resize,size_before:t.size_before,size_after:t.size_after}),e.updateStats(this.smush_type))}}).always((function(){return t.html(n)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){this.enableButton();var e=jQuery(".sui-summary-smush .smush-stats-icon");if(0===this.ids.length)e.addClass("sui-hidden"),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&(document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden"),document.getElementById("wp-smush-all-smushed-text").classList.remove("sui-hidden"),document.getElementById("wp-smush-pending-to-smush-text").classList.add("sui-hidden"));else{e.removeClass("sui-icon-loader sui-loading sui-hidden").addClass("sui-icon-info sui-warning");var t=jQuery(".bulk-smush-wrapper .wp-smush-resmush-notice");t.length>0?t.show():jQuery(".bulk-smush-wrapper .wp-smush-remaining").removeClass("sui-hidden")}jQuery(".wp-resmush.wp-smush-action, .wp-smush-scan").removeProp("disabled")}}},{key:"freeExceeded",value:function(){var e=jQuery(".wp-smush-bulk-progress-bar-wrapper");e.addClass("wp-smush-exceed-limit"),e.find(".sui-progress-block .wp-smush-cancel-bulk").addClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-all").removeClass("sui-hidden"),e.find("i.sui-icon-loader").addClass("sui-icon-info").removeClass("sui-icon-loader").removeClass("sui-loading"),document.getElementById("bulk-smush-resume-button").classList.remove("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden")}},{key:"updateProgress",value:function(t){if(this.is_bulk_resmush||this.is_bulk){var n=0;t&&void 0!==t.data&&void 0!==t.data.stats&&e.updateLocalizedStats(t.data.stats,this.smush_type),this.is_bulk_resmush?(t.success&&(wp_smushit_data.resmush.length>0?jQuery(".wp-smush-images-remaining").html(wp_smushit_data.resmush.length):0===wp_smushit_data.resmush.length&&0===this.ids.length&&(jQuery(".bulk-resmush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"))),void 0!==this.ids&&void 0!==this.total&&this.total>0&&(n=(this.smushed+this.errors.length)/this.total*100)):n=(this.smushed+this.errors.length)/this.total*100,0===this.ids.length&&("nextgen"!==this.smush_type&&this.syncStats(),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden")),void 0!==this.ids&&e.updateRemainingCount(this.ids.length),this._updateProgress(this.smushed+this.errors.length,WP_Smush.helpers.precise_round(n,1)),0===this.ids.length&&"nextgen"!==this.smush_type||e.updateStats(this.smush_type)}}},{key:"_updateProgress",value:function(e,t){(this.is_bulk||this.is_bulk_resmush)&&(jQuery("span.wp-smush-images-percent").html(t+"%"),jQuery(".bulk-smush-wrapper .wp-smush-progress-inner").css("width",t+"%"),jQuery(".bulk-smush-wrapper .sui-progress-state-text").find("span:first-child").html(e).find("span:last-child").html(this.total))}},{key:"continue",value:function(){var e=this.button.attr("continue_smush");return void 0===e&&(e=!0),"false"!==e&&e||(e=!1),e&&this.ids.length>0&&this.is_bulk}},{key:"callAjax",value:function(){if(0!==r&&void 0!==r&&10>performance.now()-r)return this.freeExceeded(),this.deferred;var t="";this.current_id=this.is_bulk?this.ids.shift():this.button.data("id"),e.updateSmushIds(this.current_id);var n=this.button.parent().find("#_wp_smush_nonce");n&&(t=n.val());var s=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,t).done((function(t){if(void 0===t.success||void 0!==t.success&&!1===t.success&&void 0!==t.data&&"limit_exceeded"!==t.data.error){s.errors.push(s.current_id);var n=e.prepareErrorRow(t.data.error_message,t.data.file_name,t.data.thumbnail,s.current_id,s.smush_type);s.log.show(),s.errors.length>5?jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"):s.log.find(".smush-bulk-errors").append(n)}else void 0!==t.success&&t.success&&s.smushed++;e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==s.deferred.state()?(document.getElementById("bulk_smush_warning").classList.remove("sui-hidden"),s.button.attr("continue_smush",!1),wp_smushit_data.unsmushed.unshift(s.current_id),s.ids.unshift(s.current_id),r=performance.now(),s.freeExceeded()):s.is_bulk?s.updateProgress(t):0===s.ids.length&&s.syncStats(),s.singleDone()})).always((function(){s.continue()&&s.is_bulk?s.callAjax():s.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.button.removeAttr("continue_smush"),e.errors.length){var t=window.wp_smush_msgs.error_in_bulk.replace("{{errors}}",e.errors.length).replace("{{total}}",e.total).replace("{{smushed}}",e.smushed);jQuery(".wp-smush-all-done").addClass("sui-notice-warning").removeClass("sui-notice-success").find("p").html(t)}e.bulkDone(),jQuery(".wp-smush-all:not(.wp-smush-finished), .wp-smush-scan").prop("disabled",!1)}))}},{key:"cancelAjax",value:function(){var e=this;jQuery(".wp-smush-cancel-bulk").on("click",(function(){e.button.attr("continue_smush",!1),e.syncStats(),e.request.abort(),e.enableButton(),e.button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(e.current_id),jQuery(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden")}))}}])&&i(t.prototype,o),a&&i(t,a),e}();t.Z=o},442:function(){!function(){"use strict";WP_Smush.WebP={nonceField:document.getElementsByName("wp_smush_options_nonce"),toggleModuleButton:document.getElementById("smush-toggle-webp-button"),recheckStatusButton:document.getElementById("smush-webp-recheck"),recheckStatusLink:document.getElementById("smush-webp-recheck-link"),applyHtaccessButton:document.getElementById("smush-webp-apply-htaccess"),removeHtaccessButton:document.getElementById("smush-webp-remove-htaccess"),selectedServer:"",serverSelector:null,serverInstructions:[],init:function(){var e=this,t=this;if(t.serverSelector=document.getElementById("webp-server-type"),t.serverSelector){t.selectedServer=t.serverSelector.value,jQuery(t.serverSelector).on("change",(function(e){var n=e.currentTarget.value;t.hideCurrentInstructions(),t.showServerInstructions(n),t.selectedServer=n}));for(var n=document.querySelectorAll(".webp-server-instructions"),s=0;s");window.SUI.openNotice("wp-smush-webp-delete-all-error-notice",r,{type:"error",icon:"info",autoclose:{show:!1}})}},i.send("_ajax_nonce="+this.nonceField[0].value)},writeHtaccess:function(e,t){var n=this;e.preventDefault();var s=e.currentTarget;s.classList.add("sui-button-onload");var i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_write_htaccess_rules",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){s.classList.remove("sui-button-onload");var e,t=!1,r=JSON.parse(i.response);200===i.status?void 0!==r.success&&r.success&&location.reload():t=window.wp_smush_msgs.generic_ajax_error,r&&r.data&&r.data.message&&(t=r.data.message,e="warning"),t&&n.showNotice(t,e)};var r="apply"===t?"apply":"remove",o=document.getElementsByName("wp_smush_options_nonce");i.send("write_action="+r+"&_ajax_nonce="+o[0].value)},runScan:function(){var e=new XMLHttpRequest,t=document.getElementsByName("wp_smush_options_nonce");return e.open("POST",ajaxurl+"?action=scan_for_resmush",!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.send("_ajax_nonce="+t[0].value),e},showNotice:function(e,t){if(void 0!==e){var n="".concat(e,"
"),s={type:t||"error",icon:"info",dismiss:{show:!0,label:window.wp_smush_msgs.noticeDismiss,tooltip:window.wp_smush_msgs.noticeDismissTooltip},autoclose:{show:!1}};window.SUI.openNotice("wp-smush-ajax-notice",n,s)}},maybeShowDeleteAllSuccessNotice:function(){if(document.getElementById("wp-smush-webp-delete-all-notice")){var e="".concat(document.getElementById("wp-smush-webp-delete-all-notice").dataset.message,"
");window.SUI.openNotice("wp-smush-webp-delete-all-notice",e,{type:"success",icon:"check-tick",dismiss:{show:!0}})}},hideCurrentInstructions:function(){this.serverInstructions[this.selectedServer]&&this.serverInstructions[this.selectedServer].classList.add("sui-hidden")},showServerInstructions:function(e){void 0!==this.serverInstructions[e]&&this.serverInstructions[e].classList.remove("sui-hidden")}},WP_Smush.WebP.init()}()},445:function(e,t,n){var s,i,r;i=[n(755),n(860)],void 0===(r="function"==typeof(s=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,n,s=null,i=new RegExp(/\.|\//),r=/[&<>"'/]/g,o=/[<>"'/]/g,a="$recursive_request",u={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},l={16:!0,17:!0,18:!0},d={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},h={0:"",1:"left",2:"middle",3:"right"},p="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),f={},m="columns types".split(" "),g="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),v={},y={},_={active:!0,children:!0,data:!0,focus:!0};for(t=0;t=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[r,0].concat(l))),o&&!n){for(s=0,i=l.length;s=0;s--)"paging"===(i=this.children[s]).statusNodeType&&this.removeChild(i);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyCommand:function(e,t){return this.tree.applyCommand(e,this,t)},applyPatch:function(t){if(null===t)return this.remove(),N(this);var n,s,i={children:!0,expanded:!0,parent:!0};for(n in t)t.hasOwnProperty(n)&&(s=t[n],i[n]||e.isFunction(s)||(v[n]?this[n]=s:this.data[n]=s));return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):N(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,s,i=this.children;if(!i)return 0;if(s=i.length,!1!==e)for(t=0,n=s;t=4&&(Array.prototype.unshift.call(arguments,this.toString()),b("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),b("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:D(t);var n=[];return this.visit((function(e){t(e)&&n.push(e)})),n},findFirst:function(t){t=e.isFunction(t)?t:D(t);var n=null;return this.visit((function(e){if(t(e))return n=e,!1})),n},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,n=this.tree.options,i=s.evalOption("unselectable",this,this,n,!1),r=s.evalOption("unselectableStatus",this,this,n,void 0);switch(i&&null!=r&&(e=r),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:w(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit((function(e){if(e._changeSelectStatusAttrs(t),e.radiogroup)return"skip"})),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;function n(e){var i,r,o,a,u,l,d,c,h=e.children;if(h&&h.length){for(l=!0,d=!1,i=0,r=h.length;i=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),b("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.tree.enableFilter,s=this.getParentList(!1,!1);if(n&&!this.match&&!this.subMatchCount)return this.debug("isVisible: HIDDEN ("+n+", "+this.match+", "+this.match+")"),!1;for(e=0,t=s.length;e=0;n--)i.push(o[n].setExpanded(!0,t));return e.when.apply(e,i).done((function(){l?s.scrollIntoView(u).done((function(){r.resolve()})):r.resolve()})),r.promise()},moveTo:function(t,n,s){void 0===n||"over"===n?n="child":"firstChild"===n&&(t.children&&t.children.length?(n="before",t=t.children[0]):n="child");var i,r=this.tree,o=this.parent,a="child"===n?t:t.parent;if(this!==t){if(this.parent?a.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),a!==o&&o.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===a)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else w((i=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(i,1);if(this.parent=a,a.hasChildren())switch(n){case"child":a.children.push(this);break;case"before":w((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i,0,this);break;case"after":w((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i+1,0,this);break;default:e.error("Invalid mode "+n)}else a.children=[this];s&&t.visit(s,!0),a===o?a.triggerModifyChild("move",this):a.triggerModifyChild("add",this),r!==t.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit((function(e){e.tree=t.tree}),!0)),r._callHook("treeStructureChanged",r,"moveTo"),o.isDescendantOf(a)||o.render(),a.isDescendantOf(o)||a===o||a.render()}},navigate:function(t,n){var s,i=e.ui.keyCode;switch(t){case"left":case i.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case i.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(s=this.findRelatedNode(t)){try{s.makeVisible({scrollIntoView:!1})}catch(e){}return!1===n?(s.setFocus(),N()):s.setActive()}return this.warn("Could not find related node '"+t+"'."),N()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var s,i=this.parent,r=e.inArray(this,i.children),o=this;return w(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(s=this.tree._callHook("nodeLoadChildren",this,n)).done((function(e){var n=o.children;for(t=0;tg+m-f&&(b=u+h-m+f,_&&(w(_.isRootNode()||_.isVisible(),"topNode must be visible"),as?1:-1},i.sort(e),t)for(n=0,s=i.length;n=0,n=void 0===n?!i:!!n)i||(d+=s+" ",u=!0);else for(;d.indexOf(" "+s+" ")>-1;)d=d.replace(" "+s+" "," ");return this.extraClasses=e.trim(d),u},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,s){var i,r=this.tree.options.modifyChild;r&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),i={node:this,tree:this.tree,operation:t,childNode:n||null},s&&e.extend(i,s),r({type:"modifyChild"},i))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,s,i=!0,r=this.children;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(r)for(n=0,s=r.length;n=2&&(Array.prototype.unshift.call(arguments,this.toString()),b("warn",arguments))}},H.prototype={_makeHookContext:function(t,n,s){var i,r;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),i=t):t.tree?i={node:t,tree:r=t.tree,widget:r.widget,options:r.widget.options,originalEvent:n,typeInfo:r.types[t.type]||{}}:t.widget?i={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),s&&e.extend(i,s),i},_callHook:function(t,n,s){var i=this._makeHookContext(n),r=this[t],o=Array.prototype.slice.call(arguments,2);return e.isFunction(r)||e.error("_callHook('"+t+"') is not a function"),o.unshift(i),r.apply(this,o)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_requireExtension:function(t,n,s,i){null!=s&&(s=!!s);var r=this._local.name,o=this.options.extensions,a=e.inArray(t,o)=4&&(Array.prototype.unshift.call(arguments,this.toString()),b("log",arguments))},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!e)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),b("error",arguments))},expandAll:function(e,t){var n=this.enableUpdate(!1);e=!1!==e,this.visit((function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)})),this.enableUpdate(n)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var n=null,s=this.getFirstChild();function i(s){if(e(s)&&(n=s),n||s===t)return!1}return e="string"==typeof e?A(e):e,t=t||s,this.visitRows(i,{start:t,includeSelf:!1}),n||t===s||this.visitRows(i,{start:s,includeSelf:!0}),n},findRelatedNode:function(t,n,s){var i=null,r=e.ui.keyCode;switch(n){case"parent":case r.BACKSPACE:t.parent&&t.parent.parent&&(i=t.parent);break;case"first":case r.HOME:this.visit((function(e){if(e.isVisible())return i=e,!1}));break;case"last":case r.END:this.visit((function(e){e.isVisible()&&(i=e)}));break;case"left":case r.LEFT:t.expanded?t.setExpanded(!1):t.parent&&t.parent.parent&&(i=t.parent);break;case"right":case r.RIGHT:t.expanded||!t.children&&!t.lazy?t.children&&t.children.length&&(i=t.children[0]):(t.setExpanded(),i=t);break;case"up":case r.UP:this.visitRows((function(e){return i=e,!1}),{start:t,reverse:!0,includeSelf:!1});break;case"down":case r.DOWN:this.visitRows((function(e){return i=e,!1}),{start:t,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+n+"'.")}return i},generateFormElements:function(t,n,s){s=s||{};var i,r="string"==typeof t?t:"ft_"+this._id+"[]",o="string"==typeof n?n:"ft_"+this._id+"_active",a="fancytree_result_"+this._id,u=e("#"+a),l=3===this.options.selectMode&&!1!==s.stopOnParents;function d(t){u.append(e(" ",{type:"checkbox",name:r,value:t.key,checked:!0}))}u.length?u.empty():u=e("",{id:a}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&u.append(e("
",{type:"radio",name:o,value:this.activeNode.key,checked:!0})),s.filter?this.visit((function(e){var t=s.filter(e);if("skip"===t)return t;!1!==t&&d(e)})):!1!==t&&(i=this.getSelectedNodes(l),e.each(i,(function(e,t){d(t)})))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(e){return this.widget.option(e)},getNodeByKey:function(e,t){var n,s;return!t&&(n=document.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,s=null,t.visit((function(t){if(t.key===e)return s=t,!1}),!0),s)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),b("info",arguments))},isLoading:function(){var e=!1;return this.rootNode.visit((function(t){if(t._isLoading||t._requestId)return e=!0,!1}),!0),e},loadKeyPath:function(t,n){var s,i,r,o=this,a=new e.Deferred,u=this.getRootNode(),l=this.options.keyPathSeparator,d=[],c=e.extend({},n);for("function"==typeof n?s=n:n&&n.callback&&(s=n.callback),c.callback=function(e,t,n){s&&s.call(e,t,n),a.notifyWith(e,[{node:t,status:n}])},null==c.matchKey&&(c.matchKey=function(e,t){return e.key===t}),e.isArray(t)||(t=[t]),i=0;i
=2&&(Array.prototype.unshift.call(arguments,this.toString()),b("warn",arguments))}},e.extend(H.prototype,{nodeClick:function(e){var t,n,s=e.targetType,i=e.node;if("expander"===s){if(i.isLoading())return void i.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===s)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(n=!1,t=!0,i.folder)switch(e.options.clickFolderMode){case 2:n=!0,t=!1;break;case 3:t=!0,n=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),n&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var n,s,i,r=e.node;if(r.parent)for(s=0,i=(n=r.parent.children).length;s500&&(u.lastQuicksearchTerm=""),u.lastQuicksearchTime=i,u.lastQuicksearchTerm+=p,(n=u.findNextNode(u.lastQuicksearchTerm,u.getActiveNode()))&&n.setActive(),void o.preventDefault();switch(s.eventToString(o)){case"+":case"=":u.nodeSetExpanded(t,!0);break;case"-":u.nodeSetExpanded(t,!1);break;case"space":a.isPagingNode()?u._triggerNodeEvent("clickPaging",t,o):s.evalOption("checkbox",a,a,l,!1)?u.nodeToggleSelected(t):u.nodeSetActive(t,!0);break;case"return":u.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":a.navigate(o.which,y);break;default:v=!1}v&&o.preventDefault()},nodeLoadChildren:function(t,n){var s,i,r,o,u=t.tree,l=t.node,d=Date.now();return e.isFunction(n)&&(n=n.call(u,{type:"source"},t),w(!e.isFunction(n),"source callback must not return another function")),n.url&&(l._requestId&&l.warn("Recursive load request #"+d+" while #"+l._requestId+" is pending."),s=e.extend({},t.options.ajax,n),l._requestId=d,s.debugDelay?(i=s.debugDelay,delete s.debugDelay,e.isArray(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),l.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),r=e.Deferred((function(t){setTimeout((function(){e.ajax(s).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),i)}))):r=e.ajax(s),n=new e.Deferred,r.done((function(s,i,r){var o,c;if("json"!==this.dataType&&"jsonp"!==this.dataType||"string"!=typeof s||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),l._requestId&&l._requestId>d)n.rejectWith(this,[a]);else{if(t.options.postProcess){try{c=u._triggerNodeEvent("postProcess",t,t.originalEvent,{response:s,error:null,dataType:this.dataType})}catch(e){c={error:e,message:""+e,details:"postProcess failed"}}if(c.error)return o=e.isPlainObject(c.error)?c.error:{message:c.error},o=u._makeHookContext(l,null,o),void n.rejectWith(this,[o]);(e.isArray(c)||e.isPlainObject(c)&&e.isArray(c.children))&&(s=c)}else s&&s.hasOwnProperty("d")&&t.options.enableAspx&&(s="string"==typeof s.d?e.parseJSON(s.d):s.d);n.resolveWith(this,[s])}})).fail((function(e,t,s){var i=u._makeHookContext(l,null,{error:e,args:Array.prototype.slice.call(arguments),message:s,details:e.status+": "+s});n.rejectWith(this,[i])}))),e.isFunction(n.then)&&e.isFunction(n.catch)&&(r=n,n=new e.Deferred,r.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))),e.isFunction(n.promise)?(u.nodeSetStatus(t,"loading"),n.done((function(e){u.nodeSetStatus(t,"ok"),l._requestId=null})).fail((function(e){var n;e!==a?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=u._makeHookContext(l,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),l.warn("Load children failed ("+n.message+")",n),!1!==u._triggerNodeEvent("loadError",n,null)&&u.nodeSetStatus(t,"error",n.message,n.details)):l.warn("Ignored response for obsolete load request #"+d+" (expected #"+l._requestId+")")}))):t.options.postProcess&&(o=u._triggerNodeEvent("postProcess",t,t.originalEvent,{response:n,error:null,dataType:typeof n}),(e.isArray(o)||e.isPlainObject(o)&&e.isArray(o.children))&&(n=o)),e.when(n).done((function(n){var s,i;e.isPlainObject(n)&&(w(l.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),w(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),s=n,n=n.children,delete s.children,e.each(m,(function(e,t){void 0!==s[t]&&(u[t]=s[t],delete s[t])})),e.extend(u.data,s)),w(e.isArray(n),"expected array of children"),l._setChildren(n),u.options.nodata&&0===n.length&&(e.isFunction(u.options.nodata)?i=u.options.nodata.call(u,{type:"nodata"},t):!0===u.options.nodata&&l.isRootNode()?i=u.options.strings.nodata:"string"==typeof u.options.nodata&&l.isRootNode()&&(i=u.options.nodata),i&&l.setStatus("nodata",i)),u._triggerNodeEvent("loadChildren",l)}))},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,n){var s,i=t.node,r=e.extend({},t,{node:n}),o=i.children;if(1===o.length)return w(n===o[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(r),this.nodeRemoveChildren(r),w((s=e.inArray(n,o))>=0,"invalid child"),i.triggerModifyChild("remove",n),n.visit((function(e){e.parent=null}),!0),this._callHook("treeRegisterNode",this,!1,n),o.splice(s,1)},nodeRemoveChildMarkup:function(t){var n=t.node;n.ul&&(n.isRootNode()?e(n.ul).empty():(e(n.ul).remove(),n.ul=null),n.visit((function(e){e.li=e.ul=null})))},nodeRemoveChildren:function(e){var t=e.tree,n=e.node;n.children&&(this.activeNode&&this.activeNode.isDescendantOf(n)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(n)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),n.triggerModifyChild("remove",null),n.visit((function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)})),n.lazy?n.children=[]:n.children=null,n.isRootNode()||(n.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var n=t.node;n.li&&(e(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,s,i,r){var o,a,u,l,d,c,h,p=t.node,f=t.tree,m=t.options,g=m.aria,v=!1,y=p.parent,_=!y,b=p.children,x=null;if(!1!==f._enableUpdate&&(_||y.ul)){if(w(_||y.ul,"parent UL must exist"),_||(p.li&&(n||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?x=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(v=!0,p.li=document.createElement("li"),p.li.ftnode=p,p.key&&m.generateIds&&(p.li.id=m.idPrefix+p.key),p.span=document.createElement("span"),p.span.className="fancytree-node",g&&!p.tr&&e(p.li).attr("role","treeitem"),p.li.appendChild(p.span),this.nodeRenderTitle(t),m.createNode&&m.createNode.call(f,{type:"createNode"},t)),m.renderNode&&m.renderNode.call(f,{type:"renderNode"},t)),b){if(_||p.expanded||!0===s){for(p.ul||(p.ul=document.createElement("ul"),(!0!==i||r)&&p.expanded||(p.ul.style.display="none"),g&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),l=0,d=b.length;l1&&v.push(" ")):v.push(" "),(r=s.evalOption("checkbox",h,h,f,!1))&&!h.isStatusNode()&&(l=m?" role='checkbox'":"",o="fancytree-checkbox",("radio"===r||h.parent&&h.parent.radiogroup)&&(o+=" fancytree-radio"),v.push(" ")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(a=s.evalOption("icon",h,h,f,!0))&&(l=m?" role='presentation'":"",c=(c=s.evalOption("iconTooltip",h,h,f,null))?" title='"+I(c)+"'":"","string"==typeof a?i.test(a)?(a="/"===a.charAt(0)?a:(f.imagePath||"")+a,v.push(" ")):v.push(" "):a.text?v.push(""+s.escapeHtml(a.text)+" "):a.html?v.push(""+a.html+" "):v.push(" ")),u="",f.renderTitle&&(u=f.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(d=s.evalOption("tooltip",h,h,f,null))&&(d=h.title),u=""+(f.escapeTitles?s.escapeHtml(h.title):h.title)+" "),v.push(u),h.span.innerHTML=v.join(""),this.nodeRenderStatus(t),f.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),u=f.enhanceTitle.call(p,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var n,i=t.node,r=t.tree,o=t.options,a=i.hasChildren(),u=i.isLastSibling(),l=o.aria,d=o._classNames,c=[],h=i[r.statusClassPropName];h&&!1!==r._enableUpdate&&(l&&(n=e(i.tr||i.li)),c.push(d.node),r.activeNode===i&&c.push(d.active),r.focusNode===i&&c.push(d.focused),i.expanded&&c.push(d.expanded),l&&(!1===a?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(i.expanded))),i.folder&&c.push(d.folder),!1!==a&&c.push(d.hasChildren),u&&c.push(d.lastsib),i.lazy&&null==i.children&&c.push(d.lazy),i.partload&&c.push(d.partload),i.partsel&&c.push(d.partsel),s.evalOption("unselectable",i,i,o,!1)&&c.push(d.unselectable),i._isLoading&&c.push(d.loading),i._error&&c.push(d.error),i.statusNodeType&&c.push(d.statusNodePrefix+i.statusNodeType),i.selected?(c.push(d.selected),l&&n.attr("aria-selected",!0)):l&&n.attr("aria-selected",!1),i.extraClasses&&c.push(i.extraClasses),!1===a?c.push(d.combinedExpanderPrefix+"n"+(u?"l":"")):c.push(d.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(u?"l":"")),c.push(d.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=c.join(" "),i.li&&e(i.li).toggleClass(d.lastsib,u))},nodeSetActive:function(t,n,s){s=s||{};var i,r=t.node,o=t.tree,a=t.options,u=!0===s.noEvents,l=!0===s.noFocus,d=!1!==s.scrollIntoView;return r===o.activeNode==(n=!1!==n)?N(r):n&&!u&&!1===this._triggerNodeEvent("beforeActivate",r,t.originalEvent)?E(r,["rejected"]):(n?(o.activeNode&&(w(o.activeNode!==r,"node was active (inconsistency)"),i=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(i,!1),w(null===o.activeNode,"deactivate was out of sync?")),a.activeVisible&&r.makeVisible({scrollIntoView:d}),o.activeNode=r,o.nodeRenderStatus(t),l||o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",r,t.originalEvent)):(w(o.activeNode===r,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",r,t.originalEvent)),N(r))},nodeSetExpanded:function(t,n,s){s=s||{};var i,r,o,a,u,l,d=t.node,c=t.tree,h=t.options,p=!0===s.noAnimation,f=!0===s.noEvents;if(n=!1!==n,d.expanded&&n||!d.expanded&&!n)return N(d);if(n&&!d.lazy&&!d.hasChildren())return N(d);if(!n&&d.getLevel()=1||e(i.$container).focus(),o.autoScroll&&r.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,n){n=n||{};var i=e.node,r=e.tree,o=e.options,a=!0===n.noEvents,u=i.parent;if(t=!1!==t,!s.evalOption("unselectable",i,i,o,!1)){if(i._lastSelectIntent=t,!!i.selected===t&&(3!==o.selectMode||!i.partsel||t))return t;if(!a&&!1===this._triggerNodeEvent("beforeSelect",i,e.originalEvent))return!!i.selected;t&&1===o.selectMode?(r.lastSelectedNode&&r.lastSelectedNode.setSelected(!1),i.selected=t):3!==o.selectMode||!u||u.radiogroup||i.radiogroup?u&&u.radiogroup?i.visitSiblings((function(e){e._changeSelectStatusAttrs(t&&e===i)}),!0):i.selected=t:(i.selected=t,i.fixSelection3AfterClick(n)),this.nodeRenderStatus(e),r.lastSelectedNode=t?i:null,a||r._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,n,s,i){var r=t.node,o=t.tree;function a(){var e=r.children?r.children[0]:null;if(e&&e.isStatusNode()){try{r.ul&&(r.ul.removeChild(e.li),e.li=null)}catch(e){}1===r.children.length?r.children=[]:r.children.shift(),o._callHook("treeStructureChanged",t,"clearStatusNode")}}function u(n,s){var i=r.children?r.children[0]:null;return i&&i.isStatusNode()?(e.extend(i,n),i.statusNodeType=s,o._callHook("nodeRenderTitle",i)):(r._setChildren([n]),o._callHook("treeStructureChanged",t,"setStatusNode"),r.children[0].statusNodeType=s,o.render()),r.children[0]}switch(n){case"ok":a(),r._isLoading=!1,r._error=null,r.renderStatus();break;case"loading":r.parent||u({title:o.options.strings.loading+(s?" ("+s+")":""),checkbox:!1,tooltip:i},n),r._isLoading=!0,r._error=null,r.renderStatus();break;case"error":u({title:o.options.strings.loadError+(s?" ("+s+")":""),checkbox:!1,tooltip:i},n),r._isLoading=!1,r._error={message:s,details:i},r.renderStatus();break;case"nodata":u({title:s||o.options.strings.noData,checkbox:!1,tooltip:i},n),r._isLoading=!1,r._error=null,r.renderStatus();break;default:e.error("invalid node status "+n)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,n=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(n=!1,t.selected=!0),t._lastSelectIntent=n,this.nodeSetSelected(e,n)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null,t._callHook("treeStructureChanged",e,"clear")},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var n=t.tree,s=n.options;n.$container.attr("tabindex",s.tabindex),e.each(m,(function(e,t){void 0!==s[t]&&(n.info("Move option "+t+" to tree"),n[t]=s[t],delete s[t])})),s.checkboxAutoHide&&n.$container.addClass("fancytree-checkbox-auto-hide"),s.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),s.aria&&(n.$container.attr("role","tree"),1!==s.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,n){var s,i,r,o=t.tree,a=t.widget.element,u=e.extend({},t,{node:this.rootNode});if(o.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(i=a.data("type")||"html"){case"html":(r=a.find(">ul").first()).addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(r),this.data=e.extend(this.data,L(r));break;case"json":n=e.parseJSON(a.text()),a.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(n)&&(w(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),s=n,n=n.children,delete s.children,e.each(m,(function(e,t){void 0!==s[t]&&(o[t]=s[t],delete s[t])})),e.extend(o.data,s));break;default:e.error("Invalid data-type: "+i)}return this.nodeLoadChildren(u,n).done((function(){o._callHook("treeStructureChanged",t,"loadChildren"),o.render(),3===t.options.selectMode&&o.rootNode.fixSelection3FromEndNodes(),o.activeNode&&o.options.activeVisible&&o.activeNode.makeVisible(),o._triggerTreeEvent("init",null,{status:!0})})).fail((function(){o.render(),o._triggerTreeEvent("init",null,{status:!1})}))},treeRegisterNode:function(e,t,n){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,n,s){var i;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||s&&s.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(i=this._lastMousedownNode||this.getFirstChild())&&i.setFocus())},treeSetOption:function(t,n,s){var i=t.tree,r=!0,o=!1,a=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":o=!0,a=!0;break;case"checkboxAutoHide":i.$container.toggleClass("fancytree-checkbox-auto-hide",!!s);break;case"escapeTitles":case"tooltip":a=!0;break;case"rtl":!1===s?i.$container.removeAttr("DIR").removeClass("fancytree-rtl"):i.$container.attr("DIR","RTL").addClass("fancytree-rtl"),a=!0;break;case"source":r=!1,i._callHook("treeLoad",i,s),a=!0}i.debug("set option "+n+"="+s+" <"+typeof s+">"),r&&(this.widget._super?this.widget._super.call(this.widget,n,s):e.Widget.prototype._setOption.call(this.widget,n,s)),o&&i._callHook("treeCreate",i),a&&i.render(!0,!1)},treeStructureChanged:function(e,t){}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,escapeTitles:!1,extensions:[],toggleEffect:{effect:"slideToggle",duration:200},generateIds:!1,icon:!0,idPrefix:"ft_",focusOnSelect:!1,keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,tooltip:!1,treeId:null,_classNames:{node:"fancytree-node",folder:"fancytree-folder",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",unselectable:"fancytree-unselectable",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error",statusNodePrefix:"fancytree-statusnode-"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new H(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,n,s,i=this.options,r=i.extensions,o=this.tree;for(s=0;s element.");else{if(r){if(i._getExpiringValue("focusin"))return void i.debug("Ignored double focusin.");i._setExpiringValue("focusin",!0,50),n||(n=i._getExpiringValue("mouseDownNode"))&&i.debug("Reconstruct mouse target for focusin from recent event.")}n?i._callHook("nodeSetFocus",i._makeHookContext(n,t),r):i.tbody&&e(t.target).parents("table.fancytree-container > thead").length?i.debug("Ignore focus event outside table body.",t):i._callHook("treeSetFocus",i,r)}})).on("selectstart"+r,"span.fancytree-title",(function(e){e.preventDefault()})).on("keydown"+r,(function(e){if(n.disabled||!1===n.keyboard)return!0;var t,s=i.focusNode,r=i._makeHookContext(s||i,e),o=i.phase;try{return i.phase="userEvent","preventNav"===(t=s?i._triggerNodeEvent("keydown",s,e):i._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=i._callHook("nodeKeydown",r)),t}finally{i.phase=o}})).on("mousedown"+r,(function(e){var t=s.getEventTarget(e);i._lastMousedownNode=t?t.node:null,i._setExpiringValue("mouseDownNode",i._lastMousedownNode)})).on("click"+r+" dblclick"+r,(function(e){if(n.disabled)return!0;var i,r=s.getEventTarget(e),o=r.node,a=t.tree,u=a.phase;if(!o)return!0;i=a._makeHookContext(o,e);try{switch(a.phase="userEvent",e.type){case"click":return i.targetType=r.type,o.isPagingNode()?!0===a._triggerNodeEvent("clickPaging",i,e):!1!==a._triggerNodeEvent("click",i,e)&&a._callHook("nodeClick",i);case"dblclick":return i.targetType=r.type,!1!==a._triggerNodeEvent("dblclick",i,e)&&a._callHook("nodeDblclick",i)}}finally{a.phase=u}}))},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(e){return this.tree.getNodeByKey(e)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}}),s=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.32.0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:H,_FancytreeNodeClass:P,jquerySupports:{positionMyOfs:k(e.ui.version,1,9)},assert:function(e,t){return w(e,t)},createTree:function(t,n){return e(t).fancytree(n).fancytree("getTree")},debounce:function(e,t,n,s){var i;return 3===arguments.length&&"boolean"!=typeof n&&(s=n,n=!1),function(){var r=arguments;s=s||this,n&&!i&&t.apply(s,r),clearTimeout(i),i=setTimeout((function(){n||t.apply(s,r),i=null}),e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&b("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&b("error",arguments)},escapeHtml:function(e){return(""+e).replace(r,(function(e){return u[e]}))},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),s=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),i=(n[2]?+n[2]:0)+(s[2]?+s[2]:0),r=(n[4]?+n[4]:0)+(s[4]?+s[4]:0);t=e.extend({},t,{my:n[1]+" "+n[3],at:s[1]+" "+s[3]}),(i||r)&&(t.offset=i+" "+r)}return t},getEventTarget:function(t){var n,i=t&&t.target?t.target.className:"",r={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(i)?r.type="title":/\bfancytree-expander\b/.test(i)?r.type=!1===r.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)?r.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(i)?r.type="icon":/\bfancytree-node\b/.test(i)?r.type="title":t&&t.target&&((n=e(t.target)).is("ul[role=group]")?((r.node&&r.node.tree||s).debug("Ignoring click on outer UL."),r.node=null):n.closest(".fancytree-title").length?r.type="title":n.closest(".fancytree-checkbox").length?r.type="checkbox":n.closest(".fancytree-expander").length&&(r.type="expander")),r},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof P)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var n,s=t;return t instanceof H?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+s).eq(0)).length||(t=e(s).eq(0)):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(n=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?n.tree:null)},evalOption:function(t,n,s,i,r){var o,a,u=n.tree,l=i[t],d=s[t];return e.isFunction(l)?(o={node:n,tree:u,widget:u.widget,options:u.widget.options,typeInfo:u.types[n.type]||{}},null==(a=l.call(u,{type:t},o))&&(a=d)):a=null==d?l:d,null==a&&(a=r),a},setSpanIcon:function(t,n,s){var i=e(t);"string"==typeof s?i.attr("class",n+" "+s):(s.text?i.text(""+s.text):s.html&&(t.innerHTML=s.html),i.attr("class",n+" "+(s.addClass||"")))},eventToString:function(e){var t=e.which,n=e.type,s=[];return e.altKey&&s.push("alt"),e.ctrlKey&&s.push("ctrl"),e.metaKey&&s.push("meta"),e.shiftKey&&s.push("shift"),"click"===n||"dblclick"===n?s.push(h[e.button]+n):"wheel"===n?s.push(n):l[t]||s.push(d[t]||String.fromCharCode(t).toLowerCase()),s.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&b("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,n,s,i){var r,o=t[n]||e.noop;t[n]=function(){var e=i||this;try{return r=e._super,e._super=o,s.apply(e,arguments)}finally{e._super=r}}},parseHtml:function(t){var n,s,i,r,o,a,u,l,d=t.find(">li"),c=[];return d.each((function(){var d,h,m=e(this),v=m.find(">span",this).first(),_=v.length?null:m.find(">a").first(),w={tooltip:null,data:{}};for(v.length?w.title=v.html():_&&_.length?(w.title=_.html(),w.data.href=_.attr("href"),w.data.target=_.attr("target"),w.tooltip=_.attr("title")):(w.title=m.html(),(o=w.title.search(/=0&&(w.title=w.title.substring(0,o))),w.title=e.trim(w.title),r=0,a=p.length;rul").first()).length?w.children=e.ui.fancytree.parseHtml(t):w.children=w.lazy?void 0:null,c.push(w)})),c},registerExtension:function(t){w(null!=t.name,"extensions must have a `name` property."),w(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&b("warn",arguments)}}),e.ui.fancytree}function w(t,n){t||(n=n?": "+n:"",e.error("Fancytree assertion failed"+n))}function b(e,t){var n,s,i=window.console?window.console[e]:null;if(i)try{i.apply(window.console,t)}catch(e){for(s="",n=0;na;return!0}function S(){var t,n,s,i,r,o=arguments[0]||{},a=1,u=arguments.length;if("object"==typeof o||e.isFunction(o)||(o={}),a===u)throw Error("need at least two args");for(;a=0}}function A(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}function P(t,n){var i,r,o,a;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},i=0,r=g.length;iul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new P(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=s.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")})?s.apply(t,i):s)||(e.exports=r)},860:function(e,t,n){var s,i,r;i=[n(755)],void 0===(r="function"==typeof(s=function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t,n,s=0,i=Array.prototype.slice;e.cleanData=e.cleanData||(t=e.cleanData,function(n){var s,i,r;for(r=0;null!=(i=n[r]);r++)try{(s=e._data(i,"events"))&&s.remove&&e(i).triggerHandler("remove")}catch(e){}t(n)}),e.widget=e.widget||function(t,n,s){var i,r,o,a={},u=t.split(".")[0],l=u+"-"+(t=t.split(".")[1]);return s||(s=n,n=e.Widget),e.isArray(s)&&(s=e.extend.apply(null,[{}].concat(s))),e.expr[":"][l.toLowerCase()]=function(t){return!!e.data(t,l)},e[u]=e[u]||{},i=e[u][t],r=e[u][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,i,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),(o=new n).options=e.widget.extend({},o.options),e.each(s,(function(t,s){e.isFunction(s)?a[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function i(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=s.apply(this,arguments),this._super=n,this._superApply=r,t}}():a[t]=s})),r.prototype=e.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||t},a,{constructor:r,namespace:u,widgetName:t,widgetFullName:l}),i?(e.each(i._childConstructors,(function(t,n){var s=n.prototype;e.widget(s.namespace+"."+s.widgetName,r,n._proto)})),delete i._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var n,s,r=i.call(arguments,1),o=0,a=r.length;o",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,n){t._removeClass(n,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var s,i,r,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(i=o[t]=e.widget.extend({},this.options[t]),r=0;r
"),r=i.children()[0];return e("body").append(i),n=r.offsetWidth,i.css("overflow","scroll"),n===(s=r.offsetWidth)&&(s=i[0].clientWidth),i.remove(),t=n-s},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width0?"right":"center",vertical:d<0?"top":u>0?"bottom":"middle"};pn(s(u),s(d))?c.important="horizontal":c.important="vertical",t.using.call(this,e,c)}),o.offset(e.extend(C,{using:r}))}))},e.ui.position={fit:{left:function(e,t){var s,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=e.left-t.collisionPosition.marginLeft,u=r-a,l=a+t.collisionWidth-o-r;t.collisionWidth>o?u>0&&l<=0?(s=e.left+u+t.collisionWidth-o-r,e.left+=u-s):e.left=l>0&&u<=0?r:u>l?r+o-t.collisionWidth:r:u>0?e.left+=u:l>0?e.left-=l:e.left=n(e.left-a,e.left)},top:function(e,t){var s,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,u=r-a,l=a+t.collisionHeight-o-r;t.collisionHeight>o?u>0&&l<=0?(s=e.top+u+t.collisionHeight-o-r,e.top+=u-s):e.top=l>0&&u<=0?r:u>l?r+o-t.collisionHeight:r:u>0?e.top+=u:l>0?e.top-=l:e.top=n(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,u=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-t.collisionPosition.marginLeft,d=l-u,c=l+t.collisionWidth-a-u,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];d<0?((n=e.left+h+p+f+t.collisionWidth-a-o)<0||n0&&((i=e.left-t.collisionPosition.marginLeft+h+p+f-u)>0||s(i)0&&((n=e.top-t.collisionPosition.marginTop+h+p+f-u)>0||s(n)0&&t-1 in e)}S.fn=S.prototype={jquery:k,constructor:S,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),$=new RegExp(q+"|>"),U=new RegExp(M),V=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+z+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){h()},oe=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{A.apply(L=P.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(e){A={apply:L.length?function(e,t){D.apply(e,P.call(t))}:function(e,t){for(var n=e.length,s=0;e[n++]=t[s++];);e.length=n-1}}}function ae(e,t,s,i){var r,a,l,d,c,f,v,y=t&&t.ownerDocument,b=t?t.nodeType:9;if(s=s||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return s;if(!i&&(h(t),t=t||p,m)){if(11!==b&&(c=Z.exec(e)))if(r=c[1]){if(9===b){if(!(l=t.getElementById(r)))return s;if(l.id===r)return s.push(l),s}else if(y&&(l=y.getElementById(r))&&_(t,l)&&l.id===r)return s.push(l),s}else{if(c[2])return A.apply(s,t.getElementsByTagName(e)),s;if((r=c[3])&&n.getElementsByClassName&&t.getElementsByClassName)return A.apply(s,t.getElementsByClassName(r)),s}if(n.qsa&&!N[e+" "]&&(!g||!g.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===b&&($.test(e)||Q.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((d=t.getAttribute("id"))?d=d.replace(se,ie):t.setAttribute("id",d=w)),a=(f=o(e)).length;a--;)f[a]=(d?"#"+d:":scope")+" "+_e(f[a]);v=f.join(",")}try{return A.apply(s,y.querySelectorAll(v)),s}catch(t){N(e,!0)}finally{d===w&&t.removeAttribute("id")}}}return u(e.replace(W,"$1"),t,s,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>s.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function de(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)s.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,s=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(s)return s;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le((function(t){return t=+t,le((function(n,s){for(var i,r=e([],n.length,t),o=r.length;o--;)n[i=r[o]]&&(n[i]=!(s[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},r=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:b;return o!=p&&9===o.nodeType&&o.documentElement?(f=(p=o).documentElement,m=!r(p),b!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.scope=de((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=de((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=de((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Y.test(p.getElementsByClassName),n.getById=de((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(s.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},s.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(s.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},s.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,s,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),s=0;r=i[s++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),s.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,s=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&s.push(n);return s}return r},s.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Y.test(p.querySelectorAll))&&(de((function(e){var t;f.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+z+")"),e.querySelectorAll("[id~="+w+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),de((function(e){e.innerHTML=" ";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Y.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&de((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",M)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Y.test(f.compareDocumentPosition),_=t||Y.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,s=t&&t.parentNode;return e===s||!(!s||1!==s.nodeType||!(n.contains?n.contains(s):e.compareDocumentPosition&&16&e.compareDocumentPosition(s)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return c=!0,0;var s=!e.compareDocumentPosition-!t.compareDocumentPosition;return s||(1&(s=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===s?e==p||e.ownerDocument==b&&_(b,e)?-1:t==p||t.ownerDocument==b&&_(b,t)?1:d?H(d,e)-H(d,t):0:4&s?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,s=0,i=e.parentNode,r=t.parentNode,o=[e],a=[t];if(!i||!r)return e==p?-1:t==p?1:i?-1:r?1:d?H(d,e)-H(d,t):0;if(i===r)return he(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;o[s]===a[s];)s++;return s?he(o[s],a[s]):o[s]==b?-1:a[s]==b?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!N[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var s=y.call(e,t);if(s||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return s}catch(e){N(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),_(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var i=s.attrHandle[t.toLowerCase()],r=i&&j.call(s.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(se,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,s=[],i=0,r=0;if(c=!n.detectDuplicates,d=!n.sortStable&&e.slice(0),e.sort(E),c){for(;t=e[r++];)t===e[r]&&(i=s.push(r));for(;i--;)e.splice(s[i],1)}return d=null,e},i=ae.getText=function(e){var t,n="",s=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[s++];)n+=i(t);return n},(s=ae.selectors={cacheLength:50,createPseudo:le,match:X,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||ae.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]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+q+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(s){var i=ae.attr(s,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,s,i){var r="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===s&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,d,c,h,p,f,m=r!==o?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,_=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&y){for(_=(p=(l=(d=(c=(h=g)[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===x&&l[1])&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(_=p=0)||f.pop();)if(1===h.nodeType&&++_&&h===t){d[e]=[x,p,_];break}}else if(y&&(_=p=(l=(d=(c=(h=t)[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===x&&l[1]),!1===_)for(;(h=++p&&h&&h[m]||(_=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((d=(c=h[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]=[x,_]),h!==t)););return(_-=i)===s||_%s==0&&_/s>=0}}},PSEUDO:function(e,t){var n,i=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],s.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var s,r=i(e,t),o=r.length;o--;)e[s=H(e,r[o])]=!(n[s]=r[o])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],s=a(e.replace(W,"$1"));return s[w]?le((function(e,t,n,i){for(var r,o=s(e,null,i,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))})):function(e,i,r){return t[0]=e,s(t,null,r,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return ae(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!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,!0===e.selected},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 J.test(e.nodeName)},input:function(e){return G.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:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;nt?t:n;--s>=0;)e.push(s);return e})),gt:ge((function(e,t,n){for(var s=n<0?n+t:n;++s1?function(t,n,s){for(var i=e.length;i--;)if(!e[i](t,n,s))return!1;return!0}:e[0]}function xe(e,t,n,s,i){for(var r,o=[],a=0,u=e.length,l=null!=t;a-1&&(r[l]=!(o[l]=c))}}else v=xe(v===o?v.splice(f,v.length):v),i?i(null,o,v,u):A.apply(o,v)}))}function Se(e){for(var t,n,i,r=e.length,o=s.relative[e[0].type],a=o||s.relative[" "],u=o?1:0,d=we((function(e){return e===t}),a,!0),c=we((function(e){return H(t,e)>-1}),a,!0),h=[function(e,n,s){var i=!o&&(s||n!==l)||((t=n).nodeType?d(e,n,s):c(e,n,s));return t=null,i}];u1&&be(h),u>1&&_e(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(W,"$1"),n,u0,i=e.length>0,r=function(r,o,a,u,d){var c,f,g,v=0,y="0",_=r&&[],w=[],b=l,k=r||i&&s.find.TAG("*",d),S=x+=null==b?1:Math.random()||.1,C=k.length;for(d&&(l=o==p||o||d);y!==C&&null!=(c=k[y]);y++){if(i&&c){for(f=0,o||c.ownerDocument==p||(h(c),a=!m);g=e[f++];)if(g(c,o||p,a)){u.push(c);break}d&&(x=S)}n&&((c=!g&&c)&&v--,r&&_.push(c))}if(v+=y,n&&y!==v){for(f=0;g=t[f++];)g(_,w,o,a);if(r){if(v>0)for(;y--;)_[y]||w[y]||(w[y]=I.call(u));w=xe(w)}A.apply(u,w),d&&!r&&w.length>0&&v+t.length>1&&ae.uniqueSort(u)}return d&&(x=S,l=b),_};return n?le(r):r}(r,i))).selector=e}return a},u=ae.select=function(e,t,n,i){var r,u,l,d,c,h="function"==typeof e&&e,p=!i&&o(e=h.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&s.relative[u[1].type]){if(!(t=(s.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(r=X.needsContext.test(e)?0:u.length;r--&&(l=u[r],!s.relative[d=l.type]);)if((c=s.find[d])&&(i=c(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(r,1),!(e=i.length&&_e(u)))return A.apply(n,i),n;break}}return(h||a(e,p))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=w.split("").sort(E).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=de((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),de((function(e){return e.innerHTML=" ","#"===e.firstChild.getAttribute("href")}))||ce("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&de((function(e){return e.innerHTML=" ",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ce("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),de((function(e){return null==e.getAttribute("disabled")}))||ce(z,(function(e,t,n){var s;if(!n)return!0===e[t]?t.toLowerCase():(s=e.getAttributeNode(t))&&s.specified?s.value:null})),ae}(s);S.find=T,S.expr=T.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=T.uniqueSort,S.text=T.getText,S.isXMLDoc=T.isXML,S.contains=T.contains,S.escapeSelector=T.escape;var N=function(e,t,n){for(var s=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(n))break;s.push(e)}return s},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=S.expr.match.needsContext;function L(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return v(t)?S.grep(e,(function(e,s){return!!t.call(e,s,e)!==n})):t.nodeType?S.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?S.grep(e,(function(e){return d.call(t,e)>-1!==n})):S.filter(t,e,n)}S.filter=function(e,t,n){var s=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===s.nodeType?S.find.matchesSelector(s,e)?[s]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,n,s=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&j.test(e)?S(e):e||[],!1).length}});var A,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var s,i;if(!e)return this;if(n=n||A,"string"==typeof e){if(!(s="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!s[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(s[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(s[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),I.test(s[1])&&S.isPlainObject(t))for(s in t)v(this[s])?this[s](t[s]):this.attr(s,t[s]);return this}return(i=_.getElementById(s[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,A=S(_);var H=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function q(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&S.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?S.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?d.call(S(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return q(e,"nextSibling")},prev:function(e){return q(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(L(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(n,s){var i=S.map(this,t,n);return"Until"!==e.slice(-5)&&(s=n),s&&"string"==typeof s&&(i=S.filter(s,i)),this.length>1&&(z[e]||S.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}}));var O=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function B(e,t,n,s){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(s))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(O)||[],(function(e,n){t[n]=!0})),t}(e):S.extend({},e);var t,n,s,i,r=[],o=[],a=-1,u=function(){for(i=i||e.once,s=t=!0;o.length;a=-1)for(n=o.shift();++a-1;)r.splice(n,1),n<=a&&a--})),this},has:function(e){return e?S.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return i=o=[],r=n="",this},disabled:function(){return!r},lock:function(){return i=o=[],n||t||(r=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!s}};return l},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(n){S.each(t,(function(t,s){var i=v(e[s[4]])&&e[s[4]];r[s[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var r=0;function o(e,t,n,i){return function(){var a=this,u=arguments,l=function(){var s,l;if(!(e=r&&(n!==M&&(a=void 0,u=[s]),t.rejectWith(a,u))}};e?d():(S.Deferred.getStackHook&&(d.stackTrace=S.Deferred.getStackHook()),s.setTimeout(d))}}return S.Deferred((function(s){t[0][3].add(o(0,s,v(i)?i:R,s.notifyWith)),t[1][3].add(o(0,s,v(e)?e:R)),t[2][3].add(o(0,s,v(n)?n:M))})).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},r={};return S.each(t,(function(e,s){var o=s[2],a=s[5];i[s[1]]=o.add,a&&o.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(s[3].fire),r[s[0]]=function(){return r[s[0]+"With"](this===r?void 0:this,arguments),this},r[s[0]+"With"]=o.fireWith})),i.promise(r),e&&e.call(r,r),r},when:function(e){var t=arguments.length,n=t,s=Array(n),i=a.call(arguments),r=S.Deferred(),o=function(e){return function(n){s[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||r.resolveWith(s,i)}};if(t<=1&&(B(e,r.done(o(n)).resolve,r.reject,!t),"pending"===r.state()||v(i[n]&&i[n].then)))return r.then();for(;n--;)B(i[n],o(n),r.reject);return r.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){s.console&&s.console.warn&&e&&W.test(e.name)&&s.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){s.setTimeout((function(){throw e}))};var F=S.Deferred();function Q(){_.removeEventListener("DOMContentLoaded",Q),s.removeEventListener("load",Q),S.ready()}S.fn.ready=function(e){return F.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||F.resolveWith(_,[S]))}}),S.ready.then=F.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?s.setTimeout(S.ready):(_.addEventListener("DOMContentLoaded",Q),s.addEventListener("load",Q));var $=function(e,t,n,s,i,r,o){var a=0,u=e.length,l=null==n;if("object"===x(n))for(a in i=!0,n)$(e,t,a,n[a],!0,r,o);else if(void 0!==s&&(i=!0,v(s)||(o=!0),l&&(o?(t.call(e,s),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),S.extend({queue:function(e,t,n){var s;if(e)return t=(t||"fx")+"queue",s=Y.get(e,t),n&&(!s||Array.isArray(n)?s=Y.access(e,t,S.makeArray(n)):s.push(n)),s||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),s=n.length,i=n.shift(),r=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),s--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,(function(){S.dequeue(e,t)}),r)),!s&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add((function(){Y.remove(e,[t+"queue",n])}))})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;fe=_.createDocumentFragment().appendChild(_.createElement("div")),(me=_.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),fe.appendChild(me),g.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="",g.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML=" ",g.option=!!fe.lastChild;var _e={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function we(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&L(e,t)?S.merge([e],n):n}function be(e,t){for(var n=0,s=e.length;n",""]);var xe=/<|?\w+;/;function ke(e,t,n,s,i){for(var r,o,a,u,l,d,c=t.createDocumentFragment(),h=[],p=0,f=e.length;p-1)i&&i.push(r);else if(l=ae(r),o=we(c.appendChild(r),"script"),l&&be(o),n)for(d=0;r=o[d++];)ye.test(r.type||"")&&n.push(r);return c}var Se=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function Ee(){return!1}function je(e,t){return e===function(){try{return _.activeElement}catch(e){}}()==("focus"===t)}function Le(e,t,n,s,i,r){var o,a;if("object"==typeof t){for(a in"string"!=typeof n&&(s=s||n,n=void 0),t)Le(e,a,n,s,t[a],r);return e}if(null==s&&null==i?(i=n,s=n=void 0):null==i&&("string"==typeof n?(i=s,s=void 0):(i=s,s=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===r&&(o=i,(i=function(e){return S().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=S.guid++)),e.each((function(){S.event.add(this,t,i,s,n)}))}function Ie(e,t,n){n?(Y.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var s,i,r=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),Y.set(this,t,r),s=n(this,t),this[t](),r!==(i=Y.get(this,t))||s?Y.set(this,t,!1):i={},r!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else r.length&&(Y.set(this,t,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&S.event.add(e,t,Ne)}S.event={global:{},add:function(e,t,n,s,i){var r,o,a,u,l,d,c,h,p,f,m,g=Y.get(e);if(G(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&S.find.matchesSelector(oe,i),n.guid||(n.guid=S.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(O)||[""]).length;l--;)p=m=(a=Te.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(c=S.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=S.event.special[p]||{},d=S.extend({type:p,origType:m,data:s,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:f.join(".")},r),(h=u[p])||((h=u[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,s,f,o)||e.addEventListener&&e.addEventListener(p,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,d):h.push(d),S.event.global[p]=!0)},remove:function(e,t,n,s,i){var r,o,a,u,l,d,c,h,p,f,m,g=Y.hasData(e)&&Y.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(O)||[""]).length;l--;)if(p=m=(a=Te.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(c=S.event.special[p]||{},h=u[p=(s?c.delegateType:c.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=h.length;r--;)d=h[r],!i&&m!==d.origType||n&&n.guid!==d.guid||a&&!a.test(d.namespace)||s&&s!==d.selector&&("**"!==s||!d.selector)||(h.splice(r,1),d.selector&&h.delegateCount--,c.remove&&c.remove.call(e,d));o&&!h.length&&(c.teardown&&!1!==c.teardown.call(e,f,g.handle)||S.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)S.event.remove(e,p+t[l],n,s,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,s,i,r,o,a=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],d=S.event.special[u.type]||{};for(a[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(r=[],o={},n=0;n-1:S.find(i,this,null,[l]).length),o[i]&&r.push(s);r.length&&a.push({elem:l,handlers:r})}return l=this,u\s*$/g;function He(e,t){return L(e,"table")&&L(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function ze(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,s,i,r,o,a;if(1===t.nodeType){if(Y.hasData(e)&&(a=Y.get(e).events))for(i in Y.remove(t,"handle events"),a)for(n=0,s=a[i].length;n1&&"string"==typeof f&&!g.checkClone&&Ae.test(f))return e.each((function(i){var r=e.eq(i);m&&(t[0]=f.call(this,i,r.html())),Me(r,t,n,s)}));if(h&&(r=(i=ke(t,e[0].ownerDocument,!1,e,s)).firstChild,1===i.childNodes.length&&(i=r),r||s)){for(a=(o=S.map(we(i,"script"),ze)).length;c0&&be(o,!u&&we(e,"script")),a},cleanData:function(e){for(var t,n,s,i=S.event.special,r=0;void 0!==(n=e[r]);r++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(s in t.events)i[s]?S.event.remove(n,s):S.removeEvent(n,s,t.handle);n[Y.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return $(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Me(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return Me(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Me(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Me(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return $(this,(function(e){var t=this[0]||{},n=0,s=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!_e[(ve.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n3,oe.removeChild(e)),a}}))}();var Xe=["Webkit","Moz","ms"],Ke=_.createElement("div").style,Ge={};function Je(e){var t=S.cssProps[e]||Ge[e];return t||(e in Ke?e:Ge[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in Ke)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Ze=/^--/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var s=ie.exec(t);return s?Math.max(0,s[2]-(n||0))+(s[3]||"px"):t}function st(e,t,n,s,i,r){var o="width"===t?1:0,a=0,u=0;if(n===(s?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(u+=S.css(e,n+re[o],!0,i)),s?("content"===n&&(u-=S.css(e,"padding"+re[o],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+re[o]+"Width",!0,i))):(u+=S.css(e,"padding"+re[o],!0,i),"padding"!==n?u+=S.css(e,"border"+re[o]+"Width",!0,i):a+=S.css(e,"border"+re[o]+"Width",!0,i));return!s&&r>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-u-a-.5))||0),u}function it(e,t,n){var s=Fe(e),i=(!g.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,s),r=i,o=Ue(e,t,s),a="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&L(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===S.css(e,"display",!1,s))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,s),(r=a in e)&&(o=e[a])),(o=parseFloat(o)||0)+st(e,t,n||(i?"border":"content"),r,s,o)+"px"}function rt(e,t,n,s,i){return new rt.prototype.init(e,t,n,s,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!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,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,s){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,o,a=K(t),u=Ze.test(t),l=e.style;if(u||(t=Je(a)),o=S.cssHooks[t]||S.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,s))?i:l[t];"string"===(r=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=de(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||u||(n+=i&&i[3]||(S.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,s))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,s){var i,r,o,a=K(t);return Ze.test(t)||(t=Je(a)),(o=S.cssHooks[t]||S.cssHooks[a])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=Ue(e,t,s)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,n,s){if(n)return!Ye.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,s):Qe(e,et,(function(){return it(e,t,s)}))},set:function(e,n,s){var i,r=Fe(e),o=!g.scrollboxSize()&&"absolute"===r.position,a=(o||s)&&"border-box"===S.css(e,"boxSizing",!1,r),u=s?st(e,t,s,a,r):0;return a&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-st(e,t,"border",!1,r)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),nt(0,n,u)}}})),S.cssHooks.marginLeft=Ve(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-Qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(n){for(var s=0,i={},r="string"==typeof n?n.split(" "):[n];s<4;s++)i[e+re[s]+t]=r[s]||r[s-2]||r[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=nt)})),S.fn.extend({css:function(e,t){return $(this,(function(e,t,n){var s,i,r={},o=0;if(Array.isArray(t)){for(s=Fe(e),i=t.length;o1)}}),S.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,s,i,r){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=s,this.unit=r||(S.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=rt.prototype.init,S.fx.step={};var ot,at,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function dt(){at&&(!1===_.hidden&&s.requestAnimationFrame?s.requestAnimationFrame(dt):s.setTimeout(dt,S.fx.interval),S.fx.tick())}function ct(){return s.setTimeout((function(){ot=void 0})),ot=Date.now()}function ht(e,t){var n,s=0,i={height:e};for(t=t?1:0;s<4;s+=2-t)i["margin"+(n=re[s])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var s,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),r=0,o=i.length;r1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,n){var s,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?S.prop(e,t,n):(1===r&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(s=i.set(e,n,t))?s:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(s=i.get(e,t))?s:null==(s=S.find.attr(e,t))?void 0:s)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&L(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,s=0,i=t&&t.match(O);if(i&&1===e.nodeType)for(;n=i[s++];)e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=gt[t]||S.find.attr;gt[t]=function(e,t,s){var i,r,o=t.toLowerCase();return s||(r=gt[o],gt[o]=i,i=null!=n(e,t,s)?o:null,gt[o]=r),i}}));var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function _t(e){return(e.match(O)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,n){var s,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(s=i.set(e,n,t))?s:e[t]=n:i&&"get"in i&&null!==(s=i.get(e,t))?s:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,n,s,i,r,o,a,u=0;if(v(e))return this.each((function(t){S(this).addClass(e.call(this,t,wt(this)))}));if((t=bt(e)).length)for(;n=this[u++];)if(i=wt(n),s=1===n.nodeType&&" "+_t(i)+" "){for(o=0;r=t[o++];)s.indexOf(" "+r+" ")<0&&(s+=r+" ");i!==(a=_t(s))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,s,i,r,o,a,u=0;if(v(e))return this.each((function(t){S(this).removeClass(e.call(this,t,wt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[u++];)if(i=wt(n),s=1===n.nodeType&&" "+_t(i)+" "){for(o=0;r=t[o++];)for(;s.indexOf(" "+r+" ")>-1;)s=s.replace(" "+r+" "," ");i!==(a=_t(s))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,s="string"===n||Array.isArray(e);return"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){S(this).toggleClass(e.call(this,n,wt(this),t),t)})):this.each((function(){var t,i,r,o;if(s)for(i=0,r=S(this),o=bt(e);t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=wt(this))&&Y.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,s=0;for(t=" "+e+" ";n=this[s++];)if(1===n.nodeType&&(" "+_t(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(e){var t,n,s,i=this[0];return arguments.length?(s=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=s?e.call(this,n,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xt,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:_t(S.text(e))}},select:{get:function(e){var t,n,s,i=e.options,r=e.selectedIndex,o="select-one"===e.type,a=o?null:[],u=o?r+1:i.length;for(s=r<0?u:o?r:0;s-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},g.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in s;var kt=/^(?:focusinfocus|focusoutblur)$/,St=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,i){var r,o,a,u,l,d,c,h,f=[n||_],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=a=n=n||_,3!==n.nodeType&&8!==n.nodeType&&!kt.test(m+S.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[S.expando]?e:new S.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[m]||{},i||!c.trigger||!1!==c.trigger.apply(n,t))){if(!i&&!c.noBubble&&!y(n)){for(u=c.delegateType||m,kt.test(u+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),a=o;a===(n.ownerDocument||_)&&f.push(a.defaultView||a.parentWindow||s)}for(r=0;(o=f[r++])&&!e.isPropagationStopped();)h=o,e.type=r>1?u:c.bindType||m,(d=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&d.apply(o,t),(d=l&&o[l])&&d.apply&&G(o)&&(e.result=d.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(f.pop(),t)||!G(n)||l&&v(n[m])&&!y(n)&&((a=n[l])&&(n[l]=null),S.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,St),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,St),S.event.triggered=void 0,a&&(n[l]=a)),e.result}},simulate:function(e,t,n){var s=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(s,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),g.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var s=this.ownerDocument||this.document||this,i=Y.access(s,t);i||s.addEventListener(e,n,!0),Y.access(s,t,(i||0)+1)},teardown:function(){var s=this.ownerDocument||this.document||this,i=Y.access(s,t)-1;i?Y.access(s,t,i):(s.removeEventListener(e,n,!0),Y.remove(s,t))}}}));var Ct=s.location,Tt={guid:Date.now()},Nt=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new s.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var Et=/\[\]$/,jt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,s){var i;if(Array.isArray(t))S.each(t,(function(t,i){n||Et.test(e)?s(e,i):Dt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,s)}));else if(n||"object"!==x(t))s(e,t);else for(i in t)Dt(e+"["+i+"]",t[i],n,s)}S.param=function(e,t){var n,s=[],i=function(e,t){var n=v(t)?t():t;s[s.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){i(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,i);return s.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&It.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(e){return{name:t.name,value:e.replace(jt,"\r\n")}})):{name:t.name,value:n.replace(jt,"\r\n")}})).get()}});var At=/%20/g,Pt=/#.*$/,Ht=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,Ot=/^\/\//,Rt={},Mt={},Bt="*/".concat("*"),Wt=_.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var s,i=0,r=t.toLowerCase().match(O)||[];if(v(n))for(;s=r[i++];)"+"===s[0]?(s=s.slice(1)||"*",(e[s]=e[s]||[]).unshift(n)):(e[s]=e[s]||[]).push(n)}}function Qt(e,t,n,s){var i={},r=e===Mt;function o(a){var u;return i[a]=!0,S.each(e[a]||[],(function(e,a){var l=a(t,n,s);return"string"!=typeof l||r||i[l]?r?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),u}return o(t.dataTypes[0])||!i["*"]&&o("*")}function $t(e,t){var n,s,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:s||(s={}))[n]=t[n]);return s&&S.extend(!0,e,s),e}Wt.href=Ct.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,r,o,a,u,l,d,c,h,p=S.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?S(f):S.event,g=S.Deferred(),v=S.Callbacks("once memory"),y=p.statusCode||{},w={},b={},x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=zt.exec(r);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(e,t){return null==l&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return n&&n.abort(t),C(0,t),this}};if(g.promise(k),p.url=((e||p.url||Ct.href)+"").replace(Ot,Ct.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(O)||[""],null==p.crossDomain){u=_.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Wt.protocol+"//"+Wt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),Qt(Rt,p,t,k),l)return k;for(c in(d=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!qt.test(p.type),i=p.url.replace(Pt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(At,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Nt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Ht,"$1"),h=(Nt.test(i)?"&":"?")+"_="+Tt.guid+++h),p.url=i+h),p.ifModified&&(S.lastModified[i]&&k.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&k.setRequestHeader("If-None-Match",S.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Bt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(c,p.headers[c]);if(p.beforeSend&&(!1===p.beforeSend.call(f,k,p)||l))return k.abort();if(x="abort",v.add(p.complete),k.done(p.success),k.fail(p.error),n=Qt(Mt,p,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,p]),l)return k;p.async&&p.timeout>0&&(a=s.setTimeout((function(){k.abort("timeout")}),p.timeout));try{l=!1,n.send(w,C)}catch(e){if(l)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,o,u){var c,h,_,w,b,x=t;l||(l=!0,a&&s.clearTimeout(a),n=void 0,r=u||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,o&&(w=function(e,t,n){for(var s,i,r,o,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===s&&(s=e.mimeType||t.getResponseHeader("Content-Type"));if(s)for(i in a)if(a[i]&&a[i].test(s)){u.unshift(i);break}if(u[0]in n)r=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){r=i;break}o||(o=i)}r=r||o}if(r)return r!==u[0]&&u.unshift(r),n[r]}(p,k,o)),!c&&S.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),w=function(e,t,n,s){var i,r,o,a,u,l={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(r=d.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!u&&s&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=r,r=d.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(o=l[u+" "+r]||l["* "+r]))for(i in l)if((a=i.split(" "))[1]===r&&(o=l[u+" "+a[0]]||l["* "+a[0]])){!0===o?o=l[i]:!0!==l[i]&&(r=a[0],d.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+r}}}return{state:"success",data:t}}(p,w,k,c),c?(p.ifModified&&((b=k.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=b),(b=k.getResponseHeader("etag"))&&(S.etag[i]=b)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=w.state,h=w.data,c=!(_=w.error))):(_=x,!e&&x||(x="error",e<0&&(e=0))),k.status=e,k.statusText=(t||x)+"",c?g.resolveWith(f,[h,x,k]):g.rejectWith(f,[k,x,_]),k.statusCode(y),y=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[k,p,c?h:_]),v.fireWith(f,[k,x]),d&&(m.trigger("ajaxComplete",[k,p]),--S.active||S.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,n,s,i){return v(n)&&(i=i||s,s=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:s},S.isPlainObject(e)&&e))}})),S.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){S(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new s.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=S.ajaxSettings.xhr();g.cors=!!Vt&&"withCredentials"in Vt,g.ajax=Vt=!!Vt,S.ajaxTransport((function(e){var t,n;if(g.cors||Vt&&!e.crossDomain)return{send:function(i,r){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ut[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&s.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(s,i){t=S("