1"use strict";(self.webpackChunkspa_client=self.webpackChunkspa_client||[]).push([[493],{24493($,h,n){n.d(h,{AppCustomerModule:()=>B});var u=n(49769),m=n(84635),p=n(89417),g=n(37774),f=n(45234),v=n(16877),w=n(50779),C=n(93049),T=n(89754),e=n(35547),i=n(85802),d=n(86093),l=n(91902),k=n(37859),y=n(99287),R=n(77512),P=n(91413),S=n(5491),x=n(53218);function V(o,c){if(1&o&&e.nrm(0,"customer-auth-script-loader",2),2&o){const t=e.XpG();e.Y8G("containerId","resetPasswordHandler")("scriptSrc",t.scriptSrc)("config",t.config())}}let A=(()=>{class o{constructor(t,s,r,a,D){this.authService=t,this.configManager=s,this.refreshTokenHelper=r,this.activatedRoute=a,this.Http=D,this.config=(0,i.vPA)({}),this.isGuest=!1,this.isLoggedIn=!1,this.scriptSrc="",this.show404=!1,this.showSuccess=!1,this.isValidToken=!1,this.onResetPassword=new i.bkB,this.onValidateToken=new i.bkB,this.appConfig=this.configManager.getConfig("app"),this.customerConfig=this.configManager.getConfig("customer"),this.customerAuthConfig=this.configManager.getConfig("customer_auth"),this.scriptSrc=this.customerAuthConfig.scriptSrc,this.config.set({websiteCode:this.appConfig.website_code,pageType:"cart",containerId:"resetPasswordHandler",app:"resetPassword"}),this.customerId=this.activatedRoute.snapshot.params.customer_id,this.token=this.activatedRoute.snapshot.params.token,window.resetCustomerId=this.customerId,window.resetToken=this.token,this.isGuest="y"===this.activatedRoute.snapshot.queryParams.guest_flag}ngOnInit(){this.authService.parseAccessTokenData()&&(this.isLoggedIn=!0),this.validateToken(),document.getElementById("resetPasswordHandler")?.addEventListener("auth.resetPasswordSuccess",()=>{this.handleSuccessfulReset()})}ngAfterContentInit(){setTimeout(()=>{document.querySelector(".reset-password-wrapper")?.focus({preventScroll:!0})})}handleSuccessfulReset(){this.isGuest&&this.isLoggedIn&&this.updateAccessToken(),this.onResetPassword.emit(!0)}validateToken(){let t=this.customerConfig.reset_password_token_url;(!this.customerId||!this.token)&&(window.location.href=this.appConfig.site_url),t+=`/${this.token}?cid=${this.customerId}&websiteCode=${this.appConfig.website_code}`,this.Http.get(t).subscribe(s=>{this.isValidToken=s.success,this.onValidateToken.emit(s.success),document.querySelector("page-loader")?.parentElement.remove()},()=>{this.onValidateToken.emit(!1),document.querySelector("page-loader")?.parentElement.remove()})}updateAccessToken(){this.refreshTokenHelper.refreshAccessToken().subscribe(t=>{this.authService.setAccessToken(t.access_token,t.expires_in)})}static{this.\u0275fac=function(s){return new(s||o)(e.rXU(y.u),e.rXU(l.v),e.rXU(R.x),e.rXU(d.nX),e.rXU(P.Qq))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["reset-password-handler"]],outputs:{onResetPassword:"onResetPassword",onValidateToken:"onValidateToken"},standalone:!1,decls:4,vars:1,consts:[["id","resetPasswordHandler",1,"comp-reset-password-handler-container"],[1,"site-page-loader"],[3,"containerId","scriptSrc","config"]],template:function(s,r){1&s&&(e.j41(0,"div",0)(1,"div"),e.nrm(2,"page-loader",1),e.k0s(),e.nVh(3,V,1,3,"customer-auth-script-loader",2),e.k0s()),2&s&&(e.R7$(3),e.vxM(r.isValidToken?3:-1))},dependencies:[S.o,x.W],encapsulation:2,changeDetection:0})}}return o})();function _(o,c){if(1&o){const t=e.RV6();e.j41(0,"reset-password-handler",4),e.bIt("onResetPassword",function(r){i.eBV(t);const a=e.XpG(2);return i.Njj(a.handleResetSuccess(r))})("onValidateToken",function(r){i.eBV(t);const a=e.XpG(2);return i.Njj(a.handleTokenValidation(r))}),e.k0s()}}function I(o,c){if(1&o){const t=e.RV6();e.j41(0,"div")(1,"div",5)(2,"div",6),e.nrm(3,"i",7),e.j41(4,"div",8),e.EFF(5," Your password has been successfully reset. "),e.nrm(6,"br"),e.k0s()()(),e.j41(7,"button",9),e.bIt("click",function(){i.eBV(t);const r=e.XpG(2);return i.Njj(r.redirectToSite())}),e.EFF(8," Return to Homepage "),e.k0s()()}}function X(o,c){if(1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.nVh(3,_,1,0,"reset-password-handler")(4,I,9,0,"div"),e.k0s()()(),e.nrm(5,"div",3)),2&o){const t=e.XpG();e.Y8G("hidden",t.validatingToken),e.R7$(3),e.vxM(t.showSuccess?4:3),e.R7$(2),e.Y8G("hidden",!t.validatingToken)}}function b(o,c){1&o&&e.nrm(0,"not-found")}let M=(()=>{class o{constructor(t,s){this.router=t,this.ConfigManagerService=s,this.showSuccess=!1,this.validatingToken=!0,this.show404=!1,this.appConfig=this.ConfigManagerService.getConfig("app"),this.siteUrl=this.appConfig.site_url}handleTokenValidation(t){this.validatingToken=!1,t||(this.show404=!0)}handleResetSuccess(t){this.showSuccess=t}redirectToSite(){window.location.href=this.siteUrl}static{this.\u0275fac=function(s){return new(s||o)(e.rXU(d.Ix),e.rXU(l.v))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["reset-password"]],standalone:!1,decls:2,vars:1,consts:[[1,"page-reset-password-container",3,"hidden"],[1,"container","reset-password-content"],[1,"comp-reset-password-container","col-md-12"],[1,"comp-page-content-filler",3,"hidden"],[3,"onResetPassword","onValidateToken"],["role","alert",1,"site-alert-success"],[1,"error-wrap","alert-title"],[1,"fehp-checkmark","pull-left"],[1,"success-reset-message"],[1,"site-btn-primary","reset-password-btn",3,"click"]],template:function(s,r){1&s&&e.nV
1h(0,X,6,3)(1,b,1,0,"not-found"),2&s&&e.vxM(r.show404?1:0)},dependencies:[k.X,A],styles:[".page-reset-password-container .comp-reset-password-container{margin:0 auto;padding:50px 15px;float:none}.page-reset-password-container .reset-password-btn{width:100%}.page-reset-password-container .success-reset-message{padding-left:20px;text-align:left}.page-reset-password-container .comp-reset-password-handler-container .customer-form-group{margin-bottom:0}.page-reset-password-container .comp-reset-password-handler-container .customer-form-group.error .site-form-input{border:1px solid #E81E42}.page-reset-password-container .comp-reset-password-handler-container .help-block{color:#c00;margin-bottom:0;font-size:12px;text-align:left}.page-reset-password-container .comp-reset-password-handler-container .customer-alert-warning{background-color:#fde8ec;padding:15px;border-radius:6px}.page-reset-password-container .comp-reset-password-handler-container .customer-alert-warning .error-icon{font-size:18px;color:#107abf;margin-top:2px;padding-right:5px;align-self:flex-start}.page-reset-password-container .comp-reset-password-handler-container .customer-alert-warning .error-message{color:#e81e42;font-size:16px;font-weight:700;line-height:24px}\n"],encapsulation:2})}}return o})();var U=n(71904);const j=C.iI.forChild([{path:"login",component:(()=>{class o{constructor(t,s,r,a){this.ConfigManager=t,this.activatedRoute=s,this.renderer=r,this.el=a,this.formType="login",this.pageType="cart",this.params=(0,i.vPA)(null),this.host=(0,i.vPA)({modal:!1}),this.formHeaderTitle="Login",this.formTypeValues={login:"Log in to Packlane",register:"Create your account",forgot_password:"Reset your password",reset_password:"Reset Password"},this.validFormParam=["login","register"],this.appConfig=this.ConfigManager.getConfig("app"),this.customerAuthConfig=this.ConfigManager.getConfig("customer_auth"),this.customerAuthStylesConfig=this.ConfigManager.getConfig("customer_auth_styles")}ngOnInit(){this.activatedRoute.queryParams.subscribe(t=>{t.form&&this.validFormParam.indexOf(t.form)>=0&&(this.formType=t.form)}),this.params.set({forgot_password:"inline",register:"inline",login:"inline",page:"inl
1ine"}),this.customerAuthStylesConfig?.login_register&&this.loadStyles(this.customerAuthStylesConfig?.login_register),this.customerAuthStylesConfig?.login_register_mobile&&this.loadStyles(this.customerAuthStylesConfig?.login_register_mobile)}loadStyles(t){const s=this.renderer.createElement("link");this.renderer.setAttribute(s,"rel","stylesheet"),this.renderer.setAttribute(s,"href",t),this.renderer.appendChild(this.el.nativeElement.ownerDocument.head,s)}static{this.\u0275fac=function(s){return new(s||o)(e.rXU(l.v),e.rXU(d.nX),e.rXU(e.sFG),e.rXU(e.aKT))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["customer-auth"]],inputs:{formType:"formType",pageType:"pageType"},standalone:!1,features:[e.Jv_([])],decls:4,vars:7,consts:[["tabindex","0",1,"login-register-panel"],[1,"login-register-content"],[3,"formType","pageType","params","modal"]],template:function(s,r){1&s&&(e.j41(0,"div")(1,"div",0)(2,"div",1),e.nrm(3,"customer-auth-host",2),e.k0s()()()),2&s&&(e.HbH(e.VkB("flow-checkout-container page-login-register-container ",r.formType," comp-login-register-container")),e.R7$(3),e.Y8G("formType",r.formType)("pageType",r.pageType)("params",r.params())("modal",r.host().modal))},dependencies:[U.U],encapsulation:2,changeDetection:0})}}return o})(),canActivate:[T._],data:{redirect_to_url:!0}},{path:"reset-password/:customer_id/:token",component:M}]);var E=n(15943),G=n(79570),F=n(29504);let B=(()=>{class o{static{this.\u0275fac=function(s){return new(s||o)}}static{this.\u0275mod=e.$C({type:o})}static{this.\u0275inj=i.G2t({providers:[{provide:"Window",useValue:window}],imports:[u.MD,m.Zn,p.YN,p.X1,g.l,f.L,j,v.d,w.Q_,E.q,G.t,F.P]})}}return o})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.