!function(){var e={8283:function(e,t,n){"use strict";n.d(t,{O:function(){return s},h:function(){return i}});var s={maybeShowCDNActivationNotice:function(){wp_smush_msgs.smush_cdn_activation_notice&&WP_Smush.helpers.renderActivationCDNNotice(wp_smush_msgs.smush_cdn_activation_notice)},maybeShowCDNUpsellForPreSiteOnStart:function(){var e=document.querySelector(".wp-smush-upsell-cdn");e&&(e.querySelector("p").innerHTML=wp_smush_msgs.processing_cdn_for_free,e.classList.remove("sui-hidden"))},maybeShowCDNUpsellForPreSiteOnCompleted:function(){var e=document.querySelector(".wp-smush-upsell-cdn");e&&(e.querySelector("p").innerHTML=wp_smush_msgs.processed_cdn_for_free,e.classList.remove("sui-hidden"))}},i=function(){var e=document.querySelector.bind(document),t=e(".sui-summary-smush-metabox");if(!t)return{};var n=window.wp_smushit_data.bo_stats,i={count_images:0,count_total:0,count_resize:0,count_skipped:0,count_smushed:0,savings_bytes:0,savings_resize:0,size_after:0,size_before:0,savings_percent:0,percent_grade:"sui-grade-dismissed",percent_metric:0,percent_optimized:0,remaining_count:0,human_bytes:"",savings_conversion_human:"",savings_conversion:0},r=e("#smush-image-score"),o=e(".smush-final-log .smush-bulk-errors"),a=e("#wp-smush-bulk-content"),u={},c=function(e){window.wp_smushit_data=Object.assign(window.wp_smushit_data,e||{}),i=Object.keys(i).reduce((function(e,t){return t in window.wp_smushit_data&&(e[t]=window.wp_smushit_data[t]),e}),{})};return c(window.wp_smushit_data),{isChangedStats:function(e){return["total_items","processed_items","failed_items","is_cancelled","is_completed"].some((function(t){return e[t]!==n[t]}))},setBoStats:function(e){return n=Object.assign(n,e||{}),this},getBoStats:function(){return n},setGlobalStats:function(e){return i=Object.assign(i,e||{}),this},getGlobalStats:function(){return i},renderScoreProgress:function(){r.className=r.className.replace(/(^|\s)sui-grade-\S+/g,""),r.classList.add(i.percent_grade),r.dataset.score=i.percent_optimized,r.querySelector(".sui-circle-score-label").innerHTML=i.percent_optimized,r.querySelector("circle:last-child").setAttribute("style","--metric-array:"+2.63893782902*i.percent_metric+" "+(263.893782902-i.percent_metric))},renderSummaryDetail:function(){this.renderTotalStats(),this.renderResizedStats(),this.renderConversionSavings()},renderTotalStats:function(){t.querySelector(".sui-summary-large.wp-smush-stats-human").innerHTML=i.human_bytes,t.querySelector(".wp-smush-savings .wp-smush-stats-percent").innerHTML=i.savings_percent,t.querySelector(".wp-smush-count-total .wp-smush-total-optimised").innerHTML=i.count_images},renderResizedStats:function(){var e=t.querySelector(".wp-smush-count-resize-total");e&&(i.count_resize>0?e.classList.remove("sui-hidden"):e.classList.add("sui-hidden"),e.querySelector(".wp-smush-total-optimised").innerHTML=i.count_resize)},renderConversionSavings:function(){var e=t.querySelector(".smush-conversion-savings .wp-smush-stats");e&&(e.innerHTML=i.savings_conversion_human,i.savings_conversion>0?e.parentElement.classList.remove("sui-hidden"):e.parentElement.classList.add("sui-hidden"))},renderBoxSummary:function(){this.renderScoreProgress(),this.renderSummaryDetail()},setErrors:function(e){u=e||{}},getErrors:function(){return u},renderErrors:function(){if(Object.keys(u).length&&n.is_completed){var t=[],i=Object.keys(u),r=!1;i.map((function(e,n){var s=u[e].error_code;n<5&&"animated"===s&&(r=!0),t.push(WP_Smush.helpers.prepareBulkSmushErrorRow(u[e].error_message,u[e].file_name,u[e].thumbnail,e,"media",u[e].error_code))})),o.innerHTML=t.join(""),o.parentElement.classList.remove("sui-hidden"),o.parentElement.style.display=null,i.length>1&&e(".smush-bulk-errors-actions").classList.remove("sui-hidden"),r&&s.maybeShowCDNActivationNotice()}},resetAndHideBulkErrors:function(){o&&(this.resetErrors(),o.parentElement.classList.add("sui-hidden"),o.innerHTML="")},resetErrors:function(){u={}},renderStats:function(){this.renderBoxSummary(),this.renderErrors()},maybeUpdateBulkSmushCountContent:function(e){e&&a&&(a.innerHTML=e)},updateGlobalStatsFromSmushScriptData:function(e){return this.maybeUpdateBulkSmushCountContent(null==e?void 0:e.content),c(e),this}}}()},6033:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return c}});var s=n(4218),i=n(5565),r=n(8283);function o(e){return o="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},o(e)}function a(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];return this.onStart(),s.Z.scanMediaLibrary.start(t).then((function(t){null!=t&&t.success?e.showProgressBar().autoSyncStatus():e.onStartFailure(t)}))}},{key:"onStart",value:function(){}},{key:"onStartFailure",value:function(e){WP_Smush.helpers.showNotice(e,{showdismiss:!0,autoclose:!1})}},{key:"showProgressBar",value:function(){return this.onShowProgressBar(),this.scanProgress.reset().setOnCancelCallback(this.showStopScanningModal.bind(this)).open(),this}},{key:"onShowProgressBar",value:function(){}},{key:"showStopScanningModal",value:function(){window.SUI&&(this.onShowStopScanningModal(),window.SUI.openModal("smush-stop-scanning-dialog","wpbody-content",void 0,!1))}},{key:"onShowStopScanningModal",value:function(){this.registerCancelProcessEvent()}},{key:"registerCancelProcessEvent",value:function(){var e=document.querySelector(".smush-stop-scanning-dialog-button");e&&e.addEventListener("click",this.cancelProgress.bind(this))}},{key:"closeStopScanningModal",value:function(){if(window.SUI){var e=document.querySelector("#smush-stop-scanning-dialog");!e||!e.classList.contains("sui-content-fade-in")||window.SUI.closeModal("smush-stop-scanning-dialog")}}},{key:"closeProgressBar",value:function(){this.onCloseProgressBar(),this.scanProgress.close()}},{key:"onCloseProgressBar",value:function(){}},{key:"updateProgress",value:function(e){var t=this.getTotalItems(e),n=this.getProcessedItems(e);return this.scanProgress.update(n,t)}},{key:"getProcessedItems",value:function(e){return(null==e?void 0:e.processed_items)||0}},{key:"getTotalItems",value:function(e){return(null==e?void 0:e.total_items)||0}},{key:"cancelProgress",value:function(){var e=this;return this.scanProgress.setCancelButtonOnCancelling(),s.Z.scanMediaLibrary.cancel().then((function(t){null!=t&&t.success?e.onCancelled(t.data):e.onCancelFailure(t)}))}},{key:"onCancelFailure",value:function(e){WP_Smush.helpers.showNotice(e,{showdismiss:!0,autoclose:!1}),this.scanProgress.resetCancelButtonOnFailure()}},{key:"getErrorProgressMessage",value:function(){return u("Unfortunately the scan hit an error due to limited resources on your site, we have adjusted the scan to use fewer resources the next time.","wp-smushit")}},{key:"onDead",value:function(e){this.clearProgressTimeout(),this.closeProgressBar(),this.closeStopScanningModal(),this.showRetryScanModal()}},{key:"showRetryScanModal",value:function(){var e=document.getElementById("smush-retry-scan-notice");window.SUI&&e&&(e.querySelector(".smush-retry-scan-notice-button").onclick=function(e){window.SUI.closeModal("smush-retry-scan-notice");var t=document.querySelector(".wp-smush-scan");t&&(e.preventDefault(),t.click())},window.SUI.openModal("smush-retry-scan-notice","wpbody-content",void 0,!1))}},{key:"onCompleted",value:function(e){this.onFinish(e)}},{key:"onCancelled",value:function(e){this.onFinish(e)}},{key:"onFinish",value:function(e){this.clearProgressTimeout();var t=null==e?void 0:e.global_stats;this.updateGlobalStatsAndBulkContent(t),this.closeProgressBar(),this.closeStopScanningModal()}},{key:"clearProgressTimeout",value:function(){this.progressTimeoutId&&clearTimeout(this.progressTimeoutId)}},{key:"updateGlobalStatsAndBulkContent",value:function(e){e&&(r.h.updateGlobalStatsFromSmushScriptData(e),r.h.renderStats())}},{key:"getStatus",value:function(){return s.Z.scanMediaLibrary.getScanStatus()}},{key:"autoSyncStatus",value:function(){var e=this,t=(new Date).getTime();this.getStatus().then((function(n){if(null!=n&&n.success){var s=n.data;s.is_dead?e.onDead(n.data):(e.beforeUpdateStatus(s),e.updateProgress(s).then((function(){e.scanProgress.increaseDurationToHaveChangeOnProgress((new Date).getTime()-t),(null==s?void 0:s.is_completed)?e.onCompleted(s):(null==s?void 0:s.is_cancelled)?e.onCancelled(s):e.progressTimeoutId=setTimeout((function(){return e.autoSyncStatus()}),e.autoSyncDuration)})))}}))}},{key:"beforeUpdateStatus",value:function(){}},{key:"setInnerText",value:function(e,t){e&&(e.dataset.originalText=e.dataset.originalText||e.innerText.trim(),e.innerText=t)}},{key:"revertInnerText",value:function(e){e&&e.dataset.originalText&&(e.innerText=e.dataset.originalText.trim())}},{key:"hideAnElement",value:function(e){e&&e.classList.add("sui-hidden")}},{key:"showAnElement",value:function(e){e&&e.classList.remove("sui-hidden")}}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}()},5565:function(e,t,n){"use strict";n.d(t,{I:function(){return s}});var s=function(e){var t,n=wp.i18n,s=n.__,i=n._n,r=document.querySelector(".wp-smush-scan-progress-bar-wrapper"),o=r.querySelector(".wp-smush-progress-percent"),a=r.querySelector(".wp-smush-progress-inner"),u=r.querySelector(".wp-smush-remaining-time"),c=r.querySelector(".wp-smush-cancel-scan-progress-btn"),l=r.querySelector(".wp-smush-scan-hold-on-notice"),d=function(){},h=0,p=e-300;r.style.setProperty("--progress-transition-duration",p/1e3+"s");var f=(null===(t=window.wp_smushit_data)||void 0===t||null===(t=t.media_library_scan)||void 0===t?void 0:t.processed_items)||0,m=[],_=e,g=10*e;return{update:function(e,t){this.updateRemainingTime(e,t);var n=t&&Math.floor(e/t*100)||0;n=Math.min(n,100);var s=a.style.width;return s=s&&s.replace("%","")||0,a.style.width=n+"%",this.animateProgressBar(s,n)},animateProgressBar:function(e,t){return h&&clearInterval(h),new Promise((function(n){h=setInterval((function(){o.innerHTML=e+"%",++e>t&&(n(),clearInterval(h))}),p/(t-e))}))},updateRemainingTime:function(e,t){if(u){var n=(this.calcProcessTimePerItem(e)||500)*(t-e);u.innerText=this.formatTime(n)}},calcProcessTimePerItem:function(t){if(t){if((f=f<=t?f:0)!=t){var n=Math.floor(_/(t-f));f=t,m.push(n),this.resetDurationToHaveChangeOnProgress()}else this.increaseDurationToHaveChangeOnProgress(e);if(m.length)return m.reduce((function(e,t){return e+t}),0)/m.length}},increaseDurationToHaveChangeOnProgress:function(e){(_+=e)>g&&this.showHoldOnNotice()},showHoldOnNotice:function(){l.classList.remove("sui-hidden"),g=1e8},resetHoldOnNoticeVisibility:function(){l.classList.add("sui-hidden")},resetDurationToHaveChangeOnProgress:function(){_=e},formatTime:function(e){var t=Math.floor((e+p)/1e3),n=t%60,s=Math.floor(t/60),r="";return s&&(r+=s+" "+i("minute","minutes",s,"wp-smushit")),(r+=" "+n+" "+i("second","seconds",n,"wp-smushit")).trim()},reset:function(){return a.style.width="0%",o.innerHTML="0%",this.resetCancelButton(),this.resetHoldOnNoticeVisibility(),this},open:function(){c.onclick=d,r.classList.remove("sui-hidden")},close:function(){r.classList.add("sui-hidden"),this.reset()},setOnCancelCallback:function(e){if("function"==typeof e)return d=e,this},setCancelButtonLabel:function(e){return c.textContent=e,this},setCancelButtonOnCancelling:function(){this.setCancelButtonLabel(wp_smush_msgs.cancelling),this.setOnCancelCallback((function(){return!1})),c.setAttribute("disabled",!0)},resetCancelButton:function(){this.setOnCancelCallback((function(){})),this.resetCancelButtonLabel(),c.removeAttribute("disabled")},resetCancelButtonLabel:function(){this.setCancelButtonLabel(s("Cancel Scan","wp-smushit"))},resetCancelButtonOnFailure:function(){this.resetCancelButtonLabel(),c.removeAttribute("disabled")}}};t.Z=new function(){var e=document.querySelector(".wp-smush-bulk-progress-bar-wrapper");if(!e)return{isEmptyObject:!0};var t=e.querySelector(".wp-smush-cancel-btn"),n=document.querySelector(".wp-smush-bulk-wrapper"),s=e.querySelector("#wp-smush-running-notice"),i=document.querySelector(".wp-smush-all-done"),r=!1,o=function(){};return{update:function(t,n){var s=n&&Math.floor(t/n*100)||0;s=Math.min(s,100),e.querySelector(".wp-smush-images-percent").innerHTML=s+"%",e.querySelector(".wp-smush-progress-inner").style.width=s+"%";var i=e.querySelector(".sui-progress-state-text");return i.firstElementChild.innerHTML=t,i.lastElementChild.innerHTML=n,this},close:function(){return e.classList.add("sui-hidden"),this.setCancelButtonLabel(window.wp_smush_msgs.cancel).setOnCancelCallback((function(){})).update(0,0),this.resetOriginalNotice(),this},show:function(){t.onclick=o,e.classList.remove("sui-hidden"),this.hideBulkSmushDescription(),this.hideBulkSmushAllDone(),this.hideRecheckImagesNotice()},setCancelButtonLabel:function(e){return t.textContent=e,this},showBulkSmushDescription:function(){n.classList.remove("sui-hidden")},hideBulkSmushDescription:function(){n.classList.add("sui-hidden")},showBulkSmushAllDone:function(){i.classList.remove("sui-hidden")},hideBulkSmushAllDone:function(){i.classList.add("sui-hidden")},hideState:function(){return r||(r=!0,e.querySelector(".sui-progress-state").classList.add("sui-hidden")),this},showState:function(){return r?(r=!1,e.querySelector(".sui-progress-state").classList.remove("sui-hidden"),this):this},setNotice:function(e){var t=s.querySelector(".sui-notice-message p");return this.cacheOriginalNotice(t),t.innerHTML=e,this},cacheOriginalNotice:function(e){s.dataset.progressMessage||(s.dataset.progressMessage=e.innerHTML)},resetOriginalNotice:function(){s.dataset.progressMessage&&(s.querySelector(".sui-notice-message p").innerHTML=s.dataset.progressMessage)},hideBulkProcessingNotice:function(){return s.classList.add("sui-hidden"),this},showBulkProcessingNotice:function(){return s.classList.remove("sui-hidden"),this},setCountUnitText:function(t){e.querySelector(".sui-progress-state-unit").innerHTML=t},setOnCancelCallback:function(e){if("function"==typeof e)return o=e,this},disableExceedLimitMode:function(){e.classList.remove("wp-smush-exceed-limit"),e.querySelector("#bulk-smush-resume-button").classList.add("sui-hidden")},hideRecheckImagesNotice:function(){var e=document.querySelector(".wp-smush-recheck-images-notice-box");e&&e.classList.add("sui-hidden")}}}},9576:function(e,t,n){"use strict";var s=n(8891),i=n.n(s);function r(e){return r="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},r(e)}function o(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};wp_smush_mixpanel.debug&&console.log("Event:",e,t),this.mixpanelInstance&&this.mixpanelInstance.track(e,t)}},{key:"trackBulkSmushCompleted",value:function(e){var t=e.savings_bytes,n=e.count_images,s=e.percent_optimized,i=e.savings_percent,r=e.count_resize,o=e.savings_resize;this.track("Bulk Smush Completed",{"Total Savings":this.convertToMegabytes(t),"Total Images":n,"Media Optimization Percentage":parseFloat(s),"Percentage of Savings":parseFloat(i),"Images Resized":r,"Resize Savings":this.convertToMegabytes(o)})}},{key:"trackBulkSmushCancel",value:function(){this.track("Bulk Smush Cancelled")}},{key:"convertToMegabytes",value:function(e){var t=e/Math.pow(1024,2);return t&&parseFloat(t.toFixed(2))||0}}],n&&o(t.prototype,n),s&&o(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Z={getInstance:function(){return a||(a=new u),a}}},9478:function(){jQuery((function(e){"use strict";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()?"-":"+")}))}))},6111:function(e,t,n){"use strict";n.r(t);var s=n(9446),i=n(8283),r=n(5565),o=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(t.preventDefault(),!n.attr("disabled")){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);var u=n.html();n.html(''+wp_smush_msgs[r]+" "),e.post(ajaxurl,a,(function(e){if(function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").prop("disabled",!1)}(n),e.success&&void 0!==e.data){if(void 0!==this.data&&this.data.indexOf("nextgen")>-1)n.parents().eq(1).html(e.data.stats);else if("restore"===r)n.parents().eq(1).html(e.data.stats);else{var t=n.parents().eq(1);wp_smush_msgs.failed_item_smushed&&t.hasClass("smush-failed-processing")?(t.html(''+wp_smush_msgs.failed_item_smushed+"
"),setTimeout((function(){t.html(e.data)}),2e3)):t.html(e.data)}void 0!==e.data&&"restore"===r&&s.Z.updateImageStats(e.data.new_size)}else e.data&&e.data.error_msg&&(-1===this.data.indexOf("nextgen")?n.closest(".smushit").find(".smush-status").addClass("smush-warning").html(e.data.error_msg):n.parent().append(e.data.error_msg),n.attr("disabled",!0),n.html(u))}))}},n=function(e){if(e.notice){var t="success";void 0!==e.noticeType&&(t=e.noticeType),window.SUI.openNotice("wp-smush-ajax-notice",""+e.notice+"
",{type:t,icon:"check-tick"})}},a=function(e){r.Z.isEmptyObject||(r.Z.update(0,e.remaining_count),e.remaining_count<1?(r.Z.hideBulkSmushDescription(),r.Z.showBulkSmushAllDone()):(r.Z.showBulkSmushDescription(),r.Z.hideBulkSmushAllDone()))},u=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(".sui-mobile-nav").on("change",(function(t){window.location.assign(e(t.currentTarget).val())})),e("#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",".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"),_ajax_nonce:n.attr("data-nonce")}).done((function(e){e.success&&void 0!==e.data.html&&n.parent().parent().html(e.data.html)}))})),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(),e(this).hasClass("wp-smush-background-scan")||function(t){var s=e(".wp-smush-scan");s.addClass("sui-button-onload");var r=s.data("type");r=void 0===r?"media":r,e(".wp-smush-all").removeAttr("data-smush"),e(".wp-smush-all").prop("disabled",!0),e(".wp-smush-settings-changed").hide();var o={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,o,(function(e){if(null!=e&&e.success){var t=e.data;n(t),i.h.updateGlobalStatsFromSmushScriptData(t),i.h.renderStats(),a(t)}else WP_Smush.helpers.showNotice(e,{showdismiss:!0,autoclose:!1})})).always((function(){jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),s.removeClass("sui-button-onload").addClass("smush-button-check-success");var t=s.find(".wp-smush-default-text"),n=s.find(".wp-smush-completed-text");t.addClass("sui-hidden-important"),n.removeClass("sui-hidden"),setTimeout((function(){s.removeClass("smush-button-check-success"),t.removeClass("sui-hidden-important"),n.addClass("sui-hidden")}),2e3),e(".wp-smush-all").prop("disabled",!1)}))}(!1)})),e("body").on("click",".wp-smush-notice .icon-fi-close",(function(t){t.preventDefault();var n=e(this).parent();o(n)})),e("body").on("click",".wp-smush-skip-resmush",(function(t){t.preventDefault();var n=jQuery(this),i=n.parents().eq(1),r=n.parent();o(r),i.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").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 c=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(c.length<1)){c.css("width",u+"%"),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden");var l={action:"delete_resmush_list",type:a};e.post(ajaxurl,l,(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),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(),u("#column-lossy")})),e(".wp-smush-resize-enable").on("click",(function(e){e.preventDefault(),u("#column-resize")})),window.location.hash){var c="";switch(window.location.hash.substring(1)){case"enable-resize":c="#column-resize";break;case"backup-label":c="#backup";break;case"original-label":c="#original";break;case"enable-lossy":c="#column-lossy"}""!==c&&(u(c),document.getElementById(c.replace("#","")).focus())}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").trigger("click"):e(".wp-smush-all").trigger("click"),e("span.sui-notice-dismiss").trigger("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").on("focus",(function(){e(this).keypress((function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").trigger("click"))}))})),e("body").on("blur",".wp-smush-resize-input",(function(){!function(e,t,n){var s=e.find("#resize");if(!n)var i=e.find("#wp-smush-resize_width"),r=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var o=e.find("#wp-smush-resize_height"),a=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,c=!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"),c=!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","#resize",(function(){var t=e(this),n=e("#smush-resize-settings-wrap");t.is(":checked")?n.show():n.hide()})),e("#wp-smush-revalidate-member").on("click",(function(t){t.preventDefault();var n={action:"smush_show_warning",_ajax_nonce:window.wp_smush_msgs.nonce},s=e(this).parents().eq(1);s.addClass("loading-notice"),e.get(ajaxurl,n,(function(e){s.removeClass("loading-notice").addClass("loaded-notice"),0==e?(s.attr("data-message",wp_smush_msgs.membership_valid),o(s,1e3)):(s.attr("data-message",wp_smush_msgs.membership_invalid),setTimeout((function(){s.removeClass("loaded-notice")}),1e3))}))})),e("li.smush-dir-savings").length>0){var l={action:"get_dir_smush_stats",_ajax_nonce:window.wp_smush_msgs.nonce};e.get(ajaxurl,l,(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.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+"%"))):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("#smush-updated-dialog").length&&window.SUI.openModal("smush-updated-dialog","wpbody-content",void 0,!1),e("input#original").on("change",(function(){e("#backup-notice").toggleClass("sui-hidden",e(this).is(":checked"))}));!function(){var e=document.querySelector(".wp-smush-compression-type");if(e){var t=e.querySelector(".wp-smush-compression-type_note p");t&&e.querySelector(".wp-smush-compression-type_slider").addEventListener("change",(function(e){var n,s;if("INPUT"===(null==e||null===(n=e.target)||void 0===n?void 0:n.nodeName)){var i=null===(s=e.target.dataset)||void 0===s?void 0:s.note;i&&(t.innerHTML=i.trim())}}))}}(),e(".wp-smush-modal-link-close").on("click",(function(t){t.preventDefault(),SUI.closeModal();var n=e(this).attr("href"),s="_blank"===e(this).attr("target");n&&(s?window.open(n,"_blank"):window.location.href=n)}));document.addEventListener("onSavedSmushSettings",(function(e){var t;null!=e&&null!==(t=e.detail)&&void 0!==t&&t.is_outdated_stats&&function(){var e=document.querySelector(".wp-smush-current-compression-level"),t=document.querySelector(".wp-smush-lossy-level-tabs button.active");if(e&&t){e.innerText=t.innerText.trim();var n=e.nextElementSibling;n&&(t.id.includes("ultra")?n.classList.add("sui-hidden"):n.classList.remove("sui-hidden"))}}()}))}))},9867:function(e,t,n){"use strict";n.r(t);var s=n(4218),i=n(9576),r=n(5565),o=n(8283),a=["global_stats","errors"];function u(e,t){if(null==e)return{};var n,s,i=function(e,t){if(null==e)return{};var n,s,i={},r=Object.keys(e);for(s=0;s=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}!function(){if(window.wp_smush_msgs){var e=document.querySelector.bind(document),t=function(){return{handle:function(e){return s.Z.background[e]()},initState:function(){return s.Z.background.initState()}}},n=function(){var n=window.wp_smushit_data&&window.wp_smushit_data.bo_stats&&e(".wp-smush-bo-start");if(n){var s=i.Z.getInstance(),c=new t,l=e(".bulk-smush-wrapper"),d=e(".wp-smush-scan"),h=0,p=!1;return{hookStatusChecks:function(){var e=this;if(!h){var t=0,n=!1,s=!1;h=setInterval((function(){if(!n){n=!0,t++;var i=e.syncBackgroundStatus();t%3==0&&i.then((function(){s||(e.syncStats().then((function(){s=!1})),s=!0)})),i.finally((function(){n=!1}))}}),3e3)}},resetBOStatsOnStart:function(){o.h.setBoStats({is_cancelled:!1,is_completed:!1,processed_items:0,failed_items:0})},start:function(){var e=this;this.resetBOStatsOnStart(),this.onStart(),c.handle("start").then((function(t){if(t.success){var n=e.updateStats(t.data,!1);e.showProgressBar(),e.hookStatusChecks(),n&&o.h.renderStats()}else WP_Smush.helpers.showNotice(t,{showdismiss:!0,autoclose:!1}),e.cancelBulk()}))},initState:function(){var e=this;o.h.getBoStats().in_processing&&(this.onStart(),c.initState().then((function(t){t.success?(e.updateStats(t.data,!1),e.showProgressBar(),e.hookStatusChecks(),t.data.errors&&!Object.keys(o.h.getErrors()).length&&o.h.setErrors(t.data.errors),o.h.renderStats()):WP_Smush.helpers.showNotice(t)})))},cancel:function(){var e=this;p=!0,this.setCancelButtonStateToStarted(),c.handle("cancel").then((function(t){t.success?e.cancelBulk():WP_Smush.helpers.showNotice(t)}))},hideProgressBar:function(){r.Z.close().update(0,o.h.getBoStats().total_items)},showProgressBar:function(){r.Z.update(o.h.getBoStats().processed_items,o.h.getBoStats().total_items),r.Z.show()},updateStats:function(e,t){e.global_stats=e.global_stats||{},e.errors=e.errors||{};var n=e.global_stats,s=e.errors,i=u(e,a);return!!o.h.isChangedStats(i)&&(o.h.setBoStats(i),t&&o.h.setGlobalStats(n),o.h.setErrors(s),!0)},cancelBulk:function(){var e=this;this.syncStats((function(){100===o.h.getGlobalStats().percent_optimized?(o.h.setBoStats({is_completed:!0}),e.onCompletedBulk()):(o.h.setBoStats({is_cancelled:!0}),e.onFinish(),r.Z.showBulkSmushDescription()),s.trackBulkSmushCancel(),p=!1}))},showCompletedMessage:function(){var e=l.querySelector(".wp-smush-all-done");if(o.h.getBoStats().failed_items){var t=wp_smush_msgs.all_failed;this.isFailedAllItems()||(t=wp_smush_msgs.error_in_bulk.replace("{{smushed}}",o.h.getBoStats().total_items-o.h.getBoStats().failed_items).replace("{{total}}",o.h.getBoStats().total_items).replace("{{errors}}",o.h.getBoStats().failed_items)),e.querySelector("p").innerHTML=t,e.classList.remove("sui-notice-success","sui-notice-warning");var n=this.getNoticeType(),s="warning"===n?"info":"check-tick",i=e.querySelector(".sui-notice-icon");e.classList.add("sui-notice-"+n),i.classList.remove("sui-icon-check-tick","sui-icon-info"),i.classList.add("sui-icon-"+s)}else e.querySelector("p").innerHTML=wp_smush_msgs.all_smushed;e.classList.remove("sui-hidden")},isFailedAllItems:function(){return o.h.getBoStats().failed_items===o.h.getBoStats().total_items},getNoticeType:function(){return this.isFailedAllItems()?"warning":"success"},onCompletedBulk:function(){this.onFinish(),r.Z.hideBulkSmushDescription(),this.showCompletedMessage(),r.Z.update(0,o.h.getBoStats().total_items)},completeBulk:function(){var e=this;this.syncStats((function(){return e.onCompletedBulk()}))},syncStats:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1};return c.handle("getStats").then((function(s){if(s.success){var i=s.data.errors||{};t.updateStats({global_stats:s.data,errors:i},!0),o.h.renderStats(),s.data.content&&(e("#wp-smush-bulk-content").innerHTML=s.data.content),n()}else WP_Smush.helpers.showNotice(s)})).catch((function(e){return console.log("error",e)}))},syncBackgroundStatus:function(){var e=this;return c.handle("getStatus").then((function(t){(t.data||{}).in_process_notice&&r.Z.setNotice(t.data.in_process_notice),t.success?(e.updateStats(t.data,!1)&&(r.Z.update(o.h.getBoStats().processed_items,o.h.getBoStats().total_items),o.h.getBoStats().is_cancelled||o.h.getBoStats().is_completed||o.h.renderStats()),o.h.getBoStats().is_cancelled&&!p?e.cancelBulk():o.h.getBoStats().is_completed&&e.completeBulk()):WP_Smush.helpers.showNotice(t)}))},onStart:function(){n.setAttribute("disabled",""),d&&d.setAttribute("disabled",""),e(".wp-smush-restore").setAttribute("disabled",""),o.O.maybeShowCDNUpsellForPreSiteOnStart(),this.setCancelButtonStateToInitial()},onFinish:function(){h&&(clearInterval(h),h=0),n.removeAttribute("disabled"),this.hideProgressBar(),d&&d.removeAttribute("disabled",""),e(".wp-smush-restore").removeAttribute("disabled",""),o.O.maybeShowCDNUpsellForPreSiteOnCompleted()},init:function(){var e=this;n&&(n.onclick=function(){n.classList.contains("wp-smush-scan-and-bulk-smush")||e.start()},this.initState())},setCancelButtonStateToInitial:function(){r.Z.setCancelButtonLabel(wp_smush_msgs.cancel),r.Z.setOnCancelCallback(this.cancel.bind(this))},setCancelButtonStateToStarted:function(){r.Z.setCancelButtonLabel(wp_smush_msgs.cancelling),r.Z.setOnCancelCallback((function(){return!1}))}}}}();n&&n.init(),document.addEventListener("wpSmushAfterRecheckImages",(function(){o.h.updateGlobalStatsFromSmushScriptData()})),document.addEventListener("backgroundBulkSmushOnScanCompleted",(function(){n&&(o.h.setBoStats({in_processing:!0}),n.initState())}))}}()},7447:function(e,t,n){"use strict";n.r(t);var s=n(9576);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.mixPanel=s.Z.getInstance(),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(),t.mixPanel.track("Bulk Restore Triggered")}))},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)}}))},7413:function(e,t,n){"use strict";n.r(t);var s,i=n(9446),r=n(4218),o=n(5565);s=jQuery,WP_Smush.bulk={init:function(){this.onClickBulkSmushNow(),this.onClickIgnoreImage(),this.onClickIgnoreAllImages(),this.onScanCompleted()},onClickBulkSmushNow:function(){s(".wp-smush-all").on("click",(function(e){var t=s(this);t.hasClass("wp-smush-scan-and-bulk-smush")||(e.preventDefault(),WP_Smush.bulk.ajaxBulkSmushStart(t))}))},ajaxBulkSmushStart:function(e){var t=this;if(e=e||s("#wp-smush-bulk-content .wp-smush-all"),void 0===window.wp_smushit_data||0===window.wp_smushit_data.unsmushed.length&&0===window.wp_smushit_data.resmush.length)return!1;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#save-settings-button").prop("disabled",!0),e.hasClass("wp-smush-resume-bulk-smush")&&this.bulkSmush?this.resumeBulkSmush():(this.bulkSmush=new i.Z(e,!0),o.Z.setOnCancelCallback((function(){t.bulkSmush.cancelAjax()})).update(0,this.bulkSmush.ids.length).show(),this.maybeShowCDNUpsellForPreSiteOnStart(),this.bulkSmush.run())},resumeBulkSmush:function(){o.Z.disableExceedLimitMode(),o.Z.hideBulkSmushDescription(),this.bulkSmush.onStart(),this.bulkSmush.callAjax()},onClickIgnoreImage:function(){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"),_ajax_nonce:wp_smush_msgs.nonce}).done((function(n){t.is("a")&&n.success&&void 0!==n.data.html&&(t.closest(".smush-status-links")?t.closest(".smush-status-links").parent().html(n.data.html):e.target.closest(".smush-bulk-error-row")&&(t.addClass("disabled"),e.target.closest(".smush-bulk-error-row").style.opacity=.5))}))}))},onClickIgnoreAllImages:function(){var e=document.querySelector(".wp_smush_ignore_all_failed_items");e&&(e.onclick=function(e){e.preventDefault(),e.target.setAttribute("disabled",""),e.target.style.cursor="progress";var t=e.target.dataset.type||null;e.target.classList.remove("sui-tooltip"),r.Z.smush.ignoreAll(t).then((function(t){t.success?window.location.reload():(e.target.style.cursor="pointer",e.target.removeAttribute("disabled"),WP_Smush.helpers.showNotice(t))}))})},onScanCompleted:function(){var e=this;document.addEventListener("ajaxBulkSmushOnScanCompleted",(function(t){e.ajaxBulkSmushStart()}))},maybeShowCDNUpsellForPreSiteOnStart:function(){var e=document.querySelector(".wp-smush-upsell-cdn");e&&e.classList.remove("sui-hidden")}},WP_Smush.bulk.init()},2140:function(e,t,n){"use strict";n.r(t);var s,i=n(1414),r=function(e,t){e=parseInt(e),t=parseInt(t);var n=!1,s=0,i=0,r={scan:function(){var n=this,s=e-t;0!==t?o(s).fail(this.showScanError):jQuery.post(ajaxurl,{action:"directory_smush_start",_ajax_nonce:window.wp_smush_msgs.nonce},(function(){return o(s).fail(n.showScanError)})).fail(this.showScanError)},cancel:function(){return n=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel",_ajax_nonce:window.wp_smush_msgs.nonce})},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"},showScanError:function(e){var t=jQuery("#wp-smush-progress-dialog");t.removeClass("wp-smush-exceed-limit").addClass("wp-smush-scan-error"),t.find("#smush-scan-error").text("".concat(e.status," ").concat(e.statusText));var n=t.find(".smush-403-error-message");403!==e.status?n.addClass("sui-hidden"):n.removeClass("sui-hidden")},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-box-body .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-box-body .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){return o>=0?(t=e-o,jQuery.post(ajaxurl,{action:"directory_smush_check_step",_ajax_nonce:window.wp_smush_msgs.nonce,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).fail(r.showScanError)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?r.limitReached():(s++,t++,o-=1,r.onFinishStep(r.getProgress()),n(o).fail(r.showScanError))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",_ajax_nonce:window.wp_smush_msgs.nonce,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:[],triggered:!1,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#smush-directory-open-modal").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){t.preventDefault(),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");var n=s(this);n.addClass("sui-button-onload");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){t.success?(window.SUI.closeModal(),e.scanner=new r(t.data,0),e.showProgressDialog(t.data),e.scanner.scan()):(n.removeClass("sui-button-onload"),window.SUI.openNotice("wp-smush-ajax-notice",t.data.message,{type:"warning"}))}))})),t.on("click","#cancel-directory-smush, #dialog-close-div, .wp-smush-cancel-dir",(function(t){t.preventDefault(),s(".wp-smush-cancel-dir").addClass("sui-button-onload"),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()}));var o=window.location.search;new URLSearchParams(o).has("start")&&!this.triggered&&(this.triggered=!0,s("button.wp-smush-browse").trigger("click"))},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(e,t){t.result=new Promise((function(e,i){n.data.dir=t.node.key,s.ajax(n).done((function(t){return e(t)})).fail(i)}))},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()},3065:function(){function e(t){return e="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(t)}!function(){"use strict";WP_Smush.helpers={init:function(){},cacheUpsellErrorCodes:[],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)},prepareBulkSmushErrorRow:function(e,t,n,s,i,r){var o=n&&void 0!==n?' '):' ',a=window.wp_smush_msgs.edit_link.replace("{{id}}",s);t="undefined"===t||void 0===t?"undefined":t;var u='\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t').concat(o,'\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t').concat(t,' \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t').concat(e,"\n\t\t\t\t\t
\n\t\t\t\t
");return"media"===i&&(u+='
")),u+="
",u+=WP_Smush.helpers.upsellWithError(r)},cacheUpsellErrorCode:function(e){this.cacheUpsellErrorCodes.push(e)},upsellWithError:function(e){return e&&window.wp_smush_msgs["error_"+e]&&!this.isUpsellRendered(e)?(this.cacheRenderedUpsell(e),''+window.wp_smush_msgs["error_"+e]+"
"):""},isUpsellRendered:function(e){return this.cacheUpsellErrorCodes.includes(e)},cacheRenderedUpsell:function(e){this.cacheUpsellErrorCodes.push(e)},getErrorMessage:function(e){return e.message||e.data&&e.data.message||e.responseJSON&&e.responseJSON.data&&e.responseJSON.data.message||window.wp_smush_msgs.generic_ajax_error||e.status&&"Request failed. Returned status of "+e.status},showNotice:function(t,n){var s;if(s="object"===e(t)?this.getErrorMessage(t):t){n=n||{},n={type:(n=Object.assign({showdismiss:!1,autoclose:!0},n)).type||"error",icon:n.icon||("success"===n.type?"check-tick":"info"),dismiss:{show:n.showdismiss,label:window.wp_smush_msgs.noticeDismiss,tooltip:window.wp_smush_msgs.noticeDismissTooltip},autoclose:{show:n.autoclose}};var i="".concat(s,"
");return SUI.openNotice("wp-smush-ajax-notice",i,n),Promise.resolve("#wp-smush-ajax-notice")}},closeNotice:function(){window.SUI.closeNotice("wp-smush-ajax-notice")},renderActivationCDNNotice:function(e){if(!document.getElementById("wp-smush-animated-upsell-notice")){var t='\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
'.concat(e,"
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
");document.querySelector("#smush-box-bulk .wp-smush-bulk-wrapper").outerHTML+=t}}},WP_Smush.helpers.init()}()},5445:function(e,t,n){"use strict";n.r(t);var s=n(5565),i=n(6033),r=n(8283);function o(e){return o="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},o(e)}function a(e,t){for(var n=0;n"+e.notice+"
",{type:t,icon:"check-tick"})}}},{key:"showRecheckNoticeSuccess",value:function(){var t=e(".wp-smush-recheck-images-notice-box");t&&(this.showAnElement(t),this.hideAnElement(t.querySelector(".wp-smush-recheck-images-notice-warning")),this.showAnElement(t.querySelector(".wp-smush-recheck-images-notice-success")))}},{key:"showRecheckNoticeWarning",value:function(){var t=e(".wp-smush-recheck-images-notice-box");t&&(this.showAnElement(t),this.hideAnElement(t.querySelector(".wp-smush-recheck-images-notice-success")),this.showAnElement(t.querySelector(".wp-smush-recheck-images-notice-warning")))}},{key:"hideRecheckNotice",value:function(){this.hideAnElement(e(".wp-smush-recheck-images-notice-box"))}},{key:"showProgressErrorNoticeOnRecheckNotice",value:function(){var t=e(".wp-smush-recheck-images-notice-box .wp-smush-recheck-images-notice-warning");t&&(t.classList.add("sui-notice-error"),t.classList.remove("sui-notice-warning"),this.setInnerText(t.querySelector("span"),this.getErrorProgressMessage()),this.showRecheckNoticeWarning())}},{key:"revertRecheckWarning",value:function(){var t=e(".wp-smush-recheck-images-notice-box .wp-smush-recheck-images-notice-warning");t&&(t.classList.add("sui-notice-warning"),t.classList.remove("sui-notice-error"),this.revertInnerText(t.querySelector("span")))}},{key:"triggerBulkSmushEvent",value:function(e){this.disableRecheckImagesButton(),e.enabled_background_process?this.triggerBackgroundBulkSmushEvent(e.global_stats):this.triggerAjaxBulkSmushEvent(e.global_stats)}},{key:"toggleBulkSmushDescription",value:function(e){s.Z.isEmptyObject||(e.remaining_count<1?(s.Z.hideBulkSmushDescription(),s.Z.showBulkSmushAllDone()):(s.Z.showBulkSmushDescription(),s.Z.hideBulkSmushAllDone()))}},{key:"setRequiredScanForBulkSmushButton",value:function(){n&&n.classList.add("wp-smush-scan-and-bulk-smush")}},{key:"removeScanEventFromBulkSmushButton",value:function(){n&&n.classList.remove("wp-smush-scan-and-bulk-smush")}},{key:"triggerBackgroundBulkSmushEvent",value:function(e){document.dispatchEvent(new CustomEvent("backgroundBulkSmushOnScanCompleted",{detail:e}))}},{key:"triggerAjaxBulkSmushEvent",value:function(e){document.dispatchEvent(new CustomEvent("ajaxBulkSmushOnScanCompleted",{detail:e}))}},{key:"onCancelled",value:function(e){this.onFinish(e),this.runBulkSmushOnComplete=!1,this.setRequiredScanForBulkSmushButton()}},{key:"maybeShowAutoBulkSmushNotification",value:function(){this.runBulkSmushOnComplete&&this.showAnElement(this.autoBulkSmushNotification)}},{key:"maybeHideAutoBulkSmushNotification",value:function(){this.runBulkSmushOnComplete&&this.hideAnElement(this.autoBulkSmushNotification)}},{key:"toggleBulkSmushBoxContent",value:function(){r.h.resetAndHideBulkErrors(),this.toggleBulkSmushDescription(r.h.getGlobalStats())}}])&&a(h.prototype,p),f&&a(h,f),Object.defineProperty(h,"prototype",{writable:!1}),_}(i.default));!function(){var e,n;if(t&&t.classList.contains("wp-smush-background-scan"))if(t.addEventListener("click",(function(){return h.startScan()})),null!==(e=window.wp_smushit_data.media_library_scan)&&void 0!==e&&e.in_processing)h.onStart().showProgressBar().autoSyncStatus();else if(window.location.search.includes("smush-action=start-scan-media")){t.click();n=window.location.href.replace("&smush-action=start-scan-media",""),window.history.pushState(null,null,n)}}();!function(){var s=e(".wp-smush-recheck-images-notice-box");if(s&&t){var i,r=s.querySelector(".wp-smush-trigger-background-scan");if(r)r.onclick=function(e){e.preventDefault(),t.click()},null!==(i=window.wp_smushit_data.media_library_scan)&&void 0!==i&&i.is_dead?h.showProgressErrorNoticeOnRecheckNotice():window.wp_smushit_data.is_outdated&&h.showRecheckNoticeWarning();var o=s.querySelector(".wp-smush-trigger-bulk-smush");o&&n&&(o.onclick=function(e){e.preventDefault(),s.classList.add("sui-hidden"),n.click()});var a=s.querySelectorAll("button.sui-button-icon");a&&a.forEach((function(e){e.onclick=function(t){e.closest(".sui-recheck-images-notice").classList.add("sui-hidden")}})),document.addEventListener("onSavedSmushSettings",(function(e){var t;null!=e&&null!==(t=e.detail)&&void 0!==t&&t.is_outdated_stats&&(h.setRequiredScanForBulkSmushButton(),s.classList.remove("sui-hidden"),s.querySelector(".wp-smush-recheck-images-notice-success").classList.add("sui-hidden"),s.querySelector(".wp-smush-recheck-images-notice-warning").classList.remove("sui-hidden"))}))}}();!function(){if(n){n.addEventListener("click",(function(e){n.classList.contains("wp-smush-scan-and-bulk-smush")&&(e.preventDefault(),h.startScanThenBulkSmushOnComplete())}))}}()}}}}()},4471:function(e,t,n){"use strict";n.r(t);var s=n(6033);function i(e){return i="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},i(e)}function r(e,t){for(var n=0;nMath.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")(this.settings);s&&(this.contentContainer.innerHTML=s,"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?t.onFinishingSetup():window.console.log("Request failed. Returned status of "+i.status)},i.send("smush_settings="+JSON.stringify(t.selection)+"&_ajax_nonce="+s.value)}))},onFinishingSetup:function(){this.onFinish(),this.startRecheckImages()},onFinish:function(){window.SUI.closeModal()},startRecheckImages:function(){this.recheckImagesLink&&(window.location.href=this.recheckImagesLink)},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=this,t=document.getElementById("smush_quick_setup_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=skip_smush_setup&_ajax_nonce="+t.value),n.onload=function(){200===n.status?e.onSkipSetup():window.console.log("Request failed. Returned status of "+n.status)},n.send()},onSkipSetup:function(){this.onFinish()},hideUpgradeModal:function(e,t){e.preventDefault(),t.classList.add("wp-smush-link-in-progress");var n=null==t?void 0:t.href,s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=hide_new_features&_ajax_nonce="+window.wp_smush_msgs.nonce),s.onload=function(){window.SUI.closeModal(),t.classList.remove("wp-smush-link-in-progress"),200===s.status?n&&(window.location.href=n):window.console.log("Request failed. Returned status of "+s.status)},s.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.first_slide=WP_Smush.onboarding.first_slide,t(s)}})),window.addEventListener("load",(function(){return WP_Smush.onboarding.init()}))}()},1110: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.preventDefault(),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?window.location.search="page=smush-cdn":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("page=smush-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?window.location.search="page=smush-lazy-load":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()}()},4334:function(e,t,n){"use strict";n.r(t);var s=n(9576);function i(e){return i="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},i(e)}function r(e,t){for(var n=0;n"),n={type:"success",icon:"check"};SUI.openNotice("wp-smush-ajax-notice",t,n);var s=document.querySelector(".sui-button-onload");s&&s.classList.remove("sui-button-onload")}(wp_smush_msgs.settingsUpdated),n=t.data,document.dispatchEvent(new CustomEvent("onSavedSmushSettings",{detail:n}))):t.data&&t.data.message?WP_Smush.helpers.showErrorNotice(t.data.message):WP_Smush.helpers.showErrorNotice("Request failed.")}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+s.status);var n},s.send("page="+n+"&"+t+"&_ajax_nonce="+wp_smush_msgs.nonce)}e("form#smush-bulk-form").on("submit",(function(n){n.preventDefault(),e("#save-settings-button").addClass("sui-button-onload"),t(e(this).serialize(),"bulk")})),e("form#smush-lazy-load-form").on("submit",(function(n){n.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"lazy-load")})),e("form#smush-cdn-form").on("submit",(function(n){n.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"cdn")})),e("form#smush-integrations-form").on("submit",(function(n){n.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"integrations")})),e("form#smush-settings-form").on("submit",(function(n){n.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"settings")})),e("input[name=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("input#detection").on("click",(function(){var t=e(".smush-highlighting-notice"),n=e(".smush-highlighting-warning");e(this).is(":checked")?t.length>0?t.show():n.show():(t.hide(),n.hide())}))}(jQuery)},9446:function(e,t,n){"use strict";var s=n(8283),i=n(5565),r=n(9576);function o(e){return o="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},o(e)}function a(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"media";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onStart(),this.skip_resmush=!(void 0===t.data("smush")||!t.data("smush")),this.button=jQuery(t[0]),this.is_bulk=!!o(n)&&n,this.url=ajaxurl,this.log=jQuery(".smush-final-log"),this.setIds(),this.mixPanel=r.Z.getInstance(),this.is_bulk_resmush=0=jQuery("div.smush-final-log .smush-bulk-error-row").length&&jQuery("div.smush-final-log").addClass("sui-hidden"),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(".wp-smush-restore").prop("disabled",!1),jQuery("a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button").prop("disabled",!1)}},{key:"singleDone",value:function(){if(!this.is_bulk){var t=this;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.button.html(window.wp_smush_msgs.all_done)):n.data.html_stats?s.html(n.data.html_stats):(t.status.addClass("smush-warning"),t.status.html(n.data.error_msg),t.button.html(window.smush_vars.strings.stats_label)),e.updateImageStats(n.data.new_size)}})).fail((function(e){t.status.html(e.data),t.status.addClass("smush-warning"),t.enableButton()}))}}},{key:"syncStats",value:function(){var e=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),t=e.html();e.html(window.wp_smush_msgs.sync_stats);var n=this;return jQuery.ajax({type:"GET",url:ajaxurl,data:{action:this.get_stats_action,_ajax_nonce:window.wp_smush_msgs.nonce},success:function(e){null!=e&&e.success?(s.h.updateGlobalStatsFromSmushScriptData(e.data),s.h.renderStats(),i.Z.update(0,e.data.remaining_count),jQuery(".wp-smush-scan").prop("disabled",!1),n.hideBulkFreeLimitReachedNotice()):WP_Smush.helpers.showNotice(e,{showdismiss:!0,autoclose:!1})}}).always((function(){return e.html(t)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){if(this.enableButton(),0===this.ids.length)jQuery(".bulk-smush-wrapper .wp-smush-all-done").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),this._updateProgress(0,0);else{var e=jQuery(".bulk-smush-wrapper .wp-smush-resmush-notice");e.length>0?e.show():jQuery(".bulk-smush-wrapper .wp-smush-remaining").removeClass("sui-hidden")}jQuery(".wp-resmush.wp-smush-action").removeProp("disabled")}}},{key:"showAnimatedUpsellNotice",value:function(){if(this.errors.length){var e=document.querySelector(".smush-bulk-errors");if(e){var t=e.querySelector('[data-error-code="animated"]');if(t)return Array.prototype.slice.call(e.childNodes,0,5).includes(t)}}}},{key:"maybeShowCDNActivationNotice",value:function(){wp_smush_msgs.smush_cdn_activation_notice&&this.showAnimatedUpsellNotice()&&WP_Smush.helpers.renderActivationCDNNotice(wp_smush_msgs.smush_cdn_activation_notice)}},{key:"maybeShowUnlimitedUpsellNotice",value:function(){var e=document.querySelector(".wp-smush-global-upsell");e&&e.classList.remove("sui-hidden")}},{key:"maybeShowBulkErrorActions",value:function(){if(this.errors.length){var e=document.querySelector(".smush-bulk-errors-actions");e&&e.classList.remove("sui-hidden")}}},{key:"freeExceeded",value:function(){var e=jQuery(".wp-smush-bulk-progress-bar-wrapper");e.addClass("wp-smush-exceed-limit").removeClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-cancel-bulk").removeClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-all").addClass("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"),this.showBulkFreeLimitReachedNotice()}},{key:"showBulkFreeLimitReachedNotice",value:function(){var e=document.getElementById("smush-limit-reached-notice");e&&e.classList.remove("sui-hidden")}},{key:"hideBulkFreeLimitReachedNotice",value:function(){var e=document.getElementById("smush-limit-reached-notice");e&&e.classList.add("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").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,"nextgen"===this.smush_type&&wp_smushit_data.resmush.length>0&&this.smushed+this.errors.length<=1&&(wp_smushit_data.count_images-=wp_smushit_data.resmush.length+1),0===this.ids.length&&(jQuery(".bulk-smush-wrapper .wp-smush-all-done").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden")),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(){return this.continueSmush&&this.ids.length>0&&this.is_bulk}},{key:"onStart",value:function(){this.deferred=jQuery.Deferred(),this.deferred.errors=[],this.continueSmush=!0,this.errors=[];var e=jQuery(".bulk-smush-wrapper .sui-progress-state-text");this.smushed=parseInt(e.find("span:first-child").html()),this.total=parseInt(e.find("span:last-child").html()),jQuery(".wp-smush-restore").prop("disabled",!0)}},{key:"callAjax",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!==u&&void 0!==u&&10>performance.now()-u)return this.freeExceeded(),this.deferred;var n=window.wp_smush_msgs.nonce;this.current_id=this.is_bulk?this.ids.shift():this.button.data("id"),e.updateSmushIds(this.current_id);var s=this.button.parent().find("#_wp_smush_nonce");s.length>0&&(n=s.val());var i=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,n,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){i.errors.push(i.current_id);var n=t.data.error,s=WP_Smush.helpers.prepareBulkSmushErrorRow(n.error_message,n.file_name,n.thumbnail,i.current_id,i.smush_type,n.error_code);i.log.removeClass("sui-hidden"),i.log.find(".smush-bulk-errors").append(s),i.errors.length>4&&(i.log.find(".smush-bulk-errors").addClass("overflow-box"),jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"))}else void 0!==t.success&&t.success&&i.smushed++;e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==i.deferred.state()?(document.getElementById("wp-smush-running-notice").classList.add("sui-hidden"),i.continueSmush=!1,wp_smushit_data.unsmushed.unshift(i.current_id),i.ids.unshift(i.current_id),u=performance.now(),i.freeExceeded()):i.is_bulk&&(i.updateProgress(t),e.updateScoreProgress()),0===i.ids.length&&i.is_bulk&&i.onBulkSmushCompleted(),i.singleDone()})).always((function(){i.continue()&&i.is_bulk?i.callAjax(!1):i.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"maybeShowCDNUpsellForPreSiteOnCompleted",value:function(){var e=document.querySelector(".wp-smush-upsell-cdn");e&&(e.querySelector("p").innerHTML=wp_smush_msgs.processed_cdn_for_free,e.classList.remove("sui-hidden"))}},{key:"onBulkSmushCompleted",value:function(){var e=this;this.maybeShowUnlimitedUpsellNotice(),this.maybeShowCDNActivationNotice(),this.maybeShowCDNUpsellForPreSiteOnCompleted(),this.maybeShowBulkErrorActions();var t=this.is_bulk?function(){return e.trackBulkSmushCompleted()}:function(){return!1};this.syncStats().done(t)}},{key:"getPercentOptimized",value:function(e,t){return e===t||e<=0?100:Math.floor(100*(e-t)/e)}},{key:"trackBulkSmushCompleted",value:function(){this.mixPanel.trackBulkSmushCompleted(s.h.getGlobalStats())}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(!0),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.continueSmush=!0,e.errors.length){var t=e.errors.length===e.total?window.wp_smush_msgs.all_failed: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)").prop("disabled",!1)}))}},{key:"cancelAjax",value:function(){this.continueSmush=!1,this.syncStats(),this.request.abort(),this.enableButton(),this.button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(this.current_id),jQuery(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),this.mixPanel.trackBulkSmushCancel(),this.hideBulkFreeLimitReachedNotice()}}],c=[{key:"smushAddParams",value:function(e,t){return jQuery.isEmptyObject(t)||(e+=(e.indexOf("?")>=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=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=jQuery.param({is_bulk_resmush:e,attachment_id:t,_nonce:s,new_bulk_smush_started:i});return jQuery.ajax({type:"GET",data:r,url:n,timeout:wp_smushit_data.timeout,dataType:"json"})}},{key:"getTotalImagesToSmush",value:function(){var e=wp_smushit_data.resmush.length,t=wp_smushit_data.count_total-wp_smushit_data.count_smushed;return t>0?e+t:e}},{key:"updateScoreProgress",value:function(){var t="sui-grade-dismissed",n=0,s=0,i=e.getTotalImagesToSmush(),r=parseInt(wp_smushit_data.count_total);r===i?(r>0&&(t="sui-grade-f"),s=100):0=60&&n<90?t="sui-grade-c":n>=90&&(t="sui-grade-a"));var o=jQuery("#smush-image-score");o.removeClass((function(e,t){return(t.match(/(^|\s)sui-grade-\S+/g)||[]).join(" ")})).addClass(t).attr("data-score",n).find(".sui-circle-score-label").html(n),o.find("circle:last-child").attr("style","--metric-array:"+2.63893782902*s+" "+(263.893782902-s))}},{key:"updateStats",value:function(e){var t=void 0!==e&&"nextgen"===e;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var n=WP_Smush.helpers.formatBytes(wp_smushit_data.savings_bytes,0),s=jQuery(".wp-smush-savings .wp-smush-stats-human");t?s.html(n):(s.html(WP_Smush.helpers.getFormatFromString(n)),jQuery(".sui-summary-large.wp-smush-stats-human").html(WP_Smush.helpers.getSizeFromString(n))),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),t?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),wp_smushit_data.count_resize>0&&(jQuery("span.smushed-items-count span.wp-smush-count-resize-total").removeClass("sui-hidden"),jQuery("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize));var i=jQuery("li.super-smush-attachments .smushed-count");i.length&&void 0!==wp_smushit_data.count_supersmushed&&i.html(wp_smushit_data.count_supersmushed);var r=jQuery(".smush-conversion-savings");if(r.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!==wp_smushit_data.savings_conversion){var o=r.find(".wp-smush-stats");o.length>0&&o.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_conversion,1))}}},{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:"updateLocalizedStats",value:function(e,t){void 0!==window.wp_smushit_data&&("media"===t?(wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+1,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_smushed=parseInt(wp_smushit_data.count_smushed)+1,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)}}}],n&&a(t.prototype,n),c&&a(t,c),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Z=c},1442: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"),showWizardButton:document.getElementById("smush-webp-toggle-wizard"),init:function(){var e=this;this.maybeShowDeleteAllSuccessNotice(),this.toggleModuleButton&&this.toggleModuleButton.addEventListener("click",(function(t){return e.toggleWebp(t)})),this.recheckStatusButton&&this.recheckStatusButton.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),this.recheckStatusLink&&this.recheckStatusLink.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),document.getElementById("wp-smush-webp-delete-all")&&document.getElementById("wp-smush-webp-delete-all").addEventListener("click",(function(t){return e.deleteAll(t)})),this.showWizardButton&&this.showWizardButton.addEventListener("click",this.toggleWizard)},toggleWebp:function(e){var t=this;e.preventDefault();var n=e.currentTarget,s="enable"===n.dataset.action;n.classList.add("sui-button-onload");var i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_toggle",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){var e=JSON.parse(i.response);if(200===i.status){if(void 0!==e.success&&e.success)t.runScan().onload=function(){window.location.href=window.wp_smush_msgs.localWebpURL};else void 0!==e.data.message&&(t.showNotice(e.data.message),n.classList.remove("sui-button-onload"))}else{var s=window.wp_smush_msgs.generic_ajax_error;e&&void 0!==e.data.message&&(s=e.data.message),t.showNotice(s),n.classList.remove("sui-button-onload")}},i.send("param="+s+"&_ajax_nonce="+this.nonceField[0].value)},recheckStatus:function(){var e=this;this.recheckStatusButton.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=smush_webp_get_status",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){e.recheckStatusButton.classList.remove("sui-button-onload");var n=!1,s=JSON.parse(t.response);200===t.status?(s.success?"1":"0")!==e.recheckStatusButton.dataset.isConfigured&&location.reload():n=window.wp_smush_msgs.generic_ajax_error;s&&s.data&&(n=s.data),n&&e.showNotice(n)},t.send("_ajax_nonce="+window.wp_smush_msgs.webp_nonce)},deleteAll:function(e){var t=this,n=e.currentTarget;n.classList.add("sui-button-onload");var s=!1,i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_delete_all",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){var e=JSON.parse(i.response);200===i.status?void 0!==e.success&&e.success?t.runScan().onload=function(){location.search=location.search+"¬ice=webp-deleted"}:s=window.wp_smush_msgs.generic_ajax_error:s=window.wp_smush_msgs.generic_ajax_error;if(e&&e.data&&e.data.message&&(s=e.data.message),s){n.classList.remove("sui-button-onload");var r=''.concat(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)},toggleWizard:function(e){e.currentTarget.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("GET",ajaxurl+"?action=smush_toggle_webp_wizard&_ajax_nonce="+window.wp_smush_msgs.webp_nonce,!0),t.onload=function(){return location.reload()},t.send()},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}})}}},WP_Smush.WebP.init()}()},4218:function(e,t,n){"use strict";var s=n(8583),i=n.n(s);function r(e){return r="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},r(e)}var o=new function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={url:ajaxurl,method:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",cache:!1};return t instanceof FormData?(t.append("action",e),t.append("_ajax_nonce",window.wp_smush_msgs.nonce),n.contentType=!1,n.processData=!1):(t._ajax_nonce=t._ajax_nonce||window.wp_smush_msgs.nonce,t.action=e),n.data=t,new Promise((function(e,t){jQuery.ajax(n).done(e).fail(t)})).then((function(e){return"object"!==r(e)&&(e=JSON.parse(e)),e})).catch((function(e){console.error("Error:",e)}))}var t={background:{start:function(){return e("bulk_smush_start")},cancel:function(){return e("bulk_smush_cancel")},initState:function(){return e("bulk_smush_get_status")},getStatus:function(){return e("bulk_smush_get_status")},getStats:function(){return e("bulk_smush_get_global_stats")}},smush:{syncStats:function(t){return e("get_stats",t=t||{})},ignoreAll:function(t){return e("wp_smush_ignore_all_failed_items",{type:t})}},common:{dismissNotice:function(t){return e("smush_dismiss_notice",{key:t})},hideModal:function(t){return e("hide_modal",{modal_id:t})},request:function(t){return t.action&&e(t.action,t)}},scanMediaLibrary:{start:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e("wp_smush_start_background_scan",{optimize_on_scan_completed:t=t?1:0,_ajax_nonce:window.wp_smushit_data.media_library_scan.nonce})},cancel:function(){return e("wp_smush_cancel_background_scan",{_ajax_nonce:window.wp_smushit_data.media_library_scan.nonce})},getScanStatus:function(){return e("wp_smush_get_background_scan_status",{_ajax_nonce:window.wp_smushit_data.media_library_scan.nonce})}}};i()(this,t)};t.Z=o},1414:function(e,t,n){var s,i,r;i=[n(5311),n(3860)],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="$request_target_invalid",c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},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:"'"},h={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},p={0:"",1:"left",2:"middle",3:"right"},f="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),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={},b={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(c))),o&&!n){for(s=0,i=c.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(e){if(null===e)return this.remove(),B(this);var t,n,s={children:!0,expanded:!0,parent:!0};for(t in e)S(e,t)&&(n=e[t],s[t]||x(n)||(v[t]?this[t]=n:this.data[t]=n));return S(e,"children")&&(this.removeChildren(),e.children&&this._setChildren(e.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),S(e,"expanded")?this.setExpanded(e.expanded):B(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()),E("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()),E("error",arguments))},findAll:function(e){e=x(e)?e:A(e);var t=[];return this.visit((function(n){e(n)&&t.push(n)})),t},findFirst:function(e){e=x(e)?e:A(e);var t=null;return this.visit((function(n){if(e(n))return t=n,!1})),t},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:k(!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,c,l,d,h=e.children;if(h&&h.length){for(c=!0,l=!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()),E("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!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(){c?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 k((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":k((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i,0,this);break;case"after":k((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(),B()):s.setActive()}return this.warn("Could not find related node '"+t+"'."),B()},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 k(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;t_+m-f&&(b=u+h-m+f,y&&(k(y.isRootNode()||y.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||(l+=s+" ",u=!0);else for(;l.indexOf(" "+s+" ")>-1;)l=l.replace(" "+s+" "," ");return this.extraClasses=C(l),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()),E("warn",arguments))}},z.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 x(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)},_usesExtension:function(t){return e.inArray(t,this.options.extensions)>=0},_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()),E("log",arguments))},destroy:function(){this.widget.destroy()},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()),E("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?M(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),c=3===this.options.selectMode&&!1!==s.stopOnParents;function l(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&&l(e)})):!1!==t&&(i=this.getSelectedNodes(c),e.each(i,(function(e,t){l(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,e=""+e,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()),E("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(),c=this.options.keyPathSeparator,l=[],d=e.extend({},n);for("function"==typeof n?s=n:n&&n.callback&&(s=n.callback),d.callback=function(e,t,n){s&&s.call(e,t,n),a.notifyWith(e,[{node:t,status:n}])},null==d.matchKey&&(d.matchKey=function(e,t){return e.key===t}),w(t)||(t=[t]),i=0;i
=4&&window.console.time(this+" - "+e)},debugTimeEnd:function(e){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+e)},toDict:function(e,t){var n=this.rootNode.toDict(!0,t);return e?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,n,s){var i=this._makeHookContext(t,n,s),r=this.widget._trigger(e,n,i);return!1!==r&&void 0!==i.result?i.result:r},_triggerTreeEvent:function(e,t,n){var s=this._makeHookContext(this,t,n),i=this.widget._trigger(e,t,s);return!1!==i&&void 0!==s.result?s.result:i},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.hasChildren())return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var n,s,i,r,o=0,a=!1===(t=t||{}).includeSelf,u=!!t.includeHidden,c=!u&&this.enableFilter,l=t.start||this.rootNode.children[0];for(i=l.parent;i;){for(k((s=(r=i.children).indexOf(l)+o)>=0,"Could not find "+l+" in parent's children: "+i),n=s;n=2&&(Array.prototype.unshift.call(arguments,this.toString()),E("warn",arguments))}},e.extend(z.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,c,!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,v);break;default:g=!1}g&&o.preventDefault()},nodeLoadChildren:function(t,n){var s,i,r,o=null,c=!0,l=t.tree,d=t.node,h=d.parent,p="nodeLoadChildren",f=Date.now();return x(n)&&k(!x(n=n.call(l,{type:"source"},t)),"source callback must not return another function"),x(n.then)?o=n:n.url?(s=e.extend({},t.options.ajax,n)).debugDelay?(i=s.debugDelay,delete s.debugDelay,w(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),d.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),o=e.Deferred((function(t){setTimeout((function(){e.ajax(s).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),i)}))):o=e.ajax(s):e.isPlainObject(n)||w(n)?(o={then:function(e,t){e(n,null,null)}},c=!1):e.error("Invalid source type: "+n),d._requestId&&(d.warn("Recursive load request #"+f+" while #"+d._requestId+" is pending."),d._requestId=f),c&&(l.debugTime(p),l.nodeSetStatus(t,"loading")),r=new e.Deferred,o.then((function(s,i,o){var c,p;if("json"!==n.dataType&&"jsonp"!==n.dataType||"string"!=typeof s||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),d._requestId&&d._requestId>f)r.rejectWith(this,[a]);else if(null!==d.parent||null===h){if(t.options.postProcess){try{(p=l._triggerNodeEvent("postProcess",t,t.originalEvent,{response:s,error:null,dataType:n.dataType})).error&&l.warn("postProcess returned error:",p)}catch(e){p={error:e,message:""+e,details:"postProcess failed"}}if(p.error)return c=e.isPlainObject(p.error)?p.error:{message:p.error},c=l._makeHookContext(d,null,c),void r.rejectWith(this,[c]);(w(p)||e.isPlainObject(p)&&w(p.children))&&(s=p)}else s&&S(s,"d")&&t.options.enableAspx&&(42===t.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),s="string"==typeof s.d?e.parseJSON(s.d):s.d);r.resolveWith(this,[s])}else r.rejectWith(this,[u])}),(function(e,t,n){var s=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:n,details:e.status+": "+n});r.rejectWith(this,[s])})),r.done((function(n){var s,i,r;l.nodeSetStatus(t,"ok"),e.isPlainObject(n)?(k(d.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),k(w(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,s=n.children,delete i.children,e.each(_,(function(e,t){void 0!==i[t]&&(l[t]=i[t],delete i[t])})),e.extend(l.data,i)):s=n,k(w(s),"expected array of children"),d._setChildren(s),l.options.nodata&&0===s.length&&(x(l.options.nodata)?r=l.options.nodata.call(l,{type:"nodata"},t):!0===l.options.nodata&&d.isRootNode()?r=l.options.strings.noData:"string"==typeof l.options.nodata&&d.isRootNode()&&(r=l.options.nodata),r&&d.setStatus("nodata",r)),l._triggerNodeEvent("loadChildren",d)})).fail((function(e){var n;e!==a?e!==u?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),d.warn("Load children failed ("+n.message+")",n),!1!==l._triggerNodeEvent("loadError",n,null)&&l.nodeSetStatus(t,"error",n.message,n.details)):d.warn("Lazy parent node was removed while loading: discarding response."):d.warn("Ignored response for obsolete load request #"+f+" (expected #"+d._requestId+")")})).always((function(){d._requestId=null,c&&l.debugTimeEnd(p)})),r.promise()},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 k(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),k((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,c,l,d,h,p=t.node,f=t.tree,m=t.options,_=m.aria,g=!1,v=p.parent,y=!v,b=p.children,w=null;if(!1!==f._enableUpdate&&(y||v.ul)){if(k(y||v.ul,"parent UL must exist"),y||(p.li&&(n||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?w=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(g=!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",_&&!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(y||p.expanded||!0===s){for(p.ul||(p.ul=document.createElement("ul"),(!0!==i||r)&&p.expanded||(p.ul.style.display="none"),_&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),c=0,l=b.length;c1&&g.push(" ")):g.push(" "),(r=s.evalOption("checkbox",h,h,f,!1))&&!h.isStatusNode()&&(c=m?" role='checkbox'":"",o="fancytree-checkbox",("radio"===r||h.parent&&h.parent.radiogroup)&&(o+=" fancytree-radio"),g.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))&&(c=m?" role='presentation'":"",d=(d=s.evalOption("iconTooltip",h,h,f,null))?" title='"+D(d)+"'":"","string"==typeof a?i.test(a)?(a="/"===a.charAt(0)?a:(f.imagePath||"")+a,g.push(" ")):g.push(" "):a.text?g.push(""+s.escapeHtml(a.text)+" "):a.html?g.push(""+a.html+" "):g.push(" ")),u="",f.renderTitle&&(u=f.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(l=s.evalOption("tooltip",h,h,f,null))&&(l=h.title),u=""+(f.escapeTitles?s.escapeHtml(h.title):h.title)+" "),g.push(u),h.span.innerHTML=g.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(),c=o.aria,l=o._classNames,d=[],h=i[r.statusClassPropName];h&&!1!==r._enableUpdate&&(c&&(n=e(i.tr||i.li)),d.push(l.node),r.activeNode===i&&d.push(l.active),r.focusNode===i&&d.push(l.focused),i.expanded&&d.push(l.expanded),c&&(!1===a?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(i.expanded))),i.folder&&d.push(l.folder),!1!==a&&d.push(l.hasChildren),u&&d.push(l.lastsib),i.lazy&&null==i.children&&d.push(l.lazy),i.partload&&d.push(l.partload),i.partsel&&d.push(l.partsel),s.evalOption("unselectable",i,i,o,!1)&&d.push(l.unselectable),i._isLoading&&d.push(l.loading),i._error&&d.push(l.error),i.statusNodeType&&d.push(l.statusNodePrefix+i.statusNodeType),i.selected?(d.push(l.selected),c&&n.attr("aria-selected",!0)):c&&n.attr("aria-selected",!1),i.extraClasses&&d.push(i.extraClasses),!1===a?d.push(l.combinedExpanderPrefix+"n"+(u?"l":"")):d.push(l.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(u?"l":"")),d.push(l.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=d.join(" "),i.li&&e(i.li).toggleClass(l.lastsib,u))},nodeSetActive:function(t,n,s){s=s||{};var i,r=t.node,o=t.tree,a=t.options,u=!0===s.noEvents,c=!0===s.noFocus,l=!1!==s.scrollIntoView;return r===o.activeNode==(n=!1!==n)?B(r):(l&&t.originalEvent&&e(t.originalEvent.target).is("a,:checkbox")&&(r.info("Not scrolling while clicking an embedded link."),l=!1),n&&!u&&!1===this._triggerNodeEvent("beforeActivate",r,t.originalEvent)?O(r,["rejected"]):(n?(o.activeNode&&(k(o.activeNode!==r,"node was active (inconsistency)"),i=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(i,!1),k(null===o.activeNode,"deactivate was out of sync?")),a.activeVisible&&r.makeVisible({scrollIntoView:l}),o.activeNode=r,o.nodeRenderStatus(t),c||o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",r,t.originalEvent)):(k(o.activeNode===r,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",r,t.originalEvent)),B(r)))},nodeSetExpanded:function(t,n,s){s=s||{};var i,r,o,a,u,c,l=t.node,d=t.tree,h=t.options,p=!0===s.noAnimation,f=!0===s.noEvents;if(n=!1!==n,e(l.li).hasClass(h._classNames.animating))return l.warn("setExpanded("+n+") while animating: ignored."),O(l,["recursion"]);if(l.expanded&&n||!l.expanded&&!n)return B(l);if(n&&!l.lazy&&!l.hasChildren())return B(l);if(!n&&l.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(_,(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 i,r,o,a=t.tree,u=t.widget.element,c=e.extend({},t,{node:this.rootNode});if(a.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(r=u.data("type")||"html"){case"html":(o=u.find(">ul").not(".fancytree-container").first()).length?(o.addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(o),this.data=e.extend(this.data,q(o))):(s.warn("No `source` option was passed and container does not contain ``: assuming `source: []`."),n=[]);break;case"json":n=e.parseJSON(u.text()),u.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(n)&&(k(w(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,n=n.children,delete i.children,e.each(_,(function(e,t){void 0!==i[t]&&(a[t]=i[t],delete i[t])})),e.extend(a.data,i));break;default:e.error("Invalid data-type: "+r)}return a._triggerTreeEvent("preInit",null),this.nodeLoadChildren(c,n).done((function(){a._callHook("treeStructureChanged",t,"loadChildren"),a.render(),3===t.options.selectMode&&a.rootNode.fixSelection3FromEndNodes(),a.activeNode&&a.options.activeVisible&&a.activeNode.makeVisible(),a._triggerTreeEvent("init",null,{status:!0})})).fail((function(){a.render(),a._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,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",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,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(e){var t=this.tree;t&&t.options.debugLevel>=3&&t.warn("$().fancytree('"+e+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new z(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._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(e){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(e)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),s=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.38.1-0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:z,_FancytreeNodeClass:R,jquerySupports:{positionMyOfs:T(e.ui.version,1,9)},assert:function(e,t){return k(e,t)},createTree:function(t,n){var i=e(t).fancytree(n);return s.getTree(i)},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&&E("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&E("error",arguments)},escapeHtml:function(e){return(""+e).replace(r,(function(e){return c[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 R)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 z?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 Element||t instanceof HTMLDocument?t=e(t):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(e,t,n,s,i){var r,o,a=t.tree,u=s[e],c=n[e];return x(u)?(r={node:t,tree:a,widget:a.widget,options:a.widget.options,typeInfo:a.types[t.type]||{}},null==(o=u.call(a,{type:e},r))&&(o=c)):o=null==c?u:c,null==o&&(o=i),o},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(p[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&&E("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,c,l=t.find(">li"),d=[];return l.each((function(){var l,h,p=e(this),_=p.find(">span",this).first(),v=_.length?null:p.find(">a").first(),b={tooltip:null,data:{}};for(_.length?b.title=_.html():v&&v.length?(b.title=v.html(),b.data.href=v.attr("href"),b.data.target=v.attr("target"),b.tooltip=v.attr("title")):(b.title=p.html(),(o=b.title.search(/=0&&(b.title=b.title.substring(0,o))),b.title=C(b.title),r=0,a=f.length;rul").first()).length?b.children=e.ui.fancytree.parseHtml(t):b.children=b.lazy?void 0:null,d.push(b)})),d},registerExtension:function(t){k(null!=t.name,"extensions must have a `name` property."),k(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},trim:C,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&&E("warn",arguments)}}),e.ui.fancytree}function k(t,n){t||(n="Fancytree assertion failed"+(n=n?": "+n:""),e.ui.fancytree.error(n),e.error(n))}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){return"function"==typeof e}function C(e){return null==e?"":e.trim()}function E(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 j(){var t,n,s,i,r,o=arguments[0]||{},a=1,u=arguments.length;if("object"==typeof o||x(o)||(o={}),a===u)throw Error("need at least two args");for(;a=0}}function M(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}function R(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 R(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")},void 0===(r="function"==typeof s?s.apply(t,i):s)||(e.exports=r)},3860:function(e,t,n){var s,i,r;i=[n(5311)],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],c=u+"-"+(t=t.split(".")[1]);return s||(s=n,n=e.Widget),e.isArray(s)&&(s=e.extend.apply(null,[{}].concat(s))),e.expr[":"][c.toLowerCase()]=function(t){return!!e.data(t,c)},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:c}),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:l<0?"top":u>0?"bottom":"middle"};pn(s(u),s(l))?d.important="horizontal":d.important="vertical",t.using.call(this,e,d)}),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,c=a+t.collisionWidth-o-r;t.collisionWidth>o?u>0&&c<=0?(s=e.left+u+t.collisionWidth-o-r,e.left+=u-s):e.left=c>0&&u<=0?r:u>c?r+o-t.collisionWidth:r:u>0?e.left+=u:c>0?e.left-=c: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,c=a+t.collisionHeight-o-r;t.collisionHeight>o?u>0&&c<=0?(s=e.top+u+t.collisionHeight-o-r,e.top+=u-s):e.top=c>0&&u<=0?r:u>c?r+o-t.collisionHeight:r:u>0?e.top+=u:c>0?e.top-=c: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,c=e.left-t.collisionPosition.marginLeft,l=c-u,d=c+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];l<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)1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&i(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++s-1&&e%1==0&&e0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8583:function(e,t,n){var s=n(4865),i=n(8363),r=n(1463),o=n(8612),a=n(5726),u=n(3674),c=Object.prototype.hasOwnProperty,l=r((function(e,t){if(a(t)||o(t))i(t,u(t),e);else for(var n in t)c.call(t,n)&&s(e,n,t[n])}));e.exports=l},5703:function(e){e.exports=function(e){return function(){return e}}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,n){var s=n(9454),i=n(7005),r=Object.prototype,o=r.hasOwnProperty,a=r.propertyIsEnumerable,u=s(function(){return arguments}())?s:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var s=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!s(e)}},4144:function(e,t,n){e=n.nmd(e);var s=n(5639),i=n(5062),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?s.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},3560:function(e,t,n){var s=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=s(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6719:function(e,t,n){var s=n(8749),i=n(7518),r=n(1167),o=r&&r.isTypedArray,a=o?i(o):s;e.exports=a},3674:function(e,t,n){var s=n(4636),i=n(280),r=n(8612);e.exports=function(e){return r(e)?s(e):i(e)}},5062:function(e){e.exports=function(){return!1}},8891:function(e){"use strict";var t,n={DEBUG:!1,LIB_VERSION:"2.47.0"};if("undefined"==typeof window){var s={hostname:""};t={navigator:{userAgent:""},document:{location:s,referrer:""},screen:{width:0,height:0},location:s}}else t=window;var i,r,o,a,u,c,l,d,h,p,f,m=Array.prototype,_=Function.prototype,g=Object.prototype,v=m.slice,y=g.toString,b=g.hasOwnProperty,w=t.console,k=t.navigator,S=t.document,x=t.opera,C=t.screen,E=k.userAgent,N=_.bind,T=m.forEach,j=m.indexOf,P=m.map,I=Array.isArray,B={},O={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},L={log:function(){if(n.DEBUG&&!O.isUndefined(w)&&w)try{w.log.apply(w,arguments)}catch(e){O.each(arguments,(function(e){w.log(e)}))}},warn:function(){if(n.DEBUG&&!O.isUndefined(w)&&w){var e=["Mixpanel warning:"].concat(O.toArray(arguments));try{w.warn.apply(w,e)}catch(t){O.each(e,(function(e){w.warn(e)}))}}},error:function(){if(n.DEBUG&&!O.isUndefined(w)&&w){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{w.error.apply(w,e)}catch(t){O.each(e,(function(e){w.error(e)}))}}},critical:function(){if(!O.isUndefined(w)&&w){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{w.error.apply(w,e)}catch(t){O.each(e,(function(e){w.error(e)}))}}}},q=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(L,arguments)}},D=function(e){return{log:q(L.log,e),error:q(L.error,e),critical:q(L.critical,e)}};O.bind=function(e,t){var n,s;if(N&&e.bind===N)return N.apply(e,v.call(arguments,1));if(!O.isFunction(e))throw new TypeError;return n=v.call(arguments,2),s=function(){if(!(this instanceof s))return e.apply(t,n.concat(v.call(arguments)));var i={};i.prototype=e.prototype;var r=new i;i.prototype=null;var o=e.apply(r,n.concat(v.call(arguments)));return Object(o)===o?o:r},s},O.each=function(e,t,n){if(null!=e)if(T&&e.forEach===T)e.forEach(t,n);else if(e.length===+e.length){for(var s=0,i=e.length;s0&&(t[n]=e)})),t},O.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):O.isArray(e)?(n=[],O.each(e,(function(e){n.push(O.truncate(e,t))}))):O.isObject(e)?(n={},O.each(e,(function(e,s){n[s]=O.truncate(e,t)}))):n=e,n},O.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},n=function(e,s){var i="",r=0,o="",a="",u=0,c=i,l=[],d=s[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+=" ",l=[],"[object Array]"===y.apply(d)){for(u=d.length,r=0;r="0"&&r<="9";)t+=r,l();if("."===r)for(t+=".";l()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,l(),"-"!==r&&"+"!==r||(t+=r,l());r>="0"&&r<="9";)t+=r,l();if(e=+t,isFinite(e))return e;c("Bad number")},h=function(){var e,t,n,s="";if('"'===r)for(;l();){if('"'===r)return l(),s;if("\\"===r)if(l(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)n=16*n+e;s+=String.fromCharCode(n)}else{if("string"!=typeof u[r])break;s+=u[r]}else s+=r}c("Bad string")},p=function(){for(;r&&r<=" ";)l()},a=function(){switch(p(),r){case"{":return function(){var e,t={};if("{"===r){if(l("{"),p(),"}"===r)return l("}"),t;for(;r;){if(e=h(),p(),l(":"),Object.hasOwnProperty.call(t,e)&&c('Duplicate key "'+e+'"'),t[e]=a(),p(),"}"===r)return l("}"),t;l(","),p()}}c("Bad object")}();case"[":return function(){var e=[];if("["===r){if(l("["),p(),"]"===r)return l("]"),e;for(;r;){if(e.push(a()),p(),"]"===r)return l("]"),e;l(","),p()}}c("Bad array")}();case'"':return h();case"-":return d();default:return r>="0"&&r<="9"?d():function(){switch(r){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}c('Unexpected "'+r+'"')}()}},function(e){var t;return o=e,i=0,r=" ",t=a(),p(),r&&c("Syntax error"),t}),O.base64Encode=function(e){var t,n,s,i,r,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,u=0,c="",l=[];if(!e)return e;e=O.utf8Encode(e);do{t=(r=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=r>>12&63,s=r>>6&63,i=63&r,l[u++]=o.charAt(t)+o.charAt(n)+o.charAt(s)+o.charAt(i)}while(a127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==a&&(n>t&&(r+=e.substring(t,n)),r+=a,t=n=i+1)}return n>t&&(r+=e.substring(t,e.length)),r},O.UUID=(f=function(){var e,n=1*new Date;if(t.performance&&t.performance.now)e=t.performance.now();else for(e=0;n==1*new Date;)e++;return n.toString(16)+Math.floor(e).toString(16)},function(){var e=(C.height*C.width).toString(16);return f()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=E,s=[],i=0;function r(e,t){var n,i=0;for(n=0;n=4&&(i=r(i,s),s=[]);return s.length>0&&(i=r(i,s)),i.toString(16)}()+"-"+e+"-"+f()});var A=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];O.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function s(t){if(!S.getElementsByTagName)return[];var s,i,r,o,a,u,c,l,d,h,p=t.split(" "),f=[S];for(u=0;u-1){r=(i=s.split("#"))[0];var m=i[1],_=S.getElementById(m);if(!_||r&&_.nodeName.toLowerCase()!=r)return[];f=[_]}else if(s.indexOf(".")>-1){r=(i=s.split("."))[0];var g=i[1];for(r||(r="*"),o=[],a=0,c=0;c-1};break;default:y=function(e){return e.getAttribute(b)}}for(f=[],h=0,c=0;c=3?t[2]:""},properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(E,k.vendor,x),$referrer:S.referrer,$referring_domain:O.info.referringDomain(S.referrer),$device:O.info.device(E)}),{$current_url:t.location.href,$browser_version:O.info.browserVersion(E,k.vendor,x),$screen_height:C.height,$screen_width:C.width,mp_lib:"web",$lib_version:n.LIB_VERSION,$insert_id:U(),time:O.timestamp()/1e3})},people_properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(E,k.vendor,x)}),{$browser_version:O.info.browserVersion(E,k.vendor,x)})},mpPageViewProperties:function(){return O.strip_empty_properties({current_page_title:S.title,current_domain:t.location.hostname,current_url_path:t.location.pathname,current_url_protocol:t.location.protocol,current_url_search:t.location.search})}};var U=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},W=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,$=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Q=function(e){var t=$,n=e.split("."),s=n[n.length-1];(s.length>4||"com"===s||"org"===s)&&(t=W);var i=e.match(t);return i?i[0]:""},V=null,K=null;"undefined"!=typeof JSON&&(V=JSON.stringify,K=JSON.parse),V=V||O.JSONEncode,K=K||O.JSONDecode,O.toArray=O.toArray,O.isObject=O.isObject,O.JSONEncode=O.JSONEncode,O.JSONDecode=O.JSONDecode,O.isBlockedUA=O.isBlockedUA,O.isEmptyObject=O.isEmptyObject,O.info=O.info,O.info.device=O.info.device,O.info.browser=O.info.browser,O.info.browserVersion=O.info.browserVersion,O.info.properties=O.info.properties;var Z=function(){};Z.prototype.create_properties=function(){},Z.prototype.event_handler=function(){},Z.prototype.after_track_handler=function(){},Z.prototype.init=function(e){return this.mp=e,this},Z.prototype.track=function(e,t,n,s){var i=this,r=O.dom_query(e);if(0!==r.length)return O.each(r,(function(e){O.register_event(e,this.override_event,(function(e){var r={},o=i.create_properties(n,this),a=i.mp.get_config("track_links_timeout");i.event_handler(e,this,r),window.setTimeout(i.track_callback(s,o,r,!0),a),i.mp.track(t,o,i.track_callback(s,o,r))}))}),this),!0;L.error("The DOM query ("+e+") returned 0 elements")},Z.prototype.track_callback=function(e,t,n,s){s=s||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(s,t)||i.after_track_handler(t,n,s))}},Z.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):O.extend({},e)};var G=function(){this.override_event="click"};O.inherit(G,Z),G.prototype.create_properties=function(e,t){var n=G.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},G.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},G.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var J=function(){this.override_event="submit"};O.inherit(J,Z),J.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},J.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var X=D("lock"),Y=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Y.prototype.withLock=function(e,t,n){n||"function"==typeof t||(n=t,t=null);var s=n||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),r=this.storageKey,o=this.pollIntervalMS,a=this.timeoutMS,u=this.storage,c=r+":X",l=r+":Y",d=r+":Z",h=function(e){t&&t(e)},p=function(e){if((new Date).getTime()-i>a)return X.error("Timeout waiting for mutex on "+r+"; clearing lock. ["+s+"]"),u.removeItem(d),u.removeItem(l),void _();setTimeout((function(){try{e()}catch(e){h(e)}}),o*(Math.random()+.1))},f=function(e,t){e()?t():p((function(){f(e,t)}))},m=function(){var e=u.getItem(l);if(e&&e!==s)return!1;if(u.setItem(l,s),u.getItem(l)===s)return!0;if(!R(u,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},_=function(){u.setItem(c,s),f(m,(function(){u.getItem(c)!==s?p((function(){u.getItem(l)===s?f((function(){return!u.getItem(d)}),g):_()})):g()}))},g=function(){u.setItem(d,"1");try{e()}finally{u.removeItem(d),u.getItem(l)===s&&u.removeItem(l),u.getItem(c)===s&&u.removeItem(c)}};try{if(!R(u,!0))throw new Error("localStorage support check failed");_()}catch(e){h(e)}};var ee=D("batch"),te=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||O.bind(ee.error,ee),this.lock=new Y(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};te.prototype.enqueue=function(e,t,n){var s={id:U(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(O.bind((function(){var t;try{var i=this.readFromStorage();i.push(s),(t=this.saveToStorage(i))&&this.memQueue.push(s)}catch(n){this.reportError("Error enqueueing item",e),t=!1}n&&n(t)}),this),O.bind((function(e){this.reportError("Error acquiring storage lock",e),n&&n(!1)}),this),this.pid)},te.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengthr.flushAfter&&!s[r.id]&&(r.orphaned=!0,t.push(r),t.length>=e))break}}}return t};var ne=function(e,t){var n=[];return O.each(e,(function(e){e.id&&!t[e.id]&&n.push(e)})),n};te.prototype.removeItemsByID=function(e,t){var n={};O.each(e,(function(e){n[e]=!0})),this.memQueue=ne(this.memQueue,n);var s=O.bind((function(){var t;try{var s=this.readFromStorage();if(s=ne(s,n),t=this.saveToStorage(s)){s=this.readFromStorage();for(var i=0;i5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[i]}),s=!1):this.reportError("[dupe] found item with no ID",{item:e}),s&&o.push(t)}a[e.id]=t}),this),o.length<1)return void this.resetFlush();this.requestInProgress=!0;var u=O.bind((function(n){this.requestInProgress=!1;try{var o=!1;if(e.unloading)this.queue.updatePayloads(a);else if(O.isObject(n)&&"timeout"===n.error&&(new Date).getTime()-s>=t)this.reportError("Network timeout; retrying"),this.flush();else if(O.isObject(n)&&n.xhr_req&&(n.xhr_req.status>=500||429===n.xhr_req.status||"timeout"===n.error)){var u=2*this.flushInterval,c=n.xhr_req.responseHeaders;if(c){var l=c["Retry-After"];l&&(u=1e3*parseInt(l,10)||u)}u=Math.min(6e5,u),this.reportError("Error; retry in "+u+" ms"),this.scheduleFlush(u)}else if(O.isObject(n)&&n.xhr_req&&413===n.xhr_req.status)if(r.length>1){var d=Math.max(1,Math.floor(i/2));this.batchSize=Math.min(this.batchSize,d,r.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",r),this.resetBatchSize(),o=!0;else o=!0;o&&(this.queue.removeItemsByID(O.map(r,(function(e){return e.id})),O.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this)),O.each(r,O.bind((function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})}),this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(c.transport="sendBeacon"),ie.log("MIXPANEL REQUEST:",o),this.sendRequest(o,c,u)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},re.prototype.reportError=function(e,t){if(ie.error.apply(ie.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){ie.error(t)}};var oe="__mp_opt_in_out_";function ae(e,t){ve(!0,e,t)}function ue(e,t){ve(!1,e,t)}function ce(e,t){return"1"===ge(e,t)}function le(e,n){if(function(e){if(e&&e.ignoreDnt)return!1;var n=e&&e.window||t,s=n.navigator||{},i=!1;return O.each([s.doNotTrack,s.msDoNotTrack,n.doNotTrack],(function(e){O.includes([!0,1,"1","yes"],e)&&(i=!0)})),i}(n))return L.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var s="0"===ge(e,n);return s&&L.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),s}function de(e){return ye(e,(function(e){return this.get_config(e)}))}function he(e){return ye(e,(function(e){return this._get_config(e)}))}function pe(e){return ye(e,(function(e){return this._get_config(e)}))}function fe(e,t){me(t=t||{}).remove(_e(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function me(e){return"localStorage"===(e=e||{}).persistenceType?O.localStorage:O.cookie}function _e(e,t){return((t=t||{}).persistencePrefix||oe)+e}function ge(e,t){return me(t).get(_e(e,t))}function ve(e,t,n){O.isString(t)&&t.length?(me(n=n||{}).set(_e(t,n),e?1:0,O.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):L.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function ye(e,t){return function(){var n=!1;try{var s=t.call(this,"token"),i=t.call(this,"ignore_dnt"),r=t.call(this,"opt_out_tracking_persistence_type"),o=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");s&&(n=le(s,{ignoreDnt:i,persistenceType:r,persistencePrefix:o,window:a}))}catch(e){L.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var u=arguments[arguments.length-1];"function"==typeof u&&u(0)}}var be="$set",we="$set_once",ke="$unset",Se="$add",xe="$append",Ce="$union",Ee="$remove",Ne={set_action:function(e,t){var n={},s={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(s[t]=e)}),this):s[e]=t,n[be]=s,n},unset_action:function(e){var t={},n=[];return O.isArray(e)||(e=[e]),O.each(e,(function(e){this._is_reserved_property(e)||n.push(e)}),this),t[ke]=n,t},set_once_action:function(e,t){var n={},s={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(s[t]=e)}),this):s[e]=t,n[we]=s,n},union_action:function(e,t){var n={},s={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(s[t]=O.isArray(e)?e:[e])}),this):s[e]=O.isArray(t)?t:[t],n[Ce]=s,n},append_action:function(e,t){var n={},s={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(s[t]=e)}),this):s[e]=t,n[xe]=s,n},remove_action:function(e,t){var n={},s={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(s[t]=e)}),this):s[e]=t,n[Ee]=s,n},delete_action:function(){var e={$delete:""};return e}},Te=function(){};O.extend(Te.prototype,Ne),Te.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},Te.prototype.set=pe((function(e,t,n){var s=this.set_action(e,t);return O.isObject(e)&&(n=t),this._send_request(s,n)})),Te.prototype.set_once=pe((function(e,t,n){var s=this.set_once_action(e,t);return O.isObject(e)&&(n=t),this._send_request(s,n)})),Te.prototype.unset=pe((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),Te.prototype.union=pe((function(e,t,n){O.isObject(e)&&(n=t);var s=this.union_action(e,t);return this._send_request(s,n)})),Te.prototype.delete=pe((function(e){var t=this.delete_action();return this._send_request(t,e)})),Te.prototype.remove=pe((function(e,t,n){var s=this.remove_action(e,t);return this._send_request(s,n)})),Te.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=O.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},Te.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},Te.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Te.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Te.prototype.remove=Te.prototype.remove,Te.prototype.set=Te.prototype.set,Te.prototype.set_once=Te.prototype.set_once,Te.prototype.union=Te.prototype.union,Te.prototype.unset=Te.prototype.unset,Te.prototype.toString=Te.prototype.toString;var je=function(){};O.extend(je.prototype,Ne),je.prototype._init=function(e){this._mixpanel=e},je.prototype.set=he((function(e,t,n){var s=this.set_action(e,t);return O.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),s[be]=O.extend({},O.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),s[be]),this._send_request(s,n)})),je.prototype.set_once=he((function(e,t,n){var s=this.set_once_action(e,t);return O.isObject(e)&&(n=t),this._send_request(s,n)})),je.prototype.unset=he((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),je.prototype.increment=he((function(e,t,n){var s={},i={};return O.isObject(e)?(O.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void L.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}}),this),n=t):(O.isUndefined(t)&&(t=1),i[e]=t),s[Se]=i,this._send_request(s,n)})),je.prototype.append=he((function(e,t,n){O.isObject(e)&&(n=t);var s=this.append_action(e,t);return this._send_request(s,n)})),je.prototype.remove=he((function(e,t,n){O.isObject(e)&&(n=t);var s=this.remove_action(e,t);return this._send_request(s,n)})),je.prototype.union=he((function(e,t,n){O.isObject(e)&&(n=t);var s=this.union_action(e,t);return this._send_request(s,n)})),je.prototype.track_charge=he((function(e,t,n){if(O.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",O.extend({$amount:e},t),n);L.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),je.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},je.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}L.error("mixpanel.people.delete_user() requires you to call identify() first")},je.prototype.toString=function(){return this._mixpanel.toString()+".people"},je.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),s=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),s&&(e.$user_id=s),i&&(e.$had_persisted_distinct_id=i);var r=O.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:r,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),O.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),O.truncate(r,255))},je.prototype._get_config=function(e){return this._mixpanel.get_config(e)},je.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},je.prototype._enqueue=function(e){be in e?this._mixpanel.persistence._add_to_people_queue(be,e):we in e?this._mixpanel.persistence._add_to_people_queue(we,e):ke in e?this._mixpanel.persistence._add_to_people_queue(ke,e):Se in e?this._mixpanel.persistence._add_to_people_queue(Se,e):xe in e?this._mixpanel.persistence._add_to_people_queue(xe,e):Ee in e?this._mixpanel.persistence._add_to_people_queue(Ee,e):Ce in e?this._mixpanel.persistence._add_to_people_queue(Ce,e):L.error("Invalid call to _enqueue():",e)},je.prototype._flush_one_queue=function(e,t,n,s){var i=this,r=O.extend({},this._mixpanel.persistence._get_queue(e)),o=r;O.isUndefined(r)||!O.isObject(r)||O.isEmptyObject(r)||(i._mixpanel.persistence._pop_from_people_queue(e,r),s&&(o=s(r)),t.call(i,o,(function(t,s){0===t&&i._mixpanel.persistence._add_to_people_queue(e,r),O.isUndefined(n)||n(t,s)})))},je.prototype._flush=function(e,t,n,s,i,r,o){var a=this,u=this._mixpanel.persistence._get_queue(xe),c=this._mixpanel.persistence._get_queue(Ee);if(this._flush_one_queue(be,this.set,e),this._flush_one_queue(we,this.set_once,s),this._flush_one_queue(ke,this.unset,r,(function(e){return O.keys(e)})),this._flush_one_queue(Se,this.increment,t),this._flush_one_queue(Ce,this.union,i),!O.isUndefined(u)&&O.isArray(u)&&u.length){for(var l,d=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(xe,l),O.isUndefined(n)||n(e,t)},h=u.length-1;h>=0;h--)l=u.pop(),O.isEmptyObject(l)||a.append(l,d);a._mixpanel.persistence.save()}if(!O.isUndefined(c)&&O.isArray(c)&&c.length){for(var p,f=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(Ee,p),O.isUndefined(o)||o(e,t)},m=c.length-1;m>=0;m--)p=c.pop(),O.isEmptyObject(p)||a.remove(p,f);a._mixpanel.persistence.save()}},je.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},je.prototype.set=je.prototype.set,je.prototype.set_once=je.prototype.set_once,je.prototype.unset=je.prototype.unset,je.prototype.increment=je.prototype.increment,je.prototype.append=je.prototype.append,je.prototype.remove=je.prototype.remove,je.prototype.union=je.prototype.union,je.prototype.track_charge=je.prototype.track_charge,je.prototype.clear_charges=je.prototype.clear_charges,je.prototype.delete_user=je.prototype.delete_user,je.prototype.toString=je.prototype.toString;var Pe,Ie,Be="__mps",Oe="__mpso",Le="__mpus",qe="__mpa",De="__mpap",Ae="__mpr",Me="__mpu",Re="$people_distinct_id",ze="__alias",Fe="__timers",He=[Be,Oe,Le,qe,De,Ae,Me,Re,ze,Fe],Ue=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(L.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&O.localStorage.is_supported()?this.storage=O.localStorage:this.storage=O.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};Ue.prototype.properties=function(){var e={};return O.each(this.props,(function(t,n){O.include(He,n)||(e[n]=t)})),e},Ue.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=O.extend({},e))}},Ue.prototype.upgrade=function(e){var t,n,s=e.upgrade;s&&(t="mp_super_properties","string"==typeof s&&(t=s),n=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),n&&(this.props=O.extend(this.props,n.all,n.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(n=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(n))),this.storage===O.localStorage&&(n=O.cookie.parse(this.name),O.cookie.remove(this.name),O.cookie.remove(this.name,!0),n&&this.register_once(n))},Ue.prototype.save=function(){this.disabled||this.storage.set(this.name,O.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Ue.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Ue.prototype.clear=function(){this.remove(),this.props={}},Ue.prototype.register_once=function(e,t,n){return!!O.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,O.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},Ue.prototype.register=function(e,t){return!!O.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,O.extend(this.props,e),this.save(),!0)},Ue.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},Ue.prototype.update_search_keyword=function(e){this.register(O.info.searchInfo(e))},Ue.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:O.info.referringDomain(e)||"$direct"},"")},Ue.prototype.get_referrer_info=function(){return O.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Ue.prototype.safe_merge=function(e){return O.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},Ue.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Ue.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Ue.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Ue.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Ue.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Ue.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Ue.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Ue.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),s=t[e],i=this._get_or_create_queue(be),r=this._get_or_create_queue(we),o=this._get_or_create_queue(ke),a=this._get_or_create_queue(Se),u=this._get_or_create_queue(Ce),c=this._get_or_create_queue(Ee,[]),l=this._get_or_create_queue(xe,[]);n===Be?(O.extend(i,s),this._pop_from_people_queue(Se,s),this._pop_from_people_queue(Ce,s),this._pop_from_people_queue(ke,s)):n===Oe?(O.each(s,(function(e,t){t in r||(r[t]=e)})),this._pop_from_people_queue(ke,s)):n===Le?O.each(s,(function(e){O.each([i,r,a,u],(function(t){e in t&&delete t[e]})),O.each(l,(function(t){e in t&&delete t[e]})),o[e]=!0})):n===qe?(O.each(s,(function(e,t){t in i?i[t]+=e:(t in a||(a[t]=0),a[t]+=e)}),this),this._pop_from_people_queue(ke,s)):n===Me?(O.each(s,(function(e,t){O.isArray(e)&&(t in u||(u[t]=[]),u[t]=u[t].concat(e))})),this._pop_from_people_queue(ke,s)):n===Ae?(c.push(s),this._pop_from_people_queue(xe,s)):n===De&&(l.push(s),this._pop_from_people_queue(ke,s)),L.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),L.log(t),this.save()},Ue.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);O.isUndefined(n)||(O.each(t,(function(t,s){e===xe||e===Ee?O.each(n,(function(e){e[s]===t&&delete e[s]})):delete n[s]}),this),this.save())},Ue.prototype._get_queue_key=function(e){return e===be?Be:e===we?Oe:e===ke?Le:e===Se?qe:e===xe?De:e===Ee?Ae:e===Ce?Me:void L.error("Invalid queue:",e)},Ue.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},Ue.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=O.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},Ue.prototype.set_event_timer=function(e,t){var n=this.props[Fe]||{};n[e]=t,this.props[Fe]=n,this.save()},Ue.prototype.remove_event_timer=function(e){var t=(this.props[Fe]||{})[e];return O.isUndefined(t)||(delete this.props[Fe][e],this.save()),t};var We=function(e){return e},$e=function(){},Qe="mixpanel",Ve="base64",Ke="$device:",Ze=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ge=!Ze&&-1===E.indexOf("MSIE")&&-1===E.indexOf("Mozilla"),Je=null;k.sendBeacon&&(Je=function(){return k.sendBeacon.apply(k,arguments)});var Xe={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:Ve,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:$e,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:$e,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Ye=!1,et=function(){},tt=function(e,t,s){var i,r=s===Qe?Ie:Ie[s];if(r&&0===Pe)i=r;else{if(r&&!O.isArray(r))return void L.error("You have already initialized "+s);i=new et}if(i._cached_groups={},i._init(e,t,s),i.people=new je,i.people._init(i),!i.get_config("skip_first_touch_marketing")){var o=O.info.campaignParams(null),a={},u=!1;O.each(o,(function(e,t){a["initial_"+t]=e,e&&(u=!0)})),u&&i.people.set_once(a)}return n.DEBUG=n.DEBUG||i.get_config("debug"),!O.isUndefined(r)&&O.isArray(r)&&(i._execute_array.call(i.people,r.people),i._execute_array(r)),i};et.prototype.init=function(e,t,n){if(O.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==Qe){var s=tt(e,t,n);return Ie[n]=s,s._loaded(),s}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},et.prototype._init=function(e,n,s){n=n||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in n||(n.api_host||Xe.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json");if(this.set_config(O.extend({},Xe,i,n,{name:s,token:e,callback_fn:(s===Qe?s:Qe+"."+s)+"._jsc"})),this._jsc=$e,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(O.localStorage.is_supported(!0)&&Ze){if(this.init_batchers(),Je&&t.addEventListener){var r=O.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);t.addEventListener("pagehide",(function(e){e.persisted&&r()})),t.addEventListener("visibilitychange",(function(){"hidden"===S.visibilityState&&r()}))}}else this._batch_requests=!1,L.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new Ue(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=O.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ke+o,$device_id:o},""),this.get_config("track_pageview")&&this.track_pageview()},et.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},et.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(S.referrer),this.get_config("store_google")&&this.register(O.info.campaignParams(),{persistent:!1}),this.get_config("save_referrer")&&this.persistence.update_referrer_info(S.referrer)},et.prototype._dom_loaded=function(){O.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||O.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},et.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Ye)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},et.prototype._prepare_callback=function(e,t){if(O.isUndefined(e))return null;if(Ze){return function(n){e(n,t)}}var n=this._jsc,s=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+s+"]";return n[s]=function(i){delete n[s],e(i,t)},i},et.prototype._send_request=function(e,t,n,s){var i=!0;if(Ge)return this.__request_queue.push(arguments),i;var r={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},o=null;s||!O.isFunction(n)&&"string"!=typeof n||(s=n,n=null),n=O.extend(r,n||{}),Ze||(n.method="GET");var a="POST"===n.method,u=Je&&a&&"sendbeacon"===n.transport.toLowerCase(),c=n.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),Ze||(s?t.callback=s:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(o="data="+encodeURIComponent(t.data),delete t.data),e+="?"+O.HTTPBuildQuery(t);var l=this;if("img"in t){var d=S.createElement("img");d.src=e,S.body.appendChild(d)}else if(u){try{i=Je(e,o)}catch(e){l.report_error(e),i=!1}try{s&&s(i?1:0)}catch(e){l.report_error(e)}}else if(Ze)try{var h=new XMLHttpRequest;h.open(n.method,e,!0);var p=this.get_config("xhr_headers");if(a&&(p["Content-Type"]="application/x-www-form-urlencoded"),O.each(p,(function(e,t){h.setRequestHeader(t,e)})),n.timeout_ms&&void 0!==h.timeout){h.timeout=n.timeout_ms;var f=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){var e;if(4===h.readyState)if(200===h.status){if(s)if(c){var t;try{t=O.JSONDecode(h.responseText)}catch(e){if(l.report_error(e),!n.ignore_json_errors)return;t=h.responseText}s(t)}else s(Number(h.responseText))}else e=h.timeout&&!h.status&&(new Date).getTime()-f>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(e),s&&s(c?{status:0,error:e,xhr_req:h}:0)},h.send(o)}catch(e){l.report_error(e),i=!1}else{var m=S.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var _=S.getElementsByTagName("script")[0];_.parentNode.insertBefore(m,_)}return i},et.prototype._execute_array=function(e){var t,n=[],s=[],i=[];O.each(e,(function(e){e&&(t=e[0],O.isArray(t)?i.push(e):"function"==typeof e?e.call(this):O.isArray(e)&&"alias"===t?n.push(e):O.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):s.push(e))}),this);var r=function(e,t){O.each(e,(function(e){if(O.isArray(e[0])){var n=t;O.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};r(n,this),r(s,this),r(i,this)},et.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},et.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=O.bind((function(t){return new re("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:O.bind((function(e,n,s){this._send_request(this.get_config("api_host")+t.endpoint,this._encode_data_for_request(e),n,this._prepare_callback(s,e))}),this),beforeSendHook:O.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:O.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},et.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,O.each(this.request_batchers,(function(e){e.start()})))},et.prototype.stop_batch_senders=function(){this._batch_requests=!1,O.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},et.prototype.push=function(e){this._execute_array([e])},et.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},et.prototype._encode_data_for_request=function(e){var t=O.JSONEncode(e);return this.get_config("api_payload_format")===Ve&&(t=O.base64Encode(t)),{data:t}},et.prototype._track_or_batch=function(e,t){var n=O.truncate(e.data,255),s=e.endpoint,i=e.batcher,r=e.should_send_immediately,o=e.send_request_options||{};t=t||$e;var a=!0,u=O.bind((function(){return o.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(L.log("MIXPANEL REQUEST:"),L.log(n),this._send_request(s,this._encode_data_for_request(n),o,this._prepare_callback(t,n))):null}),this);return this._batch_requests&&!r?i.enqueue(n,(function(e){e?t(1,n):u()})):a=u(),a&&n},et.prototype.track=de((function(e,t,n,s){s||"function"!=typeof n||(s=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var r=n.send_immediately;if("function"!=typeof s&&(s=$e),O.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var o=this.persistence.remove_event_timer(e);if(!O.isUndefined(o)){var a=(new Date).getTime()-o;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var u=this.get_config("track_marketing")?O.info.marketingParams():{};t=O.extend({},O.info.properties(),u,this.persistence.properties(),this.unpersisted_superprops,t);var c=this.get_config("property_blacklist");O.isArray(c)?O.each(c,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+c);var l={event:e,properties:t};return this._track_or_batch({type:"events",data:l,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:r,send_request_options:n},s)}s(0)}})),et.prototype.set_group=de((function(e,t,n){O.isArray(t)||(t=[t]);var s={};return s[e]=t,this.register(s),this.people.set(e,t,n)})),et.prototype.add_group=de((function(e,t,n){var s=this.get_property(e);if(void 0===s){var i={};i[e]=[t],this.register(i)}else-1===s.indexOf(t)&&(s.push(t),this.register(i));return this.people.union(e,t,n)})),et.prototype.remove_group=de((function(e,t,n){var s=this.get_property(e);if(void 0!==s){var i=s.indexOf(t);i>-1&&(s.splice(i,1),this.register({group_key:s})),0===s.length&&this.unregister(e)}return this.people.remove(e,t,n)})),et.prototype.track_with_groups=de((function(e,t,n,s){var i=O.extend({},t||{});return O.each(n,(function(e,t){null!=e&&(i[t]=e)})),this.track(e,i,s)})),et.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},et.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},et.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),s=this._cached_groups[n];return void 0!==s&&s._group_key===e&&s._group_id===t||((s=new Te)._init(this,e,t),this._cached_groups[n]=s),s},et.prototype.track_pageview=de((function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",s=O.extend(O.info.mpPageViewProperties(),O.info.campaignParams(),O.info.clickParams()),i=O.extend({},s,e);return this.track(n,i)})),et.prototype.track_links=function(){return this._track_dom.call(this,G,arguments)},et.prototype.track_forms=function(){return this._track_dom.call(this,J,arguments)},et.prototype.time_event=function(e){O.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var nt={persistent:!0},st=function(e){var t;return t=O.isObject(e)?e:O.isUndefined(e)?{}:{days:e},O.extend({},nt,t)};et.prototype.register=function(e,t){var n=st(t);n.persistent?this.persistence.register(e,n.days):O.extend(this.unpersisted_superprops,e)},et.prototype.register_once=function(e,t,n){var s=st(n);s.persistent?this.persistence.register_once(e,t,s.days):(void 0===t&&(t="None"),O.each(e,(function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)}),this))},et.prototype.unregister=function(e,t){(t=st(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},et.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},et.prototype.identify=function(e,t,n,s,i,r,o,a){var u=this.get_distinct_id();if(e&&u!==e){if("string"==typeof e&&0===e.indexOf(Ke))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var c=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==u&&e!==this.get_property(ze)&&(this.unregister(ze),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,s,i,r,o,a),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0})},et.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=O.UUID();this.register_once({distinct_id:Ke+e,$device_id:e},"")},et.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},et.prototype.alias=function(e,t){if(e===this.get_property(Re))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return O.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(ze,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){n.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},et.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},et.prototype.set_config=function(e){O.isObject(e)&&(O.extend(this.config,e),e.batch_size&&O.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),n.DEBUG=n.DEBUG||this.get_config("debug"))},et.prototype.get_config=function(e){return this.config[e]},et.prototype._run_hook=function(e){var t=(this.config.hooks[e]||We).apply(this,v.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},et.prototype.get_property=function(e){return this.persistence.props[e]},et.prototype.toString=function(){var e=this.get_config("name");return e!==Qe&&(e=Qe+"."+e),e},et.prototype._event_is_disabled=function(e){return O.isBlockedUA(E)||this._flags.disable_all_events||O.include(this.__disabled_events,e)},et.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&O.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!O.cookie.get("mp_optout")||(O.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},et.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t&&O.each(this.request_batchers,(function(e){e.clear()}))},et.prototype._gdpr_call_func=function(e,t){return t=O.extend({track:O.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),O.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},et.prototype.opt_in_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(ae,e),this._gdpr_update_persistence(e)},et.prototype.opt_out_tracking=function(e){(e=O.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(ue,e),this._gdpr_update_persistence(e)},et.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ce,e)},et.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(le,e)},et.prototype.clear_opt_in_out_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(fe,e),this._gdpr_update_persistence(e)},et.prototype.report_error=function(e,t){L.error.apply(L.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){L.error(t)}},et.prototype.init=et.prototype.init,et.prototype.reset=et.prototype.reset,et.prototype.disable=et.prototype.disable,et.prototype.time_event=et.prototype.time_event,et.prototype.track=et.prototype.track,et.prototype.track_links=et.prototype.track_links,et.prototype.track_forms=et.prototype.track_forms,et.prototype.track_pageview=et.prototype.track_pageview,et.prototype.register=et.prototype.register,et.prototype.register_once=et.prototype.register_once,et.prototype.unregister=et.prototype.unregister,et.prototype.identify=et.prototype.identify,et.prototype.alias=et.prototype.alias,et.prototype.name_tag=et.prototype.name_tag,et.prototype.set_config=et.prototype.set_config,et.prototype.get_config=et.prototype.get_config,et.prototype.get_property=et.prototype.get_property,et.prototype.get_distinct_id=et.prototype.get_distinct_id,et.prototype.toString=et.prototype.toString,et.prototype.opt_out_tracking=et.prototype.opt_out_tracking,et.prototype.opt_in_tracking=et.prototype.opt_in_tracking,et.prototype.has_opted_out_tracking=et.prototype.has_opted_out_tracking,et.prototype.has_opted_in_tracking=et.prototype.has_opted_in_tracking,et.prototype.clear_opt_in_out_tracking=et.prototype.clear_opt_in_out_tracking,et.prototype.get_group=et.prototype.get_group,et.prototype.set_group=et.prototype.set_group,et.prototype.add_group=et.prototype.add_group,et.prototype.remove_group=et.prototype.remove_group,et.prototype.track_with_groups=et.prototype.track_with_groups,et.prototype.start_batch_senders=et.prototype.start_batch_senders,et.prototype.stop_batch_senders=et.prototype.stop_batch_senders,Ue.prototype.properties=Ue.prototype.properties,Ue.prototype.update_search_keyword=Ue.prototype.update_search_keyword,Ue.prototype.update_referrer_info=Ue.prototype.update_referrer_info,Ue.prototype.get_cross_subdomain=Ue.prototype.get_cross_subdomain,Ue.prototype.clear=Ue.prototype.clear;var it={},rt=function(){Ie.init=function(e,n,s){if(s)return Ie[s]||(Ie[s]=it[s]=tt(e,n,s),Ie[s]._loaded()),Ie[s];var i=Ie;it[Qe]?i=it[Qe]:e&&((i=tt(e,n,Qe))._loaded(),it[Qe]=i),Ie=i,1===Pe&&(t[Qe]=Ie),O.each(it,(function(e,t){t!==Qe&&(Ie[t]=e)})),Ie._=O}};var ot=(Pe=0,Ie=new et,rt(),Ie.init(),function(){function e(){e.done||(e.done=!0,Ye=!0,Ge=!1,O.each(it,(function(e){e._dom_loaded()})))}if(S.addEventListener)"complete"===S.readyState?e():S.addEventListener("DOMContentLoaded",e,!1);else if(S.attachEvent){S.attachEvent("onreadystatechange",e);var n=!1;try{n=null===t.frameElement}catch(e){}S.documentElement.doScroll&&n&&function t(){try{S.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}O.register_event(t,"load",e,!0)}(),Ie);e.exports=ot},5311:function(e){"use strict";e.exports=jQuery}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={id:s,loaded:!1,exports:{}};return e[s](r,r.exports,n),r.loaded=!0,r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=e||{};window.WP_Smush=e,String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),n(3065),n(6111),n(9478),n(7413),n(6453),n(9867),n(6033),n(5445),n(4471),n(3579),n(2140),n(1110),n(1442),n(5972),n(7447),n(4933),n(4334),n(206)}()}();
//# sourceMappingURL=smush-admin.min.js.map