1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7392],{14878:(e,t,r)=>{r.d(t,{b:()=>a});var s=r(71488);let a={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",a=s.kW.category[r.startsWith("fr")?"fr":"en"],c=(null==e?void 0:e.startsWith("/"))?e.slice(1):e||"";return"/".concat(a,"/").concat(c,"/").concat(t)}},CATEGORY_LANDING:{set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",a=r.startsWith("fr")?"fr":"en",c=s.kW.category[a],i=s.kW.landing[a];return"/".concat(c,"/").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"},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"}}},28169:(e,t,r)=>{r.d(t,{xm:()=>C,OA:()=>S,SO:()=>T,LW:()=>E,zL:()=>h,ek:()=>g,I$:()=>y,xb:()=>_,fD:()=>p,bl:()=>f});var s=r(12247);let a=(0,s.createServerReference)("7f29a3a4c792ee4069da84c2641f2a0cdb81815059",s.callServer,void 0,s.findSourceMapURL,"addItemToWishlist"),c=(0,s.createServerReference)("7fa6c599c6eb5c4f87b0f9083fa9b3ce321ff680c1",s.callServer,void 0,s.findSourceMapURL,"createWishlist"),i=(0,s.createServerReference)("7f878a0f4100f5ce2c70698916004ef00c159a6e02",s.callServer,void 0,s.findSourceMapURL,"deleteItemFromWishlist"),n=(0,s.createServerReference)("7f16d5d6d7718bd9d3bac5e21ee0b4fa01576fde01",s.callServer,void 0,s.findSourceMapURL,"deleteWishlist");var o=r(73173);let d=(0,s.createServerReference)("7fe7af06b3e310825d320e432a43b3ec9d80663cdc",s.callServer,void 0,s.findSourceMapURL,"getWishlists"),l=(0,s.createServerReference)("7ff0f6ec6fc9fdb6c86002e3d7dff89fee8d374a4c",s.callServer,void 0,s.findSourceMapURL,"getWishlistsWithItems"),u=(0,s.createServerReference)("7fa5953418a7366bdb2c0d8eed3f9b11c92b601431",s.callServer,void 0,s.findSourceMapURL,"updateWishlist"),f=r(49321).F.injectEndpoints({endpoints:e=>({getWishlists:e.query({queryFn:async function(){let{limit:e,offset:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return{data:await d({limit:e,offset:t})}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to fetch wishlists"}}}},providesTags:["Wishlists"]}),getWishlistById:e.query({queryFn:async e=>{try{return{data:await (0,o.u)({shoppingListId:e})}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to fetch wishlist"}}}},providesTags:(e,t,r)=>[{type:"Wishlists",id:r}]}),getWishlistsWithItems:e.query({queryFn:async function(){let{limit:e,offset:t,itemsLimit:r,itemsOffset:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return{data:await l({limit:e,offset:t,itemsLimit:r,itemsOffset:s})}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to fetch wishlists with items"}}}},providesTags:["Wishlists"]}),createWishlist:e.mutation({queryFn:async e=>{try{return{data:await c(e)}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to create wishlist"}}}},async onQueryStarted(e,t){let{dispatch:r,queryFulfilled:s}=t;try{let{data:t}=await s;e.items&&e.items.length>0&&r(f.endpoints.getWishlistById.initiate(String(t.data.shoppingListId),{forceRefetch:!0}))}catch(e){}},invalidatesTags:["Wishlists"]}),updateWishlist:e.mutation({queryFn:async e=>{let{shoppingListId:t,payload:r}=e;try{return{data:await u(t,r)}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to update wishlist"}}}},invalidatesTags:(e,t,r)=>{let{shoppingListId:s}=r;return["Wishlists",{type:"Wishlists",id:s}]}}),deleteWishlist:e.mutation({queryFn:async e=>{try{return{data:await n(e)}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to delete wishlist"}}}},invalidatesTags:["Wishlists"]}),addItemToWishlist:e.mutation({queryFn:async e=>{let{shoppingListId:t,item:r}=e;try{return{data:await a(t,r)}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to add item to wishlist"}}}},async onQueryStarted(e,t){let{shoppingListId:r}=e,{dispatch:s,queryFulfilled:a}=t;try{await a,s(f.endpoints.getWishlistById.initiate(r,{forceRefetch:!0}))}catch(e){}},invalidatesTags:(e,t,r)=>{let{shoppingListId:s}=r;return[{type:"Wishlists",id:s}]}}),deleteItemFromWishlist:e.mutation({queryFn:async e=>{let{shoppingListId:t,itemId:r}=e;try{return{data:await i(t,r)}}catch(e){return{error:{status:"CUSTOM_ERROR",error:e instanceof Error?e.message:"Failed to delete item from wishlist"}}}},invalidatesTags:(e,t,r)=>{let{shoppingListId:s}=r;return["Wishlists",{type:"Wishlists",id:s}]}})})}
1),{useGetWishlistsQuery:g,useGetWishlistByIdQuery:h,useGetWishlistsWithItemsQuery:y,useLazyGetWishlistsQuery:R,useLazyGetWishlistByIdQuery:_,useLazyGetWishlistsWithItemsQuery:m,useCreateWishlistMutation:S,useUpdateWishlistMutation:p,useDeleteWishlistMutation:E,useDeleteItemFromWishlistMutation:T,useAddItemToWishlistMutation:C}=f},49321:(e,t,r)=>{r.d(t,{F:()=>f});var s=r(9660),a=r(81058),c=r(54877),i=r(40459);let n="https://api.princessauto.com",o=[{prefix:"/ecom/auth",envKey:"NEXT_PUBLIC_LOCAL_USER_URL"},{prefix:"/ecom/user",envKey:"NEXT_PUBLIC_LOCAL_USER_URL"},{prefix:"/ecom/cart",envKey:"NEXT_PUBLIC_LOCAL_CART_URL"},{prefix:"/ecom/orders",envKey:"NEXT_PUBLIC_LOCAL_ORDERS_URL"},{prefix:"/ecom/payments",envKey:"NEXT_PUBLIC_LOCAL_PAYMENTS_URL"}];var d=r(44550);let l={UNAUTHORIZED:401},u=async(e,t,r)=>{var a;let u,f="string"==typeof e?e:e.url,g=(u="string"==typeof f&&f.startsWith("http")?"":(e=>{let t=e.startsWith("/")?e:"/".concat(e);for(let{prefix:e,envKey:r}of o)if(t.startsWith(e)){let e=i.env[r];if(e)return e.replace(/\/+$/,"");break}return n.replace(/\/+$/,"")})(f),(0,s.cw)({baseUrl:u,prepareHeaders:async e=>{let t=await (0,c.H)(),r=null==t?void 0:t.bearer;return r&&e.set("Authorization",r),e}})),h=await g(e,t,r);if((null==(a=h.error)?void 0:a.status)===l.UNAUTHORIZED){(0,c.G)();let s=await (0,c.H)();(null==s?void 0:s.bearer)&&"RefreshAccessTokenError"!==s.error&&(s.userInfo&&t.dispatch((0,d.E8)({id:String(s.userInfo.id),firstName:String(s.userInfo.firstName),lastName:String(s.userInfo.lastName),email:String(s.userInfo.email),phone:String(s.userInfo.phone)||null,preferences:s.userInfo.preferences})),h=await g(e,t,r))}return h},f=(0,a.xP)({reducerPath:"api",baseQuery:u,tagTypes:["Auth","User","Cart","Orders","Wishlists","SalesForce"],endpoints:()=>({})})},71488:(e,t,r)=>{r.d(t,{WH:()=>a,kW:()=>s});let s={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"}},a=(e,t)=>{let r=t.startsWith("fr")?"fr":"en";return s[e][r]}},73173:(e,t,r)=>{r.d(t,{u:()=>a});var s=r(12247);let a=(0,s.createServerReference)("7f411f3bf3182448c27185a547f90d5e61cdf622d3",s.callServer,void 0,s.findSourceMapURL,"getWishlistById")}}]);
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.