From cb55af30f12e70aa31fdb11ded73fea2c5975215 Mon Sep 17 00:00:00 2001 From: Deyan Stamboliev Date: Wed, 29 Nov 2023 15:20:09 +0200 Subject: [PATCH] build: deploy dist for github pages --- assets/styles/index.css | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/styles/index.css b/assets/styles/index.css index b07b09e..b6dbb93 100644 --- a/assets/styles/index.css +++ b/assets/styles/index.css @@ -6,4 +6,4 @@ * @author Deyan 'stambolievv' Stamboliev * @license Apache-2.0 */ -:root{--surface: #f0f0f0;--button-highlight: #ffffff;--button-face: #f2f2f2;--button-face-hover: #eaf6fd;--button-face-active: #c4e5f6;--button-face-disabled: #f4f4f4;--button-shade-light: #ebebeb;--button-shade-light-hovered: #bee6fd;--button-shade-light-active: #98d1ef;--button-shade-dark: #cfcfcf;--border-width: 1px;--border-radius: 3px;--button-shadow: inset 0 0 0 1px #ffffffcc, inset 0 1px 1px #ffffff;--button-outline: var(--focus-outline);--button-outline-offset: var(--focus-outline-offset);--button-border: var(--border-width) solid;--button-border-color: #8e8f8f;--button-border-color-hovered: #3c7fb1;--button-border-color-active: #6d91ab;--button-border-color-disabled: #aeb2b5;--button-text-color: #222222;--button-text-color-disabled: #838383;--button-gradient: linear-gradient(to bottom, #f2f2f2 45%, #ebebeb 45%, #cfcfcf);--button-gradient-hovered: linear-gradient(to bottom, #eaf6fd 45%, #bee6fd 45%, #a7d9f5);--button-gradient-active: linear-gradient(to bottom, #e5f4fc, #c4e5f6 30% 50%, #98d1ef 50%, #68b3db);--menu-background: linear-gradient(#ffffff 20%, #f1f4fa 25%, #f1f4fa 43%, #d4dbee 48%, #e6eaf6);--menubar-background: transparent;--menuitem-background-hover: var(--color-accent);--menuitem-text-color: var(--color-accent);--menuitem-text-color-hover: var(--color-primary)}:root{--scrollbar-y: linear-gradient(to right, #e5e5e5, var(--surface) 20%);--scrollbar-x: linear-gradient(to bottom, #e5e5e5, var(--surface) 20%)}[scrollbar]::-webkit-scrollbar{width:16px}[scrollbar]::-webkit-scrollbar:horizontal{height:17px}[scrollbar]::-webkit-scrollbar-corner{background:var(--button-face)}[scrollbar]::-webkit-scrollbar-track:vertical{background:var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-track:horizontal{background:var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-thumb{border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-thumb:vertical{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face) 45%,var(--button-shade-light) 45%,var(--button-shade-dark))}[scrollbar]::-webkit-scrollbar-thumb:horizontal{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face) 45%,var(--button-shade-light) 45%,var(--button-shade-dark))}[scrollbar]::-webkit-scrollbar-thumb:hover:vertical{border-color:var(--button-border-color-hovered);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-thumb:hover:horizontal{border-color:var(--button-border-color-hovered);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-thumb:active:vertical{border-color:var(--button-border-color-active);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-thumb:active:horizontal{border-color:var(--button-border-color-active);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:horizontal:start:increment,[scrollbar]::-webkit-scrollbar-button:horizontal:end:decrement,[scrollbar]::-webkit-scrollbar-button:vertical:start:increment,[scrollbar]::-webkit-scrollbar-button:vertical:end:decrement{display:none}[scrollbar]::-webkit-scrollbar-button{border:var(--button-border) transparent}[scrollbar]::-webkit-scrollbar-button:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:vertical:start{background:url(/Car-Service/assets/images/button-up.svg),var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-button:vertical:end{background:url(/Car-Service/assets/images/button-down.svg),var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-button:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:horizontal:start{background:url(/Car-Service/assets/images/button-left.svg),var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-button:horizontal:end{background:url(/Car-Service/assets/images/button-right.svg),var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-button:hover{border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-button:hover:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:hover:vertical:start{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-up.svg),linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:vertical:end{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-down.svg),linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:hover:horizontal:start{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-left.svg),linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:horizontal:end{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-right.svg),linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:active{border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-button:active:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:active:vertical:start{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-up.svg),linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:vertical:end{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-down.svg),linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:active:horizontal:start{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-left.svg),linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:horizontal:end{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-right.svg),linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}:root{--border-radius: 2px}input[type=search]{border:var(--border-width) solid transparent;border-radius:var(--border-radius);background-color:var(--button-highlight);box-shadow:inset 1px 1px 0 var(--button-border-color),inset -1px -1px 0 var(--button-shade-dark);font-size:inherit;font-family:inherit;caret-color:var(--color-accent);cursor:text}input[type=search]:placeholder-shown{background-size:1rem;background-position:calc(100% - .8rem) calc(100% - .3rem);background-image:url(/Car-Service/assets/images/search.svg);background-repeat:no-repeat}input[type=search]::-webkit-search-cancel-button{position:relative;right:10px}input[type=search]:focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}input[type=search]::placeholder{font-style:italic}input[type=search]:disabled{background-color:var(--button-face-disabled);color:var(--button-text-color-disabled)}input[type=search]:disabled:placeholder-shown{filter:grayscale(1)}input[type=search]:disabled::placeholder{opacity:0}select:not([multiple]){position:relative;padding-block:.5vh;padding-inline-start:.5vw;padding-inline-end:16px;color:var(--button-text-color);background:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient);background-position:center right;background-repeat:no-repeat;border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);font-size:inherit;font-family:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}select:not([multiple]):focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}select:not([multiple]):not(:disabled):hover,select:not([multiple]):focus-visible{background-image:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient-hovered);border-color:var(--button-border-color-hovered)}select:not([multiple]):not(:disabled):active{background-image:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient-active);border-color:var(--button-border-color-active);box-shadow:var(--button-shadow-active);outline:none}select:disabled{background-image:url(/Car-Service/assets/images/button-down.svg);background-color:var(--button-face-disabled);border-color:var(--button-border-color-disabled);color:var(--button-text-color-disabled)}button,[role=button]{width:min(100%,15vmax);min-width:max-content;padding-block:.2vh;padding-inline:1.5vw;color:var(--button-text-color);background:var(--button-gradient);border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);cursor:pointer;font-size:inherit;font-family:inherit;font-weight:400;text-wrap:nowrap;text-align:center;text-decoration:none;user-select:none}button:disabled,[role=button]:disabled{color:var(--button-text-color-disabled);background:var(--button-face-disabled);border-color:var(--button-border-color-disabled)}button:focus-visible,[role=button]:focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}button:not(:disabled):hover,[role=button]:not(:disabled):hover,button:not(:disabled):focus-visible,[role=button]:not(:disabled):focus-visible{background:var(--button-gradient-hovered);border-color:var(--button-border-color-hovered)}button:not(:disabled):active,[role=button]:not(:disabled):active{background:var(--button-gradient-active);border-color:var(--button-border-color-active)}button[button-type],[role=button][button-type]{animation:button-animation 3s ease-in-out infinite}button[button-type=info],[role=button][button-type=info]{--button-gradient: linear-gradient(to bottom, #ebf3fa 45%, #dceffd 45%, #c8def8);--button-gradient-hovered: linear-gradient(to bottom, #d8eaf9 45%, #aad4fc 45%, #7fc6f7);--button-gradient-active: linear-gradient(to bottom, #cceffd, #a1def7 30% 50%, #68c3f3 50%, #4cb6ef);--button-border-color-hovered: #3a83cc;--button-border-color-active: #266baf;--_button-type-shadow-color: #7fc6f7}button[button-type=success],[role=button][button-type=success]{--button-gradient: linear-gradient(to bottom, #e5f9e5 45%, #d4f5d8 45%, #b9ecbf);--button-gradient-hovered: linear-gradient(to bottom, #d2f8d8 45%, #aaf0c2 45%, #82e8aa);--button-gradient-active: linear-gradient(to bottom, #c1f9d1, #93e8b8 30% 50%, #66d495 50%, #3fb681);--button-border-color-hovered: #55a63a;--button-border-color-active: #3d802b;--_button-type-shadow-color: #82e8aa}button[button-type=warning],[role=button][button-type=warning]{--button-gradient: linear-gradient(to bottom, #fdf0cb 45%, #fde3aa 45%, #f7db94);--button-gradient-hovered: linear-gradient(to bottom, #f9ecd9 45%, #f8d8ab 45%, #f7c57e);--button-gradient-active: linear-gradient(to bottom, #fdebc0, #fbd09e 30% 50%, #f8bf70 50%, #f5ae36);--button-border-color-hovered: #d68b2a;--button-border-color-active: #b06d1f;--_button-type-shadow-color: #f7c57e}button[button-type=danger],[role=button][button-type=danger]{--button-gradient: linear-gradient(to bottom, #fde4e2 45%, #fdd8cb 45%, #fdc0b6);--button-gradient-hovered: linear-gradient(to bottom, #fddedf 45%, #fabdbb 45%, #f78c97);--button-gradient-active: linear-gradient(to bottom, #fde3e1, #fbb1ad 30% 50%, #f87984 50%, #f54750);--button-border-color-hovered: #b84641;--button-border-color-active: #9e382f;--_button-type-shadow-color: #f78c97}@keyframes button-animation{50%{box-shadow:inset 0 0 10px 4px var(--_button-type-shadow-color)}}[role=navigation]{display:flex;justify-content:space-between;background:var(--menu-background);font-size:inherit;font-family:inherit}[role=navigation]>:not([hidden]):last-child{margin-inline-start:auto;margin-inline-end:0}[role=menubar]{display:flex;list-style:none;background:var(--menubar-background)}[role=menubar]>[role=menuitem]{cursor:pointer}[role=menubar]>[role=menuitem]>*{display:block;width:100%;height:100%;padding-block:1vh;padding-inline:1vw;color:var(--menuitem-text-color);text-align:center;text-decoration:none;outline:none}[role=menubar]>[role=menuitem]>*:hover,[role=menubar]>[role=menuitem]>*:focus-visible{background:var(--menuitem-background-hover);color:var(--menuitem-text-color-hover)}[role=menuitem]:disabled{opacity:.5;pointer-events:none}.notice-loading,.notice-loading-main,.notice-modal,.notice-modal-main{z-index:99999}.notice-toast,.notice-toast-main{z-index:99997}.notice-mask{z-index:99998}.notice-flex-center{display:flex;flex-direction:column;justify-content:center;align-items:center}.notice-fixed-all-page{position:fixed;inset:0}.notice-loading-main p{font-size:2.2em;font-weight:700;letter-spacing:1px;color:var(--color-primary)}.notice-modal-main{align-items:stretch;width:fit-content;margin:20vh 2vh auto;font-weight:700;background-color:var(--background-color-primary);border-radius:var(--default-border-radius);animation:fade-in .4s ease-out}.notice-modal-main h2{margin-block-start:-2.5vmin;margin-inline:2vmin;text-align:center;font-size:2.2em;color:var(--color-primary);background-color:var(--color-accent);border:var(--default-border);border-radius:var(--default-border-radius);box-shadow:var(--default-box-shadow)}.notice-modal-main p{text-align:center;font-size:1.6em;margin-block-start:3.5vmin;margin-inline:5vmin;color:var(--color-accent)}.notice-modal-main .notice-modal-buttons{display:flex;justify-content:space-evenly;gap:5vw;margin-block:5vmin;margin-inline:5vmin}.notice-modal-main .notice-modal-buttons>*{font-size:1.2rem}.notice-toast{position:fixed;top:7vh;right:3vw;--_should-auto-close: 0}.notice-toast-main{display:flex;justify-content:space-between;align-items:center;max-width:50vw;padding:2vmin;margin-block:1vmin;opacity:0;border-radius:8px;transition:all .5s ease-in-out}.notice-toast-main-active{opacity:1}.notice-toast-container{display:flex;align-items:center;width:100%}.notice-toast-main .notice-toast-icon{font-size:1.7rem}.notice-toast-main .notice-toast-text{flex:1;margin-inline:2vmin;font-size:1rem}.notice-toast-main .notice-close-icon{font-size:1.3rem;color:#a9a9a9;cursor:pointer}@media (max-width: 600px){.notice-toast{margin-block-start:10vmin;transform:translate(-50%);--_should-auto-close: 1}.notice-toast-container{position:relative;flex-direction:column}.notice-toast-main .notice-toast-icon{font-size:2em}.notice-toast-main .notice-toast-text{text-align:center}.notice-toast-main .notice-close-icon{position:absolute;top:0;right:0;font-size:2em}}.notice-loading-cube-flip{width:40px;height:40px;margin:10px auto;-webkit-animation:notice-loading-cube-flip-rotate 1.2s ease-in-out infinite;animation:notice-loading-cube-flip-rotate 1.2s ease-in-out infinite}.notice-loading-dots-zoom{position:relative;width:40px;height:40px;margin:10px auto}.notice-loading-dots-zoom1,.notice-loading-dots-zoom2{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;border-radius:50%;-webkit-animation:notice-loading-dots-zoom-bounce 2s ease-in-out infinite;animation:notice-loading-dots-zoom-bounce 2s ease-in-out infinite}.notice-loading-dots-zoom2{animation-delay:-1s;-webkit-animation-delay:-1s}.notice-loading-line{width:50px;height:40px;margin:10px auto;font-size:10px;text-align:center}.notice-loading-line>div{display:inline-block;width:6px;height:100%;-webkit-animation:notice-loading-line-delay 1.2s ease-in-out infinite;animation:notice-loading-line-delay 1.2s ease-in-out infinite}.notice-loading-line .notice-loading-line-rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.notice-loading-line .notice-loading-line-rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.notice-loading-line .notice-loading-line-rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.notice-loading-line .notice-loading-line-rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.notice-loading-spin-dots{position:relative;width:45px;height:45px;margin:20px auto;text-align:center;-webkit-animation:notice-loading-spin-dots-rotate 2s linear infinite;animation:notice-loading-spin-dots-rotate 2s linear infinite}.notice-loading-spin-dot1,.notice-loading-spin-dot2{display:inline-block;position:absolute;top:0;width:60%;height:60%;border-radius:100%;-webkit-animation:notice-loading-spin-dots-bounce 2s ease-in-out infinite;animation:notice-loading-spin-dots-bounce 2s ease-in-out infinite}.notice-loading-spin-dot2{top:auto;bottom:0;-webkit-animation-delay:-1s;animation-delay:-1s}.notice-loading-cube-zoom{width:40px;height:40px;margin:10px auto}.notice-loading-cube-zoom>div{width:33%;height:33%;float:left;-webkit-animation:notice-loading-cube-zoom-delay 1.3s ease-in-out infinite;animation:notice-loading-cube-zoom-delay 1.3s ease-in-out infinite}.notice-loading-cube-zoom-1{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-cube-zoom-2{-webkit-animation-delay:.3s!important;animation-delay:.3s!important}.notice-loading-cube-zoom-3{-webkit-animation-delay:.4s!important;animation-delay:.4s!important}.notice-loading-cube-zoom-4{-webkit-animation-delay:.1s!important;animation-delay:.1s!important}.notice-loading-cube-zoom-5{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-cube-zoom-6{-webkit-animation-delay:.3s!important;animation-delay:.3s!important}.notice-loading-cube-zoom-7{-webkit-animation-delay:0s!important;animation-delay:0s!important}.notice-loading-cube-zoom-8{-webkit-animation-delay:.1s!important;animation-delay:.1s!important}.notice-loading-cube-zoom-9{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-dots{width:65px;margin:15px auto;text-align:center}.notice-loading-dots>div{display:inline-block;width:15px;height:15px;border-radius:100%;-webkit-animation:notice-loading-dots-delay 1.4s ease-in-out infinite both;animation:notice-loading-dots-delay 1.4s ease-in-out infinite both}.notice-loading-dot1{-webkit-animation-delay:-.32s!important;animation-delay:-.32s!important}.notice-loading-dot2{-webkit-animation-delay:-.16s!important;animation-delay:-.16s!important}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes notice-loading-cube-flip-rotate{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}to{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes notice-loading-cube-flip-rotate{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0deg) rotateY(0deg)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0deg)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}@-webkit-keyframes notice-loading-dots-zoom-bounce{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes notice-loading-dots-zoom-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}@-webkit-keyframes notice-loading-line-delay{0%,40%,to{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes notice-loading-line-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}@-webkit-keyframes notice-loading-spin-dots-rotate{to{-webkit-transform:rotate(1turn)}}@keyframes notice-loading-spin-dots-rotate{to{transform:rotate(1turn);-webkit-transform:rotate(1turn)}}@-webkit-keyframes notice-loading-spin-dots-bounce{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes notice-loading-spin-dots-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}@-webkit-keyframes notice-loading-cube-zoom-delay{0%,70%,to{-webkit-transform:scaleX(1);transform:scaleX(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@keyframes notice-loading-cube-zoom-delay{0%,70%,to{-webkit-transform:scaleX(1);transform:scaleX(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@-webkit-keyframes notice-loading-dots-delay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes notice-loading-dots-delay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}form{max-width:100vmin;margin-inline:auto}form fieldset{padding-inline:max(1vmax,5px);padding-block-start:max(1vmax,5px);padding-block-end:1vmax;background-color:var(--color-primary);border:var(--default-border);border-radius:var(--default-border-radius);box-shadow:var(--default-box-shadow)}form>fieldset{display:grid;gap:1vmax;cursor:default}form fieldset legend{width:100%;padding-inline-start:min(5vmax,10px);text-align:left;color:var(--color-primary);background-color:var(--color-accent);border:var(--default-border);border-radius:var(--default-border-radius)}form>fieldset>legend{font-size:1.35em}form .input-fields{display:flex;flex-direction:column;gap:.4vmax}form .input-fields .field{display:flex;flex-direction:column;text-align:left;word-break:break-all;text-wrap:balance}form .input-fields input,form .input-fields textarea{width:100%;padding-block:max(.5vmax,5px);padding-inline:max(.5vmax,5px);caret-color:var(--color-accent)}form .input-fields textarea{min-height:max(10vmax,100px);transition:height .2s ease-out;backdrop-filter:brightness(.9);resize:none;cursor:text;overflow:auto}form .input-fields input:focus-visible,form .input-fields textarea:focus-visible{outline:var(--focus-outline);outline-offset:var(--focus-outline-offset)}form .input-fields label{width:100%;padding-inline-start:max(.4vmax,2px);font-weight:700}form .input-fields label .required{color:var(--form-required-input)}form .buttons{display:flex;justify-content:space-around;align-items:center;gap:min(.8vmax,5px)}#auth-page form{display:flex;align-items:center;justify-content:center}#auth-page form>fieldset{min-width:25vw}#auth-page form legend{padding:0;text-align:center}#auth-page form input::placeholder{opacity:.5}#auth-page form .password-field{position:relative}#auth-page form .eye-icon{position:absolute;top:50%;right:10px;transform:translateY(-50%);color:var(--color-accent);user-select:none;cursor:pointer}#auth-page form .buttons{margin-block-start:4vh;margin-block-end:1vh}#auth-page form .form-link{text-align:center;cursor:default}#auth-page form .form-link a{padding-block:.1vh;padding-inline:.5vw;color:var(--color-accent);text-decoration:none;border-radius:3px}#auth-page form .form-link a:hover{background-color:var(--color-accent);color:var(--color-primary)}#catalog-page form{max-width:80vw}#catalog-page form .empty{font-size:min(6vw,2.5em);text-align:center}#catalog-page form .search{display:flex;gap:1vw;padding-block:max(1vh,5px)}#catalog-page form .search>*{flex:1}#catalog-page form .search input{flex-basis:50%;padding-inline-start:min(1vw,10px)}#catalog-page form table{width:100%;border-collapse:collapse;table-layout:fixed;font-weight:700;word-break:break-all;text-wrap:balance;box-shadow:var(--default-box-shadow)}#catalog-page form table thead{text-align:center;background-color:var(--table-row-background);color:var(--color-primary)}#catalog-page form table tbody{text-align:left;color:var(--color-accent);background-color:var(--background-color-primary)}#catalog-page form table th,#catalog-page form table td{padding:.5vh;border-right:1px solid var(--table-cell-border);border-bottom:1px solid var(--table-cell-border)}#catalog-page form table tbody tr:nth-of-type(even){background-color:var(--background-color-secondary)}#catalog-page form table tbody tr:last-child{border-bottom:3px solid var(--color-accent)}#catalog-page form .pagination{display:flex;align-self:center;justify-content:center;padding-block:.5vmax;padding-inline:0;text-align:center}#catalog-page form .pagination a{position:relative;padding-inline:1vmax;margin-inline:.5vmax;color:var(--color-accent);text-decoration:none;border-radius:var(--default-border-radius);font-size:1.4em}#catalog-page form .pagination a:first-child{margin-inline-end:auto}#catalog-page form .pagination a:last-child{margin-inline-start:auto}#catalog-page form .pagination a>i{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#catalog-page form .pagination a:hover,#catalog-page form .pagination a:active,#catalog-page form .pagination a.active{background-color:var(--color-accent);color:var(--color-primary)}#catalog-page form .pagination a.not-selectable{pointer-events:none}@media (max-width: 600px){#catalog-page form>fieldset{width:100%}#catalog-page form .search{flex-direction:column}#catalog-page form .search input{min-height:4vh}#catalog-page form .search button{width:100%}#catalog-page form table tbody{display:flex;flex-direction:column;gap:2vw;background-color:var(--background-color-secondary)}#catalog-page form table th{display:none}#catalog-page form table td{display:grid;grid-template-columns:30vw auto;align-items:center;gap:max(.8vw,4px);padding:0;padding-inline-end:max(.8vw,4px);background-color:var(--background-color-primary)}#catalog-page form table td:before{content:attr(data-cell-content) ": ";height:100%;padding-block:max(.5vh,5px);padding-inline:max(1vw,3px);background-color:var(--table-row-background);color:var(--color-primary)}#catalog-page form table td .buttons>*{width:100%;margin-block:max(.5vh,5px)}#catalog-page form table td:nth-of-type(even){background-color:var(--background-color-secondary)}#catalog-page form table tbody tr:not(:first-child) td:first-child{border-top:1px solid var(--table-cell-border)}#catalog-page form table tbody tr:last-child td:last-child{border-bottom:0}#catalog-page form .pagination a{padding-inline:2vw;margin-inline:2vw}}:root{--color-accent: #234465;--color-primary: #ffffff;--background-color-primary: #ffffff;--background-color-secondary: #eeeeee;--default-border: 1px solid #666666;--default-border-radius: 3px;--default-box-shadow: 0 0 10px 0 #36444b4d;--focus-outline: thin dotted black;--focus-outline-offset: -3px;--form-required-input: #ff0000;--table-row-background: #234465;--table-cell-border: #dddddd}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}body{display:grid;grid-template-rows:auto 1fr auto;min-height:100vh;min-height:100dvh;font-size:calc(.8rem + .2vmin);font-family:Segoe UI,SegoeUI,Noto Sans,sans-serif;background-image:url(/Car-Service/assets/images/background.jpg);background-attachment:fixed;background-position:center;background-size:cover}main{align-self:center;justify-self:center;width:min(90vw,100% - 3rem);margin:5vmin}header{font-size:1.2em}footer{padding-block:.5vmin;background:var(--color-accent);font-size:1.2em;cursor:default}footer>p{color:var(--color-primary);text-align:center;font-weight:700}i{text-align:center;vertical-align:middle}[disabled],[aria-disabled=true]{pointer-events:none!important}[hidden],[aria-hidden=true]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;visibility:hidden;clip:rect(0 0 0 0);border:0} +:root{--surface: #f0f0f0;--button-highlight: #ffffff;--button-face: #f2f2f2;--button-face-hover: #eaf6fd;--button-face-active: #c4e5f6;--button-face-disabled: #f4f4f4;--button-shade-light: #ebebeb;--button-shade-light-hovered: #bee6fd;--button-shade-light-active: #98d1ef;--button-shade-dark: #cfcfcf;--border-width: 1px;--border-radius: 3px;--button-shadow: inset 0 0 0 1px #ffffffcc, inset 0 1px 1px #ffffff;--button-outline: var(--focus-outline);--button-outline-offset: var(--focus-outline-offset);--button-border: var(--border-width) solid;--button-border-color: #8e8f8f;--button-border-color-hovered: #3c7fb1;--button-border-color-active: #6d91ab;--button-border-color-disabled: #aeb2b5;--button-text-color: #222222;--button-text-color-disabled: #838383;--button-gradient: linear-gradient(to bottom, #f2f2f2 45%, #ebebeb 45%, #cfcfcf);--button-gradient-hovered: linear-gradient(to bottom, #eaf6fd 45%, #bee6fd 45%, #a7d9f5);--button-gradient-active: linear-gradient(to bottom, #e5f4fc, #c4e5f6 30% 50%, #98d1ef 50%, #68b3db);--menu-background: linear-gradient(#ffffff 20%, #f1f4fa 25%, #f1f4fa 43%, #d4dbee 48%, #e6eaf6);--menubar-background: transparent;--menuitem-background-hover: var(--color-accent);--menuitem-text-color: var(--color-accent);--menuitem-text-color-hover: var(--color-primary)}:root{--scrollbar-y: linear-gradient(to right, #e5e5e5, var(--surface) 20%);--scrollbar-x: linear-gradient(to bottom, #e5e5e5, var(--surface) 20%)}[scrollbar]::-webkit-scrollbar{width:16px}[scrollbar]::-webkit-scrollbar:horizontal{height:17px}[scrollbar]::-webkit-scrollbar-corner{background:var(--button-face)}[scrollbar]::-webkit-scrollbar-track:vertical{background:var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-track:horizontal{background:var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-thumb{border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-thumb:vertical{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face) 45%,var(--button-shade-light) 45%,var(--button-shade-dark))}[scrollbar]::-webkit-scrollbar-thumb:horizontal{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face) 45%,var(--button-shade-light) 45%,var(--button-shade-dark))}[scrollbar]::-webkit-scrollbar-thumb:hover:vertical{border-color:var(--button-border-color-hovered);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-thumb:hover:horizontal{border-color:var(--button-border-color-hovered);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-thumb:active:vertical{border-color:var(--button-border-color-active);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADrSURBVChTTc5LboJQGAXguyoCu4ERCzAGlRk7UOwGWIDh0s4M4kxb06RSq/jAB6AxJkJ4lTDrue3AnvyzP+fLId+/yfM8juP7PQmCCOf7B3e+ZD+O40RRVFW12VQUpd3r9U3T2m4OpKoqWZYNwzBZLEqfh0N7NnvfrPcEWlEUWZb9mWF4Ph6D0ylcLbfM5HkeJrhGA2hb15/QXnv+w7RYXsDatjOdvnmrHSnLEizMNE2v11sUXQBCnn98kbquBUGQJAlmq9WB2e3qg4HJdqKkaRql1HGc0WgMcDJ5dd0F24kediZJ8t/ELT69H+8py0CYSIO5AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-thumb:active:horizontal{border-color:var(--button-border-color-active);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAADcSURBVChTNZBLqoUwEEQrURQUxZGCvy24ACfiityJi7tv8GauQoPxk5tquA2RQ9vVVYk6z9NZaxFFEe77htYazjk8z4MwDIVZ+rourOuKaZrwvi+WZcE8z1BKCbPPCjk4DAO2bRP1OI7wLiL6Mbd7J408z1GWpQwWRYGqqiQG+03TgMu0MacfUN4qANmn8UOv9MjW3sKaSm7iIdOSlziOQ3LScd93aPonSYK6riVLlmVo21aYfVqzND9pmqLrOlGT+76XbcxLZkb19/l3fEP+oF0cx8KMEASBsDEGX2/CgZCHkg+8AAAAAElFTkSuQmCC) no-repeat center,linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:horizontal:start:increment,[scrollbar]::-webkit-scrollbar-button:horizontal:end:decrement,[scrollbar]::-webkit-scrollbar-button:vertical:start:increment,[scrollbar]::-webkit-scrollbar-button:vertical:end:decrement{display:none}[scrollbar]::-webkit-scrollbar-button{border:var(--button-border) transparent}[scrollbar]::-webkit-scrollbar-button:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:vertical:start{background:url(/Car-Service/assets/images/button-up.svg),var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-button:vertical:end{background:url(/Car-Service/assets/images/button-down.svg),var(--scrollbar-y)}[scrollbar]::-webkit-scrollbar-button:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:horizontal:start{background:url(/Car-Service/assets/images/button-left.svg),var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-button:horizontal:end{background:url(/Car-Service/assets/images/button-right.svg),var(--scrollbar-x)}[scrollbar]::-webkit-scrollbar-button:hover{border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-button:hover:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:hover:vertical:start{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-up.svg),linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:vertical:end{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-down.svg),linear-gradient(to right,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:hover:horizontal:start{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-left.svg),linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:hover:horizontal:end{border-color:var(--button-border-color-hovered);background:url(/Car-Service/assets/images/button-right.svg),linear-gradient(to bottom,var(--button-face-hover) 45%,var(--button-shade-light-hovered) 45%)}[scrollbar]::-webkit-scrollbar-button:active{border-color:var(--button-border-color);border-radius:var(--border-radius);box-shadow:var(--button-shadow);background-color:var(--button-face)}[scrollbar]::-webkit-scrollbar-button:active:vertical{height:17px}[scrollbar]::-webkit-scrollbar-button:active:vertical:start{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-up.svg),linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:vertical:end{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-down.svg),linear-gradient(to right,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:horizontal{width:16px}[scrollbar]::-webkit-scrollbar-button:active:horizontal:start{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-left.svg),linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}[scrollbar]::-webkit-scrollbar-button:active:horizontal:end{border-color:var(--button-border-color-active);background:url(/Car-Service/assets/images/button-right.svg),linear-gradient(to bottom,var(--button-face-active) 45%,var(--button-shade-light-active) 45%)}:root{--border-radius: 2px}input[type=search]{border:var(--border-width) solid transparent;border-radius:var(--border-radius);background-color:var(--button-highlight);box-shadow:inset 1px 1px 0 var(--button-border-color),inset -1px -1px 0 var(--button-shade-dark);font-size:inherit;font-family:inherit;caret-color:var(--color-accent);cursor:text}input[type=search]:placeholder-shown{background-size:1rem;background-position:calc(100% - .8rem) calc(100% - .3rem);background-image:url(/Car-Service/assets/images/search.svg);background-repeat:no-repeat}input[type=search]::-webkit-search-cancel-button{position:relative;right:10px}input[type=search]:focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}input[type=search]::placeholder{font-style:italic}input[type=search]:disabled{background-color:var(--button-face-disabled);color:var(--button-text-color-disabled)}input[type=search]:disabled:placeholder-shown{filter:grayscale(1)}input[type=search]:disabled::placeholder{opacity:0}select:not([multiple]){position:relative;padding-block:.5vh;padding-inline-start:.5vw;padding-inline-end:16px;color:var(--button-text-color);background:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient);background-position:center right;background-repeat:no-repeat;border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);font-size:inherit;font-family:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}select:not([multiple]):focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}select:not([multiple]):not(:disabled):hover,select:not([multiple]):focus-visible{background-image:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient-hovered);border-color:var(--button-border-color-hovered)}select:not([multiple]):not(:disabled):active{background-image:url(/Car-Service/assets/images/button-down.svg),var(--button-gradient-active);border-color:var(--button-border-color-active);box-shadow:var(--button-shadow-active);outline:none}select:disabled{background-image:url(/Car-Service/assets/images/button-down.svg);background-color:var(--button-face-disabled);border-color:var(--button-border-color-disabled);color:var(--button-text-color-disabled)}button,[role=button]{width:min(100%,15vmax);min-width:max-content;padding-block:.2vh;padding-inline:1.5vw;color:var(--button-text-color);background:var(--button-gradient);border:var(--button-border);border-color:var(--button-border-color);border-radius:var(--border-radius);cursor:pointer;font-size:inherit;font-family:inherit;font-weight:400;text-wrap:nowrap;text-align:center;text-decoration:none;user-select:none}button:disabled,[role=button]:disabled{color:var(--button-text-color-disabled);background:var(--button-face-disabled);border-color:var(--button-border-color-disabled)}button:focus-visible,[role=button]:focus-visible{outline:var(--button-outline);outline-offset:var(--button-outline-offset)}button:not(:disabled):hover,[role=button]:not(:disabled):hover,button:not(:disabled):focus-visible,[role=button]:not(:disabled):focus-visible{background:var(--button-gradient-hovered);border-color:var(--button-border-color-hovered)}button:not(:disabled):active,[role=button]:not(:disabled):active{background:var(--button-gradient-active);border-color:var(--button-border-color-active)}button[button-type],[role=button][button-type]{animation:button-animation 3s ease-in-out infinite}button[button-type=info],[role=button][button-type=info]{--button-gradient: linear-gradient(to bottom, #ebf3fa 45%, #dceffd 45%, #c8def8);--button-gradient-hovered: linear-gradient(to bottom, #d8eaf9 45%, #aad4fc 45%, #7fc6f7);--button-gradient-active: linear-gradient(to bottom, #cceffd, #a1def7 30% 50%, #68c3f3 50%, #4cb6ef);--button-border-color-hovered: #3a83cc;--button-border-color-active: #266baf;--_button-type-shadow-color: #7fc6f7}button[button-type=success],[role=button][button-type=success]{--button-gradient: linear-gradient(to bottom, #e5f9e5 45%, #d4f5d8 45%, #b9ecbf);--button-gradient-hovered: linear-gradient(to bottom, #d2f8d8 45%, #aaf0c2 45%, #82e8aa);--button-gradient-active: linear-gradient(to bottom, #c1f9d1, #93e8b8 30% 50%, #66d495 50%, #3fb681);--button-border-color-hovered: #55a63a;--button-border-color-active: #3d802b;--_button-type-shadow-color: #82e8aa}button[button-type=warning],[role=button][button-type=warning]{--button-gradient: linear-gradient(to bottom, #fdf0cb 45%, #fde3aa 45%, #f7db94);--button-gradient-hovered: linear-gradient(to bottom, #f9ecd9 45%, #f8d8ab 45%, #f7c57e);--button-gradient-active: linear-gradient(to bottom, #fdebc0, #fbd09e 30% 50%, #f8bf70 50%, #f5ae36);--button-border-color-hovered: #d68b2a;--button-border-color-active: #b06d1f;--_button-type-shadow-color: #f7c57e}button[button-type=danger],[role=button][button-type=danger]{--button-gradient: linear-gradient(to bottom, #fde4e2 45%, #fdd8cb 45%, #fdc0b6);--button-gradient-hovered: linear-gradient(to bottom, #fddedf 45%, #fabdbb 45%, #f78c97);--button-gradient-active: linear-gradient(to bottom, #fde3e1, #fbb1ad 30% 50%, #f87984 50%, #f54750);--button-border-color-hovered: #b84641;--button-border-color-active: #9e382f;--_button-type-shadow-color: #f78c97}@keyframes button-animation{50%{box-shadow:inset 0 0 10px 4px var(--_button-type-shadow-color)}}[role=navigation]{display:flex;justify-content:space-between;background:var(--menu-background);font-size:inherit;font-family:inherit}[role=navigation]>:not([hidden]):last-child{margin-inline-start:auto;margin-inline-end:0}[role=menubar]{display:flex;list-style:none;background:var(--menubar-background)}[role=menubar]>[role=menuitem]{cursor:pointer}[role=menubar]>[role=menuitem]>*{display:block;width:100%;height:100%;padding-block:1vh;padding-inline:1vw;color:var(--menuitem-text-color);text-align:center;text-decoration:none;outline:none}[role=menubar]>[role=menuitem]>*:hover,[role=menubar]>[role=menuitem]>*:focus-visible{background:var(--menuitem-background-hover);color:var(--menuitem-text-color-hover)}[role=menuitem]:disabled{opacity:.5;pointer-events:none}.notice-loading,.notice-loading-main,.notice-modal,.notice-modal-main{z-index:99999}.notice-toast,.notice-toast-main{z-index:99997}.notice-mask{z-index:99998}.notice-flex-center{display:flex;flex-direction:column;justify-content:center;align-items:center}.notice-fixed-all-page{position:fixed;inset:0}.notice-loading-main p{font-size:2.2em;font-weight:700;letter-spacing:1px;color:var(--color-primary)}.notice-modal-main{align-items:stretch;width:fit-content;margin:20vh 2vh auto;font-weight:700;background-color:var(--background-color-primary);border-radius:var(--default-border-radius);animation:fade-in .4s ease-out}.notice-modal-main h2{margin-block-start:-2.5vmin;margin-inline:2vmin;text-align:center;font-size:2.2em;color:var(--color-primary);background-color:var(--color-accent);border:var(--default-border);border-radius:var(--default-border-radius);box-shadow:var(--default-box-shadow)}.notice-modal-main p{text-align:center;font-size:1.6em;margin-block-start:3.5vmin;margin-inline:5vmin;color:var(--color-accent)}.notice-modal-main .notice-modal-buttons{display:flex;justify-content:space-evenly;gap:5vw;margin-block:5vmin;margin-inline:5vmin}.notice-modal-main .notice-modal-buttons>*{font-size:1.2rem}.notice-toast{--_should-auto-close: 0;position:fixed;top:7vh;right:3vw}.notice-toast-main{display:flex;justify-content:space-between;align-items:center;max-width:50vw;padding:2vmin;margin-block:1vmin;border-radius:8px;opacity:0;transition:all .5s ease-in-out}.notice-toast-main-active{opacity:1}.notice-toast-container{display:flex;align-items:center;width:100%}.notice-toast-main .notice-toast-icon{font-size:1.7rem}.notice-toast-main .notice-toast-text{flex:1;margin-inline:2vmin;font-size:1rem}.notice-toast-main .notice-close-icon{font-size:1.3rem;color:#a9a9a9;cursor:pointer}@media (max-width: 600px){.notice-toast{--_should-auto-close: 1;margin-block-start:10vmin;transform:translate(-50%)}.notice-toast-container{position:relative;flex-direction:column}.notice-toast-main .notice-toast-icon{font-size:2em}.notice-toast-main .notice-toast-text{text-align:center}.notice-toast-main .notice-close-icon{position:absolute;top:0;right:0;font-size:2em}}.notice-loading-cube-flip{width:40px;height:40px;margin:10px auto;-webkit-animation:notice-loading-cube-flip-rotate 1.2s ease-in-out infinite;animation:notice-loading-cube-flip-rotate 1.2s ease-in-out infinite}.notice-loading-dots-zoom{position:relative;width:40px;height:40px;margin:10px auto}.notice-loading-dots-zoom1,.notice-loading-dots-zoom2{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;border-radius:50%;-webkit-animation:notice-loading-dots-zoom-bounce 2s ease-in-out infinite;animation:notice-loading-dots-zoom-bounce 2s ease-in-out infinite}.notice-loading-dots-zoom2{animation-delay:-1s;-webkit-animation-delay:-1s}.notice-loading-line{width:50px;height:40px;margin:10px auto;font-size:10px;text-align:center}.notice-loading-line>div{display:inline-block;width:6px;height:100%;-webkit-animation:notice-loading-line-delay 1.2s ease-in-out infinite;animation:notice-loading-line-delay 1.2s ease-in-out infinite}.notice-loading-line .notice-loading-line-rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.notice-loading-line .notice-loading-line-rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.notice-loading-line .notice-loading-line-rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.notice-loading-line .notice-loading-line-rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.notice-loading-spin-dots{position:relative;width:45px;height:45px;margin:20px auto;text-align:center;-webkit-animation:notice-loading-spin-dots-rotate 2s linear infinite;animation:notice-loading-spin-dots-rotate 2s linear infinite}.notice-loading-spin-dot1,.notice-loading-spin-dot2{display:inline-block;position:absolute;top:0;width:60%;height:60%;border-radius:100%;-webkit-animation:notice-loading-spin-dots-bounce 2s ease-in-out infinite;animation:notice-loading-spin-dots-bounce 2s ease-in-out infinite}.notice-loading-spin-dot2{top:auto;bottom:0;-webkit-animation-delay:-1s;animation-delay:-1s}.notice-loading-cube-zoom{width:40px;height:40px;margin:10px auto}.notice-loading-cube-zoom>div{width:33%;height:33%;float:left;-webkit-animation:notice-loading-cube-zoom-delay 1.3s ease-in-out infinite;animation:notice-loading-cube-zoom-delay 1.3s ease-in-out infinite}.notice-loading-cube-zoom-1{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-cube-zoom-2{-webkit-animation-delay:.3s!important;animation-delay:.3s!important}.notice-loading-cube-zoom-3{-webkit-animation-delay:.4s!important;animation-delay:.4s!important}.notice-loading-cube-zoom-4{-webkit-animation-delay:.1s!important;animation-delay:.1s!important}.notice-loading-cube-zoom-5{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-cube-zoom-6{-webkit-animation-delay:.3s!important;animation-delay:.3s!important}.notice-loading-cube-zoom-7{-webkit-animation-delay:0s!important;animation-delay:0s!important}.notice-loading-cube-zoom-8{-webkit-animation-delay:.1s!important;animation-delay:.1s!important}.notice-loading-cube-zoom-9{-webkit-animation-delay:.2s!important;animation-delay:.2s!important}.notice-loading-dots{width:65px;margin:15px auto;text-align:center}.notice-loading-dots>div{display:inline-block;width:15px;height:15px;border-radius:100%;-webkit-animation:notice-loading-dots-delay 1.4s ease-in-out infinite both;animation:notice-loading-dots-delay 1.4s ease-in-out infinite both}.notice-loading-dot1{-webkit-animation-delay:-.32s!important;animation-delay:-.32s!important}.notice-loading-dot2{-webkit-animation-delay:-.16s!important;animation-delay:-.16s!important}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes notice-loading-cube-flip-rotate{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}to{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes notice-loading-cube-flip-rotate{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0deg) rotateY(0deg)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0deg)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}@-webkit-keyframes notice-loading-dots-zoom-bounce{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes notice-loading-dots-zoom-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}@-webkit-keyframes notice-loading-line-delay{0%,40%,to{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes notice-loading-line-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}@-webkit-keyframes notice-loading-spin-dots-rotate{to{-webkit-transform:rotate(1turn)}}@keyframes notice-loading-spin-dots-rotate{to{transform:rotate(1turn);-webkit-transform:rotate(1turn)}}@-webkit-keyframes notice-loading-spin-dots-bounce{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes notice-loading-spin-dots-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}@-webkit-keyframes notice-loading-cube-zoom-delay{0%,70%,to{-webkit-transform:scaleX(1);transform:scaleX(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@keyframes notice-loading-cube-zoom-delay{0%,70%,to{-webkit-transform:scaleX(1);transform:scaleX(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@-webkit-keyframes notice-loading-dots-delay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes notice-loading-dots-delay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}form{max-width:100vmin;margin-inline:auto}form fieldset{padding-inline:max(1vmax,5px);padding-block-start:max(1vmax,5px);padding-block-end:1vmax;background-color:var(--color-primary);border:var(--default-border);border-radius:var(--default-border-radius);box-shadow:var(--default-box-shadow)}form>fieldset{display:grid;gap:1vmax;cursor:default}form fieldset legend{width:100%;padding-inline-start:min(5vmax,10px);text-align:left;color:var(--color-primary);background-color:var(--color-accent);border:var(--default-border);border-radius:var(--default-border-radius)}form>fieldset>legend{font-size:1.35em}form .input-fields{display:flex;flex-direction:column;gap:.4vmax}form .input-fields .field{display:flex;flex-direction:column;text-align:left;word-break:break-all;text-wrap:balance}form .input-fields input,form .input-fields textarea{width:100%;padding-block:max(.5vmax,5px);padding-inline:max(.5vmax,5px);caret-color:var(--color-accent)}form .input-fields textarea{min-height:max(10vmax,100px);transition:height .2s ease-out;backdrop-filter:brightness(.9);resize:none;cursor:text;overflow:auto}form .input-fields input:focus-visible,form .input-fields textarea:focus-visible{outline:var(--focus-outline);outline-offset:var(--focus-outline-offset)}form .input-fields label{width:100%;padding-inline-start:max(.4vmax,2px);font-weight:700}form .input-fields label .required{color:var(--form-required-input)}form .buttons{display:flex;justify-content:space-around;align-items:center;gap:min(.8vmax,5px)}#auth-page form{display:flex;align-items:center;justify-content:center}#auth-page form>fieldset{min-width:25vw}#auth-page form legend{padding:0;text-align:center}#auth-page form input::placeholder{opacity:.5}#auth-page form .password-field{position:relative}#auth-page form .eye-icon{position:absolute;top:50%;right:10px;transform:translateY(-50%);color:var(--color-accent);user-select:none;cursor:pointer}#auth-page form .buttons{margin-block-start:4vh;margin-block-end:1vh}#auth-page form .form-link{text-align:center;cursor:default}#auth-page form .form-link a{padding-block:.1vh;padding-inline:.5vw;color:var(--color-accent);text-decoration:none;border-radius:3px}#auth-page form .form-link a:hover{background-color:var(--color-accent);color:var(--color-primary)}#catalog-page form{max-width:80vw}#catalog-page form .empty{font-size:min(6vw,2.5em);text-align:center}#catalog-page form .search{display:flex;gap:1vw;padding-block:max(1vh,5px)}#catalog-page form .search>*{flex:1}#catalog-page form .search input{flex-basis:50%;padding-inline-start:min(1vw,10px)}#catalog-page form table{width:100%;border-collapse:collapse;table-layout:fixed;font-weight:700;word-break:break-all;text-wrap:balance;box-shadow:var(--default-box-shadow)}#catalog-page form table thead{text-align:center;background-color:var(--table-row-background);color:var(--color-primary)}#catalog-page form table tbody{text-align:left;color:var(--color-accent);background-color:var(--background-color-primary)}#catalog-page form table th,#catalog-page form table td{padding:.5vh;border-right:1px solid var(--table-cell-border);border-bottom:1px solid var(--table-cell-border)}#catalog-page form table tbody tr:nth-of-type(even){background-color:var(--background-color-secondary)}#catalog-page form table tbody tr:last-child{border-bottom:3px solid var(--color-accent)}#catalog-page form .pagination{display:flex;align-self:center;justify-content:center;padding-block:.5vmax;padding-inline:0;text-align:center}#catalog-page form .pagination a{position:relative;padding-inline:1vmax;margin-inline:.5vmax;color:var(--color-accent);text-decoration:none;border-radius:var(--default-border-radius);font-size:1.4em}#catalog-page form .pagination a:first-child{margin-inline-end:auto}#catalog-page form .pagination a:last-child{margin-inline-start:auto}#catalog-page form .pagination a>i{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#catalog-page form .pagination a:hover,#catalog-page form .pagination a:active,#catalog-page form .pagination a.active{background-color:var(--color-accent);color:var(--color-primary)}#catalog-page form .pagination a.not-selectable{pointer-events:none}@media (max-width: 600px){#catalog-page form>fieldset{width:100%}#catalog-page form .search{flex-direction:column}#catalog-page form .search input{min-height:4vh}#catalog-page form .search button{width:100%}#catalog-page form table tbody{display:flex;flex-direction:column;gap:2vw;background-color:var(--background-color-secondary)}#catalog-page form table th{display:none}#catalog-page form table td{display:grid;grid-template-columns:30vw auto;align-items:center;gap:max(.8vw,4px);padding:0;padding-inline-end:max(.8vw,4px);background-color:var(--background-color-primary)}#catalog-page form table td:before{content:attr(data-cell-content) ": ";height:100%;padding-block:max(.5vh,5px);padding-inline:max(1vw,3px);background-color:var(--table-row-background);color:var(--color-primary)}#catalog-page form table td .buttons>*{width:100%;margin-block:max(.5vh,5px)}#catalog-page form table td:nth-of-type(even){background-color:var(--background-color-secondary)}#catalog-page form table tbody tr:not(:first-child) td:first-child{border-top:1px solid var(--table-cell-border)}#catalog-page form table tbody tr:last-child td:last-child{border-bottom:0}#catalog-page form .pagination a{padding-inline:2vw;margin-inline:2vw}}:root{--color-accent: #234465;--color-primary: #ffffff;--background-color-primary: #ffffff;--background-color-secondary: #eeeeee;--default-border: 1px solid #666666;--default-border-radius: 3px;--default-box-shadow: 0 0 10px 0 #36444b4d;--focus-outline: thin dotted black;--focus-outline-offset: -3px;--form-required-input: #ff0000;--table-row-background: #234465;--table-cell-border: #dddddd}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}body{display:grid;grid-template-rows:auto 1fr auto;min-height:100vh;min-height:100dvh;font-size:calc(.8rem + .2vmin);font-family:Segoe UI,SegoeUI,Noto Sans,sans-serif;background-image:url(/Car-Service/assets/images/background.jpg);background-attachment:fixed;background-position:center;background-size:cover}main{align-self:center;justify-self:center;width:min(90vw,100% - 3rem);margin:5vmin}header{font-size:1.2em}footer{padding-block:.5vmin;background:var(--color-accent);font-size:1.2em;cursor:default}footer>p{color:var(--color-primary);text-align:center;font-weight:700}i{text-align:center;vertical-align:middle}[disabled],[aria-disabled=true]{pointer-events:none!important}[hidden],[aria-hidden=true]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;visibility:hidden;clip:rect(0 0 0 0);border:0} diff --git a/index.js b/index.js index 50abf52..9ecdc0f 100644 --- a/index.js +++ b/index.js @@ -6,4 +6,4 @@ * @author Deyan 'stambolievv' Stamboliev * @license Apache-2.0 */ -var t,e,i,n,s,r,o,a=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},c=(t,e,i)=>(a(t,e,"read from private field"),i?i.call(t):e.get(t)),l=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},d=(t,e,i)=>(a(t,e,"access private method"),i);!function(){const t=document.createElement("link").relList;if(!(t&&t.supports&&t.supports("modulepreload"))){for(const t of document.querySelectorAll('link[rel="modulepreload"]'))e(t);new MutationObserver((t=>{for(const i of t)if("childList"===i.type)for(const t of i.addedNodes)"LINK"===t.tagName&&"modulepreload"===t.rel&&e(t)})).observe(document,{childList:!0,subtree:!0})}function e(t){if(t.ep)return;t.ep=!0;const e=function(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerpolicy&&(e.referrerPolicy=t.referrerpolicy),"use-credentials"===t.crossorigin?e.credentials="include":"anonymous"===t.crossorigin?e.credentials="omit":e.credentials="same-origin",e}(t);fetch(t.href,e)}}();var u=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},h=x,p=y,f=function(t){return _(y(t))},m=_,v=A,g=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function y(t){for(var e,i=[],n=0,s=0,r="";null!=(e=g.exec(t));){var o=e[0],a=e[1],c=e.index;if(r+=t.slice(s,c),s=c+o.length,a)r+=a[1];else{r&&(i.push(r),r="");var l=e[2],d=e[3],u=e[4],h=e[5],p=e[6],f=e[7],m="+"===p||"*"===p,v="?"===p||"*"===p,y=l||"/",_=u||h||(f?".*":"[^"+y+"]+?");i.push({name:d||n++,prefix:l||"",delimiter:y,optional:v,repeat:m,pattern:$(_)})}}return s0){var n=this._window;N&&n.history.back(),this.len--}else t?setTimeout((function(){i.show(t,e)})):setTimeout((function(){i.show(i._getBase(),e)}))},L.prototype.redirect=function(t,e){var i=this;"string"==typeof t&&"string"==typeof e&&T.call(this,t,(function(t){setTimeout((function(){i.replace(e)}),0)})),"string"==typeof t&&void 0===e&&setTimeout((function(){i.replace(t)}),0)},L.prototype.replace=function(t,e,i,n){var s=new U(t,e,this),r=this.prevContext;return this.prevContext=s,this.current=s.path,s.init=i,s.save(),!1!==n&&this.dispatch(s,r),s},L.prototype.dispatch=function(t,e){var i=0,n=0,s=this;function r(){var e=s.callbacks[i++];if(t.path===s.current)return e?void e(t,r):O.call(s,t);t.handled=!1}e?function t(){var i=s.exits[n++];if(!i)return r();i(e,t)}():r()},L.prototype.exit=function(t,e){if("function"==typeof t)return this.exit("*",t);for(var i=new D(t,null,this),n=1;n-1)&&!(s?e.target.baseVal:e.target)&&(s||this.sameOrigin(e.href))){var o=s?e.href.baseVal:e.pathname+e.search+(e.hash||"");o="/"!==o[0]?"/"+o:o,I&&o.match(/^\/[a-zA-Z]:\//)&&(o=o.replace(/^\/[a-zA-Z]:\//,"/"));var a=o,c=this._getBase();0===o.indexOf(c)&&(o=o.substr(c.length)),this._hashbang&&(o=o.replace("#!","")),(!c||a!==o||R&&"file:"===this._window.location.protocol)&&(t.preventDefault(),this.show(a))}}}}},L.prototype._onpopstate=(k=!1,S?(E&&"complete"===document.readyState?k=!0:window.addEventListener("load",(function(){setTimeout((function(){k=!0}),0)})),function(t){if(k){var e=this;if(t.state){var i=t.state.path;e.replace(i,t.state)}else if(R){var n=e._window.location;e.show(n.pathname+n.search+n.hash,void 0,void 0,!1)}}}):function(){}),L.prototype._which=function(t){return null==(t=t||S&&this._window.event).which?t.button:t.which},L.prototype._toURL=function(t){var e=this._window;if("function"==typeof URL&&R)return new URL(t,e.location.toString());if(E){var i=e.document.createElement("a");return i.href=t,i}},L.prototype.sameOrigin=function(t){if(!t||!R)return!1;var e=this._toURL(t),i=this._window.location;return i.protocol===e.protocol&&i.hostname===e.hostname&&(i.port===e.port||""===i.port&&(80==e.port||443==e.port))},L.prototype._samePath=function(t){if(!R)return!1;var e=this._window.location;return t.pathname===e.pathname&&t.search===e.search},L.prototype._decodeURLEncodedURIComponent=function(t){return"string"!=typeof t?t:this._decodeURLComponents?decodeURIComponent(t.replace(/\+/g," ")):t},U.prototype.pushState=function(){var t=this.page,e=t._window,i=t._hashbang;t.len++,N&&e.history.pushState(this.state,this.title,i&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},U.prototype.save=function(){var t=this.page;N&&t._window.history.replaceState(this.state,this.title,t._hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},D.prototype.middleware=function(t){var e=this;return function(i,n){if(e.match(i.path,i.params))return i.routePath=e.path,t(i,n);n()}},D.prototype.match=function(t,e){var i=this.keys,n=t.indexOf("?"),s=~n?t.slice(0,n):t,r=this.regexp.exec(decodeURIComponent(s));if(!r)return!1;delete e[0];for(var o=1,a=r.length;ot:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new J("string"==typeof t?t:t+"",void 0,z))(e)})(t):t;var Y;const G=window,K=G.trustedTypes,Z=K?K.emptyScript:"",X=G.reactiveElementPolyfillSupport,Q={toAttribute(t,e){switch(e){case Boolean:t=t?Z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(n){i=null}}return i}},F=(t,e)=>e!==t&&(e==e||t==t),tt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:F},et="finalized";class it extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const s=this[t];this[e]=n,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||tt}static finalize(){if(this.hasOwnProperty(et))return!1;this[et]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(W(t))}else void 0!==t&&e.push(W(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{V?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=q.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=tt){var n;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:Q).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,s=n._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=n.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:Q;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||F)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var nt;it[et]=!0,it.elementProperties=new Map,it.elementStyles=[],it.shadowRootOptions={mode:"open"},null==X||X({ReactiveElement:it}),(null!==(Y=G.reactiveElementVersions)&&void 0!==Y?Y:G.reactiveElementVersions=[]).push("1.6.3");const st=window,rt=st.trustedTypes,ot=rt?rt.createPolicy("lit-html",{createHTML:t=>t}):void 0,at="$lit$",ct=`lit$${(Math.random()+"").slice(9)}$`,lt="?"+ct,dt=`<${lt}>`,ut=document,ht=()=>ut.createComment(""),pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,mt="[ \t\n\f\r]",vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gt=/-->/g,yt=/>/g,_t=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),bt=/'/g,$t=/"/g,wt=/^(?:script|style|textarea|title)$/i,Ct=(St=1,(t,...e)=>({_$litType$:St,strings:t,values:e})),At=Symbol.for("lit-noChange"),xt=Symbol.for("lit-nothing"),kt=new WeakMap,Et=ut.createTreeWalker(ut,129,null,!1);var St;function Nt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ot?ot.createHTML(e):e}class It{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,r=0;const o=t.length-1,a=this.parts,[c,l]=((t,e)=>{const i=t.length-1,n=[];let s,r=2===e?"":"",o=vt;for(let a=0;a"===c[0]?(o=null!=s?s:vt,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,i=c[1],o=void 0===c[3]?_t:'"'===c[3]?$t:bt):o===$t||o===bt?o=_t:o===gt||o===yt?o=vt:(o=_t,s=void 0);const u=o===_t&&t[a+1].startsWith("/>")?" ":"";r+=o===vt?e+dt:l>=0?(n.push(i),e.slice(0,l)+at+e.slice(l)+ct+u):e+ct+(-2===l?(n.push(void 0),a):u)}return[Nt(t,r+(t[i]||"")+(2===e?"":"")),n]})(t,e);if(this.el=It.createElement(c,i),Et.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=Et.nextNode())&&a.length0){n.textContent=rt?rt.emptyScript:"";for(let i=0;ift(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==xt&&pt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ut.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=It.createElement(Nt(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new Rt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=kt.get(t.strings);return void 0===e&&kt.set(t.strings,e=new It(t)),e}T(t){ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new Lt(this.k(ht()),this.k(ht()),this,this.options)):i=e[n],i._$AI(s),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=xt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let r=!1;if(void 0===s)t=Pt(this,t,e,0),r=!pt(t)||t!==this._$AH&&t!==At,r&&(this._$AH=t);else{const n=t;let o,a;for(t=s[0],o=0;o{var n,s;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let o=r._$litPart$;if(void 0===o){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=o=new Lt(e.insertBefore(ht(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o};var Vt,zt;class Bt extends it{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return At}}Bt.finalized=!0,Bt._$litElement$=!0,null===(Vt=globalThis.litElementHydrateSupport)||void 0===Vt||Vt.call(globalThis,{LitElement:Bt});const Jt=globalThis.litElementPolyfillSupport;async function Wt(t,e){const i=new URL(t,"https://parseapi.back4app.com"),n=await fetch(i,e);if(!0!==n.ok){403===n.status&&await ye();const t=await n.json();throw new Error(`${t.error} Status: ${n.status}`,{cause:n})}return n.json()}function Yt(t,e){const i=new Headers({"X-Parse-Application-Id":"0oqWvkMylRfPgcnXNXtOUe8SWSqDZPiHktiLW9Np","X-Parse-REST-API-Key":"4YzVVeTWOVJyamwDNrNaafCLGzwC5qWnt7dw9aot"}),n=ve();return n&&i.append("X-Parse-Session-Token",n.token),e&&i.append("Content-Type","application/json"),{method:t,headers:i,...e?{body:JSON.stringify(e)}:{}}}null==Jt||Jt({LitElement:Bt}),(null!==(zt=globalThis.litElementVersions)&&void 0!==zt?zt:globalThis.litElementVersions=[]).push("3.3.3");const Gt=t=>Wt(t,Yt("GET")),Kt=(t,e)=>Wt(t,Yt("POST",e)),Zt=(t,e)=>Wt(t,Yt("PUT",e)),Xt=t=>Wt(t,Yt("DELETE"));function Qt(t){if(!t)return{};try{return decodeURIComponent(t).split("&").reduce(((t,e)=>{const[i,n]=e.split("=");return t[i.trim()]=(null==n?void 0:n.includes(","))?n.split(",").map(decodeURIComponent):decodeURIComponent(null==n?void 0:n.trim()),t}),{})}catch(e){return console.error(e),{}}}function Ft(t){if(!t)return"";try{return Object.entries(t).filter((([t,e])=>{const i="string"==typeof t&&t.trim().length>0,n="string"==typeof e?e.trim().length>0:Array.isArray(e)&&e.every((t=>"string"==typeof t&&t.trim().length>0));return i&&n})).map((([t,e])=>{const i=Array.isArray(e)?e.map((t=>encodeURIComponent(t.trim()))).join(","):encodeURIComponent(e.trim());return`${encodeURIComponent(t.trim())}=${i}`})).join("&")}catch(e){return console.error(e),""}}function te(t){const e=new FormData(t);return[Object.fromEntries(Array.from(e,(([t,e])=>[t,"string"==typeof e?e.trim():e]))),e=>Array.from(t.elements).forEach((t=>e?t.setAttribute("disabled","true"):t.removeAttribute("disabled")))]}function ee(){if(crypto&&crypto.randomUUID)return crypto.randomUUID();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=~~(16*Math.random());return("x"===t?e:3&e|8).toString(16)}))}function ie(t,e={}){const{parent:i,prepend:n=!1,attributes:s,children:r,style:o,...a}=e,c=document.createElement(t);if(void 0!==s)for(const l in s)c.setAttribute(l,s[l]);if(Array.isArray(r))for(const l of r)c.append(l);if(void 0!==o&&Object.assign(c.style,o),Object.assign(c,a),void 0!==i){const t="string"==typeof i?document.querySelector(i):i;t&&t[n?"prepend":"append"](c)}return c}t=new WeakMap;const ne=new class{constructor(e){var i,n,s,r;l(this,t,void 0),s=e,a(i=this,n=t,"write to private field"),r?r.call(i,s):n.set(i,s),this.supported||console.warn("Cache API is not supported in this environment"),!sessionStorage.getItem(`${c(this,t)}Initialized`)&&this.supported&&(sessionStorage.setItem(`${c(this,t)}Initialized`,"true"),this.deleteCache())}get supported(){return!!window.caches}get databaseName(){return c(this,t)}async getCacheData(e){if(!this.supported)return Promise.resolve(null);const i=await caches.open(c(this,t)),n=await i.match(new Request(e));return n&&n.ok?await n.json():Promise.resolve(null)}async updateCacheData(e,i){if(!this.supported)return Promise.resolve();return(await caches.open(c(this,t))).put(new Request(e),new Response(JSON.stringify(i)))}async clearCacheData(e){if(!this.supported)return Promise.resolve(!1);return(await caches.open(c(this,t))).delete(new Request(e))}async deleteCache(){return this.supported?caches.delete(c(this,t)):Promise.resolve(!1)}}("CarServiceCacheDatabase"),se="rgba(0 0 0 / 0.5)",re=3,oe={default:{icon:"",color:"#555555",backgroundColor:"#f2f2f2"},info:{icon:"info",color:"#217ca3",backgroundColor:"#cfe8f3"},success:{icon:"check_circle",color:"#45874a",backgroundColor:"#e5f6e4"},warning:{icon:"error",color:"#b0822f",backgroundColor:"#fef5dc"},error:{icon:"cancel",color:"#b23c3a",backgroundColor:"#f2dede"}};e=new WeakMap,i=new WeakSet,n=function(t,e){switch(t){case"cube-flip":return ie("div",{className:"notice-loading-cube-flip",style:{backgroundColor:e}});case"dots-zoom":return ie("div",{className:"notice-loading-dots-zoom",children:[ie("div",{className:"notice-loading-dots-zoom1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-dots-zoom2",style:{backgroundColor:e}})]});case"line":return ie("div",{className:"notice-loading-line",children:[ie("div",{className:"notice-loading-line-rect1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect2",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect3",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect4",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect5",style:{backgroundColor:e}})]});case"dots-spin":return ie("div",{className:"notice-loading-spin-dots",children:[ie("div",{className:"notice-loading-spin-dot1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-spin-dot2",style:{backgroundColor:e}})]});case"dots":return ie("div",{className:"notice-loading-dots",children:[ie("div",{className:"notice-loading-dot1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-dot2",style:{backgroundColor:e}}),ie("div",{style:{backgroundColor:e}})]});case"cube-zoom":return ie("div",{className:"notice-loading-cube-zoom",children:[ie("div",{className:"notice-loading-cube-zoom-1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-2",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-3",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-4",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-5",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-6",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-7",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-8",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-9",style:{backgroundColor:e}})]});default:return null}},s=new WeakSet,r=function(t,e,i,n){const s=ie("div",{className:"notice-modal-buttons"});switch(t){case"yes-no":return ie("button",{parent:s,attributes:{"button-type":"info"},textContent:"Да",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Не",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;case"ok":return ie("button",{parent:s,textContent:"Добре",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),s;case"ok-cancel":return ie("button",{parent:s,textContent:"Добре",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Отказ",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;case"retry-cancel":return ie("button",{parent:s,attributes:{"button-type":"info"},textContent:"Нов опит",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Отказ",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;default:return null}};const ae=new class{constructor(){l(this,i),l(this,s),l(this,e,document.body)}showLoading(t={}){const{type:s="dots",color:r="white",autoClose:o,title:a,titleColor:l,maskColor:u=se}=t,h=ie("div",{parent:c(this,e),className:"notice-loading notice-flex-center notice-fixed-all-page",id:"notice-loading"});ie("div",{parent:h,className:"notice-mask notice-fixed-all-page",style:{backgroundColor:u}});const p=d(this,i,n).call(this,s,r)||d(this,i,n).call(this,"dots",r),f=ie("div",{parent:h,className:"notice-flex-center notice-loading-main",children:[p]});a&&ie("p",{parent:f,style:{color:l},textContent:a}),o&&setTimeout((()=>h.remove()),1e3*o)}hideLoading(){var t;null==(t=document.getElementById("notice-loading"))||t.remove()}showToast(t){const{text:i,type:n="default",autoClose:s=re,showClose:r=!0}=t;if(!i)return;const{icon:o,color:a,backgroundColor:l}=oe[n]||oe.default,d=document.getElementById("notice-toast")||ie("div",{parent:c(this,e),className:"notice-toast",id:"notice-toast"}),u=ie("div",{parent:d,className:"notice-toast-main",id:`notice-toast-${ee()}`,style:{backgroundColor:l}}),h=ie("div",{parent:u,className:"notice-toast-container",children:[ie("p",{className:"notice-toast-text",style:{color:a},textContent:i})]});o&&ie("i",{parent:h,prepend:!0,className:"material-icons notice-toast-icon",style:{color:a},textContent:o}),(r||!s)&&ie("i",{parent:h,className:"material-icons notice-close-icon",innerHTML:"close",onclick:()=>{u.classList.remove("notice-toast-main-active"),setTimeout((()=>u.remove()),500)}}),setTimeout((()=>u.classList.add("notice-toast-main-active")));const p=!!Number(getComputedStyle(d).getPropertyValue("--_should-auto-close"));if(s||p){setTimeout((()=>{u&&(u.classList.remove("notice-toast-main-active"),setTimeout((()=>u.remove()),500))}),1e3*(s||re))}}showModal(t={}){const{type:i="yes-no",color:n,backgroundColor:o,title:a,titleColor:l,message:u,messageColor:h,maskColor:p=se,onConfirm:f,onCancel:m}=t,v=ie("div",{parent:c(this,e),className:"notice-modal notice-flex-center notice-fixed-all-page",id:"notice-modal"});ie("div",{parent:v,className:"notice-mask notice-fixed-all-page",style:{backgroundColor:p}});const g=ie("div",{parent:v,className:"notice-flex-center notice-modal-main",style:{backgroundColor:o},children:[d(this,s,r).call(this,i,v,f,m)||d(this,s,r).call(this,"yes-no",v,f,m)]});u&&ie("p",{parent:g,prepend:!0,style:{color:h||n},textContent:u}),a&&ie("h2",{parent:g,prepend:!0,style:{color:l||n},textContent:a})}},ce=document.querySelectorAll(".user-navigation"),le=document.querySelectorAll(".guest-navigation");function de(){me()?(ce.forEach((t=>t.removeAttribute("hidden"))),le.forEach((t=>t.setAttribute("hidden","")))):(ce.forEach((t=>t.setAttribute("hidden",""))),le.forEach((t=>t.removeAttribute("hidden"))))}const ue={LOGIN:"/login",REGISTER:"/users",LOGOUT:"/logout"},he={CREATE_CAR:"/classes/Car",ALL_CARS:(t="")=>`/classes/Car?${Ft({order:"-createdAt",where:t})}`,CAR_BY_ID:t=>`/classes/Car/${t}`},pe={CREATE_REPAIR:"/classes/Repair",ALL_REPAIRS:t=>`/classes/Repair?${Ft({order:"-createdAt",where:t})}`,REPAIR_BY_ID:t=>`/classes/Repair/${t}`},fe="car-service-current-user-data";function me(){return!!localStorage.getItem(fe)}function ve(){var t;return JSON.parse(null!=(t=localStorage.getItem(fe))?t:"null")}async function ge(t){await ne.deleteCache().catch(console.error),localStorage.setItem(fe,JSON.stringify(t))}async function ye(){await ne.deleteCache().catch(console.error),localStorage.removeItem(fe)}const _e={itemsPerPage:10,relativePageLinks:3};async function be(t){const e="/cars",i=await ne.getCacheData(e),n=i&&i.find((e=>e.objectId===t));if(n)return n;const s=await Gt(he.CAR_BY_ID(t));if(i){const t=[s,...i].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));await ne.updateCacheData(e,JSON.parse(JSON.stringify(t)))}return s}async function $e(t){var e;const i=await Xt(he.CAR_BY_ID(t)),n="/cars",s=(null!=(e=await ne.getCacheData(n))?e:[]).filter((e=>e.objectId!==t));return await ne.updateCacheData(n,JSON.parse(JSON.stringify(s))),i}async function we(t,e){const i=JSON.stringify({car:{__type:"Pointer",className:"Car",objectId:t}}),n=`/cars/${t}/repairs`,s=await ne.getCacheData(n);let r;if(s?r=s:(({results:r}=await Gt(pe.ALL_REPAIRS(i))),await ne.updateCacheData(n,JSON.parse(JSON.stringify(r)))),!e)return{results:r,count:r.length};const o=10*(e-1),a=10*e;return{results:r.slice(o,a),count:r.length}}async function Ce(t,e){const i=`/cars/${t}/repairs`,n=await ne.getCacheData(i),s=n&&n.find((t=>t.objectId===e));if(s)return s;const r=await Gt(pe.REPAIR_BY_ID(e));if(n){const t=[r,...n].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));await ne.updateCacheData(i,JSON.parse(JSON.stringify(t)))}return r}async function Ae(t){const{results:e}=await we(t),i=e.map((({objectId:t})=>Xt(pe.REPAIR_BY_ID(t)))),n=`/cars/${t}/repairs`;return await ne.clearCacheData(n),Promise.all(i)}const xe=["/user/login","/user/register"];function ke(t,e={}){const{container:i,...n}=e,s=i&&(i instanceof HTMLElement||i instanceof DocumentFragment)?i:"string"==typeof i?document.querySelector(i):null,r=document.getElementById("site-content")||document.body;return qt(t,s||r,n)}const Ee=(t,e)=>t.length>0?Se(t,e):Ct`

Нямаш добавени автомобили!

`,Se=(t,e)=>Ct`${t.map((t=>Ne(t,e)))}
РамаPегистрационен №Марка / МоделДвигателИме на клиентаРемонтиРедакцияИзтриване
`,Ne=(t,e)=>Ct`${t.vin}${t.registration}${t.make}${t.engine}${t.customerName}
`,Ie=(t,e,i,n)=>{const s=(s,r)=>{const o=t===r||r<1||r>e,a="number"==typeof s&&t===r,c=o?"#":(t=>{const e=Ft({filter:i,query:n,page:t.toString()});return`${window.location.pathname}?${e}`})(r);return Ct`${s}`};const r=s(Ct`keyboard_double_arrow_left`,1),o=s(Ct`chevron_left`,t-1),a=function(){const i=Math.floor(_e.relativePageLinks/2),n=Math.min(Math.max(1,t-i),Math.max(1,e-_e.relativePageLinks+1)),s=Math.max(Math.min(e,t+i),Math.min(e,_e.relativePageLinks)),r=Math.min(s-n+1,e);return Array.from({length:r},((t,e)=>n+e))}().map((t=>s(t,t))),c=s(Ct`chevron_right`,t+1),l=s(Ct`keyboard_double_arrow_right`,e);return Ct`${r}${o}${a}${c}${l}`},Pe=t=>t.length>0?Re(t):Ct`

Нямаш завършени ремонти!

`,Re=t=>Ct`${t.map(Le)}
Извършен наКилометриДетайли по ремонта
`,Le=t=>Ct`${t.date}${t.km}`,Te=(t,e)=>{const i=(i,n)=>{const s=t===n||n<1||n>e,r="number"==typeof i&&t===n,o=s?"#":(t=>{const e=Ft({page:t.toString()});return`${window.location.pathname}?${e}`})(n);return Ct`${i}`};const n=i(Ct`keyboard_double_arrow_left`,1),s=i(Ct`chevron_left`,t-1),r=function(){const i=Math.floor(_e.relativePageLinks/2),n=Math.min(Math.max(1,t-i),Math.max(1,e-_e.relativePageLinks+1)),s=Math.max(Math.min(e,t+i),Math.min(e,_e.relativePageLinks)),r=Math.min(s-n+1,e);return Array.from({length:r},((t,e)=>n+e))}().map((t=>i(t,t))),o=i(Ct`chevron_right`,t+1),a=i(Ct`keyboard_double_arrow_right`,e);return Ct`${n}${s}${r}${o}${a}`};function Oe(t){t.render(Ct`
Вход
visibility_off
`)}async function Ue(t){t.preventDefault();const e=t.target,[i,n]=te(e);try{n(!0),ae.showLoading({type:"cube-zoom"}),await async function(t){const e=await Kt(ue.LOGIN,t);return await ge({username:t.username,id:e.objectId,token:e.sessionToken}),de(),e}(i),H.redirect("/cars")}catch(s){const t=s instanceof Error?s.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{n(!1),ae.hideLoading(),e.reset()}}function De(t){t.preventDefault();const e=t.target,i=e.previousElementSibling,n="password"===i.type?"text":"password";i.setAttribute("type",n),e.textContent="password"===n?"visibility_off":"visibility"}function je(t){t.render(Ct`
Регистрация
visibility_off
`)}async function He(t){t.preventDefault();const e=t.target,[{username:i,password:n,repass:s},r]=te(e);if(n===s)try{r(!0),ae.showLoading({type:"cube-zoom"}),await async function(t){const e=await Kt(ue.REGISTER,t);return await ge({username:t.username,id:e.objectId,token:e.sessionToken}),de(),e}({username:i,password:n}),H.redirect("/cars")}catch(o){const t=o instanceof Error?o.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{r(!1),ae.hideLoading(),e.reset()}else ae.showToast({text:"Паролите не съвпадат!",type:"warning"})}function Me(t){var e,i,n;t.preventDefault();const s=t.target,r=s.previousElementSibling,o=null==(n=null==(i=null==(e=s.parentElement)?void 0:e.parentElement)?void 0:i.nextElementSibling)?void 0:n.lastElementChild,a="password"===r.type?"text":"password";r.setAttribute("type",a),o.setAttribute("type",a),s.textContent="password"===a?"visibility_off":"visibility"}const qe=2;class Ve{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const ze=(t,e)=>{var i,n;const s=t._$AN;if(void 0===s)return!1;for(const r of s)null===(n=(i=r)._$AO)||void 0===n||n.call(i,e,!1),ze(r,e);return!0},Be=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},Je=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Ge(e)}};function We(t){void 0!==this._$AN?(Be(this),this._$AM=t,Je(this)):this._$AM=t}function Ye(t,e=!1,i=0){const n=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(e)if(Array.isArray(n))for(let r=i;r{var e,i,n,s;t.type==qe&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=Ye),null!==(i=(s=t)._$AQ)&&void 0!==i||(s._$AQ=We))};class Ke extends Ve{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Je(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(ze(this,t),Be(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Ze{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class Xe{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}const Qe=t=>{return!(e=t,null===e||"object"!=typeof e&&"function"!=typeof e||"function"!=typeof t.then);var e},Fe=1073741823;const ti=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends Ke{constructor(){super(...arguments),this._$C_t=Fe,this._$Cwt=[],this._$Cq=new Ze(this),this._$CK=new Xe}render(...t){var e;return null!==(e=t.find((t=>!Qe(t))))&&void 0!==e?e:At}update(t,e){const i=this._$Cwt;let n=i.length;this._$Cwt=e;const s=this._$Cq,r=this._$CK;this.isConnected||this.disconnected();for(let o=0;othis._$C_t);o++){const t=e[o];if(!Qe(t))return this._$C_t=o,t;o{for(;r.get();)await r.get();const i=s.deref();if(void 0!==i){const n=i._$Cwt.indexOf(t);n>-1&&n{const t=await async function(t,e,i){try{const{results:n,count:s}=await async function(t,e,i){const n=e&&i?JSON.stringify({[e]:{$regex:`(?i)${i}`}}):null,s="/cars",r=await ne.getCacheData(s);let o;if(n?({results:o}=await Gt(he.ALL_CARS(n))):(o=null!=r?r:(await Gt(he.ALL_CARS())).results,r||await ne.updateCacheData(s,o)),!t)return{results:o,count:o.length};const a=(t-1)*_e.itemsPerPage,c=t*_e.itemsPerPage;return{results:o.slice(a,c),count:o.length}}(t,e,i);return{cars:n,carsCount:s,pageNumber:t,searchCategory:e,searchQuery:i}}catch(n){const t=n instanceof Error?n.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/")}finally{ae.hideLoading()}}(Number(e)||1,i,n);if(t)return((t,e,i)=>{const{cars:n,carsCount:s,pageNumber:r,searchCategory:o,searchQuery:a}=t,c=Math.max(Math.ceil(s/_e.itemsPerPage),1);return Ct`
Всички автомобили${Ee(n,i)}
${Ie(r,c,o,a)}
`})(t,ii,ni)})(),ae.showLoading()))}function ii(t){t.preventDefault();const e=document.getElementById("search-options").value.trim(),i=document.getElementById("search-input").value.trim();e&&i?H.redirect(`/cars?${Ft({filter:e,query:i})}`):H.redirect("/cars")}async function ni(t,e){t.preventDefault();if(await new Promise((t=>ae.showModal({message:`Сигурен ли си, че искаш да изтриеш автомобила на ${e.customerName} - "${e.registration}"`,onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading(),await Promise.all([Ae(e.objectId),$e(e.objectId)]),ae.showToast({text:`Успешно изтрихте автомобила на ${e.customerName} - "${e.registration}"`,type:"info"})}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading(),H.redirect("/cars")}}function si(t){t.render(Ct`
Добави автомобил
Отказ
`)}async function ri(t){t.preventDefault();const e=t.target,[i,n]=te(e);try{n(!0),ae.showLoading(),await async function(t){var e;const{id:i}=ve(),n={owner:Object.freeze({__type:"Pointer",className:"_User",objectId:i})},s=Object.assign({},t,n),r=await Kt(he.CREATE_CAR,s),o="/cars",a=null!=(e=await ne.getCacheData(o))?e:[],c={...s,...r},l=[c,...a].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(o,JSON.parse(JSON.stringify(l))),c}(i),ae.showToast({text:`Успешно създадохте автомобил на ${i.customerName} - "${i.registration}"`,type:"success"})}catch(s){const t=s instanceof Error?s.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{n(!1),ae.hideLoading(),e.reset(),H.redirect("/cars")}}function oi(t){const{carId:e}=t.params;t.render(ti((async()=>{const t=await async function(t){try{return await be(t)}catch(e){const t=e instanceof Error?e.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/cars")}finally{ae.hideLoading()}}(e);var i,n;if(t)return n=ai,Ct`
n(t,i)} autocomplete="off">
Редактирай автомобил
Отказ
`})(),ae.showLoading()))}async function ai(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e){var i,n;const s=await Zt(he.CAR_BY_ID(t),e),r="/cars",o=null!=(i=await ne.getCacheData(r))?i:[],a={...null!=(n=o.find((e=>e.objectId===t)))?n:{},...e,...s},c=[a,...o].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(r,JSON.parse(JSON.stringify(c))),a}(e.objectId,n),ae.showToast({text:`Успешно редактирахте ремонт на ${n.customerName} - "${n.registration}"`,type:"info"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect("/cars")}}function ci(t){const{carId:e}=t.params,{page:i="1"}=Qt(t.querystring);t.render(ti((async()=>{const t=await async function(t,e){try{const[{results:i,count:n},s]=await Promise.all([we(t,e),be(t)]);return{repairs:i,repairsCount:n,car:s,pageNumber:e}}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/cars")}finally{ae.hideLoading()}}(e,Number(i)||1);if(t)return(t=>{const{repairs:e,repairsCount:i,car:n,pageNumber:s}=t,r=Math.max(Math.ceil(i/_e.itemsPerPage),1);return Ct`
Всичките ремонти на ${n.customerName} - "${n.registration}"${Pe(e)}
${Te(s,r)}
`})(t)})(),ae.showLoading()))}function li(t){var e,i;t.render((e=t.params.carId,i=di,Ct`
i(t,e)} autocomplete="off">
Добави ремонт
Отказ
`))}async function di(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e){var i;const{id:n}=ve(),s={owner:Object.freeze({__type:"Pointer",className:"_User",objectId:n})},r={car:Object.freeze({__type:"Pointer",className:"Car",objectId:t})},o=Object.assign({},e,s,r),a=await Kt(pe.CREATE_REPAIR,o),c=`/cars/${t}/repairs`,l=null!=(i=await ne.getCacheData(c))?i:[],d={...o,...a},u=[d,...l].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(c,JSON.parse(JSON.stringify(u))),d}(e,n),ae.showToast({text:"Успешно добавихте ремонт",type:"success"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect(`/cars/${e}/repairs`)}}async function ui(t){const{carId:e,repairId:i}=t.params;t.render(ti((async()=>{const t=await async function(t,e){try{return await Ce(t,e)}catch(i){const e=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:e,type:"error"}),H.redirect(`/cars/${t}/repairs`)}finally{ae.hideLoading()}}(e,i);var n,s;if(t)return s=hi,Ct`
Детайли по ремонта
Обща информация
Информация за ремонта
РедактирайНазад
`})(),ae.showLoading()))}async function hi(t,e){t.preventDefault();if(await new Promise((t=>ae.showModal({message:`Сигурен ли си, че искаш да изтриеш ремонт от дата "${e.date}"`,onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading(),await async function(t,e){var i;const n=await Xt(pe.REPAIR_BY_ID(e)),s=`/cars/${t}/repairs`,r=(null!=(i=await ne.getCacheData(s))?i:[]).filter((t=>t.objectId!==e));return await ne.updateCacheData(s,JSON.parse(JSON.stringify(r))),n}(e.car.objectId,e.objectId),ae.showToast({text:"Успешно изтрихте ремонта",type:"info"})}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading(),H.redirect(`/cars/${e.car.objectId}/repairs`)}}function pi(t){const{carId:e,repairId:i}=t.params;t.render(ti((async()=>{const t=await async function(t,e){try{return await Ce(t,e)}catch(i){const e=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:e,type:"error"}),H.redirect(`/cars/${t}/repairs`)}finally{ae.hideLoading()}}(e,i);var n,s;if(t)return s=fi,Ct`
s(t,n)} autocomplete="off">
Редактирай ремонт
Отказ
`})(),ae.showLoading()))}async function fi(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e,i){var n,s;const r=await Zt(pe.REPAIR_BY_ID(e),i),o=`/cars/${t}/repairs`,a=null!=(n=await ne.getCacheData(o))?n:[],c={...null!=(s=a.find((t=>t.objectId===e)))?s:{},...i,...r},l=[c,...a].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(o,JSON.parse(JSON.stringify(l))),c}(e.car.objectId,e.objectId,n),ae.showToast({text:`Успешно редактирахте ремонт от дата "${n.date}"`,type:"info"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect(`/cars/${e.car.objectId}/repairs/${e.objectId}`)}}null==(o=document.getElementById("logout-button"))||o.addEventListener("click",(async function(t){if(t.preventDefault(),await new Promise((t=>ae.showModal({message:"Сигурен ли си, че искаш да излезеш?",title:"Изход",onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading({type:"cube-zoom"}),await async function(){const t=await Kt(ue.LOGOUT,{});return await ye(),de(),t}(),H.redirect("/user/login")}catch(e){const t=e instanceof Error?e.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading()}})),H((function(t,e){de(),Object.assign(t,{render:ke}),function(t){const e=document.querySelector("meta[name=viewport]"),i="interactive-widget=resizes-content";if(!e){const t=document.createElement("meta");return t.name="viewport",t.content=i,void document.head.appendChild(t)}const n=e.content.split(",").map((t=>t.trim()));xe.includes(t)&&!n.includes(i)?n.push(i):!xe.includes(t)&&n.includes(i)&&n.splice(n.indexOf(i),1);e.content=n.join(", ")}(t.path);const i=me(),n=i&&xe.includes(t.path)||!i&&!xe.includes(t.path);!function(t){if(!t)return;if(!document.startViewTransition)return void t();document.startViewTransition(t)}((()=>{n?window.history.back():e()}))})),H("/user/login",(t=>Oe(t))),H("/user/register",(t=>je(t))),H("/cars",(t=>ei(t))),H("/cars/create",(t=>si(t))),H("/cars/:carId/edit",(t=>oi(t))),H("/cars/:carId/repairs",(t=>ci(t))),H("/cars/:carId/repairs/create",(t=>li(t))),H("/cars/:carId/repairs/:repairId",(t=>ui(t))),H("/cars/:carId/repairs/:repairId/edit",(t=>pi(t))),H.start(); +var t,e,i,n,s,r,o,a=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},c=(t,e,i)=>(a(t,e,"read from private field"),i?i.call(t):e.get(t)),l=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},d=(t,e,i)=>(a(t,e,"access private method"),i);!function(){const t=document.createElement("link").relList;if(!(t&&t.supports&&t.supports("modulepreload"))){for(const t of document.querySelectorAll('link[rel="modulepreload"]'))e(t);new MutationObserver((t=>{for(const i of t)if("childList"===i.type)for(const t of i.addedNodes)"LINK"===t.tagName&&"modulepreload"===t.rel&&e(t)})).observe(document,{childList:!0,subtree:!0})}function e(t){if(t.ep)return;t.ep=!0;const e=function(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerpolicy&&(e.referrerPolicy=t.referrerpolicy),"use-credentials"===t.crossorigin?e.credentials="include":"anonymous"===t.crossorigin?e.credentials="omit":e.credentials="same-origin",e}(t);fetch(t.href,e)}}();var u=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},h=x,p=y,f=function(t){return _(y(t))},m=_,v=A,g=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function y(t){for(var e,i=[],n=0,s=0,r="";null!=(e=g.exec(t));){var o=e[0],a=e[1],c=e.index;if(r+=t.slice(s,c),s=c+o.length,a)r+=a[1];else{r&&(i.push(r),r="");var l=e[2],d=e[3],u=e[4],h=e[5],p=e[6],f=e[7],m="+"===p||"*"===p,v="?"===p||"*"===p,y=l||"/",_=u||h||(f?".*":"[^"+y+"]+?");i.push({name:d||n++,prefix:l||"",delimiter:y,optional:v,repeat:m,pattern:$(_)})}}return s0){var n=this._window;N&&n.history.back(),this.len--}else t?setTimeout((function(){i.show(t,e)})):setTimeout((function(){i.show(i._getBase(),e)}))},L.prototype.redirect=function(t,e){var i=this;"string"==typeof t&&"string"==typeof e&&O.call(this,t,(function(t){setTimeout((function(){i.replace(e)}),0)})),"string"==typeof t&&void 0===e&&setTimeout((function(){i.replace(t)}),0)},L.prototype.replace=function(t,e,i,n){var s=new U(t,e,this),r=this.prevContext;return this.prevContext=s,this.current=s.path,s.init=i,s.save(),!1!==n&&this.dispatch(s,r),s},L.prototype.dispatch=function(t,e){var i=0,n=0,s=this;function r(){var e=s.callbacks[i++];if(t.path===s.current)return e?void e(t,r):T.call(s,t);t.handled=!1}e?function t(){var i=s.exits[n++];if(!i)return r();i(e,t)}():r()},L.prototype.exit=function(t,e){if("function"==typeof t)return this.exit("*",t);for(var i=new D(t,null,this),n=1;n-1)&&!(s?e.target.baseVal:e.target)&&(s||this.sameOrigin(e.href))){var o=s?e.href.baseVal:e.pathname+e.search+(e.hash||"");o="/"!==o[0]?"/"+o:o,I&&o.match(/^\/[a-zA-Z]:\//)&&(o=o.replace(/^\/[a-zA-Z]:\//,"/"));var a=o,c=this._getBase();0===o.indexOf(c)&&(o=o.substr(c.length)),this._hashbang&&(o=o.replace("#!","")),(!c||a!==o||R&&"file:"===this._window.location.protocol)&&(t.preventDefault(),this.show(a))}}}}},L.prototype._onpopstate=(k=!1,S?(E&&"complete"===document.readyState?k=!0:window.addEventListener("load",(function(){setTimeout((function(){k=!0}),0)})),function(t){if(k){var e=this;if(t.state){var i=t.state.path;e.replace(i,t.state)}else if(R){var n=e._window.location;e.show(n.pathname+n.search+n.hash,void 0,void 0,!1)}}}):function(){}),L.prototype._which=function(t){return null==(t=t||S&&this._window.event).which?t.button:t.which},L.prototype._toURL=function(t){var e=this._window;if("function"==typeof URL&&R)return new URL(t,e.location.toString());if(E){var i=e.document.createElement("a");return i.href=t,i}},L.prototype.sameOrigin=function(t){if(!t||!R)return!1;var e=this._toURL(t),i=this._window.location;return i.protocol===e.protocol&&i.hostname===e.hostname&&(i.port===e.port||""===i.port&&(80==e.port||443==e.port))},L.prototype._samePath=function(t){if(!R)return!1;var e=this._window.location;return t.pathname===e.pathname&&t.search===e.search},L.prototype._decodeURLEncodedURIComponent=function(t){return"string"!=typeof t?t:this._decodeURLComponents?decodeURIComponent(t.replace(/\+/g," ")):t},U.prototype.pushState=function(){var t=this.page,e=t._window,i=t._hashbang;t.len++,N&&e.history.pushState(this.state,this.title,i&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},U.prototype.save=function(){var t=this.page;N&&t._window.history.replaceState(this.state,this.title,t._hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},D.prototype.middleware=function(t){var e=this;return function(i,n){if(e.match(i.path,i.params))return i.routePath=e.path,t(i,n);n()}},D.prototype.match=function(t,e){var i=this.keys,n=t.indexOf("?"),s=~n?t.slice(0,n):t,r=this.regexp.exec(decodeURIComponent(s));if(!r)return!1;delete e[0];for(var o=1,a=r.length;ot:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new J("string"==typeof t?t:t+"",void 0,z))(e)})(t):t;var Y;const G=window,K=G.trustedTypes,Z=K?K.emptyScript:"",X=G.reactiveElementPolyfillSupport,F={toAttribute(t,e){switch(e){case Boolean:t=t?Z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(n){i=null}}return i}},Q=(t,e)=>e!==t&&(e==e||t==t),tt={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:Q},et="finalized";class it extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const s=this[t];this[e]=n,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||tt}static finalize(){if(this.hasOwnProperty(et))return!1;this[et]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(W(t))}else void 0!==t&&e.push(W(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{q?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=V.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=tt){var n;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:F).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,s=n._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=n.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:F;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Q)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var nt;it[et]=!0,it.elementProperties=new Map,it.elementStyles=[],it.shadowRootOptions={mode:"open"},null==X||X({ReactiveElement:it}),(null!==(Y=G.reactiveElementVersions)&&void 0!==Y?Y:G.reactiveElementVersions=[]).push("1.6.3");const st=window,rt=st.trustedTypes,ot=rt?rt.createPolicy("lit-html",{createHTML:t=>t}):void 0,at="$lit$",ct=`lit$${(Math.random()+"").slice(9)}$`,lt="?"+ct,dt=`<${lt}>`,ut=document,ht=()=>ut.createComment(""),pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,mt="[ \t\n\f\r]",vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gt=/-->/g,yt=/>/g,_t=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),bt=/'/g,$t=/"/g,wt=/^(?:script|style|textarea|title)$/i,Ct=(St=1,(t,...e)=>({_$litType$:St,strings:t,values:e})),At=Symbol.for("lit-noChange"),xt=Symbol.for("lit-nothing"),kt=new WeakMap,Et=ut.createTreeWalker(ut,129,null,!1);var St;function Nt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ot?ot.createHTML(e):e}class It{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,r=0;const o=t.length-1,a=this.parts,[c,l]=((t,e)=>{const i=t.length-1,n=[];let s,r=2===e?"":"",o=vt;for(let a=0;a"===c[0]?(o=null!=s?s:vt,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,i=c[1],o=void 0===c[3]?_t:'"'===c[3]?$t:bt):o===$t||o===bt?o=_t:o===gt||o===yt?o=vt:(o=_t,s=void 0);const u=o===_t&&t[a+1].startsWith("/>")?" ":"";r+=o===vt?e+dt:l>=0?(n.push(i),e.slice(0,l)+at+e.slice(l)+ct+u):e+ct+(-2===l?(n.push(void 0),a):u)}return[Nt(t,r+(t[i]||"")+(2===e?"":"")),n]})(t,e);if(this.el=It.createElement(c,i),Et.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=Et.nextNode())&&a.length0){n.textContent=rt?rt.emptyScript:"";for(let i=0;ift(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==xt&&pt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ut.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=It.createElement(Nt(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new Rt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=kt.get(t.strings);return void 0===e&&kt.set(t.strings,e=new It(t)),e}T(t){ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new Lt(this.k(ht()),this.k(ht()),this,this.options)):i=e[n],i._$AI(s),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=xt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let r=!1;if(void 0===s)t=Pt(this,t,e,0),r=!pt(t)||t!==this._$AH&&t!==At,r&&(this._$AH=t);else{const n=t;let o,a;for(t=s[0],o=0;o{var n,s;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let o=r._$litPart$;if(void 0===o){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=o=new Lt(e.insertBefore(ht(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o};var qt,zt;class Bt extends it{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Vt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return At}}Bt.finalized=!0,Bt._$litElement$=!0,null===(qt=globalThis.litElementHydrateSupport)||void 0===qt||qt.call(globalThis,{LitElement:Bt});const Jt=globalThis.litElementPolyfillSupport;async function Wt(t,e){const i=new URL(t,"https://parseapi.back4app.com"),n=await fetch(i,e);if(!0!==n.ok){403===n.status&&await ye();const t=await n.json();throw new Error(`${t.error} Status: ${n.status}`,{cause:n})}return n.json()}function Yt(t,e){const i=new Headers({"X-Parse-Application-Id":"0oqWvkMylRfPgcnXNXtOUe8SWSqDZPiHktiLW9Np","X-Parse-REST-API-Key":"4YzVVeTWOVJyamwDNrNaafCLGzwC5qWnt7dw9aot"}),n=ve();return n&&i.append("X-Parse-Session-Token",n.token),e&&i.append("Content-Type","application/json"),{method:t,headers:i,...e?{body:JSON.stringify(e)}:{}}}null==Jt||Jt({LitElement:Bt}),(null!==(zt=globalThis.litElementVersions)&&void 0!==zt?zt:globalThis.litElementVersions=[]).push("3.3.3");const Gt=t=>Wt(t,Yt("GET")),Kt=(t,e)=>Wt(t,Yt("POST",e)),Zt=(t,e)=>Wt(t,Yt("PUT",e)),Xt=t=>Wt(t,Yt("DELETE"));function Ft(t){if(!t)return{};try{return decodeURIComponent(t).split("&").reduce(((t,e)=>{const[i,n]=e.split("=");return t[i.trim()]=(null==n?void 0:n.includes(","))?n.split(",").map(decodeURIComponent):decodeURIComponent(null==n?void 0:n.trim()),t}),{})}catch(e){return console.error(e),{}}}function Qt(t){if(!t)return"";try{return Object.entries(t).filter((([t,e])=>{const i="string"==typeof t&&t.trim().length>0,n="string"==typeof e?e.trim().length>0:Array.isArray(e)&&e.every((t=>"string"==typeof t&&t.trim().length>0));return i&&n})).map((([t,e])=>{const i=Array.isArray(e)?e.map((t=>encodeURIComponent(t.trim()))).join(","):encodeURIComponent(e.trim());return`${encodeURIComponent(t.trim())}=${i}`})).join("&")}catch(e){return console.error(e),""}}function te(t){const e=new FormData(t);return[Object.fromEntries(Array.from(e,(([t,e])=>[t,"string"==typeof e?e.trim():e]))),e=>Array.from(t.elements).forEach((t=>e?t.setAttribute("disabled","true"):t.removeAttribute("disabled")))]}function ee(){if(crypto&&crypto.randomUUID)return crypto.randomUUID();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=~~(16*Math.random());return("x"===t?e:3&e|8).toString(16)}))}function ie(t,e={}){const{parent:i,prepend:n=!1,attributes:s,children:r,style:o,...a}=e,c=document.createElement(t);if(void 0!==s)for(const l in s)c.setAttribute(l,s[l]);if(Array.isArray(r))for(const l of r)c.append(l);if(void 0!==o&&Object.assign(c.style,o),Object.assign(c,a),void 0!==i){const t="string"==typeof i?document.querySelector(i):i;t&&t[n?"prepend":"append"](c)}return c}t=new WeakMap;const ne=new class{constructor(e){var i,n,s,r;l(this,t,void 0),s=e,a(i=this,n=t,"write to private field"),r?r.call(i,s):n.set(i,s),this.supported||console.warn("Cache API is not supported in this environment"),!sessionStorage.getItem(`${c(this,t)}Initialized`)&&this.supported&&(sessionStorage.setItem(`${c(this,t)}Initialized`,"true"),this.deleteCache())}get supported(){return!!window.caches}get databaseName(){return c(this,t)}async getCacheData(e){if(!this.supported)return Promise.resolve(null);const i=await caches.open(c(this,t)),n=await i.match(new Request(e));return n&&n.ok?await n.json():Promise.resolve(null)}async updateCacheData(e,i){if(!this.supported)return Promise.resolve();return(await caches.open(c(this,t))).put(new Request(e),new Response(JSON.stringify(i)))}async clearCacheData(e){if(!this.supported)return Promise.resolve(!1);return(await caches.open(c(this,t))).delete(new Request(e))}async deleteCache(){return this.supported?caches.delete(c(this,t)):Promise.resolve(!1)}}("CarServiceCacheDatabase"),se="rgba(0 0 0 / 0.5)",re=3,oe={default:{icon:"",color:"#555555",backgroundColor:"#f2f2f2"},info:{icon:"info",color:"#217ca3",backgroundColor:"#cfe8f3"},success:{icon:"check_circle",color:"#45874a",backgroundColor:"#e5f6e4"},warning:{icon:"error",color:"#b0822f",backgroundColor:"#fef5dc"},error:{icon:"cancel",color:"#b23c3a",backgroundColor:"#f2dede"}};e=new WeakMap,i=new WeakSet,n=function(t,e){switch(t){case"cube-flip":return ie("div",{className:"notice-loading-cube-flip",style:{backgroundColor:e}});case"dots-zoom":return ie("div",{className:"notice-loading-dots-zoom",children:[ie("div",{className:"notice-loading-dots-zoom1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-dots-zoom2",style:{backgroundColor:e}})]});case"line":return ie("div",{className:"notice-loading-line",children:[ie("div",{className:"notice-loading-line-rect1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect2",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect3",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect4",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-line-rect5",style:{backgroundColor:e}})]});case"dots-spin":return ie("div",{className:"notice-loading-spin-dots",children:[ie("div",{className:"notice-loading-spin-dot1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-spin-dot2",style:{backgroundColor:e}})]});case"dots":return ie("div",{className:"notice-loading-dots",children:[ie("div",{className:"notice-loading-dot1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-dot2",style:{backgroundColor:e}}),ie("div",{style:{backgroundColor:e}})]});case"cube-zoom":return ie("div",{className:"notice-loading-cube-zoom",children:[ie("div",{className:"notice-loading-cube-zoom-1",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-2",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-3",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-4",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-5",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-6",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-7",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-8",style:{backgroundColor:e}}),ie("div",{className:"notice-loading-cube-zoom-9",style:{backgroundColor:e}})]});default:return null}},s=new WeakSet,r=function(t,e,i,n){const s=ie("div",{className:"notice-modal-buttons"});switch(t){case"yes-no":return ie("button",{parent:s,attributes:{"button-type":"info"},textContent:"Да",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Не",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;case"ok":return ie("button",{parent:s,textContent:"Добре",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),s;case"ok-cancel":return ie("button",{parent:s,textContent:"Добре",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Отказ",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;case"retry-cancel":return ie("button",{parent:s,attributes:{"button-type":"info"},textContent:"Нов опит",onclick:t=>{e.remove(),"function"==typeof i&&i(t)}}),ie("button",{parent:s,attributes:{"button-type":"danger"},textContent:"Отказ",onclick:t=>{e.remove(),"function"==typeof n&&n(t)}}),s;default:return null}};const ae=new class{constructor(){l(this,i),l(this,s),l(this,e,document.body)}showLoading(t={}){const{type:s="dots",color:r="white",autoClose:o,title:a,titleColor:l,maskColor:u=se}=t,h=ie("div",{parent:c(this,e),className:"notice-loading notice-flex-center notice-fixed-all-page",id:"notice-loading"});ie("div",{parent:h,className:"notice-mask notice-fixed-all-page",style:{backgroundColor:u}});const p=d(this,i,n).call(this,s,r)||d(this,i,n).call(this,"dots",r),f=ie("div",{parent:h,className:"notice-flex-center notice-loading-main",children:[p]});a&&ie("p",{parent:f,style:{color:l},textContent:a}),o&&setTimeout((()=>h.remove()),1e3*o)}hideLoading(){var t;null==(t=document.getElementById("notice-loading"))||t.remove()}showToast(t){const{text:i,type:n="default",autoClose:s=re,showClose:r=!0}=t;if(!i)return;const{icon:o,color:a,backgroundColor:l}=oe[n]||oe.default,d=document.getElementById("notice-toast")||ie("div",{parent:c(this,e),className:"notice-toast",id:"notice-toast"}),u=ie("div",{parent:d,className:"notice-toast-main notice-toast-main-active",id:`notice-toast-${ee()}`,style:{backgroundColor:l}}),h=ie("div",{parent:u,className:"notice-toast-container",children:[ie("p",{className:"notice-toast-text",style:{color:a},textContent:i})]});o&&ie("i",{parent:h,prepend:!0,className:"material-icons notice-toast-icon",style:{color:a},textContent:o}),(r||!s)&&ie("i",{parent:h,className:"material-icons notice-close-icon",textContent:"close",onclick:()=>f()});const p=!!Number(getComputedStyle(d).getPropertyValue("--_should-auto-close"));if(s||p){setTimeout((()=>f()),1e3*(s||re))}function f(){if(!u)return;const t=parseFloat(window.getComputedStyle(u).getPropertyValue("transition-duration"));u.classList.remove("notice-toast-main-active"),setTimeout((()=>{u&&u.remove(),d.children.length||d.remove()}),1e3*t)}}showModal(t={}){const{type:i="yes-no",color:n,backgroundColor:o,title:a,titleColor:l,message:u,messageColor:h,maskColor:p=se,onConfirm:f,onCancel:m}=t,v=ie("div",{parent:c(this,e),className:"notice-modal notice-flex-center notice-fixed-all-page",id:"notice-modal"});ie("div",{parent:v,className:"notice-mask notice-fixed-all-page",style:{backgroundColor:p}});const g=ie("div",{parent:v,className:"notice-flex-center notice-modal-main",style:{backgroundColor:o},children:[d(this,s,r).call(this,i,v,f,m)||d(this,s,r).call(this,"yes-no",v,f,m)]});u&&ie("p",{parent:g,prepend:!0,style:{color:h||n},textContent:u}),a&&ie("h2",{parent:g,prepend:!0,style:{color:l||n},textContent:a})}},ce=document.querySelectorAll(".user-navigation"),le=document.querySelectorAll(".guest-navigation");function de(){me()?(ce.forEach((t=>t.removeAttribute("hidden"))),le.forEach((t=>t.setAttribute("hidden","")))):(ce.forEach((t=>t.setAttribute("hidden",""))),le.forEach((t=>t.removeAttribute("hidden"))))}const ue={LOGIN:"/login",REGISTER:"/users",LOGOUT:"/logout"},he={CREATE_CAR:"/classes/Car",ALL_CARS:(t="")=>`/classes/Car?${Qt({order:"-createdAt",where:t})}`,CAR_BY_ID:t=>`/classes/Car/${t}`},pe={CREATE_REPAIR:"/classes/Repair",ALL_REPAIRS:t=>`/classes/Repair?${Qt({order:"-createdAt",where:t})}`,REPAIR_BY_ID:t=>`/classes/Repair/${t}`},fe="car-service-current-user-data";function me(){return!!localStorage.getItem(fe)}function ve(){var t;return JSON.parse(null!=(t=localStorage.getItem(fe))?t:"null")}async function ge(t){await ne.deleteCache().catch(console.error),localStorage.setItem(fe,JSON.stringify(t))}async function ye(){await ne.deleteCache().catch(console.error),localStorage.removeItem(fe)}const _e={itemsPerPage:10,relativePageLinks:3};async function be(t){const e="/cars",i=await ne.getCacheData(e),n=i&&i.find((e=>e.objectId===t));if(n)return n;const s=await Gt(he.CAR_BY_ID(t));if(i){const t=[s,...i].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));await ne.updateCacheData(e,JSON.parse(JSON.stringify(t)))}return s}async function $e(t){var e;const i=await Xt(he.CAR_BY_ID(t)),n="/cars",s=(null!=(e=await ne.getCacheData(n))?e:[]).filter((e=>e.objectId!==t));return await(s.length>0?ne.updateCacheData(n,JSON.parse(JSON.stringify(s))):ne.clearCacheData(n)),i}async function we(t,e){const i=JSON.stringify({car:{__type:"Pointer",className:"Car",objectId:t}}),n=`/cars/${t}/repairs`,s=await ne.getCacheData(n);let r;if(s?r=s:(({results:r}=await Gt(pe.ALL_REPAIRS(i))),await ne.updateCacheData(n,JSON.parse(JSON.stringify(r)))),!e)return{results:r,count:r.length};const o=10*(e-1),a=10*e;return{results:r.slice(o,a),count:r.length}}async function Ce(t,e){const i=`/cars/${t}/repairs`,n=await ne.getCacheData(i),s=n&&n.find((t=>t.objectId===e));if(s)return s;const r=await Gt(pe.REPAIR_BY_ID(e));if(n){const t=[r,...n].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));await ne.updateCacheData(i,JSON.parse(JSON.stringify(t)))}return r}async function Ae(t){const{results:e}=await we(t),i=e.map((({objectId:t})=>Xt(pe.REPAIR_BY_ID(t)))),n=`/cars/${t}/repairs`;return await ne.clearCacheData(n),Promise.all(i)}const xe=document.getElementById("site-content")||document.body,ke=document.querySelector("meta[name=viewport]"),Ee=["/user/login","/user/register"];function Se(t,e={}){const{container:i,...n}=e,s=i&&(i instanceof HTMLElement||i instanceof DocumentFragment)?i:"string"==typeof i?document.querySelector(i):null;return Vt(t,s||xe,n)}const Ne=(t,e)=>t.length>0?Ie(t,e):Ct`

Нямаш добавени автомобили!

`,Ie=(t,e)=>Ct`${t.map((t=>Pe(t,e)))}
РамаPегистрационен №Марка / МоделДвигателИме на клиентаРемонтиРедакцияИзтриване
`,Pe=(t,e)=>Ct`${t.vin}${t.registration}${t.make}${t.engine}${t.customerName}
`,Re=(t,e,i,n)=>{const s=(s,r)=>{const o=t===r||r<1||r>e,a="number"==typeof s&&t===r,c=o?"#":(t=>{const e=Qt({filter:i,query:n,page:t.toString()});return`${window.location.pathname}?${e}`})(r);return Ct`${s}`};const r=s(Ct`keyboard_double_arrow_left`,1),o=s(Ct`chevron_left`,t-1),a=function(){const i=Math.floor(_e.relativePageLinks/2),n=Math.min(Math.max(1,t-i),Math.max(1,e-_e.relativePageLinks+1)),s=Math.max(Math.min(e,t+i),Math.min(e,_e.relativePageLinks)),r=Math.min(s-n+1,e);return Array.from({length:r},((t,e)=>n+e))}().map((t=>s(t,t))),c=s(Ct`chevron_right`,t+1),l=s(Ct`keyboard_double_arrow_right`,e);return Ct`${r}${o}${a}${c}${l}`},Le=t=>t.length>0?Oe(t):Ct`

Нямаш завършени ремонти!

`,Oe=t=>Ct`${t.map(Te)}
Извършен наКилометриДетайли по ремонта
`,Te=t=>Ct`${t.date}${t.km}`,Ue=(t,e)=>{const i=(i,n)=>{const s=t===n||n<1||n>e,r="number"==typeof i&&t===n,o=s?"#":(t=>{const e=Qt({page:t.toString()});return`${window.location.pathname}?${e}`})(n);return Ct`${i}`};const n=i(Ct`keyboard_double_arrow_left`,1),s=i(Ct`chevron_left`,t-1),r=function(){const i=Math.floor(_e.relativePageLinks/2),n=Math.min(Math.max(1,t-i),Math.max(1,e-_e.relativePageLinks+1)),s=Math.max(Math.min(e,t+i),Math.min(e,_e.relativePageLinks)),r=Math.min(s-n+1,e);return Array.from({length:r},((t,e)=>n+e))}().map((t=>i(t,t))),o=i(Ct`chevron_right`,t+1),a=i(Ct`keyboard_double_arrow_right`,e);return Ct`${n}${s}${r}${o}${a}`};async function De(t){t.preventDefault();const e=t.target,[i,n]=te(e);try{n(!0),ae.showLoading({type:"cube-zoom"}),await async function(t){const e=await Kt(ue.LOGIN,t);return await ge({username:t.username,id:e.objectId,token:e.sessionToken}),de(),e}(i),H.redirect("/cars")}catch(s){const t=s instanceof Error?s.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{n(!1),ae.hideLoading(),e.reset()}}function je(t){t.preventDefault();const e=t.target,i=e.previousElementSibling,n="password"===i.type?"text":"password";i.setAttribute("type",n),e.textContent="password"===n?"visibility_off":"visibility"}async function He(t){t.preventDefault();const e=t.target,[{username:i,password:n,repass:s},r]=te(e);if(n===s)try{r(!0),ae.showLoading({type:"cube-zoom"}),await async function(t){const e=await Kt(ue.REGISTER,t);return await ge({username:t.username,id:e.objectId,token:e.sessionToken}),de(),e}({username:i,password:n}),H.redirect("/cars")}catch(o){const t=o instanceof Error?o.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{r(!1),ae.hideLoading(),e.reset()}else ae.showToast({text:"Паролите не съвпадат!",type:"warning"})}function Me(t){var e,i,n;t.preventDefault();const s=t.target,r=s.previousElementSibling,o=null==(n=null==(i=null==(e=s.parentElement)?void 0:e.parentElement)?void 0:i.nextElementSibling)?void 0:n.lastElementChild,a="password"===r.type?"text":"password";r.setAttribute("type",a),o.setAttribute("type",a),s.textContent="password"===a?"visibility_off":"visibility"}const Ve=2;class qe{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const ze=(t,e)=>{var i,n;const s=t._$AN;if(void 0===s)return!1;for(const r of s)null===(n=(i=r)._$AO)||void 0===n||n.call(i,e,!1),ze(r,e);return!0},Be=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},Je=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Ge(e)}};function We(t){void 0!==this._$AN?(Be(this),this._$AM=t,Je(this)):this._$AM=t}function Ye(t,e=!1,i=0){const n=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(e)if(Array.isArray(n))for(let r=i;r{var e,i,n,s;t.type==Ve&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=Ye),null!==(i=(s=t)._$AQ)&&void 0!==i||(s._$AQ=We))};class Ke extends qe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Je(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(ze(this,t),Be(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Ze{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class Xe{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}const Fe=t=>{return!(e=t,null===e||"object"!=typeof e&&"function"!=typeof e||"function"!=typeof t.then);var e},Qe=1073741823;const ti=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends Ke{constructor(){super(...arguments),this._$C_t=Qe,this._$Cwt=[],this._$Cq=new Ze(this),this._$CK=new Xe}render(...t){var e;return null!==(e=t.find((t=>!Fe(t))))&&void 0!==e?e:At}update(t,e){const i=this._$Cwt;let n=i.length;this._$Cwt=e;const s=this._$Cq,r=this._$CK;this.isConnected||this.disconnected();for(let o=0;othis._$C_t);o++){const t=e[o];if(!Fe(t))return this._$C_t=o,t;o{for(;r.get();)await r.get();const i=s.deref();if(void 0!==i){const n=i._$Cwt.indexOf(t);n>-1&&nae.showModal({message:`Сигурен ли си, че искаш да изтриеш автомобила на ${e.customerName} - "${e.registration}"`,onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading(),await Promise.all([Ae(e.objectId),$e(e.objectId)]),ae.showToast({text:`Успешно изтрихте автомобила на ${e.customerName} - "${e.registration}"`,type:"info"})}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading(),H.redirect("/cars")}}async function ni(t){t.preventDefault();const e=t.target,[i,n]=te(e);try{n(!0),ae.showLoading(),await async function(t){var e;const{id:i}=ve(),n={owner:Object.freeze({__type:"Pointer",className:"_User",objectId:i})},s=Object.assign({},t,n),r=await Kt(he.CREATE_CAR,s),o="/cars",a=null!=(e=await ne.getCacheData(o))?e:[],c={...s,...r},l=[c,...a].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(o,JSON.parse(JSON.stringify(l))),c}(i),ae.showToast({text:`Успешно създадохте автомобил на ${i.customerName} - "${i.registration}"`,type:"success"})}catch(s){const t=s instanceof Error?s.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{n(!1),ae.hideLoading(),e.reset(),H.redirect("/cars")}}async function si(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e){var i;const n=await Zt(he.CAR_BY_ID(t),e),s="/cars",r=null!=(i=await ne.getCacheData(s))?i:[],o=r.findIndex((e=>e.objectId===t)),a={...-1!==o?r.splice(o,1)[0]:{},...e,...n},c=[a,...r].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(s,JSON.parse(JSON.stringify(c))),a}(e.objectId,n),ae.showToast({text:`Успешно редактирахте ремонт на ${n.customerName} - "${n.registration}"`,type:"info"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect("/cars")}}async function ri(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e){var i;const{id:n}=ve(),s={owner:Object.freeze({__type:"Pointer",className:"_User",objectId:n})},r={car:Object.freeze({__type:"Pointer",className:"Car",objectId:t})},o=Object.assign({},e,s,r),a=await Kt(pe.CREATE_REPAIR,o),c=`/cars/${t}/repairs`,l=null!=(i=await ne.getCacheData(c))?i:[],d={...o,...a},u=[d,...l].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(c,JSON.parse(JSON.stringify(u))),d}(e,n),ae.showToast({text:"Успешно добавихте ремонт",type:"success"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect(`/cars/${e}/repairs`)}}async function oi(t,e){t.preventDefault();if(await new Promise((t=>ae.showModal({message:`Сигурен ли си, че искаш да изтриеш ремонт от дата "${e.date}"`,onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading(),await async function(t,e){var i;const n=await Xt(pe.REPAIR_BY_ID(e)),s=`/cars/${t}/repairs`,r=(null!=(i=await ne.getCacheData(s))?i:[]).filter((t=>t.objectId!==e));return await(r.length>0?ne.updateCacheData(s,JSON.parse(JSON.stringify(r))):ne.clearCacheData(s)),n}(e.car.objectId,e.objectId),ae.showToast({text:"Успешно изтрихте ремонта",type:"info"})}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading(),H.redirect(`/cars/${e.car.objectId}/repairs`)}}async function ai(t,e){t.preventDefault();const i=t.target,[n,s]=te(i);try{s(!0),ae.showLoading(),await async function(t,e,i){var n;const s=await Zt(pe.REPAIR_BY_ID(e),i),r=`/cars/${t}/repairs`,o=null!=(n=await ne.getCacheData(r))?n:[],a=o.findIndex((t=>t.objectId===e)),c={...-1!==a?o.splice(a,1)[0]:{},...i,...s},l=[c,...o].sort(((t,e)=>+new Date(e.createdAt)-+new Date(t.createdAt)));return await ne.updateCacheData(r,JSON.parse(JSON.stringify(l))),c}(e.car.objectId,e.objectId,n),ae.showToast({text:`Успешно редактирахте ремонт от дата "${n.date}"`,type:"info"})}catch(r){const t=r instanceof Error?r.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{s(!1),ae.hideLoading(),i.reset(),H.redirect(`/cars/${e.car.objectId}/repairs/${e.objectId}`)}}null==(o=document.getElementById("logout-button"))||o.addEventListener("click",(async function(t){if(t.preventDefault(),await new Promise((t=>ae.showModal({message:"Сигурен ли си, че искаш да излезеш?",title:"Изход",onConfirm:()=>t(!0),onCancel:()=>t(!1)}))))try{ae.showLoading({type:"cube-zoom"}),await async function(){const t=await Kt(ue.LOGOUT,{});return await ye(),de(),t}(),H.redirect("/user/login")}catch(e){const t=e instanceof Error?e.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"})}finally{ae.hideLoading()}})),H.base("/Car-Service"),H((function(t,e){de(),Object.assign(t,{root:xe,render:Se}),function(t){const{lastVisitedRoute:e,path:i}=t.state;if(e===i)return;t.init?t.state.lastVisitedRoute=void 0:t.state.lastVisitedRoute=window.location.pathname+window.location.search}(t),function(t){const{path:e}=t,i="interactive-widget=resizes-content";if(!ke){const t=document.createElement("meta");return t.name="viewport",t.content=i,void document.head.appendChild(t)}const n=ke.content.split(",").map((t=>t.trim()));Ee.includes(e)&&!n.includes(i)?n.push(i):!Ee.includes(e)&&n.includes(i)&&n.splice(n.indexOf(i),1);ke.content=n.join(", ")}(t),function(t){if(!t)return;if(!document.startViewTransition)return void t();document.startViewTransition(t)}((()=>{const i=me(),n=!i&&!Ee.includes(t.path),s=i&&Ee.includes(t.path);n?t.page.redirect(Ee[0]):s?window.history.back():e()}))})),H("/user/login",(function(t){t.render(Ct`
Вход
visibility_off
`)})),H("/user/register",(function(t){t.render(Ct`
Регистрация
visibility_off
`)})),H("/cars",(function(t){const{page:e="1",filter:i="",query:n=""}=Ft(t.querystring);t.render(ti((async()=>{const t=await async function(t,e,i){try{const{results:n,count:s}=await async function(t,e,i){const n=e&&i?JSON.stringify({[e]:{$regex:`(?i)${i}`}}):null,s="/cars",r=await ne.getCacheData(s);let o;if(n?({results:o}=await Gt(he.ALL_CARS(n))):(o=null!=r?r:(await Gt(he.ALL_CARS())).results,r||await ne.updateCacheData(s,o)),!t)return{results:o,count:o.length};const a=(t-1)*_e.itemsPerPage,c=t*_e.itemsPerPage;return{results:o.slice(a,c),count:o.length}}(t,e,i);return{cars:n,carsCount:s,pageNumber:t,searchCategory:e,searchQuery:i}}catch(n){const t=n instanceof Error?n.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/")}finally{ae.hideLoading()}}(Number(e)||1,i,n);if(t)return((t,e,i)=>{const{cars:n,carsCount:s,pageNumber:r,searchCategory:o,searchQuery:a}=t,c=Math.max(Math.ceil(s/_e.itemsPerPage),1);return Ct`
Всички автомобили${Ne(n,i)}
${Re(r,c,o,a)}
`})(t,ei,ii)})(),ae.showLoading()))})),H("/cars/create",(function(t){t.render(Ct`
Добави автомобил
Отказ
`)})),H("/cars/:carId/edit",(function(t){const{carId:e}=t.params;t.render(ti((async()=>{const t=await async function(t){try{return await be(t)}catch(e){const t=e instanceof Error?e.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/cars")}finally{ae.hideLoading()}}(e);var i,n;if(t)return n=si,Ct`
n(t,i)} autocomplete="off">
Редактирай автомобил
Отказ
`})(),ae.showLoading()))})),H("/cars/:carId/repairs",(function(t){const{carId:e}=t.params,{page:i="1"}=Ft(t.querystring),{lastVisitedRoute:n="/cars"}=t.state;t.render(ti((async()=>{const t=await async function(t,e){try{const[{results:i,count:n},s]=await Promise.all([we(t,e),be(t)]);return{repairs:i,repairsCount:n,car:s,pageNumber:e}}catch(i){const t=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:t,type:"error"}),H.redirect("/cars")}finally{ae.hideLoading()}}(e,Number(i)||1);if(t)return(t=>{const{repairs:e,repairsCount:i,car:n,pageNumber:s,lastVisitedRoute:r}=t,o=Math.max(Math.ceil(i/_e.itemsPerPage),1);return Ct`
Всичките ремонти на ${n.customerName} - "${n.registration}"${Le(e)}
${Ue(s,o)}
`})({...t,lastVisitedRoute:n})})(),ae.showLoading()))})),H("/cars/:carId/repairs/create",(function(t){var e,i;t.render((e=t.params.carId,i=ri,Ct`
i(t,e)} autocomplete="off">
Добави ремонт
Отказ
`))})),H("/cars/:carId/repairs/:repairId",(function(t){const{carId:e,repairId:i}=t.params;t.render(ti((async()=>{const t=await async function(t,e){try{return await Ce(t,e)}catch(i){const e=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:e,type:"error"}),H.redirect(`/cars/${t}/repairs`)}finally{ae.hideLoading()}}(e,i);var n,s;if(t)return s=oi,Ct`
Детайли по ремонта
Обща информация
Информация за ремонта
РедактирайНазад
`})(),ae.showLoading()))})),H("/cars/:carId/repairs/:repairId/edit",(function(t){const{carId:e,repairId:i}=t.params;t.render(ti((async()=>{const t=await async function(t,e){try{return await Ce(t,e)}catch(i){const e=i instanceof Error?i.message:"Възникна грешка, моля опитайте по-късно";ae.showToast({text:e,type:"error"}),H.redirect(`/cars/${t}/repairs`)}finally{ae.hideLoading()}}(e,i);var n,s;if(t)return s=ai,Ct`
s(t,n)} autocomplete="off">
Редактирай ремонт
Отказ
`})(),ae.showLoading()))})),H.start();