1function wps_rma_currency_seprator(a){var e=0;return mwr_common_param.price_decima_separator&&(e=mwr_common_param.price_decima_separator),a=(a=a.toFixed(e)).replace(".",mwr_common_param.price_decimal_separator),console.log(),a}function wps_rma_refund_total(){var a=0,e=0,r=[],t={};$("input[name='wps_rma_return_request_order']").val();return $(".wps_rma_return_column").each((function(){if($(this).find("td:eq(0)").children(".wps_wrma_return_product").is(":checked")){var r={};r.product_id=$(this).data("productid"),r.variation_id=$(this).data("variationid"),r.item_id=$(this).data("itemid"),r.qty=$(this).find("td:eq(2)").children(".wps_rma_return_product_qty").val(),r.price=parseFloat($(this).find("td:eq(1)").children(".wps_rma_product_amount").val()),e+=parseFloat($(this).find("td:eq(1)").children(".wps_rma_product_amount").val()),t[a]=r,a++}})),r.selected_product=t,r.amount=e,r}function wps_rma_return_alert_condition_addon(){var a=0,e="";return $(".wps_rma_return_column").each((function(){if($(this).find("td:eq(0)").children(".wps_wrma_return_product").is(":checked")){a++;var r=$(this).find("td:eq(2)").children(".wps_rma_return_product_qty").val(),t=$(this).find("td:eq(3)").children("#quanty").val();parseInt(r)>parseInt(t)&&(e+="<li>"+mwr_common_param.correct_quantity+"</li>")}})),0==a&&(e+="<li>"+mwr_common_param.refund_product+"</li>"),e||!1}function wps_rma_refund_method(){return $("input[name=wps_wrma_refund_method]:checked").val()}function wps_rma_refund_auto_accept(a){var e={action:"wps_rma_auto_return_req_approve",orderid:a,security_check:mwr_common_param.wps_rma_nonce};$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:e,dataType:"json",success:function(a){window.setTimeout((function(){window.location.href=wrael_common_param.myaccount_url}),11e3)}})}$=jQuery,$(document).ready((function(){function a(){var a=0,e=!0;$(".wps_rma_return_column").each((function(){if(this,$(this).find("td:eq(0)").children(".wps_wrma_return_product").is(":checked")){var r=$(this).find("td:eq(1)").children(".wps_rma_product_amount").val(),t=$(this).find("td:eq(2)").children(".wps_rma_return_product_qty").val();a+=r*t,$(".wps_rma_return_notification_checkbox").show(),$(this).find("td:eq(3)").children(".wps_wrma_formatted_price").html(wps_rma_currency_seprator(r*t))}else e=!1})),e?$(".wps_wrma_return_product_all").prop("checked",!0):$(".wps_wrma_return_product_all").prop("checked",!1),$(document).find(".wps_wrma_formatted_price").last().html(wps_rma_currency_seprator(a)),$(".wps_rma_return_notification_checkbox").hide()}window.location.href.indexOf("refund-request-form")>-1&&a(),$(document).on("change",".wps_rma_return_product_qty",(function(){a()})),$(document).on("click",".wps_wrma_return_product",(function(){a()})),$(document).on("click",".wps_wrma_return_product_all",(function(){$(this).is(":checked")?$(".wps_wrma_return_product").each((function(){$(this).is(":checked")||$(this).prop("checked",!0)})):$(".wps_wrma_return_product").each((function(){$(this).is(":checked")&&$(this).prop("checked",!1)})),a()})),$(document).on("click","#wps_rma_coupon_regenertor",(function(){var a=$(this).data("id");$(".regenerate_coupon_code_image").css("display","inline-block"),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:{action:"wps_rma_coupon_regenertor",id:a,security_check:mwr_common_param.wps_rma_nonce},success:function(a){var e,r=$.parseJSON(a);e="<b>"+mwr_common_param.wallet_msg+":<br>"+r.coupon_code_text+": "+r.coupon_code+"<br>"+r.wallet_amount_text+': <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">'+r.currency_symbol+"</span>"+r.coupon_price+"</span> </b>",$(".wps_wrma_wallet").html(e),$(".regenerate_coupon_code_image").css("display","none")}})})),$("#refund_amount_method").hide();var e=0;function r(){var a=0,r=!0,t=0;$(".wps_rma_exchange_column").each((function(){if($(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")){var a=$(this).find("td:eq(0)").children(".wps_rma_exchange_product").val()*$(this).find("td:eq(2)").children(".wps_rma_exchange_product_qty").val();$(this).find("td:eq(3)").children(".wps_rma_formatted_price").html(wps_rma_currency_seprator(a)),t+=a,$(this).find("#wps_rma_total_product_total_ex").children(".wps_wrma_formatted_price").html(wps_rma_currency_seprator(a))}else r=!1})),$("#wps_wrma_total_exchange_amount").html(wps_rma_currency_seprator(t)),r?$(".wps_rma_exchange_product_all").prop("checked",!0):$(".wps_rma_exchange_product_all").prop("checked",!1);var _={},c=(a=0,$("#wps_rma_exchange_request_order").val());$(".wps_rma_exchange_column").each((function(){if($(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")){var e={},r=$(this).data("variationid"),t=$(this).data("productid"),c=$(this).data("itemid"),n=$(this).find("td:eq(0)").children(".wps_rma_exchange_product").val(),o=$(this).find("td:eq(2)").children(".wps_rma_exchange_product_qty").val();e.product_id=t,e.variation_id=r,e.item_id=c,e.price=n,e.qty=o,_[a]=e,a++}}
1));var n={action:"wps_rma_exchange_products",products:_,orderid:c,security_check:mwr_common_param.wps_rma_nonce},o=0;$(".wps_rma_exchange_notification_checkbox").show(),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:n,async:!1,dataType:"json",success:function(e){a=e.count1,e.match,window.setTimeout((function(){$(".wps_rma_exchange_notification_checkbox").hide()}),800),$(".wps_wrma_return_notification").html(e.msg),o=0}});var i=$("#wps_wrma_exchanged_total").val();return e=0,i>=t+o?(e=i-(t+o),$("#wps_wrma_exchange_extra_amount i").html(mwr_common_param.extra_amount_msg),$("#refund_amount_method").hide(),$(".wps_wrma_refund_method").prop("checked",!1)):(o>i?i=0:i-=o,e=t-i,$("#wps_wrma_exchange_extra_amount i").html(mwr_common_param.left_amount_msg),$(".wps_wrma_refund_method").first().prop("checked",!0),$("#refund_amount_method").show()),$("#wps_wrma_exchange_extra_amount .wps_wrma_formatted_price").html(wps_rma_currency_seprator(e)),t}window.location.href.indexOf("exchange-request-form")>-1&&r(),$(document).on("click",".wps_rma_exchange_product_all",(function(){$(this).is(":checked")?$(".wps_rma_exchange_product").each((function(){$(this).is(":checked")||$(this).prop("checked",!0)})):$(".wps_rma_exchange_product").each((function(){$(this).is(":checked")&&$(this).prop("checked",!1)})),r()})),$(document).on("click",".wps_rma_exchange_product",(function(){r()})),$(document).on("change",".wps_rma_exchange_product_qty",(function(){r()})),$(document).on("click","#wps_wrma_exhange_shop",(function(a){var e=!1,r={}
1,t=0,_=$("#wps_rma_exchange_request_order").val();if($(".wps_rma_exchange_column").each((function(){if($(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")){e=!0;var a={},_=$(this).data("variationid"),c=$(this).data("productid"),n=$(this).data("itemid"),o=$(this).find("td:eq(0)").children(".wps_rma_exchange_product").val(),i=$(this).find("td:eq(2)").children(".wps_rma_exchange_product_qty").val();a.product_id=c,a.variation_id=_,a.item_id=n,a.price=o,a.qty=i,r[t]=a,t++}})),1==e){var c={action:"wps_set_exchange_session",products:r,orderid:_,security_check:mwr_common_param.wps_rma_nonce};$(".wps_rma_exchange_notification_choose_product").show(),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:c,dataType:"json",success:function(a){mwr_common_param.wps_wrma_exchange_variation_enable?($(".wps_rma_exchange_notification_choose_product ").hide(),$("#wps_wrma_variation_list").html(""),$("#wps_wrma_variation_list").html("<h4><Strong>"+mwr_common_param.wps_wrma_exchnage_with_same_product_text+"<Strong></h4>"),$(".wps_rma_exchange_column").each((function(){if($(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")){var a=$(this).find("td:eq(1)").find(".wps_wrma_product_title a").html(),e=$(this).find("td:eq(1)").find(".wps_wrma_product_title a").attr("href"),r=$(this).find("td:eq(1)").clone().appendTo("#wps_wrma_variation_list");a=(a=a.split("-"))[0],e=(e=e.split("?"))[0],r.find(".wps_wrma_product_title a").html(a),r.wrap('<a href="'+e+'"></a><br>')}}))):($(".wps_rma_exchange_notification_choose_product").show(),window.location.href=mwr_common_param.shop_url)}})}if(0==e){a.preventDefault();var n="<li>"+mwr_common_param.select_product_msg_exchange+"</li>";return $("#wps-exchange-alert").show(),$("#wps-exchange-alert").html(n),$("#wps-exchange-alert").css("background-color","red"),$("#wps-exchange-alert").addClass("woocommerce-error"),$("#wps-exchange-alert").removeClass("woocommerce-message"),$("html, body").animate({scrollTop:$("#wps_wrma_exchange_request_container").offset().top},800),!1}})),$(document).on("click",".wps_wrma_ajax_add_to_exchange",(function(){var a=$(this);$(this).addClass("loading");var e=$(this).data("product_id"),r=$(this).data("product_sku"),t=$(this).data("quantity"),_=$(this).data("price"),c={};c.id=e,c.qty=t,c.sku=r,c.price=_;var n={action:"wps_wrma_add_to_exchange",products:c,security_check:mwr_common_param.wps_rma_nonce};$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:n,dataType:"json",success:function(c){a.removeClass("loading"),a.addClass("added"),a.parent().html('<a data-price="'+_+'" data-quantity="'+t+'" data-product_id="'+e+'" data-product_sku="'+r+'" class="button wps_wrma_ajax_add_to_exchange" tabindex="0">'+mwr_common_param.exchange_text+'</a><a class="button wps_rma_redirect_ex_form" style="margin:3px" href="'+c.url+'">'+c.message+"</a>")}})})),$(document).on("click",".wps_wrma_add_to_exchanged_detail",(function(){var a=$(this);$(this).addClass("loading");var e=$(this).data("product_id"),r=$(this).data("product_sku"),t=$(".qty").val(),_=$(this).data("price"),c={};$(".variations select").each((function(){var a=$(this).data("attribute_name"),e=$(this).val();c[a]=e}));var n={};$(".group_table tr").each((function(){t=$(this).find("td:eq(0)").children().children(".qty").val(),id=$(this).find("td:eq(0)").children().children(".qty").attr("name"),id=id.match(/\d+/),id=id[0],n[id]=t}));var o={};o.id=e,o.qty=t,o.sku=r,o.price=_,o.variations=c,o.grouped=n;var i={action:"wps_wrma_add_to_exchange",products:o,security_check:mwr_common_param.wps_rma_nonce};$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:i,dataType:"json",success:function(c){a.removeClass("loading"),a.addClass("added"),a.parent().html('<button data-price="'+_+'" data-quantity="'+t+'" data-product_id="'+e+'" data-product_sku="'+r+'" class="wps_wrma_add_to_exchanged_detail button alt added" tabindex="0">'+mwr_common_param.exchange_text+'</button><a class="button wps_rma_redirect_ex_form" style="margin:3px" href="'+c.url+'">'+c.message+"</a>")}})})),$(document).on("click",".wps_wrma_add_to_exchanged_detail_variable",(function(){var a=$('[name="variation_id"]').val();if(null==a||a<=0)return alert("Please choose variation"),!1;
1var e=$(this);$(this).addClass("loading");var r=$(this).data("product_id"),t=$(".qty").val(),_={};$(".variations select").each((function(){var a=$(this).data("attribute_name"),e=$(this).val();_[a]=e}));var c={};$(".group_table tr").each((function(){t=$(this).find("td:eq(0)").children().children().val(),id=$(this).find("td:eq(0)").children().children().attr("name"),id=id.match(/\d+/),id=id[0],c[id]=t}));var n={};n.id=r,n.variation_id=a,n.qty=t,n.variations=_,n.grouped=c;var o={action:"wps_wrma_add_to_exchange",products:n,security_check:mwr_common_param.wps_rma_nonce};$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:o,dataType:"json",success:function(a){e.removeClass("loading"),e.addClass("added"),e.parent().html('<button class="wps_wrma_add_to_exchanged_detail_variable button alt" data-product_id="'+r+'"> '+mwr_common_param.exchange_text+' </button><a class="button wps_rma_redirect_ex_form" style="margin:3px" href="'+a.url+'">'+a.message+"</a>")}})})),$(document).on("click",".wps_wrma_exchnaged_product_remove",(function(){var a=$(this),e=$("#wps_wrma_exchange_request_order").val(),t={action:"wps_wrma_exchnaged_product_remove",id:$(this).data("key"),orderid:e,security_check:mwr_common_param.wps_rma_nonce};$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:t,dataType:"json",success:function(e){a.parent().remove(),$(".wps_wrma_exchanged_products >tbody >tr").length<=0&&$(".wps_wrma_exchanged_products").remove(),$("#wps_wrma_exchanged_total").val(e.total_price),$("#wps_wrma_exchanged_total_show .wps_wrma_formatted_price").html(e.total_price),r()}})})),$(document).on("submit","#wps_rma_exchnage_request_form",(function(a){var t=$("input[name=wps_wrma_refund_method]:checked").val();a.preventDefault();var _=$("#wps_rma_exchange_request_order").val(),c=r(),n="",o=$("#wps_wrma_exchanged_total").val();e=o-c;var i=!1;$(".wps_rma_exchange_column").each((function(){$(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")&&(i=!0)})),0==i?n+="<li>"+mwr_common_param.select_product_msg_exchange+"</li>":0==o&&(n+="<li>"+mwr_common_param.before_submit_exchange+"</li>");var s=$("#wps_rma_exchange_request_subject").val();""!=s&&null!=s||""!=(s=$("#wps_rma_exchange_request_subject_text").val())&&null!=s&&s.match(/[[A-Za-z]/i)||(n+="<li>"+mwr_common_param.exchange_subject_msg+"</li>"),$(".wps_rma_exchange_column").each((function(){if($(this).find("td:eq(0)").children(".wps_rma_exchange_product").is(":checked")){var a=$(this).find("td:eq(2)").children(".wps_rma_exchange_product_qty").val(),e=$(this).find("td:eq(3)").children("#quanty").val();(a=parseInt(a))>(e=parseInt(e))&&(n+="<li>"+mwr_common_param.correct_quantity+"</li>")}}));var m=$(".wps_wrma_exchange_request_reason").val();void 0===m||""!=m&&null!=m&&m.match(/[[A-Za-z]/i)||(n+="<li>"+mwr_common_param.exchange_reason_msg+"</li>");var d=mwr_common_param.wps_exchange_attachment;if(d&&"on"==d&&$(".wps_rma_exchange_request_files").each((function(){var a=$(this);if(a[0].files.length){var e=a[0].files[0].type;"image/png"==e||"image/jpeg"==e||"image/jpg"==e||(n+="<li>"+mwr_common_param.file_not_supported+"</li>")}else n+="<li>"+mwr_common_param.no_file_attached+"</li>"})),""!=n)return $("#wps-exchange-alert").show(),$("#wps-exchange-alert").html(n),$("#wps-exchange-alert").addClass("woocommerce-error"),$("#wps-exchange-alert").removeClass("woocommerce-message"),$("#wps-exchange-alert").css("background-color","red"),$("html, body").animate({scrollTop:$("#wps_wrma_exchange_request_container").offset().top},800),!1;$("#wps-exchange-alert").hide(),$("#wps-exchange-alert").html(n),$(".wps_rma_exchange_notification").show();var p={action:"wps_wrma_submit_exchange_request",orderid:_,reason:m,subject:s,refund_method:t,bankdetails:$("#wps_rma_bank_details").val(),security_check:mwr_common_param.wps_rma_nonce},l=new FormData(this);l.append("action","wps_wrma_exchange_upload_files"),l.append("orderid",_),l.append("security_check",mwr_common_param.wps_rma_nonce),$("body").css("cursor","progress"),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:l,contentType:!1,cache:!1,processData:!1,success:function(a){$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:p,dataType:"json",success:function(a){var e=10;setInterval((function(){e>=0&&$("#countdownTimer").html(e),e-=1}),1e3);$(".wps_rma_exchange_notification").hide(),$("#wps-exchange-alert").html(a.msg+' in <b><span id="countdownTimer"></span> seconds</b>'),$("#wps-exchange-alert").removeClass("woocommerce-error"),$("#wps-exchange-alert").addClass("woocommerce-message"),$("#wps-exchange-alert").css("background-color","#8FAE1B"),$("#wps-exchange-alert").show(),$("html, body").animate({scrollTop:$("#wps_wrma_exchange_request_container").offset().top},800),window.setTimeout((function(){window.location.href=mwr_common_param.myaccount_url}),11e3)}})}})})),$(document).on("click",".wps_rma_cancel_order",(function(){$(this).prop("disabled",!0);var a=$(this).attr("data-order_id");$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:{action:"wps_rma_cancel_customer_order",order_id:a,security_check:mwr_common_param.wps_rma_nonce},success:function(a){window.location.href=a}})})),$(document).on("click",".wps_wrma_cancel_product_all",(function(){this.checked?$(".wps_wrma_cancel_product").each((function(){this.checked=!0})):$(".wps_wrma_cancel_product").each((function(){this.checked=!1}
1))})),$(document).on("click",".wps_wrma_cancel_product",(function(){if($(this).is(":checked")){var a=0;$(".wps_wrma_cancel_product").each((function(){this.checked||(a=1)})),0==a&&$(".wps_wrma_cancel_product_all").prop("checked",!0)}else $(".wps_wrma_cancel_product_all").prop("checked",!1)})),$(document).on("click",".wps_rma_cancel_product_submit",(function(){$("#wps-return-alert").hide();var a=!1,e=0,r=!1,t="";if($(".wps_wrma_cancel_product").each((function(){if(this.checked){r=!0;var t=$(this).closest(".wps_wrma_cancel_column").find(".product-quantity").find(".wps_wrma_cancel_product_qty"),_=t.val(),c=t.attr("max");(_=parseInt(_))<(c=parseInt(c))?e=1:_>c&&(a=!0)}})),r||(t=mwr_common_param.select_product_msg_cancel),1==a&&(t=mwr_common_param.correct_quantity),""!=t)return $("#wps-return-alert").html(t),$("#wps-return-alert").addClass("woocommerce-error"),$("#wps-return-alert").removeClass("woocommerce-message"),$("#wps-return-alert").css("background-color","red"),$("#wps-return-alert").show(),$("html, body").animate({scrollTop:$("#wps_wrma_return_request_container").offset().top},800),!1;var _=$(".wps_wrma_cancel_product_all").val();if(0==e&&$(".wps_wrma_cancel_product_all").is(":checked"))confirm(mwr_common_param.wps_wmrma_confirm_order)&&($(".wps_rma_return_notification").show(),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:{action:"wps_rma_cancel_customer_order",order_id:_,security_check:mwr_common_param.wps_rma_nonce},success:function(a){$(".wps_rma_return_notification").show(),window.location.href=a}}));else if(confirm(mwr_common_param.wps_wrma_confirm_products)){$(".wps_rma_return_notification").show();var c=[],n=0,o=0;$(".wps_wrma_cancel_product").each((function(){$(this).is(":checked")&&(n=$(this).closest("tr").find(".wps_wrma_cancel_product_qty").val(),o=$(this).val(),c.push([o,n]))})),$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:{action:"wps_rma_cancel_customer_order_products",order_id:_,item_ids:c,security_check:mwr_common_param.wps_rma_nonce},success:function(a){$(".wps_rma_return_notification").hide(),window.location.href=a}})}})),$(".wps-return-ex-login-alert").hide(),$("#login_session_alert").hide(),$(document).on("submit",".wps_rma_guest_form",(function(a){var e=$("#order_id").val(),r=$("#order_email").val(),t=$("#order_phone").val();if($("#login_session_alert").hide(),""==e){if("undefined"!==r&&""==r)var _=mwr_common_param.enter_login_details;if("undefined"!==t||""==r)_=mwr_common_param.enter_login_details1;$(".wps-return-ex-login-alert").show(),$(".wps-return-ex-login-alert").html(_),$("html, body").animate({scrollTop:$(".wps-return-ex-login-alert").offset().top},800),a.preventDefault()}else"undefined"!==r&&""==r?($(".wps-return-ex-login-alert").show(),$(".wps-return-ex-login-alert").html(mwr_common_param.enter_login_email),$("html, body").animate({scrollTop:$(".wps-return-ex-login-alert").offset().top},800),a.preventDefault()):"undefined"!=r&&""==t?($(".wps-return-ex-login-alert").show(),$(".wps-return-ex-login-alert").html(mwr_common_param.enter_login_phone),$("html, body").animate({scrollTop:$(".wps-return-ex-login-alert").offset().top},800),a.preventDefault()):""==e&&($(".wps-return-ex-login-alert").show(),$(".wps-return-ex-login-alert").html(mwr_common_param.enter_login_id),$("html, body").animate({scrollTop:$(".wps-return-ex-login-alert").offset().top},800),a.preventDefault())})),1==mwr_common_param.exchange_session&&($(document).on("change",".variations .value select",(function(){"wc-variation-is-unavailable"==$(".single_add_to_cart_button").attr("class").match("wc-variation-is-unavailable")?($(".wps_wrma_add_to_exchanged_detail_variable").attr("disabled","disabled"),$(".wps_wrma_add_to_exchanged_detail_variable").hide()):($(".wps_wrma_add_to_exchanged_detail_variable").removeAttr("disabled"),$(".wps_wrma_add_to_exchanged_detail_variable").show())})),"on"!=mwr_common_param.wps_wrma_add_to_cart_enable&&$(".single_add_to_cart_button").hide()),$(".wps_rma_exchange_to_product_qty").on("change",(function(){var a=$(this).val(),e=$(this).data("id");$.ajax({url:mwr_common_param.ajaxurl,type:"POST",data:{action:"wps_rma_update_exchange_to_prod",id:e,qty:a,security_check:mwr_common_param.wps_rma_nonce},success:function(a){window.location.reload()}})}))}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.