1import{i as c,A as m,b as u,r as n,c as d}from"./index-DxLyegl1.js";import{i as h}from"./http-fetch-B_I1rqMK.js";import{A as g,s as v}from"./auth.service-BSVYmaqi.js";import"./button.styles-Bi9FTmFN.js";var b=Object.defineProperty,w=Object.getOwnPropertyDescriptor,i=(e,s,o,a)=>{for(var t=a>1?void 0:a?w(s,o):s,l=e.length-1,p;l>=0;l--)(p=e[l])&&(t=(a?p(s,o,t):p(t))||t);return a&&t&&b(s,o,t),t};let r=class extends c{constructor(){super(...arguments),this.authService=h.resolve(g),this.isSubmitting=!1,this.errorMessage="",this.username="",this.password=""}connectedCallback(){super.connectedCallback(),document.title="Budget Builder - Service Login"}render(){return u` 2 <div class="login-shell"> 3 <section class="login-card"> 4 <p class="eyebrow">License Management</p> 5 <h1 class="login-title">Login required</h1> 6 <p class="login-copy"> 7 Authenticate first to access the license management area. 8 </p> 9 10 ${this.errorMessage?u`<div class="status-banner error">${this.errorMessage}</div>`:m} 11 12 <form class="form-grid" @submit=${this.handleLogin}> 13 <div class="field"> 14 <label for="username">Username</label> 15 <input 16 id="username" 17 type="text" 18 autocomplete="username" 19 .value=${this.username} 20 @input=${this.handleUsernameInput} 21 /> 22 </div> 23 24 <div class="field"> 25 <label for="password">Password</label> 26 <input 27 id="password" 28 type="password" 29 autocomplete="current-password" 30 .value=${this.password} 31 @input=${this.handlePasswordInput} 32 /> 33 </div> 34 35 <button class="btn-primary" type="submit" ?disabled=${this.isSubmitting}> 36 ${this.isSubmitting?"Signing in...":"Login"} 37 </button> 38 </form> 39 </section> 40 </div> 41 `}async handleLogin(e){e.preventDefault(),this.isSubmitting=!0,this.errorMessage="";const s=await this.authService.login(this.username.trim(),this.password);if(this.isSubmitting=!1,!s.success){this.errorMessage=s.message;return}this.password="",window.history.pushState({},"","/service/management/licenses"),window.dispatchEvent(new PopStateEvent("popstate"))}handleUsernameInput(e){this.username=e.target.value}handlePasswordInput(e){this.password=e.target.value}};r.styles=v;i([n()],r.prototype,"isSubmitting",2);i([n()],r.prototype,"errorMessage",2);i([n()],r.prototype,"username",2);i([n()],r.prototype,"password",2);r=i([d("service-management-element")],r);export{r as ServiceManagementElement};
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.