%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/bulk.min.js

window.imagify=window.imagify||{},function(a,b){var c=a.propHooks.checked;a.propHooks.checked={set:function(b,d,e){var f;return f=void 0===c?b[e]=d:c(b,d,e),a(b).trigger("change.imagify"),f}},a.fn.imagifyHide=function(b,c){return b&&b>0?this.hide(b,function(){a(this).addClass("hidden").css("display",""),void 0!==c&&c()}):(this.addClass("hidden"),void 0!==c&&c()),this.attr("aria-hidden","true")},a.fn.imagifyShow=function(b,c){return void 0!==c&&c(),b&&b>0?this.show(b,function(){a(this).removeClass("hidden").css("display","")}):this.removeClass("hidden"),this.attr("aria-hidden","false")}}(jQuery),function(a,b,c,d){c.imagify.bulk={charts:{overview:{canvas:!1,donut:!1,data:{labels:[imagifyBulk.labels.overviewChartLabels.unoptimized,imagifyBulk.labels.overviewChartLabels.optimized,imagifyBulk.labels.overviewChartLabels.error],datasets:[{data:[],backgroundColor:["#10121A","#46B1CE","#C51162"],borderWidth:0}]}},files:{donuts:{}},share:{canvas:!1,donut:!1}},folderTypesQueue:[],status:{},displayedWaitMessage:!1,hasMultipleRows:!0,imagifyAction:"",processIsStopped:!1,processingMedia:[],globalGain:0,globalOriginalSize:0,globalOptimizedSize:0,folderTypesData:{},defaultThumb:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhBAMAAAClyt9cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtQTFRFR3BMjo6Oh4eHqqqq4uLigoKC+fn5fn5+fHx8SBBv5wAAAAF0Uk5TAEDm2GYAAABWSURBVCjPY2BgEBIEAyERBhgQUoKAIAc0EXXjEDQRRTNzBzRdBokhaGoM2CQc0NQwJJegqWFgM3VAUSNsbGwugCKiqBQUpIAiAgICoyIDKyIIB0JAEQA54jRBweNV0AAAAABJRU5ErkJggg==",init:function(){var d=a(b);this.drawOverviewChart(),this.hasMultipleRows=a('.imagify-bulk-table [name="group[]"]').length>1,a(".imagify-selector-button").on("click.imagify",this.openSelectorFromButton),a(".imagify-selector-list input").on("change.imagify init.imagify",this.syncSelectorFromRadio).filter(":checked").trigger("init.imagify"),d.on("keypress.imagify click.imagify",this.closeSelectors),a('.imagify-bulk-table [name="group[]"]').on("change.imagify init.imagify",this.toggleOptimizationButton).trigger("init.imagify"),a(".imagify-show-table-details").on("click.imagify open.imagify close.imagify",this.toggleOptimizationDetails),a("#imagify-bulk-action").on("click.imagify",this.maybeLaunchAllProcesses),a(".imagify-share-networks a").on("click.imagify",this.share),a(c).on("processQueue.imagify",this.processQueue).on("optimizeFiles.imagify",this.optimizeFiles).on("queueEmpty.imagify",this.queueEmpty),imagifyBulk.ajaxActions.getStats&&a('.imagify-bulk-table [data-group-id="library"][data-context="wp"]').length&&(imagifyBulk.imagifybeatIDs.stats=!1),imagifyBulk.imagifybeatIDs.stats&&d.on("imagifybeat-send",this.addStatsImagifybeat).on("imagifybeat-tick",this.processStatsImagifybeat),d.on("imagifybeat-send",this.addQueueImagifybeat).on("imagifybeat-tick",this.processQueueImagifybeat),d.on("imagifybeat-send",this.addRequirementsImagifybeat).on("imagifybeat-tick",this.processRequirementsImagifybeat)},getAjaxUrl:function(a,b){var d=ajaxurl+c.imagify.concat+"_wpnonce="+imagifyBulk.ajaxNonce+"&action="+imagifyBulk.ajaxActions[a];return b&&b.context&&(d+="&context="+b.context),"getMediaIds"!==a&&"bulkProcess"!==a||(d+="&imagify_action="+c.imagify.bulk.imagifyAction),d},getFolderTypes:function(){return a.isEmptyObject(c.imagify.bulk.folderTypesData)?(a(".imagify-row-folder-type").each(function(){var b=a(this),d={groupID:b.data("group-id"),context:b.data("context")},e=d.groupID+"|"+d.context;c.imagify.bulk.folderTypesData[e]=d}),c.imagify.bulk.folderTypesData):c.imagify.bulk.folderTypesData},getConfirmMessage:function(){return imagifyBulk.labels.processing},closeLevelSelector:function(a,b){if(a&&a.length)return void 0!==b&&b>0?void c.setTimeout(function(){c.imagify.bulk.closeLevelSelector(a)},b):void a.attr("aria-hidden","true")},stopProcess:function(b,d){this.processIsStopped=!0,c.imagify.bulk.status[d.groupID]={isError:!0,id:b},a(c).trigger("queueEmpty.imagify")},hasBlockingError:function(b){return b=void 0!==b&&b,imagifyBulk.curlMissing?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.curlMissing}),!0):imagifyBulk.editorMissing?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.editorMissing}),!0):imagifyBulk.extHttpBlocked?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.extHttpBlocked}),!0):imagifyBulk.apiDown?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.apiDown}),!0):imagifyBulk.keyIsValid?!!imagifyBulk.isOverQuota&&(b&&c.imagify.bulk.displayError({title:imagifyBulk.labels.overQuotaTitle,html:a("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}),!0):(b&&c.imagify.bulk.displayError({title:imagifyBulk.labels.invalidAPIKeyTitle,type:"info"}),!0)},displayError:function(b,c,d){var e={title:"",html:"",type:"error",customClass:"",width:620,padding:0,showCloseButton:!0,showConfirmButton:!0};a.isPlainObject(b)?d=a.extend({},e,b):(d=d||{},d=a.extend({},e,{title:b||"",html:c||""},d)),d.title=d.title||imagifyBulk.labels.error,d.customClass+=" imagify-sweet-alert",swal(d).catch(swal.noop)},displayErrorInRow:function(b,c){var d,e;return b=a(b()),d=b.find(".imagify-cell-status ~ td"),e=d.length,c=c||"",d.remove(),b.find(".imagify-cell-status").after('<td colspan="'+e+'">'+c+"</td>"),b},displayFolderRow:function(a,b){var d,e,f,g;return"resting"===a?(b.next(".imagify-row-waiting, .imagify-row-working").remove(),void b.imagifyShow()):(d=b.next(".imagify-row-waiting, .imagify-row-working"),"waiting"===a?(f="#d2d3d6",g=imagifyBulk.labels.waitingOtimizationsText):(f="#40b1d0",g=imagifyBulk.labels.imagesOptimizedText.replace("%s","<span>0</span>")),d.length?(d.hasClass("imagify-row-"+a)||(d.attr("class","imagify-row-"+a),d.find(".imagify-cell-checkbox svg").attr("fill",f),d.children(".imagify-cell-count-optimized").html(g)),b.imagifyHide(),void d.imagifyShow()):(d=b.clone().attr({class:"imagify-row-"+a,"aria-hidden":"false"}),e=c.imagify.template("imagify-spinner"),d.children(".imagify-cell-checkbox").html(e()).find("svg").attr("fill",f),d.children(".imagify-cell-title").html('<span class="imagify-cell-label">'+d.children(".imagify-cell-title").text()+"</span>"),d.children(".imagify-cell-count-optimized").html(g),d.children(".imagify-cell-count-errors, .imagify-cell-optimized-size, .imagify-cell-original-size, .imagify-cell-level").text(""),void b.imagifyHide().after(d)))},displayShareBox:function(){var b,d,e,f,g=imagifyBulk.labels.textToShare;if(!this.globalGain||this.folderTypesQueue.length)return this.globalGain=0,this.globalOriginalSize=0,void(this.globalOptimizedSize=0);b=(100-this.globalOptimizedSize/this.globalOriginalSize*100).toFixed(2),d=c.imagify.humanSize(this.globalGain,1),e=c.imagify.humanSize(this.globalOriginalSize,1),g=g.replace("%1$s",d),g=g.replace("%2$s",e),g=encodeURIComponent(g),f=a(".imagify-row-complete"),f.find(".imagify-ac-rt-total-gain").html(d),f.find(".imagify-ac-rt-total-original").html(e),f.find(".imagify-ac-chart").attr("data-percent",b),f.find(".imagify-sn-twitter").attr("href",imagifyBulk.labels.twitterShareURL+"&amp;text="+g),this.drawShareChart(),f.addClass("done").imagifyShow(),a("html, body").animate({scrollTop:f.offset().top},200),this.globalGain=0,this.globalOriginalSize=0,this.globalOptimizedSize=0},updateStats:function(b){var d;b&&a.isPlainObject(b)&&(c.imagify.bulk.charts.overview.donut.data&&(d=c.imagify.bulk.charts.overview.donut.data.datasets[0].data,b.unoptimized_attachments===d[0]&&b.optimized_attachments===d[1]&&b.errors_attachments===d[2])||(b.unconsumed_quota=b.unconsumed_quota.toFixed(1),a(".imagify-meteo-icon").html(b.quota_icon),a(".imagify-unconsumed-percent").html(b.unconsumed_quota+"%"),a(".imagify-unconsumed-bar").css("width",b.unconsumed_quota+"%").parent().attr("class",b.quota_class),a("#imagify-overview-chart-percent").html(b.optimized_attachments_percent+"<span>%</span>"),a(".imagify-total-percent").html(b.optimized_attachments_percent+"%"),c.imagify.bulk.drawOverviewChart([b.unoptimized_attachments,b.optimized_attachments,b.errors_attachments]),a("#imagify-total-optimized-attachments").html(b.already_optimized_attachments),a("#imagify-original-bar").find(".imagify-barnb").html(b.original_human),a("#imagify-optimized-bar").css("width",100-b.optimized_percent+"%").find(".imagify-barnb").html(b.optimized_human),a("#imagify-total-optimized-attachments-pct").html(b.optimized_percent+"%")))},openSelectorFromButton:function(b){var c=a("#"+a(this).attr("aria-controls"));b.stopPropagation(),a(".imagify-selector-list").not(c).attr("aria-hidden","true"),c.attr("aria-hidden","false").find(":checked").trigger("focus.imagify")},syncSelectorFromRadio:function(){var b=a(this).closest(".imagify-selector-choice");b.addClass("imagify-selector-current-value").attr("aria-current","true").siblings(".imagify-selector-choice").removeClass("imagify-selector-current-value").attr("aria-current","false"),b.closest(".imagify-selector-list").siblings(".imagify-selector-button").find(".imagify-selector-current-value-info").html(b.find("label").html())},closeSelectors:function(b){"keypress"===b.type&&27!==b.keyCode&&13!==b.keyCode||c.imagify.bulk.closeLevelSelector(a('.imagify-selector-list[aria-hidden="false"]'))},toggleOptimizationButton:function(){if(!c.imagify.bulk.hasMultipleRows&&!this.checked)return void a(this).prop("checked",!0);a('.imagify-bulk-table [name="group[]"]:checked').length?a("#imagify-bulk-action").prop("disabled",!1):a("#imagify-bulk-action").prop("disabled",!0)},toggleOptimizationDetails:function(b){var c,d=a(this),e=d.closest(".imagify-bulk-table").find(".imagify-bulk-table-details");c="open"===b.type||"close"!==b.type&&e.hasClass("hidden"),c?(d.html(d.data("label-hide")+'<span class="dashicons dashicons-no-alt"></span>'),e.imagifyShow()):(d.html(d.data("label-show")+'<span class="dashicons dashicons-menu"></span>'),e.imagifyHide())},maybeLaunchAllProcesses:function(){var b;if(!a(this).prop("disabled")&&a('.imagify-bulk-table [name="group[]"]:checked').length&&!c.imagify.bulk.hasBlockingError(!0)){if(b=a("#tmpl-imagify-bulk-infos"),!b.length)return void c.imagify.bulk.launchAllProcesses();swal({title:imagifyBulk.labels.bulkInfoTitle,html:b.html(),type:"",customClass:"imagify-sweet-alert imagify-swal-has-subtitle imagify-before-bulk-infos",showCancelButton:!0,padding:0,width:554,confirmButtonText:imagifyBulk.labels.confirmBulk,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){var d=a('.imagify-bulk-table [name="group[]"]:checked').first().closest(".imagify-row-folder-type");a.get(c.imagify.bulk.getAjaxUrl("bulkInfoSeen",{context:d.data("context")})),b.remove(),c.imagify.bulk.launchAllProcesses()}).catch(swal.noop)}},launchAllProcesses:function(){var b=a(c),d=a("#imagify-bulk-action"),e=!0;d.prop("disabled",!0).find(".dashicons").addClass("rotate"),b.on("beforeunload",this.getConfirmMessage),a(".imagify-row-complete").imagifyHide(200,function(){a(this).removeClass("done")}),a(".imagify-show-table-details").trigger("close.imagify"),this.folderTypesQueue=[],this.status={},this.displayedWaitMessage=!1,this.processIsStopped=!1,this.imagifyAction="optimize",this.globalGain=0,this.globalOriginalSize=0,this.globalOptimizedSize=0,a('.imagify-bulk-table [name="group[]"]:checked').each(function(){var b=a(this),d=b.closest(".imagify-row-folder-type"),f=d.data("group-id"),g=d.data("context"),h=d.find('.imagify-cell-level [name="level['+f+']"]:checked').val();if(c.imagify.bulk.folderTypesQueue.push({groupID:f,context:g,level:void 0===h?-1:parseInt(h,10)}),c.imagify.bulk.status[f]={isError:!1,id:"waiting"},e)return e=!1,!0;c.imagify.bulk.displayFolderRow("waiting",d)}),c.imagify.beat.interval(15),c.imagify.beat.disableSuspend(),b.trigger("processQueue.imagify")},processQueue:function(){var b,d;if(!c.imagify.bulk.processIsStopped){if(!c.imagify.bulk.folderTypesQueue.length)return void a(c).trigger("queueEmpty.imagify");c.imagify.bulk.displayedWaitMessage||(swal({title:imagifyBulk.labels.waitTitle,html:imagifyBulk.labels.waitText,showConfirmButton:!1,padding:0,imageUrl:imagifyBulk.waitImageUrl,customClass:"imagify-sweet-alert"}).catch(swal.noop),c.imagify.bulk.displayedWaitMessage=!0),d=c.imagify.bulk.folderTypesQueue.shift(),b=a("#cb-select-"+d.groupID).closest(".imagify-row-folder-type"),c.imagify.bulk.status[d.groupID].id="fetching",c.imagify.bulk.displayFolderRow("working",b),a.get(c.imagify.bulk.getAjaxUrl("getMediaIds",d)).done(function(e){var f;if(swal.close(),!c.imagify.bulk.processIsStopped){if(f=e.data&&e.data.message?e.data.message:imagifyBulk.ajaxErrorText,!e.success)return void c.imagify.bulk.stopProcess(f,d);if(!e.data||!a.isPlainObject(e.data)&&!a.isArray(e.data))return void c.imagify.bulk.stopProcess(f,d);if(!a.isEmptyObject(e.data))return void a(c).trigger("optimizeFiles.imagify",[d,e.data]);if(c.imagify.bulk.status[d.groupID].id="no-images",c.imagify.bulk.hasMultipleRows&&a("#cb-select-"+d.groupID).prop("checked",!1),!c.imagify.bulk.folderTypesQueue.length)return void a(c).trigger("queueEmpty.imagify");c.imagify.bulk.displayFolderRow("resting",b),a(c).trigger("processQueue.imagify")}}).fail(function(){c.imagify.bulk.stopProcess("get-unoptimized-images",d)})}},optimizeFiles:function(b,d,e){var f,g,h,i,j,k,l,m,n,o,p,q={groupID:d.groupID,mediaID:0,thumbnail:"",filename:"",status:"",icon:"",label:"",thumbnailsCount:"",originalSizeHuman:"",newSizeHuman:"",percentHuman:"",overallSavingHuman:""};c.imagify.bulk.processIsStopped||(f=a("#cb-select-"+d.groupID).closest(".imagify-row-folder-type"),g=f.next(".imagify-row-working"),i=g.find(".imagify-cell-count-errors span"),o=parseInt(i.text(),10),j=f.closest(".imagify-bulk-table"),k=j.find(".imagify-row-progress"),l=k.find(".bar"),"optimize"===c.imagify.bulk.imagifyAction&&(h=g.find(".imagify-cell-count-optimized span"),n=parseInt(h.text(),10)),c.imagify.bulk.status[d.groupID].id="optimizing",j.find(".imagify-bulk-table-details thead").html(a("#tmpl-imagify-file-header-"+d.groupID).html()),m=j.find(".imagify-bulk-table-details tbody").text(""),l.css("width","0%").find(".percent").text("0%"),k.slideDown().attr("aria-hidden","false"),p=new c.imagify.Optimizer({groupID:d.groupID,context:d.context,level:d.level,bufferSize:imagifyBulk.bufferSizes[d.context],ajaxUrl:c.imagify.bulk.getAjaxUrl("bulkProcess",d),files:e,defaultThumb:c.imagify.bulk.defaultThumb,doneEvent:"mediaProcessed.imagify"}),p.before(function(b){var e;c.imagify.bulk.processIsStopped||(e=c.imagify.template("imagify-file-row-"+d.groupID),c.imagify.bulk.processingMedia.push({context:d.context,mediaID:b.mediaID}),m.prepend(e(a.extend({},q,b,{status:"compressing",icon:"admin-generic rotate",label:imagifyBulk.labels.optimizing}))))}),p.each(function(b){var e,f;if(!c.imagify.bulk.processIsStopped){if(e=c.imagify.template("imagify-file-row-"+d.groupID),f=a("#"+d.groupID+"-"+b.mediaID),a.each(c.imagify.bulk.processingMedia,function(a,e){return e.context!==d.context||e.mediaID!==b.mediaID||(c.imagify.bulk.processingMedia.splice(a,1),!1)}),l.css("width",b.progress+"%").find(".percent").html(b.progress+"%"),b.success)return"already-optimized"!==b.status?(f.replaceWith(e(a.extend({},q,b,{status:"complete",icon:"yes",label:imagifyBulk.labels.complete}))),c.imagify.bulk.drawFileChart(a("#"+d.groupID+"-"+b.mediaID).find(".imagify-cell-percentage canvas"))):f.replaceWith(c.imagify.bulk.displayErrorInRow(e(a.extend({},q,b,{status:"complete",icon:"yes",label:imagifyBulk.labels.alreadyOptimized})),b.error)),void("optimize"===c.imagify.bulk.imagifyAction&&(n+=1,h.text(n)));f.replaceWith(c.imagify.bulk.displayErrorInRow(e(a.extend({},q,b,{status:"error",icon:"dismiss",label:imagifyBulk.labels.error})),b.error||b)),i.length?(o+=1,i.text(o)):(o=1,i=g.find(".imagify-cell-count-errors").html(imagifyBulk.labels.imagesErrorText.replace("%s","<span>1</span>")).find("span")),"over-quota"===b.status&&(p.stopProcess(),c.imagify.bulk.stopProcess(b.status,d))}}),p.done(function(b){c.imagify.bulk.hasMultipleRows&&a("#cb-select-"+d.groupID).prop("checked",!1),b.globalOriginalSize&&(c.imagify.bulk.globalGain+=parseInt(b.globalGain,10),c.imagify.bulk.globalOriginalSize+=parseInt(b.globalOriginalSize,10),c.imagify.bulk.globalOptimizedSize+=parseInt(b.globalOptimizedSize,10)),c.imagify.bulk.processIsStopped||(c.imagify.beat.resetInterval(),c.imagify.beat.enableSuspend(),a.isEmptyObject(c.imagify.bulk.status)||c.imagify.bulk.status[d.groupID].isError||(c.imagify.bulk.status[d.groupID].id="done"),f.addClass("updating"),a.get(c.imagify.bulk.getAjaxUrl("getFolderData",d)).done(function(b){c.imagify.bulk.processIsStopped||(b.success&&a.each(b.data,function(a,b){f.children(".imagify-cell-"+a).html(b)}),c.imagify.bulk.displayFolderRow("resting",f))}).always(function(){c.imagify.bulk.processIsStopped||(f.removeClass("updating"),c.imagify.bulk.folderTypesQueue.length?a(c).trigger("processQueue.imagify"):a(c).trigger("queueEmpty.imagify"))}))}),p.run())},queueEmpty:function(){var b=a(".imagify-bulk-table"),d={},e=!1,f=!0,g="";c.imagify.beat.resetInterval(),c.imagify.beat.enableSuspend(),c.imagify.bulk.displayShareBox(),c.imagify.bulk.folderTypesQueue=[],imagifyBulk.imagifybeatIDs.stats||a.get(c.imagify.bulk.getAjaxUrl("getStats"),{types:c.imagify.bulk.getFolderTypes()}).done(function(a){a.success&&c.imagify.bulk.updateStats(a.data)}),a.isEmptyObject(c.imagify.bulk.status)||(a.each(c.imagify.bulk.status,function(a,b){return b.isError?(e=b.id,f=!1,!1):"no-images"!==b.id?(f=!1,!1):void 0}),e?("invalid-api-key"===e?d={title:imagifyBulk.labels.invalidAPIKeyTitle,type:"info"}:"over-quota"===e?d={title:imagifyBulk.labels.overQuotaTitle,html:a("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}:"get-unoptimized-images"!==e&&"consumed-all-data"!==e||(d={title:imagifyBulk.labels.getUnoptimizedImagesErrorTitle,html:imagifyBulk.labels.getUnoptimizedImagesErrorText,type:"info"}),c.imagify.bulk.displayError(d)):f&&(g=imagifyBulk.labels.nothingToDoText.hasOwnProperty(c.imagify.bulk.imagifyAction)?imagifyBulk.labels.nothingToDoText[c.imagify.bulk.imagifyAction]:imagifyBulk.labels.nothingToDoText.optimize,c.imagify.bulk.displayError({title:imagifyBulk.labels.nothingToDoTitle,html:g,type:"info"}))),c.imagify.bulk.status={},a(c).off("beforeunload",c.imagify.bulk.getConfirmMessage),c.imagify.bulk.displayFolderRow("resting",b.find(".imagify-row-folder-type").not(".updating")),b.find(".imagify-row-progress").slideUp().attr("aria-hidden","true").find(".bar").removeAttr("style").find(".percent").text("0%"),a('.imagify-bulk-table [name="group[]"]:checked').length?a("#imagify-bulk-action").prop("disabled",!1).find(".dashicons").removeClass("rotate"):a("#imagify-bulk-action").find(".dashicons").removeClass("rotate")},share:function(a){var d,e;a.preventDefault(),c.innerWidth?(d=(c.innerWidth-700)/2,e=(c.innerHeight-290)/2):(d=(b.body.clientWidth-700)/2,e=(b.body.clientHeight-290)/2),c.open(this.href,"","status=no, scrollbars=no, menubar=no, top="+e+", left="+d+", width=700, height=290")},addStatsImagifybeat:function(a,b){b[imagifyBulk.imagifybeatIDs.stats]=Object.keys(c.imagify.bulk.getFolderTypes())},processStatsImagifybeat:function(a,b){void 0!==b[imagifyBulk.imagifybeatIDs.stats]&&c.imagify.bulk.updateStats(b[imagifyBulk.imagifybeatIDs.stats])},addQueueImagifybeat:function(a,b){c.imagify.bulk.processingMedia.length&&(b[imagifyBulk.imagifybeatIDs.queue]=c.imagify.bulk.processingMedia)},processQueueImagifybeat:function(b,d){void 0!==d[imagifyBulk.imagifybeatIDs.queue]&&a.each(d[imagifyBulk.imagifybeatIDs.queue],function(b,d){a(c).trigger("mediaProcessed.imagify",[d])})},addRequirementsImagifybeat:function(a,b){b[imagifyBulk.imagifybeatIDs.requirements]=1},processRequirementsImagifybeat:function(a,b){void 0!==b[imagifyBulk.imagifybeatIDs.requirements]&&(b=b[imagifyBulk.imagifybeatIDs.requirements],imagifyBulk.curlMissing=b.curl_missing,imagifyBulk.editorMissing=b.editor_missing,imagifyBulk.extHttpBlocked=b.external_http_blocked,imagifyBulk.apiDown=b.api_down,imagifyBulk.keyIsValid=b.key_is_valid,imagifyBulk.isOverQuota=b.is_over_quota)},drawOverviewChart:function(d){var e,f;if(this.charts.overview.canvas||(this.charts.overview.canvas=b.getElementById("imagify-overview-chart"),this.charts.overview.canvas)){if(d=d&&a.isArray(d)?d:[],this.charts.overview.donut)return void(d.length&&(0===d.reduce(function(a,b){return a+b},0)&&(d[0]=1),this.charts.overview.donut.data.datasets[0].data=d,this.charts.overview.donut.update()));this.charts.overview.data.datasets[0].data=[parseInt(this.charts.overview.canvas.getAttribute("data-unoptimized"),10),parseInt(this.charts.overview.canvas.getAttribute("data-optimized"),10),parseInt(this.charts.overview.canvas.getAttribute("data-errors"),10)],e=a.extend({},this.charts.overview.data),d.length&&(e.datasets[0].data=d),0===e.datasets[0].data.reduce(function(a,b){return a+b},0)&&(e.datasets[0].data[0]=1),this.charts.overview.donut=new c.imagify.Chart(this.charts.overview.canvas,{type:"doughnut",data:e,options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{displayColors:!1,callbacks:{label:function(a,b){return b.datasets[a.datasetIndex].data[a.index]}}},responsive:!1,cutoutPercentage:85}}),f='<ul class="imagify-doughnut-legend">',a.each(e.labels,function(a,b){f+='<li><span style="background-color:'+e.datasets[0].backgroundColor[a]+'"></span>'+b+"</li>"}),f+="</ul>",b.getElementById("imagify-overview-chart-legend").innerHTML=f}},drawFileChart:function(b){var d=this.charts.files.donuts;b.each(function(){var b=parseInt(a(this).closest(".imagify-chart").next(".imagipercent").text().replace("%",""),10);if(void 0!==d[this.id])return d[this.id].data.datasets[0].data[0]=b,d[this.id].data.datasets[0].data[1]=100-b,void d[this.id].update();d[this.id]=new c.imagify.Chart(this,{type:"doughnut",data:{datasets:[{data:[b,100-b],backgroundColor:["#00B3D3","#D8D8D8"],borderColor:"#fff",borderWidth:1}]},options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{enabled:!1},responsive:!1}})}),this.charts.files.donuts=d},drawShareChart:function(){var d;if(this.charts.share.canvas||(this.charts.share.canvas=b.getElementById("imagify-ac-chart"),this.charts.share.canvas)){if(d=parseInt(a(this.charts.share.canvas).closest(".imagify-ac-chart").attr("data-percent"),10),this.charts.share.donut)return this.charts.share.donut.data.datasets[0].data[0]=d,this.charts.share.donut.data.datasets[0].data[1]=100-d,void this.charts.share.donut.update();this.charts.share.donut=new c.imagify.Chart(this.charts.share.canvas,{type:"doughnut",data:{datasets:[{data:[d,100-d],backgroundColor:["#40B1D0","#FFFFFF"],borderWidth:0}]},options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{enabled:!1},responsive:!1,cutoutPercentage:70}})}}},c.imagify.bulk.init()}(jQuery,document,window);

Zerion Mini Shell 1.0