1function ApplyCouponCode(u){var o=jQuery("#gf_coupon_code_"+u).val();"undefined"!==o&&""!=o&&(showCouponSpinner(u),jQuery("#gf_coupons_container_"+u+" #gf_coupon_button").prop("disabled",!0),jQuery.post(gform_coupon_script_strings.ajaxurl,{action:"gf_apply_coupon_code",couponCode:o,existing_coupons:jQuery("#gf_coupon_codes_"+u).val(),formId:u,total:jQuery("#gf_total_no_discount_"+u).val()},function(o){var o=jQuery.parseJSON(o),n=document.getElementById("gf_coupons_container_"+u),e=n.parentElement;if(e.querySelector(".gf_coupon_invalid")&&n.parentElement.querySelector(".gf_coupon_invalid").remove(),jQuery("#gf_coupon_code_"+u).val(""),o.is_valid){window["gf_coupons"+u]=o.coupons;var r,_="",t=0;for(r in window["gf_coupons"+u])0<t&&(_+=","),_+=window["gf_coupons"+u][r].code,t++;jQuery("#gf_coupon_codes_"+u).val(_).change(),jQuery("#gf_coupons_"+u).val(jQuery.toJSON(window["gf_coupons"+u])),gformCalculateTotalPrice(u)}else{var i=getValidationPlacement(u),o="<div class='gf_coupon_invalid gfield_description gfield_validation_message'>"+o.invalid_reason+"</div>";"below"===i?e.insertAdjacentHTML("beforeend",o):n.insertAdjacentHTML("beforebegin",o)}hideCouponSpinner(u)}))}function getValidationPlacement(o){let n=null;o=gform.utils.getNode("#gf_coupons_container_"+o,document,!0).parentElement;return n=o&&gform.utils.hasClassFromArray(o,["field_validation_above"])?"above":"below"}function GetDiscount(o,n,e,r,_){var t;return e-=r,t="flat"==o?Number(n):e*Number(n/100),gform.applyFilters("gform_coupons_discount_amount",t,o,n,e,r,_)}function PopulateDiscountInfo(o,n){var e,r,_,t,i="",u=0,c=new gform.Currency(gf_global.gf_currency_config);for(e in void 0===window["gf_coupons"+n]&&(window["gf_coupons"+n]=jQuery.evalJSON(jQuery("#gf_coupons_"+n).val())),window["gf_coupons"+n])u+=_=GetDiscount((r=window["gf_coupons"+n][e]).type,r.amount,o,u,n),i+='<tr class="gf_coupon_item gfield_description" id="gf_coupon_'+r.code.replace(/[^A-Za-z0-9]/g,"")+'"><td class="gf_coupon_name_container"> <a href="javascript:void(0);" class="remove-coupon gform-theme__no-reset--el" aria-label="'+gform_coupon_script_strings.remove_button_aria_label+'" onclick="DeleteCoupon(\''+r.code+"' , '"+n+"');\">["+gform_coupon_script_strings.remove_button_label+']</a> <span class="gf_coupon_name gform-field-label gform-field-label--type-sub-large">'+r.name+'</span></td><td class="gf_coupon_discount_container"> <span class="gf_coupon_discount gform-field-label gform-field-label--type-sub-large">-'+c.toMoney(_,!0)+"</span></td></tr>";return jQuery("#gf_coupons_container_"+n+" #gf_coupon_info").html("<table>"+i+"</table>"),window.gform.state&&((t=window.gform.state.get(n,"products")).discount=u,window.gform.state.set(n,"products",t)),u}function DisableApplyButton(o){0==window["new_total_"+o]||""==jQuery("#gf_coupon_code_"+o).val()?jQuery("#gf_coupons_container_"+o+" #gf_coupon_button").prop("disabled",!0):jQuery("#gf_coupons_container_"+o+" #gf_coupon_button").prop("disabled",!1)}function DeleteCoupon(o,n){var e,r,_;jQuery("#gf_coupons_container_"+n+" #gf_coupon_spinner").is(":visible")||(e=o.replace(/[^A-Za-z0-9]/g,""),jQuery("#gf_coupons_container_"+n+" #gf_coupon_"+e).remove(),showCouponSpinner(n),jQuery("#gf_coupons_container_"+n+" #gf_coupon_button").prop("disabled",!0),r=(e=jQuery("#gf_coupon_codes_"+n)).val().split(","),-1!=(_=jQuery.inArray(o,r))&&(r.splice(_,1),e.val(r.join(",")).change(),o in window["gf_coupons"+n]&&(delete window["gf_coupons"+n][o],jQuery("#gf_coupons_"+n).val(jQuery.toJSON(window["gf_coupons"+n]))),gformCalculateTotalPrice(n),gform.doAction("gform_coupons_post_delete_coupon",o,n)))}function showCouponSpinner(o){var n;"function"==typeof gformInitializeSpinner&&formUsesFramework(o)?(n=jQuery("#gf_coupons_container_"+o+" #gf_coupon_button"),gformInitializeSpinner(o,n,"gform-coupons-spinner-"+o)):jQuery("#gf_coupons_container_"+o+" #gf_coupon_spinner").show()}function hideCouponSpinner(o){"function"==typeof gformRemoveSpinner&&formUsesFramework(o)?gformRemoveSpinner("gform-coupons-spinner-"+o):jQuery("#gf_coupons_container_"+o+" #gf_coupon_spinner").hide()}function formUsesFramework(o){return jQuery("#gform_wrapper_"+o).hasClass("gform-theme--framework")}gform.addFilter("gform_product_total",function(o,n){if(0==jQuery("#gf_coupon_code_"+n).length)return o;jQuery("#gf_total_no_discount_"+n).val(o);var e,r=o;return(""!=(gformIsHidden(jQuery("#gf_coupon_code_"+n))?"":jQuery("#gf_coupon_codes_"+n).val())||""!=jQuery("#gf_coupons_"+n).val())&&(e=PopulateDiscountInfo(o,n),(r=o-gformRoundPrice(e))<0)&&(r=0),hideCouponSpinner(n),window["new_total_"+n]=r,DisableApplyButton(n),r},50),gform.addFilter("gform_is_value_match",function(o,n,e){n=jQuery("#field_"+n+"_"+e.fieldId).find("#gf_coupon_codes_"+n);return n.length?gf_matches_operation(n.val(),e.value,e.operator):o}),gform.addAction("gform_post_conditional_logic_field_action",function(o,n,e,r,_){_||"hide"!=n||(n=(_=jQuery(e)).find("tr.gf_coupon_item")).length&&(n.remove(),_.find("input[type=hidden]").val("").change())}),gform.addFilter("gform_field_meta_raw_input_change",function(o,n,e){return n.attr("id")&&0===n.attr("id").indexOf("gf_coupon_codes_")&&(o.fieldId=n.attr("name").split("_")[1],o.formId=n.attr("id").split("_")[3]),o});
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.