PageSourceSearch

https://www.prairiemoon.com/mm5/themes/genesis/branches/production…/dist/1673.499a3aa1503dc8340a33.chunk.js

js prairiemoon.com collected 2026-10-01 10:31:48 UTC 4,163 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_mvps_genesis_quickstart_theme=self.webpackChunk_mvps_genesis_quickstart_theme||[]).push([[1673],{1673:(e,t,s)=>{s.d(t,{AddressValidation:()=>d});var r=s(1559);class d{#e;options;containerElement;primaryAddressList;secondaryAddressList;primaryPrefix;secondaryPrefix;formElement;secondaryShown;addressList;constructor(e){let{formElement:t=".js-validate-address",primaryAddressElements:s=".js-primary-address",primaryPrefixAttribute:d="data-primary-address-prefix",secondaryAddressElements:i=".js-secondary-address",secondaryPrefixAttribute:a="data-secondary-address-prefix",secondaryShownElement:n="[data-secondary-shown]"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.#e=new r.A(this),this.containerElement=this.#e.isElement("containerElement",e),this.formElement=this.#e.isElement("formElement",t),this.primaryAddressElements=this.#e.isElementList("primaryAddressElements",s,{container:this.containerElement}),this.primaryPrefix=this.#e.isDefined("primaryPrefixAttribute",this.containerElement.getAttribute(d)),this.secondaryAddressElements=this.#e.isElementList("secondaryAddressElements",i,{container:this.containerElement}),this.secondaryPrefix=this.#e.isDefined("secondaryPrefixAttribute",this.containerElement.getAttribute(a)),this.secondaryShown=Boolean(this.#e.isElement("secondaryShownElement",n,{container:this.containerElement,required:!1})),this.setAddressList(),this.bindEvents(),this.setFirstSuggestion()}setAddressList(){this.addressList=Array.prototype.slice.call(this.primaryAddressElements),this.secondaryAddressElements.length&&(this.addressList=this.addressList.concat(Array.prototype.slice.call(this.secondaryAddressElements)))}bindEvents(){this.bindAddressListEvents()}bindAddressListEvents(){for(const e of this.addressList)e.addEventListener("change",this.copyFields.bind(this))}setFirstSuggestion(){this.primaryAddressElements.length&&(this.primaryAddressElements[0].checked=!0),this.secondaryShown&&this.secondaryAddressElements.length&&(this.secondaryAddressElements[0].checked=!0),this.copyFields()}copyFields(){const e=this.#e.isElement("primarySelectedAddress",this.getSelectedAddress());if(this.setFormFields(this.primaryPrefix,e),this.secondaryShown&&this.secondaryAddressElements.length){const e=this.#e.isElement("secondarySelectedAddress",this.getSelectedAddress("secondary"));this.setFormFields(this.secondaryPrefix,e)}}getSelectedAddress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"primary";const t=this.#e.isString("addressType",e).toLowerCase();this.#e.inSet("typeVal",t,["primary","secondary"]);const s="secondary"===t?this.secondaryAddressElements:this.primaryAddressElements;return Array.from(s).find((e=>e.checked))}setFormFields(e,t){this.formElement.elements[e+"Address1"]&&(this.formElement.elements[e+"Address1"].value=t.hasAttribute("data-mm_address_addr1")?t.getAttribute("data-mm_address_addr1"):""),this.formElement.elements[e+"Address2"]&&(this.formElement.elements[e+"Address2"].value=t.hasAttribute("data-mm_address_addr2")?t.getAttribute("data-mm_address_addr2"):""),this.formElement.elements[e+"City"]&&(this.formElement.elements[e+"City"].value=t.hasAttribute("data-mm_address_city")?t.getAttribute("data-mm_address_city"):""),this.formElement.elements[e+"Company"]&&(this.formElement.elements[e+"Company"].value=t.hasAttribute("data-mm_address_comp")?t.getAttribute("data-mm_address_comp"):""),this.formElement.elements[e+"Country"]&&(this.formElement.elements[e+"Country"].value=t.hasAttribute("data-mm_address_country")?t.getAttribute("data-mm_address_country"):""),this.formElement.elements[e+"State"]&&(this.formElement.elements[e+"State"].value=t.hasAttribute("data-mm_address_state")?t.getAttribute("data-mm_address_state"):""),this.formElement.elements[e+"StateSelect"]&&(this.formElement.elements[e+"StateSelect"].value=t.hasAttribute("data-mm_address_state")?t.getAttribute("data-mm_address_state"):""),this.formElement.elements[e+"Zip"]&&(this.formElement.elements[e+"Zip"].value=t.hasAttribute("data-mm_address_zip")?t.getAttribute("data-mm_address_zip"):"")}}}}]);
2//# sourceMappingURL=1673.499a3aa1503dc8340a33.chunk.js.map

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.