"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lit"),e=require("lit/decorators.js"),n=require("lit/directives/style-map.js"),d=a.css` .clock-wrap { aspect-ratio: 1 / 1; height: fit-content; position: relative; } .clock { width: 100%; height: 100%; position: relative; left: 50%; transform: translateX(-50%); border: 6px solid var(--rim-color); border-radius: 50%; transition: all ease 0.2s; z-index: 2; } .clock-dial { z-index: 1; position:absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: calc(98% - 6px); height: calc(98% - 6px); } .dot { background-color: var(--dot-color); border: 6px solid var(--rim-color); border-radius: 50%; width: calc(7% - 6px); aspect-ratio: 1 / 1; position: relative; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; } .hour, .min, .sec { position: absolute; transform-origin: 50% 100%; transition: all ease 0.2s; } .hour { background-color: var(--clock-color); height: 25%; width: 5%; border-radius: 18px; top: 25%; left: 47.5%; z-index: 2; } .min { background-color: var(--clock-color); height: 35%; width: 3%; border-radius: 12px; top:15%; left:48.5%; z-index: 2; } .sec { background-color: var(--seconds-color); height: 45%; width: 1%; border-radius: 6px; top: 5%; left:49.5%; z-index: 3; } `;var h=Object.defineProperty,C=Object.getOwnPropertyDescriptor,l=(p,o,s,t)=>{for(var c=t>1?void 0:t?C(o,s):o,r=p.length-1,i;r>=0;r--)(i=p[r])&&(c=(t?i(o,s,c):i(c))||c);return t&&c&&h(o,s,c),c};exports.ClockComponent=class extends a.LitElement{constructor(){super(...arguments),this.timeZonedDate=new Date,this.clockColor="black",this.rimColor="#e3e1e1",this.dotColor="#888888",this.secondsColor="#f00",this.hourStyles={},this.minuteStyles={},this.secondStyles={},this.timeInterval=0}render(){const o={"--clock-color":this.clockColor,"--rim-color":this.rimColor,"--dot-color":this.dotColor,"--seconds-color":this.secondsColor};return a.html`
${this.renderClockFace()}
`}async connectedCallback(){super.connectedCallback();const o=6,s=this.timeZonedDate.getUTCDate();this.timeInterval=setInterval(()=>{const t=new Date;t.setUTCDate(s);const c=t.getHours()*30,r=t.getMinutes()*o,i=t.getSeconds()*o;this.hourStyles={transform:`rotateZ(${c+r/12}deg)`},this.minuteStyles={transform:`rotateZ(${r}deg)`},this.secondStyles={transform:`rotateZ(${i}deg)`}},1e3)}disconnectedCallback(){clearInterval(this.timeInterval),super.disconnectedCallback()}renderClockFace(){return a.svg` `}};exports.ClockComponent.styles=[d];l([e.property({type:Date})],exports.ClockComponent.prototype,"timeZonedDate",2);l([e.property({type:String})],exports.ClockComponent.prototype,"clockColor",2);l([e.property({type:String})],exports.ClockComponent.prototype,"rimColor",2);l([e.property({type:String})],exports.ClockComponent.prototype,"dotColor",2);l([e.property({type:String})],exports.ClockComponent.prototype,"secondsColor",2);l([e.state()],exports.ClockComponent.prototype,"hourStyles",2);l([e.state()],exports.ClockComponent.prototype,"minuteStyles",2);l([e.state()],exports.ClockComponent.prototype,"secondStyles",2);exports.ClockComponent=l([e.customElement("app-clock")],exports.ClockComponent);