PageSourceSearch

https://www.certainteed.com/themes/custom/certainteed/react-app/build/static/js/5480.14c64a7f.chunk.js

js certainteed.com collected 2026-10-02 02:54:25 UTC 31,153 bytes, 3 lines download raw bytes

1/*! For license information please see 5480.14c64a7f.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkreact_app=self.webpackChunkreact_app||[]).push([[5480,8924],{2853:function(e,t,n){n.r(t),n.d(t,{default:function(){return K}});var r=n(1413),o=n(9439),a=n(2791),i=n(9259),c=n(1221),l=n(5755),s="/find-a-rep",u="_ct_app_far_geo",d="_ct_app_far_prod_category",f="_ct_app_far_agent_type",p=1e3,v=n(4051),m=n(4559),g=n(6386),h=n(184),y=(0,a.createContext)({}),_=function(e){var t,n=e.children,a=window.drupalSettings.findARepData;try{if(!a)throw new Error("The app context requires own data-set with key findAProData in drupalSettings object in the global scope.")}catch(k){console.error(k)}var i=null===a||void 0===a||null===(t=a.settings)||void 0===t?void 0:t.product_options_to_agent_types,c=(0,g.Z)(i).map((function(e,t){return(0,r.Z)((0,r.Z)({},e),{},{id:"cat".concat(t+1)})})),s=(0,v.Z)(d,c),p=s.savedCategory,_=s.setSavedCategory,b=(0,m.Z)(u),Z=b.savedLocation,x=b.setSavedLocation,w=(0,l.Z)(f),j=(0,o.Z)(w,2),S=j[0],C=j[1],N={agentServices:a.agentServices,categories:c,selectedCategory:p,selectedLocation:Z,commonSettings:null===a||void 0===a?void 0:a.settings,algoliaSettings:null===a||void 0===a?void 0:a.algolia_settings,agentType:S,setSelectedLocation:x,setSelectedCategory:_,setAgentType:C};return(0,h.jsx)(y.Provider,{value:N,children:n})},b=n(3433),Z=n(485),x=n(7523),w=n(9243),j=n(9647),S=n(2692),C=n(1230),N=n(6056),k=n(8898),D=n(1444),T=n(9315);function E(e){var t=new CustomEvent("far:contact-form",{detail:{action:e}});window.dispatchEvent(t)}var P=function(){var e,t=(0,a.useContext)(y),n=t.categories,r=t.selectedCategory,i=t.setSelectedCategory,c=t.selectedLocation,l=t.setSelectedLocation,u=t.commonSettings,d=(0,w.T)().locationState,f=(0,a.useState)(!1),p=(0,o.Z)(f,2),v=p[0],m=p[1],g=(0,a.useState)([!(!r||!r.length),!!c,!!v,!1]),_=(0,o.Z)(g,2),P=_[0],L=_[1],O=(0,a.useRef)(!1),R=function(e,t){P[e]=t,L((0,b.Z)(P))};(0,a.useEffect)((function(){d.placeId&&(0,S.Z)(d.placeId).then((function(e){l(e),R(1,!0)})).catch((function(e){return console.error(e)}))}),[d.placeId]),(0,a.useEffect)((function(){var e;!(null!==d&&void 0!==d&&null!==(e=d.zip)&&void 0!==e&&e.length)>0&&(l(null),R(1,!1))}),[d]);var I=(0,x.wf)(),$="find_a_rep",M=(0,a.useState)(null),z=(0,o.Z)(M,2),A=z[0],F=z[1];(0,a.useEffect)((function(){O.current||(O.current=!0,I((0,Z.HM)({contentType:"find_a_rep",productCategory:null!==r&&void 0!==r&&r.length?r.map((function(e){return e.label})).join(" | "):void 0}),!0))}),[]);var q="far-home-page",B=function(e){I({event:"contact_method_selected",event_origin:"front-end",content_type:"find_a_rep",method:"contact"===e?"CT_initiated":"user_initiated",vendor_type:"undefined"},!0),"contact"===e?(E("show"),I({event:"form_opened",event_origin:"front_end",form_name:"find_a_rep_contact_me"})):E("hide"),F(e),R(2,!0),m(!1),R(3,!1)},W=function(){return!P.includes(!1)};return(0,h.jsx)("div",{className:"container",children:(0,h.jsxs)("div",{className:(0,j.Z)(q),children:[(0,h.jsxs)("div",{className:(0,j.Z)("cards",[],q),children:[n&&n.length>0&&(0,h.jsxs)(C.Z,{completed:r&&r.length,title:Drupal.t("Product"),className:(0,j.Z)("card",[],q),tooltip:u.home_product_tooltip,children:[(0,h.jsx)("h4",{className:(0,j.Z)("card-title",[],q),children:Drupal.t("I need...")}),(0,h.jsxs)("fieldset",{className:(0,j.Z)("card-options",["in-cols"],q),children:[(0,h.jsx)("legend",{className:"visually-hidden",children:Drupal.t("Please select a product.")}),n.map((function(e,t){return(0,h.jsx)(D.Z,{type:"checkbox",name:"product-".concat(t),extraInput:["small"],extraLabel:(0,j.Z)("card-option",[],q),onChange:function(t){return function(e,t){if(e.target.checked)i(r?[].concat((0,b.Z)(r),[t]):[t]),R(0,!0),I((0,Z.dr)({contentType:$,filterName:"product",filterValue:t.label}),!0);else{var n=(0,b.Z)(r.filter((function(e){return e.label!==t.label})));i(n),R(0,n.length>0)}if(window){var o=new CustomEvent("far:prodCategoryUpdated");window.dispatchEvent(o)}}(t,e)},defaultChecked:r&&r.find((function(t){return t.label===e.label})),children:e.label},e.label)}))]})]}),(0,h.jsxs)(C.Z,{title:Drupal.t("Location"),className:(0,j.Z)("card",[],q),completed:c,tooltip:u.home_location_tooltip,children:[(0,h.jsx)("h4",{className:(0,j.Z)("card-title",[],q),children:Drupal.t("Doing a project in...")}),(0,h.jsx)(N.Z,{inputDefaultValue:null===c||void 0===c||null===(e=c[0])||void 0===e?void 0:e.formatted_address,onPlaceSelected:function(e){return function(e){var t;if(l(e),R(1,!0),I((0,Z.dr)({contentType:$,filterName:"location",filterValue:null===e||void 0===e||null===(t=e[0])||void 0===t?void 0:t.formatted_address}),!0),window){var n=new CustomEvent("far:locationUpdated");window.dispatchEvent(n)}}(e)}})]}),(0,h.jsxs)(C.Z,{title:Drupal.t("Ceilings Representative Selection"),className:(0,j.Z)("card",[],q),completed:A,tooltip:u.home_rep_selections_tooltip,children:[(0,h.jsx)("h4",{className:(0,j.Z)("card-title",[],q),children:Drupal.t("I want to\u2026")}),(0,h.jsxs)("fieldset",{className:(0,j.Z)("card-options",[],q),children:[(0,h.jsx)("legend",{className:"visually-hidden",children:Drupal.t("Please select a product.")}),(0,h.jsx)(D.Z,{type:"radio",name:"request-type",value:"search",extraInput:["small"],
2checked:"search"===A||"agreed"===A,onChange:function(){return B("search")},extraLabel:(0,j.Z)("card-option",[],q),children:Drupal.t("Find a ceilings representative myself")}),(0,h.jsx)(D.Z,{type:"radio",name:"request-type",value:"contact",extraInput:["small"],onChange:function(){return B("contact")},extraLabel:(0,j.Z)("card-option",[],q),children:Drupal.t("Have CertainTeed ceilings reps contact me")})]})]})]}),"contact"!==A&&(0,h.jsx)("div",{className:(0,j.Z)("legal",[],q),children:(0,h.jsxs)(D.Z,{type:"checkbox",name:"agree",value:"agreed",checked:v,onChange:function(e){m(e.target.checked),R(3,e.target.checked),!0===e.target.checked&&F("agreed")},children:[Drupal.t("I Have Read And Agree to The "),(0,h.jsx)(T.Z,{url:"/terms-and-conditions-where-buy/find-pro/get-quote",children:Drupal.t("Terms & Conditions")})]})}),!W()&&"contact"!==A&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{className:(0,j.Z)("process-msg",[],q,["h","h6"]),children:Drupal.t("Fill out the above in order to move forward")}),(0,h.jsx)("div",{className:(0,j.Z)("steps",[],q),children:(0,h.jsx)(k.Z,{steps:P})})]}),W()&&"agreed"===A&&(0,h.jsx)("a",{href:"".concat(s,"/results"),className:[(0,j.Z)("cta",[],q,["btn"])],children:Drupal.t("See rep results")})]})})},L=n(7388),O=n(4474),R=n(7571),I=n(5146);function $(e,t){if(e){var n=e[0].address_components.find((function(e){return e.types[0]===t}));return null===n||void 0===n?void 0:n.long_name}}var M=n(7288),z=n(3426);function A(e,t){return"number"===typeof t?e[t]:t.map((function(t){return e[t]})).flat().filter((function(e){return e}))}var F=n(9985),q=function(e){var t=e.contractorData,n=e.className,o="rep-card",a=t.title,i=t.subTitle,c=t.territoryDetails,l=t.contacts,s=t.contactsTitle,u=void 0===s?"Contacts":s,d=t.productsAvailable,f=(0,j.Z)(o,[],"",[n]),p=function(){return(0,h.jsxs)("div",{className:(0,j.Z)("details",[],o),children:[(c||d)&&(0,h.jsxs)("div",{className:(0,j.Z)("info",[],o),children:[c&&(0,h.jsxs)("div",{className:(0,j.Z)("territory-details",[],o),children:[(0,h.jsx)("p",{className:(0,j.Z)("info--title",[],o),children:Drupal.t("Territory details")}),(0,h.jsx)("p",{children:c})]}),d&&(0,h.jsxs)("div",{className:(0,j.Z)("products-available",[],o),children:[(0,h.jsx)("p",{className:(0,j.Z)("info--title",[],o),children:Drupal.t("Products available")}),d.map((function(e){return e&&e.label})).join(", ")]})]}),(0,h.jsx)("div",{className:(0,j.Z)("contacts",[],o),children:l&&(0,h.jsx)(F.Z,(0,r.Z)((0,r.Z)({},l),{},{title:Drupal.t(u)}))})]})};return(0,h.jsxs)("div",{className:f,children:[(0,h.jsxs)("div",{className:(0,j.Z)("summary",[],o),children:[a&&(0,h.jsx)("h6",{className:(0,j.Z)("title",[],o,["h","h6"]),children:a}),i&&(0,h.jsx)("p",{className:(0,j.Z)("sub-title",[],o),children:i})]}),(0,h.jsx)(p,{})]})},B=function(e){var t=e.hits,n=e.categories,o=e.mods,i=e.extra,c=(0,a.useContext)(y),l=c.selectedCategory,s=c.selectedLocation,u="far-cards-list",d=(0,a.useMemo)((function(){var e=null!==l&&void 0!==l&&l.length?l.map((function(e){return e.label})).join("|"):"",n=(0,Z.BW)(s);return t.map((function(t){return(0,r.Z)((0,r.Z)({},t),{},{analytics:{vendor_called:{event:"vendor_called",event_origin:"front_end",vendor_name:t.field_manager_name,business_unit_by_user:e,vendor_type:"rep",zip_code:n,contentType:"find_a_rep",includeGlobalData:!0}}})}))}),[t,l]);return(0,h.jsx)("ul",{className:(0,j.Z)(u,o,"",i),children:d.map((function(e){var t=function(e,t,n){var r=e.nid,o=e.field_manager_name,a=e.url,i=e.field_address,c=e.field_mail,l=e.field_phone,s=e.field_site,u=e.field_territory_details,d=e.field_agent_type,f=e.field_manager_title,p=(0,z.Z)(null,c,l,s,n),v=JSON.parse(i);return{id:r,title:o,subTitle:f,url:a,meta:["".concat(v.field_address_locality,", ").concat(v.field_address_administrative_area)],contacts:{items:p},territoryDetails:u,productsAvailable:A(t,d)}}(e,n,e.analytics);return(0,h.jsx)("li",{className:(0,j.Z)("list-item",[],u,[]),children:(0,h.jsx)(q,{contractorData:(0,r.Z)((0,r.Z)({},t),{},{cta:null})})},t.id)}))})},W=function(e){var t=e.category,n=e.categories,r=e.bemBlock,o=e.single;return(0,h.jsxs)("section",{className:(0,j.Z)("section",[],r,[]),children:[!
2o&&t.title&&(0,h.jsx)("p",{className:(0,j.Z)("section-title",[],r,["h","h5","text-blue"]),children:t.title}),(0,h.jsx)(B,{hits:t.items,categories:n,mods:[!o&&t.title?"two-cols":""]})]})},U=function(e){var t=e.results,n=e.categories,r=e.bemBlock;return 1===t.length?(0,h.jsx)(W,{category:t[0],categories:n,bemBlock:r,single:!0}):t.map((function(e){return e.title&&(0,h.jsx)(W,{category:e,categories:n,bemBlock:r},e.title)}))};var V=function(e){var t=e.results,n=e.categories,o=e.locationStr,i=e.mods,c=e.extra,l=(0,a.useContext)(y),s=l.selectedCategory,u=l.selectedLocation,d=(0,x.wf)(),f=(0,Z.BW)(u),p=(0,a.useRef)(!1),v=(0,a.useCallback)(function(e){var t=Object.keys(e),n=[];return t.forEach((function(t){return n.push(e[t].map((function(e){return e.label})))})),n.flat().join(" ".concat(Drupal.t("and")," "))}(n),[n]),m=(0,a.useCallback)(function(e,t){var n=Object.keys(t).sort(),r=e.hits.map((function(e){return e.field_agent_type=n.map((function(t){return"number"===typeof e.field_agent_type?Number(t)===e.field_agent_type?e.field_agent_type:void 0:e.field_agent_type.find((function(e){return e===Number(t)}))})).filter((function(e){return e})).sort(),e})).reduce((function(e,n){var r=n.field_agent_type;if(!e.categories[r]){var o=r.map((function(e){return t[e].map((function(t){return t.value.includes(e)?t.label:"1"})).join(" | ")}));e.categories[r]={title:o.join(" | "),items:[],weight:o.length}}return e.categories[r].items.push(n),e}),{total:0,categories:{}}),o=Object.keys(r.categories),a=o.find((function(e){return function(e,t){var n=t.split(","),r=0;return n.forEach((function(t){e.includes(t)&&(r+=1)})),r===e.length}(n,e)}));return a&&o.length>1?{total:r.categories[a].items.length,categories:[r.categories[a]]}:(r.categories=Object.values(r.categories).sort((function(e,t){return t.weight-e.weight||t.items.length-e.items.length})),r.total=r.categories.reduce((function(e,t){return o.length<2?e+t.items.length:e+(t.title?t.items.length:0)}),0),r)}(t,n),[t,n]);(0,a.useEffect)((function(){if(!p.current){var e=(0,Z.H)({productCategory:s.map((function(e){return e.label})).join("|"),contentType:"find_a_rep",zipCode:f,vendorType:"rep",numberOfResults:m.total});e&&(d(e,!0),p.current=!0)}}),[s,f,m.total]);var g="far-results-list";return(0,h.jsxs)("div",{className:(0,j.Z)(g,i,"",c),children:[(0,h.jsx)(M.Z,(0,r.Z)((0,r.Z)({},function(){var e="".concat(m.total," ").concat(Drupal.t("reps found")),t=v&&1===m.categories.length?"".concat(Drupal.t("in")," ").concat(v):"",n="".concat(e," ").concat(t," ").concat(Drupal.t("near")," ").concat(o);return{heading:v&&1===m.categories.length?Drupal.t("Results"):Drupal.t("Results for Reps by Material Type"),description:n,descriptionMobile:"<p>".concat(n,"</p>")}}()),{},{extra:["".concat(g,"__heading")]})),(0,h.jsx)(U,{results:m.categories,categories:n,bemBlock:g})]})},G=n(7557),H=n(6066);var J=function(){var e=(0,a.useContext)(y),t=e.selectedCategory,n=e.selectedLocation,r=e.algoliaSettings,i=e.commonSettings,c=e.setSelectedLocation,l=e.setSelectedCategory,u=(0,w.T)().locationDetails;t||(0,I.Z)(s),(0,a.useEffect)((function(){if(n&&t){var e,r=(0,H.Rf)([{name:"repCategories",value:t.map((function(e){return e.id}))},{name:"placeId",value:null===(e=n[0])||void 0===e?void 0:e.place_id}]);window.history.replaceState({},"","".concat(window.location.pathname,"?").concat(r.toString()))}}),[]),(0,a.useEffect)((function(){u&&c(u)}),[u]);var d=(0,a.useCallback)(function(e){if(e)return e.reduce((function(e,t){return e[t.value[0]]||(e[t.value[0]]=[]),e[t.value[0]].push(t),e}),{})}(t),[t]),f=(0,a.useCallback)((0,R.zC)({field_agent_type:Object.keys(d),field_active_states:$(n,"administrative_area_level_1")||"International"}),[d,n]),v=(0,a.useCallback)(function(e){if(e)return new URLSearchParams({page:0,hitsPerPage:p,filters:e,attributesToRetrieve:["nid","field_manager_name","url","field_address","field_mail","field_phone","field_site","field_territory_details","field_agent_type","field_manager_title"]}).toString()}(f),[f]),m=r.replicas.find((function(e){return e.endsWith("find_a_rep")}))||r.algolia_index,g=(0,O.Z)(m,"",v),_=(0,o.Z)(g,2),b=_[0],Z=_[1],x="far-results-page";return(0,h.jsx)("div",{className:"container",children:(0,h.jsxs)("div",{className:(0,j.Z)(x),children:[(0,h.jsx)(G.Z,{title:Drupal.t("Find a Rep Results"),description:null===i||void 0===i?void 0:i.results_page_tooltip,bemBlock:x,onResetSearch:function(){c(null),l(null),(0,I.Z)(s)}}
2),Z&&(0,h.jsx)(L.gy,{height:"80",width:"80",color:"#005eb8",ariaLabel:"tail-spin-loading",radius:"1",wrapperStyle:{},wrapperClass:"tail-spin-loading",visible:!0}),b&&(0,h.jsx)(V,{categories:d,results:b,locationStr:n[0].formatted_address})]})})},K=function(e){var t,n,l,s,u=e.page,d=(0,a.useState)(null),f=(0,o.Z)(d,2),p=f[0],v=f[1],m=u||(null===(t=window)||void 0===t||null===(n=t.drupalSettings)||void 0===n||null===(l=n.findARepData)||void 0===l||null===(s=l.settings)||void 0===s?void 0:s.currentPage.split("/").pop());return(0,h.jsx)(i.Wrapper,(0,r.Z)((0,r.Z)({},c.Z),{},{callback:function(e){return v(e)},children:"SUCCESS"===p&&(0,h.jsxs)(_,{children:["find-a-rep"===m&&(0,h.jsx)(P,{}),"results"===m&&(0,h.jsx)(J,{})]})}))}},1444:function(e,t,n){var r=n(1413),o=n(4925),a=n(9647),i=n(184),c=["mods","id","name","type","children","base","extraLabel","extraInput","innerRef","onChange"];t.Z=function(e){var t=e.mods,n=e.id,l=e.name,s=e.type,u=void 0===s?"checkbox":s,d=e.children,f=e.base,p=e.extraLabel,v=e.extraInput,m=e.innerRef,g=e.onChange,h=(0,o.Z)(e,c);return(0,i.jsxs)("label",{htmlFor:n,className:(0,a.Z)("label",t,f,p),children:[(0,i.jsx)("input",(0,r.Z)({id:n,name:l,type:u,className:(0,a.Z)(u,t,f,v),ref:m,onChange:g},h)),(0,i.jsx)("span",{className:"input-".concat(u,"__children"),children:d})]})}},6407:function(e,t,n){var r=n(9647),o=n(184);t.Z=function(e){var t=e.iconName,n=e.iconTitle,a=e.width,i=void 0===a?48:a,c=e.height,l=void 0===c?48:c,s=e.className,u=e.style,d=window.isStoryBook?"":"/themes/custom/certainteed/dist/";return(0,o.jsxs)("svg",{className:(0,r.Z)("icon",[],"",[s]),width:i,height:l,"aria-hidden":"true",style:u,role:"img",children:[n?(0,o.jsx)("title",{children:n}):"",(0,o.jsx)("use",{href:"".concat(d,"icons.svg#").concat(t)})]})}},6056:function(e,t,n){var r=n(1413),o=n(4165),a=n(5861),i=n(9439),c=n(2791),l=n(8924),s=n(9259),u=n(5717),d=n(1221),f=n(9243),p=n(6407),v=n(9647),m=n(1444),g=n(49),h=n(184),y=window.drupalSettings.ctGeolocation,_=y.supportedLocales,b=y.defaultSearchablePlaceTypes,Z=y.removeZipCookies;t.Z=function(e){var t,n,y=e.distanceOptions,x=e.onPlaceSelected,w=e.onDistanceChange,j=e.className,S=e.restrictToDefaultRegions,C=void 0===S||S,N=e.restrictToDefaultTypes,k=void 0===N||N,D=e.inputDefaultValue,T=void 0===D?"":D,E=e.focusOnInput,P=e.label,L=e.contextEnabled,O=void 0===L||L,R=e.selectedDistance,I=e.placeholder,$=e.affectCookie,M=void 0!==$&&$,z=e.hideLabel,A=void 0!==z&&z,F=e.inputIdDefault,q=e.iconName,B=void 0===q?"pin":q,W=e.noPrefill,U=e.clearOnLoad,V=void 0!==U&&U,G=(0,f.T)(),H=G.locationState,J=G.autocompleteValue,K=G.setAutocompleteValue,Q=Math.random().toString().slice(-8),X=(0,c.useState)(""),Y=(0,i.Z)(X,2),ee=Y[0],te=Y[1],ne=(0,c.useState)(""),re=(0,i.Z)(ne,2),oe=re[0],ae=re[1],ie=(0,c.useState)(!1),ce=(0,i.Z)(ie,2),le=ce[0],se=ce[1],ue=(0,c.useState)(""),de=(0,i.Z)(ue,2),fe=de[0],pe=de[1],ve=(0,c.useRef)(null);t=ve,n=function(){fe||se(!1)},(0,c.useEffect)((function(){var e=function(e){t.current&&!t.current.contains(e.target)&&n()};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[t,n]),(0,c.useEffect)((function(){if(W&&!H.zip)return te(null),void ae("");if(T&&""!==T.trim())te({label:T,value:{}}),ae(T);else{var e,t,n="/find-a-pro"===(null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.pathname),r=localStorage.getItem("_ct_app_fap_geo");if(r)try{var o,a=JSON.parse(r);if(Array.isArray(a)&&null!==(o=a[0])&&void 0!==o&&o.formatted_address&&n){var i=a[0].formatted_address;ae(i),te({label:i,value:{}})}}catch(d){console.error("Error parsing localStorage _ct_app_fap_geo:",d)}else{var c,l,s,u=null===(c=window)||void 0===c||null===(l=c.ct)||void 0===l||null===(s=l.getCookie)||void 0===s?void 0:s.call(l,"USER_ZIP_CODE");u&&(ae(u),te({label:u,value:{}}))}}}),[T,W]),(0,c.useEffect)((function(){V&&!H.zip&&(te(null),ae("")),W&&!H.zip?(te(null),ae("")):window.setFapGeoLocation=function(e){ae(e),te({label:e,value:{}}),se(!1)}}),[]);var me=(0,c.useRef)(null),ge="m-google-places-auto",he=Drupal.t("Please provide a valid Google Maps API key to use the component"),ye=I||Drupal.t("Enter ZIP Code, City or State"),_e=F||"google-geo-places-input-".concat(Math.random().toString(16).slice(2)),be=(0,c.useMemo)((function(){return{componentRestrictions:C&&_?{country:Object.keys(_)}:{},types:k&&b?b:[]}}),[C,k]),Ze=function(e){return e.length>3};(0,c.useEffect)((function(){E&&null!==me&&void 0!==me&&me.current&&me.current.focus()}),[E]),(0,c.useEffect)((function(){O&&J&&!(0,l.Z)(J,ee)&&te(J);if(T)ae(T);else{var e=function(e){var t;return null!==(t=window)&&void 0!==t&&t.ct&&"function"===typeof window.ct.getCookie?window.ct.getCookie(e):null}("USER_ZIP_CODE");e&&ae(e)}}),[J]);var xe=function(e){var t=document.querySelector(".js-utility-drop__wrapper"),n=document.querySelector(".js-utility-drop__trigger"),r=document.querySelector(".m-google-places-auto__error-message");t&&t.classList.toggle("open",e),n&&n.classList.toggle("active",e),r&&r.classList.toggle("error",e)},we=function(){var e=(0,a.Z)((0,o.Z)().mark((function e(t){var n;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,u.I7)(t.value.place_id);case 3:n=e.sent,n.some((function(e){var t,n=null===(t=e.address_components.find((function(e){return e.types.includes("postal_code")})))||void 0===t?void 0:t.long_name;return!n||Ze(n)}))?(pe(""),xe(!1),"function"===typeof x&&x(n),O&&t!==ee&&K(t),se(!0)):(pe("Please enter a valid postal code."),xe(!0),se(!0)),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(0),pe("An error occurred while validating the address."),xe(!0),se(!0);case 13:null!==me&&void 0!==me&&me.current&&me.current.blur();case 14:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}();if((0,c.useEffect)((function(){var e,t,n;null!==ee&&void 0!==ee&&null!==(e=ee.value)&&void 0!==e&&e.place_id?we(ee):ae((null===ee||void 0===ee||null===(t=ee.value)||void 0===t||null===(n=t.structured_formatting)||void 0===n?void 0:n.main_text)||(null===ee||void 0===ee?void 0:ee.label)||"")}),[ee]),!d.Z.apiKey)return(0,h.jsx)("p",{children:he});var je=g.Z.isMobile,Se=g.Z.isTablet;return(0,h.jsxs)("div",{ref:ve,className:(0,v.Z)(ge,[],"",j),children:[(0,h.jsx)("div",{className:(0,v.Z)("error-message",[],ge),children:fe}),(0,h.jsxs)("div",{className:(0,v.Z)("input",[],ge),children:[(0,h.jsx)(p.Z,{iconName:B,width:18,height:24,className:(0,v.Z)("icon",[],ge)}),!A&&(0,h.jsx)("label",{className:(0,v.Z)("label",[],ge),htmlFor:_e,children:P||ye}),(0,h.jsx)("span",{className:(0,v.Z)("placeholder-custom",[0===(null===oe||void 0===oe?void 0:oe.length)?"":"hide"],ge),children:ye}),(0,h.jsx)(s.Wrapper,(0,r.Z)((0,r.Z)({},d.Z),{},{children:(0,h.jsx)(u.ZP,{selectProps:{value:ee,onChange:function(e){var t,n;te(e),ae((null===e||void 0===e||null===(t=e.value)||void 0===t||null===(n=t.structured_formatting)||void 0===n?void 0:n.main_text)||""),function(){var e;(je||Se)&&(null===(e=document.querySelector(".m-google-places-auto__menu-notice--no-options"))||void 0===e||e.blur())}()},onKeyDown:function(e){var t,n,r;e.keyCode===(null===(t=window)||void 0===t||null===(n=t.ct)||void 0===n||null===(r=n.keyCodes)||void 0===r?void 0:r.ent)&&""!==oe&&Z&&(M&&Z(),"function"===typeof x&&x(null),ae(""),te(""),se(!1))},unstyled:!0,openMenuOnFocus:!1,openMenuOnClick:!1,classNamePrefix:ge,inputId:_e,ref:me,inputValue:oe,onInputChange:function(e,t){var n,r,o=t.action;"input-change"===o?(ae(e),se(!0)):ae((null===ee||void 0===ee||null===(n=ee.value)||void 0===n||null===(r=n.structured_formatting)||void 0===r?void 0:r.main_text)||(null===ee||void 0===ee?void 0:ee.label)||"");se("menu-close"!==o||!!fe)},menuIsOpen:le,noOptionsMessage:function(){return null},filterOptions:function(e){return e.filter((function(e){var t,n,r=null===e||void 0===e||null===(t=e.value)||void 0===t||null===(n=t.address_components.find((function(e){return e.types.includes("postal_code")})))||void 0===n?void 0:n.long_name;return!r||Ze(r)}))}},autocompletionRequest:be})}))]}),y&&(0,h.jsxs)("fieldset",{className:(0,v.Z)("radius",[],ge),children:[(0,h.jsx)("legend",{className:"visually-hidden",children:Drupal.t("Select location radius")}),(0,h.jsx)("div",{className:(0,v.Z)("radius-options",[],ge),children:y.map((function(e){return(0,h.jsx)(m.Z,{name:"location-radius-".concat(Q),type:"radio",children:e.label,checked:e.value===R,onChange:function(){return w(e.value)}},e.value+Q)}))})]})]})}},8898:function(e,t,n){var r=n(9647),o=n(6407),a=n(184);t.Z=function(e){var t=e.steps,n=e.mods,i=e.extra,c="m-process-steps";return(0,a.jsx)("ul",{className:(0,r.Z)(c,n,"",i),children:t.map((function(e,t){return(0,a.jsx)("li",{className:(0,r.Z)("step",[],c),children:(0,a.jsx)("span",{className:(0,r.Z)("status-icon",[],c,[e&&"is-active"]),children:(0,a.jsx)(o.Z,{iconName:"
2checked"})})},t)}))})}},7288:function(e,t,n){var r=n(9647),o=n(7413),a=n(184);t.Z=function(e){var t=e.heading,n=e.description,i=e.descriptionMobile,c=e.extra,l="results-heading",s=(0,o.Z)().breakpoint,u=s.isSmallTablet||!s.isMobile;return(0,a.jsxs)("div",{className:(0,r.Z)(l,[],"",c),children:[(0,a.jsx)("p",{className:(0,r.Z)("heading",[],l,["h",u?"h4":"h2 text-blue"]),children:t}),(n||i)&&(0,a.jsx)("div",{className:(0,r.Z)("description",[u?"desktop":"mobile"],l),dangerouslySetInnerHTML:{__html:u?n:i}})]})}},1221:function(e,t,n){n(5614);var r=(window.drupalSettings.ctGeolocation||"").googleMapApiKey,o={apiKey:atob(r),libraries:["places"]};t.Z=o},4474:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(9439),o=n(2791),a=n(4084);function i(e,t,n){var i=(0,o.useState)(null),c=(0,r.Z)(i,2),l=c[0],s=c[1],u=(0,o.useState)(!1),d=(0,r.Z)(u,2),f=d[0],p=d[1],v=(0,o.useState)(!1),m=(0,r.Z)(v,2),g=m[0],h=m[1];return(0,o.useEffect)((function(){var r=(0,a.zu)(e);return p(!0),n&&r.search(t,function(e){var t={};return new URLSearchParams(e).forEach((function(e,n){t[n]=decodeURIComponent(e)})),t}(n)).then((function(e){s(e),p(!1),h(!0)})),function(){!0,p(!1)}}),[e,t,n]),[l,f,g]}},7413:function(e,t,n){var r=n(9439),o=n(2791),a=n(49);t.Z=function(){var e=(0,o.useState)(window.innerWidth),t=(0,r.Z)(e,2),n=t[0],i=t[1],c=function(){i(window.innerWidth)};return(0,o.useEffect)((function(){return window.addEventListener("resize",c),function(){window.removeEventListener("resize",c)}}),[]),{width:n,breakpoint:(0,a.Z)(n)}}},485:function(e,t,n){n.d(t,{BW:function(){return o},GW:function(){return s},H:function(){return a},HM:function(){return c},IT:function(){return u},dr:function(){return i},q1:function(){return r},zg:function(){return l}});var r=function(e){try{return new URL(e).href}catch(t){return window.location.origin+e}},o=function(e){if(null!==e&&void 0!==e&&e.length){var t=e[0].address_components.find((function(e){return e.types.includes("postal_code")}));return(null===t||void 0===t?void 0:t.long_name)||e[0].formatted_address||""}return""},a=function(e){var t=e.productCategory,n=e.contentType,r=e.zipCode,o=e.numberOfResults,a=e.vendorType;window.dataLayer=window.dataLayer||[];var i="no result";return o>0&&o<6?i="1-5 results":o>5&&(i="over 5 results"),"no result"!==i?{event:"vendor_results_viewed",event_origin:"front_end",business_unit_by_user:t,content_type:n,zip_code:r,vendor_type:a}:(window.dataLayer.pop({event:"vendor_results_viewed"}),!1)},i=function(e){return{event:"project_details_provided",event_origin:"front_end",content_type:e.contentType,field_name:e.filterName,field_value:e.filterValue}},c=function(e){return{event:"project_details_loaded",event_origin:"front_end",business_unit_by_user:e.productCategory||"undefined",content_type:e.contentType||"undefined",vendor_type:"undefined"}},l=function(e){return!e||e<1?"no result":e<=5?"1-5 results":"over 5 results"},s=function(e){var t=e.searchTerm,n=e.numberOfResults,r=e.elementLocation,o=e.contentType;return{event:"view_search_results",event_origin:"front_end",search_term:t,number_of_results:l(n),element_location:r,content_type:o}},u=function(e,t){return{event:"sort_selected",eventOrigin:"front-end",sort_by:e||"undefined",total_product_count:t||"undefined"}}},9647:function(e,t){t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=[n?"".concat(n,"__").concat(e):e];return t=t.map((function(t){return t&&(n?"".concat(n,"__").concat(e,"--").concat(t):"".concat(e,"--").concat(t))})).filter((function(e){return e})),o.concat(r,t).join(" ").trim()}},49:function(e,t){t.Z=function(e){var t=e||window.innerWidth;return{isDesktop:t>=1280,isTablet:t<1280,isSmallTablet:t>767&&t<=960,isMobile:t<960,isMobileSmall:t<480}}},2692:function(e,t){t.Z=function(e){var t=new window.google.maps.Geocoder,n=window.google.maps.GeocoderStatus.OK;return new Promise((function(r,o){t.geocode({placeId:e},(function(e,t){return t!==n?o(t):r(e)}))}))}},9797:function(e,t,n){function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},2110:function(e,t,n){var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(v){var o=p(n);o&&o!==v&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var c=l(t),m=l(n),g=0;g<i.length;++g){var h=i[g];if(!a[h]&&(!r||!r[h])&&(!m||!m[h])&&(!c||!c[h])){var y=f(n,h);try{s(t,h,y)}catch(_){}}}}return t}},746:function(e,t){var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function Z(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case c:case i:case p:return e;default:switch(e=e&&e.$$typeof){case s:case f:case g:case m:case l:return e;default:return t}}case o:return t}}}function x(e){return Z(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=s,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=c,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||Z(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return Z(e)===s},t.isContextProvider=function(e){return Z(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return Z(e)===f},t.isFragment=function(e){return Z(e)===a},t.isLazy=function(e){return Z(e)===g},t.isMemo=function(e){return Z(e)===m},t.isPortal=function(e){return Z(e)===o},t.isProfiler=function(e){return Z(e)===c},t.isStrictMode=function(e){return Z(e)===i},t.isSuspense=function(e){return Z(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===c||e===i||e===p||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===s||e.$$typeof===f||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b||e.$$typeof===h)},t.typeOf=Z},8309:function(e,t,n){e.exports=n(746)},5755:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(2791),o=function(){};var a="undefined"!==typeof window,i=function(e,t,n){if(!a)return[t,o,o];if(!e)throw new Error("useLocalStorage key may not be falsy");var i=n?n.raw?function(e){return e}:n.deserializer:JSON.parse,c=(0,r.useRef)((function(e){try{var r=n?n.raw?String:n.serializer:JSON.stringify,o=localStorage.getItem(e);return null!==o?i(o):(t&&localStorage.setItem(e,r(t)),t)}catch(l){return t}})),l=(0,r.useState)((function(){return c.current(e)})),s=l[0],u=l[1];(0,r.useLayoutEffect)((function(){return u(c.current(e))}),[e]);var d=(0,r.useCallback)((function(t){try{var r="function"===typeof t?t(s):t;if("undefined"===typeof r)return;var o=void 0;o=n?n.raw?"string"===typeof r?r:JSON.stringify(r):n.serializer?n.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,o),u(i(o))}catch(l){}}),[e,u]),f=(0,r.useCallback)((function(){try{localStorage.removeItem(e),u(void 0)}catch(l){}}),[e,u]);return[s,d,f]}},8924:function(e,t,n){var r=n(4678);t.Z=function(e,t){return(0,r.Z)(e,t)}}}]);
3//# sourceMappingURL=5480.14c64a7f.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.