var _r=Object.defineProperty;var Fr=(t,n,e)=>n in t?_r(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var h=(t,n,e)=>Fr(t,typeof n!="symbol"?n+"":n,e);import{B as le,H as u,ai as Rr,bH as Vr,z as En,c as bt,j as F,r as te,b3 as De,b8 as at,ar as V,as as K,av as se,au as Ye,at as An,ay as fe,ax as Je,bF as $n,w as lt,b as Be,aI as Xt,n as ut,D as zn,aC as dt,J as Yr,b2 as ke,aD as Hr,E as Sr,aL as Z,M as Br,ap as Un,an as Ln,aO as qn,aV as Wn,bN as Er,b0 as vt,b4 as ft,bM as dn,bR as Nt,t as _t,L as Ar,N as $r,aY as ct,bS as zr,bj as fn,C as Ur,A as Pe,aj as Lr,aG as mn,v as hn,bL as gn,a_ as qr,bT as Wr}from"./_plugin-vue_export-helper.js";import{m as k,o as Te,P as et,Q as jr,f as Qr,b as qt,R as Gr,n as Xr,B as Zr,V as Kr,h as Jr,i as ea,q as pn,r as ta,T as na,A as Wt,U as ra,X as aa,Y as oa}from"./main.js";import{e as jn,u as Zt}from"./use-locale.js";import{F as ia,A as sa}from"./Select.js";import{_ as Ze}from"./Input.js";import{a as la}from"./Scrollbar.js";import{g as ua}from"./get-slot.js";import{m as ca}from"./index.js";import{_ as Qn}from"./Avatar.js";import{_ as da}from"./Tag.js";const fa=le({name:"ArrowUp",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},u("g",{fill:"none"},u("path",{d:"M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z",fill:"currentColor"})))}}),Gn=le({name:"Remove",render(){return u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 32px;
      `}))}}),ma=Rr("time",u("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},u("path",{d:"M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z",style:`
        fill: none;
        stroke: currentColor;
        stroke-miterlimit: 10;
        stroke-width: 32px;
      `}),u("polyline",{points:"256 128 256 272 352 272",style:`
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 32px;
      `})));function $(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}function Ee(t,n){const e=k(t);return isNaN(n)?$(t,NaN):(n&&e.setDate(e.getDate()+n),e)}function Kt(t,n){const e=k(t);if(isNaN(n))return $(t,NaN);if(!n)return e;const r=e.getDate(),a=$(t,e.getTime());a.setMonth(e.getMonth()+n+1,0);const o=a.getDate();return r>=o?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}const Xn=6048e5,ha=864e5,ga=6e4,pa=36e5,ba=1e3;function Ae(t){return Te(t,{weekStartsOn:1})}function Zn(t){const n=k(t),e=n.getFullYear(),r=$(t,0);r.setFullYear(e+1,0,4),r.setHours(0,0,0,0);const a=Ae(r),o=$(t,0);o.setFullYear(e,0,4),o.setHours(0,0,0,0);const s=Ae(o);return n.getTime()>=a.getTime()?e+1:n.getTime()>=s.getTime()?e:e-1}function mt(t){const n=k(t);return n.setHours(0,0,0,0),n}function ht(t){const n=k(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function va(t,n){const e=mt(t),r=mt(n),a=+e-ht(e),o=+r-ht(r);return Math.round((a-o)/ha)}function wa(t){const n=Zn(t),e=$(t,0);return e.setFullYear(n,0,4),e.setHours(0,0,0,0),Ae(e)}function ya(t,n){const e=n*3;return Kt(t,e)}function xa(t,n){return Kt(t,n*12)}function Da(t,n){const e=mt(t),r=mt(n);return+e==+r}function ka(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Jt(t){if(!ka(t)&&typeof t!="number")return!1;const n=k(t);return!isNaN(Number(n))}function Ta(t){const n=k(t);return Math.trunc(n.getMonth()/3)+1}function Ma(t){const n=k(t);return n.setSeconds(0,0),n}function bn(t){const n=k(t),e=n.getMonth(),r=e-e%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function Ia(t){const n=k(t);return n.setDate(1),n.setHours(0,0,0,0),n}function wt(t){const n=k(t),e=$(t,0);return e.setFullYear(n.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Pa(t){const n=k(t);return va(n,wt(n))+1}function Kn(t){const n=k(t),e=+Ae(n)-+wa(n);return Math.round(e/Xn)+1}function en(t,n){var b,w,H,M;const e=k(t),r=e.getFullYear(),a=et(),o=(n==null?void 0:n.firstWeekContainsDate)??((w=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??a.firstWeekContainsDate??((M=(H=a.locale)==null?void 0:H.options)==null?void 0:M.firstWeekContainsDate)??1,s=$(t,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const l=Te(s,n),m=$(t,0);m.setFullYear(r,0,o),m.setHours(0,0,0,0);const g=Te(m,n);return e.getTime()>=l.getTime()?r+1:e.getTime()>=g.getTime()?r:r-1}function Ca(t,n){var l,m,g,b;const e=et(),r=(n==null?void 0:n.firstWeekContainsDate)??((m=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:m.firstWeekContainsDate)??e.firstWeekContainsDate??((b=(g=e.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,a=en(t,n),o=$(t,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Te(o,n)}function Jn(t,n){const e=k(t),r=+Te(e,n)-+Ca(e,n);return Math.round(r/Xn)+1}function E(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const xe={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return E(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):E(e+1,2)},d(t,n){return E(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,n){return E(t.getHours()%12||12,n.length)},H(t,n){return E(t.getHours(),n.length)},m(t,n){return E(t.getMinutes(),n.length)},s(t,n){return E(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return E(a,n.length)}},Ve={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vn={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return xe.y(t,n)},Y:function(t,n,e,r){const a=en(t,r),o=a>0?a:1-a;if(n==="YY"){const s=o%100;return E(s,2)}return n==="Yo"?e.ordinalNumber(o,{unit:"year"}):E(o,n.length)},R:function(t,n){const e=Zn(t);return E(e,n.length)},u:function(t,n){const e=t.getFullYear();return E(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return E(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return E(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return xe.M(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return E(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){const a=Jn(t,r);return n==="wo"?e.ordinalNumber(a,{unit:"week"}):E(a,n.length)},I:function(t,n,e){const r=Kn(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):E(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):xe.d(t,n)},D:function(t,n,e){const r=Pa(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):E(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return E(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return E(o,n.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return E(a,n.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){const a=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,n,e){const r=t.getHours();let a;switch(r===12?a=Ve.noon:r===0?a=Ve.midnight:a=r/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let a;switch(r>=17?a=Ve.evening:r>=12?a=Ve.afternoon:r>=4?a=Ve.morning:a=Ve.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return xe.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):xe.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):E(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):E(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):xe.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):xe.s(t,n)},S:function(t,n){return xe.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return yn(r);case"XXXX":case"XX":return Oe(r);case"XXXXX":case"XXX":default:return Oe(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return yn(r);case"xxxx":case"xx":return Oe(r);case"xxxxx":case"xxx":default:return Oe(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+wn(r,":");case"OOOO":default:return"GMT"+Oe(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+wn(r,":");case"zzzz":default:return"GMT"+Oe(r,":")}},t:function(t,n,e){const r=Math.trunc(t.getTime()/1e3);return E(r,n.length)},T:function(t,n,e){const r=t.getTime();return E(r,n.length)}};function wn(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),o=r%60;return o===0?e+String(a):e+String(a)+n+E(o,2)}function yn(t,n){return t%60===0?(t>0?"-":"+")+E(Math.abs(t)/60,2):Oe(t,n)}function Oe(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=E(Math.trunc(r/60),2),o=E(r%60,2);return e+a+n+o}const xn=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},er=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Oa=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return xn(t,n);let o;switch(r){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",xn(r,n)).replace("{{time}}",er(a,n))},jt={p:er,P:Oa},Na=/^D+$/,_a=/^Y+$/,Fa=["D","DD","YY","YYYY"];function tr(t){return Na.test(t)}function nr(t){return _a.test(t)}function Qt(t,n,e){const r=Ra(t,n,e);if(console.warn(r),Fa.includes(t))throw new RangeError(r)}function Ra(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Va=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ya=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ha=/^'([^]*?)'?$/,Sa=/''/g,Ba=/[a-zA-Z]/;function $e(t,n,e){var b,w,H,M,C,R,S,W;const r=et(),a=(e==null?void 0:e.locale)??r.locale??jn,o=(e==null?void 0:e.firstWeekContainsDate)??((w=(b=e==null?void 0:e.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??r.firstWeekContainsDate??((M=(H=r.locale)==null?void 0:H.options)==null?void 0:M.firstWeekContainsDate)??1,s=(e==null?void 0:e.weekStartsOn)??((R=(C=e==null?void 0:e.locale)==null?void 0:C.options)==null?void 0:R.weekStartsOn)??r.weekStartsOn??((W=(S=r.locale)==null?void 0:S.options)==null?void 0:W.weekStartsOn)??0,l=k(t);if(!Jt(l))throw new RangeError("Invalid time value");let m=n.match(Ya).map(T=>{const O=T[0];if(O==="p"||O==="P"){const p=jt[O];return p(T,a.formatLong)}return T}).join("").match(Va).map(T=>{if(T==="''")return{isToken:!1,value:"'"};const O=T[0];if(O==="'")return{isToken:!1,value:Ea(T)};if(vn[O])return{isToken:!0,value:T};if(O.match(Ba))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:T}});a.localize.preprocessor&&(m=a.localize.preprocessor(l,m));const g={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return m.map(T=>{if(!T.isToken)return T.value;const O=T.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&nr(O)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&tr(O))&&Qt(O,n,String(t));const p=vn[O[0]];return p(l,O,a.localize,g)}).join("")}function Ea(t){const n=t.match(Ha);return n?n[1].replace(Sa,"'"):t}function rr(t){return k(t).getDate()}function Aa(t){return k(t).getDay()}function $a(t){const n=k(t),e=n.getFullYear(),r=n.getMonth(),a=$(t,0);return a.setFullYear(e,r+1,0),a.setHours(0,0,0,0),a.getDate()}function ar(){return Object.assign({},et())}function He(t){return k(t).getHours()}function za(t){let e=k(t).getDay();return e===0&&(e=7),e}function Ua(t){return k(t).getMilliseconds()}function Dn(t){return k(t).getMinutes()}function Ke(t){return k(t).getMonth()}function kn(t){return k(t).getSeconds()}function A(t){return k(t).getTime()}function tt(t){return k(t).getFullYear()}function La(t,n){const e=n instanceof Date?$(n,0):new n(0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}const qa=10;class or{constructor(){h(this,"subPriority",0)}validate(n,e){return!0}}class Wa extends or{constructor(n,e,r,a,o){super(),this.value=n,this.validateValue=e,this.setValue=r,this.priority=a,o&&(this.subPriority=o)}validate(n,e){return this.validateValue(n,this.value,e)}set(n,e,r){return this.setValue(n,e,this.value,r)}}class ja extends or{constructor(){super(...arguments);h(this,"priority",qa);h(this,"subPriority",-1)}set(e,r){return r.timestampIsSet?e:$(e,La(e,Date))}}class Y{run(n,e,r,a){const o=this.parse(n,e,r,a);return o?{setter:new Wa(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(n,e,r){return!0}}class Qa extends Y{constructor(){super(...arguments);h(this,"priority",140);h(this,"incompatibleTokens",["R","u","t","T"])}parse(e,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}set(e,r,a){return r.era=a,e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}const G={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ce={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function X(t,n){return t&&{value:n(t.value),rest:t.rest}}function L(t,n){const e=n.match(t);return e?{value:parseInt(e[0],10),rest:n.slice(e[0].length)}:null}function de(t,n){const e=n.match(t);if(!e)return null;if(e[0]==="Z")return{value:0,rest:n.slice(1)};const r=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,o=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(a*pa+o*ga+s*ba),rest:n.slice(e[0].length)}}function ir(t){return L(G.anyDigitsSigned,t)}function q(t,n){switch(t){case 1:return L(G.singleDigit,n);case 2:return L(G.twoDigits,n);case 3:return L(G.threeDigits,n);case 4:return L(G.fourDigits,n);default:return L(new RegExp("^\\d{1,"+t+"}"),n)}}function gt(t,n){switch(t){case 1:return L(G.singleDigitSigned,n);case 2:return L(G.twoDigitsSigned,n);case 3:return L(G.threeDigitsSigned,n);case 4:return L(G.fourDigitsSigned,n);default:return L(new RegExp("^-?\\d{1,"+t+"}"),n)}}function tn(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function sr(t,n){const e=n>0,r=e?n:1-n;let a;if(r<=50)a=t||100;else{const o=r+50,s=Math.trunc(o/100)*100,l=t>=o%100;a=t+s-(l?100:0)}return e?a:1-a}function lr(t){return t%400===0||t%4===0&&t%100!==0}class Ga extends Y{constructor(){super(...arguments);h(this,"priority",130);h(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,r,a){const o=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return X(q(4,e),o);case"yo":return X(a.ordinalNumber(e,{unit:"year"}),o);default:return X(q(r.length,e),o)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a){const o=e.getFullYear();if(a.isTwoDigitYear){const l=sr(a.year,o);return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}const s=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}}class Xa extends Y{constructor(){super(...arguments);h(this,"priority",130);h(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,r,a){const o=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return X(q(4,e),o);case"Yo":return X(a.ordinalNumber(e,{unit:"year"}),o);default:return X(q(r.length,e),o)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a,o){const s=en(e,o);if(a.isTwoDigitYear){const m=sr(a.year,s);return e.setFullYear(m,0,o.firstWeekContainsDate),e.setHours(0,0,0,0),Te(e,o)}const l=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(l,0,o.firstWeekContainsDate),e.setHours(0,0,0,0),Te(e,o)}}class Za extends Y{constructor(){super(...arguments);h(this,"priority",130);h(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,r){return gt(r==="R"?4:r.length,e)}set(e,r,a){const o=$(e,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),Ae(o)}}class Ka extends Y{constructor(){super(...arguments);h(this,"priority",130);h(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,r){return gt(r==="u"?4:r.length,e)}set(e,r,a){return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}class Ja extends Y{constructor(){super(...arguments);h(this,"priority",120);h(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"Q":case"QQ":return q(r.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class eo extends Y{constructor(){super(...arguments);h(this,"priority",120);h(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"q":case"qq":return q(r.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class to extends Y{constructor(){super(...arguments);h(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);h(this,"priority",110)}parse(e,r,a){const o=s=>s-1;switch(r){case"M":return X(L(G.month,e),o);case"MM":return X(q(2,e),o);case"Mo":return X(a.ordinalNumber(e,{unit:"month"}),o);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}class no extends Y{constructor(){super(...arguments);h(this,"priority",110);h(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,r,a){const o=s=>s-1;switch(r){case"L":return X(L(G.month,e),o);case"LL":return X(q(2,e),o);case"Lo":return X(a.ordinalNumber(e,{unit:"month"}),o);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}function ro(t,n,e){const r=k(t),a=Jn(r,e)-n;return r.setDate(r.getDate()-a*7),r}class ao extends Y{constructor(){super(...arguments);h(this,"priority",100);h(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,r,a){switch(r){case"w":return L(G.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return q(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a,o){return Te(ro(e,a,o),o)}}function oo(t,n){const e=k(t),r=Kn(e)-n;return e.setDate(e.getDate()-r*7),e}class io extends Y{constructor(){super(...arguments);h(this,"priority",100);h(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,r,a){switch(r){case"I":return L(G.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return q(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a){return Ae(oo(e,a))}}const so=[31,28,31,30,31,30,31,31,30,31,30,31],lo=[31,29,31,30,31,30,31,31,30,31,30,31];class uo extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"subPriority",1);h(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"d":return L(G.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return q(r.length,e)}}validate(e,r){const a=e.getFullYear(),o=lr(a),s=e.getMonth();return o?r>=1&&r<=lo[s]:r>=1&&r<=so[s]}set(e,r,a){return e.setDate(a),e.setHours(0,0,0,0),e}}class co extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"subpriority",1);h(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,r,a){switch(r){case"D":case"DD":return L(G.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return q(r.length,e)}}validate(e,r){const a=e.getFullYear();return lr(a)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,a){return e.setMonth(0,a),e.setHours(0,0,0,0),e}}function nn(t,n,e){var w,H,M,C;const r=et(),a=(e==null?void 0:e.weekStartsOn)??((H=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:H.weekStartsOn)??r.weekStartsOn??((C=(M=r.locale)==null?void 0:M.options)==null?void 0:C.weekStartsOn)??0,o=k(t),s=o.getDay(),m=(n%7+7)%7,g=7-a,b=n<0||n>6?n-(s+g)%7:(m+g)%7-(s+g)%7;return Ee(o,b)}class fo extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,o){return e=nn(e,a,o),e.setHours(0,0,0,0),e}}class mo extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,r,a,o){const s=l=>{const m=Math.floor((l-1)/7)*7;return(l+o.weekStartsOn+6)%7+m};switch(r){case"e":case"ee":return X(q(r.length,e),s);case"eo":return X(a.ordinalNumber(e,{unit:"day"}),s);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,o){return e=nn(e,a,o),e.setHours(0,0,0,0),e}}class ho extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,r,a,o){const s=l=>{const m=Math.floor((l-1)/7)*7;return(l+o.weekStartsOn+6)%7+m};switch(r){case"c":case"cc":return X(q(r.length,e),s);case"co":return X(a.ordinalNumber(e,{unit:"day"}),s);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,o){return e=nn(e,a,o),e.setHours(0,0,0,0),e}}function go(t,n){const e=k(t),r=za(e),a=n-r;return Ee(e,a)}class po extends Y{constructor(){super(...arguments);h(this,"priority",90);h(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,r,a){const o=s=>s===0?7:s;switch(r){case"i":case"ii":return q(r.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return X(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),o);case"iiiii":return X(a.day(e,{width:"narrow",context:"formatting"}),o);case"iiiiii":return X(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),o);case"iiii":default:return X(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),o)}}validate(e,r){return r>=1&&r<=7}set(e,r,a){return e=go(e,a),e.setHours(0,0,0,0),e}}class bo extends Y{constructor(){super(...arguments);h(this,"priority",80);h(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(tn(a),0,0,0),e}}class vo extends Y{constructor(){super(...arguments);h(this,"priority",80);h(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(tn(a),0,0,0),e}}class wo extends Y{constructor(){super(...arguments);h(this,"priority",80);h(this,"incompatibleTokens",["a","b","t","T"])}parse(e,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(tn(a),0,0,0),e}}class yo extends Y{constructor(){super(...arguments);h(this,"priority",70);h(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,r,a){switch(r){case"h":return L(G.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return q(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,a){const o=e.getHours()>=12;return o&&a<12?e.setHours(a+12,0,0,0):!o&&a===12?e.setHours(0,0,0,0):e.setHours(a,0,0,0),e}}class xo extends Y{constructor(){super(...arguments);h(this,"priority",70);h(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,r,a){switch(r){case"H":return L(G.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return q(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,a){return e.setHours(a,0,0,0),e}}class Do extends Y{constructor(){super(...arguments);h(this,"priority",70);h(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,r,a){switch(r){case"K":return L(G.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return q(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.getHours()>=12&&a<12?e.setHours(a+12,0,0,0):e.setHours(a,0,0,0),e}}class ko extends Y{constructor(){super(...arguments);h(this,"priority",70);h(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,r,a){switch(r){case"k":return L(G.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return q(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,a){const o=a<=24?a%24:a;return e.setHours(o,0,0,0),e}}class To extends Y{constructor(){super(...arguments);h(this,"priority",60);h(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"m":return L(G.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return q(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setMinutes(a,0,0),e}}class Mo extends Y{constructor(){super(...arguments);h(this,"priority",50);h(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"s":return L(G.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return q(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setSeconds(a,0),e}}class Io extends Y{constructor(){super(...arguments);h(this,"priority",30);h(this,"incompatibleTokens",["t","T"])}parse(e,r){const a=o=>Math.trunc(o*Math.pow(10,-r.length+3));return X(q(r.length,e),a)}set(e,r,a){return e.setMilliseconds(a),e}}class Po extends Y{constructor(){super(...arguments);h(this,"priority",10);h(this,"incompatibleTokens",["t","T","x"])}parse(e,r){switch(r){case"X":return de(ce.basicOptionalMinutes,e);case"XX":return de(ce.basic,e);case"XXXX":return de(ce.basicOptionalSeconds,e);case"XXXXX":return de(ce.extendedOptionalSeconds,e);case"XXX":default:return de(ce.extended,e)}}set(e,r,a){return r.timestampIsSet?e:$(e,e.getTime()-ht(e)-a)}}class Co extends Y{constructor(){super(...arguments);h(this,"priority",10);h(this,"incompatibleTokens",["t","T","X"])}parse(e,r){switch(r){case"x":return de(ce.basicOptionalMinutes,e);case"xx":return de(ce.basic,e);case"xxxx":return de(ce.basicOptionalSeconds,e);case"xxxxx":return de(ce.extendedOptionalSeconds,e);case"xxx":default:return de(ce.extended,e)}}set(e,r,a){return r.timestampIsSet?e:$(e,e.getTime()-ht(e)-a)}}class Oo extends Y{constructor(){super(...arguments);h(this,"priority",40);h(this,"incompatibleTokens","*")}parse(e){return ir(e)}set(e,r,a){return[$(e,a*1e3),{timestampIsSet:!0}]}}class No extends Y{constructor(){super(...arguments);h(this,"priority",20);h(this,"incompatibleTokens","*")}parse(e){return ir(e)}set(e,r,a){return[$(e,a),{timestampIsSet:!0}]}}const _o={G:new Qa,y:new Ga,Y:new Xa,R:new Za,u:new Ka,Q:new Ja,q:new eo,M:new to,L:new no,w:new ao,I:new io,d:new uo,D:new co,E:new fo,e:new mo,c:new ho,i:new po,a:new bo,b:new vo,B:new wo,h:new yo,H:new xo,K:new Do,k:new ko,m:new To,s:new Mo,S:new Io,X:new Po,x:new Co,t:new Oo,T:new No},Fo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ro=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vo=/^'([^]*?)'?$/,Yo=/''/g,Ho=/\S/,So=/[a-zA-Z]/;function Bo(t,n,e,r){var R,S,W,T,O,p,z,U;const a=ar(),o=(r==null?void 0:r.locale)??a.locale??jn,s=(r==null?void 0:r.firstWeekContainsDate)??((S=(R=r==null?void 0:r.locale)==null?void 0:R.options)==null?void 0:S.firstWeekContainsDate)??a.firstWeekContainsDate??((T=(W=a.locale)==null?void 0:W.options)==null?void 0:T.firstWeekContainsDate)??1,l=(r==null?void 0:r.weekStartsOn)??((p=(O=r==null?void 0:r.locale)==null?void 0:O.options)==null?void 0:p.weekStartsOn)??a.weekStartsOn??((U=(z=a.locale)==null?void 0:z.options)==null?void 0:U.weekStartsOn)??0;if(n==="")return t===""?k(e):$(e,NaN);const m={firstWeekContainsDate:s,weekStartsOn:l,locale:o},g=[new ja],b=n.match(Ro).map(x=>{const I=x[0];if(I in jt){const d=jt[I];return d(x,o.formatLong)}return x}).join("").match(Fo),w=[];for(let x of b){!(r!=null&&r.useAdditionalWeekYearTokens)&&nr(x)&&Qt(x,n,t),!(r!=null&&r.useAdditionalDayOfYearTokens)&&tr(x)&&Qt(x,n,t);const I=x[0],d=_o[I];if(d){const{incompatibleTokens:y}=d;if(Array.isArray(y)){const P=w.find(ee=>y.includes(ee.token)||ee.token===I);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${x}\` at the same time`)}else if(d.incompatibleTokens==="*"&&w.length>0)throw new RangeError(`The format string mustn't contain \`${x}\` and any other token at the same time`);w.push({token:I,fullToken:x});const N=d.run(t,x,o.match,m);if(!N)return $(e,NaN);g.push(N.setter),t=N.rest}else{if(I.match(So))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(x==="''"?x="'":I==="'"&&(x=Eo(x)),t.indexOf(x)===0)t=t.slice(x.length);else return $(e,NaN)}}if(t.length>0&&Ho.test(t))return $(e,NaN);const H=g.map(x=>x.priority).sort((x,I)=>I-x).filter((x,I,d)=>d.indexOf(x)===I).map(x=>g.filter(I=>I.priority===x).sort((I,d)=>d.subPriority-I.subPriority)).map(x=>x[0]);let M=k(e);if(isNaN(M.getTime()))return $(e,NaN);const C={};for(const x of H){if(!x.validate(M,m))return $(e,NaN);const I=x.set(M,C,m);Array.isArray(I)?(M=I[0],Object.assign(C,I[1])):M=I}return $(e,M)}function Eo(t){return t.match(Vo)[1].replace(Yo,"'")}function Ao(t){const n=k(t);return n.setMinutes(0,0,0),n}function yt(t,n){const e=k(t),r=k(n);return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()}function ur(t,n){const e=bn(t),r=bn(n);return+e==+r}function $o(t){const n=k(t);return n.setMilliseconds(0),n}function cr(t,n){const e=k(t),r=k(n);return e.getFullYear()===r.getFullYear()}function zo(t,n){const e=k(t),r=e.getFullYear(),a=e.getDate(),o=$(t,0);o.setFullYear(r,n,15),o.setHours(0,0,0,0);const s=$a(o);return e.setMonth(n,Math.min(a,s)),e}function Uo(t,n){let e=k(t);return isNaN(+e)?$(t,NaN):(n.year!=null&&e.setFullYear(n.year),n.month!=null&&(e=zo(e,n.month)),n.date!=null&&e.setDate(n.date),n.hours!=null&&e.setHours(n.hours),n.minutes!=null&&e.setMinutes(n.minutes),n.seconds!=null&&e.setSeconds(n.seconds),n.milliseconds!=null&&e.setMilliseconds(n.milliseconds),e)}function Ce(t,n){const e=k(t);return e.setHours(n),e}function Ft(t,n){const e=k(t);return e.setMinutes(n),e}function Rt(t,n){const e=k(t);return e.setSeconds(n),e}function Lo(t,n){const e=k(t);return isNaN(+e)?$(t,NaN):(e.setFullYear(n),e)}const qo={date:Da,month:yt,year:cr,quarter:ur};function Wo(t){return(n,e)=>{const r=(t+1)%7;return jr(n,e,{weekStartsOn:r})}}function ne(t,n,e,r=0){return(e==="week"?Wo(r):qo[e])(t,n)}function Vt(t,n,e,r,a,o){return a==="date"?jo(t,n,e,r):Qo(t,n,e,r,o)}function jo(t,n,e,r){let a=!1,o=!1,s=!1;Array.isArray(e)&&(e[0]<t&&t<e[1]&&(a=!0),ne(e[0],t,"date")&&(o=!0),ne(e[1],t,"date")&&(s=!0));const l=e!==null&&(Array.isArray(e)?ne(e[0],t,"date")||ne(e[1],t,"date"):ne(e,t,"date"));return{type:"date",dateObject:{date:rr(t),month:Ke(t),year:tt(t)},inCurrentMonth:yt(t,n),isCurrentDate:ne(r,t,"date"),inSpan:a,inSelectedWeek:!1,startOfSpan:o,endOfSpan:s,selected:l,ts:A(t)}}function ls(t,n,e){const r=new Date(2e3,t,1).getTime();return $e(r,n,{locale:e})}function us(t,n,e){const r=new Date(t,1,1).getTime();return $e(r,n,{locale:e})}function cs(t,n,e){const r=new Date(2e3,t*3-2,1).getTime();return $e(r,n,{locale:e})}function Qo(t,n,e,r,a){let o=!1,s=!1,l=!1;Array.isArray(e)&&(e[0]<t&&t<e[1]&&(o=!0),ne(e[0],t,"week",a)&&(s=!0),ne(e[1],t,"week",a)&&(l=!0));const m=e!==null&&(Array.isArray(e)?ne(e[0],t,"week",a)||ne(e[1],t,"week",a):ne(e,t,"week",a));return{type:"date",dateObject:{date:rr(t),month:Ke(t),year:tt(t)},inCurrentMonth:yt(t,n),isCurrentDate:ne(r,t,"date"),inSpan:o,startOfSpan:s,endOfSpan:l,selected:!1,inSelectedWeek:m,ts:A(t)}}function Go(t,n,e,{monthFormat:r}){return{type:"month",monthFormat:r,dateObject:{month:Ke(t),year:tt(t)},isCurrent:yt(e,t),selected:n!==null&&ne(n,t,"month"),ts:A(t)}}function Xo(t,n,e,{yearFormat:r}){return{type:"year",yearFormat:r,dateObject:{year:tt(t)},isCurrent:cr(e,t),selected:n!==null&&ne(n,t,"year"),ts:A(t)}}function Zo(t,n,e,{quarterFormat:r}){return{type:"quarter",quarterFormat:r,dateObject:{quarter:Ta(t),year:tt(t)},isCurrent:ur(e,t),selected:n!==null&&ne(n,t,"quarter"),ts:A(t)}}function ds(t,n,e,r,a=!1,o=!1){const s=o?"week":"date",l=Ke(t);let m=A(Ia(t)),g=A(Ee(m,-1));const b=[];let w=!a;for(;Aa(g)!==r||w;)b.unshift(Vt(g,t,n,e,s,r)),g=A(Ee(g,-1)),w=!1;for(;Ke(m)===l;)b.push(Vt(m,t,n,e,s,r)),m=A(Ee(m,1));const H=a?b.length<=28?28:b.length<=35?35:42:42;for(;b.length<H;)b.push(Vt(m,t,n,e,s,r)),m=A(Ee(m,1));return b}function fs(t,n,e,r){const a=[],o=wt(t);for(let s=0;s<12;s++)a.push(Go(A(Kt(o,s)),n,e,r));return a}function ms(t,n,e,r){const a=[],o=wt(t);for(let s=0;s<4;s++)a.push(Zo(A(ya(o,s)),n,e,r));return a}function hs(t,n,e,r){const a=r.value,o=[],s=wt(Lo(new Date,a[0]));for(let l=0;l<a[1]-a[0];l++)o.push(Xo(A(xa(s,l)),t,n,e));return o}function Tn(t,n,e,r){const a=Bo(t,n,e,r);return Jt(a)?$e(a,n,r)===t?a:new Date(Number.NaN):a}function gs(t){if(t===void 0)return;if(typeof t=="number")return t;const[n,e,r]=t.split(":");return{hours:Number(n),minutes:Number(e),seconds:Number(r)}}function ps(t,n){return Array.isArray(t)?t[n==="start"?0:1]:null}function Mn(t,n,e){const r=ar(),a=ei(t,e.timeZone,e.locale??r.locale);return"formatToParts"in a?Ko(a,n):Jo(a,n)}function Ko(t,n){const e=t.formatToParts(n);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function Jo(t,n){const e=t.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function ei(t,n,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:n,timeZoneName:t})}function ti(t,n){const e=ii(n);return"formatToParts"in e?ri(e,t):ai(e,t)}const ni={year:0,month:1,day:2,hour:3,minute:4,second:5};function ri(t,n){try{const e=t.formatToParts(n),r=[];for(let a=0;a<e.length;a++){const o=ni[e[a].type];o!==void 0&&(r[o]=parseInt(e[a].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function ai(t,n){const e=t.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Yt={},In=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),oi=In==="06/25/2014, 00:00:00"||In==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function ii(t){return Yt[t]||(Yt[t]=oi?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Yt[t]}function dr(t,n,e,r,a,o,s){const l=new Date(0);return l.setUTCFullYear(t,n,e),l.setUTCHours(r,a,o,s),l}const Pn=36e5,si=6e4,Ht={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function rn(t,n,e){if(!t)return 0;let r=Ht.timezoneZ.exec(t);if(r)return 0;let a,o;if(r=Ht.timezoneHH.exec(t),r)return a=parseInt(r[1],10),Cn(a)?-(a*Pn):NaN;if(r=Ht.timezoneHHMM.exec(t),r){a=parseInt(r[2],10);const s=parseInt(r[3],10);return Cn(a,s)?(o=Math.abs(a)*Pn+s*si,r[1]==="+"?-o:o):NaN}if(ci(t)){n=new Date(n||Date.now());const s=e?n:li(n),l=Gt(s,t);return-(e?l:ui(n,l,t))}return NaN}function li(t){return dr(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function Gt(t,n){const e=ti(t,n),r=dr(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let a=t.getTime();const o=a%1e3;return a-=o>=0?o:1e3+o,r-a}function ui(t,n,e){let a=t.getTime()-n;const o=Gt(new Date(a),e);if(n===o)return n;a-=o-n;const s=Gt(new Date(a),e);return o===s?o:Math.max(o,s)}function Cn(t,n){return-23<=t&&t<=23&&(n==null||0<=n&&n<=59)}const On={};function ci(t){if(On[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),On[t]=!0,!0}catch{return!1}}const di=60*1e3,fi={X:function(t,n,e){const r=St(e.timeZone,t);if(r===0)return"Z";switch(n){case"X":return Nn(r);case"XXXX":case"XX":return Se(r);case"XXXXX":case"XXX":default:return Se(r,":")}},x:function(t,n,e){const r=St(e.timeZone,t);switch(n){case"x":return Nn(r);case"xxxx":case"xx":return Se(r);case"xxxxx":case"xxx":default:return Se(r,":")}},O:function(t,n,e){const r=St(e.timeZone,t);switch(n){case"O":case"OO":case"OOO":return"GMT"+mi(r,":");case"OOOO":default:return"GMT"+Se(r,":")}},z:function(t,n,e){switch(n){case"z":case"zz":case"zzz":return Mn("short",t,e);case"zzzz":default:return Mn("long",t,e)}}};function St(t,n){const e=t?rn(t,n,!0)/di:(n==null?void 0:n.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+t);return e}function pt(t,n){const e=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<n;)r="0"+r;return e+r}function Se(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=pt(Math.floor(r/60),2),o=pt(Math.floor(r%60),2);return e+a+n+o}function Nn(t,n){return t%60===0?(t>0?"-":"+")+pt(Math.abs(t)/60,2):Se(t,n)}function mi(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),o=r%60;return o===0?e+String(a):e+String(a)+n+pt(o,2)}function _n(t){const n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+t-+n}const hi=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Bt=36e5,Fn=6e4,gi=2,re={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:hi};function fr(t,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const e=n.additionalDigits==null?gi:Number(n.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=pi(t),{year:a,restDateString:o}=bi(r.date,e),s=vi(o,a);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const l=s.getTime();let m=0,g;if(r.time&&(m=wi(r.time),m===null||isNaN(m)))return new Date(NaN);if(r.timeZone||n.timeZone){if(g=rn(r.timeZone||n.timeZone,new Date(l+m)),isNaN(g))return new Date(NaN)}else g=_n(new Date(l+m)),g=_n(new Date(l+m+g));return new Date(l+m+g)}else return new Date(NaN)}function pi(t){const n={};let e=re.dateTimePattern.exec(t),r;if(e?(n.date=e[1],r=e[3]):(e=re.datePattern.exec(t),e?(n.date=e[1],r=e[2]):(n.date=null,r=t)),r){const a=re.timeZone.exec(r);a?(n.time=r.replace(a[1],""),n.timeZone=a[1].trim()):n.time=r}return n}function bi(t,n){if(t){const e=re.YYY[n],r=re.YYYYY[n];let a=re.YYYY.exec(t)||r.exec(t);if(a){const o=a[1];return{year:parseInt(o,10),restDateString:t.slice(o.length)}}if(a=re.YY.exec(t)||e.exec(t),a){const o=a[1];return{year:parseInt(o,10)*100,restDateString:t.slice(o.length)}}}return{year:null}}function vi(t,n){if(n===null)return null;let e,r,a;if(!t||!t.length)return e=new Date(0),e.setUTCFullYear(n),e;let o=re.MM.exec(t);if(o)return e=new Date(0),r=parseInt(o[1],10)-1,Vn(n,r)?(e.setUTCFullYear(n,r),e):new Date(NaN);if(o=re.DDD.exec(t),o){e=new Date(0);const s=parseInt(o[1],10);return Di(n,s)?(e.setUTCFullYear(n,0,s),e):new Date(NaN)}if(o=re.MMDD.exec(t),o){e=new Date(0),r=parseInt(o[1],10)-1;const s=parseInt(o[2],10);return Vn(n,r,s)?(e.setUTCFullYear(n,r,s),e):new Date(NaN)}if(o=re.Www.exec(t),o)return a=parseInt(o[1],10)-1,Yn(a)?Rn(n,a):new Date(NaN);if(o=re.WwwD.exec(t),o){a=parseInt(o[1],10)-1;const s=parseInt(o[2],10)-1;return Yn(a,s)?Rn(n,a,s):new Date(NaN)}return null}function wi(t){let n,e,r=re.HH.exec(t);if(r)return n=parseFloat(r[1].replace(",",".")),Et(n)?n%24*Bt:NaN;if(r=re.HHMM.exec(t),r)return n=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Et(n,e)?n%24*Bt+e*Fn:NaN;if(r=re.HHMMSS.exec(t),r){n=parseInt(r[1],10),e=parseInt(r[2],10);const a=parseFloat(r[3].replace(",","."));return Et(n,e,a)?n%24*Bt+e*Fn+a*1e3:NaN}return null}function Rn(t,n,e){n=n||0,e=e||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,o=n*7+e+1-a;return r.setUTCDate(r.getUTCDate()+o),r}const yi=[31,28,31,30,31,30,31,31,30,31,30,31],xi=[31,29,31,30,31,30,31,31,30,31,30,31];function mr(t){return t%400===0||t%4===0&&t%100!==0}function Vn(t,n,e){if(n<0||n>11)return!1;if(e!=null){if(e<1)return!1;const r=mr(t);if(r&&e>xi[n]||!r&&e>yi[n])return!1}return!0}function Di(t,n){if(n<1)return!1;const e=mr(t);return!(e&&n>366||!e&&n>365)}function Yn(t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Et(t,n,e){return!(t<0||t>=25||n!=null&&(n<0||n>=60)||e!=null&&(e<0||e>=60))}const ki=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Ti(t,n,e={}){n=String(n);const r=n.match(ki);if(r){const a=fr(e.originalDate||t,e);n=r.reduce(function(o,s){if(s[0]==="'")return o;const l=o.indexOf(s),m=o[l-1]==="'",g=o.replace(s,"'"+fi[s[0]](a,s,e)+"'");return m?g.substring(0,l-1)+g.substring(l+1):g},n)}return $e(t,n,e)}function Mi(t,n,e){t=fr(t,e);const r=rn(n,t,!0),a=new Date(t.getTime()-r),o=new Date(0);return o.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),o.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),o}function Ii(t,n,e,r){return r={...r,timeZone:n,originalDate:t},Ti(Mi(t,n,{timeZone:r.timeZone}),e,r)}const Ge={amHours:["00","01","02","03","04","05","06","07","08","09","10","11"],pmHours:["12","01","02","03","04","05","06","07","08","09","10","11"],hours:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],minutes:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],seconds:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],period:["AM","PM"]};function At(t){return`00${t}`.slice(-2)}function Xe(t,n,e){return Array.isArray(n)?(e==="am"?n.filter(r=>r<12):e==="pm"?n.filter(r=>r>=12).map(r=>r===12?12:r-12):n).map(r=>At(r)):typeof n=="number"?e==="am"?t.filter(r=>{const a=Number(r);return a<12&&a%n===0}):e==="pm"?t.filter(r=>{const a=Number(r);return a>=12&&a%n===0}).map(r=>{const a=Number(r);return At(a===12?12:a-12)}):t.filter(r=>Number(r)%n===0):e==="am"?t.filter(r=>Number(r)<12):e==="pm"?t.map(r=>Number(r)).filter(r=>Number(r)>=12).map(r=>At(r===12?12:r-12)):t}function ot(t,n,e){return e?typeof e=="number"?t%e===0:e.includes(t):!0}function Pi(t,n,e){const r=Xe(Ge[n],e).map(Number);let a,o;for(let s=0;s<r.length;++s){const l=r[s];if(l===t)return l;if(l>t){o=l;break}a=l}return a===void 0?(o||Vr("time-picker","Please set 'hours' or 'minutes' or 'seconds' props"),o):o===void 0||o-t>t-a?a:o}function Ci(t){return He(t)<12?"am":"pm"}const hr=En("n-time-picker"),it=le({name:"TimePickerPanelCol",props:{clsPrefix:{type:String,required:!0},data:{type:Array,required:!0},activeValue:{type:Number,default:null},onItemClick:Function},render(){const{activeValue:t,onItemClick:n,clsPrefix:e}=this;return this.data.map(r=>{const{label:a,disabled:o,value:s}=r,l=t===s;return u("div",{key:a,"data-active":l?"":null,class:[`${e}-time-picker-col__item`,l&&`${e}-time-picker-col__item--active`,o&&`${e}-time-picker-col__item--disabled`],onClick:n&&!o?()=>{n(s)}:void 0},a)})}}),Oi={actions:{type:Array,default:()=>["now","confirm"]},showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},showPeriod:{type:Boolean,default:!0},isHourInvalid:Boolean,isMinuteInvalid:Boolean,isSecondInvalid:Boolean,isAmPmInvalid:Boolean,isValueInvalid:Boolean,hourValue:{type:Number,default:null},minuteValue:{type:Number,default:null},secondValue:{type:Number,default:null},amPmValue:{type:String,default:null},isHourDisabled:Function,isMinuteDisabled:Function,isSecondDisabled:Function,onHourClick:{type:Function,required:!0},onMinuteClick:{type:Function,required:!0},onSecondClick:{type:Function,required:!0},onAmPmClick:{type:Function,required:!0},onNowClick:Function,clearText:String,nowText:String,confirmText:String,transitionDisabled:Boolean,onClearClick:Function,onConfirmClick:Function,onFocusin:Function,onFocusout:Function,onFocusDetectorFocus:Function,onKeydown:Function,hours:[Number,Array],minutes:[Number,Array],seconds:[Number,Array],use12Hours:Boolean},Ni=le({name:"TimePickerPanel",props:Oi,setup(t){const{mergedThemeRef:n,mergedClsPrefixRef:e}=bt(hr),r=F(()=>{const{isHourDisabled:l,hours:m,use12Hours:g,amPmValue:b}=t;if(g){const w=b??Ci(Date.now());return Xe(Ge.hours,m,w).map(H=>{const M=Number(H),C=w==="pm"&&M!==12?M+12:M;return{label:H,value:C,disabled:l?l(C):!1}})}else return Xe(Ge.hours,m).map(w=>({label:w,value:Number(w),disabled:l?l(Number(w)):!1}))}),a=F(()=>{const{isMinuteDisabled:l,minutes:m}=t;return Xe(Ge.minutes,m).map(g=>({label:g,value:Number(g),disabled:l?l(Number(g),t.hourValue):!1}))}),o=F(()=>{const{isSecondDisabled:l,seconds:m}=t;return Xe(Ge.seconds,m).map(g=>({label:g,value:Number(g),disabled:l?l(Number(g),t.minuteValue,t.hourValue):!1}))}),s=F(()=>{const{isHourDisabled:l}=t;let m=!0,g=!0;for(let b=0;b<12;++b)if(!(l!=null&&l(b))){m=!1;break}for(let b=12;b<24;++b)if(!(l!=null&&l(b))){g=!1;break}return[{label:"AM",value:"am",disabled:m},{label:"PM",value:"pm",disabled:g}]});return{mergedTheme:n,mergedClsPrefix:e,hours:r,minutes:a,seconds:o,amPm:s,hourScrollRef:te(null),minuteScrollRef:te(null),secondScrollRef:te(null),amPmScrollRef:te(null)}},render(){var t,n,e,r;const{mergedClsPrefix:a,mergedTheme:o}=this;return u("div",{tabindex:0,class:`${a}-time-picker-panel`,onFocusin:this.onFocusin,onFocusout:this.onFocusout,onKeydown:this.onKeydown},u("div",{class:`${a}-time-picker-cols`},this.showHour?u("div",{class:[`${a}-time-picker-col`,this.isHourInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},u(at,{ref:"hourScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[u(it,{clsPrefix:a,data:this.hours,activeValue:this.hourValue,onItemClick:this.onHourClick}),u("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showMinute?u("div",{class:[`${a}-time-picker-col`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`,this.isMinuteInvalid&&`${a}-time-picker-col--invalid`]},u(at,{ref:"minuteScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[u(it,{clsPrefix:a,data:this.minutes,activeValue:this.minuteValue,onItemClick:this.onMinuteClick}),u("div",{class:`${a}-time-picker-col__padding`})]})):null,this.showSecond?u("div",{class:[`${a}-time-picker-col`,this.isSecondInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},u(at,{ref:"secondScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[u(it,{clsPrefix:a,data:this.seconds,activeValue:this.secondValue,onItemClick:this.onSecondClick}),u("div",{class:`${a}-time-picker-col__padding`})]})):null,this.use12Hours?u("div",{class:[`${a}-time-picker-col`,this.isAmPmInvalid&&`${a}-time-picker-col--invalid`,this.transitionDisabled&&`${a}-time-picker-col--transition-disabled`]},u(at,{ref:"amPmScrollRef",theme:o.peers.Scrollbar,themeOverrides:o.peerOverrides.Scrollbar},{default:()=>[u(it,{clsPrefix:a,data:this.amPm,activeValue:this.amPmValue,onItemClick:this.onAmPmClick}),u("div",{class:`${a}-time-picker-col__padding`})]})):null),!((t=this.actions)===null||t===void 0)&&t.length?u("div",{class:`${a}-time-picker-actions`},!((n=this.actions)===null||n===void 0)&&n.includes("clear")?u(De,{theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,size:"tiny",onClick:this.onClearClick},{default:()=>this.clearText}):null,!((e=this.actions)===null||e===void 0)&&e.includes("now")?u(De,{size:"tiny",theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.onNowClick},{default:()=>this.nowText}):null,!((r=this.actions)===null||r===void 0)&&r.includes("confirm")?u(De,{size:"tiny",type:"primary",class:`${a}-time-picker-actions__confirm`,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,disabled:this.isValueInvalid,onClick:this.onConfirmClick},{default:()=>this.confirmText}):null):null,u(ia,{onFocus:this.onFocusDetectorFocus}))}}),_i=V([K("time-picker",`
 z-index: auto;
 position: relative;
 `,[K("time-picker-icon",`
 color: var(--n-icon-color-override);
 transition: color .3s var(--n-bezier);
 `),se("disabled",[K("time-picker-icon",`
 color: var(--n-icon-color-disabled-override);
 `)])]),K("time-picker-panel",`
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 outline: none;
 font-size: var(--n-item-font-size);
 border-radius: var(--n-border-radius);
 margin: 4px 0;
 min-width: 104px;
 overflow: hidden;
 background-color: var(--n-panel-color);
 box-shadow: var(--n-panel-box-shadow);
 `,[Qr(),K("time-picker-actions",`
 padding: var(--n-panel-action-padding);
 align-items: center;
 display: flex;
 justify-content: space-evenly;
 `),K("time-picker-cols",`
 height: calc(var(--n-item-height) * 6);
 display: flex;
 position: relative;
 transition: border-color .3s var(--n-bezier);
 border-bottom: 1px solid var(--n-panel-divider-color);
 `),K("time-picker-col",`
 flex-grow: 1;
 min-width: var(--n-item-width);
 height: calc(var(--n-item-height) * 6);
 flex-direction: column;
 transition: box-shadow .3s var(--n-bezier);
 `,[se("transition-disabled",[Ye("item","transition: none;",[V("&::before","transition: none;")])]),Ye("padding",`
 height: calc(var(--n-item-height) * 5);
 `),V("&:first-child","min-width: calc(var(--n-item-width) + 4px);",[Ye("item",[V("&::before","left: 4px;")])]),Ye("item",`
 cursor: pointer;
 height: var(--n-item-height);
 display: flex;
 align-items: center;
 justify-content: center;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 text-decoration-color .3s var(--n-bezier);
 background: #0000;
 text-decoration-color: #0000;
 color: var(--n-item-text-color);
 z-index: 0;
 box-sizing: border-box;
 padding-top: 4px;
 position: relative;
 `,[V("&::before",`
 content: "";
 transition: background-color .3s var(--n-bezier);
 z-index: -1;
 position: absolute;
 left: 0;
 right: 4px;
 top: 4px;
 bottom: 0;
 border-radius: var(--n-item-border-radius);
 `),An("disabled",[V("&:hover::before",`
 background-color: var(--n-item-color-hover);
 `)]),se("active",`
 color: var(--n-item-text-color-active);
 `,[V("&::before",`
 background-color: var(--n-item-color-hover);
 `)]),se("disabled",`
 opacity: var(--n-item-opacity-disabled);
 cursor: not-allowed;
 `)]),se("invalid",[Ye("item",[se("active",`
 text-decoration: line-through;
 text-decoration-color: var(--n-item-text-color-active);
 `)])])])])]);function $t(t,n){return t===void 0?!0:Array.isArray(t)?t.every(e=>e>=0&&e<=n):t>=0&&t<=n}const Fi=Object.assign(Object.assign({},fe.props),{to:qt.propTo,bordered:{type:Boolean,default:void 0},actions:Array,defaultValue:{type:Number,default:null},defaultFormattedValue:String,placeholder:String,placement:{type:String,default:"bottom-start"},value:Number,format:{type:String,default:"HH:mm:ss"},valueFormat:String,formattedValue:String,isHourDisabled:Function,size:String,isMinuteDisabled:Function,isSecondDisabled:Function,inputReadonly:Boolean,clearable:Boolean,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onUpdateFormattedValue:[Function,Array],"onUpdate:formattedValue":[Function,Array],onBlur:[Function,Array],onConfirm:[Function,Array],onClear:Function,onFocus:[Function,Array],timeZone:String,showIcon:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},show:{type:Boolean,default:void 0},hours:{type:[Number,Array],validator:t=>$t(t,23)},minutes:{type:[Number,Array],validator:t=>$t(t,59)},seconds:{type:[Number,Array],validator:t=>$t(t,59)},use12Hours:Boolean,stateful:{type:Boolean,default:!0},onChange:[Function,Array]}),bs=le({name:"TimePicker",props:Fi,setup(t){const{mergedBorderedRef:n,mergedClsPrefixRef:e,namespaceRef:r,inlineThemeDisabled:a}=Je(t),{localeRef:o,dateLocaleRef:s}=Zt("TimePicker"),l=$n(t),{mergedSizeRef:m,mergedDisabledRef:g,mergedStatusRef:b}=l,w=fe("TimePicker","-time-picker",_i,Gr,t,e),H=Xr(),M=te(null),C=te(null),R=F(()=>({locale:s.value.locale}));function S(i){return i===null?null:Tn(i,t.valueFormat||t.format,new Date,R.value).getTime()}const{defaultValue:W,defaultFormattedValue:T}=t,O=te(T!==void 0?S(T):W),p=F(()=>{const{formattedValue:i}=t;if(i!==void 0)return S(i);const{value:f}=t;return f!==void 0?f:O.value}),z=F(()=>{const{timeZone:i}=t;return i?(f,v,B)=>Ii(f,i,v,B):(f,v,B)=>$e(f,v,B)}),U=te("");lt(()=>t.timeZone,()=>{const i=p.value;U.value=i===null?"":z.value(i,t.format,R.value)},{immediate:!0});const x=te(!1),I=Be(t,"show"),d=Xt(I,x),y=te(p.value),N=te(!1),P=F(()=>o.value.clear),ee=F(()=>o.value.now),ze=F(()=>t.placeholder!==void 0?t.placeholder:o.value.placeholder),Ue=F(()=>o.value.negativeText),be=F(()=>o.value.positiveText),Le=F(()=>/H|h|K|k/.test(t.format)),xt=F(()=>t.format.includes("m")),Dt=F(()=>t.format.includes("s")),me=F(()=>{const{value:i}=p;return i===null?null:Number(z.value(i,"HH",R.value))}),qe=F(()=>{const{value:i}=p;return i===null?null:Number(z.value(i,"mm",R.value))}),nt=F(()=>{const{value:i}=p;return i===null?null:Number(z.value(i,"ss",R.value))}),ve=F(()=>{const{isHourDisabled:i}=t;return me.value===null?!1:ot(me.value,"hours",t.hours)?i?i(me.value):!1:!0}),we=F(()=>{const{value:i}=qe,{value:f}=me;if(i===null||f===null)return!1;if(!ot(i,"minutes",t.minutes))return!0;const{isMinuteDisabled:v}=t;return v?v(i,f):!1}),Me=F(()=>{const{value:i}=qe,{value:f}=me,{value:v}=nt;if(v===null||i===null||f===null)return!1;if(!ot(v,"seconds",t.seconds))return!0;const{isSecondDisabled:B}=t;return B?B(v,i,f):!1}),Ne=F(()=>ve.value||we.value||Me.value),_e=F(()=>t.format.length+4),We=F(()=>{const{value:i}=p;return i===null?null:He(i)<12?"am":"pm"});function kt(i,f){const{onUpdateFormattedValue:v,"onUpdate:formattedValue":B}=t;v&&Z(v,i,f),B&&Z(B,i,f)}function rt(i){return i===null?null:z.value(i,t.valueFormat||t.format)}function j(i){const{onUpdateValue:f,"onUpdate:value":v,onChange:B}=t,{nTriggerFormChange:ge,nTriggerFormInput:pe}=l,J=rt(i);f&&Z(f,i,J),v&&Z(v,i,J),B&&Z(B,i,J),kt(J,i),O.value=i,ge(),pe()}function Tt(i){const{onFocus:f}=t,{nTriggerFormFocus:v}=l;f&&Z(f,i),v()}function je(i){const{onBlur:f}=t,{nTriggerFormBlur:v}=l;f&&Z(f,i),v()}function Mt(){const{onConfirm:i}=t;i&&Z(i,p.value,rt(p.value))}function It(i){var f;i.stopPropagation(),j(null),oe(null),(f=t.onClear)===null||f===void 0||f.call(t)}function Pt(){he({returnFocus:!0})}function c(){j(null),oe(null),he({returnFocus:!0})}function D(i){i.key==="Escape"&&d.value&&pn(i)}function _(i){var f;switch(i.key){case"Escape":d.value&&(pn(i),he({returnFocus:!0}));break;case"Tab":H.shift&&i.target===((f=C.value)===null||f===void 0?void 0:f.$el)&&(i.preventDefault(),he({returnFocus:!0}));break}}function Q(){N.value=!0,ut(()=>{N.value=!1})}function ae(i){g.value||ta(i,"clear")||d.value||sn()}function ie(i){typeof i!="string"&&(p.value===null?j(A(Ce(Ao(new Date),i))):j(A(Ce(p.value,i))))}function ye(i){typeof i!="string"&&(p.value===null?j(A(Ft(Ma(new Date),i))):j(A(Ft(p.value,i))))}function Ie(i){typeof i!="string"&&(p.value===null?j(A(Rt($o(new Date),i))):j(A(Rt(p.value,i))))}function ue(i){const{value:f}=p;if(f===null){const v=new Date,B=He(v);i==="pm"&&B<12?j(A(Ce(v,B+12))):i==="am"&&B>=12&&j(A(Ce(v,B-12))),j(A(v))}else{const v=He(f);i==="pm"&&v<12?j(A(Ce(f,v+12))):i==="am"&&v>=12&&j(A(Ce(f,v-12)))}}function oe(i){i===void 0&&(i=p.value),i===null?U.value="":U.value=z.value(i,t.format,R.value)}function Qe(i){Ot(i)||Tt(i)}function gr(i){var f;if(!Ot(i))if(d.value){const v=(f=C.value)===null||f===void 0?void 0:f.$el;v!=null&&v.contains(i.relatedTarget)||(oe(),je(i),he({returnFocus:!1}))}else oe(),je(i)}function pr(){g.value||d.value||sn()}function br(){g.value||(oe(),he({returnFocus:!1}))}function on(){if(!C.value)return;const{hourScrollRef:i,minuteScrollRef:f,secondScrollRef:v,amPmScrollRef:B}=C.value;[i,f,v,B].forEach(ge=>{var pe;if(!ge)return;const J=(pe=ge.contentRef)===null||pe===void 0?void 0:pe.querySelector("[data-active]");J&&ge.scrollTo({top:J.offsetTop})})}function Ct(i){x.value=i;const{onUpdateShow:f,"onUpdate:show":v}=t;f&&Z(f,i),v&&Z(v,i)}function Ot(i){var f,v,B;return!!(!((v=(f=M.value)===null||f===void 0?void 0:f.wrapperElRef)===null||v===void 0)&&v.contains(i.relatedTarget)||!((B=C.value)===null||B===void 0)&&B.$el.contains(i.relatedTarget))}function sn(){y.value=p.value,Ct(!0),ut(on)}function vr(i){var f,v;d.value&&!(!((v=(f=M.value)===null||f===void 0?void 0:f.wrapperElRef)===null||v===void 0)&&v.contains(Br(i)))&&he({returnFocus:!1})}function he({returnFocus:i}){var f;d.value&&(Ct(!1),i&&((f=M.value)===null||f===void 0||f.focus()))}function wr(i){if(i===""){j(null);return}const f=Tn(i,t.format,new Date,R.value);if(U.value=i,Jt(f)){const{value:v}=p;if(v!==null){const B=Uo(v,{hours:He(f),minutes:Dn(f),seconds:kn(f),milliseconds:Ua(f)});j(A(B))}else j(A(f))}}function yr(){j(y.value),Ct(!1)}function xr(){const i=new Date,f={hours:He,minutes:Dn,seconds:kn},[v,B,ge]=["hours","minutes","seconds"].map(J=>!t[J]||ot(f[J](i),J,t[J])?f[J](i):Pi(f[J](i),J,t[J])),pe=Rt(Ft(Ce(p.value?p.value:A(i),v),B),ge);j(A(pe))}function Dr(){oe(),Mt(),he({returnFocus:!0})}function kr(i){Ot(i)||(oe(),je(i),he({returnFocus:!1}))}lt(p,i=>{oe(i),Q(),ut(on)}),lt(d,()=>{Ne.value&&j(y.value)}),zn(hr,{mergedThemeRef:w,mergedClsPrefixRef:e});const ln={focus:()=>{var i;(i=M.value)===null||i===void 0||i.focus()},blur:()=>{var i;(i=M.value)===null||i===void 0||i.blur()}},un=F(()=>{const{common:{cubicBezierEaseInOut:i},self:{iconColor:f,iconColorDisabled:v}}=w.value;return{"--n-icon-color-override":f,"--n-icon-color-disabled-override":v,"--n-bezier":i}}),Fe=a?dt("time-picker-trigger",void 0,un,t):void 0,cn=F(()=>{const{self:{panelColor:i,itemTextColor:f,itemTextColorActive:v,itemColorHover:B,panelDividerColor:ge,panelBoxShadow:pe,itemOpacityDisabled:J,borderRadius:Tr,itemFontSize:Mr,itemWidth:Ir,itemHeight:Pr,panelActionPadding:Cr,itemBorderRadius:Or},common:{cubicBezierEaseInOut:Nr}}=w.value;return{"--n-bezier":Nr,"--n-border-radius":Tr,"--n-item-color-hover":B,"--n-item-font-size":Mr,"--n-item-height":Pr,"--n-item-opacity-disabled":J,"--n-item-text-color":f,"--n-item-text-color-active":v,"--n-item-width":Ir,"--n-panel-action-padding":Cr,"--n-panel-box-shadow":pe,"--n-panel-color":i,"--n-panel-divider-color":ge,"--n-item-border-radius":Or}}),Re=a?dt("time-picker",void 0,cn,t):void 0;return{focus:ln.focus,blur:ln.blur,mergedStatus:b,mergedBordered:n,mergedClsPrefix:e,namespace:r,uncontrolledValue:O,mergedValue:p,isMounted:Yr(),inputInstRef:M,panelInstRef:C,adjustedTo:qt(t),mergedShow:d,localizedClear:P,localizedNow:ee,localizedPlaceholder:ze,localizedNegativeText:Ue,localizedPositiveText:be,hourInFormat:Le,minuteInFormat:xt,secondInFormat:Dt,mergedAttrSize:_e,displayTimeString:U,mergedSize:m,mergedDisabled:g,isValueInvalid:Ne,isHourInvalid:ve,isMinuteInvalid:we,isSecondInvalid:Me,transitionDisabled:N,hourValue:me,minuteValue:qe,secondValue:nt,amPmValue:We,handleInputKeydown:D,handleTimeInputFocus:Qe,handleTimeInputBlur:gr,handleNowClick:xr,handleConfirmClick:Dr,handleTimeInputUpdateValue:wr,handleMenuFocusOut:kr,handleCancelClick:yr,handleClickOutside:vr,handleTimeInputActivate:pr,handleTimeInputDeactivate:br,handleHourClick:ie,handleMinuteClick:ye,handleSecondClick:Ie,handleAmPmClick:ue,handleTimeInputClear:It,handleFocusDetectorFocus:Pt,handleMenuKeydown:_,handleTriggerClick:ae,mergedTheme:w,triggerCssVars:a?void 0:un,triggerThemeClass:Fe==null?void 0:Fe.themeClass,triggerOnRender:Fe==null?void 0:Fe.onRender,cssVars:a?void 0:cn,themeClass:Re==null?void 0:Re.themeClass,onRender:Re==null?void 0:Re.onRender,clearSelectedValue:c}},render(){const{mergedClsPrefix:t,$slots:n,triggerOnRender:e}=this;return e==null||e(),u("div",{class:[`${t}-time-picker`,this.triggerThemeClass],style:this.triggerCssVars},u(Zr,null,{default:()=>[u(Kr,null,{default:()=>u(Ze,{ref:"inputInstRef",status:this.mergedStatus,value:this.displayTimeString,bordered:this.mergedBordered,passivelyActivated:!0,attrSize:this.mergedAttrSize,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,stateful:this.stateful,size:this.mergedSize,placeholder:this.localizedPlaceholder,clearable:this.clearable,disabled:this.mergedDisabled,textDecoration:this.isValueInvalid?"line-through":void 0,onFocus:this.handleTimeInputFocus,onBlur:this.handleTimeInputBlur,onActivate:this.handleTimeInputActivate,onDeactivate:this.handleTimeInputDeactivate,onUpdateValue:this.handleTimeInputUpdateValue,onClear:this.handleTimeInputClear,internalDeactivateOnEnter:!0,internalForceFocus:this.mergedShow,readonly:this.inputReadonly||this.mergedDisabled,onClick:this.handleTriggerClick,onKeydown:this.handleInputKeydown},this.showIcon?{[this.clearable?"clear-icon-placeholder":"suffix"]:()=>u(ke,{clsPrefix:t,class:`${t}-time-picker-icon`},{default:()=>n.icon?n.icon():u(ma,null)})}:null)}),u(Jr,{teleportDisabled:this.adjustedTo===qt.tdkey,show:this.mergedShow,to:this.adjustedTo,containerClass:this.namespace,placement:this.placement},{default:()=>u(Hr,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>{var r;return this.mergedShow?((r=this.onRender)===null||r===void 0||r.call(this),Sr(u(Ni,{ref:"panelInstRef",actions:this.actions,class:this.themeClass,style:this.cssVars,seconds:this.seconds,minutes:this.minutes,hours:this.hours,transitionDisabled:this.transitionDisabled,hourValue:this.hourValue,showHour:this.hourInFormat,isHourInvalid:this.isHourInvalid,isHourDisabled:this.isHourDisabled,minuteValue:this.minuteValue,showMinute:this.minuteInFormat,isMinuteInvalid:this.isMinuteInvalid,isMinuteDisabled:this.isMinuteDisabled,secondValue:this.secondValue,amPmValue:this.amPmValue,showSecond:this.secondInFormat,isSecondInvalid:this.isSecondInvalid,isSecondDisabled:this.isSecondDisabled,isValueInvalid:this.isValueInvalid,clearText:this.localizedClear,nowText:this.localizedNow,confirmText:this.localizedPositiveText,use12Hours:this.use12Hours,onFocusout:this.handleMenuFocusOut,onKeydown:this.handleMenuKeydown,onHourClick:this.handleHourClick,onMinuteClick:this.handleMinuteClick,onSecondClick:this.handleSecondClick,onAmPmClick:this.handleAmPmClick,onNowClick:this.handleNowClick,onConfirmClick:this.handleConfirmClick,onClearClick:this.clearSelectedValue,onFocusDetectorFocus:this.handleFocusDetectorFocus}),[[ea,this.handleClickOutside,void 0,{capture:!0}]])):null}})})]}))}});function Ri(){return na}const Vi=Un({name:"DynamicInput",common:Ln,peers:{Input:qn,Button:Wn},self:Ri}),an=En("n-dynamic-input"),Yi=le({name:"DynamicInputInputPreset",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:""},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){const{mergedThemeRef:t,placeholderRef:n}=bt(an);return{mergedTheme:t,placeholder:n}},render(){const{mergedTheme:t,placeholder:n,value:e,clsPrefix:r,onUpdateValue:a,disabled:o}=this;return u("div",{class:`${r}-dynamic-input-preset-input`},u(Ze,{theme:t.peers.Input,"theme-overrides":t.peerOverrides.Input,value:e,placeholder:n,onUpdateValue:a,disabled:o}))}}),Hi=le({name:"DynamicInputPairPreset",props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:"",value:""})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(t){const{mergedThemeRef:n,keyPlaceholderRef:e,valuePlaceholderRef:r}=bt(an);return{mergedTheme:n,keyPlaceholder:e,valuePlaceholder:r,handleKeyInput(a){t.onUpdateValue({key:a,value:t.value.value})},handleValueInput(a){t.onUpdateValue({key:t.value.key,value:a})}}},render(){const{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:e,value:r,clsPrefix:a,disabled:o}=this;return u("div",{class:`${a}-dynamic-input-preset-pair`},u(Ze,{theme:t.peers.Input,"theme-overrides":t.peerOverrides.Input,value:r.key,class:`${a}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleKeyInput,disabled:o}),u(Ze,{theme:t.peers.Input,"theme-overrides":t.peerOverrides.Input,value:r.value,class:`${a}-dynamic-input-pair-input`,placeholder:e,onUpdateValue:this.handleValueInput,disabled:o}))}}),Si=K("dynamic-input",{width:"100%"},[K("dynamic-input-item",`
 margin-bottom: 10px;
 display: flex;
 flex-wrap: nowrap;
 `,[K("dynamic-input-preset-input",{flex:1,alignItems:"center"}),K("dynamic-input-preset-pair",`
 flex: 1;
 display: flex;
 align-items: center;
 `,[K("dynamic-input-pair-input",[V("&:first-child",{"margin-right":"12px"})])]),Ye("action",`
 align-self: flex-start;
 display: flex;
 justify-content: flex-end;
 flex-shrink: 0;
 flex-grow: 0;
 margin: var(--action-margin);
 `,[se("icon",{cursor:"pointer"})]),V("&:last-child",{marginBottom:0})]),K("form-item",`
 padding-top: 0 !important;
 margin-right: 0 !important;
 `,[K("form-item-blank",{paddingTop:"0 !important"})])]),st=new WeakMap,Bi=Object.assign(Object.assign({},fe.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:"input"},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:""},valuePlaceholder:{type:String,default:""},placeholder:{type:String,default:""},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),vs=le({name:"DynamicInput",props:Bi,setup(t,{slots:n}){const{mergedComponentPropsRef:e,mergedClsPrefixRef:r,mergedRtlRef:a,inlineThemeDisabled:o}=Je(),s=bt(Er,null),l=te(t.defaultValue),m=Be(t,"value"),g=Xt(m,l),b=fe("DynamicInput","-dynamic-input",Si,Vi,t,r),w=F(()=>{const{value:d}=g;if(Array.isArray(d)){const{max:y}=t;return y!==void 0&&d.length>=y}return!1}),H=F(()=>{const{value:d}=g;return Array.isArray(d)?d.length<=t.min:!0}),M=F(()=>{var d,y;return(y=(d=e==null?void 0:e.value)===null||d===void 0?void 0:d.DynamicInput)===null||y===void 0?void 0:y.buttonSize});function C(d){const{onInput:y,"onUpdate:value":N,onUpdateValue:P}=t;y&&Z(y,d),N&&Z(N,d),P&&Z(P,d),l.value=d}function R(d,y){if(d==null||typeof d!="object")return y;const N=Nt(d)?_t(d):d;let P=st.get(N);return P===void 0&&st.set(N,P=Ar()),P}function S(d,y){const{value:N}=g,P=Array.from(N??[]),ee=P[d];if(P[d]=y,ee&&y&&typeof ee=="object"&&typeof y=="object"){const ze=Nt(ee)?_t(ee):ee,Ue=Nt(y)?_t(y):y,be=st.get(ze);be!==void 0&&st.set(Ue,be)}C(P)}function W(){T(-1)}function T(d){const{value:y}=g,{onCreate:N}=t,P=Array.from(y??[]);if(N)P.splice(d+1,0,N(d+1)),C(P);else if(n.default)P.splice(d+1,0,null),C(P);else switch(t.preset){case"input":P.splice(d+1,0,""),C(P);break;case"pair":P.splice(d+1,0,{key:"",value:""}),C(P);break}}function O(d){const{value:y}=g;if(!Array.isArray(y))return;const{min:N}=t;if(y.length<=N)return;const{onRemove:P}=t;P&&P(d);const ee=Array.from(y);ee.splice(d,1),C(ee)}function p(d,y,N){if(y<0||N<0||y>=d.length||N>=d.length||y===N)return;const P=d[y];d[y]=d[N],d[N]=P}function z(d,y){const{value:N}=g;if(!Array.isArray(N))return;const P=Array.from(N);d==="up"&&p(P,y,y-1),d==="down"&&p(P,y,y+1),C(P)}zn(an,{mergedThemeRef:b,keyPlaceholderRef:Be(t,"keyPlaceholder"),valuePlaceholderRef:Be(t,"valuePlaceholder"),placeholderRef:Be(t,"placeholder")});const U=vt("DynamicInput",a,r),x=F(()=>{const{self:{actionMargin:d,actionMarginRtl:y}}=b.value;return{"--action-margin":d,"--action-margin-rtl":y}}),I=o?dt("dynamic-input",void 0,x,t):void 0;return{locale:Zt("DynamicInput").localeRef,rtlEnabled:U,buttonSize:M,mergedClsPrefix:r,NFormItem:s,uncontrolledValue:l,mergedValue:g,insertionDisabled:w,removeDisabled:H,handleCreateClick:W,ensureKey:R,handleValueChange:S,remove:O,move:z,createItem:T,mergedTheme:b,cssVars:o?void 0:x,themeClass:I==null?void 0:I.themeClass,onRender:I==null?void 0:I.onRender}},render(){const{$slots:t,itemClass:n,buttonSize:e,mergedClsPrefix:r,mergedValue:a,locale:o,mergedTheme:s,keyField:l,itemStyle:m,preset:g,showSortButton:b,NFormItem:w,ensureKey:H,handleValueChange:M,remove:C,createItem:R,move:S,onRender:W,disabled:T}=this;return W==null||W(),u("div",{class:[`${r}-dynamic-input`,this.rtlEnabled&&`${r}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(a)||a.length===0?u(De,Object.assign({block:!0,ghost:!0,dashed:!0,size:e},this.createButtonProps,{disabled:this.insertionDisabled||T,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>ft(t["create-button-default"],()=>[o.create]),icon:()=>ft(t["create-button-icon"],()=>[u(ke,{clsPrefix:r},{default:()=>u(Wt,null)})])}):a.map((O,p)=>u("div",{key:l?O[l]:H(O,p),"data-key":l?O[l]:H(O,p),class:[`${r}-dynamic-input-item`,n],style:m},dn(t.default,{value:a[p],index:p},()=>[g==="input"?u(Yi,{disabled:T,clsPrefix:r,value:a[p],parentPath:w?w.path.value:void 0,path:w!=null&&w.path.value?`${w.path.value}[${p}]`:void 0,onUpdateValue:z=>{M(p,z)}}):g==="pair"?u(Hi,{disabled:T,clsPrefix:r,value:a[p],parentPath:w?w.path.value:void 0,path:w!=null&&w.path.value?`${w.path.value}[${p}]`:void 0,onUpdateValue:z=>{M(p,z)}}):null]),dn(t.action,{value:a[p],index:p,create:R,remove:C,move:S},()=>[u("div",{class:`${r}-dynamic-input-item__action`},u(la,{size:e},{default:()=>[u(De,{disabled:this.removeDisabled||T,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,circle:!0,onClick:()=>{C(p)}},{icon:()=>u(ke,{clsPrefix:r},{default:()=>u(Gn,null)})}),u(De,{disabled:this.insertionDisabled||T,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{R(p)}},{icon:()=>u(ke,{clsPrefix:r},{default:()=>u(Wt,null)})}),b?u(De,{disabled:p===0||T,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{S("up",p)}},{icon:()=>u(ke,{clsPrefix:r},{default:()=>u(fa,null)})}):null,b?u(De,{disabled:p===a.length-1||T,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{S("down",p)}},{icon:()=>u(ke,{clsPrefix:r},{default:()=>u(sa,null)})}):null]}))]))))}});function Ei(){return ra}const Ai={name:"Space",self:Ei};let zt;function $i(){if(!$r)return!0;if(zt===void 0){const t=document.createElement("div");t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t);const n=t.scrollHeight===1;return document.body.removeChild(t),zt=n}return zt}const zi=Object.assign(Object.assign({},fe.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),ws=le({name:"Space",props:zi,setup(t){const{mergedClsPrefixRef:n,mergedRtlRef:e}=Je(t),r=fe("Space","-space",void 0,Ai,t,n),a=vt("Space",e,n);return{useGap:$i(),rtlEnabled:a,mergedClsPrefix:n,margin:F(()=>{const{size:o}=t;if(Array.isArray(o))return{horizontal:o[0],vertical:o[1]};if(typeof o=="number")return{horizontal:o,vertical:o};const{self:{[ct("gap",o)]:s}}=r.value,{row:l,col:m}=zr(s);return{horizontal:fn(m),vertical:fn(l)}})}},render(){const{vertical:t,reverse:n,align:e,inline:r,justify:a,itemClass:o,itemStyle:s,margin:l,wrap:m,mergedClsPrefix:g,rtlEnabled:b,useGap:w,wrapItem:H,internalUseGap:M}=this,C=aa(ua(this),!1);if(!C.length)return null;const R=`${l.horizontal}px`,S=`${l.horizontal/2}px`,W=`${l.vertical}px`,T=`${l.vertical/2}px`,O=C.length-1,p=a.startsWith("space-");return u("div",{role:"none",class:[`${g}-space`,b&&`${g}-space--rtl`],style:{display:r?"inline-flex":"flex",flexDirection:t&&!n?"column":t&&n?"column-reverse":!t&&n?"row-reverse":"row",justifyContent:["start","end"].includes(a)?`flex-${a}`:a,flexWrap:!m||t?"nowrap":"wrap",marginTop:w||t?"":`-${T}`,marginBottom:w||t?"":`-${T}`,alignItems:e,gap:w?`${l.vertical}px ${l.horizontal}px`:""}},!H&&(w||M)?C:C.map((z,U)=>z.type===Ur?z:u("div",{role:"none",class:o,style:[s,{maxWidth:"100%"},w?"":t?{marginBottom:U!==O?W:""}:b?{marginLeft:p?a==="space-between"&&U===O?"":S:U!==O?R:"",marginRight:p?a==="space-between"&&U===0?"":S:"",paddingTop:T,paddingBottom:T}:{marginRight:p?a==="space-between"&&U===O?"":S:U!==O?R:"",marginLeft:p?a==="space-between"&&U===0?"":S:"",paddingTop:T,paddingBottom:T}]},z)))}});function Ui(t){const{textColorDisabled:n}=t;return{iconColorDisabled:n}}const Li=Un({name:"InputNumber",common:Ln,peers:{Button:Wn,Input:qn},self:Ui});function qi(t){return t==null||typeof t=="string"&&t.trim()===""?null:Number(t)}function Wi(t){return t.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(t)||/^\.\d+$/.test(t))}function Ut(t){return t==null?!0:!Number.isNaN(t)}function Hn(t,n){return typeof t!="number"?"":n===void 0?String(t):t.toFixed(n)}function Lt(t){if(t===null)return null;if(typeof t=="number")return t;{const n=Number(t);return Number.isNaN(n)?null:n}}const ji=V([K("input-number-suffix",`
 display: inline-block;
 margin-right: 10px;
 `),K("input-number-prefix",`
 display: inline-block;
 margin-left: 10px;
 `)]),Sn=800,Bn=100,Qi=Object.assign(Object.assign({},fe.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),ys=le({name:"InputNumber",props:Qi,setup(t){const{mergedBorderedRef:n,mergedClsPrefixRef:e,mergedRtlRef:r}=Je(t),a=fe("InputNumber","-input-number",ji,Li,t,e),{localeRef:o}=Zt("InputNumber"),s=$n(t),{mergedSizeRef:l,mergedDisabledRef:m,mergedStatusRef:g}=s,b=te(null),w=te(null),H=te(null),M=te(t.defaultValue),C=Be(t,"value"),R=Xt(C,M),S=te(""),W=c=>{const D=String(c).split(".")[1];return D?D.length:0},T=c=>{const D=[t.min,t.max,t.step,c].map(_=>_===void 0?0:W(_));return Math.max(...D)},O=Pe(()=>{const{placeholder:c}=t;return c!==void 0?c:o.value.placeholder}),p=Pe(()=>{const c=Lt(t.step);return c!==null?c===0?1:Math.abs(c):1}),z=Pe(()=>{const c=Lt(t.min);return c!==null?c:null}),U=Pe(()=>{const c=Lt(t.max);return c!==null?c:null}),x=()=>{const{value:c}=R;if(Ut(c)){const{format:D,precision:_}=t;D?S.value=D(c):c===null||_===void 0||W(c)>_?S.value=Hn(c,void 0):S.value=Hn(c,_)}else S.value=String(c)};x();const I=c=>{const{value:D}=R;if(c===D){x();return}const{"onUpdate:value":_,onUpdateValue:Q,onChange:ae}=t,{nTriggerFormInput:ie,nTriggerFormChange:ye}=s;ae&&Z(ae,c),Q&&Z(Q,c),_&&Z(_,c),M.value=c,ie(),ye()},d=({offset:c,doUpdateIfValid:D,fixPrecision:_,isInputing:Q})=>{const{value:ae}=S;if(Q&&Wi(ae))return!1;const ie=(t.parse||qi)(ae);if(ie===null)return D&&I(null),null;if(Ut(ie)){const ye=W(ie),{precision:Ie}=t;if(Ie!==void 0&&Ie<ye&&!_)return!1;let ue=Number.parseFloat((ie+c).toFixed(Ie??T(ie)));if(Ut(ue)){const{value:oe}=U,{value:Qe}=z;if(oe!==null&&ue>oe){if(!D||Q)return!1;ue=oe}if(Qe!==null&&ue<Qe){if(!D||Q)return!1;ue=Qe}return t.validator&&!t.validator(ue)?!1:(D&&I(ue),ue)}}return!1},y=Pe(()=>d({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),N=Pe(()=>{const{value:c}=R;if(t.validator&&c===null)return!1;const{value:D}=p;return d({offset:-D,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),P=Pe(()=>{const{value:c}=R;if(t.validator&&c===null)return!1;const{value:D}=p;return d({offset:+D,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function ee(c){const{onFocus:D}=t,{nTriggerFormFocus:_}=s;D&&Z(D,c),_()}function ze(c){var D,_;if(c.target===((D=b.value)===null||D===void 0?void 0:D.wrapperElRef))return;const Q=d({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(Q!==!1){const ye=(_=b.value)===null||_===void 0?void 0:_.inputElRef;ye&&(ye.value=String(Q||"")),R.value===Q&&x()}else x();const{onBlur:ae}=t,{nTriggerFormBlur:ie}=s;ae&&Z(ae,c),ie(),ut(()=>{x()})}function Ue(c){const{onClear:D}=t;D&&Z(D,c)}function be(){const{value:c}=P;if(!c){We();return}const{value:D}=R;if(D===null)t.validator||I(me());else{const{value:_}=p;d({offset:_,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function Le(){const{value:c}=N;if(!c){Ne();return}const{value:D}=R;if(D===null)t.validator||I(me());else{const{value:_}=p;d({offset:-_,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const xt=ee,Dt=ze;function me(){if(t.validator)return null;const{value:c}=z,{value:D}=U;return c!==null?Math.max(0,c):D!==null?Math.min(0,D):0}function qe(c){Ue(c),I(null)}function nt(c){var D,_,Q;!((D=H.value)===null||D===void 0)&&D.$el.contains(c.target)&&c.preventDefault(),!((_=w.value)===null||_===void 0)&&_.$el.contains(c.target)&&c.preventDefault(),(Q=b.value)===null||Q===void 0||Q.activate()}let ve=null,we=null,Me=null;function Ne(){Me&&(window.clearTimeout(Me),Me=null),ve&&(window.clearInterval(ve),ve=null)}let _e=null;function We(){_e&&(window.clearTimeout(_e),_e=null),we&&(window.clearInterval(we),we=null)}function kt(){Ne(),Me=window.setTimeout(()=>{ve=window.setInterval(()=>{Le()},Bn)},Sn),hn("mouseup",document,Ne,{once:!0})}function rt(){We(),_e=window.setTimeout(()=>{we=window.setInterval(()=>{be()},Bn)},Sn),hn("mouseup",document,We,{once:!0})}const j=()=>{we||be()},Tt=()=>{ve||Le()};function je(c){var D,_;if(c.key==="Enter"){if(c.target===((D=b.value)===null||D===void 0?void 0:D.wrapperElRef))return;d({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((_=b.value)===null||_===void 0||_.deactivate())}else if(c.key==="ArrowUp"){if(!P.value||t.keyboard.ArrowUp===!1)return;c.preventDefault(),d({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&be()}else if(c.key==="ArrowDown"){if(!N.value||t.keyboard.ArrowDown===!1)return;c.preventDefault(),d({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Le()}}function Mt(c){S.value=c,t.updateValueOnInput&&!t.format&&!t.parse&&t.precision===void 0&&d({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}lt(R,()=>{x()});const It={focus:()=>{var c;return(c=b.value)===null||c===void 0?void 0:c.focus()},blur:()=>{var c;return(c=b.value)===null||c===void 0?void 0:c.blur()},select:()=>{var c;return(c=b.value)===null||c===void 0?void 0:c.select()}},Pt=vt("InputNumber",r,e);return Object.assign(Object.assign({},It),{rtlEnabled:Pt,inputInstRef:b,minusButtonInstRef:w,addButtonInstRef:H,mergedClsPrefix:e,mergedBordered:n,uncontrolledValue:M,mergedValue:R,mergedPlaceholder:O,displayedValueInvalid:y,mergedSize:l,mergedDisabled:m,displayedValue:S,addable:P,minusable:N,mergedStatus:g,handleFocus:xt,handleBlur:Dt,handleClear:qe,handleMouseDown:nt,handleAddClick:j,handleMinusClick:Tt,handleAddMousedown:rt,handleMinusMousedown:kt,handleKeyDown:je,handleUpdateDisplayedValue:Mt,mergedTheme:a,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:F(()=>{const{self:{iconColorDisabled:c}}=a.value,[D,_,Q,ae]=Lr(c);return{textColorTextDisabled:`rgb(${D}, ${_}, ${Q})`,opacityDisabled:`${ae}`}})})},render(){const{mergedClsPrefix:t,$slots:n}=this,e=()=>u(gn,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>ft(n["minus-icon"],()=>[u(ke,{clsPrefix:t},{default:()=>u(Gn,null)})])}),r=()=>u(gn,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>ft(n["add-icon"],()=>[u(ke,{clsPrefix:t},{default:()=>u(Wt,null)})])});return u("div",{class:[`${t}-input-number`,this.rtlEnabled&&`${t}-input-number--rtl`]},u(Ze,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var a;return this.showButton&&this.buttonPlacement==="both"?[e(),mn(n.prefix,o=>o?u("span",{class:`${t}-input-number-prefix`},o):null)]:(a=n.prefix)===null||a===void 0?void 0:a.call(n)},suffix:()=>{var a;return this.showButton?[mn(n.suffix,o=>o?u("span",{class:`${t}-input-number-suffix`},o):null),this.buttonPlacement==="right"?e():null,r()]:(a=n.suffix)===null||a===void 0?void 0:a.call(n)}}))}}),Gi=V([K("table",`
 font-size: var(--n-font-size);
 font-variant-numeric: tabular-nums;
 line-height: var(--n-line-height);
 width: 100%;
 border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
 text-align: left;
 border-collapse: separate;
 border-spacing: 0;
 overflow: hidden;
 background-color: var(--n-td-color);
 border-color: var(--n-merged-border-color);
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 --n-merged-border-color: var(--n-border-color);
 `,[V("th",`
 white-space: nowrap;
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 text-align: inherit;
 padding: var(--n-th-padding);
 vertical-align: inherit;
 text-transform: none;
 border: 0px solid var(--n-merged-border-color);
 font-weight: var(--n-th-font-weight);
 color: var(--n-th-text-color);
 background-color: var(--n-th-color);
 border-bottom: 1px solid var(--n-merged-border-color);
 border-right: 1px solid var(--n-merged-border-color);
 `,[V("&:last-child",`
 border-right: 0px solid var(--n-merged-border-color);
 `)]),V("td",`
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 padding: var(--n-td-padding);
 color: var(--n-td-text-color);
 background-color: var(--n-td-color);
 border: 0px solid var(--n-merged-border-color);
 border-right: 1px solid var(--n-merged-border-color);
 border-bottom: 1px solid var(--n-merged-border-color);
 `,[V("&:last-child",`
 border-right: 0px solid var(--n-merged-border-color);
 `)]),se("bordered",`
 border: 1px solid var(--n-merged-border-color);
 border-radius: var(--n-border-radius);
 `,[V("tr",[V("&:last-child",[V("td",`
 border-bottom: 0 solid var(--n-merged-border-color);
 `)])])]),se("single-line",[V("th",`
 border-right: 0px solid var(--n-merged-border-color);
 `),V("td",`
 border-right: 0px solid var(--n-merged-border-color);
 `)]),se("single-column",[V("tr",[V("&:not(:last-child)",[V("td",`
 border-bottom: 0px solid var(--n-merged-border-color);
 `)])])]),se("striped",[V("tr:nth-of-type(even)",[V("td","background-color: var(--n-td-color-striped)")])]),An("bottom-bordered",[V("tr",[V("&:last-child",[V("td",`
 border-bottom: 0px solid var(--n-merged-border-color);
 `)])])])]),qr(K("table",`
 background-color: var(--n-td-color-modal);
 --n-merged-border-color: var(--n-border-color-modal);
 `,[V("th",`
 background-color: var(--n-th-color-modal);
 `),V("td",`
 background-color: var(--n-td-color-modal);
 `)])),Wr(K("table",`
 background-color: var(--n-td-color-popover);
 --n-merged-border-color: var(--n-border-color-popover);
 `,[V("th",`
 background-color: var(--n-th-color-popover);
 `),V("td",`
 background-color: var(--n-td-color-popover);
 `)]))]),Xi=Object.assign(Object.assign({},fe.props),{bordered:{type:Boolean,default:!0},bottomBordered:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},striped:Boolean,singleColumn:Boolean,size:{type:String,default:"medium"}}),xs=le({name:"Table",props:Xi,setup(t){const{mergedClsPrefixRef:n,inlineThemeDisabled:e,mergedRtlRef:r}=Je(t),a=fe("Table","-table",Gi,oa,t,n),o=vt("Table",r,n),s=F(()=>{const{size:m}=t,{self:{borderColor:g,tdColor:b,tdColorModal:w,tdColorPopover:H,thColor:M,thColorModal:C,thColorPopover:R,thTextColor:S,tdTextColor:W,borderRadius:T,thFontWeight:O,lineHeight:p,borderColorModal:z,borderColorPopover:U,tdColorStriped:x,tdColorStripedModal:I,tdColorStripedPopover:d,[ct("fontSize",m)]:y,[ct("tdPadding",m)]:N,[ct("thPadding",m)]:P},common:{cubicBezierEaseInOut:ee}}=a.value;return{"--n-bezier":ee,"--n-td-color":b,"--n-td-color-modal":w,"--n-td-color-popover":H,"--n-td-text-color":W,"--n-border-color":g,"--n-border-color-modal":z,"--n-border-color-popover":U,"--n-border-radius":T,"--n-font-size":y,"--n-th-color":M,"--n-th-color-modal":C,"--n-th-color-popover":R,"--n-th-font-weight":O,"--n-th-text-color":S,"--n-line-height":p,"--n-td-padding":N,"--n-th-padding":P,"--n-td-color-striped":x,"--n-td-color-striped-modal":I,"--n-td-color-striped-popover":d}}),l=e?dt("table",F(()=>t.size[0]),s,t):void 0;return{rtlEnabled:o,mergedClsPrefix:n,cssVars:e?void 0:s,themeClass:l==null?void 0:l.themeClass,onRender:l==null?void 0:l.onRender}},render(){var t;const{mergedClsPrefix:n}=this;return(t=this.onRender)===null||t===void 0||t.call(this),u("table",{class:[`${n}-table`,this.themeClass,{[`${n}-table--rtl`]:this.rtlEnabled,[`${n}-table--bottom-bordered`]:this.bottomBordered,[`${n}-table--bordered`]:this.bordered,[`${n}-table--single-line`]:this.singleLine,[`${n}-table--single-column`]:this.singleColumn,[`${n}-table--striped`]:this.striped}],style:this.cssVars},this.$slots)}});function Ds(t,n,e){const r=e[t];e[t]=e[n],e[n]=r}function ks(t,n){return n=n.replaceAll("v","ü"),ca(t,n)}const Ts=({option:t,handleClose:n})=>u(da,{style:{padding:"0 6px 0 4px"},round:!0,closable:!0,onClose:e=>{e.stopPropagation(),n()}},{default:()=>u("div",{style:{display:"flex",alignItems:"center"}},[u(Qn,{src:"avatar/"+t.value+".webp",round:!0,size:22,style:{marginRight:"4px"}}),t.label])}),Ms=t=>u("div",{style:{display:"flex",alignItems:"center",gap:"12px"}},[u(Qn,{src:"avatar/"+t.value+".webp",round:!0,size:"small"}),t.label]);export{$o as A,Ia as B,wt as C,bn as D,mt as E,cs as F,ls as G,us as H,bs as I,ps as J,Ai as K,vs as L,Ts as M,xs as _,ws as a,ys as b,zo as c,Dn as d,kn as e,$e as f,He as g,ds as h,yt as i,Tn as j,Jt as k,A as l,fs as m,Uo as n,tt as o,ks as p,ms as q,Ms as r,Ds as s,Ke as t,rr as u,gs as v,Lo as w,xa as x,hs as y,Kt as z};
