%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/buggydubrovnik.com/wp-content/plugins/imagify/assets/js/
Upload File :
Create Path :
Current File : /var/www/html/buggydubrovnik.com/wp-content/plugins/imagify/assets/js/options.min.js

window.imagify=window.imagify||{},function(a,b,c,d){var e=!1,f=!1;a("#imagify-settings #api_key").on("blur.imagify",function(){var b=a(this),d=b.val();return""!==a.trim(d)&&(a("#check_api_key").val()===d?(a("#imagify-check-api-container").html('<span class="dashicons dashicons-yes"></span> '+imagifyOptions.labels.ValidApiKeyText),!1):(!0===e?f.abort():(a("#imagify-check-api-container").remove(),b.after('<span id="imagify-check-api-container"><span class="imagify-spinner"></span>'+imagifyOptions.labels.waitApiKeyCheckText+"</span>")),e=!0,void(f=a.get(ajaxurl+c.imagify.concat+"action=imagify_check_api_key_validity&api_key="+b.val()+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(b){b.success?(a("#imagify-check-api-container").remove(),swal({title:imagifyOptions.labels.ApiKeyCheckSuccessTitle,html:imagifyOptions.labels.ApiKeyCheckSuccessText,type:"success",padding:0,customClass:"imagify-sweet-alert"}).then(function(){location.reload()})):a("#imagify-check-api-container").html('<span class="dashicons dashicons-no"></span> '+b.data),e=!1}))))}),a(".imagify-options-line").css("cursor","pointer").on("click.imagify",function(b){"INPUT"!==b.target.nodeName&&a('input[aria-describedby="'+a(this).attr("id")+'"]').trigger("click.imagify")}),a(".imagify-settings th span").on("click.imagify",function(){var b=a(this).parent().next("td").find(":checkbox");1===b.length&&b.trigger("click.imagify")}),a(".imagify-options-line").find("input").on("change.imagify focus.imagify",function(){var b;("checkbox"!==this.type||this.checked)&&(b=a(this).closest(".imagify-options-line").prev("label").prev(":checkbox"),b.length&&!b[0].checked&&b.prop("checked",!0))}),a('[name="imagify_settings[backup]"]').on("change.imagify",function(){var b=a(this),c=b.siblings("#backup-dir-is-writable"),d={action:"imagify_check_backup_dir_is_writable",_wpnonce:c.data("nonce")};if(b.is(":checked"))return void a.getJSON(ajaxurl,d).done(function(b){a.isPlainObject(b)&&b.success&&(b.data.is_writable?c.addClass("hidden"):c.removeClass("hidden"))});swal({title:imagifyOptions.labels.noBackupTitle,html:imagifyOptions.labels.noBackupText,type:"warning",customClass:"imagify-sweet-alert",padding:0,showCancelButton:!0,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){c.addClass("hidden")},function(){b.prop("checked",!0)})}),a('[name="imagify_settings[display_webp_method]"]').on("change.imagify init.imagify",function(b){"picture"===b.target.value?a(b.target).closest(".imagify-radio-group").next(".imagify-options-line").removeClass("imagify-faded"):a(b.target).closest(".imagify-radio-group").next(".imagify-options-line").addClass("imagify-faded")}).filter(":checked").trigger("init.imagify")}(jQuery,document,window),function(a,b,c,d){a.imagifyUser&&c.getJSON(ajaxurl,a.imagifyUser).done(function(a){c.isPlainObject(a)&&a.success&&(a.data.id=null,a.data.plan_id=null,a.data.is=[],c.each(a.data,function(b,d){var e=".imagify-user-"+b.replace(/_/g,"-");0===b.indexOf("is_")?d&&a.data.is.push(e):"is"!==b&&c(e).text(d)}),a.data.is.push("best-plan"),c(a.data.is.join(",")).removeClass("hidden"))})}(window,document,jQuery),function(a,b,c,d){function e(b){var d,e,f,g,h,i=!1,j=null;b&&(f=c("#imagify-custom-folders-selected"),g=f.find(".imagify-custom-folder-line"),h=g.find('[value="'+b+'"]'),h.length||(b=b.split("#///#"),d=b[1].replace(/\/+$/,"").toLowerCase(),e=a.imagify.template("imagify-custom-folder"),g.each(function(){var a=c(this),h=a.data("path").replace(/\/+$/,"").toLowerCase();return""!==h&&0===d.indexOf(h)?(i=!0,!1):d<h?(a.before(e({value:b[0],label:b[1]})),g=f.find(".imagify-custom-folder-line"),i=!0,!1):void 0}),i||(f.append(e({value:b[0],label:b[1]})),g=f.find(".imagify-custom-folder-line")),""!==d&&g.each(function(){var a=c(this),b=a.data("path").toLowerCase();null!==j&&0===b.indexOf(j)?a.find(".imagify-custom-folders-remove").trigger("click.imagify"):j=b}),f.next(".hidden").removeClass("hidden")))}imagifyOptions.getFilesTree&&(c("#imagify-add-custom-folder").on("click.imagify",function(){var a,b=c(this),d=[];b.prop("disabled")||(b.prop("disabled",!0).next("img").attr("aria-hidden","false"),a=c("#imagify-custom-folders-selected"),a.find("input").each(function(){d.push(this.value)}),c.post(imagifyOptions.getFilesTree,{folder:"/",selected:d},null,"json").done(function(a){if(!a.success)return void swal({title:imagifyOptions.labels.error,html:a.data||"",type:"error",padding:0,customClass:"imagify-sweet-alert"});swal({title:imagifyOptions.labels.filesTreeTitle,html:'<div class="imagify-swal-subtitle">'+imagifyOptions.labels.filesTreeSubTitle+'</div><div class="imagify-swal-content"><p class="imagify-folders-information"><i class="dashicons dashicons-info" aria-hidden="true"></i>'+imagifyOptions.labels.cleaningInfo+'</p><ul id="imagify-folders-tree" class="imagify-folders-tree">'+a.data+"</ul></div>",type:"",customClass:"imagify-sweet-alert imagify-swal-has-subtitle  imagify-folders-selection",showCancelButton:!0,padding:0,confirmButtonText:imagifyOptions.labels.confirmFilesTreeBtn,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){var a=c("#imagify-folders-tree input").serializeArray();a.length&&c.each(a,function(a,b){e(b.value)})}).catch(swal.noop)}).fail(function(){swal({title:imagifyOptions.labels.error,type:"error",customClass:"imagify-sweet-alert",padding:0})}).always(function(){b.prop("disabled",!1).next("img").attr("aria-hidden","true")}))}),c(b).on("click.imagify","#imagify-folders-tree [data-folder]",function(){var a=c(this),b=a.nextAll(".imagify-folders-sub-tree"),d=[];if(!a.prop("disabled")&&!a.siblings(":checkbox").is(":checked")){if(a.prop("disabled",!0).addClass("imagify-loading"),b.length)return a.hasClass("imagify-is-open")?(b.addClass("hidden"),a.removeClass(" imagify-is-open")):(b.removeClass("hidden"),a.addClass("imagify-is-open")),void a.prop("disabled",!1).removeClass("imagify-loading");c("#imagify-custom-folders-selected").find("input").each(function(){d.push(this.value)}),c.post(imagifyOptions.getFilesTree,{folder:a.data("folder"),selected:d},null,"json").done(function(b){if(!b.success)return void swal({title:imagifyOptions.labels.error,html:b.data||"",type:"error",padding:0,customClass:"imagify-sweet-alert"});a.addClass("imagify-is-open").parent().append('<ul class="imagify-folders-sub-tree">'+b.data+"</ul>")}).fail(function(){swal({title:imagifyOptions.labels.error,type:"error",padding:0,customClass:"imagify-sweet-alert"})}).always(function(){a.prop("disabled",!1).removeClass("imagify-loading")})}}),c("#imagify-custom-folders").on("click.imagify",".imagify-custom-folders-remove",function(){var b=c(this).closest(".imagify-custom-folder-line").addClass("imagify-will-remove");a.setTimeout(function(){b.remove(),c("#imagify-custom-folders-selected").siblings(".imagify-success.hidden").removeClass("hidden")},750)}),c("#imagify-add-themes-to-custom-folder").on("click.imagify",function(){var a=c(this);e(a.data("theme")),e(a.data("theme-parent")),a.replaceWith("<p>"+imagifyOptions.labels.themesAdded+"</p>")}))}(window,document,jQuery),function(a,b,c,d){imagifyOptions.bulk&&(a.imagify.optionsBulk={fetchQueue:[],queue:[],processingQueue:[],fetchError:!1,error:!1,working:!1,processIsStopped:!0,processedMedia:0,totalMedia:0,$button:null,$progressWrap:null,$progressBar:null,$progressText:null,init:function(){this.$button=c("#imagify-generate-webp-versions"),this.$progressWrap=this.$button.siblings(".imagify-progress"),this.$progressBar=this.$progressWrap.find(".bar"),this.$progressText=this.$progressBar.find(".percent"),c("#imagify_convert_to_webp").on("change.imagify init.imagify",{imagifyOptionsBulk:this},this.toggleButton).trigger("init.imagify"),this.$button.on("click.imagify",{imagifyOptionsBulk:this},this.maybeLaunchAllProcesses),c(b).on("imagifybeat-send",{imagifyOptionsBulk:this},this.addQueueImagifybeat).on("imagifybeat-tick",{imagifyOptionsBulk:this},this.processQueueImagifybeat).on("imagifybeat-send",this.addRequirementsImagifybeat).on("imagifybeat-tick",{imagifyOptionsBulk:this},this.processRequirementsImagifybeat)},toggleButton:function(a){this.checked?a.data.imagifyOptionsBulk.$button.prop("disabled",!1):a.data.imagifyOptionsBulk.$button.prop("disabled",!0)},maybeLaunchAllProcesses:function(b){b.data.imagifyOptionsBulk&&!b.data.imagifyOptionsBulk.working&&(b.data.imagifyOptionsBulk.hasBlockingError(!0)||(b.data.imagifyOptionsBulk.fetchQueue=imagifyOptions.bulk.contexts.slice(),b.data.imagifyOptionsBulk.queue=[],b.data.imagifyOptionsBulk.processingQueue=[],b.data.imagifyOptionsBulk.fetchError=!1,b.data.imagifyOptionsBulk.error=!1,b.data.imagifyOptionsBulk.working=!0,b.data.imagifyOptionsBulk.processIsStopped=!1,b.data.imagifyOptionsBulk.processedMedia=0,b.data.imagifyOptionsBulk.totalMedia=0,b.data.imagifyOptionsBulk.$button.prop("disabled",!0).find(".dashicons").addClass("rotate"),c(a).on("beforeunload.imagify",b.data.imagifyOptionsBulk.getConfirmMessage),a.imagify.beat.interval(15),a.imagify.beat.disableSuspend(),b.data.imagifyOptionsBulk.fetchIDs()))},getConfirmMessage:function(){return imagifyOptions.bulk.labels.processing},addQueueImagifybeat:function(a,b){a.data.imagifyOptionsBulk&&a.data.imagifyOptionsBulk.processingQueue.length&&(b[imagifyOptions.bulk.imagifybeatIDs.queue]=a.data.imagifyOptionsBulk.processingQueue)},processQueueImagifybeat:function(a,b){a.data.imagifyOptionsBulk&&void 0!==b[imagifyOptions.bulk.imagifybeatIDs.queue]&&c.each(b[imagifyOptions.bulk.imagifybeatIDs.queue],function(b,c){a.data.imagifyOptionsBulk.mediaProcessed(c)})},addRequirementsImagifybeat:function(a,b){b[imagifyOptions.bulk.imagifybeatIDs.requirements]=1},processRequirementsImagifybeat:function(a,b){a.data.imagifyOptionsBulk&&void 0===b[imagifyOptions.bulk.imagifybeatIDs.requirements]||(b=b[imagifyOptions.bulk.imagifybeatIDs.requirements],imagifyOptions.bulk.curlMissing=b.curl_missing,imagifyOptions.bulk.editorMissing=b.editor_missing,imagifyOptions.bulk.extHttpBlocked=b.external_http_blocked,imagifyOptions.bulk.apiDown=b.api_down,imagifyOptions.bulk.keyIsValid=b.key_is_valid,imagifyOptions.bulk.isOverQuota=b.is_over_quota)},fetchIDs:function(){var a,b;if(!this.processIsStopped){if(!this.fetchQueue.length)return this.queue.length?(this.$progressBar.removeAttr("style"),this.$progressText.text("0"+(this.totalMedia?"/"+this.totalMedia:"")),this.$progressWrap.slideDown().attr("aria-hidden","false"),void this.processQueue()):(this.fetchError||(this.fetchError="no-images"),this.stopProcess(this.fetchError),void(this.fetchError=!1));a=this,b=this.fetchQueue.shift(),c.get(this.getAjaxUrl("getMediaIds",b)).done(function(d){var e;if(!a.processIsStopped)return e=d.data&&d.data.message?d.data.message:imagifyOptions.bulk.ajaxErrorText,d.success&&c.isArray(d.data)?void(d.data.length&&(a.totalMedia+=d.data.length,a.queue.push({context:b,optimizeURL:a.getAjaxUrl("bulkProcess",b),mediaIDs:d.data}))):void(a.fetchError||(a.fetchError=e))}).fail(function(){a.fetchError||(a.fetchError="get-unoptimized-images")}).always(function(){a.fetchIDs()})}},processQueue:function(){var a=this;this.processIsStopped||(this.queue.length||this.processingQueue.length)&&c.each(this.queue,function(b,d){if(a.processingQueue.length>=imagifyOptions.bulk.bufferSize)return!1;c.each(d.mediaIDs,function(){if(a.processMedia({context:d.context,mediaID:d.mediaIDs.shift(),optimizeURL:d.optimizeURL}),d.mediaIDs.length||a.queue.shift(),a.processingQueue.length>=imagifyOptions.bulk.bufferSize)return!1})})},processMedia:function(a){var b=this,d={context:a.context,mediaID:a.mediaID};this.processingQueue.push({context:a.context,mediaID:a.mediaID}),c.post({url:a.optimizeURL,data:{media_id:a.mediaID,context:a.context},dataType:"json"}).done(function(a){a.success||b.mediaProcessed(d)}).fail(function(){b.mediaProcessed(d)})},mediaProcessed:function(a){var b=this;this.processIsStopped||(c.each(this.processingQueue,function(c,d){if(a.context===d.context&&a.mediaID===d.mediaID)return b.processingQueue.splice(c,1),!1}),++this.processedMedia,a.progress=Math.floor(this.processedMedia/this.totalMedia*100),this.$progressBar.css("width",a.progress+"%"),this.$progressText.text(this.processedMedia+"/"+this.totalMedia),this.queue.length||this.processingQueue.length?this.processQueue():this.totalMedia===this.processedMedia&&this.queueEmpty())},queueEmpty:function(){var b={};!1!==this.error&&(b="invalid-api-key"===this.error?{title:imagifyOptions.bulk.labels.invalidAPIKeyTitle,type:"info"}:"over-quota"===this.error?{title:imagifyOptions.bulk.labels.overQuotaTitle,html:c("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}:"get-unoptimized-images"===this.error||"consumed-all-data"===this.error?{title:imagifyOptions.bulk.labels.getUnoptimizedImagesErrorTitle,html:imagifyOptions.bulk.labels.getUnoptimizedImagesErrorText,type:"info"}:"no-images"===this.error?{title:imagifyOptions.bulk.labels.nothingToDoTitle,html:imagifyOptions.bulk.labels.nothingToDoText,type:"info"}:"no-backup"===this.error?{title:imagifyOptions.bulk.labels.nothingToDoTitle,html:imagifyOptions.bulk.labels.nothingToDoNoBackupText,type:"info"}:{title:imagifyOptions.bulk.labels.error,html:this.error,type:"info"},this.displayError(b),this.error=!1),this.fetchQueue=[],this.queue=[],this.processingQueue=[],this.fetchError=!1,this.working=!1,this.processIsStopped=!1,this.processedMedia=0,this.totalMedia=0,a.imagify.beat.resetInterval(),a.imagify.beat.enableSuspend(),c(a).off("beforeunload.imagify",this.getConfirmMessage),this.$progressWrap.slideUp().attr("aria-hidden","true"),this.$progressBar.removeAttr("style"),this.$progressText.text("0"),this.$button.prop("disabled",!1).find(".dashicons").removeClass("rotate")},hasBlockingError:function(a){return a=void 0!==a&&a,imagifyOptions.bulk.curlMissing?(a&&this.displayError({html:imagifyOptions.bulk.labels.curlMissing}),!0):imagifyOptions.bulk.editorMissing?(a&&this.displayError({html:imagifyOptions.bulk.labels.editorMissing}),!0):imagifyOptions.bulk.extHttpBlocked?(a&&this.displayError({html:imagifyOptions.bulk.labels.extHttpBlocked}),!0):imagifyOptions.bulk.apiDown?(a&&this.displayError({html:imagifyOptions.bulk.labels.apiDown}),!0):imagifyOptions.bulk.keyIsValid?!!imagifyOptions.bulk.isOverQuota&&(a&&this.displayError({title:imagifyOptions.bulk.labels.overQuotaTitle,html:c("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}),!0):(a&&this.displayError({title:imagifyOptions.bulk.labels.invalidAPIKeyTitle,type:"info"}),!0)},displayError:function(a,b,d){var e={title:"",html:"",type:"error",customClass:"",width:620,padding:0,showCloseButton:!0,showConfirmButton:!0};c.isPlainObject(a)?d=c.extend({},e,a):(d=d||{},d=c.extend({},e,{title:a||"",html:b||""},d)),d.title=d.title||imagifyOptions.bulk.labels.error,d.customClass+=" imagify-sweet-alert",swal(d).catch(swal.noop)},getAjaxUrl:function(b,c){var d;return d=ajaxurl+a.imagify.concat+"_wpnonce="+imagifyOptions.bulk.ajaxNonce,d+="&action="+imagifyOptions.bulk.ajaxActions[b],d+="&context="+c,d+="&imagify_action=generate_webp"},stopProcess:function(a){this.processIsStopped=!0,this.error=a,this.queueEmpty()}},a.imagify.optionsBulk.init())}(window,document,jQuery),function(a,b,c,d){var e=c.propHooks.checked;c.propHooks.checked={set:function(a,b,d){var f;return f=void 0===e?a[d]=b:e(a,b,d),c(a).trigger("change.imagify"),f}},c(".imagify-select-all").on("click.imagify",function(){var a=c(this),b=a.data("action"),d=a.closest(".imagify-select-all-buttons"),e=d.prev(".imagify-check-group"),f="imagify-is-inactive";if(a.hasClass(f))return!1;d.find(".imagify-select-all").removeClass(f).attr("aria-disabled","false"),a.addClass(f).attr("aria-disabled","true"),e.find(".imagify-row-check").prop("checked",function(){return!c(this).is(":hidden,:disabled")&&"select"===b})}),c(".imagify-check-group .imagify-row-check").on("change.imagify",function(){var a=c(this).closest(".imagify-check-group"),b=a.find(".imagify-row-check"),d=b.filter(":visible:enabled").length,e=b.filter(":visible:enabled:checked").length,f=a.next(".imagify-select-all-buttons"),g="imagify-is-inactive";0===e&&f.find('[data-action="unselect"]').addClass(g).attr("aria-disabled","true"),e===d&&f.find('[data-action="select"]').addClass(g).attr("aria-disabled","true"),e!==d&&e>0&&f.find(".imagify-select-all").removeClass(g).attr("aria-disabled","false")})}(window,document,jQuery);

Zerion Mini Shell 1.0