1var woo_address_book_app={shipping_address_from_cart:"",init:function(e){this.jQuery=e,this.checkout()},initialize_address_book_selects:function(){var e=this.jQuery;e("select#shipping_address_book:visible, select#billing_address_book:visible").each(function(){var i=e(this);i.hasClass("select2-hidden-accessible")||i.attr("aria-hidden")!=="true"&&(e.fn.selectize&&i.hasClass("selectized")&&i[0]&&i[0].selectize||(e.fn.selectWoo?i.selectWoo():e.fn.select2&&i.select2()))})},checkout:function(){var e=this.jQuery;this.initialize_address_book_selects(),e(document.body).on("updated_checkout",function(){woo_address_book_app.initialize_address_book_selects()}),e(document).on("change","#ship-to-different-address input, #ship-to-different-address-checkbox",function(){woo_address_book_app.initialize_address_book_selects()}),e.blockUI.defaults.message=null,e.blockUI.defaults.overlayCSS.backgroundColor="#fff",woo_address_book_app.checkout_field_prepop("billing",!0),e(document).on("change",'#billing_address_book_field #billing_address_book, #billing_address_book_field input[name="billing_address_book"]:checked',function(){woo_address_book_app.checkout_field_prepop("billing",!1)}),this.shipping_address_from_cart=!1,e("#woocommerce_enable_shipping_calc").val()==="yes"&&e("form[name=checkout]").length>0&&(e("#shipping_country").val()!==""||e("#shipping_state").val()!==""||e("#shipping_city").val()!==""||e("#shipping_postcode").val()!=="")&&(shipping_country_o=e("#shipping_country").val(),shipping_state_o=e("#shipping_state").val(),shipping_city_o=e("#shipping_city").val(),shipping_postcode_o=e("#shipping_postcode").val(),this.shipping_address_from_cart=!0),woo_address_book_app.checkout_field_prepop("shipping",!0),e(document).on("change",'#shipping_address_book_field #shipping_address_book, #shipping_address_book_field input[name="shipping_address_book"]:checked',function(){woo_address_book_app.checkout_field_prepop("shipping",!1)}),e("form[name=checkout]").length>0&&e("#shipping_country, #shipping_state_field, #shipping_city, #shipping_postcode, #billing_country, #billing_state_field, #billing_city, #billing_postcode").on("change",function(){e(document.body).trigger("update_checkout")}),e(".wc-address-book-delete").on("click",function(){var i=confirm(woo_address_book.delete_confirmation);if(i){var o=e(this).closest(".address_book"),n=e(this).data("wc-address-name"),d=e(this).data("wc-address-type"),s=e(this).closest(".wc-address-book-address"),t=parseInt(o.attr("data-addresses")),a=parseInt(o.attr("data-limit"));e(".woocommerce-MyAccount-content").block(),e.ajax({url:woo_address_book.ajax_url,type:"post",data:{action:"wc_address_book_delete",name:n,type:d,nonce:woo_address_book.delete_security},success:function(c){s.remove(),o.attr("data-addresses",t-1),t<=a&&(o.find(".wc-address-book-add-new-address span").hide(),o.find(".wc-address-book-add-new-address a").show()),e(".woocommerce-notices-wrapper").html(c),e(".woocommerce-MyAccount-content").unblock()}})}}),e("#wc_address_book_upload_billing_csv").on("change",function(i){e("#wc_address_book_upload_billing_csv").val()&&e(".billing-import-btn").show()}),e("#wc_address_book_upload_shipping_csv").on("change",function(i){e("#wc_address_book_upload_shipping_csv").val()&&e(".shipping-import-btn").show()}),e(".wc-address-book-make-default").on("click",function(){var i=e(this).data("wc-address-name");if(!(i==null||i==="")){var o=e(this).data("wc-address-type");if(o==="billing")var n=e(".u-column1.woocommerce-Address address"),d=e(".billing_address_book .wc-address-book-address-default");else if(o==="shipping")var n=e(".u-column2.woocommerce-Address address"),d=e(".shipping_address_book .wc-address-book-address-default");else return;var s=e(this).parents(".wc-address-book-address");e(".woocommerce-MyAccount-content").block(),e.ajax({url:woo_address_book.ajax_url,type:"post",data:{action:"wc_address_book_make_default",name:i,type:o,nonce:woo_address_book.default_security},success:function(t){n.html(s.find("address").html()),s.addClass("wc-address-book-address-default"),s.find(".wc-address-book-make-default").prop("disabled",!0),s.find(".wc-address-book-delete").prop("disabled",!0),d.removeClass("wc-address-book-address-default"),d.find(".wc-address-book-make-default").prop("disabled",!1),d.find(".wc-address-book-delete").prop("disabled",!1),d.find(".wc-address-book-address-badges").appendTo(s.find("header")),e(".woocommerce-notices-wrapper").html(t),e(".woocommerce-MyAccount-content").unblock()}})}}),e(".wc-address-book-address-default .wc-address-book-meta button").prop("disabled",!0)},checkout_field_prepop:function(e,i){var o=this.jQuery;if(i&&o("#"+e+"_address_book_field").hasClass("wc-address-book-subscription-renewal"))return;let n=o("#"+e+"_address_book_field #"+e+"_address_book");n.length||(n=o("#"+e+'_address_book_field input[name="'+e+'_address_book"]:checked'));let d=o(n).val();if(d!=null){if(d==="add_new"){o(".woocommerce-"+e+"-fields__field-wrapper input").not(o("#"+e+"_country")).not("#"+e+"_address_book").not('[name="'+e+'_address_book"]').each(function(){var s=o(this);s.attr("type")==="checkbox"||s.attr("type")==="radio"?s.prop("checked",!1):s.val("")}
1),o(".woocommerce-"+e+"-fields__field-wrapper select").not(o("#"+e+"_country")).not("#"+e+"_address_book").each(function(){var s=o(this);s.hasClass("selectized")&&s[0]&&s[0].selectize?s[0].selectize.setValue(""):s.val("").trigger("change")}),e==="shipping"&&this.shipping_address_from_cart&&(o("#shipping_country").val(shipping_country_o).trigger("change"),o("#shipping_state").val(shipping_state_o).trigger("change"),o("#shipping_city").val(shipping_city_o),o("#shipping_postcode").val(shipping_postcode_o),this.shipping_address_from_cart=!1,o(".woocommerce-shipping-fields").unblock());return}d.length>0&&(o(".woocommerce-"+e+"-fields").block(),o.ajax({url:woo_address_book.ajax_url,type:"post",data:{action:"wc_address_book_checkout_update",name:d,type:e,nonce:woo_address_book.checkout_security},dataType:"json",success:function(s){if(i&&e==="shipping"&&this.shipping_address_from_cart&&(shipping_country_o!==s.shipping_country||shipping_state_o!==s.shipping_state||shipping_city_o!==s.shipping_city||shipping_postcode_o!==s.shipping_postcode)){o("#shipping_address_book").val("add_new").trigger("change"),o("input#shipping_address_book_add_new").prop("checked",!0).trigger("change");return}inputs_array=[],values_array=[],Object.keys(s).forEach(function(t){let a=o("#"+t);if(typeof s[t]<"u"&&typeof a.attr("name")<"u"&&(inputs_array.push(a),values_array.push(s[t])),a.length>0)(woo_address_book.allow_readonly!=="no"||a.attr("readonly")!=="readonly")&&(a.is("select")?a.hasClass("selectized")&&a[0]&&a[0].selectize?a[0].selectize.setValue(s[t]):a.val(s[t]).trigger("change"):a.attr("type")==="checkbox"?a.prop("checked",s[t]==="1").trigger("change"):a.val(s[t]).trigger("change"));else{let c=o("#"+t+"_field");c.length>0&&c.find("input[type='radio']").each(function(l,r){o(r).val()===s[t]&&o(r).prop("checked",!0).trigger("change")})}}),inputs_array.forEach(function(t,a){t.val()!==values_array[a]&&t.val(values_array[a]).trigger("change")}),o(".woocommerce-"+e+"-fields").unblock()}}))}}};jQuery(function(e){"use strict";woo_address_book_app.init(e)});
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.