(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9698,5633],{27980:function(e,t,r){"use strict";var n=r(85893);t.Z=e=>(0,n.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18","aria-label":"Financing Icon",...e,children:(0,n.jsx)("path",{d:"M8.325 14.25H9.6375V13.3125C10.2625 13.2 10.8 12.9562 11.25 12.5812C11.7 12.2062 11.925 11.65 11.925 10.9125C11.925 10.3875 11.775 9.90625 11.475 9.46875C11.175 9.03125 10.575 8.65 9.675 8.325C8.925 8.075 8.40625 7.85625 8.11875 7.66875C7.83125 7.48125 7.6875 7.225 7.6875 6.9C7.6875 6.575 7.80325 6.31875 8.03475 6.13125C8.26575 5.94375 8.6 5.85 9.0375 5.85C9.4375 5.85 9.75 5.947 9.975 6.141C10.2 6.3345 10.3625 6.575 10.4625 6.8625L11.6625 6.375C11.525 5.9375 11.272 5.55625 10.9035 5.23125C10.5345 4.90625 10.125 4.725 9.675 4.6875V3.75H8.3625V4.6875C7.7375 4.825 7.25 5.1 6.9 5.5125C6.55 5.925 6.375 6.3875 6.375 6.9C6.375 7.4875 6.547 7.9625 6.891 8.325C7.2345 8.6875 7.775 9 8.5125 9.2625C9.3 9.55 9.847 9.80625 10.1535 10.0312C10.4595 10.2563 10.6125 10.55 10.6125 10.9125C10.6125 11.325 10.4655 11.628 10.1715 11.8215C9.878 12.0155 9.525 12.1125 9.1125 12.1125C8.7 12.1125 8.3345 11.9843 8.016 11.7277C7.697 11.4718 7.4625 11.0875 7.3125 10.575L6.075 11.0625C6.25 11.6625 6.522 12.147 6.891 12.516C7.2595 12.8845 7.7375 13.1375 8.325 13.275V14.25ZM9 16.5C7.9625 16.5 6.9875 16.303 6.075 15.909C5.1625 15.5155 4.36875 14.9813 3.69375 14.3063C3.01875 13.6313 2.4845 12.8375 2.091 11.925C1.697 11.0125 1.5 10.0375 1.5 9C1.5 7.9625 1.697 6.9875 2.091 6.075C2.4845 5.1625 3.01875 4.36875 3.69375 3.69375C4.36875 3.01875 5.1625 2.48425 6.075 2.09025C6.9875 1.69675 7.9625 1.5 9 1.5C10.0375 1.5 11.0125 1.69675 11.925 2.09025C12.8375 2.48425 13.6313 3.01875 14.3063 3.69375C14.9813 4.36875 15.5155 5.1625 15.909 6.075C16.303 6.9875 16.5 7.9625 16.5 9C16.5 10.0375 16.303 11.0125 15.909 11.925C15.5155 12.8375 14.9813 13.6313 14.3063 14.3063C13.6313 14.9813 12.8375 15.5155 11.925 15.909C11.0125 16.303 10.0375 16.5 9 16.5Z",fill:"#101820"})})},93860:function(e,t,r){"use strict";var n=r(85893);t.Z=e=>{let{className:t,...r}=e;return(0,n.jsxs)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",className:t,"aria-label":"Trane Shield Icon",...r,children:[(0,n.jsx)("path",{d:"M9 16.5C7.2625 16.0625 5.82825 15.0655 4.69725 13.509C3.56575 11.953 3 10.225 3 8.325V3.75L9 1.5L15 3.75V8.325C15 10.225 14.4345 11.953 13.3035 13.509C12.172 15.0655 10.7375 16.0625 9 16.5ZM9 14.925C10.3 14.5125 11.375 13.6875 12.225 12.45C13.075 11.2125 13.5 9.8375 13.5 8.325V4.78125L9 3.09375L4.5 4.78125V8.325C4.5 9.8375 4.925 11.2125 5.775 12.45C6.625 13.6875 7.7 14.5125 9 14.925Z",fill:"#DA2400"}),(0,n.jsx)("rect",{x:"4",y:"7",width:"10",height:"3",fill:"#DA2400"})]})}},85633:function(e,t,r){"use strict";var n=r(85893),i=r(40645),s=r.n(i),a=r(4298),l=r.n(a);t.Z=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l(),{src:"https://maps.googleapis.com/maps/api/js?key=".concat("AIzaSyC6moVjL3cGFX4KPeCqxNrGvLhFbMg2mJY","&libraries=places"),strategy:"lazyOnload",onError:e=>{console.error("Failed to load Google Maps script:",e)}}),(0,n.jsx)(s(),{id:"585f46826ef3bd87",children:".pac-container{z-index:10000!important;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1);-moz-box-shadow:0 4px 6px -1px rgba(0,0,0,.1);box-shadow:0 4px 6px -1px rgba(0,0,0,.1)}.pac-item{padding:8px 12px;cursor:pointer}.pac-item:hover{background-color:#f3f4f6}"})]})},6887:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(85893);r(67294);var i=r(93860),s=e=>{let{className:t,...r}=e;return(0,n.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",className:t,"aria-label":"Mobile Icon",...r,children:(0,n.jsx)("path",{d:"M4.5 17.25C4.0875 17.25 3.7345 17.1033 3.441 16.8097C3.147 16.5157 3 16.1625 3 15.75V2.25C3 1.8375 3.147 1.48425 3.441 1.19025C3.7345 0.89675 4.0875 0.75 4.5 0.75H12C12.4125 0.75 12.7657 0.89675 13.0597 1.19025C13.3533 1.48425 13.5 1.8375 13.5 2.25V5.25H12V4.5H4.5V13.5H12V12.75H13.5V15.75C13.5 16.1625 13.3533 16.5157 13.0597 16.8097C12.7657 17.1033 12.4125 17.25 12 17.25H4.5ZM11.2125 12L8.025 8.8125L9.075 7.7625L11.2125 9.9L15.45 5.6625L16.5 6.7125L11.2125 12Z",fill:"#101820"})})},a=e=>{let{className:t,...r}=e;return(0,n.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",className:t,"aria-label":"Headset Icon",...r,children:(0,n.jsx)("path",{d:"M9 17.25V15.75H14.25V15H11.25V9H14.25V8.25C14.25 6.8 13.7375 5.5625 12.7125 4.5375C11.6875 3.5125 10.45 3 9 3C7.55 3 6.3125 3.5125 5.2875 4.5375C4.2625 5.5625 3.75 6.8 3.75 8.25V9H6.75V15H3.75C3.3375 15 2.98425 14.8533 2.69025 14.5597C2.39675 14.2657 2.25 13.9125 2.25 13.5V8.25C2.25 7.325 2.428 6.453 2.784 5.634C3.1405 4.8155 3.625 4.1 4.2375 3.4875C4.85 2.875 5.5655 2.3905 6.384 2.034C7.203 1.678 8.075 1.5 9 1.5C9.925 1.5 10.797 1.678 11.616 2.034C12.4345 2.3905 13.15 2.875 13.7625 3.4875C14.375 4.1 14.8595 4.8155 15.216 5.634C15.572 6.453 15.75 7.325 15.75 8.25V15.75C15.75 16.1625 15.6033 16.5157 15.3097 16.8097C15.0157 17.1033 14.6625 17.25 14.25 17.25H9Z",fill:"#101820"})})},l=e=>{let{className:t,...r}=e;return(0,n.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",className:t,"aria-label":"Home Icon",...r,children:(0,n.jsx)("path",{d:"M3 15.75V6.75L9 2.25L15 6.75V15.75H10.5V10.5H7.5V15.75H3Z",fill:"#101820"})})},o=e=>{let{className:t,...r}=e;return(0,n.jsx)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",className:t,"aria-label":"Member Icon",...r,children:(0,n.jsx)("path",{d:"M4.3875 12.825C5.025 12.3375 5.7375 11.953 6.525 11.6715C7.3125 11.3905 8.1375 11.25 9 11.25C9.8625 11.25 10.6875 11.3905 11.475 11.6715C12.2625 11.953 12.975 12.3375 13.6125 12.825C14.05 12.3125 14.3907 11.7312 14.6348 11.0812C14.8783 10.4312 15 9.7375 15 9C15 7.3375 14.4158 5.92175 13.2472 4.75275C12.0782 3.58425 10.6625 3 9 3C7.3375 3 5.922 3.58425 4.7535 4.75275C3.5845 5.92175 3 7.3375 3 9C3 9.7375 3.122 10.4312 3.366 11.0812C3.6095 11.7312 3.95 12.3125 4.3875 12.825ZM9 9.75C8.2625 9.75 7.6405 9.497 7.134 8.991C6.628 8.4845 6.375 7.8625 6.375 7.125C6.375 6.3875 6.628 5.7655 7.134 5.259C7.6405 4.753 8.2625 4.5 9 4.5C9.7375 4.5 10.3595 4.753 10.866 5.259C11.372 5.7655 11.625 6.3875 11.625 7.125C11.625 7.8625 11.372 8.4845 10.866 8.991C10.3595 9.497 9.7375 9.75 9 9.75ZM9 16.5C7.9625 16.5 6.9875 16.303 6.075 15.909C5.1625 15.5155 4.36875 14.9813 3.69375 14.3063C3.01875 13.6313 2.4845 12.8375 2.091 11.925C1.697 11.0125 1.5 10.0375 1.5 9C1.5 7.9625 1.697 6.9875 2.091 6.075C2.4845 5.1625 3.01875 4.36875 3.69375 3.69375C4.36875 3.01875 5.1625 2.48425 6.075 2.09025C6.9875 1.69675 7.9625 1.5 9 1.5C10.0375 1.5 11.0125 1.69675 11.925 2.09025C12.8375 2.48425 13.6313 3.01875 14.3063 3.69375C14.9813 4.36875 15.5155 5.1625 15.909 6.075C16.303 6.9875 16.5 7.9625 16.5 9C16.5 10.0375 16.303 11.0125 15.909 11.925C15.5155 12.8375 14.9813 13.6313 14.3063 14.3063C13.6313 14.9813 12.8375 15.5155 11.925 15.909C11.0125 16.303 10.0375 16.5 9 16.5Z",fill:"#101820"})})},c=r(27980),d=e=>{let{emergencyService:t,nateCertified:r,nexiaDealerDiagnostics:d,charterMemberDate:u,leasingOption:h,isTcs:p}=e;return(0,n.jsxs)("div",{children:[p&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(i.Z,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Trane Comfort Specialist"})]}),t&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(a,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"text-sm m-0 pl-3",children:"24/7 Emergency Service"})]}),!0===r&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(l,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"NATE Certified"})]}),!!u&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(o,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Charter Member"})]}),d&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(s,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Remote Diagnostics"})]}),!h&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(c.Z,{className:"mb-2.5 h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Financing"})]})]})}},25473:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return E}});var n=r(85893),i=r(32752),s=r(14070),a=r(14191),l=r(67294),o=r(11163),c=r(31955),d=r(93967),u=r.n(d),h=r(32293),p=r(83884),m=r(78853),f=r(88964),v=r(99275),x=r(54370),g=r(47013),_=r(93860),b=r(27980),w=e=>{let{leasingOption:t,isTcs:r}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-y-2",children:[r&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(_.Z,{className:"h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Trane Comfort Specialist"})]}),!t&&(0,n.jsxs)("div",{className:"flex pb-0.5",children:[(0,n.jsx)(b.Z,{className:"h-4 w-4 lg:h-5 lg:w-5"}),(0,n.jsx)("p",{className:"m-0 pl-3 text-sm",children:"Offers Financing"})]})]})},y=r(65755),C=r(41940),j=r(33353),k=r(40112),N=r(24623),S=r(7354),F=r(2372),Z=r(25014),R=r(88341);let I=["/campaigns/sk/2026-offer-texas/","/campaigns/mg/2026-offer-phoenix/","/campaigns/mg/repair-or-replace-phoenix/","/campaigns/sk/repair-or-replace-texas/"];var M=e=>{var t,r,i,s,a,d,_,b,M;let{dealer:z,style:L="dark",cardPosition:T}=e,[B,D]=(0,l.useState)(!1),[E,A]=(0,l.useState)(!1),[V,P]=(0,l.useState)(!1),[O,H]=(0,l.useState)(""),[X,G]=(0,l.useState)(!1),W=(0,o.useRouter)(),q=W.asPath,{xs:U,small:$}=(0,x.Z)(),J=(0,l.useMemo)(()=>I.some(e=>q.includes(e)),[q]),K="Contact Local Pro",Y=e=>{D(!0),(0,p.p)({event:"dealer_form_open",formId:"contact-your-local-dealer",dealerName:z.data.name,dealerId:z.data.companyID,dataText:e,cardPosition:T})},{name:Q,addressLine1:ee,city:et,state:er,showFinancing:en,showAddress:ei,isTcs:es}=z.data,ea=(null!==(d=z.data.name)&&void 0!==d?d:"").length>32,el=window.useTraneInfo;(0,l.useEffect)(()=>{G(["/dealer-locator/","/schedule-service/","/find-a-dealer/"].some(e=>W.asPath.includes(e)))},[W.asPath]),(0,l.useEffect)(()=>{V&&!O.length&&(async()=>{var e,t,r,n;let i=null===(e=z.whodis)||void 0===e?void 0:e.routingGroupID;if(!i){H("N/A");return}let s=window.location.href,a=null===(r=z.data)||void 0===r?void 0:null===(t=r.companyID)||void 0===t?void 0:t.toString(),l={dealerName:null===(n=z.data)||void 0===n?void 0:n.name,initialPage:sessionStorage.getItem("initialPage")||"",gaSessionId:(0,f.Z)("s")||"",[R.$]:(0,R.Z)()||""},o=c.Z.get(v.Su);try{let e=await (0,m.$)(i,o,s,a,l);!e||e.error||e.status&&e.status>=400?H("N/A"):e.body?H(e.body):H("N/A")}catch(e){H("N/A"),console.error("Error fetching leased number:",e)}})()},[V,O.length,null===(t=z.whodis)||void 0===t?void 0:t.routingGroupID,null===(r=z.data)||void 0===r?void 0:r.companyID,null===(i=z.data)||void 0===i?void 0:i.name]);let eo=(0,l.useMemo)(()=>{var t,r;return J?O?(0,n.jsx)(S.Z,{specifiedNumber:O,phoneNumbers:null===(r=z.whodis)||void 0===r?void 0:r.assignedNumbers,directNumber:z.data.phone1,linkClass:"font-normal cursor-pointer inline-block text-center items-center leading-none rounded border-1 rounded-full flex focus:border-hover-red bg-trane-red hover:bg-hover-red focus:bg-hover-red text-white border-trane-red border w-full justify-center px-2 py-3.5 font-Lato",dataPosition:"body",dataLocation:"dealer card"}):(0,n.jsx)("div",{className:"flex h-[44px] items-center justify-center",children:(0,n.jsx)(Z.Z,{smallVersion:!0})}):O.length?(0,n.jsx)(N.Z,{specifiedNumber:O,phoneNumbers:null===(t=z.whodis)||void 0===t?void 0:t.assignedNumbers,directNumber:z.data.phone1,linkClass:"font-normal cursor-pointer inline-block text-center items-center leading-none rounded border-1 rounded-full flex focus:border-hover-red bg-trane-red hover:bg-hover-red focus:bg-hover-red text-white border-trane-red border w-full justify-center px-2 py-3.5 font-Lato",dataPosition:"body",dataLocation:"dealer card",referer:e.referer,numberType:e.numberType,autoLaunch:!!(U||$)}):(0,n.jsx)("div",{className:"flex h-[44px] items-center justify-center",children:(0,n.jsx)(Z.Z,{smallVersion:!0})})},[O,null===(s=z.whodis)||void 0===s?void 0:s.assignedNumbers,null===(a=z.data)||void 0===a?void 0:a.phone1,U,$,e.referer,e.numberType,J]);return(0,n.jsxs)("article",{className:u()({"border border-ceiling-bright-white":"dark"===L},"rounded-[20px]","bg-white","mb-6","flex","flex-col","shadow-md","max-w-[25rem]","items-stretch","h-full p-6"),children:[(0,n.jsxs)("div",{className:u()("flex flex-col justify-between gap-y-4",{"bg-white text-rich-black":"light"===L}),children:[(0,n.jsx)("h2",{className:"m-0 p-0 text-18 font-600 leading-5",children:(0,n.jsx)("a",{className:"capitalize text-black hover:text-trane-red",href:(0,F.Z)(Q,et,er,z.data.companyID),"data-position":"body","data-location":"dealer card","data-action":"internal link","data-text-grouping":"dealer name","data-text":Q,"data-type":"link",children:Q})}),(0,n.jsx)("div",{className:u()("mb-0 h-auto",{"pointer-events-none hidden md:invisible md:block":el||(null!==(_=z.metaData.total_review_count)&&void 0!==_?_:0)<=0,"mt-0":ea,"mt-2":!ea}),children:(0,n.jsx)(y.Z,{rating:null!==(b=z.metaData.average_rating)&&void 0!==b?b:0,total:null!==(M=z.metaData.total_review_count)&&void 0!==M?M:0,onClick:()=>{var e;!el&&(null!==(e=z.metaData.total_review_count)&&void 0!==e?e:0)>0&&A(!0)},includeTotal:!0,variant:"small"})}),(!!ee||!!et)&&(0,n.jsxs)("p",{className:u()("m-0 text-14 capitalize text-cadet",{"hidden md:block":(!ee||!ei)&&!et}),children:[!!ee&&ei&&(0,n.jsxs)(n.Fragment,{children:[(0,h.Z)(ee),", "]}),!!et&&(0,n.jsx)(n.Fragment,{children:(0,h.Z)(et)}),!!er&&!ei&&(0,n.jsxs)(n.Fragment,{children:[", ",er.length>2?(0,h.Z)(er):er.toUpperCase()]})]})]}),(0,n.jsx)("div",{className:"flex-1 bg-white pt-6",children:(0,n.jsx)(w,{showFinancing:en,isTcs:!!es})}),(0,n.jsxs)("div",{className:"mt-2 flex flex-col gap-x-2 gap-y-3 md:mt-6 xl:flex-row",children:[(0,n.jsx)("div",{className:u()("text-center","flex","flex-row","justify-center xl:w-1/2"),children:V?eo:(0,n.jsxs)(g.Z,{disableBase:!0,addClass:"font-normal cursor-pointer inline-block text-center items-center leading-none rounded border-1 rounded-full flex focus:border-hover-red bg-trane-red hover:bg-hover-red focus:bg-hover-red text-white border-trane-red border w-full justify-center px-2 py-3.5 font-Lato",onClick:()=>P(!0),dataTrackingProps:{position:"body",location:"dealer card",action:"call",textGrouping:"phone number",text:"Call",type:"button"},children:[(0,n.jsx)(k.Z,{pathClassName:"stroke-white",className:"h-18px w-18px lg:h-5 lg:w-5"}),(0,n.jsx)("span",{className:"m-0 pl-3 text-14 text-white",children:"Call"})]})}),(0,n.jsx)("div",{className:"xl:w-1/2",children:(0,n.jsx)(g.Z,{tertiary:!0,addClass:"rounded-full w-full !text-14 text-trane-red px-2 font-Lato font-normal py-4 lg:py-[18px] border",onClick:()=>Y(K),dataTrackingProps:{location:"dealer card",text:K,position:"body",action:"pop-up",type:"button",textGrouping:"cta"},children:K})})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.Z,{companyId:"".concat(z.data.companyID),onClose:()=>D(!1),show:B,dealerName:z.data.name}),(0,n.jsx)(j.Z,{companyName:z.data.name,companyId:parseInt("".concat(z.data.companyID),10),metaData:z.metaData,onClose:()=>A(!1),show:E})]})]})},z=r(68188),L=r(6887);let T=["/residential/en/campaigns/mv/hvac-built-to-last/","/residential/en/campaigns/sy/hvac-built-to-last/"],B=["/campaigns/sk/2026-offer-texas/","/campaigns/mg/2026-offer-phoenix/"];var D=e=>{var t,r,i,s,a,c,d;let{dealer:m,style:f="dark",cardPosition:v,referer:_,numberType:b}=e,[w,Z]=(0,l.useState)(!1),[R,I]=(0,l.useState)(!1),{xs:M,small:D}=(0,x.Z)(),E=(0,o.useRouter)().asPath,A=(0,l.useMemo)(()=>T.includes(E),[E]),V=(0,l.useMemo)(()=>B.some(e=>E.includes(e)),[E]),P=A?"Contact Dealer":"Book Online",O=e=>{Z(!0),(0,p.p)({event:"dealer_form_open",formId:"contact-your-local-dealer",dealerName:m.data.name,dealerId:m.data.companyID,dataText:e,cardPosition:v})},{name:H,addressLine1:X,charterMemberDate:G,city:W,state:q,emergencyService:U,nateCertified:$,nexiaDealerDiagnostics:J,showFinancing:K,leasingOption:Y,showAddress:Q,isTcs:ee}=m.data,et=null!==(a=m.metaData.total_review_count)&&void 0!==a?a:0,er=et>0,en=(null!==(c=m.data.name)&&void 0!==c?c:"").length>32;return(0,n.jsxs)("article",{className:u()({"border border-ceiling-bright-white":"dark"===f},"rounded-[20px]","mb-6","flex","flex-col","shadow-md","max-w-[25rem]","min-h-104","items-stretch","h-full"),children:[(0,n.jsxs)("div",{className:u()("min-h-37.5 flex flex-col justify-between border-b pl-6",{"bg-white text-rich-black":"light"===f}),children:[(0,n.jsx)("h2",{className:"mb-0 pb-0 text-20 font-600",children:(0,n.jsx)("a",{className:"capitalize text-black hover:text-trane-red",href:(0,F.Z)(H,W,q,m.data.companyID),"data-position":"body","data-location":"dealer card","data-action":"internal link","data-text-grouping":"dealer name","data-text":H,"data-type":"link",children:H})}),(0,n.jsx)("div",{className:u()("mb-0 h-auto",{"pointer-events-none invisible":!er,"mt-0":en,"mt-2":!en}),children:(0,n.jsx)(y.Z,{rating:null!==(d=m.metaData.average_rating)&&void 0!==d?d:0,total:et,onClick:()=>{er&&I(!0)},includeTotal:!0})}),(!!X||!!W)&&(0,n.jsxs)("p",{className:"m-0 pb-4 text-14 capitalize text-cadet",children:[!!X&&Q&&(0,n.jsxs)(n.Fragment,{children:[(0,h.Z)(X),", "]}),!!W&&(0,n.jsx)(n.Fragment,{children:(0,h.Z)(W)}),!!q&&!Q&&(0,n.jsxs)(n.Fragment,{children:[", ",q.length>2?(0,h.Z)(q):q.toUpperCase()]}),(0,n.jsx)("br",{}),ee&&1014270===m.data.companyID?(0,n.jsx)("a",{href:"tel:".concat(z.ht.tel),className:"text-14 font-medium text-cadet","data-position":"body","data-location":"dealer card","data-action":"call","data-text-grouping":"phone number","data-text":"".concat(z.ht.formatted),"data-type":"link",children:(0,n.jsx)("span",{children:z.ht.formatted})}):V?(0,n.jsx)(S.Z,{phoneNumbers:null===(t=m.whodis)||void 0===t?void 0:t.assignedNumbers,directNumber:m.data.phone1,linkClass:"font-medium text-14 text-cadet",dataPosition:"body",dataLocation:"dealer card"}):(0,n.jsx)(N.Z,{phoneNumbers:null===(r=m.whodis)||void 0===r?void 0:r.assignedNumbers,directNumber:m.data.phone1,linkClass:"font-medium text-14 text-cadet",dataPosition:"body",dataLocation:"dealer card",referer:_,numberType:b})]})]}),(0,n.jsx)("div",{className:"flex-1 bg-white px-6 pt-7",children:(0,n.jsx)(L.Z,{emergencyService:U,charterMemberDate:G,nateCertified:$,nexiaDealerDiagnostics:J,showFinancing:K,leasingOption:Y,isTcs:!!ee})}),D&&M?(0,n.jsx)("div",{className:u()("p-6 pb-8","text-center","text-rich-black","flex","flex-row","justify-center"),children:V?(0,n.jsxs)(S.Z,{phoneNumbers:null===(i=m.whodis)||void 0===i?void 0:i.assignedNumbers,directNumber:m.data.phone1,linkClass:"font-bold cursor-pointer inline-block text-center items-center leading-none rounded border-2 rounded-full flex border border-silver-sand hover:border-silver-sand focus:border-silver-sand py-4 px-10",numberClass:"hidden",dataPosition:"body",dataLocation:"dealer card",children:[(0,n.jsx)(k.Z,{pathClassName:"stroke-trane-red",className:"h-6 w-6"}),(0,n.jsx)("p",{"data-tracking-text":"Call",className:"m-0 pl-3 text-18",children:"Call"})]}):(0,n.jsxs)(N.Z,{phoneNumbers:null===(s=m.whodis)||void 0===s?void 0:s.assignedNumbers,directNumber:m.data.phone1,linkClass:"font-bold cursor-pointer inline-block text-center items-center leading-none rounded border-2 rounded-full flex border border-silver-sand hover:border-silver-sand focus:border-silver-sand py-4 px-10",numberClass:"hidden",dataPosition:"body",dataLocation:"dealer card",referer:_,numberType:b,children:[(0,n.jsx)(k.Z,{pathClassName:"stroke-trane-red",className:"h-6 w-6"}),(0,n.jsx)("p",{"data-tracking-text":"Call",className:"m-0 pl-3 text-18",children:"Call"})]})}):(0,n.jsx)("div",{className:u()("mx-6 pb-8","text-center","text-rich-black"),children:(0,n.jsx)(g.Z,{primary:!0,addClass:"rounded-full w-full",onClick:()=>O(P),dataTrackingProps:{location:"dealer card",text:P,position:"body",action:"pop-up",type:"button",textGrouping:"cta"},children:P})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.Z,{companyId:"".concat(m.data.companyID),onClose:()=>Z(!1),show:w,dealerName:m.data.name}),(0,n.jsx)(j.Z,{companyName:m.data.name,companyId:parseInt("".concat(m.data.companyID),10),metaData:m.metaData,onClose:()=>I(!1),show:R})]})]})},E=e=>{var t,r,o;let c,d,h;let p=(0,l.useRef)(null),m=(0,l.useRef)(null),f=(0,l.useRef)([]),[v,x]=(0,l.useState)({active:!1,arrows:!1,arrows_color:"",arrows_bg:"",arrows_border:"",dots_navigation:!1,dots_colors:"",slides_per_view:0,transition_effect:"",wrapper_css:!1,automatic_transition:!1,infinite_loop:!1,transition_delay:0,hide_overflow:!0}),[g,_]=(0,l.useState)(0),[b,w]=(0,l.useState)(1),[y,C]=(0,l.useState)(0),[j,k]=(0,l.useState)(0),[N,S]=(0,l.useState)(0),[F,Z]=(0,l.useState)(!1),[R,I]=(0,l.useState)([]),[z,L]=(0,l.useState)(null),[T,B]=(0,l.useState)(0),[E,A]=(0,l.useState)(window.innerWidth);(0,l.useEffect)(()=>{if("function"!=typeof ResizeObserver)return;let e=m.current;if(!e)return;B(e.clientWidth);let t=null,r=new ResizeObserver(()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{B(e.clientWidth)})});return r.observe(e),()=>{r.disconnect(),t&&window.cancelAnimationFrame(t)}},[]);let V=null===(t=e.attributes)||void 0===t?void 0:t.data,P="dealer-locator-slider"===e.typeOfData,O="call focused cards"===(P&&(null==V?void 0:V.dealer_card_variation)||"default").toString().trim().toLowerCase(),H=(t,r)=>O?(0,n.jsx)(M,{dealer:t,cardPosition:r+1,numberType:e.numberType}):(0,n.jsx)(D,{dealer:t,cardPosition:r+1,numberType:e.numberType}),X=e=>!!e&&"object"==typeof e&&"data"in e&&"metaData"in e&&"location"in e&&"searchInfo"in e,G=P&&E>=600&&E<1024&&1===v.slides_per_view;window.innerWidth<600?(c=parseFloat(e.attributes.data.mobile_options_slides_per_view),d="1"===e.attributes.data.mobile_options_active,h="1"===e.attributes.data.mobile_options_infinite_loop):window.innerWidth<1024?(c=parseFloat(e.attributes.data.tablet_options_slides_per_view),d="1"===e.attributes.data.tablet_options_active,h="1"===e.attributes.data.tablet_options_infinite_loop):(c=parseFloat(e.attributes.data.desk_options_slides_per_view),d="1"===e.attributes.data.desk_options_active,h="1"===e.attributes.data.desk_options_infinite_loop);let W=(0,l.useCallback)(()=>{if(I([]),p.current&&e.innerBlocks){if(e.innerBlocks.length<=c||!h)I(e.innerBlocks),p.current.style.transition="300ms",p.current.style.left="0";else if(h&&d){let t=[...e.innerBlocks];for(let r=0;r{let t=e.attributes.data,r=Object.keys(t).filter(e=>e.includes("desk_options_")&&"_"!==e.charAt(0)),n=Object.keys(t).filter(e=>e.includes("tablet_options_")&&"_"!==e.charAt(0)),i=Object.keys(t).filter(e=>e.includes("mobile_options_")&&"_"!==e.charAt(0)),s=(r,n)=>{let i=[];if(r&&r[0]){let s=r[0].split("_"),a=s[0]+"_"+s[1]+"_";r.forEach(e=>{i.push(e.split(n)[1])});for(let r=0;r{"slides_per_view"===n||"transition_delay"===n?r[n]=parseFloat(t["".concat(a).concat(n)]):"active"===n?r[n]=!(e.innerBlocks.length<=parseFloat(t["".concat(a,"slides_per_view")]))&&"0"!==t["".concat(a).concat(n)]:r[n]="1"===t["".concat(a).concat(n)]||"0"!==t["".concat(a).concat(n)]&&t["".concat(a).concat(n)]}),x(Object.assign(v,r))}}};E<600?s(i,"mobile_options_"):E<1024?s(n,"tablet_options_"):s(r,"desk_options_")},[E,e.attributes.data]);(0,l.useEffect)(()=>(W(),q(),()=>{W(),q()}),[E]),(0,l.useEffect)(()=>{var t;if(!p.current)return;p.current.style.display="",p.current.classList.add("w-full");let r=T||(null===(t=m.current)||void 0===t?void 0:t.clientWidth)||p.current.clientWidth;if(!v.hide_overflow&&!P){let e=document.getElementById("gs-main-wrapper");e&&e instanceof HTMLElement&&(e.style.width="calc(100% + 2rem)",e.style.margin="0 -1rem")}if(G&&"number"==typeof v.slides_per_view){if(p.current.classList.remove("container","grid","columns"),p.current.classList.add("flex","items-stretch","relative","h-full","ml-6","justify-center"),p.current.style.display="flex",p.current.childNodes.forEach(e=>{if(e&&e.style&&"number"==typeof v.slides_per_view&&v.slides_per_view>0){let t=v.slides_per_view;e.style.width=(r-15*(t-1))/t+"px",e.style.height="auto",e.style.flexShrink="0",e.style.marginRight="15px",e.style.transitionDuration="0.5s"}}),"number"==typeof v.slides_per_view&&v.slides_per_view>0){let e=v.slides_per_view;S((r-15*(e-1))/e)}}else if(v.active&&e.innerBlocks&&"number"==typeof v.slides_per_view&&e.innerBlocks.length>v.slides_per_view){if(p.current.classList.remove("container","grid","columns"),p.current.classList.add("flex","items-stretch","relative","h-full"),G?p.current.classList.add("justify-center"):p.current.classList.remove("justify-center"),p.current.childNodes.forEach(e=>{if(e&&e.style&&"number"==typeof v.slides_per_view&&v.slides_per_view>0){let t=v.slides_per_view;e.style.width=(r-15*(t-1))/t+"px",e.style.height="auto",e.style.flexShrink="0",e.style.marginRight="15px",e.style.transitionDuration="0.5s"}}),"number"==typeof v.slides_per_view&&v.slides_per_view>0){let e=v.slides_per_view;S((r-15*(e-1))/e)}}else p.current.style.marginLeft="0px",p.current.style.display="grid",p.current.style.gap="1rem",p.current.style.gridTemplateColumns="repeat("+("number"==typeof v.slides_per_view&&v.slides_per_view>0?v.slides_per_view:1)+", minmax(0, 1fr))",p.current.childNodes.forEach(e=>{e&&e.style&&(e.style.width="auto",e.style.flexShrink="0",e.style.marginRight="0")}),p.current.classList.remove("justify-center")},[P,G,v.active,v.slides_per_view,e.innerBlocks,v.hide_overflow,E,15,T]),(0,l.useEffect)(()=>{let e=()=>{A(window.innerWidth)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[E]),(0,l.useEffect)(()=>{f.current&&"number"==typeof v.slides_per_view&&f.current[v.slides_per_view+1]&&f.current[v.slides_per_view+1].current&&C(f.current[v.slides_per_view+1].current.getBoundingClientRect().x)},[v.slides_per_view,E]),(0,l.useEffect)(()=>{let t=e=>{var t,r,n,i;let s=null===(r=f.current)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.current,a=null===(i=f.current)||void 0===i?void 0:null===(n=i[e])||void 0===n?void 0:n.current;return s&&a?a.getBoundingClientRect().left-s.getBoundingClientRect().left:(N+15)*e};if(v.infinite_loop&&g===v.slides_per_view+1&&!F&&(p.current.style.transition="none",p.current.style.marginLeft="-".concat((N+15)*v.slides_per_view,"px"),p.current.style.left="50%",p.current.style.transform="translateX(calc(-".concat(N/2,"px ))"),w(1)),v.infinite_loop&&g===v.slides_per_view+e.innerBlocks.length+1&&!F&&(p.current.style.transition="300ms",p.current.style.transform="translateX(calc(-".concat(N/2+(N+15)*j,"px ))"),k(0),setTimeout(()=>{p.current.style.transition="300ms",p.current.style.transform="translateX(calc(-".concat(N/2,"px ))"),_(v.slides_per_view+1)},300)),v.infinite_loop&&g>v.slides_per_view+1&&g<=v.slides_per_view+e.innerBlocks.length&&!F&&(p.current.style.transition="300ms",p.current.style.transform="translateX(calc(-".concat(N/2+(N+15)*j,"px ))")),v.infinite_loop||0!==g||F||(p.current.style.transition="300ms",p.current.style.left="0"),!v.infinite_loop&&g>0&&g{p.current.style.transition="none",p.current.style.transform="translateX(calc(-".concat(N/2+(N+15)*(e.innerBlocks.length-1),"px ))"),w(e.innerBlocks.length),_(v.slides_per_view+e.innerBlocks.length)},300)),v.infinite_loop&&F&&g>v.slides_per_view&&g0&&gR.length-v.slides_per_view&&!F){let e=R.length-v.slides_per_view;p.current.style.left="-".concat(t(e),"px")}!v.infinite_loop&&0===g&&F&&(p.current.style.transition="300ms",p.current.style.left="0px")},[g,y,F,E,N,15]),(0,l.useEffect)(()=>{let e=setInterval(()=>{let e=v.slides_per_view||1;if(v.infinite_loop)_(g+e),k(j+e),w(b+e),Z(!1),p.current.style.transition="300ms",p.current.style.transform="translateX(calc(-".concat(N/2+(N+15)*b,"px ))");else{let t=Math.max(0,R.length-e);if(g>=t)_(0),k(0),w(0),p.current.style.transition="300ms";else{let r=Math.min(g+e,t),n=r-g;_(r),k(r),w(b+n)}}},0!==v.transition_delay?1e3*v.transition_delay:1e4);return v.automatic_transition&&0!==v.transition_delay||clearInterval(e),()=>{clearInterval(e)}});let U=()=>{Z(!1);let e=v.slides_per_view||1;if(v.infinite_loop){_(g+e),k(j+e),w(b+e);return}let t=R.length,r=Math.max(0,t-e),n=Math.ceil(t/e),i=Math.min(Math.min((n>0?g>=r?n-1:Math.floor(g/e):0)+1,Math.max(0,n-1))*e,r),s=i-g;_(i),k(i),w(b+s)},$=()=>{Z(!0);let e=v.slides_per_view||1;if(v.infinite_loop){_(g-e),k(j-e),w(b-e);return}let t=R.length,r=Math.max(0,t-e),n=Math.ceil(t/e),i=Math.min(Math.max(0,(n>0?g>=r?n-1:Math.floor(g/e):0)-1)*e,r),s=g-i;_(i),k(i),w(b-s)},J=(t,r)=>{if(t.preventDefault(),v.automatic_transition&&v.infinite_loop){let t=r+v.slides_per_view;0===r?(p.current.style.transition="300ms",p.current.style.transform="translateX(calc(-".concat(N/2,"px ))"),k(r),setTimeout(()=>{_(v.slides_per_view+1),w(v.slides_per_view+1)},300)):r===e.innerBlocks.length-1?(_(t+1),k(r),w(e.innerBlocks.length)):(_(t+1),k(r),w(t+1))}else v.infinite_loop||(Z(!1),_(r),k(r),w(r))},K="number"==typeof v.slides_per_view&&v.slides_per_view>0?v.slides_per_view:1,Y=null!==(o=null===(r=e.innerBlocks)||void 0===r?void 0:r.length)&&void 0!==o?o:0,Q=Math.max(0,Y-K),ee=Math.ceil(Y/K),et=ee>0?Math.max(0,Math.min(j>=Q?ee-1:Math.floor(j/K),ee-1)):0,er=((e,t)=>{if(t)return"numbers";if(!0===e)return"dots";if(!1===e||null==e)return"none";if("string"==typeof e){let t=e.trim().toLowerCase();return"none"===t?"none":"numbers"===t||"number"===t?"numbers":"dots"===t||"dot"===t||"1"===t||"true"===t?"dots":"0"===t||""===t?"none":"dots"}return"none"})(v.dots_navigation,P),en=v.active&&ee>1&&"none"!==er;return(0,n.jsxs)("div",{id:"gs-main-wrapper",className:"relative h-full ".concat(en?"pb-7":""," ").concat(v.active&&v.arrows&&v.hide_overflow?"mx-auto w-80% md:w-90%":"w-full overflow-visible"),children:[v.active&&v.arrows&&v.hide_overflow?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{id:"left-arrow",title:"Previous Slide","aria-label":"Previous Slide","data-position":"body","data-location":"content block","data-action":"toggle","data-text":"previous slide","data-type":"arrow",onClick:$,className:u()("borer-box group absolute z-50 flex h-full w-7 items-center justify-center hover:cursor-pointer md:w-10",{"-left-4 md:left-12 lg:-left-12":P,"-left-7 md:-left-10":!P},{"pointer-events-none bg-transparent text-light-silver opacity-100":P&&!v.infinite_loop&&0===j,"pointer-events-auto opacity-100":!(P&&!v.infinite_loop&&0===j)},{"text-trane-red":!P&&"trane-red"===v.arrows_color,"text-light-silver":!P&&"light-silver"===v.arrows_color}),children:(0,n.jsx)("div",{className:u()("absolute flex items-center text-center transition-all ease-in group-hover:border-transparent group-hover:bg-[rgba(0,0,0,0.05)] group-hover:transition-all group-hover:ease-in",{"h-[35px] w-[35px]":P,"h-5 w-5 md:h-7 md:w-7":!P,"top-[43%]":en,"top-50%":!en,"rounded-full":!0,"border border-light-silver bg-white":P&&!v.infinite_loop&&0===j,"border-2 border-trane-red":!(P&&!v.infinite_loop&&0===j)},"light-silver"===v.arrows_bg&&"bg-light-silver","trane-red"===v.arrows_bg&&"bg-trane-red","white"===v.arrows_bg&&"bg-white","transparent"===v.arrows_bg&&"bg-transparent"),children:(0,n.jsx)(s.Z,{svgClass:"mx-auto",pathClass:u()({"stroke-light-silver":P&&!v.infinite_loop&&0===j,"stroke-trane-red":!(P&&!v.infinite_loop&&0===j)})})})}),(0,n.jsx)("button",{id:"right-arrow",title:"Next Slide","aria-label":"Next Slide","data-position":"body","data-location":"content block","data-action":"toggle","data-text":"next slide","data-type":"arrow",onClick:U,className:u()("borer-box group absolute z-50 flex h-full w-7 items-center justify-center hover:cursor-pointer md:w-10",{"-right-4 md:right-12 lg:-right-12":P,"-right-7 md:-right-10":!P},{"pointer-events-none opacity-0":j>=R.length-K&&!v.infinite_loop,"opacity-1 pointer-events-auto":!(j>=R.length-K&&!v.infinite_loop)},{"text-trane-red":!P&&"trane-red"===v.arrows_color,"text-light-silver":!P&&"light-silver"===v.arrows_color}),children:(0,n.jsx)("div",{className:u()("absolute flex items-center text-center transition-all ease-in group-hover:border-transparent group-hover:bg-[rgba(0,0,0,0.05)] group-hover:transition-all group-hover:ease-in",{"h-[35px] w-[35px]":P,"h-5 w-5 md:h-7 md:w-7":!P,"top-[43%]":en,"top-50%":!en},"rounded-full border-2 border-trane-red","light-silver"===v.arrows_bg&&"bg-light-silver","trane-red"===v.arrows_bg&&"bg-trane-red","white"===v.arrows_bg&&"bg-white","transparent"===v.arrows_bg&&"bg-transparent"),children:(0,n.jsx)(a.Z,{svgClass:"mx-auto",pathClass:"stroke-trane-red"})})})]}):null,(0,n.jsx)("div",{id:"main-container",ref:m,className:u()("relative m-0 h-full px-0 py-7",{"mx-auto w-full max-w-md overflow-hidden":G,"w-full overflow-hidden":!G&&(P||v.hide_overflow),"w-85%":!G&&!P&&!v.hide_overflow,"border-l border-[#a3adb1]":v.wrapper_css&&0!==g&&v.active,"border-r border-[#a3adb1]":v.wrapper_css&&"number"==typeof v.slides_per_view&&g!==R.length-v.slides_per_view&&v.active}),children:(0,n.jsx)("div",{ref:p,className:"slider-wrapper box-content w-full",onTouchStart:e=>{L(e.touches[0].clientX)},onTouchMove:t=>{if(null===z)return;let r=z-t.touches[0].clientX;if(r>5){var n,i;!v.infinite_loop&&g>=Math.max(0,(null!==(i=null===(n=e.innerBlocks)||void 0===n?void 0:n.length)&&void 0!==i?i:0)-K)||U()}r<-5&&(v.infinite_loop||0!==g)&&$(),L(null)},children:R.length>0&&(G?(0,n.jsx)("div",{className:"flex w-full flex-row transition-transform duration-300",children:R.map((e,t)=>(f.current[t]=(0,l.createRef)(),X(e))?(0,n.jsx)("div",{id:"slide-".concat(t),ref:f.current[t],className:"mr-1 w-full flex-shrink-0",children:H(e,t)},t):null)}):R.map((e,t)=>(f.current[t]=(0,l.createRef)(),P&&X(e))?(0,n.jsx)("div",{id:"slide-".concat(t),ref:f.current[t],children:H(e,t)},t):(0,n.jsx)("div",{id:"slide-".concat(t),ref:f.current[t],children:(0,n.jsx)(i.Z,{blocks:e.innerBlocks})},t)))})}),en&&(0,n.jsx)("ul",{className:u()("absolute left-1/2 z-50 flex -translate-x-1/2 list-none items-center justify-center p-0",{"-bottom-10":"numbers"===er,"-bottom-0":"numbers"!==er}),children:((e,t)=>{if(e<=0)return[];if(e<=5)return Array.from({length:e},(e,t)=>({kind:"dot",index:t}));let r=e-1,n=Math.max(0,Math.min(t,r)),i=new Set([0,r,n]),s=e=>{e>0&&e=5)break;s(e)}let a=Array.from(i).sort((e,t)=>e-t),l=[];for(let e=0;e1&&l.push({kind:"ellipsis",key:"".concat(r,"-").concat(t)}),l.push({kind:"dot",index:t})}return l})(ee,et).map(e=>{if("ellipsis"===e.kind)return(0,n.jsx)("li",{className:"mx-2",children:(0,n.jsx)("span",{className:"inline-block pb-2 text-24 font-800 leading-normal text-cadet","aria-hidden":"true",children:"…"})},e.key);let t=e.index,r=Math.min(t*K,Q),i=et===t;return(0,n.jsx)("li",{className:"mx-1",children:"numbers"===er?i?(0,n.jsx)("div",{className:"text-primary flex h-9 w-9 items-center justify-center rounded-full bg-black text-16 leading-normal text-white hover:no-underline","data-toggle":"tab",role:"tablist",children:t+1}):(0,n.jsx)("a",{className:"text-primary flex h-9 w-9 items-center justify-center rounded-full border border-cadet bg-white text-16 font-normal leading-normal text-black hover:no-underline",onClick:e=>{J(e,r)},"data-toggle":"tab",role:"tablist",children:t+1}):i?(0,n.jsx)("div",{className:"h-3 w-3 rounded-full bg-black","data-toggle":"tab",role:"tablist","aria-label":"Page ".concat(t+1)}):(0,n.jsx)("a",{className:"block h-3 w-3 rounded-full bg-gray-300",onClick:e=>{J(e,r)},"data-toggle":"tab",role:"tablist","aria-label":"Go to page ".concat(t+1)})},t)})})]})}},7443:function(e,t,r){"use strict";var n=r(34155);r(91479);var i=r(67294),s=i&&"object"==typeof i&&"default"in i?i:{default:i},a=void 0!==n&&n.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,s=void 0===i?a:i;c(l(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o=document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+d(e+"-"+r)),u[n]}function p(e,t){var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,s=void 0!==i&&i;this._sheet=n||new o({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),n&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var s=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=s,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return s.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=h(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return p(i,e)}):[p(i,t)]}}return{styleId:h(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),f=i.createContext(null);f.displayName="StyleSheetContext";var v=s.default.useInsertionEffect||s.default.useLayoutEffect,x=new m;function g(e){var t=x||i.useContext(f);return t&&v(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}g.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=g},40645:function(e,t,r){"use strict";e.exports=r(7443).style},91479:function(){}}]);