PageSourceSearch

https://www.firstcallonline.com/FirstCallOnline/js/public/forgotPassword/forgotPassword.1790193165.js

js firstcallonline.com collected 2026-10-09 22:42:11 UTC 291,606 bytes, 39 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[33,65],{0:function(e,t,s){"use strict";s.d(t,"c",(function(){return r})),s.d(t,"l",(function(){return o})),s.d(t,"a",(function(){return n})),s.d(t,"b",(function(){return l})),s.d(t,"d",(function(){return c})),s.d(t,"n",(function(){return u})),s.d(t,"e",(function(){return d})),s.d(t,"j",(function(){return h})),s.d(t,"i",(function(){return p})),s.d(t,"q",(function(){return m})),s.d(t,"h",(function(){return v})),s.d(t,"m",(function(){return f})),s.d(t,"g",(function(){return S})),s.d(t,"p",(function(){return b})),s.d(t,"k",(function(){return y})),s.d(t,"f",(function(){return I})),s.d(t,"o",(function(){return _}));var a=s(2);const r={AUTH:"auth",AUTH_ATTEMPT_LOGIN_NAME:"authAttemptLoginName",CXML_CALLBACKURL:"callbackUrl",CURRENT_SHOP:"currentShop",CURRENT_WORKSHEET_ID:"currentWorksheetId",TRANSACTION_ID:"transactionID",BUYER_COOKIE:"buyerCookie",CURRENT_VEHICLE:"currentVehicle",FEATURES:"features",FEATURES_FOR_STORE:"featuresForStore",HIDE_MOBILE_APP_BANNER:"hideMobileAppBanner",IS_CHAT_BUTTON_HIDDEN:"isChatButtonHidden",IS_COST_HIDDEN:"isCostHidden",IS_EARNBACK_ELIGIBLE:"isEarnbackEligible",LOGIN_TRACKING_INFO:"loginTrackingInfo",MASQUERADE_REAL_USER:"masqueradeRealUserAuth",MASQUERADE_SOURCE:"masqueradeSource",PASSWORD_CHANGE_REQUIRED:"isPasswordChangeRequired",PTV_LAST_STATE:"ptvLastState",PUNCHOUT:"punchout",STICKY_SESSION_ID:"stickySessionId",TERMS_ACCEPT_REQUIRED:"isTermsAcceptRequired",USER:"user",CMS_DATA:"cmsData",POST_LOGIN_REDIRECT_PATH:"postLoginRedirectPath",LAST_QUOTE_VISITED:"lastQuoteVisited"},i=new Set(Object.values(r)),o=e=>i.has(e),n={COMPANY:"company",CURRENT_SHOP:"currentShop",WORKSHEET:"worksheet"},l={LAZY:"LAZY",EAGER_FETCH:"EAGER_FETCH"},c={[r.USER]:Object(a.n)(15),[r.FEATURES]:Object(a.n)(15),[r.FEATURES_FOR_STORE]:Object(a.n)(15),[r.CURRENT_VEHICLE]:Object(a.n)(5),[n.COMPANY]:Object(a.n)(15),[n.CURRENT_SHOP]:Object(a.n)(15),[n.WORKSHEET]:Object(a.n)(5)},u={},d=e=>`${e}_refreshedOn`,h=()=>Boolean(new URLSearchParams(window.location.search).get(r.PUNCHOUT)),p=()=>Boolean(h()||sessionStorage.getItem(r.PUNCHOUT)),m=()=>sessionStorage.setItem(r.PUNCHOUT,1),g=()=>p()?sessionStorage:localStorage,v=e=>Object.prototype.hasOwnProperty.call(g(),e),f=e=>{g().removeItem(e),g().removeItem(d(e))},S=e=>{const t=d(e);return v(t)&&Number(g().getItem(t))||0},b=(e,t)=>{if(!c[e])return;const s=d(e);g().setItem(s,t)},y=e=>{const t=(e=>{const t=c[e],s=S(e);return t&&s?s+t:0})(e);return!(!c[e]||t)||Boolean(t&&Date.now()>=t)},I=e=>{const t=g().getItem(e);try{return JSON.parse(t)}catch{return t}},_=(e,t)=>{c[e]?b(e,Date.now()):g().removeItem(d(e)),g().setItem(e,JSON.stringify(t))}},10:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)(`icon-${e.name}`,{tag:"component",class:["icon",e.name]})};a._withStripped=!0;var r=s(111),i=s(112),o=s(113),n=s(114),l=s(115),c=s(116),u=s(117),d=s(118),h=s(119),p=s(120),m=s(121),g=s(122),v=s(123),f=s(124),S=s(125),b=s(126),y=s(127),I=s(128),_=s(129),w=s(130),E=s(131),O=s(103),C=s(102),T=s(132),P=s(133),A=s(134),k=s(135),R=s(136),M=s(137),L=s(104),D=s(138),N=s(139),V=s(140),U=s(141),q=s(142),$=s(143),j=s(105),x=s(106),F=s(144),Q=s(145),B=s(146),H=s(147),K=s(148),G=s(149),Y=s(150),W=s(151),z=s(152),J=s(153),X=s(154),Z=s(155),ee=s(156),te=s(157),se=s(158),ae=s(159),re=s(160),ie=s(161),oe=s(162),ne=s(163),le=s(164),ce=s(165),ue=s(166),de=s(167),he=s(168),pe=s(169),me=s(170),ge=s(171),ve=s(172),fe=s(173),Se=s(174),be=s(175),ye=s(176),Ie=s(177),_e=s(178),we=s(179),Ee=s(180),Oe=s(181),Ce=s(182),Te=s(183),Pe=s(184),Ae=s(185),ke=s(186),Re=s(187),Me=s(188),Le=s(189),De=s(190),Ne=s(191),Ve=s(192),Ue=s(193),qe=s(194),$e=s(195),je=s(196),xe=s(197),Fe=s(198),Qe=s(199),Be=s(200),He=s(201),Ke=s(202),Ge=s(203),Ye=s(204),We=s(107),ze=s(108),Je=s(109),Xe=s(205),Ze=s(206),et=s(207),tt=s(208),st=s(101),at=s(209),rt=s(210),it=s(211),ot=s(212),nt=s(213),lt=s(214),ct=s(215),ut=s(216),dt=s(217),ht={functional:!0,render(e,t){const{_c:s,_v:a,data:r,children:i=[]}=t,{class:o,staticClass:n,style:l,staticStyle:c,attrs:u={},...d}=r;return s("svg",{class:[o,n],style:[l,c],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1792 1792"},u),...d},i.concat([s("path",{attrs:{d:"M1477.9 720.5a74 74 0 0173.8 68l.2 6.1v603.1a243.3 243.3 0 01-234 243.2l-9.3.2H483.3a243.3 243.3 0 01-243.2-234l-.2-9.3V794.5a74.1 74.1 0 01147.9-6.
11l.2 6.1v603.1a95.2 95.2 0 0088.7 95l6.5.2h825.3a95.2 95.2 0 0095-88.7l.2-6.5V794.5c.2-40.9 33.3-74 74.2-74zM874.8 128.7l6.3-.6 7.4-.1 6.5.6 7.5 1.4 2.9.8c8.3 2.3 16.2 6 23.4 11.3l5.1 4 3.9 3.7L1267 479a74 74 0 01-99.5 109.5l-5.3-4.8-202.7-203v815.9a74 74 0 01-68 73.8l-6.1.2a74 74 0 01-73.8-68l-.2-6.1V380.9L608.7 583.6a74.2 74.2 0 01-99.5 4.8l-5.3-4.8a74.2 74.2 0 01-4.8-99.5l4.8-5.3L832 150.7c2.4-2.5 4.9-4.8 7.6-6.9l4.8-3.4 5-3.1.8-.4a73.6 73.6 0 0124.6-8.2z"}})]))}},pt={name:"Icon",props:{name:{type:String,required:!0}},components:{IconAndroid:r.a,IconAngleDoubleDown:i.a,IconAngleDoubleLeft:o.a,IconAngleDoubleRight:n.a,IconAngleDoubleUp:l.a,IconAngleDown:c.a,IconAngleLeft:u.a,IconAngleRight:d.a,IconAngleUp:h.a,IconApple:p.a,IconArchive:m.a,IconArrowCircleLeft:g.a,IconArrowCircleUp:v.a,IconArrowsH:f.a,IconArrowUp:S.a,IconBan:b.a,IconBars:y.a,IconBook:I.a,IconCalculator:_.a,IconCalendar:w.a,IconCalendarO:E.a,IconCar:O.a,IconCaretDown:C.a,IconCaretLeft:T.a,IconCaretRight:P.a,IconCaretUp:A.a,IconCart:k.a,IconCartPlus:R.a,IconCertificate:M.a,IconCheck:L.a,IconCheckCircle:D.a,IconCheckCircleO:N.a,IconCheckSquare:V.a,IconCheckSquareO:U.a,IconChevronCircleDown:q.a,IconChevronDown:$.a,IconChevronLeft:j.a,IconChevronRight:x.a,IconChevronUp:F.a,IconChrome:Q.a,IconClipboard:B.a,IconClockO:H.a,IconCog:K.a,IconComment:G.a,IconCommentsO:Y.a,IconDownload:W.a,IconEllipsisV:z.a,IconEnvelope:J.a,IconExchange:X.a,IconExclamation:Z.a,IconExclamationCircle:ee.a,IconExclamationTriangle:te.a,IconExternalLink:se.a,IconEye:ae.a,IconFax:re.a,IconFileO:ie.a,IconFilePdfO:oe.a,IconFileText:ne.a,IconFileTextO:le.a,IconFilter:ce.a,IconFloppyO:ue.a,IconGift:de.a,IconHandORight:he.a,IconHeart:pe.a,IconHeartO:me.a,IconHome:ge.a,IconInfo:ve.a,IconInfoCircle:fe.a,IconLeaf:Se.a,IconList:be.a,IconListUl:ye.a,IconLock:Ie.a,IconMapMarker:_e.a,IconMinus:we.a,IconMinusSquare:Ee.a,IconMobile:Oe.a,IconPause:Ce.a,IconPencil:Te.a,IconPencilSquareO:Pe.a,IconPhone:Ae.a,IconPlay:ke.a,IconPlayCircle:Re.a,IconPlayCircleO:Me.a,IconPlus:Le.a,IconPlusSquare:De.a,IconPowerOff:Ne.a,IconPrint:Ve.a,IconQuestion:Ue.a,IconQuoteLeft:qe.a,IconQuoteRight:$e.a,IconRefresh:je.a,IconSave:xe.a,IconSearch:Fe.a,IconSearchPlus:Qe.a,IconShamrock:Be.a,IconShare:He.a,IconShareAndroid:Ke.a,IconShareApple:ht,IconSignIn:Ge.a,IconSignOut:Ye.a,IconSort:We.a,IconSortAsc:ze.a,IconSortDesc:Je.a,IconSpinner:Xe.a,IconSquareO:Ze.a,IconTachometer:et.a,IconTags:tt.a,IconTimes:st.a,IconTrash:at.a,IconTruck:rt.a,IconUsd:it.a,IconUser:ot.a,IconUserPlus:nt.a,IconView360:lt.a,IconWindows:ct.a,IconWrench:ut.a,IconYoutubePlay:dt.a}},mt=(s(221),s(4)),gt=Object(mt.a)(pt,a,[],!1,null,"11065251",null);t.a=gt.exports},12:function(e,t,s){"use strict";var a=s(3);t.a={computed:{...Object(a.e)(["requests","features","featuresForStore"]),...Object(a.c)(["isFeatureDisabled","isAuthorizedUser"]),isEntSearchEnabled(){return!this.isFeatureDisabled("entsearch")},isEntSearchKitsEnabled(){return!this.isFeatureDisabled("entsearch_kits")},isEntSearchAndKitsEnabled(){return this.isEntSearchEnabled&&this.isEntSearchKitsEnabled}},methods:{getEnabledFlagNames:e=>e.filter((e=>e.enabled)).map((e=>e.name)),async loadFeatureFlags(){const e=["getFeatures"];this.isAuthorizedUser&&e.push("getFeaturesForStore");const t=this.$store.dispatch("requestIfIdle",e);(!this.features.length||this.isAuthorizedUser&&!this.featuresForStore.length)&&await t}},mounted(){this.loadFeatureFlags()}}},14:function(e,t,s){"use strict";s.d(t,"i",(function(){return a})),s.d(t,"b",(function(){return r})),s.d(t,"f",(function(){return i})),s.d(t,"e",(function(){return o})),s.d(t,"h",(function(){return n})),s.d(t,"m",(function(){return l})),s.d(t,"g",(function(){return c})),s.d(t,"d",(function(){return u})),s.d(t,"a",(function(){return d})),s.d(t,"k",(function(){return h})),s.d(t,"j",(function(){return p})),s.d(t,"l",(function(){return m})),s.d(t,"c",(function(){return g}));const a={CASH:"cash",CREDIT_CARD:"credit_card"},r={USD:"USD"},i={SUCCESS:"success",FAILURE:"failure"},o={EMAIL:"email",SSO:"sso"},n={STOCK_ORDER:"Stock Order",LOGIN:"login",HOME:"home",PLP:"plp",PDP:"PDP",PDP_BUY_NOW:"PDP Buy Now",QUOTE:"quote",DIRECT:"direct",PLP_RELATED_PRODUCTS:"plp_related_products",PDP_RELATED_PRODUCTS:"pdp_related_products",HEADER:"header",FOOTER:"footer"},l="yes",c="no",u={VEHICLE:"vehicle",PART:"part"},d={BANNER:"banner",BUTTON:"button"},h={BY_TYPE:"by type",BY_VIN:"by vin",BY_PLATE:"by plate",RECENT_VEHICLES:"recent vehicles"},p={QUOTE:"Quote",LANDING_PAGE:"Landing Page",CATALOG_LOOKUP:"Catalog Lookup",PLP:"PLP",PDP:"PDP",OTHER:"Other"},m={VEHICLE_SELECTOR:"Vehicle Selector",PLP_VEHICLE_DATA_SPECS:"PLP Vehicle Data/Specs",PLP_EXHAUST_DIAGRAMS:"PLP Exhaust Diagrams",PLP_APPLICATION_DOCUMENTS:"PLP Application Documents",PDP_APPLICATION_DOCUMENTS:"PDP Application Documents"},g={BRAND:"brand"}},17:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var a=s(9);const r=function(){return a.a.getters["i18n/fcoM"](...arguments)}},18:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.isSPA?"RouterLink":"a",e._g(e._b({tag:"component"},"component",e.attrs,!1),e.$listeners),[e._t("default")],2)};a._withStripped=!0;
1var r={name:"FcoLink",props:{to:{type:[String,Object],required:!0},href:{type:String,required:!0}},computed:{attrs(){return this.isSPA?{to:this.to}:{href:this.href}}}},i=s(4),o=Object(i.a)(r,a,[],!1,null,null,null);t.a=o.exports},1848:function(e,t,s){"use strict";s.r(t);var a=s(96),r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("LayoutWide",[e.userSecurityQuestion||e.auth?s("ForgotPasswordSecurityQuestion",{attrs:{userName:e.userName,questionData:e.userSecurityQuestion}}):[s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-6"},[s("div",{staticClass:"title-bar title-bar-oswald"},[e._v(e._s(e.fcoM("common.forgotPassword","Forgot Password?")))]),e._v(" "),s("div",{staticClass:"box-container subtle-gray-bg"},[s("p",[e._v(e._s(e.fcoM("rs.forgotPassword.fpMsg","Please enter both your Username and Account Number.")))]),e._v(" "),s("OpcValidationObserver",{attrs:{tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.validate;return[s("form",{on:{submit:function(t){t.preventDefault(),a().then(e.handleForgotPasswordSubmit)}}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"required",attrs:{for:"userName"}},[e._v(e._s(e.fcoM("common.userName","Username")))]),e._v(" "),s("ValidationProvider",{attrs:{rules:{required:!0,basicChars:!0,regex:/^[A-Za-z0-9]{3,}?(@oreillyauto\.com)?$/,min:3,max:50},name:e.fcoM("common.userName","Username"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.userName,expression:"userName"}],class:r,attrs:{type:"text",id:"loginName",placeholder:e.fcoM("common.userName","Username")},domProps:{value:e.userName},on:{input:[function(t){t.target.composing||(e.userName=t.target.value)},function(t){e.loginNameErrorMsg=""}]}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e(),e._v(" "),e.loginNameErrorMsg?s("span",{staticClass:"error"},[e._v(e._s(e.loginNameErrorMsg))]):e._e()]}}],null,!0)})],1),e._v(" "),s("div",{staticClass:"form-group"},[s("label",{staticClass:"required",attrs:{for:"accountNumber"}},[e._v(e._s(e.fcoM("common.accountPoundSign","Account #")))]),e._v(" "),s("ValidationProvider",{attrs:{rules:{required:!0,max:9,numeric:!0},name:e.fcoM("common.accountPoundSign","Account #"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.accountNumber,expression:"accountNumber"}],class:r,attrs:{type:"accountNumber",id:"accountNumber",placeholder:e.fcoM("common.accountPoundSign","Account #")},domProps:{value:e.accountNumber},on:{input:function(t){t.target.composing||(e.accountNumber=t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),s("div",[s("button",{staticClass:"button gtm-forgot-password-submit",attrs:{type:"submit","data-qa":"forgot-password-submit",disabled:e.isForgotPasswordLoading}},[e._v("\n                                        "+e._s(e.fcoM("common.submit","Submit"))+"\n                                        "),e.isForgotPasswordLoading?e._e():s("Icon",{staticClass:"medium chevron-right",attrs:{name:"chevron-right"}}),e._v(" "),e.isForgotPasswordLoading?s("Icon",{staticClass:"medium refresh",attrs:{name:"refresh"}}):e._e()],1)])])]}}],null,!1,1565276733)}),e._v(" "),s("div",{staticClass:"d-block d-sm-flex"},[s("FcoLink",{attrs:{to:"/",href:e.fcoUrl("/")}},[e._v(e._s(e.fcoM("common.returnToLogin","Return to Login")))])],1)],1)]),e._v(" "),s("div",{staticClass:"col-md-6"},[s("div",{staticClass:"title-bar title-bar-oswald"},[e._v(e._s(e.fcoM("rs.forgotPassword.unTitle","Forgot Username?")))]),e._v(" "),s("div",{staticClass:"box-container subtle-gray-bg"},[s("p",[e._v(e._s(e.fcoM("rs.forgotPassword.unMsg","Please enter the e-mail address associated with your account.")))]),e._v(" "),s("OpcValidationObserver",{attrs:{tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.validate;return[s("form",{on:{submit:function(t){t.preventDefault(),a().then(e.handleForgotUsernameSubmit)}}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"required",attrs:{for:"userName"}}
1,[e._v(e._s(e.fcoM("common.emailAddress","E-mail Address")))]),e._v(" "),s("ValidationProvider",{attrs:{rules:{required:!0,fcoEmail:!0,max:80},name:e.fcoM("common.emailAddress","E-mail Address"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.emailAddress,expression:"emailAddress"}],class:r,attrs:{type:"text",id:"emailAddress",placeholder:e.fcoM("common.emailAddress","E-mail Address")},domProps:{value:e.emailAddress},on:{input:function(t){t.target.composing||(e.emailAddress=t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),s("div",{staticClass:"submit d-block"},[s("button",{staticClass:"button gtm-forgot-username-submit",attrs:{type:"submit","data-qa":"forgot-username-submit",disabled:e.isForgotUsernameLoading}},[e._v("\n                                        "+e._s(e.fcoM("common.submit","Submit"))+"\n                                        "),e.isForgotUsernameLoading?e._e():s("Icon",{staticClass:"medium chevron-right",attrs:{name:"chevron-right"}}),e._v(" "),e.isForgotUsernameLoading?s("Icon",{staticClass:"medium refresh",attrs:{name:"refresh"}}):e._e()],1)])])]}}],null,!1,2957877653)}),e._v(" "),s("div",{staticClass:"d-block d-sm-flex"},[s("FcoLink",{attrs:{to:"/",href:e.fcoUrl("/")}},[e._v(e._s(e.fcoM("common.returnToLogin","Return to Login")))])],1)],1)])]),e._v(" "),s("div",{staticClass:"p-3 border-bottom mb-md-4"},[e.isChatReady&&!e.isChatDisabled?s("div",{staticClass:"font-weight-bold my-3"},[e._v(e._s(e.fcoM("rs.forgotPassword.moreHelpMsg","For additional help, please click the button below.")))]):e._e(),e._v(" "),s("ChatButton",{attrs:{buttonClass:"secondary text-decoration-none",label:e.fcoM("common.chatNow","Chat Now"),showUnderline:!1}})],1),e._v(" "),e.isNoSecurityQuestionModalOpen?s("FcoModal",{attrs:{size:"lg",headerClass:"title-bar-oswald font-weight-normal",bodyClass:"p-4",titleText:e.fcoM("user.resetPasswordSuccessful","Reset Password Successful"),closeMsg:e.fcoM("common.close","Close")},on:{close:function(t){e.isNoSecurityQuestionModalOpen=!1}},scopedSlots:e._u([{key:"footer",fn:function(){return[s("FcoLink",{staticClass:"button",attrs:{to:"/",href:e.fcoUrl("/")}},[e._v(e._s(e.fcoM("common.returnToLogin","Return to Login")))])]},proxy:!0}],null,!1,605369423)},[s("p",{domProps:{innerHTML:e._s(e.stringFormat(e.fcoM("user.passwordResetFor","The password for {0} {1} ({2}) has been reset."),e.passwordResetUserData.firstName,e.passwordResetUserData.lastName,e.userName))}}),e._v(" "),s("p",{domProps:{innerHTML:e._s(e.stringFormat(e.fcoM("rs.user.resetPasswordEmailSent","Since {0} has an e-mail address registered with O'Reilly Pro, we have sent him/her a direct-link e-mail to {1} that allows {0} to enter a new password. Note: The link in the e-mail expires in 10 days and can only be used once."),`<strong>${e.passwordResetUserData.email}</strong>`))}})]):e._e(),e._v(" "),e.showForgotUsernameModal?s("FcoModal",{attrs:{size:"lg",headerClass:"title-bar-oswald font-weight-normal",bodyClass:"p-4",titleText:e.fcoM("rs.forgotPasswordForm.modalTitle","Important Message."),closeMsg:e.fcoM("common.close","Close")},on:{close:function(t){e.showForgotUsernameModal=!1}},scopedSlots:e._u([{key:"footer",fn:function(){return[s("FcoLink",{staticClass:"button",attrs:{to:"/",href:e.fcoUrl("/")}},[e._v(e._s(e.fcoM("common.returnToLogin","Return to Login")))])]},proxy:!0}],null,!1,605369423)},[s("div",[e._v(e._s(e.stringFormat(e.fcoM("rs.forgotPassword.unEmailMsg","An e-mail has been sent to {0} containing your O'Reilly Pro username."),e.emailAddress)))])]):e._e()]],2)};r._withStripped=!0;var i=s(1),o=s.n(i),n=s(3),l=s(23),c=s(50),u=s(66),d=s(10),h=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("LayoutNarrow",[s("h1",{staticClass:"title-bar title-bar-oswald mb-0"},[e._v(e._s(e.titleText))]),e._v(" "),s("div",{staticClass:"box-container subtle-gray-bg"},[e.hasSuccessfullyAnsweredQuestion?s("UserSecurityForm",{attrs:{ticket:e.ticket,"login-name":e.userName,"require-password":""},on:{success:e.handleSecurityChangeSuccess}}):s("OpcValidationObserver",{attrs:{tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.validate;return[s("form",{on:{submit:function(t){t.preventDefault(),a().then(e.handleSubmit)}}},[s("p",[e._v(e._s(e.fcoM("rs.forgotPasswordSecurityQuestion.paragraph","Please answer your security question")))]),e._v(" "),s("ValidationProvider",{ref:"securityQuestion",staticClass:"form-group",attrs:{tag:"div",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes,i=t.failedRules;return[s("label",{staticClass:"required"},[e._v(e._s(e.questionData.question))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.securityAnswer,expression:"securityAnswer"}],class:["form-control",r],attrs:{type:"text"},domProps:{value:e.securityAnswer},on:{input:function(t){t.target.composing||(e.securityAnswer=t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(i.required?e.fcoM("rs.forgotPasswordSecurityQuestion.paragraph","Please answer your security question"):a[0]))]):e._e(
1)]}}],null,!0)}),e._v(" "),s("div",[s("button",{staticClass:"button gtm-security-question-submit",attrs:{type:"submit","data-qa":"security-question-submit"}},[e._v("\n                            "+e._s(e.fcoM("common.submit","Submit"))),s("Icon",{staticClass:"ml-1",attrs:{name:e.isLoading?"refresh":"chevron-right"}})],1)])],1),e._v(" "),s("div",{staticClass:"d-block d-sm-flex"},[s("FcoLink",{attrs:{to:"/",href:e.fcoUrl("/")}},[e._v(e._s(e.fcoM("common.returnToLogin","Return to Login")))])],1)]}}])})],1),e._v(" "),e.showRedirectingModal?s("FcoModal",{attrs:{closeMsg:e.fcoM("common.close","Close")},scopedSlots:e._u([{key:"header",fn:function(){return[s("div",{staticClass:"title-bar"},[e._v(e._s(e.fcoM("rs.forgotPasswordForm.modalTitle","Important Message.")))])]},proxy:!0},{key:"footer",fn:function(){return[s("FcoLink",{staticClass:"button mb-0",attrs:{to:"/",href:e.fcoUrl("/")}},[e._v("\n                "+e._s(e.fcoM("common.backToLogin","Back To Login"))+"\n            ")])]},proxy:!0}],null,!1,2238732352)},[e._v(" "),s("p",{domProps:{innerHTML:e._s(e.fcoM("rs.forgotPasswordForm.modalMessage","You've taken too long to make a selection, for security purposes were redirecting you back to the login area"))}})]):e._e()],1)};h._withStripped=!0;var p=s(370),m=s(462),g=s(2),v=s(6),f=s(18),S=s(43),b={name:"ForgotPasswordSecurityQuestion",components:{OpcValidationObserver:c.a,Icon:d.a,FcoModal:l.a,LayoutNarrow:p.a,UserSecurityForm:m.a,FcoLink:f.a},props:{userName:{type:String,default:""},questionData:{type:Object,default:()=>({})}},data:()=>({isLoading:!1,returnErrorMsg:"",securityAnswer:null,showRedirectingModal:!1,ticket:""}),computed:{...Object(n.e)(["requests","csrfObject","isSPA"]),hasSuccessfullyAnsweredQuestion(){return!this.isSPA&&!!this.ticket&&!!this.userName},titleText(){return this.hasSuccessfullyAnsweredQuestion?this.fcoM("rs.forgotPasswordForm.forgotPasswordChangePassword","Forgot Password - Change Password"):this.fcoM("common.forgotPassword","Forgot Password?")}},methods:{async handleSubmit(){this.isLoading=!0,this.$refs.securityQuestion.reset();try{const t=this.isSPA?Object(g.c)("/userSecurity/answer"):Object(g.c)(`security/management/quiz/${this.userName}`),s=this.isSPA?JSON.stringify({[this.userName]:this.securityAnswer}):JSON.stringify(this.securityAnswer),a=await o()({method:"POST",headers:{"Content-Type":"application/json"},data:s,url:t});if(a.status!==S.a.OK||!a.data)return void this.$fcoToast.error(this.fcoM("common.error.processingRequest","There was an error processing your request. Please try again later."));var e;if(!this.isSPA)return void(null!==(e=a.data)&&void 0!==e&&e.code&&(this.ticket=a.data.code));this.$store.dispatch("setAuthAndGetUser",a.data)}catch(e){var t;const s=null==e||null===(t=e.response)||void 0===t?void 0:t.status;if(s===S.a.FORBIDDEN)this.showRedirectingModal=!0,setTimeout((()=>{this.isSPA?this.$router.push("/login"):window.location.href=Object(g.c)("/")}),5e3);else if(s===S.a.UNAUTHORIZED||s===S.a.TOO_MANY_REQUESTS){const e=s===S.a.UNAUTHORIZED?this.fcoM("rs.forgotPasswordForm.401","Incorrect answer, please try again."):this.fcoM("rs.forgotPasswordForm.429","Your user account could not be validated using the information you provided.");this.$refs.securityQuestion.applyResult({errors:[e],valid:!1,failedRules:{}})}else this.$fcoToast.error(this.fcoM("common.error.processingRequest","There was an error processing your request. Please try again later."))}finally{this.isLoading=!1}},handleSecurityChangeSuccess(){this.$fcoLoading(this.fcoM("rs.authentication.redirectingToLogin","Redirecting to login page")),setTimeout((()=>{this.isSPA?this.$store.dispatch("logout"):window.location.href=Object(g.c)(`/logout.html?${this.csrfObject.parameterName}=${this.csrfObject.token}`)}),3e3)}},mounted(){Object(v.d)(this.requests.getAppData)&&this.$store.dispatch("getAppData")}},y=s(4),I=Object(y.a)(b,h,[],!1,null,null,null).exports,_=s(302);const w={INVALID:"INVALID",SMS_NOT_ALLOWED:"SMS_NOT_ALLOWED",BAD_ACCOUNT_NUMBER:"BAD_ACCOUNT_NUMBER",INVALID_ACCOUNT_NUMBER:"INVALID_ACCOUNT_NUMBER",NO_OPTIONS:"NO_OPTIONS"};var E={name:"ForgotPassword",components:{OpcValidationObserver:c.a,ChatButton:u.a,Icon:d.a,FcoModal:l.a,ForgotPasswordSecurityQuestion:I,LayoutWide:_.a,FcoLink:f.a},computed:{...Object(n.e)(["auth","isChatDisabled","isChatReady","supportEmail"])},data:()=>({isForgotPasswordLoading:!1,isForgotUsernameLoading:!1,userName:"",accountNumber:"",emailAddress:"",loginNameErrorMsg:"",showForgotUsernameModal:!1,isNoSecurityQuestionModalOpen:!1,passwordResetUserData:null,userSecurityQuestion:null}),methods:{stringFormat:g.v,async handleForgotPasswordSubmit(){this.isForgotPasswordLoading=!0;try{const e={[this.isSPA?"loginName":"username"]:this.userName,accountNumber:this.accountNumber},t=this.isSPA?this.fcoUrl("/userSecurity/forgotPassword"):this.fcoUrl("/security/management/forgotpassword"),{data:s}=await o.a.post(t,e);if(this.userSecurityQuestion=s.securityQuestion,!this.userSecurityQuestion){if(!s.passwordResetEmailSent)throw new Error;this.passwordResetUserData={email:s.userEmail,firstName:s.userFirstName,lastName:s.userLastName},this.isNoSecurityQuestionModalOpen=!0}}catch(e){this.handleForgotPasswordError(e)}finally{this.isForgotPasswordLoading=!1}},handleForgotPasswordError(e){var t;const{errorId:s,loginNameErrorMsg:a}=(null==e||null===(t=e.response)||void 0===t?void 0:t.data)||{};a?this.loginNameErrorMsg=e.response.data.loginNameErrorMsg:s in w?this.loginNameErrorMsg=s===w.SMS_NOT_ALLOWED?this.fcoM("authentication.resetNotAvailable","This username can't reset its own password. Please contact O'Reilly Pro Support."):s===w.NO_OPTIONS?Object(g.v)(this.fcoM("authentication.outOfLuck","There is no e-mail address associated with this username and cannot be recovered online. For security purposes, online password resets are sent via e-mail. Please contact our Professional Support Team at {0} for password recovery assistance."),this.supportEmail):this.fcoM("authentication.accountCouldntLocated","Your user account could not be located using the information you provided."):this.$fcoToast.error(this.fcoM("rs.forgotPassword.errorRetrievingForgotPassword","There was an error retrieving the forgot password form, please try again."))},async handleForgotUsernameSubmit(){const e=this.isSPA?this.fcoUrl("/userSecurity/v2/forgotLoginName"):this.fcoUrl("/security/management/forgotUsername");this.isForgotUsernameLoading=!0,await o.a.post(e,{emailRecovery:this.emailAddress}).then((e=>
1{200===e.status&&(this.showForgotUsernameModal=!0)})).catch((()=>{this.$fcoToast.error(this.fcoM("rs.forgotPassword.errorRetrievingForgotUsername","There was an error retrieving the forgot username form, please try again."))})),this.isForgotUsernameLoading=!1}}},O=Object(y.a)(E,r,[],!1,null,null,null).exports;Object(a.a)(O)},19:function(e,t,s){"use strict";s.d(t,"b",(function(){return a})),s.d(t,"a",(function(){return r}));const a={ENGINE:10011,SUBMODEL:10028},r=new Set([99,"99"])},20:function(e,t,s){"use strict";s.d(t,"j",(function(){return u})),s.d(t,"h",(function(){return d})),s.d(t,"g",(function(){return h})),s.d(t,"c",(function(){return p})),s.d(t,"d",(function(){return m})),s.d(t,"a",(function(){return g})),s.d(t,"b",(function(){return v})),s.d(t,"l",(function(){return f})),s.d(t,"m",(function(){return b})),s.d(t,"i",(function(){return y})),s.d(t,"k",(function(){return I})),s.d(t,"f",(function(){return _})),s.d(t,"e",(function(){return w}));var a=s(1),r=s.n(a),i=s(31),o=s(2);const n=Object(o.c)("/worksheet/rest");function l(e){return{productKey:{productKeyType:"LEGACY",groupId:e.legacyKey.groupId,itemId:e.legacyKey.itemId},quantity:e.userSpecifiedQuantity,origin:e.productOrigin,productOriginDetails:e.productOriginDetails}}const c=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r.a.post(Object(o.c)(`/worksheet/rest/${e}/addProducts/${s}`),t)},u=(e,t)=>t?r.a.get(`${n}/enterprise/${e}`):r.a.get(`${n}/${e}`),d=()=>r.a.get(`${n}/miniquote.json`),h=e=>r.a.get(`${n}/v2/miniquote/${e}`),p=(e,t)=>r.a.post(`${n}/addproduct?quantity=${t}`,e),m=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return a?r.a.post(Object(o.c)(`/worksheet/rest/enterprise/${e}/addProducts/${s}`),t):c(e,t,s)},g=(e,t)=>{const s=`${n}/addkit${t?"?prebuilt=true":""}`;return r.a.post(s,e.map(l))},v=e=>{let{products:t,worksheetId:s,worksheetVehicleId:a,isPrebuilt:i}=e;const o=`${n}/enterprise/addKit`,c={addProductDtoList:t.map(l),worksheetId:s,worksheetVehicleId:a,prebuilt:i};return r.a.post(o,c)},f=function(e){let{description:t,rate:s,hours:a}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isEntSearchEnabled:l,worksheetId:c,worksheetVehicleId:u,partTypeId:d,group:h,subgroup:p}=n,m={description:t,customerPrice:s,quantity:a,type:i.d.LABOR,laborGroup:h,laborSubgroup:p,laborPartTypeId:d},g=l?Object(o.c)(`/worksheet/rest/enterprise/${c}/vehicle/${u}/nonProductItem`):Object(o.c)(`/worksheet/rest/${c}/vehicle/${u}/nonProductItem`);return r.a.post(g,m)},S=e=>e?new Date(e).toISOString().slice(0,10):null,b=function(e,t){let{keywords:s,searchType:a,startDate:i,endDate:o}=e,l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r.a.post(`${n}/v2/search`,{keywords:s,searchType:a,startDate:S(i),endDate:S(o)},{params:{shopId:t,isLong:l}})},y=e=>r.a.get(`${n}/status`,{params:{confirmationNumber:e}}),I=e=>r.a.post(`${n}/new?shopId=${e}`),_=()=>r.a.post(`${n}/clear`),w=(e,t)=>r.a.put(`${n}/enterprise/${t}/addVehicle`,e)},22:function(e,t,s){"use strict";s.d(t,"b",(function(){return i})),s.d(t,"c",(function(){return o})),s.d(t,"f",(function(){return n})),s.d(t,"i",(function(){return l})),s.d(t,"j",(function(){return c})),s.d(t,"h",(function(){return u})),s.d(t,"e",(function(){return d})),s.d(t,"g",(function(){return h})),s.d(t,"l",(function(){return p})),s.d(t,"d",(function(){return m})),s.d(t,"k",(function(){return g})),s.d(t,"a",(function(){return v}));var a=s(2),r=s(26);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 0===e.length||r.b.test(e)},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 0===e.length||r.a.test(e)},n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 0===e.length||r.f.test(e)},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),s=t.some((e=>!r.g.test(e)));return 0===e.length||!s&&!r.i.test(e)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 0===e.length||r.h.test(e)},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return 0===e.length||r.e.test(e)},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.d.test(String(e).replace(/,/g,""))},h=e=>a.w.test(e),p=e=>r.k.test(e),m=e=>r.c.test(e),g=e=>r.j.test(e),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.indexOf(" ")<0}},221:function(e,t,s){"use strict";s(74)},222:function(e,t,s){},223:function(e,t,s){"use strict";s(75)},224:function(e,t,s){},225:function(e,t,s){"use strict";s(76)},226:function(e,t,s){},227:function(e,t,s){"use strict";s(77)},228:function(e,t,s){},229:function(e,t,s){"use strict";s(78)},230:function(e,t,s){},231:function(e,t,s){"use strict";s(79)},232:function(e,t,s){},233:function(e,t,s){"use strict";s(80)},234:function(e,t,s){},235:function(e,t,s){"use strict";s(81)},236:function(e,t,s){},237:function(e,t,s){"use strict";s(82)},238:function(e,t,s){},239:function(e,t,s){"use strict";s(83)},24:function(e,t,s){"use strict";var a=s(1),r=s.n(a),i=s(8),o=s(3),n=s(6),l=s(42),c=s(12),u=s(20);t.a={emits:["vehicle-selected"],mixins:[l.a,c.a],props:{promptAboutQuote:{type:Boolean,default:!0}},data:()=>({GTM:i.a,userWantsExistingQuote:!1}),computed:{...Object(o.e)({productsInCurrentQuote:e=>e.miniQuote.quoteDetails.totalItems>0,isSPA:e=>{let{isSPA:t}=e;return t}}),...Object(o.c)(["isAuthorizedUser"]),...Object(o.e)("vehicleSelector",{vsData:e=>e.vsData,forceUrl:e=>e.forceUrl,isOpenDefault:e=>e.isOpenDefault,partTypePendingForceCar:e=>e.partTypePendingForceCar,saveLookupBeforeRedirect:e=>e.saveLookupBeforeRedirect,partsToSaveBeforeRedirect:e=>e.partsToSaveBeforeRedirect,isVSDataIdle:e=>Object(n.d)(e.requests.getVehicleSelectorData),isVSDataPending:e=>Object(n.e)(e.requests.getVehicleSelectorData),preventNavigationOnVehicleUpdate:e=>e.preventNavigationOnVehicleUpdate}),...Object(o.e)("miniQuote",{worksheetId:e=>e.quoteDetails.worksheetHeaderId}),keepExistingQuoteFinal(){return!this.promptAboutQuote||this.userWantsExistingQuote}},methods:{async addVehicleToQuote(e,t){const{data:{worksheetVehicleSID:{id:s}}}=await Object(u.e)(e,t);return{...e,id:s}},async selectVehicleFromVehicleData(e){let{baseVehicleId:t,engineId:s,submodelId:a}=e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=Number(s)?s:void 0,n=Number(a)?a:void 0;if(!this.isEntSearchEnabled){const{data:{vehicle:e}}=await r.a.post(this.fcoUrl("/vehicle/select/v2/"),{baseVehicleId:t,engineId:o,submodelId:n,quote:i});return e}i||await this.$store.dispatch("miniQuote/newQuote");const{data:{vehicle:l}}=await r.a.post(this.fcoUrl(`/vehicle/select/v3/?worksheetId=${this.worksheetId}`),{baseVehicleId:t,engineId:o,submodelId:n}
1);return l},async selectVehicleFromVIN(e){let{vin:t,plate:s,state:a}=e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isEntSearchEnabled){const{data:{vehicle:e}}=await r.a.post(this.fcoUrl(`/vehicle/select/defaultByVin?quote=${i}`),{vin:t});return e}const o=[r.a.post(this.fcoUrl("/vehicle/select/v2/defaultByVin"),{vin:t})];i||o.push(this.$store.dispatch("miniQuote/newQuote"));const[n]=await Promise.all(o),l={...n.data,plate:s,state:a};return this.addVehicleToQuote(l,this.worksheetId)},async selectByWorksheetVehicleId(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isEntSearchEnabled){const{data:{vehicle:s}}=await r.a.post(this.fcoUrl(`/vehicle/select/history/${e}/select?quote=${t}`));return s}const s=[r.a.get(this.fcoUrl(`/vehicle/select/vehicleByWorksheetVehicleId?worksheetVehicleId=${e}`))];t||s.push(this.$store.dispatch("miniQuote/newQuote"));const[{data:a}]=await Promise.all(s);return this.addVehicleToQuote(a,this.worksheetId)},handleVehicleSelectSuccess(e){let{vehicle:t={},method:s=""}=e;const{forceUrl:a}=this;if(this.$emit("vehicle-selected",t),this.$store.commit("vehicleSelector/setCurrentVehicle",t),this.isEntSearchEnabled||this.$store.dispatch("miniQuote/getQuoteData"),this.$_analyticsMixin_trackVehicleAdded(s),this.partTypePendingForceCar)this.$store.dispatch("vehicleSelector/setVsProp",{prop:"partTypePendingForceCar",value:!1});else{if(a){let e;return this.isSPA||(e=this.$fcoLoading()),this.saveLookupBeforeRedirect&&this.$store.dispatch("partSelection/savePartLookup",{partTypes:this.partsToSaveBeforeRedirect,vehicle:t}),document.dispatchEvent(new CustomEvent("vehicleSelector/forceSelected")),!0===a?void(e&&e.remove()):this.isSPA?void this.$router.push(a):void(window.location.href=this.fcoUrl(a))}if(!this.preventNavigationOnVehicleUpdate)return this.isSPA?void this.$router.push("/catalog/browse"):void(window.location.href=this.fcoUrl("/catalog/browse.html"));this.isOpenDefault||this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isOpen",value:!1})}},analytics:i.d},watch:{isAuthorizedUser:{handler(){this.isAuthorizedUser&&this.$store.dispatch("requestIfIdle",["vehicleSelector/getVehicleSelectorData"])},immediate:!0}}}},240:function(e,t,s){},241:function(e,t,s){"use strict";s(84)},242:function(e,t,s){},243:function(e,t,s){"use strict";s(85)},244:function(e,t,s){},245:function(e,t,s){"use strict";s(86)},246:function(e,t,s){},247:function(e,t,s){"use strict";s(87)},248:function(e,t,s){},249:function(e,t,s){"use strict";s(88)},25:function(e,t,s){"use strict";s.d(t,"b",(function(){return n})),s.d(t,"a",(function(){return l})),s.d(t,"d",(function(){return u})),s.d(t,"c",(function(){return h}));var a=s(2),r=s(27),i=s(5),o=s(0);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.e.EN;return r.d[e]||r.b.EN},l=()=>({url:"",token:"",expires:0,tokenType:r.c.PUBLIC}),c=e=>e&&e.url&&e.token&&e.expires&&e.tokenType,u=e=>e&&e.tokenType===r.c.PUBLIC,d=e=>{const t=Object(a.l)(Date.now());return(null==e?void 0:e.expires)&&t>=e.expires},h=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=Object(o.f)(o.c.CMS_DATA);return!(!c(t)||d(t))&&(e?!u(t):u(t))}},250:function(e,t,s){},251:function(e,t,s){"use strict";s(89)},252:function(e,t,s){},253:function(e,t,s){"use strict";s(90)},254:function(e,t,s){},255:function(e,t,s){"use strict";s(91)},256:function(e,t,s){},257:function(e,t,s){"use strict";s(92)},258:function(e,t,s){},259:function(e,t,s){"use strict";s(93)},260:function(e,t,s){},261:function(e,t,s){"use strict";s(94)},262:function(e,t,s){},267:function(e,t,s){"use strict";s.d(t,"g",(function(){return o})),s.d(t,"f",(function(){return n})),s.d(t,"i",(function(){return l})),s.d(t,"h",(function(){return c})),s.d(t,"a",(function(){return d})),s.d(t,"d",(function(){return h})),s.d(t,"e",(function(){return p})),s.d(t,"b",(function(){return m})),s.d(t,"c",(function(){return g}));var a=s(17),r=s(7),i=s(31);const o=e=>e===r.WorksheetError.WORKSHEET_LOCKED,n=e=>e===r.StoreError.STORE_DOWN,l=e=>{const{orderConfirmationNumber:t,orderSubmittedDatetime:s}=e;return t&&s},c=e=>Boolean(e.itemCost),u=(e,t)=>
1{const s=t.every((e=>(e=>{const{itemType:t}=e,{LABOR:s,OTHER:a}=i.d;return t===s||t===a})(e)));return Boolean(e)||0===t.length||s},d=(e,t,s)=>{const{formattedTotalPrice:r,totalCostOrder:i,formattedTotalCostOrder:o}=t;return e?r:u(i,s)?o:Object(a.a)("rs.getparts.quoteCall","Call for Pricing")},h=e=>e.itemType===i.d.LABOR,p=e=>e.itemType===i.d.OTHER,m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.some((e=>h(e)))},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.some((e=>p(e)))}},27:function(e,t,s){"use strict";s.d(t,"a",(function(){return r})),s.d(t,"c",(function(){return i})),s.d(t,"b",(function(){return o})),s.d(t,"d",(function(){return n}));var a=s(5);const r={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},i={PUBLIC:"PUBLIC",CAR:"CAR",GENERAL:"GENERAL"},o={EN:"1",ES:"4963328"},n={[a.e.EN]:o.EN,[a.e.ES]:o.ES}},271:function(e,t,s){"use strict";s(5);var a=s(7);s.d(t,"b",(function(){return a}));s(47),s(31),s(19),s(65),s(27);var r=s(44);s.d(t,"a",(function(){return r}));s(40)},279:function(e,t,s){"use strict";const a=e=>{let{pathname:t=""}=e;return t.slice(1).split("/")},r=((e,t)=>{if(!e||!t)return"/";const s=a(e),r=a(t);return s.length&&r.length?s.slice().reduce(((e,t,s,a)=>r[s]!==t?(a.splice(1),e):`${e}/${t}`),""):"/"})(window.location,(()=>{var e;const t=null===(e=document.currentScript)||void 0===e?void 0:e.src;return t?new URL(t):window.location.origin})());t.a=r},28:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("FcoModal",{attrs:{closeMsg:e.fcoM("common.close","Close")},on:{close:function(t){return e.$emit("close")}}},[s("div",{attrs:{slot:"body"},slot:"body"},[s("p",[e._v(e._s(e.fcoM("rs.quote.newQuotePrompt","The quote currently has products in it, do you want to start a new quote or add to the existing quote?")))])]),e._v(" "),s("div",{attrs:{slot:"footer"},slot:"footer"},[s("button",{staticClass:"button secondary font-weight-bold",attrs:{type:"button"},on:{click:function(t){return e.$emit("start-new-quote")}}},[e._v("\n            "+e._s(e.fcoM("rs.quote.startNew","Start New Quote"))+"\n        ")]),e._v(" "),s("button",{staticClass:"button font-weight-bold ml-2",attrs:{type:"button"},on:{click:function(t){return e.$emit("use-existing-quote")}}},[e._v("\n            "+e._s(e.fcoM("rs.quote.addToExistingQuote","Add To Existing Quote"))+"\n        ")])])])};a._withStripped=!0;var r={name:"QuoteSelectionModal",emits:["start-new-quote","use-existing-quote","close"],components:{FcoModal:s(23).a}},i=s(4),o=Object(i.a)(r,a,[],!1,null,null,null);t.a=o.exports},289:function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.
10","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},30:function(e,t,s){"use strict";s.d(t,"a",(function(){return a}));const a={OAUTH_LOGIN_ERROR:"OAUTH_LOGIN_ERROR",PROMO_ADMIN_LOGIN_ERROR:"PROMO_ADMIN_LOGIN_ERROR",LOGIN_AUTHENTICATION_FAILED:"LOGIN_AUTHENTICATION_FAILED",INVALID:"INVALID",EXCESSIVE_FAILED_LOGINS:"EXCESSIVE_FAILED_LOGINS",LOGIN_REQUIRED:"LOGIN_REQUIRED",LOGIN_TEMP_PASSWORD_EXPIRED:"LOGIN_TEMP_PASSWORD_EXPIRED",SHOP_REFERRAL_LOGIN_ERROR:"SHOP_REFERRAL_LOGIN_ERROR",STATEMENTS_LOGIN_ERROR:"STATEMENTS_LOGIN_ERROR"}},302:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"content p-3 px-md-4"},[e._t("default")],2)};a._withStripped=!0;var r={name:"LayoutWide"},i=s(4),o=Object(i.a)(r,a,[],!1,null,null,null);t.a=o.exports},31:function(e,t,s){"use strict";s.d(t,"c",(function(){return a})),s.d(t,"d",(function(){return r})),s.d(t,"b",(function(){return i})),s.d(t,"e",(function(){return o})),s.d(t,"a",(function(){return n}));const a={PART:"PART",KIT_SUMMARY:"KIT_SUMMARY",WARNING:"WARNING"},r={LABOR:"LABOR",OTHER:"OTHER"},i={CASH_ON_DEMAND:"COD"},o="www.p65warnings.ca.gov",n={GARAGE_BAY_ID:4,FLEET_ID:10,PO_NUMBER:22}},32:function(e,t,s){"use strict";s.d(t,"b",(function(){return o})),s.d(t,"c",(function(){return n})),s.d(t,"d",(function(){return l})),s.d(t,"e",(function(){return c})),s.d(t,"g",(function(){return u})),s.d(t,"h",(function(){return d})),s.d(t,"f",(function(){return h})),s.d(t,"i",(function(){return p})),s.d(t,"a",(function(){return m}));var a=s(1),r=s.n(a),i=s(2);const o=()=>r.a.post(Object(i.c)("/user/updateEmail?declinedUpdate=true")),n=()=>r.a.get(Object(i.c)("/current/user")),l=()=>r.a.get(Object(i.c)("/session/user")),c=e=>r.a.get(Object(i.c)(`/user/employeeDetails?userId=${e}`)),u=e=>r.a.post(Object(i.c)(`/user/updateEmail?email=${e}`)),d=e=>{let{userId:t,firstName:s,lastName:a,emailAddress:o,loginName:n,selectedStylesheet:l,languageCode:c}=e;const u=Object.entries({userId:t,firstName:s,lastName:a,emailAddress:o,loginName:n,selectedStylesheet:l,languageCode:c}).reduce(((e,t)=>{let[s,a]=t;return e.append(s,a),e}),new FormData);return r.a.post(Object(i.c)("/user/savePreferences"),u)},h=e=>r.a.post(Object(i.c)("/admin/masquerade",{params:{userId:e}})),p=()=>r.a.post(Object(i.c)("/admin/endMasquerade")),m=e=>r.a.get(Object(i.c)(`/user/canCurrentUserEditUser?userId=${e}`))},34:function(e,t,s){"use strict";s.d(t,"i",(function(){return u})),s.d(t,"f",(function(){return d})),s.d(t,"d",(function(){return h})),s.d(t,"e",(function(){return p})),s.d(t,"o",(function(){return m})),s.d(t,"j",(function(){return g})),s.d(t,"k",(function(){return v})),s.d(t,"l",(function(){return f})),s.d(t,"g",(function(){return S})),s.d(t,"n",(function(){return b})),s.d(t,"h",(function(){return y})),s.d(t,"p",(function(){return I})),s.d(t,"c",(function(){return _})),s.d(t,"m",(function(){return w})),s.d(t,"b",(function(){return E})),s.d(t,"a",(function(){return O}));var a=s(1),r=s.n(a),i=s(2),o=s(7);const n=Object(i.c)("/parttypenavigation"),l=Object(i.c)("/parttype/mini"),c=Object(i.c)("/packagerest"),u=()=>r.a.get(`${n}/mostpopular.json`),d=()=>r.a.get(`${n}/allparttypes.json`),h=(e,t)=>{const s=t?"drilldownpj":"drilldown";return r.a.get(`${n}/${s}`,{params:{parentId:e}})},p=(e,t,s)=>s?r.a.get(`${n}/drilldownpj`,{params:{parentId:e}}):r.a.post(`${n}/v2/drilldown`,{parentId:e,vehicle:t}),m=e=>{let{query:t,max:s=o.PartTypeSearchLimit.FIRST_15,sort:a=o.PartTypeSearchSort.POPULAR}=e;return r.a.get(Object(i.c)("/search/keyword/searchPartType.json"),{params:{query:t,max:s,sort:a}})},g=(e,t,s)=>r.a.get(Object(i.c)(`${n}/search`),{params:{parentId:e,platformId:t,partTypeId:s}}),v=function(e,t,s){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.PlatformId.ALL_PART_TYPES;return r.a.post(Object(i.c)("/parttype/mini/relatedPartTypes"),{partTypeId:e,vehicleInfo:t,shopId:s,platformId:a})},f=function(e,t,s){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return r.a.post(Object(i.c)("/product/crossSellPartTypes"),{partTypeId:e,vehicle:t,shopId:s,isPartOfKit:a})},S=(e,t)=>r.a.get(`${c}/v2/brands`,{params:{partTypeId:e,shopId:t}}),b=e=>r.a.get(`${c}/v2/shopjobs`,{params:{shopId:e}}),y=(e,t)=>r.a.get(`${c}/v2/customPackageJob`,{params:{jobId:e,shopId:t}}),I=e=>r.a.post(`${c}/v2/customPackageJob`,e),_=e=>r.a.delete(`${c}/customPackageJob.json`,{params:{jobId:e}}),w=()=>r.a.get(Object(i.c)("/parttype/node/selected")),E=()=>r.a.post(`${l}/clearPartTypes`),O=e=>r.a.post(`${l}/clearAndSelectPartType`,e)},356:function(e,t,s){var a=s(440);
1a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("15355ef0",a,!1,{})},36:function(e,t,s){"use strict";var a=s(9);t.a={async mounted(){await a.a.dispatch("requestIfIdle",["getCMSData"])}}},370:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"layout-narrow p-3 px-md-4 mx-auto"},[e._t("default")],2)};a._withStripped=!0;var r={name:"LayoutNarrow"},i=(s(439),s(4)),o=Object(i.a)(r,a,[],!1,null,"fc3c7538",null);t.a=o.exports},38:function(e,t,s){"use strict";s.d(t,"e",(function(){return o})),s.d(t,"g",(function(){return n})),s.d(t,"a",(function(){return l})),s.d(t,"h",(function(){return c})),s.d(t,"d",(function(){return u})),s.d(t,"i",(function(){return d})),s.d(t,"b",(function(){return h})),s.d(t,"c",(function(){return p})),s.d(t,"f",(function(){return m}));var a=s(1),r=s.n(a),i=s(2);const o=(e,t)=>{const s=t&&""!==e?`/admin/shopRequest/rest/${e}/notes`:`/shop/notes/${e}`;return r.a.get(Object(i.c)(`${s}`))},n=function(e,t,s){let{createDateTime:a=Date.now(),internal:o=!0}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s&&""!==e?r.a.post(Object(i.c)("/admin/shopRequest/rest/notes"),{text:t,requestId:e,createDateTime:a,internal:o}):r.a.post(Object(i.c)(`/shop/notes/${e}`),{text:t,createDateTime:a,internal:o})},l=e=>r.a.post(Object(i.c)("/admin/shopRequest/rest/"),e),c=(e,t,s,a)=>{const o=s?"/admin/shopRequest/rest":"/shop/savePreferences",n=a?{worksheetId:a}:{};return r.a.put(Object(i.c)(`${o}/${e}`),t,{params:n})},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const a=t?"/admin/shopRequest/rest":"/shop/shopDetails",o={excludeManagers:s};return r.a.get(Object(i.c)(`${a}/${e}`),{params:o})},d=e=>{const t={key:e};r.a.post(Object(i.c)("/shop/shopprocess",{params:t}))},h=(e,t)=>r.a.post(Object(i.c)(`/auth/rest/v2/exchange/${e}`),null,{headers:{Authorization:`Bearer ${t}`}}),p=(e,t,s,a)=>r.a.get(Object(i.c)(`/shop/employeesList/${e}`),{params:{search:t,page:s,sort:a}}),m=e=>r.a.get(Object(i.c)(`/shop/user/${e}`))},39:function(e,t,s){"use strict";s.d(t,"g",(function(){return n})),s.d(t,"f",(function(){return l})),s.d(t,"d",(function(){return c})),s.d(t,"e",(function(){return u})),s.d(t,"h",(function(){return d})),s.d(t,"a",(function(){return h})),s.d(t,"b",(function(){return p})),s.d(t,"i",(function(){return m})),s.d(t,"c",(function(){return g})),s.d(t,"j",(function(){return v})),s.d(t,"k",(function(){return f}));var a=s(1),r=s.n(a),i=s(2);const o=Object(i.c)("/stockorders"),n=function(){let{size:e=500,page:t=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.a.get(o,{params:{size:e,page:t}})},l=e=>r.a.get(`${o}/${e}`),c=e=>r.a.delete(`${o}/${e}`),u=(e,t)=>
1r.a.delete(`${o}/${e}/details/${t}`),d=e=>r.a.post(`${o}/getStockOrdersIncludingLineItems`,e),h=e=>r.a.post(`${o}`,e),p=(e,t,s)=>s?r.a.post(Object(i.c)(`/worksheet/rest/enterprise/${e}/addProducts/0`),t):r.a.post(Object(i.c)(`/worksheet/rest/${e}/addProducts/0`),t),m=e=>r.a.put(`${o}/${e.id}`,e),g=e=>{let{name:t,po:s,line:a,item:i,description:n,quantity:l}=e;return r.a.post(`${o}/createStockOrder`,{name:t,po:s,line:a,item:i,desc:n,quantity:l})},v=(e,t)=>{let{line:s,item:a,description:i,quantity:n,note:l}=t;return r.a.post(`${o}/${e}/details`,{lineCode:s,partNumber:a,partDescription:i,stockQty:n,note:l})},f=(e,t)=>r.a.post(`${o}/upload?id=${e}`,t)},40:function(e,t,s){"use strict";s.d(t,"a",(function(){return a}));const a={TEXT:"TEXT",PART_NO:"PART_NO",DRILL_DOWN:"DRILL_DOWN",RELEVANT:"RELEVANT",INTCHANGE:"INTCHANGE",QUICK_ADD:"QUICK_ADD",REL_ITEM:"REL_ITEM",JOB:"JOB",BRAND:"BRAND",PROMO:"PROMO",OTHER:"OTHER"}},41:function(e,t,s){"use strict";s.d(t,"b",(function(){return r})),s.d(t,"a",(function(){return i})),s.d(t,"d",(function(){return o})),s.d(t,"c",(function(){return u}));const a=200106309927,r="chatReady",i="chatDisabled",o=()=>{window.chatButtonClickedFlag*=-1},n=()=>{window.EESvcs.start()},l=()=>{window.dispatchChatReadyEvent=()=>{window.dispatchEvent(new Event(r))},window.dispatchChatDisabledEvent=()=>{window.dispatchEvent(new Event(i))}},c=()=>{const e=document.createElement("script");e.src="//ee.channels.ocs.oraclecloud.com/js/eesvcs.js",e.type="application/javascript",e.async=!0,e.defer=!0,e.onload=n,document.head.appendChild(e)},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};window.EESvcs={eeid:a},window.chatButtonClickedFlag=1,c(),l(),e()}},42:function(e,t,s){"use strict";var a=s(8),r=s(7),i=s(3);t.a={props:{pageNumber:{type:Number,default:1},currentPosition:{type:Number,default:0}},computed:{...Object(i.e)("miniQuote",{worksheetHeaderId:e=>e.quoteDetails.worksheetHeaderId}),activityTracking(){return this.$store.state.activityTracking},quoteDetails(){return this.$store.state.miniQuote.quoteDetails},$_analyticsMixin_transactionIdForAnalytics(){return this.worksheetHeaderId?this.worksheetHeaderId:Object(a.e)()}},methods:{$_analyticsMixin_setPDPViewedFromData(e){this.$store.dispatch("activityTracking/setPDPViewFrom",e),this.$store.dispatch("activityTracking/setPDPResultsPageFrom",this.pageNumber),this.$store.dispatch("activityTracking/setPDPResultsIndexFrom",this.currentPosition)},$_analyticsMixin_buildAnalyticsCategory:(e,t,s)=>e||(t===r.ProductOrigin.CATALOG?s:t),$_analyticsMixin_trackVehicleAdded(e){Object(a.p)(e,this.$_analyticsMixin_transactionIdForAnalytics,this.activityTracking.activity.vehicleAddedFrom)},$_analyticsMixin_trackAddToCart(){var e,t,s,r,i,o,n,l,c,u;let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,m=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const{worksheetHeaderId:g}=this.quoteDetails,v=null!==(e=null!==(t=null!==(s=null==p||null===(r=p.quoteData)||void 0===r||null===(i=r.worksheetForm)||void 0===i?void 0:i.subtotalCost)&&void 0!==s?s:null===(o=this.$store)||void 0===o||null===(n=o.state)||void 0===n||null===(l=n.miniQuote)||void 0===l||null===(c=l.quoteDetails)||void 0===c?void 0:c.subtotalCost)&&void 0!==t?t:null===(u=this.quoteDetails)||void 0===u?void 0:u.subtotalCost)&&void 0!==e?e:0;let f;if(null!==m)f=m;else{const e=d.reduce(((e,t)=>e+(t.itemCost||0)*(t.itemQuantity||0)),0);f=Math.max(0,v-e)}Object(a.g)({from:h,items:d,worksheetHeaderId:g,cartTotalValue:v,userCartValue:f})}}}},43:function(e,t,s){"use strict";s.d(t,"a",(function(){return a}));const a={OK:200,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,CONFLICT:409,UNPROCESSABLE_ENTITY:422,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVAILABLE:503}},439:function(e,t,s){"use strict";s(356)},44:function(e,t,s){"use strict";s.r(t),s.d(t,"qtyExceeds1000",(function(){return a})),s.d(t,"ForbiddenReason",(function(){return r})),s.d(t,"poMaskNoMatch",(function(){return i}));const a="QTY_EXCEEDS_1000",r={PASSWORD_RESET_REQUIRED:"SECURITY_CHANGE_REQUIRED",ACCEPT_TERMS_REQUIRED:"TOS_REQUIRED"},i="pomask.message.nonmatch"},440:function(e,t,s){},45:function(e,t,s){"use strict";var a=s(2),r=s(12),i=s(27);t.a={mixins:[r.a],methods:{getProductSubset:a.j,getSpaCatalogRedirectPath(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!this.isEntSearchEnabled||!this.isEntSearchAndKitsEnabled&&e?"/catalog/products":"/catalog/v2/products"},getDeviceType(){return this.$fcoMq.isSmDown?i.a.MOBILE:this.$fcoMq.isMdDown?i.a.TABLET:i.a.DESKTOP}}}},46:function(e,t,s){"use strict";function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{var t;return!e.leaf&&null!==(t=e.resolvedPartTypeNodes)&&void 0!==t&&t.length?(e.resolvedPartTypeNodes.forEac
1h((t=>{e.selectedFacets&&(t.selectedFacets=e.selectedFacets)})),e.resolvedPartTypeNodes):[e]})).flat()}function r(e,t){const{itemCost:s,costExtended:a,partPriceAvailabilityResponse:r={}}=e;let i=s;return t?i=a:!i&&r.price&&(i=r.price.itemCost),i||0}function i(e,t){const{customerPrice:s,priceExtended:a,partPriceAvailabilityResponse:r={}}=e;let i=s;return t?i=a:!i&&r.price&&({listPrice:i}=r.price),i||0}s.d(t,"a",(function(){return a})),s.d(t,"b",(function(){return r})),s.d(t,"c",(function(){return i}))},462:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"alert alert-info"},[e._v("\n        "+e._s(e.requirePassword?e.fcoM("rs.forgotPasswordForm.loginRequired","You will be required to login with your new password."):e.fcoM("authentication.leaveBlankPassword","If you do not enter a new password, your password will remain unchanged."))+"\n    ")]),e._v(" "),s("OpcValidationObserver",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.validate;return[s("form",{on:{submit:function(t){t.preventDefault(),a().then(e.handleSubmit)}}},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:"newPassword"}},[e._v(e._s(e.fcoM("rs.forgotPasswordForm.passwordLabel","New Password"))),e.requirePassword?s("span",{staticClass:"red",attrs:{"aria-hidden":"true"}},[e._v(" *")]):e._e()]),e._v(" "),e.isInitialLoading?s("VueSkeletonLoader",{staticClass:"form-control",attrs:{type:"rect",radius:3,rounded:!0,width:"100%"}}):s("ValidationProvider",{ref:"newPasswordValidationProvider",attrs:{rules:{required:e.requirePassword,min:6},name:e.fcoM("rs.forgotPasswordForm.passwordLabel","New Password"),tag:"div",vid:"newPassword"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.formData.newPassword,expression:"formData.newPassword"}],class:[r,"form-control"],attrs:{id:"newPassword",type:"password"},domProps:{value:e.formData.newPassword},on:{input:function(t){t.target.composing||e.$set(e.formData,"newPassword",t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),s("div",{staticClass:"form-group"},[s("label",{attrs:{for:"newPasswordConfirm"}},[e._v(e._s(e.fcoM("rs.forgotPasswordForm.passwordVerifyLabel","Verify Password"))),e.requirePassword?s("span",{staticClass:"red",attrs:{"aria-hidden":"true"}},[e._v(" *")]):e._e()]),e._v(" "),e.isInitialLoading?s("VueSkeletonLoader",{staticClass:"form-control",attrs:{type:"rect",radius:3,rounded:!0,width:"100%"}}):s("ValidationProvider",{attrs:{rules:""===e.formData.newPassword?"":"required|confirmed:newPassword",name:e.fcoM("rs.forgotPasswordForm.passwordVerifyLabel","Verify Password"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.formData.newPasswordConfirm,expression:"formData.newPasswordConfirm"}],class:[r,"form-control"],attrs:{id:"newPasswordConfirm",type:"password"},domProps:{value:e.formData.newPasswordConfirm},on:{input:function(t){t.target.composing||e.$set(e.formData,"newPasswordConfirm",t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(e.formData.newPasswordConfirm?e.fcoM("rs.forgotPasswordFormValidation.passwordVerify","Passwords don't match"):a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),s("hr",{staticClass:"my-4"}),e._v(" "),s("div",{staticClass:"form-group"},[s("label",{attrs:{for:"newQuestionKey"}},[e._v(e._s(e.fcoM("rs.forgotPasswordForm.selectQuestionLabel","Update Your Security Question")))]),e._v(" "),e.isInitialLoading?s("VueSkeletonLoader",{staticClass:"custom-select",attrs:{type:"rect",radius:3,rounded:!0,width:"100%"}}):s("ValidationProvider",{attrs:{rules:"required",name:e.fcoM("rs.forgotPasswordForm.selectQuestionLabel","Update Your Security Question"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("select",{directives:[{name:"model",rawName:"v-model",value:e.formData.newQuestionKey,expression:"formData.newQuestionKey"}],class:[r,"custom-select"],attrs:{id:"newQuestionKey"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,
1(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.formData,"newQuestionKey",t.target.multiple?s:s[0])}}},e._l(e.questionOptions,(function(t){return s("option",{key:t.key,domProps:{value:t.key}},[e._v(e._s(t.content))])})),0),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),s("div",{staticClass:"form-group"},[s("label",{attrs:{for:"newAnswer"}},[e._v(e._s(e.fcoM("rs.forgotPasswordForm.securityQuestionAnswerLabel","Your Security Question Answer"))),s("span",{staticClass:"red",attrs:{"aria-hidden":"true"}},[e._v(" *")])]),e._v(" "),e.isInitialLoading?s("VueSkeletonLoader",{staticClass:"form-control",attrs:{type:"rect",radius:3,rounded:!0,width:"100%"}}):s("ValidationProvider",{attrs:{rules:"required",name:e.fcoM("rs.forgotPasswordForm.securityQuestionAnswerLabel","Your Security Question Answer"),tag:"div"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.errors,r=t.classes;return[s("input",{directives:[{name:"model",rawName:"v-model",value:e.formData.newAnswer,expression:"formData.newAnswer"}],class:[r,"form-control"],attrs:{id:"newAnswer",type:"text"},domProps:{value:e.formData.newAnswer},on:{input:function(t){t.target.composing||e.$set(e.formData,"newAnswer",t.target.value)}}}),e._v(" "),a[0]?s("span",{staticClass:"error"},[e._v(e._s(a[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),e._t("buttons",(function(){return[s("button",{staticClass:"button",attrs:{type:"submit",disabled:e.isInitialLoading}},[e._v(e._s(e.fcoM("common.submit","Submit")))])]}),null,{isLoading:e.isInitialLoading})],2)]}}],null,!0)})],1)};a._withStripped=!0;var r=s(1),i=s.n(r),o=s(3),n=s(29),l=s(270),c=s(50),u=s(2),d=s(6),h={name:"UserSecurityForm",ticketRequest:null,emits:["success","fail"],props:{requirePassword:{type:Boolean,default:!1},ticket:{type:String,default:""},loginName:{type:String,required:!1}},data(){return{securityManagementTicket:this.ticket,formData:{newPassword:"",newPasswordConfirm:"",newQuestionKey:"",newAnswer:""},isInitialLoading:!0,questionOptions:[]}},computed:{...Object(o.e)(["requests","csrfObject"]),isLoadingAppData(){return!Object(d.f)(this.requests.getAppData)},profileURL(){return this.isSPA?Object(u.c)("/userSecurity/profile"):Object(u.c)("/security/management/profile",{params:{name:this.loginName,ticket:this.securityManagementTicket}})}},methods:{async handleSubmit(){const e=this.$fcoLoading(this.fcoM("rs.pref.savingUserPreferences","Saving user preferences..."));try{const{data:e}=await i.a.post(this.profileURL,Object(l.b)(this.formData,"newPasswordConfirm"));this.$emit("success",e),this.$fcoToast.success(this.fcoM("oneShot.passwordChangeSuccessful","Your security information was changed successfully."))}catch(e){var t,s,a;this.$emit("fail",e),null!=e&&null!==(t=e.response)&&void 0!==t&&null!==(s=t.data)&&void 0!==s&&null!==(a=s.validation)&&void 0!==a&&a.newPasswordSameAsCurrent?this.$refs.newPasswordValidationProvider.applyResult({errors:[this.fcoM("rs.forgotPasswordFormValidation.sameAsExisting","The new password cannot be the same as the user's existing password.")],valid:!1,failedRules:{}}):this.$fcoToast.error(this.fcoM("common.error.processingRequest","There was an error processing your request. Please try again later."))}e.remove()}},async mounted(){Object(d.d)(this.requests.getAppData)&&this.$store.dispatch("getAppData"),await Object(d.g)((()=>this.requests.getAppData));try{var e;if(!this.isSPA&&!this.securityManagementTicket){const{data:{code:e}}=await i.a.post(Object(u.c)("/security/management/ticket"));this.securityManagementTicket=e}const{data:{questionOptions:t,securityQuestion:s,securityAnswer:a}}=await i.a.get(this.profileURL),r=null!==(e=t.find((e=>{let{content:t}=e;return t===s})))&&void 0!==e?e:t[0];this.questionOptions=t,this.formData.newAnswer=a,this.formData.newQuestionKey=r.key,this.isInitialLoading=!1}catch(e){this.$fcoToast.error(this.fcoM("common.error.processingRequest","There was an error processing your request. Please try again later."))}},components:{OpcValidationObserver:c.a,VueSkeletonLoader:n.a}},p=s(4),m=Object(p.a)(h,a,[],!1,null,null,null);t.a=m.exports},47:function(e,t,s){"use strict";s.d(t,"c",(function(){return a})),s.d(t,"a",(function(){return r})),s.d(t,"b",(function(){return i}));const a={SUGGESTED:"SUGGESTED",CUSTOM:"CUSTOM"},r={STORE:"STR",SURROUNDING_STORE:"SS",HUB:"HUB",LINKED_DISTRIBUTION_CENTER:"LDC",DISTRIBUTION_CENTER:"DC"},i={STORE:"STORE",DC:"DC",SERVICING_HUB:"SERVICING_HUB",OTHER_HUB:"OTHER_HUB",LINKED_DC:"LINKED_DC",SERVICING_DC:"SERVICING_DC",SURROUNDING_STORE:"SURROUNDING_STORE",ALL_SUPPLIERS:"ALL_SUPPLIERS",OUT_OF_STOCK:"OUT_OF_STOCK"}},48:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)("a",{attrs:{href:e.href}},[e._t("default",(function(){return[e._v(e._s(e.linkText))]}))],2)};a._withStripped=!0;var r=s(3),i=s(36),o=s(25),n={name:"DotCmsLink",mixins:[i.a],props:{identifier:{type:String,required:!1},fileName:{type:String,required:!1},label:{type:String,required:!1}},computed:{...Object(r.e)(["requests","cmsData"]),...Object(r.e)("i18n",["locale"]),linkText(){return(this.label?this.label:this.fileName)||this.href},languageId(){return Object(o.b)(this.locale)},href(){var e;const t=null===(e=this.cmsData)||void 0===e?void 0:e.url;if(!t)return"#";if(!this.identifier&&!this.fileName)throw new Error('You must specify either an "identifier" or "src"');return`${t}${this.identifier?`/dA/${this.identifier}`:""}${this.fileName?`/${encodeURIComponent(this.fileName)}`:""}?language_id=${this.languageId}`}}},l=s(4),c=Object(l.a)(n,a,[],!1,null,null,null);t.a=c.exports},5:function(e,t,s){"use strict";s.d(t,"f",(function(){return a})),s.d(t,"d",(function(){return r})),s.d(t,"a",(function(){return i})),s.d(t,"g",(function(){return o}
1)),s.d(t,"b",(function(){return n})),s.d(t,"e",(function(){return l})),s.d(t,"c",(function(){return c}));const a={SUPERUSER:"SUPERUSER",SYSADMIN:"SYSADMIN",INSTALLER_SUPPORT:"INSTALLER_SUPPORT",COMPANY_MANAGER:"COMPANY_MANAGER",SHOP_MANAGER:"SHOP_MANAGER",MARKETING:"MARKETING",OREILLY_EMPLOYEE:"OREILLY_EMPLOYEE",SHOP_EMPLOYEE:"SHOP_EMPLOYEE",DEMO_USER:"DEMO_USER",SMS:"SMS"},r={MITCHELL:"MITCHELL"},i={WHITE:1,GRAY:3},o={ACTIVE:"ACTIVE",INACTIVE:"INACTIVE",DISABLED:"DISABLED",DELETED:"DELETED"},n=4,l={EN:"en",ES:"es"},c={CAR_ADMIN_EMAIL_ADDRESS:"[email protected]"}},50:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)("ValidationObserver",e._g(e._b({ref:"validator",scopedSlots:e._u([{key:"default",fn:function(t){return[e._t("default",null,null,t)]}}],null,!0)},"ValidationObserver",e.$attrs,!1),e.$listeners))};a._withStripped=!0;s(310);var r=s(13),i=s(16),o={name:"OpcValidationObserver",computed:{currentLocale(){return this.$store.state.i18n.locale}},methods:{async validateOnlyWithErrors(){const e=this.$refs.validator;if(e){await Object(i.b)();const t=e.refs,s=Object.keys(t).filter((e=>t[e].flags.invalid)).map((e=>t[e].validate()));await Promise.all(s)}},validate(){return this.$refs.validator.validate()},reset(){this.$refs.validator.reset()},getErrorFields(){var e,t;const s=null===(e=this.$refs.validator)||void 0===e||null===(t=e.ctx)||void 0===t?void 0:t.errors,a=[];for(const[e,t]of Object.entries(s))t.length>=1&&a.push(e);return a},getInvalidObservers(){return this.$refs.validator.observers.find((e=>e.ctx.invalid))}},watch:{currentLocale(){r.c.localize(this.currentLocale),this.validateOnlyWithErrors()}}},n=s(4),l=Object(n.a)(o,a,[],!1,null,null,null);t.a=l.exports},51:function(e,t,s){"use strict";s.d(t,"c",(function(){return n})),s.d(t,"b",(function(){return l})),s.d(t,"f",(function(){return c})),s.d(t,"e",(function(){return u})),s.d(t,"d",(function(){return d})),s.d(t,"a",(function(){return h}));var a=s(1),r=s.n(a),i=s(2);const o=e=>{let{attributeId:t,valueId:s,partTypeId:a="",updateAttributeQuestion:r=!0}=e;return{attributeId:t,valueId:s,partTypeId:a,updateAttributeQuestion:r}},n=e=>r.a.post(Object(i.c)("/attribute/rest/v2/questions/retain"),e),l=e=>r.a.post(Object(i.c)("/attribute/rest/v2/questions/nonretain"),e),c=e=>{let{worksheetVehicleId:t,answeredAttributes:s,platformId:a,partTypeId:o}=e;return r.a.post(Object(i.c)("/attribute/rest/v2/questions/retain/answer"),{worksheetVehicleId:t,answeredAttributes:s,platformId:a,partTypeId:o})},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return r.a.delete(Object(i.c)(`/attribute/rest/retain/remove/${t}?${e.map((e=>`attributeIds=${e}`)).join("&")}`))},d=e=>{let{attributeId:t,valueId:s,partTypeId:a,updateAttributeQuestion:n=!1}=e;return r.a.post(Object(i.c)("/attribute/rest/remove"),o({attributeId:t,valueId:s,partTypeId:a,updateAttributeQuestion:n}))},h=e=>{let{attributeId:t,valueId:s,partTypeId:a}=e;return r.a.post(Object(i.c)("/attribute/rest/add"),o({attributeId:t,valueId:s,partTypeId:a,updateAttributeQuestion:!1}))}},56:function(e,t,s){"use strict";var a=s(291),r=s(1),i=s.n(r),o=s(3),n=s(7);const l="xxxx",c="signalsSearchUuid",u="signalSessionUuid",d="signalsCart";t.a={props:{trackSignals:{type:Boolean,default:!1},useDefaultSearchUuid:{type:Boolean,default:!0},pageNumber:{type:Number,default:1},currentPosition:{type:Number,default:0}},computed:{...Object(o.e)(["requests","user","currentShop","currentShop"])},methods:{$_signalsMixin_setSearchUuid(e){sessionStorage.setItem(c,e)},$_signalsMixin_setSessionUuid(){sessionStorage.setItem(u,Object(a.a)())},$_signalsMixin_setSessionCart(e,t){let{line:s,itemNumber:a,resultPosition:r,quantity:i,salePrice:o}=e;const n=this.$_signalsMixin_getSessionCart(),l={line:s,itemNumber:a,resultPosition:r,quantity:i,salePrice:o,session:this.$_signalsMixin_getSessionContext()};n.hasOwnProperty(t)?n[t].push(l):n[t]=[l],sessionStorage.setItem(d,JSON.stringify(n))},$_signalsMixin_getSessionCart:()=>JSON.parse(sessionStorage.getItem(d))||{},$_signalsMixin_getSearchUuid(){return this.useDefaultSearchUuid?l:sessionStorage.getItem(c)||l},$_signalsMixin_getSessionUuid:()=>sessionStorage.getItem(u),$_signalsMixin_getSessionContext(){var e;return{searchUuid:this.$_signalsMixin_getSearchUuid(),sessionId:this.$_signalsMixin_getSessionUuid(),context:{accountNumber:null===(e=this.currentShop)||void 0===e?void 0:e.accountNumber,userId:String(this.user.userId),endPointUrl:window.location.href}}},$_signalsMixin_removeWorksheetCart(e){const t=this.$_signalsMixin_getSessionCart();t.hasOwnProperty(e)&&(delete t[e],sessionStorage.setItem(d,JSON.stringify(t)))},$_signalsMixin_trackAutoCompleteSelection(e){let{selectedSuggestion:t,position:s,originalQuery:a}=e;try{var r;i.a.post(this.fcoUrl("/signals/v2/suggestions"),{storeNumber:null===(r=this.currentShop)||void 0===r?void 0:r.homeStore.storeId,position:s,originalQuery:a,selectedSuggestion:t,session:this.$_signalsMixin_getSessionContext()})}catch{}},$_signalsMixin_trackSignalsEvent(e){let{line:t,itemNumber:s,resultPosition:a,quantity:r,salePrice:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const c=e===n.SignalsEventTypes.PURCHASE?l:[{line:t,itemNumber:s,resultPosition:null!=a?a:0,quantity:r,salePrice:o,session:this.$_signalsMixin_getSessionContext()}];try{var u;i.a.post(this.fcoUrl("/signals/interactions"),{interactionType:e,storeNumber:null===(u=this.currentShop)||void 0===u?void 0:u.homeStore.storeId,pageTitle:document.title,pageNumber:this.pageNumber,productTrackingContexts:c})}catch{}}},mounted(){this.trackSignals&&this.$store.dispatch("requestIfIdle",["getUser","getCurrentShop"]),this.$_signalsMixin_getSessionUuid()||this.$_signalsMixin_setSessionUuid()}}},57:function(e,t,s){"use strict";var a=s(55),r=s(8),i=s(3),o=s(7),n=s(1),l=s.n(n),c=s(12),u=s(68),d=s(45),h=s(34),p=s(2),m=s(46);const g=5e3,v=Object(p.c)("/parttype/mini/getparts.html"),f=e=>Object.prototype.hasOwnProperty.call(e,"partTypes"),S=e=>f(e)?e.id:e.partTypeId,b=e=>{const{partTypeId:t,id:s,parentPartTypeId:a,platformId:r,lookupPartTypeId:i,gaTabOrigin:o,partTypeName:n}=e,l={parentId:a,partTypeId:t,platformId:r,lookupPartTypeId:i,gaTabOrigin:o,partTypeName:n};
1return f(e)&&(l.partTypeId=s,l.parentId="PACKAGEJOB"),l};t.a={mixins:[c.a,u.a,d.a],computed:{...Object(i.e)({requests:e=>e.requests,isSPA:e=>e.isSPA,user:e=>{let{user:t}=e;return t},currentShop:e=>{let{currentShop:t}=e;return t}}),...Object(i.e)("vehicleSelector",{vehicleRequest:e=>e.requests.getCurrentVehicle,vehicle:e=>e.currentVehicle}),searchQuery(){return this.isSPA?this.$route.query.query:new URLSearchParams(window.location.search).get("query")}},methods:{...Object(i.b)("usageTracking",["startCatalogLookup"]),$_partTypeMixin_getItemId:e=>S(e),$_partTypeMixin_isValidSelection(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const a=S(t);if(e.some((e=>S(e)===a)))return!1;const r=7===s?this.fcoM("rs.partSelection.maxPartError7","You can only select up to 7 parts at a time."):this.fcoM("rs.partSelection.maxPartError5","You can only select up to 5 parts at a time.");return e.length>=s?(this.showMaxTypesError(r),!1):!(e.length>0&&(t.kits||e.filter((e=>e.kits)).length>0))||(this.showerrorKitsSourcingError(this.fcoM("rs.partSelection.errorKitsSourcing","Kits must be sourced independently")),!1)},async $_partTypeMixin_submitGetParts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e.length<=0)return;this.$store.dispatch("activityTracking/startPartsLookupTimer");let s=[];s=this.isEntSearchEnabled&&t===o.LookupOrigin.SUGGESTION&&e.every((e=>e.hasOwnProperty("universal")))?e.map((e=>({...e,applicationPartType:!e.universal}))):[...e];let a=this.$fcoLoading();const i=s.map(b);Object(r.d)({event:"catalogLookup",data:i});try{const{data:{vehicleRequired:r}}=await h.a(i);let n;const l=this.getSpaCatalogRedirectPath(s.some((e=>e.kits)));if(n=this.searchQuery?{path:l,query:{query:this.searchQuery,ptsearch:1}}:l,this.isSPA||(n=this.isEntSearchEnabled&&!s.some((e=>e.kits))||this.isEntSearchAndKitsEnabled?this.searchQuery?this.fcoUrl(`/parttype/mini/v2/getParts.html?query=${encodeURIComponent(this.searchQuery)}&ptsearch=1`):this.fcoUrl("/parttype/mini/v2/getParts.html"):this.searchQuery?`${v}?query=${this.searchQuery}&ptsearch=1`:v),r&&!this.vehicle)a.remove(),!this.isEntSearchEnabled||t!==o.LookupOrigin.SUGGESTION&&t!==o.LookupOrigin.SUGGESTED_PART_MENU?this.isEntSearchEnabled&&t===o.LookupOrigin.CATALOG?this.forceCar().then((async()=>{if(this.currentVehicle){if(a=this.$fcoLoading(),this.$store.dispatch("activityTracking/startPartsLookupTimer"),await this.handleCatalogPartSelection(s,t),!this.isSPA)return void(window.location.href=n);a.remove(),this.$router.push(n)}})):(this.$store.dispatch("vehicleSelector/setVsProp",{prop:"saveLookupBeforeRedirect",value:!0}),this.$store.dispatch("vehicleSelector/setVsProp",{prop:"partsToSaveBeforeRedirect",value:s}),this.$store.dispatch("vehicleSelector/forceCar",n)):this.forceCar().then((async()=>{if(this.currentVehicle){a=this.$fcoLoading();const r=t===o.LookupOrigin.SUGGESTION?s:e;this.$store.dispatch("activityTracking/startPartsLookupTimer");try{await this.$_partTypesMixin_getResolvedLeaf(r,t)}catch{return void a.remove()}if(!this.isSPA)return void(window.location.href=n);a.remove(),this.$router.push(n)}}));else{if(this.isEntSearchEnabled)if(t===o.LookupOrigin.CATALOG)await this.handleCatalogPartSelection(s,t);else if(t===o.LookupOrigin.SUGGESTED_PART_MENU||t===o.LookupOrigin.SUGGESTION){const r=t===o.LookupOrigin.SUGGESTION?s:e;try{await this.$_partTypesMixin_getResolvedLeaf(r,t)}catch{return void a.remove()}}else this.$store.dispatch("partSelection/savePartLookup",{partTypes:s,vehicle:this.vehicle,origin:t||null});if(await this.startCatalogLookup(),this.$store.dispatch("activityTracking/setSearchUuid"),!this.isSPA)return void(window.location.href=n);a.remove(),this.$router.push(n)}}catch{a.remove(),this.$fcoToast.error(this.fcoM("rs.partSelection.errorSend","An error occurred while retrieving your parts. Please try again."))}},$_partTypeMixin_setFocusByPositionIndex(e){const t=this.$refs[e];t&&t.length>0&&t[0].focus()},async $_partTypeMixin_getResolvedPartTypes(e,t){try{const{data:s}=await l.a.post(this.fcoUrl("/parttype/node/v2/resolved"),{vehicle:this.currentVehicle,selectedPartTypes:e});this.$store.dispatch("partSelection/savePartLookup",{partTypes:e,resolvedPartTypes:Object(m.a)(s.results),fullResolvedDetail
1s:s.results,vehicle:this.vehicle,origin:t||null})}catch(e){throw this.$fcoToast.error(this.fcoM("rs.getparts.partsRequestError","Error retrieving product data. Please try again.")),new Error(e)}},async $_partTypesMixin_getResolvedLeaf(e,t){const s=e.map((e=>({includeSpecifications:!0,includeSiblings:!0,selectedPartType:{description:e.description,parentPartTypeId:e.parentPartTypeId,partTypeId:e.partTypeId,platformId:e.platformId,applicationPartType:e.applicationPartType}})));try{const{data:a}=await l.a.post(this.fcoUrl("/parttype/node/resolve/leaf"),{vehicle:this.currentVehicle,leafPartTypes:s}),r=e.map((e=>{const t=a.find((t=>{var s;return(null===(s=t.partType)||void 0===s?void 0:s.partTypeId)===e.partTypeId}));return t?{...e,keywords:t.partType.keywords}:e})),i=new Set(r.map((e=>e.partTypeId))),o=new Map,n=[];a.forEach((e=>{e.siblings.forEach((e=>{i.has(e.partTypeId)||o.set(e.partTypeId,e)})),e.specifications.length&&e.specifications.forEach((t=>{n.push({...t,specForPartType:e.partType.partTypeId})}))}));const c=Array.from(o.values());this.$store.dispatch("partSelection/savePartLookup",{partTypes:r,siblingPartTypes:c,vehicle:this.vehicle,specificationPartTypes:n,origin:t})}catch(e){throw this.$fcoToast.error(this.fcoM("rs.getparts.partsRequestError","Error retrieving product data. Please try again.")),new Error(e)}},async handleCatalogPartSelection(e,t){const s=[],a=[],r=[];e.forEach((e=>{e.gaTabOrigin===o.CatalogTabOrigins.PACKAGE_JOBS?a.push(e):r.push(e)}));try{await Promise.all(a.map((async e=>{var t;const{data:a}=await l.a.post(this.fcoUrl("/packagerest/packageJobPartTypes"),{shopId:null===(t=this.currentShop)||void 0===t?void 0:t.id,packageJobIds:[e.id]});s.push(...a)})))}catch{return void this.$fcoToast.error(this.fcoM("rs.getparts.partsRequestError","Error retrieving product data. Please try again."))}try{await this.$_partTypeMixin_getResolvedPartTypes([...r,...s],t)}catch{}},showMaxTypesError:Object(a.throttle)((function(e){this.$fcoToast.error(e,{displayDuration:g})}),g),showerrorKitsSourcingError:Object(a.throttle)((function(e){this.$fcoToast.error(e,{displayDuration:g})}),g)},mounted(){this.$store.dispatch("requestIfIdle",["getCurrentShop","getFeatures","vehicleSelector/getCurrentVehicle"])}}},58:function(e,t,s){"use strict";t.a={methods:{$_analyticsMixin_setVehicleAddedFrom(e){this.$store.dispatch("activityTracking/setVehicleAddedFrom",e)}}}},59:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ul",[e.isLoading?e._l(e.numberOfPlaceholders,(function(t){return s("li",{key:`${e.name}_loader_${t}`},[s("SkeletonText",{staticClass:"mw-100",attrs:{maxWidth:e.placeholderMaxWidth,minWidth:e.placeholderMinWidth}})],1)})):e._l(e.menu.menuItems,(function(t,a){return s("li",{key:`${t.title}_${a}`},[t.linkToFile?s("DotCmsLink",{class:e.linkClass,attrs:{fileName:t.linkToFile.fileName,label:t.title}}):s("a",{class:e.linkClass,attrs:{href:t.linkUrl}},[e._v(e._s(t.title))]),e._v(" "),t.icon?s("DotCmsImage",{staticClass:"d-inline",style:e.getMenuItemStyle(t),attrs:{src:`${e.cmsData.url}${t.icon.fileAsset.versionPath}`,alt:"",width:t.iconScaleWidth||-1,height:t.iconScaleHeight||-1}}):e._e()],1)}))],2)};a._withStripped=!0;var r=s(37),i=s(3),o=s(36),n=s(61),l=s(12),c=function(){var e=this,t=e.$createElement;return(e._self._c||t)("VueSkeletonLoader",{attrs:{width:e.finalWidth,height:"1.5em"}})};c._withStripped=!0;var u={name:"SkeletonText",components:{VueSkeletonLoader:s(29).a},props:{width:{type:[Number,String],required:!1},maxWidth:{type:Number,default:350},minWidth:{type:Number,default:100}},computed:{finalWidth(){if(void 0!==this.width)return this.width;const e=Math.abs(this.maxWidth)-Math.abs(this.minWidth),t=Math.random()*(e+1)+this.minWidth;return`${Math.floor(t)}px`}}},d=s(4),h=Object(d.a)(u,c,[],!1,null,null,null).exports,p=s(48),m=s(64),g={name:"DotCmsMenu",mixins:[l.a,o.a],components:{DotCmsImage:m.a,DotCmsLink:p.a,SkeletonText:h},props:{name:{type:String,required:!0},placeholderMaxWidth:{type:Number,required:!1},placeholderMinWidth:{type:Number,required:!1},numberOfPlaceholders:{type:Number,default:3},linkClass:{type:String,default:""}},computed:{...Object(i.e)(["requests","cmsData"]),currentLocale(){return this.$store.state.i18n.locale}},methods:{createQueryFields:()=>r.gql`
2                {
3                    name
4                    menuItems {
5                        title
6                        linkUrl
7                        linkToFile {
8                            fileName
9                        }
10                        icon {
11                            fileAsset {
12                                versionPath
13                            }
14                        }
15                        iconScaleWidth
16                        iconScaleHeight
17                        iconPadding
18                    }
19                }
20            `,async getMenuItems(){this.isLoading=!0;const e="Menu",t=`+Menu.menuSlug_dotraw:${this.name}`,s=this.createQueryFields();try{const[a]=await Object(n.a)({contentType:e,query:t,fields:s,locale:this.currentLocale});this.menu=a||{}}catch(e){}this.isLoading=!1},getMenuItemStyle:e=>e.iconPadding?`padding-left: ${e.iconPadding}px;`:""},data:()=>({isLoading:!1,menu:{}}),async mounted(){await this.loadFeatureFlags(),this.$watch("currentLocale",(()=>{this.getMenuItems()}),{immediate:!0})}},v=Object(d.a)(g,a,[],!1,null,null,null);t.a=v.exports},6:function(e,t,s){"use strict";s.d(t,"h",(function(){return l})),s.d(t,"b",(function(){return c})),s.d(t,"j",(function(){return u})),s.d(t,"i",(function(){return d})),s.d(t,"d",(function(){return h})),s.d(t,"e",(function(){return p})),s.d(t,"c",(function(){return m})),s.d(t,"f",(function(){return g})),s.d(t,"g",(function(){return v})),s.d(t,"a",(function(){return f}));var a=s(16),r=s(1),i=s.n(r),o=s(0),n=s(43);const l={IDLE:"IDLE",PENDING:"PENDING",SUCCESS:"SUCCESS",ERROR:"ERROR"},c=function(){let{storageKey:e=null,cacheKey:t=null,cacheStrategy:s=o.b.EAGER_FETCH,pollKey:a=null,pollValue:r=(()=>!!a)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=l.IDLE,n=0,c=!1;return Object(o.l)(e)&&!Object(o.k)(e)&&s===o.b.LAZY&&(i=l.SUCCESS,n=200,c=!0),{error:null,wasCancelled:!1,isFromCac
20he:c,pollKey:a,pollValue:r,status:i,statusCode:n,storageKey:e,cacheKey:t}},u=(e,t)=>{var s;let{name:a,status:r,statusCode:i,error:o,isFromCache:n=!1}=t;if(!e.requests)throw new Error(`Unable to update request "${a}". Vuex store state is missing a "requests" property.`);if(null===(s=e.requests)||void 0===s||!s[a])throw new Error(`Request "${a}" has not been registered in the store state.`);const{storageKey:l,pollKey:c,pollValue:u,cacheKey:d}=e.requests[a];e.requests[a]={...e.requests[a],status:r,statusCode:i,error:o,isFromCache:n,storageKey:l,pollKey:c,pollValue:u,cacheKey:d}};async function d(e,t,s){e("updateRequestStatus",{name:t,status:l.PENDING,statusCode:null,error:null});try{const a=await s;return setTimeout((()=>{e("updateRequestStatus",{name:t,status:l.SUCCESS,statusCode:a.status,error:null})})),a}catch(s){var a;if(20===s.code||i.a.isCancel(s))e("updateRequestStatus",{...c(),wasCancelled:!0,name:t});else e("updateRequestStatus",{name:t,status:l.ERROR,statusCode:null===(a=s.response)||void 0===a?void 0:a.status,error:s});return null}}const h=e=>(null==e?void 0:e.status)===l.IDLE,p=e=>(null==e?void 0:e.status)===l.PENDING,m=e=>(null==e?void 0:e.status)===l.ERROR,g=e=>m(e)||(e=>(null==e?void 0:e.status)===l.SUCCESS)(e),v=e=>new Promise((t=>{if("function"!=typeof e)throw new Error("Request reference needs to be a watcher function that returns a request object.");const s=Object(a.c)(e,(e=>{g(e)&&(setTimeout((()=>s())),t(e))}),{immediate:!0})})),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Promise.resolve({data:e,status:n.a.OK})}},60:function(e,t,s){"use strict";function a(e,t){const s=e.find((e=>Object.keys(e).includes(t)));return!!s&&s[t]}function r(e,t,s,a){const r=JSON.parse(window.sessionStorage.getItem("tableStateReverse"))||[],i=JSON.parse(window.sessionStorage.getItem("tableStateSortName"))||[],o=JSON.parse(window.sessionStorage.getItem("tableStatePage"))||[];let n=!1,l=-1,c=-1,u=-1;if(i.length>0&&(l=i.findIndex((e=>Object.keys(e)[0]===a)),-1!==l&&i[l][a]!==e&&(i[l][a]=e,n=!0)),r&&!n&&(c=r.findIndex((e=>Object.keys(e)[0]===a))),o.length>0&&(u=o.findIndex((e=>Object.keys(e)[0]===a)),-1!==u&&(o[u][a]=s)),-1===l&&!n){const n={},l={},c={};n[a]=e,i.push(n),l[a]=!1===t?1:-1,r.push(l),c[a]=s,o.push(c)}-1!==l&&-1!==c&&r&&!n&&(r[c][a]=!0===t?-1:1),window.sessionStorage.setItem("tableStateSortName",JSON.stringify(i)),window.sessionStorage.setItem("tableStateReverse",JSON.stringify(r)),window.sessionStorage.setItem("tableStatePage",JSON.stringify(o))}function i(e){const t=JSON.parse(window.sessionStorage.getItem("tableStateSortName")),s=JSON.parse(window.sessionStorage.getItem("tableStateReverse")),r=JSON.parse(window.sessionStorage.getItem("tableStatePage"));let i=-1,o="",n="";return s&&t&&(i=a(s,e),o=a(t,e)),r&&(n=a(r,e)),1===i&&(i=void 0),{sortBy:o,reverse:i,page:n}}function o(){window.sessionStorage.removeItem("tableStateSortName"),window.sessionStorage.removeItem("tableStateReverse"),window.sessionStorage.removeItem("tableStatePage")}function n(e,t){const s=window.sessionStorage.getItem("uniqueLookupID"),a=Number(window.sessionStorage.getItem("userId"));s&&s===e&&a&&a===t||(o(),window.sessionStorage.setItem("uniqueLookupID",e),window.sessionStorage.setItem("userId",t))}s.d(t,"d",(function(){return r})),s.d(t,"b",(function(){return i})),s.d(t,"a",(function(){return o})),s.d(t,"c",(function(){return n}))},61:function(e,t,s){"use strict";s.d(t,"a",(function(){return c}));var a=s(37),r=s(54),i=s(5),o=s(25),n=s(9);const l=e=>{const t=[],s=new Map,a=new Map,o=new Map;return e.forEach((e=>{const{identifier:n,conLanguage:{languageCode:l},contentType:c}=e,u=l===i.e.EN,d=u?a.get(n):{...e};if(u&&!d)return void s.set(n,t.push({...e})-1);const h=s.get(n);if(!u&&void 0===h)return void a.set(n,{...e});const p=u?{...e}:t[h],m=c?o.get(c):void 0,g=null!=m?m:Object.keys(p).filter((e=>{var t;const s=p[e];return Object(r.a)(s)||Array.isArray(s)&&(null===(t=s[0])||void 0===t?void 0:t.identifier)}));c&&!m&&o.set(c,g),g.forEach((e=>{const t=d[e],s=p[e];if(!Array.isArray(s))return void(t||(d[e]=s));const a=t.reduce(((e,t)=>(e[t.identifier]=t,e)),{});d[e]=s.map((e=>a[e.identifier]||e))})),void 0===h?t.push(d):t.splice(h,1,d)})),t},c=async function(){let{contentType:e,fields:t="",query:s="",locale:r=i.e.EN}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=new AbortController,u=n.b.cmsContentRequests[s];u&&!u.isFinished&&await n.a.dispatch("abortCMSContentRequest",s),await n.a.dispatch("requestIfIdle",["getCMSData"]),await n.a.dispatch("setCMSContentRequest",{name:s,abortController:c,isFinished:!1});const d=`${n.b.cmsData.url}/api/v1/graphql`;let h,p=s,m=t;e&&(p+=` +contentType:${e}`,m=a.gql`
21            ...on ${e} ${m}
22        `),p+=" +live:true";const g=s.includes("languageId");if(!g){const e=new Set([i.e.EN,r].map(o.b));p+=` +languageId:(${Array.from(e).join(" || ")})`}const v=g||r!==i.e.EN;v&&(m+=a.gql`
23            ...on DotContentlet {
24                identifier
25                contentType
26                conLanguage {
27                    id
28                    languageCode
29                    countryCode
30                }
31            }
32        `),n.b.cmsData.token&&(h={authorization:`Bearer ${n.b.cmsData.token}`});const f=a.gql`
33        query {
34            search(query: "${p}") {
35                ${m}
36            }
37        }
38    `,S=new a.GraphQLClient(d,{signal:c.signal,headers:h}),b=await S.request(f);return await n.a.dispatch("finishCMSContentRequest",s),v?l(b.search):b.search}},64:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.adjustedSrc?s("picture",[s("source",{attrs:{type:"image/webp",srcset:e.adjustedSrc?`${e.adjustedSrc}/webp?language_id=${e.languageId}`:""}}),e._v(" "),s("img",{staticClass:"img-fluid",attrs:{src:e.adjustedSrc?`${e.adjustedSrc}?language_id=${e.languageId}`:"",alt:e.alt,width:e.width,height:e.height}}
38)]):e._e()};a._withStripped=!0;var r=s(3),i=s(36),o=s(25),n={name:"DotCmsImage",mixins:[i.a],props:{identifier:{type:String,required:!1},src:{type:String,required:!1},alt:{type:String,required:!0},width:{type:Number,required:!1},height:{type:Number,required:!1},constrainWidth:{type:Boolean,default:!1},constrainHeight:{type:Boolean,default:!1}},computed:{...Object(r.e)(["requests","cmsData"]),...Object(r.e)("i18n",["locale"]),languageId(){return Object(o.b)(this.locale)},adjustedSrc(){var e;if(null===(e=this.cmsData)||void 0===e||!e.url)return"";if(!this.src&&!this.identifier)throw new Error('You must specify either an "identifier" or "src"');return`${this.src||`${this.cmsData.url}/dA/${this.identifier}`}${this.constrainWidth?`/${this.width}w/${this.width}cw`:""}${this.constrainHeight?`/${this.height}ch`:""}`}}},l=s(4),c=Object(l.a)(n,a,[],!1,null,null,null);t.a=c.exports},65:function(e,t,s){"use strict";s.d(t,"a",(function(){return a})),s.d(t,"b",(function(){return r}));const a={NEW:"rs.homeMain.RWONew",CORE:"rs.homeMain.RWOCore",WARRANTY:"rs.homeMain.RWOWarranty",MULTIPLE:"rs.homeMain.RWOMultiple"},r="NEW"},66:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.isChatDisabled?e._e():[e.isChatReady?s("a",{class:e.buttonClass,attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.openChat.apply(null,arguments)}}},[e.showIcon?s("Icon",{class:"clickable text-md align-text-bottom",attrs:{name:"comments-o"}}):e._e(),e._v(e._s(e.label)+"\n        ")],1):s("VueSkeletonLoader",{attrs:{type:"rect",width:125,height:18,rounded:!0}})]],2)};a._withStripped=!0;var r=s(3),i=s(29),o=s(10),n=s(41),l={name:"ChatButton",components:{VueSkeletonLoader:i.a,Icon:o.a},props:{label:{type:String,required:!0},buttonClass:{type:String,default:"text-color-inherit text-decoration-none"},showIcon:{type:Boolean,default:!0}},computed:{...Object(r.e)(["isChatReady","isChatDisabled"])},methods:{openChat:n.d}},c=(s(223),s(4)),u=Object(c.a)(l,a,[],!1,null,"4973015f",null);t.a=u.exports},67:function(e,t,s){"use strict";t.a={methods:{createOneShotMessage(e){let{messageType:t="error",autoClose:s=!0,displayDuration:a=5e3,escape:r=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i={messageType:t,autoClose:s,displayDuration:a,escape:r};let o=JSON.parse(localStorage.getItem("oneShotMessages"));o?o.push({message:e,options:i}):o=[{message:e,options:i}],localStorage.setItem("oneShotMessages",JSON.stringify(o))},async getOneShotMessages(){const e=JSON.parse(localStorage.getItem("oneShotMessages"));null!=e&&e.length&&e.forEach((e=>{let{message:t,options:s}=e;return this.$fcoToast.show(t,s)})),localStorage.removeItem("oneShotMessages")}}}},68:function(e,t,s){"use strict";var a=s(3);t.a={computed:{...Object(a.e)("vehicleSelector",["forceUrl","currentVehicle"])},methods:{forceCar(){return new Promise((e=>{this.$store.dispatch("vehicleSelector/forceCar",!0);const t=this.$watch((()=>this.forceUrl&&!this.currentVehicle),(()=>{e(this.$store.state.vehicleSelector.currentVehicle),t()}))}))}}}},69:function(e,t,s){"use strict";var a=s(30);t.a={computed:{loginErrorKey(){return this.isSPA?this.$route.query.errorKey:new URLSearchParams(window.location.search).get("errorKey")},loginErrorMessagesByKey(){return{[a.a.OAUTH_LOGIN_ERROR]:this.fcoM("oauth.loginError","An error occurred, please login again"),[a.a.PROMO_ADMIN_LOGIN_ERROR]:this.fcoM("promoAdmin.loginError","An error accessing Promo Admin has occurred, please try again later."),[a.a.LOGIN_AUTHENTICATION_FAILED]:this.fcoM("rs.home.incorrectLogin","Your username and/or password is incorrect. Please try again."),[a.a.INVALID]:this.fcoM("rs.home.incorrectLogin","Your username and/or password is incorrect. Please try again."),[a.a.LOGIN_REQUIRED]:this.fcoM("rs.home.loginRequired","Please login to continue"),[a.a.SHOP_REFERRAL_LOGIN_ERROR]:this.fcoM("rs.home.sso.shopreferral.loginError","An error accessing Shop Referral has occurred. Please try again later."),[a.a.STATEMENTS_LOGIN_ERROR]:this.fcoM("rs.home.sso.statements.loginError","An error accessing Statements has occurred. Please try again later."),[a.a.LOGIN_TEMP_PASSWORD_EXPIRED]:this.fcoM("rs.home.temporaryPasswordExpired","The temporary password for this username has expired. Please reset the password associated with this username again.")}},loginErrorMessage(){return this.loginErrorKey&&this.loginErrorMessagesByKey[this.loginErrorKey]||""},hasAuthenticationError(){return Boolean(this.loginErrorKey)}}}},7:function(e,t,s){"use strict";s.r(t),s.d(t,"MOST_POPULAR",(function(){return a})),s.d(t,"SignalsEventTypes",(function(){return r})),s.d(t,"SignalsSearchSource",(function(){return i})),s.d(t,"ProductOrigin",(function(){return o}
38)),s.d(t,"ProductFitCompatibility",(function(){return n})),s.d(t,"ProductOriginDetails",(function(){return l})),s.d(t,"SEARCH_RESULTS_PART_TYPE_NAME",(function(){return c})),s.d(t,"ProductKeyType",(function(){return u})),s.d(t,"ProductSortValues",(function(){return d})),s.d(t,"KitLookupTypes",(function(){return h})),s.d(t,"KitLookupPartTypeIds",(function(){return p})),s.d(t,"PartTypeSearchLimit",(function(){return m})),s.d(t,"EntSearchPartTypeSearchLimit",(function(){return g})),s.d(t,"PartTypeSearchSort",(function(){return v})),s.d(t,"EntSearchPartTypeSearchSort",(function(){return f})),s.d(t,"StoreError",(function(){return S})),s.d(t,"WorksheetError",(function(){return b})),s.d(t,"LookupOrigin",(function(){return y})),s.d(t,"CatalogTabOrigins",(function(){return I})),s.d(t,"PlatformId",(function(){return _})),s.d(t,"PartTypeRequirements",(function(){return w})),s.d(t,"AttributeValues",(function(){return E})),s.d(t,"TypeAheadTypes",(function(){return O})),s.d(t,"SearchTechnology",(function(){return C})),s.d(t,"LookupMethod",(function(){return T})),s.d(t,"SpecificationKeyword",(function(){return P})),s.d(t,"Disposition",(function(){return A}));const a={PARENT_PART_TYPE_ID:"00000",PLATFORM_ID:"99"},r={CLICK:"CLICK",ADD_TO_QUOTE:"CART",PURCHASE:"PURCHASE"},i={FREE_TEXT:"FREE_TEXT",SUGGESTION:"SUGGESTION",CATEGORY_NAV:"CATEGORY_NAV"},o={CATALOG:"CATALOG",DIRECT:"DIRECT",STOCK_ORDER:"STOCK_ORDER",INTERCHANGE:"INTERCHANGE",MANUAL:"MANUAL",CROSS_SELL_PR_PRODUCT:"CROSS_SELL_PR_PRODUCT",CROSS_SELL_PT_PRODUCT:"CROSS_SELL_PT_PRODUCT",SUPPLIES:"SUPPLIES",KEYWORD:"KEYWORD"},n={UNKNOWN:"UNKNOWN",COMPATIBLE:"COMPATIBLE",INCOMPATIBLE:"INCOMPATIBLE"},l={SEARCH_RESULTS_PART_TYPE:"SEARCH_RESULTS_PART_TYPE"},c="SEARCH_PART_TYPE_NAME",u={LEGACY:"LEGACY"},d={PRICE:"PRICE",AVAILABILITY:"AVAILABILITY",ASCENDING:"ASCENDING",DESCENDING:"DESCENDING",RELEVANCE:"SCORE"},h={BRAKE:"BRAKE",AC:"AC"},p={AC:"C4576",BRAKE:"C4577"},m={FIRST_15:15,ALL:-1},g={FIRST_15:15,ALL:60},v={POPULAR:"rank",ALPHA:"pt_name"},f={POPULAR:"RANK",ALPHA:"NAME"},S={STORE_DOWN:"STORE_DOWN"},b={WORKSHEET_LOCKED:"WORKSHEET_LOCKED"},y={TYPEAHEAD:"typeahead",PREPROCESS:"preprocess",SUGGESTION:"suggestion",CATALOG:"catalog",SUGGESTED_PART_MENU:"suggestPartMenu",RELATED:"related"},I={POPULAR:"POPULAR",ALL:"ALL",PACKAGE_JOBS:"PACKAGEJOBS"},_={ALL_PART_TYPES:"05",MOST_POPULAR:"99",RELATED_PART_TYPES:"90"},w={VEHICLE_REQUIRED:"BASE_VEHICLE"},E={DONT_KNOW_SHOW_ALL:-99},O={PART_TYPE:"PART_TYPE",VEHICLE:"VEHICLE",CUSTOM_SEARCH_QUERY:"CUSTOM_SEARCH_QUERY"},C={ENT_SEARCH:"EntSearch",LEGACY:"Legacy"},T={TYPEAHEAD:"Type Ahead",PREPROCESSING:"Pre-Processing",MOST_POPULAR:"Most Popular",ALL_PARTS:"All Parts",PACKAGE_JOBS:"Package Job",SELECT_MULTIPLE:"Select Multiple",SEARCH_MY_KEYWORD:"Search My Keyword",ITEM_NUMBER_SEARCH:"Item Number Search",RELEVANCY_SEARCH:"Relevancy Search",SUGGESTED_PART_TYPE:"Suggested Part Type",INTERCHANGE:"Interchange",BASED_ON_YOUR_SEARCH:"Based on Your Search",RELATED_PART_TYPES:"Related Part Type",LEGACY_EXACT_MATCH:"Legacy Exact Match"},P="1",A={SUCCESS:"Success",FAIL:"Fail"}},70:function(e,t,s){"use strict";var a=function(){var e,t,s,a,r,i,o=this,n=o.$createElement,l=o._self._c||n;return l("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:o.cancelVehicleChange,expression:"cancelVehicleChange"}]},[o.isForced?l("div",{staticClass:"force-car-overlay",on:{click:o.cancelForceCar}}):o._e(),o._v(" "),o.isRecentVehiclesModalShown?l("FcoModal",{attrs:{"title-text":o.fcoM("rs.homeMain.recentVehicles","Recent Vehicles"),size:"lg",closeMsg:o.fcoM("common.close","Close")},on:{close:o.closeRecentVehiclesModal}},[l("RecentVehicles",o._b({on:{"vehicle-selected":o.handleRecentVehicleSelected}},"RecentVehicles",o.$props,!1)),o._v(" "),l("button",{staticClass:"button",attrs:{slot:"footer",type:"button"},on:{click:o.closeRecentVehiclesModal},slot:"footer"},[o._v(o._s(o.fcoM("common.close","Close")))])],1):o._e(),o._v(" "),o.isVehicleInfoShown&&null!==(e=o.currentVehicle)&&void 0!==e&&e.id?l("VehicleCustomerInfo",{attrs:{"vehicle-id":null===(t=o.currentVehicle)||void 0===t?void 0:t.id,"shop-customer-id":o.shopCustomer?o.shopCustomer.id:null,attributes:o.currentVehicle.answeredAttributes},on:{"remove-attribute":function(e){return o.removeAttributes([e])},save:o.handleVehicleInfoSave,close:o.closeVehicleInfoModal}}):o._e(),o._v(" "),l("div",{class:["vehicle-lookup",{forced:o.isForced}],attrs:{id:"vehicle"}},[l("div",{staticClass:"vehicle-select-container"},[o.isVehicleError?l("div",[o.isVehicleLoading?l("FcoSpinner"):l("div",{staticClass:"alert alert-danger mb-0"},[l("div",[o._v(o._s(o.fcoM("rs.homeMain.errorLoadingVehicleSelector","Error loading vehicle selector")))]),o._v(" "),l("a",{attrs:{href:"JavaScript:void(0)"},on:{click:function(e){return o.loadCurrentVehicle()}}}
38,[o._v(o._s(o.fcoM("common.reload","Reload")))])])],1):[!o.currentVehicle||o.addVehicleOnlyMode||o.changeVehicleMode?o._e():[o.currentVehicle.shopVehicleDescriptor?l("p",{staticClass:"d-block d-lg-none"},[l("strong",[o._v(o._s(o.currentVehicle.shopVehicleDescriptor))])]):o._e(),o._v(" "),o.currentVehicle.vin?l("p",[l("strong",[o._v(o._s(o.fcoM("rs.homeMain.vinTitle","VIN:")||" "))]),o._v(" "),l("span",{staticClass:"text-uppercase"},[o._v(" "+o._s(o.currentVehicle.vin))])]):o._e(),o._v(" "),l("div",[o.currentVehicle.answeredAttributes.length||o.editMode?l("div",{staticClass:"mb-1"},[l("strong",{staticClass:"text-break"},[o._v(o._s(o.fcoM("common.vehicleAttributes","Vehicle Attributes")||" "))])]):o._e(),o._v(" "),o.editMode?l("div",{staticClass:"mb-2"},[l("div",{staticClass:"position-relative mt-2"},[l("span",{staticClass:"bg-white custom-legend"},[o._v(o._s(o.fcoM("attributes.engine","Engine")))]),o._v(" "),l("fco-search-select",{ref:"editEngineSelect",staticClass:"ymm-input d-none d-sm-block",attrs:{value:null===(s=o.editEngineSelection)||void 0===s?void 0:s.id,"allow-empty":!1,placeholder:(null===(a=o.tempEngineSelected)||void 0===a?void 0:a.value)||`${o.fcoM("rs.homeMain.selectEngine","Select Engine")} (${o.fcoM("common.optional","Optional")})`,grid:!0,"grid-rows":14,options:o.engines,mapOption:function(e){return{label:e.value,value:e.id}},"menu-class":["ymm-results"],"data-qa":"ymm-edit-engine-select"},on:{focus:function(e){return o.handleFocus("engine")},blur:function(e){return o.handleBlur("engine")},select:o.handleEngineSelect}}),o._v(" "),l("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-edit-engine-select"},on:{change:function(e){o.handleEngineSelect(JSON.parse(e.target.value))}}},[l("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[o._v(o._s(o.fcoM("rs.homeMain.selectEngine","Select Engine")))]),o._v(" "),o._l(o.engines,(function(e){var t;return l("option",{key:e.id,domProps:{value:JSON.stringify(e),selected:(null===(t=o.editEngineSelection)||void 0===t?void 0:t.id)===e.id}},[o._v("\n                                        "+o._s(e.value)+"\n                                    ")])}))],2)],1),o._v(" "),l("div",{staticClass:"position-relative mt-2"},[l("span",{staticClass:"bg-white custom-legend"},[o._v(o._s(o.fcoM("attributes.submodel","Submodel")))]),o._v(" "),l("fco-search-select",{ref:"editSubmodelSelect",staticClass:"ymm-input d-none d-sm-block",attrs:{value:null===(r=o.editSubmodelSelection)||void 0===r?void 0:r.id,"allow-empty":!1,placeholder:(null===(i=o.tempSubmodelSelected)||void 0===i?void 0:i.value)||`${o.fcoM("rs.homeMain.selectSubmodel","Select Submodel")} (${o.fcoM("common.optional","Optional")})`,grid:!0,"grid-rows":14,options:o.submodels,mapOption:function(e){return{label:e.value,value:e.id}},"menu-class":["ymm-results"],"data-qa":"ymm-edit-submodel-select"},on:{focus:function(e){return o.handleFocus("submodel")},blur:function(e){return o.handleBlur("submodel")},select:o.handleSubmodelSelect}}),o._v(" "),l("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-edit-submodel-select"},on:{change:function(e){o.handleSubmodelSelect(JSON.parse(e.target.value))}}},[l("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[o._v(o._s(o.fcoM("rs.homeMain.selectSubmodel","Select Submodel")))]),o._v(" "),o._l(o.submodels,(function(e){var t;return l("option",{key:e.id,domProps:{value:JSON.stringify(e),selected:(null===(t=o.editSubmodelSelection)||void 0===t?void 0:t.id)===e.id}},[o._v("\n                                        "+o._s(e.value)+"\n                                    ")])}))],2)],1)]):o._e(),o._v(" "),l("ul",{attrs:{"data-qa":"vehicle-attributes-list"}},[o.editMode?o._l(o.vehicleSelectedAttributes,(function(e){return l("VehicleAttribute",{key:`edit=${e.attributeId}`,staticClass:"ml-0 mb-1 text-break",class:{"strike-through":o.attributeRemovalQueue.includes(e.attributeId)},attrs:{attribute:e,tag:"li"},on:{remove:function(t){return o.toggleAttributeInRemovalQueue(e.attributeId)}}})})):o._l(o.currentVehicle.answeredAttributes,(function(e){return l("li",{key:`nonEdit-${e.attributeId}`,staticClass:"ml-0 mb-1 text-break"},[o._v("\n                                    "+o._s(`${e.attributeDescription}: ${e.displayDescription}`)+"\n                                ")])}))],2),o._v(" "),o.editMode?l("div",[l("button",{staticClass:"button",on:{click:o.updateVehicleAttributes}},[o._v(o._s(o.fcoM("rs.homeMain.updateVehicle","Update Vehicle")))]),o._v(" "),l("button",{staticClass:"btn-link font-weight-bold",on:{click:o.disableVehicleEditMode}},[o._v(o._s(o.fcoM("common.cancel","Cancel")))])]):o._e()]),o._v(" "),o.editMode?o._e():l("div",{staticClass:"mb-2"},[l("a",{staticClass:"font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),o.enabledVehicleEditMode.apply(null,arguments)}}},[o.currentVehicle.answeredAttributes.length?[l("Icon",{attrs:{name:"pencil"}}),o._v(" "+o._s(o.fcoM("rs.homeMain.editVehicleAttributes","Edit Vehicle Attributes"))+"\n                            ")]:[l("Icon",{attrs:{name:"plus"}}),o._v(" "+o._s(o.fcoM("rs.homeMain.addVehicleAttributes","Add Vehicle Attributes"))+" ")]],2)]),o._v(" "),o.motorData?l("FcoLink",{staticClass:"qaa-vehicle-data-s
38pecs",attrs:{to:"/vehicle-documents",href:o.fcoUrl("/vehicleDocument/viewer.html"),"data-qa":"vehicle-data-link"}},[l("div",{on:{click:function(){return o.trackVehicleSpecsClick(o.VehicleSpecsFrom.VEHICLE_SELECTOR)}}},[l("Icon",{staticClass:"icon-up-3 mr-1 text-sm",attrs:{name:"file-text"}}),l("strong",[o._v(o._s(o.fcoM("rs.homeMain.vehicleDocs","Vehicle Data/Specs.")||" "))])],1)]):o._e(),o._v(" "),o.shopCustomer?l("a",{staticClass:"d-block font-weight-bold mt-1 qaa-vehicle-edit-customer",attrs:{href:"#",id:"vsAddCustomer","data-qa":"vs-edit-customer-link"},on:{click:function(e){return e.preventDefault(),o.toggleVehicleInfoModal.apply(null,arguments)}}},[l("Icon",{staticClass:"icon-small icon-up-2",attrs:{name:"user"}}),l("span",{staticClass:"ml-1"},[o._v(o._s(o.fcoM("rs.managecustomers.editCustomer","Edit Customer Info")||" "))])],1):l("a",{staticClass:"d-block font-weight-bold mt-1 qaa-vehicle-add-customer",attrs:{href:"#",id:"vsAddCustomer","data-qa":"vs-add-customer-link"},on:{click:function(e){return e.preventDefault(),o.toggleVehicleInfoModal.apply(null,arguments)}}},[l("Icon",{staticClass:"icon-small icon-up-2",attrs:{name:"user-plus"}}),l("span",{staticClass:"ml-1"},[o._v(o._s(o.fcoM("rs.managecustomers.addCustomer","Add Customer")||" "))])],1),o._v(" "),o.shopCustomer?l("div",{staticClass:"mt-3"},[l("h4",[o._v(o._s(o.fcoM("common.customer","Customer")||" "))]),o._v(" "),l("FcoLink",{attrs:{to:`/customers/details/${o.shopCustomer.id}`,href:o.fcoUrl(`/customers/#/details/${o.shopCustomer.id}`),"data-qa":"vs-view-customer-link"}},[l("span",[o._v(o._s(o.shopCustomer.firstName)+" "+o._s(o.shopCustomer.lastName))])])],1):o._e(),o._v(" "),o.$store.getters.isMitchell1User?o._e():l("div",{staticClass:"d-flex justify-content-center flex-wrap mt-3"},[l("button",{staticClass:"secondary qaa-vehicle-change mx-1 mb-1",attrs:{"data-qa":"vs-change-customer-button"},on:{click:o.changeVehicle}},[l("Icon",{staticClass:"d-none d-sm-inline text-sm icon-up-2",attrs:{name:"car"}}),o._v("\n                            "+o._s(o.fcoM("rs.homeMain.changeVehicle","Change Vehicle")||" ")+"\n                        ")],1),o._v(" "),l("button",{staticClass:"button secondary qaa-vehicle-clear mx-1 mb-1",attrs:{"data-qa":"vs-remove-vehicle-button"},on:{click:o.removeSelectedVehicle}},[l("Icon",{staticClass:"d-none d-sm-inline text-sm icon-up-2",attrs:{name:"trash"}}),o._v(o._s(o.fcoM("rs.getparts.clearSelectedVehicle","Clear Vehicle")||" ")+"\n                        ")],1)])],o._v(" "),l("div",{directives:[{name:"show",rawName:"v-show",value:!o.currentVehicle||o.addVehicleOnlyMode||o.changeVehicleMode,expression:"!currentVehicle || addVehicleOnlyMode || changeVehicleMode"}]},[o.changeVehicleMode?l("a",{staticClass:"d-inline-block mb-1",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),o.cancelVehicleChange.apply(null,arguments)}}},[l("Icon",{attrs:{name:"chevron-left"}}),l("span",{staticClass:"ml-1"},[o._v(o._s(o.fcoM("rs.getparts.cancelVehicleChange","Cancel Vehicle Change")))])],1):o._e(),o._v(" "),l("PlateToVin",o._b({staticClass:"plate-to-vin",on:{"vehicle-selected":o.handleVehicleSelected}},"PlateToVin",o.$props,!1)),o._v(" "),l("div",{staticClass:"vs-section-divider"},[o._v(o._s(o.fcoM("rs.homeMain.or","or")||" "))]),o._v(" "),l("YearMakeModel",o._b({key:o.ymmRefreshKey,ref:"ymm",on:{"vehicle-selected":o.handleVehicleSelected}},"YearMakeModel",o.$props,!1)),o._v(" "),l("div",{staticClass:"vs-section-divider"},[o._v(o._s(o.fcoM("rs.homeMain.or","or")||" "))]),o._v(" "),l("VinLookup",o._b({staticClass:"vin-lookup",on:{"vehicle-selected":o.handleVehicleSelected}},"VinLookup",o.$props,!1))],1)]],2),o._v(" "),o.isForced?l("div",{staticClass:"d-md-flex alert-danger p-3"},[l("span",{staticClass:"text-md flex-grow-1 d-inline-flex align-items-center"},[o._v(o._s(o.fcoM("rs.homeMain.selectCar","Please select a vehicle to continue.")))]),o._v(" "),l("button",{staticClass:"btn-danger mb-0",on:{click:function(e){return e.preventDefault(),o.cancelForceCar.apply(null,arguments)}}},[o._v(o._s(o.fcoM("common.cancel","Cancel")))])]):o._e()])],1)};a._withStripped=!0;var r=s(1),i=s.n(r),o=s(8),n=s(3),l=s(23),c=s(95),u=s(33),d=s(53),h=s(72),p=function(){var e,t,s=this,a=s.$createElement,r=s._self._c||a;return r("div",[s.alertMessage?r("div",{staticClass:"alert alert-warning px-3 py-1"},[s._v(s._s(s.alertMessage))]):s._e(),s._v(" "),r("form",{attrs:{id:"searchPTV"},on:{submit:function(e){return e.preventDefault(),s.handlePTVSubmit.apply(null,arguments)}}},[r("label",{attrs:{for:"plate"}},[s._v(s._s(s.fcoM("rs.homeMain.lookupbystate","Lookup By License Plate")||" "))]),s._v(" "),r("div",{staticClass:"d-flex"},[null!==(e=s.vsData)&&void 0!==e&&null!==(t=e.states)&&void 0!==t&&t.length&&s.defaultStateValue?r("FcoSearchSelect",{ref:"stateSelect",staticClass:"vs-state-select",attrs:{value:s.plateState,"allow-empty":!1,options:s.vsData.states,placeholder:s.tempState,"data-qa":"ptv-state-select","menu-container":s.$refs.stateSelect},on:{focus:s.handleStateFocus,blur:s.handleBlur,select:s.handleStateSelect}}):r("div",{staticClass:"vs-state-select"},[r("VueSkeletonLoader",{staticClass:"custom-select",attrs:{type:"rect",radius:3,rounded:!0,width:"100%",height:"100%"}})],1),s._v(" "),r("div",{staticClass:"input-group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:s.licensePlate,expression:"licensePlate"}],class:{error:s.showPtvValidationError},attrs:{type:"text",id:"plate","data-qa":"ptv-plate-input",placeholder:s.fcoM("common.vehicleLicensePlate","License Plate #")},domProps:{value:s.licensePlate},on:{input:function(e){e.target.composing||(s.licensePlate=e.target.value)}}}),s._v(" "),r("button",{staticClass:"gtm-license-number button input-group-append px-2 px-xl-3 py-1 mb-0",attrs:{"data-qa":"ptv-submit-button"}},[r("span",{staticClass:"d-sm-none d-lg-inline"},[s._v(s._s(s.fcoM("common.go","Go")||" "))]),s._v(" "),r("Icon",{staticClass:"gtm-license-number-svg",attrs:{name:"chevron-right"}})],1)])],1),s._v(" "),s.showPtvValidationError?r("span",{staticClass:"error"},[s._v("\n            "+s._s(s.showPtvValidationErrorMessage)+"\n        ")]):s._e()]),s._v(" "),r("div",[s.showNewQuotePrompt?r("QuoteSelectionModal",{on:{close:function(e){s.showNewQuotePrompt=!1},"start-new-quote":function(e){return s.handleQuotePromptAnswer(!1)},"use-existing-quote":function(e){return s.handleQuotePromptAnswer(!0)}}}):s._e()],1),s._v(" "),r("div",[r("FcoModal",{directives:[{name:"show",rawName:"v-show",value:s.showModal,expression:"showModal"}],attrs:{titleText:s.fcoM("rs.homeMain.pleaseSelectVehicle","Please select your vehicle"),closeMsg:s.fcoM("common.close","Close")},on:{close:function(e){s.showModal=!1}},scopedSlots:s._u([{key:"body",fn:function(){return[s.showModalLoading?r("div",{staticClass:"text-center"},[r("Icon",{staticClass:"m-3",attrs:{color:"green",name:"refresh",size:"large"}})],1):r("div",[r("span",[s._v(s._s(s.mainMessage))]),s._v(" "),s.vehicles.length?r("ul",[s._l(s.cleanVehicleList,(function(e){return r("li",{key:e.vin,staticClass:"my-1",attrs:{"data-qa":"ptv-modal-results-list"}},[r("a",{attrs:{href:"javascript:void(0)","data-qa":"ptv-modal-vehicle-link"},on:{click:function(t){return s.handleVehicleClick(e)}}},[s._v(s._s(e.yearMakeModel))])])})),s._v(" "),r("li",[r("a",{attrs:{href:"javascript:void(0)","data-qa":"ptv-modal-no-match-link"},on:{click:s.forceNewRequest}},[s._v(s._s(s.fcoM("rs.homeMain.noneAreVehicle","None of these are my vehicle")))])])],2):s._e(),s._v(" "),s.showDataWarning?r("div",{staticClass:"alert alert-caution d-flex"},[r("div",{staticClass:"text-xl"},[r("Icon",{staticClass:"pr-2",attrs:{name:"exclamation-triangle"}})],1),s._v(" "),r("div",[s._v(s._s(s.fcoM("rs.homeMain.marylandDataWarning","License plate information updates for Maryland are temporarily limited; vehicle information should be carefully verified.")))])]):s._e()])]},proxy:!0},{key:"footer",fn:function(){return[r("button",{staticClass:"button secondary",attrs:{type:"button","data-qa":"close-modal-button"},on:{click:function(e){s.showModal=!1}}},[s._v("\n                    "+s._s(s.fcoM("common.close","Close"))+"\n                ")])]},proxy:!0}])})],1)])};p._withStripped=!0;var m=s(0),g=s(29),v=s(28),f=s(10),S=s(24),b=s(14);const y=/^[a-zA-Z0-9]+[a-zA-Z/#'",.\-! 0-9]*[a-zA-Z0-9]+$/g;var I={name:"PlateToVin",mixins:[S.a],data:()=>({licensePlate:"",plateState:"",ptvForce:!1,showError:!1,showPtvValidationError:!1,showPtvValidationErrorMessage:"",vehicles:[],showModal:!1,showModalLoading:!1,alertMessage:"",tempState:"",showNewQuotePrompt:!1,tempVehicle:null}),components:{FcoModal:l.a,Icon:f.a,FcoSearchSelect:u.a,QuoteSelectionModal:v.a,VueSkeletonLoader:g.a},computed:{...Object(n.e)({requests:e=>{let{requests:t}=e;return t},currentShopState:e=>{let{currentShop:t}=e;return null==t?void 0:t.state}}),...Object(n.c)(["isFeatureDisabled"]),cleanVehicleList(){return this.vehicles.map((e=>({plate:e.plate,vin:e.vin,state:e.state,vid:e.vinQuerySet.map((e=>e.vehicle.vehicleId)).toString(),yearMakeModel:e.vinQuerySet.map((e=>`${e.vehicle.year} ${e.vehicle.make} ${e.vehicle.model}`)).toString()})))},mainMessage(){let e="";return e=this.vehicles.length<1?this.fcoM("rs.homeMain.noVehicleFound","No vehicle found."):1===this.vehicles.length?this.fcoM("rs.homeMain.correctVehicleQuestion","Is this the correct vehicle?"):this.fcoM("rs.homeMain.pleaseSelect","Please select the correct vehicle"),e},defaultStateValue(){return Object(m.f)(m.c.PTV_LAST_STATE)||this.currentShopState},showDataWarning(){const e=!this.isFeatureDisabled("ptv_data_warning_maryland");return"MD"===this.plateState&&e}},methods:{async handlePTVSubmit(){this.showPtvValidationError=!1,y.lastIndex=0;const e=y.test(this.licensePlate.trim());if(this.licensePlate.trim().length)if(e){this.analytics({event:this.GTM.Action.VEHICLE_SELECTOR,data:{eventAction:"License Plate Search"}}),this.ptvForce=!1,this.alertMessage="",this.showModalLoading=!0,this.showModal=!0;try{const e=this.fcoUrl(`/plateToVin/decodePlate?state=${this.plateState}&plate=${this.licensePlate}`),{data:{force:t,serviceDown:s,vehicles:a}}=await i.a.get(e);s?this.handleServiceDown():(this.vehicles=a,this.ptvForce=t,this.showModalLoading=!1,this.vehicles.length>0&&this.analytics({event:this.GTM.Action.VEHICLE_SELECTOR,data:{eventAction:"License Plate Found"}}))}catch(e){this.alertMessage=this.fcoM("rs.homeMain.ptvError","Error searching, please try again")}}else this.showPtvValidationError=!0,this.showPtvValidationErrorMessage=this.fcoM("validation.invalidInput","Invalid input - 
38Special characters not allowed.");else this.showPtvValidationError=!0,this.showPtvValidationErrorMessage=this.fcoM("validation.required","This field is required.")},handleQuotePromptAnswer(e){this.userWantsExistingQuote=e,this.showNewQuotePrompt=!1,this.handleVehicleClick(this.tempVehicle,!0)},handleVehicleClick(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.productsInCurrentQuote&&this.promptAboutQuote&&!t)return this.showNewQuotePrompt=!0,void(this.tempVehicle=e);this.selectVehicle(e)},async selectVehicle(e){let{state:t,plate:s,vin:a,vid:r}=e;this.showModalLoading=!0;try{let e;this.preventNavigationOnVehicleUpdate&&(this.showModalLoading=!1,this.showModal=!1),this.isEntSearchEnabled?e=await this.selectVehicleFromVIN({vin:a,plate:s,state:t},this.keepExistingQuoteFinal):({data:{vehicle:e}}=await i.a.post(this.fcoUrl(`/vehicle/select/selectFromPTV?quote=${this.keepExistingQuoteFinal}`),{vehicleId:r,plate:s,vin:a,state:t})),this.isSPA&&(this.showModal=!1),this.handleVehicleSelectSuccess({vehicle:e,method:b.k.BY_PLATE}),this.licensePlate=""}catch(e){this.$fcoToast.error(this.fcoM("rs.managecustomerdetails.errorSavingVehicle","Error updating the vehicle, please try again later")),this.showModal=!0,this.showModalLoading=!1}},async forceNewRequest(){this.showModalLoading=!0;let e=this.fcoUrl(`/plateToVin/decodePlate?state=${this.plateState}&plate=${this.licensePlate}&force=true`);this.ptvForce&&(e+="&wasForced=true");try{const{data:{vehicles:t,force:s,serviceDown:a}}=await i.a.get(e);a?this.handleServiceDown():(this.vehicles=t,this.ptvForce=s,this.showModalLoading=!1)}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.ptvError","Error searching, please try again"))}},handleStateSelect(e){this.plateState=e.value,Object(m.o)(m.c.PTV_LAST_STATE,this.plateState),this.analytics({event:this.GTM.Action.VEHICLE_SELECTOR,data:{eventAction:"PTV State Select"}})},handleServiceDown(){this.alertMessage=this.fcoM("rs.homeMain.ptvError.noService","Plate To Vin Service temporarily unavailable. Please enter a VIN or Year, Make, and Model to continue."),this.showModal=!1},handleStateFocus(){this.tempState=this.plateState,this.plateState=""},handleBlur(){""===this.plateState&&(this.plateState=this.tempState),this.tempState=""}}
38,async mounted(){await this.$store.dispatch("requestIfIdle",["vehicleSelector/getVehicleSelectorData"]),this.defaultStateValue||await this.$store.dispatch("requestIfIdle",["getCurrentShop"]),this.handleStateSelect({value:this.defaultStateValue}),this.$watch("currentShopState",(e=>{e&&Object(m.o)(m.c.PTV_LAST_STATE,e)}))}},_=(s(241),s(4)),w=Object(_.a)(I,p,[],!1,null,"4634ec26",null).exports,E=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("form",{attrs:{id:"vinNumber"},on:{submit:function(t){return t.preventDefault(),e.handleVinSubmit.apply(null,arguments)}}},[s("label",{attrs:{for:"vin"}},[e._v(e._s(e.fcoM("rs.homeMain.enterVin","Enter Vin Number")||" "))]),e._v(" "),s("div",{staticClass:"input-group"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.inputValue,expression:"inputValue"}],class:{error:e.validationError},attrs:{type:"text",id:"vin",minlength:"5",maxlength:"17","data-qa":"vin-input",placeholder:e.fcoM("rs.homeMain.enterVinPlaceholder","i.e.19UYA31581L000000")},domProps:{value:e.inputValue},on:{input:[function(t){t.target.composing||(e.inputValue=t.target.value)},e.filterInput]}}),e._v(" "),s("button",{staticClass:"gtm-vin-search input-group-append button px-2 px-xl-3 py-1 mb-0",attrs:{"data-qa":"vin-submit-button"}},[s("span",{staticClass:"d-sm-none d-lg-inline"},[e._v(e._s(e.fcoM("common.go","Go")||" "))]),e._v(" "),s("Icon",{attrs:{name:"chevron-right"}})],1)]),e._v(" "),e.validationError?s("span",{staticClass:"error"},[e._v(e._s(e.validationErrorMsg))]):e._e(),e._v(" "),e.showNewQuotePrompt?s("QuoteSelectionModal",{on:{close:function(t){e.showNewQuotePrompt=!1},"start-new-quote":function(t){return e.handleQuotePromptAnswer(!1)},"use-existing-quote":function(t){return e.handleQuotePromptAnswer(!0)}}}):e._e()],1)};E._withStripped=!0;var O={name:"VinLookup",mixins:[S.a],data:()=>({validationError:!1,validationErrorMsg:"",inputValue:"",showNewQuotePrompt:!1}),components:{Icon:f.a,QuoteSelectionModal:v.a},methods:{filterInput(){this.inputValue=this.inputValue.replace(/[^a-z0-9]/gi,"")},handleQuotePromptAnswer(e){this.userWantsExistingQuote=e,this.showNewQuotePrompt=!1,this.selectVehicle(!0)},handleVinSubmit(){if(this.validationError=!1,this.inputValue.length<5){const e=this.inputValue.length?this.fcoM("rs.homeMain.invalidVin","Please enter a valid VIN Number"):this.fcoM("validation.required","This field is required.");return this.validationError=!0,void(this.validationErrorMsg=e)}this.analytics({event:this.GTM.Action.VEHICLE_SELECTOR,data:{eventAction:"VIN Search"}}),this.selectVehicle()},async selectVehicle(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.productsInCurrentQuote&&this.promptAboutQuote&&!e)return void(this.showNewQuotePrompt=!0);const t=this.$fcoLoading(this.fcoM("rs.getparts.selectingVehicleLoading","Selecting vehicle..."));try{const e=await this.selectVehicleFromVIN({vin:this.inputValue},this.keepExistingQuoteFinal);this.handleVehicleSelectSuccess({vehicle:e,method:b.k.BY_VIN}),this.inputValue="",(this.preventNavigationOnVehicleUpdate||this.isSPA)&&t.remove()}catch(e){this.validationError=!0,this.validationErrorMsg=this.fcoM("rs.homeMain.invalidVin","Please enter a valid VIN Number"),t.remove()}this.analytics({event:this.GTM.Action.VEHICLE_SELECTOR,data:{eventAction:"VIN Found"}})}}},C=(s(243),Object(_.a)(O,E,[],!1,null,"574aedff",null).exports),T=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"ymm-input-cursor-wraper",attrs:{id:"ymm"}},[s("div",{staticClass:"d-flex justify-content-between flex-wrap"},[s("label",{attrs:{for:"yearSelect"}},[e._v(e._s(e.fcoM("rs.homeMain.enterYMM","Enter Year, Make, Model")||" "))]),e._v(" "),s("a",{staticClass:"recent-vehicles-link gtm-recent-vehicles-link",attrs:{href:"javascript:void(0)",id:"recentVehicleLink","data-qa":"ymm-recent-vehicles-link"},on:{click:e.showRecentVehicles}},[e._v(e._s(e.fcoM("rs.homeMain.recentVehicles","Recent Vehicles")||" "))])]),e._v(" "),s("div",{staticClass:"position-relative mt-2"},[s("span",{staticClass:"bg-white custom-legend"},[e._v(e._s(e.fcoM("common.year","Year")))]),e._v(" "),s("fco-search-select",{ref:"yearSelect",staticClass:"ymm-input d-none d-sm-block",attrs:{value:e.yearSelected,"allow-empty":!1,placeholder:e.tempYearSelected.toString()||e.fcoM("rs.homeMain.selectYear","Select Year"),grid:!0,"grid-rows":14,options:e.vsData.years,"menu-class":["ymm-results"],mode:"fuzzy",searchKeys:["label"],name:"yearSelect","data-qa":"ymm-year-select"},on:{focus:function(t){return e.handleFocus(e.Input.YEAR)},blur:function(t){return e.handleBlur(e.Input.YEAR)},select:e.handleYearSelect}}),e._v(" "),s("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-year-select"},on:{change:function(t){return e.handleYearSelect({value:t.target.value})}}},[s("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[e._v(e._s(e.fcoM("rs.homeMain.selectYear","Select Year")))]),e._v(" "),e._l(e.vsData.years,(function(t){return s("option",{key:t,domProps:{value:t}},[e._v(e._s(t))])}))],2)],1),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.yearSelected,expression:"yearSelected"}],staticClass:"position-relative mt-2"},[s("span",{staticClass:"bg-white custom-legend"},[e._v(e._s(e.fcoM("rs.pdp.make","Make")))]),e._v(" "),s("fco-search-select",{ref:"makeSelect",class:["ymm-input","d-none",{"d-sm-block":e.yearSelected}],attrs:{value:e.makeSelected.id,"allow-empty":!1,placeholder:e.tempMakeSelected.value||e.fcoM("rs.homeMain.selectMake","Select Make"),grid:!0,"grid-rows":14,options:e.makes,mapOption:function(e){return{label:e.value,value:e.id}},"menu-class":["ymm-results"],"data-qa":"ymm-make-select"},on:{focus:function(t){return e.handleFocus(e.Input.MAKE)},blur:function(t){return e.handleBlur(e.Input.MAKE)},select:e.handleMakeSelect}}),e._v(" "),s("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-make-select"},on:{change:function(t){return e.handleMakeSelect({id:t.target.value})}}},[s("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[e._v(e._s(e.fcoM("rs.homeMain.selectMake","Select Make")))]),e._v(" "),e._l(e.makes,(function(t){return s("option",{key:t.value,domProps:{value:t.id}},[e._v(e._s(t.value))])}))],2)],1),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.makeSelected,expression:"makeSelected"}],staticClass:"position-relative mt-2"},[s("span",{staticClass:"bg-white custom-legend"},[e._v(e._s(e.fcoM("vehicle.model","Model")))]),e._v(" "),s("fco-search-select",{ref:"modelSelect",class:["ymm-input","d-none",{"d-sm-block":e.makeSelected}],attrs:{value:e.modelSelected.id,"allow-empty":!1,placeholder:e.tempModelSelected.value||e.fcoM("rs.homeMain.selectModel","Select Model"),grid:!0,"grid-rows":14,options:e.models,mapOption:function(e){return{label:e.model.value,value:e.model.id}},"menu-class":["ymm-results"],"data-qa":"ymm-model-select"},on:{focus:function(t){return e.handleFocus(e.Input.MODEL)},blur:function(t){return e.handleBlur(e.Input.MODEL)},select:e.handleModelSelect}}),e._v(" "),s("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-model-select"},on:{change:function(t){e.handleModelSelect(JSON.parse(t.target.value))}}},[s("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[e._v(e._s(e.fcoM("rs.homeMain.selectModel","Select Model")))]),e._v(" "),e._l(e.models,(function(t){return s("option",{key:t.model.id,domProps:{value:JSON.stringify(t)}},[e._v(e._s(t.model.value))])}))],2)],1),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.modelSelected,expression:"modelSelected"}],staticClass:"position-relative mt-2"},[s("span",{staticClass:"bg-white custom-legend"},[e._v(e._s(e.fcoM("attributes.engine","Engine")))]),e._v(" "),s("fco-search-select",{ref:"engineSelect",class:["ymm-input","d-none",{"d-sm-block":e.modelSelected}],attrs:{value:e.engineSelected.id,"allow-empty":!1,placeholder:e.tempEngineSelected.value||`${e.fcoM("rs.homeMain.selectEngine","Select Engine")} (${e.fcoM("common.optional","Optional")})`,grid:!0,"grid-rows":14,options:e.engines,mapOption:function(e){return{label:e.value,value:e.id}},"menu-class":["ymm-results"],"data-qa":"ymm-engine-select"},on:{focus:function(t){return e.handleFocus(e.Input.ENGINE)},blur:function(t){return e.handleBlur(e.Input.ENGINE)},select:e.handleEngineSelect}}),e._v(" "),s("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-engine-select"},on:{change:function(t){e.handleEngineSelect(JSON.parse(t.target.value))}}},[s("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[e._v(e._s(e.fcoM("rs.homeMain.selectEngine","Select Engine")))]),e._v(" "),e._l(e.engines,(function(t){return s("option",{key:t.id,domProps:{value:JSON.stringify(t)}},[e._v(e._s(t.value))])}))],2)],1),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.engineSelected,expression:"engineSelected"}],staticClass:"position-relative mt-2"},[s("span",{staticClass:"bg-white custom-legend"},[e._v(e._s(e.fcoM("attributes.submodel","Submodel")))]),e._v(" "),s("fco-search-select",{ref:"submodelSelect",class:["ymm-input","d-none",{"d-sm-block":e.engineSelected}],attrs:{value:e.submodelSelected.id,"allow-empty":!1,placeholder:e.tempSubmodelSelected.value||`${e.fcoM("rs.homeMain.selectSubmodel","Select Submodel")} (${e.fcoM("common.optional","Optional")})`,grid:!0,"grid-rows":14,options:e.submodels,mapOption:function(e){return{label:e.value,value:e.id}},"menu-class":["ymm-results"],"data-qa":"ymm-submodel-select"},on:{focus:function(t){return e.handleFocus(e.Input.SUBMODEL)},blur:function(t){return e.handleBlur(e.Input.SUBMODEL)},select:e.handleSubmodelSelect}}),e._v(" "),s("select",{staticClass:"custom-select d-sm-none",attrs:{"data-qa":"ymm-mobile-submodel-select"},on:{change:function(t){e.handleSubmodelSelect(JSON.parse(t.target.value))}}},[s("option",{attrs:{value:"",disabled:"",selected:"",hidden:""}},[e._v(e._s(e.fcoM("rs.homeMain.selectSubmodel","Select Submodel")))]),e._v(" "),e._l(e.submodels,(function(t){return s("option",{key:t.id,domProps:{value:JSON.stringify(t)}},[e._v(e._s(t.value))])}))],2)],1),e._v(" "),s("button",{directives:[{name:"show",rawName:"v-show",value:e.modelSelected,expression:"modelSelected"}],staticClass:"button mt-3",on:{click:function(t){return t.preventDefault(),e.handleAddVehicleSubmit(!1)}}},[e._v(e._s(e.fcoM("rs.infoBar.addVehicle","Add Vehicle")))]),e._v(" "),e.showNewQuotePrompt?s("QuoteSelectionModal",{on:{close:function(t){e.showNewQuotePrompt=!1},"start-new-quote":function(t){return e.handleQuotePromptAnswer(!1)},"use-existing-quote":function(t){return e.handleQuotePromptAnswer(!0)}}}
38):e._e()],1)};T._withStripped=!0;var P=s(2),A=s(12);const k=["yearSelect","makeSelect","modelSelect","engineSelect","submodelSelect"],R={YEAR:"year",MAKE:"make",MODEL:"model",ENGINE:"engine",SUBMODEL:"submodel"};var M={name:"YearMakeModel",mixins:[S.a,A.a],data:()=>({baseVehicleId:"",yearSelected:"",makeSelected:"",modelSelected:"",engineSelected:"",submodelSelected:"",tempYearSelected:"",tempMakeSelected:"",tempModelSelected:"",tempEngineSelected:"",tempSubmodelSelected:"",makes:[],models:[],engines:[],submodels:[],Input:R,showNewQuotePrompt:!1}),computed:{...Object(n.e)("miniQuote",{worksheetId:e=>e.quoteDetails.worksheetHeaderId}),isYearSelectorOpen(){return this.$store.state.vehicleSelector.isYearSelectorOpen},hasRequestedVSData(){return!this.isVSDataIdle&&!this.isVSDataPending},isYearSelectReadyToOpen(){return this.isYearSelectorOpen&&this.hasRequestedVSData}},components:{FcoSearchSelect:u.a,QuoteSelectionModal:v.a},watch:{async isYearSelectReadyToOpen(e){if(!e)return;await this.$nextTick();const{activeElement:t}=document;k.some((e=>this.$refs[e].$el.contains(t)))||this.$refs.yearSelect.focus()}},methods:{handleFocus(e){this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!0});const t=`temp${e.charAt(0).toUpperCase()+e.slice(1)}Selected`,s=`${e}Selected`;this[t]=this[s],this[s]=""},handleBlur(e){this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!1});const t=`temp${e.charAt(0).toUpperCase()+e.slice(1)}Selected`,s=`${e}Selected`;this[s]||(this[s]=this[t]),this[t]=""},handleQuotePromptAnswer(e){this.userWantsExistingQuote=e,this.showNewQuotePrompt=!1,this.handleAddVehicleSubmit(!0)},async handleYearSelect(e){let{value:t}=e;this.makeSelected="",this.modelSelected="",this.engineSelected="",this.submodelSelected="",this.baseVehicleId="";try{const{data:e}=await i.a.get(this.fcoUrl(`/vehicle/select/v2/makes?year=${t}`));this.yearSelected=t,this.makes=e,await this.$nextTick(),this.$refs.makeSelect.focus()}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}},async handleMakeSelect(e){this.modelSelected="",this.engineSelected="",this.submodelSelected="",this.baseVehicleId="";try{const{data:t}=await i.a.get(this.fcoUrl(`/vehicle/select/v2/models?year=${this.yearSelected}&makeId=${e.id}`));this.makeSelected=e,this.models=t,await this.$nextTick(),this.$refs.modelSelect.focus()}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}},async handleModelSelect(e){let{model:t,baseVehicleId:s}=e;this.engineSelected="",this.submodelSelected="",this.modelSelected=t,this.baseVehicleId=s;try{const{data:e}=await i.a.get(this.fcoUrl(`/vehicle/select/engines?baseVehicleId=${s}`));this.engines=e,1===this.engines.length&&(this.handleEngineSelect(this.engines[0]),this.tempEngineSelected="")}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}},async handleEngineSelect(e){this.submodelSelected="",this.engineSelected=e;try{const{data:t}=await i.a.get(this.fcoUrl(`/vehicle/select/submodels?baseVehicleId=${this.baseVehicleId}&engineId=${e.id}`));this.submodels=t,2===this.submodels.length&&(this.handleSubmodelSelect(this.submodels[0]),this.tempSubmodelSelected="")}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}},handleSubmodelSelect(e){this.submodelSelected=e,this.handleAddVehicleSubmit()},handleAddVehicleSubmit(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.productsInCurrentQuote&&this.promptAboutQuote&&!e?this.showNewQuotePrompt=!0:this.selectVehicle()},async selectVehicle(){const e=this.$fcoLoading(Object(P.v)(this.fcoM("rs.getparts.selectingYMMLoading","Selecting {0} {1} {2}..."),this.yearSelected,this.makeSelected.value,this.modelSelected.value));try{const t={baseVehicleId:this.baseVehicleId,quote:this.keepExistingQuoteFinal};this.engineSelected&&(t.engineId=this.engineSelected.id),this.submodelSelected&&(t.submodelId=this.submodelSelected.id);const s=await this.selectVehicleFromVehicleData(t,this.keepExistingQuoteFinal);this.handleVehicleSelectSuccess({vehicle:s,method:b.k.BY_TYPE}),(this.preventNavigationOnVehicleUpdate||this.isSPA)&&e.remove()}catch(t){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again")),e.remove()}}
38,showRecentVehicles(){k.forEach((e=>this.$refs[e].blur())),this.$store.commit("vehicleSelector/setIsRecentVehiclesModalShown",!0)}},mounted(){this.loadFeatureFlags(),this.$store.dispatch("requestIfIdle",["vehicleSelector/getCurrentVehicle","miniQuote/getQuoteData"])}},L=(s(245),Object(_.a)(M,T,[],!1,null,null,null).exports),D=s(6),N=s(19),V=s(18),U=s(7);const q="REMOVE";var $={name:"VehicleSelector",mixins:[A.a],emits:["vehicle-selected"],props:{promptAboutQuote:{type:Boolean,default:!0},addVehicleOnlyMode:{type:Boolean,default:!1}},directives:{onClickaway:d.a},components:{Icon:f.a,PlateToVin:w,VinLookup:C,YearMakeModel:L,FcoModal:l.a,RecentVehicles:h.a,VehicleAttribute:c.a,FcoSearchSelect:u.a,FcoLink:V.a,VehicleCustomerInfo:()=>Promise.all([s.e(2),s.e(65)]).then(s.bind(null,1926))},data:()=>({VehicleSpecsFrom:b.l,editMode:!1,changeVehicleMode:!1,editEngineSelection:null,editSubmodelSelection:null,tempEngineSelected:null,tempSubmodelSelected:null,attributeRemovalQueue:[],engines:[],submodels:[],ymmRefreshKey:0}),computed:{...Object(n.e)("vehicleSelector",{vehicleRequest:e=>e.requests.getCurrentVehicle,shopRequest:e=>e.requests.getCurrentShop,isRecentVehiclesModalShown:e=>e.isRecentVehiclesModalShown,isForced:e=>!!e.forceUrl,isOpenDefault:e=>{let{isOpenDefault:t}=e;return t},currentVehicle:e=>e.currentVehicle,isVehicleInfoShown:e=>e.isVehicleInfoShown,isEditSelectionOpen:e=>e.isEditSelectionOpen,preventNavigationOnVehicleUpdate:e=>e.preventNavigationOnVehicleUpdate}),...Object(n.e)({motorData:e=>{var t;return null===(t=e.currentShop)||void 0===t?void 0:t.motorData},quoteDetails:e=>e.miniQuote.quoteDetails,isSPA:e=>e.isSPA}),...Object(n.c)("vehicleSelector",["vehicleEngine","vehicleSubmodel"]),currentLocale(){return this.$store.state.i18n.locale},currentQuoteId(){return this.quoteDetails.worksheetHeaderId},isVehicleError(){return Object(D.c)(this.vehicleRequest)},isVehicleLoading(){return Object(D.e)(this.vehicleRequest)},forceCarMsg(){return this.fcoM("rs.homeMain.selectCar","Please select a vehicle to continue.")},shopCustomer(){return this.$store.getters["vehicleSelector/shopCustomer"]},vehicleSelectedAttributes(){return this.currentVehicle.answeredAttributes.filter((e=>e.attributeId!==N.b.ENGINE&&e.attributeId!==N.b.SUBMODEL))},vehicleIsSelected(){var e;return!(null===(e=this.currentVehicle)||void 0===e||!e.vehicleId)}},methods:{...Object(n.b)("vehicleSelector",["getAnsweredAttributesTranslated"]),...Object(n.b)("usageTracking",["startCatalogLookup"]),...Object(n.d)("vehicleSelector",["setAttributes"]),trackVehicleSpecsClick:o.q,handleFocus(e){this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!0});const t=e.charAt(0).toUpperCase()+e.slice(1),s=`edit${t}Selection`;this[`temp${t}Selected`]=this[s],this[s]=null,Object(o.d)({event:o.a.Action.VEHICLE_SELECTOR,data:{eventAction:`YMM Edit ${e} Focus`}})},handleBlur(e){this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!1});const t=e.charAt(0).toUpperCase()+e.slice(1),s=`temp${t}Selected`,a=`edit${t}Selection`;this[a]||(this[a]=this[s])},cancelVehicleChange(){this.changeVehicleMode=!1,this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!1})},cancelForceCar(){this.$store.dispatch("vehicleSelector/forceCar",!1)},async enabledVehicleEditMode(){let e=this.fcoUrl(`/vehicle/select/engines?baseVehicleId=${this.currentVehicle.vehicleId}`);this.vehicleSubmodel&&(e+=`&subModelId=${this.vehicleSubmodel.valueId}`);try{const{data:t}=await i.a.get(e);this.engines=t}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}this.vehicleEngine&&!this.engines.some((e=>e.id===q))&&this.engines.unshift({id:q,value:this.fcoM("rs.homeMain.noEngineSelected","No Engine Selected")}),this.vehicleEngine&&(this.editEngineSelection=this.engines.find((e=>e.id===this.vehicleEngine.valueId)));let t=this.fcoUrl(`/vehicle/select/submodels?baseVehicleId=${this.currentVehicle.vehicleId}`);this.vehicleEngine&&(t+=`&engineId=${this.vehicleEngine.valueId}`);try{const{data:e}=await i.a.get(t);this.submodels=e}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}this.vehicleSubmodel&&(this.editSubmodelSelection=this.submodels.find((e=>e.id===this.vehicleSubmodel.valueId))),this.editMode=!0},disableVehicleEditMode(){this.editMode=!1,this.resetEditVehicleAttributes()},async handleAnsweredAttributesLanguage(){if(!this.currentVehicle)return;const e=this.currentVehicle.answeredAttributes.find((e=>e.valueId===U.AttributeValues.DONT_KNOW_SHOW_ALL&&e.attributeId===N.b.SUBMODEL));try{const{vehicleId:t,id:s}=this.currentVehicle,{currentQuoteId:a}=this;if(t&&a&&(await this.getAnsweredAttributesTranslated({worksheetId:a,worksheetVehicleId:s}),e)){e.attributeDescription=this.fcoM("attributes.submodel","Submodel"),e.displayDescription=this.fcoM("attributes.dontknowshowall","Don't know or show all"),e.valueDescription=this.fcoM("attributes.dontknowshowall","Don't know or show all");const t=[...this.currentVehicle.answeredAttributes,e];this.setAttributes(t)}}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}},async handleEngineSelect(e){if(this.editEngineSelection=e,e.id!==q){let t=this.fcoUrl(`/vehicle/select/submodels?baseVehicleId=${this.currentVehicle.vehicleId}&engineId=${e.id}`);this.vehicleSubmodel&&(t+=`&subModelId=${this.vehicleSubmodel.id}`);try{const{data:e}=await i.a.get(t);this.submodels=e,this.editSubmodelSelection&&this.editSubmodelSelection.id!==U.AttributeValues.DONT_KNOW_SHOW_ALL&&!e.find((e=>
38e.id===this.editSubmodelSelection.id))&&(this.editSubmodelSelection=null),Object(o.d)({event:o.a.Action.VEHICLE_SELECTOR,data:{eventAction:"YMM Edit Engine Select"}})}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}}},async handleSubmodelSelect(e){this.editSubmodelSelection=e;let t=this.fcoUrl(`/vehicle/select/engines?baseVehicleId=${this.currentVehicle.vehicleId}`);e.id!==U.AttributeValues.DONT_KNOW_SHOW_ALL&&(t+=`&subModelId=${e.id}`);try{var s;const{data:e}=await i.a.get(t);this.engines=e,this.editEngineSelection&&(null===(s=this.editEngineSelection)||void 0===s?void 0:s.id)!==q&&!e.find((e=>e.id===this.editEngineSelection.id))&&(this.editEngineSelection=null)}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}Object(o.d)({event:o.a.Action.VEHICLE_SELECTOR,data:{eventAction:"YMM Edit Submodel Select"}})},async updateVehicleAttributes(){var e,t,s,a;const r=(null===(e=this.editEngineSelection)||void 0===e?void 0:e.id)===q;r&&this.attributeRemovalQueue.push(N.b.ENGINE);const i=this.vehicleEngine&&(null===(t=this.editEngineSelection)||void 0===t?void 0:t.id)!==this.vehicleEngine.valueId,o=this.vehicleSubmodel&&(null===(s=this.editSubmodelSelection)||void 0===s?void 0:s.id)!==this.vehicleSubmodel.valueId,n=this.isEntSearchEnabled&&(null===(a=this.editSubmodelSelection)||void 0===a?void 0:a.id)===String(U.AttributeValues.DONT_KNOW_SHOW_ALL);(i&&this.vehicleSubmodel&&!o&&!this.submodels.some((e=>{let{id:t}=e;return t===this.vehicleSubmodel.valueId}))||o&&n)&&this.attributeRemovalQueue.push(N.b.SUBMODEL),this.attributeRemovalQueue.length&&await this.removeAttributes(this.attributeRemovalQueue);const l=!!this.editEngineSelection&&!r,c=!!this.editSubmodelSelection;if(l||c)try{const e={};if(l&&(e.engineId=this.editEngineSelection.id),c&&!n&&(e.submodelId=this.editSubmodelSelection.id),Object.keys(e).length>0&&await this.$store.dispatch("vehicleSelector/selectEngineSubmodel",e),n){const e=this.fcoM("attributes.dontknowshowall","Don't know or show all");this.$store.commit("vehicleSelector/addAttribute",{attributeId:N.b.SUBMODEL,attributeDescription:this.fcoM("attributes.submodel","Submodel"),valueId:String(U.AttributeValues.DONT_KNOW_SHOW_ALL),valueDescription:e,displayDescription:e})}await this.startCatalogLookup(),this.$store.dispatch("activityTracking/setSearchUuid")}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.vsGenericError","Error getting data, please try again"))}finally{this.disableVehicleEditMode()}else this.editMode=!1},loadCurrentVehicle(){this.$store.dispatch("vehicleSelector/getCurrentVehicle")},closeRecentVehiclesModal(){this.$store.commit("vehicleSelector/setIsRecentVehiclesModalShown",!1)},closeVehicleInfoModal(){this.$store.commit("vehicleSelector/setIsVehicleInfoShown",!1)},toggleVehicleInfoModal(){this.$store.commit("vehicleSelector/setIsVehicleInfoShown",!this.isVehicleInfoShown)},async removeAttributes(e){const t=[...e];let s=!1,a=!1;e.forEach((e=>{e===N.b.SUBMODEL&&(s=!0),e===N.b.ENGINE&&(a=!0)})),a&&this.vehicleSubmodel&&s&&(t.splice(t.indexOf(N.b.SUBMODEL),1),t.unshift(N.b.SUBMODEL));try{await this.$store.dispatch("vehicleSelector/removeRetainAttributes",t)}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.errorRemovingAttribute","Error removing the attribute, please try again later"))}},toggleAttributeInRemovalQueue(e){this.attributeRemovalQueue.includes(e)?this.attributeRemovalQueue=this.attributeRemovalQueue.filter((t=>t!==e)):this.attributeRemovalQueue.push(e)},async removeSelectedVehicle(){try{await this.$store.dispatch("clearCurrentVehicleAndQuote"),this.disableVehicleEditMode()}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.errorChangeVehicle","Error changing the vehicle, try again later"))}},async changeVehicle(){this.editMode=!1,this.changeVehicleMode=!0,await this.$nextTick(),this.$store.dispatch("vehicleSelector/setVsProp",{prop:"isYearSelectorOpen",value:!0})},handleVehicleInfoSave(e){let{firstName:t,lastName:s,selectedShopCustomerId:a}=e;a&&t&&s&&(this.$store.commit("vehicleSelector/setShopCustomer",{id:a,firstName:t,lastName:s}),this.$store.commit("vehicleSelector/setCurrentVehicle",{...this.currentVehicle,shopCustomerFirst:t,shopCustomerLast:s,shopCustomerId:a})),this.closeVehicleInfoModal()},resetEditVehicleAttributes(){this.engines=[],this.submodels=[],this.editEngineSelection=null,this.editSubmodelSelection=null,this.tempSubmodelSelected=null,this.tempEngineSelected=null,this.attributeRemovalQueue=[]},handleVehicleSelected(e){this.changeVehicleMode=!1,this.$emit("vehicle-selected",e)},handleRecentVehicleSelected(e){this.closeRecentVehiclesModal(),this.handleVehicleSelected(e)}},watch:{isForced(e){e&&Object(o.d)({event:o.a.Action.VEHICLE_SELECTOR,data:{eventAction:"Force Selection"}})},currentLocale(){this.handleAnsweredAttributesLanguage()},async isEditSelectionOpen(e){e&&this.vehicleIsSelected?(this.changeVehicleMode=!1,await this.enabledVehicleEditMode(),this.vehicleEngine?this.vehicleSubmodel||this.$refs.editSubmodelSelect.focus():this.$refs.editEngineSelect.focus(),this.$store.commit("vehicleSelector/setVsProp",{prop:"isEditSelectionOpen",value:!1})):this.$store.commit("vehicleSelector/setVsProp",{prop:"isEditSelectionOpen",value:!1})},currentVehicle(e,t){(null==e?void 0:e.id)!==(null==t?void 0:t.id)&&(this.ymmRefreshKey+=1,this.resetEditVehicleAttributes()),this.isForced&&null!==e&&this.$store.dispatch("vehicleSelector/forceCar",!1)}},async created(){this.loadFeatureFlags(),this.$store.dispatch("requestIfIdle",["getCurrentShop","vehicleSelector/getCurrentVehicle"])}},j=(s(247),Object(_.a)($,a,[],!1,null,"f1a7ecde",null));t.a=j.exports},71:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.loading?s("div",{staticClass:"d-flex justify-content-center align-items-center min-vh-100"}
38,[s("fco-spinner")],1):e._e(),e._v(" "),s("div",{staticClass:"d-flex justify-content-center align-items-center min-vh-100"},[e.hasAuthError?s("div",{staticClass:"errorMessage d-flex flex-column justify-content-center align-items-center text-center"},[s("p",{staticClass:"mb-3"},[e._v(e._s(e.fcoM("rs.authentication.failed","Authentication failed. Please try again.")))]),e._v(" "),s("button",{on:{click:e.punchout}},[e._v("\n                "+e._s(e.fcoM("common.tryAgain","Try again"))+"\n            ")])]):e._e()])])};a._withStripped=!0;var r=s(1),i=s.n(r),o=s(34),n=s(3),l=s(24),c=s(8),u=s(14),d=s(42),h=s(12),p=s(58),m=s(0),g=s(46),v={name:"Punchout",mixins:[l.a,h.a,d.a,p.a],data:()=>({loading:!0,hasAuthError:!1}),computed:{...Object(n.e)("vehicleSelector",["currentVehicle"]),...Object(n.c)(["isAuthExpired","isAuthorizedUser","userDefaultLandingPage"]),queryParams(){const{otlLoginKey:e,vin:t,vehicleId:s,engineId:a,submodelId:r,year:i,make:o,model:n,callbackUrl:l,transactionId:c,buyerCookie:u,partTypeIds:d}=this.isSPA?this.$route.query:Object.fromEntries(new URLSearchParams(window.location.search));return{otlLoginKey:e,vin:t,vehicleId:s,engineId:a,submodelId:r,year:i,make:o,model:n,callbackUrl:l,transactionId:c,buyerCookie:u,partTypeIds:d}}},methods:{async punchout(){this.loading=!0,this.hasAuthError="",(!this.isSPA&&!this.isAuthorizedUser||this.isAuthExpired)&&await this.authenticate();const{user:e}=this.$store.state;Object(c.n)({loginSuccessful:!this.hasAuthErrore,userEmail:(null==e?void 0:e.loginName)||null,userId:(null==e?void 0:e.userId)||null,isSSO:!0}
38),this.hasAuthError||(await this.loadFeatureFlags(),this.saveCallBackUrl(),this.saveTransactionId(),this.saveBuyerCookie(),await this.selectVehicle(),await this.selectPartTypes(),this.isSPA?this.$router.replace({path:this.$route.path,query:{}}):window.history.replaceState(null,"",window.location.pathname),await this.$store.dispatch("refetchUserCriticalData"),this.$store.commit("setIsPunchoutComplete",!0)),this.loading=!1},async authenticate(){try{if(!this.isSPA){if(await this.$store.dispatch("requestIfIdle",["getUser"]),!this.isAuthorizedUser)throw new Error("User not autheneticated: invalid legacy session");return}const{otlLoginKey:e}=this.queryParams;if(!e)throw new Error("Missing one time login key");const t=await i.a.post(this.fcoUrl(`/auth/rest/oneTimeLogin?key=${e}`));Object(m.q)(),this.$store.commit("setAuthTokens",t.data),this.$store.dispatch("startRefreshTimer")}catch(e){this.hasAuthError=!0}},async selectVehicle(){const{vin:e,vehicleId:t,engineId:s,submodelId:a,year:r,make:o,model:n}=this.queryParams;if(e||t||r&&o&&n)try{var l;let h,p=u.k.BY_TYPE;if(!this.isEntSearchEnabled){var c;if(await this.$store.dispatch("requestIfIdle",["vehicleSelector/getCurrentVehicle","miniQuote/getQuoteData"]),null===(c=this.currentVehicle)||void 0===c||!c.id)throw new Error("Vehicle selection failed");return void this.$_analyticsMixin_trackVehicleAdded(p)}if(e)h=await this.selectVehicleFromVIN({vin:e}),p=u.k.BY_VIN;else if(t)h=await this.selectVehicleFromVehicleData({baseVehicleId:t,engineId:s,submodelId:a});else{var d;const{data:e}=await i.a.get(this.fcoUrl(`/vehicle/select/v2/models?year=${r}&makeId=${o}`)),t=null==e||null===(d=e.find((e=>{let{model:{id:t}}=e;return t===n})))||void 0===d?void 0:d.baseVehicleId;h=await this.selectVehicleFromVehicleData({baseVehicleId:t,engineId:s})}if(!h)throw new Error("Vehicle selection failed");null!==(l=h)&&void 0!==l&&l.id&&(this.$store.commit("vehicleSelector/setCurrentVehicle",h),this.$_analyticsMixin_trackVehicleAdded(p))}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.errorLoadingVehicle","There was an error loading the vehicle, please try again later"))}},async selectPartTypes(){const e=this.queryParams.partTypeIds?this.queryParams.partTypeIds.split(","):null;if(!e||0===e.length)return;let t=!1;try{const{data:s}=await i.a.post(this.fcoUrl("/parttype/node/v2/resolved"),{vehicle:this.currentVehicle,selectedPartTypes:e.map((e=>({partTypeId:e,parentPartTypeId:e,platformId:"05"})))});this.$store.dispatch("partSelection/savePartLookup",{partTypes:s.results,resolvedPartTypes:Object(g.a)(s.results),fullResolvedDetails:s.results,vehicle:this.vehicle,origin:origin||null}),s.errorMessages&&(this.$fcoToast.error(this.fcoM("rs.partSelection.errorLoad","An error occurred while loading your parts. Please try again.")),t=!0),await Object(o.a)(s.results)}catch(e){t||this.$fcoToast.error(this.fcoM("rs.partSelection.errorLoad","An error occurred while loading your parts. Please try again."))}},async saveCallBackUrl(){const{callbackUrl:e}=this.queryParams;e&&this.$store.commit("setCxmlCallbackUrl",e)},async saveTransactionId(){const{transactionId:e}=this.queryParams;e&&this.$store.commit("setTransactionId",e)},async saveBuyerCookie(){const{buyerCookie:e}=this.queryParams;e&&this.$store.commit("setBuyerCookie",e)}},async mounted(){this.$store.commit("vehicleSelector/setVsProp",{prop:"preventNavigationOnVehicleUpdate",value:!0}),await this.$store.dispatch("requestIfIdle",["getAppData"]),this.punchout()}},f=(s(261),s(4)),S=Object(f.a)(v,a,[],!1,null,"83a148ca",null);t.a=S.exports},72:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"overflow-auto"},[e.isLoading?s("div",{staticClass:"d-flex justify-content-center mt-3"},[s("FcoSpinner")],1):s("div",[s("FcoTable",{attrs:{tableClass:{selectable:e.hasVehicles},tbodyClass:{"font-italic":!e.hasVehicles},data:e.recentVehicles,perPage:e.recentVehicles.length+1,noResultsText:e.fcoM("rs.homeMain.noVehicles","You have no recent vehicles.")}
38,on:{"click-row":function(t){return e.handleVehicleClick(t.id)}}},[e.$fcoMq.isSmUp?s("FcoTableColumn",{attrs:{label:e.fcoM("common.date","Date"),sortable:!1},scopedSlots:e._u([{key:"td",fn:function(t){return[""!==e.formatDate(t.createDateTime)?s("span",[e._v(e._s(e.formatDate(t.createDateTime)))]):s("span",[e._v(e._s(e.fcoM("common.na","N/A")))])]}}],null,!1,744812409)}):e._e(),e._v(" "),e.$fcoMq.isMdUp?s("FcoTableColumn",{staticClass:"text-nowrap",attrs:{label:e.fcoM("common.vin","VIN")},scopedSlots:e._u([{key:"td",fn:function(t){return[t.vin?s("span",{staticClass:"text-uppercase"},[e._v(e._s(t.vin))]):s("span",[e._v(e._s(e.fcoM("common.na","N/A")))]),e._v(" "),t.sourceVinScanner?[s("Icon",{staticClass:"ml-1 text-lg",attrs:{name:"mobile"}}),e._v(" "),t.vehicleNotes&&""!==t.vehicleNotes?s("span",{directives:[{name:"fco-tooltip",rawName:"v-fco-tooltip",value:{content:t.vehicleNotes,container:e.$el},expression:"{ content: recentVehicle.vehicleNotes, container: $el }"}]},[s("Icon",{staticClass:"ml-1 clickable text-lg",attrs:{name:"pencil-square-o"}})],1):e._e()]:e._e()]}}],null,!1,854423622)}):e._e(),e._v(" "),e.$fcoMq.isMdUp?s("FcoTableColumn",{attrs:{label:e.fcoM("common.vehicleLicensePlate","License Plate #")},scopedSlots:e._u([{key:"td",fn:function(t){return[""!==e.licensePlate(t)?s("span",[e._v(e._s(e.licensePlate(t)))]):s("span",[e._v(e._s(e.fcoM("common.na","N/A")))])]}}],null,!1,659503737)}):e._e(),e._v(" "),e.$fcoMq.isMdUp?s("FcoTableColumn",{attrs:{label:e.fcoM("common.state","State")},scopedSlots:e._u([{key:"td",fn:function(t){return[""!==e.plateState(t)?s("span",[e._v(e._s(e.plateState(t)))]):s("span",[e._v(e._s(e.fcoM("common.na","N/A")))])]}}],null,!1,2588784121)}):e._e(),e._v(" "),s("FcoTableColumn",{staticClass:"text-nowrap",attrs:{label:e.fcoM("common.vehicle","Vehicle")},scopedSlots:e._u([{key:"td",fn:function(t){return[e._v("\n                    "+e._s(e.vehicle(t))+"\n                ")]}}])}),e._v(" "),s("FcoTableColumn",{attrs:{tdClass:"delete-vehicle center"},scopedSlots:e._u([{key:"td",fn:function(t){return[s("div",{on:{click:function(s){return s.stopPropagation(),e.deleteVehicle(t.id)}}},[s("Icon",{staticClass:"clickable red",attrs:{name:"times"}})],1)]}}])})],1)],1),e._v(" "),e.showNewQuotePrompt?s("QuoteSelectionModal",{on:{close:function(t){e.showNewQuotePrompt=!1},"start-new-quote":function(t){return e.handleQuotePromptAnswer(!1)},"use-existing-quote":function(t){return e.handleQuotePromptAnswer(!0)}}}):e._e()],1)};a._withStripped=!0;var r=s(3),i=s(62),o=s(24),n=s(49),l=s(6),c=s(10),u=s(28),d=s(12),h=s(14);const p=new Intl.DateTimeFormat("en-US");var m={name:"RecentVehicles",mixins:[o.a,d.a],data:()=>({isLoading:!1,tempVehicle:null,showNewQuotePrompt:!1}),computed:{...Object(r.e)({requests:e=>e.requests,currentShopId:e=>{let{currentShop:t}=e;return null==t?void 0:t.id}}),recentVehicles(){return this.$store.state.vehicleSelector.recentVehicles},hasVehicles(){return!this.isLoading&&this.recentVehicles.length>0}},directives:{fcoTooltip:i.a},components:{Icon:c.a,FcoTable:n.a,FcoTableColumn:n.b,QuoteSelectionModal:u.a},methods:{async deleteVehicle(e){try{await this.$store.dispatch("vehicleSelector/deleteRecentVehicle",e)}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.errorRemovingVehicle","There was an error removing the vehicle, please try again later"))}},handleQuotePromptAnswer(e){this.userWantsExistingQuote=e,this.showNewQuotePrompt=!1,this.handleVehicleClick(this.tempVehicle,!0)},handleVehicleClick(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.productsInCurrentQuote&&this.promptAboutQuote&&!t)return this.showNewQuotePrompt=!0,void(this.tempVehicle=e);this.selectVehicle(e)},async selectVehicle(e){this.isLoading=!0;try{const t=await this.selectByWorksheetVehicleId(e,this.keepExistingQuoteFinal);this.handleVehicleSelectSuccess({vehicle:t,method:h.k.RECENT_VEHICLES}),this.preventNavigationOnVehicleUpdate&&(this.isLoading=!1)}catch(e){this.$fcoToast.error(this.fcoM("rs.homeMain.errorLoadingVehicle","There was an error loading the vehicle, please try again later")),this.isLoading=!1}},formatDate:e=>e?p.format(e):"",licensePlate:e=>e.plate||"",plateState:e=>e.state||"",vehicle:e=>`${e.year} ${e.make} ${e.model}`},async mounted(){this.isLoading=!0,Object(l.d)(this.requests.getCurrentShop)&&this.$store.dispatch("getCurrentShop"),await Object(l.g)((()=>this.requests.getCurrentShop));try{await this.$store.dispatch("vehicleSelector/getRecentVehicles",this.currentShopId)}catch{this.$fcoToast.error(this.fcoM("rs.homeMain.errorLoadingRecentVehicles","There was an error loading recent vehicles, please try again later"))}this.isLoading=!1}},g=(s(239),s(4)),v=Object(g.a)(m,a,[],!1,null,null,null);t.a=v.exports},73:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s(e.tag,{tag:"component",staticClass:"attribute"},[e.canRemove?s("div",{staticClass:"attribute-action"},[e.loading?s("Icon",{attrs:{name:"refresh"}}):s("button",{staticClass:"remove-attr-btn",attrs:{type:"button"},on:{click:function(t){return t.preventDefault(),e.$emit("remove")}}},[s("Icon",{staticClass:"clickable red text-sm",attrs:{name:"trash"}}
38)],1)],1):e._e(),e._v(" "),s("div",{staticClass:"flex-fill"},[s("span",{staticClass:"attribute-name"},[e._v(e._s(e.name))]),e._v(":\n        "),s("span",{staticClass:"attribute-value"},[e._v(e._s(e.value))])])])};a._withStripped=!0;var r=s(10),i={name:"Attribute",props:{name:{type:String,required:!0},value:{type:String,required:!0},canRemove:{type:Boolean,default:!0},tag:{type:String,default:"div"},loading:{type:Boolean,default:!1}},components:{Icon:r.a}},o=(s(237),s(4)),n=Object(o.a)(i,a,[],!1,null,"51e5cbda",null);t.a=n.exports},74:function(e,t,s){var a=s(222);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("029274dd",a,!1,{})},75:function(e,t,s){var a=s(224);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("7ffd77ab",a,!1,{})},76:function(e,t,s){var a=s(226);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("a13dec1c",a,!1,{})},77:function(e,t,s){var a=s(228);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("1bd13528",a,!1,{})},78:function(e,t,s){var a=s(230);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("688bd81e",a,!1,{})},79:function(e,t,s){var a=s(232);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("32d21433",a,!1,{})},80:function(e,t,s){var a=s(234);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("54281120",a,!1,{})},81:function(e,t,s){var a=s(236);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("1a54cf8a",a,!1,{})},82:function(e,t,s){var a=s(238);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("0d11aec4",a,!1,{})},83:function(e,t,s){var a=s(240);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("fb08eda4",a,!1,{})},84:function(e,t,s){var a=s(242);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("4b1e7a66",a,!1,{})},85:function(e,t,s){var a=s(244);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("0754eb89",a,!1,{})},86:function(e,t,s){var a=s(246);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("5dcb67cb",a,!1,{})},87:function(e,t,s){var a=s(248);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("9cef7394",a,!1,{})},88:function(e,t,s){var a=s(250);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("86738bee",a,!1,{})},89:function(e,t,s){var a=s(252);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("1c1942ba",a,!1,{})},9:function(e,t,s){"use strict";s.d(t,"b",(function(){return le}));var a=s(16),r=s(3),i=s(1),o=s.n(i),n=s(2),l=s(54),c=s(25),u=s(38),d=s(6),h=s(32);var p=s(5),m=s(19),g=s(0),v=s(51);const f={forceUrl:null,saveLookupBeforeRedirect:!1,partsToSaveBeforeRedirect:null,partTypePendingForceCar:!1,height:0,isLoadingData:!1,isOpen:!1,isOpenDefault:!1,isRecentVehiclesModalShown:!1,isRecentVehiclesDataLoaded:!1,isVehicleInfoShown:!1,isYearSelectorOpen:!1,isEditSelectionOpen:!1,recentVehicles:[],errorLoadingData:!1,preventNavigationOnVehicleUpdate:!1,currentVehicle:Object(g.f)(g.c.CURRENT_VEHICLE),vsData:{states:[],years:[]},requests:{getCurrentVehicle:Object(d.b)({storageKey:g.c.CURRENT_VEHICLE,cacheStrategy:g.b.LAZY,pollKey:"vehicle",pollValue:e=>{var t;let{state:s}=e;return null===(t=s.vehicleSelector.currentVehicle)||void 0===t?void 0:t.id}}),getVehicleSelectorData:Object(d.b)(),getAnsweredAttributesTranslated:Object(d.b)()}},S={updateRequestStatus:d.j,setRecentVehicles(e,t){e.recentVehicles=t},setIsRecentVehiclesModalShown(e,t){e.isRecentVehiclesModalShown=t},setIsVehicleInfoShown(e,t){e.isVehicleInfoShown=t},setCurrentVehicle(e,t){e.currentVehicle=null!=t&&t.id&&null!=t&&t.vehicleId?t:null,Object(g.o)(g.c.CURRENT_VEHICLE,e.currentVehicle)},setAttributes(e,t){e.currentVehicle.answeredAttributes=t,Object(g.o)(g.c.CURRENT_VEHICLE,e.currentVehicle)},setVehicleSelectorData(e,t){e.vsData=t},resetVehicleData(e){e.currentVehicle=null,Object(g.o)(g.c.CURRENT_VEHICLE,null),Object(g.m)(g.c.PTV_LAST_STATE)},addAttribute(e,t){let{attributeId:s,attributeDescription:a,valueId:r,valueDescription:i,displayDescription:o}=t;const n=e.currentVehicle.answeredAttributes.findIndex((e=>e.attributeId===s));-1!==n?e.currentVehicle.answeredAttributes.splice(n,1,{attributeId:s,attributeDescription:a,valueId:r,valueDescription:i,displayDescription:o}):e.currentVehicle.answeredAttributes.push({attributeId:s,attributeDescription:a,valueId:r,valueDescription:i,displayDescription:o}),Object(g.o)(g.c.CURRENT_VEHICLE,e.currentVehicle)},removeAttributes(e,t){const{answeredAttributes:s}=e.currentVehicle;e.currentVehicle.answeredAttributes=s.filter((e=>!t.includes(Number(e.attributeId)))),Object(g.o)(g.c.CURRENT_VEHICLE,e.currentVehicle)},setVsProp(e,t){let{prop:s,value:a}=t;e[s]=a},setShopCustomer(e,t){let{firstName:s,lastName:a,id:r}=t;e.currentVehicle.shopCustomerId=r,e.currentVehicle.shopCustomerFirst=s,e.currentVehicle.shopCustomerLast=a}};var b={namespaced:!0,state:f,mutations:S,actions:{async getCurrentVehicle(e){let{c
38ommit:t,dispatch:s,rootGetters:a}=e;const{data:r}=await Object(d.i)(t,"getCurrentVehicle",(async()=>{var e;if(await s("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0}),a.isFeatureDisabled("entsearch"))return o.a.get(Object(n.c)("/current/vehicle"));const t=null===(e=f.currentVehicle)||void 0===e?void 0:e.id;return t?o.a.get(Object(n.c)(`/vehicle/select/vehicleByWorksheetVehicleId?worksheetVehicleId=${t}`)):Object(d.a)()})());t("setCurrentVehicle",null!=r&&r.id?r:null)},async getVehicleSelectorData(e){let{commit:t}=e;const{data:s}=await Object(d.i)(t,"getVehicleSelectorData",o.a.get(Object(n.c)("/vehicle/select/vehicleSelectorData")));t("setVehicleSelectorData",s)},async getAnsweredAttributesTranslated(e,t){let{commit:s}=e,{worksheetId:a,worksheetVehicleId:r}=t;const{data:i}=await Object(d.i)(s,"getAnsweredAttributesTranslated",o.a.get(Object(n.c)(`/worksheet/rest/${a}/vehicle/${r}/translate`)));s("setAttributes",i.answeredAttributes)},async clearCurrentVehicle(e){let{state:t,commit:s,dispatch:a}=e;s("resetVehicleData"),a("usageTracking/clearLookups",null,{root:!0}),t.isOpenDefault||s("setVsProp",{prop:"isOpen",value:!1})},async getRecentVehicles(e,t,s){let{commit:a}=e;const r=s?"enterprise":"v2",{data:i}=await o.a.get(Object(n.c)(`/recent/vehicles/${r}`),{params:{shopId:t}});a("setRecentVehicles",i),a("setVsProp",{prop:"isRecentVehiclesDataLoaded",value:!0})},async deleteRecentVehicle(e,t){let{commit:s,state:a}=e;const r=Object(n.c)(`/recent/deleteRecentVehicle.json?recentVehicleId=${t}`);await o.a.delete(r);s("setRecentVehicles",a.recentVehicles.filter((e=>e.id!==t)))},async selectEngineSubmodel(e,t){var s;let{state:a,commit:r,dispatch:i,rootGetters:l}=e,{engineId:c,submodelId:u}=t;await i("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0});const d=l.isFeatureDisabled("entsearch"),h=d?Object(n.c)("/vehicle/select/v2/selectAttributes"):Object(n.c)(`/vehicle/select/setEngineSubmodel?worksheetVehicleId=${null===(s=a.currentVehicle)||void 0===s?void 0:s.id}`),{data:p}=await o.a.post(h,{engineId:c,submodelId:u});r("setCurrentVehicle",d?p.vehicle:p),i("usageTracking/clearLookups",null,{root:!0}),a.isOpenDefault||r("setVsProp",{prop:"isOpen",value:!1})},async removeRetainAttributes(e,t){let{state:s,commit:a,dispatch:r,rootGetters:i}=e;var o;if(await r("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0}),i.isFeatureDisabled("entsearch"))for await(const e of t)await v.d({attributeId:e,updateAttributeQuestion:!0});else await v.e(t,null===(o=s.currentVehicle)||void 0===o?void 0:o.id);a("removeAttributes",t)},setVsProp(e,t){let{commit:s}=e;s("setVsProp",t)},autoExpand(e){let{commit:t}=e,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s&&t("setVsProp",{prop:"isOpen",value:s}),t("setVsProp",{prop:"isOpenDefault",value:s})}
38,openYearSelect(e){let{commit:t}=e;t("setVsProp",{prop:"isOpen",value:!0}),t("setVsProp",{prop:"isYearSelectorOpen",value:!0})},openEditOptions(e){let{commit:t}=e;t("setVsProp",{prop:"isEditSelectionOpen",value:!0})},forceCar(e){let{commit:t,state:s}=e;t("setVsProp",{prop:"forceUrl",value:arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.isSPA?window.location.pathname+window.location.search:window.location.href}),t("setVsProp",{prop:"isOpen",value:!0})}},getters:{shopCustomer:e=>{let{currentVehicle:t}=e;return null!=t&&t.shopCustomerId?{id:t.shopCustomerId,firstName:t.shopCustomerFirst,lastName:t.shopCustomerLast}:null},vehicleEngine:e=>{let{currentVehicle:t}=e;return t.answeredAttributes.find((e=>e.attributeId===m.b.ENGINE))},vehicleSubmodel:e=>{let{currentVehicle:t}=e;return t.answeredAttributes.find((e=>e.attributeId===m.b.SUBMODEL))}}},y=s(20);const I={expandMiniQuote:!1,quoteProducts:[],quoteDetails:{subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null,worksheetHeaderId:Object(g.f)(g.c.CURRENT_WORKSHEET_ID)||null},requests:{getQuoteData:Object(d.b)({cacheKey:g.a.WORKSHEET,pollKey:"worksheet",pollValue:e=>{var t,s;let{state:a}=e;return null===(t=a.miniQuote)||void 0===t||null===(s=t.quoteDetails)||void 0===s?void 0:s.worksheetHeaderId}})}},_={updateRequestStatus:d.j,setExpandMiniQuote(e,t){e.expandMiniQuote=t},setQuoteData(e,t){let{quoteDetails:s=[],subtotalCost:a,subtotalPrice:r,totalItems:i,worksheetHeaderId:o}=t;e.quoteProducts=s,e.quoteDetails={subtotalCost:a,subtotalPrice:r,totalItems:i,worksheetHeaderId:o},g.n[Object(g.e)(g.a.WORKSHEET)]=new Date,o?Object(g.o)(g.c.CURRENT_WORKSHEET_ID,o):localStorage.removeItem(g.c.CURRENT_WORKSHEET_ID)},resetQuoteData(e){e.quoteProducts=[],e.quoteDetails={subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null},localStorage.removeItem(g.c.CURRENT_WORKSHEET_ID)}};var w={namespaced:!0,state:I,mutations:_,actions:{openMiniQuote(e){let{commit:t}=e;t("setExpandMiniQuote",!0)},closeMiniQuote(e){let{commit:t}=e;t("setExpandMiniQuote",!1)},async getQuoteData(e){var t;let{state:s,commit:a,dispatch:r,rootGetters:i}=e;const o=await Object(d.i)(a,"getQuoteData",(async()=>{if(await r("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0}),i.isFeatureDisabled("entsearch"))return y.h();const{worksheetHeaderId:e}=s.quoteDetails;return e?y.g(s.quoteDetails.worksheetHeaderId):Object(d.a)({subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null})})());a("setQuoteData",null!==(t=null==o?void 0:o.data)&&void 0!==t?t:{subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null})},async clearQuote(e){let{commit:t,dispatch:s}=e;t("resetQuoteData"),s("usageTracking/clearLookups",null,{root:!0})},async addProduct(e,t){let{dispatch:s}=e,{product:a,quantity:r}=t;const{data:i}=await y.c(a,r);return await s("getQuoteData"),i},async addProducts(e,t){let{dispatch:s,getters:a,rootGetters:r}=e,{products:i,worksheetVehicleId:o=0}=t;a.currentQuoteId||await s("newQuote");const n=a.currentQuoteId;await s("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0});const{data:l}=await y.d(n,i,o,!r.isFeatureDisabled("entsearch"));return await s("getQuoteData"),l},async addKitProducts(e,t){let{dispatch:s}=e,{products:a,isPrebuilt:r}=t;const{data:i}=await y.a(a,r);return await s("getQuoteData"),i},async addKitProductsEnterprise(e,t){let{dispatch:s}=e,{products:a,worksheetVehicleId:r,isPrebuilt:i=!1}=t;const{worksheetHeaderId:o}=I.quoteDetails,{data:n}=await y.b({products:a,worksheetId:o,worksheetVehicleId:r,isPrebuilt:i});return await s("getQuoteData"),n},async setCurrentQuote(e,t){let{commit:s,dispatch:a}=e;s("setQuoteData",{subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null,worksheetHeaderId:t}),await a("getQuoteData")},async newQuote(e){let{dispatch:t,getters:s,rootState:a,commit:r}=e;if(t("clearQuote"),await t("requestIfIdle",["getFeatures","getFeaturesForStore"],{root:!0}),s.isEntSearchDisabled)await o.a.post(Object(n.c)("/vehicle/select/default"),{id:0});else{var i,l;await t("requestIfIdle",["getCurrentShop"],{root:!0});if(!(null===(i=a.currentShop)||void 0===i?void 0:i.id))throw new Error("No shop selected");const{data:e}=await y.k(null===(l=a.currentShop)||void 0===l?void 0:l.id);r("setQuoteData",{subTotalCost:0,subTotalPrice:0,totalItems:0,worksheetHeaderId:null,worksheetHeaderId:e})}await t("getQuoteData")}},getters:{isEntSearchDisabled:(e,t,s,a)=>a.isFeatureDisabled("entsearch"),currentQuoteId:e=>e.quoteDetails.worksheetHeaderId}},E=s(39);let O,C;const T={requestedQuickAddProductIds:new Set,newQuickAddLineItems:[],quickAddStockOrders:{},stockOrders:[]},P=e=>{let{line:t,item:s}=e;return`${t}${s}`};var A={namespaced:!0,state:T,mutations:{addQuickAddProductId(e,t){const s=P(t);e.requestedQuickAddProductIds.has(s)||(e.newQuickAddLineItems.push(t),e.requestedQuickAddProductIds.add(s))},clearNewQuickAddLineItems(e){e.newQuickAddLineItems=e.newQuickAddLineItems.filter((t=>!e.quickAddStockOrders[P(t)]))},setQuickAddStockOrders(e,t){e.quickAddStockOrders={...e.quickAddStockOrders,...t}}
38,updateQuickAddStockOrder(e,t){let{line:s,item:a,...r}=t;const i=P({line:s,item:a}),o=e.quickAddStockOrders[i];if(o){const e=o.findIndex((e=>{let{id:t}=e;return t===r.id}));e>-1?o.splice(e,1,r):o.push(r)}else e.quickAddStockOrders[i]=[r]},removeQuickAddStockOrder(e,t){let{line:s,item:a,id:r}=t;const i=P({line:s,item:a}),o=e.quickAddStockOrders[i];if(!o)return;const n=o.findIndex((e=>r===e.id));-1!==n&&o.splice(n,1)},setStockOrders(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.stockOrders=t},addStockOrder(e,t){e.stockOrders.splice(0,0,t)}},actions:{async getQuickAddStockOrders(e){let{commit:t,state:s}=e,{line:a,item:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a&&r&&(t("addQuickAddProductId",{line:a,item:r}),clearTimeout(O),O=setTimeout((async()=>{if(0===s.newQuickAddLineItems.length)return;const{data:e}=await E.h(s.newQuickAddLineItems);t("setQuickAddStockOrders",e),t("clearNewQuickAddLineItems")}),200))},async getStockOrders(e){let{commit:t,state:s}=e,{size:a=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=s.stockOrders.length;if(C||r>=a)return await C,s.stockOrders;C=E.g({size:a});const{data:i}=await C;return t("setStockOrders",i),s.stockOrders},async createStockOrderWithProduct(e,t){let{commit:s}=e;const{line:a,item:r,description:i,quantity:o}=t,{data:n}=await E.c(t);s("addStockOrder",n),s("updateQuickAddStockOrder",{id:n.id,line:a,item:r,description:i,quantity:o,stockOrderDetailId:n.stockOrderDetails[0].id})},async updateStockOrderProduct(e,t){let{commit:s}=e,{stockOrderId:a,...r}=t;const{data:i}=await E.j(a,r);s("updateQuickAddStockOrder",{id:a,...r,stockOrderDetailId:i.id})},async deleteStockOrderProduct(e,t){let{commit:s,getters:a}=e,{stockOrderId:r,line:i,item:o}=t;const n=a.quickAddStockOrders({line:i,item:o}).find((e=>{let{id:t}=e;return t===r}));n&&(await E.e(r,n.stockOrderDetailId),s("removeQuickAddStockOrder",{line:i,item:o,id:r}))}},getters:{quickAddStockOrders:e=>t=>{let{line:s,item:a}=t;return e.quickAddStockOrders[P({line:s,item:a})]||[]}}};var k={namespaced:!0,state:{locationDetails:new Map},mutations:{setLocationDetails(e,t){const{locationNumber:s}=t;e.locationDetails.set(s.toString(),t)}},actions:{async getLocationDetails(e,t){let{commit:s,state:a}=e;const r=[],i=[];if(t.forEach((e=>{const t=a.locationDetails.get(e.toString());t?r.push(t):i.push(e)})),i.length>0){(await o()({method:"post",url:Object(n.c)("/product/multipleLocationDetailsForOPP"),data:i})).data.forEach((e=>{const{locationAddress:t,locationCity:a}=e;e.locationAddress=t.toLowerCase(),e.locationCity=a.toLowerCase(),s("setLocationDetails",e),r.push(e)}))}return r}}};var R={namespaced:!0,state:{kitDetails:{},requests:{getKitDetails:Object(d.b)()}},mutations:{updateRequestStatus:d.j,setKitDetails(e,t){e.kitDetails=t}},actions:{async getKitDetails(e){let{commit:t}=e;const{data:s}=await Object(d.i)(t,"getKitDetails",o.a.get(Object(n.c)("/message/get/category/PRODUCT?ignoreLanguage=true")));t("setKitDetails",Object.fromEntries(s.map((e=>{let{messageKey:t,content:s}=e;return[t,s]}))))}},getters:{}};function M(){return Object(g.f)("lookupDetails")}function L(e){Object(g.o)("lookupDetails",e)}var D={namespaced:!0,state:{lookupParts:null,lookupResolvedParts:null,lookupFullResolvedDetails:null,lookupVehicle:null,lookupRetainAnswers:null,lookupNonRetainAnswers:null,lookupOrigin:null,lookupSiblings:null,lookupLocale:null,lookupSpecificationPartTypes:null},mutations:{setLookupDetails(e,t){let{partTypes:s=null,resolvedPartTypes:a=null,fullResolvedDetails:r=null,vehicle:i=null,retainAnswerAttributes:o=null,nonRetainAnswerAttributes:n=null,origin:l=null,siblingPartTypes:c=null,specificationPartTypes:u=null,locale:d}=t;e.lookupParts=s,e.lookupResolvedParts=a,e.lookupFullResolvedDetails=r,e.lookupVehicle=i,e.lookupRetainAnswers=o,e.lookupNonRetainAnswers=n,e.lookupOrigin=l,e.lookupSiblings=c,e.lookupLocale=d,e.lookupSpecificationPartTypes=u},setPartLookup(e,t){let{partTypes:s=null,resolvedPartTypes:a=null,fullResolvedDetails:r=null,vehicle:i=null,retainAnswerAttributes:o=null,nonRetainAnswerAttributes:n=null,origin:l=null,siblingPartTypes:c=null,specificationPartTypes:u=null,locale:d}=t;e.lookupParts=s,e.lookupResolvedParts=a,e.lookupFullResolvedDetail
38s=r,e.lookupVehicle=i,e.lookupRetainAnswers=o,e.lookupNonRetainAnswers=n,e.lookupOrigin=l,e.lookupSiblings=c,e.lookupLocale=d,e.lookupSpecificationPartTypes=u},setRetainAnswers(e,t){e.lookupRetainAnswers=t},setNonRetainAnswers(e,t){e.lookupNonRetainAnswers=t}},actions:{savePartLookup(e,t){let{commit:s,rootState:a}=e,{partTypes:r=null,resolvedPartTypes:i=null,vehicle:o=null,origin:n=null,siblingPartTypes:l=null,fullResolvedDetails:c=null,retainAnswerAttributes:u=null,nonRetainAnswerAttributes:d=null,specificationPartTypes:h=null}=t;const p={vehicle:o,partTypes:r,origin:n,resolvedPartTypes:i,fullResolvedDetails:c,siblingPartTypes:l,retainAnswerAttributes:u,nonRetainAnswerAttributes:d,locale:a.i18n.locale,specificationPartTypes:h};L(p),s("setPartLookup",p)},saveRetainAttributeAnswer(e,t){let{commit:s}=e;const a=M();a.retainAnswerAttributes?a.retainAnswerAttributes.push(t):a.retainAnswerAttributes=[t],L(a),s("setRetainAnswers",a.retainAnswerAttributes)},saveNonRetrainAttributeAnswer(e,t){let{commit:s}=e;const a=M();if(a.nonRetainAnswerAttributes){const e=a.nonRetainAnswerAttributes.findIndex((e=>e.attributeId===t.attributeId&&e.partTypeId===t.partTypeId));-1!==e?a.nonRetainAnswerAttributes[e]=t:a.nonRetainAnswerAttributes.push(t)}else a.nonRetainAnswerAttributes=[t];L(a),s("setNonRetainAnswers",a.nonRetainAnswerAttributes)},getLookupDetails(e){let{commit:t}=e;const s=M();s&&t("setLookupDetails",s)},removeNonRetainAttribute(e,t){let{commit:s}=e,{attributeId:a,valueId:r,partTypeId:i}=t;const o=M(),n=o.lookupNonRetainAnswers.filter((e=>e.valueId!==r&&e.attributeId!==a&&e.partTypeId!==i));s("setNonRetainAnswers",n),o.lookupNonRetainAnswers=n,L(o)},resetNonRetainAttributes(e){let{commit:t}=e;const s=M();null!=s&&s.hasOwnProperty("nonRetainAnswerAttributes")&&(delete s.nonRetainAnswerAttributes,L(s),t("setLookupDetails",s))},resetRetainAttributes(e){let{commit:t}=e;const s=M();null!=s&&s.retainAnswerAttributes&&(delete s.retainAnswerAttributes,L(s),t("setLookupDetails",s))},clearLookupDetails(e){let{commit:t}=e;Object(g.m)("lookupDetails"),t("setLookupDetails",{})},updateNonRetainAnswersByPartType(e,t){let{commit:s}=e,{partTypeId:a,newAnswers:r}=t;const i=M(),o=[...new Set(r.map((e=>e.attributeId)))],n=i.nonRetainAnswerAttributes.filter((e=>e.partTypeId!==a));let l=i.nonRetainAnswerAttributes.filter((e=>e.partTypeId===a));o.forEach((e=>{l=l.filter((t=>t.attributeId!==e))}));const c=[...n,...l,...r];i.nonRetainAnswerAttributes=c,L(i),s("setNonRetainAnswers",c)}}},N=s(15),V=s(110),U=s(291),q=s(40);const $="ut_lookup",j="ut_lookup_product",x="lookupsByWorksheetVehicleId";let F;const Q=async()=>(F||(F=await Object(V.a)("ut",1,{upgrade(e){e.createObjectStore($,{keyPath:"uuid"}).createIndex(x,"vehicleId"),e.createObjectStore(j,{keyPath:["uuid","partId"]})}})),F),B=async e=>{let{utLookup:t,utLookupProducts:s}=e;const a=(await Q()).transaction([$,j],"readwrite"),r=[];r.push(a.objectStore($).put(t));const i=a.objectStore(j);return s.forEach((e=>{r.push(i.put(e))})),r.push(a.done),Promise.allSettled(r)},H=()=>{const e=new Intl.DateTimeFormat("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"numeric",hour12:!1,minute:"2-digit",second:"2-digit",timeZoneName:"short"}).formatToParts(Date.now());return`${e[0].value}, ${e[4].value} ${e[2].value} ${e[6].value} ${e[8].value}:${e[10].value}:${e[12].value} ${e[14].value}`},K=()=>({uuid:Object(U.a)(),timeStamp:H()}),G=async e=>{if(0===e.length)return;const t={utLookup:{uuid:e[0].uuid.uuid,timeStamp:e[0].uuid.timeStamp,lookupType:e[0].lookupType,vehicleID:e[0].vehicleId,vehicleBaseId:e[0].baseVehicleId,searchQuery:null,
38selectedManufacturer:null},utLookupProducts:e.map((e=>({uuid:e.uuid.uuid,partId:e.partId,legacyPartId:e.legacyPartId,partTypeId:e.partTypeId,parentPartTypeId:e.parentPartTypeId,localQuantityOnHand:e.localQuantityOnHand,stocking:e.stocking})))};return await B(t),t},Y=async()=>{const e=(await Q()).transaction([$,j],"readwrite");await Promise.allSettled([e.objectStore(j).clear(),e.objectStore($).clear(),e.done])},W="ut_uuid",z="ut_timestamp",J={getCurrentDate(e){let{uuid:t}=e;return null==t?void 0:t.timeStamp},getCurrentUUID(e){let{uuid:t}=e;return null==t?void 0:t.uuid},getCustomerId(e,t,s){var a;return null===(a=s.currentShop)||void 0===a?void 0:a.accountNumber},getCustomerZipCode(e,t,s){var a;return null===(a=s.currentShop)||void 0===a?void 0:a.zip},getCatalogVersion(e,t,s){var a;return null===(a=s.version)||void 0===a?void 0:a.ocatVersion},getApplicationId(e){var t;let{staticData:s}=e;return null==s||null===(t=s.application)||void 0===t?void 0:t.id},getTokenParam(e){let{staticData:t}=e;return`?token=${t.application.authorization}`},getStoreId(e,t,s){var a,r;return null===(a=s.currentShop)||void 0===a||null===(r=a.homeStore)||void 0===r?void 0:r.storeId},getCatalogLookupType(e){let{utLookup:t}=e;return e=>{var s,a;return null!==(s=null===(a=t.find((t=>t.uuid===e)))||void 0===a?void 0:a.lookupType)&&void 0!==s?s:"DRILL_DOWN"}},getUUIDByPartId(e){let{utLookupProducts:t,utLookup:s}=e;return e=>{const a=t.filter((t=>t.partId===e)).map((e=>e.uuid)),r=s.filter((e=>a.includes(e.uuid))).sort(((e,t)=>new Date(t.timeStamp)-new Date(e.timeStamp))).at(0);return null==r?void 0:r.uuid}},getUUIDByLegacyPartId(e){let{utLookupProducts:t,utLookup:s}=e;return e=>{const a=t.filter((t=>t.legacyPartId===e)).map((e=>e.uuid)),r=s.filter((e=>a.includes(e.uuid))).sort(((e,t)=>new Date(t.timeStamp)-new Date(e.timeStamp))).at(0);return null==r?void 0:r.uuid}},getVehicleLookupType(e,t,s){var a;const{currentVehicle:r}=s.vehicleSelector;return null!=r&&r.id?(null==r||null===(a=r.vin)||void 0===a?void 0:a.length)>0?"VIN":"YMM":"NULL"},getVehicleBaseId(e,t,s){var a,r;return null===(a=s.vehicleSelector)||void 0===a||null===(r=a.currentVehicle)||void 0===r?void 0:r.vehicleId},getVehicleId(e,t,s){var a,r;return null===(a=s.vehicleSelector)||void 0===a||null===(r=a.currentVehicle)||void 0===r?void 0:r.id},getSelectedPartTypes(e,t,s){var a;const{lookupParts:r}=s.partSelection;return null!==(a=null==r?void 0:r.map((e=>({partTypeId:e.partTypeId,partTypeName:e.description}))))&&void 0!==a?a:[]},lookupParentPartType(e){let{utLookupProducts:t}=e;return e=>{const s=t.find((t=>t.partTypeId===e||t.lookupPartTypeId===e));return Object(N.i)(null==s?void 0:s.parentPartTypeId)}},getLocalQuantityOnHand:(e,t)=>(e,s)=>{var a,r;const i=s||t.getVehicleId,o=null===(a=t.getVehicleProducts(i))||void 0===a||null===(r=a.find((t=>t.partId===e)))||void 0===r?void 0:r.localQuantityOnHand;return null!=o?o:0},getIsStockingItem:(e,t)=>(e,s)=>{var a,r;const i=s||t.getVehicleId,o=null===(a=t.getVehicleProducts(i))||void 0===a||null===(r=a.find((t=>t.partId===e)))||void 0===r?void 0:r.stocking;return null!=o&&o},isAlreadyTracked(e){let{utLookup:t}=e;return e=>{for(const s of t)if(s.uuid===e)return!0;return!1}},getLookupSummaryData:(e,t)=>(e,s)=>{const a=[];let r,i;if("PART_NO"===t.getCatalogLookupType(t.getCurrentUUID))a.push({partTypeId:0,parentPartTypeId:0});else if(e&&"REL_ITEM"===e)a.push({partTypeId:0,parentPartTypeId:0,vehicleId:0,vehicleLookupType:null,catalogLookupType:e});else{const o=s||t.getSelectedPartTypes;for(let s=0;s<o.length;s++)i=t.lookupParentPartType(o[s].partTypeId),r={partTypeId:Object(N.j)(o[s].partTypeId),parentPartTypeId:i},e&&(r.catalogLookupType=e),a.push(r)}return a},getLookupDetailsData:(e,t)=>e=>{let{isRelatedProduct:s=!1,filteredBrands:a=[],selectedManufacturer:r,searchQuery:i,lookupType:o,selectedPartTypes:n}=e;const l=n||t.getSelectedPartTypes,c=[],u={detailType:"TYPE"},d=t.getVehicleLookupType,h=o||t.getCatalogLookupType(t.getCurrentUUID);let p;if("YMM"===d?u.detailValue="app":"NULL"===d?u.detailValue="all":"VIN"===d&&(u.detailValue="vin"),"PROMO"===h&&c.push({detailType:"KIT",detailValue:"kit"}),"INTCHANGE"===h){for(u.detailValue="ic",c.push({detailType:"PART_NO",detailValue:i}),p=0;p<l.length;p++)c.push({detailType:"SELECTED_PART_TYPE",detailValue:l[p].partTypeId}),c.push({detailType:"PART_NAME",detailValue:l[p].partTypeName});r&&(c.push({detailType:"MANUFACTURER",detailValue:r}),c.push({detailType:"LINES",detailValue:"All Lines"}))}if(s&&(u.detailValue="all"),c.push(u),!s)if("PART_NO"===h)c.push({detailType:"PART_NO",detailValue:i,custom:"Y"});else if("DRILL_DOWN"===h||"JOB"===h)for(p=0;p<l.length;p++)c.push({detailType:"SELECTED_PART_TYPE",detailValue:l[p].partTypeId,custom:"Y"}),c.push({detailType:"PART_NAME",detailValue:l[p].partTypeName||"",custom:"Y"}),a.length>0&&""!==i&&c.push({detailType:"MANUFACTURER",detailValue:i,custom:"Y"});return c}
38,assembleLookupDetails:(e,t)=>(e,s)=>{const a=[];for(let r=0;r<e.length;r++)a.push({key:{uuid:s||t.getCurrentUUID,detailType:e[r].detailType,servicingStoreNumber:t.getStoreId},detailValue:e[r].detailValue,custom:"Y"});return a},assembleLookupAttributes:(e,t)=>(e,s)=>{const a=[];for(let r=0;r<e.length;r++)a.push({key:{attributeTypeId:e[r].attributeTypeID,attributeId:e[r].attributeID,attributeValueId:e[r].attributeValueID,uuid:s||t.getCurrentUUID,servicingStoreNumber:t.getStoreId},attributeState:"ANSWERED",partTypeId:null});return a},assembleResultsSummary:(e,t)=>(e,s,a)=>{const r=[];for(let i=0;i<e.length;i++)r.push({key:{uuid:s||t.getCurrentUUID,servicingStoreNumber:t.getStoreId,date:a||t.getCurrentDate,partTypeId:e[i].partTypeId},productsReturned:e[i].countProducts,stockingProductsReturned:e[i].countStocking,nonStockProductsReturned:e[i].countNonStocking,specialOrderProductsReturned:e[i].countSpecialOrder,outOfStockProductsReturned:e[i].countOutOfStock,countDisplayed:e[i].countDisplayed,duration:0});return r},assembleResultsDetails:(e,t)=>(e,s,a,r,i)=>{const o=[];let n,l,c;if(a)n=a;else if(s&&e&&e.length>0){var u;const s=t.getVehicleProducts(i),a=`${e[0].brandCode}|${e[0].catalogItemId}`,r=null===(u=s.find((e=>e.partId===a)))||void 0===u?void 0:u.uuid;r&&(n=r)}n||(n=t.getCurrentUUID);for(let s=0;s<e.length;s++)l=`${e[s].brandCode}|${e[s].catalogItemId}`,c=e[s].stocking,null==c&&(c=t.getIsStockingItem(l,i)),o.push({key:{uuid:n,servicingStoreNumber:t.getStoreId,partTypeId:e[s].partTypeId,line:e[s].line,item:e[s].item,productState:e[s].productState},date:r||t.getCurrentDate,fitmentNotes:"",quotedPrice:e[s].quotedPrice,desiredQuantity:e[s].desiredQuantity,localQOH:e[s].localQOH||t.getLocalQuantityOnHand(l,i),hubQOH:e[s].hubQOH,dcQOH:e[s].dcQOH,stockingItem:c,onOrder:e[s].onOrder,onBackOrder:e[s].onBackOrder,brandCode:e[s].brandCode});return o},createCatalogLookup:(e,t)=>function(){let{partTypes:e,attributes:s=[],isRelatedProduct:a=!1,filteredBrands:r=[],selectedPartTypes:i,selectedManufacturer:o,searchQuery:n,lookupType:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c={lookupSummary:t.getLookupSummaryData(a?"REL_ITEM":void 0,i),lookupDetails:t.getLookupDetailsData({selectedPartTypes:i,isRelatedProduct:a,filteredBrands:r,selectedManufacturer:o,searchQuery:n,lookupType:l}),lookupAttributes:s.map((e=>Object(N.c)({attributeType:e.attributeType,attributeID:e.attributeId,attributeValueID:e.valueId})))};return e&&(c.resultsSummary=Object(N.g)(e),c.resultsDetails=Object(N.e)(e,"LOOKUP")),c},getVehicleProducts(e){let{utLookupProducts:t,utLookup:s}=e;return e=>{const a=new Set(s.filter((t=>t.vehicleID===e)).map((e=>e.uuid)));return 0===a.size?[]:t.filter((e=>a.has(e.uuid)))}},assembleLookupSummary:(e,t)=>(e,s,a)=>{const r=[];let i,o;for(let n=0;n<e.length;n++){null!==e[n].vehicleId&&(void 0===e[n].vehicleId?i=t.getVehicleBaseId:({vehicleId:i}=e[n])),null!==e[n].vehicleLookupType?void 0===e[n].vehicleLookupType?o=t.getVehicleLookupType:({vehicleLookupType:o}=e[n]):o="NULL";const l=s||t.getCurrentUUID;r.push({key:{date:a||t.getCurrentDate,application:t.getApplicationId,partTypeId:e[n].partTypeId,uuid:l,servicingStoreNumber:t.getStoreId},parentPartTypeId:t.lookupParentPartType(e[n].partTypeId),catalogLookupType:e[n].catalogLookupType||t.getCatalogLookupType(l),vehicleLookupType:o,vehicleId:i,customerId:t.getCustomerId,customerZipCode:t.getCustomerZipCode,catalogVersion:t.getCatalogVersion})}return r}},X=e=>async(t,s)=>{try{var a;const{state:r,dispatch:i}=t;if(await i("loadUsageTracking"),r.isDisabled)return;return null===(a=e(t,s))||void 0===a?void 0:a.catch((()=>{}))}catch{}};let Z;var ee={namespaced:!0,state:{isDisabled:!1,uuid:null,utLookup:null,utLookupProducts:null,staticData:null},mutations:{updateLookupsAndProducts(e,t){let{utLookup:s,utLookupProducts:a}=t;e.utLookup=[...e.utLookup,s],e.utLookupProducts=[...e.utLookupProducts,...a]},disableUsageTracking(e){e.isDisabled=!0,e.utLookup=null,e.utLookupProducts=null,e.uuid=null,sessionStorage.removeItem(W),sessionStorage.removeItem(z),Y()},setUsageTrackingData(e,t){let{utLookup:s,utLookupProducts:a}=t;e.utLookup=s,e.utLookupProducts=a},resetUsageTrackingData(e){e.isDisabled=!1,e.utLookup=null,e.utLookupProducts=null,e.uuid=null,
38sessionStorage.removeItem(W),sessionStorage.removeItem(z),Y()},setCurrentUUID(e,t){let{uuid:s,timeStamp:a}=t;e.uuid={uuid:s,timeStamp:a}},setStaticData(e,t){e.staticData={application:{authorization:t.usageTrackingAuth,id:t.usageTrackingApplicationId},paths:{lookupSummaryPath:t.usageTrackingLookupSummaryPath,lookupDetailsPath:t.usageTrackingLookupDetailsPath,lookupAttributesPath:t.usageTrackingLookupAttributesPath,resultsSummaryPath:t.usageTrackingResultsSummaryPath,resultsDetailsPath:t.usageTrackingResultsDetailsPath}}}},actions:{async startCatalogLookup(e){let{dispatch:t}=e;const s=await t("requestNewUUID");sessionStorage.setItem(W,s.uuid),sessionStorage.setItem(z,s.timeStamp)},clearLookups:e=>{let{commit:t}=e;t("resetUsageTrackingData"),Y()},async loadUsageTracking(e,t){const{commit:s,state:a,dispatch:r,rootGetters:i}=e,{isDisabled:o,utLookup:n,utLookupProducts:l}=a;if(!(o||n||l))try{await r("requestIfIdle",["getUser","getFeatures","getCompany"],{root:!0});const{isFeatureDisabled:e,isDemo:a,isTeamMember:o}=i;if(e("usage_tracking")||o||a)return void s("disableUsageTracking");!t&&Z||(Z=(async()=>{const e=await Q();return{utLookup:await e.getAll($),utLookupProducts:await e.getAll(j)}})());s("setUsageTrackingData",await Z),s("setCurrentUUID",{uuid:sessionStorage.getItem(W),timeStamp:sessionStorage.getItem(z)})}catch{s("disableUsageTracking")}},resetUsageTrackingData(e){let{commit:t,dispatch:s}=e;t("resetUsageTrackingData"),s("loadUsageTracking",!0)},requestNewUUID(e){let{commit:t}=e;const s=K();return t("setCurrentUUID",s),s},logLookupSummary(e,t){let{state:s,getters:a}=e;s.isDisabled||navigator.sendBeacon(s.staticData.paths.lookupSummaryPath+a.getTokenParam,JSON.stringify(t))},logLookupDetails(e,t){let{state:s,getters:a}=e;s.isDisabled||navigator.sendBeacon(s.staticData.paths.lookupDetailsPath+a.getTokenParam,JSON.stringify(t))},logLookupAttributes(e,t){let{state:s,getters:a}=e;s.isDisabled||navigator.sendBeacon(s.staticData.paths.lookupAttributesPath+a.getTokenParam,JSON.stringify(t))},logResultsSummary(e,t){let{state:s,getters:a}=e;s.isDisabled||navigator.sendBeacon(s.staticData.paths.resultsSummaryPath+a.getTokenParam,JSON.stringify(t))},logResultsDetails(e,t){let{state:s,getters:a}=e;s.isDisabled||navigator.sendBeacon(s.staticData.paths.resultsDetailsPath+a.getTokenParam,JSON.stringify(t))},logCatalogLookup(e,t){let{state:s,getters:a,dispatch:r}=e,{data:i,optionalUUID:o}=t;if(!s.isDisabled){var n,l,c,u,d;const e=o||a.getCurrentUUID;sessionStorage.setItem(W,e),(null==i||null===(n=i.lookupDetails)||void 0===n?void 0:n.length)>0&&r("logLookupDetails",a.assembleLookupDetails(i.lookupDetails,o)),(null==i||null===(l=i.lookupSummary)||void 0===l?void 0:l.length)>0&&r("logLookupSummary",a.assembleLookupSummary(i.lookupSummary,o)),(null==i||null===(c=i.resultsSummary)||void 0===c?void 0:c.length)>0&&r("logResultsSummary",a.assembleResultsSummary(i.resultsSummary,o)),(null==i||null===(u=i.resultsDetails)||void 0===u?void 0:u.length)>0&&r("logResultsDetails",a.assembleResultsDetails(i.resultsDetails,!1,o)),(null==i||null===(d=i.lookupAttributes)||void 0===d?void 0:d.length)>0&&r("logLookupAttributes",a.assembleLookupAttributes(i.lookupAttributes,o))}},async saveCatalogLookUp(e,t){let{commit:s}=e;const a=(e=>{var t,s,a;let{uuid:r,timeStamp:i,currentVehicle:o,catalogLookupData:n,resultDetails:l}=e;const c={uuid:r,timeStamp:i,lookupType:null!==(t=n.lookupType)&&void 0!==t?t:q.a.DRILL_DOWN,searchQuery:n.searchQuery,vehicleID:null==o?void 0:o.id,vehicleBaseId:null==o?void 0:o.vehicleId,selectedManufacturer:n.selectedManufacturer},u=[],d=null!==(s=null===(a=n.selectedPartTypes)||void 0===a?void 0:a.reduce(((e,t)=>{var s;let{partTypeId:a,resolvedPartTypes:r}=t;const i=null!==(s=null==r?void 0:r.reduce(((e,t)=>(e[t.partTypeId]=a,e)),{}))&&void 0!==s?s:{};return Object.assign(e,i)}),{}))&&void 0!==s?s:{};return l.forEach((e=>{var t;u.push({uuid:r,legacyPartId:`${e.line}|${e.item}`,partId:`${e.brandCode}|${e.catalogItemId}`,partTypeId:e.partTypeId,lookupPartTypeId:d[e.partTypeId],parentPartTypeId:e.parentPartTypeId,localQuantityOnHand:null!==(t=e.localQOH)&&void 0!==t?t:0,stocking:e.stocking})})),{utLookup:c,utLookupProducts:u}})(t);await B(a),s("updateLookupsAndProducts",a)},catalogLookup:X((async(e,t)=>{let{catalogLookupData:s,autoStart:a=!1}=t;const{dispatch:r,getters:i,rootState:o}=e,{partTypes:n}=s;if(a)await r("startCatalogLookup");else if(i.isAlreadyTracked(i.getCurrentUUID))return;
38return await r("saveCatalogLookUp",{uuid:i.getCurrentUUID,timeStamp:i.getCurrentDate,currentVehicle:o.vehicleSelector.currentVehicle,resultDetails:n?Object(N.e)(n,"LOOKUP"):[],catalogLookupData:{...s,selectedPartTypes:s.selectedPartTypes||i.getSelectedPartTypes}}),r("logCatalogLookup",{data:i.createCatalogLookup(s)})})),async logAddPartResultsDetails(e,t){let{addProductResultsDetails:s,optionalUUID:a}=t;const{state:r,getters:i,dispatch:o}=e;r.isDisabled||o("logResultsDetails",i.assembleResultsDetails([s],!0,a))},relatedPartTypesLookup:X((async(e,t)=>{let{partTypes:s,vehicle:a}=t;try{const{dispatch:t,getters:r,commit:i}=e,o=await t("requestNewUUID"),n=s.flatMap((e=>{let{partTypeId:t,parentPartTypeId:s,completeProducts:r}=e;return r.map((e=>{const{stocking:r,localQOH:i}=Object(N.d)(e);return{vehicleId:a.id,baseVehicleId:a.vehicleId,partId:`${e.catalogKey.groupId}|${e.catalogKey.itemId}`,legacyPartId:`${e.legacyKey.groupId}|${e.legacyKey.itemId}`,lookupType:q.a.DRILL_DOWN,partTypeId:t,parentPartTypeId:Object(N.i)(s),uuid:o,stocking:r,localQuantityOnHand:i}}))}));i("updateLookupsAndProducts",await G(n)),await t("logCatalogLookup",{data:r.createCatalogLookup({partTypes:s}),optionalUUID:r.getCurrentUUID})}catch{}})),relatedProductsLookup:X((async(e,t)=>{try{const{getters:s,dispatch:a,commit:r}=e,i=s.getVehicleId,o=s.getVehicleBaseId,n={...t,partTypeId:0,parentPartTypeId:null},l=await a("requestNewUUID"),c=n.completeProducts.map((e=>{const{stocking:t,localQOH:a}=Object(N.d)(e);return{vehicleId:i,baseVehicleId:o,partId:`${e.catalogKey.groupId}|${e.catalogKey.itemId}`,legacyPartId:`${e.legacyKey.groupId}|${e.legacyKey.itemId}`,lookupType:s.getCatalogLookupType(l),parentPartTypeId:null,partTypeId:0,uuid:l,stocking:t,localQuantityOnHand:a}}));r("updateLookupsAndProducts",await G(c)),sessionStorage.setItem("curRelatedPartLookup",JSON.stringify({lookupData:s.createCatalogLookup({partTypes:[n],isRelatedProduct:!0}),uuid:l.uuid,hasBeenLogged:!1}))}catch{}})),addPartToQuote:X((async(e,t)=>{let{dispatch:s,getters:a}=e,{addedProductData:r,order:{onOrder:i,onBackOrder:o}}=t;const{brandCode:n,itemCost:l,itemNumber:c,itemOrigin:u,itemOriginDetails:d,itemQuantity:h,line:p,locations:m,partNumber:g}=r,v="CROSS_SELL_PR_PRODUCT"===u,f=v?JSON.parse(sessionStorage.getItem("curRelatedPartLookup")):{};let S,b=-1,y=-1;m.forEach((e=>{let{quantityOnHand:t,locationType:s}=e;"HUB"===s?b=t:"DISTRIBUTION_CENTER"===s&&(y=t)}));const I={partTypeId:Object(N.j)(d),line:p,item:c,catalogItemId:g,fitmentNotes:"",productState:"ADD_TO_INVOICE",quotedPrice:l,desiredQuantity:h,hubQOH:b,dcQOH:y,onOrder:i,onBackOrder:o,brandCode:n};v&&!f.hasBeenLogged&&(({uuid:S}=f),await s("catalogLookup",{catalogLookupData:f.lookupData,optionalUUID:S}),f.hasBeenLogged=!0,sessionStorage.setItem("curRelatedPartLookup",JSON.stringify(f)));try{if(S=S||a.getUUIDByPartId(`${I.brandCode}|${I.catalogItemId}`),!S)return;await s("logAddPartResultsDetails",{addProductResultsDetails:I,optionalUUID:S})}catch{}})),addKitPartToQuote:X((async(e,t)=>{let s,a,{dispatch:r}=e,{addedProductData:i,kitData:o}=t,n=-1,l=-1;for(let e=0;e<i.locations.length;e++)s=i.locations[e],a=s.quantityOnHand>=0?s.quantityOnHand:0,"HUB"===s.locationType?n=a:"DISTRIBUTION_CENTER"===s.locationType&&(l=a);const c={partTypeId:o.partTypeId||i.itemOriginDetails,line:i.line,item:o.legacyKey.itemId,catalogItemId:o.catalogKey.itemId,fitmentNotes:"",productState:"ADD_TO_INVOICE",quotedPrice:o.itemCost,desiredQuantity:o.userSpecifiedQuantity,hubQOH:n,dcQOH:l,onOrder:o.partPriceAvailabilityResponse.onOrder,onBackOrder:o.partPriceAvailabilityResponse.onBackOrder,brandCode:i.brandCode};try{await r("logAddPartResultsDetails",{addProductResultsDetails:c})}catch{}})),addPrebuiltKitToQuote:X(((e,t)=>{let{addedProducts:s,kit:a,partTypeId:r}=t;try{const{dispatch:t,getters:i}=e,o=i.getSelectedPartTypes;let n;n=o.length>0?Object(N.i)(o[0].partTypeId):0,t("logLookupSummary",i.assembleLookupSummary([{partTypeId:r,parentPartTypeId:n}])),s.forEach((e=>{const s={partType:{kits:[a]}},r=Object(N.b)(e,s);r&&t("addKitPartToQuote",{addedProductData:e,kitData:r})}))}catch(e){}})),plpMoreInformation:X(((e,t)=>{var s;let{qty:a,productState:r,partData:i,partTypeId:o,optionalUUID:n}=t;const{dispatch:l,getters:c}=e,u=null!==(s=c.lookupParentPartType(o))&&void 0!==s?s:"0",d=Object(N.f)(u,a,r,i,o);(n||c.getUUIDByPartId(`${d.brandCode}|${d.catalogItemId}`))&&l("logResultsDetails",c.assembleResultsDetails([d],!0,n))})),removePartFromQuote:X((async(e,t)=>{let{data:s,groupId:a,itemId:r}=t;try{const{dispatch:t,getters:i}=e,l=await o.a.get(Object(n.c)(`/product/extraInfo?mfg=${a}&partNumber=${r}`));s.product.catalogKey={itemId:r,groupId:a},s.product.legacyKey=l.data;const c=Object(N.a)(s.product,"REM_FROM_INVOICE"),u=i.getUUIDByLegacyPartId(`${a}|${r}`),d=H();t("logResultsDetails",i.assembleResultsDetails([c],!0,u,d,s.vehicleId))}catch{}})),viewPartFromQuote:X((async(e,t)=>{let{data:s,line:a,itemNumber:r}=t;try{const{dispatch:t,getters:i}=e,l=Object(n.c)(`/product/extraInfo?&sourceType=LEGACY&targetType=CATALOG&mfg=${a}&partNumber=${r}`),{data:c}=await o.a.get(l);s.product.catalogKey=c;const u=i.getUUIDByLegacyPartId(`${a}|${r}`),d=H();t("logResultsDetails",i.assembleResultsDetails([Object(N.a)(s.product,"VW_DETAILS")],!0,u,d,s.vehicleId))}catch{}})),quickAddPartsToQuote:X((async(e,t)=>{let{products:s,isWorksheet:a,vehicleId:r}=t;const{dispatch:i,getters:o}=e,{uuid:n,timeStamp:l}=K(),c=a?"QUICK_ADD":"PART_NO",u=[{completeProducts:s,parentPartTypeId:0,partTypeId:0}];await i("saveCatalogLookUp",{uuid:n,timeStamp:l,currentVehicle:{id:r},resultDetails:Object(N.e)(u,c),catalogLookupData:{partTypes:u}});const d={lookupSummary:[{partTypeId:0,parentPartTypeId:0,catalogLookupType:c,vehicleLookupType:null,vehicleId:null}
38],lookupDetails:[{detailType:"TYPE",detailValue:"all"}],resultsSummary:[],resultsDetails:[]},h={countStocking:0,countNonStocking:0,countSpecialOrder:0,countOutOfStock:0};let p,m;for(let e=0;e<s.length;e++)p=s[e].partPriceAvailabilityResponse,p.stocking&&(h.countStocking+=1),Object(N.h)(s[e])&&(h.countOutOfStock+=1),p.nonStocking&&p.itemMaster&&(h.countNonStocking+=1),p.itemMaster||(h.countSpecialOrder+=1),d.lookupDetails.push({detailType:"PART_NO",detailValue:s[e].catalogKey.itemId}),m=Object(N.a)(s[e],"ADD_TO_INVOICE",!0),d.resultsDetails.push(m),p.itemMaster&&d.resultsDetails.push(Object(N.a)(s[e],"LOOKUP",!0));d.resultsSummary.push({partTypeId:0,countProducts:s.length,countStocking:h.countStocking,countNonStocking:h.countNonStocking,countSpecialOrder:h.countSpecialOrder,countOutOfStock:h.countOutOfStock,countDisplayed:-1,duration:0}),i("logLookupDetails",o.assembleLookupDetails(d.lookupDetails,n)),i("logLookupSummary",o.assembleLookupSummary(d.lookupSummary,n,l)),i("logResultsSummary",o.assembleResultsSummary(d.resultsSummary,n,l)),i("logResultsDetails",o.assembleResultsDetails(d.resultsDetails,!1,n,l,null))}))},getters:J},te=s(14);const se="activityTracking",ae={activity:{lookupMethod:null,lookupUuid:null,pdpFromPage:null,pdpFromResultsPage:null,pdpFromResultsIndex:null,searchPerformed:!1,searchTerm:"",partsLookupStartTime:0,partsLookupEndTime:0,vehicleAddedFrom:te.j.OTHER}};var re={namespaced:!0,state:ae,mutations:{setActivity(e,t){e.activity={...e.activity,...t},sessionStorage.setItem(se,JSON.stringify(e.activity))}},actions:{startPartsLookupTimer(e){let{commit:t}=e;t("setActivity",{lookupStartTime:Date.now()})},stopPartsLookupTimer(e){let{commit:t}=e;t("setActivity",{lookupEndTime:Date.now()})},getActivityTracking(e){let{commit:t}=e;const s=sessionStorage.getItem(se);t("setActivity",s?JSON.parse(s):{})},setSearchUuid(e,t){let{commit:s}=e;s("setActivity",{lookupUuid:null!=t?t:crypto.randomUUID()})},setLookupMethod(e,t){let{commit:s}=e;s("setActivity",{lookupMethod:t})},setPDPViewFrom(e,t){let{commit:s,state:a}=e;s("setActivity",{...a.activity,pdpFromPage:t})},setPDPResultsPageFrom(e,t){let{commit:s,state:a}=e;s("setActivity",{...a.activity,pdpFromResultsPage:t})},setPDPResultsIndexFrom(e,t){let{commit:s,state:a}=e;s("setActivity",{...a.activity,pdpFromResultsIndex:t})},resetPDPView(e){let{commit:t}=e;t("setActivity",{...ae.activity,pdpFromPage:null,pdpFromResultsPage:null,pdpFromResultsIndex:null})},setLastQuoteVisited(e,t){let{commit:s}=e;s("setActivity",{lastQuoteVisited:t})},setAuthAttemptedLoginName(e,t){let{commit:s}=e;s("setActivity",{authAttemtedLoginName:t})},setSearchPerformed(e,t){let{commit:s}=e;s("setActivity",{searchPerformed:t})},setSearchTerm(e,t){let{commit:s}=e;s("setActivity",{searchTerm:t})},resetSearchData(e){let{commit:t}=e;t("setActivity",{searchPerformed:!1,searchTerm:""})},setVehicleAddedFrom(e,t){let{commit:s,state:a}=e;s("setActivity",{...a.activity,vehicleAddedFrom:t})}},getters:{lookupDuration(e){const{lookupStartTime:t,lookupEndTime:s}=e.activity;return s-t}}};a.a.use(r.a);const ie=Boolean(window.fcoSPA),oe=Object(g.f)(g.c.AUTH),ne=()=>ie?null:{authenticated:!1,carCustomer:!1,customerType:{description:"",name:""},customerTypeSms:!1,isCxml:!1,emailAddress:"",emailUpdateRequired:!1,hideStorePhoneNumber:!1,firstName:"",lastName:"",loginName:"",masquerade:!1,partsPayoffAccessible:!1,passwordChangeRequired:!1,shopReferralEligible:!1,teamMember:!1,userId:null,userPreference:{languageCode:p.e.EN,catalogNavigationTab:1,selectedStylesheet:1,selectedShopId:0},group:""},le={isSPA:ie,auth:oe,csrfObject:{parameterName:"_csrf",headerName:"X-CSRF-TOKEN",token:""},cxmlCallbackUrl:Object(g.f)(g.c.CXML_CALLBACKURL)||"",transactionId:Object(g.f)(g.c.TRANSACTION_ID)||"",buyerCookie:Object(g.f)(g.c.BUYER_COOKIE)||"",googleMapsKey:"",imageServerUrl:"https://images.firstcallonline.com",promoImagesUrl:"",teamviewerAndroidURL:"",teamviewerChromeURL:"",teamviewerIosURL:"",teamviewerMacUrl:"",teamviewerWindowsURL:"",supportEmail:"[email protected]",version:{copyright:`Copyright © 2011-${(new Date).getFullYear()}`,fcoVersion:"",node:"",ocatVersion:""},user:Object(g.f)(g.c.USER)||ne(),isLoggingOut:!1,stickySessionId:Object(g.f)(g.c.STICKY_SESSION_ID),isPasswordChangeRequired:Object(g.f)(g.c.PASSWORD_CHANGE_REQUIRED),isTermsAcceptRequired:Object(g.f)(g.c.TERMS_ACCEPT_REQUIRED),masqueradeRealUser:Object(g.f)(g.c.MASQUERADE_REAL_USER),masqueradeSource:Object(g.f)(g.c.MASQUERADE_SOURCE),isCostHidden:Object(g.f)(g.c.IS_COST_HIDDEN)||!1,isEarnbackEligible:null,isChatReady:!1,isChatDisabled:!1,isChatButtonHidden:Object(g.f)(g.c.IS_CHAT_BUTTON_HIDDEN)||!1,isPunchoutComplete:!1,shops:[],currentShop:null,shopRequests:[],USStates:[],jobTitles:[],company:{demo:!1,id:0,address:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},companyPreference:{garageBayIdVisible:!1,garageBayIdRequired:!1,vehicleFleetIdVisible:!1,vehicleFleetIdRequired:!1,poVisible:!1,poRequired:!1,companyId:0,id:0,poValidationMask:""},accountStatus:"",shopRequests:[{garageIdRequired:!1,garageBayIdVisible:!1,poRequired:!1,poVisible:!1,vehicleFleetIdRequired:!1,vehicleFleetIdVisible:!1,requested:!1,approved:!1,pending:!1,declined:!1,arAccountNumber:0,shopAddress:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},laborRate:0,pricingTypeModification:0,taxRateLabor:0,taxRateParts:0,companyId:0,notes:[{id:0,text:"",createdByUser:{firstName:"",lastName:"",loginName:""},createDateTime:"",internal:!1,shopRequestId:0}],id:0,pricingMethod:"",pricingType:"",requestStatus:"",customerLocationId:"",miscInfo:"",poValidationMask:"",shopFax:"",shopName:"",shopPhone:"",createDateTime:""}],accountName:"",arGroupCode:"",shopReferralEligible:!1,partsPayoffVisible:!1,paymentMethod:""},scrollToOffset:0,profile:"",cmsData:Object(g.f)(g.c.CMS_DATA)||Object(c.a)(),features:Object(g.f)(g.c.FEATURES)||[],featuresForStore:Object(g.f)(g.c.FEATURES_FOR_STORE)||[],tsm:{tsmEmailAddress:"",tsmFirstName:"",tsmLastName:"",tsmNumber:0},requests:{getAppData:Object(d.b)(),getUser:Object(d.b)({storageKey:g.c.USER,pollKey:"user",pollValue:e=>{let{getters:t}=e;return t.isAuthorizedUser}}),getUserShops:Object(d.b)(),getCurrentShop:Object(d.b)({cacheKey:g.a.CURRENT_SHOP,pollKey:"shop",pollValue:e=>{let{getters:t}=e;return t.selectedShopId}}),getStickySessionId:Object(d.b)(),getTSM:Object(d.b)(),getFeatures:Object(d.b)({storageKey:g.c.FEATURES,pollKey:"features"}),getFeaturesForStore:Object(d.b)({storageKey:g.c.FEATURES_FOR_STORE,pollKey:"featuresByStore",pollValue:e=>{var t,s;let{state:a}=e;return null===(t=a.currentShop)||void 0===t||null===(s=t.homeStore)||void 0===s?void 0:s.storeId}}
38),getCMSData:Object(d.b)(),getUSStates:Object(d.b)(),getJobTitles:Object(d.b)(),getShopRequests:Object(d.b)(),getCompany:Object(d.b)({cacheKey:g.a.COMPANY,pollKey:"company",pollValue:e=>{var t;let{state:s}=e;return null===(t=s.company)||void 0===t?void 0:t.id}}),getIsEarnbackEligible:Object(d.b)()},cmsContentRequests:{}},ce={updateRequestStatus:d.j,setUSStates(e,t){e.USStates=t},setJobTitles(e,t){e.jobTitles=t},setCompany(e,t){e.company=t},setAuthTokens(e,t){e.auth=(e=>{if(!e)return null;if(Object.prototype.hasOwnProperty.call(e,"accessExpiresOn"))return e;const t=Date.now();return{...e,accessExpiresOn:t+e.access_expiration,refreshExpiresOn:t+e.refresh_expiration}})(t)||null,e.auth?Object(g.o)(g.c.AUTH,e.auth):Object(g.m)(g.c.AUTH)},setCxmlCallbackUrl(e,t){e.cxmlCallbackUrl=t,e.cxmlCallbackUrl?Object(g.o)(g.c.CXML_CALLBACKURL,e.cxmlCallbackUrl):Object(g.m)(g.c.CXML_CALLBACKURL)},setTransactionId(e,t){e.transactionId=t,e.transactionId?Object(g.o)(g.c.TRANSACTION_ID,e.transactionId):Object(g.m)(g.c.TRANSACTION_ID)},setBuyerCookie(e,t){e.buyerCookie=t,e.buyerCookie?Object(g.o)(g.c.BUYER_COOKIE,e.buyerCookie):Object(g.m)(g.c.BUYER_COOKIE)},setUser(e,t){e.user=null!=t&&t.userId?t:ne(),e.user?Object(g.o)(g.c.USER,e.user):Object(g.m)(g.c.USER)},setStickySessionId(e,t){e.stickySessionId=t,null==t?Object(g.m)(g.c.STICKY_SESSION_ID):Object(g.o)(g.c.STICKY_SESSION_ID,t)},setMasqueradeRealUser(e,t){e.masqueradeRealUser=t,e.masqueradeRealUser?Object(g.o)(g.c.MASQUERADE_REAL_USER,e.masqueradeRealUser):Object(g.m)(g.c.MASQUERADE_REAL_USER)},setMasqueradeSource(e,t){e.masqueradeSource=t,t?Object(g.o)(g.c.MASQUERADE_SOURCE,t):Object(g.m)(g.c.MASQUERADE_SOURCE)},setShops(e,t){e.shops=t||[]},setFeatures(e,t){e.features=t||[];Object(g.o)(g.c.FEATURES,e.features,9e5)},setFeaturesForStore(e,t){e.featuresForStore=t||[];Object(g.o)(g.c.FEATURES_FOR_STORE,e.featuresForStore,9e5)},setCurrentShop(e,t){e.currentShop=t?{...t}:null,e.isCostHidden=!e.currentShop||Boolean(e.currentShop.hideCosts),Object(g.o)(g.c.IS_COST_HIDDEN,e.isCostHidden)},setShopRequests(e,t){e.shopRequests=t||[]},setAppData(e,t){let{csrfObject:s,googleMapsKey:a,imageServerUrl:r,version:i,promoImagesUrl:n,profile:l,teamviewerAndroidURL:c,teamviewerChromeURL:u,teamviewerIosURL:d,teamviewerMacURL:h,teamviewerWindowsURL:p,supportEmail:m}=t;e.csrfObject=s,e.googleMapsKey=a,e.imageServerUrl=r,e.version=i,e.promoImagesUrl=n,e.profile=l,e.teamviewerAndroidURL=c,e.teamviewerChromeURL=u,e.teamviewerIosURL=d,e.teamviewerMacUrl=h,e.teamviewerWindowsURL=p,e.supportEmail=m||e.supportEmail,!e.isSPA&&null!=s&&s.token&&(o.a.defaults.headers.common["X-CSRF-Token"]=s.token)},setIsCostHidden(e,t){e.isCostHidden=t,Object(g.o)(g.c.IS_COST_HIDDEN,e.isCostHidden)},setIsEarnbackEligible(e,t){e.isEarnbackEligible=t,null===t?Object(g.m)(g.c.IS_EARNBACK_ELIGIBLE):Object(g.o)(g.c.IS_EARNBACK_ELIGIBLE,e.isEarnbackEligible)},setIsChatReady(e,t){e.isChatReady=t},setIsChatDisabled(e,t){e.isChatDisabled=t},setIsChatButtonHidden(e,t){if(e.isChatButtonHidden=t,!0===t){const e=864e5;Object(g.o)(g.c.IS_CHAT_BUTTON_HIDDEN,!0,e)}else Object(g.m)(g.c.IS_CHAT_BUTTON_HIDDEN)},setIsPunchoutComplete(e,t){e.isPunchoutComplete=t},updateUserPreferences(e){var t,s,a;let{firstName:r=e.user.firstName,lastName:i=e.user.lastName,emailAddress:o=e.user.emailAddress,loginName:n=e.user.loginName,selectedStylesheet:l=(null===(t=e.user.userPreference)||void 0===t?void 0:t.selectedStylesheet),languageCode:c=(null===(s=e.user.userPreference)||void 0===s?void 0:s.languageCode),selectedShopId:u=(null===(a=e.user.userPreference)||void 0===a?void 0:a.selectedShopId)}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.user={...e.user,firstName:r,lastName:i,emailAddress:o,loginName:n,userPreference:{...e.user.userPreference,selectedStylesheet:l,languageCode:c,selectedShopId:u}},Object(g.o)(g.c.USER,e.user)},updateCompanyPreferences(e,t){let{accountName:s,demo:a,address:r,companyPreference:i}=t;e.currentShop.company={...e.currentShop.company,accountName:s,address:r,demo:a,companyPreference:i}},setUserEmailAddress(e,t){e.user.emailAddress=t,Object(g.o)(g.c.USER,e.user)},setUserEmailUpdateRequired(e,t){e.user&&(e.user.emailUpdateRequired=t)},setScrollToOffset(e,t){e.scrollToOffset=Number(t)||0}
38,setCMSData(e,t){e.cmsData=t,Object(g.o)(g.c.CMS_DATA,e.cmsData)},setCMSContentRequest(e,t){const{name:s,abortController:a,isFinished:r}=t;e.cmsContentRequests[s]={abortController:a,isFinished:r}},setTSM(e,t){e.tsm=t},setIsLoggingOut(e,t){e.isLoggingOut=Boolean(t)},setPasswordChangeRequired(e,t){ie?(e.isPasswordChangeRequired=Boolean(t),e.isPasswordChangeRequired?Object(g.o)(g.c.PASSWORD_CHANGE_REQUIRED,e.isPasswordChangeRequired):Object(g.m)(g.c.PASSWORD_CHANGE_REQUIRED)):e.user.passwordChangeRequired=Boolean(t)},setTermsAcceptRequired(e,t){e.isTermsAcceptRequired=Boolean(t),e.isTermsAcceptRequired?Object(g.o)(g.c.TERMS_ACCEPT_REQUIRED,e.isTermsAcceptRequired):Object(g.m)(g.c.TERMS_ACCEPT_REQUIRED)},setCachedItemLastRefresh(e,t){let{cacheKey:s,refreshedOn:a}=t;const r=Object(g.e)(s);g.n[r]=a}};let ue;const de={async requestIfIdle(e){let{dispatch:t}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];await t("requestAll",{requests:s,force:!1})},async requestAll(e,t){let{state:s,dispatch:a}=e,{requests:r=[],force:i=!0}=t;const o=r.map((e=>{let t="",a=e;return e.indexOf("/")>-1&&([t,a]=e.split("/")),{action:e,requestName:a,namespacedState:t?s[t]:s}}));o.forEach((e=>{let{namespacedState:t,requestName:s,action:r}=e;(i||Object(d.d)(t.requests[s]))&&a(r)})),await Promise.all(o.map((e=>{let{namespacedState:t,requestName:s}=e;return Object(d.g)((()=>t.requests[s]))})))},async setAuthAndGetUser(e,t){let{commit:s,dispatch:a}=e;clearTimeout(ue),s("setAuthTokens",t),a("startRefreshTimer"),a("usageTracking/clearLookups"),await a("requestAll",{requests:["getUser"]})},async refreshAuth(e){let{state:t,commit:s}=e;const{data:a}=await o.a.get(Object(n.c)("/auth/rest/refresh"),{headers:{Authorization:`Bearer ${t.auth.refresh_token}`}});s("setAuthTokens",a)},resetRequests(e){let{getters:t,commit:s}=e;Object.values(t.namespacedRequests).forEach((e=>{let{namespace:t,requestName:a}=e;s(t?`${t}/updateRequestStatus`:"updateRequestStatus",{name:a,...Object(d.b)()})}))},async logout(e){let{state:t,commit:s,dispatch:a}=e;clearTimeout(ue),a("resetRequests"),s("setAuthTokens",null),a("requestAll",{requests:["getFeatures","getCMSData"]}),s("setUser",ne()),s("setStickySessionId",null),s("setIsEarnbackEligible",null),s("setMasqueradeRealUser",null),a("clearCurrentVehicleAndQuote"),a("partSelection/clearLookupDetails"),a("usageTracking/clearLookups"),s("setCurrentShop",null),s("setCompany",{demo:!1,id:0,address:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},companyPreference:{garageBayIdVisible:!1,garageBayIdRequired:!1,vehicleFleetIdVisible:!1,vehicleFleetIdRequired:!1,poVisible:!1,poRequired:!1,companyId:0,id:0,poValidationMask:""},accountStatus:"",shopRequests:[{garageIdRequired:!1,garageBayIdVisible:!1,poRequired:!1,poVisible:!1,vehicleFleetIdRequired:!1,vehicleFleetIdVisible:!1,requested:!1,approved:!1,pending:!1,declined:!1,arAccountNumber:0,shopAddress:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},laborRate:0,pricingTypeModification:0,taxRateLabor:0,taxRateParts:0,companyId:0,notes:[{id:0,text:"",createdByUser:{firstName:"",lastName:"",loginName:""},createDateTime:"",internal:!1,shopRequestId:0}],id:0,pricingMethod:"",pricingType:"",requestStatus:"",customerLocationId:"",miscInfo:"",poValidationMask:"",shopFax:"",shopName:"",shopPhone:"",createDateTime:""}],accountName:"",arGroupCode:"",shopReferralEligible:!1,partsPayoffVisible:!1,paymentMethod:""}),s("setTSM",{}),s("setPasswordChangeRequired",!1),s("setTermsAcceptRequired",!1),s("setFeaturesForStore",[]),Object(c.d)(t.cmsData)||s("setCMSData",Object(c.a)())},startRefreshTimer(e){let{state:t,dispatch:s}=e;clearTimeout(ue);const a=Date.now(),{accessExpiresOn:r,refreshExpiresOn:i}=t.auth||{};if(!i||i<=a)return;const o=r-Date.now();ue=setTimeout((()=>{s("refreshAuth")}),o)},async getUser(e){let{commit:t,getters:s,dispatch:a}=e;const r=await Object(d.i)(t,"getUser",ie?Object(h.c)():Object(h.d)()),i=(null==r?void 0:r.data)||{};
38ie||null!=i&&i.userId||!s.isAuthorizedUser?t("setUser",i):a("logout")},async getStickySessionId(e,t){let{commit:s}=e;const a=t?{headers:{Authorization:`Bearer ${t}`}}:void 0,r=await Object(d.i)(s,"getStickySessionId",o.a.get(Object(n.c)("/current/stickySessionInfo"),a));if(null==r||!r.data)return;const{excludedFromStickySession:i,userId:l,shopId:c}=r.data;if(!l||!c)return;s("setStickySessionId",i?`${l}_${c}`:`${c}`)},async getUserShops(e){let{dispatch:t,commit:s,state:a}=e;const r=await Object(d.i)(s,"getUserShops",t("requestIfIdle",["getUser"]).then((()=>Object(u.f)(a.user.userId))));s("setShops",(null==r?void 0:r.data)||[])},async saveUserPreferences(e,t){var s,a;let{commit:r,state:{user:i}}=e,{firstName:o=i.firstName,lastName:n=i.lastName,emailAddress:l=i.emailAddress,loginName:c=i.loginName,selectedStylesheet:u=(null===(s=i.userPreference)||void 0===s?void 0:s.selectedStylesheet),languageCode:d=(null===(a=i.userPreference)||void 0===a?void 0:a.languageCode)}=t;const p={firstName:o,lastName:n,emailAddress:l,loginName:c,selectedStylesheet:u,languageCode:d};await Object(h.h)({...p,userId:i.userId}),r("updateUserPreferences",p)},async saveCompanyPreferences(e,t){let{commit:s}=e;await(e=>{let{accountName:t,demo:s,address:a,companyPreference:r,companyId:i}=e;const l={accountName:t,demo:s,street1:a.street1,street2:a.street2,city:a.city,state:a.state,zip:a.zip,garageBayIdVisible:r.garageBayIdVisible,garageBayIdRequired:r.garageBayIdRequired,poVisible:r.poVisible,poRequired:r.poRequired,poValidationMask:r.poValidationMask,vehicleFleetIdVisible:r.vehicleFleetIdVisible,vehicleFleetIdRequired:r.vehicleFleetIdRequired};return o.a.post(Object(n.c)(`/company/savePreferencesByCompanyId?companyId=${i}`),l)})(t),s("updateCompanyPreferences",t)},async getFeatures(e){let{commit:t}=e;const s=await Object(d.i)(t,"getFeatures",o.a.get(Object(n.c)("/info/features/global")));t("setFeatures",(null==s?void 0:s.data)||[])},async getFeaturesForStore(e){let{state:t,commit:s,dispatch:a}=e;const r=await Object(d.i)(s,"getFeaturesForStore",a("requestIfIdle",["getCurrentShop"]).then((()=>{return e=t.currentShop.homeStore.storeId,o.a.get(Object(n.c)(`/info/features/store?storeNumber=${e}`));var e})));s("setFeaturesForStore",(null==r?void 0:r.data)||[])},async getCurrentShop(e){let{state:t,commit:s,dispatch:a,getters:r}=e;const i=await Object(d.i)(s,"getCurrentShop",r.selectedShopId?Object(u.d)(r.selectedShopId,!1,!0):a("requestIfIdle",["getUser"]).then((()=>r.selectedShopId?Promise.resolve(r.selectedShopId):a("requestIfIdle",["getUserShops"]).then((()=>t.shops[0].id)))).then((e=>Object(u.d)(e,!1,!0))));s("setCurrentShop",null==i?void 0:i.data)},async getShopRequests(e){let{state:t,commit:s,dispatch:a}=e;const r=await Object(d.i)(s,"getShopRequests",a("requestIfIdle",["getCurrentShop"]).then((()=>o.a.get(Object(n.c)(`/shop/${t.currentShop.id}/company/shopRequests`)))));s("setShopRequests",(null==r?void 0:r.data)||[])},async getCompany(e){let{state:t,commit:s,dispatch:a}=e;const r=await Object(d.i)(s,"getCompany",a("requestIfIdle",["getCurrentShop"]).then((()=>o.a.get(Object(n.c)(`/shop/${t.currentShop.id}/company`)))));s("setCompany",(null==r?void 0:r.data)||{demo:!1,id:0,address:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},companyPreference:{garageBayIdVisible:!1,garageBayIdRequired:!1,vehicleFleetIdVisible:!1,vehicleFleetIdRequired:!1,poVisible:!1,poRequired:!1,companyId:0,id:0,poValidationMask:""},accountStatus:"",shopRequests:[{garageIdRequired:!1,garageBayIdVisible:!1,poRequired:!1,poVisible:!1,vehicleFleetIdRequired:!1,vehicleFleetIdVisible:!1,requested:!1,approved:!1,pending:!1,declined:!1,arAccountNumber:0,shopAddress:{street1:"",street2:"",city:"",state:"",zip:"",flatAddress:"",completeAddress:!1,notEmpty:!1,combinedStreetAddress:""},laborRate:0,pricingTypeModification:0,taxRateLabor:0,taxRateParts:0,companyId:0,notes:[{id:0,text:"",createdByUser:{firstName:"",lastName:"",loginName:""},createDateTime:"",internal:!1,shopRequestId:0}],id:0,pricingMethod:"",pricingType:"",requestStatus:"",customerLocationId:"",miscInfo:"",poValidationMask:"",shopFax:"",shopName:"",shopPhone:"",createDateTime:""}],accountName:"",arGroupCode:"",shopReferralEligible:!1,partsPayoffVisible:!1,paymentMethod:""})},async getIsEarnbackEligible(e){let{state:t,commit:s,dispatch:a}=e;if(Object(g.h)(g.c.IS_EARNBACK_ELIGIBLE)){s("setIsEarnbackEligible",Object(g.f)(g.c.IS_EARNBACK_ELIGIBLE)),s("updateRequestStatus",{name:"getIsEarnbackEligible",status:d.h.SUCCESS,statusCode:200,error:null})}else{const e=await Object(d.i)(s,"getIsEarnbackEligible",a("requestIfIdle",["getCurrentShop"]).then((()=>o.a.get(Object(n.c)(`/admin/earnback/blocklist/status/${t.currentShop.accountNumber}`)))));s("setIsEarnbackEligible",void 0!==(null==e?void 0:e.data)&&null!==(null==e?void 0:e.data)&&!e.data)}},async getTSM(e){let{state:t,commit:s,dispatch:a}=e;const{data:r}=await Object(d.i)(s,"getTSM",a("requestIfIdle",["getCurrentShop"]).then((()=>o.a.get(Object(n.c)(`/shop/${t.currentShop.id}/tsm`)))));s("setTSM",r)}
38,async getAppData(e){let{commit:t}=e;const s=await Object(d.i)(t,"getAppData",o.a.get(Object(n.c)("/current/static"))),a=(null==s?void 0:s.data)||{};t("setAppData",a),t("usageTracking/setStaticData",a)},async getCMSData(e){let{commit:t,getters:s,dispatch:a}=e;if(Object(c.c)(s.isAuthorizedUser)){t("setCMSData",Object(g.f)(g.c.CMS_DATA)),t("updateRequestStatus",{name:"getCMSData",status:d.h.SUCCESS,statusCode:200,error:null})}else{const e=Object(n.c)("/current/dotcms?withToken=true"),r=await Object(d.i)(t,"getCMSData",s.isAuthorizedUser?a("requestIfIdle",["getCurrentShop"]).then((()=>{var t;const s=null!==(t=le.currentShop)&&void 0!==t&&t.id?`&shopId=${le.currentShop.id}`:"";return o.a.get(`${e}${s}`)})):o.a.get(e));t("setCMSData",(null==r?void 0:r.data)||Object(c.a)())}},getUSStates(e){let{commit:t}=e;const s=Object(n.c)("/constants?states=true");Object(d.i)(t,"getUSStates",o.a.get(s)).then((e=>{t("setUSStates",e.data.states)}))},getJobTitles(e){let{commit:t}=e;const s=Object(n.c)("/constants?jobTitles=true");Object(d.i)(t,"getJobTitles",o.a.get(s)).then((e=>{t("setJobTitles",e.data.jobTitles)}))},async saveUserEmailAddress(e,t){let{commit:s}=e;await Object(h.g)(t),s("setUserEmailAddress",t),s("setUserEmailUpdateRequired",!1)},async declineUserEmailUpdate(e){let{commit:t}=e;await Object(h.b)(),t("setUserEmailUpdateRequired",!1)},async refetchUserCriticalData(e){let{dispatch:t}=e;await t("requestAll",{requests:["getUserShops","getCurrentShop","getFeatures","getFeaturesForStore","getCMSData","getCompany","getShopRequests","getTSM","getIsEarnbackEligible"]})},async clearLocalUserData(e){let{dispatch:t,commit:s}=e;s("setPasswordChangeRequired",!1),s("setTermsAcceptRequired",!1),s("setIsEarnbackEligible",null),s("vehicleSelector/resetVehicleData"),t("partSelection/clearLookupDetails"),t("usageTracking/clearLookups")},async masquerade(e,t){let{dispatch:s,commit:a,state:r}=e;const i=await Object(h.f)(t),l={userId:r.user.userId};a("setAuthTokens",null==i?void 0:i.data),await o.a.get(Object(n.c)("/current/session")),await s("getStickySessionId"),a("setIsEarnbackEligible",null),a("setMasqueradeRealUser",l);a("setMasqueradeSource",ie?window.location.pathname+window.location.search:window.location.href),await s("clearCurrentVehicleAndQuote"),s("resetRequests"),s("getUser"),await Object(d.g)((()=>r.requests.getUser)),ie&&(s("clearLocalUserData"),await s("refetchUserCriticalData"))},async stopMasquerade(e){let{state:t,commit:s,dispatch:a}=e;const r=await Object(h.i)();s("setAuthTokens",null==r?void 0:r.data),await o.a.get(Object(n.c)("/current/session")),await a("getStickySessionId"),s("setIsEarnbackEligible",null),await a("clearCurrentVehicleAndQuote"),a("resetRequests"),a("getUser"),await Object(d.g)((()=>t.requests.getUser)),s("setMasqueradeRealUser",null),ie&&(a("clearLocalUserData"),await a("refetchUserCriticalData"))},async selectShop(e,t){let{commit:s,dispatch:a}=e;await Object(u.i)(t);const r=Object(g.f)(g.c.AUTH)||{},{refresh_token:i}=r;let o;if(i){const{data:e}=await Object(u.b)(t,i);s("setAuthTokens",e);const{access_token:a}=e||{};o=a}await a("clearCurrentVehicleAndQuote"),await a("getStickySessionId",o),s("updateUserPreferences",{selectedShopId:t}),s("setIsEarnbackEligible",null),await a("requestAll",{requests:["getFeaturesForStore","getCompany","getIsEarnbackEligible"]}),await a("getCurrentShop"),await a("getTSM")},async clearCurrentVehicleAndQuote(e){let{dispatch:t,getters:s}=e;const a=["getFeatures"];s.isAuthorizedUser&&a.push("getFeaturesForStore"),await t("requestIfIdle",a),s.isAuthorizedUser&&s.isFeatureDisabled("entsearch")&&await Object(y.f)(),t("vehicleSelector/clearCurrentVehicle"),t("miniQuote/clearQuote")},async abortCMSContentRequest(e,t){var s;let{state:a}=e;null===(s=a.cmsContentRequests[t])||void 0===s||s.abortController.abort()},finishCMSContentRequest(e,t){let{state:s}=e;const a=s.cmsContentRequests[t];a&&(a.isFinished=!0)},setCMSContentRequest(e,t){let{commit:s}=e;s("setCMSContentRequest",t)}},he={isAuthExpired:e=>{let{auth:t}=e;return!t||(null==t?void 0:t.accessExpiresOn)<Date.now()},isRefreshExpired:e=>{let{auth:t}=e;return!t||(null==t?void 0:t.refreshExpiresOn)<Date.now()},isMasquerade:e=>{let{masqueradeRealUser:t,user:s}=e;return!(!t||!s)&&(ie?t.userId!==(null==s?void 0:s.userId):s.masquerade)},isAuthorizedUser:(e,t)=>{let{user:s,isPasswordChangeRequired:a,isTermsAcceptRequired:r}=e,{isRefreshExpired:i,isMasquerade:o}=t;return ie?!i&&Boolean(s)&&(!a&&!r||o):s.authenticated&&(!s.passwordChangeRequired||(null==s?void 0:s.masquerade))},isTeamMember:(e,t)=>{let{user:s}=e,{isAuthorizedUser:a}=t;return!!a&&(ie?s.group.internal:s.teamMember)},isWebUser:e=>{let{user:t}=e;return!t.customerType||"WEB"===t.customerType},isMitchell1User:e=>{let{user:t}=e;return"MITCHELL"===t.customerType},isROWriterUser:e=>{let{user:t}=e;return"ROWRITER"===t.customerType},isSmartEquipUser:e=>{let{user:t}=e;return"SMARTEQUIP"===t.customerType},isCXMLUser:e=>{var t;let{user:s}=e;return Boolean(ie?null==s||null===(t=s.customerType)||void 0===t?void 0:t.cxmlFlag:s.isCxml)},isSMSUser:e=>{var t;let{user:s}=e;return Boolean(ie?null==s||null===(t=s.customerType)||void 0===t?void 0:t.smsFlag:s.customerTypeSms)},isDemo:e=>{let{company:t}=e;return Boolean(null==t?void 0:t.demo)},selectedShopId:e=>{var t;let{user:s}=e;return null==s||null===(t=s.userPreference)||void 0===t?void 0:t.selectedShopId},isLaborHidden:(e,t)=>{let{isROWriterUser:s}=t;return s},isStorePhoneHidden:(e,t)=>{var s;let{currentShop:a}=e,{isTeamMember:r}=t;return 4031===(null==a||null===(s=a.homeStore)||void 0===s?void 0:s.storeId)&&r},isPartsPayoffVisible:(e,t)=>
38{let{company:s}=e,{userCanAccessSupport:a,userHasAnyRole:r}=t;return!!a||(null==s?void 0:s.partsPayoffVisible)&&r(p.f.COMPANY_MANAGER,p.f.SHOP_MANAGER)},isShopReferralEligible:(e,t)=>{let{company:s}=e,{userCanAccessSupport:a,userHasAnyRole:r}=t;return!!a||(null==s?void 0:s.shopReferralEligible)&&r(p.f.COMPANY_MANAGER,p.f.SHOP_MANAGER)},userHasAnyRole:e=>{let{user:t}=e;return function(){var e;const s=ie?null==t||null===(e=t.group)||void 0===e?void 0:e.name:null==t?void 0:t.group;for(var a=arguments.length,r=new Array(a),i=0;i<a;i++)r[i]=arguments[i];return Boolean(s)&&r.some((e=>s===e))}},userCanAccessSupport:(e,t)=>{let{userHasAnyRole:s}=t;return s(p.f.SUPERUSER,p.f.SYSADMIN,p.f.INSTALLER_SUPPORT,p.f.MARKETING)},userCanEditCompany:(e,t)=>{let{isSMSUser:s,userHasAnyRole:a}=t;return!s&&a(p.f.SUPERUSER,p.f.INSTALLER_SUPPORT,p.f.COMPANY_MANAGER,p.f.DEMO_USER)},userCanViewCompanyDashboard:(e,t)=>{let{isSMSUser:s,userHasAnyRole:a}=t;return Object(g.i)()||!s&&a(p.f.SUPERUSER,p.f.INSTALLER_SUPPORT,p.f.COMPANY_MANAGER,p.f.SHOP_MANAGER,p.f.DEMO_USER)},userCanEditShop:(e,t)=>{let{isSMSUser:s,userCanEditCompany:a,userHasAnyRole:r}=t;return!s&&(a||r(p.f.SYSADMIN,p.f.SHOP_MANAGER,p.f.MARKETING))},userCanAddShop:(e,t)=>{let{company:s}=e,{userCanEditCompany:a,userHasAnyRole:r}=t;return a&&!(r(p.f.INSTALLER_SUPPORT)&&null!=s&&s.demo)},userCanViewStatements:(e,t)=>{let{userHasAnyRole:s}=t;return s(p.f.SUPERUSER,p.f.SYSADMIN,p.f.INSTALLER_SUPPORT,p.f.COMPANY_MANAGER,p.f.SHOP_MANAGER,p.f.MARKETING,p.f.OREILLY_EMPLOYEE,p.f.DEMO_USER,p.f.SMS)},userCanViewLaborClaims:(e,t)=>{let{userHasAnyRole:s}=t;return s(p.f.SUPERUSER,p.f.SYSADMIN,p.f.INSTALLER_SUPPORT,p.f.COMPANY_MANAGER,p.f.SHOP_MANAGER,p.f.MARKETING,p.f.OREILLY_EMPLOYEE,p.f.DEMO_USER,p.f.SMS)},userCanViewActivityLog:(e,t)=>{let{isSMSUser:s,userCanEditCompany:a,userHasAnyRole:r}=t;return!s&&(a||r(p.f.SYSADMIN,p.f.SHOP_MANAGER))},featuresByKey:e=>{let{features:t}=e;return t.reduce(((e,t)=>(e[t.descriptor]=t,e)),{})},featuresForStoreByKey:e=>{let{featuresForStore:t}=e;return t.reduce(((e,t)=>(e[t.descriptor]=t,e)),{})},isFeatureDisabled:(e,t)=>{let{features:s,featuresForStore:a}=e,{featuresByKey:r,featuresForStoreByKey:i,isAuthorizedUser:o}=t;return e=>{var t,n;const l=!s.length||!1===(null===(t=r[e])||void 0===t?void 0:t.enabled),c=!a.length||!1===(null===(n=i[e])||void 0===n?void 0:n.enabled);return o?l||c:l}},userDefaultLandingPage:(e,t)=>{let{currentShop:s}=e,{isAuthorizedUser:a,userHasAnyRole:r,isMitchell1User:i,isROWriterUser:o,isSmartEquipUser:n,isCXMLUser:l}=t;return a?r(p.f.INSTALLER_SUPPORT,p.f.MARKETING)?ie?"/support":"/admin/support.html":null!=s&&s.carCustomer?ie?"/car-admin":"/carLanding.html":i||o||n||l?ie?"/catalog/browse":"/catalog/browse.html":ie?"/home":"/":ie?"/login":"/login.html"},namespacedRequests(e){const t={};return Object.keys(e.requests).forEach((s=>{t[s]={requestName:s,namespace:null,request:e.requests[s]}})),Object.keys(e).filter((t=>Object(l.a)(e[t])&&Object.prototype.hasOwnProperty.call(e[t],"requests"))).forEach((s=>{const{requests:a}=e[s];if(!a)return[];Object.keys(a).forEach((e=>{t[`${s}/${e}`]={requestName:e,namespace:s,request:a[e]}}))})),t},cmsContentRequestFinished:(e,t)=>e.cmsContentRequests[t].isFinished},pe=new r.a.Store({state:le,mutations:ce,actions:de,getters:he,modules:{vehicleSelector:b,miniQuote:w,stockOrderQuickAdd:A,opp:k,kits:R,partSelection:D,usageTracking:ee,activityTracking:re}});window.addEventListener("storage",(e=>{let{key:t}=e;if(t!==g.c.AUTH)return;const s=pe.state.auth,a=Object(g.f)(g.c.AUTH);JSON.stringify(s)!==JSON.stringify(a)&&(pe.commit("setAuthTokens",Object(g.f)(t)),pe.dispatch("startRefreshTimer"))}));const me=e=>{const t=Object(g.e)(e);return(e=>Object.prototype.hasOwnProperty.call(g.n,e))(t)&&Number(g.n[t])||0},ge=e=>{const t=(e=>{const t=g.d[e],s=me(e);return t&&s?s+t:0})(e);return!(!g.d[e]||t)||Boolean(t&&Date.now()>=t)},ve=new Set;le.isSPA&&setInterval((async()=>{const{namespacedRequests:e}=pe.getters,t=[],s={};if(Object.keys(e).forEach((a=>{const{request:{pollKey:r,pollValue:i,storageKey:o,status:n,cacheKey:l}}=e[a],c=i&&i(pe);
38if(!Boolean(r&&c))return;const u=Object(d.e)({status:n})||ve.has(r);if(o){if(!Object(g.k)(o)||u)return}else if(l&&(!ge(l)||u))return;s[r]=t.push({name:a,key:r,value:c,storageKey:o,cacheKey:l})-1,ve.add(r)})),!t.length)return;const{data:a}=await o.a.get(Object(n.c)("/meta"),{params:Object.fromEntries(t.map((e=>{let{key:t,value:s}=e;return[t,s]})))}),r=[];a.forEach((e=>{let{lastModified:a,entity:i,status:o}=e;ve.delete(i);const n=Object.prototype.hasOwnProperty.call(s,i);if("OK"!==o||!n)return;const l=new Date(a).getTime();let c=null,u=null;t[s[i]].storageKey?c=t[s[i]].storageKey:t[s[i]].cacheKey&&(u=t[s[i]].cacheKey);let d=null;if(c)d=Object(g.g)(c);else if(u){const e=Object(g.e)(u);d=g.n[e]||Date.now()}if(l<d)return void(c?Object(g.p)(c,Date.now()):pe.commit("setCachedItemLastRefresh",{cacheKey:u,refreshedOn:Date.now()}));const{name:h,storageKey:p,cacheKey:m}=t[s[i]];r.push(h),p&&Object(g.m)(p),m&&(e=>{const t=Object(g.e)(e);delete g.n[t]})(m)})),r.length&&pe.dispatch("requestAll",{requests:r})}),Object(n.s)(30));t.a=pe},90:function(e,t,s){var a=s(254);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("a083f776",a,!1,{})},91:function(e,t,s){var a=s(256);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("a856f23c",a,!1,{})},92:function(e,t,s){var a=s(258);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("7415728c",a,!1,{})},93:function(e,t,s){var a=s(260);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("bdb30ae4",a,!1,{})},94:function(e,t,s){var a=s(262);a.__esModule&&(a=a.default),"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,s(11).default)("4d5be560",a,!1,{})},95:function(e,t,s){"use strict";var a=function(){var e=this,t=e.$createElement;return(e._self._c||t)("Attribute",{attrs:{tag:e.tag,canRemove:e.canRemove,name:e.attributeName,value:e.attributeValue,loading:e.loading},on:{remove:function(t){return e.$emit("remove",e.attribute)}}})};a._withStripped=!0;var r={name:"VehicleAttribute",components:{Attribute:s(73).a},props:{attribute:{type:Object,default:()=>({})},canRemove:{type:Boolean,default:!0},tag:{type:String,default:"div"},loading:{type:Boolean,default:!1}},computed:{attributeName(){return this.attribute.attributeDescription},attributeValue(){return this.attribute.displayDescription?this.attribute.displayDescription:this.attribute.valueDescription}}},i=s(4),o=Object(i.a)(r,a,[],!1,null,null,null);t.a=o.exports},96:function(e,t,s){"use strict";s.d(t,"a",(function(){return rt}));var a=s(16),r=s(13),i=s(219),o=s(63),n=s(218),l=s(1),c=s.n(l),u=s(9),d=s(43),h=s(44);const p=function(){let{url:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===e.indexOf("http")&&window.location.origin!==new URL(e,document.baseURI).origin},m=/\/(?:admin\/(?:endM|m)asquerade|current\/session)/;const g=/\/((current|session)\/(user(?!\/shops)|static|stickySessionInfo)|auth\/rest\/refresh|shop\/shopDetails)/;c.a.interceptors.request.use((function(e){return!p(e)&&m.test(e.url)&&u.b.auth?{...e,headers:{...e.headers,Authorization:`Bearer ${u.b.auth.access_token}`,"X-Commit-Session":!0}}:e})),c.a.interceptors.request.use((function(e){var t,s;return p(e)||null===(t=u.b.i18n)||void 0===t||!t.locale?e:{...e,headers:{...e.headers,"Accept-Language":null===(s=u.b.i18n)||void 0===s?void 0:s.locale}}})),c.a.interceptors.request.use((async function(e){if(p(e))return e;if(!u.b.stickySessionId){if(g.test(e.url)||!u.a.getters.isAuthorizedUser)return e;await u.a.dispatch("requestIfIdle",["getStickySessionId"])}return u.b.stickySessionId?{...e,headers:{...e.headers,"x-sticky":u.b.stickySessionId}}:e})),c.a.interceptors.response.use((e=>e),(async function(e){var t,s;if(p(e.config)||(null===(t=e.response)||void 0===t?void 0:t.status)!==d.a.UNAUTHORIZED)return Promise.reject(e);let a=e;if(!!u.b.auth&&m.test(null===(s=e.config)||void 0===s?void 0:s.url)){var r,i;const t=null===(r=e.config)||void 0===r?void 0:r.url.includes("/auth/rest/refresh"),s=!(null===(i=e.config)||void 0===i||!i.isRetry);if(!t&&!s)try{var o;
38return await u.a.dispatch("refreshAuth"),c()({...e.config,headers:{...null===(o=e.config)||void 0===o?void 0:o.headers,Authorization:`Bearer ${u.b.auth.access_token}`},isRetry:!0})}catch(e){a=e}}return Promise.reject(a)})),c.a.interceptors.response.use((e=>e),(async function(e){var t,s,a;if(p(e.config)||(null===(t=e.response)||void 0===t?void 0:t.status)!==d.a.FORBIDDEN)return Promise.reject(e);const r=null===(s=e.response)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.errorId;return r===h.ForbiddenReason.ACCEPT_TERMS_REQUIRED?u.a.commit("setTermsAcceptRequired",!0):r===h.ForbiddenReason.PASSWORD_RESET_REQUIRED&&u.a.commit("setPasswordChangeRequired",!0),Promise.reject(e)})),c.a.interceptors.response.use((function(e){if(!u.b.isSPA){var t;const{request:{responseURL:s}}=e;null!==(t=u.b.user)&&void 0!==t&&t.authenticated&&s.includes("login.html")&&u.a.dispatch("logout")}return e})),c.a.defaults.baseURL=void 0;var v=s(5),f=s(17),S=s(22);const b={},y={basicChars:{getMessage:()=>Object(f.a)("validation.invalidInput","Invalid input - Special characters not allowed."),validate:S.b},basicCharsMultiline:{getMessage:()=>Object(f.a)("validation.invalidInput","Invalid input - Special characters not allowed."),validate:S.c},personName:{getMessage:()=>Object(f.a)("validation.invalidInput","Invalid input - Special characters not allowed."),validate:S.f},poMask:{getMessage:()=>Object(f.a)("validation.poNumber","Please enter a valid PO mask."),validate:S.i},poMaskLength:{getMessage:()=>Object(f.a)("validation.poNumberLength","PO Numbers cannot exceed 22 characters."),validate:S.j},loginName:{getMessage:()=>Object(f.a)("validation.invalidInput","Invalid input - Special characters not allowed."),validate:S.h},numberWithCommas:{getMessage:()=>Object(f.a)("validation.numberWithCommas","Please enter a valid number."),validate:S.e},decimalPlaces:{getMessage:()=>Object(f.a)("validation.decimalPlaces","Value must have {0} or less decimal places."),validate:(e,t)=>{const s=e.toString().split(".");return!(s.length>1)||s[1].length<=t[0]}},usPhone:{getMessage:()=>Object(f.a)("validation.phoneUS","Please specify a valid phone number."),validate:S.g},zipCode:{getMessage:()=>Object(f.a)("validation.zip","Please enter a valid zip code."),validate:S.l},fcoEmail:{getMessage:()=>Object(f.a)("validation.email","Please enter a valid e-mail address."),validate:S.d},vin:{getMessage:()=>Object(f.a)("validation.vin","Please enter a valid VIN number."),validate:S.k},noSpace:{getMessage:()=>Object(f.a)("validation.noSpace","Value may not include the space character."),validate:S.a}},I=Object.keys(y);I.forEach((e=>{r.c.extend(e,y[e])}));const _=async e=>{b[e]||(b[e]=await(async e=>{let t;return e===v.e.EN?t=await s.e(63).then(s.t.bind(null,1919,7)):e===v.e.ES&&(t=await s.e(64).then(s.t.bind(null,1920,7))),t})(e)),r.c.localize(e,{locale:e,messages:{...b[e].messages,...I.reduce(((e,t)=>(e[t]=y[t].getMessage,e)),{})}})};var w=s(2);function E(e){E.cache||(E.cache={});const t=function(){let{default:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e||{}};let a=E.cache[e];return a||(e===v.e.EN?a=s.e(57).then(s.t.bind(null,1917,3)).then(t):e===v.e.ES&&(a=s.e(58).then(s.t.bind(null,1918,3)).then(t)),E.cache[e]=a),a}const O="locale";function C(){let e=Object(w.g)(O);if(e||(e=localStorage.getItem(O)),!e)return null;try{return JSON.parse(e)}catch(t){return e}}var T={install(e){const t=e=>e===v.e.EN,s=e=>t(e)||Object.values(v.e).includes(e);u.a.registerModule("i18n",{namespaced:!0,state:{locale:v.e.EN,messages:{}},mutations:{setLocale(e,t){s(t)&&(e.locale=t)},setMessages(e,t){let{locale:a,messages:r}=t;s(a)&&(e.messages[a]=r)}}
38,actions:{async changeLocale(e){let{commit:t,state:a,getters:r,dispatch:i}=e,{locale:o=v.e.EN,cache:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=s(o)?o:v.e.EN;r.hasLocale(o)&&l===a.locale||(n&&function(e){Object(w.t)(O,e,3650)}(JSON.stringify(l)),r.hasLocale(l)||await i("requestLocale",l),t("setLocale",l),_(l))},async selectDefaultLocale(e,t){let{dispatch:a}=e;return a("changeLocale",{locale:[t,C(),navigator.language].map((e=>"string"!=typeof e?null:e.split("-")[0].toLowerCase())).find((e=>s(e)))||v.e.EN})},async requestLocale(e){let{commit:t,getters:a}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.e.EN;if(!s(r)||a.hasLocale(r))return;t("setMessages",{locale:r,messages:await E(r)})}},getters:{localeOptions:(e,t)=>[{value:v.e.EN,label:t.fcoM("common.english","English")||""},{value:v.e.ES,label:t.fcoM("common.espanol","Español")||""}],isLocaleEnglish:e=>{let{locale:s}=e;return t(s)},isLocaleSpanish:e=>{let{locale:t}=e;return(e=>e===v.e.ES)(t)},hasLocale:e=>{let{messages:t}=e;return e=>Object.prototype.hasOwnProperty.call(t,e)&&Object.keys(t[e]).length},fcoM:e=>{let{locale:t,messages:s}=e;return function(e){var a,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(null===(a=s[v.e.EN])||void 0===a?void 0:a[e])||"";return t===v.e.EN?i:(null===(r=s[t])||void 0===r?void 0:r[e])||i}}}}),e.mixin({computed:{fcoM(){return this.$store.getters["i18n/fcoM"]}}})}},P={methods:{fcoUrl:w.c}},A=s(67),k=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"fco-app-content",class:e.themeClass},[e.isLocalTestProfile&&e.showProfile?s("div",{staticClass:"profile-label align-items-center d-flex py-1 px-3 text-bold"},[s("div",{staticClass:"flex-fill text-sm"},[e._v("connected to test resources")]),e._v(" "),s("a",{staticClass:"ml-3 text-lg text-white text-bold text-decoration-none",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showProfile=!1}}},[e._v("×")])]):e._e(),e._v(" "),e.isErrorPage||e.disableHeader||e.isFullScreen?e._e():[!e.isAuthorizedUser||e.isLoginPage||e.hasUserAccessRequirements?s("PublicHeader"):[s("BroadcastMessages"),e._v(" "),s("AdminBar",{staticClass:"d-none d-lg-block d-print-none"}),e._v(" "),s("MainNav"),e._v(" "),s("InfoBar",{directives:[{name:"show",rawName:"v-show",value:!e.isHideInfoBar,expression:"!isHideInfoBar"}]})]],e._v(" "),s("div",{staticClass:"flex-fill"},[e.isSPA?[s("RouterView")]:e._t("default")],2),e._v(" "),e.isErrorPage||e.disableFooter||e.isFullScreen?e._e():s("FcoFooter"),e._v(" "),s("FcoToast"),e._v(" "),s("FcoLoading"),e._v(" "),s("MobileAppBanner")],2)};k._withStripped=!0;var R=s(3),M=function(){var e,t,s,a=this,r=a.$createElement,i=a._self._c||r;return i("nav",{class:["admin-bar",{"admin-bar-vertical":a.isVertical,"admin-bar-horizontal":a.isHorizontal}]},[i("div",{class:["admin-bar-container d-flex py-1",{"align-items-center":a.isHorizontal,"flex-column":a.isVertical}]},[i("span",{staticClass:"admin-bar-account-name pr-3 py-1 my-1 mr-2"},[a.accountName?[a._v(a._s(a.accountName))]:i("VueSkeletonLoader",{attrs:{type:"rect",width:125,height:18,rounded:!0}})],2),a._v(" "),a.shops.length>1?i("FcoSearchSelect",{ref:"shopSearch",staticClass:"shop-select bg-light text-black",attrs:{value:a.shopSearchVal,"allow-empty":!1,options:a.shops,"map-option":function(e){return{value:e.id,label:e.shopNameAndAccount}},"menu-container":a.$refs.shopSearch,"input-class":["shop-select-input"],mode:"fuzzy",searchKeys:["label"],placeholder:a.tempShopName},on:{focus:a.handleFocus,blur:a.handleBlur,select:a.handleShopSelect}}):i("span",{staticClass:"admin-bar-shop-name"},[null!==(e=a.currentShop)&&void 0!==e&&e.id?[a._v(a._s(null===(t=a.currentShop)||void 0===t?void 0:t.shopName))]:i("VueSkeletonLoader",{attrs:{type:"rect",width:100,height:18,rounded:!0}})],2),a._v(" "),i("ul",{class:["nav admin-bar-nav",{"ml-auto":a.isHorizontal,"flex-column":a.isVertical}]},[i("li",{staticClass:"nav-item position-relative"},[i("ChatButton",{staticClass:"nav-link",attrs:{label:a.fcoM("common.chatForHelp","Chat for Help")}}),a._v(" "),a.showChatTooltip?i("div",{staticClass:"chat-tooltip px-3 pb-3 shadow"},[i("div",{staticClass:"text-right"},[i("span",{staticClass:"font-weight-bold close-x",on:{click:function(e){a.showChatTooltip=!1}}},[a._v("X")])]),a._v(" "),i("p",{staticClass:"font-weight-bold pb-1 mb-0"},[a._v(a._s(a.fcoM("rs.authentication.needAssistanceHeading","Need Assistance?")))]),a._v(" "),i("p",{staticClass:"mb-0"},[a._v(a._s(a.fcoM("rs.homeMain.chatTooltipMessage","Chat Now with a O'Reilly Pro Support Technician.")))])]):a._e()],1),a._v(" "),a.isMasquerade?i("li",{staticClass:"nav-item"},[i("a",{staticClass:"nav-link nav-link-masquerade",attrs:{id:"masquerade",href:"javascript:void(0)"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),a.handleUnmasqueradeClick.apply(null,arguments)}}},[i("Icon",{staticClass:"clickable text-md align-text-bottom",attrs:{name:"eye"}}),a._v("\n                    "+a._s(a.fcoM("common.masquerade","Masquerade"))+"\n                ")],1)]):a._e(),a._v(" "),i("li",{staticClass:"nav-item"},[i("LanguageSelectButton",{attrs:{"button-class":"header-language-select-button","label-class":"sr-only",location:a.Page.HEADER}}
38)],1),a._v(" "),i("li",{staticClass:"nav-item"},[i("FcoLink",{staticClass:"nav-link qaa-username-link",attrs:{to:"/admin/user",href:a.fcoUrl("/user/editpreferences.html?reset=true")}},[i("Icon",{staticClass:"clickable text-md align-text-bottom",attrs:{name:"user"}}),a._v(" "),null!==(s=a.user)&&void 0!==s&&s.userId?[a._v(a._s(a.loggedInUserText))]:i("VueSkeletonLoader",{attrs:{type:"rect",width:80,height:18,rounded:!0}})],2)],1),a._v(" "),a.userCanAccessSupport?i("li",{staticClass:"nav-item"},[i("FcoLink",{staticClass:"nav-link",attrs:{to:"/support",href:a.fcoUrl("/admin/support.html")}},[i("Icon",{staticClass:"clickable text-md align-text-bottom",attrs:{name:"wrench"}}),a._v("\n                    "+a._s(a.fcoM("common.support","Support"))+"\n                ")],1)],1):a._e(),a._v(" "),i("li",{staticClass:"nav-item"},[i("a",{staticClass:"nav-link pr-0",attrs:{id:"adminLogOut",href:a.isSPA?"#":a.fcoUrl(`/logout.html?${a.csrfObject.parameterName}=${a.csrfObject.token}`)},on:{click:a.handleLogoutClick}},[i("Icon",{staticClass:"clickable text-md align-text-bottom",attrs:{name:"sign-out"}}),a._v("\n                    "+a._s(a.fcoM("rs.homeMain.logout","Logout"))+"\n                ")],1)])]),a._v(" "),a.showConfirmModal?i("FcoModal",{attrs:{closeMsg:a.fcoM("common.close","Close")},on:{close:function(e){return a.changeShop(!1)}}},[i("div",{attrs:{slot:"body"},slot:"body"},[a._v("\n                "+a._s(a.fcoM("company.confirmChangeShop.description","Changing the shop may impact your current quote. Do you wish to proceed?"))+"\n            ")]),a._v(" "),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("button",{staticClass:"button secondary",attrs:{type:"button"},on:{click:function(e){return a.changeShop(!1)}}},[a._v("\n                    "+a._s(a.fcoM("common.cancel","Cancel"))+"\n                ")]),a._v(" "),i("button",{staticClass:"button danger ml-2 text-red",attrs:{type:"button"},on:{click:function(e){return a.changeShop(!0)}}},[a._v("\n                    "+a._s(a.fcoM("company.confirmChangeShop.yes","Yes, Leave Quote"))+"\n                ")])])]):a._e()],1)])};M._withStripped=!0;var L=s(29),D=s(33),N=s(60),V=s(10),U=s(23),q=s(8),$=s(14),j=s(66),x=s(18),F=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("FcoDropdown",{attrs:{show:e.isOpen},on:{"update:show":function(t){e.isOpen=t}},scopedSlots:e._u([{key:"toggle",fn:function(){return[s("button",{staticClass:"language-select-button",class:[{active:e.isOpen},e.buttonClass],attrs:{type:"button"},on:{click:function(t){e.isOpen=!e.isOpen}}},[s("span",{staticClass:"language-select-label",class:e.labelClass},[e._v(e._s(e.fcoM("common.language","Language")))]),e._v(" "),s("span",{staticClass:"no-wrap"},[s("svg",{staticClass:"i18n-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"}},[s("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5a17.92 17.92 0 0 1-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}})]),e._v("\n                "+e._s(e.currentLocaleLabel)+"\n                "),s("Icon",{attrs:{name:"chevron-down"}})],1)])]},proxy:!0}])},[e._v(" "),e._l(e.localeOptions,(function(t){var a=t.label,r=t.value;return s("button",{key:r,staticClass:"dropdown-item mb-0 rounded-0",class:{active:e.isCurrentLocal(r)},attrs:{type:"button"},on:{click:function(t){return e.handleSelect(r)}}},[e._v("\n        "+e._s(a)+"\n    ")])}))],2)};F._withStripped=!0;var Q={name:"LanguageSelectButton",components:{FcoDropdown:s(98).a,Icon:V.a},props:{buttonClass:{type:[String,Object,Array],default:()=>[]},labelClass:{type:[String,Object,Array],default:()=>[]},location:{type:String,default:"header",validator:e=>["header","footer"].includes(e)}},data:()=>({isOpen:!1}),computed:{...Object(R.e)("i18n",{currentLocale:e=>{let{locale:t}=e;return t}}),...Object(R.c)("i18n",["localeOptions"]),currentLocaleLabel(){var e;return(null===(e=this.localeOptions.find((e=>{let{value:t}=e;return t===this.currentLocale})))||void 0===e?void 0:e.label)||this.fcoM("common.english","English")}},methods:{isCurrentLocal(e){return e===this.currentLocale},handleSelect(e){e!==this.currentLocale&&Object(q.j)({language:e,from:this.location,userLanguage:this.currentLocale}),this.$store.dispatch("i18n/changeLocale",{locale:e}),this.isOpen=!1}}},B=(s(225),s(4)),H=Object(B.a)(Q,F,[],!1,null,"54394982",null).exports,K=s(12),G=s(20),Y={name:"AdminBar",mixins:[K.a],components:{FcoModal:U.a,ChatButton:j.a,FcoSearchSelect:D.a,Icon:V.a,VueSkeletonLoader:L.a,FcoLink:x.a,LanguageSelectButton:H},props:{direction:{type:String,default:"horizontal",validator:e=>["vertical","horizontal"].includes(e)},isDesktop:{type:Boolean,default:!0}},data:()=>({tempShopName:"",showChatTooltip:!1,showConfirmModal:!1,newShop:{},Page:$.h}),computed:{...Object(R.c)(["isMasquerade","isMitchell1User","userCanAccessSupport"]),...Object(R.c)("miniQuote",["currentQuoteId"]),...Object(R.e)({user:e=>{let{user:t}=e;return t},shops:e=>{let{shops:t}=e;return t},currentShop:e=>{let{currentShop:t}=e;return t},accountName:e=>{var t;return null===(t=e.company)||void 0===t?void 0:t.accountName},requests:e=>{let{requests:t}=e;return t},csrfObject:e=>{let{csrfObject:t}=e;return t},isSPA:e=>{let{isSPA:t}=e;return t}}),currentStoreId(){var e;return null===(e=this.currentShop)||void 0===e?void 0:e.homeStore.storeId},isVertical(){return"vertical"===this.direction},isHorizontal(){return"horizontal"===this.direction},loggedInUserText(){return this.isMitchell1User?this.fcoM("rs.homeMain.admin","Admin"):this.user.loginName},shopSearchVal(){var e;return""!==this.tempShopName?null:null===(e=this.currentShop)||void 0===e?void 0:e.id},productsInCurrentQuote(){return this.$store.state.miniQuote.quoteDetails.totalItems>0}},methods:{handleLogoutClick(e){this.isSPA?e.preventDefault():this.$fcoLoading("Logging out..."),this.$store.commit("setIsLoggingOut",!0),Object(N.a)(),this.isSPA&&!this.isEntSearchEnabled&&Object(G.f)(),this.$store.dispatch("logout")},async handleUnmasqueradeClick(){const e=this.$fcoLoading();try{await this.$store.dispatch("stopMasquerade")}catch(e){this.$fcoToast.error(this.fcoM("masquerade.unmasquerade.failed","There was a problem trying to unmasquerade. Please try again."))}e.remove()},async changeShop(e){if(this.showConfirmModal=!1,!e)return void(this.newShop={});const t=this.$fcoLoading(Object(w.v)(this.fcoM("rs.pref.loadingChangeShop","Changing shop to {0}..."),this.newShop.shopName));try{await this.$store.dispatch("selectShop",this.newShop.id);const e=/\/FirstCallOnline\/worksheet\/\d+\/show\.html/.test(window.location.pathname);if(e)try{await this.$store.dispatch("miniQuote/newQuote")}catch(e){this.$fcoToast.error(this.fcoM("rs.infoBar.errorGettingQuote","Error getting quote data"))}Object(q.d)({event:"currentStore",data:{currentStoreId:this.currentStoreId},callback:()=>{e?window.location.replace(this.fcoUrl(`/worksheet/${this.currentQuoteId}/show.html`)):window.location.reload(),t.remove()}})}catch(e){this.$fcoToast.error(this.fcoM("rs.pref.errorChangeShop","Error changing the shop, please try again later")),t.remove()}},async handleShopSelect(e){var t;e.id!==(null===(t=this.currentShop)||void 0===t?void 0:t.id)&&(this.newShop={...e},this.productsInCurrentQuote?this.showConfirmModal=!0:this.changeShop(!0))},handleFocus(){var e;this.tempShopName=null===(e=this.currentShop)||void 0===e?void 0:e.shopName},handleBlur(){this.tempShopName=""}},async created(){await this.$store.dispatch("requestIfIdle",["getAppData"]),this.$store.dispatch("requestIfIdle",["getUser","getUserShops","getCurrentShop","getCompany"]),this.isDesktop&&c.a.post(this.fcoUrl("/user/showChatNowTooltip")).then((e=>{let{data:t}=e;this.showChatTooltip=t}))}}
38,W=(s(227),Object(B.a)(Y,M,[],!1,null,"15489e3e",null).exports),z=function(){var e,t=this,s=t.$createElement,a=t._self._c||s;return a("header",{staticClass:"fco-header main-header",attrs:{id:"top"}},[a("div",{staticClass:"fco-header-container d-flex"},[a("HeaderBrandLink"),t._v(" "),a("div",{staticClass:"fco-header-right d-flex d-print-none"},[a("nav",{staticClass:"main-nav d-none d-lg-flex"},t._l(t.navItems,(function(e){return a("FcoLink",{key:e.id,class:["main-nav-item gtm-main-nav",e.class],attrs:{to:e.route,href:e.url,id:e.id}},[a("div",{staticClass:"no-wrap"},[t._v(t._s(e.text1))]),t._v("\n                    "+t._s(e.text2)+"\n                ")])})),1),t._v(" "),a("div",{staticClass:"ml-auto my-auto pl-3 d-lg-none"},[a("button",{staticClass:"nav-toggle",attrs:{type:"button"},on:{click:function(e){t.isMobileMenuOpen=!t.isMobileMenuOpen}}},[a("icon",{attrs:{name:"bars",color:"green"}}),t._v("\n                    "+t._s(t.fcoM("rs.homeMain.menu","Menu"))+"\n                ")],1)])])],1),t._v(" "),a("transition",{attrs:{name:"mobile-menu"},on:{"before-enter":t.handleMobileMenuOpen,"after-leave":t.handleMobileMenuClosed}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.isMobileMenuVisible,expression:"isMobileMenuVisible"}],ref:"mobileMenu",staticClass:"mobile-menu-container",on:{click:t.handleMobileMenuClick}},[a("div",{staticClass:"mobile-menu"},[a("div",{staticClass:"mobile-menu-header p-3 mb-2"},[t._v(t._s(null===(e=t.company)||void 0===e?void 0:e.accountName))]),t._v(" "),a("nav",{staticClass:"nav flex-column mobile-nav"},t._l(t.navItems,(function(e){return a("FcoLink",{key:e.id,class:["nav-link mb-2 mobile-nav-item gtm-main-nav",e.class],attrs:{to:e.route,href:e.url,id:e.id}},[t._v("\n                        "+t._s(e.mobileText)+"\n                    ")])})),1),t._v(" "),a("hr",{staticClass:"mobile-menu-divider"}),t._v(" "),a("admin-bar",{staticClass:"mobile-admin-bar px-0",attrs:{isDesktop:!1,direction:"vertical"}})],1)])])],1)};z._withStripped=!0;var J=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("FcoLink",{staticClass:"fco-header-brand",attrs:{to:e.homeRoute,href:e.fcoUrl(e.isSMSUser?"/catalog/browse.html":"/")}},[e.isLocaleSpanish?s("picture",{staticClass:"spanish-logo"},[s("source",{attrs:{type:"image/webp",media:"(max-width: 767px)",srcset:"/FirstCallOnline/images/es/oreillypro-logo-white-notag-260.webp, /FirstCallOnline/images/es/oreillypro-logo-white-notag-520.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/webp",media:"(min-width: 768px)",srcset:"/FirstCallOnline/images/es/oreillypro-logo-notag-260.webp, /FirstCallOnline/images/es/oreillypro-logo-notag-520.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",media:"(max-width: 767px)",srcset:"/FirstCallOnline/images/es/oreillypro-logo-white-notag-260.png, /FirstCallOnline/images/es/oreillypro-logo-white-notag-520.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",media:"(min-width: 768px)",srcset:"/FirstCallOnline/images/es/oreillypro-logo-notag-260.png, /FirstCallOnline/images/es/oreillypro-logo-notag-520.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/es/oreillypro-logo-notag-260.png"}}),e._v(" "),s("img",{staticClass:"qaa-header-logo",attrs:{src:"/FirstCallOnline/images/es/oreillypro-logo-notag.png",alt:e.fcoM("rs.homeMain.fcoLogo","O'Reilly Pro logo")}})]):s("picture",[s("source",{attrs:{type:"image/webp",media:"(max-width: 767px)",srcset:"/FirstCallOnline/images/en/oreillypro-logo-white-notag-260.webp, /FirstCallOnline/images/en/oreillypro-logo-white-notag-520.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/webp",media:"(min-width: 768px)",srcset:"/FirstCallOnline/images/en/oreillypro-logo-notag-260.webp, /FirstCallOnline/images/en/oreillypro-logo-notag-520.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",media:"(max-width: 767px)",srcset:"/FirstCallOnline/images/en/oreillypro-logo-white-notag-260.png, /FirstCallOnline/images/en/oreillypro-logo-white-notag-520.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",media:"(min-width: 768px)",srcset:"/FirstCallOnline/images/en/oreillypro-logo-notag-260.png, /FirstCallOnline/images/en/oreillypro-logo-notag-520.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/en/oreillypro-logo-notag-260.png"}}),e._v(" "),s("img",{staticClass:"qaa-header-logo",attrs:{src:"/FirstCallOnline/images/en/oreillypro-logo-notag.png",alt:e.fcoM("rs.homeMain.fcoLogo","O'Reilly Pro logo")}})])])};J._withStripped=!0;var X={name:"HeaderBrandLink",components:{FcoLink:x.a},computed:{...Object(R.c)(["isSMSUser","isAuthorizedUser"]),...Object(R.c)("i18n",["isLocaleSpanish"]),homeRoute(){return this.isAuthorizedUser?this.isSMSUser?"/catalog/browse":"/home":"/login"}}}
38,Z=(s(229),Object(B.a)(X,J,[],!1,null,"9b536324",null).exports),ee={name:"MainNav",components:{HeaderBrandLink:Z,AdminBar:W,Icon:V.a,FcoLink:x.a},data:()=>({isMobileMenuOpen:!1}),computed:{...Object(R.e)(["requests","company"]),navItems(){return[{isVisible:!0,route:"/catalog/browse",url:this.fcoUrl("/catalog/browse.html"),id:"mainCatLookLink",class:"qaa-main-cat-look-link",text1:this.fcoM("mainNav.catalogLookupLine1","Catalog"),text2:this.fcoM("mainNav.catalogLookupLine2","Lookup"),mobileText:this.fcoM("common.catalogLookup","Catalog Lookup")},{isVisible:!0,route:"/stockorder",url:this.fcoUrl("/stockorders/show"),id:"mainStockOrderLink",class:"qaa-main-stock-order-link",text1:this.fcoM("mainNav.stockOrderLine1","Stock"),text2:this.fcoM("mainNav.stockOrderLine2","Order"),mobileText:this.fcoM("common.stockOrder","Stock Order")},{isVisible:this.$store.getters.isWebUser,route:"/customers",url:this.fcoUrl("/customers/#/"),id:"mainManageCustLink",class:"qaa-main-manage-cust-link",text1:this.fcoM("mainNav.manageCustomersLine1","Manage"),text2:this.fcoM("mainNav.manageCustomersLine2","Customers"),mobileText:this.fcoM("common.manageCustomers","Manage Customers")},{isVisible:!0,route:"/quote/search",url:this.fcoUrl("/worksheet/searchmain.html?iq=true&bca=1&type=b"),id:"mainQuotesOrdersLink",class:"qaa-main-quotes-orders-link",text1:this.fcoM("mainNav.quotesAndOrdersLine1","Quotes &"),text2:this.fcoM("mainNav.quotesAndOrdersLine2","Orders"),mobileText:this.fcoM("rs.homeMain.quotesAndOrders","Quotes & Orders")},{isVisible:!0,route:"/interchange",url:this.fcoUrl("/interchange"),id:"mainInterchangeLink",class:"qaa-main-interchange-link",text1:this.fcoM("mainNav.partInterchangeLine1","Part"),text2:this.fcoM("mainNav.partInterchangeLine2","Interchange"),mobileText:this.fcoM("common.partInterchange","Part Interchange")}].filter((e=>{let{isVisible:t}=e;return t}))},isMobileMenuVisible(){return this.isMobileMenuOpen&&this.$fcoMq.isMdDown}},watch:{"$route.path":{immediate:!0,handler(){this.isMobileMenuOpen=!1}}},methods:{async handleMobileMenuOpen(){this.$refs.mobileMenu.parentElement!==document.body&&(await this.$nextTick(),document.body.appendChild(this.$refs.mobileMenu)),document.body.classList.add("mobile-menu-open")},handleMobileMenuClosed(){document.body.classList.remove("mobile-menu-open")},handleMobileMenuClick(e){let{target:t}=e;t===this.$refs.mobileMenu&&(this.isMobileMenuOpen=!1)}},async created(){this.$store.dispatch("requestIfIdle",["getCompany"])},beforeDestroy(){this.$refs.mobileMenu.parentElement===document.body&&document.body.removeChild(this.$refs.mobileMenu)}},te=(s(231),Object(B.a)(ee,z,[],!1,null,"38865b7d",null).exports),se=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{class:["info-bar",{stuck:e.isStuck}],attrs:{id:"infoBar"}},[s("div",{staticClass:"content d-flex"},[s("div",{staticClass:"info-col vs-wrap"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.isVehicleDataChecked,expression:"isVehicleDataChecked"}],class:["vehicle-selector-toggle gtm-vehicle-selector-toggle",{open:e.isVsOpen,forced:e.isVsForced}],attrs:{"data-qa":"vehicle-link"},on:{click:e.toggleVehicleSelector}},[e.vehicle?s("Icon",{staticClass:"d-md-none text-sm",attrs:{name:"check-square-o"}}):e._e(),e._v(" "),s("div",[s("Icon",{staticClass:"d-block text-md",attrs:{name:"car"}})],1),e._v(" "),s("strong",{class:["px-2 d-none d-md-block",{"vehicle-name":!!e.vehicle}]},[e._v(e._s(e.vehicleSelectorButtonText))]),e._v(" "),s("Icon",{staticClass:"d-none d-md-inline-block text-md",attrs:{name:"caret-down"}})],1),e._v(" "),s("VehicleSelector",{directives:[{name:"show",rawName:"v-show",value:e.isVehicleDataChecked&&e.isVsOpen,expression:"isVehicleDataChecked && isVsOpen"}],ref:"vehicleSelector"}),e._v(" "),e.isVehicleDataChecked?e._e():s("div",{staticClass:"d-flex p-2"},[s("vue-skeleton-loader",{attrs:{type:"circle",width:30,height:30}}),e._v(" "),e.$fcoMq.isMdUp?s("vue-skeleton-loader",{staticClass:"ml-1",attrs:{type:"rect",width:150,height:30,rounded:!0}}):e._e()],1)],1),e._v(" "),s("div",{staticClass:"info-col search-goto flex-grow-1"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col flex-grow-1"},[s("ProductSearch",{on:{focus:e.handleSearchFocus}})],1),e._v(" "),s("div",{staticClass:"ml-2 mr-3 p-0"},[s("MiniQuote")],1)])])])])};se._withStripped=!0;var ae=s(52),re=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"go-to-quote-container"},[e.emptyQuote?s("div",{staticClass:"no-quote d-none d-sm-flex"},[s("a",{staticClass:"gtm-miniquote-quote-empty",attrs:{href:"javascript:void(0)","data-qa":"go-to-quote-button"},on:{click:function(t){return t.preventDefault(),e.handleGoQuoteClick.apply(null,arguments)}}},[e._v("\n            "+e._s(e.fcoM("common.goToQuote","Go To Quote"))+"\n            "),s("Icon",{staticClass:"text-md",attrs:{name:"chevron-right"}})],1)]):s("div",{staticClass:"quote-wrapper d-none d-sm-flex"},[s("strong",{class:["items-cost",{"dropdown-activated":e.expandMiniQuote}],attrs:{"data-qa":"mini-quote-toggle"},on:{click:e.toggleMiniQuote}},[s("span",[e._v("$"+e._s(e.subtotal)+" ("+e._s(e.quoteDetails.totalItems)+")")]),e._v(" "),s("Icon",{staticClass:"clickable text-md",attrs:{name:e.miniQuoteCaretName}})],1),e._v(" "),s("FcoLink",{staticClass:"button d-inline mb-0",attrs:{to:`/quote/details/${e.currentQuoteId}`,href:e.fcoUrl(`/worksheet/${e.currentQuoteId}/show.html`),"data-qa":"go-to-quote-button"}},[e._v("\n            "+e._s(e.fcoM("common.goToQuote","Go To Quote"))+"\n            "),s("Icon",{staticClass:"text-md",attrs:{name:"chevron-right"}})],1),e._v(" "),e.expandMiniQuote?s("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:e.toggleMiniQuote,expression:"toggleMiniQuote"}],staticClass:"quote-items-dropdown"},[s("div",{staticClass:"dropdown-content"},[s("ul",{staticClass:"items-in-quote"},e._l(e.quoteProducts,(function(t){return s("li",{key:t.miniQuoteKey,staticClass:"d-flex p-2"},[s("div",[s("span",{attrs:{"data-qa":"mini-quote-remove-product"},on:{click:function(s){return s.preventDefault(),e.removeProduct(t)}}},[s("Icon",{staticClass:"clickable red text-md mr-1",attrs:{name:"times"}})],1)]),e._v(" "),s("div",{staticClass:"flex-grow-1"},[s("div",{staticClass:"part-name"},[e._v(e._s(t.itemDescription))]),e._v(" "),s("div",{staticClass:"part-details"},[e._v("\n                                "+e._s(e.fcoM("rs.infoBar.quantityLabel","Qty:"))+"\n                                "+e._s(t.itemQuantity)+"\n                                "),s("MiniQuoteProductPrice",{attrs:{product:t,"hide-costs":e.isCostHidden}})],1)])])})),0),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showQuoteMask,expression:"showQuoteMask"}],staticClass:"quote-mask"}
38)])]):e._e()],1),e._v(" "),s("div",{staticClass:"mobile-quote-container d-sm-none"},[s("a",{class:["button","gtm-miniquote-quote",{"disabled-btn gtm-quote-empty":e.emptyQuote}],on:{click:function(t){return t.preventDefault(),e.handleGoQuoteClick.apply(null,arguments)}}},[e._v("$")])])])};re._withStripped=!0;var ie=s(53),oe=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.price?s("span",[e._v("\n    –\n    "),e._v(" "),s("span",{class:{"text-strike":e.isPartOfKit}},[e._v("$"+e._s(e.price))])]):e._e()};oe._withStripped=!0;var ne={props:{product:{type:Object,default:()=>({})},hideCosts:{type:Boolean,default:!1}},computed:{isPartOfKit(){var e;return Boolean(null===(e=this.product)||void 0===e?void 0:e.worksheetKit)},price(){var e,t;const s=this.hideCosts?null===(e=this.product)||void 0===e?void 0:e.customerPrice:null===(t=this.product)||void 0===t?void 0:t.itemCost;return s<=0?"":s.toFixed(2)}}},le=Object(B.a)(ne,oe,[],!1,null,null,null).exports,ce=s(6),ue={name:"MiniQuote",data:()=>({showQuoteMask:!1}),computed:{...Object(R.e)({expandMiniQuote:e=>e.miniQuote.expandMiniQuote,quoteDetails:e=>e.miniQuote.quoteDetails,quoteProducts:e=>e.miniQuote.quoteProducts,getMiniQuoteRequest:e=>e.miniQuote.requests.getQuoteData,isCostHidden:e=>e.isCostHidden}),miniQuoteCaretName(){return this.expandMiniQuote?"caret-up":"caret-down"},currentQuoteId(){return this.quoteDetails.worksheetHeaderId},emptyQuote(){return 0===this.quoteDetails.totalItems},subtotal(){return(this.isCostHidden?this.quoteDetails.subtotalPrice:this.quoteDetails.subtotalCost).toFixed(2)}},directives:{onClickaway:ie.a},components:{Icon:V.a,MiniQuoteProductPrice:le,FcoLink:x.a},methods:{toggleMiniQuote(){const e=this.expandMiniQuote?"miniQuote/closeMiniQuote":"miniQuote/openMiniQuote";this.$store.dispatch(e)},async removeProduct(e){const t={...e};this.showQuoteMask=!0;try{const s=t.catalogKey.split("_"),a=s[1],r=s[0],{data:i}=await c.a.post(this.fcoUrl(`/worksheet/rest/v2/miniquote/deleteitem.json?worksheetId=${this.currentQuoteId}&worksheetDetailId=${e.id}`));await this.$store.commit("miniQuote/setQuoteData",i),0===i.quoteDetails.length&&(await this.$store.dispatch("miniQuote/closeMiniQuote"),this.hasQuote=!1);const o={data:{vehicleId:t.vehicleId,product:t},groupId:a,itemId:r};await this.removePartFromQuote(o),Object(q.d)({event:"removeFromCart",data:{id:a+r,name:t.itemDescription,category:t.analyticsCategory,brand:a,price:t.itemCost,quantity:t.itemQuantity}})}catch(e){this.$fcoToast.error(this.fcoM("rs.infoBar.errorDeletingQuote","Error removing quote item"))}this.showQuoteMask=!1},async handleGoQuoteClick(e){if(e.preventDefault(),this.currentQuoteId)return void(this.isSPA?this.$router.push(`/quote/details/${this.currentQuoteId}`):window.location.href=this.fcoUrl(`/worksheet/${this.currentQuoteId}/show.html`));const t=this.$fcoLoading();try{await this.$store.dispatch("miniQuote/newQuote"),this.isSPA?this.$router.push(`/quote/details/${this.currentQuoteId}`):window.location.href=this.fcoUrl(`/worksheet/${this.currentQuoteId}/show.html`)}catch(e){this.$fcoToast.error(this.fcoM("rs.infoBar.errorGettingQuote","Error getting quote data"))}t.remove()},...Object(R.b)("usageTracking",["removePartFromQuote"])},watch:{getMiniQuoteRequest:{immediate:!0,handler(){Object(ce.c)(this.getMiniQuoteRequest)&&this.$fcoToast.error(this.fcoM("rs.infoBar.errorGettingQuote","Error getting quote data"))}}},async mounted(){this.$store.dispatch("requestIfIdle",["miniQuote/getQuoteData"])}},de=(s(233),Object(B.a)(ue,re,[],!1,null,"221fb3c7",null).exports),he=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"smart-product-search-container"},[s("FcoTypeahead",{ref:"siteSearch",attrs:{inputClass:"fco-typeahead-input",value:e.inputValue,"menu-class":"main-search-results",results:e.curResults,resultsUseCategories:e.isEntSearchEnabled,placeholder:e.placeholder,"map-result":function(e){return e.displayName},minChars:1,mode:"custom",maxResults:99,showSearchDuringInput:!0,filterInput:e.cleanTerm,menuOffset:[0,0],disableAutoResultSelect:e.isEntSearchEnabled,"ignore-left-right-arrow-keypress":""},on:{focus:function(t){return e.$emit("focus")},search:e.handleSearch,"input-no-debounce":e.handleActiveInput,"enter-press-before-search":function(t){e.quickEntered=!0},select:e.handleSelect}}),e._v(" "),e.showNewQuotePrompt?s("QuoteSelectionModal",{on:{close:e.handleQuotePromptClose,"start-new-quote":function(t){return e.startNewQuote(e.tempVehicle)},"use-existing-quote":function(t){return e.addToExistingQuote(e.tempVehicle)}}}
38):e._e()],1)};he._withStripped=!0;var pe=s(100),me=s(45),ge=s(7),ve=s(57),fe=s(28),Se=s(24),be=s(56),ye=s(34);let Ie;var _e={name:"ProductSearch",mixins:[Se.a,be.a,K.a,me.a,ve.a],data:()=>({curResults:[],curPartsResults:[],curVehicleResults:[],curSearchTerm:"",quickEntered:!1,vehicleRequiredPartsList:[],inputValue:"",showNewQuotePrompt:!1,tempVehicle:null,keywordRedirect:null,partTypeRedirect:null,pendingPartType:null,searchBasis:null}),components:{FcoTypeahead:pe.a,QuoteSelectionModal:fe.a},computed:{...Object(R.e)(["requests","isSPA","currentShop"]),...Object(R.e)("vehicleSelector",{vehicleRequest:e=>e.requests.getCurrentVehicle,currentVehicle:e=>e.currentVehicle,partTypePendingForceCar:e=>e.partTypePendingForceCar}),...Object(R.e)("miniQuote",{worksheetId:e=>e.quoteDetails.worksheetHeaderId}),vehicleIsSelected(){var e;return!(null===(e=this.currentVehicle)||void 0===e||!e.vehicleId)},productsInCurrentQuote(){return this.$store.state.miniQuote.quoteDetails.totalItems>0},placeholder(){return Object(ce.f)(this.requests.getFeatures)?this.isEntSearchEnabled?this.fcoM("keywordsearch.entSearchDefault","Enter Product, Part #, or Brand"):this.fcoM("keywordsearch.default","Enter Part, Item #, or Brand"):""},cleanSearchTerm(){return this.cleanTerm(this.curSearchTerm).trim()}},methods:{...Object(R.b)("usageTracking",["startCatalogLookup"]),trackSearchData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$store.dispatch("activityTracking/setSearchPerformed",!0),this.$store.dispatch("activityTracking/setSearchTerm",e)},startNewQuote(e){this.showNewQuotePrompt=!1,this.handleVehicleSelect(e)},addToExistingQuote(e){this.showNewQuotePrompt=!1,this.handleVehicleSelect(e,!0)},handleQuotePromptClose(){this.tempVehicle=null,this.keywordRedirect=null,this.partTypeRedirect=null,this.showNewQuotePrompt=!1},handleActiveInput(e){this.curSearchTerm=e},handleSearch(){Ie&&Ie.cancel();const e=this.cleanSearchTerm,{CancelToken:t}=c.a;let s="";s=this.isEntSearchEnabled?this.fcoUrl(`/search/keyword/v3/typeahead?query=${encodeURIComponent(e)}&suggestionType=PART_TYPE`):this.fcoUrl(`/search/keyword/typeahead?query=${encodeURIComponent(e)}&entSearchEnabled=false`),Ie=t.source(),c.a.get(s,{cancelToken:Ie.token}).then((async t=>{let{data:s}=t;this.curResults=[],this.tempVehicle=null,this.keywordRedirect=null,this.partTypeRedirect=null,this.pendingPartType=null,this.curPartsResults=[...s.partTypes],this.curVehicleResults=[...s.vehicles];const a={displayName:`"${e}"`,type:ge.TypeAheadTypes.CUSTOM_SEARCH_QUERY};if(this.isEntSearchEnabled)s.partTypes.length&&(this.curResults=[{category:this.fcoM("common.partTypes","Part Types")},...s.partTypes]),s.vehicles.length&&(this.curResults=[...this.curResults,{category:this.fcoM("common.vehicles","Vehicles")},...s.vehicles]),this.searchBasis=s.spelling.searchBasis;else{this.curResults=[...s.partTypes];const t=e.toLowerCase();!!t&&this.curResults.some((e=>e.displayName.toLowerCase()===t))||this.curResults.unshift(a)}this.vehicleRequiredPartsList=s.partTypes.filter((e=>e.applicationPartType)).map((e=>{let{partTypeId:t}=e;return t})),this.quickEntered&&(await this.$nextTick(),await this.startCatalogLookup(),this.$store.dispatch("activityTracking/setSearchUuid"),this.handleProductSearchSelect(a),this.quickEntered=!1)})).catch((()=>{this.curResults=[]}))},async handlePreProcessingRequest(e){const t=this.$fcoLoading();try{const{data:{identifiedPartType:s,itemNumberMatching:a}}=await c.a.get(this.fcoUrl(`/search/keyword/preprocess?query=${encodeURIComponent(e)}&shopId=${this.currentShop.id}`));if(s)return this.$store.dispatch("activityTracking/setLookupMethod",ge.LookupMethod.PREPROCESSING),this.$store.dispatch("activityTracking/setSearchTerm",e),t.remove(),void this.handlePartTypeSelect(s,!0);if(a)return this.$store.dispatch("activityTracking/setLookupMethod",ge.LookupMethod.ITEM_NUMBER_SEARCH),this.isSPA?(this.$router.push({path:"/search-keyword",query:{query:e,itemNumber:!0}}),void t.remove()):void(window.location=this.fcoUrl(`/search/product/browse.html?query=${e}&itemNumber=true`));this.handleKeywordSearch(e),t.remove()}catch{this.$fcoToast.error(this.fcoM("rs.getparts.partsRequestError","Error retrieving product data. Please try again.")),t.remove()}},async handleKeywordSearch(e){const t=this.$fcoLoading();this.isSPA?(this.$router.push({path:"/search-suggestion",query:{query:e,itemNumber:!0}}),t.remove()):window.location=this.fcoUrl(`/search/search.html?query=${encodeURIComponent(e)}&retain=false`)},async handleProductSearchSelect(e){const t=this.$fcoLoading(),s=this.cleanSearchTerm;if(this.$refs.siteSearch.blur(),this.$store.dispatch("activityTracking/startPartsLookupTimer"),this.isEntSearchEnabled)return this.handlePreProcessingRequest(s),this.trackSearchData(e.displayName||e),Object(q.d)({event:q.a.Action.SEARCH,data:{accountId:this.currentShop.accountNumber,query:e,usedTypeAhead:!1}}),void t.remove();const a=e.type===ge.TypeAheadTypes.PART_TYPE,r=a&&this.vehicleRequiredPartsList.includes(e.partTypeId),i=this.isSPA?{path:"/search-suggestion",query:{query:a?e.displayName:s}}:`/search/search.html?query=${encodeURIComponent(a?e.displayName:s)}&retain=false`;let o=()=>{this.isSPA?(this.$router.push(i),t.remove()):window.location=this.fcoUrl(i)};!this.currentVehicle&&r&&(this.$refs.siteSearch.blur(),t.remove(),this.$store.dispatch("vehicleSelector/forceCar",i),o=null),this.trackSearchData(a?e.displayName:s),Object(q.d)({event:q.a.Action.SEARCH,data:{accountId:this.currentShop.accountNumber,query:a?e.displayName:s,usedTypeAhead:a},callback:o})},async handlePartTypeSelect(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const s=this.$fcoLoading();try{if(this.$store.dispatch("activityTracking/startPartsLookupTimer"),e.applicationPartType&&!this.vehicleIsSelected)return this.$refs.siteSearch.blur(),this.$store.dispatch("vehicleSelector/forceCar",!0),this.$store.dispatch("vehicleSelector/setVsProp",{prop:"partTypePendingForceCar",value:!0}),this.isEntSearchEnabled&&(this.$store.dispatch("vehicleSelector/setVsProp",{prop:"saveLo
38okupBeforeRedirect",value:!0}),this.$store.dispatch("vehicleSelector/setVsProp",{prop:"partsToSaveBeforeRedirect",value:[e]})),this.pendingPartType=e,void s.remove();const a=[{parentId:e.parentPartTypeId,partTypeId:e.partTypeId,partTypeName:e.displayName,platformId:e.platform,lookupPartTypId:e.parentPartTypeId,applicationPartType:e.applicationPartType}];if(e.siblings&&e.siblings.forEach((t=>{a.push({parentId:t.parentPartTypeId,partTypeId:t.partTypeId,partTypeName:t.displayName,platformId:t.platform,lookupPartTypId:t.parentPartTypeId,applicationPartType:e.applicationPartType})})),await Object(ye.a)(a),this.isEntSearchEnabled){const s=a.map((e=>({description:e.description||e.partTypeName,parentPartTypeId:e.parentPartTypeId||e.parentId,partTypeId:e.partTypeId,platformId:e.platformId||e.platform,applicationPartType:e.applicationPartType})));!e.kits&&t&&e.leaf||!t&&!e.kits?await this.$_partTypesMixin_getResolvedLeaf(s,t?ge.LookupOrigin.PREPROCESS:ge.LookupOrigin.TYPEAHEAD):await this.$_partTypeMixin_getResolvedPartTypes(s,t?ge.LookupOrigin.PREPROCESS:ge.LookupOrigin.TYPEAHEAD)}if(!this.isSPA)return void(window.location.href=!this.isEntSearchEnabled||e.kits?this.fcoUrl(`/parttype/mini/getparts.html?query=${encodeURIComponent(e.displayName)}`):this.fcoUrl("/parttype/mini/v2/getParts.html"));s.remove(),this.$router.push({path:this.getSpaCatalogRedirectPath(Boolean(e.kits)),query:this.isEntSearchEnabled?{query:e.displayName}:void 0})}catch{this.$fcoToast.error(this.fcoM("rs.getparts.partsRequestError","Error retrieving product data. Please try again.")),s.remove()}},async handleVehicleSelect(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const s=this.$fcoLoading(),a={baseVehicleId:e,quote:t},r=this.selectVehicleFromVehicleData(a,t);return this.keywordRedirect?(await this.$store.commit("vehicleSelector/setCurrentVehicle",r),this.handleKeywordSearch(this.keywordRedirect),void s.remove()):this.partTypeRedirect?(await this.$store.commit("vehicleSelector/setCurrentVehicle",r),void this.handlePartTypeSelect(this.partTypeRedirect)):(this.handleVehicleSelectSuccess({gaEventAction:"typeahead",vehicle:r}),void(this.preventNavigationOnVehicleUpdate&&(this.showNewQuotePrompt&&(this.showNewQuotePrompt=!1),s.remove())))},handleSelect(e){this.startCatalogLookup(),this.$store.dispatch("activityTracking/setSearchUuid"),this.inputValue="",this.$refs.siteSearch.blur(),this.$store.dispatch("activityTracking/setLookupMethod",ge.LookupMethod.TYPEAHEAD),this.$store.dispatch("activityTracking/setSearchTerm",e.displayName),this.isEntSearchEnabled?e.type===ge.TypeAheadTypes.VEHICLE?(this.productsInCurrentQuote?(this.tempVehicle=e.baseVehicleId,this.showNewQuotePrompt=!0):this.handleVehicleSelect(e.baseVehicleId),this.trackAutoCompleteSignal(this.curVehicleResults,e)):e.type===ge.TypeAheadTypes.PART_TYPE?(this.handlePartTypeSelect(e),this.trackSearchData(e.displayName),Object(q.d)({event:q.a.Action.SEARCH,data:{accountId:this.currentShop.accountNumber,query:e.displayName,usedTypeAhead:!0}}),this.trackAutoCompleteSignal(this.curPartsResults,e)):this.handleProductSearchSelect(e):this.handleProductSearchSelect(e)},trackAutoCompleteSignal(e,t){let{type:s,displayName:a,partTypeId:r}=t;this.$_signalsMixin_trackAutoCompleteSelection({selectedSuggestion:{suggestionType:s,basis:this.searchBasis,partTypeName:a,partTypeId:r},position:e.findIndex((e=>e.displayName===a)),originalQuery:this.cleanSearchTerm})},cleanTerm:e=>e.replace(/"|<|>/g,"")},watch:{partTypePendingForceCar(e){!e&&this.pendingPartType&&this.handlePartTypeSelect(this.pendingPartType)}},async mounted(){await this.$store.dispatch("requestIfIdle",["getFeatures","getCurrentShop","vehicleSelector/getCurrentVehicle"])}},we=(s(235),Object(B.a)(_e,he,[],!1,null,null,null).exports),Ee=s(70);const Oe=e=>{const{borderBoxSize:t,contentRect:s}=e;let a;var r;Array.isArray(t)?a=t[0].blockSize:a=null!==(r=null==t?void 0:t.blockSize)&&void 0!==r?r:s.height;return a};var Ce={name:"InfoBar",data:()=>({isStuck:!1}),computed:{...Object(R.e)("vehicleSelector",{vehicleRequest:e=>e.requests.getCurrentVehicle,errorLoadingData:e=>e.errorLoadingData,vsHeight:e=>e.height,vehicle:e=>e.currentVehicle,isVsForced:e=>!!e.forceUrl,isVsOpen:e=>e.isOpen,isVsOpenDefault:e=>e.isOpenDefault,isYearSelectorOpen:e=>e.isYearSelectorOpen}),isVehicleIdle(){return Object(ce.d)(this.vehicleRequest)},isVehicleLoading(){return Object(ce.e)(this.vehicleRequest)},isVehicleDataChecked(){return!this.isVehicleIdle&&!this.isVehicleLoading},vehicleSelectorButtonText(){if(this.errorLoadingData||!this.vehicle)return this.fcoM("rs.infoBar.addVehicle","Add Vehicle");const{year:e,make:t,model:s}=this.vehicle;return`${e} ${t} ${s}`}},components:{Icon:V.a,MiniQuote:de,ProductSearch:we,VehicleSelector:Ee.a,VueSkeletonLoader:L.a},methods:{closeVehicleSelector(){this.$store.commit("vehicleSelector/setVsProp",{prop:"isOpen",value:!1})},handleSearchFocus(){this.$fcoMq.isSmDown&&this.closeVehicleSelector()},openVehicleSelector(){this.$store.commit("vehicleSelector/setVsProp",{prop:"isOpen",value:!0})},toggleVehicleSelector(){this.isVsOpen&&!this.isVsForced?this.closeVehicleSelector():this.openVehicleSelector()},makeSticky(){const{$el:e}=this;new IntersectionObserver((e=>{let[t]=e;this.isStuck=t.intersectionRatio<1,this.$fcoMq.isMdUp&&(this.isStuck?!this.isVsOpen||this.isYearSelectorOpen||this.isVsForced||this.$store.commit("vehicleSelector/setVsProp",{prop:"isOpen",value:!1}):!this.isVsOpen&&this.isVsOpenDefault&&this.$store.commit("vehicleSelector/setVsProp",{prop:"isOpen",value:!0}))}),{threshold:1}).observe(e)}},created(){this.isVehicleIdle&&this.$store.dispatch("vehicleSelector/getCurrentVehicle")},async mounted(){await this.$nextTick(),this.makeSticky();const{$el:e}=this,t=this.$refs.vehicleSelector.$el;new ResizeObserver(Object(ae.a)((t=>{t.forEach((t=>{!t.target!==e&&this.$store.commit("setScrollToOffset",Oe(t))}))}))).observe(e);new ResizeObserver(Object(ae.a)((e=>{e.forEach((e=>{e.target===t&&this.isVsOpen&&this.$store.commit("vehicleSelector/setVsProp",{prop:"height",value:Oe(e)})}))}))).observe(t)}},Te=(s(249),Object(B.a)(Ce,se,[],!1,null,"a66e21d4",null).exports
38),Pe=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("footer",[s("div",{staticClass:"content py-5"},[s("div",{staticClass:"footer-grid d-print-none mb-5"},[s("div",{staticClass:"footer-logo-container"},[e.isLocaleSpanish?s("picture",{staticClass:"footer-logo spanish-logo"},[s("source",{attrs:{type:"image/webp",srcset:"/FirstCallOnline/images/es/oreillypro-logo-white-208.webp, /FirstCallOnline/images/es/oreillypro-logo-white-416.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/es/oreillypro-logo-white-208.png, /FirstCallOnline/images/es/oreillypro-logo-white-416.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/es/oreillypro-logo-white-208.png"}}),e._v(" "),s("img",{staticClass:"footer-logo",attrs:{src:"/FirstCallOnline/images/es/oreillypro-logo-white.png"}})]):s("picture",{staticClass:"footer-logo"},[s("source",{attrs:{type:"image/webp",srcset:"/FirstCallOnline/images/en/oreillypro-logo-white-208.webp, /FirstCallOnline/images/en/oreillypro-logo-white-416.webp 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/en/oreillypro-logo-white-208.png, /FirstCallOnline/images/en/oreillypro-logo-white-416.png 2x"}}),e._v(" "),s("source",{attrs:{type:"image/png",srcset:"/FirstCallOnline/images/en/oreillypro-logo-white-208.png"}}),e._v(" "),s("img",{staticClass:"footer-logo",attrs:{src:"/FirstCallOnline/images/en/oreillypro-logo-white.png"}})])]),e._v(" "),s("nav",[s("DotCmsMenu",{staticClass:"footer-nav",attrs:{name:"site-footer",linkClass:"gtm-footer-nav-link",placeholderMaxWidth:150,placeholderMinWidth:100}}),e._v(" "),e.isAuthorizedUser?[s("ul",{staticClass:"footer-nav"},[e.userCanViewStatements?s("li",[s("FcoLink",{staticClass:"qaa-footer-billing-statements gtm-footer-nav-link",attrs:{to:"/admin/statements",href:e.fcoUrl("/statementlookup/statementview.html")}},[e.isEarnbackEligible?s("span",[e._v(" "+e._s(e.fcoM("common.statementsAndEarnbacks","Statements and Earn-backs")))]):s("span",[e._v(" "+e._s(e.fcoM("common.billingStatements","Billing Statements")))])])],1):e._e(),e._v(" "),s("li",[s("DotCmsLink",{staticClass:"qaa-footer-drop-box-slip gtm-footer-nav-link",attrs:{"file-name":"first-call-drop-box-slip.pdf",target:"_blank"}},[e._v("\n                                "+e._s(e.fcoM("rs.home.dropBoxSlip","Drop Box Slip"))+"\n                            ")])],1),e._v(" "),s("li",[s("DotCmsLink",{staticClass:"qaa-footer-vehicle-inspection-form gtm-footer-nav-link",attrs:{"file-name":"FCO-INSPECTION_FORM.pdf",target:"_blank"}},[e._v("\n                                "+e._s(e.fcoM("rs.home.vehicleInspectionForm","Vehicle Inspection Form"))+"\n                            ")])],1),e._v(" "),e.userCanViewLaborClaims?s("li",[s("FcoLink",{staticClass:"qaa-footer-labor-claims gtm-footer-nav-link",attrs:{to:"/admin/labor-claims",href:e.fcoUrl("/admin/laborClaims/")}},[e._v("\n                                "+e._s(e.fcoM("common.laborClaims","Labor Claims"))+"\n                            ")])],1):e._e()]),e._v(" "),s("ul",{staticClass:"footer-nav"},[!e.isCustomerDashboardDisabled&&e.userCanViewCompanyDashboard?s("li",[s("FcoLink",{staticClass:"qaa-footer-billing-statements gtm-footer-nav-link",attrs:{to:"/admin/company",href:e.fcoUrl("/company/home.html")}},[e._v("\n                                "+e._s(e.fcoM("common.companyDashboard","Account Dashboard"))+"\n                            ")])],1):e._e()])]:e._e()],2),e._v(" "),s("div",{staticClass:"text-right"},[s("LanguageSelectButton",{attrs:{"button-class":"footer-language-select","label-class":"footer-language-select-label",location:e.Page.FOOTER}})],1)]),e._v(" "),s("div",{staticClass:"text-xs footer-legal"},[s("div",{staticClass:"med-gray mb-3"},[e._v(e._s(e.copyrightString)),s("br"),e._v(e._s(e.versionString))]),e._v(" "),s("div",{staticClass:"footer-legal-nav d-print-none"},[s("FcoLink",{staticClass:"qaa-footer-terms-conditions",attrs:{to:"/terms",href:e.fcoUrl("/legal/terms/index.html")}},[e._v(e._s(e.fcoM("common.termsAndConditions","Terms & Conditions")))]),e._v(" "),s("FcoLink",{staticClass:"qaa-footer-privacy-policy",attrs:{to:"/privacy",href:e.fcoUrl("/legal/policy/index.html")}},[e._v("\n                    "+e._s(e.fcoM("common.privacyPolicy","Privacy Policy"))+"\n                ")])],1)])])])};Pe._withStripped=!0;var Ae=s(48),ke=s(59),Re={name:"Footer",mixins:[K.a],data:()=>({Page:$.h}),computed:{...Object(R.c)(["isAuthorizedUser","userCanViewStatements","userCanViewLaborClaims","userCanViewCompanyDashboard"]),...Object(R.c)("i18n",["isLocaleSpanish"]),...Object(R.e)({user:e=>e.user,requests:e=>e.requests,version:e=>e.version,isEarnbackEligible:e=>e.isEarnbackEligible}),copyrightString(){return Object(w.v)(this.fcoM("footer.copyright","Copyright © 2011-{0} O'Reilly Automotive Stores, Inc. All rights reserved."),(new Date).getFullYear())},versionString(){if(!this.version)return"";const e=this.version.node?`(${this.version.node})`:"";return`v. ${this.version.fcoVersion}${e}, OCAT:${this.version.ocatVersion}`}
38,isCustomerDashboardDisabled(){return this.isFeatureDisabled("customer_dashboard_feature")}},created(){this.$store.dispatch("requestIfIdle",["getAppData"]),this.isAuthorizedUser&&this.$store.dispatch("requestIfIdle",["getUser","getIsEarnbackEligible"])},components:{LanguageSelectButton:H,FcoLink:x.a,DotCmsLink:Ae.a,DotCmsMenu:ke.a}},Me=(s(251),Object(B.a)(Re,Pe,[],!1,null,"5033006a",null).exports),Le=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("header",{staticClass:"fco-header public-header"},[s("h1",{staticClass:"sr-only"},[e._v(e._s(e.fcoM("rs.home.publicHeader","O'Reilly Pro, Auto Parts for the Professional")))]),e._v(" "),s("div",{staticClass:"fco-header-container d-md-flex"},[s("HeaderBrandLink"),e._v(" "),s("div",{staticClass:"fco-header-right d-none d-md-flex"},[s("div",{staticClass:"pro-services d-none d-md-block"},[e._v(e._s(e.fcoM("rs.home.professionalServices","Professional Services")))])])],1)])};Le._withStripped=!0;var De={name:"PublicHeader",components:{HeaderBrandLink:Z}},Ne=(s(253),Object(B.a)(De,Le,[],!1,null,"37491240",null).exports),Ve=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",e._l(e.activeBroadcastMessages,(function(t){var a=t.content,r=t.description,i=t.linkUrl,o=t.messageId;return s("div",{key:o,staticClass:"alert alert-warning mb-0 d-flex"},[""!==i?s("a",{staticClass:"message-content d-block text-decoration-none text-center text-reset",attrs:{href:i}},[s("div",[s("h2",[e._v(e._s(r))]),e._v(" "),s("div",[e._v(e._s(a))])])]):s("div",{staticClass:"message-content text-center"},[s("h2",[e._v(e._s(r))]),e._v(" "),s("div",[e._v(e._s(a))])]),e._v(" "),s("a",{staticClass:"text-lg",attrs:{href:"JavaScript:void(0)"},on:{click:function(t){return e.dismissMessage(o)}}},[s("Icon",{staticClass:"red",attrs:{name:"times"}})],1)])})),0)};Ve._withStripped=!0;var Ue={name:"BroadcastMessages",components:{Icon:V.a},data:()=>({broadcastMessages:[]}),computed:{activeBroadcastMessages(){const e=(new Date).getTime();return Array.isArray(this.broadcastMessages)&&null!==this.broadcastMessages?this.broadcastMessages.filter((t=>{const{schedules:s}=t;return s.findIndex((t=>{const{startDateTime:s,endDateTime:a}=t;return e>=s&&e<=a}))>-1})):[]}},methods:{dismissMessage(e){const t=this.broadcastMessages.findIndex((t=>t.messageId===e));this.broadcastMessages.splice(t,1),c.a.get(this.fcoUrl(`/message/dismiss/${e}`))}},async mounted(){try{const{data:e=[]}=await c.a.get(this.fcoUrl("/message/get/current/BROADCAST"));this.broadcastMessages=e}catch(e){}}},qe=(s(255),Object(B.a)(Ue,Ve,[],!1,null,"235ab82c",null).exports),$e=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.showBanner?s("div",{staticClass:"container slide-in-bottom"},[s("div",{staticClass:"d-flex"},[s("div",[s("img",{staticClass:"app-rounded",attrs:{src:"/FirstCallOnline/images/OReillyProAppIcon.webp",height:"60",alt:e.fcoM("common.oreillyPro","O'Reilly Pro")}})]),e._v(" "),s("div",{staticClass:"ml-3 mt-1"},[s("div",{staticClass:"mb-0"},[e._v(e._s(e.fcoM("common.oreillyPro","O'Reilly Pro")))]),e._v(" "),s("div",{staticClass:"small text-muted mt-0"},[e._v(e._s(e.fcoM("common.oreillyProTagline","Dedicated to the professional")))])]),e._v(" "),s("div",{staticClass:"ml-auto"},[s("a",{attrs:{href:"javaScript:void(0)"},on:{click:e.handleCloseBanner}},[s("Icon",{staticClass:"black",attrs:{name:"times"}})],1)])]),e._v(" "),s("div",{staticClass:"d-flex mt-3"},[e.isIphoneNotSafari?s("a",{staticClass:"ml-auto",attrs:{href:"itms-apps://itunes.apple.com/app/id6467030803"}},[e.locale===e.localeConstant.ES?s("img",{attrs:{src:"/FirstCallOnline/images/Download_on_the_App_Store_Badge_ESMX_RGB_blk_100217.svg",alt:e.fcoM("mobileApp.appleStoreAlt","Download on the App Store"),height:"40px"}}):s("img",{attrs:{src:"/FirstCallOnline/images/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.svg",alt:e.fcoM("mobileApp.appleStoreAlt","Download on the App Store"),height:"40px"}})]):e._e(),e._v(" "),e.isAndroid?s("a",{staticClass:"ml-auto",attrs:{href:"https://play.google.com/store/apps/details?id=com.oreillyauto.professional"}},[e.locale===e.localeConstant.ES?s("img",{attrs:{src:"/FirstCallOnline/images/GetItOnGooglePlay_Badge_Web_color_Spanish.png",alt:e.fcoM("mobileAp
38p.androidStoreAlt","Get it on Google Play"),height:"40px"}}):s("img",{attrs:{src:"/FirstCallOnline/images/GetItOnGooglePlay_Badge_Web_color_English.png",alt:e.fcoM("mobileApp.androidStoreAlt","Get it on Google Play"),height:"40px"}})]):e._e()])]):e._e()};$e._withStripped=!0;var je=s(0);const xe=navigator.userAgent;var Fe={name:"BaseApp",components:{Icon:V.a},data:()=>({isAndroid:/Android/.test(xe),isIphoneNotSafari:/iPhone/.test(xe)&&/(Cr|Fx|Edg)iOS/.test(xe),showBanner:!1,localeConstant:v.e}),computed:{...Object(R.e)("i18n",["locale"])},methods:{handleCloseBanner(){Object(je.o)(je.c.HIDE_MOBILE_APP_BANNER,!0),this.showBanner=!1}},mounted(){Object(je.f)(je.c.HIDE_MOBILE_APP_BANNER)||!this.isAndroid&&!this.isIphoneNotSafari||(this.showBanner=!0)}},Qe=(s(257),Object(B.a)(Fe,$e,[],!1,null,"d6b3794e",null).exports),Be=s(41);let He=null;const Ke=()=>{const e=document.querySelector(".wcfs-wrapper .wcfs-button");null==e||e.classList.add("d-none")},Ge=e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),Ke(),u.a.commit("setIsChatButtonHidden",!0)},Ye=()=>{const e=document.querySelector("#chatHideButtonButton");e&&(u.b.isChatButtonHidden?Ke():e.addEventListener("click",Ge),He.disconnect())},We=()=>{Object(Be.c)((()=>(window.addEventListener(Be.b,(()=>{const e=document.querySelector("body");He=new MutationObserver(Ye),He.observe(e,{childList:!0,subtree:!0}),u.a.commit("setIsChatReady",!0)})),void window.addEventListener(Be.a,(()=>{u.a.commit("setIsChatDisabled",!0)})))))};var ze=s(69),Je={name:"BaseApp",BgColorPreference:v.a,props:{showInfoBar:{type:Boolean,default:!0},disableHeader:{type:Boolean,default:!1},disableFooter:{type:Boolean,default:!1}},components:{BroadcastMessages:qe,PublicHeader:Ne,AdminBar:W,MainNav:te,InfoBar:Te,FcoFooter:Me,MobileAppBanner:Qe},mixins:[ze.a,K.a],data:()=>({showProfile:!0,loadingUserOverlay:null}),computed:{...Object(R.e)(["user","masqueradeSource","requests","isSPA","isPunchoutComplete","profile","auth","currentShop","isTermsAcceptRequired"]),...Object(R.c)(["isMasquerade","isAuthorizedUser","isAuthExpired","isRefreshExpired","userDefaultLandingPage"]),isPasswordChangeRequired(){var e;return this.isSPA?this.$store.state.isPasswordChangeRequired:null===(e=this.user)||void 0===e?void 0:e.passwordChangeRequired},isLoadingUser(){return!Object(ce.f)(this.requests.getUser)},isLoginPage(){return this.isSPA?"/login"===this.$route.path:["/FirstCallOnline/","/FirstCallOnline/login.html"].includes(window.location.pathname)},needsLoadingUserOverlay(){return!this.isRefreshExpired&&!this.user&&this.isLoadingUser},isErrorPage(){var e,t,s;return"NotFound"===(null===(e=this.$route)||void 0===e?void 0:e.name)||(null===(t=this.$route)||void 0===t||null===(s=t.name)||void 0===s?void 0:s.indexOf("Error"))>-1},isFullScreen(){var e;return null===(e=this.$route)||void 0===e?void 0:e.matched.some((e=>{let{meta:t}=e;return t.isFullScreen}))},isHideInfoBar(){var e,t;return!this.showInfoBar||Boolean(null===(e=this.$route)||void 0===e||null===(t=e.matched)||void 0===t?void 0:t.some((e=>{let{meta:t}=e;return t.isHideInfoBar})))},themeClass(){var e,t;return(null===(e=this.user)||void 0===e||null===(t=e.userPreference)||void 0===t?void 0:t.selectedStylesheet)===v.a.GRAY?"content-subtle-gray":""},isLocalTestProfile(){return"local-test"===this.profile||"test"===this.profile&&!1},authStatus(){const e=this.isSPA&&"/punchout"===this.$route.path&&!this.isPunchoutComplete;if(!this.isSPA||this.auth&&!this.isAuthExpired){if(this.isAuthorizedUser&&!e)return"AUTHORIZED";if(this.isPasswordChangeRequired)return"RESTRICTED_PASSWORD";if(this.isTermsAcceptRequired)return"RESTRICTED_TERMS"}return"PUBLIC"},hasUserAccessRequirements(){return!this.isMasquerade&&(this.isSPA?this.isPasswordChangeRequired||this.isTermsAcceptRequired:window.location.href.includes("/legal/terms/accept.html")||Boolean(null===(e=this.user)||void 0===e?void 0:e.passwordChangeRequired));var e},currentLocale(){return this.$store.state.i18n.locale}},methods:{trackLoginSuccess(){const e=sessionStorage.getItem(je.c.AUTH_ATTEMPT_LOGIN_NAME);e&&(sessionStorage.removeItem(je.c.AUTH_ATTEMPT_LOGIN_NAME),Object(q.n)({loginSuccessful:this.isAuthorizedUser,userEmail:e,userId:this.user.userId,isSSO:!1}))},async setDefaultLocale(){const e=this.isSPA?this.$route.query.language:new URLSearchParams(window.location.search).get("language");this.$store.dispatch("i18n/selectDefaultLocale",e)},async initializeAuth(){this.isSPA?this.isRefreshExpired?this.$store.dispatch("logout"):(this.isAuthExpired?await this.$store.dispatch("refreshAuth"):this.$store.dispatch("startRefreshTimer"),this.isAuthExpired||this.$store.dispatch("requestIfIdle",["getUser"])):await this.$store.dispatch("requestIfIdle",["getUser"])}
38,isValidRoute(e){return this.$router.match(e).matched.every((e=>{let{path:t}=e;return"*"!==t}))},redirectTo(e){if(this.isSPA)this.$route.path!==e&&this.$router.push(e);else{window.location.pathname.includes(e)||(window.location.href=this.fcoUrl(e))}},updateTitle(){const e=this.fcoM(this.$route.meta.titleKey);document.title=e?`${this.fcoM("pagetitle.default","O'Reilly Pro")} | ${this.fcoM(this.$route.meta.titleKey)}`:this.fcoM("pagetitle.default","O'Reilly Pro")},...Object(R.b)("usageTracking",["loadUsageTracking","resetUsageTrackingData"])},watch:{isEntSearchEnabled:{handler(e){Object(q.b)({enterprise_search:e})},immediate:!0},features:{handler(e){Object(q.b)({globalFeatures:this.getEnabledFlagNames(e)})},immediate:!0},featuresForStore:{handler(e){Object(q.b)({featuresForStore:this.getEnabledFlagNames(e)})},immediate:!0},needsLoadingUserOverlay:{handler(e){e?this.loadingUserOverlay=this.$fcoLoading():this.loadingUserOverlay&&(this.loadingUserOverlay.remove(),this.loadingUserOverlay=null)},immediate:!0},async authStatus(){var e,t;if(!this.isSPA){const e="/login.html";return void(this.user.authenticated?this.isAuthorizedUser?window.location.pathname.includes(e)&&this.redirectTo(this.userDefaultLandingPage):this.isPasswordChangeRequired&&this.redirectTo("/securitychange.html"):this.redirectTo(e))}if(null===(e=this.$route.matched)||void 0===e||!e.length)return;if(!(null===(t=this.$route.matched)||void 0===t?void 0:t.every((e=>{let{meta:t}=e;return!t.authorize||t.authorize()})))){if(this.isAuthorizedUser){let e=sessionStorage.getItem(je.c.POST_LOGIN_REDIRECT_PATH);return sessionStorage.removeItem(je.c.POST_LOGIN_REDIRECT_PATH),e&&this.isValidRoute(e)||(e=this.userDefaultLandingPage),void this.redirectTo(e)}this.hasUserAccessRequirements?this.isPasswordChangeRequired?this.redirectTo("/security-change"):this.isTermsAcceptRequired&&this.redirectTo("/accept-terms"):this.auth||(this.redirectTo("/login"),this.$fcoLoading.removeAll())}},isMasquerade(){if(!this.isSPA){const e=this.isMasquerade?this.fcoUrl(this.userDefaultLandingPage):this.masqueradeSource;return window.location.href=e,void(this.isMasquerade||this.$store.commit("setMasqueradeSource",null))}if(this.resetUsageTrackingData(),this.isMasquerade)return void this.$router.push(this.userDefaultLandingPage);const e=Boolean(this.masqueradeSource)&&this.isValidRoute(this.masqueradeSource)?this.masqueradeSource:"/";this.$store.commit("setMasqueradeSource",null),!this.masqueradeSource!==this.$route.fullPath&&this.$router.push(e)},currentLocale(){this.isSPA&&this.updateTitle()}},async created(){this.setDefaultLocale(),await this.initializeAuth(),this.$store.dispatch("requestIfIdle",["getAppData"]),this.isAuthorizedUser&&(await this.$store.dispatch("requestIfIdle",["getIsEarnbackEligible","getCurrentShop"]),this.loadUsageTracking(),Object(q.b)({accountId:this.currentShop.accountNumber})),this.loginErrorMessage&&!this.isLoginPage&&this.$fcoToast.error(this.loginErrorMessage),We(),this.trackLoginSuccess()}},Xe=(s(259),Object(B.a)(Je,k,[],!1,null,"3bbe03da",null).exports),Ze=s(21);r.c.extend("alpha",Ze.a),r.c.extend("digits",Ze.d),r.c.extend("min",Ze.i),r.c.extend("max",Ze.g),r.c.extend("min_value",Ze.j),r.c.extend("max_value",Ze.h),r.c.extend("required",Ze.m),r.c.extend("decimal",Ze.c),r.c.extend("email",Ze.e),r.c.extend("numeric",Ze.k),r.c.extend("regex",Ze.l),r.c.extend("url",Ze.n),r.c.extend("confirmed",Ze.b),r.c.extend("ext",Ze.f),_(v.e.EN);s(290);var et={computed:{...Object(R.c)(["isAuthorizedUser"])},watch:{isAuthorizedUser:{immediate:!0,async handler(){if(this.isAuthorizedUser)try{const{data:e}=await c.a.get(Object(w.c)("/current/hasDealerControlOrIsDemo"));e||this.$fcoToast.error(this.fcoM("oauth.noDealerControl","There is a problem with your O'Reilly Pro access. For assistance, please contact our support team by chat, by email at [email protected], or by phone at 1-800-934-2451."),{autoClose:!1})}catch{this.$fcoToast.error(this.fcoM("oauth.noDealerControlError","An error occurred while retrieving your O'Reilly Pro access. Please try again."))}}}}},tt=s(71);const st=document.querySelector("#content");Object(je.j)()&&Object(je.q)();const at=function(){const{optionMergeStrategies:e}=a.a.config;e.staticData=e.methods,a.a.mixin({computed:{isSPA(){return this.$store.state.isSPA}}}),a.a.mixin(A.a),a.a.mixin(P),a.a.use(T),a.a.use(i.a),a.a.use(o.c),a.a.use(n.a),a.a.use(r.d,{classNames:{invalid:"error"},mode:"eager"}
38),a.a.component("ValidationProvider",r.b),a.a.component("ValidationObserver",r.a)},rt=function(e){let{router:t,store:s=u.a,element:r=st,baseAppConfig:i={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};at();const o=Object.fromEntries([...r.attributes].map((e=>[e.name,e.value])));return new a.a({el:r,render(t){const s=Object(je.j)()&&!this.isPunchoutComplete;return t(Xe,{...i,props:{...i.props,...s?{disableHeader:!0,disableFooter:!0}:{}},attrs:{...i.attrs,...o}},[t(s?tt.a:e)])},store:s,router:t,mixins:[et],computed:{...Object(R.e)(["requests","user","isPunchoutComplete"]),...Object(R.c)(["isTeamMember"])},async mounted(){this.getOneShotMessages(),await this.$store.dispatch("requestIfIdle",["getAppData","getUser"]),window.fco=window.fco||{},fco.hideForesee=this.isTeamMember}})}}},[[1848,0]]]);
39//# sourceMappingURL=forgotPassword.1790193165.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.