jQuery(document).ready(function(a){"use strict";a(".wpsr-reviews-wrapper").each(function(){var r=("."+a(this).attr("class")).match(/wpsr-reviews-(\d+)/),e=null;r&&(e=r[1]);var t=window.wpsr_ajax_params.upload_url,i={action:"wpsr_review_resize_images",id:e,platforms:document.querySelector(".wpsr-reviews-".concat(e)).getAttribute("data-platforms").split(","),nonce:window.wpsr_ajax_params&&window.wpsr_ajax_params.wpsr_nonce?window.wpsr_ajax_params.wpsr_nonce:""};a.ajax({url:window.wpsr_ajax_params.ajax_url,type:"post",data:i}).done(function(r){if(r){var e=r.match(/({[^{}]+})/g),i=JSON.parse(e);i.images_data&&jQuery(".wpsr-all-reviews").find(".wpsr-review-template").each(function(r){var e=a(this),s=e.attr("data-source_id"),w=e.attr("data-media_id"),n=e.attr("data-image_resize"),o=e.attr("data-review_platform");if(w){w=w.toString();var p=window.wpsr_ajax_params.image_settings.image_format;if(o&&s&&i.images_data.includes(w)){var d=t+"/"+o+"/"+s+"/"+w+"_"+n+"."+p;e.find(".wpsr-reviewer-avatar").attr("src",d),e.find(".wpsr-reviewer-image-url").removeClass("wpsr-reviewer-image-animation")}}})}}).fail(function(a){console.error(a)}).always(function(){})})});