1ACC.address={_autoload:["bindToChangeAddressButton","bindCreateUpdateAddressForm","bindSuggestedDeliveryAddresses","bindCountrySpecificAddressForms","showAddressFormButtonPanel","bindViewAddressBook","bindToColorboxClose","showRemoveAddressFromBookConfirmation","backToListAddresses","bindAddressSwap","bindUseShipping","bindRegionIsoMessage","bindAddAccountAddressSave","bindRegionChangeForLatam","bindCityDropdownForLatam","bindCountyChangeForLatam"],spinner:$("<img title='Spinner Image' alt = 'Spinner Image' src='"+ACC.config.commonResourcePath+"/images/spinner.gif' />"),addressID:"",handleChangeAddressButtonClick:function(){ACC.address.addressID=($(this).data("address"))?$(this).data("address"):"";$("#summaryDeliveryAddressFormContainer").show();$("#summaryOverlayViewAddressBook").show();$("#summaryDeliveryAddressBook").hide();$.getJSON(getDeliveryAddressesUrl,ACC.address.handleAddressDataLoad);return false},handleAddressDataLoad:function(a){ACC.address.setupDeliveryAddressPopupForm(a);ACC.colorbox.open("",{inline:true,href:"#summaryDeliveryAddressOverlay",overlayClose:false,onOpen:function(){ACC.address.emptyAddressForm();$(document).on("change","#saveAddress",function(){var b=$(this).prop("checked");$("#defaultAddress").prop("disabled",!b);if(!b){$("#defaultAddress").prop("checked",false)}})}})},setupDeliveryAddressPopupForm:function(a){$("#summaryDeliveryAddressBook").html($("#deliveryAddressesTemplate").tmpl({addresses:a}));$("#summaryDeliveryAddressBook button.use_address").click(ACC.address.handleSelectExistingAddressClick);$("#summaryDeliveryAddressBook button.edit").click(ACC.address.handleEditAddressClick);$("#summaryDeliveryAddressBook button.default").click(ACC.address.handleDefaultAddressClick)},emptyAddressForm:function(){var a={url:getDeliveryAddressFormUrl,data:{addressId:ACC.address.addressID,createUpdateStatus:""}
1,type:"GET",success:function(b){$("#summaryDeliveryAddressFormContainer").html(b);ACC.address.bindCreateUpdateAddressForm()}};$.ajax(a)},handleSelectExistingAddressClick:function(){var a=$(this).attr("data-address");$.postJSON(setDeliveryAddressUrl,{addressId:a},ACC.address.handleSelectExitingAddressSuccess);return false},handleEditAddressClick:function(){$("#summaryDeliveryAddressFormContainer").show();$("#summaryOverlayViewAddressBook").show();$("#summaryDeliveryAddressBook").hide();var a=$(this).attr("data-address");var b={url:getDeliveryAddressFormUrl,data:{addressId:a,createUpdateStatus:""},target:"#summaryDeliveryAddressFormContainer",type:"GET",success:function(c){ACC.address.bindCreateUpdateAddressForm();ACC.colorbox.resize()},error:function(d,e,c){alert("Failed to update cart. Error details ["+d+", "+e+", "+c+"]")}};$(this).ajaxSubmit(b);return false},handleDefaultAddressClick:function(){var a=$(this).attr("data-address");var b={url:setDefaultAddressUrl,data:{addressId:a},type:"GET",success:function(c){ACC.address.setupDeliveryAddressPopupForm(c)},error:function(d,e,c){alert("Failed to update address book. Error details ["+d+", "+e+", "+c+"]")}};$(this).ajaxSubmit(b);return false},handleSelectExitingAddressSuccess:function(a){if(a!=null){ACC.refresh.refreshPage(a);ACC.colorbox.close()}else{alert("Failed to set delivery address")}},bindCreateUpdateAddressForm:function(){$(".create_update_address_form").each(function(){var a={type:"POST",beforeSubmit:function(){$("#checkout_delivery_address").block({message:ACC.address.spinner})},success:function(c){$("#summaryDeliveryAddressFormContainer").html(c);var b=$(".create_update_address_id").attr("status");if(b!=null&&"success"===b.toLowerCase()){ACC.refresh.getCheckoutCartDataAndRefreshPage();ACC.colorbox.close()}else{ACC.address.bindCreateUpdateAddressForm();ACC.colorbox.resize()}},error:function(c,d,b){alert("Failed to update cart. Error details ["+c+", "+d+", "+b+"]")},complete:function(){$("#checkout_delivery_address").unblock()}};$(this).ajaxForm(a)})},refreshDeliveryAddressSection:function(a){$(".summaryDeliveryAddress").replaceWith($("#deliveryAddressSummaryTemplate").tmpl(a))},bindSuggestedDeliveryAddresses:function(){var a=$(".add_edit_delivery_address_id").attr("status");if(a!=null&&"hasSuggestedAddresses"==a){ACC.address.showSuggestedAddressesPopup()}},showSuggestedAddressesPopup:function(){ACC.colorbox.open("",{href:"#popup_suggested_delivery_addresses",inline:true,overlayClose:false,width:525})},bindCountrySpecificAddressForms:function(){var b="";var c=$('#address\\.country option[value!=""]');var d=c.val();if($("#displayCountry").val()==""){var a=c.text().trim();$("#displayCountry").val(a);$("#address\\.country").val(d).hide();ACC.address.fetchFields(b,d)}else{if(helpers.is_empty($("#addressId").val())&&$("#displayCountry").val()!=""&&helpers.is_empty($("#address\\.firstName").val())){ACC.address.fetchFields(b,d)}}ACC.address.bindInvoiceOption();ACC.address.bindInvoiceOptionChange();ACC.address.bindRegionChange();ACC.address.bindCountyChange();form_ctl.funcs.doValidate_editAddressForm()},fetchFields:function(b,c){var a={addressCode:"",countryIsoCode:c};if(a.countryIsoCode){ACC.address.displayCountrySpecificAddressForm(a,ACC.address.showAddressFormButtonPanel)}},bindInvoiceOption:function(){if($("#customerOptForInvoice").length){var c=$(".js-line2options-container");if($('input[name="invoiceOption"]:checked').val()==="INVOICE"){var b=ACC.config.encodedContextPath+"/checkout/multi/line2optns";var a=c.data("slctval");ACC.address.getHTMLData(c,b,null,"#address\\.line2optns",a,true);$(".js-address-line2").removeClass("hide")}else{c.data("slctval","");$("#address\\.line2vals").val("");$(".js-address-line2").addClass("hide")}}},bindAddressLine2Optn:function(){var c=$(".js-line2vals-container");var b="";$(document).on("change","#address\\.line2optns",function(){var f=ACC.config.encodedContextPath+"/checkout/multi/line2vals";var d=$("#address\\.line2optns").val();if(!helpers.is_empty(d)){var e={line2optn:d};ACC.address.getHTMLData(c,f,e,"#address\\.line2vals",b);b=""}});var a=$("#address\\.line2optns").val();if(!helpers.is_empty(a)){b=c.data("slctval");$("#address\\.line2optns").trigger("change")}},updateSlectedValue:function(a,c){if($(a)&&c!=="undefined"&&c!==""){var b='option[value="'+c+'"]';$(a).children(b).prop("selected","selected")}},bindInvoiceOptionChange:function(){$('input[type=radio][name="invoiceOption"]').on("change",function(){ACC.address.bindInvoiceOption()})}
1,bindCityDropdown:function(a){if($(".js-city-container").length){ACC.address.getCities(a)}},bindCountyChange:function(){$(document).on("change","#address\\.county",function(){if($(".js-city-container").length){ACC.address.getCities()}})},bindCountyField:function(){if($(".js-county-container").length){ACC.address.getCounties()}},bindRegionChange:function(){$(document).on("change","#address\\.region",function(){if($(".js-county-container").length){ACC.address.getCounties()}})},getCounties:function(c){var b=$("#address\\.region :selected").val();if(typeof b!=="undefined"&&b!==""){var a={regionIso:b};$.ajax({url:ACC.config.encodedContextPath+"/checkout/multi/county",async:true,data:a,dataType:"html"}).done(function(f){var e=$(".js-county-container .form-group").attr("class");$(".js-county-container").html($(f).html());$(".js-county-container .form-group").attr("class",e);if(c){var d="#address\\.county";var g='option[value="'+shipping_addr[$(d).attr("name")]+'"]';$(d).children(g).prop("selected","selected")}ACC.address.bindCountyChange();ACC.address.bindCityDropdown(c);if($(".js-county-container option:not([disabled])").length===1){$(".js-county-container option:not([disabled])").prop("selected","selected")}})}},getCities:function(c){var b=$("#address\\.county :selected").val();if(typeof b!=="undefined"&&b!==""){var a={countyIso:b};$.ajax({url:ACC.config.encodedContextPath+"/checkout/multi/county/cities",async:true,data:a,dataType:"html"}).done(function(f){var e=$(".js-city-container .form-group").attr("class");$(".js-city-container").html($(f).html());$(".js-city-container .form-group").attr("class",e);if(c){var d="#address\\.townCity";var g='option[value="'+shipping_addr[$(d).attr("name")]+'"]';$(d).children(g).prop("selected","selected")}if($(".js-city-container option:not([disabled])").length===1){$(".js-city-container option:not([disabled])").prop("selected","selected")}})}},getHTMLData:function(d,a,c,b,f,e){$.ajax({url:a,async:true,data:c,dataType:"html"}).done(function(g){d.html($(g).html());if(b!==null&&b!=="undefined"){ACC.address.updateSlectedValue(b,f)}if(e){ACC.address.bindAddressLine2Optn()}})},showAddressFormButtonPanel:function(){if($("#countrySelector :input").val()!==""){$("#addressform_button_panel").show()}},bindToColorboxClose:function(){$(document).on("click",".closeColorBox",function(){ACC.colorbox.close()})},displayCountrySpecificAddressForm:function(a,b){$.ajax({url:ACC.config.encodedContextPath+"/my-account/addressform",async:true,data:a,dataType:"html",beforeSend:function(){$("#i18nAddressForm").html(ACC.address.spinner)}}).done(function(c){$("#i18nAddressForm").html($(c).html());ACC.address.bindCountyField();if(typeof b=="function"){b.call()}})},bindToChangeAddressButton:function(){$(document).on("click",".summaryDeliveryAddress .editButton",ACC.address.handleChangeAddressButtonClick)},bindViewAddressBook:function(){$(document).on("click",".js-address-book",function(b){b.preventDefault();var a=document.getElementById("adrsheadline").value;ACC.colorbox.open(a,{href:"#addressbook",inline:true,width:"320px"})});$(document).on("click","#summaryOverlayViewAddressBook",function(){$("#summaryDeliveryAddressFormContainer").hide();$("#summaryOverlayViewAddressBook").hide();$("#summaryDeliveryAddressBook").show();ACC.colorbox.resize()})},showRemoveAddressFromBookConfirmation:function(){$(document).on("click",".removeAddressFromBookButton",function(){var b=$(this).data("addressId");var a=$(this).data("popupTitle");ACC.colorbox.open(a,{inline:true,height:false,href:"#popup_confirm_address_removal_"+b,onComplete:function(){$(this).colorbox.resize()}})})},backToListAddresses:function(){$(".addressBackBtn").on("click",function(){var a=$(this).data("backToAddresses");window.location=a})},bindUseShipping:function(){if($("#useDeliveryAddress").length){$("#useDeliveryAddress").on("change",function(){$('.shipping-address-container select[name="billTo_country"] option').removeAttr("selected");var a=$("#countrySelector").data("country-iso-code");$('.shipping-address-container select[name="billTo_country"]').val(a);if(this.checked){$(".shipping-address-container").slideUp(300)}else{$(".shipping-address-container").slideDown(300)}})}},bindRegionIsoMessage:function(){$('select[name="regionIso"]').on("change",function(){$(this).closest(".form-group").find(".help-block").addClass("hide")})},bindAddressSwap:function(){$("#useMyShipping").on("change",ACC.address.switchBillingToShipping)},switchBillingToShipping:function(){if($(this).is(":checked")){$.each($('#shipping_form input:not([type="hidden"]):not([disabled])'),function(c,b){if(b.id!="address.governmentID"){$(b).val(shipping_addr[$(b).attr("name")])}if(b.id=="customerOptForReceipt"){$(b).val("TICKET")}if(b.id=="customerOptForInvoice"){$(b).val("INVOICE")}});var a="";$.each($("#shipping_form select:visible:not([disabled])"),function(c,b){if(shipping_addr[$(b).attr("name")]&&shipping_addr[$(b).attr("name")].length>1&&b.id!="address.county"){a='option[value="'+shipping_addr[$(b).attr("name")]+'"]';$(b).children(a).prop("selected","selected");if(b.id=="address.region"&&$(".js-county-container").length){ACC.address.getCounties(true)}}if(shipping_addr[$(b).attr("name")]&&shipping_addr[$(b).attr("name")].length>1&&b.id!="address.townCity"){a='option[value="'+shipping_addr[$(b).attr("name")]+'"]';$(b).children(a).prop("selected","selected");if(b.id=="address.county"&&$(".js-city-container").length){ACC.address.getCities(true)}}})}else{$.each($('#i18nAddressForm input:not([type="hidden"]):not([disabled])'),function(c,b){if(b.id!="address.governmentID"){$(b).val("")}});$.each($("#shipping_form select:visible:not([disabled])"),function(c,b){if(shipping_addr[$(b).attr("name")]&&shipping_addr[$(b).attr("name")].length>1){$(b).children("option:first-child").prop("selected","selected")}})}},bindAddAccountAddressSave:function(){$("#accountAddressSubmit").on("click",function(b){b.preventDefault();$("#addressForm .error").empty();if($("#addressForm").valid()){var a=$("#addressForm").serializeArray();$.ajax({url:$("#addressForm").attr("action"),type:"POST",data:$.param(a),beforeSend:function(){$("body").addClass("loading")},success:ACC.address.handleAccountAddressSuccessCallback,error:function(){},complete:function(){$("body").removeClass("loading")}})}})},handleAccountAddressSuccessCallback:function(b){var a=$(b).filter(":first").attr("data-result");if(a=="avsReview"){ACC.colorbox.open("",{className:"colorbox-popup",overlayClose:false,html:b,maxHeight:"100%",maxWidth:"1300px",width:"95%",title:'<h3 class="suggested_address_title">Address Verification</h3>',onComplete:function(){$("body").addClass("colorboxOpen")},onClosed:function(){$("body").removeClass("colorboxOpen")}})}else{if(a=="success"){var c=ACC.config.encodedContextPath+$(b).find(".nextStepUrl").text();window.location.href=c}}},bindRegionChangeForLatam:function(){$(document).on("change",".latam-region",function(){if($(".
1js-county-container").length){ACC.address.getCountiesForLatam(this.value)}})},getCountiesForLatam:function(b){if(typeof b!=="undefined"&&b!==""){var a={regionIso:b};$.ajax({url:ACC.config.encodedContextPath+"/checkout/multi/county",async:true,data:a,dataType:"html"}).done(function(d){var c=$(".js-county-container .form-group").attr("class");$(".js-county-container").html($(d).html());$(".js-county-container .form-group").attr("class",c);ACC.address.bindCountyChangeForLatam();ACC.address.bindCityDropdownForLatam();if($(".js-county-container option:not([disabled])").length===1){$(".js-county-container option:not([disabled])").prop("selected","selected")}ACC.myaccount.handleAddressSubmit("#myaccount-editaddress-form","#submit-edit-address");ACC.myaccount.handleAddressSubmit("#myaccount-address-form","#submit-add-address")})}},bindCityDropdownForLatam:function(){if($(".js-city-container").length){ACC.address.getCitiesForLatam()}},bindCountyChangeForLatam:function(){$(document).on("change",".latam-county",function(){if($(".js-city-container").length){ACC.address.getCitiesForLatam(this.value)}})},getCitiesForLatam:function(b){if(typeof b!=="undefined"&&b!==""){var a={countyIso:b};$.ajax({url:ACC.config.encodedContextPath+"/checkout/multi/county/cities",async:true,data:a,dataType:"html"}).done(function(d){var c=$(".js-city-container .form-group").attr("class");$(".js-city-container").html($(d).html());$(".js-city-container .form-group").attr("class",c);if($(".js-city-container option:not([disabled])").length===1){$(".js-city-container option:not([disabled])").prop("selected","selected")}ACC.myaccount.handleAddressSubmit("#myaccount-editaddress-form","#submit-edit-address");ACC.myaccount.handleAddressSubmit("#myaccount-address-form","#submit-add-address")})}}};
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.