import{o as w,c as O,a as _,A as Q,G as le,H as L,r as k,I as V,J as R,K,N as W,O as Te,P as Ee,Q as oe,R as pe,V as Ue,S as ye,F as q,W as se,X as ze,Y as fe,p as Re,w as z,Z as H,j as te,$ as N,i as J,y as De,a0 as Ne,E as ve,a1 as ge,L as Ae,M as ne,T as je,C as Be,_ as re,h as C,b as S,e as r,q as G,v as Z,f as M,t as E,k as T,d as ee,s as F,a2 as ae,a3 as Ve,a4 as he,m as ie,u as j,a5 as Fe,a6 as me,n as qe,l as X}from"./index.65dec0ff.js";import{a as He,r as ce}from"./PlusIcon.06bbd797.js";function Ge(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{"fill-rule":"evenodd",d:"M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z","clip-rule":"evenodd"}),_("path",{d:"M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z"})])}function Ke(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),_("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})])}function We(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})])}function _e(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{"fill-rule":"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z","clip-rule":"evenodd"})])}function $e(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{d:"M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z"})])}function Xe(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{"fill-rule":"evenodd",d:"M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z","clip-rule":"evenodd"})])}function Qe(e,o){return w(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[_("path",{"fill-rule":"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z","clip-rule":"evenodd"})])}var I=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(I||{});function Ye(e){throw new Error("Unexpected object: "+e)}var U=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(U||{});function Ze(e,o){let s=o.resolveItems();if(s.length<=0)return null;let t=o.resolveActiveIndex(),a=t!=null?t:-1,c=(()=>{switch(e.focus){case 0:return s.findIndex(l=>!o.resolveDisabled(l));case 1:{let l=s.slice().reverse().findIndex((h,f,b)=>a!==-1&&b.length-f-1>=a?!1:!o.resolveDisabled(h));return l===-1?l:s.length-1-l}case 2:return s.findIndex((l,h)=>h<=a?!1:!o.resolveDisabled(l));case 3:{let l=s.slice().reverse().findIndex(h=>!o.resolveDisabled(h));return l===-1?l:s.length-1-l}case 4:return s.findIndex(l=>o.resolveId(l)===e.id);case 5:return null;default:Ye(e)}})();return c===-1?t:c}function we(e,o){if(e)return e;let s=o!=null?o:"button";if(typeof s=="string"&&s.toLowerCase()==="button")return"button"}function Je(e,o){let s=k(we(e.value.type,e.value.as));return Q(()=>{s.value=we(e.value.type,e.value.as)}),le(()=>{var t;s.value||!L(o)||L(o)instanceof HTMLButtonElement&&!((t=L(o))!=null&&t.hasAttribute("type"))&&(s.value="button")}),s}function et(e){if(typeof window=="undefined")return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let o=L(e);if(o)return o.ownerDocument}return document}let be=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var tt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(tt||{}),st=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(st||{}),at=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(at||{}),ue=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ue||{});function ke(e,o=0){var s;return e===((s=et(e))==null?void 0:s.body)?!1:V(o,{[0](){return e.matches(be)},[1](){let t=e;for(;t!==null;){if(t.matches(be))return!0;t=t.parentElement}return!1}})}function ot(e,o=s=>s){return e.slice().sort((s,t)=>{let a=o(s),c=o(t);if(a===null||c===null)return 0;let l=a.compareDocumentPosition(c);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function xe(e,o,s){typeof window!="undefined"&&le(t=>{window.addEventListener(e,o,s),t(()=>window.removeEventListener(e,o,s))})}function lt(e,o,s=R(()=>!0)){function t(a,c){if(!s.value||a.defaultPrevented)return;let l=c(a);if(l===null||!l.ownerDocument.documentElement.contains(l))return;let h=function f(b){return typeof b=="function"?f(b()):Array.isArray(b)||b instanceof Set?b:[b]}(e);for(let f of h){if(f===null)continue;let b=f instanceof HTMLElement?f:L(f);if(b!=null&&b.contains(l))return}return!ke(l,ue.Loose)&&l.tabIndex!==-1&&a.preventDefault(),o(a,l)}xe("click",a=>t(a,c=>c.target),!0),xe("blur",a=>t(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var Pe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Pe||{});let nt=K({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:o,attrs:s}){return()=>{let{features:t,...a}=e,c={"aria-hidden":(t&2)===2?!0:void 0,style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return W({props:{...a,...c},slot:{},attrs:s,slots:o,name:"Hidden"})}}});function Se(e={},o=null,s=[]){for(let[t,a]of Object.entries(e))Le(s,Ce(o,t),a);return s}function Ce(e,o){return e?e+"["+o+"]":o}function Le(e,o,s){if(Array.isArray(s))for(let[t,a]of s.entries())Le(e,Ce(o,t.toString()),a);else s instanceof Date?e.push([o,s.toISOString()]):typeof s=="boolean"?e.push([o,s?"1":"0"]):typeof s=="string"?e.push([o,s]):typeof s=="number"?e.push([o,`${s}`]):s==null?e.push([o,""]):Se(s,o,e)}var rt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rt||{}),it=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(it||{}),ct=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ct||{});function ut(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Ie=Symbol("ListboxContext");function Y(e){let o=te(Ie,null);if(o===null){let s=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Y),s}return o}let dt=K({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:o,attrs:s,emit:t}){let a=k(1),c=k(null),l=k(null),h=k(null),f=k([]),b=k(""),n=k(null),v=k(1);function d(x=g=>g){let g=n.value!==null?f.value[n.value]:null,u=ot(x(f.value.slice()),p=>L(p.dataRef.domRef)),i=g?u.indexOf(g):null;return i===-1&&(i=null),{options:u,activeOptionIndex:i}}let y=R(()=>e.modelValue),P=R(()=>e.multiple?1:0),m={listboxState:a,value:y,mode:P,compare(x,g){return x===g},orientation:R(()=>e.horizontal?"horizontal":"vertical"),labelRef:c,buttonRef:l,optionsRef:h,disabled:R(()=>e.disabled),options:f,searchQuery:b,activeOptionIndex:n,activationTrigger:v,closeListbox(){e.disabled||a.value!==1&&(a.value=1,n.value=null)},openListbox(){e.disabled||a.value!==0&&(a.value=0)},goToOption(x,g,u){if(e.disabled||a.value===1)return;let i=d(),p=Ze(x===U.Specific?{focus:U.Specific,id:g}:{focus:x},{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:A=>A.id,resolveDisabled:A=>A.dataRef.disabled});b.value="",n.value=p,v.value=u!=null?u:1,f.value=i.options},search(x){if(e.disabled||a.value===1)return;let g=b.value!==""?0:1;b.value+=x.toLowerCase();let u=(n.value!==null?f.value.slice(n.value+g).concat(f.value.slice(0,n.value+g)):f.value).find(p=>p.dataRef.textValue.startsWith(b.value)&&!p.dataRef.disabled),i=u?f.value.indexOf(u):-1;i===-1||i===n.value||(n.value=i,v.value=1)},clearSearch(){e.disabled||a.value!==1&&b.value!==""&&(b.value="")},registerOption(x,g){let u=d(i=>[...i,{id:x,dataRef:g}]);f.value=u.options,n.value=u.activeOptionIndex},unregisterOption(x){let g=d(u=>{let i=u.findIndex(p=>p.id===x);return i!==-1&&u.splice(i,1),u});f.value=g.options,n.value=g.activeOptionIndex,v.value=1},select(x){e.disabled||t("update:modelValue",V(P.value,{[0]:()=>x,[1]:()=>{let g=N(m.value.value).slice(),u=N(x),i=g.findIndex(p=>m.compare(u,N(p)));return i===-1?g.push(u):g.splice(i,1),g}}))}};return lt([l,h],(x,g)=>{var u;m.closeListbox(),ke(g,ue.Loose)||(x.preventDefault(),(u=L(l))==null||u.focus())},R(()=>a.value===0)),Te(Ie,m),Ee(R(()=>V(a.value,{[0]:oe.Open,[1]:oe.Closed}))),()=>{let{name:x,modelValue:g,disabled:u,...i}=e,p={open:a.value===0,disabled:u};return pe(q,[...x!=null&&g!=null?Se({[x]:g}).map(([A,$])=>pe(nt,Ue({features:Pe.Hidden,key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:A,value:$}))):[],W({props:{...s,...ye(i,["onUpdate:modelValue","horizontal","multiple","by"])},slot:p,slots:o,attrs:s,name:"Listbox"})])}}}),pt=K({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},setup(e,{attrs:o,slots:s}){let t=Y("ListboxLabel"),a=`headlessui-listbox-label-${se()}`;function c(){var l;(l=L(t.buttonRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:t.listboxState.value===0,disabled:t.disabled.value},h={id:a,ref:t.labelRef,onClick:c};return W({props:{...e,...h},slot:l,attrs:o,slots:s,name:"ListboxLabel"})}}}),ft=K({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},setup(e,{attrs:o,slots:s,expose:t}){let a=Y("ListboxButton"),c=`headlessui-listbox-button-${se()}`;t({el:a.buttonRef,$el:a.buttonRef});function l(n){switch(n.key){case I.Space:case I.Enter:case I.ArrowDown:n.preventDefault(),a.openListbox(),H(()=>{var v;(v=L(a.optionsRef))==null||v.focus({preventScroll:!0}),a.value.value||a.goToOption(U.First)});break;case I.ArrowUp:n.preventDefault(),a.openListbox(),H(()=>{var v;(v=L(a.optionsRef))==null||v.focus({preventScroll:!0}),a.value.value||a.goToOption(U.Last)});break}}function h(n){switch(n.key){case I.Space:n.preventDefault();break}}function f(n){a.disabled.value||(a.listboxState.value===0?(a.closeListbox(),H(()=>{var v;return(v=L(a.buttonRef))==null?void 0:v.focus({preventScroll:!0})})):(n.preventDefault(),a.openListbox(),ut(()=>{var v;return(v=L(a.optionsRef))==null?void 0:v.focus({preventScroll:!0})})))}let b=Je(R(()=>({as:e.as,type:o.type})),a.buttonRef);return()=>{var n,v;let d={open:a.listboxState.value===0,disabled:a.disabled.value},y={ref:a.buttonRef,id:c,type:b.value,"aria-haspopup":!0,"aria-controls":(n=L(a.optionsRef))==null?void 0:n.id,"aria-expanded":a.disabled.value?void 0:a.listboxState.value===0,"aria-labelledby":a.labelRef.value?[(v=L(a.labelRef))==null?void 0:v.id,c].join(" "):void 0,disabled:a.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:h,onClick:f};return W({props:{...e,...y},slot:d,attrs:o,slots:s,name:"ListboxButton"})}}}),vt=K({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},setup(e,{attrs:o,slots:s,expose:t}){let a=Y("ListboxOptions"),c=`headlessui-listbox-options-${se()}`,l=k(null);t({el:a.optionsRef,$el:a.optionsRef});function h(n){switch(l.value&&clearTimeout(l.value),n.key){case I.Space:if(a.searchQuery.value!=="")return n.preventDefault(),n.stopPropagation(),a.search(n.key);case I.Enter:if(n.preventDefault(),n.stopPropagation(),a.activeOptionIndex.value!==null){let v=a.options.value[a.activeOptionIndex.value];a.select(v.dataRef.value)}a.mode.value===0&&(a.closeListbox(),H(()=>{var v;return(v=L(a.buttonRef))==null?void 0:v.focus({preventScroll:!0})}));break;case V(a.orientation.value,{vertical:I.ArrowDown,horizontal:I.ArrowRight}):return n.preventDefault(),n.stopPropagation(),a.goToOption(U.Next);case V(a.orientation.value,{vertical:I.ArrowUp,horizontal:I.ArrowLeft}):return n.preventDefault(),n.stopPropagation(),a.goToOption(U.Previous);case I.Home:case I.PageUp:return n.preventDefault(),n.stopPropagation(),a.goToOption(U.First);case I.End:case I.PageDown:return n.preventDefault(),n.stopPropagation(),a.goToOption(U.Last);case I.Escape:n.preventDefault(),n.stopPropagation(),a.closeListbox(),H(()=>{var v;return(v=L(a.buttonRef))==null?void 0:v.focus({preventScroll:!0})});break;case I.Tab:n.preventDefault(),n.stopPropagation();break;default:n.key.length===1&&(a.search(n.key),l.value=setTimeout(()=>a.clearSearch(),350));break}}let f=ze(),b=R(()=>f!==null?f.value===oe.Open:a.listboxState.value===0);return()=>{var n,v,d,y;let P={open:a.listboxState.value===0},m={"aria-activedescendant":a.activeOptionIndex.value===null||(n=a.options.value[a.activeOptionIndex.value])==null?void 0:n.id,"aria-multiselectable":a.mode.value===1?!0:void 0,"aria-labelledby":(y=(v=L(a.labelRef))==null?void 0:v.id)!=null?y:(d=L(a.buttonRef))==null?void 0:d.id,"aria-orientation":a.orientation.value,id:c,onKeydown:h,role:"listbox",tabIndex:0,ref:a.optionsRef};return W({props:{...e,...m},slot:P,attrs:o,slots:s,features:fe.RenderStrategy|fe.Static,visible:b.value,name:"ListboxOptions"})}}}),ht=K({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1}},setup(e,{slots:o,attrs:s,expose:t}){let a=Y("ListboxOption"),c=`headlessui-listbox-option-${se()}`,l=k(null);t({el:l,$el:l});let h=R(()=>a.activeOptionIndex.value!==null?a.options.value[a.activeOptionIndex.value].id===c:!1),f=R(()=>V(a.mode.value,{[0]:()=>a.compare(N(a.value.value),N(e.value)),[1]:()=>N(a.value.value).some(m=>a.compare(N(m),N(e.value)))})),b=R(()=>V(a.mode.value,{[1]:()=>{var m;let x=N(a.value.value);return((m=a.options.value.find(g=>x.some(u=>a.compare(N(u),N(g.dataRef.value)))))==null?void 0:m.id)===c},[0]:()=>f.value})),n=R(()=>({disabled:e.disabled,value:e.value,textValue:"",domRef:l}));Q(()=>{var m,x;let g=(x=(m=L(l))==null?void 0:m.textContent)==null?void 0:x.toLowerCase().trim();g!==void 0&&(n.value.textValue=g)}),Q(()=>a.registerOption(c,n)),Re(()=>a.unregisterOption(c)),Q(()=>{z([a.listboxState,f],()=>{a.listboxState.value===0&&(!f.value||V(a.mode.value,{[1]:()=>{b.value&&a.goToOption(U.Specific,c)},[0]:()=>{a.goToOption(U.Specific,c)}}))},{immediate:!0})}),le(()=>{a.listboxState.value===0&&(!h.value||a.activationTrigger.value!==0&&H(()=>{var m,x;return(x=(m=L(l))==null?void 0:m.scrollIntoView)==null?void 0:x.call(m,{block:"nearest"})}))});function v(m){if(e.disabled)return m.preventDefault();a.select(e.value),a.mode.value===0&&(a.closeListbox(),H(()=>{var x;return(x=L(a.buttonRef))==null?void 0:x.focus({preventScroll:!0})}))}function d(){if(e.disabled)return a.goToOption(U.Nothing);a.goToOption(U.Specific,c)}function y(){e.disabled||h.value||a.goToOption(U.Specific,c,0)}function P(){e.disabled||!h.value||a.goToOption(U.Nothing)}return()=>{let{disabled:m}=e,x={active:h.value,selected:f.value,disabled:m},g={id:c,ref:l,role:"option",tabIndex:m===!0?void 0:-1,"aria-disabled":m===!0?!0:void 0,"aria-selected":f.value===!0?f.value:void 0,disabled:void 0,onClick:v,onFocus:d,onPointermove:y,onMousemove:y,onPointerleave:P,onMouseleave:P};return W({props:{...ye(e,["value","disabled"]),...g},slot:x,attrs:s,slots:o,name:"ListboxOption"})}}});const mt={props:{user:Object,hooks:{type:Object,required:!1,default:{}},createNew:{type:Boolean,required:!1,default:!1}},setup(e,{emit:o}){const s=J({...e.user}),t=k(!1),a=k(!0),c=J({}),l=te(De),h=te(Ne);let f=[];const b=k([]),n=k(""),v=k(!1),d=J({...ve(""),isCustom:!0}),y=()=>{Object.assign(s,e.user),o("cancel")},P=()=>{typeof e.hooks.preApply=="function"&&e.hooks.preApply(s),o("applyChanges",s)},m=i=>{!i||(s.groups=[i,...s.groups],s.groups.sort())},x=i=>{s.groups=s.groups.filter(p=>p!==i)},g=async()=>{var p,A,$,de;let i=!0;if(c.home=c.user=c.shell="",s.home&&!/^\//.test(s.home)&&(c.home="Home path must be absolute.",i=!1),!s.user)c.user=((p=c.user)!=null?p:"")+`Username required. `,i=!1;else if(!/^[a-z_][a-z0-9_-]*[\$a-z0-9_-]?$/.test(s.user)){const D=[...(A=s.user.match(/^[^a-z_]|[^a-z0-9_-](?=.+)|[^\$a-z0-9_-]$/g))!=null?A:[]];c.user=(($=c.user)!=null?$:"")+`Invalid character${D.length>1?"s":""}: `+D.filter((B,Oe,Me)=>Me.indexOf(B)===Oe).map(B=>`'${B}'`).join(", ")+` `,i=!1}if(s.user.length>32&&(c.user=((de=c.user)!=null?de:"")+`Username too long. `,i=!1),s.shell===d)try{await j(["stat",s.shell.path],{superuser:"try"}).promise();try{let D=["test","-x",s.shell.path];e.createNew||(D=["sudo","-u",s.user,...D]),await j(D,{superuser:"try"}).promise();try{await j(["test","-d",s.shell.path],{superuser:"try"}).promise(),c.shell=`${s.shell.path} is a directory.`,i=!1}catch{}}catch{c.shell=`${s.shell.path} cannot be executed${e.createNew?"":` by ${s.user}`}.`,i=!1}}catch{c.shell=`${s.shell.path} does not exist. (stat failed)`,i=!1}if(typeof e.hooks.validateInputs=="function"){const D=await e.hooks.validateInputs(s);Object.keys(D).filter(B=>Object.keys(c).includes(B)).map(B=>c[B]=D[B]),D.errors===!0&&(i=!1)}a.value=i},u=async()=>{let i=!1;for(let p of Object.keys(e.user))Array.isArray(s[p])?s[p].sort().join(",")!==e.user[p].sort().join(",")&&(i=!0):(s[p].isShellObj&&s[p].path!==e.user[p].path||!s[p].isShellObj&&s[p]!==e.user[p])&&(i=!0);await g(),t.value=i};return Q(()=>{z(h,()=>{f=h.value.map(i=>i.group),b.value=f.filter(i=>{var p;return!((p=s.groups)!=null&&p.includes(i))})},{immediate:!0}),z(s,u),z(()=>s.groups,()=>{b.value=f.filter(i=>{var p;return!((p=s.groups)!=null&&p.includes(i))}).sort()}),z(()=>e.user,()=>{Object.assign(s,e.user),l.value.includes(s.shell)||(Object.assign(d,s.shell),s.shell=d),u()},{deep:!0,immediate:!0}),z(n,i=>{m(i),n.value=""}),z(h,()=>{f=h.value.map(i=>i.group)},{immediate:!0}),z(()=>d.path,()=>Object.assign(d,ve(d.path))),typeof e.hooks.onInput=="function"&&z(()=>({...s}),(i,p)=>e.hooks.onInput(s,p))}),{groupsRef:h,tmpUser:s,changesMade:t,inputsValid:a,feedback:c,shells:l,nonMemberGroups:b,showCustomShellModal:v,customShell:d,addGroupSelectorValue:n,cancel:y,apply:P,addGroup:m,removeGroup:x}},components:{Listbox:dt,ListboxButton:ft,ListboxLabel:pt,ListboxOption:ht,ListboxOptions:vt,CheckIcon:ge,SelectorIcon:Qe,LoadingSpinner:Ae,PlusIcon:He,MinusIcon:Xe,ExclamationCircleIcon:ce,ModalPopup:ne,Table:je,FixedMenu:Be},emits:["applyChanges","cancel"]},wt={class:"card-body space-y-content overflow-visible"},bt={key:0},xt=r("label",{class:"block text-label"},"Username",-1),yt={key:0,class:"feedback-group"},gt=["innerHTML"],_t=r("label",{class:"block text-label"},"Full Name/Description",-1),kt=r("label",{class:"block text-label"},"Home Directory",-1),Pt={key:0,class:"feedback-group"},St={class:"text-feedback text-error"},Ct=ie("Login Shell"),Lt={class:"relative overflow-visible"},It={class:"w-full inline-flex truncate"},Ot={class:"truncate"},Mt={class:"ml-2 truncate text-muted"},Tt={class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},Et={class:"flex"},Ut={class:"flex items-baseline space-x-2"},zt={key:2,class:"feedback-group"},Rt=["innerHTML"],Dt={class:"flex flex-row justify-between items-center relative"},Nt=r("div",null,"Groups",-1),At=r("div",{class:"block w-40"},null,-1),jt=["onClick","title"],Bt={scope:"col",class:"sr-only"},Vt=r("th",{scope:"col",class:"sr-only"},"Remove",-1),Ft={key:0,class:"text-muted"},qt={class:"flex flex-row justify-end"},Ht=["onClick"],Gt={class:"card-footer"},Kt={class:"button-group-row"},Wt=r("div",{class:"grow"},null,-1),$t=["disabled","title"];function Xt(e,o,s,t,a,c){const l=C("ExclamationCircleIcon"),h=C("ListboxLabel"),f=C("SelectorIcon"),b=C("ListboxButton"),n=C("CheckIcon"),v=C("ListboxOption"),d=C("ListboxOptions"),y=C("Listbox"),P=C("PlusIcon"),m=C("FixedMenu"),x=C("MinusIcon"),g=C("Table");return w(),S(q,null,[r("div",wt,[s.createNew?(w(),S("div",bt,[xt,G(r("input",{type:"text",class:"w-full input-textlike",placeholder:"Valid format: [a-z_][a-z0-9_-]*[$a-z0-9_-]","onUpdate:modelValue":o[0]||(o[0]=u=>t.tmpUser.user=u)},null,512),[[Z,t.tmpUser.user]]),t.feedback.user?(w(),S("div",yt,[_(l,{class:"size-icon icon-error"}),r("span",{innerHTML:t.feedback.user,class:"text-feedback text-error"},null,8,gt)])):M("",!0)])):M("",!0),r("div",null,[_t,G(r("input",{type:"text",class:"w-full input-textlike",placeholder:"Full Name","onUpdate:modelValue":o[1]||(o[1]=u=>t.tmpUser.name=u)},null,512),[[Z,t.tmpUser.name]])]),r("div",null,[kt,G(r("input",{type:"text",class:"w-full input-textlike",placeholder:"Path to Working Directory at login","onUpdate:modelValue":o[2]||(o[2]=u=>t.tmpUser.home=u)},null,512),[[Z,t.tmpUser.home]]),t.feedback.home?(w(),S("div",Pt,[_(l,{class:"size-icon icon-error"}),r("span",St,E(t.feedback.home),1)])):M("",!0)]),t.tmpUser.shell?(w(),O(y,{key:1,as:"div",modelValue:t.tmpUser.shell,"onUpdate:modelValue":o[8]||(o[8]=u=>t.tmpUser.shell=u),class:"overflow-visible"},{default:T(()=>[_(h,{class:"block text-label"},{default:T(()=>[Ct]),_:1}),r("div",Lt,[_(b,{class:"relative w-full border pl-3 pr-10 py-2 input-textlike"},{default:T(()=>[r("span",It,[r("span",Ot,E(t.tmpUser.shell.name),1),r("span",Mt,E(t.tmpUser.shell.path),1)]),r("span",Tt,[_(f,{class:"size-icon icon-default","aria-hidden":"true"})])]),_:1}),_(Ve,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:T(()=>[_(d,{class:"absolute z-10 mt-1 w-full bg-accent shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"},{default:T(()=>[(w(!0),S(q,null,ee(t.shells,u=>(w(),O(v,{as:"template",key:u.path,value:u},{default:T(({active:i,selected:p})=>[r("li",{class:F([i?"text-white bg-red-600":"","cursor-default select-none relative py-2 pl-3 pr-9"])},[r("div",Et,[r("span",{class:F([p?"font-semibold":"font-normal","truncate"])},E(u.name),3),r("span",{class:F([i?"text-red-200":"text-gray-500","ml-2 truncate"])},E(u.path),3)]),p?(w(),S("span",{key:0,class:F([i?"text-white":"text-red-600","absolute inset-y-0 right-0 flex items-center pr-4"])},[_(n,{class:"h-5 w-5","aria-hidden":"true"})],2)):M("",!0)],2)]),_:2},1032,["value"]))),128)),_(v,{as:"template",value:t.customShell},{default:T(({active:u,selected:i})=>[r("li",{class:F([u?"bg-red-600":"","cursor-default select-none relative py-2 pl-3 pr-9"])},[r("div",Ut,[r("span",{class:F([i?"font-semibold":"font-normal","truncate",u?"text-white":""])},"Custom Shell",2),G(r("input",{onClick:o[3]||(o[3]=ae(()=>{},["stop"])),onKeydown:o[4]||(o[4]=ae(p=>{p.code==="Enter"&&e.$emit("keydown",p)},["stop"])),onKeypress:o[5]||(o[5]=ae(p=>{p.code==="Enter"&&e.$emit("keypress",p)},["stop"])),onChange:o[6]||(o[6]=p=>t.tmpUser.shell=t.customShell),"onUpdate:modelValue":o[7]||(o[7]=p=>t.customShell.path=p),type:"text",placeholder:"/path/to/custom/shell",class:"input-textlike"},null,544),[[Z,t.customShell.path,void 0,{lazy:!0}]])]),i?(w(),S("span",{key:0,class:F([u?"text-white":"text-red-600","absolute inset-y-0 right-0 flex items-center pr-4"])},[_(n,{class:"h-5 w-5","aria-hidden":"true"})],2)):M("",!0)],2)]),_:1},8,["value"])]),_:1})]),_:1})])]),_:1},8,["modelValue"])):M("",!0),t.feedback.shell?(w(),S("div",zt,[_(l,{class:"size-icon icon-error"}),r("span",{innerHTML:t.feedback.shell,class:"text-feedback text-error"},null,8,Rt)])):M("",!0),_(g,{class:"rounded-lg",emptyText:"No groups. Click '+' to add one."},{header:T(()=>[r("div",Dt,[Nt,_(m,{extraMenuClasses:"max-w-lg max-h-56 overflow-y-auto",hideOnClick:""},{buttonContent:T(()=>[_(P,{class:"size-icon icon-default"})]),default:T(()=>[At,(w(!0),S(q,null,ee(t.nonMemberGroups,u=>(w(),S("div",{onClick:i=>t.addGroupSelectorValue=u,title:u,class:"hover:text-white hover:bg-red-600 px-4 py-2 text-sm"},E(u),9,jt))),256))]),_:1})])]),thead:T(()=>[r("tr",null,[r("th",Bt,E(t.tmpUser.name===""?t.tmpUser.user:t.tmpUser.name)+"'s Groups ",1),Vt])]),tbody:T(()=>{var u,i;return[he(e.$slots,"primaryGroup",{primaryGroup:(i=(u=t.tmpUser)==null?void 0:u.primaryGroup)!=null?i:""}),(w(!0),S(q,null,ee(t.tmpUser.groups,(p,A)=>(w(),S("tr",null,[r("td",null,[ie(E(p)+" ",1),p===t.tmpUser.primaryGroup?(w(),S("span",Ft,"(primary group)")):M("",!0)]),r("td",qt,[p!==t.tmpUser.primaryGroup?(w(),S("button",{key:0,onClick:$=>t.removeGroup(p)},[_(x,{class:"icon-danger size-icon"})],8,Ht)):M("",!0)])]))),256))]}),_:3})]),r("div",Gt,[r("div",Kt,[he(e.$slots,"default"),Wt,t.changesMade?(w(),S("button",{key:0,class:"btn btn-secondary justify-self-end",onClick:o[9]||(o[9]=u=>t.cancel())},"Cancel")):M("",!0),r("button",{class:"btn btn-primary justify-self-end",disabled:!(t.changesMade&&t.inputsValid),title:t.changesMade?t.inputsValid?"":"Cannot continue with errors.":"No changes to apply.",onClick:o[10]||(o[10]=u=>t.apply())},"Apply",8,$t)])])],64)}var Ds=re(mt,[["render",Xt]]);const Qt={props:{requirements:{type:Array,required:!1,default:[{title:"one lowercase letter",satisfied:!1,check:/[a-z]/},{title:"one uppercase letter",satisfied:!1,check:/[A-Z]/},{title:"one number",satisfied:!1,check:/[0-9]/},{title:"one special character",satisfied:!1,check:/\W/},{title:"8 characters long",satisfied:!1,check:/^.{8,}$/}]},extraRequirements:{type:Array,required:!1,default:[]},requireDifferentFromUser:Boolean,warnCancel:{type:Boolean,required:!1,default:!1},allowEmpty:{type:Boolean,required:!1,default:!1},headerText:{type:String,required:!1,default:"Set password"},applyText:{type:String,required:!1,default:"Apply"},cancelText:{type:String,required:!1,default:"Cancel"},user:{type:String,required:!1,default:null},showModal:Boolean},setup(e,{emit:o}){const s=k(""),t=k(""),a=k([...e.requirements,...e.extraRequirements].map(m=>(m.satisfied=!1,m))),c=k(!1),l=k(!1),h=k(""),f=k(""),b=k(!0),n=()=>{c.value?o("apply",s.value):(h.value="Password does not satisfy all strength requirements. Click apply again to proceed anyway.",v.value=()=>{o("apply",s.value),setTimeout(P,300)})},v=k(n),d=()=>{var m;e.warnCancel?(h.value=`Warning: ${(m=e.user)!=null?m:"user"} will have no password. Click "${e.cancelText}" again to proceed anyway.`,y.value=()=>{o("cancel"),setTimeout(P,300)}):o("cancel")},y=k(d),P=()=>{v.value=n,y.value=d,h.value=""};if(e.requireDifferentFromUser&&e.user){const m={title:"different from user name",satisfied:!1,check:new RegExp(`^(?!${e.user}$).*$`)};a.value.push(m),z(()=>e.user,()=>{m.check=new RegExp(`^(?!${e.user}$).*$`)})}return z([()=>s.value,()=>t.value],()=>{l.value=!1,s.value!==t.value?h.value="Passwords do not match.":!e.allowEmpty&&(!s.value||!t.value)?h.value="Password required.":(h.value="",l.value=!0),c.value=!a.value.map(m=>m.satisfied=m.check.test(s.value)).includes(!1),f.value="",e.allowEmpty&&(!s.value||!t.value)&&(f.value="Password is empty.",c.value=!1),v.value=n,y.value=d},{immediate:!0}),z(()=>e.showModal,()=>{e.showModal&&(s.value=t.value="")}),{password1:s,password2:t,allRequirements:a,allRequirementsSatisfied:c,passwordValid:l,feedback:h,warning:f,hidden:b,applyCallback:v,cancelCallback:y}},components:{ModalPopup:ne,ExclamationCircleIcon:ce,CheckIcon:ge,XIcon:Fe,EyeIcon:Ke,EyeOffIcon:Ge,LockClosedIcon:_e},emits:["apply","cancel"]},Yt={class:"my-2 space-y-content"},Zt={class:"relative"},Jt={class:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},es=["type"],ts={class:"relative"},ss={class:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},as=["type"],os={key:0,class:"flex flex-col items-start"},ls=r("div",null,"The password should satisfy the following requirements:",-1),ns={class:"inline-flex flex-col items-stretch"},rs={class:"flex flex-row text-sm items-center"},is={class:"grow"},cs={key:1,class:"feedback-group"},us={class:"text-feedback text-warning"},ds={key:2,class:"feedback-group"},ps={class:"text-feedback text-error"};function fs(e,o,s,t,a,c){const l=C("LockClosedIcon"),h=C("EyeOffIcon"),f=C("EyeIcon"),b=C("CheckIcon"),n=C("XIcon"),v=C("ExclamationCircleIcon"),d=C("ModalPopup");return w(),O(d,{showModal:s.showModal,headerText:s.headerText,applyText:s.applyText,cancelText:s.cancelText,disableContinue:!t.passwordValid,onApply:t.applyCallback,onCancel:t.cancelCallback},{default:T(()=>[r("div",Yt,[r("div",Zt,[r("div",Jt,[_(l,{class:"size-icon icon-default","aria-hidden":"true"})]),G(r("input",{type:t.hidden?"password":"text",autocomplete:"new-password",class:"block w-full px-10 input-textlike",placeholder:"Type Password","onUpdate:modelValue":o[0]||(o[0]=y=>t.password1=y)},null,8,es),[[me,t.password1]]),r("div",{onClick:o[1]||(o[1]=y=>t.hidden=!t.hidden),class:"absolute inset-y-0 right-0 pr-3 flex items-center"},[t.hidden?(w(),O(h,{key:0,class:"size-icon icon-default","aria-hidden":"true"})):(w(),O(f,{key:1,class:"size-icon icon-default","aria-hidden":"true"}))])]),r("div",ts,[r("div",ss,[_(l,{class:"size-icon icon-default","aria-hidden":"true"})]),G(r("input",{type:t.hidden?"password":"text",autocomplete:"new-password",class:"block w-full px-10 input-textlike",placeholder:"Repeat Password","onUpdate:modelValue":o[2]||(o[2]=y=>t.password2=y)},null,8,as),[[me,t.password2]]),r("div",{onClick:o[3]||(o[3]=y=>t.hidden=!t.hidden),class:"absolute inset-y-0 right-0 pr-3 flex items-center"},[t.hidden?(w(),O(h,{key:0,class:"size-icon icon-default","aria-hidden":"true"})):(w(),O(f,{key:1,class:"size-icon icon-default","aria-hidden":"true"}))])]),t.allRequirements.length?(w(),S("div",os,[ls,r("div",ns,[(w(!0),S(q,null,ee(t.allRequirements,y=>(w(),S("div",rs,[r("span",is,E(y.title),1),y.satisfied?(w(),O(b,{key:0,class:"size-icon-sm ml-2 icon-success"})):(w(),O(n,{key:1,class:"size-icon-sm ml-2 icon-error"}))]))),256))])])):M("",!0),t.warning?(w(),S("div",cs,[_(v,{class:"size-icon icon-warning shrink-0"}),r("span",us,E(t.warning),1)])):M("",!0),t.feedback?(w(),S("div",ds,[_(v,{class:"size-icon icon-error shrink-0"}),r("span",ps,E(t.feedback),1)])):M("",!0)])]),_:1},8,["showModal","headerText","applyText","cancelText","disableContinue","onApply","onCancel"])}var vs=re(Qt,[["render",fs]]);const hs=async e=>{try{return await j(["bash","-c",`set -e; set -o pipefail; [[ -n "$(getent shadow ${e} | cut -d: -f2 | perl -pne 's/^!+//')" ]]`],{superuser:"require"}).promise(),!0}catch{return!1}},ms={props:{user:String,newUser:{type:Boolean,required:!1,default:!1},modalOnly:{type:Boolean,required:!1,default:!1}},setup(e,{emit:o}){const s=J({showModal:!1,applyCallback:()=>s.showModal=!1,cancelCallback:()=>s.showModal=!1,isSet:!1,isLocked:!1,expires:"never",isExpired:!1,expireDays:null}),t=k(!0),a=k(!1),c=k(!1),l=te(qe),h=async()=>{o("startProcessing");try{const d=(await j(["passwd","--status",e.user],{superuser:"try"}).promise()).stdout.trim().split(" ");switch(d[1]){case"P":case"PS":s.isSet=!0,s.isLocked=!1;break;case"NP":s.isSet=!1,s.isLocked=!1;break;case"L":case"LK":s.isSet=await hs(e.user),s.isLocked=!0;break;default:throw new Error(`Unknown field in passwd -S: ${d[1]}. Should be NP, P, PS, L, or LK.`)}s.expireDays=parseInt(d[4]);const P=(await j(["chage","-l",e.user],{superuser:"try"}).promise()).stdout.split(` `).find(m=>/^Password expires/.test(m)).split(":")[1].trim();s.isExpired=P==="password must be changed",s.expires=P.replace(/^(?!password must be changed)(?!never)(.*)$/,"Password expires on $1.").replace("password must be changed","Password is expired.").replace("never","Password never expires.")}catch(d){l.value.constructNotification("Failed to check password status",X(d),"error"),t.value=!1,s.isSet=!1}finally{o("stopProcessing")}},f=async()=>{const d=()=>new Promise((P,m)=>{s.applyCallback=x=>P(x),s.cancelCallback=()=>P(null),s.showModal=!0});let y=null;if(y=await d()){o("startProcessing");try{const P=j(["passwd",e.user],{superuser:"try"});P.proc.input(`${y} ${y} `),await P.promise(),l.value.constructNotification(`Set password for ${e.user}`,"Password was set successfully.","success"),await h()}catch(P){l.value.constructNotification("Error setting password",X(P),"error")}finally{o("stopProcessing")}}else s.isSet||l.value.constructNotification(`${e.user} has no password`,"Set the password in the user editor to be able to log in.","warning");s.showModal=!1},b=async()=>{o("startProcessing");try{await j(["passwd","-e",e.user],{superuser:"try"}).promise(),await h()}catch(d){l.value.constructNotification("Failed to expire password",X(d),"error")}finally{a.value=!1,o("stopProcessing")}},n=async()=>{const d=["passwd"];s.isLocked?d.push("-u"):d.push("-l"),d.push(e.user),o("startProcessing");try{await j(d,{superuser:"try"}).promise(),await h()}catch(y){l.value.constructNotification(`Failed to ${s.isLocked?"un":""}lock password`,X(y),"error")}finally{o("stopProcessing")}},v=async d=>{o("startProcessing"),console.log(d);try{const y=d?parseInt(d):-1;await j(["passwd","-x",`${y}`,e.user],{superuser:"try"}).promise()}catch(y){l.value.constructNotification("Failed to set password expiry",X(y),"error")}finally{o("stopProcessing"),await h()}};return z(()=>e.user,async()=>{await h()},{immediate:!e.newUser}),{userPassword:s,allowed:t,showExpirePasswordModal:a,showPasswordExpiryModal:c,setPassword:f,expirePassword:b,togglePasswordLock:n,updateExpiry:v}},components:{ModalPopup:ne,PasswordModal:vs,ExclamationCircleIcon:ce,LockClosedIcon:_e,LockOpenIcon:$e,InformationCircleIcon:We},emits:["startProcessing","stopProcessing"]},ws={key:0},bs=r("label",{class:"block text-label"},"User Login",-1),xs={class:"button-group-row-wrap"},ys={class:"flex flex-row items-center"},gs={class:"mr-2"},_s={key:0,class:"feedback-group"},ks={class:"text-feedback text-muted"},Ps={class:"flex flex-col gap-4 items-start"},Ss={class:"flex gap-1 items-baseline flex-wrap justify-start"},Cs=r("span",null,"Expire password every",-1),Ls=["value"],Is=r("span",null,"days",-1),Os=["disabled","title"],Ms={class:"feedback-group"},Ts={class:"text-feedback text-muted"},Es=ie(" They will need to set a new password at next login. ");function Us(e,o,s,t,a,c){const l=C("LockClosedIcon"),h=C("LockOpenIcon"),f=C("InformationCircleIcon"),b=C("ModalPopup"),n=C("ExclamationCircleIcon"),v=C("PasswordModal");return w(),S(q,null,[!s.modalOnly&&t.allowed?(w(),S("div",ws,[bs,r("div",xs,[r("button",{class:"btn btn-primary",onClick:o[0]||(o[0]=(...d)=>t.setPassword&&t.setPassword(...d))},E(t.userPassword.isSet?"Change":"Set")+" Account Password",1),r("button",{class:"btn btn-primary",onClick:o[1]||(o[1]=d=>t.togglePasswordLock())},[r("div",ys,[r("span",gs,E(t.userPassword.isLocked?"Unlock":"Lock")+" Account Password",1),t.userPassword.isLocked?(w(),O(l,{key:0,class:"size-icon"})):(w(),O(h,{key:1,class:"size-icon"}))])]),t.userPassword.isSet?(w(),S("button",{key:0,class:"btn btn-primary",onClick:o[2]||(o[2]=d=>t.showPasswordExpiryModal=!0)},"Edit Password Expiry")):M("",!0)]),t.userPassword.isSet?(w(),S("div",_s,[_(f,{class:"size-icon icon-default"}),r("div",ks,E(t.userPassword.expires),1)])):M("",!0),_(b,{showModal:t.showPasswordExpiryModal,onApply:o[5]||(o[5]=()=>t.showPasswordExpiryModal=!1),headerText:`Password expiry settings for ${s.user}`,applyText:"Done",noCancel:""},{default:T(()=>[r("div",Ps,[r("div",Ss,[Cs,r("input",{value:t.userPassword.expireDays==-1||t.userPassword.expireDays==99999?"":t.userPassword.expireDays,onChange:o[3]||(o[3]=d=>t.updateExpiry(d.target.value)),type:"number",placeholder:"\u221E",min:"0",max:"9999",class:"w-24 grow-0 input-textlike"},null,40,Ls),Is]),t.userPassword.isSet?(w(),S("button",{key:0,class:"btn btn-primary",onClick:o[4]||(o[4]=d=>t.showExpirePasswordModal=!0),disabled:t.userPassword.isExpired,title:t.userPassword.isExpired?"Password already expired.":"Force user to change password on next login."},"Force Expire Account Password",8,Os)):M("",!0),r("div",Ms,[_(f,{class:"size-icon icon-default"}),r("div",Ts,E(t.userPassword.expires),1)])])]),_:1},8,["showModal","headerText"]),_(b,{showModal:t.showExpirePasswordModal,onApply:t.expirePassword,onCancel:o[6]||(o[6]=()=>t.showExpirePasswordModal=!1),headerText:`Expire password for ${s.user}?`,applyDangerous:"",applyText:"Yes",cancelText:"No"},{icon:T(()=>[_(n,{class:"size-icon-xl icon-error"})]),default:T(()=>[Es]),_:1},8,["showModal","onApply","headerText"])])):M("",!0),_(v,{showModal:t.userPassword.showModal,user:s.user,headerText:`${t.userPassword.isSet?"Change":"Set"} login password for ${s.user}`,cancelText:t.userPassword.isSet?"Cancel":"No Password",warnCancel:!t.userPassword.isSet,onApply:t.userPassword.applyCallback,onCancel:t.userPassword.cancelCallback,requireDifferentFromUser:""},null,8,["showModal","user","headerText","cancelText","warnCancel","onApply","onCancel"])],64)}var Ns=re(ms,[["render",Us]]);export{vs as P,Ds as U,Ns as a,Xe as r};