File: /home/j2d7uhbqfejh/public_html/zorgosso.nl/wp-content/plugins/wp-optimize/js/wposmush-4-5-3.min.js
jQuery(function(e){WP_Optimize_Smush=WP_Optimize_Smush()});var WP_Optimize_Smush=function(){function e(e){E(wposmush.server_check),data={server:wposmush.smush_settings.compression_server,skip_notice:!0},S("check_server_status",data,function(s){if(s.online){if(e.each(function(e,s){ie.push({attachment_id:parseInt(s.value),blog_id:wposmush.blog_id})}),data={optimization_id:"smush",selected_images:ie,smush_options:{compression_server:wposmush.smush_settings.compression_server,image_quality:wposmush.smush_settings.image_quality,lossy_compression:wposmush.smush_settings.lossy_compression,back_up_original:wposmush.smush_settings.back_up_original,preserve_exif:wposmush.smush_settings.preserve_exif}},ne=!0,te=!1,oe)return;E("",W.extend(ce,{message:W("#wpo_smush_images_information_container")}),!1,!0),f(),ae=window.setInterval(u,1e3),S("process_bulk_smush",data)}else error_message=s.error?s.error+"<br>"+wposmush.server_error:wposmush.server_error,E(error_message)})}function s(e){ne=!0;var s=[],o=function(o){return function(a){s.push(o),1<s.length&&s.length===e.length?a(wposmush.images_restored_successfully):a()}};e.each(function(e,s){I(wposmush.blog_id,parseInt(s.value),o(parseInt(s.value)))})}function o(){var e=0==W('input[type="checkbox"]:checked',H).length;G.prop("disabled",e),L.prop("disabled",e)}function a(e,s){if(_e){e=e?1:0,s=s?1:0;var o=W("#smush-information-modal-cancel-btn .smush-information");S("mark_all_as_uncompressed",{restore_backup:e,delete_only_backups_meta:s,skip_notice:!0},function(i){if(_e)return i.hasOwnProperty("error")?(E(i.error),void _()):void(i.completed?(E("",W.extend(ce,{message:W("#smush-information-modal")})),W("#smush-information-modal .smush-information").text(i.message),_()):(o.text(i.message),a(e,s)))})}}function t(e,s,o){var a=e.data("blog"),i=e.data("id"),t={attachment_id:i,blog_id:a},n=e.closest("#smush-metabox-inside-wrapper");data={selected_images:[t]},o===!1&&(data.unmark=!0),s.preventDefault(),E(wposmush.please_updating_images_info),S("mark_as_compressed",data,function(e){W("#smush-information-modal .smush-information").text(e.summary),E("",W.extend(ce,{message:W("#smush-information-modal")})),e.status&&(n.length&&(o?(W(".wpo_smush_single_image",n).hide(),W(".wpo-toggle-advanced-options",n).removeClass("opened"),W(".wpo_smush_mark_single_image",n).hide(),W(".wpo_smush_unmark_single_image",n).show(),W(".wpo_restore_single_image",n).show(),W("#smush_info",n).text(e.info)):(W(".wpo_smush_single_image",n).show(),W(".wpo_smush_mark_single_image",n).show(),W(".wpo_smush_unmark_single_image",n).hide(),W(".wpo_restore_single_image",n).hide(),W("#smush_info",n).text(e.info))),e.hasOwnProperty("media_column_html")&&q(a,i,e.media_column_html))})}function n(){W(this).toggleClass("opened"),W(this).hasClass("opened")?W(this).text(wposmush.less):W(this).text(wposmush.more)}function _(e){var e="undefined"==typeof e||e,s={use_cache:e};J.html("..."),z(!0),Q.push(F.add_agent({_wait:!1,_keep:!1,command:"updraft_smush_ajax",command_data:{data:s,subaction:"get_ui_update"},callback:function(e){C(e,l),O(),z(!1),o()}})),le=!0}function m(){W("#wpo_smush_images_grid input:checked").each(function(){image={attachment_id:W(this).val(),blog_id:W(this).data("blog")},ie.push(image)}),data={optimization_id:"smush",selected_images:ie,smush_options:{compression_server:W("input[name='compression_server']:checked").val(),image_quality:W("#image_quality").val(),lossy_compression:W("#smush-lossy-compression").is(":checked"),back_up_original:W("#smush-backup-original").is(":checked"),preserve_exif:W("#smush-preserve-exif").is(":checked")}},g(),Q.push(F.add_agent({_wait:!1,_keep:!1,command:"updraft_smush_ajax",command_data:{data:data,subaction:"process_bulk_smush"}}))}function r(){if(W("#wp-optimize-wrap").length){W("#wpo_smush_images_save_options_spinner").show().delay(3e3).fadeOut();var e=de();S("update_smush_options",e,function(e){W("#wpo_smush_images_save_options_spinner").hide(),e.hasOwnProperty("saved")&&e.saved?W("#wpo_smush_images_save_options_done").show().delay(3e3).fadeOut():W("#wpo_smush_images_save_options_fail").show().delay(3e3).fadeOut()})}}function u(){oe=!0,se++,seconds=se%60+""<10?"0"+se%60:se%60,minutes=parseInt(se/60)+""<10?"0"+parseInt(se/60):parseInt(se/60),W("#smush_stats_timer").text(minutes+":"+seconds),c(se)}function c(e){0==e%3&&p(e),0==e%60&&(null!=T&&(F.cancel_agent(T),T=null),Q.push(F.add_agent({_wait:!1,command:"updraft_smush_ajax",command_data:{data:{},subaction:"process_pending_images"},callback:function(e){C(e,b)}})))}function p(e){data={update_ui:!0,use_cache:!1};var s=e<5,o=F.add_agent({_wait:!s,_keep:!1,command:"updraft_smush_ajax",command_data:{data:data,subaction:"get_ui_update"},callback:function(e){C(e,b)}});null!==o&&(T=o,Q.push(o))}function l(e){if(H.html(""),e&&e.hasOwnProperty("unsmushed_images")){var s=e.unsmushed_images,o=e.pending_tasks,a=0;if(0==s.length&&0==o&&H.text(wposmush.all_images_compressed).wrapInner("<div class='wpo-fieldgroup'> </div>"),1===e.is_multisite)a=ue.find(":selected").val(),d(a,e);else for(a in e.unsmushed_images)d(a,e)}}function h(e,s){return e.id-s.id}function d(e,s){var o="post.php?post=",a="&action=edit",t=s.admin_urls[e],n=s.unsmushed_images[e];"undefined"!=typeof n&&n.sort(h);for(i in n)if(n.hasOwnProperty(i)){var _=n[i];x(_,e,t+o+_.id+a)}}function g(){oe||(E("",W.extend(ce,{message:W("#wpo_smush_images_information_container")}),!1,!0),f(),ae=window.setInterval(u,1e3),z(!0))}function f(){W("#smush_stats_pending_images").html("..."),W("#smush_stats_completed_images").html("..."),W("#smush_stats_bytes_saved").html("..."),W("#smush_stats_percent_saved").html("..."),W("#smush_stats_timer").html("...")}function w(e){for(var s in e)e.hasOwnProperty(s)&&W("#post-"+s+" .column-wpo_smush").html(e[s]);M()}function b(e){W("#smush_stats_pending_images").html(e.pending_tasks),W("#smush_stats_completed_images").html(e.completed_task_count),W("#smush_stats_bytes_saved").html(e.bytes_saved),W("#smush_stats_percent_saved").html(e.percent_saved),1==e.smush_complete&&setTimeout(function(){v(function(){_(!1)})},1500)}function v(e){data={update_ui:!0,use_cache:!1,image_list:ie},function(e){Q.push(F.add_agent({_unique:!1,_wait:!1,_keep:!1,command:"updraft_smush_ajax",command_data:{data:data,subaction:"get_ui_update"},callback:function(s){summary=s.session_stats,s.session_stats&&(0!=s.completed_task_count&&(summary+="<hr>"+s.summary),k(summary),e instanceof Function&&e())}}))}(e)}function k(e){te||(W("#summary-message").html(e),y(),E("",W.extend(ce,{message:W("#smush-complete-summary")})),te=!0,F.cancel_agents(Q))}function y(){se=0,oe=!1,te=!1,ie=[],F.cancel_agents(Q),clearInterval(ae),z(!1)}function x(e,s,o){var a=["wpo_smush_",s,"_",e.id].join("");image_html='<div class="wpo_smush_image" data-filesize="'+e.filesize+'">',image_html+='<a class="button" href="'+o+'" target="_blank"> '+wposmush.view_image+" </a>",image_html+='<input id="'+a+'" type="checkbox" data-blog="'+s+'" class="wpo_smush_image__input" value="'+e.id+'">',image_html+='<label for="'+a+'"></a>',image_html+='<div class="thumbnail">',image_html+='<img class="lazyload" src="'+e.thumb_url+'">',image_html+="</div></label></div>",H.append(image_html)}function O(){features=wposmush.features,service=W("input[name^='compression_server']:checked").val();for(feature in features[service])W("."+feature).prop("disabled",!features[service][feature]);W(".wpo_smush_image").each(function(){W(this).data("filesize")>wposmush.features[service].max_filesize?W(this).hide():W(this).show()})}function z(e){W.each([G,Z,A,N,L],function(s,o){o.prop("disabled",e)}),e?(W("#wpo_smush_images_refresh").hide(),W(".wpo_smush_images_loader").show()):(W("#wpo_smush_images_refresh").show(),W(".wpo_smush_images_loader").hide())}function P(e,s){0!=e.length&&(data={selected_image:e,smush_options:s,skip_notice:!0},E(wposmush.compress_single_image_dialog,{},!1,!0),S("compress_single_image",data,function(e){C(e,j)}))}function I(e,s,o){if(0!=s.length){E(wposmush.please_wait);var a={blog_id:e,selected_image:s};S.apply({unique:!1},["restore_single_image",a,function(e){var s=function(s){"undefined"!=typeof s&&(e.summary=s),C(e,j)};o instanceof Function?o(s):s()}])}}function j(e){if(e.hasOwnProperty("success")&&e.success){W(".smush-information").text(e.summary),E("",W.extend(ce,{message:W("#smush-information-modal")})),W(".wpo-toggle-advanced-options.wpo_smush_single_image").removeClass("opened"),D(e.operation,e.summary,e.restore_possible,e);var s=e.blog_id||e.options.blog_id,o=e.image||e.options.attachment_id;me.hasOwnProperty(s)||(me[s]={}),me[s].hasOwnProperty(o)||(me[s][o]={}),e.hasOwnProperty("media_column_html")&&q(s,o,e.media_column_html),"compress"==e.operation?me[s][o]={operation:e.operation,summary:e.summary,restore_possible:e.restore_possible}:(o&&M(),me[s][o]={operation:e.operation})}else/exceeded_max_filesize/.test(e.error_message)&&(e.error_message=wposmush.exceeded_max_filesize),E(e.error_message,{},4e3)}function q(e,s,o){W(['.wpo-smush-media-library-column[data-blog="',e,'"][data-id="',s,'"]'].join("")).parent().html(o)}function D(e,s,o,a){var i=W("#smush_info").closest("#smush-metabox-inside-wrapper");0!==i.length&&("compress"==e?(W(".wpo_smush_single_image").hide(),W(".wpo_restore_single_image").show(),a&&a.hasOwnProperty("sizes-info")?(W("#smush_info").text(s),W("#wpo_smush_details").html(a["sizes-info"])):(W("#smush_info").text(s),W("#wpo_smush_details").text("").hide()),W(".wpo_smush_mark_single_image").hide(),o?W(".restore_possible").show():W(".restore_possible").hide()):(W(".wpo_smush_single_image").show(),W(".wpo_restore_single_image").hide(),W(".wpo_smush_mark_single_image").show(),W(".wpo_smush_unmark_single_image",i).hide()))}function C(e,s){e&&e.hasOwnProperty("status")&&e.status?s&&s(e):(alert(wposmush.error_unexpected_response),console.log(e))}function U(){return W('input[name="media[]"]:checked')}function K(){var e=[],s=U();return s.each(function(s,o){e.push(parseInt(o.value))}),e}function M(){W("#bulk-action-selector-top, #bulk-action-selector-bottom").val("-1"),W('input[name="media[]"]:checked, #cb-select-all-1, #cb-select-all-2').prop("checked",!1)}function S(e,s,o,a){a="undefined"==typeof a||a;var i=s.hasOwnProperty("skip_notice"),t=i&&1===Object.keys(s).length,n=W.isEmptyObject(s);s=n?{use_cache:!1}:s,t&&(s.use_cache=!1),function(o,i,t){Q.push(F.add_agent({_wait:!1,_keep:i,_unique:t,command:"updraft_smush_ajax",command_data:{data:s,subaction:e},callback:function(e){if(a){try{var s=wpo_parse_json(e)}catch(i){console.log("smush_manager_send_command JSON parse error"),console.log(i),console.log(e),alert(wposmush.error_unexpected_response)}"undefined"!=typeof o&&o(s)}else"undefined"!=typeof o&&o(e)}}))}(o,this.keep,this.unique)}var W=jQuery,F=WP_Optimize_Heartbeat(),Q=[],T=null,E=wp_optimize.block_ui,H=W("#wpo_smush_images_grid"),J=W("#smush_info_images"),N=W("#wpo_smush_images_refresh"),Z=W("#wpo_smush_images_select_all"),A=W("#wpo_smush_images_select_none"),B=W("#wpo_smush_clear_stats_btn"),G=W("#wpo_smush_images_btn"),L=W("#wpo_smush_mark_as_compressed"),R=W("#wpo_smush_mark_all_as_uncompressed_btn"),V=W("#wpo_smush_restore_all_compressed_images_btn"),X=W(".wpo_smush_get_logs"),Y=W("#wpo_smush_delete_backup_btn"),$=W(".compression_server"),ee=W("#wpo_reset_webp_serving_method"),se=0,oe=!1,ae=0,ie=[],te=!1,ne=!1,_e=!1,me={},re=W("#wpo_smush_images_pending_tasks_cancel_button"),ue=W("#wpo_uncompressed_images_sites_select"),ce={baseZ:160001,css:{top:"50%",transform:"translate(0, -50%)",width:"400px",padding:"20px",cursor:"pointer"}};W("#doaction, #doaction2").on("click",function(o){o.stopImmediatePropagation();var a=W(this).prev("select").val();if("wp_optimize_bulk_compression"===a||"wp_optimize_bulk_restore"===a){var i=U();0!==i.length&&(o.preventDefault(),"wp_optimize_bulk_compression"===a&&e(i),"wp_optimize_bulk_restore"===a&&s(i))}}),H.on("click",".thumbnail",function(e){W(this).closest('input[type="checkbox"]').prop("checked",!0)});var pe=!1;H.on("mousedown",".thumbnail",function(e){pe=e.shiftKey||e.ctrlKey}),H.on("mouseup",".thumbnail",function(e){pe=e.shiftKey||e.ctrlKey}),ee.on("click",function(e){e.preventDefault(),S("reset_webp_serving_method",{skip_notice:!0},function(e){e.success?W("#wpo_reset_webp_serving_method_done").show().delay(3e3).fadeOut():(W("#enable_webp_conversion").prop("checked",!1),W("#smush-information-modal .smush-information").text(e.error_message),E("",W.extend(ce,{message:W("#smush-information-modal")}),!1,!0))})});var le=!1;W("#wp-optimize-nav-tab-wrapper__wpo_images .nav-tab").on("click",function(){le||W(this).is("#wp-optimize-nav-tab-wpo_images-smush")&&_(!1)}),W("#wp-optimize-wrap").on("page-change",function(e,s){le||"wpo_images"==s.page&&W("#wp-optimize-nav-tab-wrapper__wpo_images .nav-tab-active").is("#wp-optimize-nav-tab-wpo_images-smush")&&_(!1)}),W("#smush-metabox").length>0&&O();var he=null;H.on("click",".wpo_smush_image",function(e){var s=W('#wpo_smush_images_grid input[type="checkbox"]'),a=W(this).find(".wpo_smush_image__input"),i=!a.prop("checked");if(he||(W(this).find(".wpo_smush_image__input").prop("checked",i),he=a),!0===pe){var t=s.index(a),n=s.index(he);t===n?s.slice(Math.min(t,n),Math.max(t,n)+1).prop("checked",i):!0===he.prop("checked")&&s.slice(Math.min(t,n),Math.max(t,n)+1).prop("checked",i)}he=a,o()}),o(),$.on("change",function(e){O(),r()}),G.off().on("click",function(){return 0==W('#wpo_smush_images_grid input[type="checkbox"]:checked').length?void E(wposmush.please_select_images):(E(wposmush.server_check),data={server:W("input[name='compression_server']:checked").val(),skip_notice:!0},void S("check_server_status",data,function(e){e.online?m():(error_message=e.error?e.error+"<br>"+wposmush.server_error:wposmush.server_error,E(error_message))}))}),L.off().on("click",function(){var e,s=[];W("#wpo_smush_images_grid input:checked").each(function(){e={attachment_id:W(this).val(),blog_id:W(this).data("blog")},s.push(e)}),E(wposmush.please_updating_images_info),S("mark_as_compressed",{selected_images:s},function(e){W("#smush-information-modal .smush-information").text(e.summary),E("",W.extend(ce,{message:W("#smush-information-modal")})),_(!1)})}),R.on("click",function(){if(confirm(wposmush.mark_all_images_uncompressed)){var e=confirm(wposmush.restore_images_from_backup);E(wposmush.please_wait),_e=!0,a(e)}}),V.on("click",function(){confirm(wposmush.restore_all_compressed_images)&&(E(wposmush.please_wait),_e=!0,a(!0,!0))}),W('#smush-information-modal-cancel-btn input[type="button"]').on("click",function(){_e=!1,_(),W.unblockUI()}),N.off().on("click",function(){_(!1)}),Z.off().on("click",function(){W('#wpo_smush_images_grid input[type="checkbox"]').prop("checked",!0),he=null,o()}),A.off().on("click",function(){W('#wpo_smush_images_grid input[type="checkbox"]').prop("checked",!1),he=null,o()}),X.off().on("click",function(){W("#log-panel").text("Please wait, fetching logs."),S("get_smush_logs",{},function(e){W.blockUI({message:W("#smush-log-modal"),onOverlayClick:W.unblockUI(),css:{width:"80%",height:"80%",top:"15%",left:"15%"}}),W("#log-panel").html("<pre>"+e+"</pre>"),download_link=ajaxurl+"?action=updraft_smush_ajax&subaction=get_smush_logs&nonce="+wposmush.smush_ajax_nonce,W("#smush-log-modal a").attr("href",download_link)},!1)}),Y.on("click",function(){if(confirm(wposmush.delete_image_backup_confirm)){Y.prop("disabled",!0);var e=W("#wpo_smush_delete_backup_spinner"),s=W("#wpo_smush_delete_backup_done");e.show(),S("clean_all_backup_images",{},function(){e.hide(),Y.prop("disabled",!1),s.css("display","inline-block").delay(3e3).fadeOut()})}}),B.off().on("click",function(e){W("#wpo_smush_images_clear_stats_spinner").show().delay(3e3).fadeOut(),S("clear_smush_stats",{},function(e){W("#wpo_smush_images_clear_stats_spinner").hide(),W("#wpo_smush_images_clear_stats_done").show().delay(3e3).fadeOut()})}),W("body").on("click","#wpo_smush_images_pending_tasks_cancel_button",function(e){wposmush.cancel===re.val()&&(re.val(wposmush.cancelling),re.prop("disabled",!0)),S("clear_pending_images",{restore_images:ie},function(e){W.unblockUI(),e.status?(_(),y()):console.log("Cancelling pending images apparently failed.",e),re.val(wposmush.cancel),re.prop("disabled",!1)})}),W(".column-wpo_smush").on("click",".wpo-smush-compress-popup-btn",function(e){var s=W(this).data("id"),o=W(this).data("blog");e.preventDefault(),S("get_smush_settings_form",{attachment_id:s,blog_id:o},function(e){if(e.success){var a=['<div class="wpo-smush-compress-popup-content">',"<h3>",wposmush.compress_image,"</h3>",e.html,"</div>",'<div class="wpo_smush_single_image action_button" style="display:inline-block;">','<input type="button" data-blog="',o,'" data-id="',s,'" id="smush_compress_',s,'" class="button-primary button" value="',wposmush.compress,'">',"</div>"," ",'<a href="#" class="button wpo-smush-popup-cancel-btn">',wposmush.close,"</a>"].join("");E("",W.extend(ce,{message:a}))}})}),W("body").on("click",".wpo-smush-popup-cancel-btn",function(e){e.preventDefault(),W.unblockUI()}),W("body").on("click",".wpo_smush_single_image .button",function(){image={attachment_id:W(this).data("id"),blog_id:W(this).data("blog")},W("#enable_custom_compression").is(":checked")?image_quality=W("#custom_compression_slider").val():image_quality=W("#enable_lossy_compression").is(":checked")?60:92,lossy_compression=image_quality<92,smush_options={compression_server:W("input[name='compression_server_"+image.attachment_id+"']:checked").val(),image_quality:image_quality,lossy_compression:lossy_compression,back_up_original:W("#smush_backup_"+image.attachment_id).is(":checked"),preserve_exif:W("#smush_exif_"+image.attachment_id).is(":checked")},data={server:W("input[name='compression_server_"+W(this).attr("id").substring(15)+"']:checked").val()},E(wposmush.server_check),S("check_server_status",data,function(e){e.online?P(image,smush_options):(error_message=e.error?e.error+"<br>"+wposmush.server_error:wposmush.server_error,E(error_message))})}),W("body").on("click",".wpo_restore_single_image .button, .wpo_restore_single_image a",function(e){var s=W(this);blog_id=s.data("blog"),image_id=s.data("id"),e.preventDefault(),image_id&&blog_id&&I(blog_id,image_id)}),W("body").on("click",".wpo_smush_mark_single_image .button, .wpo_smush_mark_single_image a",function(e){t(W(this),e,!0)}),W("body").on("click",".wpo_smush_unmark_single_image .button, .wpo_smush_unmark_single_image a",function(e){t(W(this),e,!1)}),W("body").on("click","#wpo_smush_details .wpo-collapsible",n),W("body").on("click",".column-wpo_smush .wpo-collapsible",n),W("body").on("click","#smush-log-modal .close, #smush-information-modal .information-modal-close",function(){W.unblockUI(),ne&&M()}),W("body").on("click",".wpo_smush_stats_cta_btn, .wpo_smush_get_logs, #smush-complete-summary .close",function(){if(W.unblockUI(),ne){var e=K();S("get_smush_details",{selected_images:e},function(e){e.success?(window.clearInterval(ae),w(e.smush_details)):console.log(e)})}else _(),setTimeout(y,500)}),W("body").on("click",".wpo-toggle-advanced-options",function(e){e.preventDefault(),W(this).toggleClass("opened")}),W(".wpo-fieldgroup .autosmush input, .wpo-fieldgroup .compression_level, .wpo-fieldgroup .image_options, #smush-show-metabox").on("change",function(e){r()}),W("body").on("change",".smush-options.compression_level",function(){W("#enable_custom_compression").is(":checked")?W(".smush-options.custom_compression").show():W(".smush-options.custom_compression").hide()}),W("body").on("change",'.smush-advanced input[type="radio"]',function(){O()}),W("#enable_webp_conversion").on("change",function(e){if(W("#wp-optimize-wrap").length){W("#wpo_smush_images_save_options_spinner").show().delay(3e3).fadeOut(),W("#enable_webp_conversion").prop("disabled",!0);var s=de();s.skip_notice=!0,S("update_webp_options",s,function(e){if(W("#wpo_smush_images_save_options_spinner").hide(),e.hasOwnProperty("saved")&&e.saved)W("#wpo_smush_images_save_options_done").show().delay(3e3).fadeOut();else{if(W("#enable_webp_conversion").prop("checked",!1),"update_failed_no_working_webp_converter"===e.error_code){var s="<p>"+wposmush.webp_conversion_tool_error+' <a href="https://teamupdraft.com/documentation/wp-optimize/topics/image-compression/troubleshooting/the-webp-conversion-tool-is-not-working/" target="_blank">'+wposmush.webp_conversion_tool_how_to+"</a></p>";W("#smush-information-modal .smush-information").html(s)}else W("#smush-information-modal .smush-information").text(e.error_message);E("",W.extend(ce,{message:W("#smush-information-modal")}),!1,!0)}W("#enable_webp_conversion").prop("disabled",!1)})}}),W("body").on("click",".wpo_smush.column-wpo_smush .convert-to-webp",function(e){e.preventDefault();var s=W(this);data={attachment_id:W(this).data("attachment-id"),skip_notice:!0},E(wposmush.converting_to_webp,{},0,!0),S("convert_to_webp_format",data,function(e){e.error?E(e.error,{},2e3):(E(e.success,{},2e3),s.next().remove(),s.prev().is(".wpo-action-separator")&&s.prev().remove(),s.remove())})}),ue.on("change",function(){_()}),W(document).on("admin-metabox-smush-loaded",function(){var e=W('.wpo_restore_single_image input[type="button"]').first().data();if(e&&me.hasOwnProperty(e.blog)&&me[e.blog].hasOwnProperty(e.id)){var s=me[e.blog][e.id];"compress"==s.operation?D(s.operation,s.summary,s.restore_possible,s):D(s.operation)}}),F.setup();var de=function(){var e="";e=W("#enable_custom_compression").is(":checked")?W("#custom_compression_slider").val():W("#enable_lossy_compression").is(":checked")?60:92;var s=e<92;return{compression_server:W("input[name='compression_server']:checked").val(),image_quality:e,lossy_compression:s,back_up_original:W("#smush-backup-original").is(":checked"),back_up_delete_after:W("#smush-backup-delete").is(":checked"),back_up_delete_after_days:W("#smush-backup-delete-days").val(),preserve_exif:W("#smush-preserve-exif").is(":checked"),autosmush:W("#smush-automatically").is(":checked"),show_smush_metabox:W("#smush-show-metabox").is(":checked"),webp_conversion:W("#enable_webp_conversion").is(":checked")}};wp_optimize.smush_settings=de};