/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
'use strict';

var index = require('./index-CmK48vN3.js');
var cn = require('./cn-BHnqYtun.js');
var getNestedValue = require('./get-nested-value-lW6t7V4I.js');
var formInputLabel = require('./form-input-label-meHUwu3m.js');
var formErrorMessage = require('./form-error-message-Brt-y3mq.js');

const formInputsCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.end-0{inset-inline-end:0}.left-0{left:0}.top-0{top:0}.top-1\\/2{top:50%}.z-\\[10\\]{z-index:10}.-mt-\\[8px\\]{margin-top:-8px}.mb-\\[4px\\]{margin-bottom:4px}.ms-0\\.5{margin-inline-start:.125rem}.mt-2{margin-top:.5rem}.mt-\\[8px\\]{margin-top:8px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.\\!hidden{display:none!important}.hidden{display:none}.size-8{height:2rem;width:2rem}.size-\\[18px\\]{height:18px;width:18px}.size-\\[22px\\]{height:22px;width:22px}.size-\\[24px\\]{height:24px;width:24px}.size-full{height:100%;width:100%}.h-\\[200px\\]{height:200px}.h-\\[38px\\]{height:38px}.h-full{height:100%}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[100px\\]{min-height:100px}.w-\\[36px\\]{width:36px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.-translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%}.translate-y-\\[38px\\]{--tw-translate-y:38px}.rotate-180,.translate-y-\\[38px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\!cursor-not-allowed{cursor:not-allowed!important}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{appearance:none}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.\\!border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.border-\\[\\#f2aeb5\\]{--tw-border-opacity:1;border-color:rgb(242 174 181/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.\\!bg-slate-700{--tw-bg-opacity:1!important;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))!important}.bg-\\[\\#f7d7d8\\]{--tw-bg-opacity:1;background-color:rgb(247 215 216/var(--tw-bg-opacity,1))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pe-\\[36px\\]{padding-inline-end:36px}.pt-3{padding-top:.75rem}.pt-\\[1px\\]{padding-top:1px}.text-center{text-align:center}.text-start{text-align:start}.text-\\[12px\\]{font-size:12px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.\\!text-slate-300{--tw-text-opacity:1!important;color:rgb(203 213 225/var(--tw-text-opacity,1))!important}.\\!text-transparent{color:transparent!important}.\\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\\[\\#576675\\]{--tw-text-opacity:1;color:rgb(87 102 117/var(--tw-text-opacity,1))}.text-\\[\\#58151c\\]{--tw-text-opacity:1;color:rgb(88 21 28/var(--tw-text-opacity,1))}.text-\\[\\#9CA3AF\\]{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.caret-transparent{caret-color:transparent}.\\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\!duration-1000{transition-duration:1s!important}.\\!duration-200{transition-duration:.2s!important}.\\!duration-300{transition-duration:.3s!important}.duration-300{transition-duration:.3s}:host{all:initial!important;display:block}@keyframes spin-animation{to{transform:rotate(1turn)}}.spin-slow{animation:spin-animation 2s linear infinite}.error-message-container{--tw-translate-y:100%;bottom:0;overflow:hidden;padding-top:1px;position:absolute}.error-message,.error-message-container{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.error-message{--tw-translate-y:-100%;--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1));font-size:12px;opacity:0;transition-duration:.3s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.display-error-message{--tw-translate-y:-0px;opacity:1!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-input-label-container{display:inline-flex;flex-direction:column;position:relative;width:100%}.form-input-label{margin-bottom:4px}.form-input-label-required-star{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1));margin-inline-start:.125rem}.form-input-container{position:relative}.form-input-label-container.disabled .form-input-container{opacity:.75}.form-input-prefix{align-items:center;display:flex;height:100%;justify-content:center;left:0;opacity:.8;padding-left:.5rem;padding-right:.5rem;pointer-events:none;position:absolute;top:0}.form-input-prefix:where([dir=rtl],[dir=rtl] *){left:auto;right:0}.form-input-label-container.disabled *{pointer-events:none}.form-input-label-container.disabled .form-input-style{opacity:.5}.form-input-style{--tw-border-opacity:1;appearance:none;border-color:rgb(203 213 225/var(--tw-border-opacity,1));border-radius:.375rem;border-width:1px;flex:1 1 0%;outline:2px solid transparent;outline-offset:2px;padding:6px 12px;transition-duration:.3s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}.form-input-style:focus:enabled{--tw-border-opacity:1;--tw-shadow:0 0 0 0.2rem rgba(71,85,105,.25);--tw-shadow-colored:0 0 0 0.2rem var(--tw-shadow-color);border-color:rgb(71 85 105/var(--tw-border-opacity,1));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.form-input-style:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.form-input-style::-webkit-inner-spin-button,.form-input-style::-webkit-outer-spin-button{appearance:none}.form-file-input{display:none}.form-file-trigger{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));color:rgb(30 41 59/var(--tw-text-opacity,1));cursor:pointer;display:flex;gap:.75rem;justify-content:space-between;text-align:start}.form-file-trigger:disabled{cursor:not-allowed;opacity:.75}.form-file-trigger-loading{opacity:.8}.form-file-icon{--tw-text-opacity:1;align-items:center;color:rgb(100 116 139/var(--tw-text-opacity,1));display:flex;justify-content:center}.form-file-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.form-file-spinner{animation:spin-animation 1s linear infinite;height:18px;width:18px}.form-file-success-icon{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1));height:18px;width:18px}.form-file-status{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1));font-size:.875rem;line-height:1.25rem;margin-top:.5rem}.form-file-status-error{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.form-file-status-success{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.form-input-style::-webkit-calendar-picker-indicator{display:none!important}.form-input-picker-text{caret-color:transparent;color:transparent!important;user-select:none}.form-input-display-overlay{align-items:center;direction:ltr;display:flex;inset:0;overflow:hidden;padding-left:14px;padding-right:14px;pointer-events:none;position:absolute;text-overflow:ellipsis;white-space:nowrap}.form-input-display-placeholder{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.form-input-icon{--tw-translate-y:-50%;--tw-text-opacity:1;align-items:center;color:rgb(87 102 117/var(--tw-text-opacity,1));display:flex;height:24px;justify-content:center;pointer-events:none;position:absolute;top:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.3s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.form-input-icon-end{inset-inline-end:.75rem}.form-input-icon-start{inset-inline-start:.75rem}.form-input-icon-interactive{cursor:pointer;pointer-events:auto}.form-input-textarea-style{height:200px;padding:6px 12px;resize:none}.form-input-error-style{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.form-input-error-style:focus:enabled{--tw-shadow:0 0 0 0.2rem rgba(239,68,68,.25);--tw-shadow-colored:0 0 0 0.2rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.form-input-select[readonly]{cursor:pointer}.form-input-select-icon-container{align-items:center;display:flex;height:100%;inset-inline-end:0;justify-content:center;pointer-events:none;position:absolute;top:0;width:36px}.form-input-select-icon{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1));height:24px;pointer-events:auto;width:24px}.form-input-container.disabled .form-input-select-icon{pointer-events:none}.form-input-select-icon.cross{--tw-rotate:45deg;cursor:pointer;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-input-select-icon.cross:hover{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.form-input-select-icon.arrow{--tw-rotate:180deg;transition-duration:.3s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-input-container.open .form-input-select-icon.arrow,.form-input-select-icon.arrow{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-input-container.open .form-input-select-icon.arrow{--tw-rotate:0deg}.form-structure-error-container{align-items:center;display:flex;min-height:100px;padding-bottom:16px;padding-top:16px}.form-structure-error-content{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(247 215 216/var(--tw-bg-opacity,1));border-color:rgb(242 174 181/var(--tw-border-opacity,1));border-radius:8px;border-width:1px;color:rgb(88 21 28/var(--tw-text-opacity,1));font-size:20px;margin-left:auto;margin-right:auto;padding:8px 16px;width:fit-content}.form-submit{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(51 65 85/var(--tw-bg-opacity,1));border-radius:.25rem;color:rgb(255 255 255/var(--tw-text-opacity,1));display:flex;height:38px;overflow:hidden;padding-left:1rem;padding-right:1rem;position:relative;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-submit:hover:enabled{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.form-submit:active:enabled{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.form-submit.loading{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.form-submit-text-position{left:0;position:absolute;top:0;transition-duration:1s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-submit-text-style{align-items:center;display:flex;font-size:18px;height:100%;justify-content:center;width:100%}.form-submit.loading .form-submit-text-position{--tw-translate-y:100%}.form-submit-loading-container,.form-submit.loading .form-submit-text-position{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-submit-loading-container{--tw-translate-y:-100%;align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;transition-duration:1s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}.form-submit.loading .form-submit-loading-container{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-submit-loading-icon{animation:spin-animation 2s linear infinite;height:22px;width:22px}.form-picker-dropdown{--tw-bg-opacity:1;--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.375rem;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);opacity:0;pointer-events:none;position:absolute;transition-duration:.3s!important;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%;z-index:10}.form-input-container.open .form-picker-dropdown{opacity:1;pointer-events:auto}.form-picker-dropdown.upwards{--tw-translate-y:-100%;margin-top:-8px}.form-picker-dropdown.downwards,.form-picker-dropdown.upwards{top:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.form-picker-dropdown.downwards{--tw-translate-y:38px;margin-top:8px}.form-date-picker-header{align-items:center;display:flex;justify-content:space-between;padding:.75rem .75rem .25rem}.form-date-picker-nav{--tw-text-opacity:1;align-items:center;border-radius:.25rem;color:rgb(71 85 105/var(--tw-text-opacity,1));display:flex;height:2rem;justify-content:center;transition-duration:.2s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);width:2rem}.form-date-picker-nav:enabled{cursor:pointer}.form-date-picker-nav:hover:enabled{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.form-date-picker-nav:disabled{opacity:.3}.form-date-picker-title{font-size:.875rem;font-weight:500;line-height:1.25rem;user-select:none}.form-date-picker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding-bottom:.75rem;padding-left:.75rem;padding-right:.75rem}.form-date-picker-weekday{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1));font-size:.75rem;font-weight:500;line-height:1rem;user-select:none}.form-date-picker-day,.form-date-picker-weekday{padding-bottom:.375rem;padding-top:.375rem;text-align:center}.form-date-picker-day{border-radius:.25rem;cursor:pointer;font-size:.875rem;line-height:1.25rem;transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-date-picker-day:hover:enabled{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.form-date-picker-day.selected{--tw-bg-opacity:1!important;--tw-text-opacity:1!important;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.form-date-picker-day.selected:hover:enabled{--tw-bg-opacity:1!important;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))!important}.form-date-picker-day.today{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1));font-weight:700}.form-date-picker-day.outside{pointer-events:none}.form-date-picker-day.outside,.form-date-picker-day:disabled:not(.outside){--tw-text-opacity:1!important;color:rgb(203 213 225/var(--tw-text-opacity,1))!important}.form-date-picker-day:disabled:not(.outside){cursor:not-allowed!important;text-decoration-line:line-through}.form-time-picker-columns{display:flex;max-height:200px}.form-time-picker-columns>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.form-time-picker-column{display:flex;flex:1 1 0%;flex-direction:column;overflow-y:auto}.form-time-picker-column-header{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-bottom-width:1px;color:rgb(148 163 184/var(--tw-text-opacity,1));font-size:.75rem;font-weight:500;line-height:1rem;padding-bottom:.375rem;padding-top:.375rem;position:sticky;text-align:center;top:0;user-select:none}.form-time-picker-option{cursor:pointer;font-size:.875rem;line-height:1.25rem;padding-bottom:.5rem;padding-top:.5rem;text-align:center;transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.form-time-picker-option:hover:enabled{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.form-time-picker-option.selected{--tw-bg-opacity:1!important;--tw-text-opacity:1!important;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.form-time-picker-option.selected:hover:enabled{--tw-bg-opacity:1!important;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))!important}.form-time-picker-option:disabled{--tw-text-opacity:1!important;color:rgb(203 213 225/var(--tw-text-opacity,1))!important;cursor:not-allowed!important}.vehicle-image-loading-wrapper{align-items:center;color:#0f172a;display:flex;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition-duration:.1s;transition-property:all;width:100%;z-index:10}.vehicle-image-active-loading-wrapper{opacity:1}.vehicle-image-loader-icon{animation:spin-animation 2s linear infinite;height:32px;width:32px}.vehicle-image-wrapper{display:flex;justify-content:center;padding-left:20px;padding-right:20px;position:relative}.form-input-container-country{display:flex;width:100%}.form-input-container-country shift-select .form-input-container input{border-bottom-right-radius:0!important;border-right:none!important;border-top-right-radius:0!important}.form-input-container-country .form-input-container-wrapper input{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.form-input-country-selection{width:100px}.form-input-container-country .form-input-country-selection{width:75px}.form-phone-container .form-input-prefix{left:0!important;right:auto!important}.hover\\:text-black:hover{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.enabled\\:cursor-pointer:enabled{cursor:pointer}.enabled\\:hover\\:bg-slate-100:hover:enabled{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.enabled\\:hover\\:bg-slate-600:hover:enabled{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.enabled\\:focus\\:border-slate-600:focus:enabled{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.enabled\\:focus\\:shadow-\\[0_0_0_0\\.2rem_rgba\\(239\\2c 68\\2c 68\\2c 0\\.25\\)\\]:focus:enabled{--tw-shadow:0 0 0 0.2rem rgba(239,68,68,.25);--tw-shadow-colored:0 0 0 0.2rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.enabled\\:focus\\:shadow-\\[0_0_0_0\\.2rem_rgba\\(71\\2c 85\\2c 105\\2c 0\\.25\\)\\]:focus:enabled{--tw-shadow:0 0 0 0.2rem rgba(71,85,105,.25);--tw-shadow-colored:0 0 0 0.2rem var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.enabled\\:active\\:bg-slate-800:active:enabled{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.disabled\\:bg-white:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rtl\\:left-auto:where([dir=rtl],[dir=rtl] *){left:auto}.\\[\\&\\:\\:-webkit-inner-spin-button\\]\\:appearance-none::-webkit-inner-spin-button,.\\[\\&\\:\\:-webkit-outer-spin-button\\]\\:appearance-none::-webkit-outer-spin-button{appearance:none}.static{position:static}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.ms-2{margin-inline-start:.5rem}.cursor-default{cursor:default}.select-none{user-select:none}.rounded-\\[6px\\]{border-radius:6px}.border-2{border-width:2px}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.bg-transparent{background-color:transparent}.stroke-\\[3px\\]{stroke-width:3px}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-transparent{color:transparent}.opacity-75{opacity:.75}.peer:checked~.peer-checked\\:border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.peer:checked~.peer-checked\\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.peer:checked~.peer-checked\\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.\\[\\&_\\.check-icon\\]\\:scale-0 .check-icon{--tw-scale-x:0;--tw-scale-y:0}.\\[\\&_\\.check-icon\\]\\:scale-0 .check-icon,.peer:checked~.peer-checked\\:\\[\\&_\\.check-icon\\]\\:scale-100 .check-icon{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\\:\\[\\&_\\.check-icon\\]\\:scale-100 .check-icon{--tw-scale-x:1;--tw-scale-y:1}.size-4{height:1rem;width:1rem}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.left-\\[-2px\\]{left:-2px}.top-\\[-2px\\]{top:-2px}.h-\\[24px\\]{height:24px}.w-\\[50px\\]{width:50px}.rounded-full{border-radius:9999px}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.peer:checked~.peer-checked\\:\\[\\&_div\\]\\:translate-x-\\[28px\\] div{--tw-translate-x:28px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.shrink-0{flex-shrink:0}.resize{resize:both}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.left-\\[50\\%\\]{left:50%}.top-\\[16px\\]{top:16px}.z-10,.z-\\[10\\]{z-index:10}.mt-\\[12px\\]{margin-top:12px}.size-\\[32px\\]{height:32px;width:32px}.h-\\[1px\\]{height:1px}.-translate-x-\\[50\\%\\]{--tw-translate-x:-50%}.-translate-x-\\[50\\%\\],.-translate-y-\\[50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[50\\%\\]{--tw-translate-y:-50%}.flex-col{flex-direction:column}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.px-1{padding-left:.25rem;padding-right:.25rem}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:inset-0:before{content:var(--tw-content);inset:0}.before\\:size-full:before{content:var(--tw-content);height:100%;width:100%}.before\\:origin-center:before{content:var(--tw-content);transform-origin:center}.before\\:bg-black\\/15:before{background-color:rgba(0,0,0,.15);content:var(--tw-content)}.before\\:transition-all:before{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.before\\:duration-500:before{content:var(--tw-content);transition-duration:.5s}.aria-expanded\\:before\\:scale-\\[1\\.5\\][aria-expanded=true]:before{--tw-scale-x:1.5;--tw-scale-y:1.5;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.size-5{height:1.25rem;width:1.25rem}.gap-1{gap:.25rem}.duration-700{transition-duration:.7s}.fixed{position:fixed}.left-10{left:2.5rem}.top-10{top:2.5rem}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.size-20{height:5rem;width:5rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-7{--tw-translate-y:1.75rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.\\!duration-700{transition-duration:.7s!important}.rtl\\:-translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-mt-1{margin-top:-.25rem}.end-3\\.5{inset-inline-end:.875rem}.aspect-square{aspect-ratio:1/1}.size-\\[90\\%\\]{height:90%;width:90%}.h-\\[70\\%\\]{height:70%}.\\!uppercase{text-transform:uppercase!important}.\\!text-\\[\\#576675\\]{--tw-text-opacity:1!important;color:rgb(87 102 117/var(--tw-text-opacity,1))!important}.text-inherit{color:inherit}.duration-500{transition-duration:.5s}.enabled\\:hover\\:\\!text-black\\/85:hover:enabled{color:rgba(0,0,0,.85)!important}.disabled\\:\\!pointer-events-none:disabled{pointer-events:none!important}.disabled\\:\\!opacity-0:disabled{opacity:0!important}.bottom-4{bottom:1rem}.bottom-\\[88px\\]{bottom:88px}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.aspect-video{aspect-ratio:16/9}.h-\\[100dvh\\]{height:100dvh}.h-\\[60px\\]{height:60px}.min-h-full{min-height:100%}.w-\\[100dvw\\]{width:100dvw}.w-\\[100px\\]{width:100px}.min-w-\\[140px\\]{min-width:140px}.min-w-full{min-width:100%}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.gap-2{gap:.5rem}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:.5rem}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.bg-black\\/30{background-color:rgba(0,0,0,.3)}.bg-black\\/55{background-color:rgba(0,0,0,.55)}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.object-cover{object-fit:cover}.object-center{object-position:center}.p-1{padding:.25rem}.p-\\[16px\\]{padding:16px}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-\\[1\\.3\\]{line-height:1.3}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.disabled\\:bg-white\\/75:disabled{background-color:hsla(0,0%,100%,.75)}@media (min-width:768px){.md\\:relative{position:relative}.md\\:h-auto{height:auto}.md\\:w-\\[600px\\]{width:600px}.md\\:\\!translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.md\\:overflow-hidden{overflow:hidden}.md\\:rounded-lg{border-radius:.5rem}.md\\:border-none{border-style:none}.md\\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.md\\:py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.md\\:text-\\[24px\\]{font-size:24px}.md\\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.md\\:\\!opacity-100{opacity:1!important}.md\\:transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.md\\:duration-300{transition-duration:.3s}.md\\:hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}}";

const FormTimePicker = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.minuteStep = 1;
        this.isOpen = false;
        this.selectedValue = '';
        this.openUpwards = false;
        this.handleOutsideClick = (event) => {
            if (!this.el.contains(event.target))
                this.isOpen = false;
        };
        this.handleKeyDown = (event) => {
            if (event.key === 'Escape' && this.isOpen)
                this.isOpen = false;
        };
        this.toggleDropdown = () => {
            if (this.isOpen) {
                this.isOpen = false;
                return;
            }
            this.adjustDropdownPosition();
        };
        this.selectHour = (hour) => {
            const currentMinute = this.getSelectedMinute();
            const minute = currentMinute >= 0 ? currentMinute : 0;
            this.selectedValue = this.formatTime(hour, minute);
        };
        this.selectMinute = (minute) => {
            const currentHour = this.getSelectedHour();
            const hour = currentHour >= 0 ? currentHour : 0;
            this.selectedValue = this.formatTime(hour, minute);
        };
    }
    async componentWillLoad() {
        this.form.subscribe(this.name, this);
        if (this.staticValue)
            this.defaultValue = this.staticValue;
        if (this.defaultValue)
            this.selectedValue = this.defaultValue;
    }
    async onStaticValueChange(newStaticValue) {
        if (newStaticValue)
            this.selectedValue = newStaticValue;
    }
    async componentDidLoad() {
        document.addEventListener('click', this.handleOutsideClick);
        document.addEventListener('keydown', this.handleKeyDown);
    }
    async disconnectedCallback() {
        this.form.unsubscribe(this.name);
        document.removeEventListener('click', this.handleOutsideClick);
        document.removeEventListener('keydown', this.handleKeyDown);
    }
    reset(newValue) {
        this.selectedValue = newValue || this.defaultValue || '';
    }
    adjustDropdownPosition() {
        requestAnimationFrame(() => {
            const input = this.el.querySelector('.form-input-style');
            if (!input)
                return;
            const rect = input.getBoundingClientRect();
            const spaceBelow = window.innerHeight - rect.bottom - 20;
            this.openUpwards = spaceBelow < 220;
            setTimeout(() => {
                this.isOpen = true;
                this.scrollToSelected();
            }, 10);
        });
    }
    scrollToSelected() {
        requestAnimationFrame(() => {
            const hourCol = this.el.querySelector('.form-time-picker-hours');
            const minuteCol = this.el.querySelector('.form-time-picker-minutes');
            const scrollTo = (container) => {
                const selected = container === null || container === void 0 ? void 0 : container.querySelector('.selected');
                if (selected)
                    selected.scrollIntoView({ block: 'center' });
            };
            scrollTo(hourCol);
            scrollTo(minuteCol);
        });
    }
    toTimeMinutes(time) {
        const [h, m] = time.split(':').map(Number);
        return h * 60 + m;
    }
    isHourDisabled(hour) {
        const step = this.minuteStep || 1;
        for (let m = 0; m < 60; m += step) {
            if (!this.isMinuteDisabled(hour, m))
                return false;
        }
        return true;
    }
    isMinuteDisabled(hour, minute) {
        const time = hour * 60 + minute;
        if (this.minTime && time < this.toTimeMinutes(this.minTime))
            return true;
        if (this.maxTime && time > this.toTimeMinutes(this.maxTime))
            return true;
        return false;
    }
    getSelectedHour() {
        if (!this.selectedValue)
            return -1;
        return parseInt(this.selectedValue.split(':')[0], 10);
    }
    getSelectedMinute() {
        if (!this.selectedValue)
            return -1;
        return parseInt(this.selectedValue.split(':')[1], 10);
    }
    formatTime(hour, minute) {
        return `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;
    }
    render() {
        const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
        const [locale] = this.form.getFormLocale();
        const label = getNestedValue.getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.label) || (meta === null || meta === void 0 ? void 0 : meta.label);
        const placeholder = getNestedValue.getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.placeholder);
        const isDisabled = disabled || this.isLoading || !!this.staticValue || this.isDisabled;
        const selectedHour = this.getSelectedHour();
        const selectedMinute = this.getSelectedMinute();
        const step = this.minuteStep || 1;
        const hours = Array.from({ length: 24 }, (_, i) => i);
        const minutes = Array.from({ length: Math.ceil(60 / step) }, (_, i) => i * step);
        return (index.h(index.Host, { key: '6b3a4ea826ea0c84e04eed20a704e5c0e813337e', translate: "no" }, index.h("label", { key: '67478c3f4a8850b2f158c0f770f053c50133709e', part: this.name, id: this.wrapperId, class: cn.cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, index.h(formInputLabel.FormInputLabel, { key: 'c2a3741a553e7118fe8e5fb9a30481548cc8045b', isRequired: isRequired, label: label }), index.h("form-shadow-input", { key: '5f1240804457073623742b5ae2893bfd536da938', name: this.name, form: this.form, value: this.selectedValue }), index.h("div", { key: '810e033f8d55d629d5db213a75768ebd2e4ba140', part: `${this.name}-container form-input-container`, class: cn.cn('form-input-container', { open: this.isOpen }) }, index.h("input", { key: 'b6bb8e7ddb91bbb18a28b32567e91efebd91f811', type: "text", readOnly: true, disabled: isDisabled, value: this.selectedValue, onClick: this.toggleDropdown, part: `${this.name}-input form-input`, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), class: cn.cn('form-input-style form-input-select', {
                'form-input-error-style': isError,
            }) }), index.h("span", { key: 'eda7df336d3c2b60bea46e8671c0fd14a437d68a', part: `${this.name}-icon form-time-picker-icon`, class: "form-input-icon form-input-icon-end" }, index.h("svg", { key: '873d52be7e89d0d2ef944eff7c210784fded869e', "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "size-full" }, index.h("circle", { key: '68a33fbc9d8288752fb7b696c4d6ffb56e1153d3', cx: "12", cy: "12", r: "10" }), index.h("polyline", { key: 'f691539787b34df56c11f0b743fd30dcee957686', points: "12 6 12 12 16 14" }))), index.h("div", { key: 'f9f396e03a42d43b6f2548342108b2b8530f2518', part: `${this.name}-dropdown form-time-picker-dropdown`, class: cn.cn('form-picker-dropdown', {
                upwards: this.openUpwards,
                downwards: !this.openUpwards,
            }) }, index.h("div", { key: '86ea6167273f4fed989bf5972831e21166728034', class: "form-time-picker-columns" }, index.h("div", { key: '7e14aa8e8c971986a11ed3013bff82e5d9523e35', class: "form-time-picker-column form-time-picker-hours" }, index.h("div", { key: '5d6e8fbb8f0a33f4a6b5b78c8deb9c3274d74886', class: "form-time-picker-column-header" }, "HH"), hours.map(hour => {
            const hourDisabled = this.isHourDisabled(hour);
            return (index.h("button", { type: "button", disabled: hourDisabled, onClick: () => this.selectHour(hour), part: cn.cn('form-time-picker-option', { 'form-time-picker-option-selected': hour === selectedHour }), class: cn.cn('form-time-picker-option', {
                    selected: hour === selectedHour,
                }) }, String(hour).padStart(2, '0')));
        })), index.h("div", { key: 'f99b2fcad347ba0c9ecc160d9f0bbd92f4d55e2c', class: "form-time-picker-column form-time-picker-minutes" }, index.h("div", { key: '74f10fe998a94e1c78cb9a53eed1fdcff525acdf', class: "form-time-picker-column-header" }, "MM"), minutes.map(minute => {
            const minuteDisabled = selectedHour >= 0 ? this.isMinuteDisabled(selectedHour, minute) : false;
            return (index.h("button", { type: "button", disabled: minuteDisabled, onClick: () => this.selectMinute(minute), part: cn.cn('form-time-picker-option', { 'form-time-picker-option-selected': minute === selectedMinute }), class: cn.cn('form-time-picker-option', {
                    selected: minute === selectedMinute,
                }) }, String(minute).padStart(2, '0')));
        }))))), index.h(formErrorMessage.FormErrorMessage, { key: 'f0ef64a81ca5bae6f994dda778c2afbe6b3d19ea', name: this.name, isError: isError, errorMessage: locale[errorMessage] || errorMessage }))));
    }
    get el() { return index.getElement(this); }
    static get watchers() { return {
        "staticValue": ["onStaticValueChange"]
    }; }
};
FormTimePicker.style = formInputsCss;

exports.form_time_picker = FormTimePicker;
