PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/polo-family.com/wp-content/plugins/woo-photo-reviews/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/polo-family.com/wp-content/plugins/woo-photo-reviews/js/script.min.js

jQuery(document).ready((function(e){let r=woocommerce_photo_reviews_params.hasOwnProperty("comments_container_id")?woocommerce_photo_reviews_params.comments_container_id:"comments",t=e("#"+r);function a(){t=e("#"+r),(e(".wcpr-filter-container").length>0&&0===t.find(".wcpr-filter-container").length||e(".wcpr-overall-rating-and-rating-count").length>0&&0===t.find(".wcpr-overall-rating-and-rating-count").length)&&t.prepend(e(".wcpr-filter-container")).prepend(e(".wcpr-overall-rating-and-rating-count")).prepend(e(".woocommerce-Reviews-title").eq(0))}t.length>0?a():e(document).on("skeleton-loaded",(function(){a()})),e(window).on("load",(function(){a()})),e(document).on("click",".reviews_tab",(function(){a()}));let o=woocommerce_photo_reviews_params.max_files;function i(e,r,t=""){let a,o=`<img title="${r}" src="${e}" class="wcpr-selected-image-preview">`;return a=t?`<div class="wcpr-selected-image">${o}<div class="wcpr-selected-image-info"><div class="wcpr-selected-image-name wcpr-comment-form-error" >${t}</div></div></div>`:`<div class="wcpr-selected-image">${o}<div class="wcpr-selected-image-info"><div class="wcpr-selected-image-name" title="${r}">${r}</div></div></div>`,a}e("#commentform").on("change",".wcpr_image_upload",(function(r){if(e(this).parent().find(".wcpr-selected-image-container").html(""),this.files.length>o)return alert(woocommerce_photo_reviews_params.warning_max_files),e(this).val(""),!1;this.files.length>0&&function(r){let t=1024*parseFloat(woocommerce_photo_reviews_params.max_file_size);for(let o=0;o<r.files.length;o++){var a=new FileReader;a.onload=function(a){let n="";-1===woocommerce_photo_reviews_params.upload_allow.indexOf(r.files[o].type)?n=woocommerce_photo_reviews_params.warning_upload_allow.replace("%file_name%",r.files[o].name):r.files[o].size>t&&(n=woocommerce_photo_reviews_params.warning_max_file_size.replace("%file_name%",r.files[o].name)),e(r).parent().find(".wcpr-selected-image-container").append(i(a.target.result,r.files[o].name,n))},a.readAsDataURL(r.files[o])}}(this)})),e("#commentform").find('input[type="submit"]').on("click",(function(r){let t=e(this);if(t.hasClass("viwcpr_form_checked"))return!0;let a=e(this).closest("form"),i=a.find('textarea[id="comment"]')||a.find('textarea[name="comment"]'),n=a.find('input[name="author"]'),c=a.find('input[name="email"]');if(i.length>0&&!i.val())return alert(woocommerce_photo_reviews_params.i18n_required_comment_text),r.preventDefault(),i.focus(),!1;if("on"===woocommerce_photo_reviews_params.enable_photo){a.attr("enctype")&&"multipart/form-data"===a.attr("enctype")||a.attr("enctype","multipart/form-data");let e=a.find(".wcpr_image_upload");if(e.length>0){let t=e.get(0).files,a=parseInt(t.length);if("on"===woocommerce_photo_reviews_params.required_image&&0===a)return alert(woocommerce_photo_reviews_params.warning_required_image),r.preventDefault(),!1;if(a>o)return alert(woocommerce_photo_reviews_params.warning_max_files),r.preventDefault(),!1;let i=[],n=1024*parseFloat(woocommerce_photo_reviews_params.max_file_size);if(jQuery.each(t,(function(e,r){if(-1===woocommerce_photo_reviews_params.upload_allow.indexOf(r.type))return i.push(woocommerce_photo_reviews_params.warning_upload_allow.replace("%file_name%",r.name)),!0;r.size>n&&i.push(woocommerce_photo_reviews_params.warning_max_file_size.replace("%file_name%",r.name))})),i.length)return alert(i.join("\n")),r.preventDefault(),!1}else if("on"===woocommerce_photo_reviews_params.required_image)return alert(woocommerce_photo_reviews_params.warning_required_image),r.preventDefault(),!1}if(n.length>0&&n.attr("required")&&!n.val())return alert(woocommerce_photo_reviews_params.i18n_required_name_text),r.preventDefault(),n.focus(),!1;if(c.length>0&&c.attr("required")&&!c.val())return alert(woocommerce_photo_reviews_params.i18n_required_email_text),r.preventDefault(),c.focus(),!1;if(!1===a.find('input[name="wcpr_gdpr_checkbox"]').prop("checked"))return alert(woocommerce_photo_reviews_params.warning_gdpr),r.preventDefault(),!1;if(woocommerce_photo_reviews_params.ajax_check_content_reviews){t.attr("type","button"),async function(){let r="";return await new Promise((function(t){e.ajax({type:"post",url:woocommerce_photo_reviews_params.wc_ajax_url.toString().replace("%%endpoint%%","viwcpr_restrict_number_of_reviews"),processData:!1,cache:!1,contentType:!1,data:new FormData(a[0]),success:function(e){e.error?r=e.error:(e.remove_upload_file&&a.find(".wcpr_image_upload").val(""),e.img_id&&a.append(`<input type="hidden" name="wcpr_image_upload_id" value="${e.img_id}">`)),t(r)},error:function(e){r="-1"===e.responseText?e.statusText:e.responseText,t(r)}})})),r}().then((function(e){if(t.attr("type","submit"),e)return alert(e),r.preventDefault(),!1;t.addClass("viwcpr_form_checked").trigger("click")}))}}))}));