PageSourceSearch

https://www.princessauto.com/_next/static/chunks/app/%5Blocale%5D/layout-35adbc3020037ef3.js

js princessauto.com collected 2026-10-03 21:39:10 UTC 20,025 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{629:(e,t,r)=>{"use strict";r.d(t,{Lv:()=>s,Ng:()=>n,nd:()=>o});let{useLogoutMutation:n,useForgotPasswordMutation:o,useResetPasswordMutation:s}=r(91634).Z.injectEndpoints({endpoints:e=>({logout:e.mutation({query:()=>({url:"/auth/logout",method:"POST",credentials:"include"}),invalidatesTags:["Auth","Cart"]}),forgotPassword:e.mutation({query:e=>{let{payload:t}=e;return{url:"/users/password-reset-request",method:"POST",body:t,credentials:"include"}}}),resetPassword:e.mutation({query:e=>{let{payload:t,language:r}=e;return{url:"/users/reset-password?language=".concat(r),method:"POST",body:t,credentials:"include"}}})}),overrideExisting:!1})},7894:(e,t,r)=>{"use strict";r.d(t,{PriceFormatProviderWrapper:()=>i});var n=r(54568),o=r(83985);let s={"en-US":"en-CA",fr:"fr-CA"},i=e=>{var t;let{locale:r,children:i}=e,a=null!=(t=s[r])?t:"en-CA";return(0,n.jsx)(o.PriceFormatProvider,{locale:a,currency:"CAD",children:i})}},11258:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>i,Ds:()=>o,XR:()=>s});let n=(0,r(36351).Z0)({name:"notification",initialState:{},reducers:{showNotification:(e,t)=>{let{key:r,notice:n}=t.payload;e[r]=n},clearNotification:(e,t)=>{var r;let n=null==(r=t.payload)?void 0:r.key;if(n){let{[n]:t,...r}=e;return r}return{}}}}),{showNotification:o,clearNotification:s}=n.actions,i=n.reducer},14878:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var n=r(71488);let o={HOME:{get:()=>"/"},MY_CART:{get:()=>"/mycart"},SAVE_FOR_LATER:{get:()=>"/mycart#saved-for-later"},CHECKOUT:{get:()=>"/checkout"},ORDER_CONFIRMATION:{get:()=>"/order-confirmation/[orderId]",set:e=>"/order-confirmation/".concat(e)},PRE_CHECKOUT:{get:()=>"/pre-checkout"},SIGNIN:{get:()=>"/signin"},SIGNUP:{get:()=>"/signup"},PDP:{get:()=>"/product/[name]/[PalID]/[sku]",set:(e,t,r)=>r?"/product/".concat(e,"/").concat(t,"/").concat(r):"/product/".concat(e,"/").concat(t)},PDP_GIFT_CARD:{get:()=>"/product/GiftCard"},CATEGORY:{set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",o=n.kW.category[r.startsWith("fr")?"fr":"en"],s=(null==e?void 0:e.startsWith("/"))?e.slice(1):e||"";return"/".concat(o,"/").concat(s,"/").concat(t)}},CATEGORY_LANDING:{set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",o=r.startsWith("fr")?"fr":"en",s=n.kW.category[o],i=n.kW.landing[o];return"/".concat(s,"/").concat(i,"/").concat(e,"/").concat(t)}},BRAND:{get:()=>"/brands/[...path]/[categoryId]",set:(e,t)=>"/brands".concat(e.startsWith("/")?"":"/").concat(e,"/").concat(t)},PAYMENT_ACCOUNTS:{get:()=>"https://www.princessauto.com/en/payments-accounts"},MY_ACCOUNT:{get:()=>"/my-account"},MY_ACCOUNT_DASHBOARD:{get:()=>"/my-account/dashboard"},MY_ACCOUNT_PROFILE:{get:()=>"/my-account/profile"},EDIT_MY_ACCOUNT_PROFILE:{get:()=>"/my-account/profile/edit-profile-settings"},MY_ACCOUNT_ORDERS:{get:()=>"/my-account/orders"},MY_ACCOUNT_ORDER_DETAILS:{get:()=>"/my-account/orders/[id]",set:e=>"/my-account/orders/".concat(e)},MY_ACCOUNT_ADDRESSES:{get:()=>"/my-account/addresses"},MY_ACCOUNT_PAYMENT_METHODS:{get:()=>"/my-account/payment-methods"},ORDER_STATUS:{get:()=>"/order-status/",set:e=>"/order-status/".concat(e)},ADD_PAYMENT_METHOD:{get:()=>"/my-account/payment-methods/add-payment-method"},MY_ACCOUNT_EMAILS_NEWSLETTERS:{get:()=>"/my-account/emails-newsletters"},EDIT_EMAILS_NEWSLETTERS:{get:()=>"/my-account/emails-newsletters/edit"},MY_ACCOUNT_GIFT_CARDS:{get:()=>"/my-account/gift-cards"},MY_ACCOUNT_WISHLISTS:{get:()=>"/my-account/wishlists"},MY_ACCOUNT_PREFERRED_STORE:{get:()=>"/store-locator"},MY_ACCOUNT_CHANGE_PASSWORD:{get:()=>"/my-account/profile/change-password"},ADD_ADDRESS:{get:()=>"/my-account/addresses/add-address"},EDIT_ADDRESS:{get:()=>"/my-account/addresses/edit-address"},CREATE_WISHLIST:{get:()=>"/my-account/wishlists/create-wishlist"},WISHLIST_DETAILS:{get:()=>"/my-account/wishlists/[wishListId]",set:e=>"/my-account/wishlists/".concat(e)},WISHLIST_EDIT:{get:()=>"/my-account/wishlists/[wishListId]/edit",set:e=>"/my-account/wishlists/".concat(e,"/edit")},ADD_GIFT_CARD:{get:()=>"/my-account/gift-cards/add-gift-card"}
1,STORE_LOCATOR:{get:()=>"/store-locator",set:e=>"/store-locator/".concat(e)},STORE_DETAILS:{get:()=>"/store-locator/store/[slug]",set:e=>"/store-locator/store/".concat(e)},RESOURCES_LANDING_PAGE:{get:()=>"/resources"},BUYING_GUIDES:{set:e=>"/buying-guides/".concat(e)},TECH_TIPS:{set:e=>"/tech-tips/".concat(e)},PROJECT_SHOWCASES:{set:e=>"/project-showcases/".concat(e)},SEARCH:{get:()=>"/search",set:e=>"/search?q=".concat(encodeURIComponent(e))},FLYER:{get:()=>"/flyers"},GIFT_CARDS:{get:()=>"/gift-cards"},NATIONAL_CALL_CENTRE:{get:()=>"/national-call-centre"},PAYPAL_LOADING:{get:()=>"/paypal-loading"},PAYPAL_POPUP_CALLBACK:{get:()=>"/paypal-popup-callback"},CONTACT_US:{get:()=>"/contact-us"}}},16469:e=>{e.exports={"notification-list":"styles_notification-list__Yw_dG"}},20061:(e,t,r)=>{"use strict";r.d(t,{_:()=>n});let n=e=>"string"==typeof e||"number"==typeof e?e:""},20564:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var n=r(54568),o=r(96006);function s(e){let{children:t}=e;return(0,n.jsx)(o.SessionProvider,{refetchOnWindowFocus:!1,children:t})}},21750:e=>{e.exports={"scroll-to-top":"styles_scroll-to-top__Pl5ws"}},24338:(e,t,r)=>{"use strict";r.d(t,{Hk:()=>o,K5:()=>n});let n=1e3,o={REFRESH_TOKEN_ERROR:"RefreshAccessTokenError",SESSION_EXPIRED:"SessionExpired"}},29764:()=>{},30550:(e,t,r)=>{"use strict";r.d(t,{NotificationList:()=>g});var n=r(54568),o=r(21531),s=r(63897),i=r(7620),a=r(67822),c=r.n(a);let l=e=>{let{notification:t}=e,{removeNotification:r}=(0,o.E)(),a=(0,i.useCallback)(e=>{r(e)},[r]),{timeout:l,id:d}=t;return(0,i.useEffect)(()=>{if(l&&l>0){let e=setTimeout(()=>{a(d)},l);return()=>clearTimeout(e)}},[l,d,a]),(0,n.jsx)(s.Fc,{...t,variant:"inline",onClose:()=>a(d),className:c()["notification-item"]})};l.displayName="NotificationItem";var d=r(16469),u=r.n(d);let g=()=>{let{notifications:e}=(0,o.E)();return 0===e.length?null:(0,n.jsx)("div",{className:u()["notification-list"],children:e.map(e=>(0,n.jsx)(l,{notification:e},e.id))})}},35824:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(54568),o=r(52069),s=r(4869),i=r(7620);let a=e=>{let{children:t}=e,[r]=(0,i.useState)(()=>new o.E({defaultOptions:{queries:{staleTime:3e5,gcTime:18e5,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1}}}));return(0,n.jsx)(s.Ht,{client:r,children:t})}},43020:(e,t,r)=>{"use strict";r.d(t,{i:()=>s});var n=r(12247);let o=(0,n.createServerReference)("7f6c360650fc216217e880d239db2e65a424a10b22",n.callServer,void 0,n.findSourceMapURL,"createBackInStockAlert"),s=async e=>{try{let r=await o(e.productId,e.variantId,e.email);if(!r)return e.addNotification({type:"error",message:e.translate("error.generic.somethingWentWrong")}),{handled:"error"};if(r.success){var t;let r=String(null!=(t=e.email)?t:"");return e.addNotification({type:"success",message:e.translate("trackItem.label",{email:r})}),{handled:"success"}}if(r.errors&&Object.keys(r.errors).length>0)return e.addNotification({type:"success",message:e.translate("trackingItem.label")}),{handled:"alreadyTracking"};return e.addNotification({type:"error",message:e.translate("error.generic.somethingWentWrong")}),{handled:"error"}}catch(t){return e.addNotification({type:"error",message:e.translate("error.generic.somethingWentWrong")}),{handled:"error"}}}},49337:(e,t,r)=>{"use strict";r.d(t,{LinkProvider:()=>i});var n=r(54568),o=r(83985),s=r(97101);let i=e=>{let{children:t}=e;return(0,n.jsx)(o.LinkProvider,{LinkComponent:s.N_,children:t})}},61214:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(78641),o=r(7620),s=r(21531),i=r(41159),a=r(79437),c=r(43020),l=r(44550);let d=(e,t)=>{let r=(0,i.jL)(),d=(0,i.GV)(l.Ep),u=(0,i.GV)(l.AS),{addNotification:g}=(0,s.E)(),m=(0,n.c)();return{handleTrackItem:(0,o.useCallback)(async()=>{if(!e)return void console.warn("Cannot track item: productEntityId is missing");d?await (0,c.i)({productId:String(e),variantId:t?String(t):null,email:null!=u?u:"",addNotification:g,translate:m}):r((0,a.p2)({productEntityId:e,variantEntityId:null!=t?t:null}))},[g,r,d,e,m,u,t])}}},63579:(e,t,r)=>{"use strict";r.d(t,{DeferredSidebars:()=>l});var n=r(54568),o=r(96442);let s=(0,o.default)(()=>r.e(5928).then(r.bind(r,25928)).then(e=>({default:e.GenesysChat})),{loadableGenerated:{webpack:()=>[25928]},ssr:!1,loading:()=>null}),i=(0,o.default)(()=>Promise.all([r.e(1610),r.e(3631),r.e(8644)]).then(r.bind(r,8644)).then(e=>({default:e.TrackItemSidebar})),{loadableGenerated:{webpack:()=>[8644]},ssr:!1}),a=(0,o.default)(()=>Promise.all([r.e(1463),r.e(3354),r.e(1430),r.e(1961),r.e(7648),r.e(55)]).then(r.bind(r,10055)).then(e=>({default:e.StoreSelectorSidebar})),{loadableGenerated:{webpack:()=>[10055]},ssr:!1}),c=(0,o.default)(()=>Promise.all([r.e(7555),r.e(474),r.e(3631),r.e(4756)]).then(r.bind(r,14756)).then(e=>({default:e.WishlistSelectionSidebar})),{loadableGenerated:{webpack:()=>[14756]},ssr:!1}),l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i,{}),(0,n.jsx)(a,{}),(0,n.jsx)(c,{}),(0,n.jsx)(s,{})]})},66992:(e,t,r)=>{"use strict";r.d(t,{ConstructorGlobalVariablesClient:()=>s});var n=r(96006),o=r(7620);r(56203);let s=e=>{let{testCell:t,userSegments:r}=e,{data:s}
1=(0,n.useSession)();return(0,o.useEffect)(()=>{var e,n,o,i,a;(o=globalThis).cnstrc||(o.cnstrc={}),(null==s||null==(e=s.userInfo)?void 0:e.id)?globalThis.cnstrc.userId=(e=>{let t=String(e),r=0;for(let e=0;e<t.length;e+=1)r=(r<<5)-r+t.charCodeAt(e),r&=r;return Math.abs(r).toString(16).padStart(8,"0")})(null!=(a=s.userInfo.email)?a:null==(i=s.user)?void 0:i.email):delete globalThis.cnstrc.userId,t?globalThis.cnstrc.testCell=t:delete globalThis.cnstrc.testCell;let c=(null==s||null==(n=s.userInfo)?void 0:n.id)?"loggedIn":"not loggedIn",l=(null==r?void 0:r.length)?Array.from(new Set([c,...r])):[c];globalThis.cnstrc.userSegments=l},[s,t,r]),null}},67822:e=>{e.exports={"notification-item":"styles_notification-item__0n2i0"}},71250:(e,t,r)=>{Promise.resolve().then(r.bind(r,98631)),Promise.resolve().then(r.bind(r,63579)),Promise.resolve().then(r.t.bind(r,29764,23)),Promise.resolve().then(r.bind(r,49337)),Promise.resolve().then(r.bind(r,7894)),Promise.resolve().then(r.bind(r,35824)),Promise.resolve().then(r.bind(r,72218)),Promise.resolve().then(r.bind(r,20564)),Promise.resolve().then(r.bind(r,61415)),Promise.resolve().then(r.bind(r,77809)),Promise.resolve().then(r.bind(r,66992)),Promise.resolve().then(r.bind(r,1223)),Promise.resolve().then(r.bind(r,51635)),Promise.resolve().then(r.bind(r,84373)),Promise.resolve().then(r.bind(r,7712)),Promise.resolve().then(r.bind(r,30550)),Promise.resolve().then(r.bind(r,21531)),Promise.resolve().then(r.t.bind(r,45165,23)),Promise.resolve().then(r.t.bind(r,9387,23)),Promise.resolve().then(r.bind(r,16564)),Promise.resolve().then(r.t.bind(r,77488,23)),Promise.resolve().then(r.t.bind(r,87228,23)),Promise.resolve().then(r.t.bind(r,87911,23)),Promise.resolve().then(r.t.bind(r,22455,23)),Promise.resolve().then(r.bind(r,83985))},71488:(e,t,r)=>{"use strict";r.d(t,{WH:()=>o,kW:()=>n});let n={category:{en:"category",fr:"cat\xe9gorie"},landing:{en:"landing",fr:"page-de-renvoi"},"project-showcases":{en:"project-showcases",fr:"demonstration-de-projets"},"buying-guides":{en:"buying-guides",fr:"guide-d-achat"},"tech-tips":{en:"tech-tips",fr:"conseils-techniques"},resources:{en:"resources",fr:"ressources"},mycart:{en:"mycart",fr:"panier"},"order-status":{en:"order-status",fr:"suivi-commande"},brands:{en:"brands",fr:"marques"},compare:{en:"compare",fr:"comparer"},"gift-cards":{en:"gift-cards",fr:"cartes-cadeaux"},"contact-us":{en:"contact-us",fr:"nous-joindre"},"submit-project":{en:"submit-project",fr:"soumettre-projet"},"recycling-information":{en:"recycling-information",fr:"information-recyclage"},"sign-in-newsletter":{en:"sign-in-newsletter",fr:"inscription-infolettre"},"store-locator":{en:"store-locator",fr:"localisateur-de-magasin"},flyersView:{en:"flyersView",fr:"circulaires"}},o=(e,t)=>{let r=t.startsWith("fr")?"fr":"en";return n[e][r]}},72218:(e,t,r)=>{"use strict";r.d(t,{ScrollToTopButtonProvider:()=>d});var n=r(54568),o=r(7620),s=r(72276),i=r(10790),a=r(21750),c=r.n(a);let l=e=>{let{isVisible:t}=e,r=(0,o.useCallback)(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),a=(0,o.useCallback)(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r())},[r]);return t?(0,n.jsx)("button",{type:"button",className:c()["scroll-to-top"],onClick:r,onKeyDown:a,"aria-label":"Scroll to top of page",title:"Scroll to top",children:(0,n.jsx)(i.ArrowUp,{color:s.sD5,width:s.KO9,height:s.KO9,"aria-hidden":"true"})}):null},d=e=>{let{children:t}=e,[r,s]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=()=>{s((window.scrollY||document.documentElement.scrollTop||document.body.scrollTop)>200)};return window.addEventListener("scroll",e,{passive:!0}),e(),()=>{window.removeEventListener("scroll",e)}},[]),(0,n.jsxs)(n.Fragment,{children:[t,(0,n.jsx)(l,{isVisible:r})]})}},73135:(e,t,r)=>{"use strict";r.d(t,{d:()=>v,w:()=>y});var n=r(76906),o=r.n(n),s=r(96006),i=r(78641),a=r(7620),c=r(59554),l=r(14878),d=r(25262),u=r(629),g=r(41159),m=r(98722),f=r(44550),h=r(77608),T=r(11258),S=r(64621);let p=["click","keydown","mousemove","scroll","touchstart"],v={LAST_ACTIVITY:"lastActivityTime",LOGOUT:"app-logout-event"},E=Object.values(v),y=(e,t,r,n)=>{let[y]=(0,u.Ng)(),b=(0,g.jL)(),C=(0,i.c)("notifications"),_=(0,a.useRef)(null),w=(0,a.useCallback)(()=>{(0,S.k)(),localStorage.removeItem(c.NG),b((0,f.je)()),b((0,m.OA)(null)),b((0,h.CP)()),b((0,T.Ds)({key:"TimeOutLoginError",notice:{type:"error",message:C("sessionExpired")}}))},[b,C]),A=(0,a.useCallback)(e=>{localStorage.setItem(v.LOGOUT,JSON.stringify({activityLevel:n,timestamp:Date.now(),type:e}))},[n]),I=(0,a.useCallback)(async()=>{let e=localStorage.getItem(v.LOGOUT),t=e?JSON.parse(e):null;if((null==t?void 0:t.type)==="START")return void console.warn("checkTimeout: bailing, another tab has already started logout");_.current=null,A("START"),(0,d.W4)(!0);try{await (0,s.signOut)({redirect:!1})}catch(e){console.error("signOut failed during inactivity timeout:",e)}try{await y().unwrap()}catch(e){console.error("Backend logout failed during inactivity timeout:",e)}A("LOGOUT"),w(),n>0?window.location.href="".concat(window.location.origin).concat(l.b.SIGNIN.get(),"?redirect=").concat(encodeURIComponent(window.location.pathname)):window.location.reload()},[n,w,y,A]),O=(0,a.useCallback)(()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(I,t);let e={activityLevel:n,timestamp:Date.now()};localStorage.setItem(v.LAST_ACTIVITY,JSON.stringify(e))},[n,I,t]);(0,a.useEffect)(()=>{let r=async r=>{if(E.find(e=>e===r.key)&&r.newValue){if(r.key===v.LAST_ACTIVITY){_.current&&clearTimeout(_.current),_.current=setTimeout(I,t);return}if(r.key===v.LOGOUT&&(e||_.current||(0,d.X1)())){if("START"===JSON.parse(r.newValue).type){(0,d.W4)(!0),(0,d.nA)(!0);return}_.current&&clearTimeout(_.current),_.current=null,(0,d.W4)(!0),(0,d.nA)(!1),w();try{await (0,s.signOut)({redirect:!1})}catch(e){console.error("signOut failed on receiver tab:",e)}if(n>0){let e=encodeURIComponent(window.location.pathname);window.location.href="".concat(window.location.origin).concat(l.b.SIGNIN.get(),"?redirect=").concat(e)}else window.location.reload()}}};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}},[n,I,w,t,e]),(0,a.useEffect)(()=>
1{if(!e||r)return;O();let t=o()(O,500);return p.forEach(e=>window.addEventListener(e,t)),()=>{_.current&&clearTimeout(_.current),p.forEach(e=>window.removeEventListener(e,t))}},[e,r,O]),(0,a.useEffect)(()=>{e&&localStorage.removeItem(v.LOGOUT)},[e])}},77488:()=>{},77809:(e,t,r)=>{"use strict";r.d(t,{UserLoginProvider:()=>O});var n=r(54568),o=r(27541),s=r(96006),i=r(78641),a=r(7620),c=r(59554),l=r(14878),d=r(24338),u=r(25262),g=r(73135),m=r(97101),f=r(91634),h=r(41159),T=r(53077);let S=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:t,status:r,update:n}=(0,s.useSession)(),i=(0,m.rd)(),c=(0,o.useParams)(),l=(0,o.usePathname)(),d=(0,o.useSearchParams)(),u=(0,a.useRef)(!1),g=(0,h.jL)(),S=null==t?void 0:t.isCartMergeScenario,p=(0,a.useCallback)(()=>["/signin","/signin/confirm-terms","/signup","/signup/confirm-terms","/forgot-password","/reset-password","/existing-user"].some(e=>l.includes(e)),[l]),v=(0,a.useCallback)(async()=>{if(null==t?void 0:t.shouldRedirectToPreferredLocale)try{await n({...t,shouldRedirectToPreferredLocale:!1})}catch(e){console.warn("Failed to clear shouldRedirectToPreferredLocale flag:",e)}},[t,n]);return(0,a.useEffect)(()=>{(async()=>{if(!e||!t||u.current)return;let{shouldRedirectToPreferredLocale:r,isSignIn:n}=t;r&&n&&(p()||(u.current=!0,S&&(g((0,T.XL)()),g(f.Z.util.invalidateTags(["Checkout"]))),await v()))})()},[null==t?void 0:t.shouldRedirectToPreferredLocale,null==t?void 0:t.routeLocale,t,r,e,c.locale,v,i,d,p,g,S]),(0,a.useEffect)(()=>{"unauthenticated"===r&&(u.current=!1)},[r]),{clearRedirectFlag:v}};var p=r(629),v=r(77608),E=r(98722),y=r(11258),b=r(44550),C=r(99973),_=r(64621),w=r(20061);let A=[l.b.CHECKOUT.get(),l.b.MY_ACCOUNT.get(),l.b.MY_CART.get(),l.b.PAYMENT_ACCOUNTS.get()];var I=function(e){return e[e.Generic=0]="Generic",e[e.Sensitive=1]="Sensitive",e}(I||{});let O=e=>{var t;let{children:r,session:m}=e,f=(0,h.jL)(),[T]=(0,p.Ng)(),I=(0,o.usePathname)(),O=(0,o.useRouter)(),{data:N,status:P}=(0,s.useSession)(),R=(0,i.c)("notifications"),k=null!=(t=null==m?void 0:m.userInfo)?t:null==N?void 0:N.userInfo,L="authenticated"===P,D=A.some(e=>I.includes(e)),U=(e=>{let t=localStorage.getItem(e?"autoLogoutTimerSensitive":"autoLogoutTimer");return t?60*Number(t)*1e3:e?9e5:36e5})(D),G=+!!D;(0,g.w)(L,U,!!(null==k?void 0:k.rememberMe),G),S({enabled:L});let j=(0,a.useRef)(!1),W=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if("loading"===P)return;if("unauthenticated"===P){let e=W.current;W.current=!1,e&&!(0,u.kQ)()?((0,_.k)(),localStorage.removeItem(c.NG),f((0,b.je)()),f((0,E.OA)(null)),f((0,v.CP)()),O.refresh(),D&&(globalThis.location.href="".concat(globalThis.location.origin).concat(l.b.SIGNIN.get(),"?redirect=").concat(encodeURIComponent(I)))):!e&&(0,u.kQ)()&&(0,u.W4)(!1);return}if(((null==N?void 0:N.error)===d.Hk.REFRESH_TOKEN_ERROR||(null==N?void 0:N.error)===d.Hk.SESSION_EXPIRED)&&!j.current&&!(0,u.kQ)()){j.current=!0,(0,u.W4)(!0),(async()=>{try{await T().unwrap()}catch(e){console.error("Backend logout failed during token refresh error:",e)}f((0,b.je)()),f((0,E.OA)(null)),f((0,v.CP)()),f((0,y.Ds)({key:"RefreshTokenError",notice:{type:"error",message:R("sessionExpired.label")}})),await (0,s.signOut)({redirect:!1}),(0,_.k)(),localStorage.removeItem(c.NG),(0,u.W4)(!1),globalThis.location.href="".concat(globalThis.location.origin).concat(l.b.SIGNIN.get(),"?redirect=").concat(encodeURIComponent(I))})();return}let e=(null==m?void 0:m.userExists)||(null==N?void 0:N.userExists);if(k&&e&&(null==m?void 0:m.userExists)!==!1&&((0,u.kQ)()&&(0,u.W4)(!1),(0,u.nA)(!1),j.current=!1,W.current=!0,(0,C.qE)(),f((0,b.E8)({id:String((0,w._)(k.id)),firstName:String((0,w._)(k.firstName)),lastName:String((0,w._)(k.lastName)),email:String((0,w._)(k.email)),preferences:k.preferences||{language:"en"}})),k.preferences&&"preferred_store"in k.preferences&&(null==N?void 0:N.shouldRedirectToPreferredLocale))){var t,r;let e=null!=(r=null==(t=k.preferences.preferred_store)?void 0:t.store_id)?r:null;f((0,E.OA)(e))}},[P,D,I,O,m,null==N?void 0:N.error,null==N?void 0:N.userExists,k,f,T,null==N?void 0:N.shouldRedirectToPreferredLocale,R]),(0,n.jsx)(n.Fragment,{children:r})}},82919:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,Z:()=>o});let n=(0,r(36351).Z0)({name:"categoryTree",initialState:{saleCategoryId:null},reducers:{setSaleCategoryId:(e,t)=>{e.saleCategoryId=t.payload?Number(t.payload):null}}}),{setSaleCategoryId:o}=n.actions,s=n.reducer},87228:()=>{}},e=>{e.O(0,[725,7555,1007,9646,4251,5431,8627,195,3473,9664,1376,6056,9966,9773,1058,4737,6799,9305,996,3770,4030,5140,6531,8736,8992,3791,7718,3837,587,18,7358],()=>e(e.s=71250)),_N_E=e.O()}]);

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.